diff --git a/pr-preview/pr-21/android-chrome-192x192.png b/pr-preview/pr-21/android-chrome-192x192.png new file mode 100644 index 0000000..33dce7c Binary files /dev/null and b/pr-preview/pr-21/android-chrome-192x192.png differ diff --git a/pr-preview/pr-21/android-chrome-512x512.png b/pr-preview/pr-21/android-chrome-512x512.png new file mode 100644 index 0000000..35c0f59 Binary files /dev/null and b/pr-preview/pr-21/android-chrome-512x512.png differ diff --git a/pr-preview/pr-21/apple-touch-icon-114x114.png b/pr-preview/pr-21/apple-touch-icon-114x114.png new file mode 100644 index 0000000..88427d8 Binary files /dev/null and b/pr-preview/pr-21/apple-touch-icon-114x114.png differ diff --git a/pr-preview/pr-21/apple-touch-icon-120x120.png b/pr-preview/pr-21/apple-touch-icon-120x120.png new file mode 100644 index 0000000..9ce634f Binary files /dev/null and b/pr-preview/pr-21/apple-touch-icon-120x120.png differ diff --git a/pr-preview/pr-21/apple-touch-icon-144x144.png b/pr-preview/pr-21/apple-touch-icon-144x144.png new file mode 100644 index 0000000..c2719ea Binary files /dev/null and b/pr-preview/pr-21/apple-touch-icon-144x144.png differ diff --git a/pr-preview/pr-21/apple-touch-icon-152x152.png b/pr-preview/pr-21/apple-touch-icon-152x152.png new file mode 100644 index 0000000..0763f80 Binary files /dev/null and b/pr-preview/pr-21/apple-touch-icon-152x152.png differ diff --git a/pr-preview/pr-21/apple-touch-icon-167x167.png b/pr-preview/pr-21/apple-touch-icon-167x167.png new file mode 100644 index 0000000..2d624e0 Binary files /dev/null and b/pr-preview/pr-21/apple-touch-icon-167x167.png differ diff --git a/pr-preview/pr-21/apple-touch-icon-180x180.png b/pr-preview/pr-21/apple-touch-icon-180x180.png new file mode 100644 index 0000000..d0b295e Binary files /dev/null and b/pr-preview/pr-21/apple-touch-icon-180x180.png differ diff --git a/pr-preview/pr-21/apple-touch-icon-57x57.png b/pr-preview/pr-21/apple-touch-icon-57x57.png new file mode 100644 index 0000000..86d78df Binary files /dev/null and b/pr-preview/pr-21/apple-touch-icon-57x57.png differ diff --git a/pr-preview/pr-21/apple-touch-icon-60x60.png b/pr-preview/pr-21/apple-touch-icon-60x60.png new file mode 100644 index 0000000..34c1d41 Binary files /dev/null and b/pr-preview/pr-21/apple-touch-icon-60x60.png differ diff --git a/pr-preview/pr-21/apple-touch-icon-72x72.png b/pr-preview/pr-21/apple-touch-icon-72x72.png new file mode 100644 index 0000000..50cc9e8 Binary files /dev/null and b/pr-preview/pr-21/apple-touch-icon-72x72.png differ diff --git a/pr-preview/pr-21/apple-touch-icon-76x76.png b/pr-preview/pr-21/apple-touch-icon-76x76.png new file mode 100644 index 0000000..dfd17da Binary files /dev/null and b/pr-preview/pr-21/apple-touch-icon-76x76.png differ diff --git a/pr-preview/pr-21/assets/chi-20-natural-diagramming.pdf b/pr-preview/pr-21/assets/chi-20-natural-diagramming.pdf new file mode 100644 index 0000000..dd9cf26 Binary files /dev/null and b/pr-preview/pr-21/assets/chi-20-natural-diagramming.pdf differ diff --git a/pr-preview/pr-21/assets/dsldi-presentation.pdf b/pr-preview/pr-21/assets/dsldi-presentation.pdf new file mode 100644 index 0000000..e94478d Binary files /dev/null and b/pr-preview/pr-21/assets/dsldi-presentation.pdf differ diff --git a/pr-preview/pr-21/assets/dsldi.pdf b/pr-preview/pr-21/assets/dsldi.pdf new file mode 100644 index 0000000..f18fda0 Binary files /dev/null and b/pr-preview/pr-21/assets/dsldi.pdf differ diff --git a/pr-preview/pr-21/assets/edgeworth.svg b/pr-preview/pr-21/assets/edgeworth.svg new file mode 100644 index 0000000..af97f52 --- /dev/null +++ b/pr-preview/pr-21/assets/edgeworth.svg @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pr-preview/pr-21/assets/index-e006a2b6.js b/pr-preview/pr-21/assets/index-e006a2b6.js new file mode 100644 index 0000000..b46c789 --- /dev/null +++ b/pr-preview/pr-21/assets/index-e006a2b6.js @@ -0,0 +1,4990 @@ +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=t(s);fetch(s.href,r)}})();var EM=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gb(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var mS={exports:{}},IA={},bS={exports:{}},Mt={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Zu=Symbol.for("react.element"),kM=Symbol.for("react.portal"),DM=Symbol.for("react.fragment"),UM=Symbol.for("react.strict_mode"),PM=Symbol.for("react.profiler"),_M=Symbol.for("react.provider"),JM=Symbol.for("react.context"),OM=Symbol.for("react.forward_ref"),QM=Symbol.for("react.suspense"),jM=Symbol.for("react.memo"),qM=Symbol.for("react.lazy"),tB=Symbol.iterator;function $M(n){return n===null||typeof n!="object"?null:(n=tB&&n[tB]||n["@@iterator"],typeof n=="function"?n:null)}var vS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},yS=Object.assign,GS={};function ic(n,e,t){this.props=n,this.context=e,this.refs=GS,this.updater=t||vS}ic.prototype.isReactComponent={};ic.prototype.setState=function(n,e){if(typeof n!="object"&&typeof n!="function"&&n!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,n,e,"setState")};ic.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function BS(){}BS.prototype=ic.prototype;function Bb(n,e,t){this.props=n,this.context=e,this.refs=GS,this.updater=t||vS}var Zb=Bb.prototype=new BS;Zb.constructor=Bb;yS(Zb,ic.prototype);Zb.isPureReactComponent=!0;var nB=Array.isArray,ZS=Object.prototype.hasOwnProperty,wb={current:null},wS={key:!0,ref:!0,__self:!0,__source:!0};function SS(n,e,t){var i,s={},r=null,o=null;if(e!=null)for(i in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(r=""+e.key),e)ZS.call(e,i)&&!wS.hasOwnProperty(i)&&(s[i]=e[i]);var a=arguments.length-2;if(a===1)s.children=t;else if(1>>1,se=L[ce];if(0>>1;ces(ve,U))yes(P,ve)?(L[ce]=P,L[ye]=U,ce=ye):(L[ce]=ve,L[re]=U,ce=re);else if(yes(P,U))L[ce]=P,L[ye]=U,ce=ye;else break e}}return _}function s(L,_){var U=L.sortIndex-_.sortIndex;return U!==0?U:L.id-_.id}if(typeof performance=="object"&&typeof performance.now=="function"){var r=performance;n.unstable_now=function(){return r.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,C=null,d=3,h=!1,f=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(L){for(var _=t(c);_!==null;){if(_.callback===null)i(c);else if(_.startTime<=L)i(c),_.sortIndex=_.expirationTime,e(l,_);else break;_=t(c)}}function B(L){if(v=!1,m(L),!f)if(t(l)!==null)f=!0,Ce(S);else{var _=t(c);_!==null&&le(B,_.startTime-L)}}function S(L,_){f=!1,v&&(v=!1,A(M),M=-1),h=!0;var U=d;try{for(m(_),C=t(l);C!==null&&(!(C.expirationTime>_)||L&&!N());){var ce=C.callback;if(typeof ce=="function"){C.callback=null,d=C.priorityLevel;var se=ce(C.expirationTime<=_);_=n.unstable_now(),typeof se=="function"?C.callback=se:C===t(l)&&i(l),m(_)}else i(l);C=t(l)}if(C!==null)var ee=!0;else{var re=t(c);re!==null&&le(B,re.startTime-_),ee=!1}return ee}finally{C=null,d=U,h=!1}}var x=!1,R=null,M=-1,Z=5,V=-1;function N(){return!(n.unstable_now()-VL||125ce?(L.sortIndex=U,e(c,L),t(l)===null&&L===t(c)&&(v?(A(M),M=-1):v=!0,le(B,U-ce))):(L.sortIndex=se,e(l,L),f||h||(f=!0,Ce(S))),L},n.unstable_shouldYield=N,n.unstable_wrapCallback=function(L){var _=d;return function(){var U=d;d=_;try{return L.apply(this,arguments)}finally{d=U}}}})(VS);WS.exports=VS;var c5=WS.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var MS=D,ds=c5;function we(n){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+n,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mm=Object.prototype.hasOwnProperty,I5=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,sB={},rB={};function u5(n){return Mm.call(rB,n)?!0:Mm.call(sB,n)?!1:I5.test(n)?rB[n]=!0:(sB[n]=!0,!1)}function C5(n,e,t,i){if(t!==null&&t.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return i?!1:t!==null?!t.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function d5(n,e,t,i){if(e===null||typeof e>"u"||C5(n,e,t,i))return!0;if(i)return!1;if(t!==null)switch(t.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Vi(n,e,t,i,s,r,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=i,this.attributeNamespace=s,this.mustUseProperty=t,this.propertyName=n,this.type=e,this.sanitizeURL=r,this.removeEmptyString=o}var oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){oi[n]=new Vi(n,0,!1,n,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var e=n[0];oi[e]=new Vi(e,1,!1,n[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(n){oi[n]=new Vi(n,2,!1,n.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){oi[n]=new Vi(n,2,!1,n,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(n){oi[n]=new Vi(n,3,!1,n.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(n){oi[n]=new Vi(n,3,!0,n,null,!1,!1)});["capture","download"].forEach(function(n){oi[n]=new Vi(n,4,!1,n,null,!1,!1)});["cols","rows","size","span"].forEach(function(n){oi[n]=new Vi(n,6,!1,n,null,!1,!1)});["rowSpan","start"].forEach(function(n){oi[n]=new Vi(n,5,!1,n.toLowerCase(),null,!1,!1)});var xb=/[\-:]([a-z])/g;function Rb(n){return n[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(n){var e=n.replace(xb,Rb);oi[e]=new Vi(e,1,!1,n,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var e=n.replace(xb,Rb);oi[e]=new Vi(e,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(n){var e=n.replace(xb,Rb);oi[e]=new Vi(e,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(n){oi[n]=new Vi(n,1,!1,n.toLowerCase(),null,!1,!1)});oi.xlinkHref=new Vi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(n){oi[n]=new Vi(n,1,!1,n.toLowerCase(),null,!0,!0)});function Wb(n,e,t,i){var s=oi.hasOwnProperty(e)?oi[e]:null;(s!==null?s.type!==0:i||!(2a||s[o]!==r[a]){var l=` +`+s[o].replace(" at new "," at ");return n.displayName&&l.includes("")&&(l=l.replace("",n.displayName)),l}while(1<=o&&0<=a);break}}}finally{gf=!1,Error.prepareStackTrace=t}return(n=n?n.displayName||n.name:"")?dI(n):""}function h5(n){switch(n.tag){case 5:return dI(n.type);case 16:return dI("Lazy");case 13:return dI("Suspense");case 19:return dI("SuspenseList");case 0:case 2:case 15:return n=cf(n.type,!1),n;case 11:return n=cf(n.type.render,!1),n;case 1:return n=cf(n.type,!0),n;default:return""}}function Ym(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case Ag:return"Fragment";case hg:return"Portal";case Nm:return"Profiler";case Vb:return"StrictMode";case Hm:return"Suspense";case Xm:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case XS:return(n.displayName||"Context")+".Consumer";case HS:return(n._context.displayName||"Context")+".Provider";case Mb:var e=n.render;return n=n.displayName,n||(n=e.displayName||e.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case Nb:return e=n.displayName||null,e!==null?e:Ym(n.type)||"Memo";case zo:e=n._payload,n=n._init;try{return Ym(n(e))}catch{}}return null}function A5(n){var e=n.type;switch(n.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=e.render,n=n.displayName||n.name||"",e.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ym(e);case 8:return e===Vb?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function sa(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function FS(n){var e=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function p5(n){var e=FS(n)?"checked":"value",t=Object.getOwnPropertyDescriptor(n.constructor.prototype,e),i=""+n[e];if(!n.hasOwnProperty(e)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var s=t.get,r=t.set;return Object.defineProperty(n,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){i=""+o,r.call(this,o)}}),Object.defineProperty(n,e,{enumerable:t.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){n._valueTracker=null,delete n[e]}}}}function _C(n){n._valueTracker||(n._valueTracker=p5(n))}function KS(n){if(!n)return!1;var e=n._valueTracker;if(!e)return!0;var t=e.getValue(),i="";return n&&(i=FS(n)?n.checked?"true":"false":n.value),n=i,n!==t?(e.setValue(n),!0):!1}function Nh(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function Fm(n,e){var t=e.checked;return fn({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??n._wrapperState.initialChecked})}function aB(n,e){var t=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;t=sa(e.value!=null?e.value:t),n._wrapperState={initialChecked:i,initialValue:t,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function zS(n,e){e=e.checked,e!=null&&Wb(n,"checked",e,!1)}function Km(n,e){zS(n,e);var t=sa(e.value),i=e.type;if(t!=null)i==="number"?(t===0&&n.value===""||n.value!=t)&&(n.value=""+t):n.value!==""+t&&(n.value=""+t);else if(i==="submit"||i==="reset"){n.removeAttribute("value");return}e.hasOwnProperty("value")?zm(n,e.type,t):e.hasOwnProperty("defaultValue")&&zm(n,e.type,sa(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(n.defaultChecked=!!e.defaultChecked)}function lB(n,e,t){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+n._wrapperState.initialValue,t||e===n.value||(n.value=e),n.defaultValue=e}t=n.name,t!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,t!==""&&(n.name=t)}function zm(n,e,t){(e!=="number"||Nh(n.ownerDocument)!==n)&&(t==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+t&&(n.defaultValue=""+t))}var hI=Array.isArray;function Hg(n,e,t,i){if(n=n.options,e){e={};for(var s=0;s"+e.valueOf().toString()+"",e=JC.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;e.firstChild;)n.appendChild(e.firstChild)}});function EI(n,e){if(e){var t=n.firstChild;if(t&&t===n.lastChild&&t.nodeType===3){t.nodeValue=e;return}}n.textContent=e}var yI={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},f5=["Webkit","ms","Moz","O"];Object.keys(yI).forEach(function(n){f5.forEach(function(e){e=e+n.charAt(0).toUpperCase()+n.substring(1),yI[e]=yI[n]})});function kS(n,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||yI.hasOwnProperty(n)&&yI[n]?(""+e).trim():e+"px"}function DS(n,e){n=n.style;for(var t in e)if(e.hasOwnProperty(t)){var i=t.indexOf("--")===0,s=kS(t,e[t],i);t==="float"&&(t="cssFloat"),i?n.setProperty(t,s):n[t]=s}}var m5=fn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Em(n,e){if(e){if(m5[n]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(we(137,n));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(we(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(we(61))}if(e.style!=null&&typeof e.style!="object")throw Error(we(62))}}function km(n,e){if(n.indexOf("-")===-1)return typeof e.is=="string";switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Dm=null;function Hb(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Um=null,Xg=null,Yg=null;function IB(n){if(n=xu(n)){if(typeof Um!="function")throw Error(we(280));var e=n.stateNode;e&&(e=AA(e),Um(n.stateNode,n.type,e))}}function US(n){Xg?Yg?Yg.push(n):Yg=[n]:Xg=n}function PS(){if(Xg){var n=Xg,e=Yg;if(Yg=Xg=null,IB(n),e)for(n=0;n>>=0,n===0?32:31-(W5(n)/V5|0)|0}var OC=64,QC=4194304;function AI(n){switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function Fh(n,e){var t=n.pendingLanes;if(t===0)return 0;var i=0,s=n.suspendedLanes,r=n.pingedLanes,o=t&268435455;if(o!==0){var a=o&~s;a!==0?i=AI(a):(r&=o,r!==0&&(i=AI(r)))}else o=t&~s,o!==0?i=AI(o):r!==0&&(i=AI(r));if(i===0)return 0;if(e!==0&&e!==i&&!(e&s)&&(s=i&-i,r=e&-e,s>=r||s===16&&(r&4194240)!==0))return e;if(i&4&&(i|=t&16),e=n.entangledLanes,e!==0)for(n=n.entanglements,e&=i;0t;t++)e.push(n);return e}function wu(n,e,t){n.pendingLanes|=e,e!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,e=31-ar(e),n[e]=t}function X5(n,e){var t=n.pendingLanes&~e;n.pendingLanes=e,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=e,n.mutableReadLanes&=e,n.entangledLanes&=e,e=n.entanglements;var i=n.eventTimes;for(n=n.expirationTimes;0=BI),bB=String.fromCharCode(32),vB=!1;function ux(n,e){switch(n){case"keyup":return gN.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cx(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var pg=!1;function IN(n,e){switch(n){case"compositionend":return Cx(e);case"keypress":return e.which!==32?null:(vB=!0,bB);case"textInput":return n=e.data,n===bB&&vB?null:n;default:return null}}function uN(n,e){if(pg)return n==="compositionend"||!Eb&&ux(n,e)?(n=cx(),Ch=zb=Do=null,pg=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:t,offset:e-n};n=i}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=ZB(t)}}function px(n,e){return n&&e?n===e?!0:n&&n.nodeType===3?!1:e&&e.nodeType===3?px(n,e.parentNode):"contains"in n?n.contains(e):n.compareDocumentPosition?!!(n.compareDocumentPosition(e)&16):!1:!1}function fx(){for(var n=window,e=Nh();e instanceof n.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)n=e.contentWindow;else break;e=Nh(n.document)}return e}function kb(n){var e=n&&n.nodeName&&n.nodeName.toLowerCase();return e&&(e==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||e==="textarea"||n.contentEditable==="true")}function vN(n){var e=fx(),t=n.focusedElem,i=n.selectionRange;if(e!==t&&t&&t.ownerDocument&&px(t.ownerDocument.documentElement,t)){if(i!==null&&kb(t)){if(e=i.start,n=i.end,n===void 0&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if(n=(e=t.ownerDocument||document)&&e.defaultView||window,n.getSelection){n=n.getSelection();var s=t.textContent.length,r=Math.min(i.start,s);i=i.end===void 0?r:Math.min(i.end,s),!n.extend&&r>i&&(s=i,i=r,r=s),s=wB(t,r);var o=wB(t,i);s&&o&&(n.rangeCount!==1||n.anchorNode!==s.node||n.anchorOffset!==s.offset||n.focusNode!==o.node||n.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),n.removeAllRanges(),r>i?(n.addRange(e),n.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),n.addRange(e)))}}for(e=[],n=t;n=n.parentNode;)n.nodeType===1&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,fg=null,jm=null,wI=null,qm=!1;function SB(n,e,t){var i=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;qm||fg==null||fg!==Nh(i)||(i=fg,"selectionStart"in i&&kb(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),wI&&JI(wI,i)||(wI=i,i=Lh(jm,"onSelect"),0vg||(n.current=s0[vg],s0[vg]=null,vg--)}function nn(n,e){vg++,s0[vg]=n.current,n.current=e}var ra={},bi=ua(ra),Oi=ua(!1),gl=ra;function Pg(n,e){var t=n.type.contextTypes;if(!t)return ra;var i=n.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var s={},r;for(r in t)s[r]=e[r];return i&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=e,n.__reactInternalMemoizedMaskedChildContext=s),s}function Qi(n){return n=n.childContextTypes,n!=null}function Eh(){an(Oi),an(bi)}function HB(n,e,t){if(bi.current!==ra)throw Error(we(168));nn(bi,e),nn(Oi,t)}function Sx(n,e,t){var i=n.stateNode;if(e=e.childContextTypes,typeof i.getChildContext!="function")return t;i=i.getChildContext();for(var s in i)if(!(s in e))throw Error(we(108,A5(n)||"Unknown",s));return fn({},t,i)}function kh(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||ra,gl=bi.current,nn(bi,n),nn(Oi,Oi.current),!0}function XB(n,e,t){var i=n.stateNode;if(!i)throw Error(we(169));t?(n=Sx(n,e,gl),i.__reactInternalMemoizedMergedChildContext=n,an(Oi),an(bi),nn(bi,n)):an(Oi),nn(Oi,t)}var to=null,pA=!1,Bf=!1;function xx(n){to===null?to=[n]:to.push(n)}function NN(n){pA=!0,xx(n)}function Ca(){if(!Bf&&to!==null){Bf=!0;var n=0,e=Ot;try{var t=to;for(Ot=1;n>=o,s-=o,so=1<<32-ar(e)+s|t<M?(Z=R,R=null):Z=R.sibling;var V=d(A,R,m[M],B);if(V===null){R===null&&(R=Z);break}n&&R&&V.alternate===null&&e(A,R),b=r(V,b,M),x===null?S=V:x.sibling=V,x=V,R=Z}if(M===m.length)return t(A,R),cn&&Ka(A,M),S;if(R===null){for(;MM?(Z=R,R=null):Z=R.sibling;var N=d(A,R,V.value,B);if(N===null){R===null&&(R=Z);break}n&&R&&N.alternate===null&&e(A,R),b=r(N,b,M),x===null?S=N:x.sibling=N,x=N,R=Z}if(V.done)return t(A,R),cn&&Ka(A,M),S;if(R===null){for(;!V.done;M++,V=m.next())V=C(A,V.value,B),V!==null&&(b=r(V,b,M),x===null?S=V:x.sibling=V,x=V);return cn&&Ka(A,M),S}for(R=i(A,R);!V.done;M++,V=m.next())V=h(R,A,M,V.value,B),V!==null&&(n&&V.alternate!==null&&R.delete(V.key===null?M:V.key),b=r(V,b,M),x===null?S=V:x.sibling=V,x=V);return n&&R.forEach(function(k){return e(A,k)}),cn&&Ka(A,M),S}function y(A,b,m,B){if(typeof m=="object"&&m!==null&&m.type===Ag&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case PC:e:{for(var S=m.key,x=b;x!==null;){if(x.key===S){if(S=m.type,S===Ag){if(x.tag===7){t(A,x.sibling),b=s(x,m.props.children),b.return=A,A=b;break e}}else if(x.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===zo&&EB(S)===x.type){t(A,x.sibling),b=s(x,m.props),b.ref=kc(A,x,m),b.return=A,A=b;break e}t(A,x);break}else e(A,x);x=x.sibling}m.type===Ag?(b=il(m.props.children,A.mode,B,m.key),b.return=A,A=b):(B=vh(m.type,m.key,m.props,null,A.mode,B),B.ref=kc(A,b,m),B.return=A,A=B)}return o(A);case hg:e:{for(x=m.key;b!==null;){if(b.key===x)if(b.tag===4&&b.stateNode.containerInfo===m.containerInfo&&b.stateNode.implementation===m.implementation){t(A,b.sibling),b=s(b,m.children||[]),b.return=A,A=b;break e}else{t(A,b);break}else e(A,b);b=b.sibling}b=Mf(m,A.mode,B),b.return=A,A=b}return o(A);case zo:return x=m._init,y(A,b,x(m._payload),B)}if(hI(m))return f(A,b,m,B);if(Kc(m))return v(A,b,m,B);id(A,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,b!==null&&b.tag===6?(t(A,b.sibling),b=s(b,m),b.return=A,A=b):(t(A,b),b=Vf(m,A.mode,B),b.return=A,A=b),o(A)):t(A,b)}return y}var Jg=Yx(!0),Fx=Yx(!1),Ru={},Vr=ua(Ru),qI=ua(Ru),$I=ua(Ru);function Oa(n){if(n===Ru)throw Error(we(174));return n}function qb(n,e){switch(nn($I,e),nn(qI,n),nn(Vr,Ru),n=e.nodeType,n){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Tm(null,"");break;default:n=n===8?e.parentNode:e,e=n.namespaceURI||null,n=n.tagName,e=Tm(e,n)}an(Vr),nn(Vr,e)}function Og(){an(Vr),an(qI),an($I)}function Kx(n){Oa($I.current);var e=Oa(Vr.current),t=Tm(e,n.type);e!==t&&(nn(qI,n),nn(Vr,t))}function $b(n){qI.current===n&&(an(Vr),an(qI))}var dn=ua(0);function Oh(n){for(var e=n;e!==null;){if(e.tag===13){var t=e.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break;for(;e.sibling===null;){if(e.return===null||e.return===n)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Zf=[];function ev(){for(var n=0;nt?t:4,n(!0);var i=wf.transition;wf.transition={};try{n(!1),e()}finally{Ot=t,wf.transition=i}}function eR(){return Ks().memoizedState}function FN(n,e,t){var i=$o(n);if(t={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null},tR(n))nR(e,t);else if(t=Mx(n,e,t,i),t!==null){var s=Ri();lr(t,n,i,s),iR(t,e,i)}}function KN(n,e,t){var i=$o(n),s={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null};if(tR(n))nR(e,s);else{var r=n.alternate;if(n.lanes===0&&(r===null||r.lanes===0)&&(r=e.lastRenderedReducer,r!==null))try{var o=e.lastRenderedState,a=r(o,t);if(s.hasEagerState=!0,s.eagerState=a,Ir(a,o)){var l=e.interleaved;l===null?(s.next=s,Qb(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}t=Mx(n,e,s,i),t!==null&&(s=Ri(),lr(t,n,i,s),iR(t,e,i))}}function tR(n){var e=n.alternate;return n===pn||e!==null&&e===pn}function nR(n,e){SI=Qh=!0;var t=n.pending;t===null?e.next=e:(e.next=t.next,t.next=e),n.pending=e}function iR(n,e,t){if(t&4194240){var i=e.lanes;i&=n.pendingLanes,t|=i,e.lanes=t,Yb(n,t)}}var jh={readContext:Fs,useCallback:Ci,useContext:Ci,useEffect:Ci,useImperativeHandle:Ci,useInsertionEffect:Ci,useLayoutEffect:Ci,useMemo:Ci,useReducer:Ci,useRef:Ci,useState:Ci,useDebugValue:Ci,useDeferredValue:Ci,useTransition:Ci,useMutableSource:Ci,useSyncExternalStore:Ci,useId:Ci,unstable_isNewReconciler:!1},zN={readContext:Fs,useCallback:function(n,e){return xr().memoizedState=[n,e===void 0?null:e],n},useContext:Fs,useEffect:DB,useImperativeHandle:function(n,e,t){return t=t!=null?t.concat([n]):null,ph(4194308,4,Ox.bind(null,e,n),t)},useLayoutEffect:function(n,e){return ph(4194308,4,n,e)},useInsertionEffect:function(n,e){return ph(4,2,n,e)},useMemo:function(n,e){var t=xr();return e=e===void 0?null:e,n=n(),t.memoizedState=[n,e],n},useReducer:function(n,e,t){var i=xr();return e=t!==void 0?t(e):e,i.memoizedState=i.baseState=e,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:e},i.queue=n,n=n.dispatch=FN.bind(null,pn,n),[i.memoizedState,n]},useRef:function(n){var e=xr();return n={current:n},e.memoizedState=n},useState:kB,useDebugValue:rv,useDeferredValue:function(n){return xr().memoizedState=n},useTransition:function(){var n=kB(!1),e=n[0];return n=YN.bind(null,n[1]),xr().memoizedState=n,[e,n]},useMutableSource:function(){},useSyncExternalStore:function(n,e,t){var i=pn,s=xr();if(cn){if(t===void 0)throw Error(we(407));t=t()}else{if(t=e(),$n===null)throw Error(we(349));Il&30||Tx(i,e,t)}s.memoizedState=t;var r={value:t,getSnapshot:e};return s.queue=r,DB(kx.bind(null,i,r,n),[n]),i.flags|=2048,nu(9,Ex.bind(null,i,r,t,e),void 0,null),t},useId:function(){var n=xr(),e=$n.identifierPrefix;if(cn){var t=ro,i=so;t=(i&~(1<<32-ar(i)-1)).toString(32)+t,e=":"+e+"R"+t,t=eu++,0<\/script>",n=n.removeChild(n.firstChild)):typeof i.is=="string"?n=o.createElement(t,{is:i.is}):(n=o.createElement(t),t==="select"&&(o=n,i.multiple?o.multiple=!0:i.size&&(o.size=i.size))):n=o.createElementNS(n,t),n[Rr]=e,n[jI]=i,uR(n,e,!1,!1),e.stateNode=n;e:{switch(o=km(t,i),t){case"dialog":rn("cancel",n),rn("close",n),s=i;break;case"iframe":case"object":case"embed":rn("load",n),s=i;break;case"video":case"audio":for(s=0;sjg&&(e.flags|=128,i=!0,Dc(r,!1),e.lanes=4194304)}else{if(!i)if(n=Oh(o),n!==null){if(e.flags|=128,i=!0,t=n.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),Dc(r,!0),r.tail===null&&r.tailMode==="hidden"&&!o.alternate&&!cn)return di(e),null}else 2*wn()-r.renderingStartTime>jg&&t!==1073741824&&(e.flags|=128,i=!0,Dc(r,!1),e.lanes=4194304);r.isBackwards?(o.sibling=e.child,e.child=o):(t=r.last,t!==null?t.sibling=o:e.child=o,r.last=o)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=wn(),e.sibling=null,t=dn.current,nn(dn,i?t&1|2:t&1),e):(di(e),null);case 22:case 23:return Iv(),i=e.memoizedState!==null,n!==null&&n.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?as&1073741824&&(di(e),e.subtreeFlags&6&&(e.flags|=8192)):di(e),null;case 24:return null;case 25:return null}throw Error(we(156,e.tag))}function _N(n,e){switch(Ub(e),e.tag){case 1:return Qi(e.type)&&Eh(),n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 3:return Og(),an(Oi),an(bi),ev(),n=e.flags,n&65536&&!(n&128)?(e.flags=n&-65537|128,e):null;case 5:return $b(e),null;case 13:if(an(dn),n=e.memoizedState,n!==null&&n.dehydrated!==null){if(e.alternate===null)throw Error(we(340));_g()}return n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 19:return an(dn),null;case 4:return Og(),null;case 10:return Ob(e.type._context),null;case 22:case 23:return Iv(),null;case 24:return null;default:return null}}var rd=!1,mi=!1,JN=typeof WeakSet=="function"?WeakSet:Set,ze=null;function Zg(n,e){var t=n.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(i){vn(n,e,i)}else t.current=null}function A0(n,e,t){try{t()}catch(i){vn(n,e,i)}}var $B=!1;function ON(n,e){if($m=Kh,n=fx(),kb(n)){if("selectionStart"in n)var t={start:n.selectionStart,end:n.selectionEnd};else e:{t=(t=n.ownerDocument)&&t.defaultView||window;var i=t.getSelection&&t.getSelection();if(i&&i.rangeCount!==0){t=i.anchorNode;var s=i.anchorOffset,r=i.focusNode;i=i.focusOffset;try{t.nodeType,r.nodeType}catch{t=null;break e}var o=0,a=-1,l=-1,c=0,u=0,C=n,d=null;t:for(;;){for(var h;C!==t||s!==0&&C.nodeType!==3||(a=o+s),C!==r||i!==0&&C.nodeType!==3||(l=o+i),C.nodeType===3&&(o+=C.nodeValue.length),(h=C.firstChild)!==null;)d=C,C=h;for(;;){if(C===n)break t;if(d===t&&++c===s&&(a=o),d===r&&++u===i&&(l=o),(h=C.nextSibling)!==null)break;C=d,d=C.parentNode}C=h}t=a===-1||l===-1?null:{start:a,end:l}}else t=null}t=t||{start:0,end:0}}else t=null;for(e0={focusedElem:n,selectionRange:t},Kh=!1,ze=e;ze!==null;)if(e=ze,n=e.child,(e.subtreeFlags&1028)!==0&&n!==null)n.return=e,ze=n;else for(;ze!==null;){e=ze;try{var f=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(f!==null){var v=f.memoizedProps,y=f.memoizedState,A=e.stateNode,b=A.getSnapshotBeforeUpdate(e.elementType===e.type?v:nr(e.type,v),y);A.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var m=e.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(we(163))}}catch(B){vn(e,e.return,B)}if(n=e.sibling,n!==null){n.return=e.return,ze=n;break}ze=e.return}return f=$B,$B=!1,f}function xI(n,e,t){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var s=i=i.next;do{if((s.tag&n)===n){var r=s.destroy;s.destroy=void 0,r!==void 0&&A0(e,t,r)}s=s.next}while(s!==i)}}function bA(n,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var t=e=e.next;do{if((t.tag&n)===n){var i=t.create;t.destroy=i()}t=t.next}while(t!==e)}}function p0(n){var e=n.ref;if(e!==null){var t=n.stateNode;switch(n.tag){case 5:n=t;break;default:n=t}typeof e=="function"?e(n):e.current=n}}function hR(n){var e=n.alternate;e!==null&&(n.alternate=null,hR(e)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(e=n.stateNode,e!==null&&(delete e[Rr],delete e[jI],delete e[i0],delete e[VN],delete e[MN])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function AR(n){return n.tag===5||n.tag===3||n.tag===4}function e2(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||AR(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function f0(n,e,t){var i=n.tag;if(i===5||i===6)n=n.stateNode,e?t.nodeType===8?t.parentNode.insertBefore(n,e):t.insertBefore(n,e):(t.nodeType===8?(e=t.parentNode,e.insertBefore(n,t)):(e=t,e.appendChild(n)),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=Th));else if(i!==4&&(n=n.child,n!==null))for(f0(n,e,t),n=n.sibling;n!==null;)f0(n,e,t),n=n.sibling}function m0(n,e,t){var i=n.tag;if(i===5||i===6)n=n.stateNode,e?t.insertBefore(n,e):t.appendChild(n);else if(i!==4&&(n=n.child,n!==null))for(m0(n,e,t),n=n.sibling;n!==null;)m0(n,e,t),n=n.sibling}var si=null,sr=!1;function Vo(n,e,t){for(t=t.child;t!==null;)pR(n,e,t),t=t.sibling}function pR(n,e,t){if(Wr&&typeof Wr.onCommitFiberUnmount=="function")try{Wr.onCommitFiberUnmount(uA,t)}catch{}switch(t.tag){case 5:mi||Zg(t,e);case 6:var i=si,s=sr;si=null,Vo(n,e,t),si=i,sr=s,si!==null&&(sr?(n=si,t=t.stateNode,n.nodeType===8?n.parentNode.removeChild(t):n.removeChild(t)):si.removeChild(t.stateNode));break;case 18:si!==null&&(sr?(n=si,t=t.stateNode,n.nodeType===8?Gf(n.parentNode,t):n.nodeType===1&&Gf(n,t),PI(n)):Gf(si,t.stateNode));break;case 4:i=si,s=sr,si=t.stateNode.containerInfo,sr=!0,Vo(n,e,t),si=i,sr=s;break;case 0:case 11:case 14:case 15:if(!mi&&(i=t.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){s=i=i.next;do{var r=s,o=r.destroy;r=r.tag,o!==void 0&&(r&2||r&4)&&A0(t,e,o),s=s.next}while(s!==i)}Vo(n,e,t);break;case 1:if(!mi&&(Zg(t,e),i=t.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=t.memoizedProps,i.state=t.memoizedState,i.componentWillUnmount()}catch(a){vn(t,e,a)}Vo(n,e,t);break;case 21:Vo(n,e,t);break;case 22:t.mode&1?(mi=(i=mi)||t.memoizedState!==null,Vo(n,e,t),mi=i):Vo(n,e,t);break;default:Vo(n,e,t)}}function t2(n){var e=n.updateQueue;if(e!==null){n.updateQueue=null;var t=n.stateNode;t===null&&(t=n.stateNode=new JN),e.forEach(function(i){var s=s3.bind(null,n,i);t.has(i)||(t.add(i),i.then(s,s))})}}function Os(n,e){var t=e.deletions;if(t!==null)for(var i=0;is&&(s=o),i&=~r}if(i=s,i=wn()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*jN(i/1960))-i,10n?16:n,Uo===null)var i=!1;else{if(n=Uo,Uo=null,eA=0,Yt&6)throw Error(we(331));var s=Yt;for(Yt|=4,ze=n.current;ze!==null;){var r=ze,o=r.child;if(ze.flags&16){var a=r.deletions;if(a!==null){for(var l=0;lwn()-gv?nl(n,0):lv|=t),ji(n,e)}function ZR(n,e){e===0&&(n.mode&1?(e=QC,QC<<=1,!(QC&130023424)&&(QC=4194304)):e=1);var t=Ri();n=Co(n,e),n!==null&&(wu(n,e,t),ji(n,t))}function i3(n){var e=n.memoizedState,t=0;e!==null&&(t=e.retryLane),ZR(n,t)}function s3(n,e){var t=0;switch(n.tag){case 13:var i=n.stateNode,s=n.memoizedState;s!==null&&(t=s.retryLane);break;case 19:i=n.stateNode;break;default:throw Error(we(314))}i!==null&&i.delete(e),ZR(n,t)}var wR;wR=function(n,e,t){if(n!==null)if(n.memoizedProps!==e.pendingProps||Oi.current)_i=!0;else{if(!(n.lanes&t)&&!(e.flags&128))return _i=!1,UN(n,e,t);_i=!!(n.flags&131072)}else _i=!1,cn&&e.flags&1048576&&Rx(e,Uh,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;fh(n,e),n=e.pendingProps;var s=Pg(e,bi.current);Kg(e,t),s=nv(null,e,i,n,s,t);var r=iv();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Qi(i)?(r=!0,kh(e)):r=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,jb(e),s.updater=fA,e.stateNode=s,s._reactInternals=e,g0(e,i,n,t),e=u0(null,e,i,!0,r,t)):(e.tag=0,cn&&r&&Db(e),wi(null,e,s,t),e=e.child),e;case 16:i=e.elementType;e:{switch(fh(n,e),n=e.pendingProps,s=i._init,i=s(i._payload),e.type=i,s=e.tag=o3(i),n=nr(i,n),s){case 0:e=I0(null,e,i,n,t);break e;case 1:e=QB(null,e,i,n,t);break e;case 11:e=JB(null,e,i,n,t);break e;case 14:e=OB(null,e,i,nr(i.type,n),t);break e}throw Error(we(306,i,""))}return e;case 0:return i=e.type,s=e.pendingProps,s=e.elementType===i?s:nr(i,s),I0(n,e,i,s,t);case 1:return i=e.type,s=e.pendingProps,s=e.elementType===i?s:nr(i,s),QB(n,e,i,s,t);case 3:e:{if(gR(e),n===null)throw Error(we(387));i=e.pendingProps,r=e.memoizedState,s=r.element,Nx(n,e),Jh(e,i,null,t);var o=e.memoizedState;if(i=o.element,r.isDehydrated)if(r={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=r,e.memoizedState=r,e.flags&256){s=Qg(Error(we(423)),e),e=jB(n,e,i,t,s);break e}else if(i!==s){s=Qg(Error(we(424)),e),e=jB(n,e,i,t,s);break e}else for(gs=Qo(e.stateNode.containerInfo.firstChild),Is=e,cn=!0,rr=null,t=Fx(e,null,i,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(_g(),i===s){e=ho(n,e,t);break e}wi(n,e,i,t)}e=e.child}return e;case 5:return Kx(e),n===null&&o0(e),i=e.type,s=e.pendingProps,r=n!==null?n.memoizedProps:null,o=s.children,t0(i,s)?o=null:r!==null&&t0(i,r)&&(e.flags|=32),lR(n,e),wi(n,e,o,t),e.child;case 6:return n===null&&o0(e),null;case 13:return cR(n,e,t);case 4:return qb(e,e.stateNode.containerInfo),i=e.pendingProps,n===null?e.child=Jg(e,null,i,t):wi(n,e,i,t),e.child;case 11:return i=e.type,s=e.pendingProps,s=e.elementType===i?s:nr(i,s),JB(n,e,i,s,t);case 7:return wi(n,e,e.pendingProps,t),e.child;case 8:return wi(n,e,e.pendingProps.children,t),e.child;case 12:return wi(n,e,e.pendingProps.children,t),e.child;case 10:e:{if(i=e.type._context,s=e.pendingProps,r=e.memoizedProps,o=s.value,nn(Ph,i._currentValue),i._currentValue=o,r!==null)if(Ir(r.value,o)){if(r.children===s.children&&!Oi.current){e=ho(n,e,t);break e}}else for(r=e.child,r!==null&&(r.return=e);r!==null;){var a=r.dependencies;if(a!==null){o=r.child;for(var l=a.firstContext;l!==null;){if(l.context===i){if(r.tag===1){l=go(-1,t&-t),l.tag=2;var c=r.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}r.lanes|=t,l=r.alternate,l!==null&&(l.lanes|=t),a0(r.return,t,e),a.lanes|=t;break}l=l.next}}else if(r.tag===10)o=r.type===e.type?null:r.child;else if(r.tag===18){if(o=r.return,o===null)throw Error(we(341));o.lanes|=t,a=o.alternate,a!==null&&(a.lanes|=t),a0(o,t,e),o=r.sibling}else o=r.child;if(o!==null)o.return=r;else for(o=r;o!==null;){if(o===e){o=null;break}if(r=o.sibling,r!==null){r.return=o.return,o=r;break}o=o.return}r=o}wi(n,e,s.children,t),e=e.child}return e;case 9:return s=e.type,i=e.pendingProps.children,Kg(e,t),s=Fs(s),i=i(s),e.flags|=1,wi(n,e,i,t),e.child;case 14:return i=e.type,s=nr(i,e.pendingProps),s=nr(i.type,s),OB(n,e,i,s,t);case 15:return oR(n,e,e.type,e.pendingProps,t);case 17:return i=e.type,s=e.pendingProps,s=e.elementType===i?s:nr(i,s),fh(n,e),e.tag=1,Qi(i)?(n=!0,kh(e)):n=!1,Kg(e,t),Xx(e,i,s),g0(e,i,s,t),u0(null,e,i,!0,n,t);case 19:return IR(n,e,t);case 22:return aR(n,e,t)}throw Error(we(156,e.tag))};function SR(n,e){return $S(n,e)}function r3(n,e,t,i){this.tag=n,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Hs(n,e,t,i){return new r3(n,e,t,i)}function Cv(n){return n=n.prototype,!(!n||!n.isReactComponent)}function o3(n){if(typeof n=="function")return Cv(n)?1:0;if(n!=null){if(n=n.$$typeof,n===Mb)return 11;if(n===Nb)return 14}return 2}function ea(n,e){var t=n.alternate;return t===null?(t=Hs(n.tag,e,n.key,n.mode),t.elementType=n.elementType,t.type=n.type,t.stateNode=n.stateNode,t.alternate=n,n.alternate=t):(t.pendingProps=e,t.type=n.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=n.flags&14680064,t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},t.sibling=n.sibling,t.index=n.index,t.ref=n.ref,t}function vh(n,e,t,i,s,r){var o=2;if(i=n,typeof n=="function")Cv(n)&&(o=1);else if(typeof n=="string")o=5;else e:switch(n){case Ag:return il(t.children,s,r,e);case Vb:o=8,s|=8;break;case Nm:return n=Hs(12,t,e,s|2),n.elementType=Nm,n.lanes=r,n;case Hm:return n=Hs(13,t,e,s),n.elementType=Hm,n.lanes=r,n;case Xm:return n=Hs(19,t,e,s),n.elementType=Xm,n.lanes=r,n;case YS:return yA(t,s,r,e);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case HS:o=10;break e;case XS:o=9;break e;case Mb:o=11;break e;case Nb:o=14;break e;case zo:o=16,i=null;break e}throw Error(we(130,n==null?n:typeof n,""))}return e=Hs(o,t,e,s),e.elementType=n,e.type=i,e.lanes=r,e}function il(n,e,t,i){return n=Hs(7,n,i,e),n.lanes=t,n}function yA(n,e,t,i){return n=Hs(22,n,i,e),n.elementType=YS,n.lanes=t,n.stateNode={isHidden:!1},n}function Vf(n,e,t){return n=Hs(6,n,null,e),n.lanes=t,n}function Mf(n,e,t){return e=Hs(4,n.children!==null?n.children:[],n.key,e),e.lanes=t,e.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},e}function a3(n,e,t,i,s){this.tag=e,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=uf(0),this.expirationTimes=uf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uf(0),this.identifierPrefix=i,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function dv(n,e,t,i,s,r,o,a,l){return n=new a3(n,e,t,a,l),e===1?(e=1,r===!0&&(e|=8)):e=0,r=Hs(3,null,null,e),n.current=r,r.stateNode=n,r.memoizedState={element:i,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},jb(r),n}function l3(n,e,t){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(VR)}catch(n){console.error(n)}}VR(),RS.exports=As;var C3=RS.exports,g2=C3;Vm.createRoot=g2.createRoot,Vm.hydrateRoot=g2.hydrateRoot;const d3=({className:n})=>j.jsxs("svg",{className:n,width:"100%",height:"100%",viewBox:"0 0 180 180",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[j.jsx("path",{className:"fill-icontext dark:fill-icontext-dark",d:"M76.875 5.3125L65.25 51H54.2188L48.0312 27C47.9062 26.5417 47.7396 25.8438 47.5312 24.9062C47.3229 23.9688 47.1042 22.9479 46.875 21.8438C46.6458 20.7188 46.4375 19.6667 46.25 18.6875C46.0833 17.6875 45.9688 16.8958 45.9062 16.3125C45.8438 16.8958 45.7188 17.6771 45.5312 18.6562C45.3646 19.6354 45.1667 20.6771 44.9375 21.7812C44.7292 22.8854 44.5208 23.9167 44.3125 24.875C44.1042 25.8333 43.9375 26.5625 43.8125 27.0625L37.6562 51H26.6562L15 5.3125H24.5312L30.375 30.25C30.5417 31 30.7292 31.8958 30.9375 32.9375C31.1667 33.9792 31.3854 35.0729 31.5938 36.2188C31.8229 37.3438 32.0208 38.4375 32.1875 39.5C32.375 40.5417 32.5104 41.4479 32.5938 42.2188C32.6979 41.4271 32.8333 40.5104 33 39.4688C33.1667 38.4062 33.3438 37.3333 33.5312 36.25C33.7396 35.1458 33.9479 34.125 34.1562 33.1875C34.3646 32.25 34.5521 31.4896 34.7188 30.9062L41.375 5.3125H50.5312L57.1875 30.9062C57.3333 31.4688 57.5 32.2292 57.6875 33.1875C57.8958 34.125 58.1042 35.1458 58.3125 36.25C58.5208 37.3542 58.7083 38.4375 58.875 39.5C59.0625 40.5417 59.1979 41.4479 59.2812 42.2188C59.4271 41.1771 59.625 39.9167 59.875 38.4375C60.1458 36.9375 60.4271 35.4479 60.7188 33.9688C61.0312 32.4896 61.3021 31.25 61.5312 30.25L67.3438 5.3125H76.875ZM107.225 33.4688C107.225 36.3854 106.829 38.9688 106.037 41.2188C105.267 43.4688 104.131 45.375 102.631 46.9375C101.152 48.4792 99.3604 49.6458 97.2562 50.4375C95.1729 51.2292 92.8187 51.625 90.1937 51.625C87.7354 51.625 85.475 51.2292 83.4125 50.4375C81.3708 49.6458 79.5896 48.4792 78.0687 46.9375C76.5687 45.375 75.4021 43.4688 74.5687 41.2188C73.7562 38.9688 73.35 36.3854 73.35 33.4688C73.35 29.5938 74.0375 26.3125 75.4125 23.625C76.7875 20.9375 78.7458 18.8958 81.2875 17.5C83.8292 16.1042 86.8604 15.4062 90.3812 15.4062C93.6521 15.4062 96.5479 16.1042 99.0687 17.5C101.61 18.8958 103.6 20.9375 105.037 23.625C106.496 26.3125 107.225 29.5938 107.225 33.4688ZM83.0687 33.4688C83.0687 35.7604 83.3187 37.6875 83.8187 39.25C84.3187 40.8125 85.1 41.9896 86.1625 42.7812C87.225 43.5729 88.6104 43.9688 90.3187 43.9688C92.0062 43.9688 93.3708 43.5729 94.4125 42.7812C95.475 41.9896 96.2458 40.8125 96.725 39.25C97.225 37.6875 97.475 35.7604 97.475 33.4688C97.475 31.1562 97.225 29.2396 96.725 27.7188C96.2458 26.1771 95.475 25.0208 94.4125 24.25C93.35 23.4792 91.9646 23.0938 90.2562 23.0938C87.7354 23.0938 85.9021 23.9583 84.7562 25.6875C83.6312 27.4167 83.0687 30.0104 83.0687 33.4688ZM122.003 51.625C118.107 51.625 114.93 50.1042 112.471 47.0625C110.034 44 108.815 39.5104 108.815 33.5938C108.815 27.6146 110.055 23.0938 112.534 20.0312C115.013 16.9479 118.253 15.4062 122.253 15.4062C123.919 15.4062 125.388 15.6354 126.659 16.0938C127.93 16.5521 129.023 17.1667 129.94 17.9375C130.878 18.7083 131.669 19.5729 132.315 20.5312H132.628C132.503 19.8646 132.346 18.8854 132.159 17.5938C131.992 16.2812 131.909 14.9375 131.909 13.5625V2.375H141.471V51H134.159L132.315 46.4688H131.909C131.305 47.4271 130.544 48.3021 129.628 49.0938C128.732 49.8646 127.659 50.4792 126.409 50.9375C125.159 51.3958 123.69 51.625 122.003 51.625ZM125.346 44.0312C127.95 44.0312 129.784 43.2604 130.846 41.7188C131.93 40.1562 132.503 37.8125 132.565 34.6875V33.6562C132.565 30.2604 132.044 27.6667 131.003 25.875C129.961 24.0625 128.023 23.1562 125.19 23.1562C123.086 23.1562 121.44 24.0625 120.253 25.875C119.065 27.6875 118.471 30.3021 118.471 33.7188C118.471 37.1354 119.065 39.7083 120.253 41.4375C121.461 43.1667 123.159 44.0312 125.346 44.0312ZM159.446 15.4062C162.675 15.4062 165.457 16.0312 167.79 17.2812C170.123 18.5104 171.925 20.3021 173.196 22.6562C174.467 25.0104 175.103 27.8854 175.103 31.2812V35.9062H152.571C152.675 38.5938 153.478 40.7083 154.978 42.25C156.498 43.7708 158.603 44.5312 161.29 44.5312C163.519 44.5312 165.561 44.3021 167.415 43.8438C169.269 43.3854 171.175 42.6979 173.134 41.7812V49.1562C171.405 50.0104 169.592 50.6354 167.696 51.0312C165.821 51.4271 163.54 51.625 160.853 51.625C157.353 51.625 154.248 50.9792 151.54 49.6875C148.853 48.3958 146.738 46.4271 145.196 43.7812C143.675 41.1354 142.915 37.8021 142.915 33.7812C142.915 29.6979 143.603 26.3021 144.978 23.5938C146.373 20.8646 148.311 18.8229 150.79 17.4688C153.269 16.0938 156.155 15.4062 159.446 15.4062ZM159.509 22.1875C157.655 22.1875 156.113 22.7812 154.884 23.9688C153.675 25.1562 152.978 27.0208 152.79 29.5625H166.165C166.144 28.1458 165.884 26.8854 165.384 25.7812C164.905 24.6771 164.175 23.8021 163.196 23.1562C162.238 22.5104 161.009 22.1875 159.509 22.1875ZM61.2812 155H48.9688L29.0938 120.438H28.8125C28.8958 121.875 28.9688 123.323 29.0312 124.781C29.0938 126.24 29.1562 127.698 29.2188 129.156C29.2812 130.594 29.3438 132.042 29.4062 133.5V155H20.75V109.312H32.9688L52.8125 143.531H53.0312C52.9896 142.115 52.9375 140.708 52.875 139.312C52.8125 137.917 52.75 136.521 52.6875 135.125C52.6458 133.729 52.6042 132.333 52.5625 130.938V109.312H61.2812V155ZM75.1937 120.062V155H65.6625V120.062H75.1937ZM70.4437 106.375C71.8604 106.375 73.0792 106.708 74.1 107.375C75.1208 108.021 75.6312 109.24 75.6312 111.031C75.6312 112.802 75.1208 114.031 74.1 114.719C73.0792 115.385 71.8604 115.719 70.4437 115.719C69.0062 115.719 67.7771 115.385 66.7562 114.719C65.7562 114.031 65.2562 112.802 65.2562 111.031C65.2562 109.24 65.7562 108.021 66.7562 107.375C67.7771 106.708 69.0062 106.375 70.4437 106.375Z"}),j.jsx("path",{className:"fill-primary",d:"M18.3382 54.625C18.1007 55.7875 17.857 57.0187 17.607 58.3187C17.3695 59.6187 17.1507 60.8937 16.9507 62.1437C16.7632 63.3937 16.6132 64.5312 16.5007 65.5562H10.0882L9.807 65.1437C10.0445 64.2187 10.3382 63.1187 10.6882 61.8437C11.0507 60.5562 11.4382 59.2687 11.8507 57.9812C12.2757 56.6812 12.7007 55.5625 13.1257 54.625H18.3382ZM8.77575 54.625C8.53825 55.7875 8.2945 57.0187 8.0445 58.3187C7.807 59.6187 7.58825 60.8937 7.38825 62.1437C7.20075 63.3937 7.05075 64.5312 6.93825 65.5562H0.525749L0.244499 65.1437C0.481999 64.2187 0.775749 63.1187 1.12575 61.8437C1.48825 60.5562 1.87575 59.2687 2.28825 57.9812C2.71325 56.6812 3.13825 55.5625 3.56325 54.625H8.77575ZM61.2812 103H48.9688L29.0938 68.4375H28.8125C28.8958 69.875 28.9688 71.3229 29.0312 72.7812C29.0938 74.2396 29.1562 75.6979 29.2188 77.1562C29.2812 78.5938 29.3438 80.0417 29.4062 81.5V103H20.75V57.3125H32.9688L52.8125 91.5312H53.0312C52.9896 90.1146 52.9375 88.7083 52.875 87.3125C52.8125 85.9167 52.75 84.5208 52.6875 83.125C52.6458 81.7292 52.6042 80.3333 52.5625 78.9375V57.3125H61.2812V103ZM75.1937 68.0625V103H65.6625V68.0625H75.1937ZM70.4437 54.375C71.8604 54.375 73.0792 54.7083 74.1 55.375C75.1208 56.0208 75.6312 57.2396 75.6312 59.0312C75.6312 60.8021 75.1208 62.0312 74.1 62.7188C73.0792 63.3854 71.8604 63.7188 70.4437 63.7188C69.0062 63.7188 67.7771 63.3854 66.7562 62.7188C65.7562 62.0312 65.2562 60.8021 65.2562 59.0312C65.2562 57.2396 65.7562 56.0208 66.7562 55.375C67.7771 54.7083 69.0062 54.375 70.4437 54.375ZM119.856 67.4062C123.815 67.4062 126.804 68.4271 128.825 70.4688C130.867 72.4896 131.888 75.7396 131.888 80.2188V103H122.325V82.5938C122.325 80.0938 121.898 78.2083 121.044 76.9375C120.19 75.6667 118.867 75.0312 117.075 75.0312C114.554 75.0312 112.763 75.9375 111.7 77.75C110.638 79.5417 110.106 82.1146 110.106 85.4688V103H100.575V82.5938C100.575 80.9271 100.388 79.5312 100.013 78.4062C99.6375 77.2812 99.0646 76.4375 98.2938 75.875C97.5229 75.3125 96.5333 75.0312 95.325 75.0312C93.5542 75.0312 92.1583 75.4792 91.1375 76.375C90.1375 77.25 89.4188 78.5521 88.9813 80.2812C88.5646 81.9896 88.3563 84.0833 88.3563 86.5625V103H78.825V68.0625H86.1063L87.3875 72.5312H87.9188C88.6271 71.3229 89.5125 70.3438 90.575 69.5938C91.6583 68.8438 92.8458 68.2917 94.1375 67.9375C95.4292 67.5833 96.7417 67.4062 98.075 67.4062C100.638 67.4062 102.804 67.8229 104.575 68.6562C106.367 69.4896 107.742 70.7812 108.7 72.5312H109.544C110.585 70.7396 112.054 69.4375 113.95 68.625C115.867 67.8125 117.835 67.4062 119.856 67.4062ZM167.05 85.4688C167.05 88.3854 166.654 90.9688 165.863 93.2188C165.092 95.4688 163.956 97.375 162.456 98.9375C160.977 100.479 159.185 101.646 157.081 102.438C154.998 103.229 152.644 103.625 150.019 103.625C147.56 103.625 145.3 103.229 143.238 102.438C141.196 101.646 139.415 100.479 137.894 98.9375C136.394 97.375 135.227 95.4688 134.394 93.2188C133.581 90.9688 133.175 88.3854 133.175 85.4688C133.175 81.5938 133.863 78.3125 135.238 75.625C136.613 72.9375 138.571 70.8958 141.113 69.5C143.654 68.1042 146.685 67.4062 150.206 67.4062C153.477 67.4062 156.373 68.1042 158.894 69.5C161.435 70.8958 163.425 72.9375 164.863 75.625C166.321 78.3125 167.05 81.5938 167.05 85.4688ZM142.894 85.4688C142.894 87.7604 143.144 89.6875 143.644 91.25C144.144 92.8125 144.925 93.9896 145.988 94.7812C147.05 95.5729 148.435 95.9688 150.144 95.9688C151.831 95.9688 153.196 95.5729 154.238 94.7812C155.3 93.9896 156.071 92.8125 156.55 91.25C157.05 89.6875 157.3 87.7604 157.3 85.4688C157.3 83.1562 157.05 81.2396 156.55 79.7188C156.071 78.1771 155.3 77.0208 154.238 76.25C153.175 75.4792 151.79 75.0938 150.081 75.0938C147.56 75.0938 145.727 75.9583 144.581 77.6875C143.456 79.4167 142.894 82.0104 142.894 85.4688ZM182.031 54.625L182.294 55.0375C182.069 55.9625 181.775 57.0687 181.412 58.3562C181.062 59.6312 180.675 60.9125 180.25 62.2C179.837 63.4875 179.419 64.6062 178.994 65.5562H173.781C174.031 64.3937 174.275 63.1625 174.512 61.8625C174.75 60.5625 174.962 59.2875 175.15 58.0375C175.35 56.7875 175.506 55.65 175.619 54.625H182.031ZM172.469 54.625L172.75 55.0375C172.525 55.9625 172.231 57.0687 171.869 58.3562C171.506 59.6312 171.112 60.9125 170.687 62.2C170.275 63.4875 169.856 64.6062 169.431 65.5562H164.219C164.406 64.6812 164.587 63.7687 164.762 62.8187C164.95 61.8562 165.125 60.8937 165.287 59.9312C165.45 58.9687 165.594 58.0375 165.719 57.1375C165.856 56.225 165.969 55.3875 166.056 54.625H172.469Z"})]}),h3="/pr-preview/pr-21/assets/penrose.svg",A3="/pr-preview/pr-21/assets/edgeworth.svg",p3="/pr-preview/pr-21/assets/mathdiagrams.webp";/** + * @license + * Copyright 2010-2023 Three.js Authors + * SPDX-License-Identifier: MIT + */const da="152",f3={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},m3={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},MR=0,B0=1,NR=2,b3=3,HR=0,SA=1,VI=2,ir=3,Hr=0,Ln=1,Pi=2,v3=2,en=0,sl=1,Z0=2,w0=3,S0=4,XR=5,Ea=100,YR=101,FR=102,x0=103,R0=104,KR=200,zR=201,LR=202,TR=203,fv=204,mv=205,ER=206,kR=207,DR=208,UR=209,PR=210,bv=0,vv=1,iA=2,su=3,ru=4,yv=5,Gv=6,xA=7,Wu=0,_R=1,JR=2,gr=0,OR=1,QR=2,jR=3,Bv=4,qR=5,RA=300,oa=301,aa=302,ou=303,au=304,oc=306,hs=1e3,Kn=1001,lu=1002,pt=1003,sA=1004,y3=1004,MI=1005,G3=1005,je=1006,Zv=1007,B3=1007,la=1008,Z3=1008,sn=1009,$R=1010,e1=1011,wv=1012,t1=1013,oo=1014,Zn=1015,us=1016,n1=1017,i1=1018,ta=1020,s1=1021,In=1023,WA=1024,r1=1025,na=1026,ga=1027,Sv=1028,o1=1029,xv=1030,a1=1031,l1=1033,yh=33776,Gh=33777,Bh=33778,Zh=33779,W0=35840,V0=35841,M0=35842,N0=35843,g1=36196,H0=37492,X0=37496,Y0=37808,F0=37809,K0=37810,z0=37811,L0=37812,T0=37813,E0=37814,k0=37815,D0=37816,U0=37817,P0=37818,_0=37819,J0=37820,O0=37821,wh=36492,c1=36283,Q0=36284,j0=36285,q0=36286,I1=2200,u1=2201,C1=2202,gu=2300,cu=2301,Sh=2302,Qa=2400,ja=2401,Iu=2402,VA=2500,Rv=2501,w3=0,S3=1,x3=2,Vu=3e3,Ys=3001,Xn=3200,Xr=3201,mo=0,d1=1,co="",ft="srgb",ur="srgb-linear",Wv="display-p3",R3=0,xh=7680,W3=7681,V3=7682,M3=7683,N3=34055,H3=34056,X3=5386,Y3=512,F3=513,K3=514,z3=515,L3=516,T3=517,E3=518,h1=519,uu=35044,A1=35048,k3=35040,D3=35045,U3=35049,P3=35041,_3=35046,J3=35050,O3=35042,Q3="100",rA="300 es",oA=1035;class zs{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const s=this._listeners[e];if(s!==void 0){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[e.type];if(i!==void 0){e.target=this;const s=i.slice(0);for(let r=0,o=s.length;r>8&255]+hi[n>>16&255]+hi[n>>24&255]+"-"+hi[e&255]+hi[e>>8&255]+"-"+hi[e>>16&15|64]+hi[e>>24&255]+"-"+hi[t&63|128]+hi[t>>8&255]+"-"+hi[t>>16&255]+hi[t>>24&255]+hi[i&255]+hi[i>>8&255]+hi[i>>16&255]+hi[i>>24&255]).toLowerCase()}function yn(n,e,t){return Math.max(e,Math.min(t,n))}function Vv(n,e){return(n%e+e)%e}function j3(n,e,t,i,s){return i+(n-e)*(s-i)/(t-e)}function q3(n,e,t){return n!==e?(t-n)/(e-n):0}function NI(n,e,t){return(1-t)*n+t*e}function $3(n,e,t,i){return NI(n,e,1-Math.exp(-t*i))}function eH(n,e=1){return e-Math.abs(Vv(n,e*2)-e)}function tH(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function nH(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function iH(n,e){return n+Math.floor(Math.random()*(e-n+1))}function sH(n,e){return n+Math.random()*(e-n)}function rH(n){return n*(.5-Math.random())}function oH(n){n!==void 0&&(c2=n);let e=c2+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function aH(n){return n*rl}function lH(n){return n*qg}function $0(n){return(n&n-1)===0&&n!==0}function p1(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function f1(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function gH(n,e,t,i,s){const r=Math.cos,o=Math.sin,a=r(t/2),l=o(t/2),c=r((e+i)/2),u=o((e+i)/2),C=r((e-i)/2),d=o((e-i)/2),h=r((i-e)/2),f=o((i-e)/2);switch(s){case"XYX":n.set(a*u,l*C,l*d,a*c);break;case"YZY":n.set(l*d,a*u,l*C,a*c);break;case"ZXZ":n.set(l*C,l*d,a*u,a*c);break;case"XZX":n.set(a*u,l*f,l*h,a*c);break;case"YXY":n.set(l*h,a*u,l*f,a*c);break;case"ZYZ":n.set(l*f,l*h,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function cs(n,e){switch(e.constructor){case Float32Array:return n;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function vt(n,e){switch(e.constructor){case Float32Array:return n;case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const m1={DEG2RAD:rl,RAD2DEG:qg,generateUUID:Cs,clamp:yn,euclideanModulo:Vv,mapLinear:j3,inverseLerp:q3,lerp:NI,damp:$3,pingpong:eH,smoothstep:tH,smootherstep:nH,randInt:iH,randFloat:sH,randFloatSpread:rH,seededRandom:oH,degToRad:aH,radToDeg:lH,isPowerOfTwo:$0,ceilPowerOfTwo:p1,floorPowerOfTwo:f1,setQuaternionFromProperEuler:gH,normalize:vt,denormalize:cs};class ne{constructor(e=0,t=0){ne.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6],this.y=s[1]*t+s[4]*i+s[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(yn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),s=Math.sin(t),r=this.x-e.x,o=this.y-e.y;return this.x=r*i-o*s+e.x,this.y=r*s+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class xt{constructor(){xt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(e,t,i,s,r,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=s,u[2]=a,u[3]=t,u[4]=r,u[5]=l,u[6]=i,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,s=t.elements,r=this.elements,o=i[0],a=i[3],l=i[6],c=i[1],u=i[4],C=i[7],d=i[2],h=i[5],f=i[8],v=s[0],y=s[3],A=s[6],b=s[1],m=s[4],B=s[7],S=s[2],x=s[5],R=s[8];return r[0]=o*v+a*b+l*S,r[3]=o*y+a*m+l*x,r[6]=o*A+a*B+l*R,r[1]=c*v+u*b+C*S,r[4]=c*y+u*m+C*x,r[7]=c*A+u*B+C*R,r[2]=d*v+h*b+f*S,r[5]=d*y+h*m+f*x,r[8]=d*A+h*B+f*R,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return t*o*u-t*a*c-i*r*u+i*a*l+s*r*c-s*o*l}invert(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],C=u*o-a*c,d=a*l-u*r,h=c*r-o*l,f=t*C+i*d+s*h;if(f===0)return this.set(0,0,0,0,0,0,0,0,0);const v=1/f;return e[0]=C*v,e[1]=(s*c-u*i)*v,e[2]=(a*i-s*o)*v,e[3]=d*v,e[4]=(u*t-s*l)*v,e[5]=(s*r-a*t)*v,e[6]=h*v,e[7]=(i*l-c*t)*v,e[8]=(o*t-i*r)*v,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,s,r,o,a){const l=Math.cos(r),c=Math.sin(r);return this.set(i*l,i*c,-i*(l*o+c*a)+o+e,-s*c,s*l,-s*(-c*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(Nf.makeScale(e,t)),this}rotate(e){return this.premultiply(Nf.makeRotation(-e)),this}translate(e,t){return this.premultiply(Nf.makeTranslation(e,t)),this}makeTranslation(e,t){return this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let s=0;s<9;s++)if(t[s]!==i[s])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Nf=new xt;function b1(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const cH={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Sg(n,e){return new cH[n](e)}function Cu(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}const I2={};function HI(n){n in I2||(I2[n]=!0,console.warn(n))}function Lg(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Hf(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}const IH=new xt().fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),uH=new xt().fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]);function CH(n){return n.convertSRGBToLinear().applyMatrix3(uH)}function dH(n){return n.applyMatrix3(IH).convertLinearToSRGB()}const hH={[ur]:n=>n,[ft]:n=>n.convertSRGBToLinear(),[Wv]:CH},AH={[ur]:n=>n,[ft]:n=>n.convertLinearToSRGB(),[Wv]:dH},Ws={enabled:!0,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(n){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!n},get workingColorSpace(){return ur},set workingColorSpace(n){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(n,e,t){if(this.enabled===!1||e===t||!e||!t)return n;const i=hH[e],s=AH[t];if(i===void 0||s===void 0)throw new Error(`Unsupported color space conversion, "${e}" to "${t}".`);return s(i(n))},fromWorkingColorSpace:function(n,e){return this.convert(n,this.workingColorSpace,e)},toWorkingColorSpace:function(n,e){return this.convert(n,e,this.workingColorSpace)}};let El;class Mv{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{El===void 0&&(El=Cu("canvas")),El.width=e.width,El.height=e.height;const i=El.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=El}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Cu("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const s=i.getImageData(0,0,e.width,e.height),r=s.data;for(let o=0;o0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==RA)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case hs:e.x=e.x-Math.floor(e.x);break;case Kn:e.x=e.x<0?0:1;break;case lu:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case hs:e.y=e.y-Math.floor(e.y);break;case Kn:e.y=e.y<0?0:1;break;case lu:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return HI("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===ft?Ys:Vu}set encoding(e){HI("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===Ys?ft:co}}jt.DEFAULT_IMAGE=null;jt.DEFAULT_MAPPING=RA;jt.DEFAULT_ANISOTROPY=1;class Vt{constructor(e=0,t=0,i=0,s=1){Vt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=s}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,s){return this.x=e,this.y=t,this.z=i,this.w=s,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,s=this.z,r=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*s+o[12]*r,this.y=o[1]*t+o[5]*i+o[9]*s+o[13]*r,this.z=o[2]*t+o[6]*i+o[10]*s+o[14]*r,this.w=o[3]*t+o[7]*i+o[11]*s+o[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,s,r;const l=e.elements,c=l[0],u=l[4],C=l[8],d=l[1],h=l[5],f=l[9],v=l[2],y=l[6],A=l[10];if(Math.abs(u-d)<.01&&Math.abs(C-v)<.01&&Math.abs(f-y)<.01){if(Math.abs(u+d)<.1&&Math.abs(C+v)<.1&&Math.abs(f+y)<.1&&Math.abs(c+h+A-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const m=(c+1)/2,B=(h+1)/2,S=(A+1)/2,x=(u+d)/4,R=(C+v)/4,M=(f+y)/4;return m>B&&m>S?m<.01?(i=0,s=.707106781,r=.707106781):(i=Math.sqrt(m),s=x/i,r=R/i):B>S?B<.01?(i=.707106781,s=0,r=.707106781):(s=Math.sqrt(B),i=x/s,r=M/s):S<.01?(i=.707106781,s=.707106781,r=0):(r=Math.sqrt(S),i=R/r,s=M/r),this.set(i,s,r,t),this}let b=Math.sqrt((y-f)*(y-f)+(C-v)*(C-v)+(d-u)*(d-u));return Math.abs(b)<.001&&(b=1),this.x=(y-f)/b,this.y=(C-v)/b,this.z=(d-u)/b,this.w=Math.acos((c+h+A-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class Rt extends zs{constructor(e=1,t=1,i={}){super(),this.isWebGLRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Vt(0,0,e,t),this.scissorTest=!1,this.viewport=new Vt(0,0,e,t);const s={width:e,height:t,depth:1};i.encoding!==void 0&&(HI("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),i.colorSpace=i.encoding===Ys?ft:co),this.texture=new jt(s,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=i.generateMipmaps!==void 0?i.generateMipmaps:!1,this.texture.internalFormat=i.internalFormat!==void 0?i.internalFormat:null,this.texture.minFilter=i.minFilter!==void 0?i.minFilter:je,this.depthBuffer=i.depthBuffer!==void 0?i.depthBuffer:!0,this.stencilBuffer=i.stencilBuffer!==void 0?i.stencilBuffer:!1,this.depthTexture=i.depthTexture!==void 0?i.depthTexture:null,this.samples=i.samples!==void 0?i.samples:0}setSize(e,t,i=1){(this.width!==e||this.height!==t||this.depth!==i)&&(this.width=e,this.height=t,this.depth=i,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=i,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new qa(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class MA extends jt{constructor(e=null,t=1,i=1,s=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:s},this.magFilter=pt,this.minFilter=pt,this.wrapR=Kn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class fH extends Rt{constructor(e=1,t=1,i=1){super(e,t),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new MA(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class ol extends jt{constructor(e=null,t=1,i=1,s=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:s},this.magFilter=pt,this.minFilter=pt,this.wrapR=Kn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class mH extends Rt{constructor(e=1,t=1,i=1){super(e,t),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new ol(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class v1 extends Rt{constructor(e=1,t=1,i=1,s={}){super(e,t,s),this.isWebGLMultipleRenderTargets=!0;const r=this.texture;this.texture=[];for(let o=0;o=0?1:-1,m=1-A*A;if(m>Number.EPSILON){const S=Math.sqrt(m),x=Math.atan2(S,A*b);y=Math.sin(y*x)/S,a=Math.sin(a*x)/S}const B=a*b;if(l=l*y+d*B,c=c*y+h*B,u=u*y+f*B,C=C*y+v*B,y===1-a){const S=1/Math.sqrt(l*l+c*c+u*u+C*C);l*=S,c*=S,u*=S,C*=S}}e[t]=l,e[t+1]=c,e[t+2]=u,e[t+3]=C}static multiplyQuaternionsFlat(e,t,i,s,r,o){const a=i[s],l=i[s+1],c=i[s+2],u=i[s+3],C=r[o],d=r[o+1],h=r[o+2],f=r[o+3];return e[t]=a*f+u*C+l*h-c*d,e[t+1]=l*f+u*d+c*C-a*h,e[t+2]=c*f+u*h+a*d-l*C,e[t+3]=u*f-a*C-l*d-c*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,s){return this._x=e,this._y=t,this._z=i,this._w=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const i=e._x,s=e._y,r=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(i/2),u=a(s/2),C=a(r/2),d=l(i/2),h=l(s/2),f=l(r/2);switch(o){case"XYZ":this._x=d*u*C+c*h*f,this._y=c*h*C-d*u*f,this._z=c*u*f+d*h*C,this._w=c*u*C-d*h*f;break;case"YXZ":this._x=d*u*C+c*h*f,this._y=c*h*C-d*u*f,this._z=c*u*f-d*h*C,this._w=c*u*C+d*h*f;break;case"ZXY":this._x=d*u*C-c*h*f,this._y=c*h*C+d*u*f,this._z=c*u*f+d*h*C,this._w=c*u*C-d*h*f;break;case"ZYX":this._x=d*u*C-c*h*f,this._y=c*h*C+d*u*f,this._z=c*u*f-d*h*C,this._w=c*u*C+d*h*f;break;case"YZX":this._x=d*u*C+c*h*f,this._y=c*h*C+d*u*f,this._z=c*u*f-d*h*C,this._w=c*u*C-d*h*f;break;case"XZY":this._x=d*u*C-c*h*f,this._y=c*h*C-d*u*f,this._z=c*u*f+d*h*C,this._w=c*u*C+d*h*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,s=Math.sin(i);return this._x=e.x*s,this._y=e.y*s,this._z=e.z*s,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],s=t[4],r=t[8],o=t[1],a=t[5],l=t[9],c=t[2],u=t[6],C=t[10],d=i+a+C;if(d>0){const h=.5/Math.sqrt(d+1);this._w=.25/h,this._x=(u-l)*h,this._y=(r-c)*h,this._z=(o-s)*h}else if(i>a&&i>C){const h=2*Math.sqrt(1+i-a-C);this._w=(u-l)/h,this._x=.25*h,this._y=(s+o)/h,this._z=(r+c)/h}else if(a>C){const h=2*Math.sqrt(1+a-i-C);this._w=(r-c)/h,this._x=(s+o)/h,this._y=.25*h,this._z=(l+u)/h}else{const h=2*Math.sqrt(1+C-i-a);this._w=(o-s)/h,this._x=(r+c)/h,this._y=(l+u)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(yn(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const s=Math.min(1,t/i);return this.slerp(e,s),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,s=e._y,r=e._z,o=e._w,a=t._x,l=t._y,c=t._z,u=t._w;return this._x=i*u+o*a+s*c-r*l,this._y=s*u+o*l+r*a-i*c,this._z=r*u+o*c+i*l-s*a,this._w=o*u-i*a-s*l-r*c,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,s=this._y,r=this._z,o=this._w;let a=o*e._w+i*e._x+s*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=s,this._z=r,this;const l=1-a*a;if(l<=Number.EPSILON){const h=1-t;return this._w=h*o+t*this._w,this._x=h*i+t*this._x,this._y=h*s+t*this._y,this._z=h*r+t*this._z,this.normalize(),this._onChangeCallback(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),C=Math.sin((1-t)*u)/c,d=Math.sin(t*u)/c;return this._w=o*C+this._w*d,this._x=i*C+this._x*d,this._y=s*C+this._y*d,this._z=r*C+this._z*d,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),s=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(t*Math.cos(s),i*Math.sin(r),i*Math.cos(r),t*Math.sin(s))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}};class H{constructor(e=0,t=0,i=0){H.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(u2.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(u2.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6]*s,this.y=r[1]*t+r[4]*i+r[7]*s,this.z=r[2]*t+r[5]*i+r[8]*s,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,s=this.z,r=e.elements,o=1/(r[3]*t+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*t+r[4]*i+r[8]*s+r[12])*o,this.y=(r[1]*t+r[5]*i+r[9]*s+r[13])*o,this.z=(r[2]*t+r[6]*i+r[10]*s+r[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,s=this.z,r=e.x,o=e.y,a=e.z,l=e.w,c=l*t+o*s-a*i,u=l*i+a*t-r*s,C=l*s+r*i-o*t,d=-r*t-o*i-a*s;return this.x=c*l+d*-r+u*-a-C*-o,this.y=u*l+d*-o+C*-r-c*-a,this.z=C*l+d*-a+c*-o-u*-r,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*t+r[4]*i+r[8]*s,this.y=r[1]*t+r[5]*i+r[9]*s,this.z=r[2]*t+r[6]*i+r[10]*s,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,s=e.y,r=e.z,o=t.x,a=t.y,l=t.z;return this.x=s*l-r*a,this.y=r*o-i*l,this.z=i*a-s*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return Yf.copy(this).projectOnVector(e),this.sub(Yf)}reflect(e){return this.sub(Yf.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(yn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,s=this.z-e.z;return t*t+i*i+s*s}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const s=Math.sin(t)*e;return this.x=s*Math.sin(i),this.y=Math.cos(t)*e,this.z=s*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),s=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=s,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Yf=new H,u2=new Sn;class Yr{constructor(e=new H(1/0,1/0,1/0),t=new H(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,_r),_r.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Pc),ld.subVectors(this.max,Pc),Dl.subVectors(e.a,Pc),Ul.subVectors(e.b,Pc),Pl.subVectors(e.c,Pc),Mo.subVectors(Ul,Dl),No.subVectors(Pl,Ul),Ra.subVectors(Dl,Pl);let t=[0,-Mo.z,Mo.y,0,-No.z,No.y,0,-Ra.z,Ra.y,Mo.z,0,-Mo.x,No.z,0,-No.x,Ra.z,0,-Ra.x,-Mo.y,Mo.x,0,-No.y,No.x,0,-Ra.y,Ra.x,0];return!Ff(t,Dl,Ul,Pl,ld)||(t=[1,0,0,0,1,0,0,0,1],!Ff(t,Dl,Ul,Pl,ld))?!1:(gd.crossVectors(Mo,No),t=[gd.x,gd.y,gd.z],Ff(t,Dl,Ul,Pl,ld))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,_r).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(_r).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Pr[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Pr[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Pr[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Pr[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Pr[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Pr[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Pr[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Pr[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Pr),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const Pr=[new H,new H,new H,new H,new H,new H,new H,new H],_r=new H,kl=new Yr,Dl=new H,Ul=new H,Pl=new H,Mo=new H,No=new H,Ra=new H,Pc=new H,ld=new H,gd=new H,Wa=new H;function Ff(n,e,t,i,s){for(let r=0,o=n.length-3;r<=o;r+=3){Wa.fromArray(n,r);const a=s.x*Math.abs(Wa.x)+s.y*Math.abs(Wa.y)+s.z*Math.abs(Wa.z),l=e.dot(Wa),c=t.dot(Wa),u=i.dot(Wa);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const bH=new Yr,_c=new H,Kf=new H;class Fr{constructor(e=new H,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):bH.setFromPoints(e).getCenter(i);let s=0;for(let r=0,o=e.length;rthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;_c.subVectors(e,this.center);const t=_c.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),s=(i-this.radius)*.5;this.center.addScaledVector(_c,s/i),this.radius+=s}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Kf.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(_c.copy(e.center).add(Kf)),this.expandByPoint(_c.copy(e.center).sub(Kf))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const Jr=new H,zf=new H,cd=new H,Ho=new H,Lf=new H,Id=new H,Tf=new H;let Mu=class{constructor(e=new H,t=new H(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Jr)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Jr.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Jr.copy(this.origin).addScaledVector(this.direction,t),Jr.distanceToSquared(e))}distanceSqToSegment(e,t,i,s){zf.copy(e).add(t).multiplyScalar(.5),cd.copy(t).sub(e).normalize(),Ho.copy(this.origin).sub(zf);const r=e.distanceTo(t)*.5,o=-this.direction.dot(cd),a=Ho.dot(this.direction),l=-Ho.dot(cd),c=Ho.lengthSq(),u=Math.abs(1-o*o);let C,d,h,f;if(u>0)if(C=o*l-a,d=o*a-l,f=r*u,C>=0)if(d>=-f)if(d<=f){const v=1/u;C*=v,d*=v,h=C*(C+o*d+2*a)+d*(o*C+d+2*l)+c}else d=r,C=Math.max(0,-(o*d+a)),h=-C*C+d*(d+2*l)+c;else d=-r,C=Math.max(0,-(o*d+a)),h=-C*C+d*(d+2*l)+c;else d<=-f?(C=Math.max(0,-(-o*r+a)),d=C>0?-r:Math.min(Math.max(-r,-l),r),h=-C*C+d*(d+2*l)+c):d<=f?(C=0,d=Math.min(Math.max(-r,-l),r),h=d*(d+2*l)+c):(C=Math.max(0,-(o*r+a)),d=C>0?r:Math.min(Math.max(-r,-l),r),h=-C*C+d*(d+2*l)+c);else d=o>0?-r:r,C=Math.max(0,-(o*d+a)),h=-C*C+d*(d+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,C),s&&s.copy(zf).addScaledVector(cd,d),h}intersectSphere(e,t){Jr.subVectors(e.center,this.origin);const i=Jr.dot(this.direction),s=Jr.dot(Jr)-i*i,r=e.radius*e.radius;if(s>r)return null;const o=Math.sqrt(r-s),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,s,r,o,a,l;const c=1/this.direction.x,u=1/this.direction.y,C=1/this.direction.z,d=this.origin;return c>=0?(i=(e.min.x-d.x)*c,s=(e.max.x-d.x)*c):(i=(e.max.x-d.x)*c,s=(e.min.x-d.x)*c),u>=0?(r=(e.min.y-d.y)*u,o=(e.max.y-d.y)*u):(r=(e.max.y-d.y)*u,o=(e.min.y-d.y)*u),i>o||r>s||((r>i||isNaN(i))&&(i=r),(o=0?(a=(e.min.z-d.z)*C,l=(e.max.z-d.z)*C):(a=(e.max.z-d.z)*C,l=(e.min.z-d.z)*C),i>l||a>s)||((a>i||i!==i)&&(i=a),(l=0?i:s,t)}intersectsBox(e){return this.intersectBox(e,Jr)!==null}intersectTriangle(e,t,i,s,r){Lf.subVectors(t,e),Id.subVectors(i,e),Tf.crossVectors(Lf,Id);let o=this.direction.dot(Tf),a;if(o>0){if(s)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Ho.subVectors(this.origin,e);const l=a*this.direction.dot(Id.crossVectors(Ho,Id));if(l<0)return null;const c=a*this.direction.dot(Lf.cross(Ho));if(c<0||l+c>o)return null;const u=-a*Ho.dot(Tf);return u<0?null:this.at(u/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}};class Fe{constructor(){Fe.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(e,t,i,s,r,o,a,l,c,u,C,d,h,f,v,y){const A=this.elements;return A[0]=e,A[4]=t,A[8]=i,A[12]=s,A[1]=r,A[5]=o,A[9]=a,A[13]=l,A[2]=c,A[6]=u,A[10]=C,A[14]=d,A[3]=h,A[7]=f,A[11]=v,A[15]=y,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 Fe().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,s=1/_l.setFromMatrixColumn(e,0).length(),r=1/_l.setFromMatrixColumn(e,1).length(),o=1/_l.setFromMatrixColumn(e,2).length();return t[0]=i[0]*s,t[1]=i[1]*s,t[2]=i[2]*s,t[3]=0,t[4]=i[4]*r,t[5]=i[5]*r,t[6]=i[6]*r,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,s=e.y,r=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(s),c=Math.sin(s),u=Math.cos(r),C=Math.sin(r);if(e.order==="XYZ"){const d=o*u,h=o*C,f=a*u,v=a*C;t[0]=l*u,t[4]=-l*C,t[8]=c,t[1]=h+f*c,t[5]=d-v*c,t[9]=-a*l,t[2]=v-d*c,t[6]=f+h*c,t[10]=o*l}else if(e.order==="YXZ"){const d=l*u,h=l*C,f=c*u,v=c*C;t[0]=d+v*a,t[4]=f*a-h,t[8]=o*c,t[1]=o*C,t[5]=o*u,t[9]=-a,t[2]=h*a-f,t[6]=v+d*a,t[10]=o*l}else if(e.order==="ZXY"){const d=l*u,h=l*C,f=c*u,v=c*C;t[0]=d-v*a,t[4]=-o*C,t[8]=f+h*a,t[1]=h+f*a,t[5]=o*u,t[9]=v-d*a,t[2]=-o*c,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const d=o*u,h=o*C,f=a*u,v=a*C;t[0]=l*u,t[4]=f*c-h,t[8]=d*c+v,t[1]=l*C,t[5]=v*c+d,t[9]=h*c-f,t[2]=-c,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const d=o*l,h=o*c,f=a*l,v=a*c;t[0]=l*u,t[4]=v-d*C,t[8]=f*C+h,t[1]=C,t[5]=o*u,t[9]=-a*u,t[2]=-c*u,t[6]=h*C+f,t[10]=d-v*C}else if(e.order==="XZY"){const d=o*l,h=o*c,f=a*l,v=a*c;t[0]=l*u,t[4]=-C,t[8]=c*u,t[1]=d*C+v,t[5]=o*u,t[9]=h*C-f,t[2]=f*C-h,t[6]=a*u,t[10]=v*C+d}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(vH,e,yH)}lookAt(e,t,i){const s=this.elements;return rs.subVectors(e,t),rs.lengthSq()===0&&(rs.z=1),rs.normalize(),Xo.crossVectors(i,rs),Xo.lengthSq()===0&&(Math.abs(i.z)===1?rs.x+=1e-4:rs.z+=1e-4,rs.normalize(),Xo.crossVectors(i,rs)),Xo.normalize(),ud.crossVectors(rs,Xo),s[0]=Xo.x,s[4]=ud.x,s[8]=rs.x,s[1]=Xo.y,s[5]=ud.y,s[9]=rs.y,s[2]=Xo.z,s[6]=ud.z,s[10]=rs.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,s=t.elements,r=this.elements,o=i[0],a=i[4],l=i[8],c=i[12],u=i[1],C=i[5],d=i[9],h=i[13],f=i[2],v=i[6],y=i[10],A=i[14],b=i[3],m=i[7],B=i[11],S=i[15],x=s[0],R=s[4],M=s[8],Z=s[12],V=s[1],N=s[5],k=s[9],E=s[13],$=s[2],te=s[6],Ce=s[10],le=s[14],L=s[3],_=s[7],U=s[11],ce=s[15];return r[0]=o*x+a*V+l*$+c*L,r[4]=o*R+a*N+l*te+c*_,r[8]=o*M+a*k+l*Ce+c*U,r[12]=o*Z+a*E+l*le+c*ce,r[1]=u*x+C*V+d*$+h*L,r[5]=u*R+C*N+d*te+h*_,r[9]=u*M+C*k+d*Ce+h*U,r[13]=u*Z+C*E+d*le+h*ce,r[2]=f*x+v*V+y*$+A*L,r[6]=f*R+v*N+y*te+A*_,r[10]=f*M+v*k+y*Ce+A*U,r[14]=f*Z+v*E+y*le+A*ce,r[3]=b*x+m*V+B*$+S*L,r[7]=b*R+m*N+B*te+S*_,r[11]=b*M+m*k+B*Ce+S*U,r[15]=b*Z+m*E+B*le+S*ce,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],s=e[8],r=e[12],o=e[1],a=e[5],l=e[9],c=e[13],u=e[2],C=e[6],d=e[10],h=e[14],f=e[3],v=e[7],y=e[11],A=e[15];return f*(+r*l*C-s*c*C-r*a*d+i*c*d+s*a*h-i*l*h)+v*(+t*l*h-t*c*d+r*o*d-s*o*h+s*c*u-r*l*u)+y*(+t*c*C-t*a*h-r*o*C+i*o*h+r*a*u-i*c*u)+A*(-s*a*u-t*l*C+t*a*d+s*o*C-i*o*d+i*l*u)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const s=this.elements;return e.isVector3?(s[12]=e.x,s[13]=e.y,s[14]=e.z):(s[12]=e,s[13]=t,s[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],C=e[9],d=e[10],h=e[11],f=e[12],v=e[13],y=e[14],A=e[15],b=C*y*c-v*d*c+v*l*h-a*y*h-C*l*A+a*d*A,m=f*d*c-u*y*c-f*l*h+o*y*h+u*l*A-o*d*A,B=u*v*c-f*C*c+f*a*h-o*v*h-u*a*A+o*C*A,S=f*C*l-u*v*l-f*a*d+o*v*d+u*a*y-o*C*y,x=t*b+i*m+s*B+r*S;if(x===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const R=1/x;return e[0]=b*R,e[1]=(v*d*r-C*y*r-v*s*h+i*y*h+C*s*A-i*d*A)*R,e[2]=(a*y*r-v*l*r+v*s*c-i*y*c-a*s*A+i*l*A)*R,e[3]=(C*l*r-a*d*r-C*s*c+i*d*c+a*s*h-i*l*h)*R,e[4]=m*R,e[5]=(u*y*r-f*d*r+f*s*h-t*y*h-u*s*A+t*d*A)*R,e[6]=(f*l*r-o*y*r-f*s*c+t*y*c+o*s*A-t*l*A)*R,e[7]=(o*d*r-u*l*r+u*s*c-t*d*c-o*s*h+t*l*h)*R,e[8]=B*R,e[9]=(f*C*r-u*v*r-f*i*h+t*v*h+u*i*A-t*C*A)*R,e[10]=(o*v*r-f*a*r+f*i*c-t*v*c-o*i*A+t*a*A)*R,e[11]=(u*a*r-o*C*r-u*i*c+t*C*c+o*i*h-t*a*h)*R,e[12]=S*R,e[13]=(u*v*s-f*C*s+f*i*d-t*v*d-u*i*y+t*C*y)*R,e[14]=(f*a*s-o*v*s-f*i*l+t*v*l+o*i*y-t*a*y)*R,e[15]=(o*C*s-u*a*s+u*i*l-t*C*l-o*i*d+t*a*d)*R,this}scale(e){const t=this.elements,i=e.x,s=e.y,r=e.z;return t[0]*=i,t[4]*=s,t[8]*=r,t[1]*=i,t[5]*=s,t[9]*=r,t[2]*=i,t[6]*=s,t[10]*=r,t[3]*=i,t[7]*=s,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],s=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,s))}makeTranslation(e,t,i){return this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),s=Math.sin(t),r=1-i,o=e.x,a=e.y,l=e.z,c=r*o,u=r*a;return this.set(c*o+i,c*a-s*l,c*l+s*a,0,c*a+s*l,u*a+i,u*l-s*o,0,c*l-s*a,u*l+s*o,r*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,s,r,o){return this.set(1,i,r,0,e,1,o,0,t,s,1,0,0,0,0,1),this}compose(e,t,i){const s=this.elements,r=t._x,o=t._y,a=t._z,l=t._w,c=r+r,u=o+o,C=a+a,d=r*c,h=r*u,f=r*C,v=o*u,y=o*C,A=a*C,b=l*c,m=l*u,B=l*C,S=i.x,x=i.y,R=i.z;return s[0]=(1-(v+A))*S,s[1]=(h+B)*S,s[2]=(f-m)*S,s[3]=0,s[4]=(h-B)*x,s[5]=(1-(d+A))*x,s[6]=(y+b)*x,s[7]=0,s[8]=(f+m)*R,s[9]=(y-b)*R,s[10]=(1-(d+v))*R,s[11]=0,s[12]=e.x,s[13]=e.y,s[14]=e.z,s[15]=1,this}decompose(e,t,i){const s=this.elements;let r=_l.set(s[0],s[1],s[2]).length();const o=_l.set(s[4],s[5],s[6]).length(),a=_l.set(s[8],s[9],s[10]).length();this.determinant()<0&&(r=-r),e.x=s[12],e.y=s[13],e.z=s[14],Qs.copy(this);const c=1/r,u=1/o,C=1/a;return Qs.elements[0]*=c,Qs.elements[1]*=c,Qs.elements[2]*=c,Qs.elements[4]*=u,Qs.elements[5]*=u,Qs.elements[6]*=u,Qs.elements[8]*=C,Qs.elements[9]*=C,Qs.elements[10]*=C,t.setFromRotationMatrix(Qs),i.x=r,i.y=o,i.z=a,this}makePerspective(e,t,i,s,r,o){const a=this.elements,l=2*r/(t-e),c=2*r/(i-s),u=(t+e)/(t-e),C=(i+s)/(i-s),d=-(o+r)/(o-r),h=-2*o*r/(o-r);return a[0]=l,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=C,a[13]=0,a[2]=0,a[6]=0,a[10]=d,a[14]=h,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,i,s,r,o){const a=this.elements,l=1/(t-e),c=1/(i-s),u=1/(o-r),C=(t+e)*l,d=(i+s)*c,h=(o+r)*u;return a[0]=2*l,a[4]=0,a[8]=0,a[12]=-C,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-d,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-h,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let s=0;s<16;s++)if(t[s]!==i[s])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const _l=new H,Qs=new Fe,vH=new H(0,0,0),yH=new H(1,1,1),Xo=new H,ud=new H,rs=new H,C2=new Fe,d2=new Sn;class bl{constructor(e=0,t=0,i=0,s=bl.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=s}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,s=this._order){return this._x=e,this._y=t,this._z=i,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const s=e.elements,r=s[0],o=s[4],a=s[8],l=s[1],c=s[5],u=s[9],C=s[2],d=s[6],h=s[10];switch(t){case"XYZ":this._y=Math.asin(yn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,h),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(d,c),this._z=0);break;case"YXZ":this._x=Math.asin(-yn(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,h),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-C,r),this._z=0);break;case"ZXY":this._x=Math.asin(yn(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-C,h),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-yn(C,-1,1)),Math.abs(C)<.9999999?(this._x=Math.atan2(d,h),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(yn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-C,r)):(this._x=0,this._y=Math.atan2(a,h));break;case"XZY":this._z=Math.asin(-yn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-u,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return C2.makeRotationFromQuaternion(e),this.setFromRotationMatrix(C2,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return d2.setFromEuler(this),this.setFromQuaternion(d2,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}bl.DEFAULT_ORDER="XYZ";class al{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let i=0;i0&&(i=i.concat(o))}return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Jc,e,BH),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Jc,ZH,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let i=0,s=t.length;i0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(s.instanceColor=this.instanceColor.toJSON()));function r(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(s.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c0){s.children=[];for(let a=0;a0){s.animations=[];for(let a=0;a0&&(i.geometries=a),l.length>0&&(i.materials=l),c.length>0&&(i.textures=c),u.length>0&&(i.images=u),C.length>0&&(i.shapes=C),d.length>0&&(i.skeletons=d),h.length>0&&(i.animations=h),f.length>0&&(i.nodes=f)}return i.object=s,i;function o(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations,this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i0?s.multiplyScalar(1/Math.sqrt(r)):s.set(0,0,0)}static getBarycoord(e,t,i,s,r){js.subVectors(s,t),Qr.subVectors(i,t),Ef.subVectors(e,t);const o=js.dot(js),a=js.dot(Qr),l=js.dot(Ef),c=Qr.dot(Qr),u=Qr.dot(Ef),C=o*c-a*a;if(C===0)return r.set(-2,-1,-1);const d=1/C,h=(c*l-a*u)*d,f=(o*u-a*l)*d;return r.set(1-h-f,f,h)}static containsPoint(e,t,i,s){return this.getBarycoord(e,t,i,s,jr),jr.x>=0&&jr.y>=0&&jr.x+jr.y<=1}static getUV(e,t,i,s,r,o,a,l){return dd===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),dd=!0),this.getInterpolation(e,t,i,s,r,o,a,l)}static getInterpolation(e,t,i,s,r,o,a,l){return this.getBarycoord(e,t,i,s,jr),l.setScalar(0),l.addScaledVector(r,jr.x),l.addScaledVector(o,jr.y),l.addScaledVector(a,jr.z),l}static isFrontFacing(e,t,i,s){return js.subVectors(i,t),Qr.subVectors(e,t),js.cross(Qr).dot(s)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,s){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[s]),this}setFromAttributeAndIndices(e,t,i,s){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,s),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return js.subVectors(this.c,this.b),Qr.subVectors(this.a,this.b),js.cross(Qr).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Ui.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Ui.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,s,r){return dd===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),dd=!0),Ui.getInterpolation(e,this.a,this.b,this.c,t,i,s,r)}getInterpolation(e,t,i,s,r){return Ui.getInterpolation(e,this.a,this.b,this.c,t,i,s,r)}containsPoint(e){return Ui.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Ui.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,s=this.b,r=this.c;let o,a;Ol.subVectors(s,i),Ql.subVectors(r,i),kf.subVectors(e,i);const l=Ol.dot(kf),c=Ql.dot(kf);if(l<=0&&c<=0)return t.copy(i);Df.subVectors(e,s);const u=Ol.dot(Df),C=Ql.dot(Df);if(u>=0&&C<=u)return t.copy(s);const d=l*C-u*c;if(d<=0&&l>=0&&u<=0)return o=l/(l-u),t.copy(i).addScaledVector(Ol,o);Uf.subVectors(e,r);const h=Ol.dot(Uf),f=Ql.dot(Uf);if(f>=0&&h<=f)return t.copy(r);const v=h*c-l*f;if(v<=0&&c>=0&&f<=0)return a=c/(c-f),t.copy(i).addScaledVector(Ql,a);const y=u*f-h*C;if(y<=0&&C-u>=0&&h-f>=0)return b2.subVectors(r,s),a=(C-u)/(C-u+(h-f)),t.copy(s).addScaledVector(b2,a);const A=1/(y+v+d);return o=v*A,a=d*A,t.copy(i).addScaledVector(Ol,o).addScaledVector(Ql,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let SH=0;class Pn extends zs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:SH++}),this.uuid=Cs(),this.name="",this.type="Material",this.blending=sl,this.side=Hr,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=fv,this.blendDst=mv,this.blendEquation=Ea,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=su,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=h1,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=xh,this.stencilZFail=xh,this.stencilZPass=xh,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const s=this[t];if(s===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(i):s&&s.isVector3&&i&&i.isVector3?s.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==sl&&(i.blending=this.blending),this.side!==Hr&&(i.side=this.side),this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,i.colorWrite=this.colorWrite,i.stencilWrite=this.stencilWrite,i.stencilWriteMask=this.stencilWriteMask,i.stencilFunc=this.stencilFunc,i.stencilRef=this.stencilRef,i.stencilFuncMask=this.stencilFuncMask,i.stencilFail=this.stencilFail,i.stencilZFail=this.stencilZFail,i.stencilZPass=this.stencilZPass,this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(i.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=this.premultipliedAlpha),this.forceSinglePass===!0&&(i.forceSinglePass=this.forceSinglePass),this.wireframe===!0&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=this.flatShading),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function s(r){const o=[];for(const a in r){const l=r[a];delete l.metadata,o.push(l)}return o}if(t){const r=s(e.textures),o=s(e.images);r.length>0&&(i.textures=r),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(t!==null){const s=t.length;i=new Array(s);for(let r=0;r!==s;++r)i[r]=t[r].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}const y1={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},qs={h:0,s:0,l:0},hd={h:0,s:0,l:0};function Pf(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class Re{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,t===void 0&&i===void 0?this.set(e):this.setRGB(e,t,i)}set(e){return e&&e.isColor?this.copy(e):typeof e=="number"?this.setHex(e):typeof e=="string"&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=ft){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Ws.toWorkingColorSpace(this,t),this}setRGB(e,t,i,s=Ws.workingColorSpace){return this.r=e,this.g=t,this.b=i,Ws.toWorkingColorSpace(this,s),this}setHSL(e,t,i,s=Ws.workingColorSpace){if(e=Vv(e,1),t=yn(t,0,1),i=yn(i,0,1),t===0)this.r=this.g=this.b=i;else{const r=i<=.5?i*(1+t):i+t-i*t,o=2*i-r;this.r=Pf(o,r,e+1/3),this.g=Pf(o,r,e),this.b=Pf(o,r,e-1/3)}return Ws.toWorkingColorSpace(this,s),this}setStyle(e,t=ft){function i(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const o=s[1],a=s[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=s[1],o=r.length;if(o===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(r,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=ft){const i=y1[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Lg(e.r),this.g=Lg(e.g),this.b=Lg(e.b),this}copyLinearToSRGB(e){return this.r=Hf(e.r),this.g=Hf(e.g),this.b=Hf(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=ft){return Ws.fromWorkingColorSpace(Ai.copy(this),e),Math.round(yn(Ai.r*255,0,255))*65536+Math.round(yn(Ai.g*255,0,255))*256+Math.round(yn(Ai.b*255,0,255))}getHexString(e=ft){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Ws.workingColorSpace){Ws.fromWorkingColorSpace(Ai.copy(this),t);const i=Ai.r,s=Ai.g,r=Ai.b,o=Math.max(i,s,r),a=Math.min(i,s,r);let l,c;const u=(a+o)/2;if(a===o)l=0,c=0;else{const C=o-a;switch(c=u<=.5?C/(o+a):C/(2-o-a),o){case i:l=(s-r)/C+(s>-c-14,i[l|256]=1024>>-c-14|32768,s[l]=-c-1,s[l|256]=-c-1):c<=15?(i[l]=c+15<<10,i[l|256]=c+15<<10|32768,s[l]=13,s[l|256]=13):c<128?(i[l]=31744,i[l|256]=64512,s[l]=24,s[l|256]=24):(i[l]=31744,i[l|256]=64512,s[l]=13,s[l|256]=13)}const r=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,u=0;for(;!(c&8388608);)c<<=1,u-=8388608;c&=-8388609,u+=947912704,r[l]=c|u}for(let l=1024;l<2048;++l)r[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:t,baseTable:i,shiftTable:s,mantissaTable:r,exponentTable:o,offsetTable:a}}function Li(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=yn(n,-65504,65504),no.floatView[0]=n;const e=no.uint32View[0],t=e>>23&511;return no.baseTable[t]+((e&8388607)>>no.shiftTable[t])}function fI(n){const e=n>>10;return no.uint32View[0]=no.mantissaTable[no.offsetTable[e]+(n&1023)]+no.exponentTable[e],no.floatView[0]}const RH={toHalfFloat:Li,fromHalfFloat:fI},Nn=new H,Ad=new ne;class Et{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=uu,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let s=0,r=this.itemSize;s0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i){const c=i[l];e.data.attributes[l]=c.toJSON(e.data)}const s={};let r=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let C=0,d=c.length;C0&&(s[l]=u,r=!0)}r&&(e.data.morphAttributes=s,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(t));const s=e.attributes;for(const c in s){const u=s[c];this.setAttribute(c,u.clone(t))}const r=e.morphAttributes;for(const c in r){const u=[],C=r[c];for(let d=0,h=C.length;d0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;r(e.far-e.near)**2))&&(v2.copy(r).invert(),Gr.copy(e.ray).applyMatrix4(v2),!(i.boundingBox!==null&&Gr.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t)))}_computeIntersections(e,t){let i;const s=this.geometry,r=this.material,o=s.index,a=s.attributes.position,l=s.attributes.uv,c=s.attributes.uv1,u=s.attributes.normal,C=s.groups,d=s.drawRange;if(o!==null)if(Array.isArray(r))for(let h=0,f=C.length;ht.far?null:{distance:c,point:Gd.clone(),object:n}}function Bd(n,e,t,i,s,r,o,a,l,c){n.getVertexPosition(a,ql),n.getVertexPosition(l,$l),n.getVertexPosition(c,eg);const u=KH(n,e,t,i,ql,$l,eg,yd);if(u){s&&(md.fromBufferAttribute(s,a),bd.fromBufferAttribute(s,l),vd.fromBufferAttribute(s,c),u.uv=Ui.getInterpolation(yd,ql,$l,eg,md,bd,vd,new ne)),r&&(md.fromBufferAttribute(r,a),bd.fromBufferAttribute(r,l),vd.fromBufferAttribute(r,c),u.uv1=Ui.getInterpolation(yd,ql,$l,eg,md,bd,vd,new ne),u.uv2=u.uv1),o&&(G2.fromBufferAttribute(o,a),B2.fromBufferAttribute(o,l),Z2.fromBufferAttribute(o,c),u.normal=Ui.getInterpolation(yd,ql,$l,eg,G2,B2,Z2,new H),u.normal.dot(i.direction)>0&&u.normal.multiplyScalar(-1));const C={a,b:l,c,normal:new H,materialIndex:0};Ui.getNormal(ql,$l,eg,C.normal),u.face=C}return u}class Aa extends mt{constructor(e=1,t=1,i=1,s=1,r=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:s,heightSegments:r,depthSegments:o};const a=this;s=Math.floor(s),r=Math.floor(r),o=Math.floor(o);const l=[],c=[],u=[],C=[];let d=0,h=0;f("z","y","x",-1,-1,i,t,e,o,r,0),f("z","y","x",1,-1,i,t,-e,o,r,1),f("x","z","y",1,1,e,i,t,s,o,2),f("x","z","y",1,-1,e,i,-t,s,o,3),f("x","y","z",1,-1,e,t,i,s,r,4),f("x","y","z",-1,-1,e,t,-i,s,r,5),this.setIndex(l),this.setAttribute("position",new ke(c,3)),this.setAttribute("normal",new ke(u,3)),this.setAttribute("uv",new ke(C,2));function f(v,y,A,b,m,B,S,x,R,M,Z){const V=B/R,N=S/M,k=B/2,E=S/2,$=x/2,te=R+1,Ce=M+1;let le=0,L=0;const _=new H;for(let U=0;U0?1:-1,u.push(_.x,_.y,_.z),C.push(se/R),C.push(1-U/M),le+=1}}for(let U=0;U0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const i={};for(const s in this.extensions)this.extensions[s]===!0&&(i[s]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class ac extends Ht{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Fe,this.projectionMatrix=new Fe,this.projectionMatrixInverse=new Fe}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class hn extends ac{constructor(e=50,t=1,i=.1,s=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=s,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=qg*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(rl*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return qg*2*Math.atan(Math.tan(rl*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,i,s,r,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=s,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(rl*.5*this.fov)/this.zoom,i=2*t,s=this.aspect*i,r=-.5*s;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;r+=o.offsetX*s/l,t-=o.offsetY*i/c,s*=o.width/l,i*=o.height/c}const a=this.filmOffset;a!==0&&(r+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+s,t,t-i,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const tg=-90,ng=1;class Xv extends Ht{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i;const s=new hn(tg,ng,e,t);s.layers=this.layers,s.up.set(0,1,0),s.lookAt(1,0,0),this.add(s);const r=new hn(tg,ng,e,t);r.layers=this.layers,r.up.set(0,1,0),r.lookAt(-1,0,0),this.add(r);const o=new hn(tg,ng,e,t);o.layers=this.layers,o.up.set(0,0,-1),o.lookAt(0,1,0),this.add(o);const a=new hn(tg,ng,e,t);a.layers=this.layers,a.up.set(0,0,1),a.lookAt(0,-1,0),this.add(a);const l=new hn(tg,ng,e,t);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,1),this.add(l);const c=new hn(tg,ng,e,t);c.layers=this.layers,c.up.set(0,1,0),c.lookAt(0,0,-1),this.add(c)}update(e,t){this.parent===null&&this.updateMatrixWorld();const i=this.renderTarget,[s,r,o,a,l,c]=this.children,u=e.getRenderTarget(),C=e.toneMapping,d=e.xr.enabled;e.toneMapping=gr,e.xr.enabled=!1;const h=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0),e.render(t,s),e.setRenderTarget(i,1),e.render(t,r),e.setRenderTarget(i,2),e.render(t,o),e.setRenderTarget(i,3),e.render(t,a),e.setRenderTarget(i,4),e.render(t,l),i.texture.generateMipmaps=h,e.setRenderTarget(i,5),e.render(t,c),e.setRenderTarget(u),e.toneMapping=C,e.xr.enabled=d,i.texture.needsPMREMUpdate=!0}}class Nu extends jt{constructor(e,t,i,s,r,o,a,l,c,u){e=e!==void 0?e:[],t=t!==void 0?t:oa,super(e,t,i,s,r,o,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class NA extends Rt{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},s=[i,i,i,i,i,i];t.encoding!==void 0&&(HI("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===Ys?ft:co),this.texture=new Nu(s,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:je}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:` + + varying vec3 vWorldDirection; + + vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); + + } + + void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + } + `,fragmentShader:` + + uniform sampler2D tEquirect; + + varying vec3 vWorldDirection; + + #include + + void main() { + + vec3 direction = normalize( vWorldDirection ); + + vec2 sampleUV = equirectUv( direction ); + + gl_FragColor = texture2D( tEquirect, sampleUV ); + + } + `},s=new Aa(5,5,5),r=new Zt({name:"CubemapFromEquirect",uniforms:$g(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:Ln,blending:en});r.uniforms.tEquirect.value=t;const o=new Tn(s,r),a=t.minFilter;return t.minFilter===la&&(t.minFilter=je),new Xv(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,i,s){const r=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,s);e.setRenderTarget(r)}}const Of=new H,EH=new H,kH=new xt;class To{constructor(e=new H(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,s){return this.normal.set(e,t,i),this.constant=s,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const s=Of.subVectors(i,t).cross(EH.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(s,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const i=e.delta(Of),s=this.normal.dot(i);if(s===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/s;return r<0||r>1?null:t.copy(e.start).addScaledVector(i,r)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||kH.getNormalMatrix(e),s=this.coplanarPoint(Of).applyMatrix4(e),r=this.normal.applyMatrix3(i).normalize();return this.constant=-s.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Va=new Fr,Zd=new H;class HA{constructor(e=new To,t=new To,i=new To,s=new To,r=new To,o=new To){this.planes=[e,t,i,s,r,o]}set(e,t,i,s,r,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(s),a[4].copy(r),a[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e){const t=this.planes,i=e.elements,s=i[0],r=i[1],o=i[2],a=i[3],l=i[4],c=i[5],u=i[6],C=i[7],d=i[8],h=i[9],f=i[10],v=i[11],y=i[12],A=i[13],b=i[14],m=i[15];return t[0].setComponents(a-s,C-l,v-d,m-y).normalize(),t[1].setComponents(a+s,C+l,v+d,m+y).normalize(),t[2].setComponents(a+r,C+c,v+h,m+A).normalize(),t[3].setComponents(a-r,C-c,v-h,m-A).normalize(),t[4].setComponents(a-o,C-u,v-f,m-b).normalize(),t[5].setComponents(a+o,C+u,v+f,m+b).normalize(),this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Va.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Va.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Va)}intersectsSprite(e){return Va.center.set(0,0,0),Va.radius=.7071067811865476,Va.applyMatrix4(e.matrixWorld),this.intersectsSphere(Va)}intersectsSphere(e){const t=this.planes,i=e.center,s=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(i)0?e.max.x:e.min.x,Zd.y=s.normal.y>0?e.max.y:e.min.y,Zd.z=s.normal.z>0?e.max.z:e.min.z,s.distanceToPoint(Zd)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function Z1(){let n=null,e=!1,t=null,i=null;function s(r,o){t(r,o),i=n.requestAnimationFrame(s)}return{start:function(){e!==!0&&t!==null&&(i=n.requestAnimationFrame(s),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(r){t=r},setContext:function(r){n=r}}}function DH(n,e){const t=e.isWebGL2,i=new WeakMap;function s(c,u){const C=c.array,d=c.usage,h=n.createBuffer();n.bindBuffer(u,h),n.bufferData(u,C,d),c.onUploadCallback();let f;if(C instanceof Float32Array)f=n.FLOAT;else if(C instanceof Uint16Array)if(c.isFloat16BufferAttribute)if(t)f=n.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else f=n.UNSIGNED_SHORT;else if(C instanceof Int16Array)f=n.SHORT;else if(C instanceof Uint32Array)f=n.UNSIGNED_INT;else if(C instanceof Int32Array)f=n.INT;else if(C instanceof Int8Array)f=n.BYTE;else if(C instanceof Uint8Array)f=n.UNSIGNED_BYTE;else if(C instanceof Uint8ClampedArray)f=n.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+C);return{buffer:h,type:f,bytesPerElement:C.BYTES_PER_ELEMENT,version:c.version}}function r(c,u,C){const d=u.array,h=u.updateRange;n.bindBuffer(C,c),h.count===-1?n.bufferSubData(C,0,d):(t?n.bufferSubData(C,h.offset*d.BYTES_PER_ELEMENT,d,h.offset,h.count):n.bufferSubData(C,h.offset*d.BYTES_PER_ELEMENT,d.subarray(h.offset,h.offset+h.count)),h.count=-1),u.onUploadCallback()}function o(c){return c.isInterleavedBufferAttribute&&(c=c.data),i.get(c)}function a(c){c.isInterleavedBufferAttribute&&(c=c.data);const u=i.get(c);u&&(n.deleteBuffer(u.buffer),i.delete(c))}function l(c,u){if(c.isGLBufferAttribute){const d=i.get(c);(!d||d.version 0 + vec4 plane; + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; + } + #pragma unroll_loop_end + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + bool clipped = true; + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; + } + #pragma unroll_loop_end + if ( clipped ) discard; + #endif +#endif`,iX=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; + uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; +#endif`,sX=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; +#endif`,rX=`#if NUM_CLIPPING_PLANES > 0 + vClipPosition = - mvPosition.xyz; +#endif`,oX=`#if defined( USE_COLOR_ALPHA ) + diffuseColor *= vColor; +#elif defined( USE_COLOR ) + diffuseColor.rgb *= vColor; +#endif`,aX=`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) + varying vec3 vColor; +#endif`,lX=`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) + varying vec3 vColor; +#endif`,gX=`#if defined( USE_COLOR_ALPHA ) + vColor = vec4( 1.0 ); +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) + vColor = vec3( 1.0 ); +#endif +#ifdef USE_COLOR + vColor *= color; +#endif +#ifdef USE_INSTANCING_COLOR + vColor.xyz *= instanceColor.xyz; +#endif`,cX=`#define PI 3.141592653589793 +#define PI2 6.283185307179586 +#define PI_HALF 1.5707963267948966 +#define RECIPROCAL_PI 0.3183098861837907 +#define RECIPROCAL_PI2 0.15915494309189535 +#define EPSILON 1e-6 +#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +#define whiteComplement( a ) ( 1.0 - saturate( a ) ) +float pow2( const in float x ) { return x*x; } +vec3 pow2( const in vec3 x ) { return x*x; } +float pow3( const in float x ) { return x*x*x; } +float pow4( const in float x ) { float x2 = x*x; return x2*x2; } +float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } +float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } +highp float rand( const in vec2 uv ) { + const highp float a = 12.9898, b = 78.233, c = 43758.5453; + highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); + return fract( sin( sn ) * c ); +} +#ifdef HIGH_PRECISION + float precisionSafeLength( vec3 v ) { return length( v ); } +#else + float precisionSafeLength( vec3 v ) { + float maxComponent = max3( abs( v ) ); + return length( v / maxComponent ) * maxComponent; + } +#endif +struct IncidentLight { + vec3 color; + vec3 direction; + bool visible; +}; +struct ReflectedLight { + vec3 directDiffuse; + vec3 directSpecular; + vec3 indirectDiffuse; + vec3 indirectSpecular; +}; +struct GeometricContext { + vec3 position; + vec3 normal; + vec3 viewDir; +#ifdef USE_CLEARCOAT + vec3 clearcoatNormal; +#endif +}; +vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); +} +vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); +} +mat3 transposeMat3( const in mat3 m ) { + mat3 tmp; + tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); + tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); + tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); + return tmp; +} +float luminance( const in vec3 rgb ) { + const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 ); + return dot( weights, rgb ); +} +bool isPerspectiveMatrix( mat4 m ) { + return m[ 2 ][ 3 ] == - 1.0; +} +vec2 equirectUv( in vec3 dir ) { + float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; + float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; + return vec2( u, v ); +} +vec3 BRDF_Lambert( const in vec3 diffuseColor ) { + return RECIPROCAL_PI * diffuseColor; +} +vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); +} +float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); +} // validated`,IX=`#ifdef ENVMAP_TYPE_CUBE_UV + #define cubeUV_minMipLevel 4.0 + #define cubeUV_minTileSize 16.0 + float getFace( vec3 direction ) { + vec3 absDirection = abs( direction ); + float face = - 1.0; + if ( absDirection.x > absDirection.z ) { + if ( absDirection.x > absDirection.y ) + face = direction.x > 0.0 ? 0.0 : 3.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } else { + if ( absDirection.z > absDirection.y ) + face = direction.z > 0.0 ? 2.0 : 5.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } + return face; + } + vec2 getUV( vec3 direction, float face ) { + vec2 uv; + if ( face == 0.0 ) { + uv = vec2( direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 1.0 ) { + uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); + } else if ( face == 2.0 ) { + uv = vec2( - direction.x, direction.y ) / abs( direction.z ); + } else if ( face == 3.0 ) { + uv = vec2( - direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 4.0 ) { + uv = vec2( - direction.x, direction.z ) / abs( direction.y ); + } else { + uv = vec2( direction.x, direction.y ) / abs( direction.z ); + } + return 0.5 * ( uv + 1.0 ); + } + vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { + float face = getFace( direction ); + float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); + mipInt = max( mipInt, cubeUV_minMipLevel ); + float faceSize = exp2( mipInt ); + highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; + if ( face > 2.0 ) { + uv.y += faceSize; + face -= 3.0; + } + uv.x += face * faceSize; + uv.x += filterInt * 3.0 * cubeUV_minTileSize; + uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); + uv.x *= CUBEUV_TEXEL_WIDTH; + uv.y *= CUBEUV_TEXEL_HEIGHT; + #ifdef texture2DGradEXT + return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; + #else + return texture2D( envMap, uv ).rgb; + #endif + } + #define cubeUV_r0 1.0 + #define cubeUV_v0 0.339 + #define cubeUV_m0 - 2.0 + #define cubeUV_r1 0.8 + #define cubeUV_v1 0.276 + #define cubeUV_m1 - 1.0 + #define cubeUV_r4 0.4 + #define cubeUV_v4 0.046 + #define cubeUV_m4 2.0 + #define cubeUV_r5 0.305 + #define cubeUV_v5 0.016 + #define cubeUV_m5 3.0 + #define cubeUV_r6 0.21 + #define cubeUV_v6 0.0038 + #define cubeUV_m6 4.0 + float roughnessToMip( float roughness ) { + float mip = 0.0; + if ( roughness >= cubeUV_r1 ) { + mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; + } else if ( roughness >= cubeUV_r4 ) { + mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; + } else if ( roughness >= cubeUV_r5 ) { + mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; + } else if ( roughness >= cubeUV_r6 ) { + mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; + } else { + mip = - 2.0 * log2( 1.16 * roughness ); } + return mip; + } + vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { + float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); + float mipF = fract( mip ); + float mipInt = floor( mip ); + vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); + if ( mipF == 0.0 ) { + return vec4( color0, 1.0 ); + } else { + vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); + return vec4( mix( color0, color1, mipF ), 1.0 ); + } + } +#endif`,uX=`vec3 transformedNormal = objectNormal; +#ifdef USE_INSTANCING + mat3 m = mat3( instanceMatrix ); + transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) ); + transformedNormal = m * transformedNormal; +#endif +transformedNormal = normalMatrix * transformedNormal; +#ifdef FLIP_SIDED + transformedNormal = - transformedNormal; +#endif +#ifdef USE_TANGENT + vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz; + #ifdef FLIP_SIDED + transformedTangent = - transformedTangent; + #endif +#endif`,CX=`#ifdef USE_DISPLACEMENTMAP + uniform sampler2D displacementMap; + uniform float displacementScale; + uniform float displacementBias; +#endif`,dX=`#ifdef USE_DISPLACEMENTMAP + transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); +#endif`,hX=`#ifdef USE_EMISSIVEMAP + vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); + totalEmissiveRadiance *= emissiveColor.rgb; +#endif`,AX=`#ifdef USE_EMISSIVEMAP + uniform sampler2D emissiveMap; +#endif`,pX="gl_FragColor = linearToOutputTexel( gl_FragColor );",fX=`vec4 LinearToLinear( in vec4 value ) { + return value; +} +vec4 LinearTosRGB( in vec4 value ) { + return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); +}`,mX=`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vec3 cameraToFrag; + if ( isOrthographic ) { + cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToFrag = normalize( vWorldPosition - cameraPosition ); + } + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vec3 reflectVec = reflect( cameraToFrag, worldNormal ); + #else + vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); + #endif + #else + vec3 reflectVec = vReflect; + #endif + #ifdef ENVMAP_TYPE_CUBE + vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); + #else + vec4 envColor = vec4( 0.0 ); + #endif + #ifdef ENVMAP_BLENDING_MULTIPLY + outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_MIX ) + outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_ADD ) + outgoingLight += envColor.xyz * specularStrength * reflectivity; + #endif +#endif`,bX=`#ifdef USE_ENVMAP + uniform float envMapIntensity; + uniform float flipEnvMap; + #ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; + #else + uniform sampler2D envMap; + #endif + +#endif`,vX=`#ifdef USE_ENVMAP + uniform float reflectivity; + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + varying vec3 vWorldPosition; + uniform float refractionRatio; + #else + varying vec3 vReflect; + #endif +#endif`,yX=`#ifdef USE_ENVMAP + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + + varying vec3 vWorldPosition; + #else + varying vec3 vReflect; + uniform float refractionRatio; + #endif +#endif`,GX=`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vWorldPosition = worldPosition.xyz; + #else + vec3 cameraToVertex; + if ( isOrthographic ) { + cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); + } + vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vReflect = reflect( cameraToVertex, worldNormal ); + #else + vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); + #endif + #endif +#endif`,BX=`#ifdef USE_FOG + vFogDepth = - mvPosition.z; +#endif`,ZX=`#ifdef USE_FOG + varying float vFogDepth; +#endif`,wX=`#ifdef USE_FOG + #ifdef FOG_EXP2 + float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); + #else + float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); + #endif + gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); +#endif`,SX=`#ifdef USE_FOG + uniform vec3 fogColor; + varying float vFogDepth; + #ifdef FOG_EXP2 + uniform float fogDensity; + #else + uniform float fogNear; + uniform float fogFar; + #endif +#endif`,xX=`#ifdef USE_GRADIENTMAP + uniform sampler2D gradientMap; +#endif +vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { + float dotNL = dot( normal, lightDirection ); + vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); + #ifdef USE_GRADIENTMAP + return vec3( texture2D( gradientMap, coord ).r ); + #else + vec2 fw = fwidth( coord ) * 0.5; + return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); + #endif +}`,RX=`#ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; + reflectedLight.indirectDiffuse += lightMapIrradiance; +#endif`,WX=`#ifdef USE_LIGHTMAP + uniform sampler2D lightMap; + uniform float lightMapIntensity; +#endif`,VX=`LambertMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularStrength = specularStrength;`,MX=`varying vec3 vViewPosition; +struct LambertMaterial { + vec3 diffuseColor; + float specularStrength; +}; +void RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_Lambert +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,NX=`uniform bool receiveShadow; +uniform vec3 ambientLightColor; +uniform vec3 lightProbe[ 9 ]; +vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { + float x = normal.x, y = normal.y, z = normal.z; + vec3 result = shCoefficients[ 0 ] * 0.886227; + result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; + result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; + result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; + result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; + result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; + result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); + result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; + result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); + return result; +} +vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); + return irradiance; +} +vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { + vec3 irradiance = ambientLightColor; + return irradiance; +} +float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { + #if defined ( LEGACY_LIGHTS ) + if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) { + return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent ); + } + return 1.0; + #else + float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); + if ( cutoffDistance > 0.0 ) { + distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); + } + return distanceFalloff; + #endif +} +float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { + return smoothstep( coneCosine, penumbraCosine, angleCosine ); +} +#if NUM_DIR_LIGHTS > 0 + struct DirectionalLight { + vec3 direction; + vec3 color; + }; + uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; + void getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) { + light.color = directionalLight.color; + light.direction = directionalLight.direction; + light.visible = true; + } +#endif +#if NUM_POINT_LIGHTS > 0 + struct PointLight { + vec3 position; + vec3 color; + float distance; + float decay; + }; + uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; + void getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) { + vec3 lVector = pointLight.position - geometry.position; + light.direction = normalize( lVector ); + float lightDistance = length( lVector ); + light.color = pointLight.color; + light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } +#endif +#if NUM_SPOT_LIGHTS > 0 + struct SpotLight { + vec3 position; + vec3 direction; + vec3 color; + float distance; + float decay; + float coneCos; + float penumbraCos; + }; + uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; + void getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) { + vec3 lVector = spotLight.position - geometry.position; + light.direction = normalize( lVector ); + float angleCos = dot( light.direction, spotLight.direction ); + float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); + if ( spotAttenuation > 0.0 ) { + float lightDistance = length( lVector ); + light.color = spotLight.color * spotAttenuation; + light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } else { + light.color = vec3( 0.0 ); + light.visible = false; + } + } +#endif +#if NUM_RECT_AREA_LIGHTS > 0 + struct RectAreaLight { + vec3 color; + vec3 position; + vec3 halfWidth; + vec3 halfHeight; + }; + uniform sampler2D ltc_1; uniform sampler2D ltc_2; + uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; +#endif +#if NUM_HEMI_LIGHTS > 0 + struct HemisphereLight { + vec3 direction; + vec3 skyColor; + vec3 groundColor; + }; + uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; + vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { + float dotNL = dot( normal, hemiLight.direction ); + float hemiDiffuseWeight = 0.5 * dotNL + 0.5; + vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); + return irradiance; + } +#endif`,HX=`#if defined( USE_ENVMAP ) + vec3 getIBLIrradiance( const in vec3 normal ) { + #if defined( ENVMAP_TYPE_CUBE_UV ) + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 ); + return PI * envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } + vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { + #if defined( ENVMAP_TYPE_CUBE_UV ) + vec3 reflectVec = reflect( - viewDir, normal ); + reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); + reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ); + return envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } +#endif`,XX=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,YX=`varying vec3 vViewPosition; +struct ToonMaterial { + vec3 diffuseColor; +}; +void RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_Toon +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,FX=`BlinnPhongMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularColor = specular; +material.specularShininess = shininess; +material.specularStrength = specularStrength;`,KX=`varying vec3 vViewPosition; +struct BlinnPhongMaterial { + vec3 diffuseColor; + vec3 specularColor; + float specularShininess; + float specularStrength; +}; +void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength; +} +void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_BlinnPhong +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,zX=`PhysicalMaterial material; +material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); +vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) ); +float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); +material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; +material.roughness = min( material.roughness, 1.0 ); +#ifdef IOR + material.ior = ior; + #ifdef USE_SPECULAR + float specularIntensityFactor = specularIntensity; + vec3 specularColorFactor = specularColor; + #ifdef USE_SPECULAR_COLORMAP + specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; + #endif + #ifdef USE_SPECULAR_INTENSITYMAP + specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; + #endif + material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); + #else + float specularIntensityFactor = 1.0; + vec3 specularColorFactor = vec3( 1.0 ); + material.specularF90 = 1.0; + #endif + material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); +#else + material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); + material.specularF90 = 1.0; +#endif +#ifdef USE_CLEARCOAT + material.clearcoat = clearcoat; + material.clearcoatRoughness = clearcoatRoughness; + material.clearcoatF0 = vec3( 0.04 ); + material.clearcoatF90 = 1.0; + #ifdef USE_CLEARCOATMAP + material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; + #endif + #ifdef USE_CLEARCOAT_ROUGHNESSMAP + material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; + #endif + material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); + material.clearcoatRoughness += geometryRoughness; + material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); +#endif +#ifdef USE_IRIDESCENCE + material.iridescence = iridescence; + material.iridescenceIOR = iridescenceIOR; + #ifdef USE_IRIDESCENCEMAP + material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; + #endif + #ifdef USE_IRIDESCENCE_THICKNESSMAP + material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; + #else + material.iridescenceThickness = iridescenceThicknessMaximum; + #endif +#endif +#ifdef USE_SHEEN + material.sheenColor = sheenColor; + #ifdef USE_SHEEN_COLORMAP + material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; + #endif + material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); + #ifdef USE_SHEEN_ROUGHNESSMAP + material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; + #endif +#endif`,LX=`struct PhysicalMaterial { + vec3 diffuseColor; + float roughness; + vec3 specularColor; + float specularF90; + #ifdef USE_CLEARCOAT + float clearcoat; + float clearcoatRoughness; + vec3 clearcoatF0; + float clearcoatF90; + #endif + #ifdef USE_IRIDESCENCE + float iridescence; + float iridescenceIOR; + float iridescenceThickness; + vec3 iridescenceFresnel; + vec3 iridescenceF0; + #endif + #ifdef USE_SHEEN + vec3 sheenColor; + float sheenRoughness; + #endif + #ifdef IOR + float ior; + #endif + #ifdef USE_TRANSMISSION + float transmission; + float transmissionAlpha; + float thickness; + float attenuationDistance; + vec3 attenuationColor; + #endif +}; +vec3 clearcoatSpecular = vec3( 0.0 ); +vec3 sheenSpecular = vec3( 0.0 ); +vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { + float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); + float x2 = x * x; + float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); + return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); +} +float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { + float a2 = pow2( alpha ); + float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); + float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); + return 0.5 / max( gv + gl, EPSILON ); +} +float D_GGX( const in float alpha, const in float dotNH ) { + float a2 = pow2( alpha ); + float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; + return RECIPROCAL_PI * a2 / pow2( denom ); +} +#ifdef USE_CLEARCOAT + vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { + vec3 f0 = material.clearcoatF0; + float f90 = material.clearcoatF90; + float roughness = material.clearcoatRoughness; + float alpha = pow2( roughness ); + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + vec3 F = F_Schlick( f0, f90, dotVH ); + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + float D = D_GGX( alpha, dotNH ); + return F * ( V * D ); + } +#endif +vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { + vec3 f0 = material.specularColor; + float f90 = material.specularF90; + float roughness = material.roughness; + float alpha = pow2( roughness ); + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + vec3 F = F_Schlick( f0, f90, dotVH ); + #ifdef USE_IRIDESCENCE + F = mix( F, material.iridescenceFresnel, material.iridescence ); + #endif + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + float D = D_GGX( alpha, dotNH ); + return F * ( V * D ); +} +vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { + const float LUT_SIZE = 64.0; + const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; + const float LUT_BIAS = 0.5 / LUT_SIZE; + float dotNV = saturate( dot( N, V ) ); + vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); + uv = uv * LUT_SCALE + LUT_BIAS; + return uv; +} +float LTC_ClippedSphereFormFactor( const in vec3 f ) { + float l = length( f ); + return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); +} +vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { + float x = dot( v1, v2 ); + float y = abs( x ); + float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; + float b = 3.4175940 + ( 4.1616724 + y ) * y; + float v = a / b; + float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; + return cross( v1, v2 ) * theta_sintheta; +} +vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { + vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; + vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; + vec3 lightNormal = cross( v1, v2 ); + if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); + vec3 T1, T2; + T1 = normalize( V - N * dot( V, N ) ); + T2 = - cross( N, T1 ); + mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); + vec3 coords[ 4 ]; + coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); + coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); + coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); + coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); + coords[ 0 ] = normalize( coords[ 0 ] ); + coords[ 1 ] = normalize( coords[ 1 ] ); + coords[ 2 ] = normalize( coords[ 2 ] ); + coords[ 3 ] = normalize( coords[ 3 ] ); + vec3 vectorFormFactor = vec3( 0.0 ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); + float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); + return vec3( result ); +} +#if defined( USE_SHEEN ) +float D_Charlie( float roughness, float dotNH ) { + float alpha = pow2( roughness ); + float invAlpha = 1.0 / alpha; + float cos2h = dotNH * dotNH; + float sin2h = max( 1.0 - cos2h, 0.0078125 ); + return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); +} +float V_Neubelt( float dotNV, float dotNL ) { + return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); +} +vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float D = D_Charlie( sheenRoughness, dotNH ); + float V = V_Neubelt( dotNV, dotNL ); + return sheenColor * ( D * V ); +} +#endif +float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + float r2 = roughness * roughness; + float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; + float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; + float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); + return saturate( DG * RECIPROCAL_PI ); +} +vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); + const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); + vec4 r = roughness * c0 + c1; + float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; + vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; + return fab; +} +vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { + vec2 fab = DFGApprox( normal, viewDir, roughness ); + return specularColor * fab.x + specularF90 * fab.y; +} +#ifdef USE_IRIDESCENCE +void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { +#else +void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { +#endif + vec2 fab = DFGApprox( normal, viewDir, roughness ); + #ifdef USE_IRIDESCENCE + vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); + #else + vec3 Fr = specularColor; + #endif + vec3 FssEss = Fr * fab.x + specularF90 * fab.y; + float Ess = fab.x + fab.y; + float Ems = 1.0 - Ess; + vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); + singleScatter += FssEss; + multiScatter += Fms * Ems; +} +#if NUM_RECT_AREA_LIGHTS > 0 + void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + vec3 normal = geometry.normal; + vec3 viewDir = geometry.viewDir; + vec3 position = geometry.position; + vec3 lightPos = rectAreaLight.position; + vec3 halfWidth = rectAreaLight.halfWidth; + vec3 halfHeight = rectAreaLight.halfHeight; + vec3 lightColor = rectAreaLight.color; + float roughness = material.roughness; + vec3 rectCoords[ 4 ]; + rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; + rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; + rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; + vec2 uv = LTC_Uv( normal, viewDir, roughness ); + vec4 t1 = texture2D( ltc_1, uv ); + vec4 t2 = texture2D( ltc_2, uv ); + mat3 mInv = mat3( + vec3( t1.x, 0, t1.y ), + vec3( 0, 1, 0 ), + vec3( t1.z, 0, t1.w ) + ); + vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); + reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); + reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); + } +#endif +void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + #ifdef USE_CLEARCOAT + float dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) ); + vec3 ccIrradiance = dotNLcc * directLight.color; + clearcoatSpecular += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material ); + #endif + #ifdef USE_SHEEN + sheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness ); + #endif + reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material ); + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { + #ifdef USE_CLEARCOAT + clearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); + #endif + #ifdef USE_SHEEN + sheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness ); + #endif + vec3 singleScattering = vec3( 0.0 ); + vec3 multiScattering = vec3( 0.0 ); + vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; + #ifdef USE_IRIDESCENCE + computeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); + #else + computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); + #endif + vec3 totalScattering = singleScattering + multiScattering; + vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); + reflectedLight.indirectSpecular += radiance * singleScattering; + reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; + reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; +} +#define RE_Direct RE_Direct_Physical +#define RE_Direct_RectArea RE_Direct_RectArea_Physical +#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical +#define RE_IndirectSpecular RE_IndirectSpecular_Physical +float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { + return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); +}`,TX=` +GeometricContext geometry; +geometry.position = - vViewPosition; +geometry.normal = normal; +geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); +#ifdef USE_CLEARCOAT + geometry.clearcoatNormal = clearcoatNormal; +#endif +#ifdef USE_IRIDESCENCE + float dotNVi = saturate( dot( normal, geometry.viewDir ) ); + if ( material.iridescenceThickness == 0.0 ) { + material.iridescence = 0.0; + } else { + material.iridescence = saturate( material.iridescence ); + } + if ( material.iridescence > 0.0 ) { + material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); + material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); + } +#endif +IncidentLight directLight; +#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) + PointLight pointLight; + #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { + pointLight = pointLights[ i ]; + getPointLightInfo( pointLight, geometry, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) + pointLightShadow = pointLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; + #endif + RE_Direct( directLight, geometry, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) + SpotLight spotLight; + vec4 spotColor; + vec3 spotLightCoord; + bool inSpotLightMap; + #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { + spotLight = spotLights[ i ]; + getSpotLightInfo( spotLight, geometry, directLight ); + #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX + #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS + #else + #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #endif + #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) + spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; + inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); + spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); + directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; + #endif + #undef SPOT_LIGHT_MAP_INDEX + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + spotLightShadow = spotLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometry, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) + DirectionalLight directionalLight; + #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + directionalLight = directionalLights[ i ]; + getDirectionalLightInfo( directionalLight, geometry, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) + directionalLightShadow = directionalLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometry, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) + RectAreaLight rectAreaLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { + rectAreaLight = rectAreaLights[ i ]; + RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if defined( RE_IndirectDiffuse ) + vec3 iblIrradiance = vec3( 0.0 ); + vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); + irradiance += getLightProbeIrradiance( lightProbe, geometry.normal ); + #if ( NUM_HEMI_LIGHTS > 0 ) + #pragma unroll_loop_start + for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { + irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal ); + } + #pragma unroll_loop_end + #endif +#endif +#if defined( RE_IndirectSpecular ) + vec3 radiance = vec3( 0.0 ); + vec3 clearcoatRadiance = vec3( 0.0 ); +#endif`,EX=`#if defined( RE_IndirectDiffuse ) + #ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; + irradiance += lightMapIrradiance; + #endif + #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) + iblIrradiance += getIBLIrradiance( geometry.normal ); + #endif +#endif +#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) + radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness ); + #ifdef USE_CLEARCOAT + clearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness ); + #endif +#endif`,kX=`#if defined( RE_IndirectDiffuse ) + RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight ); +#endif +#if defined( RE_IndirectSpecular ) + RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight ); +#endif`,DX=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) + gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; +#endif`,UX=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) + uniform float logDepthBufFC; + varying float vFragDepth; + varying float vIsPerspective; +#endif`,PX=`#ifdef USE_LOGDEPTHBUF + #ifdef USE_LOGDEPTHBUF_EXT + varying float vFragDepth; + varying float vIsPerspective; + #else + uniform float logDepthBufFC; + #endif +#endif`,_X=`#ifdef USE_LOGDEPTHBUF + #ifdef USE_LOGDEPTHBUF_EXT + vFragDepth = 1.0 + gl_Position.w; + vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); + #else + if ( isPerspectiveMatrix( projectionMatrix ) ) { + gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0; + gl_Position.z *= gl_Position.w; + } + #endif +#endif`,JX=`#ifdef USE_MAP + diffuseColor *= texture2D( map, vMapUv ); +#endif`,OX=`#ifdef USE_MAP + uniform sampler2D map; +#endif`,QX=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + #if defined( USE_POINTS_UV ) + vec2 uv = vUv; + #else + vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; + #endif +#endif +#ifdef USE_MAP + diffuseColor *= texture2D( map, uv ); +#endif +#ifdef USE_ALPHAMAP + diffuseColor.a *= texture2D( alphaMap, uv ).g; +#endif`,jX=`#if defined( USE_POINTS_UV ) + varying vec2 vUv; +#else + #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + uniform mat3 uvTransform; + #endif +#endif +#ifdef USE_MAP + uniform sampler2D map; +#endif +#ifdef USE_ALPHAMAP + uniform sampler2D alphaMap; +#endif`,qX=`float metalnessFactor = metalness; +#ifdef USE_METALNESSMAP + vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); + metalnessFactor *= texelMetalness.b; +#endif`,$X=`#ifdef USE_METALNESSMAP + uniform sampler2D metalnessMap; +#endif`,eY=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) + vColor *= morphTargetBaseInfluence; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + #if defined( USE_COLOR_ALPHA ) + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; + #elif defined( USE_COLOR ) + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; + #endif + } +#endif`,tY=`#ifdef USE_MORPHNORMALS + objectNormal *= morphTargetBaseInfluence; + #ifdef MORPHTARGETS_TEXTURE + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; + } + #else + objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; + objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; + objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; + objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; + #endif +#endif`,nY=`#ifdef USE_MORPHTARGETS + uniform float morphTargetBaseInfluence; + #ifdef MORPHTARGETS_TEXTURE + uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; + uniform sampler2DArray morphTargetsTexture; + uniform ivec2 morphTargetsTextureSize; + vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { + int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; + int y = texelIndex / morphTargetsTextureSize.x; + int x = texelIndex - y * morphTargetsTextureSize.x; + ivec3 morphUV = ivec3( x, y, morphTargetIndex ); + return texelFetch( morphTargetsTexture, morphUV, 0 ); + } + #else + #ifndef USE_MORPHNORMALS + uniform float morphTargetInfluences[ 8 ]; + #else + uniform float morphTargetInfluences[ 4 ]; + #endif + #endif +#endif`,iY=`#ifdef USE_MORPHTARGETS + transformed *= morphTargetBaseInfluence; + #ifdef MORPHTARGETS_TEXTURE + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; + } + #else + transformed += morphTarget0 * morphTargetInfluences[ 0 ]; + transformed += morphTarget1 * morphTargetInfluences[ 1 ]; + transformed += morphTarget2 * morphTargetInfluences[ 2 ]; + transformed += morphTarget3 * morphTargetInfluences[ 3 ]; + #ifndef USE_MORPHNORMALS + transformed += morphTarget4 * morphTargetInfluences[ 4 ]; + transformed += morphTarget5 * morphTargetInfluences[ 5 ]; + transformed += morphTarget6 * morphTargetInfluences[ 6 ]; + transformed += morphTarget7 * morphTargetInfluences[ 7 ]; + #endif + #endif +#endif`,sY=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#ifdef FLAT_SHADED + vec3 fdx = dFdx( vViewPosition ); + vec3 fdy = dFdy( vViewPosition ); + vec3 normal = normalize( cross( fdx, fdy ) ); +#else + vec3 normal = normalize( vNormal ); + #ifdef DOUBLE_SIDED + normal *= faceDirection; + #endif +#endif +#ifdef USE_NORMALMAP_TANGENTSPACE + #ifdef USE_TANGENT + mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + #else + mat3 tbn = getTangentFrame( - vViewPosition, normal, vNormalMapUv ); + #endif + #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) + tbn[0] *= faceDirection; + tbn[1] *= faceDirection; + #endif +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + #ifdef USE_TANGENT + mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + #else + mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); + #endif + #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) + tbn2[0] *= faceDirection; + tbn2[1] *= faceDirection; + #endif +#endif +vec3 geometryNormal = normal;`,rY=`#ifdef USE_NORMALMAP_OBJECTSPACE + normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; + #ifdef FLIP_SIDED + normal = - normal; + #endif + #ifdef DOUBLE_SIDED + normal = normal * faceDirection; + #endif + normal = normalize( normalMatrix * normal ); +#elif defined( USE_NORMALMAP_TANGENTSPACE ) + vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; + mapN.xy *= normalScale; + normal = normalize( tbn * mapN ); +#elif defined( USE_BUMPMAP ) + normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); +#endif`,oY=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,aY=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,lY=`#ifndef FLAT_SHADED + vNormal = normalize( transformedNormal ); + #ifdef USE_TANGENT + vTangent = normalize( transformedTangent ); + vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); + #endif +#endif`,gY=`#ifdef USE_NORMALMAP + uniform sampler2D normalMap; + uniform vec2 normalScale; +#endif +#ifdef USE_NORMALMAP_OBJECTSPACE + uniform mat3 normalMatrix; +#endif +#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) ) + mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { + vec3 q0 = dFdx( eye_pos.xyz ); + vec3 q1 = dFdy( eye_pos.xyz ); + vec2 st0 = dFdx( uv.st ); + vec2 st1 = dFdy( uv.st ); + vec3 N = surf_norm; + vec3 q1perp = cross( q1, N ); + vec3 q0perp = cross( N, q0 ); + vec3 T = q1perp * st0.x + q0perp * st1.x; + vec3 B = q1perp * st0.y + q0perp * st1.y; + float det = max( dot( T, T ), dot( B, B ) ); + float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); + return mat3( T * scale, B * scale, N ); + } +#endif`,cY=`#ifdef USE_CLEARCOAT + vec3 clearcoatNormal = geometryNormal; +#endif`,IY=`#ifdef USE_CLEARCOAT_NORMALMAP + vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; + clearcoatMapN.xy *= clearcoatNormalScale; + clearcoatNormal = normalize( tbn2 * clearcoatMapN ); +#endif`,uY=`#ifdef USE_CLEARCOATMAP + uniform sampler2D clearcoatMap; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + uniform sampler2D clearcoatNormalMap; + uniform vec2 clearcoatNormalScale; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + uniform sampler2D clearcoatRoughnessMap; +#endif`,CY=`#ifdef USE_IRIDESCENCEMAP + uniform sampler2D iridescenceMap; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + uniform sampler2D iridescenceThicknessMap; +#endif`,dY=`#ifdef OPAQUE +diffuseColor.a = 1.0; +#endif +#ifdef USE_TRANSMISSION +diffuseColor.a *= material.transmissionAlpha + 0.1; +#endif +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,hY=`vec3 packNormalToRGB( const in vec3 normal ) { + return normalize( normal ) * 0.5 + 0.5; +} +vec3 unpackRGBToNormal( const in vec3 rgb ) { + return 2.0 * rgb.xyz - 1.0; +} +const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; +const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); +const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); +const float ShiftRight8 = 1. / 256.; +vec4 packDepthToRGBA( const in float v ) { + vec4 r = vec4( fract( v * PackFactors ), v ); + r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; +} +float unpackRGBAToDepth( const in vec4 v ) { + return dot( v, UnpackFactors ); +} +vec2 packDepthToRG( in highp float v ) { + return packDepthToRGBA( v ).yx; +} +float unpackRGToDepth( const in highp vec2 v ) { + return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) ); +} +vec4 pack2HalfToRGBA( vec2 v ) { + vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); + return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); +} +vec2 unpackRGBATo2Half( vec4 v ) { + return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); +} +float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { + return ( viewZ + near ) / ( near - far ); +} +float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { + return depth * ( near - far ) - near; +} +float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { + return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); +} +float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { + return ( near * far ) / ( ( far - near ) * depth - far ); +}`,AY=`#ifdef PREMULTIPLIED_ALPHA + gl_FragColor.rgb *= gl_FragColor.a; +#endif`,pY=`vec4 mvPosition = vec4( transformed, 1.0 ); +#ifdef USE_INSTANCING + mvPosition = instanceMatrix * mvPosition; +#endif +mvPosition = modelViewMatrix * mvPosition; +gl_Position = projectionMatrix * mvPosition;`,fY=`#ifdef DITHERING + gl_FragColor.rgb = dithering( gl_FragColor.rgb ); +#endif`,mY=`#ifdef DITHERING + vec3 dithering( vec3 color ) { + float grid_position = rand( gl_FragCoord.xy ); + vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); + dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); + return color + dither_shift_RGB; + } +#endif`,bY=`float roughnessFactor = roughness; +#ifdef USE_ROUGHNESSMAP + vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); + roughnessFactor *= texelRoughness.g; +#endif`,vY=`#ifdef USE_ROUGHNESSMAP + uniform sampler2D roughnessMap; +#endif`,yY=`#if NUM_SPOT_LIGHT_COORDS > 0 + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; +#endif +#if NUM_SPOT_LIGHT_MAPS > 0 + uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; +#endif +#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; + struct SpotLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif + float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { + return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); + } + vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { + return unpackRGBATo2Half( texture2D( shadow, uv ) ); + } + float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ + float occlusion = 1.0; + vec2 distribution = texture2DDistribution( shadow, uv ); + float hard_shadow = step( compare , distribution.x ); + if (hard_shadow != 1.0 ) { + float distance = compare - distribution.x ; + float variance = max( 0.00000, distribution.y * distribution.y ); + float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); + } + return occlusion; + } + float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { + float shadow = 1.0; + shadowCoord.xyz /= shadowCoord.w; + shadowCoord.z += shadowBias; + bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; + bool frustumTest = inFrustum && shadowCoord.z <= 1.0; + if ( frustumTest ) { + #if defined( SHADOWMAP_TYPE_PCF ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx0 = - texelSize.x * shadowRadius; + float dy0 = - texelSize.y * shadowRadius; + float dx1 = + texelSize.x * shadowRadius; + float dy1 = + texelSize.y * shadowRadius; + float dx2 = dx0 / 2.0; + float dy2 = dy0 / 2.0; + float dx3 = dx1 / 2.0; + float dy3 = dy1 / 2.0; + shadow = ( + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) + ) * ( 1.0 / 17.0 ); + #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx = texelSize.x; + float dy = texelSize.y; + vec2 uv = shadowCoord.xy; + vec2 f = fract( uv * shadowMapSize + 0.5 ); + uv -= f * texelSize; + shadow = ( + texture2DCompare( shadowMap, uv, shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), + f.x ), + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), + f.x ), + f.y ) + ) * ( 1.0 / 9.0 ); + #elif defined( SHADOWMAP_TYPE_VSM ) + shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); + #else + shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); + #endif + } + return shadow; + } + vec2 cubeToUV( vec3 v, float texelSizeY ) { + vec3 absV = abs( v ); + float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); + absV *= scaleToCube; + v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); + vec2 planar = v.xy; + float almostATexel = 1.5 * texelSizeY; + float almostOne = 1.0 - almostATexel; + if ( absV.z >= almostOne ) { + if ( v.z > 0.0 ) + planar.x = 4.0 - v.x; + } else if ( absV.x >= almostOne ) { + float signX = sign( v.x ); + planar.x = v.z * signX + 2.0 * signX; + } else if ( absV.y >= almostOne ) { + float signY = sign( v.y ); + planar.x = v.x + 2.0 * signY + 2.0; + planar.y = v.z * signY - 2.0; + } + return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); + } + float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { + vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); + vec3 lightToPosition = shadowCoord.xyz; + float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; + vec3 bd3D = normalize( lightToPosition ); + #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) + vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; + return ( + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) + ) * ( 1.0 / 9.0 ); + #else + return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); + #endif + } +#endif`,GY=`#if NUM_SPOT_LIGHT_COORDS > 0 + uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; +#endif +#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + struct SpotLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif +#endif`,BY=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) + vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + vec4 shadowWorldPosition; +#endif +#if defined( USE_SHADOWMAP ) + #if NUM_DIR_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); + vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); + vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif +#endif +#if NUM_SPOT_LIGHT_COORDS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { + shadowWorldPosition = worldPosition; + #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; + #endif + vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end +#endif`,ZY=`float getShadowMask() { + float shadow = 1.0; + #ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + directionalLight = directionalLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { + spotLight = spotLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + pointLight = pointLightShadows[ i ]; + shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; + } + #pragma unroll_loop_end + #endif + #endif + return shadow; +}`,wY=`#ifdef USE_SKINNING + mat4 boneMatX = getBoneMatrix( skinIndex.x ); + mat4 boneMatY = getBoneMatrix( skinIndex.y ); + mat4 boneMatZ = getBoneMatrix( skinIndex.z ); + mat4 boneMatW = getBoneMatrix( skinIndex.w ); +#endif`,SY=`#ifdef USE_SKINNING + uniform mat4 bindMatrix; + uniform mat4 bindMatrixInverse; + uniform highp sampler2D boneTexture; + uniform int boneTextureSize; + mat4 getBoneMatrix( const in float i ) { + float j = i * 4.0; + float x = mod( j, float( boneTextureSize ) ); + float y = floor( j / float( boneTextureSize ) ); + float dx = 1.0 / float( boneTextureSize ); + float dy = 1.0 / float( boneTextureSize ); + y = dy * ( y + 0.5 ); + vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) ); + vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) ); + vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) ); + vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) ); + mat4 bone = mat4( v1, v2, v3, v4 ); + return bone; + } +#endif`,xY=`#ifdef USE_SKINNING + vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); + vec4 skinned = vec4( 0.0 ); + skinned += boneMatX * skinVertex * skinWeight.x; + skinned += boneMatY * skinVertex * skinWeight.y; + skinned += boneMatZ * skinVertex * skinWeight.z; + skinned += boneMatW * skinVertex * skinWeight.w; + transformed = ( bindMatrixInverse * skinned ).xyz; +#endif`,RY=`#ifdef USE_SKINNING + mat4 skinMatrix = mat4( 0.0 ); + skinMatrix += skinWeight.x * boneMatX; + skinMatrix += skinWeight.y * boneMatY; + skinMatrix += skinWeight.z * boneMatZ; + skinMatrix += skinWeight.w * boneMatW; + skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; + objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; + #ifdef USE_TANGENT + objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; + #endif +#endif`,WY=`float specularStrength; +#ifdef USE_SPECULARMAP + vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); + specularStrength = texelSpecular.r; +#else + specularStrength = 1.0; +#endif`,VY=`#ifdef USE_SPECULARMAP + uniform sampler2D specularMap; +#endif`,MY=`#if defined( TONE_MAPPING ) + gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); +#endif`,NY=`#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +uniform float toneMappingExposure; +vec3 LinearToneMapping( vec3 color ) { + return toneMappingExposure * color; +} +vec3 ReinhardToneMapping( vec3 color ) { + color *= toneMappingExposure; + return saturate( color / ( vec3( 1.0 ) + color ) ); +} +vec3 OptimizedCineonToneMapping( vec3 color ) { + color *= toneMappingExposure; + color = max( vec3( 0.0 ), color - 0.004 ); + return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); +} +vec3 RRTAndODTFit( vec3 v ) { + vec3 a = v * ( v + 0.0245786 ) - 0.000090537; + vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; + return a / b; +} +vec3 ACESFilmicToneMapping( vec3 color ) { + const mat3 ACESInputMat = mat3( + vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), + vec3( 0.04823, 0.01566, 0.83777 ) + ); + const mat3 ACESOutputMat = mat3( + vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), + vec3( -0.07367, -0.00605, 1.07602 ) + ); + color *= toneMappingExposure / 0.6; + color = ACESInputMat * color; + color = RRTAndODTFit( color ); + color = ACESOutputMat * color; + return saturate( color ); +} +vec3 CustomToneMapping( vec3 color ) { return color; }`,HY=`#ifdef USE_TRANSMISSION + material.transmission = transmission; + material.transmissionAlpha = 1.0; + material.thickness = thickness; + material.attenuationDistance = attenuationDistance; + material.attenuationColor = attenuationColor; + #ifdef USE_TRANSMISSIONMAP + material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; + #endif + #ifdef USE_THICKNESSMAP + material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; + #endif + vec3 pos = vWorldPosition; + vec3 v = normalize( cameraPosition - pos ); + vec3 n = inverseTransformDirection( normal, viewMatrix ); + vec4 transmission = getIBLVolumeRefraction( + n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, + pos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness, + material.attenuationColor, material.attenuationDistance ); + material.transmissionAlpha = mix( material.transmissionAlpha, transmission.a, material.transmission ); + totalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission ); +#endif`,XY=`#ifdef USE_TRANSMISSION + uniform float transmission; + uniform float thickness; + uniform float attenuationDistance; + uniform vec3 attenuationColor; + #ifdef USE_TRANSMISSIONMAP + uniform sampler2D transmissionMap; + #endif + #ifdef USE_THICKNESSMAP + uniform sampler2D thicknessMap; + #endif + uniform vec2 transmissionSamplerSize; + uniform sampler2D transmissionSamplerMap; + uniform mat4 modelMatrix; + uniform mat4 projectionMatrix; + varying vec3 vWorldPosition; + float w0( float a ) { + return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); + } + float w1( float a ) { + return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); + } + float w2( float a ){ + return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); + } + float w3( float a ) { + return ( 1.0 / 6.0 ) * ( a * a * a ); + } + float g0( float a ) { + return w0( a ) + w1( a ); + } + float g1( float a ) { + return w2( a ) + w3( a ); + } + float h0( float a ) { + return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); + } + float h1( float a ) { + return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); + } + vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { + uv = uv * texelSize.zw + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + float g0x = g0( fuv.x ); + float g1x = g1( fuv.x ); + float h0x = h0( fuv.x ); + float h1x = h1( fuv.x ); + float h0y = h0( fuv.y ); + float h1y = h1( fuv.y ); + vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + + g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); + } + vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { + vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); + vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); + vec2 fLodSizeInv = 1.0 / fLodSize; + vec2 cLodSizeInv = 1.0 / cLodSize; + vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); + vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); + return mix( fSample, cSample, fract( lod ) ); + } + vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { + vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); + vec3 modelScale; + modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); + modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); + modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); + return normalize( refractionVector ) * thickness * modelScale; + } + float applyIorToRoughness( const in float roughness, const in float ior ) { + return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); + } + vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { + float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); + return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); + } + vec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { + if ( isinf( attenuationDistance ) ) { + return radiance; + } else { + vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; + vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance * radiance; + } + } + vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, + const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, + const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness, + const in vec3 attenuationColor, const in float attenuationDistance ) { + vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); + vec3 refractedRayExit = position + transmissionRay; + vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); + vec2 refractionCoords = ndcPos.xy / ndcPos.w; + refractionCoords += 1.0; + refractionCoords /= 2.0; + vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); + vec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance ); + vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); + return vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a ); + } +#endif`,YY=`#ifdef USE_UV + varying vec2 vUv; +#endif +#ifdef USE_MAP + varying vec2 vMapUv; +#endif +#ifdef USE_ALPHAMAP + varying vec2 vAlphaMapUv; +#endif +#ifdef USE_LIGHTMAP + varying vec2 vLightMapUv; +#endif +#ifdef USE_AOMAP + varying vec2 vAoMapUv; +#endif +#ifdef USE_BUMPMAP + varying vec2 vBumpMapUv; +#endif +#ifdef USE_NORMALMAP + varying vec2 vNormalMapUv; +#endif +#ifdef USE_EMISSIVEMAP + varying vec2 vEmissiveMapUv; +#endif +#ifdef USE_METALNESSMAP + varying vec2 vMetalnessMapUv; +#endif +#ifdef USE_ROUGHNESSMAP + varying vec2 vRoughnessMapUv; +#endif +#ifdef USE_CLEARCOATMAP + varying vec2 vClearcoatMapUv; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + varying vec2 vClearcoatNormalMapUv; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + varying vec2 vClearcoatRoughnessMapUv; +#endif +#ifdef USE_IRIDESCENCEMAP + varying vec2 vIridescenceMapUv; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + varying vec2 vIridescenceThicknessMapUv; +#endif +#ifdef USE_SHEEN_COLORMAP + varying vec2 vSheenColorMapUv; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + varying vec2 vSheenRoughnessMapUv; +#endif +#ifdef USE_SPECULARMAP + varying vec2 vSpecularMapUv; +#endif +#ifdef USE_SPECULAR_COLORMAP + varying vec2 vSpecularColorMapUv; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + varying vec2 vSpecularIntensityMapUv; +#endif +#ifdef USE_TRANSMISSIONMAP + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; +#endif +#ifdef USE_THICKNESSMAP + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; +#endif`,FY=`#ifdef USE_UV + varying vec2 vUv; +#endif +#ifdef USE_MAP + uniform mat3 mapTransform; + varying vec2 vMapUv; +#endif +#ifdef USE_ALPHAMAP + uniform mat3 alphaMapTransform; + varying vec2 vAlphaMapUv; +#endif +#ifdef USE_LIGHTMAP + uniform mat3 lightMapTransform; + varying vec2 vLightMapUv; +#endif +#ifdef USE_AOMAP + uniform mat3 aoMapTransform; + varying vec2 vAoMapUv; +#endif +#ifdef USE_BUMPMAP + uniform mat3 bumpMapTransform; + varying vec2 vBumpMapUv; +#endif +#ifdef USE_NORMALMAP + uniform mat3 normalMapTransform; + varying vec2 vNormalMapUv; +#endif +#ifdef USE_DISPLACEMENTMAP + uniform mat3 displacementMapTransform; + varying vec2 vDisplacementMapUv; +#endif +#ifdef USE_EMISSIVEMAP + uniform mat3 emissiveMapTransform; + varying vec2 vEmissiveMapUv; +#endif +#ifdef USE_METALNESSMAP + uniform mat3 metalnessMapTransform; + varying vec2 vMetalnessMapUv; +#endif +#ifdef USE_ROUGHNESSMAP + uniform mat3 roughnessMapTransform; + varying vec2 vRoughnessMapUv; +#endif +#ifdef USE_CLEARCOATMAP + uniform mat3 clearcoatMapTransform; + varying vec2 vClearcoatMapUv; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + uniform mat3 clearcoatNormalMapTransform; + varying vec2 vClearcoatNormalMapUv; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + uniform mat3 clearcoatRoughnessMapTransform; + varying vec2 vClearcoatRoughnessMapUv; +#endif +#ifdef USE_SHEEN_COLORMAP + uniform mat3 sheenColorMapTransform; + varying vec2 vSheenColorMapUv; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + uniform mat3 sheenRoughnessMapTransform; + varying vec2 vSheenRoughnessMapUv; +#endif +#ifdef USE_IRIDESCENCEMAP + uniform mat3 iridescenceMapTransform; + varying vec2 vIridescenceMapUv; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + uniform mat3 iridescenceThicknessMapTransform; + varying vec2 vIridescenceThicknessMapUv; +#endif +#ifdef USE_SPECULARMAP + uniform mat3 specularMapTransform; + varying vec2 vSpecularMapUv; +#endif +#ifdef USE_SPECULAR_COLORMAP + uniform mat3 specularColorMapTransform; + varying vec2 vSpecularColorMapUv; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + uniform mat3 specularIntensityMapTransform; + varying vec2 vSpecularIntensityMapUv; +#endif +#ifdef USE_TRANSMISSIONMAP + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; +#endif +#ifdef USE_THICKNESSMAP + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; +#endif`,KY=`#ifdef USE_UV + vUv = vec3( uv, 1 ).xy; +#endif +#ifdef USE_MAP + vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ALPHAMAP + vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_LIGHTMAP + vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_AOMAP + vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_BUMPMAP + vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_NORMALMAP + vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_DISPLACEMENTMAP + vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_EMISSIVEMAP + vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_METALNESSMAP + vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ROUGHNESSMAP + vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOATMAP + vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_IRIDESCENCEMAP + vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SHEEN_COLORMAP + vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULARMAP + vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULAR_COLORMAP + vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_TRANSMISSIONMAP + vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_THICKNESSMAP + vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; +#endif`,zY=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 + vec4 worldPosition = vec4( transformed, 1.0 ); + #ifdef USE_INSTANCING + worldPosition = instanceMatrix * worldPosition; + #endif + worldPosition = modelMatrix * worldPosition; +#endif`;const LY=`varying vec2 vUv; +uniform mat3 uvTransform; +void main() { + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + gl_Position = vec4( position.xy, 1.0, 1.0 ); +}`,TY=`uniform sampler2D t2D; +uniform float backgroundIntensity; +varying vec2 vUv; +void main() { + vec4 texColor = texture2D( t2D, vUv ); + texColor.rgb *= backgroundIntensity; + gl_FragColor = texColor; + #include + #include +}`,EY=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,kY=`#ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; +#elif defined( ENVMAP_TYPE_CUBE_UV ) + uniform sampler2D envMap; +#endif +uniform float flipEnvMap; +uniform float backgroundBlurriness; +uniform float backgroundIntensity; +varying vec3 vWorldDirection; +#include +void main() { + #ifdef ENVMAP_TYPE_CUBE + vec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); + #elif defined( ENVMAP_TYPE_CUBE_UV ) + vec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness ); + #else + vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + #endif + texColor.rgb *= backgroundIntensity; + gl_FragColor = texColor; + #include + #include +}`,DY=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,UY=`uniform samplerCube tCube; +uniform float tFlip; +uniform float opacity; +varying vec3 vWorldDirection; +void main() { + vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); + gl_FragColor = texColor; + gl_FragColor.a *= opacity; + #include + #include +}`,PY=`#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vHighPrecisionZW = gl_Position.zw; +}`,_Y=`#if DEPTH_PACKING == 3200 + uniform float opacity; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + #include + vec4 diffuseColor = vec4( 1.0 ); + #if DEPTH_PACKING == 3200 + diffuseColor.a = opacity; + #endif + #include + #include + #include + #include + float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; + #if DEPTH_PACKING == 3200 + gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); + #elif DEPTH_PACKING == 3201 + gl_FragColor = packDepthToRGBA( fragCoordZ ); + #endif +}`,JY=`#define DISTANCE +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vWorldPosition = worldPosition.xyz; +}`,OY=`#define DISTANCE +uniform vec3 referencePosition; +uniform float nearDistance; +uniform float farDistance; +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +#include +void main () { + #include + vec4 diffuseColor = vec4( 1.0 ); + #include + #include + #include + float dist = length( vWorldPosition - referencePosition ); + dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); + dist = saturate( dist ); + gl_FragColor = packDepthToRGBA( dist ); +}`,QY=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include +}`,jY=`uniform sampler2D tEquirect; +varying vec3 vWorldDirection; +#include +void main() { + vec3 direction = normalize( vWorldDirection ); + vec2 sampleUV = equirectUv( direction ); + gl_FragColor = texture2D( tEquirect, sampleUV ); + #include + #include +}`,qY=`uniform float scale; +attribute float lineDistance; +varying float vLineDistance; +#include +#include +#include +#include +#include +#include +#include +void main() { + vLineDistance = scale * lineDistance; + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,$Y=`uniform vec3 diffuse; +uniform float opacity; +uniform float dashSize; +uniform float totalSize; +varying float vLineDistance; +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + if ( mod( vLineDistance, totalSize ) > dashSize ) { + discard; + } + vec3 outgoingLight = vec3( 0.0 ); + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,eF=`#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) + #include + #include + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,tF=`uniform vec3 diffuse; +uniform float opacity; +#ifndef FLAT_SHADED + varying vec3 vNormal; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + #ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; + #else + reflectedLight.indirectDiffuse += vec3( 1.0 ); + #endif + #include + reflectedLight.indirectDiffuse *= diffuseColor.rgb; + vec3 outgoingLight = reflectedLight.indirectDiffuse; + #include + #include + #include + #include + #include + #include + #include +}`,nF=`#define LAMBERT +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include + #include +}`,iF=`#define LAMBERT +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,sF=`#define MATCAP +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; +}`,rF=`#define MATCAP +uniform vec3 diffuse; +uniform float opacity; +uniform sampler2D matcap; +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + #include + vec3 viewDir = normalize( vViewPosition ); + vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); + vec3 y = cross( viewDir, x ); + vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; + #ifdef USE_MATCAP + vec4 matcapColor = texture2D( matcap, uv ); + #else + vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); + #endif + vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; + #include + #include + #include + #include + #include + #include +}`,oF=`#define NORMAL +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + vViewPosition = - mvPosition.xyz; +#endif +}`,aF=`#define NORMAL +uniform float opacity; +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + gl_FragColor = vec4( packNormalToRGB( normal ), opacity ); + #ifdef OPAQUE + gl_FragColor.a = 1.0; + #endif +}`,lF=`#define PHONG +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include + #include +}`,gF=`#define PHONG +uniform vec3 diffuse; +uniform vec3 emissive; +uniform vec3 specular; +uniform float shininess; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,cF=`#define STANDARD +varying vec3 vViewPosition; +#ifdef USE_TRANSMISSION + varying vec3 vWorldPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +#ifdef USE_TRANSMISSION + vWorldPosition = worldPosition.xyz; +#endif +}`,IF=`#define STANDARD +#ifdef PHYSICAL + #define IOR + #define USE_SPECULAR +#endif +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float roughness; +uniform float metalness; +uniform float opacity; +#ifdef IOR + uniform float ior; +#endif +#ifdef USE_SPECULAR + uniform float specularIntensity; + uniform vec3 specularColor; + #ifdef USE_SPECULAR_COLORMAP + uniform sampler2D specularColorMap; + #endif + #ifdef USE_SPECULAR_INTENSITYMAP + uniform sampler2D specularIntensityMap; + #endif +#endif +#ifdef USE_CLEARCOAT + uniform float clearcoat; + uniform float clearcoatRoughness; +#endif +#ifdef USE_IRIDESCENCE + uniform float iridescence; + uniform float iridescenceIOR; + uniform float iridescenceThicknessMinimum; + uniform float iridescenceThicknessMaximum; +#endif +#ifdef USE_SHEEN + uniform vec3 sheenColor; + uniform float sheenRoughness; + #ifdef USE_SHEEN_COLORMAP + uniform sampler2D sheenColorMap; + #endif + #ifdef USE_SHEEN_ROUGHNESSMAP + uniform sampler2D sheenRoughnessMap; + #endif +#endif +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; + vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; + #include + vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; + #ifdef USE_SHEEN + float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); + outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular; + #endif + #ifdef USE_CLEARCOAT + float dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) ); + vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); + outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat; + #endif + #include + #include + #include + #include + #include + #include +}`,uF=`#define TOON +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +}`,CF=`#define TOON +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include +}`,dF=`uniform float size; +uniform float scale; +#include +#include +#include +#include +#include +#include +#ifdef USE_POINTS_UV + varying vec2 vUv; + uniform mat3 uvTransform; +#endif +void main() { + #ifdef USE_POINTS_UV + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + #endif + #include + #include + #include + #include + #include + gl_PointSize = size; + #ifdef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); + #endif + #include + #include + #include + #include +}`,hF=`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec3 outgoingLight = vec3( 0.0 ); + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,AF=`#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,pF=`uniform vec3 color; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); + #include + #include + #include +}`,fF=`uniform float rotation; +uniform vec2 center; +#include +#include +#include +#include +#include +void main() { + #include + vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); + vec2 scale; + scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); + scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); + #ifndef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) scale *= - mvPosition.z; + #endif + vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; + vec2 rotatedPosition; + rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; + rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; + mvPosition.xy += rotatedPosition; + gl_Position = projectionMatrix * mvPosition; + #include + #include + #include +}`,mF=`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec3 outgoingLight = vec3( 0.0 ); + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include +}`,tt={alphamap_fragment:UH,alphamap_pars_fragment:PH,alphatest_fragment:_H,alphatest_pars_fragment:JH,aomap_fragment:OH,aomap_pars_fragment:QH,begin_vertex:jH,beginnormal_vertex:qH,bsdfs:$H,iridescence_fragment:eX,bumpmap_pars_fragment:tX,clipping_planes_fragment:nX,clipping_planes_pars_fragment:iX,clipping_planes_pars_vertex:sX,clipping_planes_vertex:rX,color_fragment:oX,color_pars_fragment:aX,color_pars_vertex:lX,color_vertex:gX,common:cX,cube_uv_reflection_fragment:IX,defaultnormal_vertex:uX,displacementmap_pars_vertex:CX,displacementmap_vertex:dX,emissivemap_fragment:hX,emissivemap_pars_fragment:AX,encodings_fragment:pX,encodings_pars_fragment:fX,envmap_fragment:mX,envmap_common_pars_fragment:bX,envmap_pars_fragment:vX,envmap_pars_vertex:yX,envmap_physical_pars_fragment:HX,envmap_vertex:GX,fog_vertex:BX,fog_pars_vertex:ZX,fog_fragment:wX,fog_pars_fragment:SX,gradientmap_pars_fragment:xX,lightmap_fragment:RX,lightmap_pars_fragment:WX,lights_lambert_fragment:VX,lights_lambert_pars_fragment:MX,lights_pars_begin:NX,lights_toon_fragment:XX,lights_toon_pars_fragment:YX,lights_phong_fragment:FX,lights_phong_pars_fragment:KX,lights_physical_fragment:zX,lights_physical_pars_fragment:LX,lights_fragment_begin:TX,lights_fragment_maps:EX,lights_fragment_end:kX,logdepthbuf_fragment:DX,logdepthbuf_pars_fragment:UX,logdepthbuf_pars_vertex:PX,logdepthbuf_vertex:_X,map_fragment:JX,map_pars_fragment:OX,map_particle_fragment:QX,map_particle_pars_fragment:jX,metalnessmap_fragment:qX,metalnessmap_pars_fragment:$X,morphcolor_vertex:eY,morphnormal_vertex:tY,morphtarget_pars_vertex:nY,morphtarget_vertex:iY,normal_fragment_begin:sY,normal_fragment_maps:rY,normal_pars_fragment:oY,normal_pars_vertex:aY,normal_vertex:lY,normalmap_pars_fragment:gY,clearcoat_normal_fragment_begin:cY,clearcoat_normal_fragment_maps:IY,clearcoat_pars_fragment:uY,iridescence_pars_fragment:CY,output_fragment:dY,packing:hY,premultiplied_alpha_fragment:AY,project_vertex:pY,dithering_fragment:fY,dithering_pars_fragment:mY,roughnessmap_fragment:bY,roughnessmap_pars_fragment:vY,shadowmap_pars_fragment:yY,shadowmap_pars_vertex:GY,shadowmap_vertex:BY,shadowmask_pars_fragment:ZY,skinbase_vertex:wY,skinning_pars_vertex:SY,skinning_vertex:xY,skinnormal_vertex:RY,specularmap_fragment:WY,specularmap_pars_fragment:VY,tonemapping_fragment:MY,tonemapping_pars_fragment:NY,transmission_fragment:HY,transmission_pars_fragment:XY,uv_pars_fragment:YY,uv_pars_vertex:FY,uv_vertex:KY,worldpos_vertex:zY,background_vert:LY,background_frag:TY,backgroundCube_vert:EY,backgroundCube_frag:kY,cube_vert:DY,cube_frag:UY,depth_vert:PY,depth_frag:_Y,distanceRGBA_vert:JY,distanceRGBA_frag:OY,equirect_vert:QY,equirect_frag:jY,linedashed_vert:qY,linedashed_frag:$Y,meshbasic_vert:eF,meshbasic_frag:tF,meshlambert_vert:nF,meshlambert_frag:iF,meshmatcap_vert:sF,meshmatcap_frag:rF,meshnormal_vert:oF,meshnormal_frag:aF,meshphong_vert:lF,meshphong_frag:gF,meshphysical_vert:cF,meshphysical_frag:IF,meshtoon_vert:uF,meshtoon_frag:CF,points_vert:dF,points_frag:hF,shadow_vert:AF,shadow_frag:pF,sprite_vert:fF,sprite_frag:mF},We={common:{diffuse:{value:new Re(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new xt},alphaMap:{value:null},alphaMapTransform:{value:new xt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new xt}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new xt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new xt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new xt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new xt},normalScale:{value:new ne(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new xt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new xt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new xt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new xt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Re(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 Re(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new xt}},sprite:{diffuse:{value:new Re(16777215)},opacity:{value:1},center:{value:new ne(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new xt},alphaMap:{value:null},alphaTest:{value:0}}},or={basic:{uniforms:Zi([We.common,We.specularmap,We.envmap,We.aomap,We.lightmap,We.fog]),vertexShader:tt.meshbasic_vert,fragmentShader:tt.meshbasic_frag},lambert:{uniforms:Zi([We.common,We.specularmap,We.envmap,We.aomap,We.lightmap,We.emissivemap,We.bumpmap,We.normalmap,We.displacementmap,We.fog,We.lights,{emissive:{value:new Re(0)}}]),vertexShader:tt.meshlambert_vert,fragmentShader:tt.meshlambert_frag},phong:{uniforms:Zi([We.common,We.specularmap,We.envmap,We.aomap,We.lightmap,We.emissivemap,We.bumpmap,We.normalmap,We.displacementmap,We.fog,We.lights,{emissive:{value:new Re(0)},specular:{value:new Re(1118481)},shininess:{value:30}}]),vertexShader:tt.meshphong_vert,fragmentShader:tt.meshphong_frag},standard:{uniforms:Zi([We.common,We.envmap,We.aomap,We.lightmap,We.emissivemap,We.bumpmap,We.normalmap,We.displacementmap,We.roughnessmap,We.metalnessmap,We.fog,We.lights,{emissive:{value:new Re(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:tt.meshphysical_vert,fragmentShader:tt.meshphysical_frag},toon:{uniforms:Zi([We.common,We.aomap,We.lightmap,We.emissivemap,We.bumpmap,We.normalmap,We.displacementmap,We.gradientmap,We.fog,We.lights,{emissive:{value:new Re(0)}}]),vertexShader:tt.meshtoon_vert,fragmentShader:tt.meshtoon_frag},matcap:{uniforms:Zi([We.common,We.bumpmap,We.normalmap,We.displacementmap,We.fog,{matcap:{value:null}}]),vertexShader:tt.meshmatcap_vert,fragmentShader:tt.meshmatcap_frag},points:{uniforms:Zi([We.points,We.fog]),vertexShader:tt.points_vert,fragmentShader:tt.points_frag},dashed:{uniforms:Zi([We.common,We.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:tt.linedashed_vert,fragmentShader:tt.linedashed_frag},depth:{uniforms:Zi([We.common,We.displacementmap]),vertexShader:tt.depth_vert,fragmentShader:tt.depth_frag},normal:{uniforms:Zi([We.common,We.bumpmap,We.normalmap,We.displacementmap,{opacity:{value:1}}]),vertexShader:tt.meshnormal_vert,fragmentShader:tt.meshnormal_frag},sprite:{uniforms:Zi([We.sprite,We.fog]),vertexShader:tt.sprite_vert,fragmentShader:tt.sprite_frag},background:{uniforms:{uvTransform:{value:new xt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:tt.background_vert,fragmentShader:tt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:tt.backgroundCube_vert,fragmentShader:tt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:tt.cube_vert,fragmentShader:tt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:tt.equirect_vert,fragmentShader:tt.equirect_frag},distanceRGBA:{uniforms:Zi([We.common,We.displacementmap,{referencePosition:{value:new H},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:tt.distanceRGBA_vert,fragmentShader:tt.distanceRGBA_frag},shadow:{uniforms:Zi([We.lights,We.fog,{color:{value:new Re(0)},opacity:{value:1}}]),vertexShader:tt.shadow_vert,fragmentShader:tt.shadow_frag}};or.physical={uniforms:Zi([or.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new xt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new xt},clearcoatNormalScale:{value:new ne(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new xt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new xt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new xt},sheen:{value:0},sheenColor:{value:new Re(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new xt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new xt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new xt},transmissionSamplerSize:{value:new ne},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new xt},attenuationDistance:{value:0},attenuationColor:{value:new Re(0)},specularColor:{value:new Re(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new xt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new xt}}]),vertexShader:tt.meshphysical_vert,fragmentShader:tt.meshphysical_frag};const wd={r:0,b:0,g:0};function bF(n,e,t,i,s,r,o){const a=new Re(0);let l=r===!0?0:1,c,u,C=null,d=0,h=null;function f(y,A){let b=!1,m=A.isScene===!0?A.background:null;switch(m&&m.isTexture&&(m=(A.backgroundBlurriness>0?t:e).get(m)),m===null?v(a,l):m&&m.isColor&&(v(m,1),b=!0),n.xr.getEnvironmentBlendMode()){case"opaque":b=!0;break;case"additive":i.buffers.color.setClear(0,0,0,1,o),b=!0;break;case"alpha-blend":i.buffers.color.setClear(0,0,0,0,o),b=!0;break}(n.autoClear||b)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),m&&(m.isCubeTexture||m.mapping===oc)?(u===void 0&&(u=new Tn(new Aa(1,1,1),new Zt({name:"BackgroundCubeMaterial",uniforms:$g(or.backgroundCube.uniforms),vertexShader:or.backgroundCube.vertexShader,fragmentShader:or.backgroundCube.fragmentShader,side:Ln,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(x,R,M){this.matrixWorld.copyPosition(M.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),s.update(u)),u.material.uniforms.envMap.value=m,u.material.uniforms.flipEnvMap.value=m.isCubeTexture&&m.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=A.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,u.material.toneMapped=m.colorSpace!==ft,(C!==m||d!==m.version||h!==n.toneMapping)&&(u.material.needsUpdate=!0,C=m,d=m.version,h=n.toneMapping),u.layers.enableAll(),y.unshift(u,u.geometry,u.material,0,0,null)):m&&m.isTexture&&(c===void 0&&(c=new Tn(new vl(2,2),new Zt({name:"BackgroundMaterial",uniforms:$g(or.background.uniforms),vertexShader:or.background.vertexShader,fragmentShader:or.background.fragmentShader,side:Hr,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),s.update(c)),c.material.uniforms.t2D.value=m,c.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,c.material.toneMapped=m.colorSpace!==ft,m.matrixAutoUpdate===!0&&m.updateMatrix(),c.material.uniforms.uvTransform.value.copy(m.matrix),(C!==m||d!==m.version||h!==n.toneMapping)&&(c.material.needsUpdate=!0,C=m,d=m.version,h=n.toneMapping),c.layers.enableAll(),y.unshift(c,c.geometry,c.material,0,0,null))}function v(y,A){y.getRGB(wd,G1(n)),i.buffers.color.setClear(wd.r,wd.g,wd.b,A,o)}return{getClearColor:function(){return a},setClearColor:function(y,A=1){a.set(y),l=A,v(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(y){l=y,v(a,l)},render:f}}function vF(n,e,t,i){const s=n.getParameter(n.MAX_VERTEX_ATTRIBS),r=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||r!==null,a={},l=y(null);let c=l,u=!1;function C($,te,Ce,le,L){let _=!1;if(o){const U=v(le,Ce,te);c!==U&&(c=U,h(c.object)),_=A($,le,Ce,L),_&&b($,le,Ce,L)}else{const U=te.wireframe===!0;(c.geometry!==le.id||c.program!==Ce.id||c.wireframe!==U)&&(c.geometry=le.id,c.program=Ce.id,c.wireframe=U,_=!0)}L!==null&&t.update(L,n.ELEMENT_ARRAY_BUFFER),(_||u)&&(u=!1,M($,te,Ce,le),L!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,t.get(L).buffer))}function d(){return i.isWebGL2?n.createVertexArray():r.createVertexArrayOES()}function h($){return i.isWebGL2?n.bindVertexArray($):r.bindVertexArrayOES($)}function f($){return i.isWebGL2?n.deleteVertexArray($):r.deleteVertexArrayOES($)}function v($,te,Ce){const le=Ce.wireframe===!0;let L=a[$.id];L===void 0&&(L={},a[$.id]=L);let _=L[te.id];_===void 0&&(_={},L[te.id]=_);let U=_[le];return U===void 0&&(U=y(d()),_[le]=U),U}function y($){const te=[],Ce=[],le=[];for(let L=0;L=0){const re=L[se];let ve=_[se];if(ve===void 0&&(se==="instanceMatrix"&&$.instanceMatrix&&(ve=$.instanceMatrix),se==="instanceColor"&&$.instanceColor&&(ve=$.instanceColor)),re===void 0||re.attribute!==ve||ve&&re.data!==ve.data)return!0;U++}return c.attributesNum!==U||c.index!==le}function b($,te,Ce,le){const L={},_=te.attributes;let U=0;const ce=Ce.getAttributes();for(const se in ce)if(ce[se].location>=0){let re=_[se];re===void 0&&(se==="instanceMatrix"&&$.instanceMatrix&&(re=$.instanceMatrix),se==="instanceColor"&&$.instanceColor&&(re=$.instanceColor));const ve={};ve.attribute=re,re&&re.data&&(ve.data=re.data),L[se]=ve,U++}c.attributes=L,c.attributesNum=U,c.index=le}function m(){const $=c.newAttributes;for(let te=0,Ce=$.length;te=0){let ee=L[ce];if(ee===void 0&&(ce==="instanceMatrix"&&$.instanceMatrix&&(ee=$.instanceMatrix),ce==="instanceColor"&&$.instanceColor&&(ee=$.instanceColor)),ee!==void 0){const re=ee.normalized,ve=ee.itemSize,ye=t.get(ee);if(ye===void 0)continue;const P=ye.buffer,nt=ye.type,lt=ye.bytesPerElement;if(ee.isInterleavedBufferAttribute){const Se=ee.data,Xe=Se.stride,me=ee.offset;if(Se.isInstancedInterleavedBuffer){for(let ue=0;ue0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";R="mediump"}return R==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&n.constructor.name==="WebGL2RenderingContext";let a=t.precision!==void 0?t.precision:"highp";const l=r(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const c=o||e.has("WEBGL_draw_buffers"),u=t.logarithmicDepthBuffer===!0,C=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),d=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),h=n.getParameter(n.MAX_TEXTURE_SIZE),f=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),v=n.getParameter(n.MAX_VERTEX_ATTRIBS),y=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),A=n.getParameter(n.MAX_VARYING_VECTORS),b=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),m=d>0,B=o||e.has("OES_texture_float"),S=m&&B,x=o?n.getParameter(n.MAX_SAMPLES):0;return{isWebGL2:o,drawBuffers:c,getMaxAnisotropy:s,getMaxPrecision:r,precision:a,logarithmicDepthBuffer:u,maxTextures:C,maxVertexTextures:d,maxTextureSize:h,maxCubemapSize:f,maxAttributes:v,maxVertexUniforms:y,maxVaryings:A,maxFragmentUniforms:b,vertexTextures:m,floatFragmentTextures:B,floatVertexTextures:S,maxSamples:x}}function BF(n){const e=this;let t=null,i=0,s=!1,r=!1;const o=new To,a=new xt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(C,d){const h=C.length!==0||d||i!==0||s;return s=d,i=C.length,h},this.beginShadows=function(){r=!0,u(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(C,d){t=u(C,d,0)},this.setState=function(C,d,h){const f=C.clippingPlanes,v=C.clipIntersection,y=C.clipShadows,A=n.get(C);if(!s||f===null||f.length===0||r&&!y)r?u(null):c();else{const b=r?0:i,m=b*4;let B=A.clippingState||null;l.value=B,B=u(f,d,m,h);for(let S=0;S!==m;++S)B[S]=t[S];A.clippingState=B,this.numIntersection=v?this.numPlanes:0,this.numPlanes+=b}};function c(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function u(C,d,h,f){const v=C!==null?C.length:0;let y=null;if(v!==0){if(y=l.value,f!==!0||y===null){const A=h+v*4,b=d.matrixWorldInverse;a.getNormalMatrix(b),(y===null||y.length0){const c=new NA(l.height/2);return c.fromEquirectangularTexture(n,o),e.set(o,c),o.addEventListener("dispose",s),t(c.texture,o.mapping)}else return null}}return o}function s(o){const a=o.target;a.removeEventListener("dispose",s);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function r(){e=new WeakMap}return{get:i,dispose:r}}class lc extends ac{constructor(e=-1,t=1,i=1,s=-1,r=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=s,this.near=r,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,s,r,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=s,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,s=(this.top+this.bottom)/2;let r=i-e,o=i+e,a=s+t,l=s-t;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=c*this.view.offsetX,o=r+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(r,o,a,l,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const xg=4,w2=[.125,.215,.35,.446,.526,.582],ka=20,Qf=new lc,S2=new Re;let jf=null;const La=(1+Math.sqrt(5))/2,ig=1/La,x2=[new H(1,1,1),new H(-1,1,1),new H(1,1,-1),new H(-1,1,-1),new H(0,La,ig),new H(0,La,-ig),new H(ig,0,La),new H(-ig,0,La),new H(La,ig,0),new H(-La,ig,0)];class aA{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,s=100){jf=this._renderer.getRenderTarget(),this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(e,i,s,r),t>0&&this._blur(r,0,0,t),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=V2(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=W2(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?m:0,m,m),u.setRenderTarget(s),v&&u.render(f,a),u.render(e,a)}f.geometry.dispose(),f.material.dispose(),u.toneMapping=d,u.autoClear=C,e.background=y}_textureToCubeUV(e,t){const i=this._renderer,s=e.mapping===oa||e.mapping===aa;s?(this._cubemapMaterial===null&&(this._cubemapMaterial=V2()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=W2());const r=s?this._cubemapMaterial:this._equirectMaterial,o=new Tn(this._lodPlanes[0],r),a=r.uniforms;a.envMap.value=e;const l=this._cubeSize;Sd(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,Qf)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let s=1;ska&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${y} samples when the maximum is set to ${ka}`);const A=[];let b=0;for(let R=0;Rm-xg?s-m+xg:0),x=4*(this._cubeSize-B);Sd(t,S,x,3*B,2*B),l.setRenderTarget(t),l.render(C,Qf)}}function wF(n){const e=[],t=[],i=[];let s=n;const r=n-xg+1+w2.length;for(let o=0;on-xg?l=w2[o-n+xg-1]:o===0&&(l=0),i.push(l);const c=1/(a-2),u=-c,C=1+c,d=[u,u,C,u,C,C,u,u,C,C,u,C],h=6,f=6,v=3,y=2,A=1,b=new Float32Array(v*f*h),m=new Float32Array(y*f*h),B=new Float32Array(A*f*h);for(let x=0;x2?0:-1,Z=[R,M,0,R+2/3,M,0,R+2/3,M+1,0,R,M,0,R+2/3,M+1,0,R,M+1,0];b.set(Z,v*f*x),m.set(d,y*f*x);const V=[x,x,x,x,x,x];B.set(V,A*f*x)}const S=new mt;S.setAttribute("position",new Et(b,v)),S.setAttribute("uv",new Et(m,y)),S.setAttribute("faceIndex",new Et(B,A)),e.push(S),s>xg&&s--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function R2(n,e,t){const i=new Rt(n,e,t);return i.texture.mapping=oc,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function Sd(n,e,t,i,s){n.viewport.set(e,t,i,s),n.scissor.set(e,t,i,s)}function SF(n,e,t){const i=new Float32Array(ka),s=new H(0,1,0);return new Zt({name:"SphericalGaussianBlur",defines:{n:ka,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:s}},vertexShader:Yv(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + uniform int samples; + uniform float weights[ n ]; + uniform bool latitudinal; + uniform float dTheta; + uniform float mipInt; + uniform vec3 poleAxis; + + #define ENVMAP_TYPE_CUBE_UV + #include + + vec3 getSample( float theta, vec3 axis ) { + + float cosTheta = cos( theta ); + // Rodrigues' axis-angle rotation + vec3 sampleDirection = vOutputDirection * cosTheta + + cross( axis, vOutputDirection ) * sin( theta ) + + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); + + return bilinearCubeUV( envMap, sampleDirection, mipInt ); + + } + + void main() { + + vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); + + if ( all( equal( axis, vec3( 0.0 ) ) ) ) { + + axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); + + } + + axis = normalize( axis ); + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); + + for ( int i = 1; i < n; i++ ) { + + if ( i >= samples ) { + + break; + + } + + float theta = dTheta * float( i ); + gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); + gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); + + } + + } + `,blending:en,depthTest:!1,depthWrite:!1})}function W2(){return new Zt({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Yv(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + + #include + + void main() { + + vec3 outputDirection = normalize( vOutputDirection ); + vec2 uv = equirectUv( outputDirection ); + + gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); + + } + `,blending:en,depthTest:!1,depthWrite:!1})}function V2(){return new Zt({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Yv(),fragmentShader:` + + precision mediump float; + precision mediump int; + + uniform float flipEnvMap; + + varying vec3 vOutputDirection; + + uniform samplerCube envMap; + + void main() { + + gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); + + } + `,blending:en,depthTest:!1,depthWrite:!1})}function Yv(){return` + + precision mediump float; + precision mediump int; + + attribute float faceIndex; + + varying vec3 vOutputDirection; + + // RH coordinate system; PMREM face-indexing convention + vec3 getDirection( vec2 uv, float face ) { + + uv = 2.0 * uv - 1.0; + + vec3 direction = vec3( uv, 1.0 ); + + if ( face == 0.0 ) { + + direction = direction.zyx; // ( 1, v, u ) pos x + + } else if ( face == 1.0 ) { + + direction = direction.xzy; + direction.xz *= -1.0; // ( -u, 1, -v ) pos y + + } else if ( face == 2.0 ) { + + direction.x *= -1.0; // ( -u, v, 1 ) pos z + + } else if ( face == 3.0 ) { + + direction = direction.zyx; + direction.xz *= -1.0; // ( -1, v, -u ) neg x + + } else if ( face == 4.0 ) { + + direction = direction.xzy; + direction.xy *= -1.0; // ( -u, -1, v ) neg y + + } else if ( face == 5.0 ) { + + direction.z *= -1.0; // ( u, v, -1 ) neg z + + } + + return direction; + + } + + void main() { + + vOutputDirection = getDirection( uv, faceIndex ); + gl_Position = vec4( position, 1.0 ); + + } + `}function xF(n){let e=new WeakMap,t=null;function i(a){if(a&&a.isTexture){const l=a.mapping,c=l===ou||l===au,u=l===oa||l===aa;if(c||u)if(a.isRenderTargetTexture&&a.needsPMREMUpdate===!0){a.needsPMREMUpdate=!1;let C=e.get(a);return t===null&&(t=new aA(n)),C=c?t.fromEquirectangular(a,C):t.fromCubemap(a,C),e.set(a,C),C.texture}else{if(e.has(a))return e.get(a).texture;{const C=a.image;if(c&&C&&C.height>0||u&&C&&s(C)){t===null&&(t=new aA(n));const d=c?t.fromEquirectangular(a):t.fromCubemap(a);return e.set(a,d),a.addEventListener("dispose",r),d.texture}else return null}}}return a}function s(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(N=Math.ceil(V/e.maxTextureSize),V=e.maxTextureSize);const k=new Float32Array(V*N*4*v),E=new MA(k,V,N,v);E.type=Zn,E.needsUpdate=!0;const $=Z*4;for(let Ce=0;Ce0)return n;const s=e*t;let r=M2[s];if(r===void 0&&(r=new Float32Array(s),M2[s]=r),e!==0){i.toArray(r,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(r,a)}return r}function Dn(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t":" "} ${a}: ${t[o]}`)}return i.join(` +`)}function R9(n){switch(n){case ur:return["Linear","( value )"];case ft:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",n),["Linear","( value )"]}}function z2(n,e,t){const i=n.getShaderParameter(e,n.COMPILE_STATUS),s=n.getShaderInfoLog(e).trim();if(i&&s==="")return"";const r=/ERROR: 0:(\d+)/.exec(s);if(r){const o=parseInt(r[1]);return t.toUpperCase()+` + +`+s+` + +`+x9(n.getShaderSource(e),o)}else return s}function W9(n,e){const t=R9(e);return"vec4 "+n+"( vec4 value ) { return LinearTo"+t[0]+t[1]+"; }"}function V9(n,e){let t;switch(e){case OR:t="Linear";break;case QR:t="Reinhard";break;case jR:t="OptimizedCineon";break;case Bv:t="ACESFilmic";break;case qR:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+n+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function M9(n){return[n.extensionDerivatives||n.envMapCubeUVHeight||n.bumpMap||n.normalMapTangentSpace||n.clearcoatNormalMap||n.flatShading||n.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(n.extensionFragDepth||n.logarithmicDepthBuffer)&&n.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",n.extensionDrawBuffers&&n.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(n.extensionShaderTextureLOD||n.envMap||n.transmission)&&n.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(mI).join(` +`)}function N9(n){const e=[];for(const t in n){const i=n[t];i!==!1&&e.push("#define "+t+" "+i)}return e.join(` +`)}function H9(n,e){const t={},i=n.getProgramParameter(e,n.ACTIVE_ATTRIBUTES);for(let s=0;s/gm;function eb(n){return n.replace(X9,Y9)}function Y9(n,e){const t=tt[e];if(t===void 0)throw new Error("Can not resolve #include <"+e+">");return eb(t)}const F9=/#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 E2(n){return n.replace(F9,K9)}function K9(n,e,t,i){let s="";for(let r=parseInt(e);r0&&(y+=` +`),A=[h,f].filter(mI).join(` +`),A.length>0&&(A+=` +`)):(y=[k2(t),"#define SHADER_NAME "+t.shaderName,f,t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors&&t.isWebGL2?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.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(mI).join(` +`),A=[h,k2(t),"#define SHADER_NAME "+t.shaderName,f,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+c:"",t.envMap?"#define "+u:"",t.envMap?"#define "+C:"",d?"#define CUBEUV_TEXEL_WIDTH "+d.texelWidth:"",d?"#define CUBEUV_TEXEL_HEIGHT "+d.texelHeight:"",d?"#define CUBEUV_MAX_MIP "+d.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==gr?"#define TONE_MAPPING":"",t.toneMapping!==gr?tt.tonemapping_pars_fragment:"",t.toneMapping!==gr?V9("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",tt.encodings_pars_fragment,W9("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` +`].filter(mI).join(` +`)),o=eb(o),o=L2(o,t),o=T2(o,t),a=eb(a),a=L2(a,t),a=T2(a,t),o=E2(o),a=E2(a),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(b=`#version 300 es +`,y=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` +`)+` +`+y,A=["#define varying in",t.glslVersion===rA?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===rA?"":"#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(` +`)+` +`+A);const m=b+y+o,B=b+A+a,S=K2(s,s.VERTEX_SHADER,m),x=K2(s,s.FRAGMENT_SHADER,B);if(s.attachShader(v,S),s.attachShader(v,x),t.index0AttributeName!==void 0?s.bindAttribLocation(v,0,t.index0AttributeName):t.morphTargets===!0&&s.bindAttribLocation(v,0,"position"),s.linkProgram(v),n.debug.checkShaderErrors){const Z=s.getProgramInfoLog(v).trim(),V=s.getShaderInfoLog(S).trim(),N=s.getShaderInfoLog(x).trim();let k=!0,E=!0;if(s.getProgramParameter(v,s.LINK_STATUS)===!1)if(k=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(s,v,S,x);else{const $=z2(s,S,"vertex"),te=z2(s,x,"fragment");console.error("THREE.WebGLProgram: Shader Error "+s.getError()+" - VALIDATE_STATUS "+s.getProgramParameter(v,s.VALIDATE_STATUS)+` + +Program Info Log: `+Z+` +`+$+` +`+te)}else Z!==""?console.warn("THREE.WebGLProgram: Program Info Log:",Z):(V===""||N==="")&&(E=!1);E&&(this.diagnostics={runnable:k,programLog:Z,vertexShader:{log:V,prefix:y},fragmentShader:{log:N,prefix:A}})}s.deleteShader(S),s.deleteShader(x);let R;this.getUniforms=function(){return R===void 0&&(R=new Rh(s,v)),R};let M;return this.getAttributes=function(){return M===void 0&&(M=H9(s,v)),M},this.destroy=function(){i.releaseStatesOfProgram(this),s.deleteProgram(v),this.program=void 0},this.name=t.shaderName,this.id=S9++,this.cacheKey=e,this.usedTimes=1,this.program=v,this.vertexShader=S,this.fragmentShader=x,this}let U9=0;class P9{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,s=this._getShaderStage(t),r=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(s)===!1&&(o.add(s),s.usedTimes++),o.has(r)===!1&&(o.add(r),r.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new _9(e),t.set(e,i)),i}}class _9{constructor(e){this.id=U9++,this.code=e,this.usedTimes=0}}function J9(n,e,t,i,s,r,o){const a=new al,l=new P9,c=[],u=s.isWebGL2,C=s.logarithmicDepthBuffer,d=s.vertexTextures;let h=s.precision;const f={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function v(Z){return Z===1?"uv1":Z===2?"uv2":Z===3?"uv3":"uv"}function y(Z,V,N,k,E){const $=k.fog,te=E.geometry,Ce=Z.isMeshStandardMaterial?k.environment:null,le=(Z.isMeshStandardMaterial?t:e).get(Z.envMap||Ce),L=le&&le.mapping===oc?le.image.height:null,_=f[Z.type];Z.precision!==null&&(h=s.getMaxPrecision(Z.precision),h!==Z.precision&&console.warn("THREE.WebGLProgram.getParameters:",Z.precision,"not supported, using",h,"instead."));const U=te.morphAttributes.position||te.morphAttributes.normal||te.morphAttributes.color,ce=U!==void 0?U.length:0;let se=0;te.morphAttributes.position!==void 0&&(se=1),te.morphAttributes.normal!==void 0&&(se=2),te.morphAttributes.color!==void 0&&(se=3);let ee,re,ve,ye;if(_){const kt=or[_];ee=kt.vertexShader,re=kt.fragmentShader}else ee=Z.vertexShader,re=Z.fragmentShader,l.update(Z),ve=l.getVertexShaderID(Z),ye=l.getFragmentShaderID(Z);const P=n.getRenderTarget(),nt=E.isInstancedMesh===!0,lt=!!Z.map,Se=!!Z.matcap,Xe=!!le,me=!!Z.aoMap,ue=!!Z.lightMap,be=!!Z.bumpMap,Le=!!Z.normalMap,Ve=!!Z.displacementMap,st=!!Z.emissiveMap,rt=!!Z.metalnessMap,qe=!!Z.roughnessMap,ut=Z.clearcoat>0,Nt=Z.iridescence>0,T=Z.sheen>0,X=Z.transmission>0,ge=ut&&!!Z.clearcoatMap,Ge=ut&&!!Z.clearcoatNormalMap,Ze=ut&&!!Z.clearcoatRoughnessMap,Me=Nt&&!!Z.iridescenceMap,gt=Nt&&!!Z.iridescenceThicknessMap,Ke=T&&!!Z.sheenColorMap,pe=T&&!!Z.sheenRoughnessMap,De=!!Z.specularMap,$e=!!Z.specularColorMap,ot=!!Z.specularIntensityMap,Te=X&&!!Z.transmissionMap,Oe=X&&!!Z.thicknessMap,Wt=!!Z.gradientMap,Tt=!!Z.alphaMap,un=Z.alphaTest>0,J=!!Z.extensions,he=!!te.attributes.uv1,Be=!!te.attributes.uv2,Ye=!!te.attributes.uv3;return{isWebGL2:u,shaderID:_,shaderName:Z.type,vertexShader:ee,fragmentShader:re,defines:Z.defines,customVertexShaderID:ve,customFragmentShaderID:ye,isRawShaderMaterial:Z.isRawShaderMaterial===!0,glslVersion:Z.glslVersion,precision:h,instancing:nt,instancingColor:nt&&E.instanceColor!==null,supportsVertexTextures:d,outputColorSpace:P===null?n.outputColorSpace:P.isXRRenderTarget===!0?P.texture.colorSpace:ur,map:lt,matcap:Se,envMap:Xe,envMapMode:Xe&&le.mapping,envMapCubeUVHeight:L,aoMap:me,lightMap:ue,bumpMap:be,normalMap:Le,displacementMap:d&&Ve,emissiveMap:st,normalMapObjectSpace:Le&&Z.normalMapType===d1,normalMapTangentSpace:Le&&Z.normalMapType===mo,metalnessMap:rt,roughnessMap:qe,clearcoat:ut,clearcoatMap:ge,clearcoatNormalMap:Ge,clearcoatRoughnessMap:Ze,iridescence:Nt,iridescenceMap:Me,iridescenceThicknessMap:gt,sheen:T,sheenColorMap:Ke,sheenRoughnessMap:pe,specularMap:De,specularColorMap:$e,specularIntensityMap:ot,transmission:X,transmissionMap:Te,thicknessMap:Oe,gradientMap:Wt,opaque:Z.transparent===!1&&Z.blending===sl,alphaMap:Tt,alphaTest:un,combine:Z.combine,mapUv:lt&&v(Z.map.channel),aoMapUv:me&&v(Z.aoMap.channel),lightMapUv:ue&&v(Z.lightMap.channel),bumpMapUv:be&&v(Z.bumpMap.channel),normalMapUv:Le&&v(Z.normalMap.channel),displacementMapUv:Ve&&v(Z.displacementMap.channel),emissiveMapUv:st&&v(Z.emissiveMap.channel),metalnessMapUv:rt&&v(Z.metalnessMap.channel),roughnessMapUv:qe&&v(Z.roughnessMap.channel),clearcoatMapUv:ge&&v(Z.clearcoatMap.channel),clearcoatNormalMapUv:Ge&&v(Z.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ze&&v(Z.clearcoatRoughnessMap.channel),iridescenceMapUv:Me&&v(Z.iridescenceMap.channel),iridescenceThicknessMapUv:gt&&v(Z.iridescenceThicknessMap.channel),sheenColorMapUv:Ke&&v(Z.sheenColorMap.channel),sheenRoughnessMapUv:pe&&v(Z.sheenRoughnessMap.channel),specularMapUv:De&&v(Z.specularMap.channel),specularColorMapUv:$e&&v(Z.specularColorMap.channel),specularIntensityMapUv:ot&&v(Z.specularIntensityMap.channel),transmissionMapUv:Te&&v(Z.transmissionMap.channel),thicknessMapUv:Oe&&v(Z.thicknessMap.channel),alphaMapUv:Tt&&v(Z.alphaMap.channel),vertexTangents:Le&&!!te.attributes.tangent,vertexColors:Z.vertexColors,vertexAlphas:Z.vertexColors===!0&&!!te.attributes.color&&te.attributes.color.itemSize===4,vertexUv1s:he,vertexUv2s:Be,vertexUv3s:Ye,pointsUvs:E.isPoints===!0&&!!te.attributes.uv&&(lt||Tt),fog:!!$,useFog:Z.fog===!0,fogExp2:$&&$.isFogExp2,flatShading:Z.flatShading===!0,sizeAttenuation:Z.sizeAttenuation===!0,logarithmicDepthBuffer:C,skinning:E.isSkinnedMesh===!0,morphTargets:te.morphAttributes.position!==void 0,morphNormals:te.morphAttributes.normal!==void 0,morphColors:te.morphAttributes.color!==void 0,morphTargetsCount:ce,morphTextureStride:se,numDirLights:V.directional.length,numPointLights:V.point.length,numSpotLights:V.spot.length,numSpotLightMaps:V.spotLightMap.length,numRectAreaLights:V.rectArea.length,numHemiLights:V.hemi.length,numDirLightShadows:V.directionalShadowMap.length,numPointLightShadows:V.pointShadowMap.length,numSpotLightShadows:V.spotShadowMap.length,numSpotLightShadowsWithMaps:V.numSpotLightShadowsWithMaps,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:Z.dithering,shadowMapEnabled:n.shadowMap.enabled&&N.length>0,shadowMapType:n.shadowMap.type,toneMapping:Z.toneMapped?n.toneMapping:gr,useLegacyLights:n.useLegacyLights,premultipliedAlpha:Z.premultipliedAlpha,doubleSided:Z.side===Pi,flipSided:Z.side===Ln,useDepthPacking:Z.depthPacking>=0,depthPacking:Z.depthPacking||0,index0AttributeName:Z.index0AttributeName,extensionDerivatives:J&&Z.extensions.derivatives===!0,extensionFragDepth:J&&Z.extensions.fragDepth===!0,extensionDrawBuffers:J&&Z.extensions.drawBuffers===!0,extensionShaderTextureLOD:J&&Z.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:u||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||i.has("EXT_shader_texture_lod"),customProgramCacheKey:Z.customProgramCacheKey()}}function A(Z){const V=[];if(Z.shaderID?V.push(Z.shaderID):(V.push(Z.customVertexShaderID),V.push(Z.customFragmentShaderID)),Z.defines!==void 0)for(const N in Z.defines)V.push(N),V.push(Z.defines[N]);return Z.isRawShaderMaterial===!1&&(b(V,Z),m(V,Z),V.push(n.outputColorSpace)),V.push(Z.customProgramCacheKey),V.join()}function b(Z,V){Z.push(V.precision),Z.push(V.outputColorSpace),Z.push(V.envMapMode),Z.push(V.envMapCubeUVHeight),Z.push(V.mapUv),Z.push(V.alphaMapUv),Z.push(V.lightMapUv),Z.push(V.aoMapUv),Z.push(V.bumpMapUv),Z.push(V.normalMapUv),Z.push(V.displacementMapUv),Z.push(V.emissiveMapUv),Z.push(V.metalnessMapUv),Z.push(V.roughnessMapUv),Z.push(V.clearcoatMapUv),Z.push(V.clearcoatNormalMapUv),Z.push(V.clearcoatRoughnessMapUv),Z.push(V.iridescenceMapUv),Z.push(V.iridescenceThicknessMapUv),Z.push(V.sheenColorMapUv),Z.push(V.sheenRoughnessMapUv),Z.push(V.specularMapUv),Z.push(V.specularColorMapUv),Z.push(V.specularIntensityMapUv),Z.push(V.transmissionMapUv),Z.push(V.thicknessMapUv),Z.push(V.combine),Z.push(V.fogExp2),Z.push(V.sizeAttenuation),Z.push(V.morphTargetsCount),Z.push(V.morphAttributeCount),Z.push(V.numDirLights),Z.push(V.numPointLights),Z.push(V.numSpotLights),Z.push(V.numSpotLightMaps),Z.push(V.numHemiLights),Z.push(V.numRectAreaLights),Z.push(V.numDirLightShadows),Z.push(V.numPointLightShadows),Z.push(V.numSpotLightShadows),Z.push(V.numSpotLightShadowsWithMaps),Z.push(V.shadowMapType),Z.push(V.toneMapping),Z.push(V.numClippingPlanes),Z.push(V.numClipIntersection),Z.push(V.depthPacking)}function m(Z,V){a.disableAll(),V.isWebGL2&&a.enable(0),V.supportsVertexTextures&&a.enable(1),V.instancing&&a.enable(2),V.instancingColor&&a.enable(3),V.matcap&&a.enable(4),V.envMap&&a.enable(5),V.normalMapObjectSpace&&a.enable(6),V.normalMapTangentSpace&&a.enable(7),V.clearcoat&&a.enable(8),V.iridescence&&a.enable(9),V.alphaTest&&a.enable(10),V.vertexColors&&a.enable(11),V.vertexAlphas&&a.enable(12),V.vertexUv1s&&a.enable(13),V.vertexUv2s&&a.enable(14),V.vertexUv3s&&a.enable(15),V.vertexTangents&&a.enable(16),Z.push(a.mask),a.disableAll(),V.fog&&a.enable(0),V.useFog&&a.enable(1),V.flatShading&&a.enable(2),V.logarithmicDepthBuffer&&a.enable(3),V.skinning&&a.enable(4),V.morphTargets&&a.enable(5),V.morphNormals&&a.enable(6),V.morphColors&&a.enable(7),V.premultipliedAlpha&&a.enable(8),V.shadowMapEnabled&&a.enable(9),V.useLegacyLights&&a.enable(10),V.doubleSided&&a.enable(11),V.flipSided&&a.enable(12),V.useDepthPacking&&a.enable(13),V.dithering&&a.enable(14),V.transmission&&a.enable(15),V.sheen&&a.enable(16),V.opaque&&a.enable(17),V.pointsUvs&&a.enable(18),Z.push(a.mask)}function B(Z){const V=f[Z.type];let N;if(V){const k=or[V];N=B1.clone(k.uniforms)}else N=Z.uniforms;return N}function S(Z,V){let N;for(let k=0,E=c.length;k0?i.push(A):h.transparent===!0?s.push(A):t.push(A)}function l(C,d,h,f,v,y){const A=o(C,d,h,f,v,y);h.transmission>0?i.unshift(A):h.transparent===!0?s.unshift(A):t.unshift(A)}function c(C,d){t.length>1&&t.sort(C||Q9),i.length>1&&i.sort(d||D2),s.length>1&&s.sort(d||D2)}function u(){for(let C=e,d=n.length;C=r.length?(o=new U2,r.push(o)):o=r[s],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function q9(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new H,color:new Re};break;case"SpotLight":t={position:new H,direction:new H,color:new Re,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new H,color:new Re,distance:0,decay:0};break;case"HemisphereLight":t={direction:new H,skyColor:new Re,groundColor:new Re};break;case"RectAreaLight":t={color:new Re,position:new H,halfWidth:new H,halfHeight:new H};break}return n[e.id]=t,t}}}function $9(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ne};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ne};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ne,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let eK=0;function tK(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function nK(n,e){const t=new q9,i=$9(),s={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0};for(let u=0;u<9;u++)s.probe.push(new H);const r=new H,o=new Fe,a=new Fe;function l(u,C){let d=0,h=0,f=0;for(let N=0;N<9;N++)s.probe[N].set(0,0,0);let v=0,y=0,A=0,b=0,m=0,B=0,S=0,x=0,R=0,M=0;u.sort(tK);const Z=C===!0?Math.PI:1;for(let N=0,k=u.length;N0&&(e.isWebGL2||n.has("OES_texture_float_linear")===!0?(s.rectAreaLTC1=We.LTC_FLOAT_1,s.rectAreaLTC2=We.LTC_FLOAT_2):n.has("OES_texture_half_float_linear")===!0?(s.rectAreaLTC1=We.LTC_HALF_1,s.rectAreaLTC2=We.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),s.ambient[0]=d,s.ambient[1]=h,s.ambient[2]=f;const V=s.hash;(V.directionalLength!==v||V.pointLength!==y||V.spotLength!==A||V.rectAreaLength!==b||V.hemiLength!==m||V.numDirectionalShadows!==B||V.numPointShadows!==S||V.numSpotShadows!==x||V.numSpotMaps!==R)&&(s.directional.length=v,s.spot.length=A,s.rectArea.length=b,s.point.length=y,s.hemi.length=m,s.directionalShadow.length=B,s.directionalShadowMap.length=B,s.pointShadow.length=S,s.pointShadowMap.length=S,s.spotShadow.length=x,s.spotShadowMap.length=x,s.directionalShadowMatrix.length=B,s.pointShadowMatrix.length=S,s.spotLightMatrix.length=x+R-M,s.spotLightMap.length=R,s.numSpotLightShadowsWithMaps=M,V.directionalLength=v,V.pointLength=y,V.spotLength=A,V.rectAreaLength=b,V.hemiLength=m,V.numDirectionalShadows=B,V.numPointShadows=S,V.numSpotShadows=x,V.numSpotMaps=R,s.version=eK++)}function c(u,C){let d=0,h=0,f=0,v=0,y=0;const A=C.matrixWorldInverse;for(let b=0,m=u.length;b=a.length?(l=new P2(n,e),a.push(l)):l=a[o],l}function s(){t=new WeakMap}return{get:i,dispose:s}}class YA extends Pn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Xn,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class Fv extends Pn{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const sK=`void main() { + gl_Position = vec4( position, 1.0 ); +}`,rK=`uniform sampler2D shadow_pass; +uniform vec2 resolution; +uniform float radius; +#include +void main() { + const float samples = float( VSM_SAMPLES ); + float mean = 0.0; + float squared_mean = 0.0; + float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); + float uvStart = samples <= 1.0 ? 0.0 : - 1.0; + for ( float i = 0.0; i < samples; i ++ ) { + float uvOffset = uvStart + i * uvStride; + #ifdef HORIZONTAL_PASS + vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); + mean += distribution.x; + squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; + #else + float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); + mean += depth; + squared_mean += depth * depth; + #endif + } + mean = mean / samples; + squared_mean = squared_mean / samples; + float std_dev = sqrt( squared_mean - mean * mean ); + gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); +}`;function oK(n,e,t){let i=new HA;const s=new ne,r=new ne,o=new Vt,a=new YA({depthPacking:Xr}),l=new Fv,c={},u=t.maxTextureSize,C={[Hr]:Ln,[Ln]:Hr,[Pi]:Pi},d=new Zt({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new ne},radius:{value:4}},vertexShader:sK,fragmentShader:rK}),h=d.clone();h.defines.HORIZONTAL_PASS=1;const f=new mt;f.setAttribute("position",new Et(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const v=new Tn(f,d),y=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=SA;let A=this.type;this.render=function(S,x,R){if(y.enabled===!1||y.autoUpdate===!1&&y.needsUpdate===!1||S.length===0)return;const M=n.getRenderTarget(),Z=n.getActiveCubeFace(),V=n.getActiveMipmapLevel(),N=n.state;N.setBlending(en),N.buffers.color.setClear(1,1,1,1),N.buffers.depth.setTest(!0),N.setScissorTest(!1);const k=A!==ir&&this.type===ir,E=A===ir&&this.type!==ir;for(let $=0,te=S.length;$u||s.y>u)&&(s.x>u&&(r.x=Math.floor(u/L.x),s.x=r.x*L.x,le.mapSize.x=r.x),s.y>u&&(r.y=Math.floor(u/L.y),s.y=r.y*L.y,le.mapSize.y=r.y)),le.map===null||k===!0||E===!0){const U=this.type!==ir?{minFilter:pt,magFilter:pt}:{};le.map!==null&&le.map.dispose(),le.map=new Rt(s.x,s.y,U),le.map.texture.name=Ce.name+".shadowMap",le.camera.updateProjectionMatrix()}n.setRenderTarget(le.map),n.clear();const _=le.getViewportCount();for(let U=0;U<_;U++){const ce=le.getViewport(U);o.set(r.x*ce.x,r.y*ce.y,r.x*ce.z,r.y*ce.w),N.viewport(o),le.updateMatrices(Ce,U),i=le.getFrustum(),B(x,R,le.camera,Ce,this.type)}le.isPointLightShadow!==!0&&this.type===ir&&b(le,R),le.needsUpdate=!1}A=this.type,y.needsUpdate=!1,n.setRenderTarget(M,Z,V)};function b(S,x){const R=e.update(v);d.defines.VSM_SAMPLES!==S.blurSamples&&(d.defines.VSM_SAMPLES=S.blurSamples,h.defines.VSM_SAMPLES=S.blurSamples,d.needsUpdate=!0,h.needsUpdate=!0),S.mapPass===null&&(S.mapPass=new Rt(s.x,s.y)),d.uniforms.shadow_pass.value=S.map.texture,d.uniforms.resolution.value=S.mapSize,d.uniforms.radius.value=S.radius,n.setRenderTarget(S.mapPass),n.clear(),n.renderBufferDirect(x,null,R,d,v,null),h.uniforms.shadow_pass.value=S.mapPass.texture,h.uniforms.resolution.value=S.mapSize,h.uniforms.radius.value=S.radius,n.setRenderTarget(S.map),n.clear(),n.renderBufferDirect(x,null,R,h,v,null)}function m(S,x,R,M){let Z=null;const V=R.isPointLight===!0?S.customDistanceMaterial:S.customDepthMaterial;if(V!==void 0)Z=V;else if(Z=R.isPointLight===!0?l:a,n.localClippingEnabled&&x.clipShadows===!0&&Array.isArray(x.clippingPlanes)&&x.clippingPlanes.length!==0||x.displacementMap&&x.displacementScale!==0||x.alphaMap&&x.alphaTest>0||x.map&&x.alphaTest>0){const N=Z.uuid,k=x.uuid;let E=c[N];E===void 0&&(E={},c[N]=E);let $=E[k];$===void 0&&($=Z.clone(),E[k]=$),Z=$}if(Z.visible=x.visible,Z.wireframe=x.wireframe,M===ir?Z.side=x.shadowSide!==null?x.shadowSide:x.side:Z.side=x.shadowSide!==null?x.shadowSide:C[x.side],Z.alphaMap=x.alphaMap,Z.alphaTest=x.alphaTest,Z.map=x.map,Z.clipShadows=x.clipShadows,Z.clippingPlanes=x.clippingPlanes,Z.clipIntersection=x.clipIntersection,Z.displacementMap=x.displacementMap,Z.displacementScale=x.displacementScale,Z.displacementBias=x.displacementBias,Z.wireframeLinewidth=x.wireframeLinewidth,Z.linewidth=x.linewidth,R.isPointLight===!0&&Z.isMeshDistanceMaterial===!0){const N=n.properties.get(Z);N.light=R}return Z}function B(S,x,R,M,Z){if(S.visible===!1)return;if(S.layers.test(x.layers)&&(S.isMesh||S.isLine||S.isPoints)&&(S.castShadow||S.receiveShadow&&Z===ir)&&(!S.frustumCulled||i.intersectsObject(S))){S.modelViewMatrix.multiplyMatrices(R.matrixWorldInverse,S.matrixWorld);const k=e.update(S),E=S.material;if(Array.isArray(E)){const $=k.groups;for(let te=0,Ce=$.length;te=1):L.indexOf("OpenGL ES")!==-1&&(le=parseFloat(/^OpenGL ES (\d)/.exec(L)[1]),Ce=le>=2);let _=null,U={};const ce=n.getParameter(n.SCISSOR_BOX),se=n.getParameter(n.VIEWPORT),ee=new Vt().fromArray(ce),re=new Vt().fromArray(se);function ve(J,he,Be,Ye){const Ue=new Uint8Array(4),kt=n.createTexture();n.bindTexture(J,kt),n.texParameteri(J,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(J,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let Dt=0;Dt"u"?!1:/OculusBrowser/g.test(navigator.userAgent),f=new WeakMap;let v;const y=new WeakMap;let A=!1;try{A=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function b(T,X){return A?new OffscreenCanvas(T,X):Cu("canvas")}function m(T,X,ge,Ge){let Ze=1;if((T.width>Ge||T.height>Ge)&&(Ze=Ge/Math.max(T.width,T.height)),Ze<1||X===!0)if(typeof HTMLImageElement<"u"&&T instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&T instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&T instanceof ImageBitmap){const Me=X?f1:Math.floor,gt=Me(Ze*T.width),Ke=Me(Ze*T.height);v===void 0&&(v=b(gt,Ke));const pe=ge?b(gt,Ke):v;return pe.width=gt,pe.height=Ke,pe.getContext("2d").drawImage(T,0,0,gt,Ke),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+T.width+"x"+T.height+") to ("+gt+"x"+Ke+")."),pe}else return"data"in T&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+T.width+"x"+T.height+")."),T;return T}function B(T){return $0(T.width)&&$0(T.height)}function S(T){return a?!1:T.wrapS!==Kn||T.wrapT!==Kn||T.minFilter!==pt&&T.minFilter!==je}function x(T,X){return T.generateMipmaps&&X&&T.minFilter!==pt&&T.minFilter!==je}function R(T){n.generateMipmap(T)}function M(T,X,ge,Ge,Ze=!1){if(a===!1)return X;if(T!==null){if(n[T]!==void 0)return n[T];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+T+"'")}let Me=X;return X===n.RED&&(ge===n.FLOAT&&(Me=n.R32F),ge===n.HALF_FLOAT&&(Me=n.R16F),ge===n.UNSIGNED_BYTE&&(Me=n.R8)),X===n.RG&&(ge===n.FLOAT&&(Me=n.RG32F),ge===n.HALF_FLOAT&&(Me=n.RG16F),ge===n.UNSIGNED_BYTE&&(Me=n.RG8)),X===n.RGBA&&(ge===n.FLOAT&&(Me=n.RGBA32F),ge===n.HALF_FLOAT&&(Me=n.RGBA16F),ge===n.UNSIGNED_BYTE&&(Me=Ge===ft&&Ze===!1?n.SRGB8_ALPHA8:n.RGBA8),ge===n.UNSIGNED_SHORT_4_4_4_4&&(Me=n.RGBA4),ge===n.UNSIGNED_SHORT_5_5_5_1&&(Me=n.RGB5_A1)),(Me===n.R16F||Me===n.R32F||Me===n.RG16F||Me===n.RG32F||Me===n.RGBA16F||Me===n.RGBA32F)&&e.get("EXT_color_buffer_float"),Me}function Z(T,X,ge){return x(T,ge)===!0||T.isFramebufferTexture&&T.minFilter!==pt&&T.minFilter!==je?Math.log2(Math.max(X.width,X.height))+1:T.mipmaps!==void 0&&T.mipmaps.length>0?T.mipmaps.length:T.isCompressedTexture&&Array.isArray(T.image)?X.mipmaps.length:1}function V(T){return T===pt||T===sA||T===MI?n.NEAREST:n.LINEAR}function N(T){const X=T.target;X.removeEventListener("dispose",N),E(X),X.isVideoTexture&&f.delete(X)}function k(T){const X=T.target;X.removeEventListener("dispose",k),te(X)}function E(T){const X=i.get(T);if(X.__webglInit===void 0)return;const ge=T.source,Ge=y.get(ge);if(Ge){const Ze=Ge[X.__cacheKey];Ze.usedTimes--,Ze.usedTimes===0&&$(T),Object.keys(Ge).length===0&&y.delete(ge)}i.remove(T)}function $(T){const X=i.get(T);n.deleteTexture(X.__webglTexture);const ge=T.source,Ge=y.get(ge);delete Ge[X.__cacheKey],o.memory.textures--}function te(T){const X=T.texture,ge=i.get(T),Ge=i.get(X);if(Ge.__webglTexture!==void 0&&(n.deleteTexture(Ge.__webglTexture),o.memory.textures--),T.depthTexture&&T.depthTexture.dispose(),T.isWebGLCubeRenderTarget)for(let Ze=0;Ze<6;Ze++)n.deleteFramebuffer(ge.__webglFramebuffer[Ze]),ge.__webglDepthbuffer&&n.deleteRenderbuffer(ge.__webglDepthbuffer[Ze]);else{if(n.deleteFramebuffer(ge.__webglFramebuffer),ge.__webglDepthbuffer&&n.deleteRenderbuffer(ge.__webglDepthbuffer),ge.__webglMultisampledFramebuffer&&n.deleteFramebuffer(ge.__webglMultisampledFramebuffer),ge.__webglColorRenderbuffer)for(let Ze=0;Ze=l&&console.warn("THREE.WebGLTextures: Trying to use "+T+" texture units while this GPU supports only "+l),Ce+=1,T}function _(T){const X=[];return X.push(T.wrapS),X.push(T.wrapT),X.push(T.wrapR||0),X.push(T.magFilter),X.push(T.minFilter),X.push(T.anisotropy),X.push(T.internalFormat),X.push(T.format),X.push(T.type),X.push(T.generateMipmaps),X.push(T.premultiplyAlpha),X.push(T.flipY),X.push(T.unpackAlignment),X.push(T.colorSpace),X.join()}function U(T,X){const ge=i.get(T);if(T.isVideoTexture&&ut(T),T.isRenderTargetTexture===!1&&T.version>0&&ge.__version!==T.version){const Ge=T.image;if(Ge===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Ge.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{nt(ge,T,X);return}}t.bindTexture(n.TEXTURE_2D,ge.__webglTexture,n.TEXTURE0+X)}function ce(T,X){const ge=i.get(T);if(T.version>0&&ge.__version!==T.version){nt(ge,T,X);return}t.bindTexture(n.TEXTURE_2D_ARRAY,ge.__webglTexture,n.TEXTURE0+X)}function se(T,X){const ge=i.get(T);if(T.version>0&&ge.__version!==T.version){nt(ge,T,X);return}t.bindTexture(n.TEXTURE_3D,ge.__webglTexture,n.TEXTURE0+X)}function ee(T,X){const ge=i.get(T);if(T.version>0&&ge.__version!==T.version){lt(ge,T,X);return}t.bindTexture(n.TEXTURE_CUBE_MAP,ge.__webglTexture,n.TEXTURE0+X)}const re={[hs]:n.REPEAT,[Kn]:n.CLAMP_TO_EDGE,[lu]:n.MIRRORED_REPEAT},ve={[pt]:n.NEAREST,[sA]:n.NEAREST_MIPMAP_NEAREST,[MI]:n.NEAREST_MIPMAP_LINEAR,[je]:n.LINEAR,[Zv]:n.LINEAR_MIPMAP_NEAREST,[la]:n.LINEAR_MIPMAP_LINEAR};function ye(T,X,ge){if(ge?(n.texParameteri(T,n.TEXTURE_WRAP_S,re[X.wrapS]),n.texParameteri(T,n.TEXTURE_WRAP_T,re[X.wrapT]),(T===n.TEXTURE_3D||T===n.TEXTURE_2D_ARRAY)&&n.texParameteri(T,n.TEXTURE_WRAP_R,re[X.wrapR]),n.texParameteri(T,n.TEXTURE_MAG_FILTER,ve[X.magFilter]),n.texParameteri(T,n.TEXTURE_MIN_FILTER,ve[X.minFilter])):(n.texParameteri(T,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(T,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),(T===n.TEXTURE_3D||T===n.TEXTURE_2D_ARRAY)&&n.texParameteri(T,n.TEXTURE_WRAP_R,n.CLAMP_TO_EDGE),(X.wrapS!==Kn||X.wrapT!==Kn)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(T,n.TEXTURE_MAG_FILTER,V(X.magFilter)),n.texParameteri(T,n.TEXTURE_MIN_FILTER,V(X.minFilter)),X.minFilter!==pt&&X.minFilter!==je&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),e.has("EXT_texture_filter_anisotropic")===!0){const Ge=e.get("EXT_texture_filter_anisotropic");if(X.magFilter===pt||X.minFilter!==MI&&X.minFilter!==la||X.type===Zn&&e.has("OES_texture_float_linear")===!1||a===!1&&X.type===us&&e.has("OES_texture_half_float_linear")===!1)return;(X.anisotropy>1||i.get(X).__currentAnisotropy)&&(n.texParameterf(T,Ge.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(X.anisotropy,s.getMaxAnisotropy())),i.get(X).__currentAnisotropy=X.anisotropy)}}function P(T,X){let ge=!1;T.__webglInit===void 0&&(T.__webglInit=!0,X.addEventListener("dispose",N));const Ge=X.source;let Ze=y.get(Ge);Ze===void 0&&(Ze={},y.set(Ge,Ze));const Me=_(X);if(Me!==T.__cacheKey){Ze[Me]===void 0&&(Ze[Me]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,ge=!0),Ze[Me].usedTimes++;const gt=Ze[T.__cacheKey];gt!==void 0&&(Ze[T.__cacheKey].usedTimes--,gt.usedTimes===0&&$(X)),T.__cacheKey=Me,T.__webglTexture=Ze[Me].texture}return ge}function nt(T,X,ge){let Ge=n.TEXTURE_2D;(X.isDataArrayTexture||X.isCompressedArrayTexture)&&(Ge=n.TEXTURE_2D_ARRAY),X.isData3DTexture&&(Ge=n.TEXTURE_3D);const Ze=P(T,X),Me=X.source;t.bindTexture(Ge,T.__webglTexture,n.TEXTURE0+ge);const gt=i.get(Me);if(Me.version!==gt.__version||Ze===!0){t.activeTexture(n.TEXTURE0+ge),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,X.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,X.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,X.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.NONE);const Ke=S(X)&&B(X.image)===!1;let pe=m(X.image,Ke,!1,u);pe=Nt(X,pe);const De=B(pe)||a,$e=r.convert(X.format,X.colorSpace);let ot=r.convert(X.type),Te=M(X.internalFormat,$e,ot,X.colorSpace);ye(Ge,X,De);let Oe;const Wt=X.mipmaps,Tt=a&&X.isVideoTexture!==!0,un=gt.__version===void 0||Ze===!0,J=Z(X,pe,De);if(X.isDepthTexture)Te=n.DEPTH_COMPONENT,a?X.type===Zn?Te=n.DEPTH_COMPONENT32F:X.type===oo?Te=n.DEPTH_COMPONENT24:X.type===ta?Te=n.DEPTH24_STENCIL8:Te=n.DEPTH_COMPONENT16:X.type===Zn&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),X.format===na&&Te===n.DEPTH_COMPONENT&&X.type!==wv&&X.type!==oo&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),X.type=oo,ot=r.convert(X.type)),X.format===ga&&Te===n.DEPTH_COMPONENT&&(Te=n.DEPTH_STENCIL,X.type!==ta&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),X.type=ta,ot=r.convert(X.type))),un&&(Tt?t.texStorage2D(n.TEXTURE_2D,1,Te,pe.width,pe.height):t.texImage2D(n.TEXTURE_2D,0,Te,pe.width,pe.height,0,$e,ot,null));else if(X.isDataTexture)if(Wt.length>0&&De){Tt&&un&&t.texStorage2D(n.TEXTURE_2D,J,Te,Wt[0].width,Wt[0].height);for(let he=0,Be=Wt.length;he>=1,Be>>=1}}else if(Wt.length>0&&De){Tt&&un&&t.texStorage2D(n.TEXTURE_2D,J,Te,Wt[0].width,Wt[0].height);for(let he=0,Be=Wt.length;he0&&un++,t.texStorage2D(n.TEXTURE_CUBE_MAP,un,Oe,pe[0].width,pe[0].height));for(let he=0;he<6;he++)if(Ke){Wt?t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,0,0,pe[he].width,pe[he].height,ot,Te,pe[he].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,Oe,pe[he].width,pe[he].height,0,ot,Te,pe[he].data);for(let Be=0;Be=n.TEXTURE_CUBE_MAP_POSITIVE_X&&Ze<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,Ge,Ze,i.get(ge).__webglTexture,0),t.bindFramebuffer(n.FRAMEBUFFER,null)}function Xe(T,X,ge){if(n.bindRenderbuffer(n.RENDERBUFFER,T),X.depthBuffer&&!X.stencilBuffer){let Ge=n.DEPTH_COMPONENT16;if(ge||qe(X)){const Ze=X.depthTexture;Ze&&Ze.isDepthTexture&&(Ze.type===Zn?Ge=n.DEPTH_COMPONENT32F:Ze.type===oo&&(Ge=n.DEPTH_COMPONENT24));const Me=rt(X);qe(X)?d.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,Me,Ge,X.width,X.height):n.renderbufferStorageMultisample(n.RENDERBUFFER,Me,Ge,X.width,X.height)}else n.renderbufferStorage(n.RENDERBUFFER,Ge,X.width,X.height);n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,T)}else if(X.depthBuffer&&X.stencilBuffer){const Ge=rt(X);ge&&qe(X)===!1?n.renderbufferStorageMultisample(n.RENDERBUFFER,Ge,n.DEPTH24_STENCIL8,X.width,X.height):qe(X)?d.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,Ge,n.DEPTH24_STENCIL8,X.width,X.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,X.width,X.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,T)}else{const Ge=X.isWebGLMultipleRenderTargets===!0?X.texture:[X.texture];for(let Ze=0;Ze0&&qe(T)===!1){const Ke=Me?X:[X];ge.__webglMultisampledFramebuffer=n.createFramebuffer(),ge.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,ge.__webglMultisampledFramebuffer);for(let pe=0;pe0&&qe(T)===!1){const X=T.isWebGLMultipleRenderTargets?T.texture:[T.texture],ge=T.width,Ge=T.height;let Ze=n.COLOR_BUFFER_BIT;const Me=[],gt=T.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,Ke=i.get(T),pe=T.isWebGLMultipleRenderTargets===!0;if(pe)for(let De=0;De0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&X.__useRenderToTexture!==!1}function ut(T){const X=o.render.frame;f.get(T)!==X&&(f.set(T,X),T.update())}function Nt(T,X){const ge=T.colorSpace,Ge=T.format,Ze=T.type;return T.isCompressedTexture===!0||T.format===oA||ge!==ur&&ge!==co&&(ge===ft?a===!1?e.has("EXT_sRGB")===!0&&Ge===In?(T.format=oA,T.minFilter=je,T.generateMipmaps=!1):X=Mv.sRGBToLinear(X):(Ge!==In||Ze!==sn)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ge)),X}this.allocateTextureUnit=L,this.resetTextureUnits=le,this.setTexture2D=U,this.setTexture2DArray=ce,this.setTexture3D=se,this.setTextureCube=ee,this.rebindTextures=be,this.setupRenderTarget=Le,this.updateRenderTargetMipmap=Ve,this.updateMultisampleRenderTarget=st,this.setupDepthRenderbuffer=ue,this.setupFrameBufferTexture=Se,this.useMultisampledRTT=qe}function W1(n,e,t){const i=t.isWebGL2;function s(r,o=co){let a;if(r===sn)return n.UNSIGNED_BYTE;if(r===n1)return n.UNSIGNED_SHORT_4_4_4_4;if(r===i1)return n.UNSIGNED_SHORT_5_5_5_1;if(r===$R)return n.BYTE;if(r===e1)return n.SHORT;if(r===wv)return n.UNSIGNED_SHORT;if(r===t1)return n.INT;if(r===oo)return n.UNSIGNED_INT;if(r===Zn)return n.FLOAT;if(r===us)return i?n.HALF_FLOAT:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(r===s1)return n.ALPHA;if(r===In)return n.RGBA;if(r===WA)return n.LUMINANCE;if(r===r1)return n.LUMINANCE_ALPHA;if(r===na)return n.DEPTH_COMPONENT;if(r===ga)return n.DEPTH_STENCIL;if(r===oA)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(r===Sv)return n.RED;if(r===o1)return n.RED_INTEGER;if(r===xv)return n.RG;if(r===a1)return n.RG_INTEGER;if(r===l1)return n.RGBA_INTEGER;if(r===yh||r===Gh||r===Bh||r===Zh)if(o===ft)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(r===yh)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(r===Gh)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(r===Bh)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(r===Zh)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(r===yh)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(r===Gh)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(r===Bh)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(r===Zh)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(r===W0||r===V0||r===M0||r===N0)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(r===W0)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(r===V0)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(r===M0)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(r===N0)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(r===g1)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(r===H0||r===X0)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(r===H0)return o===ft?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(r===X0)return o===ft?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(r===Y0||r===F0||r===K0||r===z0||r===L0||r===T0||r===E0||r===k0||r===D0||r===U0||r===P0||r===_0||r===J0||r===O0)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(r===Y0)return o===ft?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(r===F0)return o===ft?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(r===K0)return o===ft?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(r===z0)return o===ft?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(r===L0)return o===ft?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(r===T0)return o===ft?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(r===E0)return o===ft?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(r===k0)return o===ft?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(r===D0)return o===ft?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(r===U0)return o===ft?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(r===P0)return o===ft?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(r===_0)return o===ft?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(r===J0)return o===ft?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(r===O0)return o===ft?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(r===wh)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(r===wh)return o===ft?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;if(r===c1||r===Q0||r===j0||r===q0)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(r===wh)return a.COMPRESSED_RED_RGTC1_EXT;if(r===Q0)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(r===j0)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(r===q0)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return r===ta?i?n.UNSIGNED_INT_24_8:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):n[r]!==void 0?n[r]:null}return{convert:s}}class V1 extends hn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Rg extends Ht{constructor(){super(),this.isGroup=!0,this.type="Group"}}const gK={type:"move"};class $f{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Rg,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Rg,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new H,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new H),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Rg,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new H,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new H),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let s=null,r=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const v of e.hand.values()){const y=t.getJointPose(v,i),A=this._getHandJoint(c,v);y!==null&&(A.matrix.fromArray(y.transform.matrix),A.matrix.decompose(A.position,A.rotation,A.scale),A.matrixWorldNeedsUpdate=!0,A.jointRadius=y.radius),A.visible=y!==null}const u=c.joints["index-finger-tip"],C=c.joints["thumb-tip"],d=u.position.distanceTo(C.position),h=.02,f=.005;c.inputState.pinching&&d>h+f?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&d<=h-f&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,i),r!==null&&(l.matrix.fromArray(r.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,r.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(r.linearVelocity)):l.hasLinearVelocity=!1,r.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(r.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(s=t.getPose(e.targetRaySpace,i),s===null&&r!==null&&(s=r),s!==null&&(a.matrix.fromArray(s.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,s.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(s.linearVelocity)):a.hasLinearVelocity=!1,s.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(s.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(gK)))}return a!==null&&(a.visible=s!==null),l!==null&&(l.visible=r!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new Rg;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class FA extends jt{constructor(e,t,i,s,r,o,a,l,c,u){if(u=u!==void 0?u:na,u!==na&&u!==ga)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&u===na&&(i=oo),i===void 0&&u===ga&&(i=ta),super(null,s,r,o,a,l,u,i,c),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=a!==void 0?a:pt,this.minFilter=l!==void 0?l:pt,this.flipY=!1,this.generateMipmaps=!1}}class cK extends zs{constructor(e,t){super();const i=this;let s=null,r=1,o=null,a="local-floor",l=1,c=null,u=null,C=null,d=null,h=null,f=null;const v=t.getContextAttributes();let y=null,A=null;const b=[],m=[],B=new Set,S=new Map,x=new hn;x.layers.enable(1),x.viewport=new Vt;const R=new hn;R.layers.enable(2),R.viewport=new Vt;const M=[x,R],Z=new V1;Z.layers.enable(1),Z.layers.enable(2);let V=null,N=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ee){let re=b[ee];return re===void 0&&(re=new $f,b[ee]=re),re.getTargetRaySpace()},this.getControllerGrip=function(ee){let re=b[ee];return re===void 0&&(re=new $f,b[ee]=re),re.getGripSpace()},this.getHand=function(ee){let re=b[ee];return re===void 0&&(re=new $f,b[ee]=re),re.getHandSpace()};function k(ee){const re=m.indexOf(ee.inputSource);if(re===-1)return;const ve=b[re];ve!==void 0&&(ve.update(ee.inputSource,ee.frame,c||o),ve.dispatchEvent({type:ee.type,data:ee.inputSource}))}function E(){s.removeEventListener("select",k),s.removeEventListener("selectstart",k),s.removeEventListener("selectend",k),s.removeEventListener("squeeze",k),s.removeEventListener("squeezestart",k),s.removeEventListener("squeezeend",k),s.removeEventListener("end",E),s.removeEventListener("inputsourceschange",$);for(let ee=0;ee=0&&(m[ye]=null,b[ye].disconnect(ve))}for(let re=0;re=m.length){m.push(ve),ye=nt;break}else if(m[nt]===null){m[nt]=ve,ye=nt;break}if(ye===-1)break}const P=b[ye];P&&P.connect(ve)}}const te=new H,Ce=new H;function le(ee,re,ve){te.setFromMatrixPosition(re.matrixWorld),Ce.setFromMatrixPosition(ve.matrixWorld);const ye=te.distanceTo(Ce),P=re.projectionMatrix.elements,nt=ve.projectionMatrix.elements,lt=P[14]/(P[10]-1),Se=P[14]/(P[10]+1),Xe=(P[9]+1)/P[5],me=(P[9]-1)/P[5],ue=(P[8]-1)/P[0],be=(nt[8]+1)/nt[0],Le=lt*ue,Ve=lt*be,st=ye/(-ue+be),rt=st*-ue;re.matrixWorld.decompose(ee.position,ee.quaternion,ee.scale),ee.translateX(rt),ee.translateZ(st),ee.matrixWorld.compose(ee.position,ee.quaternion,ee.scale),ee.matrixWorldInverse.copy(ee.matrixWorld).invert();const qe=lt+st,ut=Se+st,Nt=Le-rt,T=Ve+(ye-rt),X=Xe*Se/ut*qe,ge=me*Se/ut*qe;ee.projectionMatrix.makePerspective(Nt,T,X,ge,qe,ut),ee.projectionMatrixInverse.copy(ee.projectionMatrix).invert()}function L(ee,re){re===null?ee.matrixWorld.copy(ee.matrix):ee.matrixWorld.multiplyMatrices(re.matrixWorld,ee.matrix),ee.matrixWorldInverse.copy(ee.matrixWorld).invert()}this.updateCamera=function(ee){if(s===null)return;Z.near=R.near=x.near=ee.near,Z.far=R.far=x.far=ee.far,(V!==Z.near||N!==Z.far)&&(s.updateRenderState({depthNear:Z.near,depthFar:Z.far}),V=Z.near,N=Z.far);const re=ee.parent,ve=Z.cameras;L(Z,re);for(let ye=0;yeP&&(S.set(ye,ye.lastChangedTime),i.dispatchEvent({type:"planechanged",data:ye}))}}f=null}const se=new Z1;se.setAnimationLoop(ce),this.setAnimationLoop=function(ee){U=ee},this.dispose=function(){}}}function IK(n,e){function t(y,A){y.matrixAutoUpdate===!0&&y.updateMatrix(),A.value.copy(y.matrix)}function i(y,A){A.color.getRGB(y.fogColor.value,G1(n)),A.isFog?(y.fogNear.value=A.near,y.fogFar.value=A.far):A.isFogExp2&&(y.fogDensity.value=A.density)}function s(y,A,b,m,B){A.isMeshBasicMaterial||A.isMeshLambertMaterial?r(y,A):A.isMeshToonMaterial?(r(y,A),C(y,A)):A.isMeshPhongMaterial?(r(y,A),u(y,A)):A.isMeshStandardMaterial?(r(y,A),d(y,A),A.isMeshPhysicalMaterial&&h(y,A,B)):A.isMeshMatcapMaterial?(r(y,A),f(y,A)):A.isMeshDepthMaterial?r(y,A):A.isMeshDistanceMaterial?(r(y,A),v(y,A)):A.isMeshNormalMaterial?r(y,A):A.isLineBasicMaterial?(o(y,A),A.isLineDashedMaterial&&a(y,A)):A.isPointsMaterial?l(y,A,b,m):A.isSpriteMaterial?c(y,A):A.isShadowMaterial?(y.color.value.copy(A.color),y.opacity.value=A.opacity):A.isShaderMaterial&&(A.uniformsNeedUpdate=!1)}function r(y,A){y.opacity.value=A.opacity,A.color&&y.diffuse.value.copy(A.color),A.emissive&&y.emissive.value.copy(A.emissive).multiplyScalar(A.emissiveIntensity),A.map&&(y.map.value=A.map,t(A.map,y.mapTransform)),A.alphaMap&&(y.alphaMap.value=A.alphaMap,t(A.alphaMap,y.alphaMapTransform)),A.bumpMap&&(y.bumpMap.value=A.bumpMap,t(A.bumpMap,y.bumpMapTransform),y.bumpScale.value=A.bumpScale,A.side===Ln&&(y.bumpScale.value*=-1)),A.normalMap&&(y.normalMap.value=A.normalMap,t(A.normalMap,y.normalMapTransform),y.normalScale.value.copy(A.normalScale),A.side===Ln&&y.normalScale.value.negate()),A.displacementMap&&(y.displacementMap.value=A.displacementMap,t(A.displacementMap,y.displacementMapTransform),y.displacementScale.value=A.displacementScale,y.displacementBias.value=A.displacementBias),A.emissiveMap&&(y.emissiveMap.value=A.emissiveMap,t(A.emissiveMap,y.emissiveMapTransform)),A.specularMap&&(y.specularMap.value=A.specularMap,t(A.specularMap,y.specularMapTransform)),A.alphaTest>0&&(y.alphaTest.value=A.alphaTest);const b=e.get(A).envMap;if(b&&(y.envMap.value=b,y.flipEnvMap.value=b.isCubeTexture&&b.isRenderTargetTexture===!1?-1:1,y.reflectivity.value=A.reflectivity,y.ior.value=A.ior,y.refractionRatio.value=A.refractionRatio),A.lightMap){y.lightMap.value=A.lightMap;const m=n.useLegacyLights===!0?Math.PI:1;y.lightMapIntensity.value=A.lightMapIntensity*m,t(A.lightMap,y.lightMapTransform)}A.aoMap&&(y.aoMap.value=A.aoMap,y.aoMapIntensity.value=A.aoMapIntensity,t(A.aoMap,y.aoMapTransform))}function o(y,A){y.diffuse.value.copy(A.color),y.opacity.value=A.opacity,A.map&&(y.map.value=A.map,t(A.map,y.mapTransform))}function a(y,A){y.dashSize.value=A.dashSize,y.totalSize.value=A.dashSize+A.gapSize,y.scale.value=A.scale}function l(y,A,b,m){y.diffuse.value.copy(A.color),y.opacity.value=A.opacity,y.size.value=A.size*b,y.scale.value=m*.5,A.map&&(y.map.value=A.map,t(A.map,y.uvTransform)),A.alphaMap&&(y.alphaMap.value=A.alphaMap),A.alphaTest>0&&(y.alphaTest.value=A.alphaTest)}function c(y,A){y.diffuse.value.copy(A.color),y.opacity.value=A.opacity,y.rotation.value=A.rotation,A.map&&(y.map.value=A.map,t(A.map,y.mapTransform)),A.alphaMap&&(y.alphaMap.value=A.alphaMap),A.alphaTest>0&&(y.alphaTest.value=A.alphaTest)}function u(y,A){y.specular.value.copy(A.specular),y.shininess.value=Math.max(A.shininess,1e-4)}function C(y,A){A.gradientMap&&(y.gradientMap.value=A.gradientMap)}function d(y,A){y.metalness.value=A.metalness,A.metalnessMap&&(y.metalnessMap.value=A.metalnessMap,t(A.metalnessMap,y.metalnessMapTransform)),y.roughness.value=A.roughness,A.roughnessMap&&(y.roughnessMap.value=A.roughnessMap,t(A.roughnessMap,y.roughnessMapTransform)),e.get(A).envMap&&(y.envMapIntensity.value=A.envMapIntensity)}function h(y,A,b){y.ior.value=A.ior,A.sheen>0&&(y.sheenColor.value.copy(A.sheenColor).multiplyScalar(A.sheen),y.sheenRoughness.value=A.sheenRoughness,A.sheenColorMap&&(y.sheenColorMap.value=A.sheenColorMap,t(A.sheenColorMap,y.sheenColorMapTransform)),A.sheenRoughnessMap&&(y.sheenRoughnessMap.value=A.sheenRoughnessMap,t(A.sheenRoughnessMap,y.sheenRoughnessMapTransform))),A.clearcoat>0&&(y.clearcoat.value=A.clearcoat,y.clearcoatRoughness.value=A.clearcoatRoughness,A.clearcoatMap&&(y.clearcoatMap.value=A.clearcoatMap,t(A.clearcoatMap,y.clearcoatMapTransform)),A.clearcoatRoughnessMap&&(y.clearcoatRoughnessMap.value=A.clearcoatRoughnessMap,t(A.clearcoatRoughnessMap,y.clearcoatRoughnessMapTransform)),A.clearcoatNormalMap&&(y.clearcoatNormalMap.value=A.clearcoatNormalMap,t(A.clearcoatNormalMap,y.clearcoatNormalMapTransform),y.clearcoatNormalScale.value.copy(A.clearcoatNormalScale),A.side===Ln&&y.clearcoatNormalScale.value.negate())),A.iridescence>0&&(y.iridescence.value=A.iridescence,y.iridescenceIOR.value=A.iridescenceIOR,y.iridescenceThicknessMinimum.value=A.iridescenceThicknessRange[0],y.iridescenceThicknessMaximum.value=A.iridescenceThicknessRange[1],A.iridescenceMap&&(y.iridescenceMap.value=A.iridescenceMap,t(A.iridescenceMap,y.iridescenceMapTransform)),A.iridescenceThicknessMap&&(y.iridescenceThicknessMap.value=A.iridescenceThicknessMap,t(A.iridescenceThicknessMap,y.iridescenceThicknessMapTransform))),A.transmission>0&&(y.transmission.value=A.transmission,y.transmissionSamplerMap.value=b.texture,y.transmissionSamplerSize.value.set(b.width,b.height),A.transmissionMap&&(y.transmissionMap.value=A.transmissionMap,t(A.transmissionMap,y.transmissionMapTransform)),y.thickness.value=A.thickness,A.thicknessMap&&(y.thicknessMap.value=A.thicknessMap,t(A.thicknessMap,y.thicknessMapTransform)),y.attenuationDistance.value=A.attenuationDistance,y.attenuationColor.value.copy(A.attenuationColor)),y.specularIntensity.value=A.specularIntensity,y.specularColor.value.copy(A.specularColor),A.specularColorMap&&(y.specularColorMap.value=A.specularColorMap,t(A.specularColorMap,y.specularColorMapTransform)),A.specularIntensityMap&&(y.specularIntensityMap.value=A.specularIntensityMap,t(A.specularIntensityMap,y.specularIntensityMapTransform))}function f(y,A){A.matcap&&(y.matcap.value=A.matcap)}function v(y,A){const b=e.get(A).light;y.referencePosition.value.setFromMatrixPosition(b.matrixWorld),y.nearDistance.value=b.shadow.camera.near,y.farDistance.value=b.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:s}}function uK(n,e,t,i){let s={},r={},o=[];const a=t.isWebGL2?n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(b,m){const B=m.program;i.uniformBlockBinding(b,B)}function c(b,m){let B=s[b.id];B===void 0&&(f(b),B=u(b),s[b.id]=B,b.addEventListener("dispose",y));const S=m.program;i.updateUBOMapping(b,S);const x=e.render.frame;r[b.id]!==x&&(d(b),r[b.id]=x)}function u(b){const m=C();b.__bindingPointIndex=m;const B=n.createBuffer(),S=b.__size,x=b.usage;return n.bindBuffer(n.UNIFORM_BUFFER,B),n.bufferData(n.UNIFORM_BUFFER,S,x),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,m,B),B}function C(){for(let b=0;b0){x=B%S;const k=S-x;x!==0&&k-V.boundary<0&&(B+=S-x,Z.__offset=B)}B+=V.storage}return x=B%S,x>0&&(B+=S-x),b.__size=B,b.__cache={},this}function v(b){const m={boundary:0,storage:0};return typeof b=="number"?(m.boundary=4,m.storage=4):b.isVector2?(m.boundary=8,m.storage=8):b.isVector3||b.isColor?(m.boundary=16,m.storage=12):b.isVector4?(m.boundary=16,m.storage=16):b.isMatrix3?(m.boundary=48,m.storage=48):b.isMatrix4?(m.boundary=64,m.storage=64):b.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",b),m}function y(b){const m=b.target;m.removeEventListener("dispose",y);const B=o.indexOf(m.__bindingPointIndex);o.splice(B,1),n.deleteBuffer(s[m.id]),delete s[m.id],delete r[m.id]}function A(){for(const b in s)n.deleteBuffer(s[b]);o=[],s={},r={}}return{bind:l,update:c,dispose:A}}function CK(){const n=Cu("canvas");return n.style.display="block",n}class Kv{constructor(e={}){const{canvas:t=CK(),context:i=null,depth:s=!0,stencil:r=!0,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:C=!1}=e;this.isWebGLRenderer=!0;let d;i!==null?d=i.getContextAttributes().alpha:d=o;let h=null,f=null;const v=[],y=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputColorSpace=ft,this.useLegacyLights=!0,this.toneMapping=gr,this.toneMappingExposure=1;const A=this;let b=!1,m=0,B=0,S=null,x=-1,R=null;const M=new Vt,Z=new Vt;let V=null,N=t.width,k=t.height,E=1,$=null,te=null;const Ce=new Vt(0,0,N,k),le=new Vt(0,0,N,k);let L=!1;const _=new HA;let U=!1,ce=!1,se=null;const ee=new Fe,re=new H,ve={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function ye(){return S===null?E:1}let P=i;function nt(Y,ae){for(let Ae=0;Ae0?f=y[y.length-1]:f=null,v.pop(),v.length>0?h=v[v.length-1]:h=null};function _n(Y,ae,Ae,ie){if(Y.visible===!1)return;if(Y.layers.test(ae.layers)){if(Y.isGroup)Ae=Y.renderOrder;else if(Y.isLOD)Y.autoUpdate===!0&&Y.update(ae);else if(Y.isLight)f.pushLight(Y),Y.castShadow&&f.pushShadow(Y);else if(Y.isSprite){if(!Y.frustumCulled||_.intersectsSprite(Y)){ie&&re.setFromMatrixPosition(Y.matrixWorld).applyMatrix4(ee);const at=qe.update(Y),ct=Y.material;ct.visible&&h.push(Y,at,ct,Ae,re.z,null)}}else if((Y.isMesh||Y.isLine||Y.isPoints)&&(!Y.frustumCulled||_.intersectsObject(Y))){Y.isSkinnedMesh&&Y.skeleton.frame!==me.render.frame&&(Y.skeleton.update(),Y.skeleton.frame=me.render.frame);const at=qe.update(Y),ct=Y.material;if(ie&&(at.boundingSphere===null&&at.computeBoundingSphere(),re.copy(at.boundingSphere.center).applyMatrix4(Y.matrixWorld).applyMatrix4(ee)),Array.isArray(ct)){const ht=at.groups;for(let yt=0,Gt=ht.length;yt0&&ln(fe,et,ae,Ae),ie&&Xe.viewport(M.copy(ie)),fe.length>0&&vi(fe,ae,Ae),et.length>0&&vi(et,ae,Ae),at.length>0&&vi(at,ae,Ae),Xe.buffers.depth.setTest(!0),Xe.buffers.depth.setMask(!0),Xe.buffers.color.setMask(!0),Xe.setPolygonOffset(!1)}function ln(Y,ae,Ae,ie){if(se===null){const ct=Se.isWebGL2;se=new Rt(1024,1024,{generateMipmaps:!0,type:lt.has("EXT_color_buffer_half_float")?us:sn,minFilter:la,samples:ct&&a===!0?4:0})}const fe=A.getRenderTarget();A.setRenderTarget(se),A.clear();const et=A.toneMapping;A.toneMapping=gr,vi(Y,Ae,ie),be.updateMultisampleRenderTarget(se),be.updateRenderTargetMipmap(se);let at=!1;for(let ct=0,ht=ae.length;ct0&&be.useMultisampledRTT(Y)===!1?fe=ue.get(Y).__webglMultisampledFramebuffer:fe=Gt,M.copy(Y.viewport),Z.copy(Y.scissor),V=Y.scissorTest}else M.copy(Ce).multiplyScalar(E).floor(),Z.copy(le).multiplyScalar(E).floor(),V=L;if(Xe.bindFramebuffer(P.FRAMEBUFFER,fe)&&Se.drawBuffers&&ie&&Xe.drawBuffers(Y,fe),Xe.viewport(M),Xe.scissor(Z),Xe.setScissorTest(V),et){const ht=ue.get(Y.texture);P.framebufferTexture2D(P.FRAMEBUFFER,P.COLOR_ATTACHMENT0,P.TEXTURE_CUBE_MAP_POSITIVE_X+ae,ht.__webglTexture,Ae)}else if(at){const ht=ue.get(Y.texture),yt=ae||0;P.framebufferTextureLayer(P.FRAMEBUFFER,P.COLOR_ATTACHMENT0,ht.__webglTexture,Ae||0,yt)}x=-1},this.readRenderTargetPixels=function(Y,ae,Ae,ie,fe,et,at){if(!(Y&&Y.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ct=ue.get(Y).__webglFramebuffer;if(Y.isWebGLCubeRenderTarget&&at!==void 0&&(ct=ct[at]),ct){Xe.bindFramebuffer(P.FRAMEBUFFER,ct);try{const ht=Y.texture,yt=ht.format,Gt=ht.type;if(yt!==In&&pe.convert(yt)!==P.getParameter(P.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const wt=Gt===us&&(lt.has("EXT_color_buffer_half_float")||Se.isWebGL2&<.has("EXT_color_buffer_float"));if(Gt!==sn&&pe.convert(Gt)!==P.getParameter(P.IMPLEMENTATION_COLOR_READ_TYPE)&&!(Gt===Zn&&(Se.isWebGL2||lt.has("OES_texture_float")||lt.has("WEBGL_color_buffer_float")))&&!wt){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ae>=0&&ae<=Y.width-ie&&Ae>=0&&Ae<=Y.height-fe&&P.readPixels(ae,Ae,ie,fe,pe.convert(yt),pe.convert(Gt),et)}finally{const ht=S!==null?ue.get(S).__webglFramebuffer:null;Xe.bindFramebuffer(P.FRAMEBUFFER,ht)}}},this.copyFramebufferToTexture=function(Y,ae,Ae=0){const ie=Math.pow(2,-Ae),fe=Math.floor(ae.image.width*ie),et=Math.floor(ae.image.height*ie);be.setTexture2D(ae,0),P.copyTexSubImage2D(P.TEXTURE_2D,Ae,0,0,Y.x,Y.y,fe,et),Xe.unbindTexture()},this.copyTextureToTexture=function(Y,ae,Ae,ie=0){const fe=ae.image.width,et=ae.image.height,at=pe.convert(Ae.format),ct=pe.convert(Ae.type);be.setTexture2D(Ae,0),P.pixelStorei(P.UNPACK_FLIP_Y_WEBGL,Ae.flipY),P.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Ae.premultiplyAlpha),P.pixelStorei(P.UNPACK_ALIGNMENT,Ae.unpackAlignment),ae.isDataTexture?P.texSubImage2D(P.TEXTURE_2D,ie,Y.x,Y.y,fe,et,at,ct,ae.image.data):ae.isCompressedTexture?P.compressedTexSubImage2D(P.TEXTURE_2D,ie,Y.x,Y.y,ae.mipmaps[0].width,ae.mipmaps[0].height,at,ae.mipmaps[0].data):P.texSubImage2D(P.TEXTURE_2D,ie,Y.x,Y.y,at,ct,ae.image),ie===0&&Ae.generateMipmaps&&P.generateMipmap(P.TEXTURE_2D),Xe.unbindTexture()},this.copyTextureToTexture3D=function(Y,ae,Ae,ie,fe=0){if(A.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const et=Y.max.x-Y.min.x+1,at=Y.max.y-Y.min.y+1,ct=Y.max.z-Y.min.z+1,ht=pe.convert(ie.format),yt=pe.convert(ie.type);let Gt;if(ie.isData3DTexture)be.setTexture3D(ie,0),Gt=P.TEXTURE_3D;else if(ie.isDataArrayTexture)be.setTexture2DArray(ie,0),Gt=P.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}P.pixelStorei(P.UNPACK_FLIP_Y_WEBGL,ie.flipY),P.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ie.premultiplyAlpha),P.pixelStorei(P.UNPACK_ALIGNMENT,ie.unpackAlignment);const wt=P.getParameter(P.UNPACK_ROW_LENGTH),Ut=P.getParameter(P.UNPACK_IMAGE_HEIGHT),ei=P.getParameter(P.UNPACK_SKIP_PIXELS),es=P.getParameter(P.UNPACK_SKIP_ROWS),ks=P.getParameter(P.UNPACK_SKIP_IMAGES),tn=Ae.isCompressedTexture?Ae.mipmaps[0]:Ae.image;P.pixelStorei(P.UNPACK_ROW_LENGTH,tn.width),P.pixelStorei(P.UNPACK_IMAGE_HEIGHT,tn.height),P.pixelStorei(P.UNPACK_SKIP_PIXELS,Y.min.x),P.pixelStorei(P.UNPACK_SKIP_ROWS,Y.min.y),P.pixelStorei(P.UNPACK_SKIP_IMAGES,Y.min.z),Ae.isDataTexture||Ae.isData3DTexture?P.texSubImage3D(Gt,fe,ae.x,ae.y,ae.z,et,at,ct,ht,yt,tn.data):Ae.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),P.compressedTexSubImage3D(Gt,fe,ae.x,ae.y,ae.z,et,at,ct,ht,tn.data)):P.texSubImage3D(Gt,fe,ae.x,ae.y,ae.z,et,at,ct,ht,yt,tn),P.pixelStorei(P.UNPACK_ROW_LENGTH,wt),P.pixelStorei(P.UNPACK_IMAGE_HEIGHT,Ut),P.pixelStorei(P.UNPACK_SKIP_PIXELS,ei),P.pixelStorei(P.UNPACK_SKIP_ROWS,es),P.pixelStorei(P.UNPACK_SKIP_IMAGES,ks),fe===0&&ie.generateMipmaps&&P.generateMipmap(Gt),Xe.unbindTexture()},this.initTexture=function(Y){Y.isCubeTexture?be.setTextureCube(Y,0):Y.isData3DTexture?be.setTexture3D(Y,0):Y.isDataArrayTexture||Y.isCompressedArrayTexture?be.setTexture2DArray(Y,0):be.setTexture2D(Y,0),Xe.unbindTexture()},this.resetState=function(){m=0,B=0,S=null,Xe.reset(),De.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===ft?Ys:Vu}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===Ys?ft:ur}}class M1 extends Kv{}M1.prototype.isWebGL1Renderer=!0;class KA{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Re(e),this.density=t}clone(){return new KA(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}class zA{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new Re(e),this.near=t,this.far=i}clone(){return new zA(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}class dl extends Ht{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(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t}get autoUpdate(){return console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate}set autoUpdate(e){console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate=e}}class LA{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=uu,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Cs()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let s=0,r=this.stride;se.far||t.push({distance:l,point:Qc.clone(),uv:Ui.getInterpolation(Qc,xd,qc,Rd,_2,em,J2,new ne),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function Wd(n,e,t,i,s,r){ag.subVectors(n,t).addScalar(.5).multiply(i),s!==void 0?(jc.x=r*ag.x-s*ag.y,jc.y=s*ag.x+r*ag.y):jc.copy(ag),n.copy(e),n.x+=jc.x,n.y+=jc.y,n.applyMatrix4(N1)}const Vd=new H,O2=new H;class X1 extends Ht{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let i=0,s=t.length;i0){let i,s;for(i=1,s=t.length;i0){Vd.setFromMatrixPosition(this.matrixWorld);const s=e.ray.origin.distanceTo(Vd);this.getObjectForDistance(s).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){Vd.setFromMatrixPosition(e.matrixWorld),O2.setFromMatrixPosition(this.matrixWorld);const i=Vd.distanceTo(O2)/e.zoom;t[0].object.visible=!0;let s,r;for(s=1,r=t.length;s=o)t[s-1].object.visible=!1,t[s].object.visible=!0;else break}for(this._currentLevel=s-1;sl)continue;d.applyMatrix4(this.matrixWorld);const M=e.ray.origin.distanceTo(d);Me.far||t.push({distance:M,point:C.clone().applyMatrix4(this.matrixWorld),index:m,face:null,faceIndex:null,object:this})}}else{const A=Math.max(0,o.start),b=Math.min(y.count,o.start+o.count);for(let m=A,B=b-1;ml)continue;d.applyMatrix4(this.matrixWorld);const x=e.ray.origin.distanceTo(d);xe.far||t.push({distance:x,point:C.clone().applyMatrix4(this.matrixWorld),index:m,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;r0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;rs.far)return;r.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class z1 extends jt{constructor(e,t,i,s,r,o,a,l,c){super(e,t,i,s,r,o,a,l,c),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:je,this.magFilter=r!==void 0?r:je,this.generateMipmaps=!1;const u=this;function C(){u.needsUpdate=!0,e.requestVideoFrameCallback(C)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(C)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class nb extends jt{constructor(e,t,i){super({width:e,height:t}),this.isFramebufferTexture=!0,this.format=i,this.magFilter=pt,this.minFilter=pt,this.generateMipmaps=!1,this.needsUpdate=!0}}class Ev extends jt{constructor(e,t,i,s,r,o,a,l,c,u,C,d){super(null,o,a,l,c,u,s,r,C,d),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class pK extends Ev{constructor(e,t,i,s,r,o){super(e,t,i,r,o),this.isCompressedArrayTexture=!0,this.image.depth=s,this.wrapR=Kn}}class L1 extends jt{constructor(e,t,i,s,r,o,a,l,c){super(e,t,i,s,r,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Cr{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let i,s=this.getPoint(0),r=0;t.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),r+=i.distanceTo(s),t.push(r),s=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const i=this.getLengths();let s=0;const r=i.length;let o;t?o=t:o=e*i[r-1];let a=0,l=r-1,c;for(;a<=l;)if(s=Math.floor(a+(l-a)/2),c=i[s]-o,c<0)a=s+1;else if(c>0)l=s-1;else{l=s;break}if(s=l,i[s]===o)return s/(r-1);const u=i[s],d=i[s+1]-u,h=(o-u)/d;return(s+h)/(r-1)}getTangent(e,t){let s=e-1e-4,r=e+1e-4;s<0&&(s=0),r>1&&(r=1);const o=this.getPoint(s),a=this.getPoint(r),l=t||(o.isVector2?new ne:new H);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new H,s=[],r=[],o=[],a=new H,l=new Fe;for(let h=0;h<=e;h++){const f=h/e;s[h]=this.getTangentAt(f,new H)}r[0]=new H,o[0]=new H;let c=Number.MAX_VALUE;const u=Math.abs(s[0].x),C=Math.abs(s[0].y),d=Math.abs(s[0].z);u<=c&&(c=u,i.set(1,0,0)),C<=c&&(c=C,i.set(0,1,0)),d<=c&&i.set(0,0,1),a.crossVectors(s[0],i).normalize(),r[0].crossVectors(s[0],a),o[0].crossVectors(s[0],r[0]);for(let h=1;h<=e;h++){if(r[h]=r[h-1].clone(),o[h]=o[h-1].clone(),a.crossVectors(s[h-1],s[h]),a.length()>Number.EPSILON){a.normalize();const f=Math.acos(yn(s[h-1].dot(s[h]),-1,1));r[h].applyMatrix4(l.makeRotationAxis(a,f))}o[h].crossVectors(s[h],r[h])}if(t===!0){let h=Math.acos(yn(r[0].dot(r[e]),-1,1));h/=e,s[0].dot(a.crossVectors(r[0],r[e]))>0&&(h=-h);for(let f=1;f<=e;f++)r[f].applyMatrix4(l.makeRotationAxis(s[f],h*f)),o[f].crossVectors(s[f],r[f])}return{tangents:s,normals:r,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class EA extends Cr{constructor(e=0,t=0,i=1,s=1,r=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=s,this.aStartAngle=r,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t){const i=t||new ne,s=Math.PI*2;let r=this.aEndAngle-this.aStartAngle;const o=Math.abs(r)s;)r-=s;r0?0:(Math.floor(Math.abs(a)/r)+1)*r:l===0&&a===r-1&&(a=r-2,l=1);let c,u;this.closed||a>0?c=s[(a-1)%r]:(Yd.subVectors(s[0],s[1]).add(s[0]),c=Yd);const C=s[a%r],d=s[(a+1)%r];if(this.closed||a+2s.length-2?s.length-1:o+1],C=s[o>s.length-3?s.length-1:o+2];return i.set(cZ(a,l.x,c.x,u.x,C.x),cZ(a,l.y,c.y,u.y,C.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t=i){const o=s[r]-i,a=this.curves[r],l=a.getLength(),c=l===0?0:1-o/l;return a.getPointAt(c,t)}r++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let i=0,s=this.curves.length;i1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t0){const C=c.getPoint(0);C.equals(this.currentPoint)||this.lineTo(C.x,C.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class cc extends mt{constructor(e=[new ne(0,-.5),new ne(.5,0),new ne(0,.5)],t=12,i=0,s=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:s},t=Math.floor(t),s=yn(s,0,Math.PI*2);const r=[],o=[],a=[],l=[],c=[],u=1/t,C=new H,d=new ne,h=new H,f=new H,v=new H;let y=0,A=0;for(let b=0;b<=e.length-1;b++)switch(b){case 0:y=e[b+1].x-e[b].x,A=e[b+1].y-e[b].y,h.x=A*1,h.y=-y,h.z=A*0,v.copy(h),h.normalize(),l.push(h.x,h.y,h.z);break;case e.length-1:l.push(v.x,v.y,v.z);break;default:y=e[b+1].x-e[b].x,A=e[b+1].y-e[b].y,h.x=A*1,h.y=-y,h.z=A*0,f.copy(h),h.x+=v.x,h.y+=v.y,h.z+=v.z,h.normalize(),l.push(h.x,h.y,h.z),v.copy(f)}for(let b=0;b<=t;b++){const m=i+b*u*s,B=Math.sin(m),S=Math.cos(m);for(let x=0;x<=e.length-1;x++){C.x=e[x].x*B,C.y=e[x].y,C.z=e[x].x*S,o.push(C.x,C.y,C.z),d.x=b/t,d.y=x/(e.length-1),a.push(d.x,d.y);const R=l[3*x+0]*B,M=l[3*x+1],Z=l[3*x+0]*S;c.push(R,M,Z)}}for(let b=0;b0&&m(!0),t>0&&m(!1)),this.setIndex(u),this.setAttribute("position",new ke(C,3)),this.setAttribute("normal",new ke(d,3)),this.setAttribute("uv",new ke(h,2));function b(){const B=new H,S=new H;let x=0;const R=(t-e)/i;for(let M=0;M<=r;M++){const Z=[],V=M/r,N=V*(t-e)+e;for(let k=0;k<=s;k++){const E=k/s,$=E*l+a,te=Math.sin($),Ce=Math.cos($);S.x=N*te,S.y=-V*i+y,S.z=N*Ce,C.push(S.x,S.y,S.z),B.set(te,R,Ce).normalize(),d.push(B.x,B.y,B.z),h.push(E,1-V),Z.push(f++)}v.push(Z)}for(let M=0;M.9&&R<.1&&(m<.2&&(o[b+0]+=1),B<.2&&(o[b+2]+=1),S<.2&&(o[b+4]+=1))}}function d(b){r.push(b.x,b.y,b.z)}function h(b,m){const B=b*3;m.x=e[B+0],m.y=e[B+1],m.z=e[B+2]}function f(){const b=new H,m=new H,B=new H,S=new H,x=new ne,R=new ne,M=new ne;for(let Z=0,V=0;Z80*t){a=c=n[0],l=u=n[1];for(let f=t;fc&&(c=C),d>u&&(u=d);h=Math.max(c-a,u-l),h=h!==0?32767/h:0}return hu(r,o,t,a,l,h,0),o}};function _1(n,e,t,i,s){let r,o;if(s===TK(n,e,t,i)>0)for(r=e;r=e;r-=i)o=IZ(r,n[r],n[r+1],o);return o&&DA(o,o.next)&&(pu(o),o=o.next),o}function Al(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(DA(t,t.next)||An(t.prev,t,t.next)===0)){if(pu(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function hu(n,e,t,i,s,r,o){if(!n)return;!o&&r&&XK(n,i,s,r);let a=n,l,c;for(;n.prev!==n.next;){if(l=n.prev,c=n.next,r?SK(n,i,s,r):wK(n)){e.push(l.i/t|0),e.push(n.i/t|0),e.push(c.i/t|0),pu(n),n=c.next,a=c.next;continue}if(n=c,n===a){o?o===1?(n=xK(Al(n),e,t),hu(n,e,t,i,s,r,2)):o===2&&RK(n,e,t,i,s,r):hu(Al(n),e,t,i,s,r,1);break}}}function wK(n){const e=n.prev,t=n,i=n.next;if(An(e,t,i)>=0)return!1;const s=e.x,r=t.x,o=i.x,a=e.y,l=t.y,c=i.y,u=sr?s>o?s:o:r>o?r:o,h=a>l?a>c?a:c:l>c?l:c;let f=i.next;for(;f!==e;){if(f.x>=u&&f.x<=d&&f.y>=C&&f.y<=h&&Wg(s,a,r,l,o,c,f.x,f.y)&&An(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function SK(n,e,t,i){const s=n.prev,r=n,o=n.next;if(An(s,r,o)>=0)return!1;const a=s.x,l=r.x,c=o.x,u=s.y,C=r.y,d=o.y,h=al?a>c?a:c:l>c?l:c,y=u>C?u>d?u:d:C>d?C:d,A=ib(h,f,e,t,i),b=ib(v,y,e,t,i);let m=n.prevZ,B=n.nextZ;for(;m&&m.z>=A&&B&&B.z<=b;){if(m.x>=h&&m.x<=v&&m.y>=f&&m.y<=y&&m!==s&&m!==o&&Wg(a,u,l,C,c,d,m.x,m.y)&&An(m.prev,m,m.next)>=0||(m=m.prevZ,B.x>=h&&B.x<=v&&B.y>=f&&B.y<=y&&B!==s&&B!==o&&Wg(a,u,l,C,c,d,B.x,B.y)&&An(B.prev,B,B.next)>=0))return!1;B=B.nextZ}for(;m&&m.z>=A;){if(m.x>=h&&m.x<=v&&m.y>=f&&m.y<=y&&m!==s&&m!==o&&Wg(a,u,l,C,c,d,m.x,m.y)&&An(m.prev,m,m.next)>=0)return!1;m=m.prevZ}for(;B&&B.z<=b;){if(B.x>=h&&B.x<=v&&B.y>=f&&B.y<=y&&B!==s&&B!==o&&Wg(a,u,l,C,c,d,B.x,B.y)&&An(B.prev,B,B.next)>=0)return!1;B=B.nextZ}return!0}function xK(n,e,t){let i=n;do{const s=i.prev,r=i.next.next;!DA(s,r)&&J1(s,i,i.next,r)&&Au(s,r)&&Au(r,s)&&(e.push(s.i/t|0),e.push(i.i/t|0),e.push(r.i/t|0),pu(i),pu(i.next),i=n=r),i=i.next}while(i!==n);return Al(i)}function RK(n,e,t,i,s,r){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&KK(o,a)){let l=O1(o,a);o=Al(o,o.next),l=Al(l,l.next),hu(o,e,t,i,s,r,0),hu(l,e,t,i,s,r,0);return}a=a.next}o=o.next}while(o!==n)}function WK(n,e,t,i){const s=[];let r,o,a,l,c;for(r=0,o=e.length;r=t.next.y&&t.next.y!==t.y){const d=t.x+(o-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(d<=r&&d>i&&(i=d,s=t.x=t.x&&t.x>=l&&r!==t.x&&Wg(os.x||t.x===s.x&&HK(s,t)))&&(s=t,u=C)),t=t.next;while(t!==a);return s}function HK(n,e){return An(n.prev,n,e.prev)<0&&An(e.next,n,n.next)<0}function XK(n,e,t,i){let s=n;do s.z===0&&(s.z=ib(s.x,s.y,e,t,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==n);s.prevZ.nextZ=null,s.prevZ=null,YK(s)}function YK(n){let e,t,i,s,r,o,a,l,c=1;do{for(t=n,n=null,r=null,o=0;t;){for(o++,i=t,a=0,e=0;e0||l>0&&i;)a!==0&&(l===0||!i||t.z<=i.z)?(s=t,t=t.nextZ,a--):(s=i,i=i.nextZ,l--),r?r.nextZ=s:n=s,s.prevZ=r,r=s;t=i}r.nextZ=null,c*=2}while(o>1);return n}function ib(n,e,t,i,s){return n=(n-t)*s|0,e=(e-i)*s|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n|e<<1}function FK(n){let e=n,t=n;do(e.x=(n-o)*(r-a)&&(n-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(r-a)>=(s-o)*(i-a)}function KK(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!zK(n,e)&&(Au(n,e)&&Au(e,n)&&LK(n,e)&&(An(n.prev,n,e.prev)||An(n,e.prev,e))||DA(n,e)&&An(n.prev,n,n.next)>0&&An(e.prev,e,e.next)>0)}function An(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function DA(n,e){return n.x===e.x&&n.y===e.y}function J1(n,e,t,i){const s=Td(An(n,e,t)),r=Td(An(n,e,i)),o=Td(An(t,i,n)),a=Td(An(t,i,e));return!!(s!==r&&o!==a||s===0&&Ld(n,t,e)||r===0&&Ld(n,i,e)||o===0&&Ld(t,n,i)||a===0&&Ld(t,e,i))}function Ld(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function Td(n){return n>0?1:n<0?-1:0}function zK(n,e){let t=n;do{if(t.i!==n.i&&t.next.i!==n.i&&t.i!==e.i&&t.next.i!==e.i&&J1(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function Au(n,e){return An(n.prev,n,n.next)<0?An(n,e,n.next)>=0&&An(n,n.prev,e)>=0:An(n,e,n.prev)<0||An(n,n.next,e)<0}function LK(n,e){let t=n,i=!1;const s=(n.x+e.x)/2,r=(n.y+e.y)/2;do t.y>r!=t.next.y>r&&t.next.y!==t.y&&s<(t.next.x-t.x)*(r-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==n);return i}function O1(n,e){const t=new sb(n.i,n.x,n.y),i=new sb(e.i,e.x,e.y),s=n.next,r=e.prev;return n.next=e,e.prev=n,t.next=s,s.prev=t,i.next=t,t.prev=i,r.next=i,i.prev=r,i}function IZ(n,e,t,i){const s=new sb(n,e,t);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function pu(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function sb(n,e,t){this.i=n,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function TK(n,e,t,i){let s=0;for(let r=e,o=t-i;r2&&n[e-1].equals(n[0])&&n.pop()}function CZ(n,e){for(let t=0;tNumber.EPSILON){const ge=Math.sqrt(T),Ge=Math.sqrt(ut*ut+Nt*Nt),Ze=ue.x-qe/ge,Me=ue.y+rt/ge,gt=be.x-Nt/Ge,Ke=be.y+ut/Ge,pe=((gt-Ze)*Nt-(Ke-Me)*ut)/(rt*Nt-qe*ut);Le=Ze+rt*pe-me.x,Ve=Me+qe*pe-me.y;const De=Le*Le+Ve*Ve;if(De<=2)return new ne(Le,Ve);st=Math.sqrt(De/2)}else{let ge=!1;rt>Number.EPSILON?ut>Number.EPSILON&&(ge=!0):rt<-Number.EPSILON?ut<-Number.EPSILON&&(ge=!0):Math.sign(qe)===Math.sign(Nt)&&(ge=!0),ge?(Le=-qe,Ve=rt,st=Math.sqrt(T)):(Le=rt,Ve=qe,st=Math.sqrt(T/2))}return new ne(Le/st,Ve/st)}const _=[];for(let me=0,ue=$.length,be=ue-1,Le=me+1;me=0;me--){const ue=me/y,be=h*Math.cos(ue*Math.PI/2),Le=f*Math.sin(ue*Math.PI/2)+v;for(let Ve=0,st=$.length;Ve=0;){const Le=be;let Ve=be-1;Ve<0&&(Ve=me.length-1);for(let st=0,rt=u+y*2;st0)&&h.push(m,B,x),(A!==i-1||l0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class eW extends Pn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Re(16777215),this.specular=new Re(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Re(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mo,this.normalScale=new ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Wu,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class tW extends Pn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Re(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Re(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mo,this.normalScale=new ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class Ov extends Pn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mo,this.normalScale=new ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class nW extends Pn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Re(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Re(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mo,this.normalScale=new ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Wu,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class iW extends Pn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Re(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mo,this.normalScale=new ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class sW extends Mi{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function Vs(n,e,t){return Qv(n)?new n.constructor(n.subarray(e,t!==void 0?t:n.length)):n.slice(e,t)}function $a(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function Qv(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function rW(n){function e(s,r){return n[s]-n[r]}const t=n.length,i=new Array(t);for(let s=0;s!==t;++s)i[s]=s;return i.sort(e),i}function rb(n,e,t){const i=n.length,s=new n.constructor(i);for(let r=0,o=0;o!==i;++r){const a=t[r]*e;for(let l=0;l!==e;++l)s[o++]=n[a+l]}return s}function jv(n,e,t,i){let s=1,r=n[0];for(;r!==void 0&&r[i]===void 0;)r=n[s++];if(r===void 0)return;let o=r[i];if(o!==void 0)if(Array.isArray(o))do o=r[i],o!==void 0&&(e.push(r.time),t.push.apply(t,o)),r=n[s++];while(r!==void 0);else if(o.toArray!==void 0)do o=r[i],o!==void 0&&(e.push(r.time),o.toArray(t,t.length)),r=n[s++];while(r!==void 0);else do o=r[i],o!==void 0&&(e.push(r.time),t.push(o)),r=n[s++];while(r!==void 0)}function UK(n,e,t,i,s=30){const r=n.clone();r.name=e;const o=[];for(let l=0;l=i)){C.push(c.times[h]);for(let v=0;vr.tracks[l].times[0]&&(a=r.tracks[l].times[0]);for(let l=0;l=a.times[f]){const A=f*C+u,b=A+C-u;v=Vs(a.values,A,b)}else{const A=a.createInterpolant(),b=u,m=C-u;A.evaluate(r),v=Vs(A.resultBuffer,b,m)}l==="quaternion"&&new Sn().fromArray(v).normalize().conjugate().toArray(v);const y=c.times.length;for(let A=0;A=r)){const a=t[1];e=r)break t}o=i,i=0;break n}break e}for(;i>>1;et;)--o;if(++o,r!==0||o!==s){r>=o&&(o=Math.max(o,1),r=o-1);const a=this.getValueSize();this.times=Vs(i,r,o),this.values=Vs(this.values,r*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,s=this.values,r=i.length;r===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==r;a++){const l=i[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(s!==void 0&&Qv(s))for(let a=0,l=s.length;a!==l;++a){const c=s[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=Vs(this.times),t=Vs(this.values),i=this.getValueSize(),s=this.getInterpolation()===Sh,r=e.length-1;let o=1;for(let a=1;a0){e[o]=e[r];for(let a=r*i,l=o*i,c=0;c!==i;++c)t[l+c]=t[a+c];++o}return o!==e.length?(this.times=Vs(e,0,o),this.values=Vs(t,0,o*i)):(this.times=e,this.values=t),this}clone(){const e=Vs(this.times,0),t=Vs(this.values,0),i=this.constructor,s=new i(this.name,e,t);return s.createInterpolant=this.createInterpolant,s}}dr.prototype.TimeBufferType=Float32Array;dr.prototype.ValueBufferType=Float32Array;dr.prototype.DefaultInterpolation=cu;class Bl extends dr{}Bl.prototype.ValueTypeName="bool";Bl.prototype.ValueBufferType=Array;Bl.prototype.DefaultInterpolation=gu;Bl.prototype.InterpolantFactoryMethodLinear=void 0;Bl.prototype.InterpolantFactoryMethodSmooth=void 0;class $v extends dr{}$v.prototype.ValueTypeName="color";class fu extends dr{}fu.prototype.ValueTypeName="number";class lW extends Pu{constructor(e,t,i,s){super(e,t,i,s)}interpolate_(e,t,i,s){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-t)/(s-t);let c=e*a;for(let u=c+a;c!==u;c+=4)Sn.slerpFlat(r,0,o,c-a,o,c,l);return r}}class uc extends dr{InterpolantFactoryMethodLinear(e){return new lW(this.times,this.values,this.getValueSize(),e)}}uc.prototype.ValueTypeName="quaternion";uc.prototype.DefaultInterpolation=cu;uc.prototype.InterpolantFactoryMethodSmooth=void 0;class Zl extends dr{}Zl.prototype.ValueTypeName="string";Zl.prototype.ValueBufferType=Array;Zl.prototype.DefaultInterpolation=gu;Zl.prototype.InterpolantFactoryMethodLinear=void 0;Zl.prototype.InterpolantFactoryMethodSmooth=void 0;class mu extends dr{}mu.prototype.ValueTypeName="vector";class bu{constructor(e,t=-1,i,s=VA){this.name=e,this.tracks=i,this.duration=t,this.blendMode=s,this.uuid=Cs(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,s=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(OK(i[o]).scale(s));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const t=[],i=e.tracks,s={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,o=i.length;r!==o;++r)t.push(dr.toJSON(i[r]));return s}static CreateFromMorphTargetSequence(e,t,i,s){const r=t.length,o=[];for(let a=0;a1){const C=u[1];let d=s[C];d||(s[C]=d=[]),d.push(c)}}const o=[];for(const a in s)o.push(this.CreateFromMorphTargetSequence(a,s[a],t,i));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(C,d,h,f,v){if(h.length!==0){const y=[],A=[];jv(h,y,A,f),y.length!==0&&v.push(new C(d,y,A))}},s=[],r=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let C=0;C{t&&t(r),this.manager.itemEnd(e)},0),r;if(qr[e]!==void 0){qr[e].push({onLoad:t,onProgress:i,onError:s});return}qr[e]=[],qr[e].push({onLoad:t,onProgress:i,onError:s});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=qr[e],C=c.body.getReader(),d=c.headers.get("Content-Length")||c.headers.get("X-File-Size"),h=d?parseInt(d):0,f=h!==0;let v=0;const y=new ReadableStream({start(A){b();function b(){C.read().then(({done:m,value:B})=>{if(m)A.close();else{v+=B.byteLength;const S=new ProgressEvent("progress",{lengthComputable:f,loaded:v,total:h});for(let x=0,R=u.length;x{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a===void 0)return c.text();{const C=/charset="?([^;"\s]*)"?/i.exec(a),d=C&&C[1]?C[1].toLowerCase():void 0,h=new TextDecoder(d);return c.arrayBuffer().then(f=>h.decode(f))}}}).then(c=>{pl.add(e,c);const u=qr[e];delete qr[e];for(let C=0,d=u.length;C{const u=qr[e];if(u===void 0)throw this.manager.itemError(e),c;delete qr[e];for(let C=0,d=u.length;C{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class jK extends fs{constructor(e){super(e)}load(e,t,i,s){const r=this,o=new Ao(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(r.parse(JSON.parse(a)))}catch(l){s?s(l):console.error(l),r.manager.itemError(e)}},i,s)}parse(e){const t=[];for(let i=0;i0:s.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const r in e.uniforms){const o=e.uniforms[r];switch(s.uniforms[r]={},o.type){case"t":s.uniforms[r].value=i(o.value);break;case"c":s.uniforms[r].value=new Re().setHex(o.value);break;case"v2":s.uniforms[r].value=new ne().fromArray(o.value);break;case"v3":s.uniforms[r].value=new H().fromArray(o.value);break;case"v4":s.uniforms[r].value=new Vt().fromArray(o.value);break;case"m3":s.uniforms[r].value=new xt().fromArray(o.value);break;case"m4":s.uniforms[r].value=new Fe().fromArray(o.value);break;default:s.uniforms[r].value=o.value}}if(e.defines!==void 0&&(s.defines=e.defines),e.vertexShader!==void 0&&(s.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(s.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(s.glslVersion=e.glslVersion),e.extensions!==void 0)for(const r in e.extensions)s.extensions[r]=e.extensions[r];if(e.lights!==void 0&&(s.lights=e.lights),e.clipping!==void 0&&(s.clipping=e.clipping),e.size!==void 0&&(s.size=e.size),e.sizeAttenuation!==void 0&&(s.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(s.map=i(e.map)),e.matcap!==void 0&&(s.matcap=i(e.matcap)),e.alphaMap!==void 0&&(s.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(s.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(s.bumpScale=e.bumpScale),e.normalMap!==void 0&&(s.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(s.normalMapType=e.normalMapType),e.normalScale!==void 0){let r=e.normalScale;Array.isArray(r)===!1&&(r=[r,r]),s.normalScale=new ne().fromArray(r)}return e.displacementMap!==void 0&&(s.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(s.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(s.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(s.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(s.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(s.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(s.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(s.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(s.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(s.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(s.envMap=i(e.envMap)),e.envMapIntensity!==void 0&&(s.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(s.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(s.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(s.lightMap=i(e.lightMap)),e.lightMapIntensity!==void 0&&(s.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(s.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(s.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(s.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(s.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(s.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(s.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(s.clearcoatNormalScale=new ne().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(s.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(s.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(s.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(s.thicknessMap=i(e.thicknessMap)),e.sheenColorMap!==void 0&&(s.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(s.sheenRoughnessMap=i(e.sheenRoughnessMap)),s}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const t={ShadowMaterial:j1,SpriteMaterial:zv,RawShaderMaterial:q1,ShaderMaterial:Zt,PointsMaterial:Tv,MeshPhysicalMaterial:$1,MeshStandardMaterial:UA,MeshPhongMaterial:eW,MeshToonMaterial:tW,MeshNormalMaterial:Ov,MeshLambertMaterial:nW,MeshDepthMaterial:YA,MeshDistanceMaterial:Fv,MeshBasicMaterial:ha,MeshMatcapMaterial:iW,LineDashedMaterial:sW,LineBasicMaterial:Mi,Material:Pn};return new t[e]}}class ob{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let i=0,s=e.length;i0){const l=new PA(t);r=new vu(l),r.setCrossOrigin(this.crossOrigin);for(let c=0,u=e.length;c0){s=new vu(this.manager),s.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,s){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=pl.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0),o;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(l){pl.add(e,l),t&&t(l),r.manager.itemEnd(e)}).catch(function(l){s&&s(l),r.manager.itemError(e),r.manager.itemEnd(e)}),r.manager.itemStart(e)}}let Ed;class ty{static getContext(){return Ed===void 0&&(Ed=new(window.AudioContext||window.webkitAudioContext)),Ed}static setContext(e){Ed=e}}class az extends fs{constructor(e){super(e)}load(e,t,i,s){const r=this,o=new Ao(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(l){try{const c=l.slice(0);ty.getContext().decodeAudioData(c,function(C){t(C)},a)}catch(c){a(c)}},i,s);function a(l){s?s(l):console.error(l),r.manager.itemError(e)}}}class lz extends _A{constructor(e,t,i=1){super(void 0,i),this.isHemisphereLightProbe=!0;const s=new Re().set(e),r=new Re().set(t),o=new H(s.r,s.g,s.b),a=new H(r.r,r.g,r.b),l=Math.sqrt(Math.PI),c=l*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(l),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(c)}}class gz extends _A{constructor(e,t=1){super(void 0,t),this.isAmbientLightProbe=!0;const i=new Re().set(e);this.sh.coefficients[0].set(i.r,i.g,i.b).multiplyScalar(2*Math.sqrt(Math.PI))}}const vZ=new Fe,yZ=new Fe,Ma=new Fe;class cz{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new hn,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new hn,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,Ma.copy(e.projectionMatrix);const s=t.eyeSep/2,r=s*t.near/t.focus,o=t.near*Math.tan(rl*t.fov*.5)/t.zoom;let a,l;yZ.elements[12]=-s,vZ.elements[12]=s,a=-o*t.aspect+r,l=o*t.aspect+r,Ma.elements[0]=2*t.near/(l-a),Ma.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(Ma),a=-o*t.aspect-r,l=o*t.aspect-r,Ma.elements[0]=2*t.near/(l-a),Ma.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(Ma)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(yZ),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(vZ)}}class ny{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=GZ(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=GZ();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function GZ(){return(typeof performance>"u"?Date:performance).now()}const Na=new H,BZ=new Sn,Iz=new H,Ha=new H;class uz extends Ht{constructor(){super(),this.type="AudioListener",this.context=ty.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new ny}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener,i=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Na,BZ,Iz),Ha.set(0,0,-1).applyQuaternion(BZ),t.positionX){const s=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Na.x,s),t.positionY.linearRampToValueAtTime(Na.y,s),t.positionZ.linearRampToValueAtTime(Na.z,s),t.forwardX.linearRampToValueAtTime(Ha.x,s),t.forwardY.linearRampToValueAtTime(Ha.y,s),t.forwardZ.linearRampToValueAtTime(Ha.z,s),t.upX.linearRampToValueAtTime(i.x,s),t.upY.linearRampToValueAtTime(i.y,s),t.upZ.linearRampToValueAtTime(i.z,s)}else t.setPosition(Na.x,Na.y,Na.z),t.setOrientation(Ha.x,Ha.y,Ha.z,i.x,i.y,i.z)}}class bW extends Ht{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(i,s,this._addIndex*t,1,t);for(let l=t,c=t+t;l!==c;++l)if(i[l]!==i[l+t]){a.setValue(i,s);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,s=i*this._origIndex;e.getValue(t,s);for(let r=i,o=s;r!==o;++r)t[r]=t[s+r%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let i=e;i=.5)for(let o=0;o!==r;++o)e[t+o]=e[i+o]}_slerp(e,t,i,s){Sn.slerpFlat(e,t,e,t,e,i,s)}_slerpAdditive(e,t,i,s,r){const o=this._workIndex*r;Sn.multiplyQuaternionsFlat(e,o,e,t,e,i),Sn.slerpFlat(e,t,e,t,e,o,s)}_lerp(e,t,i,s,r){const o=1-s;for(let a=0;a!==r;++a){const l=t+a;e[l]=e[l]*o+e[i+a]*s}}_lerpAdditive(e,t,i,s,r){for(let o=0;o!==r;++o){const a=t+o;e[a]=e[a]+e[i+o]*s}}}const iy="\\[\\]\\.:\\/",Az=new RegExp("["+iy+"]","g"),sy="[^"+iy+"]",pz="[^"+iy.replace("\\.","")+"]",fz=/((?:WC+[\/:])*)/.source.replace("WC",sy),mz=/(WCOD+)?/.source.replace("WCOD",pz),bz=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",sy),vz=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",sy),yz=new RegExp("^"+fz+mz+bz+vz+"$"),Gz=["material","materials","bones","map"];class Bz{constructor(e,t,i){const s=i||Xt.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,s)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,s=this._bindings[i];s!==void 0&&s.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let s=this._targetGroup.nCachedObjects_,r=i.length;s!==r;++s)i[s].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class Xt{constructor(e,t,i){this.path=t,this.parsedPath=i||Xt.parseTrackName(t),this.node=Xt.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new Xt.Composite(e,t,i):new Xt(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Az,"")}static parseTrackName(e){const t=yz.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},s=i.nodeName&&i.nodeName.lastIndexOf(".");if(s!==void 0&&s!==-1){const r=i.nodeName.substring(s+1);Gz.indexOf(r)!==-1&&(i.nodeName=i.nodeName.substring(0,s),i.objectName=r)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=function(r){for(let o=0;o=r){const C=r++,d=e[C];t[d.uuid]=u,e[u]=d,t[c]=C,e[C]=l;for(let h=0,f=s;h!==f;++h){const v=i[h],y=v[C],A=v[u];v[u]=y,v[C]=A}}}this.nCachedObjects_=r}uncache(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,s=i.length;let r=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const c=arguments[a],u=c.uuid,C=t[u];if(C!==void 0)if(delete t[u],C0&&(t[h.uuid]=C),e[C]=h,e.pop();for(let f=0,v=s;f!==v;++f){const y=i[f];y[C]=y[d],y.pop()}}}this.nCachedObjects_=r}subscribe_(e,t){const i=this._bindingsIndicesByPath;let s=i[e];const r=this._bindings;if(s!==void 0)return r[s];const o=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,C=new Array(c);s=r.length,i[e]=s,o.push(e),a.push(t),r.push(C);for(let d=u,h=l.length;d!==h;++d){const f=l[d];C[d]=new Xt(f,e,t)}return C}unsubscribe_(e){const t=this._bindingsIndicesByPath,i=t[e];if(i!==void 0){const s=this._paths,r=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],c=e[a];t[c]=i,o[i]=l,o.pop(),r[i]=r[a],r.pop(),s[i]=s[a],s.pop()}}}class yW{constructor(e,t,i=null,s=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=s;const r=t.tracks,o=r.length,a=new Array(o),l={endingStart:Qa,endingEnd:Qa};for(let c=0;c!==o;++c){const u=r[c].createInterpolant(null);a[c]=u,u.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=u1,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,i){if(e.fadeOut(t),this.fadeIn(t),i){const s=this._clip.duration,r=e._clip.duration,o=r/s,a=s/r;e.warp(1,o,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,i){return e.crossFadeFrom(this,t,i)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,i){const s=this._mixer,r=s.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=s._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=r,l[1]=r+i,c[0]=e/o,c[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,i,s){if(!this.enabled){this._updateWeight(e);return}const r=this._startTime;if(r!==null){const l=(e-r)*i;l<0||i===0?t=0:(this._startTime=null,t=i*l)}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case Rv:for(let u=0,C=l.length;u!==C;++u)l[u].evaluate(o),c[u].accumulateAdditive(a);break;case VA:default:for(let u=0,C=l.length;u!==C;++u)l[u].evaluate(o),c[u].accumulate(s,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(i!==null){const s=i.evaluate(e)[0];t*=s,e>i.parameterPositions[1]&&(this.stopFading(),s===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const i=this._timeScaleInterpolant;if(i!==null){const s=i.evaluate(e)[0];t*=s,e>i.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,i=this.loop;let s=this.time+e,r=this._loopCount;const o=i===C1;if(e===0)return r===-1?s:o&&(r&1)===1?t-s:s;if(i===I1){r===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(s>=t)s=t;else if(s<0)s=0;else{this.time=s;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=s,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(r===-1&&(e>=0?(r=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),s>=t||s<0){const a=Math.floor(s/t);s-=t*a,r+=Math.abs(a);const l=this.repetitions-r;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,s=e>0?t:0,this.time=s,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const c=e<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=r,this.time=s,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=s;if(o&&(r&1)===1)return t-s}return s}_setEndings(e,t,i){const s=this._interpolantSettings;i?(s.endingStart=ja,s.endingEnd=ja):(e?s.endingStart=this.zeroSlopeAtStart?ja:Qa:s.endingStart=Iu,t?s.endingEnd=this.zeroSlopeAtEnd?ja:Qa:s.endingEnd=Iu)}_scheduleFading(e,t,i){const s=this._mixer,r=s.time;let o=this._weightInterpolant;o===null&&(o=s._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=r,l[0]=t,a[1]=r+e,l[1]=i,this}}const wz=new Float32Array(1);class Sz extends zs{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const i=e._localRoot||this._root,s=e._clip.tracks,r=s.length,o=e._propertyBindings,a=e._interpolants,l=i.uuid,c=this._bindingsByRootAndName;let u=c[l];u===void 0&&(u={},c[l]=u);for(let C=0;C!==r;++C){const d=s[C],h=d.name;let f=u[h];if(f!==void 0)++f.referenceCount,o[C]=f;else{if(f=o[C],f!==void 0){f._cacheIndex===null&&(++f.referenceCount,this._addInactiveBinding(f,l,h));continue}const v=t&&t._propertyBindings[C].binding.parsedPath;f=new vW(Xt.create(i,h,v),d.ValueTypeName,d.getValueSize()),++f.referenceCount,this._addInactiveBinding(f,l,h),o[C]=f}a[C].resultBuffer=f.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const i=(e._localRoot||this._root).uuid,s=e._clip.uuid,r=this._actionsByClip[s];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,s,i)}const t=e._propertyBindings;for(let i=0,s=t.length;i!==s;++i){const r=t[i];r.useCount++===0&&(this._lendBinding(r),r.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let i=0,s=t.length;i!==s;++i){const r=t[i];--r.useCount===0&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return t!==null&&t=0;--i)e[i].stop();return this}update(e){e*=this.timeScale;const t=this._actions,i=this._nActiveActions,s=this.time+=e,r=Math.sign(e),o=this._accuIndex^=1;for(let c=0;c!==i;++c)t[c]._update(s,e,r,o);const a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(o);return this}setTime(e){this.time=0;for(let t=0;tthis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,SZ).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const xZ=new H,kd=new H;class Hz{constructor(e=new H,t=new H){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){xZ.subVectors(e,this.start),kd.subVectors(this.end,this.start);const i=kd.dot(kd);let r=kd.dot(xZ)/i;return t&&(r=yn(r,0,1)),r}closestPointToPoint(e,t,i){const s=this.closestPointToPointParameter(e,t);return this.delta(i).multiplyScalar(s).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const RZ=new H;class Xz extends Ht{constructor(e,t){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new mt,s=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,l=32;o1)for(let C=0;C.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{HZ.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(HZ,t)}}setLength(e,t=e*.2,i=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(i,t,i),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class Jz extends Kr{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],s=new mt;s.setAttribute("position",new ke(t,3)),s.setAttribute("color",new ke(i,3));const r=new Mi({vertexColors:!0,toneMapped:!1});super(s,r),this.type="AxesHelper"}setColors(e,t,i){const s=new Re,r=this.geometry.attributes.color.array;return s.set(e),s.toArray(r,0),s.toArray(r,3),s.set(t),s.toArray(r,6),s.toArray(r,9),s.set(i),s.toArray(r,12),s.toArray(r,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Oz{constructor(){this.type="ShapePath",this.color=new Re,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new du,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,i,s){return this.currentPath.quadraticCurveTo(e,t,i,s),this}bezierCurveTo(e,t,i,s,r,o){return this.currentPath.bezierCurveTo(e,t,i,s,r,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(A){const b=[];for(let m=0,B=A.length;mNumber.EPSILON){if(V<0&&(R=b[x],Z=-Z,M=b[S],V=-V),A.yM.y)continue;if(A.y===R.y){if(A.x===R.x)return!0}else{const N=V*(A.x-R.x)-Z*(A.y-R.y);if(N===0)return!0;if(N<0)continue;B=!B}}else{if(A.y!==R.y)continue;if(M.x<=A.x&&A.x<=R.x||R.x<=A.x&&A.x<=M.x)return!0}}return B}const s=Nr.isClockWise,r=this.subPaths;if(r.length===0)return[];let o,a,l;const c=[];if(r.length===1)return a=r[0],l=new ll,l.curves=a.curves,c.push(l),c;let u=!s(r[0].getPoints());u=e?!u:u;const C=[],d=[];let h=[],f=0,v;d[f]=void 0,h[f]=[];for(let A=0,b=r.length;A1){let A=!1,b=0;for(let m=0,B=d.length;m0&&A===!1&&(h=C)}let y;for(let A=0,b=d.length;A{const C=typeof c=="function"?c(e):c;if(C!==e){const d=e;e=u?C:Object.assign({},e,C),t.forEach(h=>h(e,d))}},s=()=>e,r=(c,u=s,C=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let d=u(e);function h(){const f=u(e);if(!C(d,f)){const v=d;c(d=f,v)}}return t.add(h),()=>t.delete(h)},l={setState:i,getState:s,subscribe:(c,u,C)=>u||C?r(c,u,C):(t.add(c),()=>t.delete(c)),destroy:()=>t.clear()};return e=n(i,s,l),l}const pL=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),XZ=pL?D.useEffect:D.useLayoutEffect;function wW(n){const e=typeof n=="function"?AL(n):n,t=(i=e.getState,s=Object.is)=>{const[,r]=D.useReducer(y=>y+1,0),o=e.getState(),a=D.useRef(o),l=D.useRef(i),c=D.useRef(s),u=D.useRef(!1),C=D.useRef();C.current===void 0&&(C.current=i(o));let d,h=!1;(a.current!==o||l.current!==i||c.current!==s||u.current)&&(d=i(o),h=!s(C.current,d)),XZ(()=>{h&&(C.current=d),a.current=o,l.current=i,c.current=s,u.current=!1});const f=D.useRef(o);XZ(()=>{const y=()=>{try{const b=e.getState(),m=l.current(b);c.current(C.current,m)||(a.current=b,C.current=m,r())}catch{u.current=!0,r()}},A=e.subscribe(y);return e.getState()!==f.current&&y(),A},[]);const v=h?d:C.current;return D.useDebugValue(v),v};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const i=[t,e];return{next(){const s=i.length<=0;return{value:i.shift(),done:s}}}},t}var SW={exports:{}},xW={exports:{}},RW={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(n){function e(L,_){var U=L.length;L.push(_);e:for(;0>>1,se=L[ce];if(0>>1;ces(ve,U))yes(P,ve)?(L[ce]=P,L[ye]=U,ce=ye):(L[ce]=ve,L[re]=U,ce=re);else if(yes(P,U))L[ce]=P,L[ye]=U,ce=ye;else break e}}return _}function s(L,_){var U=L.sortIndex-_.sortIndex;return U!==0?U:L.id-_.id}if(typeof performance=="object"&&typeof performance.now=="function"){var r=performance;n.unstable_now=function(){return r.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,C=null,d=3,h=!1,f=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(L){for(var _=t(c);_!==null;){if(_.callback===null)i(c);else if(_.startTime<=L)i(c),_.sortIndex=_.expirationTime,e(l,_);else break;_=t(c)}}function B(L){if(v=!1,m(L),!f)if(t(l)!==null)f=!0,Ce(S);else{var _=t(c);_!==null&&le(B,_.startTime-L)}}function S(L,_){f=!1,v&&(v=!1,A(M),M=-1),h=!0;var U=d;try{for(m(_),C=t(l);C!==null&&(!(C.expirationTime>_)||L&&!N());){var ce=C.callback;if(typeof ce=="function"){C.callback=null,d=C.priorityLevel;var se=ce(C.expirationTime<=_);_=n.unstable_now(),typeof se=="function"?C.callback=se:C===t(l)&&i(l),m(_)}else i(l);C=t(l)}if(C!==null)var ee=!0;else{var re=t(c);re!==null&&le(B,re.startTime-_),ee=!1}return ee}finally{C=null,d=U,h=!1}}var x=!1,R=null,M=-1,Z=5,V=-1;function N(){return!(n.unstable_now()-VL||125ce?(L.sortIndex=U,e(c,L),t(l)===null&&L===t(c)&&(v?(A(M),M=-1):v=!0,le(B,U-ce))):(L.sortIndex=se,e(l,L),f||h||(f=!0,Ce(S))),L},n.unstable_shouldYield=N,n.unstable_wrapCallback=function(L){var _=d;return function(){var U=d;d=_;try{return L.apply(this,arguments)}finally{d=U}}}})(RW);xW.exports=RW;var lb=xW.exports;/** + * @license React + * react-reconciler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var fL=function(e){var t={},i=D,s=lb,r=Object.assign;function o(g){for(var I="https://reactjs.org/docs/error-decoder.html?invariant="+g,p=1;pO||w[z]!==W[O]){var de=` +`+w[z].replace(" at new "," at ");return g.displayName&&de.includes("")&&(de=de.replace("",g.displayName)),de}while(1<=z&&0<=O);break}}}finally{St=!1,Error.prepareStackTrace=p}return(g=g?g.displayName||g.name:"")?tn(g):""}var Rn=Object.prototype.hasOwnProperty,Ds=[],zr=-1;function Ni(g){return{current:g}}function Jt(g){0>zr||(g.current=Ds[zr],Ds[zr]=null,zr--)}function At(g,I){zr++,Ds[zr]=g.current,g.current=I}var li={},Wn=Ni(li),Qt=Ni(!1),Us=li;function yo(g,I){var p=g.type.contextTypes;if(!p)return li;var G=g.stateNode;if(G&&G.__reactInternalMemoizedUnmaskedChildContext===I)return G.__reactInternalMemoizedMaskedChildContext;var w={},W;for(W in p)w[W]=I[W];return G&&(g=g.stateNode,g.__reactInternalMemoizedUnmaskedChildContext=I,g.__reactInternalMemoizedMaskedChildContext=w),w}function ti(g){return g=g.childContextTypes,g!=null}function ju(){Jt(Qt),Jt(Wn)}function vy(g,I,p){if(Wn.current!==li)throw Error(o(168));At(Wn,I),At(Qt,p)}function yy(g,I,p){var G=g.stateNode;if(I=I.childContextTypes,typeof G.getChildContext!="function")return p;G=G.getChildContext();for(var w in G)if(!(w in I))throw Error(o(108,M(g)||"Unknown",w));return r({},p,G)}function qu(g){return g=(g=g.stateNode)&&g.__reactInternalMemoizedMergedChildContext||li,Us=Wn.current,At(Wn,g),At(Qt,Qt.current),!0}function Gy(g,I,p){var G=g.stateNode;if(!G)throw Error(o(169));p?(g=yy(g,I,Us),G.__reactInternalMemoizedMergedChildContext=g,Jt(Qt),Jt(Wn),At(Wn,g)):Jt(Qt),At(Qt,p)}var Ps=Math.clz32?Math.clz32:$V,jV=Math.log,qV=Math.LN2;function $V(g){return g>>>=0,g===0?32:31-(jV(g)/qV|0)|0}var $u=64,eC=4194304;function mc(g){switch(g&-g){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return g&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return g&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return g}}function tC(g,I){var p=g.pendingLanes;if(p===0)return 0;var G=0,w=g.suspendedLanes,W=g.pingedLanes,z=p&268435455;if(z!==0){var O=z&~w;O!==0?G=mc(O):(W&=z,W!==0&&(G=mc(W)))}else z=p&~w,z!==0?G=mc(z):W!==0&&(G=mc(W));if(G===0)return 0;if(I!==0&&I!==G&&!(I&w)&&(w=G&-G,W=I&-I,w>=W||w===16&&(W&4194240)!==0))return I;if(G&4&&(G|=p&16),I=g.entangledLanes,I!==0)for(g=g.entanglements,I&=G;0p;p++)I.push(g);return I}function bc(g,I,p){g.pendingLanes|=I,I!==536870912&&(g.suspendedLanes=0,g.pingedLanes=0),g=g.eventTimes,I=31-Ps(I),g[I]=p}function nM(g,I){var p=g.pendingLanes&~I;g.pendingLanes=I,g.suspendedLanes=0,g.pingedLanes=0,g.expiredLanes&=I,g.mutableReadLanes&=I,g.entangledLanes&=I,I=g.entanglements;var G=g.eventTimes;for(g=g.expirationTimes;0>=z,w-=z,Er=1<<32-Ps(I)+w|p<Kt?(Qn=dt,dt=null):Qn=dt.sibling;var zt=it(oe,dt,Ie[Kt],He);if(zt===null){dt===null&&(dt=Qn);break}g&&dt&&zt.alternate===null&&I(oe,dt),Q=W(zt,Q,Kt),bt===null?Pe=zt:bt.sibling=zt,bt=zt,dt=Qn}if(Kt===Ie.length)return p(oe,dt),gn&&va(oe,Kt),Pe;if(dt===null){for(;KtKt?(Qn=dt,dt=null):Qn=dt.sibling;var Wo=it(oe,dt,zt.value,He);if(Wo===null){dt===null&&(dt=Qn);break}g&&dt&&Wo.alternate===null&&I(oe,dt),Q=W(Wo,Q,Kt),bt===null?Pe=Wo:bt.sibling=Wo,bt=Wo,dt=Qn}if(zt.done)return p(oe,dt),gn&&va(oe,Kt),Pe;if(dt===null){for(;!zt.done;Kt++,zt=Ie.next())zt=Ct(oe,zt.value,He),zt!==null&&(Q=W(zt,Q,Kt),bt===null?Pe=zt:bt.sibling=zt,bt=zt);return gn&&va(oe,Kt),Pe}for(dt=G(oe,dt);!zt.done;Kt++,zt=Ie.next())zt=$t(dt,oe,Kt,zt.value,He),zt!==null&&(g&&zt.alternate!==null&&dt.delete(zt.key===null?Kt:zt.key),Q=W(zt,Q,Kt),bt===null?Pe=zt:bt.sibling=zt,bt=zt);return g&&dt.forEach(function(TM){return I(oe,TM)}),gn&&va(oe,Kt),Pe}function Ss(oe,Q,Ie,He){if(typeof Ie=="object"&&Ie!==null&&Ie.type===u&&Ie.key===null&&(Ie=Ie.props.children),typeof Ie=="object"&&Ie!==null){switch(Ie.$$typeof){case l:e:{for(var Pe=Ie.key,bt=Q;bt!==null;){if(bt.key===Pe){if(Pe=Ie.type,Pe===u){if(bt.tag===7){p(oe,bt.sibling),Q=w(bt,Ie.props.children),Q.return=oe,oe=Q;break e}}else if(bt.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===m&&zy(Pe)===bt.type){p(oe,bt.sibling),Q=w(bt,Ie.props),Q.ref=Gc(oe,bt,Ie),Q.return=oe,oe=Q;break e}p(oe,bt);break}else I(oe,bt);bt=bt.sibling}Ie.type===u?(Q=xa(Ie.props.children,oe.mode,He,Ie.key),Q.return=oe,oe=Q):(He=kC(Ie.type,Ie.key,Ie.props,null,oe.mode,He),He.ref=Gc(oe,Q,Ie),He.return=oe,oe=He)}return z(oe);case c:e:{for(bt=Ie.key;Q!==null;){if(Q.key===bt)if(Q.tag===4&&Q.stateNode.containerInfo===Ie.containerInfo&&Q.stateNode.implementation===Ie.implementation){p(oe,Q.sibling),Q=w(Q,Ie.children||[]),Q.return=oe,oe=Q;break e}else{p(oe,Q);break}else I(oe,Q);Q=Q.sibling}Q=rf(Ie,oe.mode,He),Q.return=oe,oe=Q}return z(oe);case m:return bt=Ie._init,Ss(oe,Q,bt(Ie._payload),He)}if(te(Ie))return Qe(oe,Q,Ie,He);if(x(Ie))return ui(oe,Q,Ie,He);uC(oe,Ie)}return typeof Ie=="string"&&Ie!==""||typeof Ie=="number"?(Ie=""+Ie,Q!==null&&Q.tag===6?(p(oe,Q.sibling),Q=w(Q,Ie),Q.return=oe,oe=Q):(p(oe,Q),Q=sf(Ie,oe.mode,He),Q.return=oe,oe=Q),z(oe)):p(oe,Q)}return Ss}var Hl=Ly(!0),Ty=Ly(!1),Bc={},Gs=Ni(Bc),Zc=Ni(Bc),Xl=Ni(Bc);function mr(g){if(g===Bc)throw Error(o(174));return g}function vp(g,I){At(Xl,I),At(Zc,g),At(Gs,Bc),g=le(I),Jt(Gs),At(Gs,g)}function Yl(){Jt(Gs),Jt(Zc),Jt(Xl)}function Ey(g){var I=mr(Xl.current),p=mr(Gs.current);I=L(p,g.type,I),p!==I&&(At(Zc,g),At(Gs,I))}function yp(g){Zc.current===g&&(Jt(Gs),Jt(Zc))}var Cn=Ni(0);function CC(g){for(var I=g;I!==null;){if(I.tag===13){var p=I.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||Qu(p)||fc(p)))return I}else if(I.tag===19&&I.memoizedProps.revealOrder!==void 0){if(I.flags&128)return I}else if(I.child!==null){I.child.return=I,I=I.child;continue}if(I===g)break;for(;I.sibling===null;){if(I.return===null||I.return===g)return null;I=I.return}I.sibling.return=I.return,I=I.sibling}return null}var Gp=[];function Bp(){for(var g=0;gp?p:4,g(!0);var G=Bs.transition;Bs.transition={};try{g(!1),I()}finally{Ft=p,Bs.transition=G}}function nG(){return br().memoizedState}function dM(g,I,p){var G=So(g);p={lane:G,action:p,hasEagerState:!1,eagerState:null,next:null},iG(g)?sG(I,p):(rG(g,I,p),p=Gi(),g=Zs(g,G,p),g!==null&&oG(g,I,G))}function hM(g,I,p){var G=So(g),w={lane:G,action:p,hasEagerState:!1,eagerState:null,next:null};if(iG(g))sG(I,w);else{rG(g,I,w);var W=g.alternate;if(g.lanes===0&&(W===null||W.lanes===0)&&(W=I.lastRenderedReducer,W!==null))try{var z=I.lastRenderedState,O=W(z,p);if(w.hasEagerState=!0,w.eagerState=O,Ar(O,z))return}catch{}finally{}p=Gi(),g=Zs(g,G,p),g!==null&&oG(g,I,G)}}function iG(g){var I=g.alternate;return g===mn||I!==null&&I===mn}function sG(g,I){wc=hC=!0;var p=g.pending;p===null?I.next=I:(I.next=p.next,p.next=I),g.pending=I}function rG(g,I,p){Vn!==null&&g.mode&1&&!(Bt&2)?(g=I.interleaved,g===null?(p.next=p,fr===null?fr=[I]:fr.push(I)):(p.next=g.next,g.next=p),I.interleaved=p):(g=I.pending,g===null?p.next=p:(p.next=g.next,g.next=p),I.pending=p)}function oG(g,I,p){if(p&4194240){var G=I.lanes;G&=g.pendingLanes,p|=G,I.lanes=p,sp(g,p)}}var bC={readContext:bs,useCallback:ci,useContext:ci,useEffect:ci,useImperativeHandle:ci,useInsertionEffect:ci,useLayoutEffect:ci,useMemo:ci,useReducer:ci,useRef:ci,useState:ci,useDebugValue:ci,useDeferredValue:ci,useTransition:ci,useMutableSource:ci,useSyncExternalStore:ci,useId:ci,unstable_isNewReconciler:!1},AM={readContext:bs,useCallback:function(g,I){return Dr().memoizedState=[g,I===void 0?null:I],g},useContext:bs,useEffect:Rp,useImperativeHandle:function(g,I,p){return p=p!=null?p.concat([g]):null,fC(4194308,4,qy.bind(null,I,g),p)},useLayoutEffect:function(g,I){return fC(4194308,4,g,I)},useInsertionEffect:function(g,I){return fC(4,2,g,I)},useMemo:function(g,I){var p=Dr();return I=I===void 0?null:I,g=g(),p.memoizedState=[g,I],g},useReducer:function(g,I,p){var G=Dr();return I=p!==void 0?p(I):I,G.memoizedState=G.baseState=I,g={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:g,lastRenderedState:I},G.queue=g,g=g.dispatch=dM.bind(null,mn,g),[G.memoizedState,g]},useRef:function(g){var I=Dr();return g={current:g},I.memoizedState=g},useState:xp,useDebugValue:Wp,useDeferredValue:function(g){var I=xp(g),p=I[0],G=I[1];return Rp(function(){var w=Bs.transition;Bs.transition={};try{G(g)}finally{Bs.transition=w}},[g]),p},useTransition:function(){var g=xp(!1),I=g[0];return g=CM.bind(null,g[1]),Dr().memoizedState=g,[I,g]},useMutableSource:function(){},useSyncExternalStore:function(g,I,p){var G=mn,w=Dr();if(gn){if(p===void 0)throw Error(o(407));p=p()}else{if(p=I(),Vn===null)throw Error(o(349));Fl&30||Uy(G,I,p)}w.memoizedState=p;var W={value:p,getSnapshot:I};return w.queue=W,Rp(_y.bind(null,G,W,g),[g]),G.flags|=2048,xc(9,Py.bind(null,G,W,p,I),void 0,null),p},useId:function(){var g=Dr(),I=Vn.identifierPrefix;if(gn){var p=kr,G=Er;p=(G&~(1<<32-Ps(G)-1)).toString(32)+p,I=":"+I+"R"+p,p=Sc++,0Op&&(I.flags|=128,G=!0,Mc(w,!1),I.lanes=4194304)}else{if(!G)if(g=CC(W),g!==null){if(I.flags|=128,G=!0,g=g.updateQueue,g!==null&&(I.updateQueue=g,I.flags|=4),Mc(w,!0),w.tail===null&&w.tailMode==="hidden"&&!W.alternate&&!gn)return Ii(I),null}else 2*Jn()-w.renderingStartTime>Op&&p!==1073741824&&(I.flags|=128,G=!0,Mc(w,!1),I.lanes=4194304);w.isBackwards?(W.sibling=I.child,I.child=W):(g=w.last,g!==null?g.sibling=W:I.child=W,w.last=W)}return w.tail!==null?(I=w.tail,w.rendering=I,w.tail=I.sibling,w.renderingStartTime=Jn(),I.sibling=null,g=Cn.current,At(Cn,G?g&1|2:g&1),I):(Ii(I),null);case 22:case 23:return ef(),G=I.memoizedState!==null,g!==null&&g.memoizedState!==null!==G&&(I.flags|=8192),G&&I.mode&1?ss&1073741824&&(Ii(I),Xe&&I.subtreeFlags&6&&(I.flags|=8192)):Ii(I),null;case 24:return null;case 25:return null}throw Error(o(156,I.tag))}var vM=a.ReactCurrentOwner,is=!1;function yi(g,I,p,G){I.child=g===null?Ty(I,null,p,G):Hl(I,g.child,p,G)}function dG(g,I,p,G,w){p=p.render;var W=I.ref;return Wl(I,w),G=wp(g,I,p,G,W,w),p=Sp(),g!==null&&!is?(I.updateQueue=g.updateQueue,I.flags&=-2053,g.lanes&=~w,Ur(g,I,w)):(gn&&p&&Ap(I),I.flags|=1,yi(g,I,G,w),I.child)}function hG(g,I,p,G,w){if(g===null){var W=p.type;return typeof W=="function"&&!nf(W)&&W.defaultProps===void 0&&p.compare===null&&p.defaultProps===void 0?(I.tag=15,I.type=W,AG(g,I,W,G,w)):(g=kC(p.type,null,G,I,I.mode,w),g.ref=I.ref,g.return=I,I.child=g)}if(W=g.child,!(g.lanes&w)){var z=W.memoizedProps;if(p=p.compare,p=p!==null?p:sC,p(z,G)&&g.ref===I.ref)return Ur(g,I,w)}return I.flags|=1,g=Ro(W,G),g.ref=I.ref,g.return=I,I.child=g}function AG(g,I,p,G,w){if(g!==null&&sC(g.memoizedProps,G)&&g.ref===I.ref)if(is=!1,(g.lanes&w)!==0)g.flags&131072&&(is=!0);else return I.lanes=g.lanes,Ur(g,I,w);return Np(g,I,p,G,w)}function pG(g,I,p){var G=I.pendingProps,w=G.children,W=g!==null?g.memoizedState:null;if(G.mode==="hidden")if(!(I.mode&1))I.memoizedState={baseLanes:0,cachePool:null},At(Kl,ss),ss|=p;else if(p&1073741824)I.memoizedState={baseLanes:0,cachePool:null},G=W!==null?W.baseLanes:p,At(Kl,ss),ss|=G;else return g=W!==null?W.baseLanes|p:p,I.lanes=I.childLanes=1073741824,I.memoizedState={baseLanes:g,cachePool:null},I.updateQueue=null,At(Kl,ss),ss|=g,null;else W!==null?(G=W.baseLanes|p,I.memoizedState=null):G=p,At(Kl,ss),ss|=G;return yi(g,I,w,p),I.child}function fG(g,I){var p=I.ref;(g===null&&p!==null||g!==null&&g.ref!==p)&&(I.flags|=512,I.flags|=2097152)}function Np(g,I,p,G,w){var W=ti(p)?Us:Wn.current;return W=yo(I,W),Wl(I,w),p=wp(g,I,p,G,W,w),G=Sp(),g!==null&&!is?(I.updateQueue=g.updateQueue,I.flags&=-2053,g.lanes&=~w,Ur(g,I,w)):(gn&&G&&Ap(I),I.flags|=1,yi(g,I,p,w),I.child)}function mG(g,I,p,G,w){if(ti(p)){var W=!0;qu(I)}else W=!1;if(Wl(I,w),I.stateNode===null)g!==null&&(g.alternate=null,I.alternate=null,I.flags|=2),Ny(I,p,G),hp(I,p,G,w),G=!0;else if(g===null){var z=I.stateNode,O=I.memoizedProps;z.props=O;var de=z.context,xe=p.contextType;typeof xe=="object"&&xe!==null?xe=bs(xe):(xe=ti(p)?Us:Wn.current,xe=yo(I,xe));var Ee=p.getDerivedStateFromProps,Ct=typeof Ee=="function"||typeof z.getSnapshotBeforeUpdate=="function";Ct||typeof z.UNSAFE_componentWillReceiveProps!="function"&&typeof z.componentWillReceiveProps!="function"||(O!==G||de!==xe)&&Hy(I,z,G,xe),Go=!1;var it=I.memoizedState;z.state=it,lC(I,G,z,w),de=I.memoizedState,O!==G||it!==de||Qt.current||Go?(typeof Ee=="function"&&(dp(I,p,Ee,G),de=I.memoizedState),(O=Go||My(I,p,O,G,it,de,xe))?(Ct||typeof z.UNSAFE_componentWillMount!="function"&&typeof z.componentWillMount!="function"||(typeof z.componentWillMount=="function"&&z.componentWillMount(),typeof z.UNSAFE_componentWillMount=="function"&&z.UNSAFE_componentWillMount()),typeof z.componentDidMount=="function"&&(I.flags|=4194308)):(typeof z.componentDidMount=="function"&&(I.flags|=4194308),I.memoizedProps=G,I.memoizedState=de),z.props=G,z.state=de,z.context=xe,G=O):(typeof z.componentDidMount=="function"&&(I.flags|=4194308),G=!1)}else{z=I.stateNode,xy(g,I),O=I.memoizedProps,xe=I.type===I.elementType?O:_s(I.type,O),z.props=xe,Ct=I.pendingProps,it=z.context,de=p.contextType,typeof de=="object"&&de!==null?de=bs(de):(de=ti(p)?Us:Wn.current,de=yo(I,de));var $t=p.getDerivedStateFromProps;(Ee=typeof $t=="function"||typeof z.getSnapshotBeforeUpdate=="function")||typeof z.UNSAFE_componentWillReceiveProps!="function"&&typeof z.componentWillReceiveProps!="function"||(O!==Ct||it!==de)&&Hy(I,z,G,de),Go=!1,it=I.memoizedState,z.state=it,lC(I,G,z,w);var Qe=I.memoizedState;O!==Ct||it!==Qe||Qt.current||Go?(typeof $t=="function"&&(dp(I,p,$t,G),Qe=I.memoizedState),(xe=Go||My(I,p,xe,G,it,Qe,de)||!1)?(Ee||typeof z.UNSAFE_componentWillUpdate!="function"&&typeof z.componentWillUpdate!="function"||(typeof z.componentWillUpdate=="function"&&z.componentWillUpdate(G,Qe,de),typeof z.UNSAFE_componentWillUpdate=="function"&&z.UNSAFE_componentWillUpdate(G,Qe,de)),typeof z.componentDidUpdate=="function"&&(I.flags|=4),typeof z.getSnapshotBeforeUpdate=="function"&&(I.flags|=1024)):(typeof z.componentDidUpdate!="function"||O===g.memoizedProps&&it===g.memoizedState||(I.flags|=4),typeof z.getSnapshotBeforeUpdate!="function"||O===g.memoizedProps&&it===g.memoizedState||(I.flags|=1024),I.memoizedProps=G,I.memoizedState=Qe),z.props=G,z.state=Qe,z.context=de,G=xe):(typeof z.componentDidUpdate!="function"||O===g.memoizedProps&&it===g.memoizedState||(I.flags|=4),typeof z.getSnapshotBeforeUpdate!="function"||O===g.memoizedProps&&it===g.memoizedState||(I.flags|=1024),G=!1)}return Hp(g,I,p,G,W,w)}function Hp(g,I,p,G,w,W){fG(g,I);var z=(I.flags&128)!==0;if(!G&&!z)return w&&Gy(I,p,!1),Ur(g,I,W);G=I.stateNode,vM.current=I;var O=z&&typeof p.getDerivedStateFromError!="function"?null:G.render();return I.flags|=1,g!==null&&z?(I.child=Hl(I,g.child,null,W),I.child=Hl(I,null,O,W)):yi(g,I,O,W),I.memoizedState=G.state,w&&Gy(I,p,!0),I.child}function bG(g){var I=g.stateNode;I.pendingContext?vy(g,I.pendingContext,I.pendingContext!==I.context):I.context&&vy(g,I.context,!1),vp(g,I.containerInfo)}function vG(g,I,p,G,w){return Nl(),bp(w),I.flags|=256,yi(g,I,p,G),I.child}var GC={dehydrated:null,treeContext:null,retryLane:0};function BC(g){return{baseLanes:g,cachePool:null}}function yG(g,I,p){var G=I.pendingProps,w=Cn.current,W=!1,z=(I.flags&128)!==0,O;if((O=z)||(O=g!==null&&g.memoizedState===null?!1:(w&2)!==0),O?(W=!0,I.flags&=-129):(g===null||g.memoizedState!==null)&&(w|=1),At(Cn,w&1),g===null)return mp(I),g=I.memoizedState,g!==null&&(g=g.dehydrated,g!==null)?(I.mode&1?fc(g)?I.lanes=8:I.lanes=1073741824:I.lanes=1,null):(w=G.children,g=G.fallback,W?(G=I.mode,W=I.child,w={mode:"hidden",children:w},!(G&1)&&W!==null?(W.childLanes=0,W.pendingProps=w):W=DC(w,G,0,null),g=xa(g,G,p,null),W.return=I,g.return=I,W.sibling=g,I.child=W,I.child.memoizedState=BC(p),I.memoizedState=GC,g):Xp(I,w));if(w=g.memoizedState,w!==null){if(O=w.dehydrated,O!==null){if(z)return I.flags&256?(I.flags&=-257,ZC(g,I,p,Error(o(422)))):I.memoizedState!==null?(I.child=g.child,I.flags|=128,null):(W=G.fallback,w=I.mode,G=DC({mode:"visible",children:G.children},w,0,null),W=xa(W,w,p,null),W.flags|=2,G.return=I,W.return=I,G.sibling=W,I.child=G,I.mode&1&&Hl(I,g.child,null,p),I.child.memoizedState=BC(p),I.memoizedState=GC,W);if(!(I.mode&1))I=ZC(g,I,p,null);else if(fc(O))I=ZC(g,I,p,Error(o(419)));else if(G=(p&g.childLanes)!==0,is||G){if(G=Vn,G!==null){switch(p&-p){case 4:W=2;break;case 16:W=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:W=32;break;case 536870912:W=268435456;break;default:W=0}G=W&(G.suspendedLanes|p)?0:W,G!==0&&G!==w.retryLane&&(w.retryLane=G,Zs(g,G,-1))}tf(),I=ZC(g,I,p,Error(o(421)))}else Qu(O)?(I.flags|=128,I.child=g.child,I=HM.bind(null,g),tp(O,I),I=null):(p=w.treeContext,ue&&(ns=ie(O),ts=I,gn=!0,Js=null,vc=!1,p!==null&&(vs[ys++]=Er,vs[ys++]=kr,vs[ys++]=ba,Er=p.id,kr=p.overflow,ba=I)),I=Xp(I,I.pendingProps.children),I.flags|=4096);return I}return W?(G=BG(g,I,G.children,G.fallback,p),W=I.child,w=g.child.memoizedState,W.memoizedState=w===null?BC(p):{baseLanes:w.baseLanes|p,cachePool:null},W.childLanes=g.childLanes&~p,I.memoizedState=GC,G):(p=GG(g,I,G.children,p),I.memoizedState=null,p)}return W?(G=BG(g,I,G.children,G.fallback,p),W=I.child,w=g.child.memoizedState,W.memoizedState=w===null?BC(p):{baseLanes:w.baseLanes|p,cachePool:null},W.childLanes=g.childLanes&~p,I.memoizedState=GC,G):(p=GG(g,I,G.children,p),I.memoizedState=null,p)}function Xp(g,I){return I=DC({mode:"visible",children:I},g.mode,0,null),I.return=g,g.child=I}function GG(g,I,p,G){var w=g.child;return g=w.sibling,p=Ro(w,{mode:"visible",children:p}),!(I.mode&1)&&(p.lanes=G),p.return=I,p.sibling=null,g!==null&&(G=I.deletions,G===null?(I.deletions=[g],I.flags|=16):G.push(g)),I.child=p}function BG(g,I,p,G,w){var W=I.mode;g=g.child;var z=g.sibling,O={mode:"hidden",children:p};return!(W&1)&&I.child!==g?(p=I.child,p.childLanes=0,p.pendingProps=O,I.deletions=null):(p=Ro(g,O),p.subtreeFlags=g.subtreeFlags&14680064),z!==null?G=Ro(z,G):(G=xa(G,W,w,null),G.flags|=2),G.return=I,p.return=I,p.sibling=G,I.child=p,G}function ZC(g,I,p,G){return G!==null&&bp(G),Hl(I,g.child,null,p),g=Xp(I,I.pendingProps.children),g.flags|=2,I.memoizedState=null,g}function ZG(g,I,p){g.lanes|=I;var G=g.alternate;G!==null&&(G.lanes|=I),up(g.return,I,p)}function Yp(g,I,p,G,w){var W=g.memoizedState;W===null?g.memoizedState={isBackwards:I,rendering:null,renderingStartTime:0,last:G,tail:p,tailMode:w}:(W.isBackwards=I,W.rendering=null,W.renderingStartTime=0,W.last=G,W.tail=p,W.tailMode=w)}function wG(g,I,p){var G=I.pendingProps,w=G.revealOrder,W=G.tail;if(yi(g,I,G.children,p),G=Cn.current,G&2)G=G&1|2,I.flags|=128;else{if(g!==null&&g.flags&128)e:for(g=I.child;g!==null;){if(g.tag===13)g.memoizedState!==null&&ZG(g,p,I);else if(g.tag===19)ZG(g,p,I);else if(g.child!==null){g.child.return=g,g=g.child;continue}if(g===I)break e;for(;g.sibling===null;){if(g.return===null||g.return===I)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}G&=1}if(At(Cn,G),!(I.mode&1))I.memoizedState=null;else switch(w){case"forwards":for(p=I.child,w=null;p!==null;)g=p.alternate,g!==null&&CC(g)===null&&(w=p),p=p.sibling;p=w,p===null?(w=I.child,I.child=null):(w=p.sibling,p.sibling=null),Yp(I,!1,w,p,W);break;case"backwards":for(p=null,w=I.child,I.child=null;w!==null;){if(g=w.alternate,g!==null&&CC(g)===null){I.child=w;break}g=w.sibling,w.sibling=p,p=w,w=g}Yp(I,!0,p,null,W);break;case"together":Yp(I,!1,null,null,void 0);break;default:I.memoizedState=null}return I.child}function Ur(g,I,p){if(g!==null&&(I.dependencies=g.dependencies),zl|=I.lanes,!(p&I.childLanes))return null;if(g!==null&&I.child!==g.child)throw Error(o(153));if(I.child!==null){for(g=I.child,p=Ro(g,g.pendingProps),I.child=p,p.return=I;g.sibling!==null;)g=g.sibling,p=p.sibling=Ro(g,g.pendingProps),p.return=I;p.sibling=null}return I.child}function yM(g,I,p){switch(I.tag){case 3:bG(I),Nl();break;case 5:Ey(I);break;case 1:ti(I.type)&&qu(I);break;case 4:vp(I,I.stateNode.containerInfo);break;case 10:Sy(I,I.type._context,I.memoizedProps.value);break;case 13:var G=I.memoizedState;if(G!==null)return G.dehydrated!==null?(At(Cn,Cn.current&1),I.flags|=128,null):p&I.child.childLanes?yG(g,I,p):(At(Cn,Cn.current&1),g=Ur(g,I,p),g!==null?g.sibling:null);At(Cn,Cn.current&1);break;case 19:if(G=(p&I.childLanes)!==0,g.flags&128){if(G)return wG(g,I,p);I.flags|=128}var w=I.memoizedState;if(w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),At(Cn,Cn.current),G)break;return null;case 22:case 23:return I.lanes=0,pG(g,I,p)}return Ur(g,I,p)}function GM(g,I){switch(pp(I),I.tag){case 1:return ti(I.type)&&ju(),g=I.flags,g&65536?(I.flags=g&-65537|128,I):null;case 3:return Yl(),Jt(Qt),Jt(Wn),Bp(),g=I.flags,g&65536&&!(g&128)?(I.flags=g&-65537|128,I):null;case 5:return yp(I),null;case 13:if(Jt(Cn),g=I.memoizedState,g!==null&&g.dehydrated!==null){if(I.alternate===null)throw Error(o(340));Nl()}return g=I.flags,g&65536?(I.flags=g&-65537|128,I):null;case 19:return Jt(Cn),null;case 4:return Yl(),null;case 10:return Ip(I.type._context),null;case 22:case 23:return ef(),null;case 24:return null;default:return null}}var wC=!1,Ga=!1,BM=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function SC(g,I){var p=g.ref;if(p!==null)if(typeof p=="function")try{p(null)}catch(G){Yi(g,I,G)}else p.current=null}function Fp(g,I,p){try{p()}catch(G){Yi(g,I,G)}}var SG=!1;function ZM(g,I){for(_(g.containerInfo),Ne=I;Ne!==null;)if(g=Ne,I=g.child,(g.subtreeFlags&1028)!==0&&I!==null)I.return=g,Ne=I;else for(;Ne!==null;){g=Ne;try{var p=g.alternate;if(g.flags&1024)switch(g.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var G=p.memoizedProps,w=p.memoizedState,W=g.stateNode,z=W.getSnapshotBeforeUpdate(g.elementType===g.type?G:_s(g.type,G),w);W.__reactInternalSnapshotBeforeUpdate=z}break;case 3:Xe&&Ye(g.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(O){Yi(g,g.return,O)}if(I=g.sibling,I!==null){I.return=g.return,Ne=I;break}Ne=g.return}return p=SG,SG=!1,p}function Ba(g,I,p){var G=I.updateQueue;if(G=G!==null?G.lastEffect:null,G!==null){var w=G=G.next;do{if((w.tag&g)===g){var W=w.destroy;w.destroy=void 0,W!==void 0&&Fp(I,p,W)}w=w.next}while(w!==G)}}function Nc(g,I){if(I=I.updateQueue,I=I!==null?I.lastEffect:null,I!==null){var p=I=I.next;do{if((p.tag&g)===g){var G=p.create;p.destroy=G()}p=p.next}while(p!==I)}}function Kp(g){var I=g.ref;if(I!==null){var p=g.stateNode;switch(g.tag){case 5:g=Ce(p);break;default:g=p}typeof I=="function"?I(g):I.current=g}}function xG(g,I,p){if(hr&&typeof hr.onCommitFiberUnmount=="function")try{hr.onCommitFiberUnmount(nC,I)}catch{}switch(I.tag){case 0:case 11:case 14:case 15:if(g=I.updateQueue,g!==null&&(g=g.lastEffect,g!==null)){var G=g=g.next;do{var w=G,W=w.destroy;w=w.tag,W!==void 0&&(w&2||w&4)&&Fp(I,p,W),G=G.next}while(G!==g)}break;case 1:if(SC(I,p),g=I.stateNode,typeof g.componentWillUnmount=="function")try{g.props=I.memoizedProps,g.state=I.memoizedState,g.componentWillUnmount()}catch(z){Yi(I,p,z)}break;case 5:SC(I,p);break;case 4:Xe?HG(g,I,p):me&&me&&(I=I.stateNode.containerInfo,p=kt(I),Es(I,p))}}function RG(g,I,p){for(var G=I;;)if(xG(g,G,p),G.child===null||Xe&&G.tag===4){if(G===I)break;for(;G.sibling===null;){if(G.return===null||G.return===I)return;G=G.return}G.sibling.return=G.return,G=G.sibling}else G.child.return=G,G=G.child}function WG(g){var I=g.alternate;I!==null&&(g.alternate=null,WG(I)),g.child=null,g.deletions=null,g.sibling=null,g.tag===5&&(I=g.stateNode,I!==null&&st(I)),g.stateNode=null,g.return=null,g.dependencies=null,g.memoizedProps=null,g.memoizedState=null,g.pendingProps=null,g.stateNode=null,g.updateQueue=null}function VG(g){return g.tag===5||g.tag===3||g.tag===4}function MG(g){e:for(;;){for(;g.sibling===null;){if(g.return===null||VG(g.return))return null;g=g.return}for(g.sibling.return=g.return,g=g.sibling;g.tag!==5&&g.tag!==6&&g.tag!==18;){if(g.flags&2||g.child===null||g.tag===4)continue e;g.child.return=g,g=g.child}if(!(g.flags&2))return g.stateNode}}function NG(g){if(Xe){e:{for(var I=g.return;I!==null;){if(VG(I))break e;I=I.return}throw Error(o(160))}var p=I;switch(p.tag){case 5:I=p.stateNode,p.flags&32&&(Tt(I),p.flags&=-33),p=MG(g),Lp(g,p,I);break;case 3:case 4:I=p.stateNode.containerInfo,p=MG(g),zp(g,p,I);break;default:throw Error(o(161))}}}function zp(g,I,p){var G=g.tag;if(G===5||G===6)g=g.stateNode,I?Te(p,g,I):Ke(p,g);else if(G!==4&&(g=g.child,g!==null))for(zp(g,I,p),g=g.sibling;g!==null;)zp(g,I,p),g=g.sibling}function Lp(g,I,p){var G=g.tag;if(G===5||G===6)g=g.stateNode,I?ot(p,g,I):gt(p,g);else if(G!==4&&(g=g.child,g!==null))for(Lp(g,I,p),g=g.sibling;g!==null;)Lp(g,I,p),g=g.sibling}function HG(g,I,p){for(var G=I,w=!1,W,z;;){if(!w){w=G.return;e:for(;;){if(w===null)throw Error(o(160));switch(W=w.stateNode,w.tag){case 5:z=!1;break e;case 3:W=W.containerInfo,z=!0;break e;case 4:W=W.containerInfo,z=!0;break e}w=w.return}w=!0}if(G.tag===5||G.tag===6)RG(g,G,p),z?Wt(W,G.stateNode):Oe(W,G.stateNode);else if(G.tag===18)z?wt(W,G.stateNode):Gt(W,G.stateNode);else if(G.tag===4){if(G.child!==null){W=G.stateNode.containerInfo,z=!0,G.child.return=G,G=G.child;continue}}else if(xG(g,G,p),G.child!==null){G.child.return=G,G=G.child;continue}if(G===I)break;for(;G.sibling===null;){if(G.return===null||G.return===I)return;G=G.return,G.tag===4&&(w=!1)}G.sibling.return=G.return,G=G.sibling}}function Tp(g,I){if(Xe){switch(I.tag){case 0:case 11:case 14:case 15:Ba(3,I,I.return),Nc(3,I),Ba(5,I,I.return);return;case 1:return;case 5:var p=I.stateNode;if(p!=null){var G=I.memoizedProps;g=g!==null?g.memoizedProps:G;var w=I.type,W=I.updateQueue;I.updateQueue=null,W!==null&&$e(p,W,w,g,G,I)}return;case 6:if(I.stateNode===null)throw Error(o(162));p=I.memoizedProps,pe(I.stateNode,g!==null?g.memoizedProps:p,p);return;case 3:ue&&g!==null&&g.memoizedState.isDehydrated&&ht(I.stateNode.containerInfo);return;case 12:return;case 13:xC(I);return;case 19:xC(I);return;case 17:return}throw Error(o(163))}switch(I.tag){case 0:case 11:case 14:case 15:Ba(3,I,I.return),Nc(3,I),Ba(5,I,I.return);return;case 12:return;case 13:xC(I);return;case 19:xC(I);return;case 3:ue&&g!==null&&g.memoizedState.isDehydrated&&ht(I.stateNode.containerInfo);break;case 22:case 23:return}e:if(me){switch(I.tag){case 1:case 5:case 6:break e;case 3:case 4:I=I.stateNode,Es(I.containerInfo,I.pendingChildren);break e}throw Error(o(163))}}function xC(g){var I=g.updateQueue;if(I!==null){g.updateQueue=null;var p=g.stateNode;p===null&&(p=g.stateNode=new BM),I.forEach(function(G){var w=XM.bind(null,g,G);p.has(G)||(p.add(G),G.then(w,w))})}}function wM(g,I){for(Ne=I;Ne!==null;){I=Ne;var p=I.deletions;if(p!==null)for(var G=0;G";case WC:return":has("+(Dp(g)||"")+")";case VC:return'[role="'+g.value+'"]';case NC:return'"'+g.value+'"';case MC:return'[data-testname="'+g.value+'"]';default:throw Error(o(365))}}function zG(g,I){var p=[];g=[g,0];for(var G=0;Gw&&(w=z),G&=~W}if(G=w,G=Jn()-G,G=(120>G?120:480>G?480:1080>G?1080:1920>G?1920:3e3>G?3e3:4320>G?4320:1960*xM(G/1960))-G,10g?16:g,wo===null)var G=!1;else{if(g=wo,wo=null,KC=0,Bt&6)throw Error(o(331));var w=Bt;for(Bt|=4,Ne=g.current;Ne!==null;){var W=Ne,z=W.child;if(Ne.flags&16){var O=W.deletions;if(O!==null){for(var de=0;deJn()-Jp?Za(g,0):_p|=p),Xi(g,I)}function JG(g,I){I===0&&(g.mode&1?(I=eC,eC<<=1,!(eC&130023424)&&(eC=4194304)):I=1);var p=Gi();g=TC(g,I),g!==null&&(bc(g,I,p),Xi(g,p))}function HM(g){var I=g.memoizedState,p=0;I!==null&&(p=I.retryLane),JG(g,p)}function XM(g,I){var p=0;switch(g.tag){case 13:var G=g.stateNode,w=g.memoizedState;w!==null&&(p=w.retryLane);break;case 19:G=g.stateNode;break;default:throw Error(o(314))}G!==null&&G.delete(I),JG(g,p)}var OG;OG=function(g,I,p){if(g!==null)if(g.memoizedProps!==I.pendingProps||Qt.current)is=!0;else{if(!(g.lanes&p)&&!(I.flags&128))return is=!1,yM(g,I,p);is=!!(g.flags&131072)}else is=!1,gn&&I.flags&1048576&&Xy(I,IC,I.index);switch(I.lanes=0,I.tag){case 2:var G=I.type;g!==null&&(g.alternate=null,I.alternate=null,I.flags|=2),g=I.pendingProps;var w=yo(I,Wn.current);Wl(I,p),w=wp(null,I,G,g,w,p);var W=Sp();return I.flags|=1,typeof w=="object"&&w!==null&&typeof w.render=="function"&&w.$$typeof===void 0?(I.tag=1,I.memoizedState=null,I.updateQueue=null,ti(G)?(W=!0,qu(I)):W=!1,I.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,Cp(I),w.updater=gC,I.stateNode=w,w._reactInternals=I,hp(I,G,g,p),I=Hp(null,I,G,!0,W,p)):(I.tag=0,gn&&W&&Ap(I),yi(null,I,w,p),I=I.child),I;case 16:G=I.elementType;e:{switch(g!==null&&(g.alternate=null,I.alternate=null,I.flags|=2),g=I.pendingProps,w=G._init,G=w(G._payload),I.type=G,w=I.tag=FM(G),g=_s(G,g),w){case 0:I=Np(null,I,G,g,p);break e;case 1:I=mG(null,I,G,g,p);break e;case 11:I=dG(null,I,G,g,p);break e;case 14:I=hG(null,I,G,_s(G.type,g),p);break e}throw Error(o(306,G,""))}return I;case 0:return G=I.type,w=I.pendingProps,w=I.elementType===G?w:_s(G,w),Np(g,I,G,w,p);case 1:return G=I.type,w=I.pendingProps,w=I.elementType===G?w:_s(G,w),mG(g,I,G,w,p);case 3:e:{if(bG(I),g===null)throw Error(o(387));G=I.pendingProps,W=I.memoizedState,w=W.element,xy(g,I),lC(I,G,null,p);var z=I.memoizedState;if(G=z.element,ue&&W.isDehydrated)if(W={element:G,isDehydrated:!1,cache:z.cache,transitions:z.transitions},I.updateQueue.baseState=W,I.memoizedState=W,I.flags&256){w=Error(o(423)),I=vG(g,I,G,p,w);break e}else if(G!==w){w=Error(o(424)),I=vG(g,I,G,p,w);break e}else for(ue&&(ns=Ae(I.stateNode.containerInfo),ts=I,gn=!0,Js=null,vc=!1),p=Ty(I,null,G,p),I.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling;else{if(Nl(),G===w){I=Ur(g,I,p);break e}yi(g,I,G,p)}I=I.child}return I;case 5:return Ey(I),g===null&&mp(I),G=I.type,w=I.pendingProps,W=g!==null?g.memoizedProps:null,z=w.children,ve(G,w)?z=null:W!==null&&ve(G,W)&&(I.flags|=32),fG(g,I),yi(g,I,z,p),I.child;case 6:return g===null&&mp(I),null;case 13:return yG(g,I,p);case 4:return vp(I,I.stateNode.containerInfo),G=I.pendingProps,g===null?I.child=Hl(I,null,G,p):yi(g,I,G,p),I.child;case 11:return G=I.type,w=I.pendingProps,w=I.elementType===G?w:_s(G,w),dG(g,I,G,w,p);case 7:return yi(g,I,I.pendingProps,p),I.child;case 8:return yi(g,I,I.pendingProps.children,p),I.child;case 12:return yi(g,I,I.pendingProps.children,p),I.child;case 10:e:{if(G=I.type._context,w=I.pendingProps,W=I.memoizedProps,z=w.value,Sy(I,G,z),W!==null)if(Ar(W.value,z)){if(W.children===w.children&&!Qt.current){I=Ur(g,I,p);break e}}else for(W=I.child,W!==null&&(W.return=I);W!==null;){var O=W.dependencies;if(O!==null){z=W.child;for(var de=O.firstContext;de!==null;){if(de.context===G){if(W.tag===1){de=Tr(-1,p&-p),de.tag=2;var xe=W.updateQueue;if(xe!==null){xe=xe.shared;var Ee=xe.pending;Ee===null?de.next=de:(de.next=Ee.next,Ee.next=de),xe.pending=de}}W.lanes|=p,de=W.alternate,de!==null&&(de.lanes|=p),up(W.return,p,I),O.lanes|=p;break}de=de.next}}else if(W.tag===10)z=W.type===I.type?null:W.child;else if(W.tag===18){if(z=W.return,z===null)throw Error(o(341));z.lanes|=p,O=z.alternate,O!==null&&(O.lanes|=p),up(z,p,I),z=W.sibling}else z=W.child;if(z!==null)z.return=W;else for(z=W;z!==null;){if(z===I){z=null;break}if(W=z.sibling,W!==null){W.return=z.return,z=W;break}z=z.return}W=z}yi(g,I,w.children,p),I=I.child}return I;case 9:return w=I.type,G=I.pendingProps.children,Wl(I,p),w=bs(w),G=G(w),I.flags|=1,yi(g,I,G,p),I.child;case 14:return G=I.type,w=_s(G,I.pendingProps),w=_s(G.type,w),hG(g,I,G,w,p);case 15:return AG(g,I,I.type,I.pendingProps,p);case 17:return G=I.type,w=I.pendingProps,w=I.elementType===G?w:_s(G,w),g!==null&&(g.alternate=null,I.alternate=null,I.flags|=2),I.tag=1,ti(G)?(g=!0,qu(I)):g=!1,Wl(I,p),Ny(I,G,w),hp(I,G,w,p),Hp(null,I,G,!0,g,p);case 19:return wG(g,I,p);case 22:return pG(g,I,p)}throw Error(o(156,I.tag))};function QG(g,I){return rp(g,I)}function YM(g,I,p,G){this.tag=g,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=I,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=G,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ws(g,I,p,G){return new YM(g,I,p,G)}function nf(g){return g=g.prototype,!(!g||!g.isReactComponent)}function FM(g){if(typeof g=="function")return nf(g)?1:0;if(g!=null){if(g=g.$$typeof,g===v)return 11;if(g===b)return 14}return 2}function Ro(g,I){var p=g.alternate;return p===null?(p=ws(g.tag,I,g.key,g.mode),p.elementType=g.elementType,p.type=g.type,p.stateNode=g.stateNode,p.alternate=g,g.alternate=p):(p.pendingProps=I,p.type=g.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=g.flags&14680064,p.childLanes=g.childLanes,p.lanes=g.lanes,p.child=g.child,p.memoizedProps=g.memoizedProps,p.memoizedState=g.memoizedState,p.updateQueue=g.updateQueue,I=g.dependencies,p.dependencies=I===null?null:{lanes:I.lanes,firstContext:I.firstContext},p.sibling=g.sibling,p.index=g.index,p.ref=g.ref,p}function kC(g,I,p,G,w,W){var z=2;if(G=g,typeof g=="function")nf(g)&&(z=1);else if(typeof g=="string")z=5;else e:switch(g){case u:return xa(p.children,w,W,I);case C:z=8,w|=8;break;case d:return g=ws(12,p,I,w|2),g.elementType=d,g.lanes=W,g;case y:return g=ws(13,p,I,w),g.elementType=y,g.lanes=W,g;case A:return g=ws(19,p,I,w),g.elementType=A,g.lanes=W,g;case B:return DC(p,w,W,I);default:if(typeof g=="object"&&g!==null)switch(g.$$typeof){case h:z=10;break e;case f:z=9;break e;case v:z=11;break e;case b:z=14;break e;case m:z=16,G=null;break e}throw Error(o(130,g==null?g:typeof g,""))}return I=ws(z,p,I,w),I.elementType=g,I.type=G,I.lanes=W,I}function xa(g,I,p,G){return g=ws(7,g,G,I),g.lanes=p,g}function DC(g,I,p,G){return g=ws(22,g,G,I),g.elementType=B,g.lanes=p,g.stateNode={},g}function sf(g,I,p){return g=ws(6,g,null,I),g.lanes=p,g}function rf(g,I,p){return I=ws(4,g.children!==null?g.children:[],g.key,I),I.lanes=p,I.stateNode={containerInfo:g.containerInfo,pendingChildren:null,implementation:g.implementation},I}function KM(g,I,p,G,w){this.tag=I,this.containerInfo=g,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=lt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ip(0),this.expirationTimes=ip(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ip(0),this.identifierPrefix=G,this.onRecoverableError=w,ue&&(this.mutableSourceEagerHydrationData=null)}function jG(g,I,p,G,w,W,z,O,de){return g=new KM(g,I,p,O,de),I===1?(I=1,W===!0&&(I|=8)):I=0,W=ws(3,null,null,I),g.current=W,W.stateNode=g,W.memoizedState={element:G,isDehydrated:p,cache:null,transitions:null},Cp(W),g}function qG(g){if(!g)return li;g=g._reactInternals;e:{if(Z(g)!==g||g.tag!==1)throw Error(o(170));var I=g;do{switch(I.tag){case 3:I=I.stateNode.context;break e;case 1:if(ti(I.type)){I=I.stateNode.__reactInternalMemoizedMergedChildContext;break e}}I=I.return}while(I!==null);throw Error(o(171))}if(g.tag===1){var p=g.type;if(ti(p))return yy(g,p,I)}return I}function $G(g){var I=g._reactInternals;if(I===void 0)throw typeof g.render=="function"?Error(o(188)):(g=Object.keys(g).join(","),Error(o(268,g)));return g=k(I),g===null?null:g.stateNode}function eB(g,I){if(g=g.memoizedState,g!==null&&g.dehydrated!==null){var p=g.retryLane;g.retryLane=p!==0&&p=xe&&W>=Ct&&w<=Ee&&z<=it){g.splice(I,1);break}else if(G!==xe||p.width!==de.width||itz){if(!(W!==Ct||p.height!==de.height||Eew)){xe>G&&(de.width+=xe-G,de.x=G),EeW&&(de.height+=Ct-W,de.y=W),itp&&(p=z)),z ")+` + +No matching component was found for: + `)+g.join(" > ")}return null},t.getPublicRootInstance=function(g){if(g=g.current,!g.child)return null;switch(g.child.tag){case 5:return Ce(g.child.stateNode);default:return g.child.stateNode}},t.injectIntoDevTools=function(g){if(g={bundleType:g.bundleType,version:g.version,rendererPackageName:g.rendererPackageName,rendererConfig:g.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:zM,findFiberByHostInstance:g.findFiberByHostInstance||LM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")g=!1;else{var I=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(I.isDisabled||!I.supportsFiber)g=!0;else{try{nC=I.inject(g),hr=I}catch{}g=!!I.checkDCE}}return g},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(g,I,p,G){if(!ut)throw Error(o(363));g=Up(g,I);var w=Me(g,p,G).disconnect;return{disconnect:function(){w()}}},t.registerMutableSourceForHydration=function(g,I){var p=I._getVersion;p=p(I._source),g.mutableSourceEagerHydrationData==null?g.mutableSourceEagerHydrationData=[I,p]:g.mutableSourceEagerHydrationData.push(I,p)},t.runWithPriority=function(g,I){var p=Ft;try{return Ft=g,I()}finally{Ft=p}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(g,I,p,G){var w=I.current,W=Gi(),z=So(w);return p=qG(p),I.context===null?I.context=p:I.pendingContext=p,I=Tr(W,z),I.payload={element:g},G=G===void 0?null:G,G!==null&&(I.callback=G),Bo(w,I),g=Zs(w,z,W),g!==null&&aC(g,w,z),z},t};SW.exports=fL;var mL=SW.exports;const bL=Gb(mL);function WW(n,e,t=(i,s)=>i===s){if(n===e)return!0;if(!n||!e)return!1;const i=n.length;if(e.length!==i)return!1;for(let s=0;ss.response=r).then(()=>{i.lifespan&&i.lifespan>0&&setTimeout(()=>{const r=io.indexOf(s);r!==-1&&io.splice(r,1)},i.lifespan)}).catch(r=>s.error=r)};if(io.push(s),!t)throw s.promise}const vL=(n,e,t)=>VW(n,e,!1,t),yL=(n,e,t)=>void VW(n,e,!0,t),GL=n=>{if(n===void 0||n.length===0)io.splice(0,io.length);else{const e=io.find(t=>WW(n,t.keys,t.equal));if(e){const t=io.indexOf(e);t!==-1&&io.splice(t,1)}}},oy={},MW=n=>void Object.assign(oy,n);function BL(n,e){function t(u,{args:C=[],attach:d,...h},f){let v=`${u[0].toUpperCase()}${u.slice(1)}`,y;if(u==="primitive"){if(h.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const A=h.object;y=Cg(A,{type:u,root:f,attach:d,primitive:!0})}else{const A=oy[v];if(!A)throw new Error(`R3F: ${v} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(C))throw new Error("R3F: The args prop must be an array!");y=Cg(new A(...C),{type:u,root:f,attach:d,memoizedProps:{args:C}})}return y.__r3f.attach===void 0&&(y instanceof mt?y.__r3f.attach="geometry":y instanceof Pn&&(y.__r3f.attach="material")),v!=="inject"&&um(y,h),y}function i(u,C){let d=!1;if(C){var h,f;(h=C.__r3f)!=null&&h.attach?Im(u,C,C.__r3f.attach):C.isObject3D&&u.isObject3D&&(u.add(C),d=!0),d||(f=u.__r3f)==null||f.objects.push(C),C.__r3f||Cg(C,{}),C.__r3f.parent=u,cb(C),dg(C)}}function s(u,C,d){let h=!1;if(C){var f,v;if((f=C.__r3f)!=null&&f.attach)Im(u,C,C.__r3f.attach);else if(C.isObject3D&&u.isObject3D){C.parent=u,C.dispatchEvent({type:"added"});const y=u.children.filter(b=>b!==C),A=y.indexOf(d);u.children=[...y.slice(0,A),C,...y.slice(A)],h=!0}h||(v=u.__r3f)==null||v.objects.push(C),C.__r3f||Cg(C,{}),C.__r3f.parent=u,cb(C),dg(C)}}function r(u,C,d=!1){u&&[...u].forEach(h=>o(C,h,d))}function o(u,C,d){if(C){var h,f,v;if(C.__r3f&&(C.__r3f.parent=null),(h=u.__r3f)!=null&&h.objects&&(u.__r3f.objects=u.__r3f.objects.filter(B=>B!==C)),(f=C.__r3f)!=null&&f.attach)LZ(u,C,C.__r3f.attach);else if(C.isObject3D&&u.isObject3D){var y;u.remove(C),(y=C.__r3f)!=null&&y.root&&VL(C.__r3f.root,C)}const b=(v=C.__r3f)==null?void 0:v.primitive,m=d===void 0?C.dispose!==null&&!b:d;if(!b){var A;r((A=C.__r3f)==null?void 0:A.objects,C,m),r(C.children,C,m)}C.__r3f&&(delete C.__r3f.root,delete C.__r3f.objects,delete C.__r3f.handlers,delete C.__r3f.memoizedProps,b||delete C.__r3f),m&&C.dispose&&C.type!=="Scene"&&lb.unstable_scheduleCallback(lb.unstable_IdlePriority,()=>{try{C.dispose()}catch{}}),dg(u)}}function a(u,C,d,h){var f;const v=(f=u.__r3f)==null?void 0:f.parent;if(!v)return;const y=t(C,d,u.__r3f.root);if(u.children){for(const A of u.children)A.__r3f&&i(y,A);u.children=u.children.filter(A=>!A.__r3f)}u.__r3f.objects.forEach(A=>i(y,A)),u.__r3f.objects=[],u.__r3f.autoRemovedBeforeAppend||o(v,u),y.parent&&(y.__r3f.autoRemovedBeforeAppend=!0),i(v,y),y.raycast&&y.__r3f.eventCount&&y.__r3f.root.getState().internal.interaction.push(y),[h,h.alternate].forEach(A=>{A!==null&&(A.stateNode=y,A.ref&&(typeof A.ref=="function"?A.ref(y):A.ref.current=y))})}const l=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:bL({createInstance:t,removeChild:o,appendChild:i,appendInitialChild:i,insertBefore:s,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(u,C)=>{if(!C)return;const d=u.getState().scene;d.__r3f&&(d.__r3f.root=u,i(d,C))},removeChildFromContainer:(u,C)=>{C&&o(u.getState().scene,C)},insertInContainerBefore:(u,C,d)=>{if(!C||!d)return;const h=u.getState().scene;h.__r3f&&s(h,C,d)},getRootHostContext:()=>null,getChildHostContext:u=>u,finalizeInitialChildren(u){var C;return!!((C=u?.__r3f)!=null?C:{}).handlers},prepareUpdate(u,C,d,h){if(u.__r3f.primitive&&h.object&&h.object!==u)return[!0];{const{args:f=[],children:v,...y}=h,{args:A=[],children:b,...m}=d;if(!Array.isArray(f))throw new Error("R3F: the args prop must be an array!");if(f.some((S,x)=>S!==A[x]))return[!0];const B=zW(u,y,m,!0);return B.changes.length?[!1,B]:null}},commitUpdate(u,[C,d],h,f,v,y){C?a(u,h,v,y):um(u,d)},commitMount(u,C,d,h){var f;const v=(f=u.__r3f)!=null?f:{};u.raycast&&v.handlers&&v.eventCount&&u.__r3f.root.getState().internal.interaction.push(u)},getPublicInstance:u=>u,prepareForCommit:()=>null,preparePortalMount:u=>Cg(u.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(u){var C;const{attach:d,parent:h}=(C=u.__r3f)!=null?C:{};d&&h&&LZ(h,u,d),u.isObject3D&&(u.visible=!1),dg(u)},unhideInstance(u,C){var d;const{attach:h,parent:f}=(d=u.__r3f)!=null?d:{};h&&f&&Im(f,u,h),(u.isObject3D&&C.visible==null||C.visible)&&(u.visible=!0),dg(u)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():Vg.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&on.fun(performance.now)?performance.now:on.fun(Date.now)?Date.now:()=>0,scheduleTimeout:on.fun(setTimeout)?setTimeout:void 0,cancelTimeout:on.fun(clearTimeout)?clearTimeout:void 0}),applyProps:um}}var YZ,FZ;const cm=n=>"colorSpace"in n||"outputColorSpace"in n,NW=()=>{var n;return(n=oy.ColorManagement)!=null?n:null},HW=n=>n&&n.isOrthographicCamera,ZL=n=>n&&n.hasOwnProperty("current"),Cc=typeof window<"u"&&((YZ=window.document)!=null&&YZ.createElement||((FZ=window.navigator)==null?void 0:FZ.product)==="ReactNative")?D.useLayoutEffect:D.useEffect;function XW(n){const e=D.useRef(n);return Cc(()=>void(e.current=n),[n]),e}function wL({set:n}){return Cc(()=>(n(new Promise(()=>null)),()=>n(!1)),[n]),null}class YW extends D.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}YW.getDerivedStateFromError=()=>({error:!0});const FW="__default",KZ=new Map,SL=n=>n&&!!n.memoized&&!!n.changes;function KW(n){var e;const t=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(n)?Math.min(Math.max(n[0],t),n[1]):n}const nI=n=>{var e;return(e=n.__r3f)==null?void 0:e.root.getState()},on={obj:n=>n===Object(n)&&!on.arr(n)&&typeof n!="function",fun:n=>typeof n=="function",str:n=>typeof n=="string",num:n=>typeof n=="number",boo:n=>typeof n=="boolean",und:n=>n===void 0,arr:n=>Array.isArray(n),equ(n,e,{arrays:t="shallow",objects:i="reference",strict:s=!0}={}){if(typeof n!=typeof e||!!n!=!!e)return!1;if(on.str(n)||on.num(n))return n===e;const r=on.obj(n);if(r&&i==="reference")return n===e;const o=on.arr(n);if(o&&t==="reference")return n===e;if((o||r)&&n===e)return!0;let a;for(a in n)if(!(a in e))return!1;if(r&&t==="shallow"&&i==="shallow"){for(a in s?e:n)if(!on.equ(n[a],e[a],{strict:s,objects:"reference"}))return!1}else for(a in s?e:n)if(n[a]!==e[a])return!1;if(on.und(a)){if(o&&n.length===0&&e.length===0||r&&Object.keys(n).length===0&&Object.keys(e).length===0)return!0;if(n!==e)return!1}return!0}};function xL(n){const e={nodes:{},materials:{}};return n&&n.traverse(t=>{t.name&&(e.nodes[t.name]=t),t.material&&!e.materials[t.material.name]&&(e.materials[t.material.name]=t.material)}),e}function RL(n){n.dispose&&n.type!=="Scene"&&n.dispose();for(const e in n)e.dispose==null||e.dispose(),delete n[e]}function Cg(n,e){const t=n;return(e!=null&&e.primitive||!t.__r3f)&&(t.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e}),n}function gb(n,e){let t=n;if(e.includes("-")){const i=e.split("-"),s=i.pop();return t=i.reduce((r,o)=>r[o],n),{target:t,key:s}}else return{target:t,key:e}}const zZ=/-\d+$/;function Im(n,e,t){if(on.str(t)){if(zZ.test(t)){const r=t.replace(zZ,""),{target:o,key:a}=gb(n,r);Array.isArray(o[a])||(o[a]=[])}const{target:i,key:s}=gb(n,t);e.__r3f.previousAttach=i[s],i[s]=e}else e.__r3f.previousAttach=t(n,e)}function LZ(n,e,t){var i,s;if(on.str(t)){const{target:r,key:o}=gb(n,t),a=e.__r3f.previousAttach;a===void 0?delete r[o]:r[o]=a}else(i=e.__r3f)==null||i.previousAttach==null||i.previousAttach(n,e);(s=e.__r3f)==null||delete s.previousAttach}function zW(n,{children:e,key:t,ref:i,...s},{children:r,key:o,ref:a,...l}={},c=!1){var u;const C=(u=n?.__r3f)!=null?u:{},d=Object.entries(s),h=[];if(c){const v=Object.keys(l);for(let y=0;y{var A;if((A=n.__r3f)!=null&&A.primitive&&v==="object"||on.equ(y,l[v]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(v))return h.push([v,y,!0,[]]);let b=[];v.includes("-")&&(b=v.split("-")),h.push([v,y,!1,b]);for(const m in s){const B=s[m];m.startsWith(`${v}-`)&&h.push([m,B,!1,m.split("-")])}});const f={...s};return C.memoizedProps&&C.memoizedProps.args&&(f.args=C.memoizedProps.args),C.memoizedProps&&C.memoizedProps.attach&&(f.attach=C.memoizedProps.attach),{memoized:f,changes:h}}function um(n,e){var t,i,s;const r=(t=n.__r3f)!=null?t:{},o=r.root,a=(i=o==null||o.getState==null?void 0:o.getState())!=null?i:{},{memoized:l,changes:c}=SL(e)?e:zW(n,e),u=r.eventCount;n.__r3f&&(n.__r3f.memoizedProps=l);for(let d=0;dm[B],n),!(b&&b.set))){const[m,...B]=y.reverse();A=B.reverse().reduce((S,x)=>S[x],n),h=m}if(f===FW+"remove")if(A.constructor){let m=KZ.get(A.constructor);m||(m=new A.constructor,KZ.set(A.constructor,m)),f=m[h]}else f=0;if(v)f?r.handlers[h]=f:delete r.handlers[h],r.eventCount=Object.keys(r.handlers).length;else if(b&&b.set&&(b.copy||b instanceof al)){if(Array.isArray(f))b.fromArray?b.fromArray(f):b.set(...f);else if(b.copy&&f&&f.constructor&&b.constructor===f.constructor)b.copy(f);else if(f!==void 0){const m=b instanceof Re;!m&&b.setScalar?b.setScalar(f):b instanceof al&&f instanceof al?b.mask=f.mask:b.set(f),!NW()&&!a.linear&&m&&b.convertSRGBToLinear()}}else if(A[h]=f,A[h]instanceof jt&&A[h].format===In&&A[h].type===sn){const m=A[h];cm(m)&&cm(a.gl)?m.colorSpace=a.gl.outputColorSpace:m.encoding=a.gl.outputEncoding}dg(n)}if(r.parent&&a.internal&&n.raycast&&u!==r.eventCount){const d=a.internal.interaction.indexOf(n);d>-1&&a.internal.interaction.splice(d,1),r.eventCount&&a.internal.interaction.push(n)}return!(c.length===1&&c[0][0]==="onUpdate")&&c.length&&(s=n.__r3f)!=null&&s.parent&&cb(n),n}function dg(n){var e,t;const i=(e=n.__r3f)==null||(t=e.root)==null||t.getState==null?void 0:t.getState();i&&i.internal.frames===0&&i.invalidate()}function cb(n){n.onUpdate==null||n.onUpdate(n)}function LW(n,e){n.manual||(HW(n)?(n.left=e.width/-2,n.right=e.width/2,n.top=e.height/2,n.bottom=e.height/-2):n.aspect=e.width/e.height,n.updateProjectionMatrix(),n.updateMatrixWorld())}function Od(n){return(n.eventObject||n.object).uuid+"/"+n.index+n.instanceId}function WL(){var n;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return Vg.DefaultEventPriority;switch((n=e.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Vg.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Vg.ContinuousEventPriority;default:return Vg.DefaultEventPriority}}function TW(n,e,t,i){const s=t.get(e);s&&(t.delete(e),t.size===0&&(n.delete(i),s.target.releasePointerCapture(i)))}function VL(n,e){const{internal:t}=n.getState();t.interaction=t.interaction.filter(i=>i!==e),t.initialHits=t.initialHits.filter(i=>i!==e),t.hovered.forEach((i,s)=>{(i.eventObject===e||i.object===e)&&t.hovered.delete(s)}),t.capturedMap.forEach((i,s)=>{TW(t.capturedMap,e,i,s)})}function ML(n){function e(l){const{internal:c}=n.getState(),u=l.offsetX-c.initialClick[0],C=l.offsetY-c.initialClick[1];return Math.round(Math.sqrt(u*u+C*C))}function t(l){return l.filter(c=>["Move","Over","Enter","Out","Leave"].some(u=>{var C;return(C=c.__r3f)==null?void 0:C.handlers["onPointer"+u]}))}function i(l,c){const u=n.getState(),C=new Set,d=[],h=c?c(u.internal.interaction):u.internal.interaction;for(let A=0;A{const m=nI(A.object),B=nI(b.object);return!m||!B?A.distance-b.distance:B.events.priority-m.events.priority||A.distance-b.distance}).filter(A=>{const b=Od(A);return C.has(b)?!1:(C.add(b),!0)});u.events.filter&&(v=u.events.filter(v,u));for(const A of v){let b=A.object;for(;b;){var y;(y=b.__r3f)!=null&&y.eventCount&&d.push({...A,eventObject:b}),b=b.parent}}if("pointerId"in l&&u.internal.capturedMap.has(l.pointerId))for(let A of u.internal.capturedMap.get(l.pointerId).values())C.has(Od(A.intersection))||d.push(A.intersection);return d}function s(l,c,u,C){const d=n.getState();if(l.length){const h={stopped:!1};for(const f of l){const v=nI(f.object)||d,{raycaster:y,pointer:A,camera:b,internal:m}=v,B=new H(A.x,A.y,0).unproject(b),S=V=>{var N,k;return(N=(k=m.capturedMap.get(V))==null?void 0:k.has(f.eventObject))!=null?N:!1},x=V=>{const N={intersection:f,target:c.target};m.capturedMap.has(V)?m.capturedMap.get(V).set(f.eventObject,N):m.capturedMap.set(V,new Map([[f.eventObject,N]])),c.target.setPointerCapture(V)},R=V=>{const N=m.capturedMap.get(V);N&&TW(m.capturedMap,f.eventObject,N,V)};let M={};for(let V in c){let N=c[V];typeof N!="function"&&(M[V]=N)}let Z={...f,...M,pointer:A,intersections:l,stopped:h.stopped,delta:u,unprojectedPoint:B,ray:y.ray,camera:b,stopPropagation(){const V="pointerId"in c&&m.capturedMap.get(c.pointerId);if((!V||V.has(f.eventObject))&&(Z.stopped=h.stopped=!0,m.hovered.size&&Array.from(m.hovered.values()).find(N=>N.eventObject===f.eventObject))){const N=l.slice(0,l.indexOf(f));r([...N,f])}},target:{hasPointerCapture:S,setPointerCapture:x,releasePointerCapture:R},currentTarget:{hasPointerCapture:S,setPointerCapture:x,releasePointerCapture:R},nativeEvent:c};if(C(Z),h.stopped===!0)break}}return l}function r(l){const{internal:c}=n.getState();for(const u of c.hovered.values())if(!l.length||!l.find(C=>C.object===u.object&&C.index===u.index&&C.instanceId===u.instanceId)){const d=u.eventObject.__r3f,h=d?.handlers;if(c.hovered.delete(Od(u)),d!=null&&d.eventCount){const f={...u,intersections:l};h.onPointerOut==null||h.onPointerOut(f),h.onPointerLeave==null||h.onPointerLeave(f)}}}function o(l,c){for(let u=0;ur([]);case"onLostPointerCapture":return c=>{const{internal:u}=n.getState();"pointerId"in c&&u.capturedMap.has(c.pointerId)&&requestAnimationFrame(()=>{u.capturedMap.has(c.pointerId)&&(u.capturedMap.delete(c.pointerId),r([]))})}}return function(u){const{onPointerMissed:C,internal:d}=n.getState();d.lastEvent.current=u;const h=l==="onPointerMove",f=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",y=i(u,h?t:void 0),A=f?e(u):0;l==="onPointerDown"&&(d.initialClick=[u.offsetX,u.offsetY],d.initialHits=y.map(m=>m.eventObject)),f&&!y.length&&A<=2&&(o(u,d.interaction),C&&C(u)),h&&r(y);function b(m){const B=m.eventObject,S=B.__r3f,x=S?.handlers;if(S!=null&&S.eventCount)if(h){if(x.onPointerOver||x.onPointerEnter||x.onPointerOut||x.onPointerLeave){const R=Od(m),M=d.hovered.get(R);M?M.stopped&&m.stopPropagation():(d.hovered.set(R,m),x.onPointerOver==null||x.onPointerOver(m),x.onPointerEnter==null||x.onPointerEnter(m))}x.onPointerMove==null||x.onPointerMove(m)}else{const R=x[l];R?(!f||d.initialHits.includes(B))&&(o(u,d.interaction.filter(M=>!d.initialHits.includes(M))),R(m)):f&&d.initialHits.includes(B)&&o(u,d.interaction.filter(M=>!d.initialHits.includes(M)))}}s(y,u,A,b)}}return{handlePointer:a}}const NL=["set","get","setSize","setFrameloop","setDpr","events","invalidate","advance","size","viewport"],EW=n=>!!(n!=null&&n.render),ay=D.createContext(null),HL=(n,e)=>{const t=wW((a,l)=>{const c=new H,u=new H,C=new H;function d(A=l().camera,b=u,m=l().size){const{width:B,height:S,top:x,left:R}=m,M=B/S;b instanceof H?C.copy(b):C.set(...b);const Z=A.getWorldPosition(c).distanceTo(C);if(HW(A))return{width:B/A.zoom,height:S/A.zoom,top:x,left:R,factor:1,distance:Z,aspect:M};{const V=A.fov*Math.PI/180,N=2*Math.tan(V/2)*Z,k=N*(B/S);return{width:k,height:N,top:x,left:R,factor:B/k,distance:Z,aspect:M}}}let h;const f=A=>a(b=>({performance:{...b.performance,current:A}})),v=new ne;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(A=1)=>n(l(),A),advance:(A,b)=>e(A,b,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new ny,pointer:v,mouse:v,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const A=l();h&&clearTimeout(h),A.performance.current!==A.performance.min&&f(A.performance.min),h=setTimeout(()=>f(l().performance.max),A.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:d},setEvents:A=>a(b=>({...b,events:{...b.events,...A}})),setSize:(A,b,m,B,S)=>{const x=l().camera,R={width:A,height:b,top:B||0,left:S||0,updateStyle:m};a(M=>({size:R,viewport:{...M.viewport,...d(x,u,R)}}))},setDpr:A=>a(b=>{const m=KW(A);return{viewport:{...b.viewport,dpr:m,initialDpr:b.viewport.initialDpr||m}}}),setFrameloop:(A="always")=>{const b=l().clock;b.stop(),b.elapsedTime=0,A!=="never"&&(b.start(),b.elapsedTime=0),a(()=>({frameloop:A}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:D.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(A,b,m)=>{const B=l().internal;return B.priority=B.priority+(b>0?1:0),B.subscribers.push({ref:A,priority:b,store:m}),B.subscribers=B.subscribers.sort((S,x)=>S.priority-x.priority),()=>{const S=l().internal;S!=null&&S.subscribers&&(S.priority=S.priority-(b>0?1:0),S.subscribers=S.subscribers.filter(x=>x.ref!==A))}}}}}),i=t.getState();let s=i.size,r=i.viewport.dpr,o=i.camera;return t.subscribe(()=>{const{camera:a,size:l,viewport:c,gl:u,set:C}=t.getState();if(l!==s||c.dpr!==r){var d;s=l,r=c.dpr,LW(a,l),u.setPixelRatio(c.dpr);const h=(d=l.updateStyle)!=null?d:typeof HTMLCanvasElement<"u"&&u.domElement instanceof HTMLCanvasElement;u.setSize(l.width,l.height,h)}a!==o&&(o=a,C(h=>({viewport:{...h.viewport,...h.viewport.getCurrentViewport(a)}})))}),t.subscribe(a=>n(a)),t};let Qd,XL=new Set,YL=new Set,FL=new Set;function Cm(n,e){if(n.size)for(const{callback:t}of n.values())t(e)}function iI(n,e){switch(n){case"before":return Cm(XL,e);case"after":return Cm(YL,e);case"tail":return Cm(FL,e)}}let dm,hm;function Am(n,e,t){let i=e.clock.getDelta();for(e.frameloop==="never"&&typeof n=="number"&&(i=n-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=n),dm=e.internal.subscribers,Qd=0;Qd0)&&!((c=s.gl.xr)!=null&&c.isPresenting)&&(t+=Am(l,s))}if(iI("after",l),t===0)return iI("tail",l),e=!1,cancelAnimationFrame(i)}function o(l,c=1){var u;if(!l)return n.forEach(C=>o(C.store.getState()),c);(u=l.gl.xr)!=null&&u.isPresenting||!l.internal.active||l.frameloop==="never"||(l.internal.frames=Math.min(60,l.internal.frames+c),e||(e=!0,requestAnimationFrame(r)))}function a(l,c=!0,u,C){if(c&&iI("before",l),u)Am(l,u,C);else for(const d of n.values())Am(l,d.store.getState());c&&iI("after",l)}return{loop:r,invalidate:o,advance:a}}function zL(n){const e=D.useRef(null);return Cc(()=>void(e.current=n.current.__r3f),[n]),e}function ly(){const n=D.useContext(ay);if(!n)throw new Error("R3F: Hooks can only be used within the Canvas component!");return n}function $i(n=t=>t,e){return ly()(n,e)}function _u(n,e=0){const t=ly(),i=t.getState().internal.subscribe,s=XW(n);return Cc(()=>i(s,e,t),[e,i,t]),null}function kW(n,e){return function(t,...i){const s=new t;return n&&n(s),Promise.all(i.map(r=>new Promise((o,a)=>s.load(r,l=>{l.scene&&Object.assign(l,xL(l.scene)),o(l)},e,l=>a(new Error(`Could not load ${r}: ${l.message})`))))))}}function gy(n,e,t,i){const s=Array.isArray(e)?e:[e],r=vL(kW(t,i),[n,...s],{equal:on.equ});return Array.isArray(e)?r:r[0]}gy.preload=function(n,e,t){const i=Array.isArray(e)?e:[e];return yL(kW(t),[n,...i])};gy.clear=function(n,e){const t=Array.isArray(e)?e:[e];return GL([n,...t])};const tc=new Map,{invalidate:TZ,advance:EZ}=KL(tc),{reconciler:yu,applyProps:Ta}=BL(tc,WL),cg={objects:"shallow",strict:!1},LL=(n,e)=>{const t=typeof n=="function"?n(e):n;return EW(t)?t:new Kv({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...n})};function TL(n,e){if(e)return e;if(typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement&&n.parentElement){const{width:t,height:i,top:s,left:r}=n.parentElement.getBoundingClientRect();return{width:t,height:i,top:s,left:r}}else if(typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas)return{width:n.width,height:n.height,top:0,left:0};return{width:0,height:0,top:0,left:0}}function EL(n){const e=tc.get(n),t=e?.fiber,i=e?.store;e&&console.warn("R3F.createRoot should only be called once!");const s=typeof reportError=="function"?reportError:console.error,r=i||HL(TZ,EZ),o=t||yu.createContainer(r,Vg.ConcurrentRoot,null,!1,null,"",s,null);e||tc.set(n,{fiber:o,store:r});let a,l=!1,c;return{configure(u={}){let{gl:C,size:d,scene:h,events:f,onCreated:v,shadows:y=!1,linear:A=!1,flat:b=!1,legacy:m=!1,orthographic:B=!1,frameloop:S="always",dpr:x=[1,2],performance:R,raycaster:M,camera:Z,onPointerMissed:V}=u,N=r.getState(),k=N.gl;N.gl||N.set({gl:k=LL(C,n)});let E=N.raycaster;E||N.set({raycaster:E=new ry});const{params:$,...te}=M||{};if(on.equ(te,E,cg)||Ta(E,{...te}),on.equ($,E.params,cg)||Ta(E,{params:{...E.params,...$}}),!N.camera||N.camera===c&&!on.equ(c,Z,cg)){c=Z;const ce=Z instanceof ac,se=ce?Z:B?new lc(0,0,0,0,.1,1e3):new hn(75,0,.1,1e3);ce||(se.position.z=5,Z&&Ta(se,Z),!N.camera&&!(Z!=null&&Z.rotation)&&se.lookAt(0,0,0)),N.set({camera:se})}if(!N.scene){let ce;h instanceof dl?ce=h:(ce=new dl,h&&Ta(ce,h)),N.set({scene:Cg(ce)})}if(!N.xr){const ce=(re,ve)=>{const ye=r.getState();ye.frameloop!=="never"&&EZ(re,!0,ye,ve)},se=()=>{const re=r.getState();re.gl.xr.enabled=re.gl.xr.isPresenting,re.gl.xr.setAnimationLoop(re.gl.xr.isPresenting?ce:null),re.gl.xr.isPresenting||TZ(re)},ee={connect(){const re=r.getState().gl;re.xr.addEventListener("sessionstart",se),re.xr.addEventListener("sessionend",se)},disconnect(){const re=r.getState().gl;re.xr.removeEventListener("sessionstart",se),re.xr.removeEventListener("sessionend",se)}};k.xr&&ee.connect(),N.set({xr:ee})}if(k.shadowMap){const ce=k.shadowMap.enabled,se=k.shadowMap.type;if(k.shadowMap.enabled=!!y,on.boo(y))k.shadowMap.type=VI;else if(on.str(y)){var Ce;const ee={basic:HR,percentage:SA,soft:VI,variance:ir};k.shadowMap.type=(Ce=ee[y])!=null?Ce:VI}else on.obj(y)&&Object.assign(k.shadowMap,y);(ce!==k.shadowMap.enabled||se!==k.shadowMap.type)&&(k.shadowMap.needsUpdate=!0)}const le=NW();le&&("enabled"in le?le.enabled=!m:"legacyMode"in le&&(le.legacyMode=m)),Ta(k,{outputEncoding:A?3e3:3001,toneMapping:b?gr:Bv}),N.legacy!==m&&N.set(()=>({legacy:m})),N.linear!==A&&N.set(()=>({linear:A})),N.flat!==b&&N.set(()=>({flat:b})),C&&!on.fun(C)&&!EW(C)&&!on.equ(C,k,cg)&&Ta(k,C),f&&!N.events.handlers&&N.set({events:f(r)});const U=TL(n,d);return on.equ(U,N.size,cg)||N.setSize(U.width,U.height,U.updateStyle,U.top,U.left),x&&N.viewport.dpr!==KW(x)&&N.setDpr(x),N.frameloop!==S&&N.setFrameloop(S),N.onPointerMissed||N.set({onPointerMissed:V}),R&&!on.equ(R,N.performance,cg)&&N.set(ce=>({performance:{...ce.performance,...R}})),a=v,l=!0,this},render(u){return l||this.configure(),yu.updateContainer(D.createElement(kL,{store:r,children:u,onCreated:a,rootElement:n}),o,null,()=>{}),r},unmount(){DW(n)}}}function kL({store:n,children:e,onCreated:t,rootElement:i}){return Cc(()=>{const s=n.getState();s.set(r=>({internal:{...r.internal,active:!0}})),t&&t(s),n.getState().events.connected||s.events.connect==null||s.events.connect(i)},[]),D.createElement(ay.Provider,{value:n},e)}function DW(n,e){const t=tc.get(n),i=t?.fiber;if(i){const s=t?.store.getState();s&&(s.internal.active=!1),yu.updateContainer(null,i,null,()=>{s&&setTimeout(()=>{try{var r,o,a,l;s.events.disconnect==null||s.events.disconnect(),(r=s.gl)==null||(o=r.renderLists)==null||o.dispose==null||o.dispose(),(a=s.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=s.gl)!=null&&l.xr&&s.xr.disconnect(),RL(s),tc.delete(n),e&&e(n)}catch{}},500)})}}function DL(n,e,t){return D.createElement(UL,{key:e.uuid,children:n,container:e,state:t})}function UL({state:n={},children:e,container:t}){const{events:i,size:s,...r}=n,o=ly(),[a]=D.useState(()=>new ry),[l]=D.useState(()=>new ne),c=D.useCallback((C,d)=>{const h={...C};Object.keys(C).forEach(v=>{(NL.includes(v)||C[v]!==d[v]&&d[v])&&delete h[v]});let f;if(d&&s){const v=d.camera;f=C.viewport.getCurrentViewport(v,new H,s),v!==C.camera&&LW(v,s)}return{...h,scene:t,raycaster:a,pointer:l,mouse:l,previousRoot:o,events:{...C.events,...d?.events,...i},size:{...C.size,...s},viewport:{...C.viewport,...f},...r}},[n]),[u]=D.useState(()=>{const C=o.getState();return wW((h,f)=>({...C,scene:t,raycaster:a,pointer:l,mouse:l,previousRoot:o,events:{...C.events,...i},size:{...C.size,...s},...r,set:h,get:f,setEvents:v=>h(y=>({...y,events:{...y.events,...v}}))}))});return D.useEffect(()=>{const C=o.subscribe(d=>u.setState(h=>c(d,h)));return()=>{C(),u.destroy()}},[]),D.useEffect(()=>{u.setState(C=>c(o.getState(),C))},[c]),D.createElement(D.Fragment,null,yu.createPortal(D.createElement(ay.Provider,{value:u},e),u,null))}yu.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:D.version});function lA(){return lA=Object.assign?Object.assign.bind():function(n){for(var e=1;e=0?i=setTimeout(l,e-u):(i=null,t||(a=n.apply(r,s),r=s=null))}var c=function(){r=this,s=arguments,o=Date.now();var u=t&&!i;return i||(i=setTimeout(l,e)),u&&(a=n.apply(r,s),r=s=null),a};return c.clear=function(){i&&(clearTimeout(i),i=null)},c.flush=function(){i&&(a=n.apply(r,s),r=s=null,clearTimeout(i),i=null)},c}Ib.debounce=Ib;var PL=Ib;const kZ=Gb(PL);function _L(n){let{debounce:e,scroll:t,polyfill:i,offsetSize:s}=n===void 0?{debounce:0,scroll:!1,offsetSize:!1}:n;const r=i||(typeof window>"u"?class{}:window.ResizeObserver);if(!r)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[o,a]=D.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=D.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),c=e?typeof e=="number"?e:e.scroll:null,u=e?typeof e=="number"?e:e.resize:null,C=D.useRef(!1);D.useEffect(()=>(C.current=!0,()=>void(C.current=!1)));const[d,h,f]=D.useMemo(()=>{const b=()=>{if(!l.current.element)return;const{left:m,top:B,width:S,height:x,bottom:R,right:M,x:Z,y:V}=l.current.element.getBoundingClientRect(),N={left:m,top:B,width:S,height:x,bottom:R,right:M,x:Z,y:V};l.current.element instanceof HTMLElement&&s&&(N.height=l.current.element.offsetHeight,N.width=l.current.element.offsetWidth),Object.freeze(N),C.current&&!jL(l.current.lastBounds,N)&&a(l.current.lastBounds=N)};return[b,u?kZ(b,u):b,c?kZ(b,c):b]},[a,s,c,u]);function v(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(b=>b.removeEventListener("scroll",f,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function y(){l.current.element&&(l.current.resizeObserver=new r(f),l.current.resizeObserver.observe(l.current.element),t&&l.current.scrollContainers&&l.current.scrollContainers.forEach(b=>b.addEventListener("scroll",f,{capture:!0,passive:!0})))}const A=b=>{!b||b===l.current.element||(v(),l.current.element=b,l.current.scrollContainers=UW(b),y())};return OL(f,!!t),JL(h),D.useEffect(()=>{v(),y()},[t,f,h]),D.useEffect(()=>v,[]),[A,o,d]}function JL(n){D.useEffect(()=>{const e=n;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[n])}function OL(n,e){D.useEffect(()=>{if(e){const t=n;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[n,e])}function UW(n){const e=[];if(!n||n===document.body)return e;const{overflow:t,overflowX:i,overflowY:s}=window.getComputedStyle(n);return[t,i,s].some(r=>r==="auto"||r==="scroll")&&e.push(n),[...e,...UW(n.parentElement)]}const QL=["x","y","top","bottom","left","right","width","height"],jL=(n,e)=>QL.every(t=>n[t]===e[t]);var qL=Object.defineProperty,$L=Object.defineProperties,eT=Object.getOwnPropertyDescriptors,DZ=Object.getOwnPropertySymbols,tT=Object.prototype.hasOwnProperty,nT=Object.prototype.propertyIsEnumerable,UZ=(n,e,t)=>e in n?qL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,PZ=(n,e)=>{for(var t in e||(e={}))tT.call(e,t)&&UZ(n,t,e[t]);if(DZ)for(var t of DZ(e))nT.call(e,t)&&UZ(n,t,e[t]);return n},iT=(n,e)=>$L(n,eT(e));function PW(n,e,t){if(!n)return;if(t(n)===!0)return n;let i=e?n.return:n.child;for(;i;){const s=PW(i,e,t);if(s)return s;i=e?null:i.sibling}}function _W(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const cy=_W(D.createContext(null));class JW extends D.Component{render(){return D.createElement(cy.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:_Z,ReactCurrentDispatcher:JZ}=D.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function sT(){const n=D.useContext(cy);if(n===null)throw new Error("its-fine: useFiber must be called within a !");const e=D.useId();return D.useMemo(()=>{for(const i of[_Z?.current,n,n?.alternate]){if(!i)continue;const s=PW(i,!1,r=>{let o=r.memoizedState;for(;o;){if(o.memoizedState===e)return!0;o=o.next}});if(s)return s}},[n,e])}function rT(){var n,e;const t=sT(),[i]=D.useState(()=>new Map);i.clear();let s=t;for(;s;){const r=(n=s.type)==null?void 0:n._context;r&&r!==cy&&!i.has(r)&&i.set(r,(e=JZ?.current)==null?void 0:e.readContext(_W(r))),s=s.return}return i}function oT(){const n=rT();return D.useMemo(()=>Array.from(n.keys()).reduce((e,t)=>i=>D.createElement(e,null,D.createElement(t.Provider,iT(PZ({},i),{value:n.get(t)}))),e=>D.createElement(JW,PZ({},e))),[n])}const pm={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function aT(n){const{handlePointer:e}=ML(n);return{priority:1,enabled:!0,compute(t,i,s){i.pointer.set(t.offsetX/i.size.width*2-1,-(t.offsetY/i.size.height)*2+1),i.raycaster.setFromCamera(i.pointer,i.camera)},connected:void 0,handlers:Object.keys(pm).reduce((t,i)=>({...t,[i]:e(i)}),{}),update:()=>{var t;const{events:i,internal:s}=n.getState();(t=s.lastEvent)!=null&&t.current&&i.handlers&&i.handlers.onPointerMove(s.lastEvent.current)},connect:t=>{var i;const{set:s,events:r}=n.getState();r.disconnect==null||r.disconnect(),s(o=>({events:{...o.events,connected:t}})),Object.entries((i=r.handlers)!=null?i:[]).forEach(([o,a])=>{const[l,c]=pm[o];t.addEventListener(l,a,{passive:c})})},disconnect:()=>{const{set:t,events:i}=n.getState();if(i.connected){var s;Object.entries((s=i.handlers)!=null?s:[]).forEach(([r,o])=>{if(i&&i.connected instanceof HTMLElement){const[a]=pm[r];i.connected.removeEventListener(a,o)}}),t(r=>({events:{...r.events,connected:void 0}}))}}}}const lT=D.forwardRef(function({children:e,fallback:t,resize:i,style:s,gl:r,events:o=aT,eventSource:a,eventPrefix:l,shadows:c,linear:u,flat:C,legacy:d,orthographic:h,frameloop:f,dpr:v,performance:y,raycaster:A,camera:b,onPointerMissed:m,onCreated:B,...S},x){D.useMemo(()=>MW(hL),[]);const R=oT(),[M,Z]=_L({scroll:!0,debounce:{scroll:50,resize:0},...i}),V=D.useRef(null),N=D.useRef(null);D.useImperativeHandle(x,()=>V.current);const k=XW(m),[E,$]=D.useState(!1),[te,Ce]=D.useState(!1);if(E)throw E;if(te)throw te;const le=D.useRef(null);Cc(()=>{const _=V.current;Z.width>0&&Z.height>0&&_&&(le.current||(le.current=EL(_)),le.current.configure({gl:r,events:o,shadows:c,linear:u,flat:C,legacy:d,orthographic:h,frameloop:f,dpr:v,performance:y,raycaster:A,camera:b,size:Z,onPointerMissed:(...U)=>k.current==null?void 0:k.current(...U),onCreated:U=>{U.events.connect==null||U.events.connect(a?ZL(a)?a.current:a:N.current),l&&U.setEvents({compute:(ce,se)=>{const ee=ce[l+"X"],re=ce[l+"Y"];se.pointer.set(ee/se.size.width*2-1,-(re/se.size.height)*2+1),se.raycaster.setFromCamera(se.pointer,se.camera)}}),B?.(U)}}),le.current.render(D.createElement(R,null,D.createElement(YW,{set:Ce},D.createElement(D.Suspense,{fallback:D.createElement(wL,{set:$})},e)))))}),D.useEffect(()=>{const _=V.current;if(_)return()=>DW(_)},[]);const L=a?"none":"auto";return D.createElement("div",lA({ref:N,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:L,...s}},S),D.createElement("div",{ref:M,style:{width:"100%",height:"100%"}},D.createElement("canvas",{ref:V,style:{display:"block"}},t)))}),gT=D.forwardRef(function(e,t){return D.createElement(JW,null,D.createElement(lT,lA({},e,{ref:t})))});var Iy={exports:{}},Eg=typeof Reflect=="object"?Reflect:null,OZ=Eg&&typeof Eg.apply=="function"?Eg.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)},Wh;Eg&&typeof Eg.ownKeys=="function"?Wh=Eg.ownKeys:Object.getOwnPropertySymbols?Wh=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Wh=function(e){return Object.getOwnPropertyNames(e)};function cT(n){console&&console.warn&&console.warn(n)}var OW=Number.isNaN||function(e){return e!==e};function qt(){qt.init.call(this)}Iy.exports=qt;Iy.exports.once=dT;qt.EventEmitter=qt;qt.prototype._events=void 0;qt.prototype._eventsCount=0;qt.prototype._maxListeners=void 0;var QZ=10;function OA(n){if(typeof n!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n)}Object.defineProperty(qt,"defaultMaxListeners",{enumerable:!0,get:function(){return QZ},set:function(n){if(typeof n!="number"||n<0||OW(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");QZ=n}});qt.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};qt.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||OW(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function QW(n){return n._maxListeners===void 0?qt.defaultMaxListeners:n._maxListeners}qt.prototype.getMaxListeners=function(){return QW(this)};qt.prototype.emit=function(e){for(var t=[],i=1;i0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var l=r[e];if(l===void 0)return!1;if(typeof l=="function")OZ(l,this,t);else for(var c=l.length,u=tV(l,c),i=0;i0&&o.length>s&&!o.warned){o.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=n,a.type=e,a.count=o.length,cT(a)}return n}qt.prototype.addListener=function(e,t){return jW(this,e,t,!1)};qt.prototype.on=qt.prototype.addListener;qt.prototype.prependListener=function(e,t){return jW(this,e,t,!0)};function IT(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function qW(n,e,t){var i={fired:!1,wrapFn:void 0,target:n,type:e,listener:t},s=IT.bind(i);return s.listener=t,i.wrapFn=s,s}qt.prototype.once=function(e,t){return OA(t),this.on(e,qW(this,e,t)),this};qt.prototype.prependOnceListener=function(e,t){return OA(t),this.prependListener(e,qW(this,e,t)),this};qt.prototype.removeListener=function(e,t){var i,s,r,o,a;if(OA(t),s=this._events,s===void 0)return this;if(i=s[e],i===void 0)return this;if(i===t||i.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete s[e],s.removeListener&&this.emit("removeListener",e,i.listener||t));else if(typeof i!="function"){for(r=-1,o=i.length-1;o>=0;o--)if(i[o]===t||i[o].listener===t){a=i[o].listener,r=o;break}if(r<0)return this;r===0?i.shift():uT(i,r),i.length===1&&(s[e]=i[0]),s.removeListener!==void 0&&this.emit("removeListener",e,a||t)}return this};qt.prototype.off=qt.prototype.removeListener;qt.prototype.removeAllListeners=function(e){var t,i,s;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[e]),this;if(arguments.length===0){var r=Object.keys(i),o;for(s=0;s=0;s--)this.removeListener(e,t[s]);return this};function $W(n,e,t){var i=n._events;if(i===void 0)return[];var s=i[e];return s===void 0?[]:typeof s=="function"?t?[s.listener||s]:[s]:t?CT(s):tV(s,s.length)}qt.prototype.listeners=function(e){return $W(this,e,!0)};qt.prototype.rawListeners=function(e){return $W(this,e,!1)};qt.listenerCount=function(n,e){return typeof n.listenerCount=="function"?n.listenerCount(e):eV.call(n,e)};qt.prototype.listenerCount=eV;function eV(n){var e=this._events;if(e!==void 0){var t=e[n];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}qt.prototype.eventNames=function(){return this._eventsCount>0?Wh(this._events):[]};function tV(n,e){for(var t=new Array(e),i=0;i{if(e.data.op==="frame"){this.buffers.positions=e.data.positions,this.buffers.quaternions=e.data.quaternions,this.emit(e.data.op,e.data);return}this.emit(e.data.type,e.data)};for(const e of this.messageQueue)this.worker.postMessage(e);this.messageQueue.length=0}disableConstraint(e){let{uuid:t}=e;this.postMessage({op:"disableConstraint",uuid:t})}disableConstraintMotor(e){let{uuid:t}=e;this.postMessage({op:"disableConstraintMotor",uuid:t})}disconnect(){this.worker&&(this.worker.onmessage=null)}enableConstraint(e){let{uuid:t}=e;this.postMessage({op:"enableConstraint",uuid:t})}enableConstraintMotor(e){let{uuid:t}=e;this.postMessage({op:"enableConstraintMotor",uuid:t})}init(){const{allowSleep:e,axisIndex:t,broadphase:i,defaultContactMaterial:s,frictionGravity:r,gravity:o,iterations:a,quatNormalizeFast:l,quatNormalizeSkip:c,solver:u,tolerance:C}=this.config;this.postMessage({op:"init",props:{allowSleep:e,axisIndex:t,broadphase:i,defaultContactMaterial:s,frictionGravity:r,gravity:o,iterations:a,quatNormalizeFast:l,quatNormalizeSkip:c,solver:u,tolerance:C}})}removeBodies(e){let{uuid:t}=e;this.postMessage({op:"removeBodies",uuid:t})}removeConstraint(e){let{uuid:t}=e;this.postMessage({op:"removeConstraint",uuid:t})}removeContactMaterial(e){let{uuid:t}=e;this.postMessage({op:"removeContactMaterial",uuid:t})}removeRay(e){let{uuid:t}=e;this.postMessage({op:"removeRay",uuid:t})}removeRaycastVehicle(e){let{uuid:t}=e;this.postMessage({op:"removeRaycastVehicle",uuid:t})}removeSpring(e){let{uuid:t}=e;this.postMessage({op:"removeSpring",uuid:t})}setAllowSleep(e){let{props:t,uuid:i}=e;this.postMessage({op:"setAllowSleep",props:t,uuid:i})}setAngularDamping(e){let{props:t,uuid:i}=e;this.postMessage({op:"setAngularDamping",props:t,uuid:i})}setAngularFactor(e){let{props:t,uuid:i}=e;this.postMessage({op:"setAngularFactor",props:t,uuid:i})}setAngularVelocity(e){let{props:t,uuid:i}=e;this.postMessage({op:"setAngularVelocity",props:t,uuid:i})}setCollisionFilterGroup(e){let{props:t,uuid:i}=e;this.postMessage({op:"setCollisionFilterGroup",props:t,uuid:i})}setCollisionFilterMask(e){let{props:t,uuid:i}=e;this.postMessage({op:"setCollisionFilterMask",props:t,uuid:i})}setCollisionResponse(e){let{props:t,uuid:i}=e;this.postMessage({op:"setCollisionResponse",props:t,uuid:i})}setConstraintMotorMaxForce(e){let{props:t,uuid:i}=e;this.postMessage({op:"setConstraintMotorMaxForce",props:t,uuid:i})}setConstraintMotorSpeed(e){let{props:t,uuid:i}=e;this.postMessage({op:"setConstraintMotorSpeed",props:t,uuid:i})}setFixedRotation(e){let{props:t,uuid:i}=e;this.postMessage({op:"setFixedRotation",props:t,uuid:i})}setIsTrigger(e){let{props:t,uuid:i}=e;this.postMessage({op:"setIsTrigger",props:t,uuid:i})}setLinearDamping(e){let{props:t,uuid:i}=e;this.postMessage({op:"setLinearDamping",props:t,uuid:i})}setLinearFactor(e){let{props:t,uuid:i}=e;this.postMessage({op:"setLinearFactor",props:t,uuid:i})}setMass(e){let{props:t,uuid:i}=e;this.postMessage({op:"setMass",props:t,uuid:i})}setMaterial(e){let{props:t,uuid:i}=e;this.postMessage({op:"setMaterial",props:t,uuid:i})}setPosition(e){let{props:t,uuid:i}=e;this.postMessage({op:"setPosition",props:t,uuid:i})}setQuaternion(e){let{props:[t,i,s,r],uuid:o}=e;this.postMessage({op:"setQuaternion",props:[t,i,s,r],uuid:o})}setRaycastVehicleBrake(e){let{props:t,uuid:i}=e;this.postMessage({op:"setRaycastVehicleBrake",props:t,uuid:i})}setRaycastVehicleSteeringValue(e){let{props:t,uuid:i}=e;this.postMessage({op:"setRaycastVehicleSteeringValue",props:t,uuid:i})}setRotation(e){let{props:t,uuid:i}=e;this.postMessage({op:"setRotation",props:t,uuid:i})}setSleepSpeedLimit(e){let{props:t,uuid:i}=e;this.postMessage({op:"setSleepSpeedLimit",props:t,uuid:i})}setSleepTimeLimit(e){let{props:t,uuid:i}=e;this.postMessage({op:"setSleepTimeLimit",props:t,uuid:i})}setSpringDamping(e){let{props:t,uuid:i}=e;this.postMessage({op:"setSpringDamping",props:t,uuid:i})}setSpringRestLength(e){let{props:t,uuid:i}=e;this.postMessage({op:"setSpringRestLength",props:t,uuid:i})}setSpringStiffness(e){let{props:t,uuid:i}=e;this.postMessage({op:"setSpringStiffness",props:t,uuid:i})}setUserData(e){let{props:t,uuid:i}=e;this.postMessage({op:"setUserData",props:t,uuid:i})}setVelocity(e){let{props:t,uuid:i}=e;this.postMessage({op:"setVelocity",props:t,uuid:i})}sleep(e){let{uuid:t}=e;this.postMessage({op:"sleep",uuid:t})}step(e){var t;const{buffers:{positions:i,quaternions:s}}=this;!i.byteLength&&!s.byteLength||(t=this.worker)==null||t.postMessage({op:"step",positions:i,props:e,quaternions:s},[i.buffer,s.buffer])}subscribe(e){let{props:{id:t,target:i,type:s},uuid:r}=e;this.postMessage({op:"subscribe",props:{id:t,target:i,type:s},uuid:r})}terminate(){var e;(e=this.worker)==null||e.terminate(),this.worker=null}unsubscribe(e){let{props:t}=e;this.postMessage({op:"unsubscribe",props:t})}wakeUp(e){let{uuid:t}=e;this.postMessage({op:"wakeUp",uuid:t})}postMessage(e){if(this.worker)return this.worker.postMessage(e);this.messageQueue.push(e)}}class ao{constructor(e){e===void 0&&(e=[0,0,0,0,0,0,0,0,0]),this.elements=e}identity(){const e=this.elements;e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1}setZero(){const e=this.elements;e[0]=0,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=0,e[6]=0,e[7]=0,e[8]=0}setTrace(e){const t=this.elements;t[0]=e.x,t[4]=e.y,t[8]=e.z}getTrace(e){e===void 0&&(e=new F);const t=this.elements;return e.x=t[0],e.y=t[4],e.z=t[8],e}vmult(e,t){t===void 0&&(t=new F);const i=this.elements,s=e.x,r=e.y,o=e.z;return t.x=i[0]*s+i[1]*r+i[2]*o,t.y=i[3]*s+i[4]*r+i[5]*o,t.z=i[6]*s+i[7]*r+i[8]*o,t}smult(e){for(let t=0;t0){const r=1/s;this.x*=r,this.y*=r,this.z*=r}else this.x=0,this.y=0,this.z=0;return s}unit(e){e===void 0&&(e=new F);const t=this.x,i=this.y,s=this.z;let r=Math.sqrt(t*t+i*i+s*s);return r>0?(r=1/r,e.x=t*r,e.y=i*r,e.z=s*r):(e.x=1,e.y=0,e.z=0),e}length(){const e=this.x,t=this.y,i=this.z;return Math.sqrt(e*e+t*t+i*i)}lengthSquared(){return this.dot(this)}distanceTo(e){const t=this.x,i=this.y,s=this.z,r=e.x,o=e.y,a=e.z;return Math.sqrt((r-t)*(r-t)+(o-i)*(o-i)+(a-s)*(a-s))}distanceSquared(e){const t=this.x,i=this.y,s=this.z,r=e.x,o=e.y,a=e.z;return(r-t)*(r-t)+(o-i)*(o-i)+(a-s)*(a-s)}scale(e,t){t===void 0&&(t=new F);const i=this.x,s=this.y,r=this.z;return t.x=e*i,t.y=e*s,t.z=e*r,t}vmul(e,t){return t===void 0&&(t=new F),t.x=e.x*this.x,t.y=e.y*this.y,t.z=e.z*this.z,t}addScaledVector(e,t,i){return i===void 0&&(i=new F),i.x=this.x+e*t.x,i.y=this.y+e*t.y,i.z=this.z+e*t.z,i}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}isZero(){return this.x===0&&this.y===0&&this.z===0}negate(e){return e===void 0&&(e=new F),e.x=-this.x,e.y=-this.y,e.z=-this.z,e}tangents(e,t){const i=this.length();if(i>0){const s=GT,r=1/i;s.set(this.x*r,this.y*r,this.z*r);const o=BT;Math.abs(s.x)<.9?(o.set(1,0,0),s.cross(o,e)):(o.set(0,1,0),s.cross(o,e)),s.cross(e,t)}else e.set(1,0,0),t.set(0,1,0)}toString(){return`${this.x},${this.y},${this.z}`}toArray(){return[this.x,this.y,this.z]}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}lerp(e,t,i){const s=this.x,r=this.y,o=this.z;i.x=s+(e.x-s)*t,i.y=r+(e.y-r)*t,i.z=o+(e.z-o)*t}almostEquals(e,t){return t===void 0&&(t=1e-6),!(Math.abs(this.x-e.x)>t||Math.abs(this.y-e.y)>t||Math.abs(this.z-e.z)>t)}almostZero(e){return e===void 0&&(e=1e-6),!(Math.abs(this.x)>e||Math.abs(this.y)>e||Math.abs(this.z)>e)}isAntiparallelTo(e,t){return this.negate(jZ),jZ.almostEquals(e,t)}clone(){return new F(this.x,this.y,this.z)}}F.ZERO=new F(0,0,0);F.UNIT_X=new F(1,0,0);F.UNIT_Y=new F(0,1,0);F.UNIT_Z=new F(0,0,1);const GT=new F,BT=new F,jZ=new F;class Ls{constructor(e){e===void 0&&(e={}),this.lowerBound=new F,this.upperBound=new F,e.lowerBound&&this.lowerBound.copy(e.lowerBound),e.upperBound&&this.upperBound.copy(e.upperBound)}setFromPoints(e,t,i,s){const r=this.lowerBound,o=this.upperBound,a=i;r.copy(e[0]),a&&a.vmult(r,r),o.copy(r);for(let l=1;lo.x&&(o.x=c.x),c.xo.y&&(o.y=c.y),c.yo.z&&(o.z=c.z),c.z=r.x&&t.y<=s.y&&i.y>=r.y&&t.z<=s.z&&i.z>=r.z}getCorners(e,t,i,s,r,o,a,l){const c=this.lowerBound,u=this.upperBound;e.copy(c),t.set(u.x,c.y,c.z),i.set(u.x,u.y,c.z),s.set(c.x,u.y,u.z),r.set(u.x,c.y,u.z),o.set(c.x,u.y,c.z),a.set(c.x,c.y,u.z),l.copy(u)}toLocalFrame(e,t){const i=$Z,s=i[0],r=i[1],o=i[2],a=i[3],l=i[4],c=i[5],u=i[6],C=i[7];this.getCorners(s,r,o,a,l,c,u,C);for(let d=0;d!==8;d++){const h=i[d];e.pointToLocal(h,h)}return t.setFromPoints(i)}toWorldFrame(e,t){const i=$Z,s=i[0],r=i[1],o=i[2],a=i[3],l=i[4],c=i[5],u=i[6],C=i[7];this.getCorners(s,r,o,a,l,c,u,C);for(let d=0;d!==8;d++){const h=i[d];e.pointToWorld(h,h)}return t.setFromPoints(i)}overlapsRay(e){const{direction:t,from:i}=e,s=1/t.x,r=1/t.y,o=1/t.z,a=(this.lowerBound.x-i.x)*s,l=(this.upperBound.x-i.x)*s,c=(this.lowerBound.y-i.y)*r,u=(this.upperBound.y-i.y)*r,C=(this.lowerBound.z-i.z)*o,d=(this.upperBound.z-i.z)*o,h=Math.max(Math.max(Math.min(a,l),Math.min(c,u)),Math.min(C,d)),f=Math.min(Math.min(Math.max(a,l),Math.max(c,u)),Math.max(C,d));return!(f<0||h>f)}}const qZ=new F,$Z=[new F,new F,new F,new F,new F,new F,new F,new F];class Si{constructor(e,t,i,s){e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i=0),s===void 0&&(s=1),this.x=e,this.y=t,this.z=i,this.w=s}set(e,t,i,s){return this.x=e,this.y=t,this.z=i,this.w=s,this}toString(){return`${this.x},${this.y},${this.z},${this.w}`}toArray(){return[this.x,this.y,this.z,this.w]}setFromAxisAngle(e,t){const i=Math.sin(t*.5);return this.x=e.x*i,this.y=e.y*i,this.z=e.z*i,this.w=Math.cos(t*.5),this}toAxisAngle(e){e===void 0&&(e=new F),this.normalize();const t=2*Math.acos(this.w),i=Math.sqrt(1-this.w*this.w);return i<.001?(e.x=this.x,e.y=this.y,e.z=this.z):(e.x=this.x/i,e.y=this.y/i,e.z=this.z/i),[e,t]}setFromVectors(e,t){if(e.isAntiparallelTo(t)){const i=ZT,s=wT;e.tangents(i,s),this.setFromAxisAngle(i,Math.PI)}else{const i=e.cross(t);this.x=i.x,this.y=i.y,this.z=i.z,this.w=Math.sqrt(e.length()**2*t.length()**2)+e.dot(t),this.normalize()}return this}mult(e,t){t===void 0&&(t=new Si);const i=this.x,s=this.y,r=this.z,o=this.w,a=e.x,l=e.y,c=e.z,u=e.w;return t.x=i*u+o*a+s*c-r*l,t.y=s*u+o*l+r*a-i*c,t.z=r*u+o*c+i*l-s*a,t.w=o*u-i*a-s*l-r*c,t}inverse(e){e===void 0&&(e=new Si);const t=this.x,i=this.y,s=this.z,r=this.w;this.conjugate(e);const o=1/(t*t+i*i+s*s+r*r);return e.x*=o,e.y*=o,e.z*=o,e.w*=o,e}conjugate(e){return e===void 0&&(e=new Si),e.x=-this.x,e.y=-this.y,e.z=-this.z,e.w=this.w,e}normalize(){let e=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);return e===0?(this.x=0,this.y=0,this.z=0,this.w=0):(e=1/e,this.x*=e,this.y*=e,this.z*=e,this.w*=e),this}normalizeFast(){const e=(3-(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w))/2;return e===0?(this.x=0,this.y=0,this.z=0,this.w=0):(this.x*=e,this.y*=e,this.z*=e,this.w*=e),this}vmult(e,t){t===void 0&&(t=new F);const i=e.x,s=e.y,r=e.z,o=this.x,a=this.y,l=this.z,c=this.w,u=c*i+a*r-l*s,C=c*s+l*i-o*r,d=c*r+o*s-a*i,h=-o*i-a*s-l*r;return t.x=u*c+h*-o+C*-l-d*-a,t.y=C*c+h*-a+d*-o-u*-l,t.z=d*c+h*-l+u*-a-C*-o,t}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this}toEuler(e,t){t===void 0&&(t="YZX");let i,s,r;const o=this.x,a=this.y,l=this.z,c=this.w;switch(t){case"YZX":const u=o*a+l*c;if(u>.499&&(i=2*Math.atan2(o,c),s=Math.PI/2,r=0),u<-.499&&(i=-2*Math.atan2(o,c),s=-Math.PI/2,r=0),i===void 0){const C=o*o,d=a*a,h=l*l;i=Math.atan2(2*a*c-2*o*l,1-2*d-2*h),s=Math.asin(2*u),r=Math.atan2(2*o*c-2*a*l,1-2*C-2*h)}break;default:throw new Error(`Euler order ${t} not supported yet.`)}e.y=i,e.z=s,e.x=r}setFromEuler(e,t,i,s){s===void 0&&(s="XYZ");const r=Math.cos(e/2),o=Math.cos(t/2),a=Math.cos(i/2),l=Math.sin(e/2),c=Math.sin(t/2),u=Math.sin(i/2);return s==="XYZ"?(this.x=l*o*a+r*c*u,this.y=r*c*a-l*o*u,this.z=r*o*u+l*c*a,this.w=r*o*a-l*c*u):s==="YXZ"?(this.x=l*o*a+r*c*u,this.y=r*c*a-l*o*u,this.z=r*o*u-l*c*a,this.w=r*o*a+l*c*u):s==="ZXY"?(this.x=l*o*a-r*c*u,this.y=r*c*a+l*o*u,this.z=r*o*u+l*c*a,this.w=r*o*a-l*c*u):s==="ZYX"?(this.x=l*o*a-r*c*u,this.y=r*c*a+l*o*u,this.z=r*o*u-l*c*a,this.w=r*o*a+l*c*u):s==="YZX"?(this.x=l*o*a+r*c*u,this.y=r*c*a+l*o*u,this.z=r*o*u-l*c*a,this.w=r*o*a-l*c*u):s==="XZY"&&(this.x=l*o*a-r*c*u,this.y=r*c*a-l*o*u,this.z=r*o*u+l*c*a,this.w=r*o*a+l*c*u),this}clone(){return new Si(this.x,this.y,this.z,this.w)}slerp(e,t,i){i===void 0&&(i=new Si);const s=this.x,r=this.y,o=this.z,a=this.w;let l=e.x,c=e.y,u=e.z,C=e.w,d,h,f,v,y;return h=s*l+r*c+o*u+a*C,h<0&&(h=-h,l=-l,c=-c,u=-u,C=-C),1-h>1e-6?(d=Math.acos(h),f=Math.sin(d),v=Math.sin((1-t)*d)/f,y=Math.sin(t*d)/f):(v=1-t,y=t),i.x=v*s+y*l,i.y=v*r+y*c,i.z=v*o+y*u,i.w=v*a+y*C,i}integrate(e,t,i,s){s===void 0&&(s=new Si);const r=e.x*i.x,o=e.y*i.y,a=e.z*i.z,l=this.x,c=this.y,u=this.z,C=this.w,d=t*.5;return s.x+=d*(r*C+o*u-a*c),s.y+=d*(o*C+a*l-r*u),s.z+=d*(a*C+r*c-o*l),s.w+=d*(-r*l-o*c-a*u),s}}const ZT=new F,wT=new F,ST={SPHERE:1,PLANE:2,BOX:4,COMPOUND:8,CONVEXPOLYHEDRON:16,HEIGHTFIELD:32,PARTICLE:64,CYLINDER:128,TRIMESH:256};class _e{constructor(e){e===void 0&&(e={}),this.id=_e.idCounter++,this.type=e.type||0,this.boundingSphereRadius=0,this.collisionResponse=e.collisionResponse?e.collisionResponse:!0,this.collisionFilterGroup=e.collisionFilterGroup!==void 0?e.collisionFilterGroup:1,this.collisionFilterMask=e.collisionFilterMask!==void 0?e.collisionFilterMask:-1,this.material=e.material?e.material:null,this.body=null}updateBoundingSphereRadius(){throw`computeBoundingSphereRadius() not implemented for shape type ${this.type}`}volume(){throw`volume() not implemented for shape type ${this.type}`}calculateLocalInertia(e,t){throw`calculateLocalInertia() not implemented for shape type ${this.type}`}calculateWorldAABB(e,t,i,s){throw`calculateWorldAABB() not implemented for shape type ${this.type}`}}_e.idCounter=0;_e.types=ST;class Ti{constructor(e){e===void 0&&(e={}),this.position=new F,this.quaternion=new Si,e.position&&this.position.copy(e.position),e.quaternion&&this.quaternion.copy(e.quaternion)}pointToLocal(e,t){return Ti.pointToLocalFrame(this.position,this.quaternion,e,t)}pointToWorld(e,t){return Ti.pointToWorldFrame(this.position,this.quaternion,e,t)}vectorToWorldFrame(e,t){return t===void 0&&(t=new F),this.quaternion.vmult(e,t),t}static pointToLocalFrame(e,t,i,s){return s===void 0&&(s=new F),i.vsub(e,s),t.conjugate(ew),ew.vmult(s,s),s}static pointToWorldFrame(e,t,i,s){return s===void 0&&(s=new F),t.vmult(i,s),s.vadd(e,s),s}static vectorToWorldFrame(e,t,i){return i===void 0&&(i=new F),e.vmult(t,i),i}static vectorToLocalFrame(e,t,i,s){return s===void 0&&(s=new F),t.w*=-1,t.vmult(i,s),t.w*=-1,s}}const ew=new Si;new F;new F;new F;new F;new F,new F,new F,new F,new F,new F,new F,new F;new F;new Si;new Ls;new ao;new ao;new ao;new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;new Si;new F;new F;new F;new F;class ub{constructor(){this.rayFromWorld=new F,this.rayToWorld=new F,this.hitNormalWorld=new F,this.hitPointWorld=new F,this.hasHit=!1,this.shape=null,this.body=null,this.hitFaceIndex=-1,this.distance=-1,this.shouldStop=!1}reset(){this.rayFromWorld.setZero(),this.rayToWorld.setZero(),this.hitNormalWorld.setZero(),this.hitPointWorld.setZero(),this.hasHit=!1,this.shape=null,this.body=null,this.hitFaceIndex=-1,this.distance=-1,this.shouldStop=!1}abort(){this.shouldStop=!0}set(e,t,i,s,r,o,a){this.rayFromWorld.copy(e),this.rayToWorld.copy(t),this.hitNormalWorld.copy(i),this.hitPointWorld.copy(s),this.shape=r,this.body=o,this.distance=a}}let iV,sV,rV,oV,aV,lV,gV;const uy={CLOSEST:1,ANY:2,ALL:4};iV=_e.types.SPHERE;sV=_e.types.PLANE;rV=_e.types.BOX;oV=_e.types.CYLINDER;aV=_e.types.CONVEXPOLYHEDRON;lV=_e.types.HEIGHTFIELD;gV=_e.types.TRIMESH;class pi{get[iV](){return this._intersectSphere}get[sV](){return this._intersectPlane}get[rV](){return this._intersectBox}get[oV](){return this._intersectConvex}get[aV](){return this._intersectConvex}get[lV](){return this._intersectHeightfield}get[gV](){return this._intersectTrimesh}constructor(e,t){e===void 0&&(e=new F),t===void 0&&(t=new F),this.from=e.clone(),this.to=t.clone(),this.direction=new F,this.precision=1e-4,this.checkCollisionResponse=!0,this.skipBackfaces=!1,this.collisionFilterMask=-1,this.collisionFilterGroup=-1,this.mode=pi.ANY,this.result=new ub,this.hasHit=!1,this.callback=i=>{}}intersectWorld(e,t){return this.mode=t.mode||pi.ANY,this.result=t.result||new ub,this.skipBackfaces=!!t.skipBackfaces,this.collisionFilterMask=typeof t.collisionFilterMask<"u"?t.collisionFilterMask:-1,this.collisionFilterGroup=typeof t.collisionFilterGroup<"u"?t.collisionFilterGroup:-1,this.checkCollisionResponse=typeof t.checkCollisionResponse<"u"?t.checkCollisionResponse:!0,t.from&&this.from.copy(t.from),t.to&&this.to.copy(t.to),this.callback=t.callback||(()=>{}),this.hasHit=!1,this.result.reset(),this.updateDirection(),this.getAABB(tw),fm.length=0,e.broadphase.aabbQuery(e,tw,fm),this.intersectBodies(fm),this.hasHit}intersectBody(e,t){t&&(this.result=t,this.updateDirection());const i=this.checkCollisionResponse;if(i&&!e.collisionResponse||!(this.collisionFilterGroup&e.collisionFilterMask)||!(e.collisionFilterGroup&this.collisionFilterMask))return;const s=xT,r=RT;for(let o=0,a=e.shapes.length;oe.boundingSphereRadius)return;const a=this[e.type];a&&a.call(this,e,t,i,s,e)}_intersectBox(e,t,i,s,r){return this._intersectConvex(e.convexPolyhedronRepresentation,t,i,s,r)}_intersectPlane(e,t,i,s,r){const o=this.from,a=this.to,l=this.direction,c=new F(0,0,1);t.vmult(c,c);const u=new F;o.vsub(i,u);const C=u.dot(c);a.vsub(i,u);const d=u.dot(c);if(C*d>0||o.distanceTo(a)=0&&v<=1&&(o.lerp(a,v,h),h.vsub(i,f),f.normalize(),this.reportIntersection(f,h,r,s,-1)),this.result.shouldStop)return;y>=0&&y<=1&&(o.lerp(a,y,h),h.vsub(i,f),f.normalize(),this.reportIntersection(f,h,r,s,-1))}}_intersectConvex(e,t,i,s,r,o){const a=HT,l=iw,c=o&&o.faceList||null,u=e.faces,C=e.vertices,d=e.faceNormals,h=this.direction,f=this.from,v=this.to,y=f.distanceTo(v),A=c?c.length:u.length,b=this.result;for(let m=0;!b.shouldStop&&my||this.reportIntersection(a,Fi,r,s,B)}}}}_intersectTrimesh(e,t,i,s,r,o){const a=XT,l=TT,c=ET,u=iw,C=YT,d=FT,h=KT,f=LT,v=zT,y=e.indices;e.vertices;const A=this.from,b=this.to,m=this.direction;c.position.copy(i),c.quaternion.copy(t),Ti.vectorToLocalFrame(i,t,m,C),Ti.pointToLocalFrame(i,t,A,d),Ti.pointToLocalFrame(i,t,b,h),h.x*=e.scale.x,h.y*=e.scale.y,h.z*=e.scale.z,d.x*=e.scale.x,d.y*=e.scale.y,d.z*=e.scale.z,h.vsub(d,C),C.normalize();const B=d.distanceSquared(h);e.tree.rayQuery(this,c,l);for(let S=0,x=l.length;!this.result.shouldStop&&S!==x;S++){const R=l[S];e.getNormal(R,a),e.getVertex(y[R*3],$s),$s.vsub(d,u);const M=C.dot(a),Z=a.dot(u)/M;if(Z<0)continue;C.scale(Z,Fi),Fi.vadd(d,Fi),e.getVertex(y[R*3+1],Br),e.getVertex(y[R*3+2],Zr);const V=Fi.distanceSquared(d);!(pi.pointInTriangle(Fi,Br,$s,Zr)||pi.pointInTriangle(Fi,$s,Br,Zr))||V>B||(Ti.vectorToWorldFrame(t,a,v),Ti.pointToWorldFrame(i,t,Fi,f),this.reportIntersection(v,f,r,s,R))}l.length=0}reportIntersection(e,t,i,s,r){const o=this.from,a=this.to,l=o.distanceTo(t),c=this.result;if(!(this.skipBackfaces&&e.dot(this.direction)>0))switch(c.hitFaceIndex=typeof r<"u"?r:-1,this.mode){case pi.ALL:this.hasHit=!0,c.set(o,a,e,t,i,s,l),c.hasHit=!0,this.callback(c);break;case pi.CLOSEST:(l=0&&(C=r*c-o*a)>=0&&u+CDate.now()-n}new F;class lo{constructor(e){e===void 0&&(e=[0,0,0,0,0,0,0,0,0]),this.elements=e}identity(){const e=this.elements;e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1}setZero(){const e=this.elements;e[0]=0,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=0,e[6]=0,e[7]=0,e[8]=0}setTrace(e){const t=this.elements;t[0]=e.x,t[4]=e.y,t[8]=e.z}getTrace(e){e===void 0&&(e=new K);const t=this.elements;return e.x=t[0],e.y=t[4],e.z=t[8],e}vmult(e,t){t===void 0&&(t=new K);const i=this.elements,s=e.x,r=e.y,o=e.z;return t.x=i[0]*s+i[1]*r+i[2]*o,t.y=i[3]*s+i[4]*r+i[5]*o,t.z=i[6]*s+i[7]*r+i[8]*o,t}smult(e){for(let t=0;t0){const r=1/s;this.x*=r,this.y*=r,this.z*=r}else this.x=0,this.y=0,this.z=0;return s}unit(e){e===void 0&&(e=new K);const t=this.x,i=this.y,s=this.z;let r=Math.sqrt(t*t+i*i+s*s);return r>0?(r=1/r,e.x=t*r,e.y=i*r,e.z=s*r):(e.x=1,e.y=0,e.z=0),e}length(){const e=this.x,t=this.y,i=this.z;return Math.sqrt(e*e+t*t+i*i)}lengthSquared(){return this.dot(this)}distanceTo(e){const t=this.x,i=this.y,s=this.z,r=e.x,o=e.y,a=e.z;return Math.sqrt((r-t)*(r-t)+(o-i)*(o-i)+(a-s)*(a-s))}distanceSquared(e){const t=this.x,i=this.y,s=this.z,r=e.x,o=e.y,a=e.z;return(r-t)*(r-t)+(o-i)*(o-i)+(a-s)*(a-s)}scale(e,t){t===void 0&&(t=new K);const i=this.x,s=this.y,r=this.z;return t.x=e*i,t.y=e*s,t.z=e*r,t}vmul(e,t){return t===void 0&&(t=new K),t.x=e.x*this.x,t.y=e.y*this.y,t.z=e.z*this.z,t}addScaledVector(e,t,i){return i===void 0&&(i=new K),i.x=this.x+e*t.x,i.y=this.y+e*t.y,i.z=this.z+e*t.z,i}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}isZero(){return this.x===0&&this.y===0&&this.z===0}negate(e){return e===void 0&&(e=new K),e.x=-this.x,e.y=-this.y,e.z=-this.z,e}tangents(e,t){const i=this.length();if(i>0){const s=UT,r=1/i;s.set(this.x*r,this.y*r,this.z*r);const o=PT;Math.abs(s.x)<.9?(o.set(1,0,0),s.cross(o,e)):(o.set(0,1,0),s.cross(o,e)),s.cross(e,t)}else e.set(1,0,0),t.set(0,1,0)}toString(){return`${this.x},${this.y},${this.z}`}toArray(){return[this.x,this.y,this.z]}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}lerp(e,t,i){const s=this.x,r=this.y,o=this.z;i.x=s+(e.x-s)*t,i.y=r+(e.y-r)*t,i.z=o+(e.z-o)*t}almostEquals(e,t){return t===void 0&&(t=1e-6),!(Math.abs(this.x-e.x)>t||Math.abs(this.y-e.y)>t||Math.abs(this.z-e.z)>t)}almostZero(e){return e===void 0&&(e=1e-6),!(Math.abs(this.x)>e||Math.abs(this.y)>e||Math.abs(this.z)>e)}isAntiparallelTo(e,t){return this.negate(sw),sw.almostEquals(e,t)}clone(){return new K(this.x,this.y,this.z)}}K.ZERO=new K(0,0,0);K.UNIT_X=new K(1,0,0);K.UNIT_Y=new K(0,1,0);K.UNIT_Z=new K(0,0,1);const UT=new K,PT=new K,sw=new K;class Ts{constructor(e){e===void 0&&(e={}),this.lowerBound=new K,this.upperBound=new K,e.lowerBound&&this.lowerBound.copy(e.lowerBound),e.upperBound&&this.upperBound.copy(e.upperBound)}setFromPoints(e,t,i,s){const r=this.lowerBound,o=this.upperBound,a=i;r.copy(e[0]),a&&a.vmult(r,r),o.copy(r);for(let l=1;lo.x&&(o.x=c.x),c.xo.y&&(o.y=c.y),c.yo.z&&(o.z=c.z),c.z=r.x&&t.y<=s.y&&i.y>=r.y&&t.z<=s.z&&i.z>=r.z}getCorners(e,t,i,s,r,o,a,l){const c=this.lowerBound,u=this.upperBound;e.copy(c),t.set(u.x,c.y,c.z),i.set(u.x,u.y,c.z),s.set(c.x,u.y,u.z),r.set(u.x,c.y,u.z),o.set(c.x,u.y,c.z),a.set(c.x,c.y,u.z),l.copy(u)}toLocalFrame(e,t){const i=ow,s=i[0],r=i[1],o=i[2],a=i[3],l=i[4],c=i[5],u=i[6],C=i[7];this.getCorners(s,r,o,a,l,c,u,C);for(let d=0;d!==8;d++){const h=i[d];e.pointToLocal(h,h)}return t.setFromPoints(i)}toWorldFrame(e,t){const i=ow,s=i[0],r=i[1],o=i[2],a=i[3],l=i[4],c=i[5],u=i[6],C=i[7];this.getCorners(s,r,o,a,l,c,u,C);for(let d=0;d!==8;d++){const h=i[d];e.pointToWorld(h,h)}return t.setFromPoints(i)}overlapsRay(e){const{direction:t,from:i}=e,s=1/t.x,r=1/t.y,o=1/t.z,a=(this.lowerBound.x-i.x)*s,l=(this.upperBound.x-i.x)*s,c=(this.lowerBound.y-i.y)*r,u=(this.upperBound.y-i.y)*r,C=(this.lowerBound.z-i.z)*o,d=(this.upperBound.z-i.z)*o,h=Math.max(Math.max(Math.min(a,l),Math.min(c,u)),Math.min(C,d)),f=Math.min(Math.min(Math.max(a,l),Math.max(c,u)),Math.max(C,d));return!(f<0||h>f)}}const rw=new K,ow=[new K,new K,new K,new K,new K,new K,new K,new K];class xi{constructor(e,t,i,s){e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i=0),s===void 0&&(s=1),this.x=e,this.y=t,this.z=i,this.w=s}set(e,t,i,s){return this.x=e,this.y=t,this.z=i,this.w=s,this}toString(){return`${this.x},${this.y},${this.z},${this.w}`}toArray(){return[this.x,this.y,this.z,this.w]}setFromAxisAngle(e,t){const i=Math.sin(t*.5);return this.x=e.x*i,this.y=e.y*i,this.z=e.z*i,this.w=Math.cos(t*.5),this}toAxisAngle(e){e===void 0&&(e=new K),this.normalize();const t=2*Math.acos(this.w),i=Math.sqrt(1-this.w*this.w);return i<.001?(e.x=this.x,e.y=this.y,e.z=this.z):(e.x=this.x/i,e.y=this.y/i,e.z=this.z/i),[e,t]}setFromVectors(e,t){if(e.isAntiparallelTo(t)){const i=_T,s=JT;e.tangents(i,s),this.setFromAxisAngle(i,Math.PI)}else{const i=e.cross(t);this.x=i.x,this.y=i.y,this.z=i.z,this.w=Math.sqrt(e.length()**2*t.length()**2)+e.dot(t),this.normalize()}return this}mult(e,t){t===void 0&&(t=new xi);const i=this.x,s=this.y,r=this.z,o=this.w,a=e.x,l=e.y,c=e.z,u=e.w;return t.x=i*u+o*a+s*c-r*l,t.y=s*u+o*l+r*a-i*c,t.z=r*u+o*c+i*l-s*a,t.w=o*u-i*a-s*l-r*c,t}inverse(e){e===void 0&&(e=new xi);const t=this.x,i=this.y,s=this.z,r=this.w;this.conjugate(e);const o=1/(t*t+i*i+s*s+r*r);return e.x*=o,e.y*=o,e.z*=o,e.w*=o,e}conjugate(e){return e===void 0&&(e=new xi),e.x=-this.x,e.y=-this.y,e.z=-this.z,e.w=this.w,e}normalize(){let e=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);return e===0?(this.x=0,this.y=0,this.z=0,this.w=0):(e=1/e,this.x*=e,this.y*=e,this.z*=e,this.w*=e),this}normalizeFast(){const e=(3-(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w))/2;return e===0?(this.x=0,this.y=0,this.z=0,this.w=0):(this.x*=e,this.y*=e,this.z*=e,this.w*=e),this}vmult(e,t){t===void 0&&(t=new K);const i=e.x,s=e.y,r=e.z,o=this.x,a=this.y,l=this.z,c=this.w,u=c*i+a*r-l*s,C=c*s+l*i-o*r,d=c*r+o*s-a*i,h=-o*i-a*s-l*r;return t.x=u*c+h*-o+C*-l-d*-a,t.y=C*c+h*-a+d*-o-u*-l,t.z=d*c+h*-l+u*-a-C*-o,t}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this}toEuler(e,t){t===void 0&&(t="YZX");let i,s,r;const o=this.x,a=this.y,l=this.z,c=this.w;switch(t){case"YZX":const u=o*a+l*c;if(u>.499&&(i=2*Math.atan2(o,c),s=Math.PI/2,r=0),u<-.499&&(i=-2*Math.atan2(o,c),s=-Math.PI/2,r=0),i===void 0){const C=o*o,d=a*a,h=l*l;i=Math.atan2(2*a*c-2*o*l,1-2*d-2*h),s=Math.asin(2*u),r=Math.atan2(2*o*c-2*a*l,1-2*C-2*h)}break;default:throw new Error(`Euler order ${t} not supported yet.`)}e.y=i,e.z=s,e.x=r}setFromEuler(e,t,i,s){s===void 0&&(s="XYZ");const r=Math.cos(e/2),o=Math.cos(t/2),a=Math.cos(i/2),l=Math.sin(e/2),c=Math.sin(t/2),u=Math.sin(i/2);return s==="XYZ"?(this.x=l*o*a+r*c*u,this.y=r*c*a-l*o*u,this.z=r*o*u+l*c*a,this.w=r*o*a-l*c*u):s==="YXZ"?(this.x=l*o*a+r*c*u,this.y=r*c*a-l*o*u,this.z=r*o*u-l*c*a,this.w=r*o*a+l*c*u):s==="ZXY"?(this.x=l*o*a-r*c*u,this.y=r*c*a+l*o*u,this.z=r*o*u+l*c*a,this.w=r*o*a-l*c*u):s==="ZYX"?(this.x=l*o*a-r*c*u,this.y=r*c*a+l*o*u,this.z=r*o*u-l*c*a,this.w=r*o*a+l*c*u):s==="YZX"?(this.x=l*o*a+r*c*u,this.y=r*c*a+l*o*u,this.z=r*o*u-l*c*a,this.w=r*o*a-l*c*u):s==="XZY"&&(this.x=l*o*a-r*c*u,this.y=r*c*a-l*o*u,this.z=r*o*u+l*c*a,this.w=r*o*a+l*c*u),this}clone(){return new xi(this.x,this.y,this.z,this.w)}slerp(e,t,i){i===void 0&&(i=new xi);const s=this.x,r=this.y,o=this.z,a=this.w;let l=e.x,c=e.y,u=e.z,C=e.w,d,h,f,v,y;return h=s*l+r*c+o*u+a*C,h<0&&(h=-h,l=-l,c=-c,u=-u,C=-C),1-h>1e-6?(d=Math.acos(h),f=Math.sin(d),v=Math.sin((1-t)*d)/f,y=Math.sin(t*d)/f):(v=1-t,y=t),i.x=v*s+y*l,i.y=v*r+y*c,i.z=v*o+y*u,i.w=v*a+y*C,i}integrate(e,t,i,s){s===void 0&&(s=new xi);const r=e.x*i.x,o=e.y*i.y,a=e.z*i.z,l=this.x,c=this.y,u=this.z,C=this.w,d=t*.5;return s.x+=d*(r*C+o*u-a*c),s.y+=d*(o*C+a*l-r*u),s.z+=d*(a*C+r*c-o*l),s.w+=d*(-r*l-o*c-a*u),s}}const _T=new K,JT=new K,OT={SPHERE:1,PLANE:2,BOX:4,COMPOUND:8,CONVEXPOLYHEDRON:16,HEIGHTFIELD:32,PARTICLE:64,CYLINDER:128,TRIMESH:256};class Je{constructor(e){e===void 0&&(e={}),this.id=Je.idCounter++,this.type=e.type||0,this.boundingSphereRadius=0,this.collisionResponse=e.collisionResponse?e.collisionResponse:!0,this.collisionFilterGroup=e.collisionFilterGroup!==void 0?e.collisionFilterGroup:1,this.collisionFilterMask=e.collisionFilterMask!==void 0?e.collisionFilterMask:-1,this.material=e.material?e.material:null,this.body=null}updateBoundingSphereRadius(){throw`computeBoundingSphereRadius() not implemented for shape type ${this.type}`}volume(){throw`volume() not implemented for shape type ${this.type}`}calculateLocalInertia(e,t){throw`calculateLocalInertia() not implemented for shape type ${this.type}`}calculateWorldAABB(e,t,i,s){throw`calculateWorldAABB() not implemented for shape type ${this.type}`}}Je.idCounter=0;Je.types=OT;class Ei{constructor(e){e===void 0&&(e={}),this.position=new K,this.quaternion=new xi,e.position&&this.position.copy(e.position),e.quaternion&&this.quaternion.copy(e.quaternion)}pointToLocal(e,t){return Ei.pointToLocalFrame(this.position,this.quaternion,e,t)}pointToWorld(e,t){return Ei.pointToWorldFrame(this.position,this.quaternion,e,t)}vectorToWorldFrame(e,t){return t===void 0&&(t=new K),this.quaternion.vmult(e,t),t}static pointToLocalFrame(e,t,i,s){return s===void 0&&(s=new K),i.vsub(e,s),t.conjugate(aw),aw.vmult(s,s),s}static pointToWorldFrame(e,t,i,s){return s===void 0&&(s=new K),t.vmult(i,s),s.vadd(e,s),s}static vectorToWorldFrame(e,t,i){return i===void 0&&(i=new K),e.vmult(t,i),i}static vectorToLocalFrame(e,t,i,s){return s===void 0&&(s=new K),t.w*=-1,t.vmult(i,s),t.w*=-1,s}}const aw=new xi;new K;new K;new K;new K;new K,new K,new K,new K,new K,new K,new K,new K;new K;new xi;new Ts;new lo;new lo;new lo;new K;new K;new K;new K;new K;new K;new K;new K;new K;new K;new xi;new K;new K;new K;new K;class Cb{constructor(){this.rayFromWorld=new K,this.rayToWorld=new K,this.hitNormalWorld=new K,this.hitPointWorld=new K,this.hasHit=!1,this.shape=null,this.body=null,this.hitFaceIndex=-1,this.distance=-1,this.shouldStop=!1}reset(){this.rayFromWorld.setZero(),this.rayToWorld.setZero(),this.hitNormalWorld.setZero(),this.hitPointWorld.setZero(),this.hasHit=!1,this.shape=null,this.body=null,this.hitFaceIndex=-1,this.distance=-1,this.shouldStop=!1}abort(){this.shouldStop=!0}set(e,t,i,s,r,o,a){this.rayFromWorld.copy(e),this.rayToWorld.copy(t),this.hitNormalWorld.copy(i),this.hitPointWorld.copy(s),this.shape=r,this.body=o,this.distance=a}}let cV,IV,uV,CV,dV,hV,AV;const Cy={CLOSEST:1,ANY:2,ALL:4};cV=Je.types.SPHERE;IV=Je.types.PLANE;uV=Je.types.BOX;CV=Je.types.CYLINDER;dV=Je.types.CONVEXPOLYHEDRON;hV=Je.types.HEIGHTFIELD;AV=Je.types.TRIMESH;class fi{get[cV](){return this._intersectSphere}get[IV](){return this._intersectPlane}get[uV](){return this._intersectBox}get[CV](){return this._intersectConvex}get[dV](){return this._intersectConvex}get[hV](){return this._intersectHeightfield}get[AV](){return this._intersectTrimesh}constructor(e,t){e===void 0&&(e=new K),t===void 0&&(t=new K),this.from=e.clone(),this.to=t.clone(),this.direction=new K,this.precision=1e-4,this.checkCollisionResponse=!0,this.skipBackfaces=!1,this.collisionFilterMask=-1,this.collisionFilterGroup=-1,this.mode=fi.ANY,this.result=new Cb,this.hasHit=!1,this.callback=i=>{}}intersectWorld(e,t){return this.mode=t.mode||fi.ANY,this.result=t.result||new Cb,this.skipBackfaces=!!t.skipBackfaces,this.collisionFilterMask=typeof t.collisionFilterMask<"u"?t.collisionFilterMask:-1,this.collisionFilterGroup=typeof t.collisionFilterGroup<"u"?t.collisionFilterGroup:-1,this.checkCollisionResponse=typeof t.checkCollisionResponse<"u"?t.checkCollisionResponse:!0,t.from&&this.from.copy(t.from),t.to&&this.to.copy(t.to),this.callback=t.callback||(()=>{}),this.hasHit=!1,this.result.reset(),this.updateDirection(),this.getAABB(lw),bm.length=0,e.broadphase.aabbQuery(e,lw,bm),this.intersectBodies(bm),this.hasHit}intersectBody(e,t){t&&(this.result=t,this.updateDirection());const i=this.checkCollisionResponse;if(i&&!e.collisionResponse||!(this.collisionFilterGroup&e.collisionFilterMask)||!(e.collisionFilterGroup&this.collisionFilterMask))return;const s=QT,r=jT;for(let o=0,a=e.shapes.length;oe.boundingSphereRadius)return;const a=this[e.type];a&&a.call(this,e,t,i,s,e)}_intersectBox(e,t,i,s,r){return this._intersectConvex(e.convexPolyhedronRepresentation,t,i,s,r)}_intersectPlane(e,t,i,s,r){const o=this.from,a=this.to,l=this.direction,c=new K(0,0,1);t.vmult(c,c);const u=new K;o.vsub(i,u);const C=u.dot(c);a.vsub(i,u);const d=u.dot(c);if(C*d>0||o.distanceTo(a)=0&&v<=1&&(o.lerp(a,v,h),h.vsub(i,f),f.normalize(),this.reportIntersection(f,h,r,s,-1)),this.result.shouldStop)return;y>=0&&y<=1&&(o.lerp(a,y,h),h.vsub(i,f),f.normalize(),this.reportIntersection(f,h,r,s,-1))}}_intersectConvex(e,t,i,s,r,o){const a=nE,l=cw,c=o&&o.faceList||null,u=e.faces,C=e.vertices,d=e.faceNormals,h=this.direction,f=this.from,v=this.to,y=f.distanceTo(v),A=c?c.length:u.length,b=this.result;for(let m=0;!b.shouldStop&&my||this.reportIntersection(a,Ki,r,s,B)}}}}_intersectTrimesh(e,t,i,s,r,o){const a=iE,l=gE,c=cE,u=cw,C=sE,d=rE,h=oE,f=lE,v=aE,y=e.indices;e.vertices;const A=this.from,b=this.to,m=this.direction;c.position.copy(i),c.quaternion.copy(t),Ei.vectorToLocalFrame(i,t,m,C),Ei.pointToLocalFrame(i,t,A,d),Ei.pointToLocalFrame(i,t,b,h),h.x*=e.scale.x,h.y*=e.scale.y,h.z*=e.scale.z,d.x*=e.scale.x,d.y*=e.scale.y,d.z*=e.scale.z,h.vsub(d,C),C.normalize();const B=d.distanceSquared(h);e.tree.rayQuery(this,c,l);for(let S=0,x=l.length;!this.result.shouldStop&&S!==x;S++){const R=l[S];e.getNormal(R,a),e.getVertex(y[R*3],er),er.vsub(d,u);const M=C.dot(a),Z=a.dot(u)/M;if(Z<0)continue;C.scale(Z,Ki),Ki.vadd(d,Ki),e.getVertex(y[R*3+1],wr),e.getVertex(y[R*3+2],Sr);const V=Ki.distanceSquared(d);!(fi.pointInTriangle(Ki,wr,er,Sr)||fi.pointInTriangle(Ki,er,wr,Sr))||V>B||(Ei.vectorToWorldFrame(t,a,v),Ei.pointToWorldFrame(i,t,Ki,f),this.reportIntersection(v,f,r,s,R))}l.length=0}reportIntersection(e,t,i,s,r){const o=this.from,a=this.to,l=o.distanceTo(t),c=this.result;if(!(this.skipBackfaces&&e.dot(this.direction)>0))switch(c.hitFaceIndex=typeof r<"u"?r:-1,this.mode){case fi.ALL:this.hasHit=!0,c.set(o,a,e,t,i,s,l),c.hasHit=!0,this.callback(c);break;case fi.CLOSEST:(l=0&&(C=r*c-o*a)>=0&&u+CDate.now()-n}new K;const uE=D.createContext(null),CE=()=>D.useContext(uE),pV=D.createContext(null),dE=()=>{const n=D.useContext(pV);if(!n)throw new Error("Physics context not found. @react-three/cannon & components can only be used within a Physics provider");return n};new H(1,1,1);new H;new Fe;const Iw=new Ht;function hE(n){const e=D.useRef(null);return n&&typeof n!="function"?n:e}function uw(n){return n.charAt(0).toUpperCase()+n.slice(1)}function ii(n,e){const t=e===void 0?"":`/${e}`;return typeof n=="function"?null:n&&n.current&&`${n.current.uuid}${t}`}const AE=new bl,pE=new Sn,fE=n=>e=>n(AE.setFromQuaternion(pE.fromArray(e)).toArray());let fV=0;function ym(n,e,t,i,s,r){return r===void 0&&(r="bodies"),o=>{const a=fV++;t[a]={[i]:o};const l=ii(n,s);return l&&e.subscribe({props:{id:a,target:r,type:i},uuid:l}),()=>{delete t[a],e.unsubscribe({props:a})}}}function Cw(n,e){let{position:t=[0,0,0],rotation:i=[0,0,0],userData:s={}}=e;n.userData=s,n.position.set(...t),n.rotation.set(...i),n.updateMatrix()}function dw(n,e,t){let{onCollide:i,onCollideBegin:s,onCollideEnd:r}=e;n[t]={collide:i,collideBegin:s,collideEnd:r}}function mE(n,e,t,i,s){i===void 0&&(i=null),s===void 0&&(s=[]);const r=hE(i),{events:o,refs:a,scaleOverrides:l,subscriptions:c,worker:u}=dE(),C=CE();D.useLayoutEffect(()=>{r.current||(r.current=new Ht);const h=r.current,f=u,v=h instanceof Tg?(h.instanceMatrix.setUsage(A1),h.count):1,y=h instanceof Tg?new Array(v).fill(0).map((b,m)=>`${h.uuid}/${m}`):[h.uuid],A=h instanceof Tg?y.map((b,m)=>{const B=e(m);return Cw(Iw,B),h.setMatrixAt(m,Iw.matrix),h.instanceMatrix.needsUpdate=!0,a[b]=h,C?.add(b,B,n),dw(o,B,b),{...B,args:t(B.args)}}):y.map((b,m)=>{const B=e(m);return Cw(h,B),a[b]=h,C?.add(b,B,n),dw(o,B,b),{...B,args:t(B.args)}});return f.addBodies({props:A.map(b=>{let{onCollide:m,onCollideBegin:B,onCollideEnd:S,...x}=b;return{onCollide:!!m,...x}}),type:n,uuid:y}),()=>{y.forEach(b=>{delete a[b],C?.remove(b),delete o[b]}),f.removeBodies({uuid:y})}},s);const d=D.useMemo(()=>{const h=(m,B)=>{const S=`set${uw(m)}`;return{set:x=>{const R=ii(r,B);R&&u[S]({props:x,uuid:R})},subscribe:ym(r,u,c,m,B)}},f=m=>({copy:S=>{let{w:x,x:R,y:M,z:Z}=S;const V=ii(r,m);V&&u.setQuaternion({props:[R,M,Z,x],uuid:V})},set:(S,x,R,M)=>{const Z=ii(r,m);Z&&u.setQuaternion({props:[S,x,R,M],uuid:Z})},subscribe:ym(r,u,c,"quaternion",m)}),v=m=>({copy:B=>{let{x:S,y:x,z:R}=B;const M=ii(r,m);M&&u.setRotation({props:[S,x,R],uuid:M})},set:(B,S,x)=>{const R=ii(r,m);R&&u.setRotation({props:[B,S,x],uuid:R})},subscribe:B=>{const S=fV++,x="bodies",R="quaternion",M=ii(r,m);return c[S]={[R]:fE(B)},M&&u.subscribe({props:{id:S,target:x,type:R},uuid:M}),()=>{delete c[S],u.unsubscribe({props:S})}}}),y=(m,B)=>{const S=`set${uw(m)}`;return{copy:x=>{let{x:R,y:M,z:Z}=x;const V=ii(r,B);V&&u[S]({props:[R,M,Z],uuid:V})},set:(x,R,M)=>{const Z=ii(r,B);Z&&u[S]({props:[x,R,M],uuid:Z})},subscribe:ym(r,u,c,m,B)}};function A(m){return{allowSleep:h("allowSleep",m),angularDamping:h("angularDamping",m),angularFactor:y("angularFactor",m),angularVelocity:y("angularVelocity",m),applyForce(B,S){const x=ii(r,m);x&&u.applyForce({props:[B,S],uuid:x})},applyImpulse(B,S){const x=ii(r,m);x&&u.applyImpulse({props:[B,S],uuid:x})},applyLocalForce(B,S){const x=ii(r,m);x&&u.applyLocalForce({props:[B,S],uuid:x})},applyLocalImpulse(B,S){const x=ii(r,m);x&&u.applyLocalImpulse({props:[B,S],uuid:x})},applyTorque(B){const S=ii(r,m);S&&u.applyTorque({props:[B],uuid:S})},collisionFilterGroup:h("collisionFilterGroup",m),collisionFilterMask:h("collisionFilterMask",m),collisionResponse:h("collisionResponse",m),fixedRotation:h("fixedRotation",m),isTrigger:h("isTrigger",m),linearDamping:h("linearDamping",m),linearFactor:y("linearFactor",m),mass:h("mass",m),material:h("material",m),position:y("position",m),quaternion:f(m),rotation:v(m),scaleOverride(B){const S=ii(r,m);S&&(l[S]=new H(...B))},sleep(){const B=ii(r,m);B&&u.sleep({uuid:B})},sleepSpeedLimit:h("sleepSpeedLimit",m),sleepTimeLimit:h("sleepTimeLimit",m),userData:h("userData",m),velocity:y("velocity",m),wakeUp(){const B=ii(r,m);B&&u.wakeUp({uuid:B})}}}const b={};return{...A(void 0),at:m=>b[m]||(b[m]=A(m))}},[]);return[r,d]}function mV(n,e,t){return mE("Sphere",n,function(i){if(i===void 0&&(i=[1]),!Array.isArray(i))throw new Error("useSphere args must be an array");return[i[0]]},e,t)}const bE=new H,vE=new H(1,1,1),yE=new Sn,th=new Fe;function hw(n,e,t,i,s){return i===void 0&&(i=vE),n!==void 0?(th.compose(bE.fromArray(e,n*3),yE.fromArray(t,n*4),i),s&&(s.matrixAutoUpdate=!1,s.matrix.copy(th)),th):th.identity()}const GE=()=>{const n=[];return e=>n.includes(e)?!1:!!n.push(e)};function BE(n){let{allowSleep:e=!1,axisIndex:t=0,broadphase:i="Naive",children:s,defaultContactMaterial:r={contactEquationStiffness:1e6},frictionGravity:o=null,gravity:a=[0,-9.81,0],isPaused:l=!1,iterations:c=5,maxSubSteps:u=10,quatNormalizeFast:C=!1,quatNormalizeSkip:d=0,shouldInvalidate:h=!0,size:f=1e3,solver:v="GS",stepSize:y=1/60,tolerance:A=.001}=n;const{invalidate:b}=$i(),[{bodies:m,events:B,refs:S,scaleOverrides:x,subscriptions:R,worker:M}]=D.useState(()=>({bodies:{},events:{},refs:{},scaleOverrides:{},subscriptions:{},worker:new vT({allowSleep:e,axisIndex:t,broadphase:i,defaultContactMaterial:r,frictionGravity:o,gravity:a,iterations:c,quatNormalizeFast:C,quatNormalizeSkip:d,size:f,solver:v,tolerance:A})}));let Z=0;const V=D.useCallback((le,L)=>{l||(Z+=L,M.step({maxSubSteps:u,stepSize:y,timeSinceLastCalled:Z}),Z=0)},[l,u,y]),N=le=>{var L;let{body:_,contact:{bi:U,bj:ce,...se},target:ee,...re}=le;const ve=(L=B[ee])==null?void 0:L.collide;ve&&ve({body:S[_],contact:{bi:S[U],bj:S[ce],...se},target:S[ee],...re})},k=le=>{var L,_;let{bodyA:U,bodyB:ce}=le;const se=(L=B[U])==null?void 0:L.collideBegin;se&&se({body:S[ce],op:"event",target:S[U],type:"collideBegin"});const ee=(_=B[ce])==null?void 0:_.collideBegin;ee&&ee({body:S[U],op:"event",target:S[ce],type:"collideBegin"})},E=le=>{var L,_;let{bodyA:U,bodyB:ce}=le;const se=(L=B[U])==null?void 0:L.collideEnd;se&&se({body:S[ce],op:"event",target:S[U],type:"collideEnd"});const ee=(_=B[ce])==null?void 0:_.collideEnd;ee&&ee({body:S[U],op:"event",target:S[ce],type:"collideEnd"})},$=le=>{let{active:L,bodies:_=[],observations:U,positions:ce,quaternions:se}=le;for(let ee=0;ee<_.length;ee++)m[_[ee]]=ee;if(U.forEach(ee=>{let[re,ve,ye]=ee;const nt=(R[re]||{})[ye];nt&&nt(ve)}),!!L){for(const ee of Object.values(S).filter(GE()))if(ee instanceof Tg)for(let re=0;re{var L;let{body:_,ray:{uuid:U,...ce},...se}=le;const ee=(L=B[U])==null?void 0:L.rayhit;ee&&ee({body:_?S[_]:null,ray:{uuid:U,...ce},...se})};_u(V),D.useEffect(()=>(M.connect(),M.init(),M.on("collide",N),M.on("collideBegin",k),M.on("collideEnd",E),M.on("frame",$),M.on("rayhit",te),()=>{M.terminate(),M.removeAllListeners()}),[]),D.useEffect(()=>{M.axisIndex=t},[t]),D.useEffect(()=>{M.broadphase=i},[i]),D.useEffect(()=>{M.gravity=a},[a]),D.useEffect(()=>{M.iterations=c},[c]),D.useEffect(()=>{M.tolerance=A},[A]);const Ce=D.useMemo(()=>({bodies:m,events:B,refs:S,scaleOverrides:x,subscriptions:R,worker:M}),[m,B,S,R,M]);return j.jsx(pV.Provider,{value:Ce,children:s})}/** + * postprocessing v6.31.0 build Sun May 07 2023 + * https://github.com/pmndrs/postprocessing + * Copyright 2015-2023 Raoul van Rüschen + * @license Zlib + */var Sl="varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",ZE=`#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +#if PASS == 1 +uniform vec4 kernel64[32]; +#else +uniform vec4 kernel16[8]; +#endif +uniform lowp sampler2D cocBuffer;uniform vec2 texelSize;uniform float scale;varying vec2 vUv;void main(){ +#ifdef FOREGROUND +vec2 CoCNearFar=texture2D(cocBuffer,vUv).rg;float CoC=CoCNearFar.r*scale; +#else +float CoC=texture2D(cocBuffer,vUv).g*scale; +#endif +if(CoC==0.0){gl_FragColor=texture2D(inputBuffer,vUv);}else{ +#ifdef FOREGROUND +vec2 step=texelSize*max(CoC,CoCNearFar.g*scale); +#else +vec2 step=texelSize*CoC; +#endif +#if PASS == 1 +vec4 acc=vec4(0.0);for(int i=0;i<32;++i){vec4 kernel=kernel64[i];vec2 uv=step*kernel.xy+vUv;acc+=texture2D(inputBuffer,uv);uv=step*kernel.zw+vUv;acc+=texture2D(inputBuffer,uv);}gl_FragColor=acc/64.0; +#else +vec4 maxValue=texture2D(inputBuffer,vUv);for(int i=0;i<8;++i){vec4 kernel=kernel16[i];vec2 uv=step*kernel.xy+vUv;maxValue=max(texture2D(inputBuffer,uv),maxValue);uv=step*kernel.zw+vUv;maxValue=max(texture2D(inputBuffer,uv),maxValue);}gl_FragColor=maxValue; +#endif +}}`,nh=class extends Zt{constructor(n=!1,e=!1){super({name:"BokehMaterial",defines:{PASS:n?"2":"1"},uniforms:{inputBuffer:new q(null),cocBuffer:new q(null),texelSize:new q(new ne),kernel64:new q(null),kernel16:new q(null),scale:new q(1)},blending:en,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:ZE,vertexShader:Sl}),e&&(this.defines.FOREGROUND="1"),this.generateKernel()}set inputBuffer(n){this.uniforms.inputBuffer.value=n}setInputBuffer(n){this.uniforms.inputBuffer.value=n}set cocBuffer(n){this.uniforms.cocBuffer.value=n}setCoCBuffer(n){this.uniforms.cocBuffer.value=n}get scale(){return this.uniforms.scale.value}set scale(n){this.uniforms.scale.value=n}getScale(n){return this.scale}setScale(n){this.scale=n}generateKernel(){const n=2.39996323,e=new Float64Array(128),t=new Float64Array(32);let i=0,s=0;for(let r=0,o=Math.sqrt(80);r<80;++r){const a=r*n,l=Math.sqrt(r)/o,c=l*Math.cos(a),u=l*Math.sin(a);r%5===0?(t[s++]=c,t[s++]=u):(e[i++]=c,e[i++]=u)}this.uniforms.kernel64.value=e,this.uniforms.kernel16.value=t}setTexelSize(n,e){this.uniforms.texelSize.value.set(n,e)}setSize(n,e){this.uniforms.texelSize.value.set(1/n,1/e)}},bV="",Pt="srgb",nc="srgb-linear",wE=Number(da.replace(/\D+/g,"")),dy=wE>=152,vV=new Map([[Vu,nc],[Ys,Pt]]),SE=new Map([[nc,Vu],[Pt,Ys]]);function po(n){return n===null?null:dy?n.outputColorSpace:vV.get(n.outputEncoding)}function En(n,e){n!==null&&(dy?n.colorSpace=e:n.encoding=SE.get(e))}function Gm(n,e){n===null||e===null||(dy?e.colorSpace=n.colorSpace:e.encoding=n.encoding)}function Mg(n,e,t){return n*(e-t)-e}function el(n,e,t){return Math.min(Math.max((n+e)/(e-t),0),1)}var xE=`#include +#include +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +uniform float focusDistance;uniform float focusRange;uniform float cameraNear;uniform float cameraFar;varying vec2 vUv;float readDepth(const in vec2 uv){ +#if DEPTH_PACKING == 3201 +return unpackRGBAToDepth(texture2D(depthBuffer,uv)); +#else +return texture2D(depthBuffer,uv).r; +#endif +}void main(){float depth=readDepth(vUv); +#ifdef PERSPECTIVE_CAMERA +float viewZ=perspectiveDepthToViewZ(depth,cameraNear,cameraFar);float linearDepth=viewZToOrthographicDepth(viewZ,cameraNear,cameraFar); +#else +float linearDepth=depth; +#endif +float signedDistance=linearDepth-focusDistance;float magnitude=smoothstep(0.0,focusRange,abs(signedDistance));gl_FragColor.rg=magnitude*vec2(step(signedDistance,0.0),step(0.0,signedDistance));}`,RE=class extends Zt{constructor(n){super({name:"CircleOfConfusionMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new q(null),focusDistance:new q(0),focusRange:new q(0),cameraNear:new q(.3),cameraFar:new q(1e3)},blending:en,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:xE,vertexShader:Sl}),this.uniforms.focalLength=this.uniforms.focusRange,this.copyCameraSettings(n)}get near(){return this.uniforms.cameraNear.value}get far(){return this.uniforms.cameraFar.value}set depthBuffer(n){this.uniforms.depthBuffer.value=n}set depthPacking(n){this.defines.DEPTH_PACKING=n.toFixed(0),this.needsUpdate=!0}setDepthBuffer(n,e=Xn){this.depthBuffer=n,this.depthPacking=e}get focusDistance(){return this.uniforms.focusDistance.value}set focusDistance(n){this.uniforms.focusDistance.value=n}get worldFocusDistance(){return-Mg(this.focusDistance,this.near,this.far)}set worldFocusDistance(n){this.focusDistance=el(-n,this.near,this.far)}getFocusDistance(n){this.uniforms.focusDistance.value=n}setFocusDistance(n){this.uniforms.focusDistance.value=n}get focalLength(){return this.focusRange}set focalLength(n){this.focusRange=n}get focusRange(){return this.uniforms.focusRange.value}set focusRange(n){this.uniforms.focusRange.value=n}get worldFocusRange(){return-Mg(this.focusRange,this.near,this.far)}set worldFocusRange(n){this.focusRange=el(-n,this.near,this.far)}getFocalLength(n){return this.focusRange}setFocalLength(n){this.focusRange=n}adoptCameraSettings(n){this.copyCameraSettings(n)}copyCameraSettings(n){n&&(this.uniforms.cameraNear.value=n.near,this.uniforms.cameraFar.value=n.far,n instanceof hn?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},It={SKIP:9,SET:30,ADD:0,ALPHA:1,AVERAGE:2,COLOR:3,COLOR_BURN:4,COLOR_DODGE:5,DARKEN:6,DIFFERENCE:7,DIVIDE:8,DST:9,EXCLUSION:10,HARD_LIGHT:11,HARD_MIX:12,HUE:13,INVERT:14,INVERT_RGB:15,LIGHTEN:16,LINEAR_BURN:17,LINEAR_DODGE:18,LINEAR_LIGHT:19,LUMINOSITY:20,MULTIPLY:21,NEGATION:22,NORMAL:23,OVERLAY:24,PIN_LIGHT:25,REFLECT:26,SATURATION:27,SCREEN:28,SOFT_LIGHT:29,SRC:30,SUBTRACT:31,VIVID_LIGHT:32},Ng={RED:0,GREEN:1,BLUE:2,ALPHA:3},bI={FULL:0,SINGLE:1},FI={DEFAULT:0,KEEP_MAX_DEPTH:1,DISCARD_MAX_DEPTH:2},yV={DEPTH:0,LUMA:1,COLOR:2},qi={NONE:0,DEPTH:1,CONVOLUTION:2},Lt={FRAGMENT_HEAD:"FRAGMENT_HEAD",FRAGMENT_MAIN_UV:"FRAGMENT_MAIN_UV",FRAGMENT_MAIN_IMAGE:"FRAGMENT_MAIN_IMAGE",VERTEX_HEAD:"VERTEX_HEAD",VERTEX_MAIN_SUPPORT:"VERTEX_MAIN_SUPPORT"},Pa={DISABLED:0,SPORADIC:1,CONSTANT_MILD:2,CONSTANT_WILD:3},dc={VERY_SMALL:0,SMALL:1,MEDIUM:2,LARGE:3,VERY_LARGE:4,HUGE:5},WE={SCALE_UP:"lut.scaleup"},KI={DISCARD:0,MULTIPLY:1,MULTIPLY_RGB_SET_ALPHA:2},VE={DISABLED:0,DEPTH:1,CUSTOM:2},lI={LOW:0,MEDIUM:1,HIGH:2,ULTRA:3},ME=`#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec4 sum=texture2D(inputBuffer,vUv0);sum+=texture2D(inputBuffer,vUv1);sum+=texture2D(inputBuffer,vUv2);sum+=texture2D(inputBuffer,vUv3);gl_FragColor=sum*0.25; +#include +}`,NE="uniform vec4 texelSize;uniform float kernel;uniform float scale;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vec2 dUv=(texelSize.xy*vec2(kernel)+texelSize.zw)*scale;vUv0=vec2(uv.x-dUv.x,uv.y+dUv.y);vUv1=vec2(uv.x+dUv.x,uv.y+dUv.y);vUv2=vec2(uv.x+dUv.x,uv.y-dUv.y);vUv3=vec2(uv.x-dUv.x,uv.y-dUv.y);gl_Position=vec4(position.xy,1.0,1.0);}",HE=[new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10])],XE=class extends Zt{constructor(n=new Vt){super({name:"KawaseBlurMaterial",uniforms:{inputBuffer:new q(null),texelSize:new q(new Vt),scale:new q(1),kernel:new q(0)},blending:en,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:ME,vertexShader:NE}),this.setTexelSize(n.x,n.y),this.kernelSize=dc.MEDIUM}set inputBuffer(n){this.uniforms.inputBuffer.value=n}setInputBuffer(n){this.inputBuffer=n}get kernelSequence(){return HE[this.kernelSize]}get scale(){return this.uniforms.scale.value}set scale(n){this.uniforms.scale.value=n}getScale(){return this.uniforms.scale.value}setScale(n){this.uniforms.scale.value=n}getKernel(){return null}get kernel(){return this.uniforms.kernel.value}set kernel(n){this.uniforms.kernel.value=n}setKernel(n){this.kernel=n}setTexelSize(n,e){this.uniforms.texelSize.value.set(n,e,n*.5,e*.5)}setSize(n,e){const t=1/n,i=1/e;this.uniforms.texelSize.value.set(t,i,t*.5,i*.5)}},YE=`#include +#include +#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +uniform float opacity;varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);gl_FragColor=opacity*texel; +#include +#include +}`,GV=class extends Zt{constructor(){super({name:"CopyMaterial",uniforms:{inputBuffer:new q(null),opacity:new q(1)},blending:en,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:YE,vertexShader:Sl})}set inputBuffer(n){this.uniforms.inputBuffer.value=n}setInputBuffer(n){this.uniforms.inputBuffer.value=n}getOpacity(n){return this.uniforms.opacity.value}setOpacity(n){this.uniforms.opacity.value=n}},FE=`#include +#include +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +uniform float cameraNear;uniform float cameraFar;varying float vViewZ;varying vec4 vProjTexCoord;void main(){ +#include +vec2 projTexCoord=(vProjTexCoord.xy/vProjTexCoord.w)*0.5+0.5;projTexCoord=clamp(projTexCoord,0.002,0.998); +#if DEPTH_PACKING == 3201 +float fragCoordZ=unpackRGBAToDepth(texture2D(depthBuffer,projTexCoord)); +#else +float fragCoordZ=texture2D(depthBuffer,projTexCoord).r; +#endif +#ifdef PERSPECTIVE_CAMERA +float viewZ=perspectiveDepthToViewZ(fragCoordZ,cameraNear,cameraFar); +#else +float viewZ=orthographicDepthToViewZ(fragCoordZ,cameraNear,cameraFar); +#endif +float depthTest=(-vViewZ>-viewZ)?1.0:0.0;gl_FragColor.rg=vec2(0.0,depthTest);}`,KE=`#include +#include +#include +#include +varying float vViewZ;varying vec4 vProjTexCoord;void main(){ +#include +#include +#include +#include +#include +vViewZ=mvPosition.z;vProjTexCoord=gl_Position; +#include +}`,zE=class extends Zt{constructor(n=null,e){super({name:"DepthComparisonMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new q(null),cameraNear:new q(.3),cameraFar:new q(1e3)},blending:en,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:FE,vertexShader:KE}),this.depthBuffer=n,this.depthPacking=Xr,this.copyCameraSettings(e)}set depthBuffer(n){this.uniforms.depthBuffer.value=n}set depthPacking(n){this.defines.DEPTH_PACKING=n.toFixed(0),this.needsUpdate=!0}setDepthBuffer(n,e=Xr){this.depthBuffer=n,this.depthPacking=e}adoptCameraSettings(n){this.copyCameraSettings(n)}copyCameraSettings(n){n&&(this.uniforms.cameraNear.value=n.near,this.uniforms.cameraFar.value=n.far,n instanceof hn?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},LE=`#include +varying vec2 vUv; +#ifdef NORMAL_DEPTH +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D normalDepthBuffer; +#else +uniform mediump sampler2D normalDepthBuffer; +#endif +float readDepth(const in vec2 uv){return texture2D(normalDepthBuffer,uv).a;} +#else +#if INPUT_DEPTH_PACKING == 3201 +uniform lowp sampler2D depthBuffer; +#elif defined(GL_FRAGMENT_PRECISION_HIGH) +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +float readDepth(const in vec2 uv){ +#if INPUT_DEPTH_PACKING == 3201 +return unpackRGBAToDepth(texture2D(depthBuffer,uv)); +#else +return texture2D(depthBuffer,uv).r; +#endif +} +#endif +void main(){ +#if INPUT_DEPTH_PACKING == OUTPUT_DEPTH_PACKING +gl_FragColor=texture2D(depthBuffer,vUv); +#else +float depth=readDepth(vUv); +#if OUTPUT_DEPTH_PACKING == 3201 +gl_FragColor=(depth==1.0)?vec4(1.0):packDepthToRGBA(depth); +#else +gl_FragColor=vec4(vec3(depth),1.0); +#endif +#endif +}`,TE=`varying vec2 vUv; +#if DEPTH_COPY_MODE == 1 +uniform vec2 texelPosition; +#endif +void main(){ +#if DEPTH_COPY_MODE == 1 +vUv=texelPosition; +#else +vUv=position.xy*0.5+0.5; +#endif +gl_Position=vec4(position.xy,1.0,1.0);}`,EE=class extends Zt{constructor(){super({name:"DepthCopyMaterial",defines:{INPUT_DEPTH_PACKING:"0",OUTPUT_DEPTH_PACKING:"0",DEPTH_COPY_MODE:"0"},uniforms:{depthBuffer:new q(null),texelPosition:new q(new ne)},blending:en,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:LE,vertexShader:TE}),this.depthCopyMode=bI.FULL}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(n){this.uniforms.depthBuffer.value=n}set inputDepthPacking(n){this.defines.INPUT_DEPTH_PACKING=n.toFixed(0),this.needsUpdate=!0}get outputDepthPacking(){return Number(this.defines.OUTPUT_DEPTH_PACKING)}set outputDepthPacking(n){this.defines.OUTPUT_DEPTH_PACKING=n.toFixed(0),this.needsUpdate=!0}setDepthBuffer(n,e=Xn){this.depthBuffer=n,this.inputDepthPacking=e}getInputDepthPacking(){return Number(this.defines.INPUT_DEPTH_PACKING)}setInputDepthPacking(n){this.defines.INPUT_DEPTH_PACKING=n.toFixed(0),this.needsUpdate=!0}getOutputDepthPacking(){return Number(this.defines.OUTPUT_DEPTH_PACKING)}setOutputDepthPacking(n){this.defines.OUTPUT_DEPTH_PACKING=n.toFixed(0),this.needsUpdate=!0}get texelPosition(){return this.uniforms.texelPosition.value}getTexelPosition(){return this.uniforms.texelPosition.value}setTexelPosition(n){this.uniforms.texelPosition.value=n}get mode(){return this.depthCopyMode}set mode(n){this.depthCopyMode=n,this.defines.DEPTH_COPY_MODE=n.toFixed(0),this.needsUpdate=!0}getMode(){return this.mode}setMode(n){this.mode=n}},kE=`#include +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +#ifdef DOWNSAMPLE_NORMALS +uniform lowp sampler2D normalBuffer; +#endif +varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;float readDepth(const in vec2 uv){ +#if DEPTH_PACKING == 3201 +return unpackRGBAToDepth(texture2D(depthBuffer,uv)); +#else +return texture2D(depthBuffer,uv).r; +#endif +}int findBestDepth(const in float samples[4]){float c=(samples[0]+samples[1]+samples[2]+samples[3])*0.25;float distances[]=float[4](abs(c-samples[0]),abs(c-samples[1]),abs(c-samples[2]),abs(c-samples[3]));float maxDistance=max(max(distances[0],distances[1]),max(distances[2],distances[3]));int remaining[3];int rejected[3];int i,j,k;for(i=0,j=0,k=0;i<4;++i){if(distances[i] +#include +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D depthBuffer0;uniform highp sampler2D depthBuffer1; +#else +uniform mediump sampler2D depthBuffer0;uniform mediump sampler2D depthBuffer1; +#endif +uniform sampler2D inputBuffer;uniform vec2 cameraNearFar;float getViewZ(const in float depth){ +#ifdef PERSPECTIVE_CAMERA +return perspectiveDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y); +#else +return orthographicDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y); +#endif +}varying vec2 vUv;void main(){vec2 depth; +#if DEPTH_PACKING_0 == 3201 +depth.x=unpackRGBAToDepth(texture2D(depthBuffer0,vUv)); +#else +depth.x=texture2D(depthBuffer0,vUv).r; +#endif +#if DEPTH_PACKING_1 == 3201 +depth.y=unpackRGBAToDepth(texture2D(depthBuffer1,vUv)); +#else +depth.y=texture2D(depthBuffer1,vUv).r; +#endif +bool isMaxDepth=(depth.x==1.0); +#ifdef PERSPECTIVE_CAMERA +depth.x=viewZToOrthographicDepth(getViewZ(depth.x),cameraNearFar.x,cameraNearFar.y);depth.y=viewZToOrthographicDepth(getViewZ(depth.y),cameraNearFar.x,cameraNearFar.y); +#endif +#if DEPTH_TEST_STRATEGY == 0 +bool keep=depthTest(depth.x,depth.y); +#elif DEPTH_TEST_STRATEGY == 1 +bool keep=isMaxDepth||depthTest(depth.x,depth.y); +#else +bool keep=!isMaxDepth&&depthTest(depth.x,depth.y); +#endif +if(keep){gl_FragColor=texture2D(inputBuffer,vUv);}else{discard;}}`,BV=class extends Zt{constructor(){super({name:"DepthMaskMaterial",defines:{DEPTH_EPSILON:"0.0001",DEPTH_PACKING_0:"0",DEPTH_PACKING_1:"0",DEPTH_TEST_STRATEGY:FI.KEEP_MAX_DEPTH},uniforms:{inputBuffer:new q(null),depthBuffer0:new q(null),depthBuffer1:new q(null),cameraNearFar:new q(new ne(1,1))},blending:en,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:PE,vertexShader:Sl}),this.depthMode=iA}set depthBuffer0(n){this.uniforms.depthBuffer0.value=n}set depthPacking0(n){this.defines.DEPTH_PACKING_0=n.toFixed(0),this.needsUpdate=!0}setDepthBuffer0(n,e=Xn){this.depthBuffer0=n,this.depthPacking0=e}set depthBuffer1(n){this.uniforms.depthBuffer1.value=n}set depthPacking1(n){this.defines.DEPTH_PACKING_1=n.toFixed(0),this.needsUpdate=!0}setDepthBuffer1(n,e=Xn){this.depthBuffer1=n,this.depthPacking1=e}get maxDepthStrategy(){return Number(this.defines.DEPTH_TEST_STRATEGY)}set maxDepthStrategy(n){this.defines.DEPTH_TEST_STRATEGY=n.toFixed(0),this.needsUpdate=!0}get keepFar(){return this.maxDepthStrategy}set keepFar(n){this.maxDepthStrategy=n?FI.KEEP_MAX_DEPTH:FI.DISCARD_MAX_DEPTH}getMaxDepthStrategy(){return this.maxDepthStrategy}setMaxDepthStrategy(n){this.maxDepthStrategy=n}get epsilon(){return Number(this.defines.DEPTH_EPSILON)}set epsilon(n){this.defines.DEPTH_EPSILON=n.toFixed(16),this.needsUpdate=!0}getEpsilon(){return this.epsilon}setEpsilon(n){this.epsilon=n}get depthMode(){return Number(this.defines.DEPTH_MODE)}set depthMode(n){let e;switch(n){case bv:e="false";break;case vv:e="true";break;case ru:e="abs(d1 - d0) <= DEPTH_EPSILON";break;case xA:e="abs(d1 - d0) > DEPTH_EPSILON";break;case iA:e="d0 > d1";break;case su:e="d0 >= d1";break;case yv:e="d0 <= d1";break;case Gv:default:e="d0 < d1";break}this.defines.DEPTH_MODE=n.toFixed(0),this.defines["depthTest(d0, d1)"]=e,this.needsUpdate=!0}getDepthMode(){return this.depthMode}setDepthMode(n){this.depthMode=n}adoptCameraSettings(n){this.copyCameraSettings(n)}copyCameraSettings(n){n&&(this.uniforms.cameraNearFar.value.set(n.near,n.far),n instanceof hn?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},_E=`#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +#define WEIGHT_INNER 0.125 +#define WEIGHT_OUTER 0.0555555 +varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;float clampToBorder(const in vec2 uv){return float(uv.s>=0.0&&uv.s<=1.0&&uv.t>=0.0&&uv.t<=1.0);}void main(){vec4 c=vec4(0.0);vec4 w=WEIGHT_INNER*vec4(clampToBorder(vUv00),clampToBorder(vUv01),clampToBorder(vUv02),clampToBorder(vUv03));c+=w.x*texture2D(inputBuffer,vUv00);c+=w.y*texture2D(inputBuffer,vUv01);c+=w.z*texture2D(inputBuffer,vUv02);c+=w.w*texture2D(inputBuffer,vUv03);w=WEIGHT_OUTER*vec4(clampToBorder(vUv04),clampToBorder(vUv05),clampToBorder(vUv06),clampToBorder(vUv07));c+=w.x*texture2D(inputBuffer,vUv04);c+=w.y*texture2D(inputBuffer,vUv05);c+=w.z*texture2D(inputBuffer,vUv06);c+=w.w*texture2D(inputBuffer,vUv07);w=WEIGHT_OUTER*vec4(clampToBorder(vUv08),clampToBorder(vUv09),clampToBorder(vUv10),clampToBorder(vUv11));c+=w.x*texture2D(inputBuffer,vUv08);c+=w.y*texture2D(inputBuffer,vUv09);c+=w.z*texture2D(inputBuffer,vUv10);c+=w.w*texture2D(inputBuffer,vUv11);c+=WEIGHT_OUTER*texture2D(inputBuffer,vUv);gl_FragColor=c; +#include +}`,JE="uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;void main(){vUv=position.xy*0.5+0.5;vUv00=vUv+texelSize*vec2(-1.0,1.0);vUv01=vUv+texelSize*vec2(1.0,1.0);vUv02=vUv+texelSize*vec2(-1.0,-1.0);vUv03=vUv+texelSize*vec2(1.0,-1.0);vUv04=vUv+texelSize*vec2(-2.0,2.0);vUv05=vUv+texelSize*vec2(0.0,2.0);vUv06=vUv+texelSize*vec2(2.0,2.0);vUv07=vUv+texelSize*vec2(-2.0,0.0);vUv08=vUv+texelSize*vec2(2.0,0.0);vUv09=vUv+texelSize*vec2(-2.0,-2.0);vUv10=vUv+texelSize*vec2(0.0,-2.0);vUv11=vUv+texelSize*vec2(2.0,-2.0);gl_Position=vec4(position.xy,1.0,1.0);}",OE=class extends Zt{constructor(){super({name:"DownsamplingMaterial",uniforms:{inputBuffer:new q(null),texelSize:new q(new ne)},blending:en,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:_E,vertexShader:JE})}set inputBuffer(n){this.uniforms.inputBuffer.value=n}setSize(n,e){this.uniforms.texelSize.value.set(1/n,1/e)}},QE=`varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1; +#if THREE_REVISION < 143 +#define luminance(v) linearToRelativeLuminance(v) +#endif +#if EDGE_DETECTION_MODE != 0 +varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5; +#endif +#if EDGE_DETECTION_MODE == 1 +#include +#endif +#if EDGE_DETECTION_MODE == 0 || PREDICATION_MODE == 1 +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +float readDepth(const in vec2 uv){ +#if DEPTH_PACKING == 3201 +return unpackRGBAToDepth(texture2D(depthBuffer,uv)); +#else +return texture2D(depthBuffer,uv).r; +#endif +}vec3 gatherNeighbors(){float p=readDepth(vUv);float pLeft=readDepth(vUv0);float pTop=readDepth(vUv1);return vec3(p,pLeft,pTop);} +#elif PREDICATION_MODE == 2 +uniform sampler2D predicationBuffer;vec3 gatherNeighbors(){float p=texture2D(predicationBuffer,vUv).r;float pLeft=texture2D(predicationBuffer,vUv0).r;float pTop=texture2D(predicationBuffer,vUv1).r;return vec3(p,pLeft,pTop);} +#endif +#if PREDICATION_MODE != 0 +vec2 calculatePredicatedThreshold(){vec3 neighbours=gatherNeighbors();vec2 delta=abs(neighbours.xx-neighbours.yz);vec2 edges=step(PREDICATION_THRESHOLD,delta);return PREDICATION_SCALE*EDGE_THRESHOLD*(1.0-PREDICATION_STRENGTH*edges);} +#endif +#if EDGE_DETECTION_MODE != 0 +uniform sampler2D inputBuffer; +#endif +void main(){ +#if EDGE_DETECTION_MODE == 0 +const vec2 threshold=vec2(DEPTH_THRESHOLD); +#elif PREDICATION_MODE != 0 +vec2 threshold=calculatePredicatedThreshold(); +#else +const vec2 threshold=vec2(EDGE_THRESHOLD); +#endif +#if EDGE_DETECTION_MODE == 0 +vec3 neighbors=gatherNeighbors();vec2 delta=abs(neighbors.xx-vec2(neighbors.y,neighbors.z));vec2 edges=step(threshold,delta);if(dot(edges,vec2(1.0))==0.0){discard;}gl_FragColor=vec4(edges,0.0,1.0); +#elif EDGE_DETECTION_MODE == 1 +float l=luminance(texture2D(inputBuffer,vUv).rgb);float lLeft=luminance(texture2D(inputBuffer,vUv0).rgb);float lTop=luminance(texture2D(inputBuffer,vUv1).rgb);vec4 delta;delta.xy=abs(l-vec2(lLeft,lTop));vec2 edges=step(threshold,delta.xy);if(dot(edges,vec2(1.0))==0.0){discard;}float lRight=luminance(texture2D(inputBuffer,vUv2).rgb);float lBottom=luminance(texture2D(inputBuffer,vUv3).rgb);delta.zw=abs(l-vec2(lRight,lBottom));vec2 maxDelta=max(delta.xy,delta.zw);float lLeftLeft=luminance(texture2D(inputBuffer,vUv4).rgb);float lTopTop=luminance(texture2D(inputBuffer,vUv5).rgb);delta.zw=abs(vec2(lLeft,lTop)-vec2(lLeftLeft,lTopTop));maxDelta=max(maxDelta.xy,delta.zw);float finalDelta=max(maxDelta.x,maxDelta.y);edges.xy*=step(finalDelta,LOCAL_CONTRAST_ADAPTATION_FACTOR*delta.xy);gl_FragColor=vec4(edges,0.0,1.0); +#elif EDGE_DETECTION_MODE == 2 +vec4 delta;vec3 c=texture2D(inputBuffer,vUv).rgb;vec3 cLeft=texture2D(inputBuffer,vUv0).rgb;vec3 t=abs(c-cLeft);delta.x=max(max(t.r,t.g),t.b);vec3 cTop=texture2D(inputBuffer,vUv1).rgb;t=abs(c-cTop);delta.y=max(max(t.r,t.g),t.b);vec2 edges=step(threshold,delta.xy);if(dot(edges,vec2(1.0))==0.0){discard;}vec3 cRight=texture2D(inputBuffer,vUv2).rgb;t=abs(c-cRight);delta.z=max(max(t.r,t.g),t.b);vec3 cBottom=texture2D(inputBuffer,vUv3).rgb;t=abs(c-cBottom);delta.w=max(max(t.r,t.g),t.b);vec2 maxDelta=max(delta.xy,delta.zw);vec3 cLeftLeft=texture2D(inputBuffer,vUv4).rgb;t=abs(c-cLeftLeft);delta.z=max(max(t.r,t.g),t.b);vec3 cTopTop=texture2D(inputBuffer,vUv5).rgb;t=abs(c-cTopTop);delta.w=max(max(t.r,t.g),t.b);maxDelta=max(maxDelta.xy,delta.zw);float finalDelta=max(maxDelta.x,maxDelta.y);edges*=step(finalDelta,LOCAL_CONTRAST_ADAPTATION_FACTOR*delta.xy);gl_FragColor=vec4(edges,0.0,1.0); +#endif +}`,jE=`uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1; +#if EDGE_DETECTION_MODE != 0 +varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5; +#endif +void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,0.0);vUv1=vUv+texelSize*vec2(0.0,-1.0); +#if EDGE_DETECTION_MODE != 0 +vUv2=vUv+texelSize*vec2(1.0,0.0);vUv3=vUv+texelSize*vec2(0.0,1.0);vUv4=vUv+texelSize*vec2(-2.0,0.0);vUv5=vUv+texelSize*vec2(0.0,-2.0); +#endif +gl_Position=vec4(position.xy,1.0,1.0);}`,qE=class extends Zt{constructor(n=new ne,e=yV.COLOR){super({name:"EdgeDetectionMaterial",defines:{THREE_REVISION:da.replace(/\D+/g,""),LOCAL_CONTRAST_ADAPTATION_FACTOR:"2.0",EDGE_THRESHOLD:"0.1",DEPTH_THRESHOLD:"0.01",PREDICATION_MODE:"0",PREDICATION_THRESHOLD:"0.01",PREDICATION_SCALE:"2.0",PREDICATION_STRENGTH:"1.0",DEPTH_PACKING:"0"},uniforms:{inputBuffer:new q(null),depthBuffer:new q(null),predicationBuffer:new q(null),texelSize:new q(n)},blending:en,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:QE,vertexShader:jE}),this.edgeDetectionMode=e}set depthBuffer(n){this.uniforms.depthBuffer.value=n}set depthPacking(n){this.defines.DEPTH_PACKING=n.toFixed(0),this.needsUpdate=!0}setDepthBuffer(n,e=Xn){this.depthBuffer=n,this.depthPacking=e}get edgeDetectionMode(){return Number(this.defines.EDGE_DETECTION_MODE)}set edgeDetectionMode(n){this.defines.EDGE_DETECTION_MODE=n.toFixed(0),this.needsUpdate=!0}getEdgeDetectionMode(){return this.edgeDetectionMode}setEdgeDetectionMode(n){this.edgeDetectionMode=n}get localContrastAdaptationFactor(){return Number(this.defines.LOCAL_CONTRAST_ADAPTATION_FACTOR)}set localContrastAdaptationFactor(n){this.defines.LOCAL_CONTRAST_ADAPTATION_FACTOR=n.toFixed("6"),this.needsUpdate=!0}getLocalContrastAdaptationFactor(){return this.localContrastAdaptationFactor}setLocalContrastAdaptationFactor(n){this.localContrastAdaptationFactor=n}get edgeDetectionThreshold(){return Number(this.defines.EDGE_THRESHOLD)}set edgeDetectionThreshold(n){this.defines.EDGE_THRESHOLD=n.toFixed("6"),this.defines.DEPTH_THRESHOLD=(n*.1).toFixed("6"),this.needsUpdate=!0}getEdgeDetectionThreshold(){return this.edgeDetectionThreshold}setEdgeDetectionThreshold(n){this.edgeDetectionThreshold=n}get predicationMode(){return Number(this.defines.PREDICATION_MODE)}set predicationMode(n){this.defines.PREDICATION_MODE=n.toFixed(0),this.needsUpdate=!0}getPredicationMode(){return this.predicationMode}setPredicationMode(n){this.predicationMode=n}set predicationBuffer(n){this.uniforms.predicationBuffer.value=n}setPredicationBuffer(n){this.uniforms.predicationBuffer.value=n}get predicationThreshold(){return Number(this.defines.PREDICATION_THRESHOLD)}set predicationThreshold(n){this.defines.PREDICATION_THRESHOLD=n.toFixed("6"),this.needsUpdate=!0}getPredicationThreshold(){return this.predicationThreshold}setPredicationThreshold(n){this.predicationThreshold=n}get predicationScale(){return Number(this.defines.PREDICATION_SCALE)}set predicationScale(n){this.defines.PREDICATION_SCALE=n.toFixed("6"),this.needsUpdate=!0}getPredicationScale(){return this.predicationScale}setPredicationScale(n){this.predicationScale=n}get predicationStrength(){return Number(this.defines.PREDICATION_STRENGTH)}set predicationStrength(n){this.defines.PREDICATION_STRENGTH=n.toFixed("6"),this.needsUpdate=!0}getPredicationStrength(){return this.predicationStrength}setPredicationStrength(n){this.predicationStrength=n}setSize(n,e){this.uniforms.texelSize.value.set(1/n,1/e)}},$E=`#include +#include +#include +#define packFloatToRGBA(v) packDepthToRGBA(v) +#define unpackRGBAToFloat(v) unpackRGBAToDepth(v) +#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +#if DEPTH_PACKING == 3201 +uniform lowp sampler2D depthBuffer; +#elif defined(GL_FRAGMENT_PRECISION_HIGH) +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv; +#if THREE_REVISION < 143 +#define luminance(v) linearToRelativeLuminance(v) +#endif +#if THREE_REVISION >= 137 +vec4 sRGBToLinear(const in vec4 value){return vec4(mix(pow(value.rgb*0.9478672986+vec3(0.0521327014),vec3(2.4)),value.rgb*0.0773993808,vec3(lessThanEqual(value.rgb,vec3(0.04045)))),value.a);} +#endif +float readDepth(const in vec2 uv){ +#if DEPTH_PACKING == 3201 +return unpackRGBAToDepth(texture2D(depthBuffer,uv)); +#else +return texture2D(depthBuffer,uv).r; +#endif +}float getViewZ(const in float depth){ +#ifdef PERSPECTIVE_CAMERA +return perspectiveDepthToViewZ(depth,cameraNear,cameraFar); +#else +return orthographicDepthToViewZ(depth,cameraNear,cameraFar); +#endif +}vec3 RGBToHCV(const in vec3 RGB){vec4 P=mix(vec4(RGB.bg,-1.0,2.0/3.0),vec4(RGB.gb,0.0,-1.0/3.0),step(RGB.b,RGB.g));vec4 Q=mix(vec4(P.xyw,RGB.r),vec4(RGB.r,P.yzx),step(P.x,RGB.r));float C=Q.x-min(Q.w,Q.y);float H=abs((Q.w-Q.y)/(6.0*C+EPSILON)+Q.z);return vec3(H,C,Q.x);}vec3 RGBToHSL(const in vec3 RGB){vec3 HCV=RGBToHCV(RGB);float L=HCV.z-HCV.y*0.5;float S=HCV.y/(1.0-abs(L*2.0-1.0)+EPSILON);return vec3(HCV.x,S,L);}vec3 HueToRGB(const in float H){float R=abs(H*6.0-3.0)-1.0;float G=2.0-abs(H*6.0-2.0);float B=2.0-abs(H*6.0-4.0);return clamp(vec3(R,G,B),0.0,1.0);}vec3 HSLToRGB(const in vec3 HSL){vec3 RGB=HueToRGB(HSL.x);float C=(1.0-abs(2.0*HSL.z-1.0))*HSL.y;return(RGB-0.5)*C+HSL.z;}FRAGMENT_HEAD void main(){FRAGMENT_MAIN_UV vec4 color0=texture2D(inputBuffer,UV);vec4 color1=vec4(0.0);FRAGMENT_MAIN_IMAGE gl_FragColor=color0; +#ifdef ENCODE_OUTPUT +#include +#endif +#include +}`,ek="uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;VERTEX_HEAD void main(){vUv=position.xy*0.5+0.5;VERTEX_MAIN_SUPPORT gl_Position=vec4(position.xy,1.0,1.0);}",tk=class extends Zt{constructor(n,e,t,i,s=!1){super({name:"EffectMaterial",defines:{THREE_REVISION:da.replace(/\D+/g,""),DEPTH_PACKING:"0",ENCODE_OUTPUT:"1"},uniforms:{inputBuffer:new q(null),depthBuffer:new q(null),resolution:new q(new ne),texelSize:new q(new ne),cameraNear:new q(.3),cameraFar:new q(1e3),aspect:new q(1),time:new q(0)},blending:en,toneMapped:!1,depthWrite:!1,depthTest:!1,dithering:s}),n&&this.setShaderParts(n),e&&this.setDefines(e),t&&this.setUniforms(t),this.copyCameraSettings(i)}set inputBuffer(n){this.uniforms.inputBuffer.value=n}setInputBuffer(n){this.uniforms.inputBuffer.value=n}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(n){this.uniforms.depthBuffer.value=n}get depthPacking(){return Number(this.defines.DEPTH_PACKING)}set depthPacking(n){this.defines.DEPTH_PACKING=n.toFixed(0),this.needsUpdate=!0}setDepthBuffer(n,e=Xn){this.depthBuffer=n,this.depthPacking=e}setShaderData(n){this.setShaderParts(n.shaderParts),this.setDefines(n.defines),this.setUniforms(n.uniforms),this.setExtensions(n.extensions)}setShaderParts(n){return this.fragmentShader=$E.replace(Lt.FRAGMENT_HEAD,n.get(Lt.FRAGMENT_HEAD)||"").replace(Lt.FRAGMENT_MAIN_UV,n.get(Lt.FRAGMENT_MAIN_UV)||"").replace(Lt.FRAGMENT_MAIN_IMAGE,n.get(Lt.FRAGMENT_MAIN_IMAGE)||""),this.vertexShader=ek.replace(Lt.VERTEX_HEAD,n.get(Lt.VERTEX_HEAD)||"").replace(Lt.VERTEX_MAIN_SUPPORT,n.get(Lt.VERTEX_MAIN_SUPPORT)||""),this.needsUpdate=!0,this}setDefines(n){for(const e of n.entries())this.defines[e[0]]=e[1];return this.needsUpdate=!0,this}setUniforms(n){for(const e of n.entries())this.uniforms[e[0]]=e[1];return this}setExtensions(n){this.extensions={};for(const e of n)this.extensions[e]=!0;return this}get encodeOutput(){return this.defines.ENCODE_OUTPUT!==void 0}set encodeOutput(n){this.encodeOutput!==n&&(n?this.defines.ENCODE_OUTPUT="1":delete this.defines.ENCODE_OUTPUT,this.needsUpdate=!0)}isOutputEncodingEnabled(n){return this.encodeOutput}setOutputEncodingEnabled(n){this.encodeOutput=n}get time(){return this.uniforms.time.value}set time(n){this.uniforms.time.value=n}setDeltaTime(n){this.uniforms.time.value+=n}adoptCameraSettings(n){this.copyCameraSettings(n)}copyCameraSettings(n){n&&(this.uniforms.cameraNear.value=n.near,this.uniforms.cameraFar.value=n.far,n instanceof hn?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(n,e){const t=this.uniforms;t.resolution.value.set(n,e),t.texelSize.value.set(1/n,1/e),t.aspect.value=n/e}static get Section(){return Lt}},nk=`#include +#include +#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +uniform vec2 lightPosition;uniform float exposure;uniform float decay;uniform float density;uniform float weight;uniform float clampMax;varying vec2 vUv;void main(){vec2 coord=vUv;vec2 delta=lightPosition-coord;delta*=1.0/SAMPLES_FLOAT*density;float illuminationDecay=1.0;vec4 color=vec4(0.0);for(int i=0;i +}`,ik=class extends Zt{constructor(n){super({name:"GodRaysMaterial",defines:{SAMPLES_INT:"60",SAMPLES_FLOAT:"60.0"},uniforms:{inputBuffer:new q(null),lightPosition:new q(n),density:new q(1),decay:new q(1),weight:new q(1),exposure:new q(1),clampMax:new q(1)},blending:en,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:nk,vertexShader:Sl})}set inputBuffer(n){this.uniforms.inputBuffer.value=n}setInputBuffer(n){this.uniforms.inputBuffer.value=n}get lightPosition(){return this.uniforms.lightPosition.value}getLightPosition(){return this.uniforms.lightPosition.value}setLightPosition(n){this.uniforms.lightPosition.value=n}get density(){return this.uniforms.density.value}set density(n){this.uniforms.density.value=n}getDensity(){return this.uniforms.density.value}setDensity(n){this.uniforms.density.value=n}get decay(){return this.uniforms.decay.value}set decay(n){this.uniforms.decay.value=n}getDecay(){return this.uniforms.decay.value}setDecay(n){this.uniforms.decay.value=n}get weight(){return this.uniforms.weight.value}set weight(n){this.uniforms.weight.value=n}getWeight(){return this.uniforms.weight.value}setWeight(n){this.uniforms.weight.value=n}get exposure(){return this.uniforms.exposure.value}set exposure(n){this.uniforms.exposure.value=n}getExposure(){return this.uniforms.exposure.value}setExposure(n){this.uniforms.exposure.value=n}get maxIntensity(){return this.uniforms.clampMax.value}set maxIntensity(n){this.uniforms.clampMax.value=n}getMaxIntensity(){return this.uniforms.clampMax.value}setMaxIntensity(n){this.uniforms.clampMax.value=n}get samples(){return Number(this.defines.SAMPLES_INT)}set samples(n){const e=Math.floor(n);this.defines.SAMPLES_INT=e.toFixed(0),this.defines.SAMPLES_FLOAT=e.toFixed(1),this.needsUpdate=!0}getSamples(){return this.samples}setSamples(n){this.samples=n}},sk=`#include +#if THREE_REVISION < 143 +#define luminance(v) linearToRelativeLuminance(v) +#endif +#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +#ifdef RANGE +uniform vec2 range; +#elif defined(THRESHOLD) +uniform float threshold;uniform float smoothing; +#endif +varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);float l=luminance(texel.rgb); +#ifdef RANGE +float low=step(range.x,l);float high=step(l,range.y);l*=low*high; +#elif defined(THRESHOLD) +l=smoothstep(threshold,threshold+smoothing,l); +#endif +#ifdef COLOR +gl_FragColor=vec4(texel.rgb*l,l); +#else +gl_FragColor=vec4(l); +#endif +}`,rk=class extends Zt{constructor(n=!1,e=null){super({name:"LuminanceMaterial",defines:{THREE_REVISION:da.replace(/\D+/g,"")},uniforms:{inputBuffer:new q(null),threshold:new q(0),smoothing:new q(1),range:new q(null)},blending:en,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:sk,vertexShader:Sl}),this.colorOutput=n,this.luminanceRange=e}set inputBuffer(n){this.uniforms.inputBuffer.value=n}setInputBuffer(n){this.uniforms.inputBuffer.value=n}get threshold(){return this.uniforms.threshold.value}set threshold(n){this.smoothing>0||n>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.threshold.value=n}getThreshold(){return this.threshold}setThreshold(n){this.threshold=n}get smoothing(){return this.uniforms.smoothing.value}set smoothing(n){this.threshold>0||n>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.smoothing.value=n}getSmoothingFactor(){return this.smoothing}setSmoothingFactor(n){this.smoothing=n}get useThreshold(){return this.threshold>0||this.smoothing>0}set useThreshold(n){}get colorOutput(){return this.defines.COLOR!==void 0}set colorOutput(n){n?this.defines.COLOR="1":delete this.defines.COLOR,this.needsUpdate=!0}isColorOutputEnabled(n){return this.colorOutput}setColorOutputEnabled(n){this.colorOutput=n}get useRange(){return this.luminanceRange!==null}set useRange(n){this.luminanceRange=null}get luminanceRange(){return this.uniforms.range.value}set luminanceRange(n){n!==null?this.defines.RANGE="1":delete this.defines.RANGE,this.uniforms.range.value=n,this.needsUpdate=!0}getLuminanceRange(){return this.luminanceRange}setLuminanceRange(n){this.luminanceRange=n}},ok=`#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +#ifdef MASK_PRECISION_HIGH +uniform mediump sampler2D maskTexture; +#else +uniform lowp sampler2D maskTexture; +#endif +#if MASK_FUNCTION != 0 +uniform float strength; +#endif +varying vec2 vUv;void main(){ +#if COLOR_CHANNEL == 0 +float mask=texture2D(maskTexture,vUv).r; +#elif COLOR_CHANNEL == 1 +float mask=texture2D(maskTexture,vUv).g; +#elif COLOR_CHANNEL == 2 +float mask=texture2D(maskTexture,vUv).b; +#else +float mask=texture2D(maskTexture,vUv).a; +#endif +#if MASK_FUNCTION == 0 +#ifdef INVERTED +mask=step(mask,0.0); +#else +mask=1.0-step(mask,0.0); +#endif +#else +mask=clamp(mask*strength,0.0,1.0); +#ifdef INVERTED +mask=1.0-mask; +#endif +#endif +#if MASK_FUNCTION == 2 +gl_FragColor=vec4(mask*texture2D(inputBuffer,vUv).rgb,mask); +#else +gl_FragColor=mask*texture2D(inputBuffer,vUv); +#endif +}`,ak=class extends Zt{constructor(n=null){super({name:"MaskMaterial",uniforms:{maskTexture:new q(n),inputBuffer:new q(null),strength:new q(1)},blending:en,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:ok,vertexShader:Sl}),this.colorChannel=Ng.RED,this.maskFunction=KI.DISCARD}set inputBuffer(n){this.uniforms.inputBuffer.value=n}setInputBuffer(n){this.uniforms.inputBuffer.value=n}set maskTexture(n){this.uniforms.maskTexture.value=n,delete this.defines.MASK_PRECISION_HIGH,n.type!==sn&&(this.defines.MASK_PRECISION_HIGH="1"),this.needsUpdate=!0}setMaskTexture(n){this.maskTexture=n}set colorChannel(n){this.defines.COLOR_CHANNEL=n.toFixed(0),this.needsUpdate=!0}setColorChannel(n){this.colorChannel=n}set maskFunction(n){this.defines.MASK_FUNCTION=n.toFixed(0),this.needsUpdate=!0}setMaskFunction(n){this.maskFunction=n}get inverted(){return this.defines.INVERTED!==void 0}set inverted(n){this.inverted&&!n?delete this.defines.INVERTED:n&&(this.defines.INVERTED="1"),this.needsUpdate=!0}isInverted(){return this.inverted}setInverted(n){this.inverted=n}get strength(){return this.uniforms.strength.value}set strength(n){this.uniforms.strength.value=n}getStrength(){return this.strength}setStrength(n){this.strength=n}},lk="uniform lowp sampler2D inputBuffer;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 c0=texture2D(inputBuffer,vUv0).rg;vec2 c1=texture2D(inputBuffer,vUv1).rg;vec2 c2=texture2D(inputBuffer,vUv2).rg;vec2 c3=texture2D(inputBuffer,vUv3).rg;float d0=(c0.x-c1.x)*0.5;float d1=(c2.x-c3.x)*0.5;float d=length(vec2(d0,d1));float a0=min(c0.y,c1.y);float a1=min(c2.y,c3.y);float visibilityFactor=min(a0,a1);gl_FragColor.rg=(1.0-visibilityFactor>0.001)?vec2(d,0.0):vec2(0.0,d);}",gk="uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=vec2(uv.x+texelSize.x,uv.y);vUv1=vec2(uv.x-texelSize.x,uv.y);vUv2=vec2(uv.x,uv.y+texelSize.y);vUv3=vec2(uv.x,uv.y-texelSize.y);gl_Position=vec4(position.xy,1.0,1.0);}",ck=class extends Zt{constructor(n=new ne){super({name:"OutlineMaterial",uniforms:{inputBuffer:new q(null),texelSize:new q(new ne)},blending:en,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:lk,vertexShader:gk}),this.uniforms.texelSize.value.set(n.x,n.y),this.uniforms.maskTexture=this.uniforms.inputBuffer}set inputBuffer(n){this.uniforms.inputBuffer.value=n}setInputBuffer(n){this.uniforms.inputBuffer.value=n}setTexelSize(n,e){this.uniforms.texelSize.value.set(n,e)}setSize(n,e){this.uniforms.texelSize.value.set(1/n,1/e)}},Ik=`#define sampleLevelZeroOffset(t, coord, offset) texture2D(t, coord + offset * texelSize) +#if __VERSION__ < 300 +#define round(v) floor(v + 0.5) +#endif +#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +uniform lowp sampler2D areaTexture;uniform lowp sampler2D searchTexture;uniform vec2 texelSize;uniform vec2 resolution;varying vec2 vUv;varying vec4 vOffset[3];varying vec2 vPixCoord;void movec(const in bvec2 c,inout vec2 variable,const in vec2 value){if(c.x){variable.x=value.x;}if(c.y){variable.y=value.y;}}void movec(const in bvec4 c,inout vec4 variable,const in vec4 value){movec(c.xy,variable.xy,value.xy);movec(c.zw,variable.zw,value.zw);}vec2 decodeDiagBilinearAccess(in vec2 e){e.r=e.r*abs(5.0*e.r-5.0*0.75);return round(e);}vec4 decodeDiagBilinearAccess(in vec4 e){e.rb=e.rb*abs(5.0*e.rb-5.0*0.75);return round(e);}vec2 searchDiag1(const in vec2 texCoord,const in vec2 dir,out vec2 e){vec4 coord=vec4(texCoord,-1.0,1.0);vec3 t=vec3(texelSize,1.0);for(int i=0;i0.9)){break;}coord.xyz=t*vec3(dir,1.0)+coord.xyz;e=texture2D(inputBuffer,coord.xy).rg;coord.w=dot(e,vec2(0.5));}return coord.zw;}vec2 searchDiag2(const in vec2 texCoord,const in vec2 dir,out vec2 e){vec4 coord=vec4(texCoord,-1.0,1.0);coord.x+=0.25*texelSize.x;vec3 t=vec3(texelSize,1.0);for(int i=0;i0.9)){break;}coord.xyz=t*vec3(dir,1.0)+coord.xyz;e=texture2D(inputBuffer,coord.xy).rg;e=decodeDiagBilinearAccess(e);coord.w=dot(e,vec2(0.5));}return coord.zw;}vec2 areaDiag(const in vec2 dist,const in vec2 e,const in float offset){vec2 texCoord=vec2(AREATEX_MAX_DISTANCE_DIAG,AREATEX_MAX_DISTANCE_DIAG)*e+dist;texCoord=AREATEX_PIXEL_SIZE*texCoord+0.5*AREATEX_PIXEL_SIZE;texCoord.x+=0.5;texCoord.y+=AREATEX_SUBTEX_SIZE*offset;return texture2D(areaTexture,texCoord).rg;}vec2 calculateDiagWeights(const in vec2 texCoord,const in vec2 e,const in vec4 subsampleIndices){vec2 weights=vec2(0.0);vec4 d;vec2 end;if(e.r>0.0){d.xz=searchDiag1(texCoord,vec2(-1.0,1.0),end);d.x+=float(end.y>0.9);}else{d.xz=vec2(0.0);}d.yw=searchDiag1(texCoord,vec2(1.0,-1.0),end);if(d.x+d.y>2.0){vec4 coords=vec4(-d.x+0.25,d.x,d.y,-d.y-0.25)*texelSize.xyxy+texCoord.xyxy;vec4 c;c.xy=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(-1,0)).rg;c.zw=sampleLevelZeroOffset(inputBuffer,coords.zw,vec2(1,0)).rg;c.yxwz=decodeDiagBilinearAccess(c.xyzw);vec2 cc=vec2(2.0)*c.xz+c.yw;movec(bvec2(step(0.9,d.zw)),cc,vec2(0.0));weights+=areaDiag(d.xy,cc,subsampleIndices.z);}d.xz=searchDiag2(texCoord,vec2(-1.0,-1.0),end);if(sampleLevelZeroOffset(inputBuffer,texCoord,vec2(1,0)).r>0.0){d.yw=searchDiag2(texCoord,vec2(1.0),end);d.y+=float(end.y>0.9);}else{d.yw=vec2(0.0);}if(d.x+d.y>2.0){vec4 coords=vec4(-d.x,-d.x,d.y,d.y)*texelSize.xyxy+texCoord.xyxy;vec4 c;c.x=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(-1,0)).g;c.y=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(0,-1)).r;c.zw=sampleLevelZeroOffset(inputBuffer,coords.zw,vec2(1,0)).gr;vec2 cc=vec2(2.0)*c.xz+c.yw;movec(bvec2(step(0.9,d.zw)),cc,vec2(0.0));weights+=areaDiag(d.xy,cc,subsampleIndices.w).gr;}return weights;}float searchLength(const in vec2 e,const in float offset){vec2 scale=SEARCHTEX_SIZE*vec2(0.5,-1.0);vec2 bias=SEARCHTEX_SIZE*vec2(offset,1.0);scale+=vec2(-1.0,1.0);bias+=vec2(0.5,-0.5);scale*=1.0/SEARCHTEX_PACKED_SIZE;bias*=1.0/SEARCHTEX_PACKED_SIZE;return texture2D(searchTexture,scale*e+bias).r;}float searchXLeft(in vec2 texCoord,const in float end){vec2 e=vec2(0.0,1.0);for(int i=0;iend&&e.g>0.8281&&e.r==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(-2.0,0.0)*texelSize+texCoord;}float offset=-(255.0/127.0)*searchLength(e,0.0)+3.25;return texelSize.x*offset+texCoord.x;}float searchXRight(vec2 texCoord,const in float end){vec2 e=vec2(0.0,1.0);for(int i=0;i0.8281&&e.r==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(2.0,0.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e,0.5)+3.25;return-texelSize.x*offset+texCoord.x;}float searchYUp(vec2 texCoord,const in float end){vec2 e=vec2(1.0,0.0);for(int i=0;iend&&e.r>0.8281&&e.g==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=-vec2(0.0,2.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e.gr,0.0)+3.25;return texelSize.y*offset+texCoord.y;}float searchYDown(vec2 texCoord,const in float end){vec2 e=vec2(1.0,0.0);for(int i=0;i0.8281&&e.g==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(0.0,2.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e.gr,0.5)+3.25;return-texelSize.y*offset+texCoord.y;}vec2 area(const in vec2 dist,const in float e1,const in float e2,const in float offset){vec2 texCoord=vec2(AREATEX_MAX_DISTANCE)*round(4.0*vec2(e1,e2))+dist;texCoord=AREATEX_PIXEL_SIZE*texCoord+0.5*AREATEX_PIXEL_SIZE;texCoord.y=AREATEX_SUBTEX_SIZE*offset+texCoord.y;return texture2D(areaTexture,texCoord).rg;}void detectHorizontalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){ +#if !defined(DISABLE_CORNER_DETECTION) +vec2 leftRight=step(d.xy,d.yx);vec2 rounding=(1.0-CORNER_ROUNDING_NORM)*leftRight;rounding/=leftRight.x+leftRight.y;vec2 factor=vec2(1.0);factor.x-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(0,1)).r;factor.x-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,1)).r;factor.y-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(0,-2)).r;factor.y-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,-2)).r;weights*=clamp(factor,0.0,1.0); +#endif +}void detectVerticalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){ +#if !defined(DISABLE_CORNER_DETECTION) +vec2 leftRight=step(d.xy,d.yx);vec2 rounding=(1.0-CORNER_ROUNDING_NORM)*leftRight;rounding/=leftRight.x+leftRight.y;vec2 factor=vec2(1.0);factor.x-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(1,0)).g;factor.x-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,1)).g;factor.y-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(-2,0)).g;factor.y-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(-2,1)).g;weights*=clamp(factor,0.0,1.0); +#endif +}void main(){vec4 weights=vec4(0.0);vec4 subsampleIndices=vec4(0.0);vec2 e=texture2D(inputBuffer,vUv).rg;if(e.g>0.0){ +#if !defined(DISABLE_DIAG_DETECTION) +weights.rg=calculateDiagWeights(vUv,e,subsampleIndices);if(weights.r==-weights.g){ +#endif +vec2 d;vec3 coords;coords.x=searchXLeft(vOffset[0].xy,vOffset[2].x);coords.y=vOffset[1].y;d.x=coords.x;float e1=texture2D(inputBuffer,coords.xy).r;coords.z=searchXRight(vOffset[0].zw,vOffset[2].y);d.y=coords.z;d=round(resolution.xx*d+-vPixCoord.xx);vec2 sqrtD=sqrt(abs(d));float e2=sampleLevelZeroOffset(inputBuffer,coords.zy,vec2(1,0)).r;weights.rg=area(sqrtD,e1,e2,subsampleIndices.y);coords.y=vUv.y;detectHorizontalCornerPattern(weights.rg,coords.xyzy,d); +#if !defined(DISABLE_DIAG_DETECTION) +}else{e.r=0.0;} +#endif +}if(e.r>0.0){vec2 d;vec3 coords;coords.y=searchYUp(vOffset[1].xy,vOffset[2].z);coords.x=vOffset[0].x;d.x=coords.y;float e1=texture2D(inputBuffer,coords.xy).g;coords.z=searchYDown(vOffset[1].zw,vOffset[2].w);d.y=coords.z;d=round(resolution.yy*d-vPixCoord.yy);vec2 sqrtD=sqrt(abs(d));float e2=sampleLevelZeroOffset(inputBuffer,coords.xz,vec2(0,1)).g;weights.ba=area(sqrtD,e1,e2,subsampleIndices.x);coords.x=vUv.x;detectVerticalCornerPattern(weights.ba,coords.xyxz,d);}gl_FragColor=weights;}`,uk="uniform vec2 texelSize;uniform vec2 resolution;varying vec2 vUv;varying vec4 vOffset[3];varying vec2 vPixCoord;void main(){vUv=position.xy*0.5+0.5;vPixCoord=vUv*resolution;vOffset[0]=vUv.xyxy+texelSize.xyxy*vec4(-0.25,-0.125,1.25,-0.125);vOffset[1]=vUv.xyxy+texelSize.xyxy*vec4(-0.125,-0.25,-0.125,1.25);vOffset[2]=vec4(vOffset[0].xz,vOffset[1].yw)+vec4(-2.0,2.0,-2.0,2.0)*texelSize.xxyy*MAX_SEARCH_STEPS_FLOAT;gl_Position=vec4(position.xy,1.0,1.0);}",Ck=class extends Zt{constructor(n=new ne,e=new ne){super({name:"SMAAWeightsMaterial",defines:{MAX_SEARCH_STEPS_INT:"16",MAX_SEARCH_STEPS_FLOAT:"16.0",MAX_SEARCH_STEPS_DIAG_INT:"8",MAX_SEARCH_STEPS_DIAG_FLOAT:"8.0",CORNER_ROUNDING:"25",CORNER_ROUNDING_NORM:"0.25",AREATEX_MAX_DISTANCE:"16.0",AREATEX_MAX_DISTANCE_DIAG:"20.0",AREATEX_PIXEL_SIZE:"(1.0 / vec2(160.0, 560.0))",AREATEX_SUBTEX_SIZE:"(1.0 / 7.0)",SEARCHTEX_SIZE:"vec2(66.0, 33.0)",SEARCHTEX_PACKED_SIZE:"vec2(64.0, 16.0)"},uniforms:{inputBuffer:new q(null),searchTexture:new q(null),areaTexture:new q(null),resolution:new q(e),texelSize:new q(n)},blending:en,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Ik,vertexShader:uk})}set inputBuffer(n){this.uniforms.inputBuffer.value=n}setInputBuffer(n){this.uniforms.inputBuffer.value=n}get searchTexture(){return this.uniforms.searchTexture.value}set searchTexture(n){this.uniforms.searchTexture.value=n}get areaTexture(){return this.uniforms.areaTexture.value}set areaTexture(n){this.uniforms.areaTexture.value=n}setLookupTextures(n,e){this.searchTexture=n,this.areaTexture=e}get orthogonalSearchSteps(){return Number(this.defines.MAX_SEARCH_STEPS_INT)}set orthogonalSearchSteps(n){const e=Math.min(Math.max(n,0),112);this.defines.MAX_SEARCH_STEPS_INT=e.toFixed("0"),this.defines.MAX_SEARCH_STEPS_FLOAT=e.toFixed("1"),this.needsUpdate=!0}setOrthogonalSearchSteps(n){this.orthogonalSearchSteps=n}get diagonalSearchSteps(){return Number(this.defines.MAX_SEARCH_STEPS_DIAG_INT)}set diagonalSearchSteps(n){const e=Math.min(Math.max(n,0),20);this.defines.MAX_SEARCH_STEPS_DIAG_INT=e.toFixed("0"),this.defines.MAX_SEARCH_STEPS_DIAG_FLOAT=e.toFixed("1"),this.needsUpdate=!0}setDiagonalSearchSteps(n){this.diagonalSearchSteps=n}get diagonalDetection(){return this.defines.DISABLE_DIAG_DETECTION===void 0}set diagonalDetection(n){n?delete this.defines.DISABLE_DIAG_DETECTION:this.defines.DISABLE_DIAG_DETECTION="1",this.needsUpdate=!0}isDiagonalDetectionEnabled(){return this.diagonalDetection}setDiagonalDetectionEnabled(n){this.diagonalDetection=n}get cornerRounding(){return Number(this.defines.CORNER_ROUNDING)}set cornerRounding(n){const e=Math.min(Math.max(n,0),100);this.defines.CORNER_ROUNDING=e.toFixed("4"),this.defines.CORNER_ROUNDING_NORM=(e/100).toFixed("4"),this.needsUpdate=!0}setCornerRounding(n){this.cornerRounding=n}get cornerDetection(){return this.defines.DISABLE_CORNER_DETECTION===void 0}set cornerDetection(n){n?delete this.defines.DISABLE_CORNER_DETECTION:this.defines.DISABLE_CORNER_DETECTION="1",this.needsUpdate=!0}isCornerRoundingEnabled(){return this.cornerDetection}setCornerRoundingEnabled(n){this.cornerDetection=n}setSize(n,e){const t=this.uniforms;t.texelSize.value.set(1/n,1/e),t.resolution.value.set(n,e)}},dk=`#include +#include +#ifdef NORMAL_DEPTH +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D normalDepthBuffer; +#else +uniform mediump sampler2D normalDepthBuffer; +#endif +float readDepth(const in vec2 uv){return texture2D(normalDepthBuffer,uv).a;} +#else +uniform lowp sampler2D normalBuffer; +#if DEPTH_PACKING == 3201 +uniform lowp sampler2D depthBuffer; +#elif defined(GL_FRAGMENT_PRECISION_HIGH) +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +float readDepth(const in vec2 uv){ +#if DEPTH_PACKING == 3201 +return unpackRGBAToDepth(texture2D(depthBuffer,uv)); +#else +return texture2D(depthBuffer,uv).r; +#endif +} +#endif +uniform lowp sampler2D noiseTexture;uniform mat4 inverseProjectionMatrix;uniform mat4 projectionMatrix;uniform vec2 texelSize;uniform vec2 cameraNearFar;uniform float intensity;uniform float minRadiusScale;uniform float fade;uniform float bias;uniform vec2 distanceCutoff;uniform vec2 proximityCutoff;varying vec2 vUv;varying vec2 vUv2;float getViewZ(const in float depth){ +#ifdef PERSPECTIVE_CAMERA +return perspectiveDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y); +#else +return orthographicDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y); +#endif +}vec3 getViewPosition(const in vec2 screenPosition,const in float depth,const in float viewZ){vec4 clipPosition=vec4(vec3(screenPosition,depth)*2.0-1.0,1.0);float clipW=projectionMatrix[2][3]*viewZ+projectionMatrix[3][3];clipPosition*=clipW;return(inverseProjectionMatrix*clipPosition).xyz;}float getAmbientOcclusion(const in vec3 p,const in vec3 n,const in float depth,const in vec2 uv){float radiusScale=1.0-smoothstep(0.0,distanceCutoff.y,depth);radiusScale=radiusScale*(1.0-minRadiusScale)+minRadiusScale;float radius=RADIUS*radiusScale;float noise=texture2D(noiseTexture,vUv2).r;float baseAngle=noise*PI2;float rings=SPIRAL_TURNS*PI2;float occlusion=0.0;int taps=0;for(int i=0;i1.0||coords.t<0.0||coords.t>1.0){continue;}float sampleDepth=readDepth(coords);float viewZ=getViewZ(sampleDepth); +#ifdef PERSPECTIVE_CAMERA +float linearSampleDepth=viewZToOrthographicDepth(viewZ,cameraNearFar.x,cameraNearFar.y); +#else +float linearSampleDepth=sampleDepth; +#endif +float proximity=abs(depth-linearSampleDepth);if(proximity +}`,fk="uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,1.0);vUv1=vUv+texelSize*vec2(0.0,1.0);vUv2=vUv+texelSize*vec2(1.0,1.0);vUv3=vUv+texelSize*vec2(-1.0,0.0);vUv4=vUv+texelSize*vec2(1.0,0.0);vUv5=vUv+texelSize*vec2(-1.0,-1.0);vUv6=vUv+texelSize*vec2(0.0,-1.0);vUv7=vUv+texelSize*vec2(1.0,-1.0);gl_Position=vec4(position.xy,1.0,1.0);}",mk=class extends Zt{constructor(){super({name:"UpsamplingMaterial",uniforms:{inputBuffer:new q(null),supportBuffer:new q(null),texelSize:new q(new ne),radius:new q(.85)},blending:en,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:pk,vertexShader:fk})}set inputBuffer(n){this.uniforms.inputBuffer.value=n}set supportBuffer(n){this.uniforms.supportBuffer.value=n}get radius(){return this.uniforms.radius.value}set radius(n){this.uniforms.radius.value=n}setSize(n,e){this.uniforms.texelSize.value.set(1/n,1/e)}},bk=new ac,Fo=null;function vk(){if(Fo===null){const n=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),e=new Float32Array([0,0,2,0,0,2]);Fo=new mt,Fo.setAttribute!==void 0?(Fo.setAttribute("position",new Et(n,3)),Fo.setAttribute("uv",new Et(e,2))):(Fo.addAttribute("position",new Et(n,3)),Fo.addAttribute("uv",new Et(e,2)))}return Fo}var xn=class{constructor(n="Pass",e=new dl,t=bk){this.name=n,this.renderer=null,this.scene=e,this.camera=t,this.screen=null,this.rtt=!0,this.needsSwap=!0,this.needsDepthTexture=!1,this.enabled=!0}get renderToScreen(){return!this.rtt}set renderToScreen(n){if(this.rtt===n){const e=this.fullscreenMaterial;e!==null&&(e.needsUpdate=!0),this.rtt=!n}}set mainScene(n){}set mainCamera(n){}setRenderer(n){this.renderer=n}isEnabled(){return this.enabled}setEnabled(n){this.enabled=n}get fullscreenMaterial(){return this.screen!==null?this.screen.material:null}set fullscreenMaterial(n){let e=this.screen;e!==null?e.material=n:(e=new Tn(vk(),n),e.frustumCulled=!1,this.scene===null&&(this.scene=new dl),this.scene.add(e),this.screen=e)}getFullscreenMaterial(){return this.fullscreenMaterial}setFullscreenMaterial(n){this.fullscreenMaterial=n}getDepthTexture(){return null}setDepthTexture(n,e=Xn){}render(n,e,t,i,s){throw new Error("Render method not implemented!")}setSize(n,e){}initialize(n,e,t){}dispose(){for(const n of Object.keys(this)){const e=this[n];(e instanceof Rt||e instanceof Pn||e instanceof jt||e instanceof xn)&&this[n].dispose()}}},ZV=class extends xn{constructor(n,e=!0){super("CopyPass"),this.fullscreenMaterial=new GV,this.needsSwap=!1,this.renderTarget=n,n===void 0&&(this.renderTarget=new Rt(1,1,{minFilter:je,magFilter:je,stencilBuffer:!1,depthBuffer:!1}),this.renderTarget.texture.name="CopyPass.Target"),this.autoResize=e}get resize(){return this.autoResize}set resize(n){this.autoResize=n}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}setAutoResizeEnabled(n){this.autoResize=n}render(n,e,t,i,s){this.fullscreenMaterial.inputBuffer=e.texture,n.setRenderTarget(this.renderToScreen?null:this.renderTarget),n.render(this.scene,this.camera)}setSize(n,e){this.autoResize&&this.renderTarget.setSize(n,e)}initialize(n,e,t){t!==void 0&&(this.renderTarget.texture.type=t,t!==sn?this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1":po(n)===Pt&&En(this.renderTarget.texture,Pt))}},yk=class extends xn{constructor(){super("ClearMaskPass",null,null),this.needsSwap=!1}render(n,e,t,i,s){const r=n.state.buffers.stencil;r.setLocked(!1),r.setTest(!1)}},Aw=new Re,hc=class extends xn{constructor(n=!0,e=!0,t=!1){super("ClearPass",null,null),this.needsSwap=!1,this.color=n,this.depth=e,this.stencil=t,this.overrideClearColor=null,this.overrideClearAlpha=-1}setClearFlags(n,e,t){this.color=n,this.depth=e,this.stencil=t}getOverrideClearColor(){return this.overrideClearColor}setOverrideClearColor(n){this.overrideClearColor=n}getOverrideClearAlpha(){return this.overrideClearAlpha}setOverrideClearAlpha(n){this.overrideClearAlpha=n}render(n,e,t,i,s){const r=this.overrideClearColor,o=this.overrideClearAlpha,a=n.getClearAlpha(),l=r!==null,c=o>=0;l?(n.getClearColor(Aw),n.setClearColor(r,c?o:a)):c&&n.setClearAlpha(o),n.setRenderTarget(this.renderToScreen?null:e),n.clear(this.color,this.depth,this.stencil),l?n.setClearColor(Aw,a):c&&n.setClearAlpha(a)}},Ko=-1,_t=class extends zs{constructor(n,e=Ko,t=Ko,i=1){super(),this.resizable=n,this.baseSize=new ne(1,1),this.preferredSize=new ne(e,t),this.target=this.preferredSize,this.s=i,this.effectiveSize=new ne,this.addEventListener("change",()=>this.updateEffectiveSize()),this.updateEffectiveSize()}updateEffectiveSize(){const n=this.baseSize,e=this.preferredSize,t=this.effectiveSize,i=this.scale;e.width!==Ko?t.width=e.width:e.height!==Ko?t.width=Math.round(e.height*(n.width/Math.max(n.height,1))):t.width=Math.round(n.width*i),e.height!==Ko?t.height=e.height:e.width!==Ko?t.height=Math.round(e.width/Math.max(n.width/Math.max(n.height,1),1)):t.height=Math.round(n.height*i)}get width(){return this.effectiveSize.width}set width(n){this.preferredWidth=n}get height(){return this.effectiveSize.height}set height(n){this.preferredHeight=n}getWidth(){return this.width}getHeight(){return this.height}get scale(){return this.s}set scale(n){this.s!==n&&(this.s=n,this.preferredSize.setScalar(Ko),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getScale(){return this.scale}setScale(n){this.scale=n}get baseWidth(){return this.baseSize.width}set baseWidth(n){this.baseSize.width!==n&&(this.baseSize.width=n,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseWidth(){return this.baseWidth}setBaseWidth(n){this.baseWidth=n}get baseHeight(){return this.baseSize.height}set baseHeight(n){this.baseSize.height!==n&&(this.baseSize.height=n,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseHeight(){return this.baseHeight}setBaseHeight(n){this.baseHeight=n}setBaseSize(n,e){(this.baseSize.width!==n||this.baseSize.height!==e)&&(this.baseSize.set(n,e),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}get preferredWidth(){return this.preferredSize.width}set preferredWidth(n){this.preferredSize.width!==n&&(this.preferredSize.width=n,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredWidth(){return this.preferredWidth}setPreferredWidth(n){this.preferredWidth=n}get preferredHeight(){return this.preferredSize.height}set preferredHeight(n){this.preferredSize.height!==n&&(this.preferredSize.height=n,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredHeight(){return this.preferredHeight}setPreferredHeight(n){this.preferredHeight=n}setPreferredSize(n,e){(this.preferredSize.width!==n||this.preferredSize.height!==e)&&(this.preferredSize.set(n,e),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}copy(n){this.s=n.scale,this.baseSize.set(n.baseWidth,n.baseHeight),this.preferredSize.set(n.preferredWidth,n.preferredHeight),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height)}static get AUTO_SIZE(){return Ko}},Bm=!1,pw=class{constructor(n=null){this.originalMaterials=new Map,this.material=null,this.materials=null,this.materialsBackSide=null,this.materialsDoubleSide=null,this.materialsFlatShaded=null,this.materialsFlatShadedBackSide=null,this.materialsFlatShadedDoubleSide=null,this.setMaterial(n),this.meshCount=0,this.replaceMaterial=e=>{if(e.isMesh){let t;if(e.material.flatShading)switch(e.material.side){case Pi:t=this.materialsFlatShadedDoubleSide;break;case Ln:t=this.materialsFlatShadedBackSide;break;default:t=this.materialsFlatShaded;break}else switch(e.material.side){case Pi:t=this.materialsDoubleSide;break;case Ln:t=this.materialsBackSide;break;default:t=this.materials;break}this.originalMaterials.set(e,e.material),e.isSkinnedMesh?e.material=t[2]:e.isInstancedMesh?e.material=t[1]:e.material=t[0],++this.meshCount}}}cloneMaterial(n){if(!(n instanceof Zt))return n.clone();const e=n.uniforms,t=new Map;for(const s in e){const r=e[s].value;r.isRenderTargetTexture&&(e[s].value=null,t.set(s,r))}const i=n.clone();for(const s of t)e[s[0]].value=s[1],i.uniforms[s[0]].value=s[1];return i}setMaterial(n){if(this.disposeMaterials(),this.material=n,n!==null){const e=this.materials=[this.cloneMaterial(n),this.cloneMaterial(n),this.cloneMaterial(n)];for(const t of e)t.uniforms=Object.assign({},n.uniforms),t.side=Hr;e[2].skinning=!0,this.materialsBackSide=e.map(t=>{const i=this.cloneMaterial(t);return i.uniforms=Object.assign({},n.uniforms),i.side=Ln,i}),this.materialsDoubleSide=e.map(t=>{const i=this.cloneMaterial(t);return i.uniforms=Object.assign({},n.uniforms),i.side=Pi,i}),this.materialsFlatShaded=e.map(t=>{const i=this.cloneMaterial(t);return i.uniforms=Object.assign({},n.uniforms),i.flatShading=!0,i}),this.materialsFlatShadedBackSide=e.map(t=>{const i=this.cloneMaterial(t);return i.uniforms=Object.assign({},n.uniforms),i.flatShading=!0,i.side=Ln,i}),this.materialsFlatShadedDoubleSide=e.map(t=>{const i=this.cloneMaterial(t);return i.uniforms=Object.assign({},n.uniforms),i.flatShading=!0,i.side=Pi,i})}}render(n,e,t){const i=n.shadowMap.enabled;if(n.shadowMap.enabled=!1,Bm){const s=this.originalMaterials;this.meshCount=0,e.traverse(this.replaceMaterial),n.render(e,t);for(const r of s)r[0].material=r[1];this.meshCount!==s.size&&s.clear()}else{const s=e.overrideMaterial;e.overrideMaterial=this.material,n.render(e,t),e.overrideMaterial=s}n.shadowMap.enabled=i}disposeMaterials(){if(this.material!==null){const n=this.materials.concat(this.materialsBackSide).concat(this.materialsDoubleSide).concat(this.materialsFlatShaded).concat(this.materialsFlatShadedBackSide).concat(this.materialsFlatShadedDoubleSide);for(const e of n)e.dispose()}}dispose(){this.originalMaterials.clear(),this.disposeMaterials()}static get workaroundEnabled(){return Bm}static set workaroundEnabled(n){Bm=n}},Ac=class extends xn{constructor(n,e,t=null){super("RenderPass",n,e),this.needsSwap=!1,this.clearPass=new hc,this.overrideMaterialManager=t===null?null:new pw(t),this.ignoreBackground=!1,this.skipShadowMapUpdate=!1,this.selection=null}set mainScene(n){this.scene=n}set mainCamera(n){this.camera=n}get renderToScreen(){return super.renderToScreen}set renderToScreen(n){super.renderToScreen=n,this.clearPass.renderToScreen=n}get overrideMaterial(){const n=this.overrideMaterialManager;return n!==null?n.material:null}set overrideMaterial(n){const e=this.overrideMaterialManager;n!==null?e!==null?e.setMaterial(n):this.overrideMaterialManager=new pw(n):e!==null&&(e.dispose(),this.overrideMaterialManager=null)}getOverrideMaterial(){return this.overrideMaterial}setOverrideMaterial(n){this.overrideMaterial=n}get clear(){return this.clearPass.enabled}set clear(n){this.clearPass.enabled=n}getSelection(){return this.selection}setSelection(n){this.selection=n}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(n){this.ignoreBackground=n}isShadowMapDisabled(){return this.skipShadowMapUpdate}setShadowMapDisabled(n){this.skipShadowMapUpdate=n}getClearPass(){return this.clearPass}render(n,e,t,i,s){const r=this.scene,o=this.camera,a=this.selection,l=o.layers.mask,c=r.background,u=n.shadowMap.autoUpdate,C=this.renderToScreen?null:e;a!==null&&o.layers.set(a.getLayer()),this.skipShadowMapUpdate&&(n.shadowMap.autoUpdate=!1),(this.ignoreBackground||this.clearPass.overrideClearColor!==null)&&(r.background=null),this.clearPass.enabled&&this.clearPass.render(n,e),n.setRenderTarget(C),this.overrideMaterialManager!==null?this.overrideMaterialManager.render(n,r,o):n.render(r,o),o.layers.mask=l,r.background=c,n.shadowMap.autoUpdate=u}},hy=class extends xn{constructor(n,e,{renderTarget:t,resolutionScale:i=1,width:s=_t.AUTO_SIZE,height:r=_t.AUTO_SIZE,resolutionX:o=s,resolutionY:a=r}={}){super("DepthPass"),this.needsSwap=!1,this.renderPass=new Ac(n,e,new YA({depthPacking:Xr}));const l=this.renderPass;l.skipShadowMapUpdate=!0,l.ignoreBackground=!0;const c=l.getClearPass();c.overrideClearColor=new Re(16777215),c.overrideClearAlpha=1,this.renderTarget=t,this.renderTarget===void 0&&(this.renderTarget=new Rt(1,1,{minFilter:pt,magFilter:pt}),this.renderTarget.texture.name="DepthPass.Target");const u=this.resolution=new _t(this,o,a,i);u.addEventListener("change",C=>this.setSize(u.baseWidth,u.baseHeight))}set mainScene(n){this.renderPass.mainScene=n}set mainCamera(n){this.renderPass.mainCamera=n}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(n){this.resolution.scale=n}render(n,e,t,i,s){const r=this.renderToScreen?null:this.renderTarget;this.renderPass.render(n,r)}setSize(n,e){const t=this.resolution;t.setBaseSize(n,e),this.renderTarget.setSize(t.width,t.height)}},wV=class extends xn{constructor({normalBuffer:n=null,resolutionScale:e=.5,width:t=_t.AUTO_SIZE,height:i=_t.AUTO_SIZE,resolutionX:s=t,resolutionY:r=i}={}){super("DepthDownsamplingPass");const o=new UE;o.normalBuffer=n,this.fullscreenMaterial=o,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new Rt(1,1,{minFilter:pt,magFilter:pt,depthBuffer:!1,type:Zn}),this.renderTarget.texture.name="DepthDownsamplingPass.Target",this.renderTarget.texture.generateMipmaps=!1;const a=this.resolution=new _t(this,s,r,e);a.addEventListener("change",l=>this.setSize(a.baseWidth,a.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}setDepthTexture(n,e=Xn){this.fullscreenMaterial.depthBuffer=n,this.fullscreenMaterial.depthPacking=e}render(n,e,t,i,s){n.setRenderTarget(this.renderToScreen?null:this.renderTarget),n.render(this.scene,this.camera)}setSize(n,e){const t=this.resolution;t.setBaseSize(n,e),this.renderTarget.setSize(t.width,t.height),this.fullscreenMaterial.setSize(n,e)}initialize(n,e,t){const i=n.getContext();if(!(i.getExtension("EXT_color_buffer_float")||i.getExtension("EXT_color_buffer_half_float")))throw new Error("Rendering to float texture is not supported.")}},Gk=class extends xn{constructor({depthPacking:n=Xr}={}){super("DepthCopyPass");const e=new EE;e.outputDepthPacking=n,this.fullscreenMaterial=e,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new Rt(1,1,{type:n===Xr?sn:Zn,minFilter:pt,magFilter:pt,depthBuffer:!1}),this.renderTarget.texture.name="DepthCopyPass.Target"}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}get depthPacking(){return this.fullscreenMaterial.outputDepthPacking}getDepthPacking(){return this.fullscreenMaterial.outputDepthPacking}setDepthTexture(n,e=Xn){this.fullscreenMaterial.depthBuffer=n,this.fullscreenMaterial.inputDepthPacking=e}render(n,e,t,i,s){n.setRenderTarget(this.renderToScreen?null:this.renderTarget),n.render(this.scene,this.camera)}setSize(n,e){this.renderTarget.setSize(n,e)}},ih=new Float32Array([255/256/256**3,255/256/256**2,255/256/256,255/256]);function Bk(n){return(n[0]*ih[0]+n[1]*ih[1]+n[2]*ih[2]+n[3]*ih[3])/255}var Zk=class extends Gk{constructor({depthPacking:n=Xr,mode:e=bI.SINGLE}={}){super({depthPacking:n}),this.name="DepthPickingPass",this.fullscreenMaterial.mode=e,this.pixelBuffer=n===Xr?new Uint8Array(4):new Float32Array(4),this.callback=null}readDepth(n){return this.fullscreenMaterial.texelPosition.set(n.x*.5+.5,n.y*.5+.5),new Promise(e=>{this.callback=e})}render(n,e,t,i,s){const r=this.fullscreenMaterial,o=r.mode;if(o===bI.FULL&&super.render(n),this.callback!==null){const a=this.renderTarget,l=this.pixelBuffer,c=a.texture.type!==Zn;let u=0,C=0;if(o===bI.SINGLE)super.render(n);else{const d=r.texelPosition;u=Math.round(d.x*a.width),C=Math.round(d.y*a.height)}n.readRenderTargetPixels(a,u,C,1,1,l),this.callback(c?Bk(l):l[0]),this.callback=null}}setSize(n,e){this.fullscreenMaterial.mode===bI.FULL&&super.setSize(n,e)}};function fw(n,e,t){for(const i of e){const s="$1"+n+i.charAt(0).toUpperCase()+i.slice(1),r=new RegExp("([^\\.])(\\b"+i+"\\b)","g");for(const o of t.entries())o[1]!==null&&t.set(o[0],o[1].replace(r,s))}}function wk(n,e,t){let i=e.getFragmentShader(),s=e.getVertexShader();const r=i!==void 0&&/mainImage/.test(i),o=i!==void 0&&/mainUv/.test(i);if(t.attributes|=e.getAttributes(),i===void 0)throw new Error(`Missing fragment shader (${e.name})`);if(o&&t.attributes&qi.CONVOLUTION)throw new Error(`Effects that transform UVs are incompatible with convolution effects (${e.name})`);if(!r&&!o)throw new Error(`Could not find mainImage or mainUv function (${e.name})`);{const a=/\w+\s+(\w+)\([\w\s,]*\)\s*{/g,l=t.shaderParts;let c=l.get(Lt.FRAGMENT_HEAD)||"",u=l.get(Lt.FRAGMENT_MAIN_UV)||"",C=l.get(Lt.FRAGMENT_MAIN_IMAGE)||"",d=l.get(Lt.VERTEX_HEAD)||"",h=l.get(Lt.VERTEX_MAIN_SUPPORT)||"";const f=new Set,v=new Set;if(o&&(u+=` ${n}MainUv(UV); +`,t.uvTransformation=!0),s!==null&&/mainSupport/.test(s)){const b=/mainSupport *\([\w\s]*?uv\s*?\)/.test(s);h+=` ${n}MainSupport(`,h+=b?`vUv); +`:`); +`;for(const m of s.matchAll(/(?:varying\s+\w+\s+([\S\s]*?);)/g))for(const B of m[1].split(/\s*,\s*/))t.varyings.add(B),f.add(B),v.add(B);for(const m of s.matchAll(a))v.add(m[1])}for(const b of i.matchAll(a))v.add(b[1]);for(const b of e.defines.keys())v.add(b.replace(/\([\w\s,]*\)/g,""));for(const b of e.uniforms.keys())v.add(b);v.delete("while"),v.delete("for"),v.delete("if"),e.uniforms.forEach((b,m)=>t.uniforms.set(n+m.charAt(0).toUpperCase()+m.slice(1),b)),e.defines.forEach((b,m)=>t.defines.set(n+m.charAt(0).toUpperCase()+m.slice(1),b));const y=new Map([["fragment",i],["vertex",s]]);fw(n,v,t.defines),fw(n,v,y),i=y.get("fragment"),s=y.get("vertex");const A=e.blendMode;if(t.blendModes.set(A.blendFunction,A),r){e.inputColorSpace!==null&&e.inputColorSpace!==t.colorSpace&&(C+=e.inputColorSpace===Pt?`color0 = LinearTosRGB(color0); + `:`color0 = sRGBToLinear(color0); + `),e.outputColorSpace!==bV?t.colorSpace=e.outputColorSpace:e.inputColorSpace!==null&&(t.colorSpace=e.inputColorSpace);const b=/MainImage *\([\w\s,]*?depth[\w\s,]*?\)/;C+=`${n}MainImage(color0, UV, `,t.attributes&qi.DEPTH&&b.test(i)&&(C+="depth, ",t.readDepth=!0),C+=`color1); + `;const m=n+"BlendOpacity";t.uniforms.set(m,A.opacity),C+=`color0 = blend${A.blendFunction}(color0, color1, ${m}); + + `,c+=`uniform float ${m}; + +`}if(c+=i+` +`,s!==null&&(d+=s+` +`),l.set(Lt.FRAGMENT_HEAD,c),l.set(Lt.FRAGMENT_MAIN_UV,u),l.set(Lt.FRAGMENT_MAIN_IMAGE,C),l.set(Lt.VERTEX_HEAD,d),l.set(Lt.VERTEX_MAIN_SUPPORT,h),e.extensions!==null)for(const b of e.extensions)t.extensions.add(b)}}var Sk=class extends xn{constructor(n,...e){super("EffectPass"),this.fullscreenMaterial=new tk(null,null,null,n),this.listener=t=>this.handleEvent(t),this.effects=[],this.setEffects(e),this.skipRendering=!1,this.minTime=1,this.maxTime=Number.POSITIVE_INFINITY,this.timeScale=1}set mainScene(n){for(const e of this.effects)e.mainScene=n}set mainCamera(n){this.fullscreenMaterial.copyCameraSettings(n);for(const e of this.effects)e.mainCamera=n}get encodeOutput(){return this.fullscreenMaterial.encodeOutput}set encodeOutput(n){this.fullscreenMaterial.encodeOutput=n}get dithering(){return this.fullscreenMaterial.dithering}set dithering(n){const e=this.fullscreenMaterial;e.dithering=n,e.needsUpdate=!0}setEffects(n){for(const e of this.effects)e.removeEventListener("change",this.listener);this.effects=n.sort((e,t)=>t.attributes-e.attributes);for(const e of this.effects)e.addEventListener("change",this.listener)}updateMaterial(){const n=new Xk;let e=0;for(const o of this.effects)if(o.blendMode.blendFunction===It.DST)n.attributes|=o.getAttributes()&qi.DEPTH;else{if(n.attributes&o.getAttributes()&qi.CONVOLUTION)throw new Error(`Convolution effects cannot be merged (${o.name})`);wk("e"+e++,o,n)}let t=n.shaderParts.get(Lt.FRAGMENT_HEAD),i=n.shaderParts.get(Lt.FRAGMENT_MAIN_IMAGE),s=n.shaderParts.get(Lt.FRAGMENT_MAIN_UV);const r=/\bblend\b/g;for(const o of n.blendModes.values())t+=o.getShaderCode().replace(r,`blend${o.blendFunction}`)+` +`;n.attributes&qi.DEPTH?(n.readDepth&&(i=`float depth = readDepth(UV); + + `+i),this.needsDepthTexture=this.getDepthTexture()===null):this.needsDepthTexture=!1,n.colorSpace===Pt&&(i+=`color0 = sRGBToLinear(color0); + `),n.uvTransformation?(s=`vec2 transformedUv = vUv; +`+s,n.defines.set("UV","transformedUv")):n.defines.set("UV","vUv"),n.shaderParts.set(Lt.FRAGMENT_HEAD,t),n.shaderParts.set(Lt.FRAGMENT_MAIN_IMAGE,i),n.shaderParts.set(Lt.FRAGMENT_MAIN_UV,s);for(const[o,a]of n.shaderParts)a!==null&&n.shaderParts.set(o,a.trim().replace(/^#/,` +#`));this.skipRendering=e===0,this.needsSwap=!this.skipRendering,this.fullscreenMaterial.setShaderData(n)}recompile(){this.updateMaterial()}getDepthTexture(){return this.fullscreenMaterial.depthBuffer}setDepthTexture(n,e=Xn){this.fullscreenMaterial.depthBuffer=n,this.fullscreenMaterial.depthPacking=e;for(const t of this.effects)t.setDepthTexture(n,e)}render(n,e,t,i,s){for(const r of this.effects)r.update(n,e,i);if(!this.skipRendering||this.renderToScreen){const r=this.fullscreenMaterial;r.inputBuffer=e.texture,r.time+=i*this.timeScale,n.setRenderTarget(this.renderToScreen?null:t),n.render(this.scene,this.camera)}}setSize(n,e){this.fullscreenMaterial.setSize(n,e);for(const t of this.effects)t.setSize(n,e)}initialize(n,e,t){this.renderer=n;for(const i of this.effects)i.initialize(n,e,t);this.updateMaterial(),t!==void 0&&t!==sn&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}dispose(){super.dispose();for(const n of this.effects)n.removeEventListener("change",this.listener),n.dispose()}handleEvent(n){switch(n.type){case"change":this.recompile();break}}},QA=class extends xn{constructor({kernelSize:n=dc.MEDIUM,resolutionScale:e=.5,width:t=_t.AUTO_SIZE,height:i=_t.AUTO_SIZE,resolutionX:s=t,resolutionY:r=i}={}){super("KawaseBlurPass"),this.renderTargetA=new Rt(1,1,{depthBuffer:!1}),this.renderTargetA.texture.name="Blur.Target.A",this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name="Blur.Target.B";const o=this.resolution=new _t(this,s,r,e);o.addEventListener("change",a=>this.setSize(o.baseWidth,o.baseHeight)),this._blurMaterial=new XE,this._blurMaterial.kernelSize=n,this.copyMaterial=new GV}getResolution(){return this.resolution}get blurMaterial(){return this._blurMaterial}set blurMaterial(n){this._blurMaterial=n}get dithering(){return this.copyMaterial.dithering}set dithering(n){this.copyMaterial.dithering=n}get kernelSize(){return this.blurMaterial.kernelSize}set kernelSize(n){this.blurMaterial.kernelSize=n}get width(){return this.resolution.width}set width(n){this.resolution.preferredWidth=n}get height(){return this.resolution.height}set height(n){this.resolution.preferredHeight=n}get scale(){return this.blurMaterial.scale}set scale(n){this.blurMaterial.scale=n}getScale(){return this.blurMaterial.scale}setScale(n){this.blurMaterial.scale=n}getKernelSize(){return this.kernelSize}setKernelSize(n){this.kernelSize=n}getResolutionScale(){return this.resolution.scale}setResolutionScale(n){this.resolution.scale=n}render(n,e,t,i,s){const r=this.scene,o=this.camera,a=this.renderTargetA,l=this.renderTargetB,c=this.blurMaterial,u=c.kernelSequence;let C=e;this.fullscreenMaterial=c;for(let d=0,h=u.length;dthis.setSize(l.baseWidth,l.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}render(n,e,t,i,s){const r=this.fullscreenMaterial;r.inputBuffer=e.texture,n.setRenderTarget(this.renderToScreen?null:this.renderTarget),n.render(this.scene,this.camera)}setSize(n,e){const t=this.resolution;t.setBaseSize(n,e),this.renderTarget.setSize(t.width,t.height)}initialize(n,e,t){t!==void 0&&t!==sn&&(this.renderTarget.texture.type=t,this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},Rk=class extends xn{constructor(n,e){super("MaskPass",n,e),this.needsSwap=!1,this.clearPass=new hc(!1,!1,!0),this.inverse=!1}set mainScene(n){this.scene=n}set mainCamera(n){this.camera=n}get inverted(){return this.inverse}set inverted(n){this.inverse=n}get clear(){return this.clearPass.enabled}set clear(n){this.clearPass.enabled=n}getClearPass(){return this.clearPass}isInverted(){return this.inverted}setInverted(n){this.inverted=n}render(n,e,t,i,s){const r=n.getContext(),o=n.state.buffers,a=this.scene,l=this.camera,c=this.clearPass,u=this.inverted?0:1,C=1-u;o.color.setMask(!1),o.depth.setMask(!1),o.color.setLocked(!0),o.depth.setLocked(!0),o.stencil.setTest(!0),o.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),o.stencil.setFunc(r.ALWAYS,u,4294967295),o.stencil.setClear(C),o.stencil.setLocked(!0),this.clearPass.enabled&&(this.renderToScreen?c.render(n,null):(c.render(n,e),c.render(n,t))),this.renderToScreen?(n.setRenderTarget(null),n.render(a,l)):(n.setRenderTarget(e),n.render(a,l),n.setRenderTarget(t),n.render(a,l)),o.color.setLocked(!1),o.depth.setLocked(!1),o.stencil.setLocked(!1),o.stencil.setFunc(r.EQUAL,1,4294967295),o.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),o.stencil.setLocked(!0)}},Wk=class extends xn{constructor(){super("MipmapBlurPass"),this.needsSwap=!1,this.renderTarget=new Rt(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Upsampling.Mipmap0",this.downsamplingMipmaps=[],this.upsamplingMipmaps=[],this.downsamplingMaterial=new OE,this.upsamplingMaterial=new mk,this.resolution=new ne}get texture(){return this.renderTarget.texture}get levels(){return this.downsamplingMipmaps.length}set levels(n){if(this.levels!==n){const e=this.renderTarget;this.dispose(),this.downsamplingMipmaps=[],this.upsamplingMipmaps=[];for(let t=0;t=0;--d){const h=u[d];l.setSize(C.width,C.height),l.inputBuffer=C.texture,l.supportBuffer=c[d].texture,n.setRenderTarget(h),n.render(r,o),C=h}}setSize(n,e){const t=this.resolution;t.set(n,e);let i=t.width,s=t.height;for(let r=0,o=this.downsamplingMipmaps.length;rthis.setSize(u.baseWidth,u.baseHeight))}set mainScene(n){this.renderPass.mainScene=n}set mainCamera(n){this.renderPass.mainCamera=n}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(n){this.resolution.scale=n}render(n,e,t,i,s){const r=this.renderToScreen?null:this.renderTarget;this.renderPass.render(n,r,r)}setSize(n,e){const t=this.resolution;t.setBaseSize(n,e),this.renderTarget.setSize(t.width,t.height)}},ls=class extends xn{constructor(n,e="inputBuffer"){super("ShaderPass"),this.fullscreenMaterial=n,this.input=e}setInput(n){this.input=n}render(n,e,t,i,s){const r=this.fullscreenMaterial.uniforms;e!==null&&r!==void 0&&r[this.input]!==void 0&&(r[this.input].value=e.texture),n.setRenderTarget(this.renderToScreen?null:t),n.render(this.scene,this.camera)}initialize(n,e,t){t!==void 0&&t!==sn&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},Zm=1/1e3,Mk=1e3,Nk=class{constructor(){this.startTime=performance.now(),this.previousTime=0,this.currentTime=0,this._delta=0,this._elapsed=0,this._fixedDelta=1e3/60,this.timescale=1,this.useFixedDelta=!1,this._autoReset=!1}get autoReset(){return this._autoReset}set autoReset(n){typeof document<"u"&&document.hidden!==void 0&&(n?document.addEventListener("visibilitychange",this):document.removeEventListener("visibilitychange",this),this._autoReset=n)}get delta(){return this._delta*Zm}get fixedDelta(){return this._fixedDelta*Zm}set fixedDelta(n){this._fixedDelta=n*Mk}get elapsed(){return this._elapsed*Zm}update(n){this.useFixedDelta?this._delta=this.fixedDelta:(this.previousTime=this.currentTime,this.currentTime=(n!==void 0?n:performance.now())-this.startTime,this._delta=this.currentTime-this.previousTime),this._delta*=this.timescale,this._elapsed+=this._delta}reset(){this._delta=0,this._elapsed=0,this.currentTime=performance.now()-this.startTime}handleEvent(n){document.hidden||(this.currentTime=performance.now()-this.startTime)}dispose(){this.autoReset=!1}},Hk=class{constructor(e=null,{depthBuffer:t=!0,stencilBuffer:i=!1,multisampling:s=0,frameBufferType:r}={}){this.renderer=null,this.inputBuffer=this.createBuffer(t,i,r,s),this.outputBuffer=this.inputBuffer.clone(),this.copyPass=new ZV,this.depthTexture=null,this.passes=[],this.timer=new Nk,this.autoRenderToScreen=!0,this.setRenderer(e)}get multisampling(){return this.inputBuffer.samples||0}set multisampling(e){const t=this.inputBuffer,i=this.multisampling;i>0&&e>0?(this.inputBuffer.samples=e,this.outputBuffer.samples=e,this.inputBuffer.dispose(),this.outputBuffer.dispose()):i!==e&&(this.inputBuffer.dispose(),this.outputBuffer.dispose(),this.inputBuffer=this.createBuffer(t.depthBuffer,t.stencilBuffer,t.texture.type,e),this.inputBuffer.depthTexture=this.depthTexture,this.outputBuffer=this.inputBuffer.clone())}getTimer(){return this.timer}getRenderer(){return this.renderer}setRenderer(e){if(this.renderer=e,e!==null){const t=e.getSize(new ne),i=e.getContext().getContextAttributes().alpha,s=this.inputBuffer.texture.type;s===sn&&po(e)===Pt&&(En(this.inputBuffer.texture,Pt),En(this.outputBuffer.texture,Pt),this.inputBuffer.dispose(),this.outputBuffer.dispose()),e.autoClear=!1,this.setSize(t.width,t.height);for(const r of this.passes)r.initialize(e,i,s)}}replaceRenderer(e,t=!0){const i=this.renderer,s=i.domElement.parentNode;return this.setRenderer(e),t&&s!==null&&(s.removeChild(i.domElement),s.appendChild(e.domElement)),i}createDepthTexture(){const e=this.depthTexture=new FA;return this.inputBuffer.depthTexture=e,this.inputBuffer.dispose(),this.inputBuffer.stencilBuffer?(e.format=ga,e.type=ta):e.type=oo,e}deleteDepthTexture(){if(this.depthTexture!==null){this.depthTexture.dispose(),this.depthTexture=null,this.inputBuffer.depthTexture=null,this.inputBuffer.dispose();for(const e of this.passes)e.setDepthTexture(null)}}createBuffer(e,t,i,s){const r=this.renderer,o=r===null?new ne:r.getDrawingBufferSize(new ne),a={minFilter:je,magFilter:je,stencilBuffer:t,depthBuffer:e,type:i},l=new Rt(o.width,o.height,a);return s>0&&(l.ignoreDepthForMultisampleCopy=!1,l.samples=s),i===sn&&po(r)===Pt&&En(l.texture,Pt),l.texture.name="EffectComposer.Buffer",l.texture.generateMipmaps=!1,l}setMainScene(e){for(const t of this.passes)t.mainScene=e}setMainCamera(e){for(const t of this.passes)t.mainCamera=e}addPass(e,t){const i=this.passes,s=this.renderer,r=s.getDrawingBufferSize(new ne),o=s.getContext().getContextAttributes().alpha,a=this.inputBuffer.texture.type;if(e.setRenderer(s),e.setSize(r.width,r.height),e.initialize(s,o,a),this.autoRenderToScreen&&(i.length>0&&(i[i.length-1].renderToScreen=!1),e.renderToScreen&&(this.autoRenderToScreen=!1)),t!==void 0?i.splice(t,0,e):i.push(e),this.autoRenderToScreen&&(i[i.length-1].renderToScreen=!0),e.needsDepthTexture||this.depthTexture!==null)if(this.depthTexture===null){const l=this.createDepthTexture();for(e of i)e.setDepthTexture(l)}else e.setDepthTexture(this.depthTexture)}removePass(e){const t=this.passes,i=t.indexOf(e);if(i!==-1&&t.splice(i,1).length>0){if(this.depthTexture!==null){const o=(l,c)=>l||c.needsDepthTexture;t.reduce(o,!1)||(e.getDepthTexture()===this.depthTexture&&e.setDepthTexture(null),this.deleteDepthTexture())}this.autoRenderToScreen&&i===t.length&&(e.renderToScreen=!1,t.length>0&&(t[t.length-1].renderToScreen=!0))}}removeAllPasses(){const e=this.passes;this.deleteDepthTexture(),e.length>0&&(this.autoRenderToScreen&&(e[e.length-1].renderToScreen=!1),this.passes=[])}render(e){const t=this.renderer,i=this.copyPass;let s=this.inputBuffer,r=this.outputBuffer,o=!1,a,l,c;e===void 0&&(this.timer.update(),e=this.timer.delta);for(const u of this.passes)u.enabled&&(u.render(t,s,r,e,o),u.needsSwap&&(o&&(i.renderToScreen=u.renderToScreen,a=t.getContext(),l=t.state.buffers.stencil,l.setFunc(a.NOTEQUAL,1,4294967295),i.render(t,s,r,e,o),l.setFunc(a.EQUAL,1,4294967295)),c=s,s=r,r=c),u instanceof Rk?o=!0:u instanceof yk&&(o=!1))}setSize(e,t,i){const s=this.renderer,r=s.getSize(new ne);(e===void 0||t===void 0)&&(e=r.width,t=r.height),(r.width!==e||r.height!==t)&&s.setSize(e,t,i);const o=s.getDrawingBufferSize(new ne);this.inputBuffer.setSize(o.width,o.height),this.outputBuffer.setSize(o.width,o.height);for(const a of this.passes)a.setSize(o.width,o.height)}reset(){const e=this.timer.autoReset;this.dispose(),this.autoRenderToScreen=!0,this.timer.autoReset=e}dispose(){for(const e of this.passes)e.dispose();this.passes=[],this.inputBuffer!==null&&this.inputBuffer.dispose(),this.outputBuffer!==null&&this.outputBuffer.dispose(),this.deleteDepthTexture(),this.copyPass.dispose(),this.timer.dispose()}},Xk=class{constructor(){this.shaderParts=new Map([[Lt.FRAGMENT_HEAD,null],[Lt.FRAGMENT_MAIN_UV,null],[Lt.FRAGMENT_MAIN_IMAGE,null],[Lt.VERTEX_HEAD,null],[Lt.VERTEX_MAIN_SUPPORT,null]]),this.defines=new Map,this.uniforms=new Map,this.blendModes=new Map,this.extensions=new Set,this.attributes=qi.NONE,this.varyings=new Set,this.uvTransformation=!1,this.readDepth=!1,this.colorSpace=nc}},Ay=class extends Set{constructor(n,e=10){super(),this.l=e,this.exclusive=!1,n!==void 0&&this.set(n)}get layer(){return this.l}set layer(n){const e=this.l;for(const t of this)t.layers.disable(e),t.layers.enable(n);this.l=n}getLayer(){return this.layer}setLayer(n){this.layer=n}isExclusive(){return this.exclusive}setExclusive(n){this.exclusive=n}clear(){const n=this.layer;for(const e of this)e.layers.disable(n);return super.clear()}set(n){this.clear();for(const e of n)this.add(e);return this}indexOf(n){return this.has(n)?0:-1}add(n){return this.exclusive?n.layers.set(this.layer):n.layers.enable(this.layer),super.add(n)}delete(n){return this.has(n)&&n.layers.disable(this.layer),super.delete(n)}toggle(n){let e;return this.has(n)?(this.delete(n),e=!1):(this.add(n),e=!0),e}setVisible(n){for(const e of this)n?e.layers.enable(0):e.layers.disable(0);return this}},Yk="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y,opacity);}",Fk="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,min(y.a,opacity));}",Kk="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y)*0.5,opacity);}",zk="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.rg,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",Lk="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(step(0.0,y)*(1.0-min(vec4(1.0),(1.0-x)/y)),vec4(1.0),step(1.0,x));return mix(x,z,opacity);}",Tk="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=step(0.0,x)*mix(min(vec4(1.0),x/max(1.0-y,1e-9)),vec4(1.0),step(1.0,y));return mix(x,z,opacity);}",Ek="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x,y),opacity);}",kk="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,abs(x-y),opacity);}",Dk="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x/max(y,1e-12),opacity);}",Uk="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y-2.0*x*y),opacity);}",Pk="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 a=min(x,1.0),b=min(y,1.0);vec4 z=mix(2.0*a*b,1.0-2.0*(1.0-a)*(1.0-b),step(0.5,y));return mix(x,z,opacity);}",_k="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,step(1.0,x+y),opacity);}",Jk="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.r,xHSL.gb));return vec4(mix(x.rgb,z,opacity),y.a);}",Ok="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-y,opacity);}",Qk="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y*(1.0-x),opacity);}",jk="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x,y),opacity);}",qk="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(y+x-1.0,0.0,1.0),opacity);}",$k="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x+y,1.0),opacity);}",eD="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(2.0*y+x-1.0,0.0,1.0),opacity);}",tD="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.rg,yHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",nD="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x*y,opacity);}",iD="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-abs(1.0-x-y),opacity);}",sD="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,opacity);}",rD="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(2.0*y*x,1.0-2.0*(1.0-y)*(1.0-x),step(0.5,x));return mix(x,z,opacity);}",oD="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 z=mix(mix(y2,x,step(0.5*x,y)),max(vec4(0.0),y2-1.0),step(x,(y2-1.0)));return mix(x,z,opacity);}",aD="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(min(x*x/max(1.0-y,1e-12),1.0),y,step(1.0,y));return mix(x,z,opacity);}",lD="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.r,yHSL.g,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",gD="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y-min(x*y,1.0),opacity);}",cD="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 w=step(0.5,y);vec4 z=mix(x-(1.0-y2)*x*(1.0-x),mix(x+(y2-1.0)*(sqrt(x)-x),x+(y2-1.0)*x*((16.0*x-12.0)*x+3.0),w*(1.0-step(0.25,x))),w);return mix(x,z,opacity);}",ID="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y;}",uD="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x+y-1.0,0.0),opacity);}",CD="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(max(1.0-min((1.0-x)/(2.0*y),1.0),0.0),min(x/(2.0*(1.0-y)),1.0),step(0.5,y));return mix(x,z,opacity);}",dD=new Map([[It.ADD,Yk],[It.ALPHA,Fk],[It.AVERAGE,Kk],[It.COLOR,zk],[It.COLOR_BURN,Lk],[It.COLOR_DODGE,Tk],[It.DARKEN,Ek],[It.DIFFERENCE,kk],[It.DIVIDE,Dk],[It.DST,null],[It.EXCLUSION,Uk],[It.HARD_LIGHT,Pk],[It.HARD_MIX,_k],[It.HUE,Jk],[It.INVERT,Ok],[It.INVERT_RGB,Qk],[It.LIGHTEN,jk],[It.LINEAR_BURN,qk],[It.LINEAR_DODGE,$k],[It.LINEAR_LIGHT,eD],[It.LUMINOSITY,tD],[It.MULTIPLY,nD],[It.NEGATION,iD],[It.NORMAL,sD],[It.OVERLAY,rD],[It.PIN_LIGHT,oD],[It.REFLECT,aD],[It.SATURATION,lD],[It.SCREEN,gD],[It.SOFT_LIGHT,cD],[It.SRC,ID],[It.SUBTRACT,uD],[It.VIVID_LIGHT,CD]]),hD=class extends zs{constructor(n,e=1){super(),this._blendFunction=n,this.opacity=new q(e)}getOpacity(){return this.opacity.value}setOpacity(n){this.opacity.value=n}get blendFunction(){return this._blendFunction}set blendFunction(n){this._blendFunction=n,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(n){this.blendFunction=n}getShaderCode(){return dD.get(this.blendFunction)}},ai=class extends zs{constructor(n,e,{attributes:t=qi.NONE,blendFunction:i=It.NORMAL,defines:s=new Map,uniforms:r=new Map,extensions:o=null,vertexShader:a=null}={}){super(),this.name=n,this.renderer=null,this.attributes=t,this.fragmentShader=e,this.vertexShader=a,this.defines=s,this.uniforms=r,this.extensions=o,this.blendMode=new hD(i),this.blendMode.addEventListener("change",l=>this.setChanged()),this._inputColorSpace=nc,this._outputColorSpace=bV}get inputColorSpace(){return this._inputColorSpace}set inputColorSpace(n){this._inputColorSpace=n,this.setChanged()}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(n){this._outputColorSpace=n,this.setChanged()}set mainScene(n){}set mainCamera(n){}getName(){return this.name}setRenderer(n){this.renderer=n}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(n){this.attributes=n,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(n){this.fragmentShader=n,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(n){this.vertexShader=n,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(n,e=Xn){}update(n,e,t){}setSize(n,e){}initialize(n,e,t){}dispose(){for(const n of Object.keys(this)){const e=this[n];(e instanceof Rt||e instanceof Pn||e instanceof jt||e instanceof xn)&&this[n].dispose()}}},AD=`#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D map; +#else +uniform lowp sampler2D map; +#endif +uniform float intensity;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=texture2D(map,uv)*intensity;}`,pD=class extends ai{constructor({blendFunction:n=It.SCREEN,luminanceThreshold:e=.9,luminanceSmoothing:t=.025,mipmapBlur:i=!1,intensity:s=1,radius:r=.85,levels:o=8,kernelSize:a=dc.LARGE,resolutionScale:l=.5,width:c=_t.AUTO_SIZE,height:u=_t.AUTO_SIZE,resolutionX:C=c,resolutionY:d=u}={}){super("BloomEffect",AD,{blendFunction:n,uniforms:new Map([["map",new q(null)],["intensity",new q(s)]])}),this.renderTarget=new Rt(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Bloom.Target",this.blurPass=new QA({kernelSize:a}),this.luminancePass=new xk({colorOutput:!0}),this.luminanceMaterial.threshold=e,this.luminanceMaterial.smoothing=t,this.mipmapBlurPass=new Wk,this.mipmapBlurPass.enabled=i,this.mipmapBlurPass.radius=r,this.mipmapBlurPass.levels=o,this.uniforms.get("map").value=i?this.mipmapBlurPass.texture:this.renderTarget.texture;const h=this.resolution=new _t(this,C,d,l);h.addEventListener("change",f=>this.setSize(h.baseWidth,h.baseHeight))}get texture(){return this.mipmapBlurPass.enabled?this.mipmapBlurPass.texture:this.renderTarget.texture}getTexture(){return this.texture}getResolution(){return this.resolution}getBlurPass(){return this.blurPass}getLuminancePass(){return this.luminancePass}get luminanceMaterial(){return this.luminancePass.fullscreenMaterial}getLuminanceMaterial(){return this.luminancePass.fullscreenMaterial}get width(){return this.resolution.width}set width(n){this.resolution.preferredWidth=n}get height(){return this.resolution.height}set height(n){this.resolution.preferredHeight=n}get dithering(){return this.blurPass.dithering}set dithering(n){this.blurPass.dithering=n}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(n){this.blurPass.kernelSize=n}get distinction(){return console.warn(this.name,"distinction was removed"),1}set distinction(n){console.warn(this.name,"distinction was removed")}get intensity(){return this.uniforms.get("intensity").value}set intensity(n){this.uniforms.get("intensity").value=n}getIntensity(){return this.intensity}setIntensity(n){this.intensity=n}getResolutionScale(){return this.resolution.scale}setResolutionScale(n){this.resolution.scale=n}update(n,e,t){const i=this.renderTarget,s=this.luminancePass;s.enabled?(s.render(n,e),this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(n,s.renderTarget):this.blurPass.render(n,s.renderTarget,i)):this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(n,e):this.blurPass.render(n,e,i)}setSize(n,e){const t=this.resolution;t.setBaseSize(n,e),this.renderTarget.setSize(t.width,t.height),this.blurPass.resolution.copy(t),this.luminancePass.setSize(n,e),this.mipmapBlurPass.setSize(n,e)}initialize(n,e,t){this.blurPass.initialize(n,e,t),this.luminancePass.initialize(n,e,t),this.mipmapBlurPass.initialize(n,e,t),t!==void 0&&(this.renderTarget.texture.type=t,po(n)===Pt&&En(this.renderTarget.texture,Pt))}},fD="void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=vec4(vec3(average(inputColor.rgb)),inputColor.a);}",mD=class extends ai{constructor(n){super("ColorAverageEffect",fD,{blendFunction:n})}},bD=`#ifdef RADIAL_MODULATION +uniform float modulationOffset; +#endif +varying float vActive;varying vec2 vUvR;varying vec2 vUvB;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec2 ra=inputColor.ra;vec2 ba=inputColor.ba; +#ifdef RADIAL_MODULATION +const vec2 center=vec2(0.5);float d=distance(uv,center)*2.0;d=max(d-modulationOffset,0.0);if(vActive>0.0&&d>0.0){ra=texture2D(inputBuffer,mix(uv,vUvR,d)).ra;ba=texture2D(inputBuffer,mix(uv,vUvB,d)).ba;} +#else +if(vActive>0.0){ra=texture2D(inputBuffer,vUvR).ra;ba=texture2D(inputBuffer,vUvB).ba;} +#endif +outputColor=vec4(ra.x,inputColor.g,ba.x,max(max(ra.y,ba.y),inputColor.a));}`,vD="uniform vec2 offset;varying float vActive;varying vec2 vUvR;varying vec2 vUvB;void mainSupport(const in vec2 uv){vec2 shift=offset*vec2(1.0,aspect);vActive=(shift.x!=0.0||shift.y!=0.0)?1.0:0.0;vUvR=uv+shift;vUvB=uv-shift;}",yD=class extends ai{constructor({offset:n=new ne(.001,5e-4),radialModulation:e=!1,modulationOffset:t=.15}={}){super("ChromaticAberrationEffect",bD,{vertexShader:vD,attributes:qi.CONVOLUTION,uniforms:new Map([["offset",new q(n)],["modulationOffset",new q(t)]])}),this.radialModulation=e}get offset(){return this.uniforms.get("offset").value}set offset(n){this.uniforms.get("offset").value=n}get radialModulation(){return this.defines.has("RADIAL_MODULATION")}set radialModulation(n){n?this.defines.set("RADIAL_MODULATION","1"):this.defines.delete("RADIAL_MODULATION"),this.setChanged()}get modulationOffset(){return this.uniforms.get("modulationOffset").value}set modulationOffset(n){this.uniforms.get("modulationOffset").value=n}getOffset(){return this.offset}setOffset(n){this.offset=n}},GD=`#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D nearColorBuffer;uniform mediump sampler2D farColorBuffer; +#else +uniform lowp sampler2D nearColorBuffer;uniform lowp sampler2D farColorBuffer; +#endif +uniform lowp sampler2D nearCoCBuffer;uniform float scale;void mainImage(const in vec4 inputColor,const in vec2 uv,const in float depth,out vec4 outputColor){vec4 colorNear=texture2D(nearColorBuffer,uv);vec4 colorFar=texture2D(farColorBuffer,uv);float cocNear=texture2D(nearCoCBuffer,uv).r;cocNear=min(cocNear*scale,1.0);vec4 result=inputColor*(1.0-colorFar.a)+colorFar;result=mix(result,colorNear,cocNear);outputColor=result;}`,BD=class extends ai{constructor(n,{blendFunction:e,worldFocusDistance:t,worldFocusRange:i,focusDistance:s=0,focalLength:r=.1,focusRange:o=r,bokehScale:a=1,resolutionScale:l=1,width:c=_t.AUTO_SIZE,height:u=_t.AUTO_SIZE,resolutionX:C=c,resolutionY:d=u}={}){super("DepthOfFieldEffect",GD,{blendFunction:e,attributes:qi.DEPTH,uniforms:new Map([["nearColorBuffer",new q(null)],["farColorBuffer",new q(null)],["nearCoCBuffer",new q(null)],["scale",new q(1)]])}),this.camera=n,this.renderTarget=new Rt(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="DoF.Intermediate",this.renderTargetMasked=this.renderTarget.clone(),this.renderTargetMasked.texture.name="DoF.Masked.Far",this.renderTargetNear=this.renderTarget.clone(),this.renderTargetNear.texture.name="DoF.Bokeh.Near",this.uniforms.get("nearColorBuffer").value=this.renderTargetNear.texture,this.renderTargetFar=this.renderTarget.clone(),this.renderTargetFar.texture.name="DoF.Bokeh.Far",this.uniforms.get("farColorBuffer").value=this.renderTargetFar.texture,this.renderTargetCoC=this.renderTarget.clone(),this.renderTargetCoC.texture.name="DoF.CoC",this.renderTargetCoCBlurred=this.renderTargetCoC.clone(),this.renderTargetCoCBlurred.texture.name="DoF.CoC.Blurred",this.uniforms.get("nearCoCBuffer").value=this.renderTargetCoCBlurred.texture,this.cocPass=new ls(new RE(n));const h=this.cocMaterial;h.focusDistance=s,h.focusRange=o,t!==void 0&&(h.worldFocusDistance=t),i!==void 0&&(h.worldFocusRange=i),this.blurPass=new QA({resolutionScale:l,resolutionX:C,resolutionY:d,kernelSize:dc.MEDIUM}),this.maskPass=new ls(new ak(this.renderTargetCoC.texture));const f=this.maskPass.fullscreenMaterial;f.maskFunction=KI.MULTIPLY,f.colorChannel=Ng.GREEN,this.bokehNearBasePass=new ls(new nh(!1,!0)),this.bokehNearBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehNearFillPass=new ls(new nh(!0,!0)),this.bokehNearFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehFarBasePass=new ls(new nh(!1,!1)),this.bokehFarBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.bokehFarFillPass=new ls(new nh(!0,!1)),this.bokehFarFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.target=null;const v=this.resolution=new _t(this,C,d,l);v.addEventListener("change",y=>this.setSize(v.baseWidth,v.baseHeight)),this.bokehScale=a}set mainCamera(n){this.camera=n,this.cocMaterial.copyCameraSettings(n)}get cocTexture(){return this.renderTargetCoC.texture}get cocMaterial(){return this.cocPass.fullscreenMaterial}get circleOfConfusionMaterial(){return this.cocMaterial}getCircleOfConfusionMaterial(){return this.circleOfConfusionMaterial}getBlurPass(){return this.blurPass}getResolution(){return this.resolution}get bokehScale(){return this.uniforms.get("scale").value}set bokehScale(n){this.bokehNearBasePass.fullscreenMaterial.scale=n,this.bokehNearFillPass.fullscreenMaterial.scale=n,this.bokehFarBasePass.fullscreenMaterial.scale=n,this.bokehFarFillPass.fullscreenMaterial.scale=n,this.maskPass.fullscreenMaterial.strength=n,this.uniforms.get("scale").value=n}getBokehScale(){return this.bokehScale}setBokehScale(n){this.bokehScale=n}getTarget(){return this.target}setTarget(n){this.target=n}calculateFocusDistance(n){const e=this.camera,t=e.position.distanceTo(n);return el(-t,e.near,e.far)}setDepthTexture(n,e=Xn){this.circleOfConfusionMaterial.depthBuffer=n,this.circleOfConfusionMaterial.depthPacking=e}update(n,e,t){const i=this.renderTarget,s=this.renderTargetCoC,r=this.renderTargetCoCBlurred,o=this.renderTargetMasked;if(this.target!==null){const a=this.calculateFocusDistance(this.target);this.cocMaterial.focusDistance=a}this.cocPass.render(n,null,s),this.blurPass.render(n,s,r),this.maskPass.render(n,e,o),this.bokehFarBasePass.render(n,o,i),this.bokehFarFillPass.render(n,i,this.renderTargetFar),this.bokehNearBasePass.render(n,e,i),this.bokehNearFillPass.render(n,i,this.renderTargetNear)}setSize(n,e){const t=this.resolution;t.setBaseSize(n,e);const i=t.width,s=t.height;this.cocPass.setSize(n,e),this.blurPass.setSize(n,e),this.maskPass.setSize(n,e),this.renderTargetCoC.setSize(n,e),this.renderTargetMasked.setSize(n,e),this.renderTarget.setSize(i,s),this.renderTargetNear.setSize(i,s),this.renderTargetFar.setSize(i,s),this.renderTargetCoCBlurred.setSize(i,s),this.bokehNearBasePass.fullscreenMaterial.setSize(n,e),this.bokehNearFillPass.fullscreenMaterial.setSize(n,e),this.bokehFarBasePass.fullscreenMaterial.setSize(n,e),this.bokehFarFillPass.fullscreenMaterial.setSize(n,e)}initialize(n,e,t){this.cocPass.initialize(n,e,t),this.maskPass.initialize(n,e,t),this.bokehNearBasePass.initialize(n,e,t),this.bokehNearFillPass.initialize(n,e,t),this.bokehFarBasePass.initialize(n,e,t),this.bokehFarFillPass.initialize(n,e,t),this.blurPass.initialize(n,e,sn);const i=this.maskPass.fullscreenMaterial;i.maskFunction=e?KI.MULTIPLY:KI.MULTIPLY_RGB_SET_ALPHA,t!==void 0&&(this.renderTarget.texture.type=t,this.renderTargetNear.texture.type=t,this.renderTargetFar.texture.type=t,this.renderTargetMasked.texture.type=t,po(n)===Pt&&(En(this.renderTarget.texture,Pt),En(this.renderTargetNear.texture,Pt),En(this.renderTargetFar.texture,Pt),En(this.renderTargetMasked.texture,Pt)))}};function ZD(n,e,t){const i=new Map([[WA,1],[Sv,1],[xv,2],[In,4]]);let s;if(i.has(e)||console.error("Invalid noise texture format"),t===sn){s=new Uint8Array(n*i.get(e));for(let r=0,o=s.length;rdistortion.x-columns*random){float sx=clamp(ceil(seeds.x),0.0,1.0);uv.y=sx*(1.0-(uv.y+distortion.y))+(1.0-sx)*distortion.y;}if(uv.xdistortion.y-columns*random){float sy=clamp(ceil(seeds.y),0.0,1.0);uv.x=sy*distortion.x+(1.0-sy)*(1.0-(uv.x+distortion.x));}vec2 normal=texture2D(perturbationMap,uv*random*random).rg;uv+=normal*seeds*(random*0.2);}}",sh="Glitch.Generated";function zi(n,e){return n+Math.random()*(e-n)}var SD=class extends ai{constructor({chromaticAberrationOffset:n=null,delay:e=new ne(1.5,3.5),duration:t=new ne(.6,1),strength:i=new ne(.3,1),columns:s=.05,ratio:r=.85,perturbationMap:o=null,dtSize:a=64}={}){if(super("GlitchEffect",wD,{uniforms:new Map([["perturbationMap",new q(null)],["columns",new q(s)],["active",new q(!1)],["random",new q(1)],["seeds",new q(new ne)],["distortion",new q(new ne)]])}),o===null){const l=new db(a,a,In);l.name=sh,this.perturbationMap=l}else this.perturbationMap=o;this.time=0,this.distortion=this.uniforms.get("distortion").value,this.delay=e,this.duration=t,this.breakPoint=new ne(zi(this.delay.x,this.delay.y),zi(this.duration.x,this.duration.y)),this.strength=i,this.mode=Pa.SPORADIC,this.ratio=r,this.chromaticAberrationOffset=n}get seeds(){return this.uniforms.get("seeds").value}get active(){return this.uniforms.get("active").value}isActive(){return this.active}get minDelay(){return this.delay.x}set minDelay(n){this.delay.x=n}getMinDelay(){return this.delay.x}setMinDelay(n){this.delay.x=n}get maxDelay(){return this.delay.y}set maxDelay(n){this.delay.y=n}getMaxDelay(){return this.delay.y}setMaxDelay(n){this.delay.y=n}get minDuration(){return this.duration.x}set minDuration(n){this.duration.x=n}getMinDuration(){return this.duration.x}setMinDuration(n){this.duration.x=n}get maxDuration(){return this.duration.y}set maxDuration(n){this.duration.y=n}getMaxDuration(){return this.duration.y}setMaxDuration(n){this.duration.y=n}get minStrength(){return this.strength.x}set minStrength(n){this.strength.x=n}getMinStrength(){return this.strength.x}setMinStrength(n){this.strength.x=n}get maxStrength(){return this.strength.y}set maxStrength(n){this.strength.y=n}getMaxStrength(){return this.strength.y}setMaxStrength(n){this.strength.y=n}getMode(){return this.mode}setMode(n){this.mode=n}getGlitchRatio(){return 1-this.ratio}setGlitchRatio(n){this.ratio=Math.min(Math.max(1-n,0),1)}get columns(){return this.uniforms.get("columns").value}set columns(n){this.uniforms.get("columns").value=n}getGlitchColumns(){return this.columns}setGlitchColumns(n){this.columns=n}getChromaticAberrationOffset(){return this.chromaticAberrationOffset}setChromaticAberrationOffset(n){this.chromaticAberrationOffset=n}get perturbationMap(){return this.uniforms.get("perturbationMap").value}set perturbationMap(n){const e=this.perturbationMap;e!==null&&e.name===sh&&e.dispose(),n.minFilter=n.magFilter=pt,n.wrapS=n.wrapT=hs,n.generateMipmaps=!1,this.uniforms.get("perturbationMap").value=n}getPerturbationMap(){return this.perturbationMap}setPerturbationMap(n){this.perturbationMap=n}generatePerturbationMap(n=64){const e=new db(n,n,In);return e.name=sh,e}update(n,e,t){const i=this.mode,s=this.breakPoint,r=this.chromaticAberrationOffset,o=this.strength;let a=this.time,l=!1,c=0,u=0,C;i!==Pa.DISABLED&&(i===Pa.SPORADIC&&(a+=t,C=a>s.x,a>=s.x+s.y&&(s.set(zi(this.delay.x,this.delay.y),zi(this.duration.x,this.duration.y)),a=0)),c=Math.random(),this.uniforms.get("random").value=c,C&&c>this.ratio||i===Pa.CONSTANT_WILD?(l=!0,c*=o.y*.03,u=zi(-Math.PI,Math.PI),this.seeds.set(zi(-o.y,o.y),zi(-o.y,o.y)),this.distortion.set(zi(0,1),zi(0,1))):(C||i===Pa.CONSTANT_MILD)&&(l=!0,c*=o.x*.03,u=zi(-Math.PI,Math.PI),this.seeds.set(zi(-o.x,o.x),zi(-o.x,o.x)),this.distortion.set(zi(0,1),zi(0,1))),this.time=a),r!==null&&(l?r.set(Math.cos(u),Math.sin(u)).multiplyScalar(c):r.set(0,0)),this.uniforms.get("active").value=l}dispose(){const n=this.perturbationMap;n!==null&&n.name===sh&&n.dispose()}},xD=`#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D map; +#else +uniform lowp sampler2D map; +#endif +void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=texture2D(map,uv);}`,wm=new H,mw=new Fe,RD=class extends ai{constructor(n,e,{blendFunction:t=It.SCREEN,samples:i=60,density:s=.96,decay:r=.9,weight:o=.4,exposure:a=.6,clampMax:l=1,blur:c=!0,kernelSize:u=dc.SMALL,resolutionScale:C=.5,width:d=_t.AUTO_SIZE,height:h=_t.AUTO_SIZE,resolutionX:f=d,resolutionY:v=h}={}){super("GodRaysEffect",xD,{blendFunction:t,attributes:qi.DEPTH,uniforms:new Map([["map",new q(null)]])}),this.camera=n,this._lightSource=e,this.lightSource=e,this.lightScene=new dl,this.screenPosition=new ne,this.renderTargetA=new Rt(1,1,{depthBuffer:!1}),this.renderTargetA.texture.name="GodRays.Target.A",this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name="GodRays.Target.B",this.uniforms.get("map").value=this.renderTargetB.texture,this.renderTargetLight=new Rt(1,1),this.renderTargetLight.texture.name="GodRays.Light",this.renderTargetLight.depthTexture=new FA,this.renderPassLight=new Ac(this.lightScene,n),this.renderPassLight.clearPass.overrideClearColor=new Re(0),this.clearPass=new hc(!0,!1,!1),this.clearPass.overrideClearColor=new Re(0),this.blurPass=new QA({kernelSize:u}),this.blurPass.enabled=c,this.depthMaskPass=new ls(new BV);const y=this.depthMaskMaterial;y.depthBuffer1=this.renderTargetLight.depthTexture,y.copyCameraSettings(n),this.godRaysPass=new ls(new ik(this.screenPosition));const A=this.godRaysMaterial;A.density=s,A.decay=r,A.weight=o,A.exposure=a,A.maxIntensity=l,A.samples=i;const b=this.resolution=new _t(this,f,v,C);b.addEventListener("change",m=>this.setSize(b.baseWidth,b.baseHeight))}set mainCamera(n){this.camera=n,this.renderPassLight.mainCamera=n,this.depthMaskMaterial.copyCameraSettings(n)}get lightSource(){return this._lightSource}set lightSource(n){this._lightSource=n,n!==null&&(n.material.depthWrite=!1,n.material.transparent=!0)}getBlurPass(){return this.blurPass}get texture(){return this.renderTargetB.texture}getTexture(){return this.texture}get depthMaskMaterial(){return this.depthMaskPass.fullscreenMaterial}get godRaysMaterial(){return this.godRaysPass.fullscreenMaterial}getGodRaysMaterial(){return this.godRaysMaterial}getResolution(){return this.resolution}get width(){return this.resolution.width}set width(n){this.resolution.preferredWidth=n}get height(){return this.resolution.height}set height(n){this.resolution.preferredHeight=n}get dithering(){return this.godRaysMaterial.dithering}set dithering(n){const e=this.godRaysMaterial;e.dithering=n,e.needsUpdate=!0}get blur(){return this.blurPass.enabled}set blur(n){this.blurPass.enabled=n}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(n){this.blurPass.kernelSize=n}getResolutionScale(){return this.resolution.scale}setResolutionScale(n){this.resolution.scale=n}get samples(){return this.godRaysMaterial.samples}set samples(n){this.godRaysMaterial.samples=n}setDepthTexture(n,e=Xn){this.depthMaskPass.fullscreenMaterial.depthBuffer0=n,this.depthMaskPass.fullscreenMaterial.depthPacking0=e}update(n,e,t){const i=this.lightSource,s=i.parent,r=i.matrixAutoUpdate,o=this.renderTargetA,a=this.renderTargetLight;i.material.depthWrite=!0,i.matrixAutoUpdate=!1,i.updateWorldMatrix(!0,!1),s!==null&&(r||mw.copy(i.matrix),i.matrix.copy(i.matrixWorld)),this.lightScene.add(i),this.renderPassLight.render(n,a),this.clearPass.render(n,o),this.depthMaskPass.render(n,a,o),i.material.depthWrite=!1,i.matrixAutoUpdate=r,s!==null&&(r||i.matrix.copy(mw),s.add(i)),wm.setFromMatrixPosition(i.matrixWorld).project(this.camera),this.screenPosition.set(Math.min(Math.max((wm.x+1)*.5,-1),2),Math.min(Math.max((wm.y+1)*.5,-1),2)),this.blurPass.enabled&&this.blurPass.render(n,o,o),this.godRaysPass.render(n,o,this.renderTargetB)}setSize(n,e){const t=this.resolution;t.setBaseSize(n,e);const i=t.width,s=t.height;this.renderTargetA.setSize(i,s),this.renderTargetB.setSize(i,s),this.renderTargetLight.setSize(i,s),this.blurPass.resolution.copy(t)}initialize(n,e,t){this.blurPass.initialize(n,e,t),this.renderPassLight.initialize(n,e,t),this.depthMaskPass.initialize(n,e,t),this.godRaysPass.initialize(n,e,t),t!==void 0&&(this.renderTargetA.texture.type=t,this.renderTargetB.texture.type=t,this.renderTargetLight.texture.type=t,po(n)===Pt&&(En(this.renderTargetA.texture,Pt),En(this.renderTargetB.texture,Pt),En(this.renderTargetLight.texture,Pt)))}},WD="uniform vec2 scale;uniform float lineWidth;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){float grid=0.5-max(abs(mod(uv.x*scale.x,1.0)-0.5),abs(mod(uv.y*scale.y,1.0)-0.5));outputColor=vec4(vec3(smoothstep(0.0,lineWidth,grid)),inputColor.a);}",VD=class extends ai{constructor({blendFunction:n=It.OVERLAY,scale:e=1,lineWidth:t=0}={}){super("GridEffect",WD,{blendFunction:n,uniforms:new Map([["scale",new q(new ne)],["lineWidth",new q(t)]])}),this.resolution=new ne,this.s=0,this.scale=e,this.l=0,this.lineWidth=t}get scale(){return this.s}set scale(n){this.s=Math.max(n,1e-6),this.setSize(this.resolution.width,this.resolution.height)}getScale(){return this.scale}setScale(n){this.scale=n}get lineWidth(){return this.l}set lineWidth(n){this.l=n,this.setSize(this.resolution.width,this.resolution.height)}getLineWidth(){return this.lineWidth}setLineWidth(n){this.lineWidth=n}setSize(n,e){this.resolution.set(n,e);const t=n/e,i=this.scale*(e*.125);this.uniforms.get("scale").value.set(t*i,i),this.uniforms.get("lineWidth").value=i/e+this.lineWidth}};function bw(n,e,t){const i=document.createElement("canvas"),s=i.getContext("2d");if(i.width=n,i.height=e,t instanceof Image)s.drawImage(t,0,0);else{const r=s.createImageData(n,e);r.data.set(t),s.putImageData(r,0,0)}return i}var SV=class{constructor(n=0,e=0,t=null){this.width=n,this.height=e,this.data=t}toCanvas(){return typeof document>"u"?null:bw(this.width,this.height,this.data)}static from(n){const{width:e,height:t}=n;let i;if(n instanceof Image){const s=bw(e,t,n);s!==null&&(i=s.getContext("2d").getImageData(0,0,e,t).data)}else i=n.data;return new SV(e,t,i)}},MD=`"use strict";(()=>{var O=Math.pow;var _={SCALE_UP:"lut.scaleup"};var k=[new Float32Array(3),new Float32Array(3)],n=[new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3)],Z=[[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1])]];function d(a,t,r,m){let i=r[0]-t[0],e=r[1]-t[1],y=r[2]-t[2],h=a[0]-t[0],A=a[1]-t[1],w=a[2]-t[2],c=e*w-y*A,l=y*h-i*w,x=i*A-e*h,u=Math.sqrt(c*c+l*l+x*x),b=u*.5,s=c/u,F=l/u,f=x/u,p=-(a[0]*s+a[1]*F+a[2]*f),M=m[0]*s+m[1]*F+m[2]*f;return Math.abs(M+p)*b/3}function V(a,t,r,m,i,e){let y=(r+m*t+i*t*t)*4;e[0]=a[y+0],e[1]=a[y+1],e[2]=a[y+2]}function j(a,t,r,m,i,e){let y=r*(t-1),h=m*(t-1),A=i*(t-1),w=Math.floor(y),c=Math.floor(h),l=Math.floor(A),x=Math.ceil(y),u=Math.ceil(h),b=Math.ceil(A),s=y-w,F=h-c,f=A-l;if(w===y&&c===h&&l===A)V(a,t,y,h,A,e);else{let p;s>=F&&F>=f?p=Z[0]:s>=f&&f>=F?p=Z[1]:f>=s&&s>=F?p=Z[2]:F>=s&&s>=f?p=Z[3]:F>=f&&f>=s?p=Z[4]:f>=F&&F>=s&&(p=Z[5]);let[M,g,X,Y]=p,P=k[0];P[0]=s,P[1]=F,P[2]=f;let o=k[1],L=x-w,S=u-c,U=b-l;o[0]=L*M[0]+w,o[1]=S*M[1]+c,o[2]=U*M[2]+l,V(a,t,o[0],o[1],o[2],n[0]),o[0]=L*g[0]+w,o[1]=S*g[1]+c,o[2]=U*g[2]+l,V(a,t,o[0],o[1],o[2],n[1]),o[0]=L*X[0]+w,o[1]=S*X[1]+c,o[2]=U*X[2]+l,V(a,t,o[0],o[1],o[2],n[2]),o[0]=L*Y[0]+w,o[1]=S*Y[1]+c,o[2]=U*Y[2]+l,V(a,t,o[0],o[1],o[2],n[3]);let T=d(g,X,Y,P)*6,q=d(M,X,Y,P)*6,C=d(M,g,Y,P)*6,E=d(M,g,X,P)*6;n[0][0]*=T,n[0][1]*=T,n[0][2]*=T,n[1][0]*=q,n[1][1]*=q,n[1][2]*=q,n[2][0]*=C,n[2][1]*=C,n[2][2]*=C,n[3][0]*=E,n[3][1]*=E,n[3][2]*=E,e[0]=n[0][0]+n[1][0]+n[2][0]+n[3][0],e[1]=n[0][1]+n[1][1]+n[2][1]+n[3][1],e[2]=n[0][2]+n[1][2]+n[2][2]+n[3][2]}}var v=class{static expand(t,r){let m=Math.cbrt(t.length/4),i=new Float32Array(3),e=new t.constructor(O(r,3)*4),y=t instanceof Uint8Array?255:1,h=O(r,2),A=1/(r-1);for(let w=0;w{let t=a.data,r=t.data;switch(t.operation){case _.SCALE_UP:r=v.expand(r,t.size);break}postMessage(r,[r.buffer]),close()});})(); +`,vw=new Re,Vh=class extends ol{constructor(n,e){super(n,e,e,e),this.type=Zn,this.format=In,this.minFilter=je,this.magFilter=je,this.wrapS=Kn,this.wrapT=Kn,this.wrapR=Kn,this.unpackAlignment=1,this.needsUpdate=!0,En(this,nc),this.domainMin=new H(0,0,0),this.domainMax=new H(1,1,1)}get isLookupTexture3D(){return!0}scaleUp(n,e=!0){const t=this.image;let i;return n<=t.width?i=Promise.reject(new Error("The target size must be greater than the current size")):i=new Promise((s,r)=>{const o=URL.createObjectURL(new Blob([MD],{type:"text/javascript"})),a=new Worker(o);a.addEventListener("error",c=>r(c.error)),a.addEventListener("message",c=>{const u=new Vh(c.data,n);Gm(this,u),u.type=this.type,u.name=this.name,URL.revokeObjectURL(o),s(u)});const l=e?[t.data.buffer]:[];a.postMessage({operation:WE.SCALE_UP,data:t.data,size:n},l)}),i}applyLUT(n){const e=this.image,t=n.image,i=Math.min(e.width,e.height,e.depth),s=Math.min(t.width,t.height,t.depth);if(i!==s)console.error("Size mismatch");else if(n.type!==Zn||this.type!==Zn)console.error("Both LUTs must be FloatType textures");else if(n.format!==In||this.format!==In)console.error("Both LUTs must be RGBA textures");else{const r=e.data,o=t.data,a=i,l=a**2,c=a-1;for(let u=0,C=a**3;ui){r=new Uint8Array(l.length);for(let c=0;c=f.g){if(f.g>f.b){frac=f.rgb;v2=vec3(v4.x,v1.y,v1.z);v3=vec3(v4.x,v4.y,v1.z);}else if(f.r>=f.b){frac=f.rbg;v2=vec3(v4.x,v1.y,v1.z);v3=vec3(v4.x,v1.y,v4.z);}else{frac=f.brg;v2=vec3(v1.x,v1.y,v4.z);v3=vec3(v4.x,v1.y,v4.z);}}else{if(f.b>f.g){frac=f.bgr;v2=vec3(v1.x,v1.y,v4.z);v3=vec3(v1.x,v4.y,v4.z);}else if(f.r>=f.b){frac=f.grb;v2=vec3(v1.x,v4.y,v1.z);v3=vec3(v4.x,v4.y,v1.z);}else{frac=f.gbr;v2=vec3(v1.x,v4.y,v1.z);v3=vec3(v1.x,v4.y,v4.z);}}vec4 n1=texture(lut,v1);vec4 n2=texture(lut,v2);vec4 n3=texture(lut,v3);vec4 n4=texture(lut,v4);vec4 weights=vec4(1.0-frac.x,frac.x-frac.y,frac.y-frac.z,frac.z);vec4 result=weights*mat4(vec4(n1.r,n2.r,n3.r,n4.r),vec4(n1.g,n2.g,n3.g,n4.g),vec4(n1.b,n2.b,n3.b,n4.b),vec4(1.0));return vec4(result.rgb,1.0); +#else +return texture(lut,rgb); +#endif +} +#else +#ifdef LUT_PRECISION_HIGH +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D lut; +#else +uniform mediump sampler2D lut; +#endif +#else +uniform lowp sampler2D lut; +#endif +vec4 applyLUT(const in vec3 rgb){float slice=rgb.b*LUT_SIZE;float slice0=floor(slice);float interp=slice-slice0;float centeredInterp=interp-0.5;float slice1=slice0+sign(centeredInterp); +#ifdef LUT_STRIP_HORIZONTAL +float xOffset=clamp(rgb.r*LUT_TEXEL_HEIGHT,LUT_TEXEL_WIDTH*0.5,LUT_TEXEL_HEIGHT-LUT_TEXEL_WIDTH*0.5);vec2 uv0=vec2(slice0*LUT_TEXEL_HEIGHT+xOffset,rgb.g);vec2 uv1=vec2(slice1*LUT_TEXEL_HEIGHT+xOffset,rgb.g); +#else +float yOffset=clamp(rgb.g*LUT_TEXEL_WIDTH,LUT_TEXEL_HEIGHT*0.5,LUT_TEXEL_WIDTH-LUT_TEXEL_HEIGHT*0.5);vec2 uv0=vec2(rgb.r,slice0*LUT_TEXEL_WIDTH+yOffset);vec2 uv1=vec2(rgb.r,slice1*LUT_TEXEL_WIDTH+yOffset); +#endif +vec4 sample0=texture2D(lut,uv0);vec4 sample1=texture2D(lut,uv1);return mix(sample0,sample1,abs(centeredInterp));} +#endif +void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 c=inputColor.rgb; +#ifdef CUSTOM_INPUT_DOMAIN +if(c.r>=domainMin.r&&c.g>=domainMin.g&&c.b>=domainMin.b&&c.r<=domainMax.r&&c.g<=domainMax.g&&c.b<=domainMax.b){c=applyLUT(scale*c+offset).rgb;}else{c=inputColor.rgb;} +#else +#if !defined(LUT_3D) || defined(TETRAHEDRAL_INTERPOLATION) +c=clamp(c,0.0,1.0); +#endif +c=applyLUT(scale*c+offset).rgb; +#endif +outputColor=vec4(c,inputColor.a);}`,HD=class extends ai{constructor(n,{blendFunction:e=It.SRC,tetrahedralInterpolation:t=!1,inputEncoding:i=Ys,inputColorSpace:s}={}){super("LUT3DEffect",ND,{blendFunction:e,uniforms:new Map([["lut",new q(null)],["scale",new q(new H)],["offset",new q(new H)],["domainMin",new q(null)],["domainMax",new q(null)]])}),this.tetrahedralInterpolation=t,this.inputColorSpace=s||vV.get(i),this.lut=n}get inputEncoding(){return this.inputColorSpace}set inputEncoding(n){this.inputColorSpace=n}getInputEncoding(){return this.inputColorSpace}setInputEncoding(n){this.inputColorSpace=n}getOutputEncoding(){return this.outputColorSpace}get lut(){return this.uniforms.get("lut").value}set lut(n){const e=this.defines,t=this.uniforms;if(this.lut!==n&&(t.get("lut").value=n,n!==null)){const i=n.image,s=this.tetrahedralInterpolation;if(e.clear(),e.set("LUT_SIZE",Math.min(i.width,i.height).toFixed(16)),e.set("LUT_TEXEL_WIDTH",(1/i.width).toFixed(16)),e.set("LUT_TEXEL_HEIGHT",(1/i.height).toFixed(16)),t.get("domainMin").value=null,t.get("domainMax").value=null,(n.type===Zn||n.type===us)&&e.set("LUT_PRECISION_HIGH","1"),i.width>i.height?e.set("LUT_STRIP_HORIZONTAL","1"):n instanceof ol&&e.set("LUT_3D","1"),n instanceof Vh){const r=n.domainMin,o=n.domainMax;(r.x!==0||r.y!==0||r.z!==0||o.x!==1||o.y!==1||o.z!==1)&&(e.set("CUSTOM_INPUT_DOMAIN","1"),t.get("domainMin").value=r.clone(),t.get("domainMax").value=o.clone())}this.tetrahedralInterpolation=s}}getLUT(){return this.lut}setLUT(n){this.lut=n}updateScaleOffset(){const n=this.lut;if(n!==null){const e=Math.min(n.image.width,n.image.height),t=this.uniforms.get("scale").value,i=this.uniforms.get("offset").value;if(this.tetrahedralInterpolation&&n instanceof ol)if(this.defines.has("CUSTOM_INPUT_DOMAIN")){const s=n.domainMax.clone().sub(n.domainMin);t.setScalar(e-1).divide(s),i.copy(n.domainMin).negate().multiply(t)}else t.setScalar(e-1),i.setScalar(0);else if(this.defines.has("CUSTOM_INPUT_DOMAIN")){const s=n.domainMax.clone().sub(n.domainMin).multiplyScalar(e);t.setScalar(e-1).divide(s),i.copy(n.domainMin).negate().multiply(t).addScalar(1/(2*e))}else t.setScalar((e-1)/e),i.setScalar(1/(2*e))}}configureTetrahedralInterpolation(){const n=this.lut;n!==null&&(n.minFilter=je,n.magFilter=je,this.tetrahedralInterpolation&&(n instanceof ol?(n.minFilter=pt,n.magFilter=pt):console.warn("Tetrahedral interpolation requires a 3D texture")),n.source===void 0&&(n.needsUpdate=!0))}get tetrahedralInterpolation(){return this.defines.has("TETRAHEDRAL_INTERPOLATION")}set tetrahedralInterpolation(n){n?this.defines.set("TETRAHEDRAL_INTERPOLATION","1"):this.defines.delete("TETRAHEDRAL_INTERPOLATION"),this.configureTetrahedralInterpolation(),this.updateScaleOffset(),this.setChanged()}setTetrahedralInterpolationEnabled(n){this.tetrahedralInterpolation=n}},XD=`uniform lowp sampler2D edgeTexture;uniform lowp sampler2D maskTexture;uniform vec3 visibleEdgeColor;uniform vec3 hiddenEdgeColor;uniform float pulse;uniform float edgeStrength; +#ifdef USE_PATTERN +uniform lowp sampler2D patternTexture;varying vec2 vUvPattern; +#endif +void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec2 edge=texture2D(edgeTexture,uv).rg;vec2 mask=texture2D(maskTexture,uv).rg; +#ifndef X_RAY +edge.y=0.0; +#endif +edge*=(edgeStrength*mask.x*pulse);vec3 color=edge.x*visibleEdgeColor+edge.y*hiddenEdgeColor;float visibilityFactor=0.0; +#ifdef USE_PATTERN +vec4 patternColor=texture2D(patternTexture,vUvPattern); +#ifdef X_RAY +float hiddenFactor=0.5; +#else +float hiddenFactor=0.0; +#endif +visibilityFactor=(1.0-mask.y>0.0)?1.0:hiddenFactor;visibilityFactor*=(1.0-mask.x)*patternColor.a;color+=visibilityFactor*patternColor.rgb; +#endif +float alpha=max(max(edge.x,edge.y),visibilityFactor); +#ifdef ALPHA +outputColor=vec4(color,alpha); +#else +outputColor=vec4(color,max(alpha,inputColor.a)); +#endif +}`,YD="uniform float patternScale;varying vec2 vUvPattern;void mainSupport(const in vec2 uv){vUvPattern=uv*vec2(aspect,1.0)*patternScale;}",FD=class extends ai{constructor(n,e,{blendFunction:t=It.SCREEN,patternTexture:i=null,patternScale:s=1,edgeStrength:r=1,pulseSpeed:o=0,visibleEdgeColor:a=16777215,hiddenEdgeColor:l=2230538,kernelSize:c=dc.VERY_SMALL,blur:u=!1,xRay:C=!0,multisampling:d=0,resolutionScale:h=.5,width:f=_t.AUTO_SIZE,height:v=_t.AUTO_SIZE,resolutionX:y=f,resolutionY:A=v}={}){super("OutlineEffect",XD,{uniforms:new Map([["maskTexture",new q(null)],["edgeTexture",new q(null)],["edgeStrength",new q(r)],["visibleEdgeColor",new q(new Re(a))],["hiddenEdgeColor",new q(new Re(l))],["pulse",new q(1)],["patternScale",new q(s)],["patternTexture",new q(null)]])}),this.blendMode.addEventListener("change",S=>{this.blendMode.blendFunction===It.ALPHA?this.defines.set("ALPHA","1"):this.defines.delete("ALPHA"),this.setChanged()}),this.blendMode.blendFunction=t,this.patternTexture=i,this.xRay=C,this.scene=n,this.camera=e,this.renderTargetMask=new Rt(1,1),this.renderTargetMask.samples=d,this.renderTargetMask.texture.name="Outline.Mask",this.uniforms.get("maskTexture").value=this.renderTargetMask.texture,this.renderTargetOutline=new Rt(1,1,{depthBuffer:!1}),this.renderTargetOutline.texture.name="Outline.Edges",this.uniforms.get("edgeTexture").value=this.renderTargetOutline.texture,this.clearPass=new hc,this.clearPass.overrideClearColor=new Re(0),this.clearPass.overrideClearAlpha=1,this.depthPass=new hy(n,e),this.maskPass=new Ac(n,e,new zE(this.depthPass.texture,e));const b=this.maskPass.clearPass;b.overrideClearColor=new Re(16777215),b.overrideClearAlpha=1,this.blurPass=new QA({resolutionScale:h,resolutionX:y,resolutionY:A,kernelSize:c}),this.blurPass.enabled=u;const m=this.blurPass.resolution;m.addEventListener("change",S=>this.setSize(m.baseWidth,m.baseHeight)),this.outlinePass=new ls(new ck);const B=this.outlinePass.fullscreenMaterial;B.inputBuffer=this.renderTargetMask.texture,this.time=0,this.active=!1,this.selection=new Ay,this.selection.layer=10,this.pulseSpeed=o}set mainScene(n){this.scene=n,this.depthPass.mainScene=n,this.maskPass.mainScene=n}set mainCamera(n){this.camera=n,this.depthPass.mainCamera=n,this.maskPass.mainCamera=n,this.maskPass.overrideMaterial.copyCameraSettings(n)}get resolution(){return this.blurPass.resolution}getResolution(){return this.blurPass.getResolution()}get multisampling(){return this.renderTargetMask.samples}set multisampling(n){this.renderTargetMask.samples=n,this.renderTargetMask.dispose()}get patternScale(){return this.uniforms.get("patternScale").value}set patternScale(n){this.uniforms.get("patternScale").value=n}get edgeStrength(){return this.uniforms.get("edgeStrength").value}set edgeStrength(n){this.uniforms.get("edgeStrength").value=n}get visibleEdgeColor(){return this.uniforms.get("visibleEdgeColor").value}set visibleEdgeColor(n){this.uniforms.get("visibleEdgeColor").value=n}get hiddenEdgeColor(){return this.uniforms.get("hiddenEdgeColor").value}set hiddenEdgeColor(n){this.uniforms.get("hiddenEdgeColor").value=n}getBlurPass(){return this.blurPass}getSelection(){return this.selection}getPulseSpeed(){return this.pulseSpeed}setPulseSpeed(n){this.pulseSpeed=n}get width(){return this.resolution.width}set width(n){this.resolution.preferredWidth=n}get height(){return this.resolution.height}set height(n){this.resolution.preferredHeight=n}get selectionLayer(){return this.selection.layer}set selectionLayer(n){this.selection.layer=n}get dithering(){return this.blurPass.dithering}set dithering(n){this.blurPass.dithering=n}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(n){this.blurPass.kernelSize=n}get blur(){return this.blurPass.enabled}set blur(n){this.blurPass.enabled=n}get xRay(){return this.defines.has("X_RAY")}set xRay(n){this.xRay!==n&&(n?this.defines.set("X_RAY","1"):this.defines.delete("X_RAY"),this.setChanged())}isXRayEnabled(){return this.xRay}setXRayEnabled(n){this.xRay=n}get patternTexture(){return this.uniforms.get("patternTexture").value}set patternTexture(n){n!==null?(n.wrapS=n.wrapT=hs,this.defines.set("USE_PATTERN","1"),this.setVertexShader(YD)):(this.defines.delete("USE_PATTERN"),this.setVertexShader(null)),this.uniforms.get("patternTexture").value=n,this.setChanged()}setPatternTexture(n){this.patternTexture=n}getResolutionScale(){return this.resolution.scale}setResolutionScale(n){this.resolution.scale=n}setSelection(n){return this.selection.set(n),this}clearSelection(){return this.selection.clear(),this}selectObject(n){return this.selection.add(n),this}deselectObject(n){return this.selection.delete(n),this}update(n,e,t){const i=this.scene,s=this.camera,r=this.selection,a=this.uniforms.get("pulse"),l=i.background,c=s.layers.mask;r.size>0?(i.background=null,a.value=1,this.pulseSpeed>0&&(a.value=Math.cos(this.time*this.pulseSpeed*10)*.375+.625),this.active=!0,this.time+=t,r.setVisible(!1),this.depthPass.render(n),r.setVisible(!0),s.layers.set(r.layer),this.maskPass.render(n,this.renderTargetMask),s.layers.mask=c,i.background=l,this.outlinePass.render(n,null,this.renderTargetOutline),this.blurPass.enabled&&this.blurPass.render(n,this.renderTargetOutline,this.renderTargetOutline)):this.active&&(this.clearPass.render(n,this.renderTargetOutline),this.active=!1)}setSize(n,e){this.blurPass.setSize(n,e),this.renderTargetMask.setSize(n,e);const t=this.resolution;t.setBaseSize(n,e);const i=t.width,s=t.height;this.depthPass.setSize(i,s),this.renderTargetOutline.setSize(i,s),this.outlinePass.fullscreenMaterial.setSize(i,s)}initialize(n,e,t){this.blurPass.initialize(n,e,sn),t!==void 0&&(this.depthPass.initialize(n,e,t),this.maskPass.initialize(n,e,t),this.outlinePass.initialize(n,e,t))}},KD="uniform bool active;uniform vec4 d;void mainUv(inout vec2 uv){if(active){uv=d.xy*(floor(uv*d.zw)+0.5);}}",zD=class extends ai{constructor(n=30){super("PixelationEffect",KD,{uniforms:new Map([["active",new q(!1)],["d",new q(new Vt)]])}),this.resolution=new ne,this._granularity=0,this.granularity=n}get granularity(){return this._granularity}set granularity(n){let e=Math.floor(n);e%2>0&&(e+=1),this._granularity=e,this.uniforms.get("active").value=e>0,this.setSize(this.resolution.width,this.resolution.height)}getGranularity(){return this.granularity}setGranularity(n){this.granularity=n}setSize(n,e){const t=this.resolution;t.set(n,e);const i=this.granularity,s=i/t.x,r=i/t.y;this.uniforms.get("d").value.set(s,r,1/s,1/r)}};new H;new H;var LD=class extends pD{constructor(n,e,t){super(t),this.setAttributes(this.getAttributes()|qi.DEPTH),this.camera=e,this.depthPass=new hy(n,e),this.clearPass=new hc(!0,!1,!1),this.clearPass.overrideClearColor=new Re(0),this.depthMaskPass=new ls(new BV);const i=this.depthMaskMaterial;i.copyCameraSettings(e),i.depthBuffer1=this.depthPass.texture,i.depthPacking1=Xr,i.depthMode=ru,this.renderTargetMasked=new Rt(1,1,{depthBuffer:!1}),this.renderTargetMasked.texture.name="Bloom.Masked",this.selection=new Ay,this.selection.layer=11,this._inverted=!1,this._ignoreBackground=!1}set mainScene(n){this.depthPass.mainScene=n}set mainCamera(n){this.camera=n,this.depthPass.mainCamera=n,this.depthMaskMaterial.copyCameraSettings(n)}getSelection(){return this.selection}get depthMaskMaterial(){return this.depthMaskPass.fullscreenMaterial}get inverted(){return this._inverted}set inverted(n){this._inverted=n,this.depthMaskMaterial.depthMode=n?xA:ru}isInverted(){return this.inverted}setInverted(n){this.inverted=n}get ignoreBackground(){return this._ignoreBackground}set ignoreBackground(n){this._ignoreBackground=n,this.depthMaskMaterial.maxDepthStrategy=n?FI.DISCARD_MAX_DEPTH:FI.KEEP_MAX_DEPTH}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(n){this.ignoreBackground=n}setDepthTexture(n,e=Xn){this.depthMaskMaterial.depthBuffer0=n,this.depthMaskMaterial.depthPacking0=e}update(n,e,t){const i=this.camera,s=this.selection,r=this.inverted;let o=e;if(this.ignoreBackground||!r||s.size>0){const a=i.layers.mask;i.layers.set(s.layer),this.depthPass.render(n),i.layers.mask=a,o=this.renderTargetMasked,this.clearPass.render(n,o),this.depthMaskPass.render(n,e,o)}super.update(n,o,t)}setSize(n,e){super.setSize(n,e),this.renderTargetMasked.setSize(n,e),this.depthPass.setSize(n,e)}initialize(n,e,t){super.initialize(n,e,t),this.clearPass.initialize(n,e,t),this.depthPass.initialize(n,e,t),this.depthMaskPass.initialize(n,e,t),t!==void 0&&(this.renderTargetMasked.texture.type=t,po(n)===Pt&&En(this.renderTargetMasked.texture,Pt))}},yw="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAQCAYAAACm53kpAAAAeElEQVRYR+2XSwqAMAxEJ168ePEqwRSKhIIiuHjJqiU0gWE+1CQdApcVAMUAuARaMGCX1MIL/Ow13++9lW2s3mW9MWvsnWc/2fvGygwPAN4E8QzAA4CXAB6AHjG4JTHYI1ey3pcx6FHnEfhLDOIBKAmUBK6/ANUDTlROXAHd9EC1AAAAAElFTkSuQmCC",Gw="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAIwCAYAAAABNmBHAAAgAElEQVR4Xuy9CbhlV1ktOvbpq09DkiIkUBI6kxASIH0DlAQiIK1wRfSJTx+i4JX7vKIigs8HXpXvqVcvrcC9agQ7IDTSSWgqCQQliDRBJKkkhDSkqVPNqVOnP+8b//rH3P+eZ+199tlznVTlvVrft7+1T7OaueZY42/m37QALKNk2wHg1pITlB17mC+Pp11W3X/LHyT32vhg48/5SOv+PnwpsHA70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FCCRRqKuPUdqjlC9o07JZwKVNHeBC94DQcZO0XAAkmgotAk9QYrR9f/BvByYfMSATDVMzwTXMM3QMDAVAgVHCZ7/MaQK4QZUHiNCbBQlqUw74YCb7gcmYkelC9YFlwvVv7RRAorTuBkECU9asCID9/x9B935zYzyKkqpfiNHxcA0gLQgvBAaPVkCqm3h2AtC5m/RyEqzw/4xhGL3hD++MmslgqCbgUfLKAcRrmTlBzDN0DA1tAXUlWcDm1IOIIJAjlT/Fd05lbFQFwjdtgGcewesFt7Rc/Gx8iWjUCjGCT1YvWT1MwgUqrf3NG45tTbcu0aximWx9xENcEQHGbcYAEwtSXSqY0gnCdgeuMI0cvuGx/FUGgFhwEYrR80QckWN+X0fjm1DwAWv8RgJFilJZBznz0pQg+AZAAlVWh1GvGka0XzB0cCQi30aSGVa9AF62fLOB7MhrfnJoPwPER59Px+o3e76mL5Kwp2G57xPl0kxc3er+nLvyKtLmhfUC78RHn081ONnq/pzcAR5xPR9mRRu/31IVgvgUccT4dNaobvd/TGYAjzqejumqj93s6A3DE+XRUg2VSCjdaGr3fUw+I+VPwiPPpqJjO8J1Nw43e7ymHwHoAKMFd7QErAeEE5NNJMb3R+z3lsGcNzgfgiPPpomJ6o/d76oGwPgCOKJ8uKqY3er+nKwBHmE+noqRG7/fUA199U/AI8+kEwEbv93QHoEhZTnA+nYqSGr3fBoAtaiqBUImdm5hPJwA2er+nKwBHnE+X1gUzSbnR+z11wPj/AeCpPDD3t7rvAAAAAElFTkSuQmCC",TD="uniform sampler2D weightMap;varying vec2 vOffset0;varying vec2 vOffset1;void movec(const in bvec2 c,inout vec2 variable,const in vec2 value){if(c.x){variable.x=value.x;}if(c.y){variable.y=value.y;}}void movec(const in bvec4 c,inout vec4 variable,const in vec4 value){movec(c.xy,variable.xy,value.xy);movec(c.zw,variable.zw,value.zw);}void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 a;a.x=texture2D(weightMap,vOffset0).a;a.y=texture2D(weightMap,vOffset1).g;a.wz=texture2D(weightMap,uv).rb;vec4 color=inputColor;if(dot(a,vec4(1.0))>=1e-5){bool h=max(a.x,a.z)>max(a.y,a.w);vec4 blendingOffset=vec4(0.0,a.y,0.0,a.w);vec2 blendingWeight=a.yw;movec(bvec4(h),blendingOffset,vec4(a.x,0.0,a.z,0.0));movec(bvec2(h),blendingWeight,a.xz);blendingWeight/=dot(blendingWeight,vec2(1.0));vec4 blendingCoord=blendingOffset*vec4(texelSize,-texelSize)+uv.xyxy;color=blendingWeight.x*texture2D(inputBuffer,blendingCoord.xy);color+=blendingWeight.y*texture2D(inputBuffer,blendingCoord.zw);}outputColor=color;}",ED="varying vec2 vOffset0;varying vec2 vOffset1;void mainSupport(const in vec2 uv){vOffset0=uv+texelSize*vec2(1.0,0.0);vOffset1=uv+texelSize*vec2(0.0,1.0);}",kD=class extends ai{constructor({blendFunction:n=It.SRC,preset:e=lI.MEDIUM,edgeDetectionMode:t=yV.COLOR,predicationMode:i=VE.DISABLED}={}){super("SMAAEffect",TD,{vertexShader:ED,blendFunction:n,attributes:qi.CONVOLUTION|qi.DEPTH,uniforms:new Map([["weightMap",new q(null)]])});let s,r;arguments.length>1&&(s=arguments[0],r=arguments[1],arguments.length>2&&(e=arguments[2]),arguments.length>3&&(t=arguments[3])),this.renderTargetEdges=new Rt(1,1,{depthBuffer:!1}),this.renderTargetEdges.texture.name="SMAA.Edges",this.renderTargetWeights=this.renderTargetEdges.clone(),this.renderTargetWeights.texture.name="SMAA.Weights",this.uniforms.get("weightMap").value=this.renderTargetWeights.texture,this.clearPass=new hc(!0,!1,!1),this.clearPass.overrideClearColor=new Re(0),this.clearPass.overrideClearAlpha=1,this.edgeDetectionPass=new ls(new qE),this.edgeDetectionMaterial.edgeDetectionMode=t,this.edgeDetectionMaterial.predicationMode=i,this.weightsPass=new ls(new Ck);const o=new PA;o.onLoad=()=>{const a=new jt(s);a.name="SMAA.Search",a.magFilter=pt,a.minFilter=pt,a.generateMipmaps=!1,a.needsUpdate=!0,a.flipY=!0,this.weightsMaterial.searchTexture=a;const l=new jt(r);l.name="SMAA.Area",l.magFilter=je,l.minFilter=je,l.generateMipmaps=!1,l.needsUpdate=!0,l.flipY=!1,this.weightsMaterial.areaTexture=l,this.dispatchEvent({type:"load"})},o.itemStart("search"),o.itemStart("area"),s!==void 0&&r!==void 0?(o.itemEnd("search"),o.itemEnd("area")):typeof Image<"u"&&(s=new Image,r=new Image,s.addEventListener("load",()=>o.itemEnd("search")),r.addEventListener("load",()=>o.itemEnd("area")),s.src=yw,r.src=Gw),this.applyPreset(e)}get edgesTexture(){return this.renderTargetEdges.texture}getEdgesTexture(){return this.edgesTexture}get weightsTexture(){return this.renderTargetWeights.texture}getWeightsTexture(){return this.weightsTexture}get edgeDetectionMaterial(){return this.edgeDetectionPass.fullscreenMaterial}get colorEdgesMaterial(){return this.edgeDetectionMaterial}getEdgeDetectionMaterial(){return this.edgeDetectionMaterial}get weightsMaterial(){return this.weightsPass.fullscreenMaterial}getWeightsMaterial(){return this.weightsMaterial}setEdgeDetectionThreshold(n){this.edgeDetectionMaterial.edgeDetectionThreshold=n}setOrthogonalSearchSteps(n){this.weightsMaterial.orthogonalSearchSteps=n}applyPreset(n){const e=this.edgeDetectionMaterial,t=this.weightsMaterial;switch(n){case lI.LOW:e.edgeDetectionThreshold=.15,t.orthogonalSearchSteps=4,t.diagonalDetection=!1,t.cornerDetection=!1;break;case lI.MEDIUM:e.edgeDetectionThreshold=.1,t.orthogonalSearchSteps=8,t.diagonalDetection=!1,t.cornerDetection=!1;break;case lI.HIGH:e.edgeDetectionThreshold=.1,t.orthogonalSearchSteps=16,t.diagonalSearchSteps=8,t.cornerRounding=25,t.diagonalDetection=!0,t.cornerDetection=!0;break;case lI.ULTRA:e.edgeDetectionThreshold=.05,t.orthogonalSearchSteps=32,t.diagonalSearchSteps=16,t.cornerRounding=25,t.diagonalDetection=!0,t.cornerDetection=!0;break}}setDepthTexture(n,e=Xn){this.edgeDetectionMaterial.depthBuffer=n,this.edgeDetectionMaterial.depthPacking=e}update(n,e,t){this.clearPass.render(n,this.renderTargetEdges),this.edgeDetectionPass.render(n,e,this.renderTargetEdges),this.weightsPass.render(n,this.renderTargetEdges,this.renderTargetWeights)}setSize(n,e){this.edgeDetectionMaterial.setSize(n,e),this.weightsMaterial.setSize(n,e),this.renderTargetEdges.setSize(n,e),this.renderTargetWeights.setSize(n,e)}dispose(){const{searchTexture:n,areaTexture:e}=this.weightsMaterial;n!==null&&e!==null&&(n.dispose(),e.dispose()),super.dispose()}static get searchImageDataURL(){return yw}static get areaImageDataURL(){return Gw}},DD=`uniform lowp sampler2D aoBuffer;uniform float luminanceInfluence;uniform float intensity; +#if THREE_REVISION < 143 +#define luminance(v) linearToRelativeLuminance(v) +#endif +#if defined(DEPTH_AWARE_UPSAMPLING) && defined(NORMAL_DEPTH) +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D normalDepthBuffer; +#else +uniform mediump sampler2D normalDepthBuffer; +#endif +#endif +#ifdef COLORIZE +uniform vec3 color; +#endif +void mainImage(const in vec4 inputColor,const in vec2 uv,const in float depth,out vec4 outputColor){float aoLinear=texture2D(aoBuffer,uv).r; +#if defined(DEPTH_AWARE_UPSAMPLING) && defined(NORMAL_DEPTH) && __VERSION__ == 300 +vec4 normalDepth[4];normalDepth[0]=textureOffset(normalDepthBuffer,uv,ivec2(0,0));normalDepth[1]=textureOffset(normalDepthBuffer,uv,ivec2(0,1));normalDepth[2]=textureOffset(normalDepthBuffer,uv,ivec2(1,0));normalDepth[3]=textureOffset(normalDepthBuffer,uv,ivec2(1,1));float dot01=dot(normalDepth[0].rgb,normalDepth[1].rgb);float dot02=dot(normalDepth[0].rgb,normalDepth[2].rgb);float dot03=dot(normalDepth[0].rgb,normalDepth[3].rgb);float minDot=min(dot01,min(dot02,dot03));float s=step(THRESHOLD,minDot);float smallestDistance=1.0;int index;for(int i=0;i<4;++i){float distance=abs(depth-normalDepth[i].a);if(distancethis.setSize(N.baseWidth,N.baseHeight)),this.camera=n,this.depthDownsamplingPass=new wV({normalBuffer:e,resolutionScale:x}),this.depthDownsamplingPass.enabled=r===null,this.ssaoPass=new ls(new Ak(n));const k=new db(Bw,Bw,In);k.wrapS=k.wrapT=hs;const E=this.ssaoMaterial;E.normalBuffer=e,E.noiseTexture=k,E.minRadiusScale=v,E.samples=i,E.radius=A,E.rings=s,E.fade=B,E.bias=m,E.distanceThreshold=C,E.distanceFalloff=d,E.proximityThreshold=h,E.proximityFalloff=f,a!==void 0&&(E.worldDistanceThreshold=a),l!==void 0&&(E.worldDistanceFalloff=l),c!==void 0&&(E.worldProximityThreshold=c),u!==void 0&&(E.worldProximityFalloff=u),r!==null&&(this.ssaoMaterial.normalDepthBuffer=r,this.defines.set("NORMAL_DEPTH","1")),this.depthAwareUpsampling=o,this.color=S}set mainCamera(n){this.camera=n,this.ssaoMaterial.copyCameraSettings(n)}get normalBuffer(){return this.ssaoMaterial.normalBuffer}set normalBuffer(n){this.ssaoMaterial.normalBuffer=n,this.depthDownsamplingPass.fullscreenMaterial.normalBuffer=n}getResolution(){return this.resolution}get ssaoMaterial(){return this.ssaoPass.fullscreenMaterial}getSSAOMaterial(){return this.ssaoMaterial}get samples(){return this.ssaoMaterial.samples}set samples(n){this.ssaoMaterial.samples=n}get rings(){return this.ssaoMaterial.rings}set rings(n){this.ssaoMaterial.rings=n}get radius(){return this.ssaoMaterial.radius}set radius(n){this.ssaoMaterial.radius=n}get depthAwareUpsampling(){return this.defines.has("DEPTH_AWARE_UPSAMPLING")}set depthAwareUpsampling(n){this.depthAwareUpsampling!==n&&(n?this.defines.set("DEPTH_AWARE_UPSAMPLING","1"):this.defines.delete("DEPTH_AWARE_UPSAMPLING"),this.setChanged())}isDepthAwareUpsamplingEnabled(){return this.depthAwareUpsampling}setDepthAwareUpsamplingEnabled(n){this.depthAwareUpsampling=n}get distanceScaling(){return!0}set distanceScaling(n){}get color(){return this.uniforms.get("color").value}set color(n){const e=this.uniforms,t=this.defines;n!==null?t.has("COLORIZE")?e.get("color").value.set(n):(t.set("COLORIZE","1"),e.get("color").value=new Re(n),this.setChanged()):t.has("COLORIZE")&&(t.delete("COLORIZE"),e.get("color").value=null,this.setChanged())}get luminanceInfluence(){return this.uniforms.get("luminanceInfluence").value}set luminanceInfluence(n){this.uniforms.get("luminanceInfluence").value=n}get intensity(){return this.uniforms.get("intensity").value}set intensity(n){this.uniforms.get("intensity").value=n}getColor(){return this.color}setColor(n){this.color=n}setDistanceCutoff(n,e){this.ssaoMaterial.distanceThreshold=n,this.ssaoMaterial.distanceFalloff=e}setProximityCutoff(n,e){this.ssaoMaterial.proximityThreshold=n,this.ssaoMaterial.proximityFalloff=e}setDepthTexture(n,e=Xn){this.depthDownsamplingPass.setDepthTexture(n,e),this.ssaoMaterial.depthBuffer=n,this.ssaoMaterial.depthPacking=e}update(n,e,t){const i=this.renderTarget;this.depthDownsamplingPass.enabled&&this.depthDownsamplingPass.render(n),this.ssaoPass.render(n,null,i)}setSize(n,e){const t=this.resolution;t.setBaseSize(n,e);const i=t.width,s=t.height;this.ssaoMaterial.copyCameraSettings(this.camera),this.ssaoMaterial.setSize(i,s),this.renderTarget.setSize(i,s),this.depthDownsamplingPass.resolution.scale=t.scale,this.depthDownsamplingPass.setSize(n,e)}initialize(n,e,t){try{let i=this.uniforms.get("normalDepthBuffer").value;i===null&&(this.depthDownsamplingPass.initialize(n,e,t),i=this.depthDownsamplingPass.texture,this.uniforms.get("normalDepthBuffer").value=i,this.ssaoMaterial.normalDepthBuffer=i,this.defines.set("NORMAL_DEPTH","1"))}catch{this.depthDownsamplingPass.enabled=!1}}},PD=`#ifdef TEXTURE_PRECISION_HIGH +uniform mediump sampler2D map; +#else +uniform lowp sampler2D map; +#endif +varying vec2 vUv2;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){ +#ifdef UV_TRANSFORM +vec4 texel=texture2D(map,vUv2); +#else +vec4 texel=texture2D(map,uv); +#endif +outputColor=TEXEL;}`,_D=`#ifdef ASPECT_CORRECTION +uniform float scale; +#else +uniform mat3 uvTransform; +#endif +varying vec2 vUv2;void mainSupport(const in vec2 uv){ +#ifdef ASPECT_CORRECTION +vUv2=uv*vec2(aspect,1.0)*scale; +#else +vUv2=(uvTransform*vec3(uv,1.0)).xy; +#endif +}`,JD=class extends ai{constructor({blendFunction:n,texture:e=null,aspectCorrection:t=!1}={}){super("TextureEffect",PD,{blendFunction:n,defines:new Map([["TEXEL","texel"]]),uniforms:new Map([["map",new q(null)],["scale",new q(1)],["uvTransform",new q(null)]])}),this.texture=e,this.aspectCorrection=t}get texture(){return this.uniforms.get("map").value}set texture(n){const e=this.texture,t=this.uniforms,i=this.defines;e!==n&&(t.get("map").value=n,t.get("uvTransform").value=n.matrix,i.delete("TEXTURE_PRECISION_HIGH"),n!==null&&(n.matrixAutoUpdate?(i.set("UV_TRANSFORM","1"),this.setVertexShader(_D)):(i.delete("UV_TRANSFORM"),this.setVertexShader(null)),n.type!==sn&&i.set("TEXTURE_PRECISION_HIGH","1"),(e===null||e.type!==n.type||e.encoding!==n.encoding)&&this.setChanged()))}getTexture(){return this.texture}setTexture(n){this.texture=n}get aspectCorrection(){return this.defines.has("ASPECT_CORRECTION")}set aspectCorrection(n){this.aspectCorrection!==n&&(n?this.defines.set("ASPECT_CORRECTION","1"):this.defines.delete("ASPECT_CORRECTION"),this.setChanged())}get uvTransform(){const n=this.texture;return n!==null&&n.matrixAutoUpdate}set uvTransform(n){const e=this.texture;e!==null&&(e.matrixAutoUpdate=n)}setTextureSwizzleRGBA(n,e=n,t=n,i=n){const s="rgba";let r="";(n!==Ng.RED||e!==Ng.GREEN||t!==Ng.BLUE||i!==Ng.ALPHA)&&(r=[".",s[n],s[e],s[t],s[i]].join("")),this.defines.set("TEXEL","texel"+r),this.setChanged()}update(n,e,t){this.texture.matrixAutoUpdate&&this.texture.updateMatrix()}};let gI;function OD(){var n;if(gI!==void 0)return gI;try{let e;const t=document.createElement("canvas");return gI=!!(window.WebGL2RenderingContext&&(e=t.getContext("webgl2"))),e&&((n=e.getExtension("WEBGL_lose_context"))==null||n.loseContext()),gI}catch{return gI=!1}}var QD=Object.defineProperty,jD=(n,e,t)=>e in n?QD(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Sm=(n,e,t)=>(jD(n,typeof e!="symbol"?e+"":e,t),t);class rh{constructor(e){Sm(this,"camera",new lc(-1,1,1,-1,0,1)),Sm(this,"geometry",new vl(2,2)),Sm(this,"mesh"),this.mesh=new Tn(this.geometry,e)}get material(){return this.mesh.material}set material(e){this.mesh.material=e}dispose(){this.mesh.geometry.dispose()}render(e){e.render(this.mesh,this.camera)}}function zI(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function hb(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,i=new Array(e);tMath.PI&&(t-=Math.PI*2),t}function xV(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}var Rs=function n(e,t,i){var s=this;xV(this,n),zI(this,"dot2",function(r,o){return s.x*r+s.y*o}),zI(this,"dot3",function(r,o,a){return s.x*r+s.y*o+s.z*a}),this.x=e,this.y=t,this.z=i},oU=[new Rs(1,1,0),new Rs(-1,1,0),new Rs(1,-1,0),new Rs(-1,-1,0),new Rs(1,0,1),new Rs(-1,0,1),new Rs(1,0,-1),new Rs(-1,0,-1),new Rs(0,1,1),new Rs(0,-1,1),new Rs(0,1,-1),new Rs(0,-1,-1)],Zw=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180],ww=new Array(512),Sw=new Array(512),aU=function(e){e>0&&e<1&&(e*=65536),e=Math.floor(e),e<256&&(e|=e<<8);for(var t=0;t<256;t++){var i;t&1?i=Zw[t]^e&255:i=Zw[t]^e>>8&255,ww[t]=ww[t+256]=i,Sw[t]=Sw[t+256]=oU[i%12]}};aU(0);function lU(n){if(typeof n=="number")n=Math.abs(n);else if(typeof n=="string"){var e=n;n=0;for(var t=0;t1&&arguments[1]!==void 0?arguments[1]:.01,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1/(2*Math.PI);return i/Math.atan(1/t)*Math.atan(Math.sin(2*Math.PI*e*s)/t)},RV=function(e){return 1/(1+e+.48*e*e+.235*e*e*e)};function kn(n,e,t){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:.25,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:.01,r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:1/0,o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:RV,a=arguments.length>7&&arguments[7]!==void 0?arguments[7]:.001,l="velocity_"+e;if(n.__damp===void 0&&(n.__damp={}),n.__damp[l]===void 0&&(n.__damp[l]=0),Math.abs(n[e]-t)<=a)return n[e]=t,!1;i=Math.max(1e-4,i);var c=2/i,u=o(c*s),C=n[e]-t,d=t,h=r*i;C=Math.min(Math.max(C,-h),h),t=n[e]-C;var f=(n.__damp[l]+c*C)*s;n.__damp[l]=(n.__damp[l]-c*f)*u;var v=t+(C+f)*u;return d-n[e]>0==v>d&&(v=d,n.__damp[l]=(v-d)/s),n[e]=v,!0}function kg(n,e,t,i,s,r,o,a){return kn(n,e,n[e]+rU(n[e],t),i,s,r,o,a)}var cI=new ne,Rw,Ww;function IU(n,e,t,i,s,r,o){return typeof e=="number"?cI.setScalar(e):Array.isArray(e)?cI.set(e[0],e[1]):cI.copy(e),Rw=kn(n,"x",cI.x,t,i,s,r,o),Ww=kn(n,"y",cI.y,t,i,s,r,o),Rw||Ww}var Ig=new H,Vw,Mw,Nw;function Ab(n,e,t,i,s,r,o){return typeof e=="number"?Ig.setScalar(e):Array.isArray(e)?Ig.set(e[0],e[1],e[2]):Ig.copy(e),Vw=kn(n,"x",Ig.x,t,i,s,r,o),Mw=kn(n,"y",Ig.y,t,i,s,r,o),Nw=kn(n,"z",Ig.z,t,i,s,r,o),Vw||Mw||Nw}var Fa=new Vt,Hw,Xw,Yw,Fw;function uU(n,e,t,i,s,r,o){return typeof e=="number"?Fa.setScalar(e):Array.isArray(e)?Fa.set(e[0],e[1],e[2],e[3]):Fa.copy(e),Hw=kn(n,"x",Fa.x,t,i,s,r,o),Xw=kn(n,"y",Fa.y,t,i,s,r,o),Yw=kn(n,"z",Fa.z,t,i,s,r,o),Fw=kn(n,"w",Fa.w,t,i,s,r,o),Hw||Xw||Yw||Fw}var II=new bl,Kw,zw,Lw;function CU(n,e,t,i,s,r,o){return Array.isArray(e)?II.set(e[0],e[1],e[2],e[3]):II.copy(e),Kw=kg(n,"x",II.x,t,i,s,r,o),zw=kg(n,"y",II.y,t,i,s,r,o),Lw=kg(n,"z",II.z,t,i,s,r,o),Kw||zw||Lw}var ug=new Re,Tw,Ew,kw;function dU(n,e,t,i,s,r,o){return e instanceof Re?ug.copy(e):Array.isArray(e)?ug.setRGB(e[0],e[1],e[2]):ug.set(e),Tw=kn(n,"r",ug.r,t,i,s,r,o),Ew=kn(n,"g",ug.g,t,i,s,r,o),kw=kn(n,"b",ug.b,t,i,s,r,o),Tw||Ew||kw}var tr=new Sn,$r=new Vt,Dw=new Vt,uI=new Vt,Uw,Pw,_w,Jw;function WV(n,e,t,i,s,r,o){var a=n;Array.isArray(e)?tr.set(e[0],e[1],e[2],e[3]):tr.copy(e);var l=n.dot(tr)>0?1:-1;return tr.x*=l,tr.y*=l,tr.z*=l,tr.w*=l,Uw=kn(n,"x",tr.x,t,i,s,r,o),Pw=kn(n,"y",tr.y,t,i,s,r,o),_w=kn(n,"z",tr.z,t,i,s,r,o),Jw=kn(n,"w",tr.w,t,i,s,r,o),$r.set(n.x,n.y,n.z,n.w).normalize(),Dw.set(a.__damp.velocity_x,a.__damp.velocity_y,a.__damp.velocity_z,a.__damp.velocity_w),uI.copy($r).multiplyScalar(Dw.dot($r)/$r.dot($r)),a.__damp.velocity_x-=uI.x,a.__damp.velocity_y-=uI.y,a.__damp.velocity_z-=uI.z,a.__damp.velocity_w-=uI.w,n.set($r.x,$r.y,$r.z,$r.w),Uw||Pw||_w||Jw}var CI=new GW,Ow,Qw,jw;function hU(n,e,t,i,s,r,o){return Array.isArray(e)?CI.set(e[0],e[1],e[2]):CI.copy(e),Ow=kn(n,"radius",CI.radius,t,i,s,r,o),Qw=kg(n,"phi",CI.phi,t,i,s,r,o),jw=kg(n,"theta",CI.theta,t,i,s,r,o),Ow||Qw||jw}var oh=new Fe,qw=new H,$w=new Sn,eS=new H,tS,nS,iS;function AU(n,e,t,i,s,r,o){var a=n;return a.__damp===void 0&&(a.__damp={position:new H,rotation:new Sn,scale:new H},n.decompose(a.__damp.position,a.__damp.rotation,a.__damp.scale)),Array.isArray(e)?oh.set.apply(oh,nU(e)):oh.copy(e),oh.decompose(qw,$w,eS),tS=Ab(a.__damp.position,qw,t,i,s,r,o),nS=WV(a.__damp.rotation,$w,t,i,s,r,o),iS=Ab(a.__damp.scale,eS,t,i,s,r,o),n.compose(a.__damp.position,a.__damp.rotation,a.__damp.scale),tS||nS||iS}var pU=Object.freeze({__proto__:null,rsqw:cU,exp:RV,damp:kn,dampAngle:kg,damp2:IU,damp3:Ab,damp4:uU,dampE:CU,dampC:dU,dampQ:WV,dampS:hU,dampM:AU});function pb(){return pb=Object.assign?Object.assign.bind():function(n){for(var e=1;e +void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 reflectionsTexel=texture2D(reflectionsTexture,vUv);ivec2 size=textureSize(reflectionsTexture,0);vec2 invTexSize=1./vec2(size.x,size.y);vec3 reflectionClr=reflectionsTexel.xyz;if(blur>FLOAT_EPSILON){vec3 blurredReflectionsColor=denoise(reflectionsTexel.rgb,reflectionsTexture,vUv,invTexSize,blur,blurSharpness,blurKernel);reflectionClr=mix(reflectionClr,blurredReflectionsColor.rgb,blur);} +#if RENDER_MODE == MODE_DEFAULT +outputColor=vec4(inputColor.rgb+reflectionClr,1.0); +#endif +#if RENDER_MODE == MODE_REFLECTIONS +outputColor=vec4(reflectionClr,1.0); +#endif +#if RENDER_MODE == MODE_RAW_REFLECTION +outputColor=vec4(reflectionsTexel.xyz,1.0); +#endif +#if RENDER_MODE == MODE_BLURRED_REFLECTIONS +outputColor=vec4(blurredReflectionsTexel.xyz,1.0); +#endif +#if RENDER_MODE == MODE_INPUT +outputColor=vec4(inputColor.xyz,1.0); +#endif +#if RENDER_MODE == MODE_BLUR_MIX +outputColor=vec4(vec3(blur),1.0); +#endif +}`,VV=`#define GLSLIFY 1 +vec3 getViewPosition(const float depth){float clipW=_projectionMatrix[2][3]*depth+_projectionMatrix[3][3];vec4 clipPosition=vec4((vec3(vUv,depth)-0.5)*2.0,1.0);clipPosition*=clipW;return(_inverseProjectionMatrix*clipPosition).xyz;}float getViewZ(const in float depth){ +#ifdef PERSPECTIVE_CAMERA +return perspectiveDepthToViewZ(depth,cameraNear,cameraFar); +#else +return orthographicDepthToViewZ(depth,cameraNear,cameraFar); +#endif +}vec3 screenSpaceToWorldSpace(const vec2 uv,const float depth){vec4 ndc=vec4((uv.x-0.5)*2.0,(uv.y-0.5)*2.0,(depth-0.5)*2.0,1.0);vec4 clip=_inverseProjectionMatrix*ndc;vec4 view=cameraMatrixWorld*(clip/clip.w);return view.xyz;} +#define Scale (vec3(0.8, 0.8, 0.8)) +#define K (19.19) +vec3 hash(vec3 a){a=fract(a*Scale);a+=dot(a,a.yxz+K);return fract((a.xxy+a.yxx)*a.zyx);}float fresnel_dielectric_cos(float cosi,float eta){float c=abs(cosi);float g=eta*eta-1.0+c*c;float result;if(g>0.0){g=sqrt(g);float A=(g-c)/(g+c);float B=(c*(g+c)-1.0)/(c*(g-c)+1.0);result=0.5*A*A*(1.0+B*B);}else{result=1.0;}return result;}float fresnel_dielectric(vec3 Incoming,vec3 Normal,float eta){float cosine=dot(Incoming,Normal);return min(1.0,5.0*fresnel_dielectric_cos(cosine,eta));}`,bU=`#define GLSLIFY 1 +#define INV_EULER 0.36787944117144233 +alpha=velocityDisocclusion0.5; +#ifdef boxBlur +if(needsBlur)inputColor=boxBlurredColor; +#endif +if(alpha==1.0){outputColor=accumulatedColor;}else{float m=mix(alpha,1.0,blend);if(needsBlur)m=0.0;outputColor=accumulatedColor*m+inputColor*(1.0-m);}`;class vU extends Zt{constructor(){super({type:"MRTMaterial",defines:{USE_UV:"",TEMPORAL_RESOLVE:""},uniforms:{opacity:new q(1),normalMap:new q(null),normalScale:new q(new ne(1,1)),uvTransform:new q(new xt),roughness:new q(1),roughnessMap:new q(null)},vertexShader:` + #ifdef USE_MRT + varying vec2 vHighPrecisionZW; + #endif + #define NORMAL + #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) + varying vec3 vViewPosition; + #endif + #include + #include + #include + #include + #include + #include + #include + #include + void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) + vViewPosition = - mvPosition.xyz; + #endif + #ifdef USE_MRT + vHighPrecisionZW = gl_Position.zw; + #endif + #ifdef USE_UV + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + #endif + } + `,fragmentShader:` + #define NORMAL + #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) + varying vec3 vViewPosition; + #endif + #include + #include + #include + #include + #include + #include + #include + #include + + #ifdef USE_MRT + layout(location = 0) out vec4 gNormal; + layout(location = 1) out vec4 gDepth; + + varying vec2 vHighPrecisionZW; + #endif + uniform float roughness; + void main() { + #include + #include + #include + #include + + float roughnessFactor = roughness; + + if(roughness > 10.0e9){ + roughnessFactor = 1.; + }else{ + #ifdef useRoughnessMap + vec4 texelRoughness = texture2D( roughnessMap, vUv ); + // reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture + roughnessFactor *= texelRoughness.g; + #endif + } + + vec3 normalColor = packNormalToRGB( normal ); + #ifdef USE_MRT + float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; + vec4 depthColor = packDepthToRGBA( fragCoordZ ); + gNormal = vec4( normalColor, roughnessFactor ); + gDepth = depthColor; + #else + gl_FragColor = vec4(normalColor, roughnessFactor); + #endif + } + `,toneMapped:!1}),this.normalMapType=mo,this.normalScale=new ne(1,1),Object.defineProperty(this,"glslVersion",{get(){return"USE_MRT"in this.defines?rA:null},set(e){}})}}var yU=`#define GLSLIFY 1 +varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}`,GU=`#define GLSLIFY 1 +varying vec2 vUv;uniform sampler2D inputTexture;uniform sampler2D accumulatedTexture;uniform sampler2D normalTexture;uniform sampler2D depthTexture;uniform sampler2D envMap;uniform mat4 _projectionMatrix;uniform mat4 _inverseProjectionMatrix;uniform mat4 cameraMatrixWorld;uniform float cameraNear;uniform float cameraFar;uniform float rayDistance;uniform float intensity;uniform float maxDepthDifference;uniform float roughnessFade;uniform float maxRoughness;uniform float fade;uniform float thickness;uniform float ior;uniform float samples;uniform float jitter;uniform float jitterRoughness; +#define INVALID_RAY_COORDS vec2(-1.0); +#define EARLY_OUT_COLOR vec4(0.0, 0.0, 0.0, 1.0) +#define FLOAT_EPSILON 0.00001 +float nearMinusFar;float nearMulFar;float farMinusNear; +#include +#include +vec2 RayMarch(vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference);vec2 BinarySearch(in vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference);float fastGetViewZ(const in float depth);vec3 getIBLRadiance(const in vec3 viewDir,const in vec3 normal,const in float roughness);void main(){vec4 depthTexel=textureLod(depthTexture,vUv,0.0);if(dot(depthTexel.rgb,depthTexel.rgb)1.0)jitterMix=1.0;jitt=mix(vec3(0.0),randomJitter*spread,jitterMix);}viewNormal+=jitt;float fresnelFactor=fresnel_dielectric(viewDir,viewNormal,ior);vec3 iblRadiance=getIBLRadiance(-viewDir,viewNormal,0.)*fresnelFactor;float lastFrameAlpha=textureLod(accumulatedTexture,vUv,0.0).a;if(roughness>maxRoughness||(roughness>1.0-FLOAT_EPSILON&&roughnessFade>1.0-FLOAT_EPSILON)){gl_FragColor=vec4(iblRadiance,lastFrameAlpha);return;}vec3 reflected=reflect(viewDir,viewNormal);vec3 rayDir=reflected*-viewPos.z;vec3 hitPos=viewPos;float rayHitDepthDifference;vec2 coords=RayMarch(rayDir,hitPos,rayHitDepthDifference);if(coords.x==-1.0){gl_FragColor=vec4(iblRadiance,lastFrameAlpha);return;}vec4 SSRTexel=textureLod(inputTexture,coords.xy,0.0);vec4 SSRTexelReflected=textureLod(accumulatedTexture,coords.xy,0.0);vec3 SSR=SSRTexel.rgb+SSRTexelReflected.rgb;float roughnessFactor=mix(specular,1.0,max(0.0,1.0-roughnessFade));vec2 coordsNDC=(coords.xy*2.0-1.0);float screenFade=0.1;float maxDimension=min(1.0,max(abs(coordsNDC.x),abs(coordsNDC.y)));float reflectionIntensity=1.0-(max(0.0,maxDimension-screenFade)/(1.0-screenFade));reflectionIntensity=max(0.,reflectionIntensity);vec3 finalSSR=mix(iblRadiance,SSR,reflectionIntensity)*roughnessFactor;if(fade!=0.0){vec3 hitWorldPos=screenSpaceToWorldSpace(coords,rayHitDepthDifference);float reflectionDistance=distance(hitWorldPos,worldPos)+1.0;float opacity=1.0/(reflectionDistance*fade*0.1);if(opacity>1.0)opacity=1.0;finalSSR*=opacity;}finalSSR*=fresnelFactor*intensity;finalSSR=min(vec3(1.0),finalSSR);float alpha=hitPos.z==1.0 ? 1.0 : SSRTexelReflected.a;alpha=min(lastFrameAlpha,alpha);gl_FragColor=vec4(finalSSR,alpha);}vec2 RayMarch(vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference){dir=normalize(dir);dir*=rayDistance/float(steps);float depth;vec4 projectedCoord;vec4 lastProjectedCoord;float unpackedDepth;vec4 depthTexel;for(int i=0;i1.0||projectedCoord.y<0.0||projectedCoord.y>1.0){return INVALID_RAY_COORDS;} +#endif +depthTexel=textureLod(depthTexture,projectedCoord.xy,0.0);unpackedDepth=unpackRGBAToDepth(depthTexel);depth=fastGetViewZ(unpackedDepth);rayHitDepthDifference=depth-hitPos.z;if(rayHitDepthDifference>=0.0&&rayHitDepthDifference0.0){return INVALID_RAY_COORDS;} +#endif +lastProjectedCoord=projectedCoord;}hitPos.z=1.0; +#ifndef missedRays +return INVALID_RAY_COORDS; +#endif +rayHitDepthDifference=unpackedDepth;return projectedCoord.xy;}vec2 BinarySearch(in vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference){float depth;vec4 projectedCoord;vec2 lastMinProjectedCoordXY;float unpackedDepth;vec4 depthTexel;for(int i=0;i0.0){hitPos-=dir;}else{hitPos+=dir;}}if(dot(depthTexel.rgb,depthTexel.rgb)maxDepthDifference)return INVALID_RAY_COORDS;projectedCoord=_projectionMatrix*vec4(hitPos,1.0);projectedCoord.xy/=projectedCoord.w;projectedCoord.xy=projectedCoord.xy*0.5+0.5;rayHitDepthDifference=unpackedDepth;return projectedCoord.xy;}float fastGetViewZ(const in float depth){ +#ifdef PERSPECTIVE_CAMERA +return nearMulFar/(farMinusNear*depth-cameraFar); +#else +return depth*nearMinusFar-cameraNear; +#endif +} +#include +#include +vec3 getIBLRadiance(const in vec3 viewDir,const in vec3 normal,const in float roughness){ +#if defined(ENVMAP_TYPE_CUBE_UV) +vec3 reflectVec=reflect(-viewDir,normal);reflectVec=normalize(mix(reflectVec,normal,roughness*roughness));reflectVec=inverseTransformDirection(reflectVec,viewMatrix);vec4 envMapColor=textureCubeUV(envMap,reflectVec,roughness);return envMapColor.rgb*intensity; +#else +return vec3(0.0); +#endif +}`;class BU extends Zt{constructor(){super({type:"ReflectionsMaterial",uniforms:{inputTexture:new q(null),accumulatedTexture:new q(null),normalTexture:new q(null),depthTexture:new q(null),_projectionMatrix:new q(new Fe),_inverseProjectionMatrix:new q(new Fe),cameraMatrixWorld:new q(new Fe),cameraNear:new q(0),cameraFar:new q(0),rayDistance:new q(0),intensity:new q(0),roughnessFade:new q(0),fade:new q(0),thickness:new q(0),ior:new q(0),maxDepthDifference:new q(0),jitter:new q(0),jitterRoughness:new q(0),maxRoughness:new q(0),samples:new q(0),envMap:new q(null),envMapPosition:new q(new H),envMapSize:new q(new H),viewMatrix:new q(new Fe)},defines:{steps:20,refineSteps:5,CUBEUV_TEXEL_WIDTH:0,CUBEUV_TEXEL_HEIGHT:0,CUBEUV_MAX_MIP:0,vWorldPosition:"worldPos"},fragmentShader:GU.replace("#include ",VV),vertexShader:yU,toneMapped:!1,depthWrite:!1,depthTest:!1})}}const MV=n=>{const e=[n],t=[];for(;e.length!==0;){const i=e.shift();i.material&&t.push(i);for(const s of i.children)s.visible&&e.push(s)}return t},ZU=n=>{const e=n.envMapCubeUVHeight;if(e===null)return null;const t=Math.log2(e)-2,i=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),7*16)),texelHeight:i,maxMip:t}},sS=(n,e,t)=>{n.uniforms.envMap.value=e;const i=ZU({envMapCubeUVHeight:t});n.defines.ENVMAP_TYPE_CUBE_UV="",n.defines.CUBEUV_TEXEL_WIDTH=i.texelWidth,n.defines.CUBEUV_TEXEL_HEIGHT=i.texelHeight,n.defines.CUBEUV_MAX_MIP=i.maxMip+".0",n.needsUpdate=!0},wU=()=>{try{const n=document.createElement("canvas");return!!(window.WebGL2RenderingContext&&n.getContext("webgl2"))}catch{return!1}};class SU extends xn{constructor(e,t={}){super("ReflectionsPass"),this.ssrEffect=void 0,this.cachedMaterials=new WeakMap,this.USE_MRT=!1,this.webgl1DepthPass=null,this.visibleMeshes=[],this.ssrEffect=e,this._scene=e._scene,this._camera=e._camera,this.fullscreenMaterial=new BU,e._camera.isPerspectiveCamera&&(this.fullscreenMaterial.defines.PERSPECTIVE_CAMERA="");const i=t.width||typeof window<"u"?window.innerWidth:2e3,s=t.height||typeof window<"u"?window.innerHeight:1e3;this.renderTarget=new Rt(i,s,{minFilter:je,magFilter:je,type:us,depthBuffer:!1}),this.renderPass=new Ac(this._scene,this._camera),this.USE_MRT=wU(),this.USE_MRT?(this.gBuffersRenderTarget=new v1(i,s,2,{minFilter:je,magFilter:je}),this.normalTexture=this.gBuffersRenderTarget.texture[0],this.depthTexture=this.gBuffersRenderTarget.texture[1]):(this.webgl1DepthPass=new hy(this._scene,this._camera),this.webgl1DepthPass.renderTarget.minFilter=je,this.webgl1DepthPass.renderTarget.magFilter=je,this.webgl1DepthPass.renderTarget.texture.minFilter=je,this.webgl1DepthPass.renderTarget.texture.magFilter=je,this.webgl1DepthPass.setSize(typeof window<"u"?window.innerWidth:2e3,typeof window<"u"?window.innerHeight:1e3),this.gBuffersRenderTarget=new Rt(i,s,{minFilter:je,magFilter:je}),this.normalTexture=this.gBuffersRenderTarget.texture,this.depthTexture=this.webgl1DepthPass.texture),this.fullscreenMaterial.uniforms.normalTexture.value=this.normalTexture,this.fullscreenMaterial.uniforms.depthTexture.value=this.depthTexture,this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.ssrEffect.temporalResolvePass.accumulatedTexture,this.fullscreenMaterial.uniforms.cameraMatrixWorld.value=this._camera.matrixWorld,this.fullscreenMaterial.uniforms._projectionMatrix.value=this._camera.projectionMatrix,this.fullscreenMaterial.uniforms._inverseProjectionMatrix.value=this._camera.projectionMatrixInverse}setSize(e,t){this.renderTarget.setSize(e*this.ssrEffect.resolutionScale,t*this.ssrEffect.resolutionScale),this.gBuffersRenderTarget.setSize(e*this.ssrEffect.resolutionScale,t*this.ssrEffect.resolutionScale),this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.ssrEffect.temporalResolvePass.accumulatedTexture,this.fullscreenMaterial.needsUpdate=!0}dispose(){this.renderTarget.dispose(),this.gBuffersRenderTarget.dispose(),this.renderPass.dispose(),this.USE_MRT||this.webgl1DepthPass.dispose(),this.fullscreenMaterial.dispose(),this.normalTexture=null,this.depthTexture=null,this.velocityTexture=null}keepMaterialMapUpdated(e,t,i,s){this.ssrEffect[s]?t[i]!==e[i]&&(e[i]=t[i],e.uniforms[i].value=t[i],t[i]?e.defines[s]="":delete e.defines[s],e.needsUpdate=!0):e[i]!==void 0&&(e[i]=void 0,e.uniforms[i].value=void 0,delete e.defines[s],e.needsUpdate=!0)}setMRTMaterialInScene(){this.visibleMeshes=MV(this._scene);for(const e of this.visibleMeshes)if(e.material){const t=e.material;let[i,s]=this.cachedMaterials.get(e)||[];if(t!==i){s&&s.dispose(),s=new vU,this.USE_MRT&&(s.defines.USE_MRT=""),s.normalScale=t.normalScale,s.uniforms.normalScale.value=t.normalScale;const r=t.map||t.normalMap||t.roughnessMap||t.metalnessMap;r&&(s.uniforms.uvTransform.value=r.matrix),this.cachedMaterials.set(e,[t,s])}this.keepMaterialMapUpdated(s,t,"normalMap","useNormalMap"),this.keepMaterialMapUpdated(s,t,"roughnessMap","useRoughnessMap"),s.uniforms.roughness.value=this.ssrEffect.selection.size===0||this.ssrEffect.selection.has(e)?t.roughness||0:1e11,e.material=s}}unsetMRTMaterialInScene(){for(const t of this.visibleMeshes){var e;if(((e=t.material)==null?void 0:e.type)==="MRTMaterial"){t.visible=!0;const[i]=this.cachedMaterials.get(t);t.material=i}}}render(e,t){this.setMRTMaterialInScene(),e.setRenderTarget(this.gBuffersRenderTarget),this.renderPass.render(e,this.gBuffersRenderTarget),this.unsetMRTMaterialInScene(),this.USE_MRT||this.webgl1DepthPass.renderPass.render(e,this.webgl1DepthPass.renderTarget),this.fullscreenMaterial.uniforms.inputTexture.value=t.texture,this.fullscreenMaterial.uniforms.samples.value=this.ssrEffect.temporalResolvePass.samples,this.fullscreenMaterial.uniforms.cameraNear.value=this._camera.near,this.fullscreenMaterial.uniforms.cameraFar.value=this._camera.far,this.fullscreenMaterial.uniforms.viewMatrix.value.copy(this._camera.matrixWorldInverse),e.setRenderTarget(this.renderTarget),e.render(this.scene,this.camera)}}const rS={intensity:1,exponent:1,distance:10,fade:0,roughnessFade:1,thickness:10,ior:1.45,maxRoughness:1,maxDepthDifference:10,blend:.9,correction:1,correctionRadius:1,blur:.5,blurKernel:1,blurSharpness:10,jitter:0,jitterRoughness:0,steps:20,refineSteps:5,missedRays:!0,useNormalMap:!0,useRoughnessMap:!0,resolutionScale:1,velocityResolutionScale:1};var xU=`#define GLSLIFY 1 +varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}`,RU=`#define GLSLIFY 1 +uniform sampler2D inputTexture;uniform sampler2D accumulatedTexture;uniform sampler2D velocityTexture;uniform sampler2D lastVelocityTexture;uniform float blend;uniform float correction;uniform float exponent;uniform float samples;uniform vec2 invTexSize;uniform mat4 curInverseProjectionMatrix;uniform mat4 curCameraMatrixWorld;uniform mat4 prevInverseProjectionMatrix;uniform mat4 prevCameraMatrixWorld;varying vec2 vUv; +#define MAX_NEIGHBOR_DEPTH_DIFFERENCE 0.001 +#define FLOAT_EPSILON 0.00001 +#define FLOAT_ONE_MINUS_EPSILON 0.99999 +vec3 transformexponent;vec3 undoColorTransformExponent;vec3 transformColor(vec3 color){if(exponent==1.0)return color;return pow(abs(color),transformexponent);}vec3 undoColorTransform(vec3 color){if(exponent==1.0)return color;return max(pow(abs(color),undoColorTransformExponent),vec3(0.0));}void main(){if(exponent!=1.0){transformexponent=vec3(1.0/exponent);undoColorTransformExponent=vec3(exponent);}vec4 inputTexel=textureLod(inputTexture,vUv,0.0);vec4 accumulatedTexel;vec3 inputColor=transformColor(inputTexel.rgb);vec3 accumulatedColor;float alpha=inputTexel.a;float velocityDisocclusion;bool didReproject=false; +#ifdef boxBlur +vec3 boxBlurredColor=inputTexel.rgb; +#endif +vec4 velocity=textureLod(velocityTexture,vUv,0.0);bool isMoving=alpha<1.0||dot(velocity.xy,velocity.xy)>0.0;if(isMoving){vec3 minNeighborColor=inputColor;vec3 maxNeighborColor=inputColor;vec3 col;vec2 neighborUv;vec2 reprojectedUv=vUv-velocity.xy;vec4 lastVelocity=textureLod(lastVelocityTexture,reprojectedUv,0.0);float depth=velocity.b;float closestDepth=depth;float lastClosestDepth=lastVelocity.b;float neighborDepth;float lastNeighborDepth;for(int x=-correctionRadius;x<=correctionRadius;x++){for(int y=-correctionRadius;y<=correctionRadius;y++){if(x!=0||y!=0){neighborUv=vUv+vec2(x,y)*invTexSize;vec4 neigborVelocity=textureLod(velocityTexture,neighborUv,0.0);neighborDepth=neigborVelocity.b;col=textureLod(inputTexture,neighborUv,0.0).xyz;int absX=abs(x);int absY=abs(y); +#ifdef dilation +if(absX==1&&absY==1){if(neighborDepth>closestDepth){velocity=neigborVelocity;closestDepth=neighborDepth;}vec4 lastNeighborVelocity=textureLod(velocityTexture,vUv+vec2(x,y)*invTexSize,0.0);lastNeighborDepth=lastNeighborVelocity.b;if(neighborDepth>closestDepth){lastVelocity=lastNeighborVelocity;lastClosestDepth=lastNeighborDepth;}} +#endif +if(abs(depth-neighborDepth)5 ? 121.0 : pow(float(correctionRadius*2+1),2.0);boxBlurredColor/=pxRadius;boxBlurredColor=transformColor(boxBlurredColor); +#endif +if(reprojectedUv.x>=0.0&&reprojectedUv.x<=1.0&&reprojectedUv.y>=0.0&&reprojectedUv.y<=1.0){accumulatedTexel=textureLod(accumulatedTexture,reprojectedUv,0.0);accumulatedColor=transformColor(accumulatedTexel.rgb);vec3 clampedColor=clamp(accumulatedColor,minNeighborColor,maxNeighborColor);accumulatedColor=mix(accumulatedColor,clampedColor,correction);didReproject=true;}else{ +#ifdef boxBlur +accumulatedColor=boxBlurredColor; +#else +accumulatedColor=inputColor; +#endif +}if(velocity.r>FLOAT_ONE_MINUS_EPSILON&&velocity.g>FLOAT_ONE_MINUS_EPSILON){alpha=0.0;velocityDisocclusion=1.0;}}else{accumulatedColor=transformColor(textureLod(accumulatedTexture,vUv,0.0).rgb);}vec3 outputColor=inputColor; +#include +gl_FragColor=vec4(undoColorTransform(outputColor),alpha);}`;class WU extends Zt{constructor(e){const t=RU.replace("#include ",e);super({type:"TemporalResolveMaterial",uniforms:{inputTexture:new q(null),accumulatedTexture:new q(null),velocityTexture:new q(null),lastVelocityTexture:new q(null),samples:new q(1),blend:new q(.5),correction:new q(1),exponent:new q(1),invTexSize:new q(new ne)},defines:{correctionRadius:1},vertexShader:xU,fragmentShader:t})}}const VU=` + #ifdef USE_SKINNING + #ifdef BONE_TEXTURE + uniform sampler2D prevBoneTexture; + mat4 getPrevBoneMatrix( const in float i ) { + float j = i * 4.0; + float x = mod( j, float( boneTextureSize ) ); + float y = floor( j / float( boneTextureSize ) ); + float dx = 1.0 / float( boneTextureSize ); + float dy = 1.0 / float( boneTextureSize ); + y = dy * ( y + 0.5 ); + vec4 v1 = texture2D( prevBoneTexture, vec2( dx * ( x + 0.5 ), y ) ); + vec4 v2 = texture2D( prevBoneTexture, vec2( dx * ( x + 1.5 ), y ) ); + vec4 v3 = texture2D( prevBoneTexture, vec2( dx * ( x + 2.5 ), y ) ); + vec4 v4 = texture2D( prevBoneTexture, vec2( dx * ( x + 3.5 ), y ) ); + mat4 bone = mat4( v1, v2, v3, v4 ); + return bone; + } + #else + uniform mat4 prevBoneMatrices[ MAX_BONES ]; + mat4 getPrevBoneMatrix( const in float i ) { + mat4 bone = prevBoneMatrices[ int(i) ]; + return bone; + } + #endif + #endif +`,MU=` + vec3 transformed; + + // Get the normal + ${tt.skinbase_vertex} + ${tt.beginnormal_vertex} + ${tt.skinnormal_vertex} + ${tt.defaultnormal_vertex} + + // Get the current vertex position + transformed = vec3( position ); + ${tt.skinning_vertex} + newPosition = velocityMatrix * vec4( transformed, 1.0 ); + + // Get the previous vertex position + transformed = vec3( position ); + ${tt.skinbase_vertex.replace(/mat4 /g,"").replace(/getBoneMatrix/g,"getPrevBoneMatrix")} + ${tt.skinning_vertex.replace(/vec4 /g,"")} + prevPosition = prevVelocityMatrix * vec4( transformed, 1.0 ); + + gl_Position = newPosition; +`;class NU extends Zt{constructor(){super({uniforms:{prevVelocityMatrix:{value:new Fe},velocityMatrix:{value:new Fe},prevBoneTexture:{value:null},interpolateGeometry:{value:0},intensity:{value:1},boneTexture:{value:null},alphaTest:{value:0},map:{value:null},alphaMap:{value:null},opacity:{value:1}},vertexShader:` + #define MAX_BONES 1024 + + ${tt.skinning_pars_vertex} + ${VU} + + uniform mat4 velocityMatrix; + uniform mat4 prevVelocityMatrix; + uniform float interpolateGeometry; + varying vec4 prevPosition; + varying vec4 newPosition; + varying vec2 vHighPrecisionZW; + + void main() { + + ${MU} + + vHighPrecisionZW = gl_Position.zw; + + }`,fragmentShader:` + uniform float intensity; + varying vec4 prevPosition; + varying vec4 newPosition; + varying vec2 vHighPrecisionZW; + + void main() { + #ifdef FULL_MOVEMENT + gl_FragColor = vec4( 1., 1., 1. - gl_FragCoord.z, 0. ); + return; + #endif + + vec2 pos0 = (prevPosition.xy / prevPosition.w) * 0.5 + 0.5; + vec2 pos1 = (newPosition.xy / newPosition.w) * 0.5 + 0.5; + + vec2 vel = pos1 - pos0; + + float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; + + gl_FragColor = vec4( vel, 1. - fragCoordZ, 0. ); + + }`}),this.isVelocityMaterial=!0}}const HU=new Re(0),XU=["visible","wireframe","side"];class YU extends xn{constructor(e,t){var i,s;super("VelocityPass"),this.cachedMaterials=new WeakMap,this.lastCameraTransform={position:new H,quaternion:new Sn},this.visibleMeshes=[],this.renderedMeshesThisFrame=0,this.renderedMeshesLastFrame=0,this._scene=e,this._camera=t,this.renderTarget=new Rt(((i=window)==null?void 0:i.innerWidth)||1e3,((s=window)==null?void 0:s.innerHeight)||1e3,{type:us})}setVelocityMaterialInScene(){this.renderedMeshesThisFrame=0,this.visibleMeshes=MV(this._scene);for(const i of this.visibleMeshes){var e;const s=i.material;let[r,o]=this.cachedMaterials.get(i)||[];if(s!==r){var t;o=new NU,o.lastMatrixWorld=new Fe,i.material=o,(t=i.skeleton)!=null&&t.boneTexture&&this.saveBoneTexture(i),this.cachedMaterials.set(i,[s,o])}if(o.uniforms.velocityMatrix.value.multiplyMatrices(this._camera.projectionMatrix,i.modelViewMatrix),i.userData.needsUpdatedReflections||s.map instanceof z1?("FULL_MOVEMENT"in o.defines||(o.needsUpdate=!0),o.defines.FULL_MOVEMENT=""):"FULL_MOVEMENT"in o.defines&&(delete o.defines.FULL_MOVEMENT,o.needsUpdate=!0),i.visible=this.cameraMovedThisFrame||!i.matrixWorld.equals(o.lastMatrixWorld)||i.skeleton||"FULL_MOVEMENT"in o.defines,i.material=o,!!i.visible){this.renderedMeshesThisFrame++;for(const a of XU)o[a]=s[a];(e=i.skeleton)!=null&&e.boneTexture&&(o.defines.USE_SKINNING="",o.defines.BONE_TEXTURE="",o.uniforms.boneTexture.value=i.skeleton.boneTexture)}}}saveBoneTexture(e){let t=e.material.uniforms.prevBoneTexture.value;if(t&&t.image.width===e.skeleton.boneTexture.width)t=e.material.uniforms.prevBoneTexture.value,t.image.data.set(e.skeleton.boneTexture.image.data);else{var i;(i=t)==null||i.dispose();const s=e.skeleton.boneTexture.image.data.slice(),r=e.skeleton.boneTexture.image.width;t=new Mr(s,r,r,In,Zn),e.material.uniforms.prevBoneTexture.value=t,t.needsUpdate=!0}}unsetVelocityMaterialInScene(){for(const t of this.visibleMeshes)if(t.material.isVelocityMaterial){var e;t.visible=!0,t.material.lastMatrixWorld.copy(t.matrixWorld),t.material.uniforms.prevVelocityMatrix.value.multiplyMatrices(this._camera.projectionMatrix,t.modelViewMatrix),(e=t.skeleton)!=null&&e.boneTexture&&this.saveBoneTexture(t),t.material=this.cachedMaterials.get(t)[0]}}setSize(e,t){this.renderTarget.setSize(e,t)}renderVelocity(e){if(e.setRenderTarget(this.renderTarget),this.renderedMeshesThisFrame>0){const{background:t}=this._scene;this._scene.background=HU,e.render(this._scene,this._camera),this._scene.background=t}else e.clearColor()}checkCameraMoved(){const e=this.lastCameraTransform.position.distanceToSquared(this._camera.position),t=8*(1-this.lastCameraTransform.quaternion.dot(this._camera.quaternion));return e>1e-6||t>1e-6?(this.lastCameraTransform.position.copy(this._camera.position),this.lastCameraTransform.quaternion.copy(this._camera.quaternion),!0):!1}render(e){this.cameraMovedThisFrame=this.checkCameraMoved(),this.setVelocityMaterialInScene(),(this.renderedMeshesThisFrame>0||this.renderedMeshesLastFrame>0)&&this.renderVelocity(e),this.unsetVelocityMaterialInScene(),this.renderedMeshesLastFrame=this.renderedMeshesThisFrame}}const oS=new ne;class FU extends xn{constructor(e,t,i,s={}){super("TemporalResolvePass"),this.velocityPass=null,this.velocityResolutionScale=1,this.samples=1,this.lastCameraTransform={position:new H,quaternion:new Sn},this._scene=e,this._camera=t,this.renderTarget=new Rt(1,1,{minFilter:je,magFilter:je,type:us,depthBuffer:!1}),this.velocityPass=new YU(e,t),this.fullscreenMaterial=new WU(i),this.fullscreenMaterial.defines.correctionRadius=s.correctionRadius||1,s.dilation&&(this.fullscreenMaterial.defines.dilation=""),s.boxBlur&&(this.fullscreenMaterial.defines.boxBlur=""),this.setupFramebuffers(1,1),this.checkCanUseSharedVelocityTexture()}dispose(){this._scene.userData.velocityTexture===this.velocityPass.renderTarget.texture&&(delete this._scene.userData.velocityTexture,delete this._scene.userData.lastVelocityTexture),this.renderTarget.dispose(),this.accumulatedTexture.dispose(),this.fullscreenMaterial.dispose(),this.velocityPass.dispose()}setSize(e,t){this.renderTarget.setSize(e,t),this.velocityPass.setSize(e*this.velocityResolutionScale,t*this.velocityResolutionScale),this.velocityPass.renderTarget.texture.minFilter=this.velocityResolutionScale===1?pt:je,this.velocityPass.renderTarget.texture.magFilter=this.velocityResolutionScale===1?pt:je,this.velocityPass.renderTarget.texture.needsUpdate=!0,this.fullscreenMaterial.uniforms.invTexSize.value.set(1/e,1/t),this.setupFramebuffers(e,t)}setupFramebuffers(e,t){this.accumulatedTexture&&this.accumulatedTexture.dispose(),this.lastVelocityTexture&&this.lastVelocityTexture.dispose(),this.accumulatedTexture=new nb(e,t,In),this.accumulatedTexture.minFilter=je,this.accumulatedTexture.magFilter=je,this.accumulatedTexture.type=us,this.lastVelocityTexture=new nb(e*this.velocityResolutionScale,t*this.velocityResolutionScale,In),this.lastVelocityTexture.minFilter=this.velocityResolutionScale===1?pt:je,this.lastVelocityTexture.magFilter=this.velocityResolutionScale===1?pt:je,this.lastVelocityTexture.type=us,this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.accumulatedTexture,this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this.lastVelocityTexture,this.fullscreenMaterial.needsUpdate=!0}checkCanUseSharedVelocityTexture(){return this._scene.userData.velocityTexture&&this.velocityPass.renderTarget.texture!==this._scene.userData.velocityTexture?this.velocityPass.renderTarget.texture===this.fullscreenMaterial.uniforms.velocityTexture.value&&(this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this._scene.userData.lastVelocityTexture,this.fullscreenMaterial.uniforms.velocityTexture.value=this._scene.userData.velocityTexture,this.fullscreenMaterial.needsUpdate=!0):this.velocityPass.renderTarget.texture!==this.fullscreenMaterial.uniforms.velocityTexture.value&&(this.fullscreenMaterial.uniforms.velocityTexture.value=this.velocityPass.renderTarget.texture,this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this.lastVelocityTexture,this.fullscreenMaterial.needsUpdate=!0,this._scene.userData.velocityTexture||(this._scene.userData.velocityTexture=this.velocityPass.renderTarget.texture,this._scene.userData.lastVelocityTexture=this.lastVelocityTexture)),this.velocityPass.renderTarget.texture!==this.fullscreenMaterial.uniforms.velocityTexture.value}checkNeedsResample(){const e=this.lastCameraTransform.position.distanceToSquared(this._camera.position),t=8*(1-this.lastCameraTransform.quaternion.dot(this._camera.quaternion));(e>1e-6||t>1e-6)&&(this.samples=1,this.lastCameraTransform.position.copy(this._camera.position),this.lastCameraTransform.quaternion.copy(this._camera.quaternion))}render(e){this.samples++,this.checkNeedsResample(),this.fullscreenMaterial.uniforms.samples.value=this.samples,e.setRenderTarget(this.renderTarget),e.render(this.scene,this.camera),e.copyFramebufferToTexture(oS,this.accumulatedTexture),e.setRenderTarget(this.velocityPass.renderTarget),e.copyFramebufferToTexture(oS,this.lastVelocityTexture)}}const aS=function(e,t){let i=1,s=0;for(;e>0;)i/=t,s+=i*(e%t),e=~~(e/t);return s},KU=n=>{const e=[];let t=1;const i=t+n;for(;t 0. ) ? rbmax.x : rbmin.x; + rbminmax.y = ( nDir.y > 0. ) ? rbmax.y : rbmin.y; + rbminmax.z = ( nDir.z > 0. ) ? rbmax.z : rbmin.z; + + float correction = min( min( rbminmax.x, rbminmax.y ), rbminmax.z ); + vec3 boxIntersection = vWorldPosition + nDir * correction; + + return boxIntersection - cubePos; + } +#endif +`,TU=` +#ifdef BOX_PROJECTED_ENV_MAP + worldNormal = parallaxCorrectNormal( worldNormal, envMapSize, envMapPosition ); +#endif +`,EU=` +#ifdef BOX_PROJECTED_ENV_MAP + reflectVec = parallaxCorrectNormal( reflectVec, envMapSize, envMapPosition ); +#endif +`;function kU(n,e,t){n.defines.BOX_PROJECTED_ENV_MAP="",n.uniforms.envMapPosition={value:e},n.uniforms.envMapSize={value:t};const i=new RegExp(lS("vec3 worldNormal = inverseTransformDirection ( normal , viewMatrix ) ;").replaceAll(" ","\\s*"),"g"),s=new RegExp(lS("reflectVec = inverseTransformDirection ( reflectVec , viewMatrix ) ;").replaceAll(" ","\\s*"),"g");n.vertexShader=`varying vec3 vWorldPosition; +`+n.vertexShader.replace("#include ",zU),n.fragmentShader=LU+` +`+n.fragmentShader.replace("#include ",tt.envmap_physical_pars_fragment).replace(i,`vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + ${TU}`).replace(s,`reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); + ${EU}`)}const DU=mU.replace("#include ",VV).replace("#include ",fU),UU=["blur","blurSharpness","blurKernel"],PU=new NA(1);let ah;class _U extends ai{constructor(e,t,i=rS){super("SSREffect",DU,{type:"FinalSSRMaterial",uniforms:new Map([["reflectionsTexture",new q(null)],["blur",new q(0)],["blurSharpness",new q(0)],["blurKernel",new q(0)]]),defines:new Map([["RENDER_MODE","0"]])}),this.haltonSequence=KU(1024),this.haltonIndex=0,this.selection=new Ay,this.lastSize=void 0,this.cubeCamera=new Xv(.001,1e3,PU),this.usingBoxProjectedEnvMap=!1,this._scene=e,this._camera=t,i=pb({},rS,i,{boxBlur:!0,dilation:!0}),this.temporalResolvePass=new FU(e,t,bU,i),this.uniforms.get("reflectionsTexture").value=this.temporalResolvePass.renderTarget.texture,this.reflectionsPass=new SU(this,i),this.temporalResolvePass.fullscreenMaterial.uniforms.inputTexture.value=this.reflectionsPass.renderTarget.texture,this.lastSize={width:i.width,height:i.height,resolutionScale:i.resolutionScale,velocityResolutionScale:i.velocityResolutionScale},this.setSize(i.width,i.height),this.makeOptionsReactive(i)}makeOptionsReactive(e){let t=!1;const i=this.reflectionsPass.fullscreenMaterial.uniforms,s=Object.keys(i);for(const r of Object.keys(e))Object.defineProperty(this,r,{get(){return e[r]},set(o){if(!(e[r]===o&&t))switch(e[r]=o,UU.includes(r)||this.setSize(this.lastSize.width,this.lastSize.height,!0),r){case"resolutionScale":this.setSize(this.lastSize.width,this.lastSize.height);break;case"velocityResolutionScale":this.temporalResolvePass.velocityResolutionScale=o,this.setSize(this.lastSize.width,this.lastSize.height,!0);break;case"blur":this.uniforms.get("blur").value=o;break;case"blurSharpness":this.uniforms.get("blurSharpness").value=o;break;case"blurKernel":this.uniforms.get("blurKernel").value=o;break;case"steps":this.reflectionsPass.fullscreenMaterial.defines.steps=parseInt(o),this.reflectionsPass.fullscreenMaterial.needsUpdate=t;break;case"refineSteps":this.reflectionsPass.fullscreenMaterial.defines.refineSteps=parseInt(o),this.reflectionsPass.fullscreenMaterial.needsUpdate=t;break;case"missedRays":o?this.reflectionsPass.fullscreenMaterial.defines.missedRays="":delete this.reflectionsPass.fullscreenMaterial.defines.missedRays,this.reflectionsPass.fullscreenMaterial.needsUpdate=t;break;case"correctionRadius":this.temporalResolvePass.fullscreenMaterial.defines.correctionRadius=Math.round(o),this.temporalResolvePass.fullscreenMaterial.needsUpdate=t;break;case"blend":this.temporalResolvePass.fullscreenMaterial.uniforms.blend.value=o;break;case"correction":this.temporalResolvePass.fullscreenMaterial.uniforms.correction.value=o;break;case"exponent":this.temporalResolvePass.fullscreenMaterial.uniforms.exponent.value=o;break;case"distance":i.rayDistance.value=o;default:s.includes(r)&&(i[r].value=o)}}}),this[r]=e[r];t=!0}setSize(e,t,i=!1){!i&&e===this.lastSize.width&&t===this.lastSize.height&&this.resolutionScale===this.lastSize.resolutionScale&&this.velocityResolutionScale===this.lastSize.velocityResolutionScale||(this.temporalResolvePass.setSize(e,t),this.reflectionsPass.setSize(e,t),this.lastSize={width:e,height:t,resolutionScale:this.resolutionScale,velocityResolutionScale:this.velocityResolutionScale})}generateBoxProjectedEnvMapFallback(e,t=new H,i=new H,s=512){this.cubeCamera.renderTarget.dispose(),this.cubeCamera.renderTarget=new NA(s),this.cubeCamera.position.copy(t),this.cubeCamera.updateMatrixWorld(),this.cubeCamera.update(e,this._scene),ah||(ah=new aA(e),ah.compileCubemapShader());const r=ah.fromCubemap(this.cubeCamera.renderTarget.texture).texture;r.minFilter=je,r.magFilter=je;const o=this.reflectionsPass.fullscreenMaterial;return kU(o,t,i),o.fragmentShader=o.fragmentShader.replace("vec3 worldPos","worldPos").replace("varying vec3 vWorldPosition;","vec3 worldPos;"),o.uniforms.envMapPosition.value.copy(t),o.uniforms.envMapSize.value.copy(i),sS(o,r,s),this.usingBoxProjectedEnvMap=!0,r}setIBLRadiance(e,t){this._scene.traverse(i=>{if(i.material){var s;const r=(s=t.properties.get(i.material))==null?void 0:s.uniforms;r&&"disableIBLRadiance"in r&&(r.disableIBLRadiance.value=e)}})}deleteBoxProjectedEnvMapFallback(){const e=this.reflectionsPass.fullscreenMaterial;e.uniforms.envMap.value=null,e.fragmentShader=e.fragmentShader.replace("worldPos = ","vec3 worldPos = "),delete e.defines.BOX_PROJECTED_ENV_MAP,e.needsUpdate=!0,this.usingBoxProjectedEnvMap=!1}dispose(){super.dispose(),this.reflectionsPass.dispose(),this.temporalResolvePass.dispose()}update(e,t){if(!this.usingBoxProjectedEnvMap&&this._scene.environment){const a=this.reflectionsPass.fullscreenMaterial;let l=null;if(this._scene.traverse(c=>{if(!l&&c.material&&!c.material.envMap){const u=e.properties.get(c.material);"envMap"in u&&u.envMap instanceof jt&&(l=u.envMap)}}),l){const c=this._scene.environment.image.height;sS(a,l,c)}}this.haltonIndex=(this.haltonIndex+1)%this.haltonSequence.length;const[i,s]=this.haltonSequence[this.haltonIndex],{width:r,height:o}=this.lastSize;this.temporalResolvePass.velocityPass.render(e),this._camera.setViewOffset&&this._camera.setViewOffset(r,o,i,s,r,o),this.reflectionsPass.render(e,t),this.temporalResolvePass.render(e),this._camera.clearViewOffset()}static patchDirectEnvIntensity(e=0){e===0?tt.envmap_physical_pars_fragment=tt.envmap_physical_pars_fragment.replace("vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {","vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { return vec3(0.0);"):tt.envmap_physical_pars_fragment=tt.envmap_physical_pars_fragment.replace("vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );","vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ) * "+e.toFixed(5)+";")}}const py=D.createContext(null),fa=D.createContext(null),JU=Ji.memo(D.forwardRef(({children:n,camera:e,scene:t,resolutionScale:i,enabled:s=!0,renderPriority:r=1,autoClear:o=!0,depthBuffer:a,disableNormalPass:l,stencilBuffer:c,multisampling:u=8,frameBufferType:C=us},d)=>{const{gl:h,scene:f,camera:v,size:y}=$i(),A=t||f,b=e||v,[m,B,S]=D.useMemo(()=>{const Z=OD(),V=new Hk(h,{depthBuffer:a,stencilBuffer:c,multisampling:u>0&&Z?u:0,frameBufferType:C});V.addPass(new Ac(A,b));let N=null,k=null;return l||(k=new Vk(A,b),k.enabled=!1,V.addPass(k),i!==void 0&&Z&&(N=new wV({normalBuffer:k.texture,resolutionScale:i}),N.enabled=!1,V.addPass(N))),[V,k,N]},[b,h,a,c,u,C,A,l,i]);D.useEffect(()=>m?.setSize(y.width,y.height),[m,y]),_u((Z,V)=>{if(s){const N=h.autoClear;h.autoClear=o,c&&!o&&h.clearStencil(),m.render(V),h.autoClear=N}},s?r:0);const x=D.useRef(null),R=zL(x);D.useLayoutEffect(()=>{const Z=[];if(x.current&&R.current&&m){const V=R.current.objects;for(let N=0;N{for(const V of Z)m?.removePass(V);B&&(B.enabled=!1),S&&(S.enabled=!1)}},[m,n,b,B,S,R]);const M=D.useMemo(()=>({composer:m,normalPass:B,downSamplingPass:S,resolutionScale:i,camera:b,scene:A}),[m,B,S,i,b,A]);return D.useImperativeHandle(d,()=>m,[m]),j.jsx(fa.Provider,{value:M,children:j.jsx("group",{ref:x,children:n})})})),Po=n=>typeof n=="object"&&n!=null&&"current"in n?n.current:n;let OU=0;const gS=new WeakMap,QU=(n,e)=>Ji.forwardRef(function({blendFunction:i=e?.blendFunction,opacity:s=e?.opacity,...r},o){let a=gS.get(n);if(!a){const u=`@react-three/postprocessing/${n.name}-${OU++}`;MW({[u]:n}),gS.set(n,a=u)}const l=$i(u=>u.camera),c=Ji.useMemo(()=>{var u,C;return[...(u=e?.args)!=null?u:[],...(C=r.args)!=null?C:[{...e,...r}]]},[JSON.stringify(r)]);return j.jsx(a,{camera:l,"blendMode-blendFunction":i,"blendMode-opacity-value":s,...r,ref:o,args:c})}),vI=(n,e)=>{const t=n[e];return Ji.useMemo(()=>typeof t=="number"?new ne(t,t):t?new ne(...t):new ne,[t])},jU=D.forwardRef(function({target:e,depthTexture:t,...i},s){const r=$i(l=>l.invalidate),{camera:o}=D.useContext(fa),a=D.useMemo(()=>{const l=new BD(o,i),c=l.maskPass.getFullscreenMaterial();return c.maskFunction=KI.MULTIPLY_RGB_SET_ALPHA,l},[o,i]);return D.useLayoutEffect(()=>{if(e&&typeof e!="number"){const l=e instanceof H?new H().set(e.x,e.y,e.z):new H().set(e[0],e[1],e[2]);a.target=l}t&&a.setDepthTexture(t.texture,t.packing),r()},[e,t,a]),j.jsx("primitive",{ref:s,object:a,dispose:null})});D.forwardRef(({target:n=void 0,mouse:e=!1,debug:t=void 0,manual:i=!1,smoothTime:s=.25,...r},o)=>{const a=D.useRef(null),l=D.useRef(null),c=D.useRef(null),u=$i(({scene:S})=>S),C=$i(({pointer:S})=>S),{composer:d,camera:h}=D.useContext(fa),[f]=D.useState(()=>new Zk),[v]=D.useState(()=>new ZV);D.useEffect(()=>(d.addPass(f),d.addPass(v),()=>{d.removePass(f),d.removePass(v)}),[d,f,v]),D.useEffect(()=>()=>{f.dispose(),v.dispose()},[f,v]);const[y]=D.useState(()=>new H(0,0,0)),[A]=D.useState(()=>new H(0,0,0)),b=D.useCallback(async(S,x)=>(A.x=S,A.y=x,A.z=await f.readDepth(A),A.z=A.z*2-1,1-A.z>1e-7?A.unproject(h):!1),[A,f,h]),m=D.useCallback(async(S,x=!0)=>{var R;if(n)y.set(...n);else{const{x:M,y:Z}=e?C:{x:0,y:0},V=await b(M,Z);V&&y.copy(V)}x&&((R=a.current)!=null&&R.target)&&(s>0&&S>0?pU.damp3(a.current.target,y,s,S):a.current.target.copy(y))},[n,y,e,b,s,C]);_u(async(S,x)=>{var R;i||m(x),l.current&&l.current.position.copy(y),c.current&&((R=a.current)!=null&&R.target)&&c.current.position.copy(a.current.target)});const B=D.useMemo(()=>({dofRef:a,hitpoint:y,update:m}),[y,m]);return D.useImperativeHandle(o,()=>B,[B]),j.jsxs(j.Fragment,{children:[t?DL(j.jsxs(j.Fragment,{children:[j.jsxs("mesh",{ref:l,children:[j.jsx("sphereGeometry",{args:[t,16,16]}),j.jsx("meshBasicMaterial",{color:"#00ff00",opacity:1,transparent:!0,depthWrite:!1})]}),j.jsxs("mesh",{ref:c,children:[j.jsx("sphereGeometry",{args:[t/2,16,16]}),j.jsx("meshBasicMaterial",{color:"#00ff00",opacity:.5,transparent:!0,depthWrite:!1})]})]}),u):null,j.jsx(jU,{ref:a,...r,target:y})]})});D.forwardRef(function(e,t){const i=vI(e,"offset"),s=D.useMemo(()=>new yD({...e,offset:i}),[i,e]);return j.jsx("primitive",{ref:t,object:s,dispose:null})});D.forwardRef(function({blendFunction:e=It.NORMAL},t){const i=D.useMemo(()=>new mD(e),[e]);return j.jsx("primitive",{ref:t,object:i,dispose:null})});D.forwardRef(function({active:e=!0,...t},i){const s=$i(u=>u.invalidate),r=vI(t,"delay"),o=vI(t,"duration"),a=vI(t,"strength"),l=vI(t,"chromaticAberrationOffset"),c=D.useMemo(()=>new SD({...t,delay:r,duration:o,strength:a,chromaticAberrationOffset:l}),[r,o,t,a,l]);return D.useLayoutEffect(()=>{c.mode=e?t.mode||Pa.SPORADIC:Pa.DISABLED,s()},[e,c,s,t.mode]),j.jsx("primitive",{ref:i,object:c,dispose:null})});D.forwardRef(function(e,t){const{camera:i}=D.useContext(fa),s=D.useMemo(()=>new RD(i,Po(e.sun),e),[i,e]);return D.useLayoutEffect(()=>void(s.lightSource=Po(e.sun)),[s,e.sun]),j.jsx("primitive",{ref:t,object:s,dispose:null})});D.forwardRef(function({size:e,...t},i){const s=$i(o=>o.invalidate),r=D.useMemo(()=>new VD(t),[t]);return D.useLayoutEffect(()=>{e&&r.setSize(e.width,e.height),s()},[r,e]),j.jsx("primitive",{ref:i,object:r,dispose:null})});D.forwardRef(function({selection:e=[],selectionLayer:t=10,blendFunction:i,patternTexture:s,edgeStrength:r,pulseSpeed:o,visibleEdgeColor:a,hiddenEdgeColor:l,width:c,height:u,kernelSize:C,blur:d,xRay:h,...f},v){const y=$i(S=>S.invalidate),{scene:A,camera:b}=D.useContext(fa),m=D.useMemo(()=>new FD(A,b,{blendFunction:i,patternTexture:s,edgeStrength:r,pulseSpeed:o,visibleEdgeColor:a,hiddenEdgeColor:l,width:c,height:u,kernelSize:C,blur:d,xRay:h,...f}),[i,d,b,r,u,l,C,s,o,A,a,c,h]),B=D.useContext(py);return D.useEffect(()=>{if(!B&&e)return m.selection.set(Array.isArray(e)?e.map(Po):[Po(e)]),y(),()=>{m.selection.clear(),y()}},[m,e,B,y]),D.useEffect(()=>{m.selectionLayer=t,y()},[m,y,t]),D.useRef(),D.useEffect(()=>{var S;if(B&&B.enabled&&(S=B.selected)!=null&&S.length)return m.selection.set(B.selected),y(),()=>{m.selection.clear(),y()}},[B,m.selection,y]),j.jsx("primitive",{ref:v,object:m})});D.forwardRef(function({granularity:e=5},t){const i=D.useMemo(()=>new zD(e),[e]);return j.jsx("primitive",{ref:t,object:i,dispose:null})});const qU=(n,e)=>n.layers.enable(e.selection.layer),$U=(n,e)=>n.layers.disable(e.selection.layer);D.forwardRef(function({selection:e=[],selectionLayer:t=10,lights:i=[],luminanceThreshold:s,luminanceSmoothing:r,intensity:o,width:a,height:l,kernelSize:c,mipmapBlur:u,...C},d){i.length===0&&console.warn("SelectiveBloom requires lights to work.");const h=$i(b=>b.invalidate),{scene:f,camera:v}=D.useContext(fa),y=D.useMemo(()=>new LD(f,v,{blendFunction:It.ADD,luminanceThreshold:s,luminanceSmoothing:r,intensity:o,width:a,height:l,kernelSize:c,mipmapBlur:u,...C}),[f,v,s,r,o,a,l,c,u,C]),A=D.useContext(py);return D.useEffect(()=>{if(!A&&e)return y.selection.set(Array.isArray(e)?e.map(Po):[Po(e)]),h(),()=>{y.selection.clear(),h()}},[y,e,A,h]),D.useEffect(()=>{y.selection.layer=t,h()},[y,h,t]),D.useEffect(()=>{if(i&&i.length>0)return i.forEach(b=>qU(Po(b),y)),h(),()=>{i.forEach(b=>$U(Po(b),y)),h()}},[y,h,i,t]),D.useEffect(()=>{var b;if(A&&A.enabled&&(b=A.selected)!=null&&b.length)return y.selection.set(A.selected),h(),()=>{y.selection.clear(),h()}},[A,y.selection,h]),j.jsx("primitive",{ref:d,object:y,dispose:null})});D.forwardRef(function(e,t){const{camera:i,normalPass:s,downSamplingPass:r,resolutionScale:o}=D.useContext(fa),a=D.useMemo(()=>s===null&&r===null?(console.error("Please enable the NormalPass in the EffectComposer in order to use SSAO."),{}):new UD(i,s&&!r?s.texture:null,{blendFunction:It.MULTIPLY,samples:30,rings:4,distanceThreshold:1,distanceFalloff:0,rangeThreshold:.5,rangeFalloff:.1,luminanceInfluence:.9,radius:20,bias:.5,intensity:1,color:void 0,normalDepthBuffer:r?r.texture:null,resolutionScale:o??1,depthAwareUpsampling:!0,...e}),[i,s,e]);return j.jsx("primitive",{ref:t,object:a,dispose:null})});const eP=QU(kD);D.forwardRef(function({textureSrc:e,texture:t,...i},s){const r=gy(cW,e);D.useLayoutEffect(()=>{r.encoding=Ys,r.wrapS=r.wrapT=hs},[r]);const o=D.useMemo(()=>new JD({...i,texture:r||t}),[i,r,t]);return j.jsx("primitive",{ref:s,object:o,dispose:null})});D.forwardRef(function({lut:e,tetrahedralInterpolation:t,...i},s){const r=D.useMemo(()=>new HD(e,i),[e,i]),o=$i(a=>a.invalidate);return D.useLayoutEffect(()=>{t&&(r.tetrahedralInterpolation=t),e&&(r.lut=e),o()},[r,o,e,t]),j.jsx("primitive",{ref:s,object:r,dispose:null})});const tP=` +uniform sampler2D uCharacters; +uniform float uCharactersCount; +uniform float uCellSize; +uniform bool uInvert; +uniform vec3 uColor; + +const vec2 SIZE = vec2(16.); + +vec3 greyscale(vec3 color, float strength) { + float g = dot(color, vec3(0.299, 0.587, 0.114)); + return mix(color, vec3(g), strength); +} + +vec3 greyscale(vec3 color) { + return greyscale(color, 1.0); +} + +void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { + vec2 cell = resolution / uCellSize; + vec2 grid = 1.0 / cell; + vec2 pixelizedUV = grid * (0.5 + floor(uv / grid)); + vec4 pixelized = texture2D(inputBuffer, pixelizedUV); + float greyscaled = greyscale(pixelized.rgb).r; + + if (uInvert) { + greyscaled = 1.0 - greyscaled; + } + + float characterIndex = floor((uCharactersCount - 1.0) * greyscaled); + vec2 characterPosition = vec2(mod(characterIndex, SIZE.x), floor(characterIndex / SIZE.y)); + vec2 offset = vec2(characterPosition.x, -characterPosition.y) / SIZE; + vec2 charUV = mod(uv * (cell / SIZE), 1.0 / SIZE) - vec2(0., 1.0 / SIZE) + offset; + vec4 asciiCharacter = texture2D(uCharacters, charUV); + + asciiCharacter.rgb = uColor * asciiCharacter.r; + asciiCharacter.a = pixelized.a; + outputColor = asciiCharacter; +} +`;class nP extends ai{constructor({characters:e=" .:,'-^=*+?!|0#X%WM@",fontSize:t=54,cellSize:i=16,color:s="#ffffff",invert:r=!1}={}){const o=new Map([["uCharacters",new q(new jt)],["uCellSize",new q(i)],["uCharactersCount",new q(e.length)],["uColor",new q(new Re(s))],["uInvert",new q(r)]]);super("ASCIIEffect",tP,{uniforms:o});const a=this.uniforms.get("uCharacters");a&&(a.value=this.createCharactersTexture(e,t))}createCharactersTexture(e,t){const i=document.createElement("canvas"),s=1024,r=16,o=s/r;i.width=i.height=s;const a=new L1(i,void 0,hs,hs,pt,pt),l=i.getContext("2d");if(!l)throw new Error("Context not available");l.clearRect(0,0,s,s),l.font=`${t}px arial`,l.textAlign="center",l.textBaseline="middle",l.fillStyle="#fff";for(let c=0;c{const o=D.useMemo(()=>new nP({characters:n,fontSize:e,cellSize:t,color:i,invert:s}),[n,e,t,i,s]);return j.jsx("primitive",{ref:r,object:o})});D.forwardRef(function({ENABLE_BLUR:e=!0,USE_MRT:t=!0,...i},s){const{invalidate:r}=$i(),{scene:o,camera:a}=D.useContext(fa),l=D.useMemo(()=>new _U(o,a,{ENABLE_BLUR:e,USE_MRT:t,...i}),[o,a,e,t,i]),c=D.useContext(py);return D.useEffect(()=>{var u;if(c&&c.enabled&&(u=c.selected)!=null&&u.length)return l.selection.set(c.selected),r(),()=>{l.selection.clear(),r()}},[c]),j.jsx("primitive",{ref:s,object:l,...i})});const iP={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},projMat:{value:new Fe},viewMat:{value:new Fe},projViewMat:{value:new Fe},projectionMatrixInv:{value:new Fe},viewMatrixInv:{value:new Fe},cameraPos:{value:new H},resolution:{value:new ne},time:{value:0},samples:{value:[]},samplesR:{value:[]},bluenoise:{value:null},distanceFalloff:{value:1},radius:{value:5},near:{value:.1},far:{value:1e3},logDepth:{value:!1},ortho:{value:!1},screenSpaceRadius:{value:!1}},vertexShader:` +varying vec2 vUv; +void main() { + vUv = uv; + gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); +}`,fragmentShader:` + #define SAMPLES 16 + #define FSAMPLES 16.0 +uniform sampler2D sceneDiffuse; +uniform highp sampler2D sceneDepth; +uniform mat4 projectionMatrixInv; +uniform mat4 viewMatrixInv; +uniform mat4 projMat; +uniform mat4 viewMat; +uniform mat4 projViewMat; +uniform vec3 cameraPos; +uniform vec2 resolution; +uniform float time; +uniform vec3[SAMPLES] samples; +uniform float[SAMPLES] samplesR; +uniform float radius; +uniform float distanceFalloff; +uniform float near; +uniform float far; +uniform bool logDepth; +uniform bool ortho; +uniform bool screenSpaceRadius; +uniform sampler2D bluenoise; + varying vec2 vUv; + highp float linearize_depth(highp float d, highp float zNear,highp float zFar) + { + return (zFar * zNear) / (zFar - d * (zFar - zNear)); + } + highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) { + return nearZ + (farZ - nearZ) * d; + } + highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) { + float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0; + float a = farZ / (farZ - nearZ); + float b = farZ * nearZ / (nearZ - farZ); + float linDepth = a + b / depth; + return ortho ? linearize_depth_ortho( + linDepth, + nearZ, + farZ + ) :linearize_depth(linDepth, nearZ, farZ); + } + + vec3 getWorldPosLog(vec3 posS) { + vec2 uv = posS.xy; + float z = posS.z; + float nearZ =near; + float farZ = far; + float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0; + float a = farZ / (farZ - nearZ); + float b = farZ * nearZ / (nearZ - farZ); + float linDepth = a + b / depth; + vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0; + vec4 wpos = viewMatrixInv * projectionMatrixInv * clipVec; + return wpos.xyz / wpos.w; + } + vec3 getWorldPos(float depth, vec2 coord) { + #ifdef LOGDEPTH + return getWorldPosLog(vec3(coord, depth)); + #endif + float z = depth * 2.0 - 1.0; + vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0); + vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition; + // Perspective division + vec4 worldSpacePosition = viewMatrixInv * viewSpacePosition; + worldSpacePosition.xyz /= worldSpacePosition.w; + return worldSpacePosition.xyz; + } + + vec3 computeNormal(vec3 worldPos, vec2 vUv) { + ivec2 p = ivec2(vUv * resolution); + float c0 = texelFetch(sceneDepth, p, 0).x; + float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x; + float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x; + float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x; + float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x; + float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x; + float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x; + float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x; + float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x; + + float dl = abs((2.0 * l1 - l2) - c0); + float dr = abs((2.0 * r1 - r2) - c0); + float db = abs((2.0 * b1 - b2) - c0); + float dt = abs((2.0 * t1 - t2) - c0); + + vec3 ce = getWorldPos(c0, vUv).xyz; + + vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz + : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz; + vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz + : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz; + + return normalize(cross(dpdx, dpdy)); +} + +void main() { + vec4 diffuse = texture2D(sceneDiffuse, vUv); + float depth = texture2D(sceneDepth, vUv).x; + if (depth == 1.0) { + gl_FragColor = vec4(vec3(1.0), 1.0); + return; + } + vec3 worldPos = getWorldPos(depth, vUv); + vec3 normal = computeNormal(worldPos, vUv); + vec4 noise = texture2D(bluenoise, vUv * (resolution / vec2(128.0))); + vec3 randomVec = normalize(noise.rgb * 2.0 - 1.0); + vec3 tangent = normalize(randomVec - normal * dot(randomVec, normal)); + vec3 bitangent = cross(normal, tangent); + mat3 tbn = mat3(tangent, bitangent, normal); + float occluded = 0.0; + float totalWeight = 0.0; + /* float radiusScreen = distance( + worldPos, + getWorldPos(depth, vUv + + vec2(48.0, 0.0) / resolution) + );/*vUv.x < 0.5 ? radius : min(distance( + worldPos, + getWorldPos(depth, vUv + + vec2(100.0, 0.0) / resolution) + ), radius); + float distanceFalloffScreen = radiusScreen * 0.2;*/ + float radiusToUse = screenSpaceRadius ? distance( + worldPos, + getWorldPos(depth, vUv + + vec2(radius, 0.0) / resolution) + ) : radius; + float distanceFalloffToUse =screenSpaceRadius ? + radiusToUse * distanceFalloff + : distanceFalloff; + float bias = (0.1 / near) * fwidth(distance(worldPos, cameraPos)) / radiusToUse; + for(float i = 0.0; i < FSAMPLES; i++) { + vec3 sampleDirection = + tbn * + samples[int(i)]; + ; + float moveAmt = samplesR[int(mod(i + noise.a * FSAMPLES, FSAMPLES))]; + vec3 samplePos = worldPos + radiusToUse * moveAmt * sampleDirection; + vec4 offset = projViewMat * vec4(samplePos, 1.0); + offset.xyz /= offset.w; + offset.xyz = offset.xyz * 0.5 + 0.5; + float sampleDepth = textureLod(sceneDepth, offset.xy, 0.0).x; + /*float distSample = logDepth ? linearize_depth_log(sampleDepth, near, far) + (ortho ? linearize_depth_ortho(sampleDepth, near, far) : linearize_depth(sampleDepth, near, far));*/ + #ifdef LOGDEPTH + float distSample = linearize_depth_log(sampleDepth, near, far); + #else + float distSample = ortho ? linearize_depth_ortho(sampleDepth, near, far) : linearize_depth(sampleDepth, near, far); + #endif + float distWorld = ortho ? linearize_depth_ortho(offset.z, near, far) : linearize_depth(offset.z, near, far); + float rangeCheck = smoothstep(0.0, 1.0, distanceFalloffToUse / (abs(distSample - distWorld))); + vec2 diff = gl_FragCoord.xy - ( offset.xy * resolution); + float weight = dot(sampleDirection, normal); + occluded += rangeCheck * weight * + (distSample + bias + < distWorld ? 1.0 : 0.0) * ( + (dot( + diff, + diff + + ) < 1.0 || (sampleDepth == depth) || ( + offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0 + ) ? 0.0 : 1.0) + ); + totalWeight += weight; + } + float occ = clamp(1.0 - occluded / totalWeight, 0.0, 1.0); + gl_FragColor = vec4(0.5 + 0.5 * normal, occ); +}`},sP={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},projMat:{value:new Fe},viewMat:{value:new Fe},projectionMatrixInv:{value:new Fe},viewMatrixInv:{value:new Fe},cameraPos:{value:new H},resolution:{value:new ne},color:{value:new H(0,0,0)},blueNoise:{value:null},time:{value:0},intensity:{value:10},renderMode:{value:0},gammaCorrection:{value:!1}},vertexShader:` + varying vec2 vUv; + void main() { + vUv = uv; + gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); + }`,fragmentShader:` + uniform sampler2D sceneDiffuse; + uniform sampler2D sceneDepth; + uniform sampler2D tDiffuse; + uniform sampler2D blueNoise; + uniform vec2 resolution; + uniform vec3 color; + uniform float intensity; + uniform float renderMode; + uniform bool gammaCorrection; + varying vec2 vUv; + highp float linearize_depth(highp float d, highp float zNear,highp float zFar) + { + highp float z_n = 2.0 * d - 1.0; + return 2.0 * zNear * zFar / (zFar + zNear - z_n * (zFar - zNear)); + } + #include + #include + void main() { + vec4 texel = texture2D(tDiffuse, vUv);//vec3(0.0); + vec4 sceneTexel = texture2D(sceneDiffuse, vUv); + float finalAo = pow(texel.a, intensity); + if (renderMode == 0.0) { + gl_FragColor = vec4( mix(sceneTexel.rgb, color, 1.0 - finalAo), sceneTexel.a); + } else if (renderMode == 1.0) { + gl_FragColor = vec4( mix(vec3(1.0), color, 1.0 - finalAo), sceneTexel.a); + } else if (renderMode == 2.0) { + gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a); + } else if (renderMode == 3.0) { + if (vUv.x < 0.5) { + gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a); + } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) { + gl_FragColor = vec4(1.0); + } else { + gl_FragColor = vec4( mix(sceneTexel.rgb, color, 1.0 - finalAo), sceneTexel.a); + } + } else if (renderMode == 4.0) { + if (vUv.x < 0.5) { + gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a); + } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) { + gl_FragColor = vec4(1.0); + } else { + gl_FragColor = vec4( mix(vec3(1.0), color, 1.0 - finalAo), sceneTexel.a); + } + } + #include + if (gammaCorrection) { + gl_FragColor = LinearTosRGB(gl_FragColor); + } + } + `},rP={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},projMat:{value:new Fe},viewMat:{value:new Fe},projectionMatrixInv:{value:new Fe},viewMatrixInv:{value:new Fe},cameraPos:{value:new H},resolution:{value:new ne},time:{value:0},r:{value:5},blueNoise:{value:null},radius:{value:12},worldRadius:{value:5},index:{value:0},poissonDisk:{value:[]},distanceFalloff:{value:1},near:{value:.1},far:{value:1e3},logDepth:{value:!1},screenSpaceRadius:{value:!1}},vertexShader:` + varying vec2 vUv; + void main() { + vUv = uv; + gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); + }`,fragmentShader:` + uniform sampler2D sceneDiffuse; + uniform highp sampler2D sceneDepth; + uniform sampler2D tDiffuse; + uniform sampler2D blueNoise; + uniform mat4 projectionMatrixInv; + uniform mat4 viewMatrixInv; + uniform vec2 resolution; + uniform float r; + uniform float radius; + uniform float worldRadius; + uniform float index; + uniform float near; + uniform float far; + uniform float distanceFalloff; + uniform bool logDepth; + uniform bool screenSpaceRadius; + varying vec2 vUv; + + highp float linearize_depth(highp float d, highp float zNear,highp float zFar) + { + highp float z_n = 2.0 * d - 1.0; + return 2.0 * zNear * zFar / (zFar + zNear - z_n * (zFar - zNear)); + } + highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) { + float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0; + float a = farZ / (farZ - nearZ); + float b = farZ * nearZ / (nearZ - farZ); + float linDepth = a + b / depth; + return linearize_depth(linDepth, nearZ, farZ); + } + highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) { + return nearZ + (farZ - nearZ) * d; + } + vec3 getWorldPosLog(vec3 posS) { + vec2 uv = posS.xy; + float z = posS.z; + float nearZ =near; + float farZ = far; + float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0; + float a = farZ / (farZ - nearZ); + float b = farZ * nearZ / (nearZ - farZ); + float linDepth = a + b / depth; + vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0; + vec4 wpos = viewMatrixInv * projectionMatrixInv * clipVec; + return wpos.xyz / wpos.w; + } + vec3 getWorldPos(float depth, vec2 coord) { + #ifdef LOGDEPTH + return getWorldPosLog(vec3(coord, depth)); + #endif + + float z = depth * 2.0 - 1.0; + vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0); + vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition; + // Perspective division + vec4 worldSpacePosition = viewMatrixInv * viewSpacePosition; + worldSpacePosition.xyz /= worldSpacePosition.w; + return worldSpacePosition.xyz; + } + #include + #define NUM_SAMPLES 16 + uniform vec2 poissonDisk[NUM_SAMPLES]; + void main() { + const float pi = 3.14159; + vec2 texelSize = vec2(1.0 / resolution.x, 1.0 / resolution.y); + vec2 uv = vUv; + vec4 data = texture2D(tDiffuse, vUv); + float occlusion = data.a; + float baseOcc = data.a; + vec3 normal = data.rgb * 2.0 - 1.0; + float count = 1.0; + float d = texture2D(sceneDepth, vUv).x; + vec3 worldPos = getWorldPos(d, vUv); + float size = radius; + float angle; + if (index == 0.0) { + angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).x * PI2; + } else if (index == 1.0) { + angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).y * PI2; + } else if (index == 2.0) { + angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).z * PI2; + } else { + angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).w * PI2; + } + + mat2 rotationMatrix = mat2(cos(angle), -sin(angle), sin(angle), cos(angle)); + float radiusToUse = screenSpaceRadius ? distance( + worldPos, + getWorldPos(d, vUv + + vec2(worldRadius, 0.0) / resolution) + ) : worldRadius; + float distanceFalloffToUse =screenSpaceRadius ? + radiusToUse * distanceFalloff + : distanceFalloff; + + + for(int i = 0; i < NUM_SAMPLES; i++) { + vec2 offset = (rotationMatrix * poissonDisk[i]) * texelSize * size; + vec4 dataSample = texture2D(tDiffuse, uv + offset); + float occSample = dataSample.a; + vec3 normalSample = dataSample.rgb * 2.0 - 1.0; + float dSample = texture2D(sceneDepth, uv + offset).x; + vec3 worldPosSample = getWorldPos(dSample, uv + offset); + float tangentPlaneDist = abs(dot(worldPos - worldPosSample, normal)); + float rangeCheck = exp(-1.0 * tangentPlaneDist * (1.0 / distanceFalloffToUse)) * max(dot(normal, normalSample), 0.0) * (1.0 - abs(occSample - baseOcc)); + occlusion += occSample * rangeCheck; + count += rangeCheck; + } + occlusion /= count; + gl_FragColor = vec4(0.5 + 0.5 * normal, occlusion); + } + `};var NV="5L7pP4UXrOIr/VZ1G3f6p89FIWU7lqc7J3DPxKjJUXODJoHQzf/aNVM+ABlvhXeBGN7iC0WkmTjEaAqOItBfBdaK5KSGV1ET5SOKl3x9JOX5w2sAl6+6KjDhVUHgbqq7DZ5EeYzbdSNxtrQLW/KkPJoOTG4u5CBUZkCKHniY9l7DUgjuz708zG1HIC8qfohi1vPjPH9Lq47ksjRrjwXD4MlVCjdAqYFGodQ8tRmHkOfq4wVRIAHvoavPHvN1lpk3X4Y1yzAPGe8S9KBs3crc4GwlU1dEOXiWol/mgQqxkNqB1xd04+0Bmpwj0GcCc4NUi+c731FUxjvaexCkCJ0qhrJJ++htWqetNC4NewClu8aFRSwrqiJEGe+qtTg4CYCHaF1wJI0sy/ZBQAI0qAMyBvVjWZlv2pdkCaro9eWDLK5I4mbb8E4d7hZr9dDJiTJm6Bmb5S+2F7yal/JPdeLUfwq7jmVLaQfhv4tWMJAt7V4sG9LuAv2oPJgSj1nnlBvPibfHM2TrlWHwGCLGxW/5Jm2TotaDL+pHDM5pn1r0UuTZ24N8S5k68bLHW9tfD+2k4zGev23ExJb4YTRKWrj82N5LjJ26lj1BkGZ0CsXLGGELoPaYQomjTqPxYqhfwOwDliNGVqux9ffuybqOKgsbB51B1GbZfG8vHDBE2JQGib1mnCmWOWAMJcHN0cKeDHYTflbDTVXajtr68mwfRje6WueQ/6yWqmZMLWNH7P27zGFhMFqaqfg11Q88g/9UA/FROe9yfq0yOO0pnNAxvepFy2BpEbcgG+mCyjCC01JWlOZlIPdf1TtlyOt7L94ToYGCukoFt4OqwOrofamjECpSgKLLmrRM+sNRAw12eaqk8KtdFk7pn2IcDQiPXCh16t1a+psi+w9towHTKPyQM0StKr61b2BnN1HU+aezFNBLfHTiXwhGTbdxLLmrsAGI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ebFe3UkkO/+coIo2BTAcgBqOtQ134s9a4QJvofuqBYMGOBMsWZ+sn/2AOxDx6SfAnDFGw==";const oP=Uint8Array.from(atob(NV),n=>n.charCodeAt(0));function HV(n,e,t){if(e.getQueryParameter(n,e.QUERY_RESULT_AVAILABLE)){const r=e.getQueryParameter(n,e.QUERY_RESULT)/1e6;t.lastTime=r}else setTimeout(()=>{HV(n,e,t)},1)}class aP extends xn{constructor(e,t,i=512,s=512){super(),this.width=i,this.height=s,this.clear=!0,this.camera=t,this.scene=e,this.autosetGamma=!0,this.configuration=new Proxy({aoSamples:16,aoRadius:5,denoiseSamples:8,denoiseRadius:12,distanceFalloff:1,intensity:5,denoiseIterations:2,renderMode:0,color:new Re(0,0,0),gammaCorrection:!0,logarithmicDepthBuffer:!1,screenSpaceRadius:!1},{set:(r,o,a)=>{const l=r[o];return r[o]=a,o==="aoSamples"&&l!==a&&this.configureAOPass(this.configuration.logarithmicDepthBuffer),o==="denoiseSamples"&&l!==a&&this.configureDenoisePass(this.configuration.logarithmicDepthBuffer),o==="gammaCorrection"&&(this.autosetGamma=!1),!0}}),this.samples=[],this.samplesR=[],this.samplesDenoise=[],this.configureSampleDependentPasses(),this.effectCompisterQuad=new rh(new Zt(sP)),this.copyQuad=new rh(new Zt({uniforms:{tDiffuse:{value:null}},vertexShader:` + varying vec2 vUv; + void main() { + vUv = uv; + gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); + } + `,fragmentShader:` + uniform sampler2D tDiffuse; + varying vec2 vUv; + void main() { + gl_FragColor = texture2D(tDiffuse, vUv); + } + `})),this.writeTargetInternal=new Rt(this.width,this.height,{minFilter:je,magFilter:je,depthBuffer:!1}),this.readTargetInternal=new Rt(this.width,this.height,{minFilter:je,magFilter:je,depthBuffer:!1}),this.bluenoise=new Mr(oP,128,128),this.bluenoise.colorSpace=co,this.bluenoise.wrapS=hs,this.bluenoise.wrapT=hs,this.bluenoise.minFilter=pt,this.bluenoise.magFilter=pt,this.bluenoise.needsUpdate=!0,this.lastTime=0,this.needsDepthTexture=!0,this._r=new ne,this._c=new Re}configureSampleDependentPasses(){this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureDenoisePass(this.configuration.logarithmicDepthBuffer)}configureAOPass(e=!1){this.samples=this.generateHemisphereSamples(this.configuration.aoSamples),this.samplesR=this.generateHemisphereSamplesR(this.configuration.aoSamples);const t={...iP};t.fragmentShader=t.fragmentShader.replace("16",this.configuration.aoSamples).replace("16.0",this.configuration.aoSamples+".0"),e&&(t.fragmentShader=`#define LOGDEPTH +`+t.fragmentShader),this.effectShaderQuad?(this.effectShaderQuad.material.dispose(),this.effectShaderQuad.material=new Zt(t)):this.effectShaderQuad=new rh(new Zt(t))}configureDenoisePass(e=!1){this.samplesDenoise=this.generateDenoiseSamples(this.configuration.denoiseSamples,11);const t={...rP};t.fragmentShader=t.fragmentShader.replace("16",this.configuration.denoiseSamples),e&&(t.fragmentShader=`#define LOGDEPTH +`+t.fragmentShader),this.poissonBlurQuad?(this.poissonBlurQuad.material.dispose(),this.poissonBlurQuad.material=new Zt(t)):this.poissonBlurQuad=new rh(new Zt(t))}generateHemisphereSamples(e){const t=[];for(let i=0;in.charCodeAt(0));const lP=D.forwardRef(({screenSpaceRadius:n,quality:e,aoRadius:t=5,aoSamples:i=16,denoiseSamples:s=4,denoiseRadius:r=12,distanceFalloff:o=1,intensity:a=1,color:l},c)=>{const{camera:u,scene:C}=$i(),d=D.useMemo(()=>new aP(C,u),[]);return D.useLayoutEffect(()=>{Ta(d.configuration,{color:l,aoRadius:t,distanceFalloff:o,intensity:a,aoSamples:i,denoiseSamples:s,denoiseRadius:r,screenSpaceRadius:n})},[n,l,t,o,a,i,s,r]),D.useLayoutEffect(()=>{e&&d.setQualityMode(e.charAt(0).toUpperCase()+e.slice(1))},[e]),j.jsx("primitive",{ref:c,object:d})}),xm=m1.randFloatSpread;function gP({mat:n=new Fe,vec:e=new H,numBalls:t,color:i}){const s=new Gl(1,50,50),r=new UA({color:i,roughness:0,envMapIntensity:1}),[o,a]=mV(()=>({args:[1],mass:1,angularDamping:.1,linearDamping:.65,position:[xm(10),xm(10),xm(10)]}));return _u(l=>{for(let c=0;ct.viewport),[,e]=mV(()=>({type:"Kinematic",args:[3],position:[0,0,0]}));return _u(t=>e.position.set(-(t.mouse.x*n.width)/2,t.mouse.y*n.height/2,3))}const IP=({intensity:n,color:e,distance:t,width:i,height:s})=>{const r=[];for(let a=0;a<10;a++)r.push([-i/2+i/(10-1)*a,t,s/2]),r.push([-i/2+i/(10-1)*a,t,-s/2]),r.push([i/2,t,-s/2+s/(10-1)*a]),r.push([-i/2,t,-s/2+s/(10-1)*a]);return j.jsx(j.Fragment,{children:r.map((a,l)=>j.jsx("pointLight",{position:a,intensity:n,color:e},l))})},uP=({color:n,className:e})=>j.jsxs(gT,{className:e,shadows:!0,gl:{antialias:!0},camera:{position:[0,0,-34],fov:20,near:1,far:1e3},children:[j.jsxs(BE,{gravity:[0,-8,0],iterations:10,children:[j.jsx(cP,{}),j.jsx(gP,{numBalls:20,color:n})]}),j.jsx("ambientLight",{intensity:1}),j.jsx(IP,{intensity:.05,color:"#ffffff",distance:100,height:200,width:100}),j.jsxs(JU,{disableNormalPass:!0,multisampling:0,children:[j.jsx(lP,{color:"black",aoRadius:2,intensity:1,aoSamples:6,denoiseSamples:4}),j.jsx(eP,{})]})]}),CP=`@inproceedings{recode-ni-2021, + author = {Ni, Wode and Sunshine, Joshua and Le, Vu and Gulwani, Sumit and Barik, Titus}, + title = {reCode: A Lightweight Find-and-Replace Interaction in the IDE for Transforming Code by Example}, + year = {2021}, + isbn = {9781450386357}, + publisher = {Association for Computing Machinery}, + address = {New York, NY, USA}, + url = {https://doi.org/10.1145/3472749.3474748}, + doi = {10.1145/3472749.3474748}, + booktitle = {The 34th Annual ACM Symposium on User Interface Software and Technology}, + pages = {258–269}, + numpages = {12}, + keywords = {code transformation, program synthesis, find-and-replace}, + location = {Virtual Event, USA}, + series = {UIST'21} +} + +@article{penrose-2020, + author = {Ye, Katherine and Ni, Wode and Krieger, Max and Ma'ayan, Dor and Wise, Jenna and Aldrich, Jonathan and Sunshine, Joshua and Crane, Keenan}, + title = {Penrose: From Mathematical Notation to Beautiful Diagrams}, + year = {2020}, + issue_date = {August 2020}, + publisher = {Association for Computing Machinery}, + address = {New York, NY, USA}, + volume = {39}, + number = {4}, + issn = {0730-0301}, + url = {https://doi.org/10.1145/3386569.3392375}, + doi = {10.1145/3386569.3392375}, + journal = {ACM Transactions on Graphics}, + month = {aug}, + articleno = {144}, + numpages = {16}, + series = {SIGGRAPH'20} +} + +@inproceedings{diagramming-2020, + author = {Ma'ayan, Dor and Ni, Wode and Ye, Katherine and Kulkarni, Chinmay and Sunshine, Joshua}, + title = {How Domain Experts Create Conceptual Diagrams and Implications for Tool Design}, + year = {2020}, + isbn = {9781450367080}, + publisher = {Association for Computing Machinery}, + address = {New York, NY, USA}, + url = {https://doi.org/10.1145/3313831.3376253}, + doi = {10.1145/3313831.3376253}, + booktitle = {Proceedings of the 2020 CHI Conference on Human Factors in Computing Systems}, + pages = {1–14}, + numpages = {14}, + location = {Honolulu, HI, USA}, + series = {CHI'20} +} + +@inproceedings{substy-2017, + title = {Substance and Style: domain-specific languages for mathematical diagrams}, + author = {Ni, Wode and Ye, Katherine and Sunshine, Joshua and Aldrich, Jonathan and Crane, Keenan}, + booktitle = {Domain-Specific Language Design and Implementation}, + year = {2017}, + series = {DSLDI'17} +} + +@inproceedings{tutorial-2019, + author = {Anael Kuperwajs Cohen and Wode Ni and Joshua Sunshine}, + title = {{Designing Declarative Language Tutorials: A Guided and Individualized Approach}}, + booktitle = {10th Workshop on Evaluation and Usability of Programming Languages and Tools}, + series = {PLATEAU'19}, + year = {2019} +} + +@inproceedings{narrative-2019, + title = {Defining Visual Narratives for Mathematics Declaratively}, + author = {Krieger, Max and Ni, Wode and Sunshine, Joshua}, + title = {{Designing Declarative Language Tutorials: A Guided and Individualized Approach}}, + booktitle = {10th Workshop on Evaluation and Usability of Programming Languages and Tools}, + series = {PLATEAU'19}, + year = {2019} +} + +@inproceedings{penrosellm-2023, + author = {Jain, Rijul and Ni, Wode and Sunshine, Joshua}, + title = {Generating Domain-Specific Programs for Diagram Authoring with Large Language Models}, + year = {2023}, + isbn = {9798400703843}, + publisher = {Association for Computing Machinery}, + address = {New York, NY, USA}, + url = {https://doi.org/10.1145/3618305.3623612}, + doi = {10.1145/3618305.3623612}, + booktitle = {Companion Proceedings of the 2023 ACM SIGPLAN International Conference on Systems, Programming, Languages, and Applications: Software for Humanity}, + pages = {70--71}, + numpages = {2}, + location = {Cascais, Portugal}, + series = {SPLASH'23} +}`;var XV={exports:{}};(function(n,e){(function(t,i){n.exports=i()})(EM,function(){return function(t){function i(r){if(s[r])return s[r].exports;var o=s[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,i),o.l=!0,o.exports}var s={};return i.m=t,i.c=s,i.d=function(r,o,a){i.o(r,o)||Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:a})},i.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return i.d(o,"a",o),o},i.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},i.p="",i(i.s=17)}([function(t,i,s){function r(C,d){if(typeof C!="string")throw new Error("Expected to be string: "+JSON.stringify(d||C));return C}function o(C,d){if(C===void 0)throw new Error("Expected to be defined: "+JSON.stringify(d||C));return C}function a(C,d){if(!l(C))throw new Error("Expected to be array: "+JSON.stringify(d||C));return C}function l(C){return!!C&&C.constructor===Array}function c(C){return typeof C=="number"}function u(C){return typeof C=="string"}Object.defineProperty(i,"__esModule",{value:!0}),i.mustBeString=r,i.mustBeDefined=o,i.mustBeArray=a,i.isArray=l,i.isNumber=c,i.isString=u,i.flattenMyArray=function(C,d){d||(d=[]);for(var h=0,f=C.length;h0)){var $=R.exec(E),te=0;if($){do{var Ce=te;te=$.index+$[0].length,V.push(E.substring(Ce,$.index)),(M===void 0||M>0)&&(Z.push(V),V=[],M!==void 0&&M>0&&M--),$=M===void 0||M>0?R.exec(E):void 0}while($);te>0&&te0&&Z.push(V),Z}Object.defineProperty(i,"__esModule",{value:!0});var A=s(5),b=s(2),m=s(1),B=s(0);i.isBibStringComponent=r,i.isContiguousSimpleString=o,i.joinContiguousSimpleStrings=a,i.parseStringComponent=l,i.toStringBibStringDatum=c,i.toStringBibStringData=u,i.flattenQuotedStrings=C;var S=['"'];i.globContiguousStrings=h,i.splitOnAnd=f,i.splitOnComma=v,i.splitOnPattern=y},function(t,i,s){var r=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,C){u.__proto__=C}||function(u,C){for(var d in C)C.hasOwnProperty(d)&&(u[d]=C[d])};return function(u,C){function d(){this.constructor=u}c(u,C),u.prototype=C===null?Object.create(C):(d.prototype=C.prototype,new d)}}();Object.defineProperty(i,"__esModule",{value:!0});var o=s(0),a=function(){function c(u,C,d){this.type=u,this.braceDepth=C,this.data=d}return c.isBibStringComponent=function(u){return typeof u.braceDepth=="number"&&typeof u.type=="string"},c.stringifyDatum=function(u){if(o.isString(u))return u;if(o.isNumber(u))return u.toString();if(c.isBibStringComponent(u))return u.stringify();throw new Error("Unexpected state")},c.prototype.stringify=function(){return this.data.map(c.stringifyDatum).join("")},c}();i.BibStringComponent=a;var l=function(c){function u(C,d){return c.call(this,C,0,d)||this}return r(u,c),u}(a);i.BibOuterStringComponent=l},function(t,i,s){function r(a){return typeof a.stringref=="string"}Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function a(l,c){this.braceDepth=l,this.stringref=c}return a}();i.StringRef=o,i.isStringRef=r},function(t,i,s){function r(h){return typeof h.key=="string"&&h.value!==void 0}function o(h){if(r(h))return{key:h.key,value:a(h.value)};throw new Error("Was not a KeyVal: "+JSON.stringify(h))}function a(h){if(C.isNumber(h))return h;var f=C.mustBeArray(h.data);switch(h.type){case"quotedstringwrapper":return f.length===1&&C.isNumber(f[0])?f[0]:new u.OuterQuotedString(f.map(function(v){return d.parseStringComponent(0,v)}));case"bracedstringwrapper":return new c.OuterBracedString(f.map(function(v){return d.parseStringComponent(0,v)}));default:throw new Error("Unexpected value: "+JSON.stringify(h))}}function l(h){if(h)return C.isNumber(h)?h:h.stringify()}Object.defineProperty(i,"__esModule",{value:!0});var c=s(2),u=s(1),C=s(0),d=s(3);i.isKeyVal=r,i.newKeyVal=o,i.parseFieldValue=a,i.normalizeFieldValue=l},function(t,i,s){function r(B){var S=o(B),x=S.key,R=S.value;return new m(x,R)}function o(B){if(h.isKeyVal(B))return h.newKeyVal(B);if(B.type!=="string")throw new Error("Unexpected node: "+JSON.stringify(B));return o(B.data)}function a(B){var S={};return Object.keys(B).forEach(function(x){S[x]||(S[x]=c({},S,B,B[x]))}),S}function l(B,S,x,R){return B.data.map(function(M){if(A.isString(M)||A.isNumber(M))return M;if(f.isStringRef(M))return u(S,R,M,x);if(b.isBibStringComponent(M))return C(M,S,x,R);throw new Error})}function c(B,S,x,R){return A.isNumber(R)?R:y.isOuterBracedString(R)||v.isOuterQuotedString(R)?d(R,B,S,x):f.isStringRef(R)?u(B,x,R,S):R}function u(B,S,x,R){var M=x.stringref;if(B[M])throw new Error("Cycle detected: "+M);if(R[M])return R[M];if(!S[M])throw new Error('Unresolved reference: "'+x.stringref+'" ('+JSON.stringify(x)+")");return R[M]=c(Object.assign({},B,(Z={},Z[M]=!0,Z)),R,S,S[M]),R[M];var Z}function C(B,S,x,R){var M=l(B,S,x,R),Z=B.braceDepth;if(v.isQuotedString(B))return new v.QuotedString(Z,M);if(y.isBracedString(B))return new y.BracedString(Z,M);if(v.isOuterQuotedString(B))return new v.OuterQuotedString(M);if(y.isOuterBracedString(B))return new y.OuterBracedString(M);throw new Error}function d(B,S,x,R){var M=C(B,S,x,R);if(!y.isOuterBracedString(M)&&!v.isOuterQuotedString(M))throw new Error;return M}Object.defineProperty(i,"__esModule",{value:!0});var h=s(6),f=s(5),v=s(1),y=s(2),A=s(0),b=s(3),m=function(){function B(S,x){this.type="string",this.key=S,this.value=x}return B}();i.BibStringEntry=m,i.newStringEntry=r,i.resolveStrings=a,i.resolveStringReferences=l,i.resolveStringReference=c,i.copyWithResolvedStringReferences=C,i.copyOuterWithResolvedStringReferences=d},function(t,i,s){function r(R){var M=m.toStringBibStringData(R);return M?M.charAt(0):""}function o(R){return R.length>0&&a(R[0])}function a(R){if(v.isString(R)){if(!R)return!1;var M=R.charAt(0);return M.toLowerCase()===M&&M.toUpperCase()!==M}if(y.isQuotedString(R))return!(!R.data||R.data.length<=0)&&a(R.data[0]);if(A.isStringRef(R)||y.isOuterQuotedString(R)||b.isOuterBracedString(R))throw new Error("Should not do this test on this type");return!1}function l(R){for(var M=m.splitOnPattern(R,B),Z=-1,V=-1,N=-1,k=0;k=0?Z:M.length-1;var E=Z>=0?u(M,Z,V):[],$=u(M,0,N),te=u(M,Math.max(V,N),M.length);return new S($,E,te,[])}function c(R,M){for(var Z=m.splitOnPattern(R,B),V=m.splitOnPattern(M,B),N=-1,k=-1,E=0;E=0?u(Z,0,k):[],te=V,Ce=u(Z,Math.max(k,0));return new S(te,$,Ce,[])}function u(R,M,Z){for(var V=[],N=M;N<(Z===void 0?R.length:Z);N++)V.push(R[N]);return V}function C(R,M,Z){for(var V=m.splitOnPattern(R,B),N=m.splitOnPattern(Z,B),k=m.splitOnPattern(M,B),E=-1,$=-1,te=0;te=0?u(V,0,$):[],le=u(V,Math.max($,0));return new S(N,Ce,le,k)}function d(R){var M=m.splitOnComma(R);switch(M.length){case 1:return l(M[0]);case 2:return c(f(M[0]),f(M[1]));case 3:return C(f(M[0]),f(M[1]),f(M[2]));default:throw new Error("Could not parse author name: partitioned as "+JSON.stringify(M)+" in "+JSON.stringify(R))}}function h(R){return R!==void 0}function f(R){if(h(R))return R;throw new Error("???????")}Object.defineProperty(i,"__esModule",{value:!0});var v=s(0),y=s(1),A=s(5),b=s(2),m=s(3),B=/\s+/g,S=function(){function R(M,Z,V,N){this.firstNames$=M,this.vons$=Z,this.lastNames$=V,this.jrs$=N,this.initials=M.map(r),this.firstNames=M.map(m.toStringBibStringData),this.vons=Z.map(m.toStringBibStringData),this.lastNames=V.map(m.toStringBibStringData),this.jrs=N.map(m.toStringBibStringData),this.id=this.firstNames.join("-")+"-"+this.vons.join("-")+"-"+this.lastNames.join("-")+"-"+this.jrs.join("-")}return R}();i.AuthorName=S,i.parseAuthorName=d;var x=function(){function R(M,Z,V){this.first=M,this.von=Z,this.last=V}return R}();i.Authorrr=x},function(t,i,s){function r(A){return d.parseAuthorName(A)}function o(A){return C.isNumber(A)?a([A]):a(A.data,h.isOuterQuotedString(A))}function a(A,b){var m=v.globContiguousStrings(v.flattenQuotedStrings(A,b)),B=m.map(function(S){return v.isContiguousSimpleString(S)?v.joinContiguousSimpleStrings(S):S});return v.splitOnAnd(B)}function l(A){if(!c(A))throw new Error;return A}function c(A){return C.isArray(A.authors$)&&A.type==="authors"}var u=this&&this.__extends||function(){var A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,m){b.__proto__=m}||function(b,m){for(var B in m)m.hasOwnProperty(B)&&(b[B]=m[B])};return function(b,m){function B(){this.constructor=b}A(b,m),b.prototype=m===null?Object.create(m):(B.prototype=m.prototype,new B)}}();Object.defineProperty(i,"__esModule",{value:!0});var C=s(0),d=s(8),h=s(1),f=s(4),v=s(3),y=function(A){function b(m){var B=this,S=C.isNumber(m)?[m]:m.data;B=A.call(this,"authors",S)||this;var x=o(m);return B.authors$=x.map(function(R){return r(R)}),B}return u(b,A),b}(f.BibOuterStringComponent);i.Authors=y,i.determineAuthorNames$=o,i.mustBeAuthors=l,i.isAuthors=c},function(t,i,s){function r(C){return C.type==="comment"&&a.isArray(C.data)}function o(C){return a.flattenMyArray(C).map(u)}Object.defineProperty(i,"__esModule",{value:!0});var a=s(0),l=function(){function C(d){this.type="comment",this.data=d,this.string=d.join("")}return C.prototype.toString=function(){return this.string},C}();i.BibComment=l;var c=function(){function C(d,h){this.type=d,this.data=h,this.string=h.join("")}return C.prototype.toString=function(){return this.string},C}();i.CommentEntry=c,i.isBibComment=r;var u=function(C){return a.isString(C)?C:typeof C=="number"?C.toString():C.type==="@bib"?"@"+a.mustBeString(C.string):C.type==="escapedEntry"?"\\"+u(C.data):a.mustBeString(C.string)};i.flattenPlainText=o},function(t,i,s){function r(d){var h={};return Object.keys(d).forEach(function(f){h[f]=u.parseFieldValue(d[f])}),h}function o(d){return typeof d.type=="string"&&typeof d._id=="string"&&!!d.fields}function a(d,h){var f={},v=d.fields;return Object.keys(d.fields).forEach(function(y){var A=c.resolveStringReference({},f,h,v[y]);switch(y){case"author":f[y]=new l.Authors(A);break;case"title":f[y]=A;break;case"incollection":default:f[y]=A}}),new C(d.type,d._id,f)}Object.defineProperty(i,"__esModule",{value:!0});var l=s(9),c=s(7),u=s(6),C=function(){function d(h,f,v){this.type=h,this._id=f,this.fields=v,this.sortkey$="",this.title$=""}return d.prototype.getField=function(h){return this.fields[h.toLowerCase()]},d.prototype.getFieldAsString=function(h){var f=this.getField(h);return u.normalizeFieldValue(f)},d.prototype.getAuthors=function(){var h=this.fields.author;return h===void 0?h:l.mustBeAuthors(h)},d}();i.BibEntry=C,i.parseEntryFields=r,i.isBibEntry=o,i.processEntry=a},function(t,i,s){function r(u){return u.type==="preamble"&&!!u.data}function o(u){var C=l.parseBibEntriesAndNonEntries(a.mustBeArray(u.data));return new c(C)}Object.defineProperty(i,"__esModule",{value:!0});var a=s(0),l=s(13),c=function(){function u(C){this.type="preamble",this.data=C,this.string=C.join("")}return u.prototype.toString=function(){return this.string},u}();i.Preamble=c,i.isPreamble=r,i.newPreambleNode=o},function(t,i,s){function r(b){if(!u.isArray(b.data)||b.type!=="NON_ENTRY")throw new Error;return new h.BibComment(h.flattenPlainText(b.data))}function o(b){switch(typeof b){case"object":var m=b.data;if(typeof m["@type"]=="string")return new d.BibEntry(m["@type"],m._id,d.parseEntryFields(m.fields));switch(u.mustBeString(m.type)){case"string":return v.newStringEntry(m);case"preamble":return f.newPreambleNode(m);default:throw new Error("Unexpected entry parsed: "+m.type)}default:throw new Error("Expected object as data for entry")}}function a(b){var m=new l.Parser(c.grammar.ParserRules,c.grammar.ParserStart);m.feed(new y.default(b).readTokens());var B=m.results,S=B[0];return new A(i.parseBibEntriesAndNonEntries(S))}Object.defineProperty(i,"__esModule",{value:!0});var l=s(19),c=s(20),u=s(0),C=s(6),d=s(11),h=s(10),f=s(12),v=s(7),y=s(21),A=function(){function b(m){var B=this;this.content=m,this.comments=m.filter(h.isBibComment).map(function(R){if(h.isBibComment(R))return R;throw new Error}),this.preambles_raw=m.filter(function(R){return f.isPreamble(R)}).map(function(R){if(f.isPreamble(R))return R;throw new Error}),this.preamble$=this.preambles_raw.map(function(R){return R.toString()}).join(` +`);var S={};this.content.forEach(function(R){if(C.isKeyVal(R)){if(S[R.key])throw new Error("String with id "+R.key+" was defined more than once");S[R.key]=R.value}}),this.strings_raw=S,this.strings$=v.resolveStrings(S),this.entries_raw=m.filter(function(R){return d.isBibEntry(R)}).map(function(R){if(d.isBibEntry(R))return R;throw new Error});var x={};this.entries_raw.forEach(function(R){var M=R._id.toLowerCase();if(x[M])throw new Error("Entry with id "+M+" was defined more than once");x[M]=d.processEntry(R,B.strings$)}),this.entries$=x}return b.prototype.getEntry=function(m){return this.entries$[m.toLowerCase()]},b}();i.BibFilePresenter=A,i.parseBibEntriesAndNonEntries=function(b){return b.map(function(m){switch(m.type){case"NON_ENTRY":return r(m);case"ENTRY":return o(m);default:throw new Error("Expected ENTRY or NON_ENTRY")}})},i.parseBibFile=a},function(t,i,s){function r(l,c){return{type:l,string:c}}function o(l){return i.specialChars.hasOwnProperty(l)}function a(l){return i.escapableChars.hasOwnProperty(l)}Object.defineProperty(i,"__esModule",{value:!0}),i.newToken=r,i.specialChars={"@":!0,"(":!0,")":!0,"{":!0,"}":!0,"#":!0,"=":!0,",":!0,"\\":!0,'"':!0},i.isSpecialChar=o,i.escapableChars={"\\":!0,"@":!0,"{":!0,"}":!0},i.isEscapableChar=a},function(t,i,s){function r(l){return{type:"ws",string:l}}function o(l){return typeof l.string=="string"&&l.type===i.WS}function a(l){return i.singleWhitespaces.hasOwnProperty(l)}Object.defineProperty(i,"__esModule",{value:!0}),i.WS="ws",i.newWhitespace=r,i.isWhitespace=o,i.singleWhitespaces={" ":!0," ":!0,"\r":!0,"\n":!0},i.isSingleWhiteSpaceCharacter=a},function(t,i,s){function r(a){return{type:"number",string:a}}function o(a){return i.numericChars.hasOwnProperty(a)}Object.defineProperty(i,"__esModule",{value:!0}),i.newNumber=r,i.numericChars={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0},i.isNum=o},function(t,i,s){function r(o){for(var a in o)i.hasOwnProperty(a)||(i[a]=o[a])}Object.defineProperty(i,"__esModule",{value:!0}),r(s(8)),r(s(9)),r(s(18)),r(s(10)),r(s(11)),r(s(12)),r(s(7)),r(s(3)),r(s(4)),r(s(2)),r(s(1)),r(s(5)),r(s(6)),r(s(13)),r(s(0))},function(t,i,s){function r(u){return i.optionalFields.hasOwnProperty(u)}function o(u){return i.mandatoryFields.hasOwnProperty(u)}function a(u){return o(u)?i.mandatoryFields[u]:[]}function l(u){return r(u)?i.optionalFields[u]:[]}Object.defineProperty(i,"__esModule",{value:!0});var c=s(0);i.address="address",i.author="author",i.booktitle="booktitle",i.chapter="chapter",i.edition="edition",i.editor="editor",i.howpublished="howpublished",i.institution="institution",i.journal="journal",i.month="month",i.note="note",i.number="number",i.organization="organization",i.pages="pages",i.publisher="publisher",i.school="school",i.series="series",i.title="title",i.type="type",i.volume="volume",i.year="year",i.optionalFields={book:[["volume","number"],"series","address","edition","month","note"],booklet:["author","howpublished","address","address","month","year","note"],conference:["editor",["volume","number"],"series","pages","address","month","organization","publisher","note"],inproceedings:["editor",["volume","number"],i.series,"pages","address","month","organization","publisher","note"],inbook:["volume","number","series","type","address","edition","month","note"],incollection:["editor",["volume","number"],"series","type","chapter","pages","address","edition","month","note"],manual:["author","organization","year","address","edition","month","note"],mastersthesis:["type","address","month","note"],misc:[],phdthesis:["type","address","month","note"],proceedings:["editor",["volume","number"],"series","address","month","organization","publisher","note"],techreport:["type","address","number","month","note"],unpublished:["month","year"]},i.mandatoryFields={article:["author","title","year","journal"],book:[["author","editor"],"title","publisher","year"],booklet:["title"],conference:["author","title","booktitle","year"],inproceedings:["author","title","booktitle","year"],inbook:[["author","editor"],"title",["chapter","pages"]],incollection:["author","title","booktitle","publisher","year"],manual:["title"],mastersthesis:["author","title","school","year"],misc:[["author","title","howpublished","year","month","note"]],phdthesis:["author","title","school","year"],proceedings:["year","title"],techreport:["author","title","institution","year"],unpublished:["author","title","note"]},i.hasOptionalFields=r,i.hasMandatoryFields=o,i.getMandatoryFields=a,i.getOptionalFields=l,i.findError=function(u,C){var d=u.fields;if(c.isString(C)){if(!d[C])return new Error("Warning: expected "+u.type+" with id "+u._id+" to have the field: "+C)}else if(c.isArray(C)){var h=C.reduce(function(f,v){if(c.isString(v))return f&&d.hasOwnProperty(v);throw new Error},!0);if(!h)return new Error("Expected "+u.type+" with id "+u._id+" to have one of the following fields: "+C)}}},function(t,i){(function(s,r){typeof t=="object"&&t.exports?t.exports=r():s.nearley=r()})(this,function(){function s(u,C,d){return this.id=++s.highestId,this.name=u,this.symbols=C,this.postprocess=d,this}function r(u,C,d,h){this.rule=u,this.dot=C,this.reference=d,this.data=[],this.wantedBy=h,this.isComplete=this.dot===u.symbols.length}function o(u,C){this.grammar=u,this.index=C,this.states=[],this.wants={},this.scannable=[],this.completed={}}function a(u,C){this.rules=u,this.start=C||this.rules[0].name;var d=this.byName={};this.rules.forEach(function(h){d.hasOwnProperty(h.name)||(d[h.name]=[]),d[h.name].push(h)})}function l(){this.reset("")}function c(u,C,h){if(u instanceof a)var f=u,h=C;else var f=a.fromCompiled(u,C);this.grammar=f,this.options={keepHistory:!1,lexer:f.lexer||new l};for(var v in h||{})this.options[v]=h[v];this.lexer=this.options.lexer,this.lexerState=void 0;var y=new o(f,0);this.table=[y],y.wants[f.start]=[],y.predict(f.start),y.process(),this.current=0}return s.highestId=0,s.prototype.toString=function(u){function C(h){return h.literal?JSON.stringify(h.literal):h.type?"%"+h.type:h.toString()}var d=u===void 0?this.symbols.map(C).join(" "):this.symbols.slice(0,u).map(C).join(" ")+" ● "+this.symbols.slice(u).map(C).join(" ");return this.name+" → "+d},r.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},r.prototype.nextState=function(u){var C=new r(this.rule,this.dot+1,this.reference,this.wantedBy);return C.left=this,C.right=u,C.isComplete&&(C.data=C.build()),C},r.prototype.build=function(){var u=[],C=this;do u.push(C.right.data),C=C.left;while(C.left);return u.reverse(),u},r.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,c.fail))},o.prototype.process=function(u){for(var C=this.states,d=this.wants,h=this.completed,f=0;f=this.str.length)){var d=this.str.charAt(this.pos);return o.isSingleWhiteSpaceCharacter(d)?this.eatWhiteSpace():r.isSpecialChar(d)?this.eatSpecialChars(d):a.isNum(d)?this.eatNumericString(d):this.eatIdString()}},C.prototype.eatIdString=function(){for(var d=[],h=this.pos,f=h;f{switch(n){case"workshop":case"conference":return Gu.normalizeFieldValue(e.getField("booktitle"));case"journal":return Gu.normalizeFieldValue(e.getField("journal"))}},pP=n=>` +@${n.type} { +${Object.entries(n.fields).map(([e,t])=>` ${e} = {${n.getFieldAsString(e)}}`).join(`, +`)} +} +`,fP=(n,e,t)=>{const i=e.getField("author"),s=e.getField("title"),r=e.getField("series");if(i&&s&&r)return{title:Gu.normalizeFieldValue(s),authors:i.authors$.map(o=>o.firstNames.concat(o.vons).concat(o.lastNames).concat(o.jrs).join(" ")),series:Gu.normalizeFieldValue(r).replace(/\s/g,""),venue:AP(t.type,e),id:n,bibtex:pP(e),...t};throw new Error(`cannot read field from entry ${e._id}`)},mP=n=>Object.entries(hP).map(([e,t])=>{const i=n.getEntry(e);if(i)return fP(e,i,t);throw new Error(`cannot find bib entry ${e}`)}),bP=mP(dP);/** + * @remix-run/router v1.6.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Bu(){return Bu=Object.assign?Object.assign.bind():function(n){for(var e=1;e"u")throw new Error(e)}function yP(){return Math.random().toString(36).substr(2,8)}function IS(n,e){return{usr:n.state,key:n.key,idx:e}}function fb(n,e,t,i){return t===void 0&&(t=null),Bu({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof e=="string"?jA(e):e,{state:t,key:e&&e.key||i||yP()})}function gA(n){let{pathname:e="/",search:t="",hash:i=""}=n;return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function jA(n){let e={};if(n){let t=n.indexOf("#");t>=0&&(e.hash=n.substr(t),n=n.substr(0,t));let i=n.indexOf("?");i>=0&&(e.search=n.substr(i),n=n.substr(0,i)),n&&(e.pathname=n)}return e}function GP(n,e,t,i){i===void 0&&(i={});let{window:s=document.defaultView,v5Compat:r=!1}=i,o=s.history,a=tl.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(Bu({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function C(){a=tl.Pop;let y=u(),A=y==null?null:y-c;c=y,l&&l({action:a,location:v.location,delta:A})}function d(y,A){a=tl.Push;let b=fb(v.location,y,A);t&&t(b,y),c=u()+1;let m=IS(b,c),B=v.createHref(b);try{o.pushState(m,"",B)}catch{s.location.assign(B)}r&&l&&l({action:a,location:v.location,delta:1})}function h(y,A){a=tl.Replace;let b=fb(v.location,y,A);t&&t(b,y),c=u();let m=IS(b,c),B=v.createHref(b);o.replaceState(m,"",B),r&&l&&l({action:a,location:v.location,delta:0})}function f(y){let A=s.location.origin!=="null"?s.location.origin:s.location.href,b=typeof y=="string"?y:gA(y);return cr(A,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,A)}let v={get action(){return a},get location(){return n(s,o)},listen(y){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(cS,C),l=y,()=>{s.removeEventListener(cS,C),l=null}},createHref(y){return e(s,y)},createURL:f,encodeLocation(y){let A=f(y);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:d,replace:h,go(y){return o.go(y)}};return v}var uS;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(uS||(uS={}));function YV(n,e){if(e==="/")return n;if(!n.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,i=n.charAt(t);return i&&i!=="/"?null:n.slice(t)||"/"}function BP(n,e){e===void 0&&(e="/");let{pathname:t,search:i="",hash:s=""}=typeof n=="string"?jA(n):n;return{pathname:t?t.startsWith("/")?t:ZP(t,e):e,search:wP(i),hash:SP(s)}}function ZP(n,e){let t=e.replace(/\/+$/,"").split("/");return n.split("/").forEach(s=>{s===".."?t.length>1&&t.pop():s!=="."&&t.push(s)}),t.length>1?t.join("/"):"/"}function Rm(n,e,t,i){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+t+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function FV(n){return n.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function KV(n,e,t,i){i===void 0&&(i=!1);let s;typeof n=="string"?s=jA(n):(s=Bu({},n),cr(!s.pathname||!s.pathname.includes("?"),Rm("?","pathname","search",s)),cr(!s.pathname||!s.pathname.includes("#"),Rm("#","pathname","hash",s)),cr(!s.search||!s.search.includes("#"),Rm("#","search","hash",s)));let r=n===""||s.pathname==="",o=r?"/":s.pathname,a;if(i||o==null)a=t;else{let C=e.length-1;if(o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),C-=1;s.pathname=d.join("/")}a=C>=0?e[C]:"/"}let l=BP(s,a),c=o&&o!=="/"&&o.endsWith("/"),u=(r||o===".")&&t.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const zV=n=>n.join("/").replace(/\/\/+/g,"/"),wP=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,SP=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,LV=["post","put","patch","delete"];new Set(LV);const xP=["get",...LV];new Set(xP);/** + * React Router v6.11.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function mb(){return mb=Object.assign?Object.assign.bind():function(n){for(var e=1;el.pathnameBase)),o=D.useRef(!1);return EV(()=>{o.current=!0}),D.useCallback(function(l,c){if(c===void 0&&(c={}),!o.current)return;if(typeof l=="number"){t.go(l);return}let u=KV(l,JSON.parse(r),s,c.relative==="path");n==null&&e!=="/"&&(u.pathname=u.pathname==="/"?e:zV([e,u.pathname])),(c.replace?t.replace:t.push)(u,c.state,c)},[e,t,r,s,n])}function my(n,e){let{relative:t}=e===void 0?{}:e,{matches:i}=D.useContext(qA),{pathname:s}=ep(),r=JSON.stringify(FV(i).map(o=>o.pathnameBase));return D.useMemo(()=>KV(n,JSON.parse(r),s,t==="path"),[n,r,s,t])}var bb;(function(n){n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate"})(bb||(bb={}));var vb;(function(n){n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId"})(vb||(vb={}));function NP(n){let e=D.useContext(TV);return e||cr(!1),e}function HP(n){let e=D.useContext(qA);return e||cr(!1),e}function XP(n){let e=HP(),t=e.matches[e.matches.length-1];return t.route.id||cr(!1),t.route.id}function YP(){let{router:n}=NP(bb.UseNavigateStable),e=XP(vb.UseNavigateStable),t=D.useRef(!1);return EV(()=>{t.current=!0}),D.useCallback(function(s,r){r===void 0&&(r={}),t.current&&(typeof s=="number"?n.navigate(s):n.navigate(s,mb({fromRouteId:e},r)))},[n,e])}function FP(n){let{basename:e="/",children:t=null,location:i,navigationType:s=tl.Pop,navigator:r,static:o=!1}=n;$A()&&cr(!1);let a=e.replace(/^\/*/,"/"),l=D.useMemo(()=>({basename:a,navigator:r,static:o}),[a,r,o]);typeof i=="string"&&(i=jA(i));let{pathname:c="/",search:u="",hash:C="",state:d=null,key:h="default"}=i,f=D.useMemo(()=>{let v=YV(c,a);return v==null?null:{location:{pathname:v,search:u,hash:C,state:d,key:h},navigationType:s}},[a,c,u,C,d,h,s]);return f==null?null:D.createElement(pc.Provider,{value:l},D.createElement(fy.Provider,{children:t,value:f}))}var CS;(function(n){n[n.pending=0]="pending",n[n.success=1]="success",n[n.error=2]="error"})(CS||(CS={}));new Promise(()=>{});/** + * React Router DOM v6.11.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function cA(){return cA=Object.assign?Object.assign.bind():function(n){for(var e=1;e=0)&&(t[s]=n[s]);return t}function KP(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function zP(n,e){return n.button===0&&(!e||e==="_self")&&!KP(n)}const LP=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],TP=["aria-current","caseSensitive","className","end","style","to","children"];function EP(n){let{basename:e,children:t,window:i}=n,s=D.useRef();s.current==null&&(s.current=vP({window:i,v5Compat:!0}));let r=s.current,[o,a]=D.useState({action:r.action,location:r.location});return D.useLayoutEffect(()=>r.listen(a),[r]),D.createElement(FP,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:r})}const kP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",DP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,DV=D.forwardRef(function(e,t){let{onClick:i,relative:s,reloadDocument:r,replace:o,state:a,target:l,to:c,preventScrollReset:u}=e,C=kV(e,LP),{basename:d}=D.useContext(pc),h,f=!1;if(typeof c=="string"&&DP.test(c)&&(h=c,kP))try{let b=new URL(window.location.href),m=c.startsWith("//")?new URL(b.protocol+c):new URL(c),B=YV(m.pathname,d);m.origin===b.origin&&B!=null?c=B+m.search+m.hash:f=!0}catch{}let v=WP(c,{relative:s}),y=UP(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:s});function A(b){i&&i(b),b.defaultPrevented||y(b)}return D.createElement("a",cA({},C,{href:h||v,onClick:f||r?i:A,ref:t,target:l}))}),UV=D.forwardRef(function(e,t){let{"aria-current":i="page",caseSensitive:s=!1,className:r="",end:o=!1,style:a,to:l,children:c}=e,u=kV(e,TP),C=my(l,{relative:u.relative}),d=ep(),h=D.useContext(RP),{navigator:f}=D.useContext(pc),v=f.encodeLocation?f.encodeLocation(C).pathname:C.pathname,y=d.pathname,A=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;s||(y=y.toLowerCase(),A=A?A.toLowerCase():null,v=v.toLowerCase());let b=y===v||!o&&y.startsWith(v)&&y.charAt(v.length)==="/",m=A!=null&&(A===v||!o&&A.startsWith(v)&&A.charAt(v.length)==="/"),B=b?i:void 0,S;typeof r=="function"?S=r({isActive:b,isPending:m}):S=[r,b?"active":null,m?"pending":null].filter(Boolean).join(" ");let x=typeof a=="function"?a({isActive:b,isPending:m}):a;return D.createElement(DV,cA({},u,{"aria-current":B,className:S,ref:t,style:x,to:l}),typeof c=="function"?c({isActive:b,isPending:m}):c)});var dS;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmitImpl="useSubmitImpl",n.UseFetcher="useFetcher"})(dS||(dS={}));var hS;(function(n){n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(hS||(hS={}));function UP(n,e){let{target:t,replace:i,state:s,preventScrollReset:r,relative:o}=e===void 0?{}:e,a=VP(),l=ep(),c=my(n,{relative:o});return D.useCallback(u=>{if(zP(u,t)){u.preventDefault();let C=i!==void 0?i:gA(l)===gA(c);a(n,{replace:C,state:s,preventScrollReset:r,relative:o})}},[l,a,c,i,s,t,n,r,o])}/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var yb=function(){return yb=Object.assign||function(e){for(var t,i=1,s=arguments.length;ij.jsx("a",{className:"underline decoration-primary/50 dark:decoration-primary/70 decoration-2 cursor-pointer hover:decoration-primary hover:decoration-3 ease-in-out duration-100",href:n,children:e}),OP=[{time:new Date("2024-01-02"),msg:"New year, new round of rewriting this site. Used Tailwind this time and we have dark mode now!"},{time:new Date("2023-12-08"),msg:j.jsxs(j.Fragment,{children:["Invited to attend an"," ",j.jsx(ki,{href:"https://aimath.org/pastworkshops/cyberinfrastructure.html",children:"AIM workshop"})," ","on"," ",j.jsx(ki,{href:"https://code4math.org/",children:"Digital Ecosystems for Mathematics"})," ","and started ",j.jsx(ki,{href:"https://mathdiagrams.com",children:"mathdiagrams.com"}),"!"]})},{time:new Date("2023-07-14"),msg:j.jsxs(j.Fragment,{children:["Released ",j.jsx(ki,{href:"https://penrose.cs.cmu.edu/blog/v3",children:"Penrose 3.0"}),"!"]})},{time:new Date("2023-06-01"),msg:j.jsxs(j.Fragment,{children:[j.jsx(ki,{href:"https://www.cmu.edu/scs/s3d/reuse/",children:"REUSE"})," students"," ",j.jsx(ki,{href:"https://www.linkedin.com/in/rijul-jain-585a62191",children:"Rijul Jain"})," ","and ",j.jsx(ki,{href:"https://ravenrothkopf.github.io/",children:"Raven Rothkopf"})," joined Penrose this summer. Welcome!"]})},{time:new Date("2022-08-30"),msg:"Spent the summer as an intern in Machine Intelligence at Apple. Stay tuned for more updates on our work!"},{time:new Date("2022-04-30"),msg:j.jsxs(j.Fragment,{children:["I"," ",j.jsx(ki,{href:new URL("/pr-preview/pr-21/assets/thesis-proposal-talk.pdf",self.location).href,children:"proposed"})," ","my dissertation. Officially a PhD candidate now!"]})},{time:new Date("2021-07-01"),msg:j.jsxs(j.Fragment,{children:["My work at Microsoft,"," ",j.jsx("i",{children:'"reCode: A Lightweight Find-and-Replace Interaction in the IDE for Transforming Code by Example,"'})," ","was conditionally accepted by"," ",j.jsx(ki,{href:"https://uist.acm.org/uist2021/",children:"UIST 2021"}),"!"]})}];var JV={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},fS=Ji.createContext&&Ji.createContext(JV),ia=globalThis&&globalThis.__assign||function(){return ia=Object.assign||function(n){for(var e,t=1,i=arguments.length;tj.jsx("a",{href:t,children:j.jsxs("div",{className:`rounded shadow-md hover:shadow-xl w-full h-36 lg:h-48 bg-white dark:shadow-none dark:bg-zinc-700 dark:rounded-lg dark:border-primary bg-contain bg-left-top dark:drop-shadow-none dark:hover:drop-shadow-none dark:transition-none transition-all ease-in-out duration-100 dark:hover:shadow-md dark:hover:scale-105 overflow-hidden scale-100 + `,children:[j.jsxs("svg",{className:"absolute z-[-50]",width:"100%",viewBox:"0 0 100 100",children:[j.jsxs("defs",{children:[j.jsx("filter",{id:"grayscale-filter",children:j.jsx("feColorMatrix",{type:"saturate",values:"0"})}),j.jsxs("filter",{id:"color-tint-filter",children:[j.jsx("feColorMatrix",{type:"matrix",values:"0.7725 0 0 0 0 0 0.3490 0 0 0 0 0 0.9569 0 0 0 0 0 1 0"}),j.jsxs("feComponentTransfer",{children:[j.jsx("feFuncR",{type:"table",tableValues:"0 0.7725"}),j.jsx("feFuncG",{type:"table",tableValues:"0 0.3490"}),j.jsx("feFuncB",{type:"table",tableValues:"0 0.9569"})]})]}),j.jsxs("linearGradient",{id:"gradient-overlay",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[j.jsx("stop",{offset:"0%",style:{stopColor:s?"#333":"#fff",stopOpacity:.3}}),j.jsx("stop",{offset:"50%",style:{stopColor:s?"#111":"#fff",stopOpacity:s?.35:.7}}),j.jsx("stop",{offset:"100%",style:{stopColor:s?"#333":"#fff",stopOpacity:.95}})]})]}),j.jsx("image",{href:i,x:50,y:-8,width:80,filter:s?"url(#grayscale-filter) ":""}),j.jsx("rect",{width:"100",height:"100",style:{fill:"url(#gradient-overlay)"}})]}),j.jsx("div",{className:"text-3xl -font-medium w-7/10 px-6 pt-4 lg:py-6 text-primary/70 dark:text-primary",children:n}),j.jsx("div",{className:"text-lg font-extralight w-7/10 px-6 py-4 lg:py-6",children:e})]})}),a_={colors:{primary:"#C559F4"}},l_=()=>{const[n,e]=D.useState(!1),t=D.useRef(null);return D.useEffect(()=>{const i=()=>{if(t.current!==null){const s=t.current.scrollTop===0;e(!s)}};if(t.current!==null){const s=t.current;return s.addEventListener("scroll",i),()=>{s.removeEventListener("scroll",i)}}},[]),j.jsxs("div",{className:"my-2 relative",children:[n&&j.jsx("div",{className:"invisible md:visible absolute top-0 left-0 right-0 h-10 bg-gradient-to-b from-white dark:from-zinc-800 to-transparent"}),j.jsx("div",{ref:t,className:"md:overflow-auto max-h-[50vh] scrollbar-hide",children:OP.map(({time:i,msg:s},r)=>j.jsxs("div",{className:"py-2 text-gray-500 md:text-sm dark:text-neutral-300 ",children:[j.jsx("div",{className:"w-fit bg-gray-100 text-gray-400 rounded py-px px-1 dark:text-neutral-400 dark:bg-zinc-700",children:i.toLocaleString("default",{month:"long",year:"numeric"})}),s]},`news-${r}`))}),j.jsx("div",{className:"invisible md:visible absolute bottom-0 left-0 right-0 h-12 bg-gradient-to-t from-white dark:from-zinc-800 to-transparent"})]})},g_=({data:n,children:e})=>{const[t,i]=D.useState(!1),s=()=>{navigator.clipboard.writeText(n),i(!0),setTimeout(()=>{i(!1)},5e3)};return j.jsxs("div",{children:[j.jsx("span",{className:"underline decoration-primary/50 dark:decoration-primary/70 decoration-2 cursor-pointer hover:decoration-primary hover:decoration-3 ease-in-out duration-100",onClick:s,children:e}),t&&j.jsx("span",{children:" (Copied to clipboard)"})]})},c_=()=>j.jsx("div",{children:bP.map(({pdf:n,title:e,venue:t,authors:i,talk:s,coauthors:r,series:o,slides:a,id:l,bibtex:c})=>j.jsxs("div",{className:"my-4",children:[j.jsx("a",{href:n,children:j.jsx("span",{className:"text-lg font-semibold dark:font-normal cursor-pointer",children:e})}),j.jsx("br",{}),j.jsx("span",{className:"text-base font-light",children:i.map(u=>r?.includes(u)?`${u}*`:u).map(u=>u==="Wode Ni"||u==="Wode Ni*"?j.jsx("strong",{children:u}):u).map((u,C)=>j.jsxs("span",{children:[j.jsx("li",{className:"inline",children:u}),C!==i.length-1&&j.jsx("span",{children:", "})]},`${l}-author-${C}`))}),"."," ",j.jsx("span",{className:"text-base font-light italic",children:o}),".",j.jsxs("div",{className:"flex gap-2",children:[j.jsxs("div",{className:"flex items-center gap-0.5",children:[j.jsx(o_,{}),j.jsx(g_,{data:c,children:"bib"})]}),n&&j.jsxs("div",{className:"flex items-center gap-0.5",children:[j.jsx(i_,{}),j.jsx(ki,{href:n,children:"pdf"})]}),s&&j.jsxs("div",{className:"flex items-center gap-0.5",children:[j.jsx(s_,{}),j.jsx(ki,{href:s,children:"talk"})]}),a&&j.jsxs("div",{className:"flex items-center gap-0.5",children:[j.jsx(r_,{}),j.jsx(ki,{href:a,children:"slides"})]})]})]},l))}),I_=({className:n})=>j.jsx("div",{className:n,children:j.jsxs("div",{className:"flex h-44",children:[j.jsx("div",{className:"w-48 h-48",children:j.jsx(uP,{color:a_.colors.primary})}),j.jsx(d3,{className:"w-44 ml-4 mt-8"})]})}),u_=({toggleDark:n})=>j.jsx(QV,{onClick:n,children:j.jsx($P,{className:"fill-icon dark:fill-icon-dark"})}),C_=({className:n,toggleDark:e})=>j.jsxs("div",{className:`${n} flex items-start md:items-top md:ml-auto mb-0 color-primary`,children:[j.jsx(p_,{}),j.jsx(h_,{}),j.jsx(A_,{}),j.jsx(f_,{}),j.jsx(d_,{}),j.jsx(u_,{toggleDark:e})]}),QV=({children:n,...e})=>j.jsx("div",{className:"mx-1 w-6 h-6 text-xl flex cursor-pointer justify-center hover:opacity-50 ease-in-out duration-200",...e,children:n}),Ju=({url:n,icon:e})=>j.jsx(QV,{children:j.jsx("a",{href:n,children:e})}),d_=()=>j.jsx(Ju,{url:"https://goo.gl/maps/Zp92ofs6ze3y8hc19",icon:j.jsx(e_,{className:"fill-icon dark:fill-icon-dark "})}),h_=()=>j.jsx(Ju,{url:"https://twitter.com/wodenimoni",icon:j.jsx(n_,{className:"fill-icon dark:fill-icon-dark"})}),A_=()=>j.jsx(Ju,{url:"https://github.com/wodeni",icon:j.jsx(t_,{className:"fill-icon dark:fill-icon-dark"})}),p_=()=>j.jsx(Ju,{url:"http://wodenimoni.com/nimo-markdown-cv/",icon:j.jsx("span",{className:"font-extralight leading-5 text-icon top-[-4px] left-[-3px] relative",children:"CV"})}),f_=()=>j.jsx(Ju,{url:"mailto:nimo@cmu.edu",icon:j.jsx(qP,{className:"fill-icon dark:fill-icon-dark grow"})}),lh=({className:n,children:e})=>j.jsx("p",{className:`${n} font-sans font-extralight text-lg my-2 dark:text-neutral-100`,children:e}),gh=({header:n,children:e})=>{const t=n.toLowerCase();return j.jsxs("div",{id:t,className:"my-4 md:my-8",children:[j.jsxs("span",{className:"group font-bold text-3xl tracking-tight curosr-pointer relative ",children:[j.jsxs("svg",{height:30,className:"w-full translate-y-1 absolute top-0 left-0",children:[j.jsx("rect",{x:0,y:0,width:5,height:50,className:"group-hover:opacity-30 group-hover:scale-x-400 transition-transform transform fill-primary"}),j.jsx("rect",{x:0,y:0,width:5,height:50,className:"fill-primary"})]}),j.jsx(JP,{className:"ml-[10px] w-full dark:text-neutral-100",smooth:!0,to:`/#${t}`,children:n})]}),e]})},m_=()=>{const[n,e]=D.useState(window.matchMedia("(prefers-color-scheme: dark)").matches),t=()=>{e(!n)};function i(){window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?e(!0):e(!1)}return D.useEffect(()=>{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",i)}),D.useEffect(()=>{document.documentElement.classList.toggle("dark",n)},[n]),j.jsxs("div",{className:"font-sans md:grid md:grid-cols-3 p-4 md:p-10 max-w-screen-xl dark:text-neutral-100",children:[j.jsx(I_,{className:"md:col-span-2"}),j.jsx(C_,{className:"mt-8",toggleDark:t}),j.jsx(lh,{className:"md:col-span-2 mt-8",children:"I'm Nimo. I build ergonomic digital tools to make difficult things feel simple."}),j.jsxs("div",{className:"max-w-screen-md md:col-span-2",children:[j.jsxs(gh,{header:"Research",children:[j.jsxs(lh,{className:"",children:["I am a Ph.D. candidate at Carnegie Mellon University, School of Computer Science, advised by"," ",j.jsx(ki,{href:"http://pact.cs.cmu.edu/koedinger.html",children:"Ken Koedinger"})," ","and ",j.jsx(ki,{href:"https://www.cs.cmu.edu/~jssunshi/",children:"Josh Sunshine"}),"."]}),j.jsx(c_,{})]}),j.jsx(gh,{header:"Tools",children:j.jsxs("div",{className:"grid lg:grid-cols-2 gap-2 md:gap-4 lg:gap-8 my-4",children:[j.jsx(Wm,{name:"Penrose",desc:"Create beautiful diagrams just by typing math notation in plain text.",link:"https://penrose.cs.cmu.edu/",logo:h3,dark:n}),j.jsx(Wm,{name:"Edgeworth",desc:"Diagrammatic problem generation by program mutation.",link:"https://penrose.github.io/penrose/edgeworth/develop/",logo:A3,dark:n}),j.jsx(Wm,{name:"Math Diagrams",desc:"A growing collection of open-source math visualizations.",link:"https://mathdiagrams.com/",dark:n,logo:p3})]})}),j.jsxs(gh,{header:"About",children:[j.jsx(lh,{children:'My name is 倪沃德 (ní wò dé) in Chinese. “Nimo” has been my alias since my street dancing days. If you find "Wo-de" hard to pronounce, default to “Nimo”.'}),j.jsx(lh,{children:"I am an avid pool player. I play in local leagues and national tournaments."})]})]}),j.jsx("div",{className:"md:ml-10 md:max-w-60",children:j.jsx(gh,{header:"News",children:j.jsx(l_,{})})})]})};Vm.createRoot(document.getElementById("root")).render(j.jsx(Ji.StrictMode,{children:j.jsx(EP,{children:j.jsx(m_,{})})})); diff --git a/pr-preview/pr-21/assets/index.css b/pr-preview/pr-21/assets/index.css new file mode 100644 index 0000000..3e275af --- /dev/null +++ b/pr-preview/pr-21/assets/index.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Open+Sans";*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.invisible{visibility:hidden}.absolute{position:absolute}.relative{position:relative}.bottom-0{bottom:0}.left-0{left:0}.left-\[-3px\]{left:-3px}.right-0{right:0}.top-0{top:0}.top-\[-4px\]{top:-4px}.z-\[-50\]{z-index:-50}.mx-1{margin-left:.25rem;margin-right:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.mb-0{margin-bottom:0}.ml-4{margin-left:1rem}.ml-\[10px\]{margin-left:10px}.mt-8{margin-top:2rem}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.h-10{height:2.5rem}.h-12{height:3rem}.h-36{height:9rem}.h-44{height:11rem}.h-48{height:12rem}.h-6{height:1.5rem}.max-h-\[50vh\]{max-height:50vh}.w-44{width:11rem}.w-48{width:12rem}.w-6{width:1.5rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.max-w-screen-md{max-width:768px}.max-w-screen-xl{max-width:1280px}.grow{flex-grow:1}.translate-y-1{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-2{gap:.5rem}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-white{--tw-gradient-from: #fff var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.bg-contain{background-size:contain}.bg-left-top{background-position:left top}.fill-icon{fill:#999}.fill-icontext{fill:#1e1e1e}.fill-primary{fill:#c559f4}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-px{padding-top:1px;padding-bottom:1px}.pt-4{padding-top:1rem}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.font-extralight{font-weight:200}.font-light{font-weight:300}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-5{line-height:1.25rem}.tracking-tight{letter-spacing:-.025em}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-icon{--tw-text-opacity: 1;color:rgb(153 153 153 / var(--tw-text-opacity))}.text-primary\/70{color:#c559f4b3}.underline{text-decoration-line:underline}.decoration-primary\/50{text-decoration-color:#c559f480}.decoration-2{text-decoration-thickness:2px}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.scrollbar-hide::-webkit-scrollbar{display:none}.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}.hover\:decoration-primary:hover{text-decoration-color:#c559f4}.hover\:opacity-50:hover{opacity:.5}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group:hover .group-hover\:scale-x-400{--tw-scale-x: 40;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:opacity-30{opacity:.3}@media (min-width: 768px){.md\:visible{visibility:visible}.md\:col-span-2{grid-column:span 2 / span 2}.md\:my-8{margin-top:2rem;margin-bottom:2rem}.md\:ml-10{margin-left:2.5rem}.md\:ml-auto{margin-left:auto}.md\:grid{display:grid}.md\:max-w-60{max-width:15rem}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:gap-4{gap:1rem}.md\:overflow-auto{overflow:auto}.md\:p-10{padding:2.5rem}.md\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\:h-48{height:12rem}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:gap-8{gap:2rem}.lg\:py-6{padding-top:1.5rem;padding-bottom:1.5rem}}:is(:where(.dark) .dark\:rounded-lg){border-radius:.5rem}:is(:where(.dark) .dark\:border-primary){--tw-border-opacity: 1;border-color:rgb(197 89 244 / var(--tw-border-opacity))}:is(:where(.dark) .dark\:bg-zinc-700){--tw-bg-opacity: 1;background-color:rgb(63 63 70 / var(--tw-bg-opacity))}:is(:where(.dark) .dark\:bg-zinc-800){--tw-bg-opacity: 1;background-color:rgb(39 39 42 / var(--tw-bg-opacity))}:is(:where(.dark) .dark\:from-zinc-800){--tw-gradient-from: #27272a var(--tw-gradient-from-position);--tw-gradient-to: rgb(39 39 42 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(:where(.dark) .dark\:fill-icon-dark){fill:#bbb}:is(:where(.dark) .dark\:fill-icontext-dark){fill:#fff}:is(:where(.dark) .dark\:font-normal){font-weight:400}:is(:where(.dark) .dark\:text-neutral-100){--tw-text-opacity: 1;color:rgb(245 245 245 / var(--tw-text-opacity))}:is(:where(.dark) .dark\:text-neutral-300){--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity))}:is(:where(.dark) .dark\:text-neutral-400){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}:is(:where(.dark) .dark\:text-primary){--tw-text-opacity: 1;color:rgb(197 89 244 / var(--tw-text-opacity))}:is(:where(.dark) .dark\:decoration-primary\/70){text-decoration-color:#c559f4b3}:is(:where(.dark) .dark\:shadow-none){--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:is(:where(.dark) .dark\:drop-shadow-none){--tw-drop-shadow: drop-shadow(0 0 #0000);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(:where(.dark) .dark\:transition-none){transition-property:none}:is(:where(.dark) .dark\:hover\:scale-105:hover){--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:is(:where(.dark) .dark\:hover\:shadow-md:hover){--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:is(:where(.dark) .dark\:hover\:drop-shadow-none:hover){--tw-drop-shadow: drop-shadow(0 0 #0000);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)} diff --git a/pr-preview/pr-21/assets/mathdiagrams.webp b/pr-preview/pr-21/assets/mathdiagrams.webp new file mode 100644 index 0000000..9cb3fab Binary files /dev/null and b/pr-preview/pr-21/assets/mathdiagrams.webp differ diff --git a/pr-preview/pr-21/assets/penrose.svg b/pr-preview/pr-21/assets/penrose.svg new file mode 100644 index 0000000..d2c62e2 --- /dev/null +++ b/pr-preview/pr-21/assets/penrose.svg @@ -0,0 +1,4 @@ + + + + diff --git a/pr-preview/pr-21/assets/splash-23-llm-diagrams.pdf b/pr-preview/pr-21/assets/splash-23-llm-diagrams.pdf new file mode 100644 index 0000000..eaedebd Binary files /dev/null and b/pr-preview/pr-21/assets/splash-23-llm-diagrams.pdf differ diff --git a/pr-preview/pr-21/assets/thesis-proposal-talk.pdf b/pr-preview/pr-21/assets/thesis-proposal-talk.pdf new file mode 100644 index 0000000..80f7b28 Binary files /dev/null and b/pr-preview/pr-21/assets/thesis-proposal-talk.pdf differ diff --git a/pr-preview/pr-21/assets/uist-21-recode.pdf b/pr-preview/pr-21/assets/uist-21-recode.pdf new file mode 100644 index 0000000..d2bdd9e Binary files /dev/null and b/pr-preview/pr-21/assets/uist-21-recode.pdf differ diff --git a/pr-preview/pr-21/bibliography.bib b/pr-preview/pr-21/bibliography.bib new file mode 100644 index 0000000..1d38eb9 --- /dev/null +++ b/pr-preview/pr-21/bibliography.bib @@ -0,0 +1,92 @@ +@inproceedings{recode-ni-2021, + author = {Ni, Wode and Sunshine, Joshua and Le, Vu and Gulwani, Sumit and Barik, Titus}, + title = {reCode: A Lightweight Find-and-Replace Interaction in the IDE for Transforming Code by Example}, + year = {2021}, + isbn = {9781450386357}, + publisher = {Association for Computing Machinery}, + address = {New York, NY, USA}, + url = {https://doi.org/10.1145/3472749.3474748}, + doi = {10.1145/3472749.3474748}, + booktitle = {The 34th Annual ACM Symposium on User Interface Software and Technology}, + pages = {258–269}, + numpages = {12}, + keywords = {code transformation, program synthesis, find-and-replace}, + location = {Virtual Event, USA}, + series = {UIST'21} +} + +@article{penrose-2020, + author = {Ye, Katherine and Ni, Wode and Krieger, Max and Ma'ayan, Dor and Wise, Jenna and Aldrich, Jonathan and Sunshine, Joshua and Crane, Keenan}, + title = {Penrose: From Mathematical Notation to Beautiful Diagrams}, + year = {2020}, + issue_date = {August 2020}, + publisher = {Association for Computing Machinery}, + address = {New York, NY, USA}, + volume = {39}, + number = {4}, + issn = {0730-0301}, + url = {https://doi.org/10.1145/3386569.3392375}, + doi = {10.1145/3386569.3392375}, + journal = {ACM Transactions on Graphics}, + month = {aug}, + articleno = {144}, + numpages = {16}, + series = {SIGGRAPH'20} +} + +@inproceedings{diagramming-2020, + author = {Ma'ayan, Dor and Ni, Wode and Ye, Katherine and Kulkarni, Chinmay and Sunshine, Joshua}, + title = {How Domain Experts Create Conceptual Diagrams and Implications for Tool Design}, + year = {2020}, + isbn = {9781450367080}, + publisher = {Association for Computing Machinery}, + address = {New York, NY, USA}, + url = {https://doi.org/10.1145/3313831.3376253}, + doi = {10.1145/3313831.3376253}, + booktitle = {Proceedings of the 2020 CHI Conference on Human Factors in Computing Systems}, + pages = {1–14}, + numpages = {14}, + location = {Honolulu, HI, USA}, + series = {CHI'20} +} + +@inproceedings{substy-2017, + title = {Substance and Style: domain-specific languages for mathematical diagrams}, + author = {Ni, Wode and Ye, Katherine and Sunshine, Joshua and Aldrich, Jonathan and Crane, Keenan}, + booktitle = {Domain-Specific Language Design and Implementation}, + year = {2017}, + series = {DSLDI'17} +} + +@inproceedings{tutorial-2019, + author = {Anael Kuperwajs Cohen and Wode Ni and Joshua Sunshine}, + title = {{Designing Declarative Language Tutorials: A Guided and Individualized Approach}}, + booktitle = {10th Workshop on Evaluation and Usability of Programming Languages and Tools}, + series = {PLATEAU'19}, + year = {2019} +} + +@inproceedings{narrative-2019, + title = {Defining Visual Narratives for Mathematics Declaratively}, + author = {Krieger, Max and Ni, Wode and Sunshine, Joshua}, + title = {{Designing Declarative Language Tutorials: A Guided and Individualized Approach}}, + booktitle = {10th Workshop on Evaluation and Usability of Programming Languages and Tools}, + series = {PLATEAU'19}, + year = {2019} +} + +@inproceedings{penrosellm-2023, + author = {Jain, Rijul and Ni, Wode and Sunshine, Joshua}, + title = {Generating Domain-Specific Programs for Diagram Authoring with Large Language Models}, + year = {2023}, + isbn = {9798400703843}, + publisher = {Association for Computing Machinery}, + address = {New York, NY, USA}, + url = {https://doi.org/10.1145/3618305.3623612}, + doi = {10.1145/3618305.3623612}, + booktitle = {Companion Proceedings of the 2023 ACM SIGPLAN International Conference on Systems, Programming, Languages, and Applications: Software for Humanity}, + pages = {70--71}, + numpages = {2}, + location = {Cascais, Portugal}, + series = {SPLASH'23} +} \ No newline at end of file diff --git a/pr-preview/pr-21/favicon-128x128.png b/pr-preview/pr-21/favicon-128x128.png new file mode 100644 index 0000000..3dc379a Binary files /dev/null and b/pr-preview/pr-21/favicon-128x128.png differ diff --git a/pr-preview/pr-21/favicon-16x16.png b/pr-preview/pr-21/favicon-16x16.png new file mode 100644 index 0000000..fbcdcb1 Binary files /dev/null and b/pr-preview/pr-21/favicon-16x16.png differ diff --git a/pr-preview/pr-21/favicon-196x196.png b/pr-preview/pr-21/favicon-196x196.png new file mode 100644 index 0000000..3a3fcab Binary files /dev/null and b/pr-preview/pr-21/favicon-196x196.png differ diff --git a/pr-preview/pr-21/favicon-32x32.png b/pr-preview/pr-21/favicon-32x32.png new file mode 100644 index 0000000..827fc7f Binary files /dev/null and b/pr-preview/pr-21/favicon-32x32.png differ diff --git a/pr-preview/pr-21/favicon-96x96.png b/pr-preview/pr-21/favicon-96x96.png new file mode 100644 index 0000000..f32d16c Binary files /dev/null and b/pr-preview/pr-21/favicon-96x96.png differ diff --git a/pr-preview/pr-21/index.html b/pr-preview/pr-21/index.html new file mode 100644 index 0000000..281e9e8 --- /dev/null +++ b/pr-preview/pr-21/index.html @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + Wode "Nimo" Ni + + + + + +
+ + + + diff --git a/pr-preview/pr-21/mstile-144x144.png b/pr-preview/pr-21/mstile-144x144.png new file mode 100644 index 0000000..f4b85a6 Binary files /dev/null and b/pr-preview/pr-21/mstile-144x144.png differ diff --git a/pr-preview/pr-21/mstile-150x150.png b/pr-preview/pr-21/mstile-150x150.png new file mode 100644 index 0000000..3eaa06d Binary files /dev/null and b/pr-preview/pr-21/mstile-150x150.png differ diff --git a/pr-preview/pr-21/mstile-310x150.png b/pr-preview/pr-21/mstile-310x150.png new file mode 100644 index 0000000..e1aadba Binary files /dev/null and b/pr-preview/pr-21/mstile-310x150.png differ diff --git a/pr-preview/pr-21/mstile-310x310.png b/pr-preview/pr-21/mstile-310x310.png new file mode 100644 index 0000000..dec540d Binary files /dev/null and b/pr-preview/pr-21/mstile-310x310.png differ diff --git a/pr-preview/pr-21/mstile-70x70.png b/pr-preview/pr-21/mstile-70x70.png new file mode 100644 index 0000000..a44e108 Binary files /dev/null and b/pr-preview/pr-21/mstile-70x70.png differ