vendor: 10,065 bytes, lines 1-27
1var ew=Object.defineProperty;var tw=(a,e,t)=>e in a?ew(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var ki=(a,e,t)=>tw(a,typeof e!="symbol"?e+"":e,t);import{r as qA,a as nw,g as q1,R as K1,b as vt}from"./vendor-react-SiBwh7Rq.js";var ux={exports:{}},nm={};/** 2 * @license React 3 * react-jsx-runtime.production.js 4 * 5 * Copyright (c) Meta Platforms, Inc. and affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var kb;function iw(){if(kb)return nm;kb=1;var a=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,s,o){var u=null;if(o!==void 0&&(u=""+o),s.key!==void 0&&(u=""+s.key),"key"in s){o={};for(var h in s)h!=="key"&&(o[h]=s[h])}else o=s;return s=o.ref,{$$typeof:a,type:n,key:u,ref:s!==void 0?s:null,props:o}}return nm.Fragment=e,nm.jsx=t,nm.jsxs=t,nm}var Vb;function sw(){return Vb||(Vb=1,ux.exports=iw()),ux.exports}var Hs=sw(),fx={exports:{}},im={},hx={exports:{}},dx={};/** 10 * @license React 11 * scheduler.production.js 12 * 13 * Copyright (c) Meta Platforms, Inc. and affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var Xb;function rw(){return Xb||(Xb=1,(function(a){function e(Y,$){var pe=Y.length;Y.push($);e:for(;0<pe;){var Be=pe-1>>>1,Ae=Y[Be];if(0<s(Ae,$))Y[Be]=$,Y[pe]=Ae,pe=Be;else break e}}function t(Y){return Y.length===0?null:Y[0]}function n(Y){if(Y.length===0)return null;var $=Y[0],pe=Y.pop();if(pe!==$){Y[0]=pe;e:for(var Be=0,Ae=Y.length,De=Ae>>>1;Be<De;){var He=2*(Be+1)-1,Ve=Y[He],bt=He+1,qt=Y[bt];if(0>s(Ve,pe))bt<Ae&&0>s(qt,Ve)?(Y[Be]=qt,Y[bt]=pe,Be=bt):(Y[Be]=Ve,Y[He]=pe,Be=He);else if(bt<Ae&&0>s(qt,pe))Y[Be]=qt,Y[bt]=pe,Be=bt;else break e}}return $}function s(Y,$){var pe=Y.sortIndex-$.sortIndex;return pe!==0?pe:Y.id-$.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;a.unstable_now=function(){return o.now()}}else{var u=Date,h=u.now();a.unstable_now=function(){return u.now()-h}}var d=[],g=[],y=1,v=null,x=3,S=!1,M=!1,w=!1,C=!1,E=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function U(Y){for(var $=t(g);$!==null;){if($.callback===null)n(g);else if($.startTime<=Y)n(g),$.sortIndex=$.expirationTime,e(d,$);else break;$=t(g)}}function z(Y){if(w=!1,U(Y),!M)if(t(d)!==null)M=!0,P||(P=!0,ie());else{var $=t(g);$!==null&&fe(z,$.startTime-Y)}}var P=!1,X=-1,k=5,I=-1;function O(){return C?!0:!(a.unstable_now()-I<k)}function q(){if(C=!1,P){var Y=a.unstable_now();I=Y;var $=!0;try{e:{M=!1,w&&(w=!1,B(X),X=-1),S=!0;var pe=x;try{t:{for(U(Y),v=t(d);v!==null&&!(v.expirationTime>Y&&O());){var Be=v.callback;if(typeof Be=="function"){v.callback=null,x=v.priorityLevel;var Ae=Be(v.expirationTime<=Y);if(Y=a.unstable_now(),typeof Ae=="function"){v.callback=Ae,U(Y),$=!0;break t}v===t(d)&&n(d),U(Y)}else n(d);v=t(d)}if(v!==null)$=!0;else{var De=t(g);De!==null&&fe(z,De.startTime-Y),$=!1}}break e}finally{v=null,x=pe,S=!1}$=void 0}}finally{$?ie():P=!1}}}var ie;if(typeof D=="function")ie=function(){D(q)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,re=j.port2;j.port1.onmessage=q,ie=function(){re.postMessage(null)}}else ie=function(){E(q,0)};function fe(Y,$){X=E(function(){Y(a.unstable_now())},$)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(Y){Y.callback=null},a.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<Y?Math.floor(1e3/Y):5},a.unstable_getCurrentPriorityLevel=function(){return x},a.unstable_next=function(Y){switch(x){case 1:case 2:case 3:var $=3;break;default:$=x}var pe=x;x=$;try{return Y()}finally{x=pe}},a.unstable_requestPaint=function(){C=!0},a.unstable_runWithPriority=function(Y,$){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var pe=x;x=Y;try{return $()}finally{x=pe}},a.unstable_scheduleCallback=function(Y,$,pe){var Be=a.unstable_now();switch(typeof pe=="object"&&pe!==null?(pe=pe.delay,pe=typeof pe=="number"&&0<pe?Be+pe:Be):pe=Be,Y){case 1:var Ae=-1;break;case 2:Ae=250;break;case 5:Ae=1073741823;break;case 4:Ae=1e4;break;default:Ae=5e3}return Ae=pe+Ae,Y={id:y++,callback:$,priorityLevel:Y,startTime:pe,expirationTime:Ae,sortIndex:-1},pe>Be?(Y.sortIndex=pe,e(g,Y),t(d)===null&&Y===t(g)&&(w?(B(X),X=-1):w=!0,fe(z,pe-Be))):(Y.sortIndex=Ae,e(d,Y),M||S||(M=!0,P||(P=!0,ie()))),Y},a.unstable_shouldYield=O,a.unstable_wrapCallback=function(Y){var $=x;return function(){var pe=x;x=$;try{return Y.apply(this,arguments)}finally{x=pe}}}})(dx)),dx}var Wb;function Z1(){return Wb||(Wb=1,hx.exports=rw()),hx.exports}/** 18 * @license React 19 * react-dom-client.production.js 20 * 21 * Copyright (c) Meta Platforms, Inc. and affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */var Jb;function aw(){if(Jb)return im;Jb=1;var a=Z1(),e=qA(),t=nw();function n(i){var r="https://react.dev/errors/"+i;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)r+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+i+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var r=i,f=i;if(i.alternate)for(;r.return;)r=r.return;else{i=r;do r=i,(r.flags&4098)!==0&&(f=r.return),i=r.return;while(i)}return r.tag===3?f:null}function u(i){if(i.tag===13){var r=i.memoizedState;if(r===null&&(i=i.alternate,i!==null&&(r=i.memoizedState)),r!==null)return r.dehydrated}return null}function h(i){if(i.tag===31){var r=i.memoizedState;if(r===null&&(i=i.alternate,i!==null&&(r=i.memoizedState)),r!==null)return r.dehydrated}return null}function d(i){if(o(i)!==i)throw Error(n(188))}function g(i){var r=i.alternate;if(!r){if(r=o(i),r===null)throw Error(n(188));return r!==i?null:i}for(var f=i,p=r;;){var A=f.return;if(A===null)break;var b=A.alternate;if(b===null){if(p=A.return,p!==null){f=p;continue}break}if(A.child===b.child){for(b=A.child;b;){if(b===f)return d(A),i;if(b===p)return d(A),r;b=b.sibling}throw Error(n(188))}if(f.return!==p.return)f=A,p=b;else{for(var L=!1,V=A.child;V;){if(V===f){L=!0,f=A,p=b;break}if(V===p){L=!0,p=A,f=b;break}V=V.sibling}if(!L){for(V=b.child;V;){if(V===f){L=!0,f=b,p=A;break}if(V===p){L=!0,p=b,f=A;break}V=V.sibling}if(!L)throw Error(n(189))}}if(f.alternate!==p)throw Error(n(190))}if(f.tag!==3)throw Error(n(188));return f.stateNode.current===f?i:r}function y(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i;for(i=i.child;i!==null;){if(r=y(i),r!==null)return r;i=i.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),D=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function ie(i){return i===null||typeof i!="object"?null:(i=q&&i[q]||i["@@iterator"],typeof i=="function"?i:null)}var j=Symbol.for("react.client.reference");function re(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===j?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case w:return"Fragment";case E:return"Profiler";case C:return"StrictMode";case z:return"Suspense";case P:return"SuspenseList";case I:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case M:return"Portal";case D:return i.displayName||"Context";case B:return(i._context.displayName||"Context")+".Consumer";case U:var r=i.render;return i=i.displayName,i||(i=r.displayName||r.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case X:return r=i.displayName||null,r!==null?r:re(i.type)||"Memo";case k:r=i._payload,i=i._init;try{return re(i(r))}catch{}}return null}var fe=Array.isArray,Y=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},Be=[],Ae=-1;function De(i){return{current:i}}function He(i){0>Ae||(i.current=Be[Ae],Be[Ae]=null,Ae--)}function Ve(i,r){Ae++,Be[Ae]=i.current,i.current=r}var bt=De(null),qt=De(null),me=De(null),Fe=De(null);function mt(i,r){switch(Ve(me,r),Ve(qt,i),Ve(bt,null),r.nodeType){case 9:case 11:i=(i=r.documentElement)&&(i=i.namespaceURI)?fb(i):0;break;default:if(i=r.tagName,r=r.namespaceURI)r=fb(r),i=hb(r,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}He(bt),Ve(bt,i)}function It(){He(bt),He(qt),He(me)}function wt(i){i.memoizedState!==null&&Ve(Fe,i);var r=bt.current,f=hb(r,i.type);r!==f&&(Ve(qt,i),Ve(bt,f))}function an(i){qt.current===i&&(He(bt),He(qt)),Fe.current===i&&(He(Fe),jp._currentValue=pe)}var yn,Xt;function Le(i){if(yn===void 0)try{throw Error()}catch(f){var r=f.stack.trim().match(/\n( *(at )?)/);yn=r&&r[1]||"",Xt=-1<f.stack.indexOf(` 26 at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return` 27`+yn+i+Xt}var Ke=!1;function Oe(i,r){if(!i||Ke)return"";Ke=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(r){var ke=function(){throw Error()};if(Object.defineProperty(ke.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ke,[])}catch(we){var xe=we}Reflect.construct(i,[],ke)}else{try{ke.call()}
vendor: 6,639 bytes, lines 27-32
27catch(we){xe=we}i.call(ke.prototype)}}else{try{throw Error()}catch(we){xe=we}(ke=i())&&typeof ke.catch=="function"&&ke.catch(function(){})}}catch(we){if(we&&xe&&typeof we.stack=="string")return[we.stack,xe.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var A=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");A&&A.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=p.DetermineComponentFrameRoot(),L=b[0],V=b[1];if(L&&V){var ee=L.split(` 28`),ye=V.split(` 29`);for(A=p=0;p<ee.length&&!ee[p].includes("DetermineComponentFrameRoot");)p++;for(;A<ye.length&&!ye[A].includes("DetermineComponentFrameRoot");)A++;if(p===ee.length||A===ye.length)for(p=ee.length-1,A=ye.length-1;1<=p&&0<=A&&ee[p]!==ye[A];)A--;for(;1<=p&&0<=A;p--,A--)if(ee[p]!==ye[A]){if(p!==1||A!==1)do if(p--,A--,0>A||ee[p]!==ye[A]){var Ie=` 30`+ee[p].replace(" at new "," at ");return i.displayName&&Ie.includes("<anonymous>")&&(Ie=Ie.replace("<anonymous>",i.displayName)),Ie}while(1<=p&&0<=A);break}}}finally{Ke=!1,Error.prepareStackTrace=f}return(f=i?i.displayName||i.name:"")?Le(f):""}function dt(i,r){switch(i.tag){case 26:case 27:case 5:return Le(i.type);case 16:return Le("Lazy");case 13:return i.child!==r&&r!==null?Le("Suspense Fallback"):Le("Suspense");case 19:return Le("SuspenseList");case 0:case 15:return Oe(i.type,!1);case 11:return Oe(i.type.render,!1);case 1:return Oe(i.type,!0);case 31:return Le("Activity");default:return""}}function Z(i){try{var r="",f=null;do r+=dt(i,f),f=i,i=i.return;while(i);return r}catch(p){return` 31Error generating stack: `+p.message+` 32`+p.stack}}var Ot=Object.prototype.hasOwnProperty,yt=a.unstable_scheduleCallback,Pt=a.unstable_cancelCallback,it=a.unstable_shouldYield,J=a.unstable_requestPaint,N=a.unstable_now,le=a.unstable_getCurrentPriorityLevel,Ee=a.unstable_ImmediatePriority,Pe=a.unstable_UserBlockingPriority,Me=a.unstable_NormalPriority,St=a.unstable_LowPriority,ot=a.unstable_IdlePriority,Lt=a.log,Wt=a.unstable_setDisableYieldValue,Xe=null,Je=null;function Et(i){if(typeof Lt=="function"&&Wt(i),Je&&typeof Je.setStrictMode=="function")try{Je.setStrictMode(Xe,i)}catch{}}var _t=Math.clz32?Math.clz32:ce,tt=Math.log,Ht=Math.LN2;function ce(i){return i>>>=0,i===0?32:31-(tt(i)/Ht|0)|0}var Se=256,Qe=262144,At=4194304;function Ze(i){var r=i&42;if(r!==0)return r;switch(i&-i){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Ue(i,r,f){var p=i.pendingLanes;if(p===0)return 0;var A=0,b=i.suspendedLanes,L=i.pingedLanes;i=i.warmLanes;var V=p&134217727;return V!==0?(p=V&~b,p!==0?A=Ze(p):(L&=V,L!==0?A=Ze(L):f||(f=V&~i,f!==0&&(A=Ze(f))))):(V=p&~b,V!==0?A=Ze(V):L!==0?A=Ze(L):f||(f=p&~i,f!==0&&(A=Ze(f)))),A===0?0:r!==0&&r!==A&&(r&b)===0&&(b=A&-A,f=r&-r,b>=f||b===32&&(f&4194048)!==0)?r:A}function ft(i,r){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&r)===0}function $t(i,r){switch(i){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32: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 r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Mn(){var i=At;return At<<=1,(At&62914560)===0&&(At=4194304),i}function wn(i){for(var r=[],f=0;31>f;f++)r.push(i);return r}function Ji(i,r){i.pendingLanes|=r,r!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function As(i,r,f,p,A,b){var L=i.pendingLanes;i.pendingLanes=f,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=f,i.entangledLanes&=f,i.errorRecoveryDisabledLanes&=f,i.shellSuspendCounter=0;var V=i.entanglements,ee=i.expirationTimes,ye=i.hiddenUpdates;for(f=L&~f;0<f;){var Ie=31-_t(f),ke=1<<Ie;V[Ie]=0,ee[Ie]=-1;var xe=ye[Ie];if(xe!==null)for(ye[Ie]=null,Ie=0;Ie<xe.length;Ie++){var we=xe[Ie];we!==null&&(we.lane&=-536870913)}f&=~ke}p!==0&&ra(i,p,0),b!==0&&A===0&&i.tag!==0&&(i.suspendedLanes|=b&~(L&~r))}function ra(i,r,f){i.pendingLanes|=r,i.suspendedLanes&=~r;var p=31-_t(r);i.entangledLanes|=r,i.entanglements[p]=i.entanglements[p]|1073741824|f&261930}function aa(i,r){var f=i.entangledLanes|=r;for(i=i.entanglements;f;){var p=31-_t(f),A=1<<p;A&r|i[p]&r&&(i[p]|=r),f&=~A}}function Mr(i,r){var f=r&-r;return f=(f&42)!==0?1:oa(f),(f&(i.suspendedLanes|r))!==0?0:f}function oa(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Bs(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function ar(){var i=$.p;return i!==0?i:(i=window.event,i===void 0?32:Nb(i.type))}function Kt(i,r){var f=$.p;try{return $.p=i,r()}finally{$.p=f}}var Ss=Math.random().toString(36).slice(2),ai="__reactFiber$"+Ss,F="__reactProps$"+Ss,W="__reactContainer$"+Ss,te="__reactEvents$"+Ss,ge="__reactListeners$"+Ss,Ce="__reactHandles$"+Ss,Re="__reactResources$"+Ss,je="__reactMarker$"+Ss;function Ye(i){delete i[ai],delete i[F],delete i[te],delete i[ge],delete i[Ce]}function lt(i){var r=i[ai];if(r)return r;for(var f=i.parentNode;f;){if(r=f[W]||f[ai]){if(f=r.alternate,r.child!==null||f!==null&&f.child!==null)for(i=_b(i);i!==null;){if(f=i[ai])return f;i=_b(i)}return r}i=f,f=i.parentNode}return null}function rt(i){if(i=i[ai]||i[W]){var r=i.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return i}return null}function ht(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i.stateNode;throw Error(n(33))}function st(i){var r=i[Re];return r||(r=i[Re]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function G(i){i[je]=!0}var Q=new Set,oe={};function ue(i,r){se(i,r),se(i+"Capture",r)}function se(i,r){for(oe[i]=r,i=0;i<r.length;i++)Q.add(r[i])}var Ne=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
vendor: 11,530 bytes, line 32
32037D\\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]*$"),$e={},ze={};function gt(i){return Ot.call(ze,i)?!0:Ot.call($e,i)?!1:Ne.test(i)?ze[i]=!0:($e[i]=!0,!1)}function at(i,r,f){if(gt(r))if(f===null)i.removeAttribute(r);else{switch(typeof f){case"undefined":case"function":case"symbol":i.removeAttribute(r);return;case"boolean":var p=r.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){i.removeAttribute(r);return}}i.setAttribute(r,""+f)}}function Ut(i,r,f){if(f===null)i.removeAttribute(r);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(r);return}i.setAttribute(r,""+f)}}function ut(i,r,f,p){if(p===null)i.removeAttribute(f);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(f);return}i.setAttributeNS(r,f,""+p)}}function Dt(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function on(i){var r=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Hn(i,r,f){var p=Object.getOwnPropertyDescriptor(i.constructor.prototype,r);if(!i.hasOwnProperty(r)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var A=p.get,b=p.set;return Object.defineProperty(i,r,{configurable:!0,get:function(){return A.call(this)},set:function(L){f=""+L,b.call(this,L)}}),Object.defineProperty(i,r,{enumerable:p.enumerable}),{getValue:function(){return f},setValue:function(L){f=""+L},stopTracking:function(){i._valueTracker=null,delete i[r]}}}}function fn(i){if(!i._valueTracker){var r=on(i)?"checked":"value";i._valueTracker=Hn(i,r,""+i[r])}}function Rt(i){if(!i)return!1;var r=i._valueTracker;if(!r)return!0;var f=r.getValue(),p="";return i&&(p=on(i)?i.checked?"true":"false":i.value),i=p,i!==f?(r.setValue(i),!0):!1}function nt(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var zt=/[\n"\\]/g;function xt(i){return i.replace(zt,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Pn(i,r,f,p,A,b,L,V){i.name="",L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?i.type=L:i.removeAttribute("type"),r!=null?L==="number"?(r===0&&i.value===""||i.value!=r)&&(i.value=""+Dt(r)):i.value!==""+Dt(r)&&(i.value=""+Dt(r)):L!=="submit"&&L!=="reset"||i.removeAttribute("value"),r!=null?_n(i,L,Dt(r)):f!=null?_n(i,L,Dt(f)):p!=null&&i.removeAttribute("value"),A==null&&b!=null&&(i.defaultChecked=!!b),A!=null&&(i.checked=A&&typeof A!="function"&&typeof A!="symbol"),V!=null&&typeof V!="function"&&typeof V!="symbol"&&typeof V!="boolean"?i.name=""+Dt(V):i.removeAttribute("name")}function Yi(i,r,f,p,A,b,L,V){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(i.type=b),r!=null||f!=null){if(!(b!=="submit"&&b!=="reset"||r!=null)){fn(i);return}f=f!=null?""+Dt(f):"",r=r!=null?""+Dt(r):f,V||r===i.value||(i.value=r),i.defaultValue=r}p=p??A,p=typeof p!="function"&&typeof p!="symbol"&&!!p,i.checked=V?i.checked:!!p,i.defaultChecked=!!p,L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"&&(i.name=L),fn(i)}function _n(i,r,f){r==="number"&&nt(i.ownerDocument)===i||i.defaultValue===""+f||(i.defaultValue=""+f)}function ci(i,r,f,p){if(i=i.options,r){r={};for(var A=0;A<f.length;A++)r["$"+f[A]]=!0;for(f=0;f<i.length;f++)A=r.hasOwnProperty("$"+i[f].value),i[f].selected!==A&&(i[f].selected=A),A&&p&&(i[f].defaultSelected=!0)}else{for(f=""+Dt(f),r=null,A=0;A<i.length;A++){if(i[A].value===f){i[A].selected=!0,p&&(i[A].defaultSelected=!0);return}r!==null||i[A].disabled||(r=i[A])}r!==null&&(r.selected=!0)}}function Xn(i,r,f){if(r!=null&&(r=""+Dt(r),r!==i.value&&(i.value=r),f==null)){i.defaultValue!==r&&(i.defaultValue=r);return}i.defaultValue=f!=null?""+Dt(f):""}function qi(i,r,f,p){if(r==null){if(p!=null){if(f!=null)throw Error(n(92));if(fe(p)){if(1<p.length)throw Error(n(93));p=p[0]}f=p}f==null&&(f=""),r=f}f=Dt(r),i.defaultValue=f,p=i.textContent,p===f&&p!==""&&p!==null&&(i.value=p),fn(i)}function Oi(i,r){if(r){var f=i.firstChild;if(f&&f===i.lastChild&&f.nodeType===3){f.nodeValue=r;return}}i.textContent=r}var ns=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function is(i,r,f){var p=r.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?p?i.setProperty(r,""):r==="float"?i.cssFloat="":i[r]="":p?i.setProperty(r,f):typeof f!="number"||f===0||ns.has(r)?r==="float"?i.cssFloat=f:i[r]=(""+f).trim():i[r]=f+"px"}function $o(i,r,f){if(r!=null&&typeof r!="object")throw Error(n(62));if(i=i.style,f!=null){for(var p in f)!f.hasOwnProperty(p)||r!=null&&r.hasOwnProperty(p)||(p.indexOf("--")===0?i.setProperty(p,""):p==="float"?i.cssFloat="":i[p]="");for(var A in r)p=r[A],r.hasOwnProperty(A)&&f[A]!==p&&is(i,A,p)}else for(var b in r)r.hasOwnProperty(b)&&is(i,b,r[b])}function Er(i){if(i.indexOf("-")===-1)return!1;switch(i){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 cg=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Id=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function su(i){return Id.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Ha(){}var Rf=null;function Bf(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var el=null,vo=null;function Ld(i){var r=rt(i);if(r&&(i=r.stateNode)){var f=i[F]||null;e:switch(i=r.stateNode,r.type){case"input":if(Pn(i,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),r=f.name,f.type==="radio"&&r!=null){for(f=i;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+xt(""+r)+'"][type="radio"]'),r=0;r<f.length;r++){var p=f[r];if(p!==i&&p.form===i.form){var A=p[F]||null;if(!A)throw Error(n(90));Pn(p,A.value,A.defaultValue,A.defaultValue,A.checked,A.defaultChecked,A.type,A.name)}}for(r=0;r<f.length;r++)p=f[r],p.form===i.form&&Rt(p)}break e;case"textarea":Xn(i,f.value,f.defaultValue);break e;case"select":r=f.value,r!=null&&ci(i,!!f.multiple,r,!1)}}}var Df=!1;function Ud(i,r,f){if(Df)return i(r,f);Df=!0;try{var p=i(r);return p}finally{if(Df=!1,(el!==null||vo!==null)&&(jr(),el&&(r=el,i=vo,vo=el=null,Ld(r),i)))for(r=0;r<i.length;r++)Ld(i[r])}}function Vl(i,r){var f=i.stateNode;if(f===null)return null;var p=f[F]||null;if(p===null)return null;f=p[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(f&&typeof f!="function")throw Error(n(231,r,typeof f));return f}var la=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nd=!1;if(la)try{var Xl={};Object.defineProperty(Xl,"passive",{get:function(){Nd=!0}}),window.addEventListener("test",Xl,Xl),window.removeEventListener("test",Xl,Xl)}catch{Nd=!1}var or=null,If=null,tl=null;function ru(){if(tl)return tl;var i,r=If,f=r.length,p,A="value"in or?or.value:or.textContent,b=A.length;for(i=0;i<f&&r[i]===A[i];i++);var L=f-i;for(p=1;p<=L&&r[f-p]===A[b-p];p++);return tl=A.slice(i,1<p?1-p:void 0)}function au(i){var r=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&r===13&&(i=13)):i=r,i===10&&(i=13),32<=i||i===13?i:0}function Wl(){return!0}function ug(){return!1}
vendor: 2,765 bytes, line 32
32function Ds(i){function r(f,p,A,b,L){this._reactName=f,this._targetInst=A,this.type=p,this.nativeEvent=b,this.target=L,this.currentTarget=null;for(var V in i)i.hasOwnProperty(V)&&(f=i[V],this[V]=f?f(b):b[V]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Wl:ug,this.isPropagationStopped=ug,this}return v(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=Wl)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=Wl)},persist:function(){},isPersistent:Wl}),r}var yo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ou=Ds(yo),Jl=v({},yo,{view:0,detail:0}),fg=Ds(Jl),lu,Lf,Yl,ql=v({},Jl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Of,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Yl&&(Yl&&i.type==="mousemove"?(lu=i.screenX-Yl.screenX,Lf=i.screenY-Yl.screenY):Lf=lu=0,Yl=i),lu)},movementY:function(i){return"movementY"in i?i.movementY:Lf}}),Fd=Ds(ql),hg=v({},ql,{dataTransfer:0}),dg=Ds(hg),Od=v({},Jl,{relatedTarget:0}),Uf=Ds(Od),pg=v({},yo,{animationName:0,elapsedTime:0,pseudoElement:0}),B_=Ds(pg),D_=v({},yo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),mg=Ds(D_),cu=v({},yo,{data:0}),Nf=Ds(cu),Ff={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gg={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},vg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pd(i){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(i):(i=vg[i])?!!r[i]:!1}function Of(){return Pd}var yg=v({},Jl,{key:function(i){if(i.key){var r=Ff[i.key]||i.key;if(r!=="Unidentified")return r}return i.type==="keypress"?(i=au(i),i===13?"Enter":String.fromCharCode(i)):i.type==="
32keydown"||i.type==="keyup"?gg[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Of,charCode:function(i){return i.type==="keypress"?au(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?au(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),nl=Ds(yg),Pf=v({},ql,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zd=Ds(Pf),Gd=v({},Jl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Of}),_g=Ds(Gd),xg=v({},yo,{propertyName:0,elapsedTime:0,pseudoElement:0}),I_=Ds(xg),fs=v({},ql,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),Ag=Ds(fs),Sg=v({},yo,{newState:0,oldState:0}),bg=Ds(Sg),Mg=[9,13,27,32],il=la&&"CompositionEvent"in window,Kl=null;la&&"documentMode"in document&&(Kl=document.documentMode);var zf=la&&"TextEvent"in window&&!Kl,Hd=la&&(!il||Kl&&8<Kl&&11>=Kl),Eg=" ",uu=!1;function Gf(i,r){switch(i){case"keyup":return Mg.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kd(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var sl=!1;function Tg(i,r){switch(i){case"compositionend":return kd(r);case"keypress":return r.which!==32?null:(uu=!0,Eg);case"textInput":return i=r.data,i===Eg&&uu?null:i;default:return null}}function Vd(i,r){if(sl)return i==="compositionend"||!il&&Gf(i,r)?(i=ru(),tl=If=or=null,sl=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Hd&&r.locale!=="ko"?null:r.data;default:return null}}var Xd={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wd(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r==="input"?!!Xd[i.type]:r==="textarea"}function Hf(i,r,f,p){el?vo?vo.push(p):vo=[p]:el=p,r=D0(r,"onChange"),0<r.length&&(f=new ou("onChange","change",null,f,p),i.push({event:f,listeners:r}))}var _o=null,rl=null;function Cg(i){rb(i,0)}function Zl(i){var r=ht(i);if(Rt(r))return i}function Jd(i,r){if(i==="change")return r}var ca=!1;if(la){var fu;if(la){var Yd="oninput"in document;if(!Yd){var qd=document.createElement("div");qd.setAttribute("oninput","return;"),Yd=typeof qd.oninput=="function"}fu=Yd}else fu=!1;ca=fu&&(!document.documentMode||9<document.documentMode)}function Tr(){_o&&(_o.detachEvent("onpropertychange",hu),rl=_o=null)}function hu(i){if(i.propertyName==="value"&&Zl(rl)){var r=[];Hf(r,rl,i,Bf(i)),Ud(Cg,r)}}function wg(i,r,f){i==="focusin"?(Tr(),_o=r,rl=f,_o.attachEvent("onpropertychange",hu)):i==="focusout"&&Tr()}function Kd(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Zl(rl)}function Rg(i,r){if(i==="click")return Zl(r)}function Bg(i,r){if(i==="input"||i==="change")return Zl(r)}function Zd(i,r){return i===r&&(i!==0||1/i===1/r)||i!==i&&r!==r}var Is=typeof Object.is=="function"?Object.is:Zd;function Ql(i,r){if(Is(i,r))return!0;if(typeof i!="object"||i===null||typeof r!="object"||r===null)return!1;var f=Object.keys(i),p=Object.keys(r);if(f.length!==p.length)return!1;for(p=0;p<f.length;p++){var A=f[p];if(!Ot.call(r,A)||!Is(i[A],r[A]))return!1}return!0}function du(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function jl(i,r){var f=du(i);i=0;for(var p;f;){if(f.nodeType===3){if(p=i+f.textContent.length,i<=r&&p>=r)return{node:f,offset:r-i};i=p}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=du(f)}}function ti(i,r){return i&&r?i===r?!0:i&&i.nodeType===3?!1:r&&r.nodeType===3?ti(i,r.parentNode):"contains"in i?i.contains(r):i.compareDocumentPosition?!!(i.compareDocumentPosition(r)&16):!1:!1}function Dg(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var r=nt(i.document);r instanceof i.HTMLIFrameElement;){try{var f=typeof r.contentWindow.location.href=="string"}catch{f=!1}if(f)i=r.contentWindow;else break;r=nt(i.document)}return r}function Qd(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r&&(r==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||r==="textarea"||i.contentEditable==="true")}var Ig=la&&"documentMode"in document&&11>=document.documentMode,ua=null,fa=null,$l=null,kf=!1;function ec(i,r,f){var p=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;kf||ua==null||ua!==nt(p)||(p=ua,"selectionStart"in p&&Qd(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focu
vendor: 21,029 bytes, line 32
32sNode:p.focusNode,focusOffset:p.focusOffset}),$l&&Ql($l,p)||($l=p,p=D0(fa,"onSelect"),0<p.length&&(r=new ou("onSelect","select",null,r,f),i.push({event:r,listeners:p}),r.target=ua)))}function bs(i,r){var f={};return f[i.toLowerCase()]=r.toLowerCase(),f["Webkit"+i]="webkit"+r,f["Moz"+i]="moz"+r,f}var al={animationend:bs("Animation","AnimationEnd"),animationiteration:bs("Animation","AnimationIteration"),animationstart:bs("Animation","AnimationStart"),transitionrun:bs("Transition","TransitionRun"),transitionstart:bs("Transition","TransitionStart"),transitioncancel:bs("Transition","TransitionCancel"),transitionend:bs("Transition","TransitionEnd")},pu={},jd={};la&&(jd=document.createElement("div").style,"AnimationEvent"in window||(delete al.animationend.animation,delete al.animationiteration.animation,delete al.animationstart.animation),"TransitionEvent"in window||delete al.transitionend.transition);function ka(i){if(pu[i])return pu[i];if(!al[i])return i;var r=al[i],f;for(f in r)if(r.hasOwnProperty(f)&&f in jd)return pu[i]=r[f];return i}var Vf=ka("animationend"),mu=ka("animationiteration"),$d=ka("animationstart"),Lg=ka("transitionrun"),L_=ka("transitionstart"),Ug=ka("transitioncancel"),ep=ka("transitionend"),Cr=new Map,gu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");gu.push("scrollEnd");function wr(i,r){Cr.set(i,r),ue(r,[i])}var vu=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Rr=[],Va=0,ss=0;function yu(){for(var i=Va,r=ss=Va=0;r<i;){var f=Rr[r];Rr[r++]=null;var p=Rr[r];Rr[r++]=null;var A=Rr[r];Rr[r++]=null;var b=Rr[r];if(Rr[r++]=null,p!==null&&A!==null){var L=p.pending;L===null?A.next=A:(A.next=L.next,L.next=A),p.pending=A}b!==0&&xo(f,A,b)}}function rs(i,r,f,p){Rr[Va++]=i,Rr[Va++]=r,Rr[Va++]=f,Rr[Va++]=p,ss|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function Xf(i,r,f,p){return rs(i,r,f,p),Br(i)}function Ls(i,r){return rs(i,null,null,r),Br(i)}function xo(i,r,f){i.lanes|=f;var p=i.alternate;p!==null&&(p.lanes|=f);for(var A=!1,b=i.return;b!==null;)b.childLanes|=f,p=b.alternate,p!==null&&(p.childLanes|=f),b.tag===22&&(i=b.stateNode,i===null||i._visibility&1||(A=!0)),i=b,b=b.return;return i.tag===3?(b=i.stateNode,A&&r!==null&&(A=31-_t(f),i=b.hiddenUpdates,p=i[A],p===null?i[A]=[r]:p.push(r),r.lane=f|536870912),b):null}function Br(i){if(50<zo)throw zo=0,El=null,Error(n(185));for(var r=i.return;r!==null;)i=r,r=i.return;return i.tag===3?i.stateNode:null}var Ao={};function tp(i,r,f,p){this.tag=i,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pi(i,r,f,p){return new tp(i,r,f,p)}function Wf(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Ws(i,r){var f=i.alternate;return f===null?(f=pi(i.tag,r,i.key,i.mode),f.elementType=i.elementType,f.type=i.type,f.stateNode=i.stateNode,f.alternate=i,i.alternate=f):(f.pendingProps=r,f.type=i.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=i.flags&65011712,f.childLanes=i.childLanes,f.lanes=i.lanes,f.child=i.child,f.memoizedProps=i.memoizedProps,f.memoizedState=i.memoizedState,f.updateQueue=i.updateQueue,r=i.dependencies,f.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},f.sibling=i.sibling,f.index=i.index,f.ref=i.ref,f.refCleanup=i.refCleanup,f}function tc(i,r){i.flags&=65011714;var f=i.alternate;return f===null?(i.childLanes=0,i.lanes=r,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=f.childLanes,i.lanes=f.lanes,i.child=f.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=f.memoizedProps,i.memoizedState=f.memoizedState,i.updateQueue=f.updateQueue,i.type=f.type,r=f.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),i}function ha(i,r,f,p,A,b){var L=0;if(p=i,typeof i=="function")Wf(i)&&(L=1);else if(typeof i=="string")L=kC(i,f,bt.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case I:return i=pi(31,f,r,A),i.elementType=I,i.lanes=b,i;case w:return So(f.children,A,b,r);case C:L=8,A|=24;break;case E:return i=pi(12,f,r,A|2),i.elementType=E,i.lanes=b,i;case z:return i=pi(13,f,r,A),i.elementType=z,i.lanes=b,i;case P:return i=pi(19,f,r,A),i.elementType=P,i.lanes=b,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case D:L=10;break e;case B:L=9;break e;case U:L=11;break e;case X:L=14;break e;case k:L=16,p=null;break e}L=29,f=Error(n(130,i===null?"null":typeof i,"")),p=null}return r=pi(L,f,r,A),r.elementType=i,r.type=p,r.lanes=b,r}function So(i,r,f,p){return i=pi(7,i,p,r),i.lanes=f,i}function Jf(i,r,f){return i=pi(6,i,null,r),i.lanes=f,i}function nc(i){var r=pi(18,null,null,0);return r.stateNode=i,r}function Yf(i,r,f){return r=pi(4,i.children!==null?i.children:[],i.key,r),r.lanes=f,r.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},r}var _u=new WeakMap;function lr(i,r){if(typeof i=="object"&&i!==null){var f=_u.get(i);return f!==void 0?f:(r={value:i,source:r,stack:Z(r)},_u.set(i,r),r)}return{value:i,source:r,stack:Z(r)}}var bo=[],Mo=0,ic=null,sc=0,Js=[],ui=0,Xa=null,mi=1,qr="";function da(i,r){bo[Mo++]=sc,bo[Mo++]=ic,ic=i,sc=r}function Ng(i,r,f){Js[ui++]=mi,Js[ui++]=qr,Js[ui++]=Xa,Xa=i;var p=mi;i=qr;var A=32-_t(p)-1;p&=~(1<<A),f+=1;var b=32-_t(r)+A;if(30<b){var L=A-A%5;b=(p&(1<<L)-1).toString(32),p>>=L,A-=L,mi=1<<32-_t(r)+A|f<<A|p,qr=b+i}else mi=1<<b|f<<A|p,qr=i}function pa(i){i.return!==null&&(da(i,1),Ng(i,1,0))}function qf(i){for(;i===ic;)ic=bo[--Mo],bo[Mo]=null,sc=bo[--Mo],bo[Mo]=null;for(;i===Xa;)Xa=Js[--ui],Js[ui]=null,qr=Js[--ui],Js[ui]=null,mi=Js[--ui],Js[ui]=null}function Kf(i,r){Js[ui++]=mi,Js[ui++]=qr,Js[ui++]=Xa,mi=r.id,qr=r.overflow,Xa=i}var Si=null,ni=null,Rn=!1,Wa=null,cr=!1,rc=Error(n(519));function ma(i){var r=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ga(lr(r,i)),rc}function Fg(i){var r=i.stateNode,f=i.type,p=i.memoizedProps;switch(r[ai]=i,r[F]=p,f){case"dialog":In("cancel",r),In("close",r);break;case"iframe":case"object":case"embed":In("load",r);break;case"video":case"audio":for(f=0;f<Vr.length;f++)In(Vr[f],r);break;case"source":In("error",r);break;case"img":case"image":case"link":In("error",r),In("load",r);break;case"details":In("toggle",r);break;case"input":In("invalid",r),Yi(r,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":In("invalid",r);break;case"textarea":In("invalid",r),qi(r,p.value,p.defaultValue,p.children)}f=p.children,typeof f!="string"&&typeof f!="number"&&typeof f!="bigint"||r.textContent===""+f||p.suppressHydrationWarning===!0||cb(r.textContent,f)?(p.popover!=null&&(In("beforetoggle",r),In("toggle",r)),p.onScroll!=null&&In("scroll",r),p.onScrollEnd!=null&&In("scrollend",r),p.onClick!=null&&(r.onclick=Ha),r=!0):r=!1,r||ma(i,!0)}function Og(i){for(Si=i.return;Si;)switch(Si.tag){case 5:case 31:case 13:cr=!1;return;case 27:case 3:cr=!0;return;default:Si=Si.return}}function ac(i){if(i!==Si)return!1;if(!Rn)return Og(i),Rn=!0,!1;var r=i.tag,f;if((f=r!==3&&r!==27)&&((f=r===5)&&(f=i.type,f=!(f!=="form"&&f!=="button")||K_(i.type,i.memoizedProps)),f=!f),f&&ni&&ma(i),Og(i),r===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));ni=yb(i)}else if(r===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));ni=yb(i)}else r===27?(r=ni,Tc(i.type)?(i=ex,ex=null,ni=i):ni=r):ni=Si?Ba(i.stateNode.nextSibling):null;return!0}function Eo(){ni=Si=null,Rn=!1}function Zf(){var i=Wa;return i!==null&&(Mi===null?Mi=i:Mi.push.apply(Mi,i),Wa=null),i}function ga(i){Wa===null?Wa=[i]:Wa.push(i)}var oc=De(null),To=null,va=null;function Ja(i,r,f){Ve(oc,r._currentValue),r._currentValue=f}function ya(i){i._currentValue=oc.current,He(oc)}function Qf(i,r,f){for(;i!==null;){var p=i.alternate;if((i.childLanes&r)!==r?(i.childLanes|=r,p!==null&&(p.childLanes|=r)):p!==null&&(p.childLanes&r)!==r&&(p.childLanes|=r),i===f)break;i=i.return}}function jf(i,r,f,p){var A=i.child;for(A!==null&&(A.return=i);A!==null;){var b=A.dependencies;if(b!==null){var L=A.child;b=b.firstContext;e:for(;b!==null;){var V=b;b=A;for(var ee=0;ee<r.length;ee++)if(V.context===r[ee]){b.lanes|=f,V=b.alternate,V!==null&&(V.lanes|=f),Qf(b.return,f,i),p||(L=null);break e}b=V.next}}else if(A.tag===18){if(L=A.return,L===null)throw Error(n(341));L.lanes|=f,b=L.alternate,b!==null&&(b.lanes|=f),Qf(L,f,i),L=null}else L=A.child;if(L!==null)L.return=A;else for(L=A;L!==null;){if(L===i){L=null;break}if(A=L.sibling,A!==null){A.return=L.return,L=A;break}L=L.return}A=L}}function _a(i,r,f,p){i=null;for(var A=r,b=!1;A!==null;){if(!b){if((A.flags&524288)!==0)b=!0;else if((A.flags&262144)!==0)break}if(A.tag===10){var L=A.alternate;if(L===null)throw Error(n(387));if(L=L.memoizedProps,L!==null){var V=A.type;Is(A.pendingProps.value,L.value)||(i!==null?i.push(V):i=[V])}}else if(A===Fe.current){if(L=A.alternate,L===null)throw Error(n(387));L.memoizedState.memoizedState!==A.memoizedState.memoizedState&&(i!==null?i.push(jp):i=[jp])}A=A.return}i!==null&&jf(r,i,f,p),r.flags|=262144}function xu(i){for(i=i.firstContext;i!==null;){if(!Is(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Co(i){To=i,va=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function tn(i){return Pg(To,i)}function lc(i,r){return To===null&&Co(i),Pg(i,r)}function Pg(i,r){var f=r._currentValue;if(r={context:r,memoizedValue:f,next:null},va===null){if(i===null)throw Error(n(308));va=r,i.dependencies={lanes:0,firstContext:r},i.flags|=524288}else va=va.next=r;return f}var zg=typeof AbortController<"u"?AbortController:function(){var i=[],r=this.signal={aborted:!1,addEventListener:function(f,p){i.push(p)}};this.abort=function(){r.aborted=!0,i.forEach(function(f){return f()})}},U_=a.unstable_scheduleCallback,N_=a.unstable_NormalPriority,Pi={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function np(){return{controller:new zg,data:new Map,refCount:0}}function ol(i){i.refCount--,i.refCount===0&&U_(N_,function(){i.controller.abort()})}var ur=null,$f=0,Ya=0,Dr=null;function ip(i,r){if(ur===null){var f=ur=[];$f=0,Ya=be(),Dr={status:"pending",value:void 0,then:function(p){f.push(p)}}}return $f++,r.then(sp,sp),r}function sp(){if(--$f===0&&ur!==null){Dr!==null&&(Dr.status="fulfilled");var i=ur;ur=null,Ya=0,Dr=null;for(var r=0;r<i.length;r++)(0,i[r])()}}function rp(i,r){var f=[],p={status:"pending",value:null,reason:null,then:function(A){f.push(A)}};return i.then(function(){p.status="fulfilled",p.value=r;for(var A=0;A<f.length;A++)(0,f[A])(r)},function(A){for(p.status="rejected",p.reason=A,A=0;A<f.length;A++)(0,f[A])(void 0)}),p}var Gg=Y.S;Y.S=function(i,r){Jp=N(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&ip(i,r),Gg!==null&&Gg(i,r)};var wo=De(null);function eh(){var i=wo.current;return i!==null?i:sn.pooledCache}function Au(i,r){r===null?Ve(wo,wo.current):Ve(wo,r.pool)}function ap(){var i=eh();return i===null?null:{parent:Pi._currentValue,pool:i}}var ll=Error(n(460)),Su=Error(n(474)),pn=Error(n(542)),th={then:function(){}};function Ys(i){return i=i.status,i==="fulfilled"||i==="rejected"}function nh(i,r,f){switch(f=i[f],f===void 0?i.push(r):f!==r&&(r.then(Ha,Ha),r=f),r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,fl(i),i;default:if(typeof r.status=="string")r.then(Ha,Ha);else{if(i=sn,i!==null&&100<i.shellSuspendCounter)throw Error(n(482));i=r,i.status="pending",i.then(function(p){if(r.status==="pending"){var A=r;A.status="fulfilled",A.value=p}},function(p){if(r.status==="pending"){var A=r;A.status="rejected",A.reason=p}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,fl(i),i}throw xa=r,ll}}function cl(i){try{var r=i._init;return r(i._payload)}catch(f){throw f!==null&&typeof f=="object"&&typeof f.then=="function"?(xa=f,ll):f}}var xa=null;function ul(){if(xa===null)throw Error(n(459));var i=xa;return xa=null,i}function fl(i){if(i===ll||i===pn)throw Error(n(483))}var hl=null,dl=0;function bu(i){var r=dl;return dl+=1,hl===null&&(hl=[]),nh(hl,i,r)}function Ir(i,r){r=r.props.ref,i.ref=r!==void 0?r:null}function cc(i,r){throw r.$$typeof===x?Error(n(525)):(i=Object.prototype.toString.call(r),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":i)))}function ih(i){function r(he,ae){if(i){var ve=he.deletions;ve===null?(he.deletions=[ae],he.flags|=16):ve.push(ae)}}function f(he,ae){if(!i)return null;for(;ae!==null;)r(he,ae),ae=ae.sibling;return null}function p(he){for(var ae=new Map;he!==null;)he.key!==null?ae.set(he.key,he):ae.set(he.index,he),he=he.sibling;return ae}function A(he,ae){return he=Ws(he,ae),he.index=0,he.sibling=null,he}function b(he,ae,ve){return he.index=ve,i?(ve=he.alternate,ve!==null?(ve=ve.index,ve<ae?(he.flags|=67108866,ae):ve):(he.flags|=67108866,ae)):(he.flags|=1048576,ae)}function L(he){return i&&he.alternate===null&&(he.flags|=67108866),he}function V(he,ae,ve,Ge){return ae===null||ae.tag!==6?(ae=Jf(ve,he.mode,Ge),ae.return=he,ae):(ae=A(ae,ve),ae.return=he,ae)}function ee(he,ae,ve,Ge){var Yt=ve.type;return Yt===w?Ie(he,ae,ve.props.children,Ge,ve.key):ae!==null&&(ae.elementType===Yt||typeof Yt=="object"&&Yt!==null&&Yt.$$typeof===k&&cl(Yt)===ae.type)?(ae=A(ae,ve.props),Ir(ae,ve),ae.return=he,ae):(ae=ha(ve.type,ve.key,ve.props,null,he.mode,Ge),Ir(ae,ve),ae.return=he,ae)}function ye(he,ae,ve,Ge){return ae===null||ae.tag!==4||ae.stateNode.containerInfo!==ve.containerInfo||ae.stateNode.implementation!==ve.implementation?(ae=Yf(ve,he.mode,Ge),ae.return=he,ae):(ae=A(ae,ve.children||[]),ae.return=he,ae)}function Ie(he,ae,ve,Ge,Yt){return ae===null||ae.tag!==7?(ae=So(ve,he.mode,Ge,Yt),ae.return=he,ae):(ae=A(ae,ve),ae.return=he,ae)}function ke(he,ae,ve){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return ae=Jf(""+ae,he.mode,ve),ae.return=he,ae;if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case S:return ve=ha(ae.type,ae.key,ae.props,null,he.mode,ve),Ir(ve,ae),ve.return=he,ve;case M:return ae=Yf(ae,he.mode,ve),ae.return=he,ae;case k:return ae=cl(ae),ke(he,ae,ve)}if(fe(ae)||ie(ae))return ae=So(ae,he.mode,ve,null),ae.return=he,ae;if(typeof ae.then=="function")return ke(he,bu(ae),ve);if(ae.$$typeof===D)return ke(he,lc(he,ae),ve);cc(he,ae)}return null}function xe(he,ae,ve,Ge){var Yt=ae!==null?ae.key:null;if(typeof ve=="string"&&ve!==""||typeof ve=="number"||typeof ve=="bigint")return Yt!==null?null:V(he,ae,""+ve,Ge);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case S:return ve.key===Yt?ee(he,ae,ve,Ge):null;case M:return ve.key===Yt?ye(he,ae,ve,Ge):null;case k:return ve=cl(ve),xe(he,ae,ve,Ge)}if(fe(ve)||ie(ve))return Yt!==null?null:Ie(he,ae,ve,Ge,null);if(typeof ve.then=="function")return xe(he,ae,bu(ve),Ge);if(ve.$$typeof===D)return xe(he,ae,lc(he,ve),Ge);cc(he,ve)}return null}function we(he,ae,ve,Ge,Yt){if(typeof Ge=="string"&&Ge!==""||typeof Ge=="number"||typeof Ge=="bigint")return he=he.get(ve)||null,V(ae,he,""+Ge,Yt);if(typeof Ge=="object"&&Ge!==null){switch(Ge.$$typeof){case S:return he=he.get(Ge.key===null?ve:Ge.key)||null,ee(ae,he,Ge,Yt);case M:return he=he.get(Ge.key===null?ve:Ge.key)||null,ye(ae,he,Ge,Yt);case k:return Ge=cl(Ge),we(he,ae,ve,Ge,Yt)}if(fe(Ge)||ie(Ge))return he=he.get(ve)||null,Ie(ae,he,Ge,Yt,null);if(typeof Ge.then=="function")return we(he,ae,ve,bu(Ge),Yt);if(Ge.$$typeof===D)return we(he,ae,ve,lc(ae,Ge),Yt);cc(ae,Ge)}return null}function Ft(he,ae,ve,Ge){for(var Yt=null,Jn=null,Gt=ae,xn=ae=0,Fn=null;Gt!==null&&xn<ve.length;xn++){Gt.index>xn?(Fn=Gt,Gt=null):Fn=Gt.sibling;var Yn=xe(he,Gt,ve[xn],Ge);if(Yn===null){Gt===null&&(Gt=Fn);break}i&&Gt&&Yn.alternate===null&&r(he,Gt),ae=b(Yn,ae,xn),Jn===null?Yt=Yn:Jn.sibling=Yn,Jn=Yn,Gt=Fn}if(xn===ve.length)return f(he,Gt),Rn&&da(he,xn),Yt;if(Gt===null){for(;xn<ve.length;xn++)Gt=ke(he,ve[xn],Ge),Gt!==null&&(ae=b(Gt,ae,xn),Jn===null?Yt=Gt:Jn.sibling=Gt,Jn=Gt);return Rn&&da(he,xn),Yt}for(Gt=p(Gt);xn<ve.length;xn++)Fn=we(Gt,he,xn,ve[xn],Ge),Fn!==null&&(i&&Fn.alternate!==null&&Gt.delete(Fn.key===null?xn:Fn.key),ae=b(Fn,ae,xn),Jn===null?Yt=Fn:Jn.sibling=Fn,Jn=Fn);return i&&Gt.forEach(function(Dc){return r(he,Dc)}),Rn&&da(he,xn),Yt}function en(he,ae,ve,Ge){if(ve==null)throw Error(n(151));for(var Yt=null,Jn=null,Gt=ae,xn=ae=0,Fn=null,Yn=ve.next();Gt!==null&&!Yn.done;xn++,Yn=ve.next()){Gt.index>xn?(Fn=Gt,Gt=null):Fn=Gt.sibling;var Dc=xe(he,Gt,Yn.value,Ge);if(Dc===null){Gt===null&&(Gt=Fn);break}i&&Gt&&Dc.alternate===null&&r(he,Gt),ae=b(Dc,ae,xn),Jn===null?Yt=Dc:Jn.sibling=Dc,Jn=Dc,Gt=Fn}if(Yn.done)return f(he,Gt),Rn&&da(he,xn),Yt;if(Gt===null){for(;!Yn.done;xn++,Yn=ve.next())Yn=ke(he,Yn.value,Ge),Yn!==null&&(ae=b(Yn,ae,xn),Jn===null?Yt=Yn:Jn.sibling=Yn,Jn=Yn);return Rn&&da(he,xn),Yt}for(Gt=p(Gt);!Yn.done;xn++,Yn=ve.next())Yn=we(Gt,he,xn,Yn.value,Ge),Yn!==null&&(i&&Yn.alternate!==null&&Gt.delete(Yn.key===null?xn:Yn.key),ae=b(Yn,ae,xn),Jn===null?Yt=Yn:Jn.sibling=Yn,Jn=Yn);return i&&Gt.forEach(function($C){return r(he,$C)}),Rn&&da(he,xn),Yt}function ri(he,ae,ve,Ge){if(typeof ve=="object"&&ve!==null&&ve.type===w&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case S:e:{for(var Yt=ve.key;ae!==null;){if(ae.key===Yt){if(Yt=ve.type,Yt===w){if(ae.tag===7){f(he,ae.sibling),Ge=A(ae,ve.props.children),Ge.return=he,he=Ge;break e}}else if(ae.elementType===Yt||typeof Yt=="object"&&Yt!==null&&Yt.$$typeof===k&&cl(Yt)===ae.type){f(he,ae.sibling),Ge=A(ae,ve.props),Ir(Ge,ve),Ge.return=he,he=Ge;break e}f(he,ae);break}else r(he,ae);ae=ae.sibling}ve.type===w?(Ge=So(ve.props.children,he.mode,Ge,ve.key),Ge.return=he,he=Ge):(Ge=ha(ve.type,ve.key,ve.props,null,he.mode,Ge),Ir(Ge,ve),Ge.return=he,he=Ge)}return L(he);case M:e:{for(Yt=ve.key;ae!==null;){if(ae.key===Yt)if(ae.tag===4&&ae.stateNode.containerInfo===ve.containerInfo&&ae.stateNode.implementation===ve.implementation){f(he,ae.sibling),Ge=A(ae,ve.children||[]),Ge.return=he,he=Ge;break e}else{f(he,ae);break}else r(he,ae);ae=ae.sibling}Ge=Yf(ve,he.mode,Ge),Ge.return=he,he=Ge}return L(he);case k:return ve=cl(ve),ri(he,ae,ve,Ge)}if(fe(ve))return Ft(he,ae,ve,Ge);if(ie(ve)){if(Yt=ie(ve),typeof Yt!="function")throw Error(n(150));return ve=Yt.call(ve),en(he,ae,ve,Ge)}if(typeof ve.then=="function")return ri(he,ae,bu(ve),Ge);if(ve.$$typeof===D)return ri(he,ae,lc(he,ve),Ge);cc(he,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"||typeof ve=="bigint"?(ve=""+ve,ae!==null&&ae.tag===6?(f(he,ae.sibling),Ge=A(ae,ve),Ge.return=he,he=Ge):(f(he,ae),Ge=Jf(ve,he.mode,Ge),Ge.return=he,he=Ge),L(he)):f(he,ae)}return function(he,ae,ve,Ge){try{dl=0;var Yt=ri(he,ae,ve,Ge);return hl=null,Yt}catch(Gt){if(Gt===ll||Gt===pn)throw Gt;var Jn=pi(29,Gt,null,he.mode);return Jn.lanes=Ge,Jn.return=he,Jn}finally{}}}var qa=ih(!0),sh=ih(!1),Us=!1;function Mu(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function op(i,r){i=i.updateQueue,r.updateQueue===i&&(r.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Ka(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ro(i,r,f){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(kt&2)!==0){var A=p.pending;return A===null?r.next=r:(r.next=A.next,A.next=r),p.pending=r,r=Br(i),xo(i,null,f),r}return rs(i,p,r,f),Br(i)}function Bo(i,r,f){if(r=r.updateQueue,r!==null&&(r=r.shared,(f&4194048)!==0)){var p=r.lanes;p&=i.pendingLanes,f|=p,r.lanes=f,aa(i,f)}}function Jt(i,r){var f=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,f===p)){var A=null,b=null;if(f=f.firstBaseUpdate,f!==null){do{var L={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};b===null?A=b=L:b=b.next=L,f=f.next}
vendor: 5,118 bytes, line 32
32while(f!==null);b===null?A=b=r:b=b.next=r}else A=b=r;f={baseState:p.baseState,firstBaseUpdate:A,lastBaseUpdate:b,shared:p.shared,callbacks:p.callbacks},i.updateQueue=f;return}i=f.lastBaseUpdate,i===null?f.firstBaseUpdate=r:i.next=r,f.lastBaseUpdate=r}var lp=!1;function Eu(){if(lp){var i=Dr;if(i!==null)throw i}}function uc(i,r,f,p){lp=!1;var A=i.updateQueue;Us=!1;var b=A.firstBaseUpdate,L=A.lastBaseUpdate,V=A.shared.pending;if(V!==null){A.shared.pending=null;var ee=V,ye=ee.next;ee.next=null,L===null?b=ye:L.next=ye,L=ee;var Ie=i.alternate;Ie!==null&&(Ie=Ie.updateQueue,V=Ie.lastBaseUpdate,V!==L&&(V===null?Ie.firstBaseUpdate=ye:V.next=ye,Ie.lastBaseUpdate=ee))}if(b!==null){var ke=A.baseState;L=0,Ie=ye=ee=null,V=b;do{var xe=V.lane&-536870913,we=xe!==V.lane;if(we?(hn&xe)===xe:(p&xe)===xe){xe!==0&&xe===Ya&&(lp=!0),Ie!==null&&(Ie=Ie.next={lane:0,tag:V.tag,payload:V.payload,callback:null,next:null});e:{var Ft=i,en=V;xe=r;var ri=f;switch(en.tag){case 1:if(Ft=en.payload,typeof Ft=="function"){ke=Ft.call(ri,ke,xe);break e}ke=Ft;break e;case 3:Ft.flags=Ft.flags&-65537|128;case 0:if(Ft=en.payload,xe=typeof Ft=="function"?Ft.call(ri,ke,xe):Ft,xe==null)break e;ke=v({},ke,xe);break e;case 2:Us=!0}}xe=V.callback,xe!==null&&(i.flags|=64,we&&(i.flags|=8192),we=A.callbacks,we===null?A.callbacks=[xe]:we.push(xe))}else we={lane:xe,tag:V.tag,payload:V.payload,callback:V.callback,next:null},Ie===null?(ye=Ie=we,ee=ke):Ie=Ie.next=we,L|=xe;if(V=V.next,V===null){if(V=A.shared.pending,V===null)break;we=V,V=we.next,we.next=null,A.lastBaseUpdate=we,A.shared.pending=null}}while(!0);Ie===null&&(ee=ke),A.baseState=ee,A.firstBaseUpdate=ye,A.lastBaseUpdate=Ie,b===null&&(A.shared.lanes=0),Ca|=L,i.lanes=L,i.memoizedState=ke}}function fc(i,r){if(typeof i!="function")throw Error(n(191,i));i.call(r)}function Hg(i,r){var f=i.callbacks;if(f!==null)for(i.callbacks=null,i=0;i<f.length;i++)fc(f[i],r)}var hc=De(null),rh=De(0);function kg(i,r){i=pr,Ve(rh,i),Ve(hc,r),pr=i|r.baseLanes}function cp(){Ve(rh,pr),Ve(hc,hc.current)}function Tu(){pr=rh.current,He(hc),He(rh)}var qs=De(null),Ns=null;function Za(i){var r=i.alternate;Ve(Bn,Bn.current&1),Ve(qs,i),Ns===null&&(r===null||hc.current!==null||r.memoizedState!==null)&&(Ns=i)}function up(i){Ve(Bn,Bn.current),Ve(qs,i),Ns===null&&(Ns=i)}function Vg(i){i.tag===22?(Ve(Bn,Bn.current),Ve(qs,i),Ns===null&&(Ns=i)):Ks()}function Ks(){Ve(Bn,Bn.current),Ve(qs,qs.current)}function Ri(i){He(qs),Ns===i&&(Ns=null),He(Bn)}var Bn=De(0);function fr(i){for(var r=i;r!==null;){if(r.tag===13){var f=r.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||j_(f)||$_(f)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var fi=0,cn=null,Qn=null,En=null,Lr=!1,dc=!1,pl=!1,ah=0,Cu=0,pc=null,fp=0;function gi(){throw Error(n(321))}function hp(i,r){if(r===null)return!1;for(var f=0;f<r.length&&f<i.length;f++)if(!Is(i[f],r[f]))return!1;return!0}function oh(i,r,f,p,A,b){return fi=b,cn=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,Y.H=i===null||i.memoizedState===null?A0:Ip,pl=!1,b=f(p,A),pl=!1,dc&&(b=ml(r,f,p,A)),Xg(i),b}function Xg(i){Y.H=mc;var r=Qn!==null&&Qn.next!==null;if(fi=0,En=Qn=cn=null,Lr=!1,Cu=0,pc=null,r)throw Error(n(300));i===null||zi||(i=i.dependencies,i!==null&&xu(i)&&(zi=!0))}function ml(i,r,f,p){cn=i;var A=0;do{if(dc&&(pc=null),Cu=0,dc=!1,25<=A)throw Error(n(301));if(A+=1,En=Qn=null,i.updateQueue!=null){var b=i.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}Y.H=Ur,b=r(f,p)}while(dc);return b}function gl(){var i=Y.H,r=i.useState()[0];return r=typeof r.then=="function"?wu(r):r,i=i.useState()[0],(Qn!==null?Qn.memoizedState:null)!==i&&(cn.flags|=1024),r}function dp(){var i=ah!==0;return ah=0,i}function pp(i,r,f){r.updateQueue=i.updateQueue,r.flags&=-2053,i.lanes&=~f}function mp(i){if(Lr){for(i=i.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}Lr=!1}fi=0,En=Qn=cn=null,dc=!1,Cu=ah=0,pc=null}function Ki(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return En===null?cn.memoizedState=En=i:En=En.next=i,En}function Bi(){if(Qn===null){var i=cn.alternate;i=i!==null?i.memoizedState:null}else i=Qn.next;var r=En===null?cn.memoizedState:En.next;if(r!==null)En=r,Qn=i;else{if(i===null)throw cn.alternate===null?Error(n(467)):Error(n(310));Qn=i,i={memoizedState:Qn.memoizedState,baseState:Qn.baseState,baseQueue:Qn.baseQueue,queue:Qn.queue,next:null},En===null?cn.memoizedState=En=i:En=En.next=i}return En}function lh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wu(i){var r=Cu;return Cu+=1,pc===null&&(pc=[]),i=nh(pc,i,r),r=cn,(En===null?r.memoizedState:En.next)===null&&(r=r.alternate,Y.H=r===null||r.memoizedState===null?A0:Ip),i}
vendor: 14,637 bytes, line 32
32function Do(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return wu(i);if(i.$$typeof===D)return tn(i)}throw Error(n(438,String(i)))}function gp(i){var r=null,f=cn.updateQueue;if(f!==null&&(r=f.memoCache),r==null){var p=cn.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(r={data:p.data.map(function(A){return A.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),f===null&&(f=lh(),cn.updateQueue=f),f.memoCache=r,f=r.data[r.index],f===void 0)for(f=r.data[r.index]=Array(i),p=0;p<i;p++)f[p]=O;return r.index++,f}function Qa(i,r){return typeof r=="function"?r(i):r}function ch(i){var r=Bi();return vp(r,Qn,i)}function vp(i,r,f){var p=i.queue;if(p===null)throw Error(n(311));p.lastRenderedReducer=f;var A=i.baseQueue,b=p.pending;if(b!==null){if(A!==null){var L=A.next;A.next=b.next,b.next=L}r.baseQueue=A=b,p.pending=null}if(b=i.baseState,A===null)i.memoizedState=b;else{r=A.next;var V=L=null,ee=null,ye=r,Ie=!1;do{var ke=ye.lane&-536870913;if(ke!==ye.lane?(hn&ke)===ke:(fi&ke)===ke){var xe=ye.revertLane;if(xe===0)ee!==null&&(ee=ee.next={lane:0,revertLane:0,gesture:null,action:ye.action,hasEagerState:ye.hasEagerState,eagerState:ye.eagerState,next:null}),ke===Ya&&(Ie=!0);else if((fi&xe)===xe){ye=ye.next,xe===Ya&&(Ie=!0);continue}else ke={lane:0,revertLane:ye.revertLane,gesture:null,action:ye.action,hasEagerState:ye.hasEagerState,eagerState:ye.eagerState,next:null},ee===null?(V=ee=ke,L=b):ee=ee.next=ke,cn.lanes|=xe,Ca|=xe;ke=ye.action,pl&&f(b,ke),b=ye.hasEagerState?ye.eagerState:f(b,ke)}else xe={lane:ke,revertLane:ye.revertLane,gesture:ye.gesture,action:ye.action,hasEagerState:ye.hasEagerState,eagerState:ye.eagerState,next:null},ee===null?(V=ee=xe,L=b):ee=ee.next=xe,cn.lanes|=ke,Ca|=ke;ye=ye.next}while(ye!==null&&ye!==r);if(ee===null?L=b:ee.next=V,!Is(b,i.memoizedState)&&(zi=!0,Ie&&(f=Dr,f!==null)))throw f;i.memoizedState=b,i.baseState=L,i.baseQueue=ee,p.lastRenderedState=b}return A===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function yp(i){var r=Bi(),f=r.queue;if(f===null)throw Error(n(311));f.lastRenderedReducer=i;var p=f.dispatch,A=f.pending,b=r.memoizedState;if(A!==null){f.pending=null;var L=A=A.next;do b=i(b,L.action),L=L.next;while(L!==A);Is(b,r.memoizedState)||(zi=!0),r.memoizedState=b,r.baseQueue===null&&(r.baseState=b),f.lastRenderedState=b}return[b,p]}function Wg(i,r,f){var p=cn,A=Bi(),b=Rn;if(b){if(f===void 0)throw Error(n(407));f=f()}else f=r();var L=!Is((Qn||A).memoizedState,f);if(L&&(A.memoizedState=f,zi=!0),A=A.queue,Tp(qg.bind(null,p,A,i),[i]),A.getSnapshot!==r||L||En!==null&&En.memoizedState.tag&1){if(p.flags|=2048,Io(9,{destroy:void 0},Yg.bind(null,p,A,f,r),null),sn===null)throw Error(n(349));b||(fi&127)!==0||Jg(p,r,f)}return f}function Jg(i,r,f){i.flags|=16384,i={getSnapshot:r,value:f},r=cn.updateQueue,r===null?(r=lh(),cn.updateQueue=r,r.stores=[i]):(f=r.stores,f===null?r.stores=[i]:f.push(i))}function Yg(i,r,f,p){r.value=f,r.getSnapshot=p,Kg(r)&&Zg(i)}function qg(i,r,f){return f(function(){Kg(r)&&Zg(i)})}function Kg(i){var r=i.getSnapshot;i=i.value;try{var f=r();return!Is(i,f)}catch{return!0}}function Zg(i){var r=Ls(i,2);r!==null&&gn(r,i,2)}function _p(i){var r=Ki();if(typeof i=="function"){var f=i;if(i=f(),pl){Et(!0);try{f()}finally{Et(!1)}}}return r.memoizedState=r.baseState=i,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:i},r}function xp(i,r,f,p){return i.baseState=f,vp(i,Qn,typeof p=="function"?p:Qa)}function F_(i,r,f,p,A){if(dh(i))throw Error(n(485));if(i=r.action,i!==null){var b={payload:A,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(L){b.listeners.push(L)}};Y.T!==null?f(!0):b.isTransition=!1,p(b),f=r.pending,f===null?(b.next=r.pending=b,Qg(r,b)):(b.next=f.next,r.pending=f.next=b)}}function Qg(i,r){var f=r.action,p=r.payload,A=i.state;if(r.isTransition){var b=Y.T,L={};Y.T=L;try{var V=f(A,p),ee=Y.S;ee!==null&&ee(L,V),jg(i,r,V)}catch(ye){Ap(i,r,ye)}finally{b!==null&&L.types!==null&&(b.types=L.types),Y.T=b}}else try{b=f(A,p),jg(i,r,b)}catch(ye){Ap(i,r,ye)}}function jg(i,r,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(p){$g(i,r,p)},function(p){return Ap(i,r,p)}):$g(i,r,f)}function $g(i,r,f){r.status="fulfilled",r.value=f,e0(r),i.state=f,r=i.pending,r!==null&&(f=r.next,f===r?i.pending=null:(f=f.next,r.next=f,Qg(i,f)))}function Ap(i,r,f){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do r.status="rejected",r.reason=f,e0(r),r=r.next;while(r!==p)}i.action=null}function e0(i){i=i.listeners;for(var r=0;r<i.length;r++)(0,i[r])()}function Sp(i,r){return r}function bp(i,r){if(Rn){var f=sn.formState;if(f!==null){e:{var p=cn;if(Rn){if(ni){t:{for(var A=ni,b=cr;A.nodeType!==8;){if(!b){A=null;break t}if(A=Ba(A.nextSibling),A===null){A=null;break t}}b=A.data,A=b==="F!"||b==="F"?A:null}if(A){ni=Ba(A.nextSibling),p=A.data==="F!";break e}}ma(p)}p=!1}p&&(r=f[0])}}return f=Ki(),f.memoizedState=f.baseState=r,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sp,lastRenderedState:r},f.queue=p,f=y0.bind(null,cn,p),p.dispatch=f,p=_p(!1),b=Dp.bind(null,cn,!1,p.queue),p=Ki(),A={state:r,dispatch:null,action:i,pending:null},p.queue=A,f=F_.bind(null,cn,A,b,f),A.dispatch=f,p.memoizedState=i,[r,f,!1]}function t0(i){var r=Bi();return Mp(r,Qn,i)}function Mp(i,r,f){if(r=vp(i,r,Sp)[0],i=ch(Qa)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var p=wu(r)}catch(L){throw L===ll?pn:L}else p=r;r=Bi();var A=r.queue,b=A.dispatch;return f!==r.memoizedState&&(cn.flags|=2048,Io(9,{destroy:void 0},n0.bind(null,A,f),null)),[p,b,i]}function n0(i,r){i.action=r}function Ep(i){var r=Bi(),f=Qn;if(f!==null)return Mp(r,f,i);Bi(),r=r.memoizedState,f=Bi();var p=f.queue.dispatch;return f.memoizedState=i,[r,p,!1]}function Io(i,r,f,p){return i={tag:i,create:f,deps:p,inst:r,next:null},r=cn.updateQueue,r===null&&(r=lh(),cn.updateQueue=r),f=r.lastEffect,f===null?r.lastEffect=i.next=i:(p=f.next,f.next=i,i.next=p,r.lastEffect=i),i}function uh(){return Bi().memoizedState}function fh(i,r,f,p){var A=Ki();cn.flags|=i,A.memoizedState=Io(1|r,{destroy:void 0},f,p===void 0?null:p)}function hh(i,r,f,p){var A=Bi();p=p===void 0?null:p;var b=A.memoizedState.inst;Qn!==null&&p!==null&&hp(p,Qn.memoizedState.deps)?A.memoizedState=Io(r,b,f,p):(cn.flags|=i,A.memoizedState=Io(1|r,b,f,p))}function i0(i,r){fh(8390656,8,i,r)}function Tp(i,r){hh(2048,8,i,r)}function s0(i){cn.flags|=4;var r=cn.updateQueue;if(r===null)r=lh(),cn.updateQueue=r,r.events=[i];else{var f=r.events;f===null?r.events=[i]:f.push(i)}}function r0(i){var r=Bi().memoizedState;return s0({ref:r,nextImpl:i}),function(){if((kt&2)!==0)throw Error(n(440));return r.impl.apply(void 0,arguments)}}function a0(i,r){return hh(4,2,i,r)}function o0(i,r){return hh(4,4,i,r)}function l0(i,r){if(typeof r=="function"){i=i();var f=r(i);return function(){typeof f=="function"?f():r(null)}}if(r!=null)return i=i(),r.current=i,function(){r.current=null}}function c0(i,r,f){f=f!=null?f.concat([i]):null,hh(4,4,l0.bind(null,r,i),f)}function Cp(){}function u0(i,r){var f=Bi();r=r===void 0?null:r;var p=f.memoizedState;return r!==null&&hp(r,p[1])?p[0]:(f.memoizedState=[i,r],i)}function f0(i,r){var f=Bi();r=r===void 0?null:r;var p=f.memoizedState;if(r!==null&&hp(r,p[1]))return p[0];if(p=i(),pl){Et(!0);try{i()}finally{Et(!1)}}return f.memoizedState=[p,r],p}function wp(i,r,f){return f===void 0||(fi&1073741824)!==0&&(hn&261930)===0?i.memoizedState=r:(i.memoizedState=f,i=Sn(),cn.lanes|=i,Ca|=i,f)}function h0(i,r,f,p){return Is(f,r)?f:hc.current!==null?(i=wp(i,f,p),Is(i,r)||(zi=!0),i):(fi&42)===0||(fi&1073741824)!==0&&(hn&261930)===0?(zi=!0,i.memoizedState=f):(i=Sn(),cn.lanes|=i,Ca|=i,r)}function d0(i,r,f,p,A){var b=$.p;$.p=b!==0&&8>b?b:8;var L=Y.T,V={};Y.T=V,Dp(i,!1,r,f);try{var ee=A(),ye=Y.S;if(ye!==null&&ye(V,ee),ee!==null&&typeof ee=="object"&&typeof ee.then=="function"){var Ie=rp(ee,p);Ru(i,r,Ie,gr(i))}else Ru(i,r,p,gr(i))}catch(ke){Ru(i,r,{then:function(){},status:"rejected",reason:ke},gr())}finally{$.p=b,L!==null&&V.types!==null&&(L.types=V.types),Y.T=L}}function O_(){}function Rp(i,r,f,p){if(i.tag!==5)throw Error(n(476));var A=p0(i).queue;d0(i,A,r,pe,f===null?O_:function(){return m0(i),f(p)})}function p0(i){var r=i.memoizedState;if(r!==null)return r;r={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:pe},next:null};var f={};return r.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:f},next:null},i.memoizedState=r,i=i.alternate,i!==null&&(i.memoizedState=r),r}function m0(i){var r=p0(i);r.next===null&&(r=i.alternate.memoizedState),Ru(i,r.next.queue,{},gr())}function Bp(){return tn(jp)}function g0(){return Bi().memoizedState}function v0(){return Bi().memoizedState}function P_(i){for(var r=i.return;r!==null;){switch(r.tag){case 24:case 3:var f=gr();i=Ka(f);var p=Ro(r,i,f);p!==null&&(gn(p,r,f),Bo(p,r,f)),r={cache:np()},i.payload=r;return}r=r.return}}function z_(i,r,f){var p=gr();f={lane:p,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},dh(i)?_0(r,f):(f=Xf(i,r,f,p),f!==null&&(gn(f,i,p),x0(f,r,p)))}function y0(i,r,f){var p=gr();Ru(i,r,f,p)}function Ru(i,r,f,p){var A={lane:p,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null};if(dh(i))_0(r,A);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=r.lastRenderedReducer,b!==null))try{var L=r.lastRenderedState,V=b(L,f);if(A.hasEagerState=!0,A.eagerState=V,Is(V,L))return rs(i,r,A,0),sn===null&&yu(),!1}catch{}finally{}if(f=Xf(i,r,A,p),f!==null)return gn(f,i,p),x0(f,r,p),!0}return!1}function Dp(i,r,f,p){if(p={lane:2,revertLane:be(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},dh(i)){if(r)throw Error(n(479))}else r=Xf(i,f,p,2),r!==null&&gn(r,i,2)}function dh(i){var r=i.alternate;return i===cn||r!==null&&r===cn}function _0(i,r){dc=Lr=!0;var f=i.pending;f===null?r.next=r:(r.next=f.next,f.next=r),i.pending=r}function x0(i,r,f){if((f&4194048)!==0){var p=r.lanes;p&=i.pendingLanes,f|=p,r.lanes=f,aa(i,f)}}var mc={readContext:tn,use:Do,useCallback:gi,useContext:gi,useEffect:gi,useImperativeHandle:gi,useLayoutEffect:gi,useInsertionEffect:gi,useMemo:gi,useReducer:gi,useRef:gi,useState:gi,useDebugValue:gi,useDeferredValue:gi,useTransition:gi,useSyncExternalStore:gi,useId:gi,useHostTransitionStatus:gi,useFormState:gi,useActionState:gi,useOptimistic:gi,useMemoCache:gi,useCacheRefresh:gi};mc.useEffectEvent=gi;var A0={readContext:tn,use:Do,useCallback:function(i,r){return Ki().memoizedState=[i,r===void 0?null:r],i},useContext:tn,useEffect:i0,useImperativeHandle:function(i,r,f){f=f!=null?f.concat([i]):null,fh(4194308,4,l0.bind(null,r,i),f)},useLayoutEffect:function(i,r){return fh(4194308,4,i,r)},useInsertionEffect:function(i,r){fh(4,2,i,r)},useMemo:function(i,r){var f=Ki();r=r===void 0?null:r;var p=i();if(pl){Et(!0);try{i()}finally{Et(!1)}}return f.memoizedState=[p,r],p},useReducer:function(i,r,f){var p=Ki();if(f!==void 0){var A=f(r);if(pl){Et(!0);try{f(r)}finally{Et(!1)}}}else A=r;return p.memoizedState=p.baseState=A,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:A},p.queue=i,i=i.dispatch=z_.bind(null,cn,i),[p.memoizedState,i]},useRef:function(i){var r=Ki();return i={current:i},r.memoizedState=i},useState:function(i){i=_p(i);var r=i.queue,f=y0.bind(null,cn,r);return r.dispatch=f,[i.memoizedState,f]},useDebugValue:Cp,useDeferredValue:function(i,r){var f=Ki();return wp(f,i,r)},useTransition:function(){var i=_p(!1);return i=d0.bind(null,cn,i.queue,!0,!1),Ki().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,r,f){var p=cn,A=Ki();if(Rn){if(f===void 0)throw Error(n(407));f=f()}else{if(f=r(),sn===null)throw Error(n(349));(hn&127)!==0||Jg(p,r,f)}A.memoizedState=f;var b={value:f,getSnapshot:r};return A.queue=b,i0(qg.bind(null,p,b,i),[i]),p.flags|=2048,Io(9,{destroy:void 0},Yg.bind(null,p,b,f,r),null),f},useId:function(){var i=Ki(),r=sn.identifierPrefix;if(Rn){var f=qr,p=mi;f=(p&~(1<<32-_t(p)-1)).toString(32)+f,r="_"+r+"R_"+f,f=ah++,0<f&&(r+="H"+f.toString(32)),r+="_"}else f=fp++,r="_"+r+"r_"+f.toString(32)+"_";return i.memoizedState=r},useHostTransitionStatus:Bp,useFormState:bp,useActionState:bp,useOptimistic:function(i){var r=Ki();r.memoizedState=r.baseState=i;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=f,r=Dp.bind(null,cn,!0,f),f.dispatch=r,[i,r]},useMemoCache:gp,useCacheRefresh:function(){return Ki().memoizedState=P_.bind(null,cn)},useEffectEvent:function(i){var r=Ki(),f={impl:i};return r.memoizedState=f,function(){if((kt&2)!==0)throw Error(n(440));return f.impl.apply(void 0,arguments)}}},Ip={readContext:tn,use:Do,useCallback:u0,useContext:tn,useEffect:Tp,useImperativeHandle:c0,useInsertionEffect:a0,useLayoutEffect:o0,useMemo:f0,useReducer:ch,useRef:uh,useState:function(){return ch(Qa)},useDebugValue:Cp,useDeferredValue:function(i,r){var f=Bi();return h0(f,Qn.memoizedState,i,r)},useTransition:function(){var i=ch(Qa)[0],r=Bi().memoizedState;return[typeof i=="boolean"?i:wu(i),r]},useSyncExternalStore:Wg,useId:g0,useHostTransitionStatus:Bp,useFormState:t0,useActionState:t0,useOptimistic:function(i,r){var f=Bi();return xp(f,Qn,i,r)},useMemoCache:gp,useCacheRefresh:v0};Ip.useEffectEvent=r0;var Ur={readContext:tn,use:Do,useCallback:u0,useContext:tn,useEffect:Tp,useImperativeHandle:c0,useInsertionEffect:a0,useLayoutEffect:o0,useMemo:f0,useReducer:yp,useRef:uh,useState:function(){return yp(Qa)},useDebugValue:Cp,useDeferredValue:function(i,r){var f=Bi();return Qn===null?wp(f,i,r):h0(f,Qn.memoizedState,i,r)},useTransition:function(){var i=yp(Qa)[0],r=Bi().memoizedState;return[typeof i=="boolean"?i:wu(i),r]},useSyncExternalStore:Wg,useId:g0,useHostTransitionStatus:Bp,useFormState:Ep,useActionState:Ep,useOptimistic:function(i,r){var f=Bi();return Qn!==null?xp(f,Qn,i,r):(f.baseState=i,[i,f.queue.dispatch])},useMemoCache:gp,useCacheRefresh:v0};Ur.useEffectEvent=r0;function ph(i,r,f,p){r=i.memoizedState,f=f(p,r),f=f==null?r:v({},r,f),i.memoizedState=f,i.lanes===0&&(i.updateQueue.baseState=f)}var Bu={enqueueSetState:function(i,r,f){i=i._reactInternals;var p=gr(),A=Ka(p);A.payload=r,f!=null&&(A.callback=f),r=Ro(i,A,p),r!==null&&(gn(r,i,p),Bo(r,i,p))},enqueueReplaceState:function(i,r,f){i=i._reactInternals;var p=gr(),A=Ka(p);A.tag=1,A.payload=r,f!=null&&(A.callback=f),r=Ro(i,A,p),r!==null&&(gn(r,i,p),Bo(r,i,p))},enqueueForceUpdate:function(i,r){i=i._reactInternals;var f=gr(),p=Ka(f);p.tag=2,r!=null&&(p.callback=r),r=Ro(i,p,f),r!==null&&(gn(r,i,f),Bo(r,i,f))}};
vendor: 13,084 bytes, line 32
32function Lp(i,r,f,p,A,b,L){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,b,L):r.prototype&&r.prototype.isPureReactComponent?!Ql(f,p)||!Ql(A,b):!0}function Up(i,r,f,p){i=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(f,p),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(f,p),r.state!==i&&Bu.enqueueReplaceState(r,r.state,null)}function Lo(i,r){var f=r;if("ref"in r){f={};for(var p in r)p!=="ref"&&(f[p]=r[p])}if(i=i.defaultProps){f===r&&(f=v({},f));for(var A in i)f[A]===void 0&&(f[A]=i[A])}return f}function S0(i){vu(i)}function Np(i){console.error(i)}function Fp(i){vu(i)}function mh(i,r){try{var f=i.onUncaughtError;f(r.value,{componentStack:r.stack})}catch(p){setTimeout(function(){throw p})}}function b0(i,r,f){try{var p=i.onCaughtError;p(f.value,{componentStack:f.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(A){setTimeout(function(){throw A})}}function Op(i,r,f){return f=Ka(f),f.tag=3,f.payload={element:null},f.callback=function(){mh(i,r)},f}function Pp(i){return i=Ka(i),i.tag=3,i}function M0(i,r,f,p){var A=f.type.getDerivedStateFromError;if(typeof A=="function"){var b=p.value;i.payload=function(){return A(b)},i.callback=function(){b0(r,f,p)}}var L=f.stateNode;L!==null&&typeof L.componentDidCatch=="function"&&(i.callback=function(){b0(r,f,p),typeof A!="function"&&(Li===null?Li=new Set([this]):Li.add(this));var V=p.stack;this.componentDidCatch(p.value,{componentStack:V!==null?V:""})})}function Zi(i,r,f,p,A){if(f.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(r=f.alternate,r!==null&&_a(r,f,A,!0),f=qs.current,f!==null){switch(f.tag){case 31:case 13:return Ns===null?Sc():f.alternate===null&&vi===0&&(vi=3),f.flags&=-257,f.flags|=65536,f.lanes=A,p===th?f.flags|=16384:(r=f.updateQueue,r===null?f.updateQueue=new Set([p]):r.add(p),ku(i,p,A)),!1;case 22:return f.flags|=65536,p===th?f.flags|=16384:(r=f.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([p])},f.updateQueue=r):(f=r.retryQueue,f===null?r.retryQueue=new Set([p]):f.add(p)),ku(i,p,A)),!1}throw Error(n(435,f.tag))}return ku(i,p,A),Sc(),!1}if(Rn)return r=qs.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=A,p!==rc&&(i=Error(n(422),{cause:p}),ga(lr(i,f)))):(p!==rc&&(r=Error(n(423),{cause:p}),ga(lr(r,f))),i=i.current.alternate,i.flags|=65536,A&=-A,i.lanes|=A,p=lr(p,f),A=Op(i.stateNode,p,A),Jt(i,A),vi!==4&&(vi=2)),!1;var b=Error(n(520),{cause:p});if(b=lr(b,f),Ml===null?Ml=[b]:Ml.push(b),vi!==4&&(vi=2),r===null)return!0;p=lr(p,f),f=r;do{switch(f.tag){case 3:return f.flags|=65536,i=A&-A,f.lanes|=i,i=Op(f.stateNode,p,i),Jt(f,i),!1;case 1:if(r=f.type,b=f.stateNode,(f.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Li===null||!Li.has(b))))return f.flags|=65536,A&=-A,f.lanes|=A,A=Pp(A),M0(A,i,f,p),Jt(f,A),!1}f=f.return}while(f!==null);return!1}var gh=Error(n(461)),zi=!1;function as(i,r,f,p){r.child=i===null?sh(r,null,f,p):qa(r,i.child,f,p)}function zp(i,r,f,p,A){f=f.render;var b=r.ref;if("ref"in p){var L={};for(var V in p)V!=="ref"&&(L[V]=p[V])}else L=p;return Co(r),p=oh(i,r,f,L,b,A),V=dp(),i!==null&&!zi?(pp(i,r,A),Di(i,r,A)):(Rn&&V&&pa(r),r.flags|=1,as(i,r,p,A),r.child)}function vl(i,r,f,p,A){if(i===null){var b=f.type;return typeof b=="function"&&!Wf(b)&&b.defaultProps===void 0&&f.compare===null?(r.tag=15,r.type=b,vh(i,r,b,p,A)):(i=ha(f.type,null,p,r,r.mode,A),i.ref=r.ref,i.return=r,r.child=i)}if(b=i.child,!bh(i,A)){var L=b.memoizedProps;if(f=f.compare,f=f!==null?f:Ql,f(L,p)&&i.ref===r.ref)return Di(i,r,A)}return r.flags|=1,i=Ws(b,p),i.ref=r.ref,i.return=r,r.child=i}function vh(i,r,f,p,A){if(i!==null){var b=i.memoizedProps;if(Ql(b,p)&&i.ref===r.ref)if(zi=!1,r.pendingProps=p=b,bh(i,A))(i.flags&131072)!==0&&(zi=!0);else return r.lanes=i.lanes,Di(i,r,A)}return gc(i,r,f,p,A)}function yl(i,r,f,p){var A=p.children,b=i!==null?i.memoizedState:null;if(i===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((r.flags&128)!==0){if(b=b!==null?b.baseLanes|f:f,i!==null){for(p=r.child=i.child,A=0;p!==null;)A=A|p.lanes|p.childLanes,p=p.sibling;p=A&~b}else p=0,r.child=null;return Zs(i,r,b,f,p)}if((f&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},i!==null&&Au(r,b!==null?b.cachePool:null),b!==null?kg(r,b):cp(),Vg(r);else return p=r.lanes=536870912,Zs(i,r,b!==null?b.baseLanes|f:f,f,p)}else b!==null?(Au(r,b.cachePool),kg(r,b),Ks(),r.memoizedState=null):(i!==null&&Au(r,null),cp(),Ks());return as(i,r,A,f),r.child}function Aa(i,r){return i!==null&&i.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Zs(i,r,f,p,A){var b=eh();return b=b===null?null:{parent:Pi._currentValue,pool:b},r.memoizedState={baseLanes:f,cachePool:b},i!==null&&Au(r,null),cp(),Vg(r),i!==null&&_a(i,r,p,!0),r.childLanes=A,null}function yh(i,r){return r=Sh({mode:r.mode,children:r.children},i.mode),r.ref=i.ref,i.child=r,r.return=i,r}function E0(i,r,f){return qa(r,i.child,null,f),i=yh(r,r.pendingProps),i.flags|=2,Ri(r),r.memoizedState=null,i}function _h(i,r,f){var p=r.pendingProps,A=(r.flags&128)!==0;if(r.flags&=-129,i===null){if(Rn){if(p.mode==="hidden")return i=yh(r,p),r.lanes=536870912,Aa(null,i);if(up(r),(i=ni)?(i=vb(i,cr),i=i!==null&&i.data==="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:Xa!==null?{id:mi,overflow:qr}:null,retryLane:536870912,hydrationErrors:null},f=nc(i),f.return=r,r.child=f,Si=r,ni=null)):i=null,i===null)throw ma(r);return r.lanes=536870912,null}return yh(r,p)}var b=i.memoizedState;if(b!==null){var L=b.dehydrated;if(up(r),A)if(r.flags&256)r.flags&=-257,r=E0(i,r,f);else if(r.memoizedState!==null)r.child=i.child,r.flags|=128,r=null;else throw Error(n(558));else if(zi||_a(i,r,f,!1),A=(f&i.childLanes)!==0,zi||A){if(p=sn,p!==null&&(L=Mr(p,f),L!==0&&L!==b.retryLane))throw b.retryLane=L,Ls(i,L),gn(p,i,L),gh;Sc(),r=E0(i,r,f)}else i=b.treeContext,ni=Ba(L.nextSibling),Si=r,Rn=!0,Wa=null,cr=!1,i!==null&&Kf(r,i),r=yh(r,p),r.flags|=4096;return r}return i=Ws(i.child,{mode:p.mode,children:p.children}),i.ref=r.ref,r.child=i,i.return=r,i}function _l(i,r){var f=r.ref;if(f===null)i!==null&&i.ref!==null&&(r.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(n(284));(i===null||i.ref!==f)&&(r.flags|=4194816)}}function gc(i,r,f,p,A){return Co(r),f=oh(i,r,f,p,void 0,A),p=dp(),i!==null&&!zi?(pp(i,r,A),Di(i,r,A)):(Rn&&p&&pa(r),r.flags|=1,as(i,r,f,A),r.child)}function Du(i,r,f,p,A,b){return Co(r),r.updateQueue=null,f=ml(r,p,f,A),Xg(i),p=dp(),i!==null&&!zi?(pp(i,r,b),Di(i,r,b)):(Rn&&p&&pa(r),r.flags|=1,as(i,r,f,b),r.child)}function xh(i,r,f,p,A){if(Co(r),r.stateNode===null){var b=Ao,L=f.contextType;typeof L=="object"&&L!==null&&(b=tn(L)),b=new f(p,b),r.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Bu,r.stateNode=b,b._reactInternals=r,b=r.stateNode,b.props=p,b.state=r.memoizedState,b.refs={},Mu(r),L=f.contextType,b.context=typeof L=="object"&&L!==null?tn(L):Ao,b.state=r.memoizedState,L=f.getDerivedStateFromProps,typeof L=="function"&&(ph(r,f,L,p),b.state=r.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(L=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),L!==b.state&&Bu.enqueueReplaceState(b,b.state,null),uc(r,p,b,A),Eu(),b.state=r.memoizedState),typeof b.componentDidMount=="function"&&(r.flags|=4194308),p=!0}else if(i===null){b=r.stateNode;var V=r.memoizedProps,ee=Lo(f,V);b.props=ee;var ye=b.context,Ie=f.contextType;L=Ao,typeof Ie=="object"&&Ie!==null&&(L=tn(Ie));var ke=f.getDerivedStateFromProps;Ie=typeof ke=="function"||typeof b.getSnapshotBeforeUpdate=="function",V=r.pendingProps!==V,Ie||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(V||ye!==L)&&Up(r,b,p,L),Us=!1;var xe=r.memoizedState;b.state=xe,uc(r,p,b,A),Eu(),ye=r.memoizedState,V||xe!==ye||Us?(typeof ke=="function"&&(ph(r,f,ke,p),ye=r.memoizedState),(ee=Us||Lp(r,f,ee,p,xe,ye,L))?(Ie||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(r.flags|=4194308)):(typeof b.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=p,r.memoizedState=ye),b.props=p,b.state=ye,b.context=L,p=ee):(typeof b.componentDidMount=="function"&&(r.flags|=4194308),p=!1)}else{b=r.stateNode,op(i,r),L=r.memoizedProps,Ie=Lo(f,L),b.props=Ie,ke=r.pendingProps,xe=b.context,ye=f.contextType,ee=Ao,typeof ye=="object"&&ye!==null&&(ee=tn(ye)),V=f.getDerivedStateFromProps,(ye=typeof V=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(L!==ke||xe!==ee)&&Up(r,b,p,ee),Us=!1,xe=r.memoizedState,b.state=xe,uc(r,p,b,A),Eu();var we=r.memoizedState;L!==ke||xe!==we||Us||i!==null&&i.dependencies!==null&&xu(i.dependencies)?(typeof V=="function"&&(ph(r,f,V,p),we=r.memoizedState),(Ie=Us||Lp(r,f,Ie,p,xe,we,ee)||i!==null&&i.dependencies!==null&&xu(i.dependencies))?(ye||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(p,we,ee),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(p,we,ee)),typeof b.componentDidUpdate=="function"&&(r.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof b.componentDidUpdate!="function"||L===i.memoizedProps&&xe===i.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&xe===i.memoizedState||(r.flags|=1024),r.memoizedProps=p,r.memoizedState=we),b.props=p,b.state=we,b.context=ee,p=Ie):(typeof b.componentDidUpdate!="function"||L===i.memoizedProps&&xe===i.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&xe===i.memoizedState||(r.flags|=1024),p=!1)}return b=p,_l(i,r),p=(r.flags&128)!==0,b||p?(b=r.stateNode,f=p&&typeof f.getDerivedStateFromError!="function"?null:b.render(),r.flags|=1,i!==null&&p?(r.child=qa(r,i.child,null,A),r.child=qa(r,null,f,A)):as(i,r,f,A),r.memoizedState=b.state,i=r.child):i=Di(i,r,A),i}function T0(i,r,f,p){return Eo(),r.flags|=256,as(i,r,f,p),r.child}var Gp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ms(i){return{baseLanes:i,cachePool:ap()}}function Ah(i,r,f){return i=i!==null?i.childLanes&~f:0,r&&(i|=Ps),i}function C0(i,r,f){var p=r.pendingProps,A=!1,b=(r.flags&128)!==0,L;if((L=b)||(L=i!==null&&i.memoizedState===null?!1:(Bn.current&2)!==0),L&&(A=!0,r.flags&=-129),L=(r.flags&32)!==0,r.flags&=-33,i===null){if(Rn){if(A?Za(r):Ks(),(i=ni)?(i=vb(i,cr),i=i!==null&&i.data!=="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:Xa!==null?{id:mi,overflow:qr}:null,retryLane:536870912,hydrationErrors:null},f=nc(i),f.return=r,r.child=f,Si=r,ni=null)):i=null,i===null)throw ma(r);return $_(i)?r.lanes=32:r.lanes=536870912,null}var V=p.children;return p=p.fallback,A?(Ks(),A=r.mode,V=Sh({mode:"hidden",children:V},A),p=So(p,A,f,null),V.return=r,p.return=r,V.sibling=p,r.child=V,p=r.child,p.memoizedState=Ms(f),p.childLanes=Ah(i,L,f),r.memoizedState=Gp,Aa(null,p)):(Za(r),Iu(r,V))}var ee=i.memoizedState;if(ee!==null&&(V=ee.dehydrated,V!==null)){if(b)r.flags&256?(Za(r),r.flags&=-257,r=Hp(i,r,f)):r.memoizedState!==null?(Ks(),r.child=i.child,r.flags|=128,r=null):(Ks(),V=p.fallback,A=r.mode,p=Sh({mode:"visible",children:p.children},A),V=So(V,A,f,null),V.flags|=2,p.return=r,V.return=r,p.sibling=V,r.child=p,qa(r,i.child,null,f),p=r.child,p.memoizedState=Ms(f),p.childLanes=Ah(i,L,f),r.memoizedState=Gp,r=Aa(null,p));else if(Za(r),$_(V)){if(L=V.nextSibling&&V.nextSibling.dataset,L)var ye=L.dgst;L=ye,p=Error(n(419)),p.stack="",p.digest=L,ga({value:p,source:null,stack:null}),r=Hp(i,r,f)}else if(zi||_a(i,r,f,!1),L=(f&i.childLanes)!==0,zi||L){if(L=sn,L!==null&&(p=Mr(L,f),p!==0&&p!==ee.retryLane))throw ee.retryLane=p,Ls(i,p),gn(L,i,p),gh;j_(V)||Sc(),r=Hp(i,r,f)}else j_(V)?(r.flags|=192,r.child=i.child,r=null):(i=ee.treeContext,ni=Ba(V.nextSibling),Si=r,Rn=!0,Wa=null,cr=!1,i!==null&&Kf(r,i),r=Iu(r,p.children),r.flags|=4096);return r}return A?(Ks(),V=p.fallback,A=r.mode,ee=i.child,ye=ee.sibling,p=Ws(ee,{mode:"hidden",children:p.children}),p.subtreeFlags=ee.subtreeFlags&65011712,ye!==null?V=Ws(ye,V):(V=So(V,A,f,null),V.flags|=2),V.return=r,p.return=r,p.sibling=V,r.child=p,Aa(null,p),p=r.child,V=i.child.memoizedState,V===null?V=Ms(f):(A=V.cachePool,A!==null?(ee=Pi._currentValue,A=A.parent!==ee?{parent:ee,pool:ee}
vendor: 6,723 bytes, line 32
32:A):A=ap(),V={baseLanes:V.baseLanes|f,cachePool:A}),p.memoizedState=V,p.childLanes=Ah(i,L,f),r.memoizedState=Gp,Aa(i.child,p)):(Za(r),f=i.child,i=f.sibling,f=Ws(f,{mode:"visible",children:p.children}),f.return=r,f.sibling=null,i!==null&&(L=r.deletions,L===null?(r.deletions=[i],r.flags|=16):L.push(i)),r.child=f,r.memoizedState=null,f)}function Iu(i,r){return r=Sh({mode:"visible",children:r},i.mode),r.return=i,i.child=r}function Sh(i,r){return i=pi(22,i,null,r),i.lanes=0,i}function Hp(i,r,f){return qa(r,i.child,null,f),i=Iu(r,r.pendingProps.children),i.flags|=2,r.memoizedState=null,i}function w0(i,r,f){i.lanes|=r;var p=i.alternate;p!==null&&(p.lanes|=r),Qf(i.return,r,f)}function xl(i,r,f,p,A,b){var L=i.memoizedState;L===null?i.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:p,tail:f,tailMode:A,treeForkCount:b}:(L.isBackwards=r,L.rendering=null,L.renderingStartTime=0,L.last=p,L.tail=f,L.tailMode=A,L.treeForkCount=b)}function Qs(i,r,f){var p=r.pendingProps,A=p.revealOrder,b=p.tail;p=p.children;var L=Bn.current,V=(L&2)!==0;if(V?(L=L&1|2,r.flags|=128):L&=1,Ve(Bn,L),as(i,r,p,f),p=Rn?sc:0,!V&&i!==null&&(i.flags&128)!==0)e:for(i=r.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&w0(i,f,r);else if(i.tag===19)w0(i,f,r);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(A){case"forwards":for(f=r.child,A=null;f!==null;)i=f.alternate,i!==null&&fr(i)===null&&(A=f),f=f.sibling;f=A,f===null?(A=r.child,r.child=null):(A=f.sibling,f.sibling=null),xl(r,!1,A,f,b,p);break;case"backwards":case"unstable_legacy-backwards":for(f=null,A=r.child,r.child=null;A!==null;){if(i=A.alternate,i!==null&&fr(i)===null){r.child=A;break}i=A.sibling,A.sibling=f,f=A,A=i}xl(r,!0,f,null,b,p);break;case"together":xl(r,!1,null,null,void 0,p);break;default:r.memoizedState=null}return r.child}function Di(i,r,f){if(i!==null&&(r.dependencies=i.dependencies),Ca|=r.lanes,(f&r.childLanes)===0)if(i!==null){if(_a(i,r,f,!1),(f&r.childLanes)===0)return null}else return null;if(i!==null&&r.child!==i.child)throw Error(n(153));if(r.child!==null){for(i=r.child,f=Ws(i,i.pendingProps),r.child=f,f.return=r;i.sibling!==null;)i=i.sibling,f=f.sibling=Ws(i,i.pendingProps),f.return=r;f.sibling=null}return r.child}function bh(i,r){return(i.lanes&r)!==0?!0:(i=i.dependencies,!!(i!==null&&xu(i)))}function G_(i,r,f){switch(r.tag){case 3:mt(r,r.stateNode.containerInfo),Ja(r,Pi,i.memoizedState.cache),Eo();break;case 27:case 5:wt(r);break;case 4:mt(r,r.stateNode.containerInfo);break;case 10:Ja(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,up(r),null;break;case 13:var p=r.memoizedState;if(p!==null)return p.dehydrated!==null?(Za(r),r.flags|=128,null):(f&r.child.childLanes)!==0?C0(i,r,f):(Za(r),i=Di(i,r,f),i!==null?i.sibling:null);Za(r);break;case 19:var A=(i.flags&128)!==0;if(p=(f&r.childLanes)!==0,p||(_a(i,r,f,!1),p=(f&r.childLanes)!==0),A){if(p)return Qs(i,r,f);r.flags|=128}if(A=r.memoizedState,A!==null&&(A.rendering=null,A.tail=null,A.lastEffect=null),Ve(Bn,Bn.current),p)break;return null;case 22:return r.lanes=0,yl(i,r,f,r.pendingProps);case 24:Ja(r,Pi,i.memoizedState.cache)}return Di(i,r,f)}function Mh(i,r,f){if(i!==null)if(i.memoizedProps!==r.pendingProps)zi=!0;else{if(!bh(i,f)&&(r.flags&128)===0)return zi=!1,G_(i,r,f);zi=(i.flags&131072)!==0}else zi=!1,Rn&&(r.flags&1048576)!==0&&Ng(r,sc,r.index);switch(r.lanes=0,r.tag){case 16:e:{var p=r.pendingProps;if(i=cl(r.elementType),r.type=i,typeof i=="function")Wf(i)?(p=Lo(i,p),r.tag=1,r=xh(null,r,i,p,f)):(r.tag=0,r=gc(null,r,i,p,f));else{if(i!=null){var A=i.$$typeof;if(A===U){r.tag=11,r=zp(null,r,i,p,f);break e}else if(A===X){r.tag=14,r=vl(null,r,i,p,f);break e}}throw r=re(i)||i,Error(n(306,r,""))}}return r;case 0:return gc(i,r,r.type,r.pendingProps,f);case 1:return p=r.type,A=Lo(p,r.pendingProps),xh(i,r,p,A,f);case 3:e:{if(mt(r,r.stateNode.containerInfo),i===null)throw Error(n(387));p=r.pendingProps;var b=r.memoizedState;A=b.element,op(i,r),uc(r,p,null,f);var L=r.memoizedState;if(p=L.cache,Ja(r,Pi,p),p!==b.cache&&jf(r,[Pi],f,!0),Eu(),p=L.element,b.isDehydrated)if(b={element:p,isDehydrated:!1,cache:L.cache},r.updateQueue.baseState=b,r.memoizedState=b,r.flags&256){r=T0(i,r,p,f);break e}else if(p!==A){A=lr(Error(n(424)),r),ga(A),r=T0(i,r,p,f);break e}else{switch(i=r.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(ni=Ba(i.firstChild),Si=r,Rn=!0,Wa=null,cr=!0,f=sh(r,null,p,f),r.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling}else{if(Eo(),p===A){r=Di(i,r,f);break e}as(i,r,p,f)}r=r.child}return r;case 26:return _l(i,r),i===null?(f=bb(r.type,null,r.pendingProps,null))?r.memoizedState=f:Rn||(f=r.type,i=r.pendingProps,p=I0(me.current).createElement(f),p[ai]=r,p[F]=i,Gs(p,f,i),G(p),r.stateNode=p):r.memoizedState=bb(r.type,i.memoizedProps,r.pendingProps,i.memoizedState),null;case 27:return wt(r),i===null&&Rn&&(p=r.stateNode=xb(r.type,r.pendingProps,me.current),Si=r,cr=!0,A=ni,Tc(r.type)?(ex=A,ni=Ba(p.firstChild)):ni=A),as(i,r,r.pendingProps.children,f),_l(i,r),i===null&&(r.flags|=4194304),r.child;case 5:return i===null&&Rn&&((A=p=ni)&&(p=RC(p,r.type,r.pendingProps,cr),p!==null?(r.stateNode=p,Si=r,ni=Ba(p.firstChild),cr=!1,A=!0):A=!1),A||ma(r)),wt(r),A=r.type,b=r.pendingProps,L=i!==null?i.memoizedProps:null,p=b.children,K_(A,b)?p=null:L!==null&&K_(A,L)&&(r.flags|=32),r.memoizedState!==null&&(A=oh(i,r,gl,null,null,f),jp._currentValue=A),_l(i,r),as(i,r,p,f),r.child;case 6:return i===null&&Rn&&((i=f=ni)&&(f=BC(f,r.pendingProps,cr),f!==null?(r.stateNode=f,Si=r,ni=null,i=!0):i=!1),i||ma(r)),null;case 13:return C0(i,r,f);case 4:return mt(r,r.stateNode.containerInfo),p=r.pendingProps,i===null?r.child=qa(r,null,p,f):as(i,r,p,f),r.child;case 11:return zp(i,r,r.type,r.pendingProps,f);case 7:return as(i,r,r.pendingProps,f),r.child;case 8:return as(i,r,r.pendingProps.children,f),r.child;case 12:return as(i,r,r.pendingProps.children,f),r.child;case 10:return p=r.pendingProps,Ja(r,r.type,p.value),as(i,r,p.children,f),r.child;case 9:return A=r.type._context,p=r.pendingProps.children,Co(r),A=tn(A),p=p(A),r.flags|=1,as(i,r,p,f),r.child;case 14:return vl(i,r,r.type,r.pendingProps,f);case 15:return vh(i,r,r.type,r.pendingProps,f);case 19:return Qs(i,r,f);case 31:return _h(i,r,f);case 22:return yl(i,r,f,r.pendingProps);case 24:return Co(r),p=tn(Pi),i===null?(A=eh(),A===null&&(A=sn,b=np(),A.pooledCache=b,b.refCount++,b!==null&&(A.pooledCacheLanes|=f),A=b),r.memoizedState={parent:p,cache:A},Mu(r),Ja(r,Pi,A)):((i.lanes&f)!==0&&(op(i,r),uc(r,null,null,f),Eu()),A=i.memoizedState,b
vendor: 4,208 bytes, line 32
32=r.memoizedState,A.parent!==p?(A={parent:p,cache:p},r.memoizedState=A,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=A),Ja(r,Pi,p)):(p=b.cache,Ja(r,Pi,p),p!==A.cache&&jf(r,[Pi],f,!0))),as(i,r,r.pendingProps.children,f),r.child;case 29:throw r.pendingProps}throw Error(n(156,r.tag))}function Sa(i){i.flags|=4}function Lu(i,r,f,p,A){if((r=(i.mode&32)!==0)&&(r=!1),r){if(i.flags|=16777216,(A&335544128)===A)if(i.stateNode.complete)i.flags|=8192;else if(_i())i.flags|=8192;else throw xa=th,Su}else i.flags&=-16777217}function kp(i,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!wb(r))if(_i())i.flags|=8192;else throw xa=th,Su}function ja(i,r){r!==null&&(i.flags|=4),i.flags&16384&&(r=i.tag!==22?Mn():536870912,i.lanes|=r,oi|=r)}function ba(i,r){if(!Rn)switch(i.tailMode){case"hidden":r=i.tail;for(var f=null;r!==null;)r.alternate!==null&&(f=r),r=r.sibling;f===null?i.tail=null:f.sibling=null;break;case"collapsed":f=i.tail;for(var p=null;f!==null;)f.alternate!==null&&(p=f),f=f.sibling;p===null?r||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function jn(i){var r=i.alternate!==null&&i.alternate.child===i.child,f=0,p=0;if(r)for(var A=i.child;A!==null;)f|=A.lanes|A.childLanes,p|=A.subtreeFlags&65011712,p|=A.flags&65011712,A.return=i,A=A.sibling;else for(A=i.child;A!==null;)f|=A.lanes|A.childLanes,p|=A.subtreeFlags,p|=A.flags,A.return=i,A=A.sibling;return i.subtreeFlags|=p,i.childLanes=f,r}function Uu(i,r,f){var p=r.pendingProps;switch(qf(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jn(r),null;case 1:return jn(r),null;case 3:return f=r.stateNode,p=null,i!==null&&(p=i.memoizedState.cache),r.memoizedState.cache!==p&&(r.flags|=2048),ya(Pi),It(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(ac(r)?Sa(r):i===null||i.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Zf())),jn(r),null;case 26:var A=r.type,b=r.memoizedState;return i===null?(Sa(r),b!==null?(jn(r),kp(r,b)):(jn(r),Lu(r,A,null,p,f))):b?b!==i.memoizedState?(Sa(r),jn(r),kp(r,b)):(jn(r),r.flags&=-16777217):(i=i.memoizedProps,i!==p&&Sa(r),jn(r),Lu(r,A,i,p,f)),null;case 27:if(an(r),f=me.current,A=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==p&&Sa(r);else{if(!p){if(r.stateNode===null)throw Error(n(166));return jn(r),null}i=bt.current,ac(r)?Fg(r):(i=xb(A,p,f),r.stateNode=i,Sa(r))}return jn(r),null;case 5:if(an(r),A=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==p&&Sa(r);else{if(!p){if(r.stateNode===null)throw Error(n(166));return jn(r),null}if(b=bt.current,ac(r))Fg(r);else{var L=I0(me.current);switch(b){case 1:b=L.createElementNS("http://www.w3.org/2000/svg",A);break;case 2:b=L.createElementNS("http://www.w3.org/1998/Math/MathML",A);break;default:switch(A){case"svg":b=L.createElementNS("http://www.w3.org/2000/svg",A);break;case"math":b=L.createElementNS("http://www.w3.org/1998/Math/MathML",A);break;case"script":b=L.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof p.is=="string"?L.createElement("select",{is:p.is}):L.createElement("select"),p.multiple?b.multiple=!0:p.size&&(b.size=p.size);break;default:b=typeof p.is=="string"?L.createElement(A,{is:p.is}):L.createElement(A)}}b[ai]=r,b[F]=p;e:for(L=r.child;L!==null;){if(L.tag===5||L.tag===6)b.appendChild(L.stateNode);else if(L.tag!==4&&L.tag!==27&&L.child!==null){L.child.return=L,L=L.child;continue}if(L===r)break e;for(;L.sibling===null;){if(L.return===null||L.return===r)break e;L=L.return}L.sibling.return=L.return,L=L.sibling}r.stateNode=b;e:switch(Gs(b,A,p),A){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&Sa(r)}}return jn(r),Lu(r,r.type,i===null?null:i.memoizedProps,r.pendingProps,f),null;case 6:if(i&&r.stateNode!=null)i.memoizedProps!==p&&Sa(r);else{if(typeof p!="string"&&r.stateNode===null)throw Error(n(166));if(i=me.current,ac(r)){if(i=r.stateNode,f=r.memoizedProps,p=null,A=Si,A!==null)switch(A.tag){case 27:case 5:p=A.memoizedProps}i[ai]=r,i=!!(i.nodeValue===f||p!==null&&p.suppressHydrationWarning===!0||cb(i.nodeValue,f)),i||ma(r,!0)}
vendor: 23,530 bytes, line 32
32else i=I0(i).createTextNode(p),i[ai]=r,r.stateNode=i}return jn(r),null;case 31:if(f=r.memoizedState,i===null||i.memoizedState!==null){if(p=ac(r),f!==null){if(i===null){if(!p)throw Error(n(318));if(i=r.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(557));i[ai]=r}else Eo(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;jn(r),i=!1}else f=Zf(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=f),i=!0;if(!i)return r.flags&256?(Ri(r),r):(Ri(r),null);if((r.flags&128)!==0)throw Error(n(558))}return jn(r),null;case 13:if(p=r.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(A=ac(r),p!==null&&p.dehydrated!==null){if(i===null){if(!A)throw Error(n(318));if(A=r.memoizedState,A=A!==null?A.dehydrated:null,!A)throw Error(n(317));A[ai]=r}else Eo(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;jn(r),A=!1}else A=Zf(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=A),A=!0;if(!A)return r.flags&256?(Ri(r),r):(Ri(r),null)}return Ri(r),(r.flags&128)!==0?(r.lanes=f,r):(f=p!==null,i=i!==null&&i.memoizedState!==null,f&&(p=r.child,A=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(A=p.alternate.memoizedState.cachePool.pool),b=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(b=p.memoizedState.cachePool.pool),b!==A&&(p.flags|=2048)),f!==i&&f&&(r.child.flags|=8192),ja(r,r.updateQueue),jn(r),null);case 4:return It(),i===null&&X_(r.stateNode.containerInfo),jn(r),null;case 10:return ya(r.type),jn(r),null;case 19:if(He(Bn),p=r.memoizedState,p===null)return jn(r),null;if(A=(r.flags&128)!==0,b=p.rendering,b===null)if(A)ba(p,!1);else{if(vi!==0||i!==null&&(i.flags&128)!==0)for(i=r.child;i!==null;){if(b=fr(i),b!==null){for(r.flags|=128,ba(p,!1),i=b.updateQueue,r.updateQueue=i,ja(r,i),r.subtreeFlags=0,i=f,f=r.child;f!==null;)tc(f,i),f=f.sibling;return Ve(Bn,Bn.current&1|2),Rn&&da(r,p.treeForkCount),r.child}i=i.sibling}p.tail!==null&&N()>Ii&&(r.flags|=128,A=!0,ba(p,!1),r.lanes=4194304)}else{if(!A)if(i=fr(b),i!==null){if(r.flags|=128,A=!0,i=i.updateQueue,r.updateQueue=i,ja(r,i),ba(p,!0),p.tail===null&&p.tailMode==="hidden"&&!b.alternate&&!Rn)return jn(r),null}else 2*N()-p.renderingStartTime>Ii&&f!==536870912&&(r.flags|=128,A=!0,ba(p,!1),r.lanes=4194304);p.isBackwards?(b.sibling=r.child,r.child=b):(i=p.last,i!==null?i.sibling=b:r.child=b,p.last=b)}return p.tail!==null?(i=p.tail,p.rendering=i,p.tail=i.sibling,p.renderingStartTime=N(),i.sibling=null,f=Bn.current,Ve(Bn,A?f&1|2:f&1),Rn&&da(r,p.treeForkCount),i):(jn(r),null);case 22:case 23:return Ri(r),Tu(),p=r.memoizedState!==null,i!==null?i.memoizedState!==null!==p&&(r.flags|=8192):p&&(r.flags|=8192),p?(f&536870912)!==0&&(r.flags&128)===0&&(jn(r),r.subtreeFlags&6&&(r.flags|=8192)):jn(r),f=r.updateQueue,f!==null&&ja(r,f.retryQueue),f=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),p=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(p=r.memoizedState.cachePool.pool),p!==f&&(r.flags|=2048),i!==null&&He(wo),null;case 24:return f=null,i!==null&&(f=i.memoizedState.cache),r.memoizedState.cache!==f&&(r.flags|=2048),ya(Pi),jn(r),null;case 25:return null;case 30:return null}throw Error(n(156,r.tag))}function Nr(i,r){switch(qf(r),r.tag){case 1:return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 3:return ya(Pi),It(),i=r.flags,(i&65536)!==0&&(i&128)===0?(r.flags=i&-65537|128,r):null;case 26:case 27:case 5:return an(r),null;case 31:if(r.memoizedState!==null){if(Ri(r),r.alternate===null)throw Error(n(340));Eo()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 13:if(Ri(r),i=r.memoizedState,i!==null&&i.dehydrated!==null){if(r.alternate===null)throw Error(n(340));Eo()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 19:return He(Bn),null;case 4:return It(),null;case 10:return ya(r.type),null;case 22:case 23:return Ri(r),Tu(),i!==null&&He(wo),i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 24:return ya(Pi),null;case 25:return null;default:return null}}function hr(i,r){switch(qf(r),r.tag){case 3:ya(Pi),It();break;case 26:case 27:case 5:an(r);break;case 4:It();break;case 31:r.memoizedState!==null&&Ri(r);break;case 13:Ri(r);break;case 19:He(Bn);break;case 10:ya(r.type);break;case 22:case 23:Ri(r),Tu(),i!==null&&He(wo);break;case 24:ya(Pi)}}function Fr(i,r){try{var f=r.updateQueue,p=f!==null?f.lastEffect:null;if(p!==null){var A=p.next;f=A;do{if((f.tag&i)===i){p=void 0;var b=f.create,L=f.inst;p=b(),L.destroy=p}f=f.next}while(f!==A)}}catch(V){zn(r,r.return,V)}}function hs(i,r,f){try{var p=r.updateQueue,A=p!==null?p.lastEffect:null;if(A!==null){var b=A.next;p=b;do{if((p.tag&i)===i){var L=p.inst,V=L.destroy;if(V!==void 0){L.destroy=void 0,A=r;var ee=f,ye=V;try{ye()}catch(Ie){zn(A,ee,Ie)}}}p=p.next}while(p!==b)}}catch(Ie){zn(r,r.return,Ie)}}function Kr(i){var r=i.updateQueue;if(r!==null){var f=i.stateNode;try{Hg(r,f)}catch(p){zn(i,i.return,p)}}}function os(i,r,f){f.props=Lo(i.type,i.memoizedProps),f.state=i.memoizedState;try{f.componentWillUnmount()}catch(p){zn(i,r,p)}}function $a(i,r){try{var f=i.ref;if(f!==null){switch(i.tag){case 26:case 27:case 5:var p=i.stateNode;break;case 30:p=i.stateNode;break;default:p=i.stateNode}typeof f=="function"?i.refCleanup=f(p):f.current=p}}catch(A){zn(i,r,A)}}function ds(i,r){var f=i.ref,p=i.refCleanup;if(f!==null)if(typeof p=="function")try{p()}catch(A){zn(i,r,A)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(A){zn(i,r,A)}else f.current=null}function Nu(i){var r=i.type,f=i.memoizedProps,p=i.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":f.autoFocus&&p.focus();break e;case"img":f.src?p.src=f.src:f.srcSet&&(p.srcset=f.srcSet)}}catch(A){zn(i,i.return,A)}}function Qi(i,r,f){try{var p=i.stateNode;bC(p,i.type,f,r),p[F]=r}catch(A){zn(i,i.return,A)}}function hi(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Tc(i.type)||i.tag===4}function Tn(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||hi(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Tc(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Ma(i,r,f){var p=i.tag;if(p===5||p===6)i=i.stateNode,r?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(i,r):(r=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,r.appendChild(i),f=f._reactRootContainer,f!=null||r.onclick!==null||(r.onclick=Ha));else if(p!==4&&(p===27&&Tc(i.type)&&(f=i.stateNode,r=null),i=i.child,i!==null))for(Ma(i,r,f),i=i.sibling;i!==null;)Ma(i,r,f),i=i.sibling}function Fs(i,r,f){var p=i.tag;if(p===5||p===6)i=i.stateNode,r?f.insertBefore(i,r):f.appendChild(i);else if(p!==4&&(p===27&&Tc(i.type)&&(f=i.stateNode),i=i.child,i!==null))for(Fs(i,r,f),i=i.sibling;i!==null;)Fs(i,r,f),i=i.sibling}function Eh(i){var r=i.stateNode,f=i.memoizedProps;try{for(var p=i.type,A=r.attributes;A.length;)r.removeAttributeNode(A[0]);Gs(r,p,f),r[ai]=i,r[F]=f}catch(b){zn(i,i.return,b)}}var Or=!1,ii=!1,Zr=!1,R0=typeof WeakSet=="function"?WeakSet:Set,ls=null;function H_(i,r){if(i=i.containerInfo,Y_=z0,i=Dg(i),Qd(i)){if("selectionStart"in i)var f={start:i.selectionStart,end:i.selectionEnd};else e:{f=(f=i.ownerDocument)&&f.defaultView||window;var p=f.getSelection&&f.getSelection();if(p&&p.rangeCount!==0){f=p.anchorNode;var A=p.anchorOffset,b=p.focusNode;p=p.focusOffset;try{f.nodeType,b.nodeType}catch{f=null;break e}var L=0,V=-1,ee=-1,ye=0,Ie=0,ke=i,xe=null;t:for(;;){for(var we;ke!==f||A!==0&&ke.nodeType!==3||(V=L+A),ke!==b||p!==0&&ke.nodeType!==3||(ee=L+p),ke.nodeType===3&&(L+=ke.nodeValue.length),(we=ke.firstChild)!==null;)xe=ke,ke=we;for(;;){if(ke===i)break t;if(xe===f&&++ye===A&&(V=L),xe===b&&++Ie===p&&(ee=L),(we=ke.nextSibling)!==null)break;ke=xe,xe=ke.parentNode}ke=we}f=V===-1||ee===-1?null:{start:V,end:ee}}else f=null}f=f||{start:0,end:0}}else f=null;for(q_={focusedElem:i,selectionRange:f},z0=!1,ls=r;ls!==null;)if(r=ls,i=r.child,(r.subtreeFlags&1028)!==0&&i!==null)i.return=r,ls=i;else for(;ls!==null;){switch(r=ls,b=r.alternate,i=r.flags,r.tag){case 0:if((i&4)!==0&&(i=r.updateQueue,i=i!==null?i.events:null,i!==null))for(f=0;f<i.length;f++)A=i[f],A.ref.impl=A.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&b!==null){i=void 0,f=r,A=b.memoizedProps,b=b.memoizedState,p=f.stateNode;try{var Ft=Lo(f.type,A);i=p.getSnapshotBeforeUpdate(Ft,b),p.__reactInternalSnapshotBeforeUpdate=i}catch(en){zn(f,f.return,en)}}break;case 3:if((i&1024)!==0){if(i=r.stateNode.containerInfo,f=i.nodeType,f===9)Q_(i);else if(f===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Q_(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(n(163))}if(i=r.sibling,i!==null){i.return=r.return,ls=i;break}ls=r.return}}function di(i,r,f){var p=f.flags;switch(f.tag){case 0:case 11:case 15:Gr(i,f),p&4&&Fr(5,f);break;case 1:if(Gr(i,f),p&4)if(i=f.stateNode,r===null)try{i.componentDidMount()}catch(L){zn(f,f.return,L)}else{var A=Lo(f.type,r.memoizedProps);r=r.memoizedState;try{i.componentDidUpdate(A,r,i.__reactInternalSnapshotBeforeUpdate)}catch(L){zn(f,f.return,L)}}p&64&&Kr(f),p&512&&$a(f,f.return);break;case 3:if(Gr(i,f),p&64&&(i=f.updateQueue,i!==null)){if(r=null,f.child!==null)switch(f.child.tag){case 27:case 5:r=f.child.stateNode;break;case 1:r=f.child.stateNode}try{Hg(i,r)}catch(L){zn(f,f.return,L)}}break;case 27:r===null&&p&4&&Eh(f);case 26:case 5:Gr(i,f),r===null&&p&4&&Nu(f),p&512&&$a(f,f.return);break;case 12:Gr(i,f);break;case 31:Gr(i,f),p&4&&Uo(i,f);break;case 13:Gr(i,f),p&4&&vc(i,f),p&64&&(i=f.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(f=m.bind(null,f),DC(i,f))));break;case 22:if(p=f.memoizedState!==null||Or,!p){r=r!==null&&r.memoizedState!==null||ii,A=Or;var b=ii;Or=p,(ii=r)&&!b?Os(i,f,(f.subtreeFlags&8772)!==0):Gr(i,f),Or=A,ii=b}break;case 30:break;default:Gr(i,f)}}function Fu(i){var r=i.alternate;r!==null&&(i.alternate=null,Fu(r)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(r=i.stateNode,r!==null&&Ye(r)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var qn=null,Es=!1;function Pr(i,r,f){for(f=f.child;f!==null;)Th(i,r,f),f=f.sibling}function Th(i,r,f){if(Je&&typeof Je.onCommitFiberUnmount=="function")try{Je.onCommitFiberUnmount(Xe,f)}catch{}switch(f.tag){case 26:ii||ds(f,r),Pr(i,r,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:ii||ds(f,r);var p=qn,A=Es;Tc(f.type)&&(qn=f.stateNode,Es=!1),Pr(i,r,f),Kp(f.stateNode),qn=p,Es=A;break;case 5:ii||ds(f,r);case 6:if(p=qn,A=Es,qn=null,Pr(i,r,f),qn=p,Es=A,qn!==null)if(Es)try{(qn.nodeType===9?qn.body:qn.nodeName==="HTML"?qn.ownerDocument.body:qn).removeChild(f.stateNode)}catch(b){zn(f,r,b)}else try{qn.removeChild(f.stateNode)}catch(b){zn(f,r,b)}break;case 18:qn!==null&&(Es?(i=qn,mb(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,f.stateNode),Uh(i)):mb(qn,f.stateNode));break;case 4:p=qn,A=Es,qn=f.stateNode.containerInfo,Es=!0,Pr(i,r,f),qn=p,Es=A;break;case 0:case 11:case 14:case 15:hs(2,f,r),ii||hs(4,f,r),Pr(i,r,f);break;case 1:ii||(ds(f,r),p=f.stateNode,typeof p.componentWillUnmount=="function"&&os(f,r,p)),Pr(i,r,f);break;case 21:Pr(i,r,f);break;case 22:ii=(p=ii)||f.memoizedState!==null,Pr(i,r,f),ii=p;break;default:Pr(i,r,f)}}function Uo(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Uh(i)}catch(f){zn(r,r.return,f)}}}function vc(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Uh(i)}catch(f){zn(r,r.return,f)}}function Vp(i){switch(i.tag){case 31:case 13:case 19:var r=i.stateNode;return r===null&&(r=i.stateNode=new R0),r;case 22:return i=i.stateNode,r=i._retryCache,r===null&&(r=i._retryCache=new R0),r;default:throw Error(n(435,i.tag))}}function eo(i,r){var f=Vp(i);r.forEach(function(p){if(!f.has(p)){f.add(p);var A=_.bind(null,i,p);p.then(A,A)}})}function ji(i,r){var f=r.deletions;if(f!==null)for(var p=0;p<f.length;p++){var A=f[p],b=i,L=r,V=L;e:for(;V!==null;){switch(V.tag){case 27:if(Tc(V.type)){qn=V.stateNode,Es=!1;break e}break;case 5:qn=V.stateNode,Es=!1;break e;case 3:case 4:qn=V.stateNode.containerInfo,Es=!0;break e}V=V.return}if(qn===null)throw Error(n(160));Th(b,L,A),qn=null,Es=!1,b=A.alternate,b!==null&&(b.return=null),A.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)No(r,i),r=r.sibling}var zr=null;function No(i,r){var f=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:ji(r,i),$i(i),p&4&&(hs(3,i,i.return),Fr(3,i),hs(5,i,i.return));break;case 1:ji(r,i),$i(i),p&512&&(ii||f===null||ds(f,f.return)),p&64&&Or&&(i=i.updateQueue,i!==null&&(p=i.callbacks,p!==null&&(f=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=f===null?p:f.concat(p))));break;case 26:var A=zr;if(ji(r,i),$i(i),p&512&&(ii||f===null||ds(f,f.return)),p&4){var b=f!==null?f.memoizedState:null;if(p=i.memoizedState,f===null)if(p===null)if(i.stateNode===null){e:{p=i.type,f=i.memoizedProps,A=A.ownerDocument||A;t:switch(p){case"title":b=A.getElementsByTagName("title")[0],(!b||b[je]||b[ai]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=A.createElement(p),A.head.insertBefore(b,A.querySelector("head > title"))),Gs(b,p,f),b[ai]=i,G(b),p=b;break e;case"link":var L=Tb("link","href",A).get(p+(f.href||""));if(L){for(var V=0;V<L.length;V++)if(b=L[V],b.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&b.getAttribute("rel")===(f.rel==null?null:f.rel)&&b.getAttribute("title")===(f.title==null?null:f.title)&&b.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){L.splice(V,1);break t}}b=A.createElement(p),Gs(b,p,f),A.head.appendChild(b);break;case"meta":if(L=Tb("meta","content",A).get(p+(f.content||""))){for(V=0;V<L.length;V++)if(b=L[V],b.getAttribute("content")===(f.content==null?null:""+f.content)&&b.getAttribute("name")===(f.name==null?null:f.name)&&b.getAttribute("property")===(f.property==null?null:f.property)&&b.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&b.getAttribute("charset")===(f.charSet==null?null:f.charSet)){L.splice(V,1);break t}}b=A.createElement(p),Gs(b,p,f),A.head.appendChild(b);break;default:throw Error(n(468,p))}b[ai]=i,G(b),p=b}i.stateNode=p}else Cb(A,i.type,i.stateNode);else i.stateNode=Eb(A,p,i.memoizedProps);else b!==p?(b===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):b.count--,p===null?Cb(A,i.type,i.stateNode):Eb(A,p,i.memoizedProps)):p===null&&i.stateNode!==null&&Qi(i,i.memoizedProps,f.memoizedProps)}break;case 27:ji(r,i),$i(i),p&512&&(ii||f===null||ds(f,f.return)),f!==null&&p&4&&Qi(i,i.memoizedProps,f.memoizedProps);break;case 5:if(ji(r,i),$i(i),p&512&&(ii||f===null||ds(f,f.return)),i.flags&32){A=i.stateNode;try{Oi(A,"")}catch(Ft){zn(i,i.return,Ft)}}p&4&&i.stateNode!=null&&(A=i.memoizedProps,Qi(i,A,f!==null?f.memoizedProps:A)),p&1024&&(Zr=!0);break;case 6:if(ji(r,i),$i(i),p&4){if(i.stateNode===null)throw Error(n(162));p=i.memoizedProps,f=i.stateNode;try{f.nodeValue=p}catch(Ft){zn(i,i.return,Ft)}}break;case 3:if(N0=null,A=zr,zr=L0(r.containerInfo),ji(r,i),zr=A,$i(i),p&4&&f!==null&&f.memoizedState.isDehydrated)try{Uh(r.containerInfo)}catch(Ft){zn(i,i.return,Ft)}Zr&&(Zr=!1,Ch(i));break;case 4:p=zr,zr=L0(i.stateNode.containerInfo),ji(r,i),$i(i),zr=p;break;case 12:ji(r,i),$i(i);break;case 31:ji(r,i),$i(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,eo(i,p)));break;case 13:ji(r,i),$i(i),i.child.flags&8192&&i.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&(yc=N()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,eo(i,p)));break;case 22:A=i.memoizedState!==null;var ee=f!==null&&f.memoizedState!==null,ye=Or,Ie=ii;if(Or=ye||A,ii=Ie||ee,ji(r,i),ii=Ie,Or=ye,$i(i),p&8192)e:for(r=i.stateNode,r._visibility=A?r._visibility&-2:r._visibility|1,A&&(f===null||ee||Or||ii||Ea(i)),f=null,r=i;;){if(r.tag===5||r.tag===26){if(f===null){ee=f=r;try{if(b=ee.stateNode,A)L=b.style,typeof L.setProperty=="function"?L.setProperty("display","none","important"):L.display="none";else{V=ee.stateNode;var ke=ee.memoizedProps.style,xe=ke!=null&&ke.hasOwnProperty("display")?ke.display:null;V.style.display=xe==null||typeof xe=="boolean"?"":(""+xe).trim()}}catch(Ft){zn(ee,ee.return,Ft)}}}else if(r.tag===6){if(f===null){ee=r;try{ee.stateNode.nodeValue=A?"":ee.memoizedProps}catch(Ft){zn(ee,ee.return,Ft)}}}else if(r.tag===18){if(f===null){ee=r;try{var we=ee.stateNode;A?gb(we,!0):gb(ee.stateNode,!1)}catch(Ft){zn(ee,ee.return,Ft)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===i)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;f===r&&(f=null),r=r.return}f===r&&(f=null),r.sibling.return=r.return,r=r.sibling}p&4&&(p=i.updateQueue,p!==null&&(f=p.retryQueue,f!==null&&(p.retryQueue=null,eo(i,f))));break;case 19:ji(r,i),$i(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,eo(i,p)));break;case 30:break;case 21:break;default:ji(r,i),$i(i)}}function $i(i){var r=i.flags;if(r&2){try{for(var f,p=i.return;p!==null;){if(hi(p)){f=p;break}p=p.return}if(f==null)throw Error(n(160));switch(f.tag){case 27:var A=f.stateNode,b=Tn(i);Fs(i,b,A);break;case 5:var L=f.stateNode;f.flags&32&&(Oi(L,""),f.flags&=-33);var V=Tn(i);Fs(i,V,L);break;case 3:case 4:var ee=f.stateNode.containerInfo,ye=Tn(i);Ma(i,ye,ee);break;default:throw Error(n(161))}}catch(Ie){zn(i,i.return,Ie)}i.flags&=-3}r&4096&&(i.flags&=-4097)}function Ch(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var r=i;Ch(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),i=i.sibling}}function Gr(i,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)di(i,r.alternate,r),r=r.sibling}function Ea(i){for(i=i.child;i!==null;){var r=i;switch(r.tag){case 0:case 11:case 14:case 15:hs(4,r,r.return),Ea(r);break;case 1:ds(r,r.return);var f=r.stateNode;typeof f.componentWillUnmount=="function"&&os(r,r.return,f),Ea(r);break;case 27:Kp(r.stateNode);case 26:case 5:ds(r,r.return),Ea(r);break;case 22:r.memoizedState===null&&Ea(r);break;case 30:Ea(r);break;default:Ea(r)}i=i.sibling}}function Os(i,r,f){for(f=f&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var p=r.alternate,A=i,b=r,L=b.flags;switch(b.tag){case 0:case 11:case 15:Os(A,b,f),Fr(4,b);break;case 1:if(Os(A,b,f),p=b,A=p.stateNode,typeof A.componentDidMount=="function")try{A.componentDidMount()}catch(ye){zn(p,p.return,ye)}if(p=b,A=p.updateQueue,A!==null){var V=p.stateNode;try{var ee=A.shared.hiddenCallbacks;if(ee!==null)for(A.shared.hiddenCallbacks=null,A=0;A<ee.length;A++)fc(ee[A],V)}catch(ye){zn(p,p.return,ye)}}f&&L&64&&Kr(b),$a(b,b.return);break;case 27:Eh(b);case 26:case 5:Os(A,b,f),f&&p===null&&L&4&&Nu(b),$a(b,b.return);break;case 12:Os(A,b,f);break;case 31:Os(A,b,f),f&&L&4&&Uo(A,b);break;case 13:Os(A,b,f),f&&L&4&&vc(A,b);break;case 22:b.memoizedState===null&&Os(A,b,f),$a(b,b.return);break;case 30:break;default:Os(A,b,f)}r=r.sibling}}function Fo(i,r){var f=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==f&&(i!=null&&i.refCount++,f!=null&&ol(f))}function Al(i,r){i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&ol(i))}function ps(i,r,f,p){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Xp(i,r,f,p),r=r.sibling}function Xp(i,r,f,p){var A=r.flags;switch(r.tag){case 0:case 11:case 15:ps(i,r,f,p),A&2048&&Fr(9,r);break;case 1:ps(i,r,f,p);break;case 3:ps(i,r,f,p),A&2048&&(i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&ol(i)));break;case 12:if(A&2048){ps(i,r,f,p),i=r.stateNode;try{var b=r.memoizedProps,L=b.id,V=b.onPostCommit;typeof V=="function"&&V(L,r.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(ee){zn(r,r.return,ee)}}else ps(i,r,f,p);break;case 31:ps(i,r,f,p);break;case 13:ps(i,r,f,p);break;case 23:break;case 22:b=r.stateNode,L=r.alternate,r.memoizedState!==null?b._visibility&2?ps(i,r,f,p):Ta(i,r):b._visibility&2?ps(i,r,f,p):(b._visibility|=2,ms(i,r,f,p,(r.subtreeFlags&10256)!==0||!1)),A&2048&&Fo(L,r);break;case 24:ps(i,r,f,p),A&2048&&Al(r.alternate,r);break;default:ps(i,r,f,p)}}function ms(i,r,f,p,A){for(A=A&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var b=i,L=r,V=f,ee=p,ye=L.flags;switch(L.tag){case 0:case 11:case 15:ms(b,L,V,ee,A),Fr(8,L);break;case 23:break;case 22:var Ie=L.stateNode;L.memoizedState!==null?Ie._visibility&2?ms(b,L,V,ee,A):Ta(b,L):(Ie._visibility|=2,ms(b,L,V,ee,A)),A&&ye&2048&&Fo(L.alternate,L);break;case 24:ms(b,L,V,ee,A),A&&ye&2048&&Al(L.alternate,L);break;default:ms(b,L,V,ee,A)}r=r.sibling}}function Ta(i,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var f=i,p=r,A=p.flags;switch(p.tag){case 22:Ta(f,p),A&2048&&Fo(p.alternate,p);break;case 24:Ta(f,p),A&2048&&Al(p.alternate,p);break;default:Ta(f,p)}r=r.sibling}}var Sl=8192;function dr(i,r,f){if(i.subtreeFlags&Sl)for(i=i.child;i!==null;)wh(i,r,f),i=i.sibling}function wh(i,r,f){switch(i.tag){case 26:dr(i,r,f),i.flags&Sl&&i.memoizedState!==null&&VC(f,zr,i.memoizedState,i.memoizedProps);break;case 5:dr(i,r,f);break;case 3:case 4:var p=zr;zr=L0(i.stateNode.containerInfo),dr(i,r,f),zr=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=Sl,Sl=16777216,dr(i,r,f),Sl=p):dr(i,r,f));break;default:dr(i,r,f)}}function bl(i){var r=i.alternate;if(r!==null&&(i=r.child,i!==null)){r.child=null;do r=i.sibling,i.sibling=null,i=r;while(i!==null)}}function Oo(i){var r=i.deletions;if((i.flags&16)!==0){if(r!==null)for(var f=0;f<r.length;f++){var p=r[f];ls=p,bi(p,i)}bl(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)js(i),i=i.sibling}function js(i){switch(i.tag){case 0:case 11:case 15:Oo(i),i.flags&2048&&hs(9,i,i.return);break;case 3:Oo(i);break;case 12:Oo(i);break;case 22:var r=i.stateNode;i.memoizedState!==null&&r._visibility&2&&(i.return===null||i.return.tag!==13)?(r._visibility&=-3,$s(i)):Oo(i);break;default:Oo(i)}}function $s(i){var r=i.deletions;if((i.flags&16)!==0){if(r!==null)for(var f=0;f<r.length;f++){var p=r[f];ls=p,bi(p,i)}bl(i)}for(i=i.child;i!==null;){switch(r=i,r.tag){case 0:case 11:case 15:hs(8,r,r.return),$s(r);break;case 22:f=r.stateNode,f._visibility&2&&(f._visibility&=-3,$s(r));break;default:$s(r)}i=i.sibling}}function bi(i,r){for(;ls!==null;){var f=ls;switch(f.tag){case 0:case 11:case 15:hs(8,f,r);break;case 23:case 22:if(f.memoizedState!==null&&f.memoizedState.cachePool!==null){var p=f.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:ol(f.memoizedState.cache)}if(p=f.child,p!==null)p.return=f,ls=p;else e:for(f=i;ls!==null;){p=ls;var A=p.sibling,b=p.return;if(Fu(p),p===f){ls=null;break e}if(A!==null){A.return=b,ls=A;break e}ls=b}}}var to={getCacheForType:function(i){var r=tn(Pi),f=r.data.get(i);return f===void 0&&(f=i(),r.data.set(i,f)),f},cacheSignal:function(){return tn(Pi).controller.signal}},un=typeof WeakMap=="function"?WeakMap:Map,kt=0,sn=null,mn=null,hn=0,Dn=0,Ts=null,Hr=!1,Qr=!1,Wp=!1,pr=0,vi=0,Ca=0,Po=0,Ou=0,Ps=0,oi=0,Ml=null,Mi=null,Ei=!1,yc=0,Jp=0,Ii=1/0,yi=null,
vendor: 21,855 bytes, line 32
32Li=null,Kn=0,mr=null,_c=null,kr=0,xc=0,Ac=null,Pu=null,zo=0,El=null;function gr(){return(kt&2)!==0&&hn!==0?hn&-hn:Y.T!==null?be():ar()}function Sn(){if(Ps===0)if((hn&536870912)===0||Rn){var i=Qe;Qe<<=1,(Qe&3932160)===0&&(Qe=262144),Ps=i}else Ps=536870912;return i=qs.current,i!==null&&(i.flags|=32),Ps}function gn(i,r,f){(i===sn&&(Dn===2||Dn===9)||i.cancelPendingCommit!==null)&&(Ho(i,0),Gi(i,hn,Ps,!1)),Ji(i,f),((kt&2)===0||i!==sn)&&(i===sn&&((kt&2)===0&&(Po|=f),vi===4&&Gi(i,hn,Ps,!1)),et(i))}function bn(i,r,f){if((kt&6)!==0)throw Error(n(327));var p=!f&&(r&127)===0&&(r&i.expiredLanes)===0||ft(i,r),A=p?zu(i,r):zs(i,r,!0),b=p;do{if(A===0){Qr&&!p&&Gi(i,r,0,!1);break}else{if(f=i.current.alternate,b&&!Zn(f)){A=zs(i,r,!1),b=!1;continue}if(A===2){if(b=r,i.errorRecoveryDisabledLanes&b)var L=0;else L=i.pendingLanes&-536870913,L=L!==0?L:L&536870912?536870912:0;if(L!==0){r=L;e:{var V=i;A=Ml;var ee=V.current.memoizedState.isDehydrated;if(ee&&(Ho(V,L).flags|=256),L=zs(V,L,!1),L!==2){if(Wp&&!ee){V.errorRecoveryDisabledLanes|=b,Po|=b,A=4;break e}b=Mi,Mi=A,b!==null&&(Mi===null?Mi=b:Mi.push.apply(Mi,b))}A=L}if(b=!1,A!==2)continue}}if(A===1){Ho(i,0),Gi(i,r,0,!0);break}e:{switch(p=i,b=A,b){case 0:case 1:throw Error(n(345));case 4:if((r&4194048)!==r)break;case 6:Gi(p,r,Ps,!Hr);break e;case 2:Mi=null;break;case 3:case 5:break;default:throw Error(n(329))}if((r&62914560)===r&&(A=yc+300-N(),10<A)){if(Gi(p,r,Ps,!Hr),Ue(p,0,!0)!==0)break e;kr=r,p.timeoutHandle=db(Cn.bind(null,p,f,Mi,yi,Ei,r,Ps,Po,oi,Hr,b,"Throttled",-0,0),A);break e}Cn(p,f,Mi,yi,Ei,r,Ps,Po,oi,Hr,b,null,-0,0)}}break}while(!0);et(i)}function Cn(i,r,f,p,A,b,L,V,ee,ye,Ie,ke,xe,we){if(i.timeoutHandle=-1,ke=r.subtreeFlags,ke&8192||(ke&16785408)===16785408){ke={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ha},wh(r,b,ke);var Ft=(b&62914560)===b?yc-N():(b&4194048)===b?Jp-N():0;if(Ft=XC(ke,Ft),Ft!==null){kr=b,i.cancelPendingCommit=Ft(io.bind(null,i,r,b,f,p,A,L,V,ee,Ie,ke,null,xe,we)),Gi(i,b,L,!ye);return}}io(i,r,b,f,p,A,L,V,ee)}function Zn(i){for(var r=i;;){var f=r.tag;if((f===0||f===11||f===15)&&r.flags&16384&&(f=r.updateQueue,f!==null&&(f=f.stores,f!==null)))for(var p=0;p<f.length;p++){var A=f[p],b=A.getSnapshot;A=A.value;try{if(!Is(b(),A))return!1}catch{return!1}}if(f=r.child,r.subtreeFlags&16384&&f!==null)f.return=r,r=f;else{if(r===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Gi(i,r,f,p){r&=~Ou,r&=~Po,i.suspendedLanes|=r,i.pingedLanes&=~r,p&&(i.warmLanes|=r),p=i.expirationTimes;for(var A=r;0<A;){var b=31-_t(A),L=1<<b;p[b]=-1,A&=~L}f!==0&&ra(i,f,r)}function jr(){return(kt&6)===0?(Bt(0),!1):!0}function Go(){if(mn!==null){if(Dn===0)var i=mn.return;else i=mn,va=To=null,mp(i),hl=null,dl=0,i=mn;for(;i!==null;)hr(i.alternate,i),i=i.return;mn=null}}function Ho(i,r){var f=i.timeoutHandle;f!==-1&&(i.timeoutHandle=-1,TC(f)),f=i.cancelPendingCommit,f!==null&&(i.cancelPendingCommit=null,f()),kr=0,Go(),sn=i,mn=f=Ws(i.current,null),hn=r,Dn=0,Ts=null,Hr=!1,Qr=ft(i,r),Wp=!1,oi=Ps=Ou=Po=Ca=vi=0,Mi=Ml=null,Ei=!1,(r&8)!==0&&(r|=r&32);var p=i.entangledLanes;if(p!==0)for(i=i.entanglements,p&=r;0<p;){var A=31-_t(p),b=1<<A;r|=i[A],p&=~b}return pr=r,yu(),f}function wa(i,r){cn=null,Y.H=mc,r===ll||r===pn?(r=ul(),Dn=3):r===Su?(r=ul(),Dn=4):Dn=r===gh?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Ts=r,mn===null&&(vi=1,mh(i,lr(r,i.current)))}function _i(){var i=qs.current;return i===null?!0:(hn&4194048)===hn?Ns===null:(hn&62914560)===hn||(hn&536870912)!==0?i===Ns:!1}function no(){var i=Y.H;return Y.H=mc,i===null?mc:i}function ko(){var i=Y.A;return Y.A=to,i}function Sc(){vi=4,Hr||(hn&4194048)!==hn&&qs.current!==null||(Qr=!0),(Ca&134217727)===0&&(Po&134217727)===0||sn===null||Gi(sn,hn,Ps,!1)}function zs(i,r,f){var p=kt;kt|=2;var A=no(),b=ko();(sn!==i||hn!==r)&&(yi=null,Ho(i,r)),r=!1;var L=vi;e:do try{if(Dn!==0&&mn!==null){var V=mn,ee=Ts;switch(Dn){case 8:Go(),L=6;break e;case 3:case 2:case 9:case 6:qs.current===null&&(r=!0);var ye=Dn;if(Dn=0,Ts=null,Tl(i,V,ee,ye),f&&Qr){L=0;break e}break;default:ye=Dn,Dn=0,Ts=null,Tl(i,V,ee,ye)}}bc(),L=vi;break}catch(Ie){wa(i,Ie)}while(!0);return r&&i.shellSuspendCounter++,va=To=null,kt=p,Y.H=A,Y.A=b,mn===null&&(sn=null,hn=0,yu()),L}function bc(){for(;mn!==null;)Rh(mn)}function zu(i,r){var f=kt;kt|=2;var p=no(),A=ko();sn!==i||hn!==r?(yi=null,Ii=N()+500,Ho(i,r)):Qr=ft(i,r);e:do try{if(Dn!==0&&mn!==null){r=mn;var b=Ts;t:switch(Dn){case 1:Dn=0,Ts=null,Tl(i,r,b,1);break;case 2:case 9:if(Ys(b)){Dn=0,Ts=null,Gu(r);break}r=function(){Dn!==2&&Dn!==9||sn!==i||(Dn=7),et(i)},b.then(r,r);break e;case 3:Dn=7;break e;case 4:Dn=5;break e;case 7:Ys(b)?(Dn=0,Ts=null,Gu(r)):(Dn=0,Ts=null,Tl(i,r,b,7));break;case 5:var L=null;switch(mn.tag){case 26:L=mn.memoizedState;case 5:case 27:var V=mn;if(L?wb(L):V.stateNode.complete){Dn=0,Ts=null;var ee=V.sibling;if(ee!==null)mn=ee;else{var ye=V.return;ye!==null?(mn=ye,Vo(ye)):mn=null}break t}}Dn=0,Ts=null,Tl(i,r,b,5);break;case 6:Dn=0,Ts=null,Tl(i,r,b,6);break;case 8:Go(),vi=6;break e;default:throw Error(n(462))}}er();break}catch(Ie){wa(i,Ie)}while(!0);return va=To=null,Y.H=p,Y.A=A,kt=f,mn!==null?0:(sn=null,hn=0,yu(),vi)}function er(){for(;mn!==null&&!it();)Rh(mn)}function Rh(i){var r=Mh(i.alternate,i,pr);i.memoizedProps=i.pendingProps,r===null?Vo(i):mn=r}function Gu(i){var r=i,f=r.alternate;switch(r.tag){case 15:case 0:r=Du(f,r,r.pendingProps,r.type,void 0,hn);break;case 11:r=Du(f,r,r.pendingProps,r.type.render,r.ref,hn);break;case 5:mp(r);default:hr(f,r),r=mn=tc(r,pr),r=Mh(f,r,pr)}i.memoizedProps=i.pendingProps,r===null?Vo(i):mn=r}function Tl(i,r,f,p){va=To=null,mp(r),hl=null,dl=0;var A=r.return;try{if(Zi(i,A,r,f,hn)){vi=1,mh(i,lr(f,i.current)),mn=null;return}}catch(b){if(A!==null)throw mn=A,b;vi=1,mh(i,lr(f,i.current)),mn=null;return}r.flags&32768?(Rn||p===1?i=!0:Qr||(hn&536870912)!==0?i=!1:(Hr=i=!0,(p===2||p===9||p===3||p===6)&&(p=qs.current,p!==null&&p.tag===13&&(p.flags|=16384))),Hu(r,i)):Vo(r)}function Vo(i){var r=i;do{if((r.flags&32768)!==0){Hu(r,Hr);return}i=r.return;var f=Uu(r.alternate,r,pr);if(f!==null){mn=f;return}if(r=r.sibling,r!==null){mn=r;return}mn=r=i}while(r!==null);vi===0&&(vi=5)}function Hu(i,r){do{var f=Nr(i.alternate,i);if(f!==null){f.flags&=32767,mn=f;return}if(f=i.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!r&&(i=i.sibling,i!==null)){mn=i;return}mn=i=f}while(i!==null);vi=6,mn=null}function io(i,r,f,p,A,b,L,V,ee){i.cancelPendingCommit=null;do Mc();while(Kn!==0);if((kt&6)!==0)throw Error(n(327));if(r!==null){if(r===i.current)throw Error(n(177));if(b=r.lanes|r.childLanes,b|=ss,As(i,f,b,L,V,ee),i===sn&&(mn=sn=null,hn=0),_c=r,mr=i,kr=f,xc=b,Ac=A,Pu=p,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,T(Me,function(){return Bh(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||p){p=Y.T,Y.T=null,A=$.p,$.p=2,L=kt,kt|=4;try{H_(i,r,f)}finally{kt=L,$.p=A,Y.T=p}}Kn=1,Hi(),so(),Cl()}}function Hi(){if(Kn===1){Kn=0;var i=mr,r=_c,f=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||f){f=Y.T,Y.T=null;var p=$.p;$.p=2;var A=kt;kt|=4;try{No(r,i);var b=q_,L=Dg(i.containerInfo),V=b.focusedElem,ee=b.selectionRange;if(L!==V&&V&&V.ownerDocument&&ti(V.ownerDocument.documentElement,V)){if(ee!==null&&Qd(V)){var ye=ee.start,Ie=ee.end;if(Ie===void 0&&(Ie=ye),"selectionStart"in V)V.selectionStart=ye,V.selectionEnd=Math.min(Ie,V.value.length);else{var ke=V.ownerDocument||document,xe=ke&&ke.defaultView||window;if(xe.getSelection){var we=xe.getSelection(),Ft=V.textContent.length,en=Math.min(ee.start,Ft),ri=ee.end===void 0?en:Math.min(ee.end,Ft);!we.extend&&en>ri&&(L=ri,ri=en,en=L);var he=jl(V,en),ae=jl(V,ri);if(he&&ae&&(we.rangeCount!==1||we.anchorNode!==he.node||we.anchorOffset!==he.offset||we.focusNode!==ae.node||we.focusOffset!==ae.offset)){var ve=ke.createRange();ve.setStart(he.node,he.offset),we.removeAllRanges(),en>ri?(we.addRange(ve),we.extend(ae.node,ae.offset)):(ve.setEnd(ae.node,ae.offset),we.addRange(ve))}}}}for(ke=[],we=V;we=we.parentNode;)we.nodeType===1&&ke.push({element:we,left:we.scrollLeft,top:we.scrollTop});for(typeof V.focus=="function"&&V.focus(),V=0;V<ke.length;V++){var Ge=ke[V];Ge.element.scrollLeft=Ge.left,Ge.element.scrollTop=Ge.top}}z0=!!Y_,q_=Y_=null}finally{kt=A,$.p=p,Y.T=f}}i.current=r,Kn=2}}function so(){if(Kn===2){Kn=0;var i=mr,r=_c,f=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||f){f=Y.T,Y.T=null;var p=$.p;$.p=2;var A=kt;kt|=4;try{di(i,r.alternate,r)}finally{kt=A,$.p=p,Y.T=f}}Kn=3}}function Cl(){if(Kn===4||Kn===3){Kn=0,J();var i=mr,r=_c,f=kr,p=Pu;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Kn=5:(Kn=0,_c=mr=null,Ra(i,i.pendingLanes));var A=i.pendingLanes;if(A===0&&(Li=null),Bs(f),r=r.stateNode,Je&&typeof Je.onCommitFiberRoot=="function")try{Je.onCommitFiberRoot(Xe,r,void 0,(r.current.flags&128)===128)}catch{}if(p!==null){r=Y.T,A=$.p,$.p=2,Y.T=null;try{for(var b=i.onRecoverableError,L=0;L<p.length;L++){var V=p[L];b(V.value,{componentStack:V.stack})}}finally{Y.T=r,$.p=A}}(kr&3)!==0&&Mc(),et(i),A=i.pendingLanes,(f&261930)!==0&&(A&42)!==0?i===El?zo++:(zo=0,El=i):zo=0,Bt(0)}}function Ra(i,r){(i.pooledCacheLanes&=r)===0&&(r=i.pooledCache,r!=null&&(i.pooledCache=null,ol(r)))}function Mc(){return Hi(),so(),Cl(),Bh()}function Bh(){if(Kn!==5)return!1;var i=mr,r=xc;xc=0;var f=Bs(kr),p=Y.T,A=$.p;try{$.p=32>f?32:f,Y.T=null,f=Ac,Ac=null;var b=mr,L=kr;if(Kn=0,_c=mr=null,kr=0,(kt&6)!==0)throw Error(n(331));var V=kt;if(kt|=4,js(b.current),Xp(b,b.current,L,f),kt=V,Bt(0,!1),Je&&typeof Je.onPostCommitFiberRoot=="function")try{Je.onPostCommitFiberRoot(Xe,b)}catch{}return!0}finally{$.p=A,Y.T=p,Ra(i,r)}}function Yp(i,r,f){r=lr(f,r),r=Op(i.stateNode,r,2),i=Ro(i,r,2),i!==null&&(Ji(i,2),et(i))}function zn(i,r,f){if(i.tag===3)Yp(i,i,f);else for(;r!==null;){if(r.tag===3){Yp(r,i,f);break}else if(r.tag===1){var p=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Li===null||!Li.has(p))){i=lr(f,i),f=Pp(2),p=Ro(r,f,2),p!==null&&(M0(f,p,r,i),Ji(p,2),et(p));break}}r=r.return}}function ku(i,r,f){var p=i.pingCache;if(p===null){p=i.pingCache=new un;var A=new Set;p.set(r,A)}else A=p.get(r),A===void 0&&(A=new Set,p.set(r,A));A.has(f)||(Wp=!0,A.add(f),i=l.bind(null,i,r,f),r.then(i,i))}function l(i,r,f){var p=i.pingCache;p!==null&&p.delete(r),i.pingedLanes|=i.suspendedLanes&f,i.warmLanes&=~f,sn===i&&(hn&f)===f&&(vi===4||vi===3&&(hn&62914560)===hn&&300>N()-yc?(kt&2)===0&&Ho(i,0):Ou|=f,oi===hn&&(oi=0)),et(i)}function c(i,r){r===0&&(r=Mn()),i=Ls(i,r),i!==null&&(Ji(i,r),et(i))}function m(i){var r=i.memoizedState,f=0;r!==null&&(f=r.retryLane),c(i,f)}function _(i,r){var f=0;switch(i.tag){case 31:case 13:var p=i.stateNode,A=i.memoizedState;A!==null&&(f=A.retryLane);break;case 19:p=i.stateNode;break;case 22:p=i.stateNode._retryCache;break;default:throw Error(n(314))}p!==null&&p.delete(r),c(i,f)}function T(i,r){return yt(i,r)}var R=null,H=null,ne=!1,Te=!1,qe=!1,pt=0;function et(i){i!==H&&i.next===null&&(H===null?R=H=i:H=H.next=i),Te=!0,ne||(ne=!0,de())}function Bt(i,r){if(!qe&&Te){qe=!0;do for(var f=!1,p=R;p!==null;){if(i!==0){var A=p.pendingLanes;if(A===0)var b=0;else{var L=p.suspendedLanes,V=p.pingedLanes;b=(1<<31-_t(42|i)+1)-1,b&=A&~(L&~V),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(f=!0,_e(p,b))}else b=hn,b=Ue(p,p===sn?b:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(b&3)===0||ft(p,b)||(f=!0,_e(p,b));p=p.next}while(f);qe=!1}}function ln(){Ui()}function Ui(){Te=ne=!1;var i=0;pt!==0&&EC()&&(i=pt);for(var r=N(),f=null,p=R;p!==null;){var A=p.next,b=Ec(p,r);b===0?(p.next=null,f===null?R=A:f.next=A,A===null&&(H=f)):(f=p,(i!==0||(b&3)!==0)&&(Te=!0)),p=A}Kn!==0&&Kn!==5||Bt(i),pt!==0&&(pt=0)}function Ec(i,r){for(var f=i.suspendedLanes,p=i.pingedLanes,A=i.expirationTimes,b=i.pendingLanes&-62914561;0<b;){var L=31-_t(b),V=1<<L,ee=A[L];ee===-1?((V&f)===0||(V&p)!==0)&&(A[L]=$t(V,r)):ee<=r&&(i.expiredLanes|=V),b&=~V}if(r=sn,f=hn,f=Ue(i,i===r?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,f===0||i===r&&(Dn===2||Dn===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&Pt(p),i.callbackNode=null,i.callbackPriority=0;if((f&3)===0||ft(i,f)){if(r=f&-f,r===i.callbackPriority)return r;switch(p!==null&&Pt(p),Bs(f)){case 2:case 8:f=Pe;break;case 32:f=Me;break;case 268435456:f=ot;break;default:f=Me}return p=Xo.bind(null,i),f=yt(f,p),i.callbackPriority=r,i.callbackNode=f,r}return p!==null&&p!==null&&Pt(p),i.callbackPriority=2,i.callbackNode=null,2}function Xo(i,r){if(Kn!==0&&Kn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var f=i.callbackNode;if(Mc()&&i.callbackNode!==f)return null;var p=hn;return p=Ue(i,i===sn?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(bn(i,p,r),Ec(i,N()),i.callbackNode!=null&&i.callbackNode===f?Xo.bind(null,i):null)}function _e(i,r){if(Mc())return null;bn(i,r,!0)}function de(){CC(function(){(kt&6)!==0?yt(Ee,ln):Ui()})}function be(){if(pt===0){var i=Ya;i===0&&(i=Se,Se<<=1,(Se&261888)===0&&(Se=256)),pt=i}return pt}function ct(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:su(""+i)}function Zt(i,r){var f=r.ownerDocument.createElement("input");return f.name=r.name,f.value=r.value,i.id&&f.setAttribute("form",i.id),r.parentNode.insertBefore(f,r),i=new FormData(i),f.parentNode.removeChild(f),i}function xi(i,r,f,p,A){if(r==="submit"&&f&&f.stateNode===A){var b=ct((A[F]||null).action),L=p.submitter;L&&(r=(r=L[F]||null)?ct(r.formAction):L.getAttribute("formAction"),r!==null&&(b=r,L=null));var V=new ou("action","action",null,p,A);i.push({event:V,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(pt!==0){var ee=L?Zt(A,L):new FormData(A);Rp(f,{pending:!0,data:ee,method:A.method,action:b},null,ee)}}else typeof b=="function"&&(V.preventDefault(),ee=L?Zt(A,L):new FormData(A),Rp(f,{pending:!0,data:ee,method:A.method,action:b},b,ee))},currentTarget:A}]})}}for(var Qt=0;Qt<gu.length;Qt++){var Nn=gu[Qt],cs=Nn.toLowerCase(),kn=Nn[0].toUpperCase()+Nn.slice(1);wr(cs,"on"+kn)}wr(Vf,"onAnimationEnd"),wr(mu,"onAnimationIteration"),wr($d,"onAnimationStart"),wr("dblclick","onDoubleClick"),wr("focusin","onFocus"),wr("focusout","onBlur"),wr(Lg,"onTransitionRun"),wr(L_,"onTransitionStart"),wr(Ug,"onTransitionCancel"),wr(ep,"onTransitionEnd"),se("onMouseEnter",["mouseout","mouseover"]),se("onMouseLeave",["mouseout","mouseover"]),se("onPointerEnter",["pointerout","pointerover"]),se("onPointerLeave",["pointerout","pointerover"]),ue("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ue("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ue("onBeforeInput",["compositionend","keypress","textInput","paste"]),ue("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ue("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ue("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),k_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vr));function rb(i,r){r=(r&4)!==0;for(var f=0;f<i.length;f++){var p=i[f],A=p.event;p=p.listeners;e:{var b=void 0;if(r)for(var L=p.length-1;0<=L;L--){var V=p[L],ee=V.instance,ye=V.currentTarget;if(V=V.listener,ee!==b&&A.isPropagationStopped())break e;b=V,A.currentTarget=ye;try{b(A)}catch(Ie){vu(Ie)}A.currentTarget=null,b=ee}else for(L=0;L<p.length;L++){if(V=p[L],ee=V.instance,ye=V.currentTarget,V=V.listener,ee!==b&&A.isPropagationStopped())break e;b=V,A.currentTarget=ye;try{b(A)}catch(Ie){vu(Ie)}A.currentTarget=null,b=ee}}}}function In(i,r){var f=r[te];f===void 0&&(f=r[te]=new Set);var p=i+"__bubble";f.has(p)||(ab(r,i,2,!1),f.add(p))}function V_(i,r,f){var p=0;r&&(p|=4),ab(f,i,p,r)}var B0="_reactListening"+Math.random().toString(36).slice(2);function X_(i){if(!i[B0]){i[B0]=!0,Q.forEach(function(f){f!=="selectionchange"&&(k_.has(f)||V_(f,!1,i),V_(f,!0,i))});var r=i.nodeType===9?i:i.ownerDocument;r===null||r[B0]||(r[B0]=!0,V_("selectionchange",!1,r))}}function ab(i,r,f,p){switch(Nb(r)){case 2:var A=YC;break;case 8:A=qC;break;default:A=rx}f=A.bind(null,r,f,i),A=void 0,!Nd||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(A=!0),p?A!==void 0?i.addEventListener(r,f,{capture:!0,passive:A}):i.addEventListener(r,f,!0):A!==void 0?i.addEventListener(r,f,{passive:A}):i.addEventListener(r,f,!1)}function W_(i,r,f,p,A){var b=p;if((r&1)===0&&(r&2)===0&&p!==null)e:for(;;){if(p===null)return;var L=p.tag;if(L===3||L===4){var V=p.stateNode.containerInfo;if(V===A)break;if(L===4)for(L=p.return;L!==null;){var ee=L.tag;if((ee===3||ee===4)&&L.stateNode.containerInfo===A)return;L=L.return}for(;V!==null;){if(L=lt(V),L===null)return;if(ee=L.tag,ee===5||ee===6||ee===26||ee===27){p=b=L;continue e}V=V.parentNode}}p=p.return}Ud(function(){var ye=b,Ie=Bf(f),ke=[];e:{var xe=Cr.get(i);if(xe!==void 0){var we=ou,Ft=i;switch(i){case"keypress":if(au(f)===0)break e;case"keydown":case"keyup":we=nl;break;case"focusin":Ft="focus",we=Uf;break;case"focusout":Ft="blur",we=Uf;break;case"beforeblur":case"afterblur":we=Uf;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":we=Fd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":we=dg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":we=_g;break;case Vf:case mu:case $d:we=B_;break;case ep:we=I_;break;case"scroll":case"scrollend":we=fg;break;case"wheel":we=Ag;break;case"copy":case"cut":case"paste":we=mg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":we=zd;break;case"toggle":case"beforetoggle":we=bg}var en=(r&4)!==0,ri=!en&&(i==="scroll"||i==="scrollend"),he=en?xe!==null?xe+"Capture":null:xe;en=[];for(var ae=ye,ve;ae!==null;){var Ge=ae;if(ve=Ge.stateNode,Ge=Ge.tag,Ge!==5&&Ge!==26&&Ge!==27||ve===null||he===null||(Ge=Vl(ae,he),Ge!=null&&en.push(qp(ae,Ge,ve))),ri)break;ae=ae.return}0<en.length&&(xe=new we(xe,Ft,null,f,Ie),ke.push({event:xe,listeners:en}))}}if((r&7)===0){e:{if(xe=i==="mouseover"||i==="pointerover",we=i==="mouseout"||i==="pointerout",xe&&f!==Rf&&(Ft=f.relatedTarget||f.fromElement)&&(lt(Ft)||Ft[W]))break e;if((we||xe)&&(xe=Ie.window===Ie?Ie:(xe=Ie.ownerDocument)?xe.defaultView||xe.parentWindow:window,we?(Ft=f.relatedTarget||f.toElement,we=ye,Ft=Ft?lt(Ft):null,Ft!==null&&(ri=o(Ft),en=Ft.tag,Ft!==ri||en!==5&&en!==27&&en!==6)&&(Ft=null)):(we=null,Ft=ye),we!==Ft)){if(en=Fd,Ge="onMouseLeave",he="onMouseEnter",ae="mouse",(i==="pointerout"||i==="pointerover")&&(en=zd,Ge="onPointerLeave",he="onPointerEnter",ae="pointer"),ri=we==null?xe:ht(we),ve=Ft==null?xe:ht(Ft),xe=new en(Ge,ae+"leave",we,f,Ie),xe.target=ri,xe.relatedTarget=ve,Ge=null,lt(Ie)===ye&&(en=new en(he,ae+"enter",Ft,f,Ie),en.target=ve,en.relatedTarget=ri,Ge=en),ri=Ge,we&&Ft)t:{for(en=xC,he=we,ae=Ft,ve=0,Ge=he;Ge;Ge=en(Ge))ve++;Ge=0;for(var Yt=ae;Yt;Yt=en(Yt))Ge++;for(;0<ve-Ge;)he=en(he),ve--;for(;0<Ge-ve;)ae=en(ae),Ge--;for(;ve--;){if(he===ae||ae!==null&&he===ae.alternate){en=he;break t}he=en(he),ae=en(ae)}en=null}else en=null;we!==null&&ob(ke,xe,we,en,!1),Ft!==null&&ri!==null&&ob(ke,ri,Ft,en,!0)}}e:{if(xe=ye?ht(ye):window,we=xe.nodeName&&xe.nodeName.toLowerCase(),we==="select"||we==="input"&&xe.type==="file")var Jn=Jd;else if(Wd(xe))if(ca)Jn=Bg;else{Jn=Kd;var Gt=wg}else we=xe.nodeName,!we||we.toLowerCase()!=="input"||xe.type!=="checkbox"&&xe.type!=="radio"?ye&&Er(ye.elementType)&&(Jn=Jd):Jn=Rg;if(Jn&&(Jn=Jn(i,ye))){Hf(ke,Jn,f,Ie);break e}Gt&&Gt(i,xe,ye),i==="focusout"&&ye&&xe.type==="number"&&ye.memoizedProps.value!=null&&_n(xe,"number",xe.value)}switch(Gt=ye?ht(ye):window,i){case"focusin":(Wd(Gt)||Gt.contentEditable==="true")&&(ua=Gt,fa=ye,$l=null);break;case"focusout":$l=fa=ua=null;break;case"mousedown":kf=!0;break;case"contextmenu":case"mouseup":case"dragend":kf=!1,ec(ke,f,Ie);break;case"selectionchange":if(Ig)break;case"keydown":case"keyup":ec(ke,f,Ie)}var xn;if(il)e:{switch(i){case"compositionstart":var Fn="onCompositionStart";break e;case"compositionend":Fn="onCompositionEnd";break e;case"compositionupdate":Fn="onCompositionUpdate";break e}Fn=void 0}else sl?Gf(i,f)&&(Fn="onCompositionEnd"):i==="keydown"&&f.keyCode===229&&(Fn="onCompositionStart");Fn&&(Hd&&f.locale!=="ko"&&(sl||Fn!=="onCompositionStart"?Fn==="onCompositionEnd"&&sl&&(xn=ru()):(or=Ie,If="value"in or?or.value:or.textContent,sl=!0)),Gt=D0(ye,Fn),0<Gt.length&&(Fn=new Nf(Fn,i,null,f,Ie),ke.push({event:Fn,listeners:Gt}),xn?Fn.data=xn:(xn=kd(f),xn!==null&&(Fn.data=xn)))),(xn=zf?Tg(i,f):Vd(i,f))&&(Fn=D0(ye,"onBeforeInput"),0<Fn.length&&(Gt=new Nf("onBeforeInput","beforeinput",null,f,Ie),ke.push({event:Gt,listeners:Fn}),Gt.data=xn)),xi(ke,i,ye,f,Ie)}rb(ke,r)})}function qp(i,r,f){return{instance:i,listener:r,currentTarget:f}}function D0(i,r){for(var f=r+"Capture",p=[];i!==null;){var A=i,b=A.stateNode;if(A=A.tag,A!==5&&A!==26&&A!==27||b===null||(A=Vl(i,f),A!=null&&p.unshift(qp(i,A,b)),A=Vl(i,r),A!=null&&p.push(qp(i,A,b))),i.tag===3)return p;i=i.return}return[]}function xC(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function ob(i,r,f,p,A){for(var b=r._reactName,L=[];f!==null&&f!==p;){var V=f,ee=V.alternate,ye=V.stateNode;if(V=V.tag,ee!==null&&ee===p)break;
vendor: 5,351 bytes, lines 32-33
32V!==5&&V!==26&&V!==27||ye===null||(ee=ye,A?(ye=Vl(f,b),ye!=null&&L.unshift(qp(f,ye,ee))):A||(ye=Vl(f,b),ye!=null&&L.push(qp(f,ye,ee)))),f=f.return}L.length!==0&&i.push({event:r,listeners:L})}var AC=/\r\n?/g,SC=/\u0000|\uFFFD/g;function lb(i){return(typeof i=="string"?i:""+i).replace(AC,` 33`).replace(SC,"")}function cb(i,r){return r=lb(r),lb(i)===r}function si(i,r,f,p,A,b){switch(f){case"children":typeof p=="string"?r==="body"||r==="textarea"&&p===""||Oi(i,p):(typeof p=="number"||typeof p=="bigint")&&r!=="body"&&Oi(i,""+p);break;case"className":Ut(i,"class",p);break;case"tabIndex":Ut(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":Ut(i,f,p);break;case"style":$o(i,p,b);break;case"data":if(r!=="object"){Ut(i,"data",p);break}case"src":case"href":if(p===""&&(r!=="a"||f!=="href")){i.removeAttribute(f);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(f);break}p=su(""+p),i.setAttribute(f,p);break;case"action":case"formAction":if(typeof p=="function"){i.setAttribute(f,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(f==="formAction"?(r!=="input"&&si(i,r,"name",A.name,A,null),si(i,r,"formEncType",A.formEncType,A,null),si(i,r,"formMethod",A.formMethod,A,null),si(i,r,"formTarget",A.formTarget,A,null)):(si(i,r,"encType",A.encType,A,null),si(i,r,"method",A.method,A,null),si(i,r,"target",A.target,A,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(f);break}p=su(""+p),i.setAttribute(f,p);break;case"onClick":p!=null&&(i.onclick=Ha);break;case"onScroll":p!=null&&In("scroll",i);break;case"onScrollEnd":p!=null&&In("scrollend",i);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(n(61));if(f=p.__html,f!=null){if(A.children!=null)throw Error(n(60));i.innerHTML=f}}break;case"multiple":i.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":i.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){i.removeAttribute("xlink:href");break}f=su(""+p),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(f,""+p):i.removeAttribute(f);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":p&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(f,""):i.removeAttribute(f);break;case"capture":case"download":p===!0?i.setAttribute(f,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(f,p):i.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?i.setAttribute(f,p):i.removeAttribute(f);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?i.removeAttribute(f):i.setAttribute(f,p);break;case"popover":In("beforetoggle",i),In("toggle",i),at(i,"popover",p);break;case"xlinkActuate":ut(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":ut(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":ut(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":ut(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":ut(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":ut(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":ut(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":ut(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":ut(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":at(i,"is",p);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=cg.get(f)||f,at(i,f,p))}}function J_(i,r,f,p,A,b){switch(f){case"style":$o(i,p,b);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(n(61));if(f=p.__html,f!=null){if(A.children!=null)throw Error(n(60));i.innerHTML=f}}break;case"children":typeof p=="string"?Oi(i,p):(typeof p=="number"||typeof p=="bigint")&&Oi(i,""+p);break;case"onScroll":p!=null&&In("scroll",i);break;case"onScrollEnd":p!=null&&In("scrollend",i);break;case"onClick":p!=null&&(i.onclick=Ha);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;
vendor: 10,891 bytes, line 33
33default:if(!oe.hasOwnProperty(f))e:{if(f[0]==="o"&&f[1]==="n"&&(A=f.endsWith("Capture"),r=f.slice(2,A?f.length-7:void 0),b=i[F]||null,b=b!=null?b[f]:null,typeof b=="function"&&i.removeEventListener(r,b,A),typeof p=="function")){typeof b!="function"&&b!==null&&(f in i?i[f]=null:i.hasAttribute(f)&&i.removeAttribute(f)),i.addEventListener(r,p,A);break e}f in i?i[f]=p:p===!0?i.setAttribute(f,""):at(i,f,p)}}}function Gs(i,r,f){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":In("error",i),In("load",i);var p=!1,A=!1,b;for(b in f)if(f.hasOwnProperty(b)){var L=f[b];if(L!=null)switch(b){case"src":p=!0;break;case"srcSet":A=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,r));default:si(i,r,b,L,f,null)}}A&&si(i,r,"srcSet",f.srcSet,f,null),p&&si(i,r,"src",f.src,f,null);return;case"input":In("invalid",i);var V=b=L=A=null,ee=null,ye=null;for(p in f)if(f.hasOwnProperty(p)){var Ie=f[p];if(Ie!=null)switch(p){case"name":A=Ie;break;case"type":L=Ie;break;case"checked":ee=Ie;break;case"defaultChecked":ye=Ie;break;case"value":b=Ie;break;case"defaultValue":V=Ie;break;case"children":case"dangerouslySetInnerHTML":if(Ie!=null)throw Error(n(137,r));break;default:si(i,r,p,Ie,f,null)}}Yi(i,b,V,ee,ye,L,A,!1);return;case"select":In("invalid",i),p=L=b=null;for(A in f)if(f.hasOwnProperty(A)&&(V=f[A],V!=null))switch(A){case"value":b=V;break;case"defaultValue":L=V;break;case"multiple":p=V;default:si(i,r,A,V,f,null)}r=b,f=L,i.multiple=!!p,r!=null?ci(i,!!p,r,!1):f!=null&&ci(i,!!p,f,!0);return;case"textarea":In("invalid",i),b=A=p=null;for(L in f)if(f.hasOwnProperty(L)&&(V=f[L],V!=null))switch(L){case"value":p=V;break;case"defaultValue":A=V;break;case"children":b=V;break;case"dangerouslySetInnerHTML":if(V!=null)throw Error(n(91));break;default:si(i,r,L,V,f,null)}qi(i,p,A,b);return;case"option":for(ee in f)if(f.hasOwnProperty(ee)&&(p=f[ee],p!=null))switch(ee){case"selected":i.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:si(i,r,ee,p,f,null)}return;case"dialog":In("beforetoggle",i),In("toggle",i),In("cancel",i),In("close",i);break;case"iframe":case"object":In("load",i);break;case"video":case"audio":for(p=0;p<Vr.length;p++)In(Vr[p],i);break;case"image":In("error",i),In("load",i);break;case"details":In("toggle",i);break;case"embed":case"source":case"link":In("error",i),In("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ye in f)if(f.hasOwnProperty(ye)&&(p=f[ye],p!=null))switch(ye){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,r));default:si(i,r,ye,p,f,null)}return;default:if(Er(r)){for(Ie in f)f.hasOwnProperty(Ie)&&(p=f[Ie],p!==void 0&&J_(i,r,Ie,p,f,void 0));return}}for(V in f)f.hasOwnProperty(V)&&(p=f[V],p!=null&&si(i,r,V,p,f,null))}function bC(i,r,f,p){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var A=null,b=null,L=null,V=null,ee=null,ye=null,Ie=null;for(we in f){var ke=f[we];if(f.hasOwnProperty(we)&&ke!=null)switch(we){case"checked":break;case"value":break;case"defaultValue":ee=ke;default:p.hasOwnProperty(we)||si(i,r,we,null,p,ke)}}for(var xe in p){var we=p[xe];if(ke=f[xe],p.hasOwnProperty(xe)&&(we!=null||ke!=null))switch(xe){case"type":b=we;break;case"name":A=we;break;case"checked":ye=we;break;case"defaultChecked":Ie=we;break;case"value":L=we;break;case"defaultValue":V=we;break;case"children":case"dangerouslySetInnerHTML":if(we!=null)throw Error(n(137,r));break;default:we!==ke&&si(i,r,xe,we,p,ke)}}Pn(i,L,V,ee,ye,Ie,b,A);return;case"select":we=L=V=xe=null;for(b in f)if(ee=f[b],f.hasOwnProperty(b)&&ee!=null)switch(b){case"value":break;case"multiple":we=ee;default:p.hasOwnProperty(b)||si(i,r,b,null,p,ee)}for(A in p)if(b=p[A],ee=f[A],p.hasOwnProperty(A)&&(b!=null||ee!=null))switch(A){case"value":xe=b;break;case"defaultValue":V=b;break;case"multiple":L=b;default:b!==ee&&si(i,r,A,b,p,ee)}r=V,f=L,p=we,xe!=null?ci(i,!!f,xe,!1):!!p!=!!f&&(r!=null?ci(i,!!f,r,!0):ci(i,!!f,f?[]:"",!1));return;case"textarea":we=xe=null;for(V in f)if(A=f[V],f.hasOwnProperty(V)&&A!=null&&!p.hasOwnProperty(V))switch(V){case"value":break;case"children":break;default:si(i,r,V,null,p,A)}for(L in p)if(A=p[L],b=f[L],p.hasOwnProperty(L)&&(A!=null||b!=null))switch(L){case"value":xe=A;break;case"defaultValue":we=A;break;case"children":break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(n(91));break;default:A!==b&&si(i,r,L,A,p,b)}Xn(i,xe,we);return;case"option":for(var Ft in f)if(xe=f[Ft],f.hasOwnProperty(Ft)&&xe!=null&&!p.hasOwnProperty(Ft))switch(Ft){case"selected":i.selected=!1;break;default:si(i,r,Ft,null,p,xe)}for(ee in p)if(xe=p[ee],we=f[ee],p.hasOwnProperty(ee)&&xe!==we&&(xe!=null||we!=null))switch(ee){case"selected":i.selected=xe&&typeof xe!="function"&&typeof xe!="symbol";break;default:si(i,r,ee,xe,p,we)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var en in f)xe=f[en],f.hasOwnProperty(en)&&xe!=null&&!p.hasOwnProperty(en)&&si(i,r,en,null,p,xe);for(ye in p)if(xe=p[ye],we=f[ye],p.hasOwnProperty(ye)&&xe!==we&&(xe!=null||we!=null))switch(ye){case"children":case"dangerouslySetInnerHTML":if(xe!=null)throw Error(n(137,r));break;default:si(i,r,ye,xe,p,we)}return;default:if(Er(r)){for(var ri in f)xe=f[ri],f.hasOwnProperty(ri)&&xe!==void 0&&!p.hasOwnProperty(ri)&&J_(i,r,ri,void 0,p,xe);for(Ie in p)xe=p[Ie],we=f[Ie],!p.hasOwnProperty(Ie)||xe===we||xe===void 0&&we===void 0||J_(i,r,Ie,xe,p,we);return}}for(var he in f)xe=f[he],f.hasOwnProperty(he)&&xe!=null&&!p.hasOwnProperty(he)&&si(i,r,he,null,p,xe);for(ke in p)xe=p[ke],we=f[ke],!p.hasOwnProperty(ke)||xe===we||xe==null&&we==null||si(i,r,ke,xe,p,we)}function ub(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function MC(){if(typeof performance.getEntriesByType=="function"){for(var i=0,r=0,f=performance.getEntriesByType("resource"),p=0;p<f.length;p++){var A=f[p],b=A.transferSize,L=A.initiatorType,V=A.duration;if(b&&V&&ub(L)){for(L=0,V=A.responseEnd,p+=1;p<f.length;p++){var ee=f[p],ye=ee.startTime;if(ye>V)break;var Ie=ee.transferSize,ke=ee.initiatorType;Ie&&ub(ke)&&(ee=ee.responseEnd,L+=Ie*(ee<V?1:(V-ye)/(ee-ye)))}if(--p,r+=8*(b+L)/(A.duration/1e3),i++,10<i)break}}if(0<i)return r/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var Y_=null,q_=null;function I0(i){return i.nodeType===9?i:i.ownerDocument}function fb(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function hb(i,r){if(i===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&r==="foreignObject"?0:i}function K_(i,r){return i==="textarea"||i==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Z_=null;function EC(){var i=window.event;return i&&i.type==="popstate"?i===Z_?!1:(Z_=i,!0):(Z_=null,!1)}var db=typeof setTimeout=="function"?setTimeout:void 0,TC=typeof clearTimeout=="function"?clearTimeout:void 0,pb=typeof Promise=="function"?Promise:void 0,CC=typeof queueMicrotask=="function"?queueMicrotask:typeof pb<"u"?function(i){return pb.resolve(null).then(i).catch(wC)}:db;function wC(i){setTimeout(function(){throw i})}function Tc(i){return i==="head"}function mb(i,r){var f=r,p=0;do{var A=f.nextSibling;if(i.removeChild(f),A&&A.nodeType===8)if(f=A.data,f==="/$"||f==="/&"){if(p===0){i.removeChild(A),Uh(r);return}p--}else if(f==="$"||f==="$?"||f==="$~"||f==="$!"||f==="&")p++;else if(f==="html")Kp(i.ownerDocument.documentElement);else if(f==="head"){f=i.ownerDocument.head,Kp(f);for(var b=f.firstChild;b;){var L=b.nextSibling,V=b.nodeName;b[je]||V==="SCRIPT"||V==="STYLE"||V==="LINK"&&b.rel.toLowerCase()==="stylesheet"||f.removeChild(b),b=L}}else f==="body"&&Kp(i.ownerDocument.body);f=A}while(f);Uh(r)}function gb(i,r){var f=i;i=0;do{var p=f.nextSibling;if(f.nodeType===1?r?(f._stashedDisplay=f.style.display,f.style.display="none"):(f.style.display=f._stashedDisplay||"",f.getAttribute("style")===""&&f.removeAttribute("style")):f.nodeType===3&&(r?(f._stashedText=f.nodeValue,f.nodeValue=""):f.nodeValue=f._stashedText||""),p&&p.nodeType===8)if(f=p.data,f==="/$"){if(i===0)break;i--}else f!=="$"&&f!=="$?"&&f!=="$~"&&f!=="$!"||i++;f=p}while(f)}function Q_(i){var r=i.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var f=r;switch(r=r.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":Q_(f),Ye(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}i.removeChild(f)}}function RC(i,r,f,p){for(;i.nodeType===1;){var A=f;if(i.nodeName.toLowerCase()!==r.toLowerCase()){if(!p&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(p){if(!i[je])switch(r){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(b=i.getAttribute("rel"),b==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(b!==A.rel||i.getAttribute("href")!==(A.href==null||A.href===""?null:A.href)||i.getAttribute("crossorigin")!==(A.crossOrigin==null?null:A.crossOrigin)||i.getAttribute("title")!==(A.title==null?null:A.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(b=i.getAttribute("src"),(b!==(A.src==null?null:A.src)||i.getAttribute("type")!==(A.type==null?null:A.type)||i.getAttribute("crossorigin")!==(A.crossOrigin==null?null:A.crossOrigin))&&b&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(r==="input"&&i.type==="hidden"){var b=A.name==null?null:""+A.name;if(A.type==="hidden"&&i.getAttribute("name")===b)return i}else return i;if(i=Ba(i.nextSibling),i===null)break}return null}function BC(i,r,f){if(r==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!f||(i=Ba(i.nextSibling),i===null))return null;return i}function vb(i,r){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!r||(i=Ba(i.nextSibling),i===null))return null;return i}function j_(i){return i.data==="$?"||i.data==="$~"}function $_(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function DC(i,r){var f=i.ownerDocument;if(i.data==="$~")i._reactRetry=r;else if(i.data!=="$?"||f.readyState!=="loading")r();else{var p=function(){r(),f.removeEventListener("DOMContentLoaded",p)};f.addEventListener("DOMContentLoaded",p),i._reactRetry=p}}function Ba(i){for(;i!=null;i=i.nextSibling){var r=i.nodeType;if(r===1||r===3)break;if(r===8){if(r=i.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;
vendor: 9,486 bytes, line 33
33if(r==="/$"||r==="/&")return null}}return i}var ex=null;function yb(i){i=i.nextSibling;for(var r=0;i;){if(i.nodeType===8){var f=i.data;if(f==="/$"||f==="/&"){if(r===0)return Ba(i.nextSibling);r--}else f!=="$"&&f!=="$!"&&f!=="$?"&&f!=="$~"&&f!=="&"||r++}i=i.nextSibling}return null}function _b(i){i=i.previousSibling;for(var r=0;i;){if(i.nodeType===8){var f=i.data;if(f==="$"||f==="$!"||f==="$?"||f==="$~"||f==="&"){if(r===0)return i;r--}else f!=="/$"&&f!=="/&"||r++}i=i.previousSibling}return null}function xb(i,r,f){switch(r=I0(f),i){case"html":if(i=r.documentElement,!i)throw Error(n(452));return i;case"head":if(i=r.head,!i)throw Error(n(453));return i;case"body":if(i=r.body,!i)throw Error(n(454));return i;default:throw Error(n(451))}}function Kp(i){for(var r=i.attributes;r.length;)i.removeAttributeNode(r[0]);Ye(i)}var Da=new Map,Ab=new Set;function L0(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var wl=$.d;$.d={f:IC,r:LC,D:UC,C:NC,L:FC,m:OC,X:zC,S:PC,M:GC};function IC(){var i=wl.f(),r=jr();return i||r}function LC(i){var r=rt(i);r!==null&&r.tag===5&&r.type==="form"?m0(r):wl.r(i)}var Dh=typeof document>"u"?null:document;function Sb(i,r,f){var p=Dh;if(p&&typeof r=="string"&&r){var A=xt(r);A='link[rel="'+i+'"][href="'+A+'"]',typeof f=="string"&&(A+='[crossorigin="'+f+'"]'),Ab.has(A)||(Ab.add(A),i={rel:i,crossOrigin:f,href:r},p.querySelector(A)===null&&(r=p.createElement("link"),Gs(r,"link",i),G(r),p.head.appendChild(r)))}}function UC(i){wl.D(i),Sb("dns-prefetch",i,null)}function NC(i,r){wl.C(i,r),Sb("preconnect",i,r)}function FC(i,r,f){wl.L(i,r,f);var p=Dh;if(p&&i&&r){var A='link[rel="preload"][as="'+xt(r)+'"]';r==="image"&&f&&f.imageSrcSet?(A+='[imagesrcset="'+xt(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(A+='[imagesizes="'+xt(f.imageSizes)+'"]')):A+='[href="'+xt(i)+'"]';var b=A;switch(r){case"style":b=Ih(i);break;case"script":b=Lh(i)}Da.has(b)||(i=v({rel:"preload",href:r==="image"&&f&&f.imageSrcSet?void 0:i,as:r},f),Da.set(b,i),p.querySelector(A)!==null||r==="style"&&p.querySelector(Zp(b))||r==="script"&&p.querySelector(Qp(b))||(r=p.createElement("link"),Gs(r,"link",i),G(r),p.head.appendChild(r)))}}function OC(i,r){wl.m(i,r);var f=Dh;if(f&&i){var p=r&&typeof r.as=="string"?r.as:"script",A='link[rel="modulepreload"][as="'+xt(p)+'"][href="'+xt(i)+'"]',b=A;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Lh(i)}if(!Da.has(b)&&(i=v({rel:"modulepreload",href:i},r),Da.set(b,i),f.querySelector(A)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(Qp(b)))return}p=f.createElement("link"),Gs(p,"link",i),G(p),f.head.appendChild(p)}}}function PC(i,r,f){wl.S(i,r,f);var p=Dh;if(p&&i){var A=st(p).hoistableStyles,b=Ih(i);r=r||"default";var L=A.get(b);if(!L){var V={loading:0,preload:null};if(L=p.querySelector(Zp(b)))V.loading=5;else{i=v({rel:"stylesheet",href:i,"data-precedence":r},f),(f=Da.get(b))&&tx(i,f);var ee=L=p.createElement("link");G(ee),Gs(ee,"link",i),ee._p=new Promise(function(ye,Ie){ee.onload=ye,ee.onerror=Ie}),ee.addEventListener("load",function(){V.loading|=1}),ee.addEventListener("error",function(){V.loading|=2}),V.loading|=4,U0(L,r,p)}L={type:"stylesheet",instance:L,count:1,state:V},A.set(b,L)}}}function zC(i,r){wl.X(i,r);var f=Dh;if(f&&i){var p=st(f).hoistableScripts,A=Lh(i),b=p.get(A);b||(b=f.querySelector(Qp(A)),b||(i=v({src:i,async:!0},r),(r=Da.get(A))&&nx(i,r),b=f.createElement("script"),G(b),Gs(b,"link",i),f.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},p.set(A,b))}}function GC(i,r){wl.M(i,r);var f=Dh;if(f&&i){var p=st(f).hoistableScripts,A=Lh(i),b=p.get(A);b||(b=f.querySelector(Qp(A)),b||(i=v({src:i,async:!0,type:"module"},r),(r=Da.get(A))&&nx(i,r),b=f.createElement("script"),G(b),Gs(b,"link",i),f.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},p.set(A,b))}}function bb(i,r,f,p){var A=(A=me.current)?L0(A):null;if(!A)throw Error(n(446));switch(i){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(r=Ih(f.href),f=st(A).hoistableStyles,p=f.get(r),p||(p={type:"style",instance:null,count:0,state:null},f.set(r,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){i=Ih(f.href);var b=st(A).hoistableStyles,L=b.get(i);if(L||(A=A.ownerDocument||A,L={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(i,L),(b=A.querySelector(Zp(i)))&&!b._p&&(L.instance=b,L.state.loading=5),Da.has(i)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},Da.set(i,f),b||HC(A,i,f,L.state))),r&&p===null)throw Error(n(528,""));return L}if(r&&p!==null)throw Error(n(529,""));return null;case"script":return r=f.async,f=f.src,typeof f=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Lh(f),f=st(A).hoistableScripts,p=f.get(r),p||(p={type:"script",instance:null,count:0,state:null},f.set(r,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,i))}}function Ih(i){return'href="'+xt(i)+'"'}function Zp(i){return'link[rel="stylesheet"]['+i+"]"}function Mb(i){return v({},i,{"data-precedence":i.precedence,precedence:null})}function HC(i,r,f,p){i.querySelector('link[rel="preload"][as="style"]['+r+"]")?p.loading=1:(r=i.createElement("link"),p.preload=r,r.addEventListener("load",function(){return p.loading|=1}),r.addEventListener("error",function(){return p.loading|=2}),Gs(r,"link",f),G(r),i.head.appendChild(r))}function Lh(i){return'[src="'+xt(i)+'"]'}function Qp(i){return"script[async]"+i}function Eb(i,r,f){if(r.count++,r.instance===null)switch(r.type){case"style":var p=i.querySelector('style[data-href~="'+xt(f.href)+'"]');if(p)return r.instance=p,G(p),p;var A=v({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return p=(i.ownerDocument||i).createElement("style"),G(p),Gs(p,"style",A),U0(p,f.precedence,i),r.instance=p;case"stylesheet":A=Ih(f.href);var b=i.querySelector(Zp(A));if(b)return r.state.loading|=4,r.instance=b,G(b),b;p=Mb(f),(A=Da.get(A))&&tx(p,A),b=(i.ownerDocument||i).createElement("link"),G(b);var L=b;return L._p=new Promise(function(V,ee){L.onload=V,L.onerror=ee}),Gs(b,"link",p),r.state.loading|=4,U0(b,f.precedence,i),r.instance=b;case"script":return b=Lh(f.src),(A=i.querySelector(Qp(b)))?(r.instance=A,G(A),A):(p=f,(A=Da.get(b))&&(p=v({},f),nx(p,A)),i=i.ownerDocument||i,A=i.createElement("script"),G(A),Gs(A,"link",p),i.head.appendChild(A),r.instance=A);case"void":return null;default:throw Error(n(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(p=r.instance,r.state.loading|=4,U0(p,f.precedence,i));return r.instance}function U0(i,r,f){for(var p=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),A=p.length?p[p.length-1]:null,b=A,L=0;L<p.length;L++){var V=p[L];if(V.dataset.precedence===r)b=V;else if(b!==A)break}b?b.parentNode.insertBefore(i,b.nextSibling):(r=f.nodeType===9?f.head:f,r.insertBefore(i,r.firstChild))}function tx(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.title==null&&(i.title=r.title)}function nx(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.integrity==null&&(i.integrity=r.integrity)}var N0=null;function Tb(i,r,f){if(N0===null){var p=new Map,A=N0=new Map;A.set(f,p)}else A=N0,p=A.get(f),p||(p=new Map,A.set(f,p));if(p.has(i))return p;for(p.set(i,null),f=f.getElementsByTagName(i),A=0;A<f.length;A++){var b=f[A];if(!(b[je]||b[ai]||i==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var L=b.getAttribute(r)||"";L=i+L;var V=p.get(L);V?V.push(b):p.set(L,[b])}}return p}function Cb(i,r,f){i=i.ownerDocument||i,i.head.insertBefore(f,r==="title"?i.querySelector("head > title"):null)}function kC(i,r,f){if(f===1||r.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return i=r.disabled,typeof r.precedence=="string"&&i==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function wb(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function VC(i,r,f,p){if(f.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var A=Ih(p.href),b=r.querySelector(Zp(A));if(b){r=b._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(i.count++,i=F0.bind(i),r.then(i,i)),f.state.loading|=4,f.instance=b,G(b);return}b=r.ownerDocument||r,p=Mb(p),(A=Da.get(A))&&tx(p,A),b=b.createElement("link"),G(b);var L=b;L._p=new Promise(function(V,ee){L.onload=V,L.onerror=ee}),Gs(b,"link",p),f.instance=b}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(f,r),(r=f.state.preload)&&(f.state.loading&3)===0&&(i.count++,f=F0.bind(i),r.addEventListener("load",f),r.addEventListener("error",f))}}var ix=0;
vendor: 10,717 bytes, line 33
33function XC(i,r){return i.stylesheets&&i.count===0&&P0(i,i.stylesheets),0<i.count||0<i.imgCount?function(f){var p=setTimeout(function(){if(i.stylesheets&&P0(i,i.stylesheets),i.unsuspend){var b=i.unsuspend;i.unsuspend=null,b()}},6e4+r);0<i.imgBytes&&ix===0&&(ix=62500*MC());var A=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&P0(i,i.stylesheets),i.unsuspend)){var b=i.unsuspend;i.unsuspend=null,b()}},(i.imgBytes>ix?50:800)+r);return i.unsuspend=f,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(A)}}:null}function F0(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)P0(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var O0=null;function P0(i,r){i.stylesheets=null,i.unsuspend!==null&&(i.count++,O0=new Map,r.forEach(WC,i),O0=null,F0.call(i))}function WC(i,r){if(!(r.state.loading&4)){var f=O0.get(i);if(f)var p=f.get(null);else{f=new Map,O0.set(i,f);for(var A=i.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<A.length;b++){var L=A[b];(L.nodeName==="LINK"||L.getAttribute("media")!=="not all")&&(f.set(L.dataset.precedence,L),p=L)}p&&f.set(null,p)}A=r.instance,L=A.getAttribute("data-precedence"),b=f.get(L)||p,b===p&&f.set(null,A),f.set(L,A),this.count++,p=F0.bind(this),A.addEventListener("load",p),A.addEventListener("error",p),b?b.parentNode.insertBefore(A,b.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(A,i.firstChild)),r.state.loading|=4}}var jp={$$typeof:D,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function JC(i,r,f,p,A,b,L,V,ee){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=wn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wn(0),this.hiddenUpdates=wn(null),this.identifierPrefix=p,this.onUncaughtError=A,this.onCaughtError=b,this.onRecoverableError=L,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ee,this.incompleteTransitions=new Map}function Rb(i,r,f,p,A,b,L,V,ee,ye,Ie,ke){return i=new JC(i,r,f,L,ee,ye,Ie,ke,V),r=1,b===!0&&(r|=24),b=pi(3,null,null,r),i.current=b,b.stateNode=i,r=np(),r.refCount++,i.pooledCache=r,r.refCount++,b.memoizedState={element:p,isDehydrated:f,cache:r},Mu(b),i}function Bb(i){return i?(i=Ao,i):Ao}function Db(i,r,f,p,A,b){A=Bb(A),p.context===null?p.context=A:p.pendingContext=A,p=Ka(r),p.payload={element:f},b=b===void 0?null:b,b!==null&&(p.callback=b),f=Ro(i,p,r),f!==null&&(gn(f,i,r),Bo(f,i,r))}function Ib(i,r){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var f=i.retryLane;i.retryLane=f!==0&&f<r?f:r}}function sx(i,r){Ib(i,r),(i=i.alternate)&&Ib(i,r)}function Lb(i){if(i.tag===13||i.tag===31){var r=Ls(i,67108864);r!==null&&gn(r,i,67108864),sx(i,67108864)}}function Ub(i){if(i.tag===13||i.tag===31){var r=gr();r=oa(r);var f=Ls(i,r);f!==null&&gn(f,i,r),sx(i,r)}}var z0=!0;function YC(i,r,f,p){var A=Y.T;Y.T=null;var b=$.p;try{$.p=2,rx(i,r,f,p)}finally{$.p=b,Y.T=A}}function qC(i,r,f,p){var A=Y.T;Y.T=null;var b=$.p;try{$.p=8,rx(i,r,f,p)}finally{$.p=b,Y.T=A}}function rx(i,r,f,p){if(z0){var A=ax(p);if(A===null)W_(i,r,p,G0,f),Fb(i,p);else if(ZC(A,i,r,f,p))p.stopPropagation();else if(Fb(i,p),r&4&&-1<KC.indexOf(i)){for(;A!==null;){var b=rt(A);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var L=Ze(b.pendingLanes);if(L!==0){var V=b;for(V.pendingLanes|=2,V.entangledLanes|=2;L;){var ee=1<<31-_t(L);V.entanglements[1]|=ee,L&=~ee}et(b),(kt&6)===0&&(Ii=N()+500,Bt(0))}}break;case 31:case 13:V=Ls(b,2),V!==null&&gn(V,b,2),jr(),sx(b,2)}if(b=ax(p),b===null&&W_(i,r,p,G0,f),b===A)break;A=b}A!==null&&p.stopPropagation()}else W_(i,r,p,null,f)}}function ax(i){return i=Bf(i),ox(i)}var G0=null;function ox(i){if(G0=null,i=lt(i),i!==null){var r=o(i);if(r===null)i=null;else{var f=r.tag;if(f===13){if(i=u(r),i!==null)return i;i=null}else if(f===31){if(i=h(r),i!==null)return i;i=null}else if(f===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;i=null}else r!==i&&(i=null)}}return G0=i,null}function Nb(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(le()){case Ee:return 2;case Pe:return 8;case Me:case St:return 32;case ot:return 268435456;default:return 32}default:return 32}}var lx=!1,Cc=null,wc=null,Rc=null,$p=new Map,em=new Map,Bc=[],KC="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Fb(i,r){switch(i){case"focusin":case"focusout":Cc=null;break;case"dragenter":case"dragleave":wc=null;break;case"mouseover":case"mouseout":Rc=null;break;case"pointerover":case"pointerout":$p.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":em.delete(r.pointerId)}}function tm(i,r,f,p,A,b){return i===null||i.nativeEvent!==b?(i={blockedOn:r,domEventName:f,eventSystemFlags:p,nativeEvent:b,targetContainers:[A]},r!==null&&(r=rt(r),r!==null&&Lb(r)),i):(i.eventSystemFlags|=p,r=i.targetContainers,A!==null&&r.indexOf(A)===-1&&r.push(A),i)}function ZC(i,r,f,p,A){switch(r){case"focusin":return Cc=tm(Cc,i,r,f,p,A),!0;case"dragenter":return wc=tm(wc,i,r,f,p,A),!0;case"mouseover":return Rc=tm(Rc,i,r,f,p,A),!0;case"pointerover":var b=A.pointerId;return $p.set(b,tm($p.get(b)||null,i,r,f,p,A)),!0;case"gotpointercapture":return b=A.pointerId,em.set(b,tm(em.get(b)||null,i,r,f,p,A)),!0}return!1}function Ob(i){var r=lt(i.target);if(r!==null){var f=o(r);if(f!==null){if(r=f.tag,r===13){if(r=u(f),r!==null){i.blockedOn=r,Kt(i.priority,function(){Ub(f)});return}}else if(r===31){if(r=h(f),r!==null){i.blockedOn=r,Kt(i.priority,function(){Ub(f)});return}}else if(r===3&&f.stateNode.current.memoizedState.isDehydrated){i.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}i.blockedOn=null}function H0(i){if(i.blockedOn!==null)return!1;for(var r=i.targetContainers;0<r.length;){var f=ax(i.nativeEvent);if(f===null){f=i.nativeEvent;var p=new f.constructor(f.type,f);Rf=p,f.target.dispatchEvent(p),Rf=null}else return r=rt(f),r!==null&&Lb(r),i.blockedOn=f,!1;r.shift()}return!0}function Pb(i,r,f){H0(i)&&f.delete(r)}function QC(){lx=!1,Cc!==null&&H0(Cc)&&(Cc=null),wc!==null&&H0(wc)&&(wc=null),Rc!==null&&H0(Rc)&&(Rc=null),$p.forEach(Pb),em.forEach(Pb)}function k0(i,r){i.blockedOn===r&&(i.blockedOn=null,lx||(lx=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,QC)))}var V0=null;function zb(i){V0!==i&&(V0=i,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){V0===i&&(V0=null);for(var r=0;r<i.length;r+=3){var f=i[r],p=i[r+1],A=i[r+2];if(typeof p!="function"){if(ox(p||f)===null)continue;break}var b=rt(f);b!==null&&(i.splice(r,3),r-=3,Rp(b,{pending:!0,data:A,method:f.method,action:p},p,A))}}))}function Uh(i){function r(ee){return k0(ee,i)}Cc!==null&&k0(Cc,i),wc!==null&&k0(wc,i),Rc!==null&&k0(Rc,i),$p.forEach(r),em.forEach(r);for(var f=0;f<Bc.length;f++){var p=Bc[f];p.blockedOn===i&&(p.blockedOn=null)}for(;0<Bc.length&&(f=Bc[0],f.blockedOn===null);)Ob(f),f.blockedOn===null&&Bc.shift();if(f=(i.ownerDocument||i).$$reactFormReplay,f!=null)for(p=0;p<f.length;p+=3){var A=f[p],b=f[p+1],L=A[F]||null;if(typeof b=="function")L||zb(f);else if(L){var V=null;if(b&&b.hasAttribute("formAction")){if(A=b,L=b[F]||null)V=L.formAction;else if(ox(A)!==null)continue}else V=L.action;typeof V=="function"?f[p+1]=V:(f.splice(p,3),p-=3),zb(f)}}}function Gb(){function i(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(L){return A=L})},focusReset:"manual",scroll:"manual"})}function r(){A!==null&&(A(),A=null),p||setTimeout(f,20)}function f(){if(!p&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,A=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(f,100),function(){p=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),A!==null&&(A(),A=null)}}}function cx(i){this._internalRoot=i}X0.prototype.render=cx.prototype.render=function(i){var r=this._internalRoot;if(r===null)throw Error(n(409));var f=r.current,p=gr();Db(f,p,i,r,null,null)},X0.prototype.unmount=cx.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var r=i.containerInfo;Db(i.current,2,null,i,null,null),jr(),r[W]=null}};function X0(i){this._internalRoot=i}X0.prototype.unstable_scheduleHydration=function(i){if(i){var r=ar();i={blockedOn:null,target:i,priority:r};for(var f=0;f<Bc.length&&r!==0&&r<Bc[f].priority;f++);Bc.splice(f,0,i),f===0&&Ob(i)}};var Hb=e.version;if(Hb!=="19.2.3")throw Error(n(527,Hb,"19.2.3"));$.findDOMNode=function(i){var r=i._reactInternals;if(r===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=g(r),i=i!==null?y(i):null,i=i===null?null:i.stateNode,i};var jC={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:Y,reconcilerVersion:"19.2.3"};
33if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var W0=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!W0.isDisabled&&W0.supportsFiber)try{Xe=W0.inject(jC),Je=W0}catch{}}return im.createRoot=function(i,r){if(!s(i))throw Error(n(299));var f=!1,p="",A=S0,b=Np,L=Fp;return r!=null&&(r.unstable_strictMode===!0&&(f=!0),r.identifierPrefix!==void 0&&(p=r.identifierPrefix),r.onUncaughtError!==void 0&&(A=r.onUncaughtError),r.onCaughtError!==void 0&&(b=r.onCaughtError),r.onRecoverableError!==void 0&&(L=r.onRecoverableError)),r=Rb(i,1,!1,null,null,f,p,null,A,b,L,Gb),i[W]=r.current,X_(i),new cx(r)},im.hydrateRoot=function(i,r,f){if(!s(i))throw Error(n(299));var p=!1,A="",b=S0,L=Np,V=Fp,ee=null;return f!=null&&(f.unstable_strictMode===!0&&(p=!0),f.identifierPrefix!==void 0&&(A=f.identifierPrefix),f.onUncaughtError!==void 0&&(b=f.onUncaughtError),f.onCaughtError!==void 0&&(L=f.onCaughtError),f.onRecoverableError!==void 0&&(V=f.onRecoverableError),f.formState!==void 0&&(ee=f.formState)),r=Rb(i,1,!0,r,f??null,p,A,ee,b,L,V,Gb),r.context=Bb(null),f=r.current,p=gr(),p=oa(p),A=Ka(p),A.callback=null,Ro(f,A,p),f=p,r.current.lanes=f,Ji(r,f),et(r),i[W]=r.current,X_(i),new X0(r)},im.version="19.2.3",im}var Yb;function ow(){if(Yb)return fx.exports;Yb=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(e){console.error(e)}}return a(),fx.exports=aw(),fx.exports}var _P=ow();/** 34 * @license 35 * Copyright 2010-2025 Three.js Authors 36 * SPDX-License-Identifier: MIT 37 */const Jm="182",lw={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},cw={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Q1=0,AA=1,j1=2,uw=3,$1=0,ad=1,bm=2,of=3,Zo=0,Ar=1,Ua=2,fo=0,mf=1,SA=2,bA=3,MA=4,eE=5,kc=100,tE=101,nE=102,iE=103,sE=104,rE=200,aE=201,oE=202,lE=203,Jv=204,Yv=205,cE=206,uE=207,fE=208,hE=209,dE=210,pE=211,mE=212,gE=213,vE=214,qv=0,Kv=1,Zv=2,yf=3,Qv=4,jv=5,$v=6,ey=7,Ym=0,yE=1,_E=2,Oa=0,KA=1,ZA=2,QA=3,Wy=4,jA=5,$A=6,eS=7,EA="attached",xE="detached",qc=300,ho=301,Kc=302,fd=303,Lm=304,Td=306,Zc=1e3,Fi=1001,hd=1002,Xi=1003,Jy=1004,fw=1004,lf=1005,hw=1005,Un=1006,od=1007,dw=1007,Fa=1008,TA=1008,ws=1009,Yy=1010,qy=1011,dd=1012,qm=1013,ia=1014,Ci=1015,Wi=1016,Ky=1017,Zy=1018,pd=1020,tS=35902,nS=35899,iS=1021,sS=1022,ts=1023,Qo=1026,Vc=1027,Km=1028,Zm=1029,_f=1030,Qy=1031,pw=1032,jy=1033,Mm=33776,Em=33777,Tm=33778,Cm=33779,ty=35840,ny=35841,iy=35842,sy=35843,ry=36196,ay=37492,oy=37496,ly=37488,cy=37489,uy=37490,fy=37491,hy=37808,dy=37809,py=37810,my=37811,gy=37812,vy=37813,yy=37814,_y=37815,xy=37816,Ay=37817,Sy=37818,by=37819,My=37820,Ey=37821,Ty=36492,Cy=36494,wy=36495,Ry=36283,By=36284,Dy=36285,Iy=36286,AE=2200,SE=2201,bE=2202,md=2300,gd=2301,kv=2302,cf=2400,uf=2401,Um=2402,$y=2500,rS=2501,ME=0,aS=1,Ly=2,EE=3200,mw=3201,gw=3202,vw=3203,$c=0,TE=1,Fl="",ks="srgb",po="srgb-linear",Nm="linear",$n="srgb",yw="",_w="rg",xw="ga",Aw=0,rf=7680,Sw=7681,bw=7682,Mw=7683,Ew=34055,Tw=34056,Cw=5386,ww=512,Rw=513,Bw=514,Dw=515,Iw=516,Lw=517,Uw=518,CA=519,CE=512,wE=513,RE=514,e_=515,BE=516,DE=517,t_=518,IE=519,Fm=35044,Nw=35048,Fw=35040,Ow=35045,Pw=35049,zw=35041,Gw=35046,Hw=35050,kw=35042,Vw="100",wA="300 es",ta=2e3,vd=2001,Xw={COMPUTE:"compute",RENDER:"render"},Ww={PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"},Jw={NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FIRST:"first",EITHER:"either"};function LE(a){for(let e=a.length-1;e>=0;--e)if(a[e]>=65535)return!0;return!1}const Yw={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function rd(a,e){return new Yw[a](e)}function UE(a){return ArrayBuffer.isView(a)&&!(a instanceof DataView)}function Om(a){return document.createElementNS("http://www.w3.org/1999/xhtml",a)}function NE(){const a=Om("canvas");return a.style.display="block",a}const qb={};let Qc=null;function qw(a){Qc=a}function Kw(){return Qc}function Pm(...a){const e="THREE."+a.shift();Qc?Qc("log",e,...a):console.log(e,...a)}function Mt(...a){const e="THREE."+a.shift();Qc?Qc("warn",e,...a):console.warn(e,...a)}function Vt(...a){const e="THREE."+a.shift();Qc?Qc("error",e,...a):console.error(e,...a)}function yd(...a){const e=a.join(" ");e in qb||(qb[e]=!0,Mt(...a))}function Zw(a,e,t){return new Promise(function(n,s){function o(){switch(a.clientWaitSync(e,a.SYNC_FLUSH_COMMANDS_BIT,0)){case a.WAIT_FAILED:s();break;case a.TIMEOUT_EXPIRED:setTimeout(o,t);break;default:n()}}setTimeout(o,t)})}class jo{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){const n=this._listeners;if(n===void 0)return;const s=n[e];if(s!==void 0){const o=s.indexOf(t);o!==-1&&s.splice(o,1)}}dispatchEvent(e){const t=this._listeners;if(t===void 0)return;const n=t[e.type];if(n!==void 0){e.target=this;const s=n.slice(0);for(let o=0,u=s.length;o<u;o++)s[o].call(this,e);e.target=null}}}const tr=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","5
375","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let Kb=1234567;const gf=Math.PI/180,_d=180/Math.PI;function na(){const a=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(tr[a&255]+tr[a>>8&255]+tr[a>>16&255]+tr[a>>24&255]+"-"+tr[e&255]+tr[e>>8&255]+"-"+tr[e>>16&15|64]+tr[e>>24&255]+"-"+tr[t&63|128]+tr[t>>8&255]+"-"+tr[t>>16&255]+tr[t>>24&255]+tr[n&255]+tr[n>>8&255]+tr[n>>16&255]+tr[n>>24&255]).toLowerCase()}function nn(a,e,t){return Math.max(e,Math.min(t,a))}function oS(a,e){return(a%e+e)%e}function Qw(a,e,t,n,s){return n+(a-e)*(s-n)/(t-e)}function jw(a,e,t){return a!==e?(t-a)/(e-a):0}function wm(a,e,t){return(1-t)*a+t*e}function $w(a,e,t,n){return wm(a,e,1-Math.exp(-t*n))}function eR(a,e=1){return e-Math.abs(oS(a,e*2)-e)}function tR(a,e,t){return a<=e?0:a>=t?1:(a=(a-e)/(t-e),a*a*(3-2*a))}function nR(a,e,t){return a<=e?0:a>=t?1:(a=(a-e)/(t-e),a*a*a*(a*(a*6-15)+10))}function iR(a,e){return a+Math.floor(Math.random()*(e-a+1))}function sR(a,e){return a+Math.random()*(e-a)}function rR(a){return a*(.5-Math.random())}function aR(a){a!==void 0&&(Kb=a);let e=Kb+=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 oR(a){return a*gf}function lR(a){return a*_d}function cR(a){return(a&a-1)===0&&a!==0}function uR(a){return Math.pow(2,Math.ceil(Math.log(a)/Math.LN2))}function fR(a){return Math.pow(2,Math.floor(Math.log(a)/Math.LN2))}function hR(a,e,t,n,s){const o=Math.cos,u=Math.sin,h=o(t/2),d=u(t/2),g=o((e+n)/2),y=u((e+n)/2),v=o((e-n)/2),x=u((e-n)/2),S=o((n-e)/2),M=u((n-e)/2);switch(s){case"XYX":a.set(h*y,d*v,d*x,h*g);break;case"YZY":a.set(d*x,h*y,d*v,h*g);break;case"ZXZ":a.set(d*v,d*x,h*y,h*g);break;case"XZX":a.set(h*y,d*M,d*S,h*g);break;case"YXY":a.set(d*S,h*y,d*M,h*g);break;case"ZYZ":a.set(d*M,d*S,h*y,h*g);break;default:Mt("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function xr(a,e){switch(e.constructor){case Float32Array:return a;case Uint32Array:return a/4294967295;case Uint16Array:return a/65535;case Uint8Array:return a/255;case Int32Array:return Math.max(a/2147483647,-1);case Int16Array:return Math.max(a/32767,-1);case Int8Array:return Math.max(a/127,-1);default:throw new Error("Invalid component type.")}}function vn(a,e){switch(e.constructor){case Float32Array:return a;case Uint32Array:return Math.round(a*4294967295);case Uint16Array:return Math.round(a*65535);case Uint8Array:return Math.round(a*255);case Int32Array:return Math.round(a*2147483647);case Int16Array:return Math.round(a*32767);case Int8Array:return Math.round(a*127);default:throw new Error("Invalid component type.")}}const FE={DEG2RAD:gf,RAD2DEG:_d,generateUUID:na,clamp:nn,euclideanModulo:oS,mapLinear:Qw,inverseLerp:jw,lerp:wm,damp:$w,pingpong:eR,smoothstep:tR,smootherstep:nR,randInt:iR,randFloat:sR,randFloatSpread:rR,seededRandom:aR,degToRad:oR,radToDeg:lR,isPowerOfTwo:cR,ceilPowerOfTwo:uR,floorPowerOfTwo:fR,setQuaternionFromProperEuler:hR,normalize:vn,denormalize:xr};class We{constructor(e=0,t=0){We.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}
vendor: 9,701 bytes, line 37
37sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,s=e.elements;return this.x=s[0]*t+s[3]*n+s[6],this.y=s[1]*t+s[4]*n+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=nn(this.x,e.x,t.x),this.y=nn(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=nn(this.x,e,t),this.y=nn(this.y,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(nn(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(nn(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),s=Math.sin(t),o=this.x-e.x,u=this.y-e.y;return this.x=o*n-u*s+e.x,this.y=o*s+u*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class sr{constructor(e=0,t=0,n=0,s=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=s}static slerpFlat(e,t,n,s,o,u,h){let d=n[s+0],g=n[s+1],y=n[s+2],v=n[s+3],x=o[u+0],S=o[u+1],M=o[u+2],w=o[u+3];if(h<=0){e[t+0]=d,e[t+1]=g,e[t+2]=y,e[t+3]=v;return}if(h>=1){e[t+0]=x,e[t+1]=S,e[t+2]=M,e[t+3]=w;return}if(v!==w||d!==x||g!==S||y!==M){let C=d*x+g*S+y*M+v*w;C<0&&(x=-x,S=-S,M=-M,w=-w,C=-C);let E=1-h;if(C<.9995){const B=Math.acos(C),D=Math.sin(B);E=Math.sin(E*B)/D,h=Math.sin(h*B)/D,d=d*E+x*h,g=g*E+S*h,y=y*E+M*h,v=v*E+w*h}else{d=d*E+x*h,g=g*E+S*h,y=y*E+M*h,v=v*E+w*h;const B=1/Math.sqrt(d*d+g*g+y*y+v*v);d*=B,g*=B,y*=B,v*=B}}e[t]=d,e[t+1]=g,e[t+2]=y,e[t+3]=v}static multiplyQuaternionsFlat(e,t,n,s,o,u){const h=n[s],d=n[s+1],g=n[s+2],y=n[s+3],v=o[u],x=o[u+1],S=o[u+2],M=o[u+3];return e[t]=h*M+y*v+d*S-g*x,e[t+1]=d*M+y*x+g*v-h*S,e[t+2]=g*M+y*S+h*x-d*v,e[t+3]=y*M-h*v-d*x-g*S,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,s){return this._x=e,this._y=t,this._z=n,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=!0){const n=e._x,s=e._y,o=e._z,u=e._order,h=Math.cos,d=Math.sin,g=h(n/2),y=h(s/2),v=h(o/2),x=d(n/2),S=d(s/2),M=d(o/2);switch(u){case"XYZ":this._x=x*y*v+g*S*M,this._y=g*S*v-x*y*M,this._z=g*y*M+x*S*v,this._w=g*y*v-x*S*M;break;case"YXZ":this._x=x*y*v+g*S*M,this._y=g*S*v-x*y*M,this._z=g*y*M-x*S*v,this._w=g*y*v+x*S*M;break;case"ZXY":this._x=x*y*v-g*S*M,this._y=g*S*v+x*y*M,this._z=g*y*M+x*S*v,this._w=g*y*v-x*S*M;break;case"ZYX":this._x=x*y*v-g*S*M,this._y=g*S*v+x*y*M,this._z=g*y*M-x*S*v,this._w=g*y*v+x*S*M;break;case"YZX":this._x=x*y*v+g*S*M,this._y=g*S*v+x*y*M,this._z=g*y*M-x*S*v,this._w=g*y*v-x*S*M;break;case"XZY":this._x=x*y*v-g*S*M,this._y=g*S*v-x*y*M,this._z=g*y*M+x*S*v,this._w=g*y*v+x*S*M;break;default:Mt("Quaternion: .setFromEuler() encountered an unknown order: "+u)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,s=Math.sin(n);return this._x=e.x*s,this._y=e.y*s,this._z=e.z*s,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],s=t[4],o=t[8],u=t[1],h=t[5],d=t[9],g=t[2],y=t[6],v=t[10],x=n+h+v;if(x>0){const S=.5/Math.sqrt(x+1);this._w=.25/S,this._x=(y-d)*S,this._y=(o-g)*S,this._z=(u-s)*S}else if(n>h&&n>v){const S=2*Math.sqrt(1+n-h-v);this._w=(y-d)/S,this._x=.25*S,this._y=(s+u)/S,this._z=(o+g)/S}else if(h>v){const S=2*Math.sqrt(1+h-n-v);this._w=(o-g)/S,this._x=(s+u)/S,this._y=.25*S,this._z=(d+y)/S}else{const S=2*Math.sqrt(1+v-n-h);this._w=(u-s)/S,this._x=(o+g)/S,this._y=(d+y)/S,this._z=.25*S}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(nn(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(n===0)return this;const s=Math.min(1,t/n);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 n=e._x,s=e._y,o=e._z,u=e._w,h=t._x,d=t._y,g=t._z,y=t._w;return this._x=n*y+u*h+s*g-o*d,this._y=s*y+u*d+o*h-n*g,this._z=o*y+u*g+n*d-s*h,this._w=u*y-n*h-s*d-o*g,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let n=e._x,s=e._y,o=e._z,u=e._w,h=this.dot(e);h<0&&(n=-n,s=-s,o=-o,u=-u,h=-h);let d=1-t;if(h<.9995){const g=Math.acos(h),y=Math.sin(g);d=Math.sin(d*g)/y,t=Math.sin(t*g)/y,this._x=this._x*d+n*t,this._y=this._y*d+s*t,this._z=this._z*d+o*t,this._w=this._w*d+u*t,this._onChangeCallback()}else this._x=this._x*d+n*t,this._y=this._y*d+s*t,this._z=this._z*d+o*t,this._w=this._w*d+u*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),s=Math.sqrt(1-n),o=Math.sqrt(n);return this.set(s*Math.sin(e),s*Math.cos(e),o*Math.sin(t),o*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class K{constructor(e=0,t=0,n=0){K.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Zb.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Zb.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,s=this.z,o=e.elements;
vendor: 5,062 bytes, line 37
37return this.x=o[0]*t+o[3]*n+o[6]*s,this.y=o[1]*t+o[4]*n+o[7]*s,this.z=o[2]*t+o[5]*n+o[8]*s,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,s=this.z,o=e.elements,u=1/(o[3]*t+o[7]*n+o[11]*s+o[15]);return this.x=(o[0]*t+o[4]*n+o[8]*s+o[12])*u,this.y=(o[1]*t+o[5]*n+o[9]*s+o[13])*u,this.z=(o[2]*t+o[6]*n+o[10]*s+o[14])*u,this}applyQuaternion(e){const t=this.x,n=this.y,s=this.z,o=e.x,u=e.y,h=e.z,d=e.w,g=2*(u*s-h*n),y=2*(h*t-o*s),v=2*(o*n-u*t);return this.x=t+d*g+u*v-h*y,this.y=n+d*y+h*g-o*v,this.z=s+d*v+o*y-u*g,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,s=this.z,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*s,this.y=o[1]*t+o[5]*n+o[9]*s,this.z=o[2]*t+o[6]*n+o[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=nn(this.x,e.x,t.x),this.y=nn(this.y,e.y,t.y),this.z=nn(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=nn(this.x,e,t),this.y=nn(this.y,e,t),this.z=nn(this.z,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(nn(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,s=e.y,o=e.z,u=t.x,h=t.y,d=t.z;return this.x=s*d-o*h,this.y=o*u-n*d,this.z=n*h-s*u,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return px.copy(this).projectOnVector(e),this.sub(px)}reflect(e){return this.sub(px.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 n=this.dot(e)/t;return Math.acos(nn(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,s=this.z-e.z;return t*t+n*n+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,n){const s=Math.sin(t)*e;return this.x=s*Math.sin(n),this.y=Math.cos(t)*e,this.z=s*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),s=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,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()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const px=new K,Zb=new sr;class dn{constructor(e,t,n,s,o,u,h,d,g){dn.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,s,o,u,h,d,g)}set(e,t,n,s,o,u,h,d,g){const y=this.elements;
vendor: 68,094 bytes, line 37
37return y[0]=e,y[1]=s,y[2]=h,y[3]=t,y[4]=o,y[5]=d,y[6]=n,y[7]=u,y[8]=g,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,s=t.elements,o=this.elements,u=n[0],h=n[3],d=n[6],g=n[1],y=n[4],v=n[7],x=n[2],S=n[5],M=n[8],w=s[0],C=s[3],E=s[6],B=s[1],D=s[4],U=s[7],z=s[2],P=s[5],X=s[8];return o[0]=u*w+h*B+d*z,o[3]=u*C+h*D+d*P,o[6]=u*E+h*U+d*X,o[1]=g*w+y*B+v*z,o[4]=g*C+y*D+v*P,o[7]=g*E+y*U+v*X,o[2]=x*w+S*B+M*z,o[5]=x*C+S*D+M*P,o[8]=x*E+S*U+M*X,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],s=e[2],o=e[3],u=e[4],h=e[5],d=e[6],g=e[7],y=e[8];return t*u*y-t*h*g-n*o*y+n*h*d+s*o*g-s*u*d}invert(){const e=this.elements,t=e[0],n=e[1],s=e[2],o=e[3],u=e[4],h=e[5],d=e[6],g=e[7],y=e[8],v=y*u-h*g,x=h*d-y*o,S=g*o-u*d,M=t*v+n*x+s*S;if(M===0)return this.set(0,0,0,0,0,0,0,0,0);const w=1/M;return e[0]=v*w,e[1]=(s*g-y*n)*w,e[2]=(h*n-s*u)*w,e[3]=x*w,e[4]=(y*t-s*d)*w,e[5]=(s*o-h*t)*w,e[6]=S*w,e[7]=(n*d-g*t)*w,e[8]=(u*t-n*o)*w,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,s,o,u,h){const d=Math.cos(o),g=Math.sin(o);return this.set(n*d,n*g,-n*(d*u+g*h)+u+e,-s*g,s*d,-s*(-g*u+d*h)+h+t,0,0,1),this}scale(e,t){return this.premultiply(mx.makeScale(e,t)),this}rotate(e){return this.premultiply(mx.makeRotation(-e)),this}translate(e,t){return this.premultiply(mx.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let s=0;s<9;s++)if(t[s]!==n[s])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const mx=new dn,Qb=new dn().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),jb=new dn().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function dR(){const a={enabled:!0,workingColorSpace:po,spaces:{},convert:function(s,o,u){return this.enabled===!1||o===u||!o||!u||(this.spaces[o].transfer===$n&&(s.r=zl(s.r),s.g=zl(s.g),s.b=zl(s.b)),this.spaces[o].primaries!==this.spaces[u].primaries&&(s.applyMatrix3(this.spaces[o].toXYZ),s.applyMatrix3(this.spaces[u].fromXYZ)),this.spaces[u].transfer===$n&&(s.r=ld(s.r),s.g=ld(s.g),s.b=ld(s.b))),s},workingToColorSpace:function(s,o){return this.convert(s,this.workingColorSpace,o)},colorSpaceToWorking:function(s,o){return this.convert(s,o,this.workingColorSpace)},getPrimaries:function(s){return this.spaces[s].primaries},getTransfer:function(s){return s===Fl?Nm:this.spaces[s].transfer},getToneMappingMode:function(s){return this.spaces[s].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(s,o=this.workingColorSpace){return s.fromArray(this.spaces[o].luminanceCoefficients)},define:function(s){Object.assign(this.spaces,s)},_getMatrix:function(s,o,u){return s.copy(this.spaces[o].toXYZ).multiply(this.spaces[u].fromXYZ)},_getDrawingBufferColorSpace:function(s){return this.spaces[s].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(s=this.workingColorSpace){return this.spaces[s].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(s,o){return yd("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),a.workingToColorSpace(s,o)},toWorkingColorSpace:function(s,o){return yd("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),a.colorSpaceToWorking(s,o)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return a.define({[po]:{primaries:e,whitePoint:n,transfer:Nm,toXYZ:Qb,fromXYZ:jb,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:ks},outputColorSpaceConfig:{drawingBufferColorSpace:ks}},[ks]:{primaries:e,whitePoint:n,transfer:$n,toXYZ:Qb,fromXYZ:jb,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:ks}}}),a}const On=dR();function zl(a){return a<.04045?a*.0773993808:Math.pow(a*.9478672986+.0521327014,2.4)}function ld(a){return a<.0031308?a*12.92:1.055*Math.pow(a,.41666)-.055}let Nh;class OE{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Nh===void 0&&(Nh=Om("canvas")),Nh.width=e.width,Nh.height=e.height;const s=Nh.getContext("2d");e instanceof ImageData?s.putImageData(e,0,0):s.drawImage(e,0,0,e.width,e.height),n=Nh}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Om("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const s=n.getImageData(0,0,e.width,e.height),o=s.data;for(let u=0;u<o.length;u++)o[u]=zl(o[u]/255)*255;return n.putImageData(s,0,0),t}else if(e.data){const t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(zl(t[n]/255)*255):t[n]=zl(t[n]);return{data:t,width:e.width,height:e.height}}else return Mt("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let pR=0;class Xc{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:pR++}),this.uuid=na(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayHeight,t.displayWidth,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const n={uuid:this.uuid,url:""},s=this.data;if(s!==null){let o;if(Array.isArray(s)){o=[];for(let u=0,h=s.length;u<h;u++)s[u].isDataTexture?o.push(gx(s[u].image)):o.push(gx(s[u]))}else o=gx(s);n.url=o}return t||(e.images[this.uuid]=n),n}}function gx(a){return typeof HTMLImageElement<"u"&&a instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&a instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&a instanceof ImageBitmap?OE.getDataURL(a):a.data?{data:Array.from(a.data),width:a.width,height:a.height,type:a.data.constructor.name}:(Mt("Texture: Unable to serialize Texture."),{})}let mR=0;const vx=new K;class ei extends jo{constructor(e=ei.DEFAULT_IMAGE,t=ei.DEFAULT_MAPPING,n=Fi,s=Fi,o=Un,u=Fa,h=ts,d=ws,g=ei.DEFAULT_ANISOTROPY,y=Fl){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:mR++}),this.uuid=na(),this.name="",this.source=new Xc(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=s,this.magFilter=o,this.minFilter=u,this.anisotropy=g,this.format=h,this.internalFormat=null,this.type=d,this.offset=new We(0,0),this.repeat=new We(1,1),this.center=new We(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new dn,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=y,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(vx).x}get height(){return this.source.getSize(vx).y}get depth(){return this.source.getSize(vx).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const n=e[t];if(n===void 0){Mt(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const s=this[t];if(s===void 0){Mt(`Texture.setValues(): property '${t}' does not exist.`);continue}s&&n&&s.isVector2&&n.isVector2||s&&n&&s.isVector3&&n.isVector3||s&&n&&s.isMatrix3&&n.isMatrix3?s.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const n={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==qc)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Zc:e.x=e.x-Math.floor(e.x);break;case Fi:e.x=e.x<0?0:1;break;case hd: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 Zc:e.y=e.y-Math.floor(e.y);break;case Fi:e.y=e.y<0?0:1;break;case hd:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}ei.DEFAULT_IMAGE=null;ei.DEFAULT_MAPPING=qc;ei.DEFAULT_ANISOTROPY=1;class li{constructor(e=0,t=0,n=0,s=1){li.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,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,n,s){return this.x=e,this.y=t,this.z=n,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,n=this.y,s=this.z,o=this.w,u=e.elements;return this.x=u[0]*t+u[4]*n+u[8]*s+u[12]*o,this.y=u[1]*t+u[5]*n+u[9]*s+u[13]*o,this.z=u[2]*t+u[6]*n+u[10]*s+u[14]*o,this.w=u[3]*t+u[7]*n+u[11]*s+u[15]*o,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,s,o;const d=e.elements,g=d[0],y=d[4],v=d[8],x=d[1],S=d[5],M=d[9],w=d[2],C=d[6],E=d[10];if(Math.abs(y-x)<.01&&Math.abs(v-w)<.01&&Math.abs(M-C)<.01){if(Math.abs(y+x)<.1&&Math.abs(v+w)<.1&&Math.abs(M+C)<.1&&Math.abs(g+S+E-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const D=(g+1)/2,U=(S+1)/2,z=(E+1)/2,P=(y+x)/4,X=(v+w)/4,k=(M+C)/4;return D>U&&D>z?D<.01?(n=0,s=.707106781,o=.707106781):(n=Math.sqrt(D),s=P/n,o=X/n):U>z?U<.01?(n=.707106781,s=0,o=.707106781):(s=Math.sqrt(U),n=P/s,o=k/s):z<.01?(n=.707106781,s=.707106781,o=0):(o=Math.sqrt(z),n=X/o,s=k/o),this.set(n,s,o,t),this}let B=Math.sqrt((C-M)*(C-M)+(v-w)*(v-w)+(x-y)*(x-y));return Math.abs(B)<.001&&(B=1),this.x=(C-M)/B,this.y=(v-w)/B,this.z=(x-y)/B,this.w=Math.acos((g+S+E-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=nn(this.x,e.x,t.x),this.y=nn(this.y,e.y,t.y),this.z=nn(this.z,e.z,t.z),this.w=nn(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=nn(this.x,e,t),this.y=nn(this.y,e,t),this.z=nn(this.z,e,t),this.w=nn(this.w,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(nn(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class lS extends jo{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Un,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new li(0,0,e,t),this.scissorTest=!1,this.viewport=new li(0,0,e,t);const s={width:e,height:t,depth:n.depth},o=new ei(s);this.textures=[];const u=n.count;for(let h=0;h<u;h++)this.textures[h]=o.clone(),this.textures[h].isRenderTargetTexture=!0,this.textures[h].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){const t={minFilter:Un,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++)this.textures[n].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let s=0,o=this.textures.length;s<o;s++)this.textures[s].image.width=e,this.textures[s].image.height=t,this.textures[s].image.depth=n,this.textures[s].isData3DTexture!==!0&&(this.textures[s].isArrayTexture=this.textures[s].image.depth>1);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.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;const s=Object.assign({},e.textures[t].image);this.textures[t].source=new Xc(s)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Sr extends lS{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class n_ extends ei{constructor(e=null,t=1,n=1,s=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:s},this.magFilter=Xi,this.minFilter=Xi,this.wrapR=Fi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class gR extends Sr{constructor(e=1,t=1,n=1,s={}){super(e,t,s),this.isWebGLArrayRenderTarget=!0,this.depth=n,this.texture=new n_(null,e,t,n),this._setTextureOptions(s),this.texture.isRenderTargetTexture=!0}}class i_ extends ei{constructor(e=null,t=1,n=1,s=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:s},this.magFilter=Xi,this.minFilter=Xi,this.wrapR=Fi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class vR extends Sr{constructor(e=1,t=1,n=1,s={}){super(e,t,s),this.isWebGL3DRenderTarget=!0,this.depth=n,this.texture=new i_(null,e,t,n),this._setTextureOptions(s),this.texture.isRenderTargetTexture=!0}}class Rs{constructor(e=new K(1/0,1/0,1/0),t=new K(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(ro.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(ro.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=ro.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(n!==void 0){const o=n.getAttribute("position");if(t===!0&&o!==void 0&&e.isInstancedMesh!==!0)for(let u=0,h=o.count;u<h;u++)e.isMesh===!0?e.getVertexPosition(u,ro):ro.fromBufferAttribute(o,u),ro.applyMatrix4(e.matrixWorld),this.expandByPoint(ro);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),J0.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),J0.copy(n.boundingBox)),J0.applyMatrix4(e.matrixWorld),this.union(J0)}const s=e.children;for(let o=0,u=s.length;o<u;o++)this.expandByObject(s[o],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,ro),ro.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(sm),Y0.subVectors(this.max,sm),Fh.subVectors(e.a,sm),Oh.subVectors(e.b,sm),Ph.subVectors(e.c,sm),Ic.subVectors(Oh,Fh),Lc.subVectors(Ph,Oh),Vu.subVectors(Fh,Ph);let t=[0,-Ic.z,Ic.y,0,-Lc.z,Lc.y,0,-Vu.z,Vu.y,Ic.z,0,-Ic.x,Lc.z,0,-Lc.x,Vu.z,0,-Vu.x,-Ic.y,Ic.x,0,-Lc.y,Lc.x,0,-Vu.y,Vu.x,0];return!yx(t,Fh,Oh,Ph,Y0)||(t=[1,0,0,0,1,0,0,0,1],!yx(t,Fh,Oh,Ph,Y0))?!1:(q0.crossVectors(Ic,Lc),t=[q0.x,q0.y,q0.z],yx(t,Fh,Oh,Ph,Y0))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,ro).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(ro).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:(Rl[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Rl[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Rl[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Rl[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Rl[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Rl[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Rl[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Rl[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Rl),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)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const Rl=[new K,new K,new K,new K,new K,new K,new K,new K],ro=new K,J0=new Rs,Fh=new K,Oh=new K,Ph=new K,Ic=new K,Lc=new K,Vu=new K,sm=new K,Y0=new K,q0=new K,Xu=new K;function yx(a,e,t,n,s){for(let o=0,u=a.length-3;o<=u;o+=3){Xu.fromArray(a,o);const h=s.x*Math.abs(Xu.x)+s.y*Math.abs(Xu.y)+s.z*Math.abs(Xu.z),d=e.dot(Xu),g=t.dot(Xu),y=n.dot(Xu);if(Math.max(-Math.max(d,g,y),Math.min(d,g,y))>h)return!1}return!0}const yR=new Rs,rm=new K,_x=new K;class vs{constructor(e=new K,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;t!==void 0?n.copy(t):yR.setFromPoints(e).getCenter(n);let s=0;for(let o=0,u=e.length;o<u;o++)s=Math.max(s,n.distanceToSquared(e[o]));return this.radius=Math.sqrt(s),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;rm.subVectors(e,this.center);const t=rm.lengthSq();if(t>this.radius*this.radius){const n=Math.sqrt(t),s=(n-this.radius)*.5;this.center.addScaledVector(rm,s/n),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):(_x.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(rm.copy(e.center).add(_x)),this.expandByPoint(rm.copy(e.center).sub(_x))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}const Bl=new K,xx=new K,K0=new K,Uc=new K,Ax=new K,Z0=new K,Sx=new K;class Cd{constructor(e=new K,t=new K(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,Bl)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Bl.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Bl.copy(this.origin).addScaledVector(this.direction,t),Bl.distanceToSquared(e))}distanceSqToSegment(e,t,n,s){xx.copy(e).add(t).multiplyScalar(.5),K0.copy(t).sub(e).normalize(),Uc.copy(this.origin).sub(xx);const o=e.distanceTo(t)*.5,u=-this.direction.dot(K0),h=Uc.dot(this.direction),d=-Uc.dot(K0),g=Uc.lengthSq(),y=Math.abs(1-u*u);let v,x,S,M;if(y>0)if(v=u*d-h,x=u*h-d,M=o*y,v>=0)if(x>=-M)if(x<=M){const w=1/y;v*=w,x*=w,S=v*(v+u*x+2*h)+x*(u*v+x+2*d)+g}else x=o,v=Math.max(0,-(u*x+h)),S=-v*v+x*(x+2*d)+g;else x=-o,v=Math.max(0,-(u*x+h)),S=-v*v+x*(x+2*d)+g;else x<=-M?(v=Math.max(0,-(-u*o+h)),x=v>0?-o:Math.min(Math.max(-o,-d),o),S=-v*v+x*(x+2*d)+g):x<=M?(v=0,x=Math.min(Math.max(-o,-d),o),S=x*(x+2*d)+g):(v=Math.max(0,-(u*o+h)),x=v>0?o:Math.min(Math.max(-o,-d),o),S=-v*v+x*(x+2*d)+g);else x=u>0?-o:o,v=Math.max(0,-(u*x+h)),S=-v*v+x*(x+2*d)+g;return n&&n.copy(this.origin).addScaledVector(this.direction,v),s&&s.copy(xx).addScaledVector(K0,x),S}intersectSphere(e,t){Bl.subVectors(e.center,this.origin);const n=Bl.dot(this.direction),s=Bl.dot(Bl)-n*n,o=e.radius*e.radius;if(s>o)return null;const u=Math.sqrt(o-s),h=n-u,d=n+u;return d<0?null:h<0?this.at(d,t):this.at(h,t)}intersectsSphere(e){return e.radius<0?!1: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 n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,s,o,u,h,d;const g=1/this.direction.x,y=1/this.direction.y,v=1/this.direction.z,x=this.origin;return g>=0?(n=(e.min.x-x.x)*g,s=(e.max.x-x.x)*g):(n=(e.max.x-x.x)*g,s=(e.min.x-x.x)*g),y>=0?(o=(e.min.y-x.y)*y,u=(e.max.y-x.y)*y):(o=(e.max.y-x.y)*y,u=(e.min.y-x.y)*y),n>u||o>s||((o>n||isNaN(n))&&(n=o),(u<s||isNaN(s))&&(s=u),v>=0?(h=(e.min.z-x.z)*v,d=(e.max.z-x.z)*v):(h=(e.max.z-x.z)*v,d=(e.min.z-x.z)*v),n>d||h>s)||((h>n||n!==n)&&(n=h),(d<s||s!==s)&&(s=d),s<0)?null:this.at(n>=0?n:s,t)}intersectsBox(e){return this.intersectBox(e,Bl)!==null}intersectTriangle(e,t,n,s,o){Ax.subVectors(t,e),Z0.subVectors(n,e),Sx.crossVectors(Ax,Z0);let u=this.direction.dot(Sx),h;if(u>0){if(s)return null;h=1}else if(u<0)h=-1,u=-u;else return null;Uc.subVectors(this.origin,e);const d=h*this.direction.dot(Z0.crossVectors(Uc,Z0));if(d<0)return null;const g=h*this.direction.dot(Ax.cross(Uc));if(g<0||d+g>u)return null;const y=-h*Uc.dot(Sx);return y<0?null:this.at(y/u,o)}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 jt{constructor(e,t,n,s,o,u,h,d,g,y,v,x,S,M,w,C){jt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,s,o,u,h,d,g,y,v,x,S,M,w,C)}set(e,t,n,s,o,u,h,d,g,y,v,x,S,M,w,C){const E=this.elements;return E[0]=e,E[4]=t,E[8]=n,E[12]=s,E[1]=o,E[5]=u,E[9]=h,E[13]=d,E[2]=g,E[6]=y,E[10]=v,E[14]=x,E[3]=S,E[7]=M,E[11]=w,E[15]=C,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 jt().fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),n.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this)}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();const t=this.elements,n=e.elements,s=1/zh.setFromMatrixColumn(e,0).length(),o=1/zh.setFromMatrixColumn(e,1).length(),u=1/zh.setFromMatrixColumn(e,2).length();return t[0]=n[0]*s,t[1]=n[1]*s,t[2]=n[2]*s,t[3]=0,t[4]=n[4]*o,t[5]=n[5]*o,t[6]=n[6]*o,t[7]=0,t[8]=n[8]*u,t[9]=n[9]*u,t[10]=n[10]*u,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,s=e.y,o=e.z,u=Math.cos(n),h=Math.sin(n),d=Math.cos(s),g=Math.sin(s),y=Math.cos(o),v=Math.sin(o);if(e.order==="XYZ"){const x=u*y,S=u*v,M=h*y,w=h*v;t[0]=d*y,t[4]=-d*v,t[8]=g,t[1]=S+M*g,t[5]=x-w*g,t[9]=-h*d,t[2]=w-x*g,t[6]=M+S*g,t[10]=u*d}else if(e.order==="YXZ"){const x=d*y,S=d*v,M=g*y,w=g*v;t[0]=x+w*h,t[4]=M*h-S,t[8]=u*g,t[1]=u*v,t[5]=u*y,t[9]=-h,t[2]=S*h-M,t[6]=w+x*h,t[10]=u*d}else if(e.order==="ZXY"){const x=d*y,S=d*v,M=g*y,w=g*v;t[0]=x-w*h,t[4]=-u*v,t[8]=M+S*h,t[1]=S+M*h,t[5]=u*y,t[9]=w-x*h,t[2]=-u*g,t[6]=h,t[10]=u*d}else if(e.order==="ZYX"){const x=u*y,S=u*v,M=h*y,w=h*v;t[0]=d*y,t[4]=M*g-S,t[8]=x*g+w,t[1]=d*v,t[5]=w*g+x,t[9]=S*g-M,t[2]=-g,t[6]=h*d,t[10]=u*d}else if(e.order==="YZX"){const x=u*d,S=u*g,M=h*d,w=h*g;t[0]=d*y,t[4]=w-x*v,t[8]=M*v+S,t[1]=v,t[5]=u*y,t[9]=-h*y,t[2]=-g*y,t[6]=S*v+M,t[10]=x-w*v}else if(e.order==="XZY"){const x=u*d,S=u*g,M=h*d,w=h*g;t[0]=d*y,t[4]=-v,t[8]=g*y,t[1]=x*v+w,t[5]=u*y,t[9]=S*v-M,t[2]=M*v-S,t[6]=h*y,t[10]=w*v+x}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(_R,e,xR)}lookAt(e,t,n){const s=this.elements;return $r.subVectors(e,t),$r.lengthSq()===0&&($r.z=1),$r.normalize(),Nc.crossVectors(n,$r),Nc.lengthSq()===0&&(Math.abs(n.z)===1?$r.x+=1e-4:$r.z+=1e-4,$r.normalize(),Nc.crossVectors(n,$r)),Nc.normalize(),Q0.crossVectors($r,Nc),s[0]=Nc.x,s[4]=Q0.x,s[8]=$r.x,s[1]=Nc.y,s[5]=Q0.y,s[9]=$r.y,s[2]=Nc.z,s[6]=Q0.z,s[10]=$r.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,s=t.elements,o=this.elements,u=n[0],h=n[4],d=n[8],g=n[12],y=n[1],v=n[5],x=n[9],S=n[13],M=n[2],w=n[6],C=n[10],E=n[14],B=n[3],D=n[7],U=n[11],z=n[15],P=s[0],X=s[4],k=s[8],I=s[12],O=s[1],q=s[5],ie=s[9],j=s[13],re=s[2],fe=s[6],Y=s[10],$=s[14],pe=s[3],Be=s[7],Ae=s[11],De=s[15];return o[0]=u*P+h*O+d*re+g*pe,o[4]=u*X+h*q+d*fe+g*Be,o[8]=u*k+h*ie+d*Y+g*Ae,o[12]=u*I+h*j+d*$+g*De,o[1]=y*P+v*O+x*re+S*pe,o[5]=y*X+v*q+x*fe+S*Be,o[9]=y*k+v*ie+x*Y+S*Ae,o[13]=y*I+v*j+x*$+S*De,o[2]=M*P+w*O+C*re+E*pe,o[6]=M*X+w*q+C*fe+E*Be,o[10]=M*k+w*ie+C*Y+E*Ae,o[14]=M*I+w*j+C*$+E*De,o[3]=B*P+D*O+U*re+z*pe,o[7]=B*X+D*q+U*fe+z*Be,o[11]=B*k+D*ie+U*Y+z*Ae,o[15]=B*I+D*j+U*$+z*De,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],s=e[8],o=e[12],u=e[1],h=e[5],d=e[9],g=e[13],y=e[2],v=e[6],x=e[10],S=e[14],M=e[3],w=e[7],C=e[11],E=e[15],B=d*S-g*x,D=h*S-g*v,U=h*x-d*v,z=u*S-g*y,P=u*x-d*y,X=u*v-h*y;return t*(w*B-C*D+E*U)-n*(M*B-C*z+E*P)+s*(M*D-w*z+E*X)-o*(M*U-w*P+C*X)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const 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]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],s=e[2],o=e[3],u=e[4],h=e[5],d=e[6],g=e[7],y=e[8],v=e[9],x=e[10],S=e[11],M=e[12],w=e[13],C=e[14],E=e[15],B=v*C*g-w*x*g+w*d*S-h*C*S-v*d*E+h*x*E,D=M*x*g-y*C*g-M*d*S+u*C*S+y*d*E-u*x*E,U=y*w*g-M*v*g+M*h*S-u*w*S-y*h*E+u*v*E,z=M*v*d-y*w*d-M*h*x+u*w*x+y*h*C-u*v*C,P=t*B+n*D+s*U+o*z;if(P===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const X=1/P;return e[0]=B*X,e[1]=(w*x*o-v*C*o-w*s*S+n*C*S+v*s*E-n*x*E)*X,e[2]=(h*C*o-w*d*o+w*s*g-n*C*g-h*s*E+n*d*E)*X,e[3]=(v*d*o-h*x*o-v*s*g+n*x*g+h*s*S-n*d*S)*X,e[4]=D*X,e[5]=(y*C*o-M*x*o+M*s*S-t*C*S-y*s*E+t*x*E)*X,e[6]=(M*d*o-u*C*o-M*s*g+t*C*g+u*s*E-t*d*E)*X,e[7]=(u*x*o-y*d*o+y*s*g-t*x*g-u*s*S+t*d*S)*X,e[8]=U*X,e[9]=(M*v*o-y*w*o-M*n*S+t*w*S+y*n*E-t*v*E)*X,e[10]=(u*w*o-M*h*o+M*n*g-t*w*g-u*n*E+t*h*E)*X,e[11]=(y*h*o-u*v*o-y*n*g+t*v*g+u*n*S-t*h*S)*X,e[12]=z*X,e[13]=(y*w*s-M*v*s+M*n*x-t*w*x-y*n*C+t*v*C)*X,e[14]=(M*h*s-u*w*s-M*n*d+t*w*d+u*n*C-t*h*C)*X,e[15]=(u*v*s-y*h*s+y*n*d-t*v*d-u*n*x+t*h*x)*X,this}scale(e){const t=this.elements,n=e.x,s=e.y,o=e.z;return t[0]*=n,t[4]*=s,t[8]*=o,t[1]*=n,t[5]*=s,t[9]*=o,t[2]*=n,t[6]*=s,t[10]*=o,t[3]*=n,t[7]*=s,t[11]*=o,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],s=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,s))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),s=Math.sin(t),o=1-n,u=e.x,h=e.y,d=e.z,g=o*u,y=o*h;return this.set(g*u+n,g*h-s*d,g*d+s*h,0,g*h+s*d,y*h+n,y*d-s*u,0,g*d-s*h,y*d+s*u,o*d*d+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,s,o,u){return this.set(1,n,o,0,e,1,u,0,t,s,1,0,0,0,0,1),this}compose(e,t,n){const s=this.elements,o=t._x,u=t._y,h=t._z,d=t._w,g=o+o,y=u+u,v=h+h,x=o*g,S=o*y,M=o*v,w=u*y,C=u*v,E=h*v,B=d*g,D=d*y,U=d*v,z=n.x,P=n.y,X=n.z;return s[0]=(1-(w+E))*z,s[1]=(S+U)*z,s[2]=(M-D)*z,s[3]=0,s[4]=(S-U)*P,s[5]=(1-(x+E))*P,s[6]=(C+B)*P,s[7]=0,s[8]=(M+D)*X,s[9]=(C-B)*X,s[10]=(1-(x+w))*X,s[11]=0,s[12]=e.x,s[13]=e.y,s[14]=e.z,s[15]=1,this}decompose(e,t,n){const s=this.elements;if(e.x=s[12],e.y=s[13],e.z=s[14],this.determinant()===0)return n.set(1,1,1),t.identity(),this;let o=zh.set(s[0],s[1],s[2]).length();const u=zh.set(s[4],s[5],s[6]).length(),h=zh.set(s[8],s[9],s[10]).length();this.determinant()<0&&(o=-o),ao.copy(this);const g=1/o,y=1/u,v=1/h;return ao.elements[0]*=g,ao.elements[1]*=g,ao.elements[2]*=g,ao.elements[4]*=y,ao.elements[5]*=y,ao.elements[6]*=y,ao.elements[8]*=v,ao.elements[9]*=v,ao.elements[10]*=v,t.setFromRotationMatrix(ao),n.x=o,n.y=u,n.z=h,this}makePerspective(e,t,n,s,o,u,h=ta,d=!1){const g=this.elements,y=2*o/(t-e),v=2*o/(n-s),x=(t+e)/(t-e),S=(n+s)/(n-s);let M,w;if(d)M=o/(u-o),w=u*o/(u-o);else if(h===ta)M=-(u+o)/(u-o),w=-2*u*o/(u-o);else if(h===vd)M=-u/(u-o),w=-u*o/(u-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+h);return g[0]=y,g[4]=0,g[8]=x,g[12]=0,g[1]=0,g[5]=v,g[9]=S,g[13]=0,g[2]=0,g[6]=0,g[10]=M,g[14]=w,g[3]=0,g[7]=0,g[11]=-1,g[15]=0,this}makeOrthographic(e,t,n,s,o,u,h=ta,d=!1){const g=this.elements,y=2/(t-e),v=2/(n-s),x=-(t+e)/(t-e),S=-(n+s)/(n-s);let M,w;if(d)M=1/(u-o),w=u/(u-o);else if(h===ta)M=-2/(u-o),w=-(u+o)/(u-o);else if(h===vd)M=-1/(u-o),w=-o/(u-o);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+h);return g[0]=y,g[4]=0,g[8]=0,g[12]=x,g[1]=0,g[5]=v,g[9]=0,g[13]=S,g[2]=0,g[6]=0,g[10]=M,g[14]=w,g[3]=0,g[7]=0,g[11]=0,g[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let s=0;s<16;s++)if(t[s]!==n[s])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const zh=new K,ao=new jt,_R=new K(0,0,0),xR=new K(1,1,1),Nc=new K,Q0=new K,$r=new K,$b=new jt,eM=new sr;class sa{constructor(e=0,t=0,n=0,s=sa.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,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,n,s=this._order){return this._x=e,this._y=t,this._z=n,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,n=!0){const s=e.elements,o=s[0],u=s[4],h=s[8],d=s[1],g=s[5],y=s[9],v=s[2],x=s[6],S=s[10];switch(t){case"XYZ":this._y=Math.asin(nn(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(-y,S),this._z=Math.atan2(-u,o)):(this._x=Math.atan2(x,g),this._z=0);break;case"YXZ":this._x=Math.asin(-nn(y,-1,1)),Math.abs(y)<.9999999?(this._y=Math.atan2(h,S),this._z=Math.atan2(d,g)):(this._y=Math.atan2(-v,o),this._z=0);break;case"ZXY":this._x=Math.asin(nn(x,-1,1)),Math.abs(x)<.9999999?(this._y=Math.atan2(-v,S),this._z=Math.atan2(-u,g)):(this._y=0,this._z=Math.atan2(d,o));break;case"ZYX":this._y=Math.asin(-nn(v,-1,1)),Math.abs(v)<.9999999?(this._x=Math.atan2(x,S),this._z=Math.atan2(d,o)):(this._x=0,this._z=Math.atan2(-u,g));break;case"YZX":this._z=Math.asin(nn(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(-y,g),this._y=Math.atan2(-v,o)):(this._x=0,this._y=Math.atan2(h,S));break;case"XZY":this._z=Math.asin(-nn(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(x,g),this._y=Math.atan2(h,o)):(this._x=Math.atan2(-y,S),this._y=0);break;default:Mt("Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return $b.makeRotationFromQuaternion(e),this.setFromRotationMatrix($b,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return eM.setFromEuler(this),this.setFromQuaternion(eM,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}}sa.DEFAULT_ORDER="XYZ";class xd{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let AR=0;const tM=new K,Gh=new sr,Dl=new jt,j0=new K,am=new K,SR=new K,bR=new sr,nM=new K(1,0,0),iM=new K(0,1,0),sM=new K(0,0,1),rM={type:"added"},MR={type:"removed"},Hh={type:"childadded",child:null},bx={type:"childremoved",child:null};class Gn extends jo{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:AR++}),this.uuid=na(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Gn.DEFAULT_UP.clone();const e=new K,t=new sa,n=new sr,s=new K(1,1,1);function o(){n.setFromEuler(t,!1)}function u(){t.setFromQuaternion(n,void 0,!1)}t._onChange(o),n._onChange(u),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:s},modelViewMatrix:{value:new jt},normalMatrix:{value:new dn}}),this.matrix=new jt,this.matrixWorld=new jt,this.matrixAutoUpdate=Gn.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Gn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new xd,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Gh.setFromAxisAngle(e,t),this.quaternion.multiply(Gh),this}rotateOnWorldAxis(e,t){return Gh.setFromAxisAngle(e,t),this.quaternion.premultiply(Gh),this}rotateX(e){return this.rotateOnAxis(nM,e)}rotateY(e){return this.rotateOnAxis(iM,e)}rotateZ(e){return this.rotateOnAxis(sM,e)}translateOnAxis(e,t){return tM.copy(e).applyQuaternion(this.quaternion),this.position.add(tM.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(nM,e)}translateY(e){return this.translateOnAxis(iM,e)}translateZ(e){return this.translateOnAxis(sM,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(Dl.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?j0.copy(e):j0.set(e,t,n);const s=this.parent;this.updateWorldMatrix(!0,!1),am.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Dl.lookAt(am,j0,this.up):Dl.lookAt(j0,am,this.up),this.quaternion.setFromRotationMatrix(Dl),s&&(Dl.extractRotation(s.matrixWorld),Gh.setFromRotationMatrix(Dl),this.quaternion.premultiply(Gh.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(Vt("Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(rM),Hh.child=e,this.dispatchEvent(Hh),Hh.child=null):Vt("Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(MR),bx.child=e,this.dispatchEvent(bx),bx.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),Dl.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),Dl.multiply(e.parent.matrixWorld)),e.applyMatrix4(Dl),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(rM),Hh.child=e,this.dispatchEvent(Hh),Hh.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,s=this.children.length;n<s;n++){const u=this.children[n].getObjectByProperty(e,t);if(u!==void 0)return u}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);const s=this.children;for(let o=0,u=s.length;o<u;o++)s[o].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(am,e,SR),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(am,bR,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,s=t.length;n<s;n++)t[n].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let n=0,s=t.length;n<s;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,s=t.length;n<s;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(e===!0&&n!==null&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),t===!0){const s=this.children;for(let o=0,u=s.length;o<u;o++)s[o].updateWorldMatrix(!1,!0)}}toJSON(e){const t=e===void 0||typeof e=="string",n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const s={};s.uuid=this.uuid,s.type=this.type,this.name!==""&&(s.name=this.name),this.castShadow===!0&&(s.castShadow=!0),this.receiveShadow===!0&&(s.receiveShadow=!0),this.visible===!1&&(s.visible=!1),this.frustumCulled===!1&&(s.frustumCulled=!1),this.renderOrder!==0&&(s.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(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())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.geometryInfo=this._geometryInfo.map(h=>({...h,boundingBox:h.boundingBox?h.boundingBox.toJSON():void 0,boundingSphere:h.boundingSphere?h.boundingSphere.toJSON():void 0})),s.instanceInfo=this._instanceInfo.map(h=>({...h})),s.availableInstanceIds=this._availableInstanceIds.slice(),s.availableGeometryIds=this._availableGeometryIds.slice(),s.nextIndexStart=this._nextIndexStart,s.nextVertexStart=this._nextVertexStart,s.geometryCount=this._geometryCount,s.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.matricesTexture=this._matricesTexture.toJSON(e),s.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(s.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(s.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(s.boundingBox=this.boundingBox.toJSON()));function o(h,d){return h[d.uuid]===void 0&&(h[d.uuid]=d.toJSON(e)),d.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=o(e.geometries,this.geometry);const h=this.geometry.parameters;if(h!==void 0&&h.shapes!==void 0){const d=h.shapes;if(Array.isArray(d))for(let g=0,y=d.length;g<y;g++){const v=d[g];o(e.shapes,v)}else o(e.shapes,d)}}if(this.isSkinnedMesh&&(s.bindMode=this.bindMode,s.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(o(e.skeletons,this.skeleton),s.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const h=[];for(let d=0,g=this.material.length;d<g;d++)h.push(o(e.materials,this.material[d]));s.material=h}else s.material=o(e.materials,this.material);if(this.children.length>0){s.children=[];for(let h=0;h<this.children.length;h++)s.children.push(this.children[h].toJSON(e).object)}if(this.animations.length>0){s.animations=[];for(let h=0;h<this.animations.length;h++){const d=this.animations[h];s.animations.push(o(e.animations,d))}}if(t){const h=u(e.geometries),d=u(e.materials),g=u(e.textures),y=u(e.images),v=u(e.shapes),x=u(e.skeletons),S=u(e.animations),M=u(e.nodes);h.length>0&&(n.geometries=h),d.length>0&&(n.materials=d),g.length>0&&(n.textures=g),y.length>0&&(n.images=y),v.length>0&&(n.shapes=v),x.length>0&&(n.skeletons=x),S.length>0&&(n.animations=S),M.length>0&&(n.nodes=M)}return n.object=s,n;function u(h){const d=[];for(const g in h){const y=h[g];delete y.metadata,d.push(y)}return d}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n<e.children.length;n++){const s=e.children[n];this.add(s.clone())}return this}}Gn.DEFAULT_UP=new K(0,1,0);Gn.DEFAULT_MATRIX_AUTO_UPDATE=!0;Gn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const oo=new K,Il=new K,Mx=new K,Ll=new K,kh=new K,Vh=new K,aM=new K,Ex=new K,Tx=new K,Cx=new K,wx=new li,Rx=new li,Bx=new li;class Jr{constructor(e=new K,t=new K,n=new K){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,s){s.subVectors(n,t),oo.subVectors(e,t),s.cross(oo);const o=s.lengthSq();return o>0?s.multiplyScalar(1/Math.sqrt(o)):s.set(0,0,0)}static getBarycoord(e,t,n,s,o){oo.subVectors(s,t),Il.subVectors(n,t),Mx.subVectors(e,t);const u=oo.dot(oo),h=oo.dot(Il),d=oo.dot(Mx),g=Il.dot(Il),y=Il.dot(Mx),v=u*g-h*h;if(v===0)return o.set(0,0,0),null;const x=1/v,S=(g*d-h*y)*x,M=(u*y-h*d)*x;return o.set(1-S-M,M,S)}static containsPoint(e,t,n,s){return this.getBarycoord(e,t,n,s,Ll)===null?!1:Ll.x>=0&&Ll.y>=0&&Ll.x+Ll.y<=1}static getInterpolation(e,t,n,s,o,u,h,d){return this.getBarycoord(e,t,n,s,Ll)===null?(d.x=0,d.y=0,"z"in d&&(d.z=0),"w"in d&&(d.w=0),null):(d.setScalar(0),d.addScaledVector(o,Ll.x),d.addScaledVector(u,Ll.y),d.addScaledVector(h,Ll.z),d)}static getInterpolatedAttribute(e,t,n,s,o,u){return wx.setScalar(0),Rx.setScalar(0),Bx.setScalar(0),wx.fromBufferAttribute(e,t),Rx.fromBufferAttribute(e,n),Bx.fromBufferAttribute(e,s),u.setScalar(0),u.addScaledVector(wx,o.x),u.addScaledVector(Rx,o.y),u.addScaledVector(Bx,o.z),u}static isFrontFacing(e,t,n,s){return oo.subVectors(n,t),Il.subVectors(e,t),oo.cross(Il).dot(s)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,s){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[s]),this}setFromAttributeAndIndices(e,t,n,s){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),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 oo.subVectors(this.c,this.b),Il.subVectors(this.a,this.b),oo.cross(Il).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Jr.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Jr.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,s,o){return Jr.getInterpolation(e,this.a,this.b,this.c,t,n,s,o)}containsPoint(e){return Jr.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Jr.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,s=this.b,o=this.c;let u,h;kh.subVectors(s,n),Vh.subVectors(o,n),Ex.subVectors(e,n);const d=kh.dot(Ex),g=Vh.dot(Ex);if(d<=0&&g<=0)return t.copy(n);Tx.subVectors(e,s);const y=kh.dot(Tx),v=Vh.dot(Tx);if(y>=0&&v<=y)return t.copy(s);const x=d*v-y*g;if(x<=0&&d>=0&&y<=0)return u=d/(d-y),t.copy(n).addScaledVector(kh,u);Cx.subVectors(e,o);const S=kh.dot(Cx),M=Vh.dot(Cx);if(M>=0&&S<=M)return t.copy(o);const w=S*g-d*M;if(w<=0&&g>=0&&M<=0)return h=g/(g-M),t.copy(n).addScaledVector(Vh,h);const C=y*M-S*v;if(C<=0&&v-y>=0&&S-M>=0)return aM.subVectors(o,s),h=(v-y)/(v-y+(S-M)),t.copy(s).addScaledVector(aM,h);const E=1/(C+w+x);return u=w*E,h=x*E,t.copy(n).addScaledVector(kh,u).addScaledVector(Vh,h)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const PE={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},Fc={h:0,s:0,l:0},$0={h:0,s:0,l:0};function Dx(a,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?a+(e-a)*6*t:t<1/2?e:t<2/3?a+(e-a)*6*(2/3-t):a}class Tt{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){const s=e;s&&s.isColor?this.copy(s):typeof s=="number"?this.setHex(s):typeof s=="string"&&this.setStyle(s)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=ks){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,On.colorSpaceToWorking(this,t),this}setRGB(e,t,n,s=On.workingColorSpace){return this.r=e,this.g=t,this.b=n,On.colorSpaceToWorking(this,s),this}setHSL(e,t,n,s=On.workingColorSpace){if(e=oS(e,1),t=nn(t,0,1),n=nn(n,0,1),t===0)this.r=this.g=this.b=n;else{const o=n<=.5?n*(1+t):n+t-n*t,u=2*n-o;this.r=Dx(u,o,e+1/3),this.g=Dx(u,o,e),this.b=Dx(u,o,e-1/3)}return On.colorSpaceToWorking(this,s),this}setStyle(e,t=ks){function n(o){o!==void 0&&parseFloat(o)<1&&Mt("Color: Alpha component of "+e+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(e)){let o;const u=s[1],h=s[2];switch(u){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(h))return n(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,t);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(h))return n(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,t);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(h))return n(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,t);break;default:Mt("Color: Unknown color model "+e)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(e)){const o=s[1],u=o.length;if(u===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,t);if(u===6)return this.setHex(parseInt(o,16),t);Mt("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=ks){const n=PE[e.toLowerCase()];return n!==void 0?this.setHex(n,t):Mt("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=zl(e.r),this.g=zl(e.g),this.b=zl(e.b),this}copyLinearToSRGB(e){return this.r=ld(e.r),this.g=ld(e.g),this.b=ld(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=ks){return On.workingToColorSpace(nr.copy(this),e),Math.round(nn(nr.r*255,0,255))*65536+Math.round(nn(nr.g*255,0,255))*256+Math.round(nn(nr.b*255,0,255))}getHexString(e=ks){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=On.workingColorSpace){On.workingToColorSpace(nr.copy(this),t);const n=nr.r,s=nr.g,o=nr.b,u=Math.max(n,s,o),h=Math.min(n,s,o);let d,g;const y=(h+u)/2;if(h===u)d=0,g=0;else{const v=u-h;switch(g=y<=.5?v/(u+h):v/(2-u-h),u){case n:d=(s-o)/v+(s<o?6:0);break;case s:d=(o-n)/v+2;break;case o:d=(n-s)/v+4;break}d/=6}return e.h=d,e.s=g,e.l=y,e}getRGB(e,t=On.workingColorSpace){return On.workingToColorSpace(nr.copy(this),t),e.r=nr.r,e.g=nr.g,e.b=nr.b,e}getStyle(e=ks){On.workingToColorSpace(nr.copy(this),e);const t=nr.r,n=nr.g,s=nr.b;return e!==ks?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${s.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(s*255)})`}offsetHSL(e,t,n){return this.getHSL(Fc),this.setHSL(Fc.h+e,Fc.s+t,Fc.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Fc),e.getHSL($0);const n=wm(Fc.h,$0.h,t),s=wm(Fc.s,$0.s,t),o=wm(Fc.l,$0.l,t);return this.setHSL(n,s,o),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,n=this.g,s=this.b,o=e.elements;return this.r=o[0]*t+o[3]*n+o[6]*s,this.g=o[1]*t+o[4]*n+o[7]*s,this.b=o[2]*t+o[5]*n+o[8]*s,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const nr=new Tt;Tt.NAMES=PE;let ER=0;class ys extends jo{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:ER++}),this.uuid=na(),this.name="",this.type="Material",this.blending=mf,this.side=Zo,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Jv,this.blendDst=Yv,this.blendEquation=kc,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Tt(0,0,0),this.blendAlpha=0,this.depthFunc=yf,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=CA,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=rf,this.stencilZFail=rf,this.stencilZPass=rf,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.allowOverride=!0,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}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const n=e[t];if(n===void 0){Mt(`Material: parameter '${t}' has value of undefined.`);continue}const s=this[t];if(s===void 0){Mt(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(n):s&&s.isVector3&&n&&n.isVector3?s.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};
vendor: 8,981 bytes, line 37
37n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==mf&&(n.blending=this.blending),this.side!==Zo&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==Jv&&(n.blendSrc=this.blendSrc),this.blendDst!==Yv&&(n.blendDst=this.blendDst),this.blendEquation!==kc&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==yf&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==CA&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==rf&&(n.stencilFail=this.stencilFail),this.stencilZFail!==rf&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==rf&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.allowOverride===!1&&(n.allowOverride=!1),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function s(o){const u=[];for(const h in o){const d=o[h];delete d.metadata,u.push(d)}return u}if(t){const o=s(e.textures),u=s(e.images);o.length>0&&(n.textures=o),u.length>0&&(n.images=u)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(t!==null){const s=t.length;n=new Array(s);for(let o=0;o!==s;
vendor: 4,134 bytes, line 37
37++o)n[o]=t[o].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class Yr extends ys{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Tt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new sa,this.combine=Ym,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const Ol=TR();function TR(){const a=new ArrayBuffer(4),e=new Float32Array(a),t=new Uint32Array(a),n=new Uint32Array(512),s=new Uint32Array(512);for(let d=0;d<256;++d){const g=d-127;g<-27?(n[d]=0,n[d|256]=32768,s[d]=24,s[d|256]=24):g<-14?(n[d]=1024>>-g-14,n[d|256]=1024>>-g-14|32768,s[d]=-g-1,s[d|256]=-g-1):g<=15?(n[d]=g+15<<10,n[d|256]=g+15<<10|32768,s[d]=13,s[d|256]=13):g<128?(n[d]=31744,n[d|256]=64512,s[d]=24,s[d|256]=24):(n[d]=31744,n[d|256]=64512,s[d]=13,s[d|256]=13)}const o=new Uint32Array(2048),u=new Uint32Array(64),h=new Uint32Array(64);for(let d=1;d<1024;++d){let g=d<<13,y=0;for(;(g&8388608)===0;)g<<=1,y-=8388608;g&=-8388609,y+=947912704,o[d]=g|y}for(let d=1024;d<2048;++d)o[d]=939524096+(d-1024<<13);for(let d=1;d<31;++d)u[d]=d<<23;u[31]=1199570944,u[32]=2147483648;for(let d=33;d<63;++d)u[d]=2147483648+(d-32<<23);u[63]=3347054592;for(let d=1;d<64;++d)d!==32&&(h[d]=1024);return{floatView:e,uint32View:t,baseTable:n,shiftTable:s,mantissaTable:o,exponentTable:u,offsetTable:h}}function Wr(a){Math.abs(a)>65504&&Mt("DataUtils.toHalfFloat(): Value out of range."),a=nn(a,-65504,65504),Ol.floatView[0]=a;const e=Ol.uint32View[0],t=e>>23&511;return Ol.baseTable[t]+((e&8388607)>>Ol.shiftTable[t])}function xm(a){const e=a>>10;return Ol.uint32View[0]=Ol.mantissaTable[Ol.offsetTable[e]+(a&1023)]+Ol.exponentTable[e],Ol.floatView[0]}class ff{static toHalfFloat(e){return Wr(e)}static fromHalfFloat(e){return xm(e)}}const us=new K,ev=new We;let CR=0;class Wn{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:CR++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=Fm,this.updateRanges=[],this.gpuType=Ci,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;
vendor: 5,585 bytes, line 37
37for(let s=0,o=this.itemSize;s<o;s++)this.array[e+s]=t.array[n+s];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)ev.fromBufferAttribute(this,t),ev.applyMatrix3(e),this.setXY(t,ev.x,ev.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)us.fromBufferAttribute(this,t),us.applyMatrix3(e),this.setXYZ(t,us.x,us.y,us.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)us.fromBufferAttribute(this,t),us.applyMatrix4(e),this.setXYZ(t,us.x,us.y,us.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)us.fromBufferAttribute(this,t),us.applyNormalMatrix(e),this.setXYZ(t,us.x,us.y,us.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)us.fromBufferAttribute(this,t),us.transformDirection(e),this.setXYZ(t,us.x,us.y,us.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=xr(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=vn(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=xr(t,this.array)),t}setX(e,t){return this.normalized&&(t=vn(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=xr(t,this.array)),t}setY(e,t){return this.normalized&&(t=vn(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=xr(t,this.array)),t}setZ(e,t){return this.normalized&&(t=vn(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=xr(t,this.array)),t}setW(e,t){return this.normalized&&(t=vn(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=vn(t,this.array),n=vn(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,s){return e*=this.itemSize,this.normalized&&(t=vn(t,this.array),n=vn(n,this.array),s=vn(s,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=s,this}setXYZW(e,t,n,s,o){return e*=this.itemSize,this.normalized&&(t=vn(t,this.array),n=vn(n,this.array),s=vn(s,this.array),o=vn(o,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=s,this.array[e+3]=o,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==Fm&&(e.usage=this.usage),e}}class wR extends Wn{constructor(e,t,n){super(new Int8Array(e),t,n)}}class RR extends Wn{constructor(e,t,n){super(new Uint8Array(e),t,n)}}class BR extends Wn{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}}class DR extends Wn{constructor(e,t,n){super(new Int16Array(e),t,n)}}class cS extends Wn{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class IR extends Wn{constructor(e,t,n){super(new Int32Array(e),t,n)}}class uS extends Wn{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class LR extends Wn{constructor(e,t,n){super(new Uint16Array(e),t,n),this.isFloat16BufferAttribute=!0}getX(e){let t=xm(this.array[e*this.itemSize]);return this.normalized&&(t=xr(t,this.array)),t}setX(e,t){return this.normalized&&(t=vn(t,this.array)),this.array[e*this.itemSize]=Wr(t),this}getY(e){let t=xm(this.array[e*this.itemSize+1]);return this.normalized&&(t=xr(t,this.array)),t}setY(e,t){return this.normalized&&(t=vn(t,this.array)),this.array[e*this.itemSize+1]=Wr(t),this}getZ(e){let t=xm(this.array[e*this.itemSize+2]);return this.normalized&&(t=xr(t,this.array)),t}setZ(e,t){return this.normalized&&(t=vn(t,this.array)),this.array[e*this.itemSize+2]=Wr(t),this}getW(e){let t=xm(this.array[e*this.itemSize+3]);return this.normalized&&(t=xr(t,this.array)),t}setW(e,t){return this.normalized&&(t=vn(t,this.array)),this.array[e*this.itemSize+3]=Wr(t),this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=vn(t,this.array),n=vn(n,this.array)),this.array[e+0]=Wr(t),this.array[e+1]=Wr(n),this}setXYZ(e,t,n,s){return e*=this.itemSize,this.normalized&&(t=vn(t,this.array),n=vn(n,this.array),s=vn(s,this.array)),this.array[e+0]=Wr(t),this.array[e+1]=Wr(n),this.array[e+2]=Wr(s),this}setXYZW(e,t,n,s,o){return e*=this.itemSize,this.normalized&&(t=vn(t,this.array),n=vn(n,this.array),s=vn(s,this.array),o=vn(o,this.array)),this.array[e+0]=Wr(t),this.array[e+1]=Wr(n),this.array[e+2]=Wr(s),this.array[e+3]=Wr(o),this}}class Nt extends Wn{constructor(e,t,n){super(new Float32Array(e),t,n)}}let UR=0;const Ia=new jt,Ix=new Gn,Xh=new K,ea=new Rs,om=new Rs,Cs=new K;class rn extends jo{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:UR++}),this.uuid=na(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(LE(e)?uS:cS)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}
vendor: 23,417 bytes, lines 37-41
37addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(n!==void 0){const o=new dn().getNormalMatrix(e);n.applyNormalMatrix(o),n.needsUpdate=!0}const s=this.attributes.tangent;return s!==void 0&&(s.transformDirection(e),s.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return Ia.makeRotationFromQuaternion(e),this.applyMatrix4(Ia),this}rotateX(e){return Ia.makeRotationX(e),this.applyMatrix4(Ia),this}rotateY(e){return Ia.makeRotationY(e),this.applyMatrix4(Ia),this}rotateZ(e){return Ia.makeRotationZ(e),this.applyMatrix4(Ia),this}translate(e,t,n){return Ia.makeTranslation(e,t,n),this.applyMatrix4(Ia),this}scale(e,t,n){return Ia.makeScale(e,t,n),this.applyMatrix4(Ia),this}lookAt(e){return Ix.lookAt(e),Ix.updateMatrix(),this.applyMatrix4(Ix.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Xh).negate(),this.translate(Xh.x,Xh.y,Xh.z),this}setFromPoints(e){const t=this.getAttribute("position");if(t===void 0){const n=[];for(let s=0,o=e.length;s<o;s++){const u=e[s];n.push(u.x,u.y,u.z||0)}this.setAttribute("position",new Nt(n,3))}else{const n=Math.min(e.length,t.count);for(let s=0;s<n;s++){const o=e[s];t.setXYZ(s,o.x,o.y,o.z||0)}e.length>t.count&&Mt("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Rs);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){Vt("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new K(-1/0,-1/0,-1/0),new K(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,s=t.length;n<s;n++){const o=t[n];ea.setFromBufferAttribute(o),this.morphTargetsRelative?(Cs.addVectors(this.boundingBox.min,ea.min),this.boundingBox.expandByPoint(Cs),Cs.addVectors(this.boundingBox.max,ea.max),this.boundingBox.expandByPoint(Cs)):(this.boundingBox.expandByPoint(ea.min),this.boundingBox.expandByPoint(ea.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&Vt('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new vs);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){Vt("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new K,1/0);return}if(e){const n=this.boundingSphere.center;if(ea.setFromBufferAttribute(e),t)for(let o=0,u=t.length;o<u;o++){const h=t[o];om.setFromBufferAttribute(h),this.morphTargetsRelative?(Cs.addVectors(ea.min,om.min),ea.expandByPoint(Cs),Cs.addVectors(ea.max,om.max),ea.expandByPoint(Cs)):(ea.expandByPoint(om.min),ea.expandByPoint(om.max))}ea.getCenter(n);let s=0;for(let o=0,u=e.count;o<u;o++)Cs.fromBufferAttribute(e,o),s=Math.max(s,n.distanceToSquared(Cs));if(t)for(let o=0,u=t.length;o<u;o++){const h=t[o],d=this.morphTargetsRelative;for(let g=0,y=h.count;g<y;g++)Cs.fromBufferAttribute(h,g),d&&(Xh.fromBufferAttribute(e,g),Cs.add(Xh)),s=Math.max(s,n.distanceToSquared(Cs))}this.boundingSphere.radius=Math.sqrt(s),isNaN(this.boundingSphere.radius)&&Vt('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){Vt("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const n=t.position,s=t.normal,o=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Wn(new Float32Array(4*n.count),4));const u=this.getAttribute("tangent"),h=[],d=[];for(let k=0;k<n.count;k++)h[k]=new K,d[k]=new K;const g=new K,y=new K,v=new K,x=new We,S=new We,M=new We,w=new K,C=new K;function E(k,I,O){g.fromBufferAttribute(n,k),y.fromBufferAttribute(n,I),v.fromBufferAttribute(n,O),x.fromBufferAttribute(o,k),S.fromBufferAttribute(o,I),M.fromBufferAttribute(o,O),y.sub(g),v.sub(g),S.sub(x),M.sub(x);const q=1/(S.x*M.y-M.x*S.y);isFinite(q)&&(w.copy(y).multiplyScalar(M.y).addScaledVector(v,-S.y).multiplyScalar(q),C.copy(v).multiplyScalar(S.x).addScaledVector(y,-M.x).multiplyScalar(q),h[k].add(w),h[I].add(w),h[O].add(w),d[k].add(C),d[I].add(C),d[O].add(C))}let B=this.groups;B.length===0&&(B=[{start:0,count:e.count}]);for(let k=0,I=B.length;k<I;++k){const O=B[k],q=O.start,ie=O.count;for(let j=q,re=q+ie;j<re;j+=3)E(e.getX(j+0),e.getX(j+1),e.getX(j+2))}const D=new K,U=new K,z=new K,P=new K;function X(k){z.fromBufferAttribute(s,k),P.copy(z);const I=h[k];D.copy(I),D.sub(z.multiplyScalar(z.dot(I))).normalize(),U.crossVectors(P,I);const q=U.dot(d[k])<0?-1:1;u.setXYZW(k,D.x,D.y,D.z,q)}for(let k=0,I=B.length;k<I;++k){const O=B[k],q=O.start,ie=O.count;for(let j=q,re=q+ie;j<re;j+=3)X(e.getX(j+0)),X(e.getX(j+1)),X(e.getX(j+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Wn(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let x=0,S=n.count;x<S;x++)n.setXYZ(x,0,0,0);const s=new K,o=new K,u=new K,h=new K,d=new K,g=new K,y=new K,v=new K;if(e)for(let x=0,S=e.count;x<S;x+=3){const M=e.getX(x+0),w=e.getX(x+1),C=e.getX(x+2);s.fromBufferAttribute(t,M),o.fromBufferAttribute(t,w),u.fromBufferAttribute(t,C),y.subVectors(u,o),v.subVectors(s,o),y.cross(v),h.fromBufferAttribute(n,M),d.fromBufferAttribute(n,w),g.fromBufferAttribute(n,C),h.add(y),d.add(y),g.add(y),n.setXYZ(M,h.x,h.y,h.z),n.setXYZ(w,d.x,d.y,d.z),n.setXYZ(C,g.x,g.y,g.z)}else for(let x=0,S=t.count;x<S;x+=3)s.fromBufferAttribute(t,x+0),o.fromBufferAttribute(t,x+1),u.fromBufferAttribute(t,x+2),y.subVectors(u,o),v.subVectors(s,o),y.cross(v),n.setXYZ(x+0,y.x,y.y,y.z),n.setXYZ(x+1,y.x,y.y,y.z),n.setXYZ(x+2,y.x,y.y,y.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)Cs.fromBufferAttribute(e,t),Cs.normalize(),e.setXYZ(t,Cs.x,Cs.y,Cs.z)}toNonIndexed(){function e(h,d){const g=h.array,y=h.itemSize,v=h.normalized,x=new g.constructor(d.length*y);let S=0,M=0;for(let w=0,C=d.length;w<C;w++){h.isInterleavedBufferAttribute?S=d[w]*h.data.stride+h.offset:S=d[w]*y;for(let E=0;E<y;E++)x[M++]=g[S++]}return new Wn(x,y,v)}if(this.index===null)return Mt("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new rn,n=this.index.array,s=this.attributes;for(const h in s){const d=s[h],g=e(d,n);t.setAttribute(h,g)}const o=this.morphAttributes;for(const h in o){const d=[],g=o[h];for(let y=0,v=g.length;y<v;y++){const x=g[y],S=e(x,n);d.push(S)}t.morphAttributes[h]=d}t.morphTargetsRelative=this.morphTargetsRelative;const u=this.groups;for(let h=0,d=u.length;h<d;h++){const g=u[h];t.addGroup(g.start,g.count,g.materialIndex)}return t}toJSON(){const e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const d=this.parameters;for(const g in d)d[g]!==void 0&&(e[g]=d[g]);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 n=this.attributes;for(const d in n){const g=n[d];e.data.attributes[d]=g.toJSON(e.data)}const s={};let o=!1;for(const d in this.morphAttributes){const g=this.morphAttributes[d],y=[];for(let v=0,x=g.length;v<x;v++){const S=g[v];y.push(S.toJSON(e.data))}y.length>0&&(s[d]=y,o=!0)}o&&(e.data.morphAttributes=s,e.data.morphTargetsRelative=this.morphTargetsRelative);const u=this.groups;u.length>0&&(e.data.groups=JSON.parse(JSON.stringify(u)));const h=this.boundingSphere;return h!==null&&(e.data.boundingSphere=h.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;n!==null&&this.setIndex(n.clone());const s=e.attributes;for(const g in s){const y=s[g];this.setAttribute(g,y.clone(t))}const o=e.morphAttributes;for(const g in o){const y=[],v=o[g];for(let x=0,S=v.length;x<S;x++)y.push(v[x].clone(t));this.morphAttributes[g]=y}this.morphTargetsRelative=e.morphTargetsRelative;const u=e.groups;for(let g=0,y=u.length;g<y;g++){const v=u[g];this.addGroup(v.start,v.count,v.materialIndex)}const h=e.boundingBox;h!==null&&(this.boundingBox=h.clone());const d=e.boundingSphere;return d!==null&&(this.boundingSphere=d.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const oM=new jt,Wu=new Cd,tv=new vs,lM=new K,nv=new K,iv=new K,sv=new K,Lx=new K,rv=new K,cM=new K,av=new K;class wi extends Gn{constructor(e=new rn,t=new Yr){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const s=t[n[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,u=s.length;o<u;o++){const h=s[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[h]=o}}}}getVertexPosition(e,t){const n=this.geometry,s=n.attributes.position,o=n.morphAttributes.position,u=n.morphTargetsRelative;t.fromBufferAttribute(s,e);const h=this.morphTargetInfluences;if(o&&h){rv.set(0,0,0);for(let d=0,g=o.length;d<g;d++){const y=h[d],v=o[d];y!==0&&(Lx.fromBufferAttribute(v,e),u?rv.addScaledVector(Lx,y):rv.addScaledVector(Lx.sub(t),y))}t.add(rv)}return t}raycast(e,t){const n=this.geometry,s=this.material,o=this.matrixWorld;s!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),tv.copy(n.boundingSphere),tv.applyMatrix4(o),Wu.copy(e.ray).recast(e.near),!(tv.containsPoint(Wu.origin)===!1&&(Wu.intersectSphere(tv,lM)===null||Wu.origin.distanceToSquared(lM)>(e.far-e.near)**2))&&(oM.copy(o).invert(),Wu.copy(e.ray).applyMatrix4(oM),!(n.boundingBox!==null&&Wu.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Wu)))}_computeIntersections(e,t,n){let s;const o=this.geometry,u=this.material,h=o.index,d=o.attributes.position,g=o.attributes.uv,y=o.attributes.uv1,v=o.attributes.normal,x=o.groups,S=o.drawRange;if(h!==null)if(Array.isArray(u))for(let M=0,w=x.length;M<w;M++){const C=x[M],E=u[C.materialIndex],B=Math.max(C.start,S.start),D=Math.min(h.count,Math.min(C.start+C.count,S.start+S.count));for(let U=B,z=D;U<z;U+=3){const P=h.getX(U),X=h.getX(U+1),k=h.getX(U+2);s=ov(this,E,e,n,g,y,v,P,X,k),s&&(s.faceIndex=Math.floor(U/3),s.face.materialIndex=C.materialIndex,t.push(s))}}else{const M=Math.max(0,S.start),w=Math.min(h.count,S.start+S.count);for(let C=M,E=w;C<E;C+=3){const B=h.getX(C),D=h.getX(C+1),U=h.getX(C+2);s=ov(this,u,e,n,g,y,v,B,D,U),s&&(s.faceIndex=Math.floor(C/3),t.push(s))}}else if(d!==void 0)if(Array.isArray(u))for(let M=0,w=x.length;M<w;M++){const C=x[M],E=u[C.materialIndex],B=Math.max(C.start,S.start),D=Math.min(d.count,Math.min(C.start+C.count,S.start+S.count));for(let U=B,z=D;U<z;U+=3){const P=U,X=U+1,k=U+2;s=ov(this,E,e,n,g,y,v,P,X,k),s&&(s.faceIndex=Math.floor(U/3),s.face.materialIndex=C.materialIndex,t.push(s))}}else{const M=Math.max(0,S.start),w=Math.min(d.count,S.start+S.count);for(let C=M,E=w;C<E;C+=3){const B=C,D=C+1,U=C+2;s=ov(this,u,e,n,g,y,v,B,D,U),s&&(s.faceIndex=Math.floor(C/3),t.push(s))}}}}function NR(a,e,t,n,s,o,u,h){let d;if(e.side===Ar?d=n.intersectTriangle(u,o,s,!0,h):d=n.intersectTriangle(s,o,u,e.side===Zo,h),d===null)return null;av.copy(h),av.applyMatrix4(a.matrixWorld);const g=t.ray.origin.distanceTo(av);return g<t.near||g>t.far?null:{distance:g,point:av.clone(),object:a}}function ov(a,e,t,n,s,o,u,h,d,g){a.getVertexPosition(h,nv),a.getVertexPosition(d,iv),a.getVertexPosition(g,sv);const y=NR(a,e,t,n,nv,iv,sv,cM);if(y){const v=new K;Jr.getBarycoord(cM,nv,iv,sv,v),s&&(y.uv=Jr.getInterpolatedAttribute(s,h,d,g,v,new We)),o&&(y.uv1=Jr.getInterpolatedAttribute(o,h,d,g,v,new We)),u&&(y.normal=Jr.getInterpolatedAttribute(u,h,d,g,v,new K),y.normal.dot(n.direction)>0&&y.normal.multiplyScalar(-1));const x={a:h,b:d,c:g,normal:new K,materialIndex:0};Jr.getNormal(nv,iv,sv,x.normal),y.face=x,y.barycoord=v}return y}class Tf extends rn{constructor(e=1,t=1,n=1,s=1,o=1,u=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:s,heightSegments:o,depthSegments:u};const h=this;s=Math.floor(s),o=Math.floor(o),u=Math.floor(u);const d=[],g=[],y=[],v=[];let x=0,S=0;M("z","y","x",-1,-1,n,t,e,u,o,0),M("z","y","x",1,-1,n,t,-e,u,o,1),M("x","z","y",1,1,e,n,t,s,u,2),M("x","z","y",1,-1,e,n,-t,s,u,3),M("x","y","z",1,-1,e,t,n,s,o,4),M("x","y","z",-1,-1,e,t,-n,s,o,5),this.setIndex(d),this.setAttribute("position",new Nt(g,3)),this.setAttribute("normal",new Nt(y,3)),this.setAttribute("uv",new Nt(v,2));function M(w,C,E,B,D,U,z,P,X,k,I){const O=U/X,q=z/k,ie=U/2,j=z/2,re=P/2,fe=X+1,Y=k+1;let $=0,pe=0;const Be=new K;for(let Ae=0;Ae<Y;Ae++){const De=Ae*q-j;for(let He=0;He<fe;He++){const Ve=He*O-ie;Be[w]=Ve*B,Be[C]=De*D,Be[E]=re,g.push(Be.x,Be.y,Be.z),Be[w]=0,Be[C]=0,Be[E]=P>0?1:-1,y.push(Be.x,Be.y,Be.z),v.push(He/X),v.push(1-Ae/k),$+=1}}for(let Ae=0;Ae<k;Ae++)for(let De=0;De<X;De++){const He=x+De+fe*Ae,Ve=x+De+fe*(Ae+1),bt=x+(De+1)+fe*(Ae+1),qt=x+(De+1)+fe*Ae;d.push(He,Ve,qt),d.push(Ve,bt,qt),pe+=6}h.addGroup(S,pe,I),S+=pe,x+=$}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Tf(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function Ad(a){const e={};for(const t in a){e[t]={};for(const n in a[t]){const s=a[t][n];s&&(s.isColor||s.isMatrix3||s.isMatrix4||s.isVector2||s.isVector3||s.isVector4||s.isTexture||s.isQuaternion)?s.isRenderTargetTexture?(Mt("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=s.clone():Array.isArray(s)?e[t][n]=s.slice():e[t][n]=s}}return e}function yr(a){const e={};for(let t=0;t<a.length;t++){const n=Ad(a[t]);for(const s in n)e[s]=n[s]}return e}function FR(a){const e=[];for(let t=0;t<a.length;t++)e.push(a[t].clone());return e}function zE(a){const e=a.getRenderTarget();return e===null?a.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:On.workingColorSpace}const GE={clone:Ad,merge:yr};var OR=`void main() { 38 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 39}`,PR=`void main() { 40 gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 ); 41}`;class br extends ys{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=OR,this.fragmentShader=PR,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Ad(e.uniforms),this.uniformsGroups=FR(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this.defaultAttributeValues=Object.assign({},e.defaultAttributeValues),this.index0AttributeName=e.index0AttributeName,this.uniformsNeedUpdate=e.uniformsNeedUpdate,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const s in this.uniforms){const u=this.uniforms[s].value;u&&u.isTexture?t.uniforms[s]={type:"t",value:u.toJSON(e).uuid}:u&&u.isColor?t.uniforms[s]={type:"c",value:u.getHex()}:u&&u.isVector2?t.uniforms[s]={type:"v2",value:u.toArray()}:u&&u.isVector3?t.uniforms[s]={type:"v3",value:u.toArray()}:u&&u.isVector4?t.uniforms[s]={type:"v4",value:u.toArray()}:u&&u.isMatrix3?t.uniforms[s]={type:"m3",value:u.toArray()}:u&&u.isMatrix4?t.uniforms[s]={type:"m4",value:u.toArray()}:t.uniforms[s]={value:u}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const s in this.extensions)this.extensions[s]===!0&&(n[s]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class s_ extends Gn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new jt,this.projectionMatrix=new jt,this.projectionMatrixInverse=new jt,this.coordinateSystem=ta,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const Oc=new K,uM=new We,fM=new We;class gs extends s_{constructor(e=50,t=1,n=.1,s=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,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=_d*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(gf*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return _d*2*Math.atan(Math.tan(gf*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){Oc.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(Oc.x,Oc.y).multiplyScalar(-e/Oc.z),Oc.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Oc.x,Oc.y).multiplyScalar(-e/Oc.z)}getViewSize(e,t){return this.getViewBounds(e,uM,fM),t.subVectors(fM,uM)}setViewOffset(e,t,n,s,o,u){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=n,this.view.offsetY=s,this.view.width=o,this.view.height=u,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(gf*.5*this.fov)/this.zoom,n=2*t,s=this.aspect*n,o=-.5*s;const u=this.view;if(this.view!==null&&this.view.enabled){const d=u.fullWidth,g=u.fullHeight;o+=u.offsetX*s/d,t-=u.offsetY*n/g,s*=u.width/d,n*=u.height/g}const h=this.filmOffset;h!==0&&(o+=e*h/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+s,t,t-n,e,this.far,this.coordinateSystem,this.reversedDepth),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 Wh=-90,Jh=1;class HE extends Gn{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const s=new gs(Wh,Jh,e,t);s.layers=this.layers,this.add(s);const o=new gs(Wh,Jh,e,t);o.layers=this.layers,this.add(o);const u=new gs(Wh,Jh,e,t);u.layers=this.layers,this.add(u);const h=new gs(Wh,Jh,e,t);h.layers=this.layers,this.add(h);const d=new gs(Wh,Jh,e,t);d.layers=this.layers,this.add(d);const g=new gs(Wh,Jh,e,t);g.layers=this.layers,this.add(g)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,s,o,u,h,d]=t;for(const g of t)this.remove(g);if(e===ta)n.up.set(0,1,0),n.lookAt(1,0,0),s.up.set(0,1,0),s.lookAt(-1,0,0),o.up.set(0,0,-1),o.lookAt(0,1,0),u.up.set(0,0,1),u.lookAt(0,-1,0),h.up.set(0,1,0),h.lookAt(0,0,1),d.up.set(0,1,0),d.lookAt(0,0,-1);else if(e===vd)n.up.set(0,-1,0),n.lookAt(-1,0,0),s.up.set(0,-1,0),s.lookAt(1,0,0),o.up.set(0,0,1),o.lookAt(0,1,0),u.up.set(0,0,-1),u.lookAt(0,-1,0),h.up.set(0,-1,0),h.lookAt(0,0,1),d.up.set(0,-1,0),d.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const g of t)this.add(g),g.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:s}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[o,u,h,d,g,y]=this.children,v=e.getRenderTarget(),x=e.getActiveCubeFace(),S=e.getActiveMipmapLevel(),M=e.xr.enabled;e.xr.enabled=!1;const w=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,s),e.render(t,o),e.setRenderTarget(n,1,s),e.render(t,u),e.setRenderTarget(n,2,s),e.render(t,h),e.setRenderTarget(n,3,s),e.render(t,d),e.setRenderTarget(n,4,s),e.render(t,g),n.texture.generateMipmaps=w,e.setRenderTarget(n,5,s),e.render(t,y),e.setRenderTarget(v,x,S),e.xr.enabled=M,n.texture.needsPMREMUpdate=!0}}class Qm extends ei{constructor(e=[],t=ho,n,s,o,u,h,d,g,y){super(e,t,n,s,o,u,h,d,g,y),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class r_ extends Sr{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},s=[n,n,n,n,n,n];this.texture=new Qm(s),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace
vendor: 4,296 bytes, lines 41-76
41=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:` 42 43 varying vec3 vWorldDirection; 44 45 vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 46 47 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 48 49 } 50 51 void main() { 52 53 vWorldDirection = transformDirection( position, modelMatrix ); 54 55 #include <begin_vertex> 56 #include <project_vertex> 57 58 } 59 `,fragmentShader:` 60 61 uniform sampler2D tEquirect; 62 63 varying vec3 vWorldDirection; 64 65 #include <common> 66 67 void main() { 68 69 vec3 direction = normalize( vWorldDirection ); 70 71 vec2 sampleUV = equirectUv( direction ); 72 73 gl_FragColor = texture2D( tEquirect, sampleUV ); 74 75 } 76 `},s=new Tf(5,5,5),o=new br({name:"CubemapFromEquirect",uniforms:Ad(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Ar,blending:fo});o.uniforms.tEquirect.value=t;const u=new wi(s,o),h=t.minFilter;return t.minFilter===Fa&&(t.minFilter=Un),new HE(1,10,this).update(e,u),t.minFilter=h,u.geometry.dispose(),u.material.dispose(),this}clear(e,t=!0,n=!0,s=!0){const o=e.getRenderTarget();for(let u=0;u<6;u++)e.setRenderTarget(this,u),e.clear(t,n,s);e.setRenderTarget(o)}}class Pl extends Gn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const zR={type:"move"};class Vv{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Pl,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 Pl,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new K,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new K),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Pl,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new K,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new K),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 n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),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,n){let s=null,o=null,u=null;const h=this._targetRay,d=this._grip,g=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(g&&e.hand){u=!0;for(const w of e.hand.values()){const C=t.getJointPose(w,n),E=this._getHandJoint(g,w);C!==null&&(E.matrix.fromArray(C.transform.matrix),E.matrix.decompose(E.position,E.rotation,E.scale),E.matrixWorldNeedsUpdate=!0,E.jointRadius=C.radius),E.visible=C!==null}const y=g.joints["index-finger-tip"],v=g.joints["thumb-tip"],x=y.position.distanceTo(v.position),S=.02,M=.005;g.inputState.pinching&&x>S+M?(g.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!g.inputState.pinching&&x<=S-M&&(g.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else d!==null&&e.gripSpace&&(o=t.getPose(e.gripSpace,n),o!==null&&(d.matrix.fromArray(o.transform.matrix),d.matrix.decompose(d.position,d.rotation,d.scale),d.matrixWorldNeedsUpdate=!0,o.linearVelocity?(d.hasLinearVelocity=!0,d.linearVelocity.copy(o.linearVelocity)):d.hasLinearVelocity=!1,o.angularVelocity?(d.hasAngularVelocity=!0,d.angularVelocity.copy(o.angularVelocity)):d.hasAngularVelocity=!1));h!==null&&(s=t.getPose(e.targetRaySpace,n),s===null&&o!==null&&(s=o),s!==null&&(h.matrix.fromArray(s.transform.matrix),h.matrix.decompose(h.position,h.rotation,h.scale),h.matrixWorldNeedsUpdate=!0,s.linearVelocity?(h.hasLinearVelocity=!0,h.linearVelocity.copy(s.linearVelocity)):h.hasLinearVelocity=!1,s.angularVelocity?(h.hasA
vendor: 13,848 bytes, line 76
76ngularVelocity=!0,h.angularVelocity.copy(s.angularVelocity)):h.hasAngularVelocity=!1,this.dispatchEvent(zR)))}return h!==null&&(h.visible=s!==null),d!==null&&(d.visible=o!==null),g!==null&&(g.visible=u!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const n=new Pl;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class a_{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Tt(e),this.density=t}clone(){return new a_(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class o_{constructor(e,t=1,n=1e3){this.isFog=!0,this.name="",this.color=new Tt(e),this.near=t,this.far=n}clone(){return new o_(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class jm extends Gn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new sa,this.environmentIntensity=1,this.environmentRotation=new sa,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}class $m{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Fm,this.updateRanges=[],this.version=0,this.uuid=na()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let s=0,o=this.stride;s<o;s++)this.array[e+s]=t.array[n+s];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=na()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=na()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const vr=new K;class jc{constructor(e,t,n,s=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=s}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)vr.fromBufferAttribute(this,t),vr.applyMatrix4(e),this.setXYZ(t,vr.x,vr.y,vr.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)vr.fromBufferAttribute(this,t),vr.applyNormalMatrix(e),this.setXYZ(t,vr.x,vr.y,vr.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)vr.fromBufferAttribute(this,t),vr.transformDirection(e),this.setXYZ(t,vr.x,vr.y,vr.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=xr(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=vn(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=vn(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=vn(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=vn(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=vn(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=xr(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=xr(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=xr(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=xr(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=vn(t,this.array),n=vn(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,s){return e=e*this.data.stride+this.offset,this.normalized&&(t=vn(t,this.array),n=vn(n,this.array),s=vn(s,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=s,this}setXYZW(e,t,n,s,o){return e=e*this.data.stride+this.offset,this.normalized&&(t=vn(t,this.array),n=vn(n,this.array),s=vn(s,this.array),o=vn(o,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=s,this.data.array[e+3]=o,this}clone(e){if(e===void 0){Pm("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const s=n*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)t.push(this.data.array[s+o])}return new Wn(new this.array.constructor(t),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new jc(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){Pm("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const s=n*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)t.push(this.data.array[s+o])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class fS extends ys{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new Tt(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let Yh;const lm=new K,qh=new K,Kh=new K,Zh=new We,cm=new We,kE=new jt,lv=new K,um=new K,cv=new K,hM=new We,Ux=new We,dM=new We;class VE extends Gn{constructor(e=new fS){if(super(),this.isSprite=!0,this.type="Sprite",Yh===void 0){Yh=new rn;const t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),n=new $m(t,5);Yh.setIndex([0,1,2,0,2,3]),Yh.setAttribute("position",new jc(n,3,0,!1)),Yh.setAttribute("uv",new jc(n,2,3,!1))}this.geometry=Yh,this.material=e,this.center=new We(.5,.5),this.count=1}raycast(e,t){e.camera===null&&Vt('Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),qh.setFromMatrixScale(this.matrixWorld),kE.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Kh.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&qh.multiplyScalar(-Kh.z);const n=this.material.rotation;let s,o;n!==0&&(o=Math.cos(n),s=Math.sin(n));const u=this.center;uv(lv.set(-.5,-.5,0),Kh,u,qh,s,o),uv(um.set(.5,-.5,0),Kh,u,qh,s,o),uv(cv.set(.5,.5,0),Kh,u,qh,s,o),hM.set(0,0),Ux.set(1,0),dM.set(1,1);let h=e.ray.intersectTriangle(lv,um,cv,!1,lm);if(h===null&&(uv(um.set(-.5,.5,0),Kh,u,qh,s,o),Ux.set(0,1),h=e.ray.intersectTriangle(lv,cv,um,!1,lm),h===null))return;const d=e.ray.origin.distanceTo(lm);d<e.near||d>e.far||t.push({distance:d,point:lm.clone(),uv:Jr.getInterpolation(lm,lv,um,cv,hM,Ux,dM,new We),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 uv(a,e,t,n,s,o){Zh.subVectors(a,t).addScalar(.5).multiply(n),s!==void 0?(cm.x=o*Zh.x-s*Zh.y,cm.y=s*Zh.x+o*Zh.y):cm.copy(Zh),a.copy(e),a.x+=cm.x,a.y+=cm.y,a.applyMatrix4(kE)}const fv=new K,pM=new K;class XE extends Gn{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let n=0,s=t.length;n<s;n++){const o=t[n];this.addLevel(o.object.clone(),o.distance,o.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,n=0){t=Math.abs(t);const s=this.levels;let o;for(o=0;o<s.length&&!(t<s[o].distance);o++);return s.splice(o,0,{distance:t,hysteresis:n,object:e}),this.add(e),this}removeLevel(e){const t=this.levels;for(let n=0;n<t.length;n++)if(t[n].distance===e){const s=t.splice(n,1);return this.remove(s[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,s;for(n=1,s=t.length;n<s;n++){let o=t[n].distance;if(t[n].object.visible&&(o-=o*t[n].hysteresis),e<o)break}return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){fv.setFromMatrixPosition(this.matrixWorld);const s=e.ray.origin.distanceTo(fv);this.getObjectForDistance(s).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){fv.setFromMatrixPosition(e.matrixWorld),pM.setFromMatrixPosition(this.matrixWorld);const n=fv.distanceTo(pM)/e.zoom;t[0].object.visible=!0;let s,o;for(s=1,o=t.length;s<o;s++){let u=t[s].distance;if(t[s].object.visible&&(u-=u*t[s].hysteresis),n>=u)t[s-1].object.visible=!1,t[s].object.visible=!0;else break}for(this._currentLevel=s-1;s<o;s++)t[s].object.visible=!1}}toJSON(e){const t=super.toJSON(e);this.autoUpdate===!1&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let s=0,o=n.length;s<o;s++){const u=n[s];t.object.levels.push({object:u.object.uuid,distance:u.distance,hysteresis:u.hysteresis})}return t}}const mM=new K,gM=new li,vM=new li,GR=new K,yM=new jt,hv=new K,Nx=new vs,_M=new jt,Fx=new Cd;class hS extends wi{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=EA,this.bindMatrix=new jt,this.bindMatrixInverse=new jt,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new Rs),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,hv),this.boundingBox.expandByPoint(hv)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new vs),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,hv),this.boundingSphere.expandByPoint(hv)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const n=this.material,s=this.matrixWorld;n!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Nx.copy(this.boundingSphere),Nx.applyMatrix4(s),e.ray.intersectsSphere(Nx)!==!1&&(_M.copy(s).invert(),Fx.copy(e.ray).applyMatrix4(_M),!(this.boundingBox!==null&&Fx.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,Fx)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,t===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new li,t=this.geometry.attributes.skinWeight;for(let n=0,s=t.count;n<s;n++){e.fromBufferAttribute(t,n);const o=1/e.manhattanLength();o!==1/0?e.multiplyScalar(o):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===EA?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===xE?this.bindMatrixInverse.copy(this.bindMatrix).invert():Mt("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}
vendor: 7,795 bytes, line 76
76applyBoneTransform(e,t){const n=this.skeleton,s=this.geometry;gM.fromBufferAttribute(s.attributes.skinIndex,e),vM.fromBufferAttribute(s.attributes.skinWeight,e),mM.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let o=0;o<4;o++){const u=vM.getComponent(o);if(u!==0){const h=gM.getComponent(o);yM.multiplyMatrices(n.bones[h].matrixWorld,n.boneInverses[h]),t.addScaledVector(GR.copy(mM).applyMatrix4(yM),u)}}return t.applyMatrix4(this.bindMatrixInverse)}}class l_ extends Gn{constructor(){super(),this.isBone=!0,this.type="Bone"}}class Pa extends ei{constructor(e=null,t=1,n=1,s,o,u,h,d,g=Xi,y=Xi,v,x){super(null,u,h,d,g,y,s,o,v,x),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const xM=new jt,HR=new jt;class eg{constructor(e=[],t=[]){this.uuid=na(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.previousBoneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),t.length===0)this.calculateInverses();else if(e.length!==t.length){Mt("Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let n=0,s=this.bones.length;n<s;n++)this.boneInverses.push(new jt)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const n=new jt;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&(n.parent&&n.parent.isBone?(n.matrix.copy(n.parent.matrixWorld).invert(),n.matrix.multiply(n.matrixWorld)):n.matrix.copy(n.matrixWorld),n.matrix.decompose(n.position,n.quaternion,n.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,s=this.boneTexture;for(let o=0,u=e.length;o<u;o++){const h=e[o]?e[o].matrixWorld:HR;xM.multiplyMatrices(h,t[o]),xM.toArray(n,o*16)}s!==null&&(s.needsUpdate=!0)}clone(){return new eg(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new Pa(t,e,e,ts,Ci);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const s=this.bones[t];if(s.name===e)return s}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,s=e.bones.length;n<s;n++){const o=e.bones[n];let u=t[o];u===void 0&&(Mt("Skeleton: No bone found with UUID:",o),u=new l_),this.bones.push(u),this.boneInverses.push(new jt().fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let s=0,o=t.length;s<o;s++){const u=t[s];e.bones.push(u.uuid);const h=n[s];e.boneInverses.push(h.toArray())}return e}}class xf extends Wn{constructor(e,t,n,s=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=s}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const Qh=new jt,AM=new jt,dv=[],SM=new Rs,kR=new jt,fm=new wi,hm=new vs;class dS extends wi{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new xf(new Float32Array(n*16),16),this.instanceColor=null,this.morphTexture=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let s=0;s<n;s++)this.setMatrixAt(s,kR)}computeBoundingBox(){const e=this.geometry,t=this.count;this.boundingBox===null&&(this.boundingBox=new Rs),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Qh),SM.copy(e.boundingBox).applyMatrix4(Qh),this.boundingBox.union(SM)}computeBoundingSphere(){const e=this.geometry,t=this.count;this.boundingSphere===null&&(this.boundingSphere=new vs),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Qh),hm.copy(e.boundingSphere).applyMatrix4(Qh),this.boundingSphere.union(hm)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),e.morphTexture!==null&&(this.morphTexture=e.morphTexture.clone()),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){t.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,e*16)}getMorphAt(e,t){const n=t.morphTargetInfluences,s=this.morphTexture.source.data.data,o=n.length+1,u=e*o+1;for(let h=0;h<n.length;h++)n[h]=s[u+h]}raycast(e,t){const n=this.matrixWorld,s=this.count;if(fm.geometry=this.geometry,fm.material=this.material,fm.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),hm.copy(this.boundingSphere),hm.applyMatrix4(n),e.ray.intersectsSphere(hm)!==!1))for(let o=0;o<s;o++){this.getMatrixAt(o,Qh),AM.multiplyMatrices(n,Qh),fm.matrixWorld=AM,fm.raycast(e,dv);for(let u=0,h=dv.length;u<h;u++){const d=dv[u];d.instanceId=o,d.object=this,t.push(d)}dv.length=0}}setColorAt(e,t){this.instanceColor===null&&(this.instanceColor=new xf(new Float32Array(this.instanceMatrix.count*3).fill(1),3)),t.toArray(this.instanceColor.array,e*3)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,e*16)}setMorphAt(e,t){const n=t.morphTargetInfluences,s=n.length+1;this.morphTexture===null&&(this.morphTexture=new Pa(new Float32Array(s*this.count),s,this.count,Km,Ci));const o=this.morphTexture.source.data.data;let u=0;for(let g=0;g<n.length;g++)u+=n[g];const h=this.geometry.morphTargetsRelative?1:1-u,d=s*e;o[d]=h,o.set(n,d+1)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null)}}const Ox=new K,VR=new K,XR=new dn;class Hc{constructor(e=new K(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,s){return this.normal.set(e,t,n),this.constant=s,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const s=Ox.subVectors(n,t).cross(VR.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 n=e.delta(Ox),s=this.normal.dot(n);if(s===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const o=-(e.start.dot(this.normal)+this.constant)/s;return o<0||o>1?null:t.copy(e.start).addScaledVector(n,o)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||XR.getNormalMatrix(e),s=this.coplanarPoint(Ox).applyMatrix4(e),o=this.normal.applyM
vendor: 6,402 bytes, line 76
76atrix3(n).normalize();return this.constant=-s.dot(o),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 Ju=new vs,WR=new We(.5,.5),pv=new K;class wd{constructor(e=new Hc,t=new Hc,n=new Hc,s=new Hc,o=new Hc,u=new Hc){this.planes=[e,t,n,s,o,u]}set(e,t,n,s,o,u){const h=this.planes;return h[0].copy(e),h[1].copy(t),h[2].copy(n),h[3].copy(s),h[4].copy(o),h[5].copy(u),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=ta,n=!1){const s=this.planes,o=e.elements,u=o[0],h=o[1],d=o[2],g=o[3],y=o[4],v=o[5],x=o[6],S=o[7],M=o[8],w=o[9],C=o[10],E=o[11],B=o[12],D=o[13],U=o[14],z=o[15];if(s[0].setComponents(g-u,S-y,E-M,z-B).normalize(),s[1].setComponents(g+u,S+y,E+M,z+B).normalize(),s[2].setComponents(g+h,S+v,E+w,z+D).normalize(),s[3].setComponents(g-h,S-v,E-w,z-D).normalize(),n)s[4].setComponents(d,x,C,U).normalize(),s[5].setComponents(g-d,S-x,E-C,z-U).normalize();else if(s[4].setComponents(g-d,S-x,E-C,z-U).normalize(),t===ta)s[5].setComponents(g+d,S+x,E+C,z+U).normalize();else if(t===vd)s[5].setComponents(d,x,C,U).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Ju.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Ju.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Ju)}intersectsSprite(e){Ju.center.set(0,0,0);const t=WR.distanceTo(e.center);return Ju.radius=.7071067811865476+t,Ju.applyMatrix4(e.matrixWorld),this.intersectsSphere(Ju)}intersectsSphere(e){const t=this.planes,n=e.center,s=-e.radius;for(let o=0;o<6;o++)if(t[o].distanceToPoint(n)<s)return!1;return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const s=t[n];if(pv.x=s.normal.x>0?e.max.x:e.min.x,pv.y=s.normal.y>0?e.max.y:e.min.y,pv.z=s.normal.z>0?e.max.z:e.min.z,s.distanceToPoint(pv)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}const Wo=new jt,Jo=new wd;class c_{constructor(){this.coordinateSystem=ta}intersectsObject(e,t){if(!t.isArrayCamera||t.cameras.length===0)return!1;for(let n=0;n<t.cameras.length;n++){const s=t.cameras[n];if(Wo.multiplyMatrices(s.projectionMatrix,s.matrixWorldInverse),Jo.setFromProjectionMatrix(Wo,s.coordinateSystem,s.reversedDepth),Jo.intersectsObject(e))return!0}return!1}intersectsSprite(e,t){if(!t||!t.cameras||t.cameras.length===0)return!1;for(let n=0;n<t.cameras.length;n++){const s=t.cameras[n];if(Wo.multiplyMatrices(s.projectionMatrix,s.matrixWorldInverse),Jo.setFromProjectionMatrix(Wo,s.coordinateSystem,s.reversedDepth),Jo.intersectsSprite(e))return!0}return!1}intersectsSphere(e,t){if(!t||!t.cameras||t.cameras.length===0)return!1;for(let n=0;n<t.cameras.length;n++){const s=t.cameras[n];if(Wo.multiplyMatrices(s.projectionMatrix,s.matrixWorldInverse),Jo.setFromProjectionMatrix(Wo,s.coordinateSystem,s.reversedDepth),Jo.intersectsSphere(e))return!0}return!1}intersectsBox(e,t){if(!t||!t.cameras||t.cameras.length===0)return!1;for(let n=0;n<t.cameras.length;n++){const s=t.cameras[n];if(Wo.multiplyMatrices(s.projectionMatrix,s.matrixWorldInverse),Jo.setFromProjectionMatrix(Wo,s.coordinateSystem,s.reversedDepth),Jo.intersectsBox(e))return!0}return!1}containsPoint(e,t){if(!t||!t.cameras||t.cameras.length===0)return!1;for(let n=0;n<t.cameras.length;n++){const s=t.cameras[n];if(Wo.multiplyMatrices(s.projectionMatrix,s.matrixWorldInverse),Jo.setFromProjectionMatrix(Wo,s.coordinateSystem,s.reversedDepth),Jo.containsPoint(e))return!0}return!1}clone(){return new c_}}function Px(a,e){return a-e}function JR(a,e){return a.z-e.z}function YR(a,e){return e.z-a.z}class qR{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,t,n,s){const o=this.pool,u=this.list;this.index>=o.length&&o.push({start:-1,count:-1,z:-1,index:-1});const h=o[this.index];u.push(h),this.index++,h.start=e,h.count=t,h.z=n,h.index=s}reset(){this.list.length=0,this.index=0}}const Xr=new jt,KR=new Tt(1,1,1),bM=new wd,ZR=new c_,mv=new Rs,Yu=new vs,dm=new K,MM=new K,QR=new K,zx=new qR,ir=new wi,gv=[];function jR(a,e,t=0){const n=e.itemSize;if(a.isInterleavedBufferAttribute||a.array.constructor!==e.array.constructor){const s=a.count;for(let o=0;o<s;o++)for(let u=0;u<n;u++)e.setComponent(o+t,u,a.getComponent(o,u))}else e.array.set(a.array,t*n);e.needsUpdate=!0}function qu(a,e){if(a.constructor!==e.constructor){const t=Math.min(a.length,e.length);for(let n=0;n<t;n++)e[n]=a[n]}else{const t=Math.min(a.length,e.length);e.set(new a.constructor(a.buffer,0,t))}}class WE extends wi{constructor(e,t,n=t*2,s){super(new rn,s),this.isBatchedMesh=!0,this.perObjectFrustumCulled=!0,this.sortObjects=!0,this.boundingBox=null,this.boundingSphere=null,this.customSort=null,this._instanceInfo=[],this._geometryInfo=[],this._availableInstanceIds=[],this._availableGeometryIds=[],this._nextIndexStart=0,this._nextVertexStart=0,this._geometryCount=0,this._visibilityChanged=!0,this._geometryInitialized=!1,this._maxInstanceCount=e,this._maxVertexCount=t,this._maxIndexCount=n,this._multiDrawCounts=new Int32Array(e),this._multiDrawStarts=new Int32Array(e),this._multiDrawCount=0,this._multiDrawInstances=null,this._matricesTexture=null,this._indirectTexture=null,this._colorsTexture=null,this._initMatricesTexture(),this._initIndirectTexture()}get maxInstanceCount(){return this._maxInstanceCount}get instanceCount(){return this._instanceInfo.length-this._availableInstanceIds.length}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}_initMatricesTexture(){let e=Math.sqrt(this._maxInstanceCount*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4),n=new Pa(t,e,e,ts,Ci);this._matricesTexture=n}_initIndirectTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Uint32Array(e*e),n=new Pa(t,e,e,Zm,ia);this._indirectTexture=n}_initColorsTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Float32Array(e*e*4).fill(1),n=new Pa(t,e,e,ts,Ci);
vendor: 16,001 bytes, line 76
76n.colorSpace=On.workingColorSpace,this._colorsTexture=n}_initializeGeometry(e){const t=this.geometry,n=this._maxVertexCount,s=this._maxIndexCount;if(this._geometryInitialized===!1){for(const o in e.attributes){const u=e.getAttribute(o),{array:h,itemSize:d,normalized:g}=u,y=new h.constructor(n*d),v=new Wn(y,d,g);t.setAttribute(o,v)}if(e.getIndex()!==null){const o=n>65535?new Uint32Array(s):new Uint16Array(s);t.setIndex(new Wn(o,1))}this._geometryInitialized=!0}}_validateGeometry(e){const t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const n in t.attributes){if(!e.hasAttribute(n))throw new Error(`THREE.BatchedMesh: Added geometry missing "${n}". All geometries must have consistent attributes.`);const s=e.getAttribute(n),o=t.getAttribute(n);if(s.itemSize!==o.itemSize||s.normalized!==o.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){const t=this._instanceInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){const t=this._geometryInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Rs);const e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let n=0,s=t.length;n<s;n++){if(t[n].active===!1)continue;const o=t[n].geometryIndex;this.getMatrixAt(n,Xr),this.getBoundingBoxAt(o,mv).applyMatrix4(Xr),e.union(mv)}}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new vs);const e=this.boundingSphere,t=this._instanceInfo;e.makeEmpty();for(let n=0,s=t.length;n<s;n++){if(t[n].active===!1)continue;const o=t[n].geometryIndex;this.getMatrixAt(n,Xr),this.getBoundingSphereAt(o,Yu).applyMatrix4(Xr),e.union(Yu)}}addInstance(e){if(this._instanceInfo.length>=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const n={visible:!0,active:!0,geometryIndex:e};let s=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(Px),s=this._availableInstanceIds.shift(),this._instanceInfo[s]=n):(s=this._instanceInfo.length,this._instanceInfo.push(n));const o=this._matricesTexture;Xr.identity().toArray(o.image.data,s*16),o.needsUpdate=!0;const u=this._colorsTexture;return u&&(KR.toArray(u.image.data,s*4),u.needsUpdate=!0),this._visibilityChanged=!0,s}addGeometry(e,t=-1,n=-1){this._initializeGeometry(e),this._validateGeometry(e);const s={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},o=this._geometryInfo;s.vertexStart=this._nextVertexStart,s.reservedVertexCount=t===-1?e.getAttribute("position").count:t;const u=e.getIndex();if(u!==null&&(s.indexStart=this._nextIndexStart,s.reservedIndexCount=n===-1?u.count:n),s.indexStart!==-1&&s.indexStart+s.reservedIndexCount>this._maxIndexCount||s.vertexStart+s.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let d;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(Px),d=this._availableGeometryIds.shift(),o[d]=s):(d=this._geometryCount,this._geometryCount++,o.push(s)),this.setGeometryAt(d,e),this._nextIndexStart=s.indexStart+s.reservedIndexCount,this._nextVertexStart=s.vertexStart+s.reservedVertexCount,d}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const n=this.geometry,s=n.getIndex()!==null,o=n.getIndex(),u=t.getIndex(),h=this._geometryInfo[e];if(s&&u.count>h.reservedIndexCount||t.attributes.position.count>h.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const d=h.vertexStart,g=h.reservedVertexCount;h.vertexCount=t.getAttribute("position").count;for(const y in n.attributes){const v=t.getAttribute(y),x=n.getAttribute(y);jR(v,x,d);const S=v.itemSize;for(let M=v.count,w=g;M<w;M++){const C=d+M;for(let E=0;E<S;E++)x.setComponent(C,E,0)}x.needsUpdate=!0,x.addUpdateRange(d*S,g*S)}if(s){const y=h.indexStart,v=h.reservedIndexCount;h.indexCount=t.getIndex().count;for(let x=0;x<u.count;x++)o.setX(y+x,d+u.getX(x));for(let x=u.count,S=v;x<S;x++)o.setX(y+x,d);o.needsUpdate=!0,o.addUpdateRange(y,h.reservedIndexCount)}return h.start=s?h.indexStart:h.vertexStart,h.count=s?h.indexCount:h.vertexCount,h.boundingBox=null,t.boundingBox!==null&&(h.boundingBox=t.boundingBox.clone()),h.boundingSphere=null,t.boundingSphere!==null&&(h.boundingSphere=t.boundingSphere.clone()),this._visibilityChanged=!0,e}deleteGeometry(e){const t=this._geometryInfo;if(e>=t.length||t[e].active===!1)return this;const n=this._instanceInfo;for(let s=0,o=n.length;s<o;s++)n[s].active&&n[s].geometryIndex===e&&this.deleteInstance(s);return t[e].active=!1,this._availableGeometryIds.push(e),this._visibilityChanged=!0,this}deleteInstance(e){return this.validateInstanceId(e),this._instanceInfo[e].active=!1,this._availableInstanceIds.push(e),this._visibilityChanged=!0,this}optimize(){let e=0,t=0;const n=this._geometryInfo,s=n.map((u,h)=>h).sort((u,h)=>n[u].vertexStart-n[h].vertexStart),o=this.geometry;for(let u=0,h=n.length;u<h;u++){const d=s[u],g=n[d];if(g.active!==!1){if(o.index!==null){if(g.indexStart!==t){const{indexStart:y,vertexStart:v,reservedIndexCount:x}=g,S=o.index,M=S.array,w=e-v;for(let C=y;C<y+x;C++)M[C]=M[C]+w;S.array.copyWithin(t,y,y+x),S.addUpdateRange(t,x),S.needsUpdate=!0,g.indexStart=t}t+=g.reservedIndexCount}if(g.vertexStart!==e){const{vertexStart:y,reservedVertexCount:v}=g,x=o.attributes;for(const S in x){const M=x[S],{array:w,itemSize:C}=M;w.copyWithin(e*C,y*C,(y+v)*C),M.addUpdateRange(e*C,v*C),M.needsUpdate=!0}g.vertexStart=e}e+=g.reservedVertexCount,g.start=o.index?g.indexStart:g.vertexStart,this._nextIndexStart=o.index?g.indexStart+g.reservedIndexCount:0,this._nextVertexStart=g.vertexStart+g.reservedVertexCount}}return this._visibilityChanged=!0,this}getBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;const n=this.geometry,s=this._geometryInfo[e];if(s.boundingBox===null){const o=new Rs,u=n.index,h=n.attributes.position;for(let d=s.start,g=s.start+s.count;d<g;d++){let y=d;u&&(y=u.getX(y)),o.expandByPoint(dm.fromBufferAttribute(h,y))}s.boundingBox=o}return t.copy(s.boundingBox),t}getBoundingSphereAt(e,t){if(e>=this._geometryCount)return null;const n=this.geometry,s=this._geometryInfo[e];if(s.boundingSphere===null){const o=new vs;this.getBoundingBoxAt(e,mv),mv.getCenter(o.center);const u=n.index,h=n.attributes.position;let d=0;for(let g=s.start,y=s.start+s.count;g<y;g++){let v=g;u&&(v=u.getX(v)),dm.fromBufferAttribute(h,v),d=Math.max(d,o.center.distanceToSquared(dm))}o.radius=Math.sqrt(d),s.boundingSphere=o}return t.copy(s.boundingSphere),t}setMatrixAt(e,t){this.validateInstanceId(e);const n=this._matricesTexture,s=this._matricesTexture.image.data;return t.toArray(s,e*16),n.needsUpdate=!0,this}getMatrixAt(e,t){return this.validateInstanceId(e),t.fromArray(this._matricesTexture.image.data,e*16)}setColorAt(e,t){return this.validateInstanceId(e),this._colorsTexture===null&&this._initColorsTexture(),t.toArray(this._colorsTexture.image.data,e*4),this._colorsTexture.needsUpdate=!0,this}getColorAt(e,t){return this.validateInstanceId(e),t.fromArray(this._colorsTexture.image.data,e*4)}setVisibleAt(e,t){return this.validateInstanceId(e),this._instanceInfo[e].visible===t?this:(this._instanceInfo[e].visible=t,this._visibilityChanged=!0,this)}getVisibleAt(e){return this.validateInstanceId(e),this._instanceInfo[e].visible}setGeometryIdAt(e,t){return this.validateInstanceId(e),this.validateGeometryId(t),this._instanceInfo[e].geometryIndex=t,this}getGeometryIdAt(e){return this.validateInstanceId(e),this._instanceInfo[e].geometryIndex}getGeometryRangeAt(e,t={}){this.validateGeometryId(e);const n=this._geometryInfo[e];return t.vertexStart=n.vertexStart,t.vertexCount=n.vertexCount,t.reservedVertexCount=n.reservedVertexCount,t.indexStart=n.indexStart,t.indexCount=n.indexCount,t.reservedIndexCount=n.reservedIndexCount,t.start=n.start,t.count=n.count,t}setInstanceCount(e){const t=this._availableInstanceIds,n=this._instanceInfo;for(t.sort(Px);t[t.length-1]===n.length-1;)n.pop(),t.pop();if(e<n.length)throw new Error(`BatchedMesh: Instance ids outside the range ${e} are being used. Cannot shrink instance count.`);const s=new Int32Array(e),o=new Int32Array(e);qu(this._multiDrawCounts,s),qu(this._multiDrawStarts,o),this._multiDrawCounts=s,this._multiDrawStarts=o,this._maxInstanceCount=e;const u=this._indirectTexture,h=this._matricesTexture,d=this._colorsTexture;u.dispose(),this._initIndirectTexture(),qu(u.image.data,this._indirectTexture.image.data),h.dispose(),this._initMatricesTexture(),qu(h.image.data,this._matricesTexture.image.data),d&&(d.dispose(),this._initColorsTexture(),qu(d.image.data,this._colorsTexture.image.data))}setGeometrySize(e,t){const n=[...this._geometryInfo].filter(h=>h.active);if(Math.max(...n.map(h=>h.vertexStart+h.reservedVertexCount))>e)throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${t}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...n.map(d=>d.indexStart+d.reservedIndexCount))>t)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`);const o=this.geometry;o.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new rn,this._initializeGeometry(o));const u=this.geometry;o.index&&qu(o.index.array,u.index.array);for(const h in o.attributes)qu(o.attributes[h].array,u.attributes[h].array)}raycast(e,t){const n=this._instanceInfo,s=this._geometryInfo,o=this.matrixWorld,u=this.geometry;ir.material=this.material,ir.geometry.index=u.index,ir.geometry.attributes=u.attributes,ir.geometry.boundingBox===null&&(ir.geometry.boundingBox=new Rs),ir.geometry.boundingSphere===null&&(ir.geometry.boundingSphere=new vs);for(let h=0,d=n.length;h<d;h++){if(!n[h].visible||!n[h].active)continue;const g=n[h].geometryIndex,y=s[g];ir.geometry.setDrawRange(y.start,y.count),this.getMatrixAt(h,ir.matrixWorld).premultiply(o),this.getBoundingBoxAt(g,ir.geometry.boundingBox),this.getBoundingSphereAt(g,ir.geometry.boundingSphere),ir.raycast(e,gv);for(let v=0,x=gv.length;v<x;v++){const S=gv[v];S.object=this,S.batchId=h,t.push(S)}gv.length=0}ir.material=null,ir.geometry.index=null,ir.geometry.attributes={},ir.geometry.setDrawRange(0,1/0)}copy(e){return super.copy(e),this.geometry=e.geometry.clone(),this.perObjectFrustumCulled=e.perObjectFrustumCulled,this.sortObjects=e.sortObjects,this.boundingBox=e.boundingBox!==null?e.boundingBox.clone():null,this.boundingSphere=e.boundingSphere!==null?e.boundingSphere.clone():null,this._geometryInfo=e._geometryInfo.map(t=>({...t,boundingBox:t.boundingBox!==null?t.boundingBox.clone():null,boundingSphere:t.boundingSphere!==null?t.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(t=>({...t})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,n,s,o){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const u=s.getIndex(),h=u===null?1:u.array.BYTES_PER_ELEMENT,d=this._instanceInfo,g=this._multiDrawStarts,y=this._multiDrawCounts,v=this._geometryInfo,x=this.perObjectFrustumCulled,S=this._indirectTexture,M=S.image.data,w=n.isArrayCamera?ZR:bM;x&&!n.isArrayCamera&&(Xr.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),bM.setFromProjectionMatrix(Xr,n.coordinateSystem,n.reversedDepth));let C=0;if(this.sortObjects){Xr.copy(this.matrixWorld).invert(),dm.setFromMatrixPosition(n.matrixWorld).applyMatrix4(Xr),MM.set(0,0,-1).transformDirection(n.matrixWorld).transformDirection(Xr);for(let D=0,U=d.length;D<U;D++)if(d[D].visible&&d[D].active){const z=d[D].geometryIndex;this.getMatrixAt(D,Xr),this.getBoundingSphereAt(z,Yu).applyMatrix4(Xr);let P=!1;if(x&&(P=!w.intersectsSphere(Yu,n)),!P){const X=v[z],k=QR.subVectors(Yu.center,dm).dot(MM);zx.push(X.start,X.count,k,D)}}const E=zx.list,B=this.customSort;B===null?E.sort(o.transparent?YR:JR):B.call(this,E,n);for(let D=0,U=E.length;D<U;D++){const z=E[D];g[C]=z.start*h,y[C]=z.count,M[C]=z.index,C++}zx.reset()}else for(let E=0,B=d.length;E<B;E++)if(d[E].visible&&d[E].active){const D=d[E].geometryIndex;let U=!1;if(x&&(this.getMatrixAt(E,Xr),this.getBoundingSphereAt(D,Yu).applyMatrix4(Xr),U=!w.intersectsSphere(Yu,n)),!U){const z=v[D];g[C]=z.start*h,y[C]=z.count,M[C]=E,C++}}S.needsUpdate=!0,this._multiDrawCount=C,this._visibilityChanged=!1}onBeforeShadow(e,t,n,s,o,u){this.onBeforeRender(e,null,s,o,u)}}class rr extends ys{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Tt(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const Uy=new K,Ny=new K,EM=new jt,pm=new Cd,vv=new vs,Gx=new K,TM=new K;class Hl extends Gn{constructor(e=new rn,t=new rr){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[0];for(let s=1,o=t.count;s<o;s++)Uy.fromBufferAttribute(t,s-1),Ny.fromBufferAttribute(t,s),n[s]=n[s-1],n[s]+=Uy.distanceTo(Ny);e.setAttribute("lineDistance",new Nt(n,1))}else Mt("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,s=this.matrixWorld,o=e.params.Line.threshold,u=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),vv.copy(n.boundingSphere),vv.applyMatrix4(s),vv.radius+=o,e.ray.intersectsSphere(vv)===!1)return;EM.copy(s).invert(),pm.copy(e.ray).applyMatrix4(EM);const h=o/((this.scale.x+this.scale.y+this.scale.z)/3),d=h*h,g=this.isLineSegments?2:1,y=n.index,x=n.attributes.position;if(y!==null){const S=Math.max(0,u.start),M=Math.min(y.count,u.start+u.count);for(let w=S,C=M-1;w<C;w+=g){const E=y.getX(w),B=y.getX(w+1),D=yv(this,e,pm,d,E,B,w);D&&t.push(D)}if(this.isLineLoop){const w=y.getX(M-1),C=y.getX(S),E=yv(this,e,pm,d,w,C,M-1);
vendor: 6,109 bytes, line 76
76E&&t.push(E)}}else{const S=Math.max(0,u.start),M=Math.min(x.count,u.start+u.count);for(let w=S,C=M-1;w<C;w+=g){const E=yv(this,e,pm,d,w,w+1,w);E&&t.push(E)}if(this.isLineLoop){const w=yv(this,e,pm,d,M-1,S,M-1);w&&t.push(w)}}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const s=t[n[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,u=s.length;o<u;o++){const h=s[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[h]=o}}}}}function yv(a,e,t,n,s,o,u){const h=a.geometry.attributes.position;if(Uy.fromBufferAttribute(h,s),Ny.fromBufferAttribute(h,o),t.distanceSqToSegment(Uy,Ny,Gx,TM)>n)return;Gx.applyMatrix4(a.matrixWorld);const g=e.ray.origin.distanceTo(Gx);if(!(g<e.near||g>e.far))return{distance:g,point:TM.clone().applyMatrix4(a.matrixWorld),index:u,face:null,faceIndex:null,barycoord:null,object:a}}const CM=new K,wM=new K;class mo extends Hl{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[];for(let s=0,o=t.count;s<o;s+=2)CM.fromBufferAttribute(t,s),wM.fromBufferAttribute(t,s+1),n[s]=s===0?0:n[s-1],n[s+1]=n[s]+CM.distanceTo(wM);e.setAttribute("lineDistance",new Nt(n,1))}else Mt("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class pS extends Hl{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class u_ extends ys{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new Tt(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const RM=new jt,RA=new Cd,_v=new vs,xv=new K;class mS extends Gn{constructor(e=new rn,t=new u_){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,s=this.matrixWorld,o=e.params.Points.threshold,u=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),_v.copy(n.boundingSphere),_v.applyMatrix4(s),_v.radius+=o,e.ray.intersectsSphere(_v)===!1)return;RM.copy(s).invert(),RA.copy(e.ray).applyMatrix4(RM);const h=o/((this.scale.x+this.scale.y+this.scale.z)/3),d=h*h,g=n.index,v=n.attributes.position;if(g!==null){const x=Math.max(0,u.start),S=Math.min(g.count,u.start+u.count);for(let M=x,w=S;M<w;M++){const C=g.getX(M);xv.fromBufferAttribute(v,C),BM(xv,C,d,s,e,t,this)}}else{const x=Math.max(0,u.start),S=Math.min(v.count,u.start+u.count);for(let M=x,w=S;M<w;M++)xv.fromBufferAttribute(v,M),BM(xv,M,d,s,e,t,this)}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const s=t[n[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,u=s.length;o<u;o++){const h=s[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[h]=o}}}}}function BM(a,e,t,n,s,o,u){const h=RA.distanceSqToPoint(a);if(h<t){const d=new K;RA.closestPointToPoint(a,d),d.applyMatrix4(n);const g=s.ray.origin.distanceTo(d);if(g<s.near||g>s.far)return;o.push({distance:g,distanceToRay:Math.sqrt(h),point:d,index:e,face:null,faceIndex:null,barycoord:null,object:u})}}class JE extends ei{constructor(e,t,n,s,o=Un,u=Un,h,d,g){super(e,t,n,s,o,u,h,d,g),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;const y=this;function v(){y.needsUpdate=!0,y._requestVideoFrameCallbackId=e.requestVideoFrameCallback(v)}"requestVideoFrameCallback"in e&&(this._requestVideoFrameCallbackId=e.requestVideoFrameCallback(v))}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)}dispose(){this._requestVideoFrameCallbackId!==0&&(this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),this._requestVideoFrameCallbackId=0),super.dispose()}}class $R extends JE{constructor(e,t,n,s,o,u,h,d){super({},e,t,n,s,o,u,h,d),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}}class eB extends ei{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=Xi,this.minFilter=Xi,this.generateMipmaps=!1,this.needsUpdate=!0}}class f_ extends ei{constructor(e,t,n,s,o,u,h,d,g,y,v,x){super(null,u,h,d,g,y,s,o,v,x),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class tB extends f_{constructor(e,t,n,s,o,u){super(e,t,n,o,u),this.isCompressedArrayTexture=!0,this.image.depth=s,this.wrapR=Fi,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class nB extends f_{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,ho),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class iB extends ei{constructor(e,t,n,s,o,u,h,d,g){super(e,t,n,s,o,u,h,d,g),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Sd extends ei{constructor(e,t,n=ia,s,o,u,h=Xi,d=Xi,g,y=Qo,v=1){if(y!==Qo&&y!==Vc)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const x={width:e,height:t,depth:v};super(x,s,o,u,h,d,y,n,g),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new Xc(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}class YE extends Sd{constructor(e,t=ia,n=ho,s,o,u=Xi,h=Xi,d,g=Qo
vendor: 4,157 bytes, line 76
76){const y={width:e,height:e,depth:1},v=[y,y,y,y,y,y];super(e,e,t,n,s,o,u,h,d,g),this.image=v,this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(e){this.image=e}}class gS extends ei{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}}class h_ extends rn{constructor(e=1,t=1,n=4,s=8,o=1){super(),this.type="CapsuleGeometry",this.parameters={radius:e,height:t,capSegments:n,radialSegments:s,heightSegments:o},t=Math.max(0,t),n=Math.max(1,Math.floor(n)),s=Math.max(3,Math.floor(s)),o=Math.max(1,Math.floor(o));const u=[],h=[],d=[],g=[],y=t/2,v=Math.PI/2*e,x=t,S=2*v+x,M=n*2+o,w=s+1,C=new K,E=new K;for(let B=0;B<=M;B++){let D=0,U=0,z=0,P=0;if(B<=n){const I=B/n,O=I*Math.PI/2;U=-y-e*Math.cos(O),z=e*Math.sin(O),P=-e*Math.cos(O),D=I*v}else if(B<=n+o){const I=(B-n)/o;U=-y+I*t,z=e,P=0,D=v+I*x}else{const I=(B-n-o)/n,O=I*Math.PI/2;U=y+e*Math.sin(O),z=e*Math.cos(O),P=e*Math.sin(O),D=v+x+I*v}const X=Math.max(0,Math.min(1,D/S));let k=0;B===0?k=.5/s:B===M&&(k=-.5/s);for(let I=0;I<=s;I++){const O=I/s,q=O*Math.PI*2,ie=Math.sin(q),j=Math.cos(q);E.x=-z*j,E.y=U,E.z=z*ie,h.push(E.x,E.y,E.z),C.set(-z*j,P,z*ie),C.normalize(),d.push(C.x,C.y,C.z),g.push(O+k,X)}if(B>0){const I=(B-1)*w;for(let O=0;O<s;O++){const q=I+O,ie=I+O+1,j=B*w+O,re=B*w+O+1;u.push(q,ie,j),u.push(ie,re,j)}}}this.setIndex(u),this.setAttribute("position",new Nt(h,3)),this.setAttribute("normal",new Nt(d,3)),this.setAttribute("uv",new Nt(g,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new h_(e.radius,e.height,e.capSegments,e.radialSegments,e.heightSegments)}}class d_ extends rn{constructor(e=1,t=32,n=0,s=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:s},t=Math.max(3,t);const o=[],u=[],h=[],d=[],g=new K,y=new We;u.push(0,0,0),h.push(0,0,1),d.push(.5,.5);for(let v=0,x=3;v<=t;v++,x+=3){const S=n+v/t*s;g.x=e*Math.cos(S),g.y=e*Math.sin(S),u.push(g.x,g.y,g.z),h.push(0,0,1),y.x=(u[x]/e+1)/2,y.y=(u[x+1]/e+1)/2,d.push(y.x,y.y)}for(let v=1;v<=t;v++)o.push(v,v+1,0);this.setIndex(o),this.setAttribute("position",new Nt(u,3)),this.setAttribute("normal",new Nt(h,3)),this.setAttribute("uv",new Nt(d,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new d_(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class tg extends rn{constructor(e=1,t=1,n=1,s=32,o=1,u=!1,h=0,d=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:s,heightSegments:o,openEnded:u,thetaStart:h,thetaLength:d};const g=this;s=Math.floor(s),o=Math.floor(o);const y=[],v=[],x=[],S=[];let M=0;const w=[],C=n/2;let E=0;B(),u===!1&&(e>0&&D(!0),t>0&&D(!1)),this.setIndex(y),this.setAttribute("position",new Nt(v,3)),this.setAttribute("normal",new Nt(x,3)),this.setAttribute("uv",new Nt(S,2));function B(){const U=new K,z=new K;let P=0;const X=(t-e)/n;for(let k=0;k<=o;k++){const I=[],O=k/o,q=O*(t-e)+e;for(let ie=0;ie<=s;ie++){const j=ie/s,re=j*d+h,fe=Math.sin(re),Y=Math.cos(re);z.x=q*fe,z.y=-O*n+C,z.z=q*Y,v.push(z.x,z.y,z.z),U.set(fe,X,Y).normalize(),x.push(U.x,U.y,U.z),S.push(j,1-O),I.push(M++)}w.push(I)}for(let k=0;k<s;k++)for(let I=0;I<o;I++){const O=w[I][k],q=w[I+1][k],ie=w[I+1][k+1],j=w[I][k+1];(e>0||I!==0)&&(y.push(O,q,j),P+=3),(t>0||I!==o-1)&&(y.push(q,ie,j),P+=3)}g.addGroup(E,P,0),E+=P}function D(U){const z=M,P=new We,X=new K;let k=0;const I=U===!0?e:t,O=U===!0?1:-1;for(let ie=1;ie<=s;ie++)v.push(0,C*O,0),x.push(0,O,0),S.push(.5,.5),M++;const q=M;for(let ie=0;ie<=s;ie++){const re=ie/s*d+h,fe=Math.cos(re),Y=Math.sin(re);X.x=I*Y,X.y=C*O,X.z=I*fe,v.push(X.x,X.y,X.z),x.push(0,O,0),P.x=fe*.5+.5,P.y=Y*.5*O+.5,S.push(P.x,P.y),M++}for(let ie=0;ie<s;ie++){const j=z+ie,re=q+ie;U===!0?y.push(re,re+1,j):y.push(re+1,re,j),k+=3}g.addGroup(E,k,U===!0?1:2),E+=k}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new tg(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.o
vendor: 10,131 bytes, line 76
76penEnded,e.thetaStart,e.thetaLength)}}class ng extends tg{constructor(e=1,t=1,n=32,s=1,o=!1,u=0,h=Math.PI*2){super(0,e,t,n,s,o,u,h),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:s,openEnded:o,thetaStart:u,thetaLength:h}}static fromJSON(e){return new ng(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class eu extends rn{constructor(e=[],t=[],n=1,s=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:s};const o=[],u=[];h(s),g(n),y(),this.setAttribute("position",new Nt(o,3)),this.setAttribute("normal",new Nt(o.slice(),3)),this.setAttribute("uv",new Nt(u,2)),s===0?this.computeVertexNormals():this.normalizeNormals();function h(B){const D=new K,U=new K,z=new K;for(let P=0;P<t.length;P+=3)S(t[P+0],D),S(t[P+1],U),S(t[P+2],z),d(D,U,z,B)}function d(B,D,U,z){const P=z+1,X=[];for(let k=0;k<=P;k++){X[k]=[];const I=B.clone().lerp(U,k/P),O=D.clone().lerp(U,k/P),q=P-k;for(let ie=0;ie<=q;ie++)ie===0&&k===P?X[k][ie]=I:X[k][ie]=I.clone().lerp(O,ie/q)}for(let k=0;k<P;k++)for(let I=0;I<2*(P-k)-1;I++){const O=Math.floor(I/2);I%2===0?(x(X[k][O+1]),x(X[k+1][O]),x(X[k][O])):(x(X[k][O+1]),x(X[k+1][O+1]),x(X[k+1][O]))}}function g(B){const D=new K;for(let U=0;U<o.length;U+=3)D.x=o[U+0],D.y=o[U+1],D.z=o[U+2],D.normalize().multiplyScalar(B),o[U+0]=D.x,o[U+1]=D.y,o[U+2]=D.z}function y(){const B=new K;for(let D=0;D<o.length;D+=3){B.x=o[D+0],B.y=o[D+1],B.z=o[D+2];const U=C(B)/2/Math.PI+.5,z=E(B)/Math.PI+.5;u.push(U,1-z)}M(),v()}function v(){for(let B=0;B<u.length;B+=6){const D=u[B+0],U=u[B+2],z=u[B+4],P=Math.max(D,U,z),X=Math.min(D,U,z);P>.9&&X<.1&&(D<.2&&(u[B+0]+=1),U<.2&&(u[B+2]+=1),z<.2&&(u[B+4]+=1))}}function x(B){o.push(B.x,B.y,B.z)}function S(B,D){const U=B*3;D.x=e[U+0],D.y=e[U+1],D.z=e[U+2]}function M(){const B=new K,D=new K,U=new K,z=new K,P=new We,X=new We,k=new We;for(let I=0,O=0;I<o.length;I+=9,O+=6){B.set(o[I+0],o[I+1],o[I+2]),D.set(o[I+3],o[I+4],o[I+5]),U.set(o[I+6],o[I+7],o[I+8]),P.set(u[O+0],u[O+1]),X.set(u[O+2],u[O+3]),k.set(u[O+4],u[O+5]),z.copy(B).add(D).add(U).divideScalar(3);const q=C(z);w(P,O+0,B,q),w(X,O+2,D,q),w(k,O+4,U,q)}}function w(B,D,U,z){z<0&&B.x===1&&(u[D]=B.x-1),U.x===0&&U.z===0&&(u[D]=z/2/Math.PI+.5)}function C(B){return Math.atan2(B.z,-B.x)}function E(B){return Math.atan2(-B.y,Math.sqrt(B.x*B.x+B.z*B.z))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new eu(e.vertices,e.indices,e.radius,e.detail)}}class p_ extends eu{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,s=1/n,o=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-s,-n,0,-s,n,0,s,-n,0,s,n,-s,-n,0,-s,n,0,s,-n,0,s,n,0,-n,0,-s,n,0,-s,-n,0,s,n,0,s],u=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(o,u,e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new p_(e.radius,e.detail)}}const Av=new K,Sv=new K,Hx=new K,bv=new Jr;class qE extends rn{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},e!==null){const s=Math.pow(10,4),o=Math.cos(gf*t),u=e.getIndex(),h=e.getAttribute("position"),d=u?u.count:h.count,g=[0,0,0],y=["a","b","c"],v=new Array(3),x={},S=[];for(let M=0;M<d;M+=3){u?(g[0]=u.getX(M),g[1]=u.getX(M+1),g[2]=u.getX(M+2)):(g[0]=M,g[1]=M+1,g[2]=M+2);const{a:w,b:C,c:E}=bv;if(w.fromBufferAttribute(h,g[0]),C.fromBufferAttribute(h,g[1]),E.fromBufferAttribute(h,g[2]),bv.getNormal(Hx),v[0]=`${Math.round(w.x*s)},${Math.round(w.y*s)},${Math.round(w.z*s)}`,v[1]=`${Math.round(C.x*s)},${Math.round(C.y*s)},${Math.round(C.z*s)}`,v[2]=`${Math.round(E.x*s)},${Math.round(E.y*s)},${Math.round(E.z*s)}`,!(v[0]===v[1]||v[1]===v[2]||v[2]===v[0]))for(let B=0;B<3;B++){const D=(B+1)%3,U=v[B],z=v[D],P=bv[y[B]],X=bv[y[D]],k=`${U}_${z}`,I=`${z}_${U}`;I in x&&x[I]?(Hx.dot(x[I].normal)<=o&&(S.push(P.x,P.y,P.z),S.push(X.x,X.y,X.z)),x[I]=null):k in x||(x[k]={index0:g[B],index1:g[D],normal:Hx.clone()})}}for(const M in x)if(x[M]){const{index0:w,index1:C}=x[M];Av.fromBufferAttribute(h,w),Sv.fromBufferAttribute(h,C),S.push(Av.x,Av.y,Av.z),S.push(Sv.x,Sv.y,Sv.z)}this.setAttribute("position",new Nt(S,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class go{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){Mt("Curve: .getPoint() not implemented.")}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,s=this.getPoint(0),o=0;t.push(0);for(let u=1;u<=e;u++)n=this.getPoint(u/e),o+=n.distanceTo(s),t.push(o),s=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t=null){const n=this.getLengths();let s=0;const o=n.length;let u;t?u=t:u=e*n[o-1];let h=0,d=o-1,g;for(;h<=d;)if(s=Math.floor(h+(d-h)/2),g=n[s]-u,g<0)h=s+1;else if(g>0)d=s-1;else{d=s;break}if(s=d,n[s]===u)return s/(o-1);const y=n[s],x=n[s+1]-y,S=(u-y)/x;return(s+S)/(o-1)}getTangent(e,t){let s=e-1e-4,o=e+1e-4;s<0&&(s=0),o>1&&(o=1);const u=this.getPoint(s),h=this.getPoint(o),d=t||(u.isVector2?new We:new K);return d.copy(h).sub(u).normalize(),d}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t=!1){const n=new K,s=[],o=[],u=[],h=new K,d=new jt;for(let S=0;S<=e;S++){const M=S/e;s[S]=this.getTangentAt(M,new K)}o[0]=new K,u[0]=new K;let g=Number.MAX_VALUE;const y=Math.abs(s[0].x),v=Math.abs(s[0].y),x=Math.abs(s[0].z);y<=g&&(g=y,n.set(1,0,0)),v<=g&&(g=v,n.set(0,1,0)),x<=g&&n.set(0,0,1),h.crossVectors(s[0],n).normalize(),o[0].crossVectors(s[0],h),u[0].crossVectors(s[0],o[0]);for(let S=1;S<=e;S++){if(o[S]=o[S-1].clone(),u[S]=u[S-1].clone(),h.crossVectors(s[S-1],s[S]),h.length()>Number.EPSILON){h.normalize();const M=Math.acos(nn(s[S-1].dot(s[S]),-1,1));o[S].applyMatrix4(d.makeRotationAxis(h,M))}u[S].crossVectors(s[S],o[S])}if(t===!0){let S=Math.acos(nn(o[0].dot(o[e]),-1,1));S/=e,s[0].dot(h.crossVectors(o[0],o[e]))>0&&(S=-S);for(let M=1;M<=e;M++)o[M].applyMatrix4(d.makeRotationAxis(s[M],S*M)),u[M].crossVectors(s[M],o[M])}return{tangents:s,normals:o,binormals:u}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class m_ extends go{constructor(e=0,t=0,n=1,s=1,o=0,u=Math.PI*2,h=!1,d=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=s,this.aStartAngle=o,this.aEndAngle=u,this.aClockwise=h,this.aRotation=d}getPoint(e,t=new We){const n=t,s=Math.PI*2;let o=this.aEndAngle-this.aStartAngle;const u=Math.abs(o)<Number.EPSILON;for(;o<0;)o+=s;for(;o>s;)o-=s;o<Number.EPSILON&&(u?o=0:o=s),this.aClockwise===!0&&!u&&(o===s?o=-s:o=o-s);const h=this.aStartAngle+e*o;let d=this.aX+this.xRadius*Math.cos(h),g=this.aY+this.yRadius*Math.sin(h);if(this.aRotation!==0){const y=Math.cos(this.aRotation),v=Math.sin(this.aRotation),x=d-this.aX,S=g-this.aY;d=x*y-S*v+this.aX,g=x*v+S*y+this.aY}return n.set(d,g)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class KE extends m_{constructor(e,t,n,s,o,u){super(e,t,n,n,s,o,u),this.isArcCurve=!0,this.type="ArcCurve"}}function vS(){let a=0,e=0,t=0,n=0;function s(o,u,h,d){a=o,e=h,t=-3*o+3*u-2*h-d,n=2*o-2*u+h+d}return{initCatmullRom:function(o,u,h,d,g){s(u,h,g*(h-o),g*(d-u))},initNonuniformCatmullRom:function(o,u,h,d,g,y,v){let x=(u-o)/g-(h-o)/(g+y)+(h-u)/y,S=(h-u)/y-(d-u)/(y+v)+(d-h)/v;x*=y,S*=y,s(u,h,x,S)},calc:function(o){const u=o*o,h=u*o;return a+e*o+t*u+n*h}}}const Mv=new K,kx=new vS,Vx=new vS,Xx=new vS;class ZE extends go{constructor(e=[],t=!1,n="centripetal",s=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=s}getPoint(e,t=new K){const n=t,s=this.points,o=s.length,u=(o-(this.closed?0:1))*e;let h=Math.floor(u),d=u-h;this.closed?h+=h>0?0:(Math.floor(Math.abs(h)/o)+1)*o:d===0&&h===o-1&&(h=o-2,d=1);let g,y;this.closed||h>0?g=s[(h-1)%o]:(Mv.subVectors(s[0],s[1]).add(s[0]),g=Mv);const v=s[h%o],x=s[(h+1)%o];if(this.closed||h+2<o?y=s[(h+2)%o]:(Mv.subVectors(s[o-1],s[o-2]).add(s[o-1]),y=Mv),this.curveType==="centripetal"||this.curveType==="chordal"){const S=this.curveType==="chordal"?.5:.25;let M=Math.pow(g.distanceToSquared(v),S),w=Math.pow(v.distanceToSquared(x),S),C=Math.pow(x.distanceToSquared(y),S);w<1e-4&&(w=1),M<1e-4&&(M=w),C<1e-4&&(C=w),kx.initNonuniformCatmullRom(g.x,v.x,x.x,y.x,M,w,C),Vx.initNonuniformCatmullRom(g.y,v.y,x.y,y.y,M,w,C),Xx.initNonuniformCatmullRom(g.z,v.z,x.z,y.z,M,w,C)}else this.curveType==="catmullrom"&&(kx.initCatmullRom(g.x,v.x,x.x,y.x,this.tension),Vx.init
vendor: 16,913 bytes, line 76
76CatmullRom(g.y,v.y,x.y,y.y,this.tension),Xx.initCatmullRom(g.z,v.z,x.z,y.z,this.tension));return n.set(kx.calc(d),Vx.calc(d),Xx.calc(d)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const s=e.points[t];this.points.push(s.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const s=this.points[t];e.points.push(s.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const s=e.points[t];this.points.push(new K().fromArray(s))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function DM(a,e,t,n,s){const o=(n-e)*.5,u=(s-t)*.5,h=a*a,d=a*h;return(2*t-2*n+o+u)*d+(-3*t+3*n-2*o-u)*h+o*a+t}function sB(a,e){const t=1-a;return t*t*e}function rB(a,e){return 2*(1-a)*a*e}function aB(a,e){return a*a*e}function Rm(a,e,t,n){return sB(a,e)+rB(a,t)+aB(a,n)}function oB(a,e){const t=1-a;return t*t*t*e}function lB(a,e){const t=1-a;return 3*t*t*a*e}function cB(a,e){return 3*(1-a)*a*a*e}function uB(a,e){return a*a*a*e}function Bm(a,e,t,n,s){return oB(a,e)+lB(a,t)+cB(a,n)+uB(a,s)}class yS extends go{constructor(e=new We,t=new We,n=new We,s=new We){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=s}getPoint(e,t=new We){const n=t,s=this.v0,o=this.v1,u=this.v2,h=this.v3;return n.set(Bm(e,s.x,o.x,u.x,h.x),Bm(e,s.y,o.y,u.y,h.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class QE extends go{constructor(e=new K,t=new K,n=new K,s=new K){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=s}getPoint(e,t=new K){const n=t,s=this.v0,o=this.v1,u=this.v2,h=this.v3;return n.set(Bm(e,s.x,o.x,u.x,h.x),Bm(e,s.y,o.y,u.y,h.y),Bm(e,s.z,o.z,u.z,h.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class _S extends go{constructor(e=new We,t=new We){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new We){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new We){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class jE extends go{constructor(e=new K,t=new K){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new K){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new K){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class xS extends go{constructor(e=new We,t=new We,n=new We){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new We){const n=t,s=this.v0,o=this.v1,u=this.v2;return n.set(Rm(e,s.x,o.x,u.x),Rm(e,s.y,o.y,u.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class AS extends go{constructor(e=new K,t=new K,n=new K){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new K){const n=t,s=this.v0,o=this.v1,u=this.v2;return n.set(Rm(e,s.x,o.x,u.x),Rm(e,s.y,o.y,u.y),Rm(e,s.z,o.z,u.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class SS extends go{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new We){const n=t,s=this.points,o=(s.length-1)*e,u=Math.floor(o),h=o-u,d=s[u===0?u:u-1],g=s[u],y=s[u>s.length-2?s.length-1:u+1],v=s[u>s.length-3?s.length-1:u+2];return n.set(DM(h,d.x,g.x,y.x,v.x),DM(h,d.y,g.y,y.y,v.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const s=e.points[t];this.points.push(s.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const s=this.points[t];e.points.push(s.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const s=e.points[t];this.points.push(new We().fromArray(s))}return this}}var Fy=Object.freeze({__proto__:null,ArcCurve:KE,CatmullRomCurve3:ZE,CubicBezierCurve:yS,CubicBezierCurve3:QE,EllipseCurve:m_,LineCurve:_S,LineCurve3:jE,QuadraticBezierCurve:xS,QuadraticBezierCurve3:AS,SplineCurve:SS});class $E extends go{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(t)){const n=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new Fy[n](t,e))}return this}getPoint(e,t){const n=e*this.getLength(),s=this.getCurveLengths();let o=0;for(;o<s.length;){if(s[o]>=n){const u=s[o]-n,h=this.curves[o],d=h.getLength(),g=d===0?0:1-u/d;return h.getPointAt(g,t)}o++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,s=this.curves.length;n<s;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let s=0,o=this.curves;s<o.length;s++){const u=o[s],h=u.isEllipseCurve?e*2:u.isLineCurve||u.isLineCurve3?1:u.isSplineCurve?e*u.points.length:e,d=u.getPoints(h);for(let g=0;g<d.length;g++){const y=d[g];n&&n.equals(y)||(t.push(y),n=y)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const s=e.curves[t];this.curves.push(s.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const s=this.curves[t];e.curves.push(s.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const s=e.curves[t];this.curves.push(new Fy[s.type]().fromJSON(s))}return this}}class Oy extends $E{constructor(e){super(),this.type="Path",this.currentPoint=new We,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new _S(this.currentPoint.clone(),new We(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,s){const o=new xS(this.currentPoint.clone(),new We(e,t),new We(n,s));return this.curves.push(o),this.currentPoint.set(n,s),this}bezierCurveTo(e,t,n,s,o,u){const h=new yS(this.currentPoint.clone(),new We(e,t),new We(n,s),new We(o,u));return this.curves.push(h),this.currentPoint.set(o,u),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new SS(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,s,o,u){const h=this.currentPoint.x,d=this.currentPoint.y;return this.absarc(e+h,t+d,n,s,o,u),this}absarc(e,t,n,s,o,u){return this.absellipse(e,t,n,n,s,o,u),this}ellipse(e,t,n,s,o,u,h,d){const g=this.currentPoint.x,y=this.currentPoint.y;return this.absellipse(e+g,t+y,n,s,o,u,h,d),this}absellipse(e,t,n,s,o,u,h,d){const g=new m_(e,t,n,s,o,u,h,d);if(this.curves.length>0){const v=g.getPoint(0);v.equals(this.currentPoint)||this.lineTo(v.x,v.y)}this.curves.push(g);const y=g.getPoint(1);return this.currentPoint.copy(y),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 vf extends Oy{constructor(e){super(e),this.uuid=na(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,s=this.holes.length;n<s;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const s=e.holes[t];this.holes.push(s.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const s=this.holes[t];e.holes.push(s.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const s=e.holes[t];this.holes.push(new Oy().fromJSON(s))}return this}}function fB(a,e,t=2){const n=e&&e.length,s=n?e[0]*t:a.length;let o=eT(a,0,s,t,!0);const u=[];if(!o||o.next===o.prev)return u;let h,d,g;if(n&&(o=gB(a,e,o,t)),a.length>80*t){h=a[0],d=a[1];let y=h,v=d;for(let x=t;x<s;x+=t){const S=a[x],M=a[x+1];S<h&&(h=S),M<d&&(d=M),S>y&&(y=S),M>v&&(v=M)}g=Math.max(y-h,v-d),g=g!==0?32767/g:0}return zm(o,u,t,h,d,g,0),u}function eT(a,e,t,n,s){let o;if(s===CB(a,e,t,n)>0)for(let u=e;u<t;u+=n)o=IM(u/n|0,a[u],a[u+1],o);else for(let u=t-n;u>=e;u-=n)o=IM(u/n|0,a[u],a[u+1],o);return o&&bd(o,o.next)&&(Hm(o),o=o.next),o}function Af(a,e){if(!a)return a;e||(e=a);let t=a,n;do if(n=!1,!t.steiner&&(bd(t,t.next)||Ni(t.prev,t,t.next)===0)){if(Hm(t),t=e=t.prev,t===t.next)break;n=!0}else t=t.next;while(n||t!==e);return e}function zm(a,e,t,n,s,o,u){if(!a)return;!u&&o&&AB(a,n,s,o);let h=a;for(;a.prev!==a.next;){const d=a.prev,g=a.next;if(o?dB(a,n,s,o):hB(a)){e.push(d.i,a.i,g.i),Hm(a),a=g.next,h=g.next;continue}if(a=g,a===h){u?u===1?(a=pB(Af(a),e),zm(a,e,t,n,s,o,2)):u===2&&mB(a,e,t,n,s,o):zm(Af(a),e,t,n,s,o,1);break}}}function hB(a){const e=a.prev,t=a,n=a.next;if(Ni(e,t,n)>=0)return!1;const s=e.x,o=t.x,u=n.x,h=e.y,d=t.y,g=n.y,y=Math.min(s,o,u),v=Math.min(h,d,g),x=Math.max(s,o,u),S=Math.max(h,d,g);let M=n.next;for(;M!==e;){if(M.x>=y&&M.x<=x&&M.y>=v&&M.y<=S&&Am(s,h,o,d,u,g,M.x,M.y)&&Ni(M.prev,M,M.next)>=0)return!1;M=M.next}return!0}function dB(a,e,t,n){const s=a.prev,o=a,u=a.next;if(Ni(s,o,u)>=0)return!1;const h=s.x,d=o.x,g=u.x,y=s.y,v=o.y,x=u.y,S=Math.min(h,d,g),M=Math.min(y,v,x),w=Math.max(h,d,g),C=Math.max(y,v,x),E=BA(S,M,e,t,n),B=BA(w,C,e,t,n);let D=a.prevZ,U=a.nextZ;for(;D&&D.z>=E&&U&&U.z<=B;){if(D.x>=S&&D.x<=w&&D.y>=M&&D.y<=C&&D!==s&&D!==u&&Am(h,y,d,v,g,x,D.x,D.y)&&Ni(D.prev,D,D.next)>=0||(D=D.prevZ,U.x>=S&&U.x<=w&&U.y>=M&&U.y<=C&&U!==s&&U!==u&&Am(h,y,d,v,g,x,U.x,U.y)&&Ni(U.prev,U,U.next)>=0))return!1;U=U.nextZ}for(;D&&D.z>=E;){if(D.x>=S&&D.x<=w&&D.y>=M&&D.y<=C&&D!==s&&D!==u&&Am(h,y,d,v,g,x,D.x,D.y)&&Ni(D.prev,D,D.next)>=0)return!1;D=D.prevZ}for(;U&&U.z<=B;){if(U.x>=S&&U.x<=w&&U.y>=M&&U.y<=C&&U!==s&&U!==u&&Am(h,y,d,v,g,x,U.x,U.y)&&Ni(U.prev,U,U.next)>=0)return!1;U=U.nextZ}return!0}function pB(a,e){let t=a;do{const n=t.prev,s=t.next.next;!bd(n,s)&&nT(n,t,t.next,s)&&Gm(n,s)&&Gm(s,n)&&(e.push(n.i,t.i,s.i),Hm(t),Hm(t.next),t=a=s),t=t.next}while(t!==a);return Af(t)}function mB(a,e,t,n,s,o){let u=a;do{let h=u.next.next;for(;h!==u.prev;){if(u.i!==h.i&&MB(u,h)){let d=iT(u,h);u=Af(u,u.next),d=Af(d,d.next),zm(u,e,t,n,s,o,0),zm(d,e,t,n,s,o,0);return}h=h.next}u=u.next}while(u!==a)}function gB(a,e,t,n){const s=[];for(let o=0,u=e.length;o<u;o++){const h=e[o]*n,d=o<u-1?e[o+1]*n:a.length,g=eT(a,h,d,n,!1);g===g.next&&(g.steiner=!0),s.push(bB(g))}s.sort(vB);for(let o=0;o<s.length;o++)t=yB(s[o],t);return t}function vB(a,e){let t=a.x-e.x;if(t===0&&(t=a.y-e.y,t===0)){const n=(a.next.y-a.y)/(a.next.x-a.x),s=(e.next.y-e.y)/(e.next.x-e.x);t=n-s}return t}function yB(a,e){const t=_B(a,e);if(!t)return e;const n=iT(t,a);return Af(n,n.next),Af(t,t.next)}function _B(a,e){let t=e;const n=a.x,s=a.y;let o=-1/0,u;if(bd(a,t))return t;do{if(bd(a,t.next))return t.next;if(s<=t.y&&s>=t.next.y&&t.next.y!==t.y){const v=t.x+(s-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(v<=n&&v>o&&(o=v,u=t.x<t.next.x?t:t.next,v===n))return u}t=t.next}while(t!==e);if(!u)return null;const h=u,d=u.x,g=u.y;let y=1/0;t=u;do{if(n>=t.x&&t.x>=d&&n!==t.x&&tT(s<g?n:o,s,d,g,s<g?o:n,s,t.x,t.y)){const v=Math.abs(s-t.y)/(n-t.x);Gm(t,a)&&(v<y||v===y&&(t.x>u.x||t.x===u.x&&xB(u,t)))&&(u=t,y=v)}t=t.next}while(t!==h);return u}function xB(a,e){return Ni(a.prev,a,e.prev)<0&&Ni(e.next,a,a.next)<0}function AB(a,e,t,n){let s=a;do s.z===0&&(s.z=BA(s.x,s.y,e,t,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==a);s.prevZ.nextZ=null,s.prevZ=null,SB(s)}function SB(a){let e,t=1;do{let n=a,s;a=null;let o=null;for(e=0;n;){e++;let u=n,h=0;for(let g=0;g<t&&(h++,u=u.nextZ,!!u);g++);let d=t;for(;h>0||d>0&&u;)h!==0&&(d===0||!u||n.z<=u.z)?(s=n,n=n.nextZ,h--):(s=u,u=u.nextZ,d--),o?o.nextZ=s:a=s,s.prevZ=o,o=s;n=u}o.nextZ=null,t*=2}while(e>1);return a}function BA(a,e,t,n,s){return a=(a-t)*s|0,e=(e-n)*s|0,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,a|e<<1}function bB(a){let e=a,t=a;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==a);return t}function tT(a,e,t,n,s,o,u,h){return(s-u)*(e-h)>=(a-u)*(o-h)&&(a-u)*(n-h)>=(t-u)*(e-h)&&(t-u)*(o-h)>=(s-u)*(n-h)}function Am(a,e,t,n,s,o,u,h){return!(a===u&&e===h)&&tT(a,e,t,n,s,o,u,h)}function MB(a,e){return a.next.i!==e.i&&a.prev.i!==e.i&&!EB(a,e)&&(Gm(a,e)&&Gm(e,a)&&TB(a,e)&&(Ni(a.prev,a,e.prev)||Ni(a,e.prev,e))||bd(a,e)&&Ni(a.prev,a,a.next)>0&&Ni(e.prev,e,e.next)>0)}function Ni(a,e,t){return(e.y-a.y)*(t.x-e.x)-(e.x-a.x)*(t.y-e.y)}function bd(a,e){return a.x===e.x&&a.y===e.y}function nT(a,e,t,n){const s=Tv(Ni(a,e,t)),o=Tv(Ni(a,e,n)),u=Tv(Ni(t,n,a)),h=Tv(Ni(t,n,e));return!!(s!==o&&u!==h||s===0&&Ev(a,t,e)||o===0&&Ev(a,n,e)||u===0&&Ev(t,a,n)||h===0&&Ev(t,e,n))}function Ev(a,e,t){return e.x<=Math.max(a.x,t.x)&&e.x>=Math.min(a.x,t.x)&&e.y<=Math.max(a.y,t.y)&&e.y>=Math.min(a.y,t.y)}function Tv(a){return a>0?1:a<0?-1:0}function EB(a,e){let t=a;do{if(t.i!==a.i&&t.next.i!==a.i&&t.i!==e.i&&t.next.i!==e.i&&nT(t,t.next,a,e))return!0;t=t.next}while(t!==a);return!1}function Gm(a,e){return Ni(a.prev,a,a.next)<0?Ni(a,e,a.next)>=0&&Ni(a,a.prev,e)>=0:Ni(a,e,a.prev)<0||Ni(a,a.next,e)<0}function TB(a,e){let t=a,n=!1;const s=(a.x+e.x)/2,o=(a.y+e.y)/2;do t.y>o!=t.next.y>o&&t.next.y!==t.y&&s<(t.next.x-t.x)*(o-t.y)/(t.next.y-t.y)+t.x&&(n=!n),t=t.next;while(t!==a);return n}function iT(a,e){const t=DA(a.i,a.x,a.y),n=DA(e.i,e.x,e.y),s=a.next,o=e.prev;return a.next=e,e.prev=a,t.next=s,s.prev=t,n.next=t,t.prev=n,o.next=n,n.prev=o,n}function IM(a,e,t,n){const s=DA(a,e,t);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function Hm(a){a.next.prev=a.prev,a.prev.next=a.next,a.prevZ&&(a.prevZ.nextZ=a.nextZ),a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function DA(a,e,t){return{i:a,x:e,y:t,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function CB(a,e,t,n){let s=0;for(let o=e,u=t-n;o<t;o+=n)s+=(a[u]-a[o])*(a[o+1]+a[u+1]),u=o;return s}class wB{static triangulate(e,t,n=2){return fB(e,t,n)}}class uo{static area(e){const t=e.length;let n=0;for(let s=t-1,o=0;o<t;s=o++)n+=e[s].x*e[o].y-e[o].x*e[s].y;return n*.5}static isClockWise(e){return uo.area(e)<0}
vendor: 35,185 bytes, line 76
76static triangulateShape(e,t){const n=[],s=[],o=[];LM(e),UM(n,e);let u=e.length;t.forEach(LM);for(let d=0;d<t.length;d++)s.push(u),u+=t[d].length,UM(n,t[d]);const h=wB.triangulate(n,s);for(let d=0;d<h.length;d+=3)o.push(h.slice(d,d+3));return o}}function LM(a){const e=a.length;e>2&&a[e-1].equals(a[0])&&a.pop()}function UM(a,e){for(let t=0;t<e.length;t++)a.push(e[t].x),a.push(e[t].y)}class g_ extends rn{constructor(e=new vf([new We(.5,.5),new We(-.5,.5),new We(-.5,-.5),new We(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,s=[],o=[];for(let h=0,d=e.length;h<d;h++){const g=e[h];u(g)}this.setAttribute("position",new Nt(s,3)),this.setAttribute("uv",new Nt(o,2)),this.computeVertexNormals();function u(h){const d=[],g=t.curveSegments!==void 0?t.curveSegments:12,y=t.steps!==void 0?t.steps:1,v=t.depth!==void 0?t.depth:1;let x=t.bevelEnabled!==void 0?t.bevelEnabled:!0,S=t.bevelThickness!==void 0?t.bevelThickness:.2,M=t.bevelSize!==void 0?t.bevelSize:S-.1,w=t.bevelOffset!==void 0?t.bevelOffset:0,C=t.bevelSegments!==void 0?t.bevelSegments:3;const E=t.extrudePath,B=t.UVGenerator!==void 0?t.UVGenerator:RB;let D,U=!1,z,P,X,k;if(E){D=E.getSpacedPoints(y),U=!0,x=!1;const Le=E.isCatmullRomCurve3?E.closed:!1;z=E.computeFrenetFrames(y,Le),P=new K,X=new K,k=new K}x||(C=0,S=0,M=0,w=0);const I=h.extractPoints(g);let O=I.shape;const q=I.holes;if(!uo.isClockWise(O)){O=O.reverse();for(let Le=0,Ke=q.length;Le<Ke;Le++){const Oe=q[Le];uo.isClockWise(Oe)&&(q[Le]=Oe.reverse())}}function j(Le){const Oe=10000000000000001e-36;let dt=Le[0];for(let Z=1;Z<=Le.length;Z++){const Ot=Z%Le.length,yt=Le[Ot],Pt=yt.x-dt.x,it=yt.y-dt.y,J=Pt*Pt+it*it,N=Math.max(Math.abs(yt.x),Math.abs(yt.y),Math.abs(dt.x),Math.abs(dt.y)),le=Oe*N*N;if(J<=le){Le.splice(Ot,1),Z--;continue}dt=yt}}j(O),q.forEach(j);const re=q.length,fe=O;for(let Le=0;Le<re;Le++){const Ke=q[Le];O=O.concat(Ke)}function Y(Le,Ke,Oe){return Ke||Vt("ExtrudeGeometry: vec does not exist"),Le.clone().addScaledVector(Ke,Oe)}const $=O.length;function pe(Le,Ke,Oe){let dt,Z,Ot;const yt=Le.x-Ke.x,Pt=Le.y-Ke.y,it=Oe.x-Le.x,J=Oe.y-Le.y,N=yt*yt+Pt*Pt,le=yt*J-Pt*it;if(Math.abs(le)>Number.EPSILON){const Ee=Math.sqrt(N),Pe=Math.sqrt(it*it+J*J),Me=Ke.x-Pt/Ee,St=Ke.y+yt/Ee,ot=Oe.x-J/Pe,Lt=Oe.y+it/Pe,Wt=((ot-Me)*J-(Lt-St)*it)/(yt*J-Pt*it);dt=Me+yt*Wt-Le.x,Z=St+Pt*Wt-Le.y;const Xe=dt*dt+Z*Z;if(Xe<=2)return new We(dt,Z);Ot=Math.sqrt(Xe/2)}else{let Ee=!1;yt>Number.EPSILON?it>Number.EPSILON&&(Ee=!0):yt<-Number.EPSILON?it<-Number.EPSILON&&(Ee=!0):Math.sign(Pt)===Math.sign(J)&&(Ee=!0),Ee?(dt=-Pt,Z=yt,Ot=Math.sqrt(N)):(dt=yt,Z=Pt,Ot=Math.sqrt(N/2))}return new We(dt/Ot,Z/Ot)}const Be=[];for(let Le=0,Ke=fe.length,Oe=Ke-1,dt=Le+1;Le<Ke;Le++,Oe++,dt++)Oe===Ke&&(Oe=0),dt===Ke&&(dt=0),Be[Le]=pe(fe[Le],fe[Oe],fe[dt]);const Ae=[];let De,He=Be.concat();for(let Le=0,Ke=re;Le<Ke;Le++){const Oe=q[Le];De=[];for(let dt=0,Z=Oe.length,Ot=Z-1,yt=dt+1;dt<Z;dt++,Ot++,yt++)Ot===Z&&(Ot=0),yt===Z&&(yt=0),De[dt]=pe(Oe[dt],Oe[Ot],Oe[yt]);Ae.push(De),He=He.concat(De)}let Ve;if(C===0)Ve=uo.triangulateShape(fe,q);else{const Le=[],Ke=[];for(let Oe=0;Oe<C;Oe++){const dt=Oe/C,Z=S*Math.cos(dt*Math.PI/2),Ot=M*Math.sin(dt*Math.PI/2)+w;for(let yt=0,Pt=fe.length;yt<Pt;yt++){const it=Y(fe[yt],Be[yt],Ot);It(it.x,it.y,-Z),dt===0&&Le.push(it)}for(let yt=0,Pt=re;yt<Pt;yt++){const it=q[yt];De=Ae[yt];const J=[];for(let N=0,le=it.length;N<le;N++){const Ee=Y(it[N],De[N],Ot);It(Ee.x,Ee.y,-Z),dt===0&&J.push(Ee)}dt===0&&Ke.push(J)}}Ve=uo.triangulateShape(Le,Ke)}const bt=Ve.length,qt=M+w;for(let Le=0;Le<$;Le++){const Ke=x?Y(O[Le],He[Le],qt):O[Le];U?(X.copy(z.normals[0]).multiplyScalar(Ke.x),P.copy(z.binormals[0]).multiplyScalar(Ke.y),k.copy(D[0]).add(X).add(P),It(k.x,k.y,k.z)):It(Ke.x,Ke.y,0)}for(let Le=1;Le<=y;Le++)for(let Ke=0;Ke<$;Ke++){const Oe=x?Y(O[Ke],He[Ke],qt):O[Ke];U?(X.copy(z.normals[Le]).multiplyScalar(Oe.x),P.copy(z.binormals[Le]).multiplyScalar(Oe.y),k.copy(D[Le]).add(X).add(P),It(k.x,k.y,k.z)):It(Oe.x,Oe.y,v/y*Le)}for(let Le=C-1;Le>=0;Le--){const Ke=Le/C,Oe=S*Math.cos(Ke*Math.PI/2),dt=M*Math.sin(Ke*Math.PI/2)+w;for(let Z=0,Ot=fe.length;Z<Ot;Z++){const yt=Y(fe[Z],Be[Z],dt);It(yt.x,yt.y,v+Oe)}for(let Z=0,Ot=q.length;Z<Ot;Z++){const yt=q[Z];De=Ae[Z];for(let Pt=0,it=yt.length;Pt<it;Pt++){const J=Y(yt[Pt],De[Pt],dt);U?It(J.x,J.y+D[y-1].y,D[y-1].x+Oe):It(J.x,J.y,v+Oe)}}}me(),Fe();function me(){const Le=s.length/3;if(x){let Ke=0,Oe=$*Ke;for(let dt=0;dt<bt;dt++){const Z=Ve[dt];wt(Z[2]+Oe,Z[1]+Oe,Z[0]+Oe)}Ke=y+C*2,Oe=$*Ke;for(let dt=0;dt<bt;dt++){const Z=Ve[dt];wt(Z[0]+Oe,Z[1]+Oe,Z[2]+Oe)}}else{for(let Ke=0;Ke<bt;Ke++){const Oe=Ve[Ke];wt(Oe[2],Oe[1],Oe[0])}for(let Ke=0;Ke<bt;Ke++){const Oe=Ve[Ke];wt(Oe[0]+$*y,Oe[1]+$*y,Oe[2]+$*y)}}n.addGroup(Le,s.length/3-Le,0)}function Fe(){const Le=s.length/3;let Ke=0;mt(fe,Ke),Ke+=fe.length;for(let Oe=0,dt=q.length;Oe<dt;Oe++){const Z=q[Oe];mt(Z,Ke),Ke+=Z.length}n.addGroup(Le,s.length/3-Le,1)}function mt(Le,Ke){let Oe=Le.length;for(;--Oe>=0;){const dt=Oe;let Z=Oe-1;Z<0&&(Z=Le.length-1);for(let Ot=0,yt=y+C*2;Ot<yt;Ot++){const Pt=$*Ot,it=$*(Ot+1),J=Ke+dt+Pt,N=Ke+Z+Pt,le=Ke+Z+it,Ee=Ke+dt+it;an(J,N,le,Ee)}}}function It(Le,Ke,Oe){d.push(Le),d.push(Ke),d.push(Oe)}function wt(Le,Ke,Oe){yn(Le),yn(Ke),yn(Oe);const dt=s.length/3,Z=B.generateTopUV(n,s,dt-3,dt-2,dt-1);Xt(Z[0]),Xt(Z[1]),Xt(Z[2])}function an(Le,Ke,Oe,dt){yn(Le),yn(Ke),yn(dt),yn(Ke),yn(Oe),yn(dt);const Z=s.length/3,Ot=B.generateSideWallUV(n,s,Z-6,Z-3,Z-2,Z-1);Xt(Ot[0]),Xt(Ot[1]),Xt(Ot[3]),Xt(Ot[1]),Xt(Ot[2]),Xt(Ot[3])}function yn(Le){s.push(d[Le*3+0]),s.push(d[Le*3+1]),s.push(d[Le*3+2])}function Xt(Le){o.push(Le.x),o.push(Le.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes,n=this.parameters.options;return BB(t,n,e)}static fromJSON(e,t){const n=[];for(let o=0,u=e.shapes.length;o<u;o++){const h=t[e.shapes[o]];n.push(h)}const s=e.options.extrudePath;return s!==void 0&&(e.options.extrudePath=new Fy[s.type]().fromJSON(s)),new g_(n,e.options)}}const RB={generateTopUV:function(a,e,t,n,s){const o=e[t*3],u=e[t*3+1],h=e[n*3],d=e[n*3+1],g=e[s*3],y=e[s*3+1];return[new We(o,u),new We(h,d),new We(g,y)]},generateSideWallUV:function(a,e,t,n,s,o){const u=e[t*3],h=e[t*3+1],d=e[t*3+2],g=e[n*3],y=e[n*3+1],v=e[n*3+2],x=e[s*3],S=e[s*3+1],M=e[s*3+2],w=e[o*3],C=e[o*3+1],E=e[o*3+2];return Math.abs(h-y)<Math.abs(u-g)?[new We(u,1-d),new We(g,1-v),new We(x,1-M),new We(w,1-E)]:[new We(h,1-d),new We(y,1-v),new We(S,1-M),new We(C,1-E)]}};function BB(a,e,t){if(t.shapes=[],Array.isArray(a))for(let n=0,s=a.length;n<s;n++){const o=a[n];t.shapes.push(o.uuid)}else t.shapes.push(a.uuid);return t.options=Object.assign({},e),e.extrudePath!==void 0&&(t.options.extrudePath=e.extrudePath.toJSON()),t}class ig extends eu{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,s=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],o=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1];super(s,o,e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new ig(e.radius,e.detail)}}class v_ extends rn{constructor(e=[new We(0,-.5),new We(.5,0),new We(0,.5)],t=12,n=0,s=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:s},t=Math.floor(t),s=nn(s,0,Math.PI*2);const o=[],u=[],h=[],d=[],g=[],y=1/t,v=new K,x=new We,S=new K,M=new K,w=new K;let C=0,E=0;for(let B=0;B<=e.length-1;B++)switch(B){case 0:C=e[B+1].x-e[B].x,E=e[B+1].y-e[B].y,S.x=E*1,S.y=-C,S.z=E*0,w.copy(S),S.normalize(),d.push(S.x,S.y,S.z);break;case e.length-1:d.push(w.x,w.y,w.z);break;default:C=e[B+1].x-e[B].x,E=e[B+1].y-e[B].y,S.x=E*1,S.y=-C,S.z=E*0,M.copy(S),S.x+=w.x,S.y+=w.y,S.z+=w.z,S.normalize(),d.push(S.x,S.y,S.z),w.copy(M)}for(let B=0;B<=t;B++){const D=n+B*y*s,U=Math.sin(D),z=Math.cos(D);for(let P=0;P<=e.length-1;P++){v.x=e[P].x*U,v.y=e[P].y,v.z=e[P].x*z,u.push(v.x,v.y,v.z),x.x=B/t,x.y=P/(e.length-1),h.push(x.x,x.y);const X=d[3*P+0]*U,k=d[3*P+1],I=d[3*P+0]*z;g.push(X,k,I)}}for(let B=0;B<t;B++)for(let D=0;D<e.length-1;D++){const U=D+B*e.length,z=U,P=U+e.length,X=U+e.length+1,k=U+1;o.push(z,P,k),o.push(X,k,P)}this.setIndex(o),this.setAttribute("position",new Nt(u,3)),this.setAttribute("uv",new Nt(h,2)),this.setAttribute("normal",new Nt(g,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new v_(e.points,e.segments,e.phiStart,e.phiLength)}}class sg extends eu{constructor(e=1,t=0){const n=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],s=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];super(n,s,e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new sg(e.radius,e.detail)}}class tu extends rn{constructor(e=1,t=1,n=1,s=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:s};const o=e/2,u=t/2,h=Math.floor(n),d=Math.floor(s),g=h+1,y=d+1,v=e/h,x=t/d,S=[],M=[],w=[],C=[];for(let E=0;E<y;E++){const B=E*x-u;for(let D=0;D<g;D++){const U=D*v-o;M.push(U,-B,0),w.push(0,0,1),C.push(D/h),C.push(1-E/d)}}for(let E=0;E<d;E++)for(let B=0;B<h;B++){const D=B+g*E,U=B+g*(E+1),z=B+1+g*(E+1),P=B+1+g*E;S.push(D,U,P),S.push(U,z,P)}this.setIndex(S),this.setAttribute("position",new Nt(M,3)),this.setAttribute("normal",new Nt(w,3)),this.setAttribute("uv",new Nt(C,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new tu(e.width,e.height,e.widthSegments,e.heightSegments)}}class y_ extends rn{constructor(e=.5,t=1,n=32,s=1,o=0,u=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:s,thetaStart:o,thetaLength:u},n=Math.max(3,n),s=Math.max(1,s);const h=[],d=[],g=[],y=[];let v=e;const x=(t-e)/s,S=new K,M=new We;for(let w=0;w<=s;w++){for(let C=0;C<=n;C++){const E=o+C/n*u;S.x=v*Math.cos(E),S.y=v*Math.sin(E),d.push(S.x,S.y,S.z),g.push(0,0,1),M.x=(S.x/t+1)/2,M.y=(S.y/t+1)/2,y.push(M.x,M.y)}v+=x}for(let w=0;w<s;w++){const C=w*(n+1);for(let E=0;E<n;E++){const B=E+C,D=B,U=B+n+1,z=B+n+2,P=B+1;h.push(D,U,P),h.push(U,z,P)}}this.setIndex(h),this.setAttribute("position",new Nt(d,3)),this.setAttribute("normal",new Nt(g,3)),this.setAttribute("uv",new Nt(y,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new y_(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class __ extends rn{constructor(e=new vf([new We(0,.5),new We(-.5,-.5),new We(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],s=[],o=[],u=[];let h=0,d=0;if(Array.isArray(e)===!1)g(e);else for(let y=0;y<e.length;y++)g(e[y]),this.addGroup(h,d,y),h+=d,d=0;this.setIndex(n),this.setAttribute("position",new Nt(s,3)),this.setAttribute("normal",new Nt(o,3)),this.setAttribute("uv",new Nt(u,2));function g(y){const v=s.length/3,x=y.extractPoints(t);let S=x.shape;const M=x.holes;uo.isClockWise(S)===!1&&(S=S.reverse());for(let C=0,E=M.length;C<E;C++){const B=M[C];uo.isClockWise(B)===!0&&(M[C]=B.reverse())}const w=uo.triangulateShape(S,M);for(let C=0,E=M.length;C<E;C++){const B=M[C];S=S.concat(B)}for(let C=0,E=S.length;C<E;C++){const B=S[C];s.push(B.x,B.y,0),o.push(0,0,1),u.push(B.x,B.y)}for(let C=0,E=w.length;C<E;C++){const B=w[C],D=B[0]+v,U=B[1]+v,z=B[2]+v;n.push(D,U,z),d+=3}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes;return DB(t,e)}static fromJSON(e,t){const n=[];for(let s=0,o=e.shapes.length;s<o;s++){const u=t[e.shapes[s]];n.push(u)}return new __(n,e.curveSegments)}}function DB(a,e){if(e.shapes=[],Array.isArray(a))for(let t=0,n=a.length;t<n;t++){const s=a[t];e.shapes.push(s.uuid)}else e.shapes.push(a.uuid);return e}class rg extends rn{constructor(e=1,t=32,n=16,s=0,o=Math.PI*2,u=0,h=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:s,phiLength:o,thetaStart:u,thetaLength:h},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const d=Math.min(u+h,Math.PI);let g=0;const y=[],v=new K,x=new K,S=[],M=[],w=[],C=[];for(let E=0;E<=n;E++){const B=[],D=E/n;let U=0;E===0&&u===0?U=.5/t:E===n&&d===Math.PI&&(U=-.5/t);for(let z=0;z<=t;z++){const P=z/t;v.x=-e*Math.cos(s+P*o)*Math.sin(u+D*h),v.y=e*Math.cos(u+D*h),v.z=e*Math.sin(s+P*o)*Math.sin(u+D*h),M.push(v.x,v.y,v.z),x.copy(v).normalize(),w.push(x.x,x.y,x.z),C.push(P+U,1-D),B.push(g++)}y.push(B)}for(let E=0;E<n;E++)for(let B=0;B<t;B++){const D=y[E][B+1],U=y[E][B],z=y[E+1][B],P=y[E+1][B+1];(E!==0||u>0)&&S.push(D,U,P),(E!==n-1||d<Math.PI)&&S.push(U,z,P)}this.setIndex(S),this.setAttribute("position",new Nt(M,3)),this.setAttribute("normal",new Nt(w,3)),this.setAttribute("uv",new Nt(C,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new rg(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class x_ extends eu{constructor(e=1,t=0){const n=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],s=[2,1,0,0,3,2,1,3,0,2,3,1];super(n,s,e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new x_(e.radius,e.detail)}}class A_ extends rn{constructor(e=1,t=.4,n=12,s=48,o=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:s,arc:o},n=Math.floor(n),s=Math.floor(s);const u=[],h=[],d=[],g=[],y=new K,v=new K,x=new K;for(let S=0;S<=n;S++)for(let M=0;M<=s;M++){const w=M/s*o,C=S/n*Math.PI*2;v.x=(e+t*Math.cos(C))*Math.cos(w),v.y=(e+t*Math.cos(C))*Math.sin(w),v.z=t*Math.sin(C),h.push(v.x,v.y,v.z),y.x=e*Math.cos(w),y.y=e*Math.sin(w),x.subVectors(v,y).normalize(),d.push(x.x,x.y,x.z),g.push(M/s),g.push(S/n)}for(let S=1;S<=n;S++)for(let M=1;M<=s;M++){const w=(s+1)*S+M-1,C=(s+1)*(S-1)+M-1,E=(s+1)*(S-1)+M,B=(s+1)*S+M;u.push(w,C,B),u.push(C,E,B)}this.setIndex(u),this.setAttribute("position",new Nt(h,3)),this.setAttribute("normal",new Nt(d,3)),this.setAttribute("uv",new Nt(g,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new A_(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class S_ extends rn{constructor(e=1,t=.4,n=64,s=8,o=2,u=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:s,p:o,q:u},n=Math.floor(n),s=Math.floor(s);const h=[],d=[],g=[],y=[],v=new K,x=new K,S=new K,M=new K,w=new K,C=new K,E=new K;for(let D=0;D<=n;++D){const U=D/n*o*Math.PI*2;B(U,o,u,e,S),B(U+.01,o,u,e,M),C.subVectors(M,S),E.addVectors(M,S),w.crossVectors(C,E),E.crossVectors(w,C),w.normalize(),E.normalize();for(let z=0;z<=s;++z){const P=z/s*Math.PI*2,X=-t*Math.cos(P),k=t*Math.sin(P);v.x=S.x+(X*E.x+k*w.x),v.y=S.y+(X*E.y+k*w.y),v.z=S.z+(X*E.z+k*w.z),d.push(v.x,v.y,v.z),x.subVectors(v,S).normalize(),g.push(x.x,x.y,x.z),y.push(D/n),y.push(z/s)}}for(let D=1;D<=n;D++)for(let U=1;U<=s;U++){const z=(s+1)*(D-1)+(U-1),P=(s+1)*D+(U-1),X=(s+1)*D+U,k=(s+1)*(D-1)+U;h.push(z,P,k),h.push(P,X,k)}this.setIndex(h),this.setAttribute("position",new Nt(d,3)),this.setAttribute("normal",new Nt(g,3)),this.setAttribute("uv",new Nt(y,2));function B(D,U,z,P,X){const k=Math.cos(D),I=Math.sin(D),O=z/U*D,q=Math.cos(O);X.x=P*(2+q)*.5*k,X.y=P*(2+q)*I*.5,X.z=P*Math.sin(O)*.5}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new S_(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class b_ extends rn{constructor(e=new AS(new K(-1,-1,0),new K(-1,1,0),new K(1,1,0)),t=64,n=1,s=8,o=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:s,closed:o};const u=e.computeFrenetFrames(t,o);this.tangents=u.tangents,this.normals=u.normals,this.binormals=u.binormals;const h=new K,d=new K,g=new We;let y=new K;const v=[],x=[],S=[],M=[];w(),this.setIndex(M),this.setAttribute("position",new Nt(v,3)),this.setAttribute("normal",new Nt(x,3)),this.setAttribute("uv",new Nt(S,2));function w(){for(let D=0;D<t;D++)C(D);C(o===!1?t:0),B(),E()}function C(D){y=e.getPointAt(D/t,y);const U=u.normals[D],z=u.binormals[D];for(let P=0;P<=s;P++){const X=P/s*Math.PI*2,k=Math.sin(X),I=-Math.cos(X);d.x=I*U.x+k*z.x,d.y=I*U.y+k*z.y,d.z=I*U.z+k*z.z,d.normalize(),x.push(d.x,d.y,d.z),h.x=y.x+n*d.x,h.y=y.y+n*d.y,h.z=y.z+n*d.z,v.push(h.x,h.y,h.z)}}function E(){for(let D=1;D<=t;D++)for(let U=1;U<=s;U++){const z=(s+1)*(D-1)+(U-1),P=(s+1)*D+(U-1),X=(s+1)*D+U,k=(s+1)*(D-1)+U;M.push(z,P,k),M.push(P,X,k)}}function B(){for(let D=0;D<=t;D++)for(let U=0;U<=s;U++)g.x=D/t,g.y=U/s,S.push(g.x,g.y)}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new b_(new Fy[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class sT extends rn{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const t=[],n=new Set,s=new K,o=new K;if(e.index!==null){const u=e.attributes.position,h=e.index;let d=e.groups;d.length===0&&(d=[{start:0,count:h.count,materialIndex:0}]);for(let g=0,y=d.length;g<y;++g){const v=d[g],x=v.start,S=v.count;for(let M=x,w=x+S;M<w;M+=3)for(let C=0;C<3;C++){const E=h.getX(M+C),B=h.getX(M+(C+1)%3);s.fromBufferAttribute(u,E),o.fromBufferAttribute(u,B),NM(s,o,n)===!0&&(t.push(s.x,s.y,s.z),t.push(o.x,o.y,o.z))}}}else{const u=e.attributes.position;for(let h=0,d=u.count/3;h<d;h++)for(let g=0;g<3;g++){const y=3*h+g,v=3*h+(g+1)%3;s.fromBufferAttribute(u,y),o.fromBufferAttribute(u,v),NM(s,o,n)===!0&&(t.push(s.x,s.y,s.z),t.push(o.x,o.y,o.z))}}this.setAttribute("position",new Nt(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function NM(a,e,t){const n=`${a.x},${a.y},${a.z}-${e.x},${e.y},${e.z}`,s=`${e.x},${e.y},${e.z}-${a.x},${a.y},${a.z}`;return t.has(n)===!0||t.has(s)===!0?!1:(t.add(n),t.add(s),!0)}var FM=Object.freeze({__proto__:null,BoxGeometry:Tf,CapsuleGeometry:h_,CircleGeometry:d_,ConeGeometry:ng,CylinderGeometry:tg,DodecahedronGeometry:p_,EdgesGeometry:qE,ExtrudeGeometry:g_,IcosahedronGeometry:ig,LatheGeometry:v_,OctahedronGeometry:sg,PlaneGeometry:tu,PolyhedronGeometry:eu,RingGeometry:y_,ShapeGeometry:__,SphereGeometry:rg,TetrahedronGeometry:x_,TorusGeometry:A_,TorusKnotGeometry:S_,TubeGeometry:b_,WireframeGeometry:sT});class rT extends ys{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new Tt(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}class bS extends br{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class ag extends ys{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new Tt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=$c,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new sa,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class za extends ag{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new We(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return nn(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Tt(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Tt(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Tt(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class aT extends ys{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Tt(16777215),this.specular=new Tt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=$c,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new sa,this.combine=Ym,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class oT extends ys{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Tt(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=$c,this.normalScale=new We(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 lT extends ys{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=$c,this.normalScale=new We(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 cT extends ys{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Tt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=$c,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new sa,this.combine=Ym,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class MS extends ys{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=EE,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 ES extends ys{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}}class uT extends ys{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Tt(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=$c,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,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.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this.fog=e.fog,this}}class fT extends rr{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 hf(a,e){return!a||a.constructor===e?a:typeof e.BYTES_PER_ELEMENT=="number"?new e(a):Array.prototype.slice.call(a)}function hT(a){function e(s,o){return a[s]-a[o]}const t=a.length,n=new Array(t);for(let s=0;s!==t;++s)n[s]=s;return n.sort(e),n}function IA(a,e,t){const n=a.length,s=new a.constructor(n);for(let o=0,u=0;u!==n;++o){const h=t[o]*e;for(let d=0;d!==e;++d)s[u++]=a[h+d]}return s}function TS(a,e,t,n){let s=1,o=a[0];for(;o!==void 0&&o[n]===void 0;)o=a[s++];if(o===void 0)return;let u=o[n];if(u!==void 0)if(Array.isArray(u))do u=o[n],u!==void 0&&(e.push(o.time),t.push(...u)),o=a[s++];while(o!==void 0);else if(u.toArray!==void 0)do u=o[n],u!==void 0&&(e.push(o.time),u.toArray(t,t.length)),o=a[s++];while(o!==void 0);else do u=o[n],u!==void 0&&(e.push(o.time),t.push(u)),o=a[s++];while(o!==void 0)}function IB(a,e,t,n,s=30){const o=a.clone();o.name=e;const u=[];for(let d=0;d<o.tracks.length;++d){const g=o.tracks[d],y=g.getValueSize(),v=[],x=[];for(let S=0;S<g.times.length;++S){const M=g.times[S]*s;if(!(M<t||M>=n)){v.push(g.times[S]);for(let w=0;w<y;++w)x.push(g.values[S*y+w])}}v.length!==0&&(g.times=hf(v,g.times.constructor),g.values=hf(x,g.values.constructor),u.push(g))}o.tracks=u;let h=1/0;for(let d=0;d<o.tracks.length;++d)h>o.tracks[d].times[0]&&(h=o.tracks[d].times[0]);for(let d=0;d<o.tracks.length;++d)o.tracks[d].shift(-1*h);return o.resetDuration(),o}function LB(a,e=0,t=a,n=30){n<=0&&(n=30);const s=t.tracks.length,o=e/n;for(let u=0;u<s;++u){const h=t.tracks[u],d=h.ValueTypeName;if(d==="bool"||d==="string")continue;const g=a.tracks.find(function(E){return E.name===h.name&&E.ValueTypeName===d});if(g===void 0)continue;let y=0;const v=h.getValueSize();h.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(y=v/3);let x=0;const S=g.getValueSize();g.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(x=S/3);const M=h.times.length-1;let w;if(o<=h.times[0]){const E=y,B=v-y;w=h.values.slice(E,B)}else if(o>=h.times[M]){const E=M*v+y,B=E+v-y;w=h.values.slice(E,B)}else{const E=h.createInterpolant(),B=y,D=v-y;E.evaluate(o),w=E.resultBuffer.slice(B,D)}d==="quaternion"&&new sr().fromArray(w).normalize().conjugate().toArray(w);const C=g.times.length;for(let E=0;E<C;++E){const B=E*S+x;if(d==="quaternion")sr.multiplyQuaternionsFlat(g.values,B,w,0,g.values,B);else{const D=S-x*2;for(let U=0;U<D;++U)g.values[B+U]-=w[U]}}}return a.blendMode=rS,a}class UB{static convertArray(e,t){return hf(e,t)}static isTypedArray(e){return UE(e)}static getKeyframeOrder(e){return hT(e)}static sortedArray(e,t,n){return IA(e,t,n)}static flattenJSON(e,t,n,s){TS(e,t,n,s)}static subclip(e,t,n,s,o=30){return IB(e,t,n,s,o)}static makeClipAdditive(e,t=0,n=e,s=30){return LB(e,t,n,s)}}class Rd{constructor(e,t,n,s){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=s!==void 0?s:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,s=t[n],o=t[n-1];e:{t:{let u;n:{i:if(!(e<s)){for(let h=n+2;;
vendor: 12,761 bytes, line 76
76){if(s===void 0){if(e<o)break i;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===h)break;if(o=s,s=t[++n],e<s)break t}u=t.length;break n}if(!(e>=o)){const h=t[1];e<h&&(n=2,o=h);for(let d=n-2;;){if(o===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===d)break;if(s=o,o=t[--n-1],e>=o)break t}u=n,n=0;break n}break e}for(;n<u;){const h=n+u>>>1;e<t[h]?u=h:n=h+1}if(s=t[n],o=t[n-1],o===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(s===void 0)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,o,s)}return this.interpolate_(n,o,e,s)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,s=this.valueSize,o=e*s;for(let u=0;u!==s;++u)t[u]=n[o+u];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class dT extends Rd{constructor(e,t,n,s){super(e,t,n,s),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:cf,endingEnd:cf}}intervalChanged_(e,t,n){const s=this.parameterPositions;let o=e-2,u=e+1,h=s[o],d=s[u];if(h===void 0)switch(this.getSettings_().endingStart){case uf:o=e,h=2*t-n;break;case Um:o=s.length-2,h=t+s[o]-s[o+1];break;default:o=e,h=n}if(d===void 0)switch(this.getSettings_().endingEnd){case uf:u=e,d=2*n-t;break;case Um:u=1,d=n+s[1]-s[0];break;default:u=e-1,d=t}const g=(n-t)*.5,y=this.valueSize;this._weightPrev=g/(t-h),this._weightNext=g/(d-n),this._offsetPrev=o*y,this._offsetNext=u*y}interpolate_(e,t,n,s){const o=this.resultBuffer,u=this.sampleValues,h=this.valueSize,d=e*h,g=d-h,y=this._offsetPrev,v=this._offsetNext,x=this._weightPrev,S=this._weightNext,M=(n-t)/(s-t),w=M*M,C=w*M,E=-x*C+2*x*w-x*M,B=(1+x)*C+(-1.5-2*x)*w+(-.5+x)*M+1,D=(-1-S)*C+(1.5+S)*w+.5*M,U=S*C-S*w;for(let z=0;z!==h;++z)o[z]=E*u[y+z]+B*u[g+z]+D*u[d+z]+U*u[v+z];return o}}class CS extends Rd{constructor(e,t,n,s){super(e,t,n,s)}interpolate_(e,t,n,s){const o=this.resultBuffer,u=this.sampleValues,h=this.valueSize,d=e*h,g=d-h,y=(n-t)/(s-t),v=1-y;for(let x=0;x!==h;++x)o[x]=u[g+x]*v+u[d+x]*y;return o}}class pT extends Rd{constructor(e,t,n,s){super(e,t,n,s)}interpolate_(e){return this.copySampleValue_(e-1)}}class Ga{constructor(e,t,n,s){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(t===void 0||t.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=hf(t,this.TimeBufferType),this.values=hf(n,this.ValueBufferType),this.setInterpolation(s||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:hf(e.times,Array),values:hf(e.values,Array)};const s=e.getInterpolation();s!==e.DefaultInterpolation&&(n.interpolation=s)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new pT(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new CS(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new dT(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case md:t=this.InterpolantFactoryMethodDiscrete;break;case gd:t=this.InterpolantFactoryMethodLinear;break;case kv:t=this.InterpolantFactoryMethodSmooth;break}if(t===void 0){const n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return Mt("KeyframeTrack:",n),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return md;case this.InterpolantFactoryMethodLinear:return gd;case this.InterpolantFactoryMethodSmooth:return kv}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let n=0,s=t.length;n!==s;++n)t[n]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let n=0,s=t.length;n!==s;++n)t[n]*=e}return this}trim(e,t){const n=this.times,s=n.length;let o=0,u=s-1;for(;o!==s&&n[o]<e;)++o;for(;u!==-1&&n[u]>t;)--u;if(++u,o!==0||u!==s){o>=u&&(u=Math.max(u,1),o=u-1);const h=this.getValueSize();this.times=n.slice(o,u),this.values=this.values.slice(o*h,u*h)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(Vt("KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,s=this.values,o=n.length;o===0&&(Vt("KeyframeTrack: Track is empty.",this),e=!1);let u=null;for(let h=0;h!==o;h++){const d=n[h];if(typeof d=="number"&&isNaN(d)){Vt("KeyframeTrack: Time is not a valid number.",this,h,d),e=!1;break}if(u!==null&&u>d){Vt("KeyframeTrack: Out of order keys.",this,h,d,u),e=!1;break}u=d}if(s!==void 0&&UE(s))for(let h=0,d=s.length;h!==d;++h){const g=s[h];if(isNaN(g)){Vt("KeyframeTrack: Value is not a valid number.",this,h,g),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),s=this.getInterpolation()===kv,o=e.length-1;let u=1;for(let h=1;h<o;++h){let d=!1;const g=e[h],y=e[h+1];if(g!==y&&(h!==1||g!==e[0]))if(s)d=!0;else{const v=h*n,x=v-n,S=v+n;for(let M=0;M!==n;++M){const w=t[v+M];if(w!==t[x+M]||w!==t[S+M]){d=!0;break}}}if(d){if(h!==u){e[u]=e[h];const v=h*n,x=u*n;for(let S=0;S!==n;++S)t[x+S]=t[v+S]}++u}}if(o>0){e[u]=e[o];for(let h=o*n,d=u*n,g=0;g!==n;++g)t[d+g]=t[h+g];++u}return u!==e.length?(this.times=e.slice(0,u),this.values=t.slice(0,u*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=this.constructor,s=new n(this.name,e,t);return s.createInterpolant=this.createInterpolant,s}}Ga.prototype.ValueTypeName="";Ga.prototype.TimeBufferType=Float32Array;Ga.prototype.ValueBufferType=Float32Array;Ga.prototype.DefaultInterpolation=gd;class Cf extends Ga{constructor(e,t,n){super(e,t,n)}}Cf.prototype.ValueTypeName="bool";Cf.prototype.ValueBufferType=Array;Cf.prototype.DefaultInterpolation=md;Cf.prototype.InterpolantFactoryMethodLinear=void 0;Cf.prototype.InterpolantFactoryMethodSmooth=void 0;class wS extends Ga{constructor(e,t,n,s){super(e,t,n,s)}}wS.prototype.ValueTypeName="color";class Sf extends Ga{constructor(e,t,n,s){super(e,t,n,s)}}Sf.prototype.ValueTypeName="number";class mT extends Rd{constructor(e,t,n,s){super(e,t,n,s)}interpolate_(e,t,n,s){const o=this.resultBuffer,u=this.sampleValues,h=this.valueSize,d=(n-t)/(s-t);let g=e*h;for(let y=g+h;g!==y;g+=4)sr.slerpFlat(o,0,u,g-h,u,g,d);return o}}class bf extends Ga{constructor(e,t,n,s){super(e,t,n,s)}InterpolantFactoryMethodLinear(e){return new mT(this.times,this.values,this.getValueSize(),e)}}bf.prototype.ValueTypeName="quaternion";bf.prototype.InterpolantFactoryMethodSmooth=void 0;class wf extends Ga{constructor(e,t,n){super(e,t,n)}}wf.prototype.ValueTypeName="string";wf.prototype.ValueBufferType=Array;wf.prototype.DefaultInterpolation=md;wf.prototype.InterpolantFactoryMethodLinear=void 0;wf.prototype.InterpolantFactoryMethodSmooth=void 0;class Mf extends Ga{constructor(e,t,n,s){super(e,t,n,s)}}Mf.prototype.ValueTypeName="vector";class Md{constructor(e="",t=-1,n=[],s=$y){this.name=e,this.tracks=n,this.duration=t,this.blendMode=s,this.uuid=na(),this.userData={},this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,s=1/(e.fps||1);for(let u=0,h=n.length;u!==h;++u)t.push(FB(n[u]).scale(s));const o=new this(e.name,e.duration,t,e.blendMode);return o.uuid=e.uuid,o.userData=JSON.parse(e.userData||"{}"),o}static toJSON(e){const t=[],n=e.tracks,s={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode,userData:JSON.stringify(e.userData)};for(let o=0,u=n.length;o!==u;++o)t.push(Ga.toJSON(n[o]));return s}static CreateFromMorphTargetSequence(e,t,n,s){const o=t.length,u=[];for(let h=0;h<o;h++){let d=[],g=[];d.push((h+o-1)%o,h,(h+1)%o),g.push(0,1,0);const y=hT(d);d=IA(d,1,y),g=IA(g,1,y),!s&&d[0]===0&&(d.push(o),g.push(g[0])),u.push(new Sf(".morphTargetInfluences["+t[h].name+"]",d,g).scale(1/n))}return new this(e,-1,u)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const s=e;n=s.geometry&&s.geometry.animations||s.animations}for(let s=0;s<n.length;s++)if(n[s].name===t)return n[s];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const s={},o=/^([\w-]*?)([\d]+)$/;for(let h=0,d=e.length;h<d;h++){const g=e[h],y=g.name.match(o);if(y&&y.length>1){const v=y[1];let x=s[v];x||(s[v]=x=[]),x.push(g)}}const u=[];for(const h in s)u.push(this.CreateFromMorphTargetSequence(h,s[h],t,n));return u}static parseAnimation(e,t){if(Mt("AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return Vt("AnimationClip: No animation in JSONLoader data."),null;const n=function(v,x,S,M,w){if(S.length!==0){const C=[],E=[];TS(S,C,E,M),C.length!==0&&w.push(new v(x,C,E))}},s=[],o=e.name||"default",u=e.fps||30,h=e.blendMode;let d=e.length||-1;const g=e.hierarchy||[];for(let v=0;v<g.length;v++){const x=g[v].keys;if(!(!x||x.length===0))if(x[0].morphTargets){const S={};let M;for(M=0;M<x.length;M++)if(x[M].morphTargets)for(let w=0;w<x[M].morphTargets.length;w++)S[x[M].morphTargets[w]]=-1;for(const w in S){const C=[],E=[];for(let B=0;B!==x[M].morphTargets.length;++B){const D=x[M];C.push(D.time),E.push(D.morphTarget===w?1:0)}s.push(new Sf(".morphTargetInfluence["+w+"]",C,E))}d=S.length*u}else{const S=".bones["+t[v].name+"]";n(Mf,S+".position",x,"pos",s),n(bf,S+".quaternion",x,"rot",s),n(Mf,S+".scale",x,"scl",s)}}return s.length===0?null:new this(o,d,s,h)}resetDuration(){const e=this.tracks;let t=0;for(let n=0,s=e.length;n!==s;++n){const o=this.tracks[n];t=Math.max(t,o.times[o.times.length-1])}return this.duration=t,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let n=0;n<this.tracks.length;n++)e.push(this.tracks[n].clone());const t=new this.constructor(this.name,this.duration,e,this.blendMode);return t.userData=JSON.parse(JSON.stringify(this.userData)),t}toJSON(){return this.constructor.toJSON(this)}}function NB(a){switch(a.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Sf;case"vector":case"vector2":case"vector3":case"vector4":return Mf;case"color":return wS;case"quaternion":return bf;case"bool":case"boolean":return Cf;case"string":return wf}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+a)}function FB(a){if(a.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=NB(a.type);if(a.times===void 0){const t=[],n=[];TS(a.keys,t,n,"value"),a.times=t,a.values=n}return e.parse!==void 0?e.parse(a):new e(a.name,a.times,a.values,a.interpolation)}const Ko={enabled:!1,files:{},add:function(a,e){this.enabled!==!1&&(this.files[a]=e)},get:function(a){if(this.enabled!==!1)return this.files[a]},remove:function(a){delete this.files[a]},clear:function(){this.files={}}};class M_{constructor(e,t,n){const s=this;let o=!1,u=0,h=0,d;const g=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this._abortController=null,this.itemStart=function(y){h++,o===!1&&s.onStart!==void 0&&s.onStart(y,u,h),o=!0},this.itemEnd=function(y){u++,s.onProgress!==void 0&&s.onProgress(y,u,h),u===h&&(o=!1,s.onLoad!==void 0&&s.onLoad())},this.itemError=function(y){s.onError!==void 0&&s.onError(y)},this.resolveURL=function(y){return d?d(y):y},this.setURLModifier=function(y){return d=y,this},this.addHandler=function(y,v){return g.push(y,v),this},this.removeHandler=function(y){const v=g.indexOf(y);return v!==-1&&g.splice(v,2),this},this.getHandler=function(y){for(let v=0,x=g.length;v<x;v+=2){const S=g[v],M=g[v+1];if(S.global&&(S.lastIndex=0),S.test(y))return M}return null},this.abort=function(){return this.abortController.abort(),this._abortController=null,this}}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}}const gT=new M_;class Xs{constructor(e){this.manager=e!==void 0?e:gT,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise(function(s,o){n.load(e,s,t,o)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}abort(){return this}}Xs.DEFAULT_MATERIAL_NAME="__DEFAULT";const Ul={};
vendor: 5,064 bytes, line 76
76class OB extends Error{constructor(e,t){super(e),this.response=t}}class Vs extends Xs{constructor(e){super(e),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(e,t,n,s){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=Ko.get(`file:${e}`);if(o!==void 0)return this.manager.itemStart(e),setTimeout(()=>{t&&t(o),this.manager.itemEnd(e)},0),o;if(Ul[e]!==void 0){Ul[e].push({onLoad:t,onProgress:n,onError:s});return}Ul[e]=[],Ul[e].push({onLoad:t,onProgress:n,onError:s});const u=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),h=this.mimeType,d=this.responseType;fetch(u).then(g=>{if(g.status===200||g.status===0){if(g.status===0&&Mt("FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||g.body===void 0||g.body.getReader===void 0)return g;const y=Ul[e],v=g.body.getReader(),x=g.headers.get("X-File-Size")||g.headers.get("Content-Length"),S=x?parseInt(x):0,M=S!==0;let w=0;const C=new ReadableStream({start(E){B();function B(){v.read().then(({done:D,value:U})=>{if(D)E.close();else{w+=U.byteLength;const z=new ProgressEvent("progress",{lengthComputable:M,loaded:w,total:S});for(let P=0,X=y.length;P<X;P++){const k=y[P];k.onProgress&&k.onProgress(z)}E.enqueue(U),B()}},D=>{E.error(D)})}}});return new Response(C)}else throw new OB(`fetch for "${g.url}" responded with ${g.status}: ${g.statusText}`,g)}).then(g=>{switch(d){case"arraybuffer":return g.arrayBuffer();case"blob":return g.blob();case"document":return g.text().then(y=>new DOMParser().parseFromString(y,h));case"json":return g.json();default:if(h==="")return g.text();{const v=/charset="?([^;"\s]*)"?/i.exec(h),x=v&&v[1]?v[1].toLowerCase():void 0,S=new TextDecoder(x);return g.arrayBuffer().then(M=>S.decode(M))}}}).then(g=>{Ko.add(`file:${e}`,g);const y=Ul[e];delete Ul[e];for(let v=0,x=y.length;v<x;v++){const S=y[v];S.onLoad&&S.onLoad(g)}}).catch(g=>{const y=Ul[e];if(y===void 0)throw this.manager.itemError(e),g;delete Ul[e];for(let v=0,x=y.length;v<x;v++){const S=y[v];S.onError&&S.onError(g)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}class PB extends Xs{constructor(e){super(e)}load(e,t,n,s){const o=this,u=new Vs(this.manager);u.setPath(this.path),u.setRequestHeader(this.requestHeader),u.setWithCredentials(this.withCredentials),u.load(e,function(h){try{t(o.parse(JSON.parse(h)))}catch(d){s?s(d):Vt(d),o.manager.itemError(e)}},n,s)}parse(e){const t=[];for(let n=0;n<e.length;n++){const s=Md.parse(e[n]);t.push(s)}return t}}class zB extends Xs{constructor(e){super(e)}load(e,t,n,s){const o=this,u=[],h=new f_,d=new Vs(this.manager);d.setPath(this.path),d.setResponseType("arraybuffer"),d.setRequestHeader(this.requestHeader),d.setWithCredentials(o.withCredentials);let g=0;function y(v){d.load(e[v],function(x){const S=o.parse(x,!0);u[v]={width:S.width,height:S.height,format:S.format,mipmaps:S.mipmaps},g+=1,g===6&&(S.mipmapCount===1&&(h.minFilter=Un),h.image=u,h.format=S.format,h.needsUpdate=!0,t&&t(h))},n,s)}if(Array.isArray(e))for(let v=0,x=e.length;v<x;++v)y(v);else d.load(e,function(v){const x=o.parse(v,!0);if(x.isCubemap){const S=x.mipmaps.length/x.mipmapCount;for(let M=0;M<S;M++){u[M]={mipmaps:[]};for(let w=0;w<x.mipmapCount;w++)u[M].mipmaps.push(x.mipmaps[M*x.mipmapCount+w]),u[M].format=x.format,u[M].width=x.width,u[M].height=x.height}h.image=u}else h.image.width=x.width,h.image.height=x.height,h.mipmaps=x.mipmaps;x.mipmapCount===1&&(h.minFilter=Un),h.format=x.format,h.needsUpdate=!0,t&&t(h)},n,s);return h}}const jh=new WeakMap;class km extends Xs{constructor(e){super(e)}load(e,t,n,s){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,u=Ko.get(`image:${e}`);if(u!==void 0){if(u.complete===!0)o.manager.itemStart(e),setTimeout(function(){t&&t(u),o.manager.itemEnd(e)},0);else{let v=jh.get(u);v===void 0&&(v=[],jh.set(u,v)),v.push({onLoad:t,onError:s})}return u}const h=Om("img");function d(){y(),t&&t(this);const v=jh.get(this)||[];for(let x=0;x<v.length;x++){const S=v[x];S.onLoad&&S.onLoad(this)}jh.delete(this),o.manager.itemEnd(e)}function g(v){y(),s&&s(v),Ko.remove(`image:${e}`);const x=jh.get(this)||[];for(let S=0;S<x.length;S++){const M=x[S];M.onError&&M.onError(v)}jh.delete(this),o.manager.itemError(e),o.manager.itemEnd(e)}function y(){h.removeEventListener("load",d,!1),h.removeEventListener("error",g,!1)}return h.addEventListener("load",d,!1),h.addEventListener("error",g,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(h.crossOrigin=this.crossOrigin),Ko.add(`image:${e}`,h),o.manager.itemStart(e),h.src=e,h}}class vT extends Xs{constructor(e){super(e)}load(e,t,n,s){const o=new Qm;
vendor: 29,851 bytes, line 76
76o.colorSpace=ks;const u=new km(this.manager);u.setCrossOrigin(this.crossOrigin),u.setPath(this.path);let h=0;function d(g){u.load(e[g],function(y){o.images[g]=y,h++,h===6&&(o.needsUpdate=!0,t&&t(o))},void 0,s)}for(let g=0;g<e.length;++g)d(g);return o}}class RS extends Xs{constructor(e){super(e)}load(e,t,n,s){const o=this,u=new Pa,h=new Vs(this.manager);return h.setResponseType("arraybuffer"),h.setRequestHeader(this.requestHeader),h.setPath(this.path),h.setWithCredentials(o.withCredentials),h.load(e,function(d){let g;try{g=o.parse(d)}catch(y){if(s!==void 0)s(y);else{y(y);return}}g.image!==void 0?u.image=g.image:g.data!==void 0&&(u.image.width=g.width,u.image.height=g.height,u.image.data=g.data),u.wrapS=g.wrapS!==void 0?g.wrapS:Fi,u.wrapT=g.wrapT!==void 0?g.wrapT:Fi,u.magFilter=g.magFilter!==void 0?g.magFilter:Un,u.minFilter=g.minFilter!==void 0?g.minFilter:Un,u.anisotropy=g.anisotropy!==void 0?g.anisotropy:1,g.colorSpace!==void 0&&(u.colorSpace=g.colorSpace),g.flipY!==void 0&&(u.flipY=g.flipY),g.format!==void 0&&(u.format=g.format),g.type!==void 0&&(u.type=g.type),g.mipmaps!==void 0&&(u.mipmaps=g.mipmaps,u.minFilter=Fa),g.mipmapCount===1&&(u.minFilter=Un),g.generateMipmaps!==void 0&&(u.generateMipmaps=g.generateMipmaps),u.needsUpdate=!0,t&&t(u,g)},n,s),u}}class yT extends Xs{constructor(e){super(e)}load(e,t,n,s){const o=new ei,u=new km(this.manager);return u.setCrossOrigin(this.crossOrigin),u.setPath(this.path),u.load(e,function(h){o.image=h,o.needsUpdate=!0,t!==void 0&&t(o)},n,s),o}}class nu extends Gn{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new Tt(e),this.intensity=t}dispose(){this.dispatchEvent({type:"dispose"})}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,t}}class _T extends nu{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(Gn.DEFAULT_UP),this.updateMatrix(),this.groundColor=new Tt(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}toJSON(e){const t=super.toJSON(e);return t.object.groundColor=this.groundColor.getHex(),t}}const Wx=new jt,OM=new K,PM=new K;class BS{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new We(512,512),this.mapType=ws,this.map=null,this.mapPass=null,this.matrix=new jt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new wd,this._frameExtents=new We(1,1),this._viewportCount=1,this._viewports=[new li(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;OM.setFromMatrixPosition(e.matrixWorld),t.position.copy(OM),PM.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(PM),t.updateMatrixWorld(),Wx.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Wx,t.coordinateSystem,t.reversedDepth),t.reversedDepth?n.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(Wx)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.autoUpdate=e.autoUpdate,this.needsUpdate=e.needsUpdate,this.normalBias=e.normalBias,this.blurSamples=e.blurSamples,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.intensity!==1&&(e.intensity=this.intensity),this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class GB extends BS{constructor(){super(new gs(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(e){const t=this.camera,n=_d*2*e.angle*this.focus,s=this.mapSize.width/this.mapSize.height*this.aspect,o=e.distance||t.far;(n!==t.fov||s!==t.aspect||o!==t.far)&&(t.fov=n,t.aspect=s,t.far=o,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class DS extends nu{constructor(e,t,n=0,s=Math.PI/3,o=0,u=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Gn.DEFAULT_UP),this.updateMatrix(),this.target=new Gn,this.distance=n,this.angle=s,this.penumbra=o,this.decay=u,this.map=null,this.shadow=new GB}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){super.dispose(),this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.map=e.map,this.shadow=e.shadow.clone(),this}toJSON(e){const t=super.toJSON(e);return t.object.distance=this.distance,t.object.angle=this.angle,t.object.decay=this.decay,t.object.penumbra=this.penumbra,t.object.target=this.target.uuid,this.map&&this.map.isTexture&&(t.object.map=this.map.toJSON(e).uuid),t.object.shadow=this.shadow.toJSON(),t}}class HB extends BS{constructor(){super(new gs(90,1,.5,500)),this.isPointLightShadow=!0}}class IS extends nu{constructor(e,t,n=0,s=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=s,this.shadow=new HB}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){super.dispose(),this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}toJSON(e){const t=super.toJSON(e);return t.object.distance=this.distance,t.object.decay=this.decay,t.object.shadow=this.shadow.toJSON(),t}}class iu extends s_{constructor(e=-1,t=1,n=1,s=-1,o=.1,u=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=s,this.near=o,this.far=u,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,n,s,o,u){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=n,this.view.offsetY=s,this.view.width=o,this.view.height=u,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),n=(this.right+this.left)/2,s=(this.top+this.bottom)/2;let o=n-e,u=n+e,h=s+t,d=s-t;if(this.view!==null&&this.view.enabled){const g=(this.right-this.left)/this.view.fullWidth/this.zoom,y=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=g*this.view.offsetX,u=o+g*this.view.width,h-=y*this.view.offsetY,d=h-y*this.view.height}this.projectionMatrix.makeOrthographic(o,u,h,d,this.near,this.far,this.coordinateSystem,this.reversedDepth),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}}class kB extends BS{constructor(){super(new iu(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class LS extends nu{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Gn.DEFAULT_UP),this.updateMatrix(),this.target=new Gn,this.shadow=new kB}dispose(){super.dispose(),this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}toJSON(e){const t=super.toJSON(e);return t.object.shadow=this.shadow.toJSON(),t.object.target=this.target.uuid,t}}class xT extends nu{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class AT extends nu{constructor(e,t,n=10,s=10){super(e,t),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=n,this.height=s}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}class US{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new K)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,s=e.y,o=e.z,u=this.coefficients;return t.copy(u[0]).multiplyScalar(.282095),t.addScaledVector(u[1],.488603*s),t.addScaledVector(u[2],.488603*o),t.addScaledVector(u[3],.488603*n),t.addScaledVector(u[4],1.092548*(n*s)),t.addScaledVector(u[5],1.092548*(s*o)),t.addScaledVector(u[6],.315392*(3*o*o-1)),t.addScaledVector(u[7],1.092548*(n*o)),t.addScaledVector(u[8],.546274*(n*n-s*s)),t}getIrradianceAt(e,t){const n=e.x,s=e.y,o=e.z,u=this.coefficients;return t.copy(u[0]).multiplyScalar(.886227),t.addScaledVector(u[1],2*.511664*s),t.addScaledVector(u[2],2*.511664*o),t.addScaledVector(u[3],2*.511664*n),t.addScaledVector(u[4],2*.429043*n*s),t.addScaledVector(u[5],2*.429043*s*o),t.addScaledVector(u[6],.743125*o*o-.247708),t.addScaledVector(u[7],2*.429043*n*o),t.addScaledVector(u[8],.429043*(n*n-s*s)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let s=0;s<9;s++)n[s].fromArray(e,t+s*3);return this}toArray(e=[],t=0){const n=this.coefficients;for(let s=0;s<9;s++)n[s].toArray(e,t+s*3);return e}static getBasisAt(e,t){const n=e.x,s=e.y,o=e.z;t[0]=.282095,t[1]=.488603*s,t[2]=.488603*o,t[3]=.488603*n,t[4]=1.092548*n*s,t[5]=1.092548*s*o,t[6]=.315392*(3*o*o-1),t[7]=1.092548*n*o,t[8]=.546274*(n*n-s*s)}}class ST extends nu{constructor(e=new US,t=1){super(void 0,t),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}class E_ extends Xs{constructor(e){super(e),this.textures={}}load(e,t,n,s){const o=this,u=new Vs(o.manager);u.setPath(o.path),u.setRequestHeader(o.requestHeader),u.setWithCredentials(o.withCredentials),u.load(e,function(h){try{t(o.parse(JSON.parse(h)))}catch(d){s?s(d):Vt(d),o.manager.itemError(e)}},n,s)}parse(e){const t=this.textures;function n(o){return t[o]===void 0&&Mt("MaterialLoader: Undefined texture",o),t[o]}const s=this.createMaterialFromType(e.type);if(e.uuid!==void 0&&(s.uuid=e.uuid),e.name!==void 0&&(s.name=e.name),e.color!==void 0&&s.color!==void 0&&s.color.setHex(e.color),e.roughness!==void 0&&(s.roughness=e.roughness),e.metalness!==void 0&&(s.metalness=e.metalness),e.sheen!==void 0&&(s.sheen=e.sheen),e.sheenColor!==void 0&&(s.sheenColor=new Tt().setHex(e.sheenColor)),e.sheenRoughness!==void 0&&(s.sheenRoughness=e.sheenRoughness),e.emissive!==void 0&&s.emissive!==void 0&&s.emissive.setHex(e.emissive),e.specular!==void 0&&s.specular!==void 0&&s.specular.setHex(e.specular),e.specularIntensity!==void 0&&(s.specularIntensity=e.specularIntensity),e.specularColor!==void 0&&s.specularColor!==void 0&&s.specularColor.setHex(e.specularColor),e.shininess!==void 0&&(s.shininess=e.shininess),e.clearcoat!==void 0&&(s.clearcoat=e.clearcoat),e.clearcoatRoughness!==void 0&&(s.clearcoatRoughness=e.clearcoatRoughness),e.dispersion!==void 0&&(s.dispersion=e.dispersion),e.iridescence!==void 0&&(s.iridescence=e.iridescence),e.iridescenceIOR!==void 0&&(s.iridescenceIOR=e.iridescenceIOR),e.iridescenceThicknessRange!==void 0&&(s.iridescenceThicknessRange=e.iridescenceThicknessRange),e.transmission!==void 0&&(s.transmission=e.transmission),e.thickness!==void 0&&(s.thickness=e.thickness),e.attenuationDistance!==void 0&&(s.attenuationDistance=e.attenuationDistance),e.attenuationColor!==void 0&&s.attenuationColor!==void 0&&s.attenuationColor.setHex(e.attenuationColor),e.anisotropy!==void 0&&(s.anisotropy=e.anisotropy),e.anisotropyRotation!==void 0&&(s.anisotropyRotation=e.anisotropyRotation),e.fog!==void 0&&(s.fog=e.fog),e.flatShading!==void 0&&(s.flatShading=e.flatShading),e.blending!==void 0&&(s.blending=e.blending),e.combine!==void 0&&(s.combine=e.combine),e.side!==void 0&&(s.side=e.side),e.shadowSide!==void 0&&(s.shadowSide=e.shadowSide),e.opacity!==void 0&&(s.opacity=e.opacity),e.transparent!==void 0&&(s.transparent=e.transparent),e.alphaTest!==void 0&&(s.alphaTest=e.alphaTest),e.alphaHash!==void 0&&(s.alphaHash=e.alphaHash),e.depthFunc!==void 0&&(s.depthFunc=e.depthFunc),e.depthTest!==void 0&&(s.depthTest=e.depthTest),e.depthWrite!==void 0&&(s.depthWrite=e.depthWrite),e.colorWrite!==void 0&&(s.colorWrite=e.colorWrite),e.blendSrc!==void 0&&(s.blendSrc=e.blendSrc),e.blendDst!==void 0&&(s.blendDst=e.blendDst),e.blendEquation!==void 0&&(s.blendEquation=e.blendEquation),e.blendSrcAlpha!==void 0&&(s.blendSrcAlpha=e.blendSrcAlpha),e.blendDstAlpha!==void 0&&(s.blendDstAlpha=e.blendDstAlpha),e.blendEquationAlpha!==void 0&&(s.blendEquationAlpha=e.blendEquationAlpha),e.blendColor!==void 0&&s.blendColor!==void 0&&s.blendColor.setHex(e.blendColor),e.blendAlpha!==void 0&&(s.blendAlpha=e.blendAlpha),e.stencilWriteMask!==void 0&&(s.stencilWriteMask=e.stencilWriteMask),e.stencilFunc!==void 0&&(s.stencilFunc=e.stencilFunc),e.stencilRef!==void 0&&(s.stencilRef=e.stencilRef),e.stencilFuncMask!==void 0&&(s.stencilFuncMask=e.stencilFuncMask),e.stencilFail!==void 0&&(s.stencilFail=e.stencilFail),e.stencilZFail!==void 0&&(s.stencilZFail=e.stencilZFail),e.stencilZPass!==void 0&&(s.stencilZPass=e.stencilZPass),e.stencilWrite!==void 0&&(s.stencilWrite=e.stencilWrite),e.wireframe!==void 0&&(s.wireframe=e.wireframe),e.wireframeLinewidth!==void 0&&(s.wireframeLinewidth=e.wireframeLinewidth),e.wireframeLinecap!==void 0&&(s.wireframeLinecap=e.wireframeLinecap),e.wireframeLinejoin!==void 0&&(s.wireframeLinejoin=e.wireframeLinejoin),e.rotation!==void 0&&(s.rotation=e.rotation),e.linewidth!==void 0&&(s.linewidth=e.linewidth),e.dashSize!==void 0&&(s.dashSize=e.dashSize),e.gapSize!==void 0&&(s.gapSize=e.gapSize),e.scale!==void 0&&(s.scale=e.scale),e.polygonOffset!==void 0&&(s.polygonOffset=e.polygonOffset),e.polygonOffsetFactor!==void 0&&(s.polygonOffsetFactor=e.polygonOffsetFactor),e.polygonOffsetUnits!==void 0&&(s.polygonOffsetUnits=e.polygonOffsetUnits),e.dithering!==void 0&&(s.dithering=e.dithering),e.alphaToCoverage!==void 0&&(s.alphaToCoverage=e.alphaToCoverage),e.premultipliedAlpha!==void 0&&(s.premultipliedAlpha=e.premultipliedAlpha),e.forceSinglePass!==void 0&&(s.forceSinglePass=e.forceSinglePass),e.allowOverride!==void 0&&(s.allowOverride=e.allowOverride),e.visible!==void 0&&(s.visible=e.visible),e.toneMapped!==void 0&&(s.toneMapped=e.toneMapped),e.userData!==void 0&&(s.userData=e.userData),e.vertexColors!==void 0&&(typeof e.vertexColors=="number"?s.vertexColors=e.vertexColors>0:s.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const o in e.uniforms){const u=e.uniforms[o];switch(s.uniforms[o]={},u.type){case"t":s.uniforms[o].value=n(u.value);break;case"c":s.uniforms[o].value=new Tt().setHex(u.value);break;case"v2":s.uniforms[o].value=new We().fromArray(u.value);break;case"v3":s.uniforms[o].value=new K().fromArray(u.value);break;case"v4":s.uniforms[o].value=new li().fromArray(u.value);break;case"m3":s.uniforms[o].value=new dn().fromArray(u.value);break;case"m4":s.uniforms[o].value=new jt().fromArray(u.value);break;default:s.uniforms[o].value=u.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 o in e.extensions)s.extensions[o]=e.extensions[o];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=n(e.map)),e.matcap!==void 0&&(s.matcap=n(e.matcap)),e.alphaMap!==void 0&&(s.alphaMap=n(e.alphaMap)),e.bumpMap!==void 0&&(s.bumpMap=n(e.bumpMap)),e.bumpScale!==void 0&&(s.bumpScale=e.bumpScale),e.normalMap!==void 0&&(s.normalMap=n(e.normalMap)),e.normalMapType!==void 0&&(s.normalMapType=e.normalMapType),e.normalScale!==void 0){let o=e.normalScale;Array.isArray(o)===!1&&(o=[o,o]),s.normalScale=new We().fromArray(o)}return e.displacementMap!==void 0&&(s.displacementMap=n(e.displacementMap)),e.displacementScale!==void 0&&(s.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(s.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(s.roughnessMap=n(e.roughnessMap)),e.metalnessMap!==void 0&&(s.metalnessMap=n(e.metalnessMap)),e.emissiveMap!==void 0&&(s.emissiveMap=n(e.emissiveMap)),e.emissiveIntensity!==void 0&&(s.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(s.specularMap=n(e.specularMap)),e.specularIntensityMap!==void 0&&(s.specularIntensityMap=n(e.specularIntensityMap)),e.specularColorMap!==void 0&&(s.specularColorMap=n(e.specularColorMap)),e.envMap!==void 0&&(s.envMap=n(e.envMap)),e.envMapRotation!==void 0&&s.envMapRotation.fromArray(e.envMapRotation),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=n(e.lightMap)),e.lightMapIntensity!==void 0&&(s.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(s.aoMap=n(e.aoMap)),e.aoMapIntensity!==void 0&&(s.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(s.gradientMap=n(e.gradientMap)),e.clearcoatMap!==void 0&&(s.clearcoatMap=n(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(s.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(s.clearcoatNormalMap=n(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(s.clearcoatNormalScale=new We().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(s.iridescenceMap=n(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(s.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(s.transmissionMap=n(e.transmissionMap)),e.thicknessMap!==void 0&&(s.thicknessMap=n(e.thicknessMap)),e.anisotropyMap!==void 0&&(s.anisotropyMap=n(e.anisotropyMap)),e.sheenColorMap!==void 0&&(s.sheenColorMap=n(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(s.sheenRoughnessMap=n(e.sheenRoughnessMap)),s}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return E_.createMaterialFromType(e)}static createMaterialFromType(e){const t={ShadowMaterial:rT,SpriteMaterial:fS,RawShaderMaterial:bS,ShaderMaterial:br,PointsMaterial:u_,MeshPhysicalMaterial:za,MeshStandardMaterial:ag,MeshPhongMaterial:aT,MeshToonMaterial:oT,MeshNormalMaterial:lT,MeshLambertMaterial:cT,MeshDepthMaterial:MS,MeshDistanceMaterial:ES,MeshBasicMaterial:Yr,MeshMatcapMaterial:uT,LineDashedMaterial:fT,LineBasicMaterial:rr,Material:ys};return new t[e]}}class Yc{static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class bT extends rn{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class MT extends Xs{constructor(e){super(e)}load(e,t,n,s){const o=this,u=new Vs(o.manager);u.setPath(o.path),u.setRequestHeader(o.requestHeader),u.setWithCredentials(o.withCredentials),u.load(e,function(h){try{t(o.parse(JSON.parse(h)))}catch(d){s?s(d):Vt(d),o.manager.itemError(e)}},n,s)}parse(e){const t={},n={};function s(S,M){if(t[M]!==void 0)return t[M];const C=S.interleavedBuffers[M],E=o(S,C.buffer),B=rd(C.type,E),D=new $m(B,C.stride);return D.uuid=C.uuid,t[M]=D,D}function o(S,M){if(n[M]!==void 0)return n[M];const C=S.arrayBuffers[M],E=new Uint32Array(C).buffer;return n[M]=E,E}const u=e.isInstancedBufferGeometry?new bT:new rn,h=e.data.index;if(h!==void 0){const S=rd(h.type,h.array);u.setIndex(new Wn(S,1))}const d=e.data.attributes;for(const S in d){const M=d[S];let w;if(M.isInterleavedBufferAttribute){const C=s(e.data,M.data);w=new jc(C,M.itemSize,M.offset,M.normalized)}else{const C=rd(M.type,M.array),E=M.isInstancedBufferAttribute?xf:Wn;w=new E(C,M.itemSize,M.normalized)}M.name!==void 0&&(w.name=M.name),M.usage!==void 0&&w.setUsage(M.usage),u.setAttribute(S,w)}const g=e.data.morphAttributes;if(g)for(const S in g){const M=g[S],w=[];for(let C=0,E=M.length;C<E;C++){const B=M[C];let D;if(B.isInterleavedBufferAttribute){const U=s(e.data,B.data);D=new jc(U,B.itemSize,B.offset,B.normalized)}else{const U=rd(B.type,B.array);D=new Wn(U,B.itemSize,B.normalized)}B.name!==void 0&&(D.name=B.name),w.push(D)}u.morphAttributes[S]=w}e.data.morphTargetsRelative&&(u.morphTargetsRelative=!0);const v=e.data.groups||e.data.drawcalls||e.data.offsets;if(v!==void 0)for(let S=0,M=v.length;S!==M;++S){const w=v[S];u.addGroup(w.start,w.count,w.materialIndex)}const x=e.data.boundingSphere;return x!==void 0&&(u.boundingSphere=new vs().fromJSON(x)),e.name&&(u.name=e.name),e.userData&&(u.userData=e.userData),u}}class VB extends Xs{constructor(e){super(e)}load(e,t,n,s){const o=this,u=this.path===""?Yc.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||u;const h=new Vs(this.manager);h.setPath(this.path),h.setRequestHeader(this.requestHeader),h.setWithCredentials(this.withCredentials),h.load(e,function(d){let g=null;try{g=JSON.parse(d)}catch(v){s!==void 0&&s(v),v("ObjectLoader: Can't parse "+e+".",v.message);return}const y=g.metadata;if(y===void 0||y.type===void 0||y.type.toLowerCase()==="geometry"){s!==void 0&&s(new Error("THREE.ObjectLoader: Can't load "+e)),Vt("ObjectLoader: Can't load "+e);return}o.parse(g,t)},n,s)}async loadAsync(e,t){const n=this,s=this.path===""?Yc.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||s;const o=new Vs(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials);const u=await o.loadAsync(e,t),h=JSON.parse(u),d=h.metadata;if(d===void 0||d.type===void 0||d.type.toLowerCase()==="geometry")throw new Error("THREE.ObjectLoader: Can't load "+e);return await n.parseAsync(h)}parse(e,t){const n=this.parseAnimations(e.animations),s=this.parseShapes(e.shapes),o=this.parseGeometries(e.geometries,s),u=this.parseImages(e.images,function(){t!==void 0&&t(g)}),h=this.parseTextures(e.textures,u),d=this.parseMaterials(e.materials,h),g=this.parseObject(e.object,o,d,h,n),y=this.parseSkeletons(e.skeletons,g);if(this.bindSkeletons(g,y),this.bindLightTargets(g),t!==void 0){let v=!1;for(const x in u)if(u[x].data instanceof HTMLImageElement){v=!0;break}v===!1&&t(g)}return g}async parseAsync(e){const t=this.parseAnimations(e.animations),n=this.parseShapes(e.shapes),s=this.parseGeometries(e.geometries,n),o=await this.parseImagesAsync(e.images),u=this.parseTextures(e.textures,o),h=this.parseMaterials(e.materials,u),d=this.parseObject(e.object,s,h,u,t),g=this.parseSkeletons(e.skeletons,d);return this.bindSkeletons(d,g),this.bindLightTargets(d),d}parseShapes(e){const t={};if(e!==void 0)for(let n=0,s=e.length;n<s;n++){const o=new vf().fromJSON(e[n]);t[o.uuid]=o}return t}parseSkeletons(e,t){const n={},s={};if(t.traverse(function(o){o.isBone&&(s[o.uuid]=o)}),e!==void 0)for(let o=0,u=e.length;o<u;o++){const h=new eg().fromJSON(e[o],s);n[h.uuid]=h}return n}parseGeometries(e,t){const n={};if(e!==void 0){const s=new MT;for(let o=0,u=e.length;o<u;o++){let h;const d=e[o];switch(d.type){case"BufferGeometry":case"InstancedBufferGeometry":h=s.parse(d);break;default:d.type in FM?h=FM[d.type].fromJSON(d,t):Mt(`ObjectLoader: Unsupported geometry type "${d.type}"`)}h.uuid=d.uuid,d.name!==void 0&&(h.name=d.name),d.userData!==void 0&&(h.userData=d.userData),n[d.uuid]=h}}return n}parseMaterials(e,t){const n={},s={};if(e!==void 0){const o=new E_;o.setTextures(t);for(let u=0,h=e.length;u<h;u++){const d=e[u];n[d.uuid]===void 0&&(n[d.uuid]=o.parse(d)),s[d.uuid]=n[d.uuid]}}return s}parseAnimations(e){const t={};if(e!==void 0)for(let n=0;n<e.length;n++){const s=e[n],o=Md.parse(s);t[o.uuid]=o}return t}parseImages(e,t){const n=this,s={};let o;function u(d){return n.manager.itemStart(d),o.load(d,function(){n.manager.itemEnd(d)},void 0,function(){n.manager.itemError(d),n.manager.itemEnd(d)})}function h(d){if(typeof d=="string"){const g=d,y=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(g)?g:n.resourcePath+g;return u(y)}else return d.data?{data:rd(d.type,d.data),width:d.width,height:d.height}:null}if(e!==void 0&&e.length>0){const d=new M_(t);o=new km(d),o.setCrossOrigin(this.crossOrigin);for(let g=0,y=e.length;g<y;g++){const v=e[g],x=v.url;if(Array.isArray(x)){const S=[];for(let M=0,w=x.length;M<w;M++){const C=x[M],E=h(C);E!==null&&(E instanceof HTMLImageElement?S.push(E):S.push(new Pa(E.data,E.width,E.height)))}s[v.uuid]=new Xc(S)}else{const S=h(v.url);s[v.uuid]=new Xc(S)}}}return s}async parseImagesAsync(e){const t=this,n={};let s;async function o(u){if(typeof u=="string"){const h=u,d=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(h)?h:t.resourcePath+h;return await s.loadAsync(d)}else return u.data?{data:rd(u.type,u.data),width:u.width,height:u.height}:null}if(e!==void 0&&e.length>0){s=new km(this.manager),s.setCrossOrigin(this.crossOrigin);for(let u=0,h=e.length;u<h;u++){const d=e[u],g=d.url;if(Array.isArray(g)){const y=[];for(let v=0,x=g.length;v<x;v++){const S=g[v],M=await o(S);M!==null&&(M instanceof HTMLImageElement?y.push(M):y.push(new Pa(M.data,M.width,M.height)))}n[d.uuid]=new Xc(y)}else{const y=await o(d.url);n[d.uuid]=new Xc(y)}}}return n}parseTextures(e,t){function n(o,u){return typeof o=="number"?o:(Mt("ObjectLoader.parseTexture: Constant should be in numeric form.",o),u[o])}const s={};if(e!==void 0)for(let o=0,u=e.length;o<u;o++){const h=e[o];h.image===void 0&&Mt('ObjectLoader: No "image" specified for',h.uuid),t[h.image]===void 0&&Mt("ObjectLoader: Undefined image",h.image);const d=t[h.image],g=d.data;let y;Array.isArray(g)?(y=new Qm,g.length===6&&(y.needsUpdate=!0)):(g&&g.data?y=new Pa:y=new ei,g&&(y.needsUpdate=!0)),y.source=d,y.uuid=h.uuid,h.name!==void 0&&(y.name=h.name),h.mapping!==void 0&&(y.mapping=n(h.mapping,XB)),h.channel!==void 0&&(y.channel=h.channel),h.offset!==void 0&&y.offset.fromArray(h.offset),h.repeat!==void 0&&y.repeat.fromArray(h.repeat),h.center!==void 0&&y.center.fromArray(h.center),h.rotation!==void 0&&(y.rotation=h.rotation),h.wrap!==void 0&&(y.wrapS=n(h.wrap[0],zM),y.wrapT=n(h.wrap[1],zM)),h.format!==void 0&&(y.format=h.format),h.internalFormat!==void 0&&(y.internalFormat=h.internalFormat),h.type!==void 0&&(y.type=h.type),h.colorSpace!==void 0&&(y.colorSpace=h.colorSpace),h.minFilter!==void 0&&(y.minFilter=n(h.minFilter,GM)),h.magFilter!==void 0&&(y.magFilter=n(h.magFilter,GM)),h.anisotropy!==void 0&&(y.anisotropy=h.anisotropy),h.flipY!==void 0&&(y.flipY=h.flipY),h.generateMipmaps!==void 0&&(y.generateMipmaps=h.generateMipmaps),h.premultiplyAlpha!==void 0&&(y.premultiplyAlpha=h.premultiplyAlpha),h.unpackAlignment!==void 0&&(y.unpackAlignment=h.unpackAlignment),h.compareFunction!==void 0&&(y.compareFunction=h.compareFunction),h.userData!==void 0&&(y.userData=h.userData),s[h.uuid]=y}return s}parseObject(e,t,n,s,o){let u;function h(x){return t[x]===void 0&&Mt("ObjectLoader: Undefined geometry",x),t[x]}function d(x){if(x!==void 0){if(Array.isArray(x)){const S=[];for(let M=0,w=x.length;M<w;M++){const C=x[M];n[C]===void 0&&Mt("ObjectLoader: Undefined material",C),S.push(n[C])}return S}return n[x]===void 0&&Mt("ObjectLoader: Undefined material",x),n[x]}}function g(x){return s[x]===void 0&&Mt("ObjectLoader: Undefined texture",x),s[x]}let y,v;switch(e.type){case"Scene":u=new jm,e.background!==void 0&&(Number.isInteger(e.background)?u.background=new Tt(e.background):u.background=g(e.background)),e.environment!==void 0&&(u.environment=g(e.environment)),e.fog!==void 0&&(e.fog.type==="Fog"?u.fog=new o_(e.fog.color,e.fog.near,e.fog.far):e.fog.type==="FogExp2"&&(u.fog=new a_(e.fog.color,e.fog.density)),e.fog.name!==""&&(u.fog.name=e.fog.name)),e.backgroundBlurriness!==void 0&&(u.backgroundBlurriness=e.backgroundBlurriness),e.backgroundIntensity!==void 0&&(u.backgroundIntensity=e.backgroundIntensity),e.backgroundRotation!==void 0&&u.backgroundRotation.fromArray(e.backgroundRotation),e.environmentIntensity!==void 0&&(u.environmentIntensity=e.environmentIntensity),e.environmentRotation!==void 0&&u.environmentRotation.fromArray(e.environmentRotation);break;case"PerspectiveCamera":u=new gs(e.fov,e.aspect,e.near,e.far),e.focus!==void 0&&(u.focu
vendor: 4,306 bytes, line 76
76s=e.focus),e.zoom!==void 0&&(u.zoom=e.zoom),e.filmGauge!==void 0&&(u.filmGauge=e.filmGauge),e.filmOffset!==void 0&&(u.filmOffset=e.filmOffset),e.view!==void 0&&(u.view=Object.assign({},e.view));break;case"OrthographicCamera":u=new iu(e.left,e.right,e.top,e.bottom,e.near,e.far),e.zoom!==void 0&&(u.zoom=e.zoom),e.view!==void 0&&(u.view=Object.assign({},e.view));break;case"AmbientLight":u=new xT(e.color,e.intensity);break;case"DirectionalLight":u=new LS(e.color,e.intensity),u.target=e.target||"";break;case"PointLight":u=new IS(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":u=new AT(e.color,e.intensity,e.width,e.height);break;case"SpotLight":u=new DS(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay),u.target=e.target||"";break;case"HemisphereLight":u=new _T(e.color,e.groundColor,e.intensity);break;case"LightProbe":const x=new US().fromArray(e.sh);u=new ST(x,e.intensity);break;case"SkinnedMesh":y=h(e.geometry),v=d(e.material),u=new hS(y,v),e.bindMode!==void 0&&(u.bindMode=e.bindMode),e.bindMatrix!==void 0&&u.bindMatrix.fromArray(e.bindMatrix),e.skeleton!==void 0&&(u.skeleton=e.skeleton);break;case"Mesh":y=h(e.geometry),v=d(e.material),u=new wi(y,v);break;case"InstancedMesh":y=h(e.geometry),v=d(e.material);const S=e.count,M=e.instanceMatrix,w=e.instanceColor;u=new dS(y,v,S),u.instanceMatrix=new xf(new Float32Array(M.array),16),w!==void 0&&(u.instanceColor=new xf(new Float32Array(w.array),w.itemSize));break;case"BatchedMesh":y=h(e.geometry),v=d(e.material),u=new WE(e.maxInstanceCount,e.maxVertexCount,e.maxIndexCount,v),u.geometry=y,u.perObjectFrustumCulled=e.perObjectFrustumCulled,u.sortObjects=e.sortObjects,u._drawRanges=e.drawRanges,u._reservedRanges=e.reservedRanges,u._geometryInfo=e.geometryInfo.map(C=>{let E=null,B=null;return C.boundingBox!==void 0&&(E=new Rs().fromJSON(C.boundingBox)),C.boundingSphere!==void 0&&(B=new vs().fromJSON(C.boundingSphere)),{...C,boundingBox:E,boundingSphere:B}}),u._instanceInfo=e.instanceInfo,u._availableInstanceIds=e._availableInstanceIds,u._availableGeometryIds=e._availableGeometryIds,u._nextIndexStart=e.nextIndexStart,u._nextVertexStart=e.nextVertexStart,u._geometryCount=e.geometryCount,u._maxInstanceCount=e.maxInstanceCount,u._maxVertexCount=e.maxVertexCount,u._maxIndexCount=e.maxIndexCount,u._geometryInitialized=e.geometryInitialized,u._matricesTexture=g(e.matricesTexture.uuid),u._indirectTexture=g(e.indirectTexture.uuid),e.colorsTexture!==void 0&&(u._colorsTexture=g(e.colorsTexture.uuid)),e.boundingSphere!==void 0&&(u.boundingSphere=new vs().fromJSON(e.boundingSphere)),e.boundingBox!==void 0&&(u.boundingBox=new Rs().fromJSON(e.boundingBox));break;case"LOD":u=new XE;break;case"Line":u=new Hl(h(e.geometry),d(e.material));break;case"LineLoop":u=new pS(h(e.geometry),d(e.material));break;case"LineSegments":u=new mo(h(e.geometry),d(e.material));break;case"PointCloud":case"Points":u=new mS(h(e.geometry),d(e.material));break;case"Sprite":u=new VE(d(e.material));break;case"Group":u=new Pl;break;case"Bone":u=new l_;break;default:u=new Gn}if(u.uuid=e.uuid,e.name!==void 0&&(u.name=e.name),e.matrix!==void 0?(u.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(u.matrixAutoUpdate=e.matrixAutoUpdate),u.matrixAutoUpdate&&u.matrix.decompose(u.position,u.quaternion,u.scale)):(e.position!==void 0&&u.position.fromArray(e.position),e.rotation!==void 0&&u.rotation.fromArray(e.rotation),e.quaternion!==void 0&&u.quaternion.fromArray(e.quaternion),e.scale!==void 0&&u.scale.fromArray(e.scale)),e.up!==void 0&&u.up.fromArray(e.up),e.castShadow!==void 0&&(u.castShadow=e.castShadow),e.receiveShadow!==void 0&&(u.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(u.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(u.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(u.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(u.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&u.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(u.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(u.visible=e.visible),e.frustumCulled!==void 0&&(u.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(u.renderOrder=e.renderOrder),e.userData!==void 0&&(u.userData=e.userData),e.layers!==void 0&&(u.layers.mask=e.layers
vendor: 7,193 bytes, line 76
76),e.children!==void 0){const x=e.children;for(let S=0;S<x.length;S++)u.add(this.parseObject(x[S],t,n,s,o))}if(e.animations!==void 0){const x=e.animations;for(let S=0;S<x.length;S++){const M=x[S];u.animations.push(o[M])}}if(e.type==="LOD"){e.autoUpdate!==void 0&&(u.autoUpdate=e.autoUpdate);const x=e.levels;for(let S=0;S<x.length;S++){const M=x[S],w=u.getObjectByProperty("uuid",M.object);w!==void 0&&u.addLevel(w,M.distance,M.hysteresis)}}return u}bindSkeletons(e,t){Object.keys(t).length!==0&&e.traverse(function(n){if(n.isSkinnedMesh===!0&&n.skeleton!==void 0){const s=t[n.skeleton];s===void 0?Mt("ObjectLoader: No skeleton found with UUID:",n.skeleton):n.bind(s,n.bindMatrix)}})}bindLightTargets(e){e.traverse(function(t){if(t.isDirectionalLight||t.isSpotLight){const n=t.target,s=e.getObjectByProperty("uuid",n);s!==void 0?t.target=s:t.target=new Gn}})}}const XB={UVMapping:qc,CubeReflectionMapping:ho,CubeRefractionMapping:Kc,EquirectangularReflectionMapping:fd,EquirectangularRefractionMapping:Lm,CubeUVReflectionMapping:Td},zM={RepeatWrapping:Zc,ClampToEdgeWrapping:Fi,MirroredRepeatWrapping:hd},GM={NearestFilter:Xi,NearestMipmapNearestFilter:Jy,NearestMipmapLinearFilter:lf,LinearFilter:Un,LinearMipmapNearestFilter:od,LinearMipmapLinearFilter:Fa},Jx=new WeakMap;class ET extends Xs{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&Mt("ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&Mt("ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(e){return this.options=e,this}load(e,t,n,s){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,u=Ko.get(`image-bitmap:${e}`);if(u!==void 0){if(o.manager.itemStart(e),u.then){u.then(g=>{if(Jx.has(u)===!0)s&&s(Jx.get(u)),o.manager.itemError(e),o.manager.itemEnd(e);else return t&&t(g),o.manager.itemEnd(e),g});return}return setTimeout(function(){t&&t(u),o.manager.itemEnd(e)},0),u}const h={};h.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",h.headers=this.requestHeader,h.signal=typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const d=fetch(e,h).then(function(g){return g.blob()}).then(function(g){return createImageBitmap(g,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(g){return Ko.add(`image-bitmap:${e}`,g),t&&t(g),o.manager.itemEnd(e),g}).catch(function(g){s&&s(g),Jx.set(d,g),Ko.remove(`image-bitmap:${e}`),o.manager.itemError(e),o.manager.itemEnd(e)});Ko.add(`image-bitmap:${e}`,d),o.manager.itemStart(e)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}let Cv;class NS{static getContext(){return Cv===void 0&&(Cv=new(window.AudioContext||window.webkitAudioContext)),Cv}static setContext(e){Cv=e}}class WB extends Xs{constructor(e){super(e)}load(e,t,n,s){const o=this,u=new Vs(this.manager);u.setResponseType("arraybuffer"),u.setPath(this.path),u.setRequestHeader(this.requestHeader),u.setWithCredentials(this.withCredentials),u.load(e,function(d){try{const g=d.slice(0);NS.getContext().decodeAudioData(g,function(v){t(v)}).catch(h)}catch(g){h(g)}},n,s);function h(d){s?s(d):Vt(d),o.manager.itemError(e)}}}const HM=new jt,kM=new jt,Ku=new jt;class JB{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new gs,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new gs,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,Ku.copy(e.projectionMatrix);const s=t.eyeSep/2,o=s*t.near/t.focus,u=t.near*Math.tan(gf*t.fov*.5)/t.zoom;let h,d;kM.elements[12]=-s,HM.elements[12]=s,h=-u*t.aspect+o,d=u*t.aspect+o,Ku.elements[0]=2*t.near/(d-h),Ku.elements[8]=(d+h)/(d-h),this.cameraL.projectionMatrix.copy(Ku),h=-u*t.aspect-o,d=u*t.aspect-o,Ku.elements[0]=2*t.near/(d-h),Ku.elements[8]=(d+h)/(d-h),this.cameraR.projectionMatrix.copy(Ku)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(kM),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(HM)}}class TT extends gs{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class FS{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=performance.now(),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=performance.now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}const Zu=new K,Yx=new sr,YB=new K,Qu=new K,ju=new K;class qB extends Gn{constructor(){super(),this.type="AudioListener",this.context=NS.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new FS}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;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Zu,Yx,YB),Qu.set(0,0,-1).applyQuaternion(Yx),ju.set(0,1,0).applyQuaternion(Yx),t.positionX){const n=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Zu.x,n),t.positionY.linearRampToValueAtTime(Zu.y,n),t.positionZ.linearRampToValueAtTime(Zu.z,n),t.forwardX.linearRampToValueAtTime(Qu.x,n),t.forwardY.linearRampToValueAtTime(Qu.y,n),t.forwardZ.linearRampToValueAtTime(Qu.z,n),t.upX.linearRampToValueAtTime(ju.x,n),t.upY.linearRampToValueAtTime(ju.y,n),t.upZ.linearRampToValueAtTime(ju.z,n)}else t.setPosition(Zu.x,Zu.y,Zu.z),t.setOrientation(Qu.x,Qu.y,Qu.z,ju.x,ju.y,ju.z)}}class CT extends Gn{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
vendor: 4,110 bytes, line 76
76=!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){Mt("Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){Mt("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){Mt("Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(e=0){if(this.hasPlaybackControl===!1){Mt("Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this._connected!==!1){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}}getFilters(){return this.filters}setFilters(e){return e||(e=[]),this._connected===!0?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){return this.detune=e,this.isPlaying===!0&&this.source.detune!==void 0&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(this.hasPlaybackControl===!1){Mt("Audio: this Audio has no playback control.");return}return this.playbackRate=e,this.isPlaying===!0&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1,this._progress=0}getLoop(){return this.hasPlaybackControl===!1?(Mt("Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(this.hasPlaybackControl===!1){Mt("Audio: this Audio has no playback control.");return}return this.loop=e,this.isPlaying===!0&&(this.source.loop=this.loop),this}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}copy(e,t){return super.copy(e,t),e.sourceType!=="buffer"?(Mt("Audio: Audio source type cannot be copied."),this):(this.autoplay=e.autoplay,this.buffer=e.buffer,this.detune=e.detune,this.loop=e.loop,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this.offset=e.offset,this.duration=e.duration,this.playbackRate=e.playbackRate,this.hasPlaybackControl
vendor: 13,393 bytes, line 76
76=e.hasPlaybackControl,this.sourceType=e.sourceType,this.filters=e.filters.slice(),this)}clone(e){return new this.constructor(this.listener).copy(this,e)}}const $u=new K,VM=new sr,KB=new K,ef=new K;class ZB extends CT{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}connect(){return super.connect(),this.panner.connect(this.gain),this}disconnect(){return super.disconnect(),this.panner.disconnect(this.gain),this}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,t,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=n,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),this.hasPlaybackControl===!0&&this.isPlaying===!1)return;this.matrixWorld.decompose($u,VM,KB),ef.set(0,0,1).applyQuaternion(VM);const t=this.panner;if(t.positionX){const n=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime($u.x,n),t.positionY.linearRampToValueAtTime($u.y,n),t.positionZ.linearRampToValueAtTime($u.z,n),t.orientationX.linearRampToValueAtTime(ef.x,n),t.orientationY.linearRampToValueAtTime(ef.y,n),t.orientationZ.linearRampToValueAtTime(ef.z,n)}else t.setPosition($u.x,$u.y,$u.z),t.setOrientation(ef.x,ef.y,ef.z)}}class QB{constructor(e,t=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const t=this.getFrequencyData();for(let n=0;n<t.length;n++)e+=t[n];return e/t.length}}class wT{constructor(e,t,n){this.binding=e,this.valueSize=n;let s,o,u;switch(t){case"quaternion":s=this._slerp,o=this._slerpAdditive,u=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(n*6),this._workIndex=5;break;case"string":case"bool":s=this._select,o=this._select,u=this._setAdditiveIdentityOther,this.buffer=new Array(n*5);break;default:s=this._lerp,o=this._lerpAdditive,u=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(n*5)}this._mixBufferRegion=s,this._mixBufferRegionAdditive=o,this._setIdentity=u,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,s=this.valueSize,o=e*s+s;let u=this.cumulativeWeight;if(u===0){for(let h=0;h!==s;++h)n[o+h]=n[h];u=t}else{u+=t;const h=t/u;this._mixBufferRegion(n,o,0,h,s)}this.cumulativeWeight=u}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,s=n*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(t,s,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,s=e*t+t,o=this.cumulativeWeight,u=this.cumulativeWeightAdditive,h=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,o<1){const d=t*this._origIndex;this._mixBufferRegion(n,s,d,1-o,t)}u>0&&this._mixBufferRegionAdditive(n,s,this._addIndex*t,1,t);for(let d=t,g=t+t;d!==g;++d)if(n[d]!==n[d+t]){h.setValue(n,s);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,s=n*this._origIndex;e.getValue(t,s);for(let o=n,u=s;o!==u;++o)t[o]=t[s+o%n];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 n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,s,o){if(s>=.5)for(let u=0;u!==o;++u)e[t+u]=e[n+u]}_slerp(e,t,n,s){sr.slerpFlat(e,t,e,t,e,n,s)}_slerpAdditive(e,t,n,s,o){const u=this._workIndex*o;sr.multiplyQuaternionsFlat(e,u,e,t,e,n),sr.slerpFlat(e,t,e,t,e,u,s)}_lerp(e,t,n,s,o){const u=1-s;for(let h=0;h!==o;++h){const d=t+h;e[d]=e[d]*u+e[n+h]*s}}_lerpAdditive(e,t,n,s,o){for(let u=0;u!==o;++u){const h=t+u;e[h]=e[h]+e[n+u]*s}}}const OS="\\[\\]\\.:\\/",jB=new RegExp("["+OS+"]","g"),PS="[^"+OS+"]",$B="[^"+OS.replace("\\.","")+"]",e3=/((?:WC+[\/:])*)/.source.replace("WC",PS),t3=/(WCOD+)?/.source.replace("WCOD",$B),n3=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",PS),i3=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",PS),s3=new RegExp("^"+e3+t3+n3+i3+"$"),r3=["material","materials","bones","map"];class a3{constructor(e,t,n){const s=n||Vn.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,s)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,s=this._bindings[n];s!==void 0&&s.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let s=this._targetGroup.nCachedObjects_,o=n.length;s!==o;++s)n[s].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}}class Vn{constructor(e,t,n){this.path=t,this.parsedPath=n||Vn.parseTrackName(t),this.node=Vn.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new Vn.Composite(e,t,n):new Vn(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(jB,"")}static parseTrackName(e){const t=s3.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},s=n.nodeName&&n.nodeName.lastIndexOf(".");if(s!==void 0&&s!==-1){const o=n.nodeName.substring(s+1);r3.indexOf(o)!==-1&&(n.nodeName=n.nodeName.substring(0,s),n.objectName=o)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){const n=function(o){for(let u=0;u<o.length;u++){const h=o[u];if(h.name===t||h.uuid===t)return h;const d=n(h.children);if(d)return d}return null},s=n(e.children);if(s)return s}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let s=0,o=n.length;s!==o;++s)e[t++]=n[s]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let s=0,o=n.length;s!==o;++s)n[s]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let s=0,o=n.length;s!==o;++s)n[s]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let s=0,o=n.length;s!==o;++s)n[s]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,s=t.propertyName;let o=t.propertyIndex;if(e||(e=Vn.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){Mt("PropertyBinding: No target node found for track: "+this.path+".");return}if(n){let g=t.objectIndex;switch(n){case"materials":if(!e.material){Vt("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){Vt("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){Vt("PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let y=0;y<e.length;y++)if(e[y].name===g){g=y;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){Vt("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){Vt("PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[n]===void 0){Vt("PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[n]}if(g!==void 0){if(e[g]===void 0){Vt("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[g]}}const u=e[s];if(u===void 0){const g=t.nodeName;Vt("PropertyBinding: Trying to update property for track: "+g+"."+s+" but it wasn't found.",e);return}let h=this.Versioning.None;this.targetObject=e,e.isMaterial===!0?h=this.Versioning.NeedsUpdate:e.isObject3D===!0&&(h=this.Versioning.MatrixWorldNeedsUpdate);let d=this.BindingType.Direct;if(o!==void 0){if(s==="morphTargetInfluences"){if(!e.geometry){Vt("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){Vt("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[o]!==void 0&&(o=e.morphTargetDictionary[o])}d=this.BindingType.ArrayElement,this.resolvedProperty=u,this.propertyIndex=o}else u.fromArray!==void 0&&u.toArray!==void 0?(d=this.BindingType.HasFromToArray,this.resolvedProperty=u):Array.isArray(u)?(d=this.BindingType.EntireArray,this.resolvedProperty=u):this.propertyName=s;this.getValue=this.GetterByBindingType[d],this.setValue=this.SetterByBindingTypeAndVersioning[d][h]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Vn.Composite=a3;Vn.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};Vn.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};Vn.prototype.GetterByBindingType=[Vn.prototype._getValue_direct,Vn.prototype._getValue_array,Vn.prototype._getValue_arrayElement,Vn.prototype._getValue_toArray];Vn.prototype.SetterByBindingTypeAndVersioning=[[Vn.prototype._setValue_direct,Vn.prototype._setValue_direct_setNeedsUpdate,Vn.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Vn.prototype._setValue_array,Vn.prototype._setValue_array_setNeedsUpdate,Vn.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Vn.prototype._setValue_arrayElement,Vn.prototype._setValue_arrayElement_setNeedsUpdate,Vn.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Vn.prototype._setValue_fromArray,Vn.prototype._setValue_fromArray_setNeedsUpdate,Vn.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class o3{constructor(){this.isAnimationObjectGroup=!0,this.uuid=na(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let n=0,s=arguments.length;n!==s;++n)e[arguments[n].uuid]=n;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}add(){const e=this._objects,t=this._indicesByUUID,n=this._paths,s=this._parsedPaths,o=this._bindings,u=o.length;let h,d=e.length,g=this.nCachedObjects_;for(let y=0,v=arguments.length;y!==v;++y){const x=arguments[y],S=x.uuid;let M=t[S];if(M===void 0){M=d++,t[S]=M,e.push(x);for(let w=0,C=u;w!==C;++w)o[w].push(new Vn(x,n[w],s[w]))}else if(M<g){h=e[M];const w=--g,C=e[w];t[C.uuid]=M,e[M]=C,t[S]=w,e[w]=x;for(let E=0,B=u;E!==B;++E){const D=o[E],U=D[w];let z=D[M];D[M]=U,z===void 0&&(z=new Vn(x,n[E],s[E])),D[w]=z}}else e[M]!==h&&Vt("AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastru
76cture when reloading scenes.")}this.nCachedObjects_=g}remove(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,s=n.length;let o=this.nCachedObjects_;for(let u=0,h=arguments.length;u!==h;++u){const d=arguments[u],g=d.uuid,y=t[g];if(y!==void 0&&y>=o){const v=o++,x=e[v];t[x.uuid]=y,e[y]=x,t[g]=v,e[v]=d;for(let S=0,M=s;S!==M;++S){const w=n[S],C=w[v],E=w[y];w[y]=C,w[v]=E}}}this.nCachedObjects_=o}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,s=n.length;let o=this.nCachedObjects_,u=e.length;for(let h=0,d=arguments.length;h!==d;++h){const g=arguments[h],y=g.uuid,v=t[y];if(v!==void 0)if(delete t[y],v<o){const x=--o,S=e[x],M=--u,w=e[M];t[S.uuid]=v,e[v]=S,t[w.uuid]=x,e[x]=w,e.pop();for(let C=0,E=s;C!==E;++C){const B=n[C],D=B[x],U=B[M];B[v]=D,B[x]=U,B.pop()}}else{const x=--u,S=e[x];x>0&&(t[S.uuid]=v),e[v]=S,e.pop();for(let M=0,w=s;M!==w;++M){const C=n[M];C[v]=C[x],C.pop()}}}this.nCachedObjects_=o}subscribe_(e,t){const n=this._bindingsIndicesByPath;let s=n[e];const o=this._bindings;if(s!==void 0)return o[s];const u=this._paths,h=this._parsedPaths,d=this._objects,g=d.length,y=this.nCachedObjects_,v=new Array(g);s=o.length,n[e]=s,u.push(e),h.push(t),o.push(v);for(let x=y,S=d.length;x!==S;++x){const M=d[x];v[x]=new Vn(M,e,t)}return v}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(n!==void 0){const s=this._paths,o=this._parsedPaths,u=this._bindings,h=u.length-1,d=u[h],g=e[h];t[g]=n,u[n]=d,u.pop(),o[n]=o[h],o.pop(),s[n]=s[h],s.pop()}}}class RT{constructor(e,t,n=null,s=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=s;const o=t.tracks,u=o.length,h=new Array(u),d={endingStart:cf,endingEnd:cf};for(let g=0;g!==u;++g){const y=o[g].createInterpolant(null);h[g]=y,y.settings=d}this._interpolantSettings=d,this._interpolants=h,this._propertyBindings=new Array(u),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=SE,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,n=!1){if(e.fadeOut(t),this.fadeIn(t),n===!0){const s=this._clip.duration,o=e._clip.duration,u=o/s,h=s/o;e.warp(1,u,t),this.warp(h,1,t)}return this}crossFadeTo(e,t,n=!1){return e.crossFadeFrom(this,t,n)}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,n){const s=this._mixer,o=s.time,u=this.timeScale;let h=this._timeScaleInterpolant;h===null&&(h=s._lendControlInterpolant(),this._timeScaleInterpolant=h);const d=h.parameterPositions,g=h.sampleValues;return d[0]=o,d[1]=o+n,g[0]=e/u,g[1]=t/u,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,n,s){if(!this.enabled){this._updateWeight(e);return}const o=this._startTime;if(o!==null){const d=(e-o)*n;d<0||n===0?t=0:(this._startTime=null,t=n*d)}t*=this._updateTimeScale(e);const u=this._updateTime(t),h=this._updateWeight(e);if(h>0){const d=this._interpolants,g=this._propertyBindings;switch(this.blendMode){case rS:for(let y=0,v=d.length;y!==v;++y)d[y].evaluate(u),g[y].accumulateAdditive(h);break;case $y:default:for(let y=0,v=d.length;y!==v;++y)d[y].evaluate(u),g[y].accumulate(s,h)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(n!==null){const s=n.evaluate(e)[0];t*=s,e>n.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 n=this._timeScaleInterpolant;if(n!==null){const s=n.evaluate(e)[0];t*=s,e>n.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let s=this.time+e,o=this._loopCount;const u=n===bE;if(e===0)return o===-1?s:u&&(o&1)===1?t-s:s;if(n===AE){o===-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(o===-1&&(e>=0?(o=0,this._setEndings(!0,this.repetitions===0,u)):this._setEndings(this.repetitions===0,!0,u)),s>=t||s<0){const h=Math.floor(s/t);s-=t*h,o+=Math.abs(h);const d=this.repetitions-o;if(d<=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(d===1){const g=e<0;this._setEndings(g,!g,u)}else this._setEndings(!1,!1,u);this._loopCount=o,this.time=s,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:h})}}else this.time=s;if(u&&(o&1)===1)return t-s}return s}
vendor: 8,960 bytes, line 76
76_setEndings(e,t,n){const s=this._interpolantSettings;n?(s.endingStart=uf,s.endingEnd=uf):(e?s.endingStart=this.zeroSlopeAtStart?uf:cf:s.endingStart=Um,t?s.endingEnd=this.zeroSlopeAtEnd?uf:cf:s.endingEnd=Um)}_scheduleFading(e,t,n){const s=this._mixer,o=s.time;let u=this._weightInterpolant;u===null&&(u=s._lendControlInterpolant(),this._weightInterpolant=u);const h=u.parameterPositions,d=u.sampleValues;return h[0]=o,d[0]=t,h[1]=o+e,d[1]=n,this}}const l3=new Float32Array(1);class c3 extends jo{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,s=e._clip.tracks,o=s.length,u=e._propertyBindings,h=e._interpolants,d=n.uuid,g=this._bindingsByRootAndName;let y=g[d];y===void 0&&(y={},g[d]=y);for(let v=0;v!==o;++v){const x=s[v],S=x.name;let M=y[S];if(M!==void 0)++M.referenceCount,u[v]=M;else{if(M=u[v],M!==void 0){M._cacheIndex===null&&(++M.referenceCount,this._addInactiveBinding(M,d,S));continue}const w=t&&t._propertyBindings[v].binding.parsedPath;M=new wT(Vn.create(n,S,w),x.ValueTypeName,x.getValueSize()),++M.referenceCount,this._addInactiveBinding(M,d,S),u[v]=M}h[v].resultBuffer=M.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const n=(e._localRoot||this._root).uuid,s=e._clip.uuid,o=this._actionsByClip[s];this._bindAction(e,o&&o.knownActions[0]),this._addInactiveAction(e,s,n)}const t=e._propertyBindings;for(let n=0,s=t.length;n!==s;++n){const o=t[n];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let n=0,s=t.length;n!==s;++n){const o=t[n];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}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<this._nActiveActions}_addInactiveAction(e,t,n){const s=this._actions,o=this._actionsByClip;let u=o[t];if(u===void 0)u={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,o[t]=u;else{const h=u.knownActions;e._byClipCacheIndex=h.length,h.push(e)}e._cacheIndex=s.length,s.push(e),u.actionByRoot[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],s=e._cacheIndex;n._cacheIndex=s,t[s]=n,t.pop(),e._cacheIndex=null;const o=e._clip.uuid,u=this._actionsByClip,h=u[o],d=h.knownActions,g=d[d.length-1],y=e._byClipCacheIndex;g._byClipCacheIndex=y,d[y]=g,d.pop(),e._byClipCacheIndex=null;const v=h.actionByRoot,x=(e._localRoot||this._root).uuid;delete v[x],d.length===0&&delete u[o],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let n=0,s=t.length;n!==s;++n){const o=t[n];--o.referenceCount===0&&this._removeInactiveBinding(o)}}_lendAction(e){const t=this._actions,n=e._cacheIndex,s=this._nActiveActions++,o=t[s];e._cacheIndex=s,t[s]=e,o._cacheIndex=n,t[n]=o}_takeBackAction(e){const t=this._actions,n=e._cacheIndex,s=--this._nActiveActions,o=t[s];e._cacheIndex=s,t[s]=e,o._cacheIndex=n,t[n]=o}_addInactiveBinding(e,t,n){const s=this._bindingsByRootAndName,o=this._bindings;let u=s[t];u===void 0&&(u={},s[t]=u),u[n]=e,e._cacheIndex=o.length,o.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,s=n.rootNode.uuid,o=n.path,u=this._bindingsByRootAndName,h=u[s],d=t[t.length-1],g=e._cacheIndex;d._cacheIndex=g,t[g]=d,t.pop(),delete h[o],Object.keys(h).length===0&&delete u[s]}_lendBinding(e){const t=this._bindings,n=e._cacheIndex,s=this._nActiveBindings++,o=t[s];e._cacheIndex=s,t[s]=e,o._cacheIndex=n,t[n]=o}_takeBackBinding(e){const t=this._bindings,n=e._cacheIndex,s=--this._nActiveBindings,o=t[s];e._cacheIndex=s,t[s]=e,o._cacheIndex=n,t[n]=o}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return n===void 0&&(n=new CS(new Float32Array(2),new Float32Array(2),1,l3),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,s=--this._nActiveControlInterpolants,o=t[s];e.__cacheIndex=s,t[s]=e,o.__cacheIndex=n,t[n]=o}clipAction(e,t,n){const s=t||this._root,o=s.uuid;let u=typeof e=="string"?Md.findByName(s,e):e;const h=u!==null?u.uuid:e,d=this._actionsByClip[h];let g=null;if(n===void 0&&(u!==null?n=u.blendMode:n=$y),d!==void 0){const v=d.actionByRoot[o];if(v!==void 0&&v.blendMode===n)return v;g=d.knownActions[0],u===null&&(u=g._clip)}if(u===null)return null;const y=new RT(this,u,t,n);return this._bindAction(y,g),this._addInactiveAction(y,h,o),y}existingAction(e,t){const n=t||this._root,s=n.uuid,o=typeof e=="string"?Md.findByName(n,e):e,u=o?o.uuid:e,h=this._actionsByClip[u];return h!==void 0&&h.actionByRoot[s]||null}stopAllAction(){const e=this._actions,t=this._nActiveActions;for(let n=t-1;n>=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,s=this.time+=e,o=Math.sign(e),u=this._accuIndex^=1;for(let g=0;g!==n;++g)t[g]._update(s,e,o,u);const h=this._bindings,d=this._nActiveBindings;for(let g=0;g!==d;++g)h[g].apply(u);return this}setTime(e){this.time=0;for(let t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,n=e.uuid,s=this._actionsByClip,o=s[n];if(o!==void 0){const u=o.knownActions;for(let h=0,d=u.length;h!==d;++h){const g=u[h];this._deactivateAction(g);const y=g._cacheIndex,v=t[t.length-1];g._cacheIndex=null,g._byClipCacheIndex=null,v._cacheIndex=y,t[y]=v,t.pop(),this._removeInactiveBindingsForAction(g)}delete s[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const u in n){const h=n[u].actionByRoot,d=h[t];d!==void 0&&(this._deactivateAction(d),this._removeInactiveAction(d))}const s=this._bindingsByRootAndName,o=s[t];if(o!==void 0)for(const u in o){const h=o[u];h.restoreOriginalState(),this._removeInactiveBinding(h)}}uncacheAction(e,t){const n=this.existingAction(e,t);n!==null&&(this._deactivateAction(n),this._removeInactiveAction(n))}}class u3 extends lS{constructor(e=1,t=1,n=1,s={}){super(e,t,s),this.isRenderTarget3D=!0,this.depth=n,this.texture=new i_(null,e,t,n),this._setTextureOptions(s),this.texture.isRenderTargetTexture=!0}}class zS{constructor(e){this.value=e}clone(){return new zS(this.value.clone===void 0?this.value:this.value.clone())}}let f3=0;class h3 extends jo{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:f3++}),this.name="",this.usage=Fm,this.uniforms=[]}add(e){return this.uniforms.push(e),this}remove(e){const t=this.uniforms.indexOf(e);return t!==-1&&this.uniforms.splice(t,1),this}setName(e){return this.name=e,this}setUsage(e){return this.usage=e,this}dispose(){this.dispatchEvent({type:"dispose"})}copy(e){this.name=e.name,this.usage=e.usage;const t=e.uniforms;this.uniforms.length=0;for(let n=0,s=t.length;n<s;n++){const o=Array.isArray(t[n])?t[n]:[t[n]];for(let u=0;u<o.length;u++)this.uniforms.push(o[u].clone())}return this}clone(){return new this.constructor().copy(this)}}class d3 extends $m{constructor(e,t,n=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}class p3{constructor(e,t,n,s,o,u=!1){this.isGLBufferAttribute=!0,this.name="",this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=s,this.count=o,this.normalized=u,this.version=0}set needsUpdate(e){e===!0&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,t){return this.type=e,this.elementSize=t,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}const XM=new jt;class GS{constructor(e,t,n=0,s=1/0){this.ray=new Cd(e,t),this.near=n,this.far=s,this.camera=null,this.layers=new xd,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):Vt("Raycaster:
76Unsupported camera type: "+t.type)}setFromXRController(e){return XM.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(XM),this}intersectObject(e,t=!0,n=[]){return LA(e,this,n,t),n.sort(WM),n}intersectObjects(e,t=!0,n=[]){for(let s=0,o=e.length;s<o;s++)LA(e[s],this,n,t);return n.sort(WM),n}}function WM(a,e){return a.distance-e.distance}function LA(a,e,t,n){let s=!0;if(a.layers.test(e.layers)&&a.raycast(e,t)===!1&&(s=!1),s===!0&&n===!0){const o=a.children;for(let u=0,h=o.length;u<h;u++)LA(o[u],e,t,!0)}}class m3{constructor(){this._previousTime=0,this._currentTime=0,this._startTime=performance.now(),this._delta=0,this._elapsed=0,this._timescale=1,this._document=null,this._pageVisibilityHandler=null}connect(e){this._document=e,e.hidden!==void 0&&(this._pageVisibilityHandler=g3.bind(this),e.addEventListener("visibilitychange",this._pageVisibilityHandler,!1))}disconnect(){this._pageVisibilityHandler!==null&&(this._document.removeEventListener("visibilitychange",this._pageVisibilityHandler),this._pageVisibilityHandler=null),this._document=null}getDelta(){return this._delta/1e3}getElapsed(){return this._elapsed/1e3}getTimescale(){return this._timescale}setTimescale(e){return this._timescale=e,this}reset(){return this._currentTime=performance.now()-this._startTime,this}dispose(){this.disconnect()}update(e){return this._pageVisibilityHandler!==null&&this._document.hidden===!0?this._delta=0:(this._previousTime=this._currentTime,this._currentTime=(e!==void 0?e:performance.now())-this._startTime,this._delta=(this._currentTime-this._previousTime)*this._timescale,this._elapsed+=this._delta),this}}function g3(){this._document.hidden===!1&&this.reset()}class v3{constructor(e=1,t=0,n=0){this.radius=e,this.phi=t,this.theta=n}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=nn(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(nn(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class y3{constructor(e=1,t=0,n=0){this.radius=e,this.theta=t,this.y=n}set(e,t,n){return this.radius=e,this.theta=t,this.y=n,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this}clone(){return new this.constructor().copy(this)}}class HS{constructor(e,t,n,s){HS.prototype.isMatrix2=!0,this.elements=[1,0,0,1],e!==void 0&&this.set(e,t,n,s)}identity(){return this.set(1,0,0,1),this}fromArray(e,t=0){for(let n=0;n<4;n++)this.elements[n]=e[n+t];return this}set(e,t,n,s){const o=this.elements;return o[0]=e,o[2]=t,o[1]=n,o[3]=s,this}}const JM=new We;class _3{constructor(e=new We(1/0,1/0),t=new We(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=JM.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,JM).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 YM=new K,wv=new K,$h=new K,ed=new K,qx=new K,x3=new K,A3=new K;class S3{constructor(e=new K,t=new K){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){YM.subVectors(e,this.start),wv.subVectors(this.end,this.start);const n=wv.dot(wv);let o=wv.dot(YM)/n;return t&&(o=nn(o,0,1)),o}closestPointToPoint(e,t,n){const s=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(s).add(this.start)}
vendor: 2,240 bytes, line 76
76distanceSqToLine3(e,t=x3,n=A3){const s=10000000000000001e-32;let o,u;const h=this.start,d=e.start,g=this.end,y=e.end;$h.subVectors(g,h),ed.subVectors(y,d),qx.subVectors(h,d);const v=$h.dot($h),x=ed.dot(ed),S=ed.dot(qx);if(v<=s&&x<=s)return t.copy(h),n.copy(d),t.sub(n),t.dot(t);if(v<=s)o=0,u=S/x,u=nn(u,0,1);else{const M=$h.dot(qx);if(x<=s)u=0,o=nn(-M/v,0,1);else{const w=$h.dot(ed),C=v*x-w*w;C!==0?o=nn((w*S-M*x)/C,0,1):o=0,u=(w*o+S)/x,u<0?(u=0,o=nn(-M/v,0,1)):u>1&&(u=1,o=nn((w-M)/v,0,1))}}return t.copy(h).add($h.multiplyScalar(o)),n.copy(d).add(ed.multiplyScalar(u)),t.sub(n),t.dot(t)}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 qM=new K;class b3 extends Gn{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const n=new rn,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 u=0,h=1,d=32;u<d;u++,h++){const g=u/d*Math.PI*2,y=h/d*Math.PI*2;s.push(Math.cos(g),Math.sin(g),1,Math.cos(y),Math.sin(y),1)}n.setAttribute("position",new Nt(s,3));const o=new rr({fog:!1,toneMapped:!1});this.cone=new mo(n,o),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),this.parent?(this.parent.updateWorldMatrix(!0),this.matrix.copy(this.parent.matrixWorld).invert().multiply(this.light.matrixWorld)):this.matrix.copy(this.light.matrixWorld),this.matrixWorld.copy(this.light.matrixWorld);const e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),qM.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(qM),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const Pc=new K,Rv=new jt,Kx=new jt;class M3 extends mo{constructor(e){const t=BT(e),n=new rn,s=[],o=[];for(let g=0;g<t.length;g++){const y=t[g];y.parent&&y.parent.isBone&&(s.push(0,0,0),s.push(0,0,0),o.push(0,0,0),o.push(0,0,0))}n.setAttribute("position",new Nt(s,3)),n.setAttribute("color",new
vendor: 5,675 bytes, line 76
76Nt(o,3));const u=new rr({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});super(n,u),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1;const h=new Tt(255),d=new Tt(65280);this.setColors(h,d)}updateMatrixWorld(e){const t=this.bones,n=this.geometry,s=n.getAttribute("position");Kx.copy(this.root.matrixWorld).invert();for(let o=0,u=0;o<t.length;o++){const h=t[o];h.parent&&h.parent.isBone&&(Rv.multiplyMatrices(Kx,h.matrixWorld),Pc.setFromMatrixPosition(Rv),s.setXYZ(u,Pc.x,Pc.y,Pc.z),Rv.multiplyMatrices(Kx,h.parent.matrixWorld),Pc.setFromMatrixPosition(Rv),s.setXYZ(u+1,Pc.x,Pc.y,Pc.z),u+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}setColors(e,t){const s=this.geometry.getAttribute("color");for(let o=0;o<s.count;o+=2)s.setXYZ(o,e.r,e.g,e.b),s.setXYZ(o+1,t.r,t.g,t.b);return s.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}function BT(a){const e=[];a.isBone===!0&&e.push(a);for(let t=0;t<a.children.length;t++)e.push(...BT(a.children[t]));return e}class E3 extends wi{constructor(e,t,n){const s=new rg(t,4,2),o=new Yr({wireframe:!0,fog:!1,toneMapped:!1});super(s,o),this.light=e,this.color=n,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const T3=new K,KM=new Tt,ZM=new Tt;class C3 extends Gn{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="HemisphereLightHelper";const s=new sg(t);s.rotateY(Math.PI*.5),this.material=new Yr({wireframe:!0,fog:!1,toneMapped:!1}),this.color===void 0&&(this.material.vertexColors=!0);const o=s.getAttribute("position"),u=new Float32Array(o.count*3);s.setAttribute("color",new Wn(u,3)),this.add(new wi(s,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const e=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{const t=e.geometry.getAttribute("color");KM.copy(this.light.color),ZM.copy(this.light.groundColor);for(let n=0,s=t.count;n<s;n++){const o=n<s/2?KM:ZM;t.setXYZ(n,o.r,o.g,o.b)}t.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(T3.setFromMatrixPosition(this.light.matrixWorld).negate())}}class w3 extends mo{constructor(e=10,t=10,n=4473924,s=8947848){n=new Tt(n),s=new Tt(s);const o=t/2,u=e/t,h=e/2,d=[],g=[];for(let x=0,S=0,M=-h;x<=t;x++,M+=u){d.push(-h,0,M,h,0,M),d.push(M,0,-h,M,0,h);const w=x===o?n:s;w.toArray(g,S),S+=3,w.toArray(g,S),S+=3,w.toArray(g,S),S+=3,w.toArray(g,S),S+=3}const y=new rn;y.setAttribute("position",new Nt(d,3)),y.setAttribute("color",new Nt(g,3));const v=new rr({vertexColors:!0,toneMapped:!1});super(y,v),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class R3 extends mo{constructor(e=10,t=16,n=8,s=64,o=4473924,u=8947848){o=new Tt(o),u=new Tt(u);const h=[],d=[];if(t>1)for(let v=0;v<t;v++){const x=v/t*(Math.PI*2),S=Math.sin(x)*e,M=Math.cos(x)*e;h.push(0,0,0),h.push(S,0,M);const w=v&1?o:u;d.push(w.r,w.g,w.b),d.push(w.r,w.g,w.b)}for(let v=0;v<n;v++){const x=v&1?o:u,S=e-e/n*v;for(let M=0;M<s;M++){let w=M/s*(Math.PI*2),C=Math.sin(w)*S,E=Math.cos(w)*S;h.push(C,0,E),d.push(x.r,x.g,x.b),w=(M+1)/s*(Math.PI*2),C=Math.sin(w)*S,E=Math.cos(w)*S,h.push(C,0,E),d.push(x.r,x.g,x.b)}}const g=new rn;g.setAttribute("position",new Nt(h,3)),g.setAttribute("color",new Nt(d,3));const y=new rr({vertexColors:!0,toneMapped:!1});super(g,y),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}const QM=new K,Bv=new K,jM=new K;class B3 extends Gn{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="DirectionalLightHelper",t===void 0&&(t=1);let s=new rn;s.setAttribute("position",new Nt([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const o=new rr({fog:!1,toneMapped:!1});this.lightPlane=new Hl(s,o),this.add(this.lightPlane),s=new rn,s.setAttribute("position",new Nt([0,0,0,0,0,1],3)),this.targetLine=new Hl(s,o),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),QM.setFromMatrixPosition(this.light.matrixWorld),Bv.setFromMatrixPosition(this.light.target.matrixWorld),jM.subVectors(Bv,QM),this.lightPlane.lookAt(Bv),this.color!==void 0?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(Bv),this.targetLine.scale.z=jM.length()}}const Dv=new K,Vi=new s_;class D3 extends mo{constructor(e){const t=new rn,n=new rr({color:16777215,vertexColors:!0,toneMapped:!1}),s=[],o=[],u={};h("n1","n2"),h("n2","n4"),h("n4","n3"),h("n3","n1"),h("f1","f2"),h("f2","f4"),h("f4","f3"),h("f3","f1"),h("n1","f1"),h("n2","f2"),h("n3","f3"),h("n4","f4"),h("p","n1"),h("p","n2"),h("p","n3"),h("p","n4"),h("u1","u2"),h("u2","u3"),h("u3","u1"),h("c","t"),h("p","c"),h("cn1","cn2"),h("cn3","cn4"),h("cf1","cf2"),h("cf3","cf4");function h(M,w){d(M),d(w)}function d(M){s.push(0,0,0),o.push(0,0,0),u[M]===void 0&&(u[M]=[]),u[M].push(s.length/3-1)}t.setAttribute("position",new Nt(s,3)),t.setAttribute("color",new
vendor: 5,409 bytes, line 76
76Nt(o,3)),super(t,n),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=u,this.update();const g=new Tt(16755200),y=new Tt(16711680),v=new Tt(43775),x=new Tt(16777215),S=new Tt(3355443);this.setColors(g,y,v,x,S)}setColors(e,t,n,s,o){const h=this.geometry.getAttribute("color");return h.setXYZ(0,e.r,e.g,e.b),h.setXYZ(1,e.r,e.g,e.b),h.setXYZ(2,e.r,e.g,e.b),h.setXYZ(3,e.r,e.g,e.b),h.setXYZ(4,e.r,e.g,e.b),h.setXYZ(5,e.r,e.g,e.b),h.setXYZ(6,e.r,e.g,e.b),h.setXYZ(7,e.r,e.g,e.b),h.setXYZ(8,e.r,e.g,e.b),h.setXYZ(9,e.r,e.g,e.b),h.setXYZ(10,e.r,e.g,e.b),h.setXYZ(11,e.r,e.g,e.b),h.setXYZ(12,e.r,e.g,e.b),h.setXYZ(13,e.r,e.g,e.b),h.setXYZ(14,e.r,e.g,e.b),h.setXYZ(15,e.r,e.g,e.b),h.setXYZ(16,e.r,e.g,e.b),h.setXYZ(17,e.r,e.g,e.b),h.setXYZ(18,e.r,e.g,e.b),h.setXYZ(19,e.r,e.g,e.b),h.setXYZ(20,e.r,e.g,e.b),h.setXYZ(21,e.r,e.g,e.b),h.setXYZ(22,e.r,e.g,e.b),h.setXYZ(23,e.r,e.g,e.b),h.setXYZ(24,t.r,t.g,t.b),h.setXYZ(25,t.r,t.g,t.b),h.setXYZ(26,t.r,t.g,t.b),h.setXYZ(27,t.r,t.g,t.b),h.setXYZ(28,t.r,t.g,t.b),h.setXYZ(29,t.r,t.g,t.b),h.setXYZ(30,t.r,t.g,t.b),h.setXYZ(31,t.r,t.g,t.b),h.setXYZ(32,n.r,n.g,n.b),h.setXYZ(33,n.r,n.g,n.b),h.setXYZ(34,n.r,n.g,n.b),h.setXYZ(35,n.r,n.g,n.b),h.setXYZ(36,n.r,n.g,n.b),h.setXYZ(37,n.r,n.g,n.b),h.setXYZ(38,s.r,s.g,s.b),h.setXYZ(39,s.r,s.g,s.b),h.setXYZ(40,o.r,o.g,o.b),h.setXYZ(41,o.r,o.g,o.b),h.setXYZ(42,o.r,o.g,o.b),h.setXYZ(43,o.r,o.g,o.b),h.setXYZ(44,o.r,o.g,o.b),h.setXYZ(45,o.r,o.g,o.b),h.setXYZ(46,o.r,o.g,o.b),h.setXYZ(47,o.r,o.g,o.b),h.setXYZ(48,o.r,o.g,o.b),h.setXYZ(49,o.r,o.g,o.b),h.needsUpdate=!0,this}update(){const e=this.geometry,t=this.pointMap,n=1,s=1;let o,u;if(Vi.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),this.camera.reversedDepth===!0)o=1,u=0;else if(this.camera.coordinateSystem===ta)o=-1,u=1;else if(this.camera.coordinateSystem===vd)o=0,u=1;else throw new Error("THREE.CameraHelper.update(): Invalid coordinate system: "+this.camera.coordinateSystem);es("c",t,e,Vi,0,0,o),es("t",t,e,Vi,0,0,u),es("n1",t,e,Vi,-n,-s,o),es("n2",t,e,Vi,n,-s,o),es("n3",t,e,Vi,-n,s,o),es("n4",t,e,Vi,n,s,o),es("f1",t,e,Vi,-n,-s,u),es("f2",t,e,Vi,n,-s,u),es("f3",t,e,Vi,-n,s,u),es("f4",t,e,Vi,n,s,u),es("u1",t,e,Vi,n*.7,s*1.1,o),es("u2",t,e,Vi,-n*.7,s*1.1,o),es("u3",t,e,Vi,0,s*2,o),es("cf1",t,e,Vi,-n,0,u),es("cf2",t,e,Vi,n,0,u),es("cf3",t,e,Vi,0,-s,u),es("cf4",t,e,Vi,0,s,u),es("cn1",t,e,Vi,-n,0,o),es("cn2",t,e,Vi,n,0,o),es("cn3",t,e,Vi,0,-s,o),es("cn4",t,e,Vi,0,s,o),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function es(a,e,t,n,s,o,u){Dv.set(s,o,u).unproject(n);const h=e[a];if(h!==void 0){const d=t.getAttribute("position");for(let g=0,y=h.length;g<y;g++)d.setXYZ(h[g],Dv.x,Dv.y,Dv.z)}}const Iv=new Rs;class I3 extends mo{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),s=new Float32Array(24),o=new rn;o.setIndex(new Wn(n,1)),o.setAttribute("position",new Wn(s,3)),super(o,new rr({color:t,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(){if(this.object!==void 0&&Iv.setFromObject(this.object),Iv.isEmpty())return;const e=Iv.min,t=Iv.max,n=this.geometry.attributes.position,s=n.array;s[0]=t.x,s[1]=t.y,s[2]=t.z,s[3]=e.x,s[4]=t.y,s[5]=t.z,s[6]=e.x,s[7]=e.y,s[8]=t.z,s[9]=t.x,s[10]=e.y,s[11]=t.z,s[12]=t.x,s[13]=t.y,s[14]=e.z,s[15]=e.x,s[16]=t.y,s[17]=e.z,s[18]=e.x,s[19]=e.y,s[20]=e.z,s[21]=t.x,s[22]=e.y,s[23]=e.z,n.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e,t){return super.copy(e,t),this.object=e.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class L3 extends mo{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),s=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],o=new rn;o.setIndex(new Wn(n,1)),o.setAttribute("position",new Nt(s,3)),super(o,new rr({color:t,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}dispose(){this.geometry.dispose(),this.material.dispose()}}class U3 extends Hl{constructor(e,t=1,n=16776960){const s=n,o=[1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],u=new rn;u.setAttribute("position",new Nt(o,3)),u.computeBoundingSphere(),super(u,new rr({color:s,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=t;const h=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],d=new rn;d.setAttribute("position",new Nt(h,3)),d.computeBoundingSphere(),this.add(new wi(d,new Yr({color:s,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(e){this.position.set(0,0,0),this.scale.set(.5*this.size,.5*this.size,1),this.lookAt(this.plane.normal),this.translateZ(-this.plane.constant),super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}}const $M=new K;let Lv,Zx;class N3 extends Gn{constructor(e=new K(0,0,1),t=new K(0,0,0),n=1,s=16776960,o=n*.2,u=o*.2){super(),this.type="ArrowHelper",Lv===void 0&&(Lv=new rn,Lv.setAttribute("position",new Nt([
vendor: 1,196 bytes, line 76
760,0,0,0,1,0],3)),Zx=new ng(.5,1,5,1),Zx.translate(0,-.5,0)),this.position.copy(t),this.line=new Hl(Lv,new rr({color:s,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new wi(Zx,new Yr({color:s,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,o,u)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{$M.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle($M,t)}}setLength(e,t=e*.2,n=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class F3 extends mo{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],s=new rn;s.setAttribute("position",new Nt(t,3)),s.setAttribute("color",new
vendor: 7,179 bytes, lines 76-80
76Nt(n,3));const o=new rr({vertexColors:!0,toneMapped:!1});super(s,o),this.type="AxesHelper"}setColors(e,t,n){const s=new Tt,o=this.geometry.attributes.color.array;return s.set(e),s.toArray(o,0),s.toArray(o,3),s.set(t),s.toArray(o,6),s.toArray(o,9),s.set(n),s.toArray(o,12),s.toArray(o,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class O3{constructor(){this.type="ShapePath",this.color=new Tt,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Oy,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,s){return this.currentPath.quadraticCurveTo(e,t,n,s),this}bezierCurveTo(e,t,n,s,o,u){return this.currentPath.bezierCurveTo(e,t,n,s,o,u),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(E){const B=[];for(let D=0,U=E.length;D<U;D++){const z=E[D],P=new vf;P.curves=z.curves,B.push(P)}return B}function n(E,B){const D=B.length;let U=!1;for(let z=D-1,P=0;P<D;z=P++){let X=B[z],k=B[P],I=k.x-X.x,O=k.y-X.y;if(Math.abs(O)>Number.EPSILON){if(O<0&&(X=B[P],I=-I,k=B[z],O=-O),E.y<X.y||E.y>k.y)continue;if(E.y===X.y){if(E.x===X.x)return!0}else{const q=O*(E.x-X.x)-I*(E.y-X.y);if(q===0)return!0;if(q<0)continue;U=!U}}else{if(E.y!==X.y)continue;if(k.x<=E.x&&E.x<=X.x||X.x<=E.x&&E.x<=k.x)return!0}}return U}const s=uo.isClockWise,o=this.subPaths;if(o.length===0)return[];let u,h,d;const g=[];if(o.length===1)return h=o[0],d=new vf,d.curves=h.curves,g.push(d),g;let y=!s(o[0].getPoints());y=e?!y:y;const v=[],x=[];let S=[],M=0,w;x[M]=void 0,S[M]=[];for(let E=0,B=o.length;E<B;E++)h=o[E],w=h.getPoints(),u=s(w),u=e?!u:u,u?(!y&&x[M]&&M++,x[M]={s:new vf,p:w},x[M].s.curves=h.curves,y&&M++,S[M]=[]):S[M].push({h,p:w[0]});if(!x[0])return t(o);if(x.length>1){let E=!1,B=0;for(let D=0,U=x.length;D<U;D++)v[D]=[];for(let D=0,U=x.length;D<U;D++){const z=S[D];for(let P=0;P<z.length;P++){const X=z[P];let k=!0;for(let I=0;I<x.length;I++)n(X.p,x[I].p)&&(D!==I&&B++,k?(k=!1,v[I].push(X)):E=!0);k&&v[D].push(X)}}B>0&&E===!1&&(S=v)}let C;for(let E=0,B=x.length;E<B;E++){d=x[E].s,g.push(d),C=S[E];for(let D=0,U=C.length;D<U;D++)d.holes.push(C[D].h)}return g}}class P3 extends jo{constructor(e,t=null){super(),this.object=e,this.domElement=t,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(e){if(e===void 0){Mt("Controls: connect() now requires an element.");return}this.domElement!==null&&this.disconnect(),this.domElement=e}disconnect(){}dispose(){}update(){}}function z3(a,e){const t=a.image&&a.image.width?a.image.width/a.image.height:1;return t>e?(a.repeat.x=1,a.repeat.y=t/e,a.offset.x=0,a.offset.y=(1-a.repeat.y)/2):(a.repeat.x=e/t,a.repeat.y=1,a.offset.x=(1-a.repeat.x)/2,a.offset.y=0),a}function G3(a,e){const t=a.image&&a.image.width?a.image.width/a.image.height:1;return t>e?(a.repeat.x=e/t,a.repeat.y=1,a.offset.x=(1-a.repeat.x)/2,a.offset.y=0):(a.repeat.x=1,a.repeat.y=t/e,a.offset.x=0,a.offset.y=(1-a.repeat.y)/2),a}function H3(a){return a.repeat.x=1,a.repeat.y=1,a.offset.x=0,a.offset.y=0,a}function UA(a,e,t,n){const s=k3(n);switch(t){case iS:return a*e;case Km:return a*e/s.components*s.byteLength;case Zm:return a*e/s.components*s.byteLength;case _f:return a*e*2/s.components*s.byteLength;case Qy:return a*e*2/s.components*s.byteLength;case sS:return a*e*3/s.components*s.byteLength;case ts:return a*e*4/s.components*s.byteLength;case jy:return a*e*4/s.components*s.byteLength;case Mm:case Em:return Math.floor((a+3)/4)*Math.floor((e+3)/4)*8;case Tm:case Cm:return Math.floor((a+3)/4)*Math.floor((e+3)/4)*16;case ny:case sy:return Math.max(a,16)*Math.max(e,8)/4;case ty:case iy:return Math.max(a,8)*Math.max(e,8)/2;case ry:case ay:case ly:case cy:return Math.floor((a+3)/4)*Math.floor((e+3)/4)*8;case oy:case uy:case fy:return Math.floor((a+3)/4)*Math.floor((e+3)/4)*16;case hy:return Math.floor((a+3)/4)*Math.floor((e+3)/4)*16;case dy:return Math.floor((a+4)/5)*Math.floor((e+3)/4)*16;case py:return Math.floor((a+4)/5)*Math.floor((e+4)/5)*16;case my:return Math.floor((a+5)/6)*Math.floor((e+4)/5)*16;case gy:return Math.floor((a+5)/6)*Math.floor((e+5)/6)*16;case vy:return Math.floor((a+7)/8)*Math.floor((e+4)/5)*16;case yy:return Math.floor((a+7)/8)*Math.floor((e+5)/6)*16;case _y:return Math.floor((a+7)/8)*Math.floor((e+7)/8)*16;case xy:return Math.floor((a+9)/10)*Math.floor((e+4)/5)*16;case Ay:return Math.floor((a+9)/10)*Math.floor((e+5)/6)*16;case Sy:return Math.floor((a+9)/10)*Math.floor((e+7)/8)*16;case by:return Math.floor((a+9)/10)*Math.floor((e+9)/10)*16;case My:return Math.floor((a+11)/12)*Math.floor((e+9)/10)*16;case Ey:return Math.floor((a+11)/12)*Math.floor((e+11)/12)*16;case Ty:case Cy:case wy:return Math.ceil(a/4)*Math.ceil(e/4)*16;case Ry:case By:return Math.ceil(a/4)*Math.ceil(e/4)*8;case Dy:case Iy:return Math.ceil(a/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function k3(a){switch(a){case ws:case Yy:return{byteLength:1,components:1};case dd:case qy:case Wi:return{byteLength:2,components:1};case Ky:case Zy:return{byteLength:2,components:4};case ia:case qm:case Ci:return{byteLength:4,components:1};case tS:case nS:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${a}.`)}class V3{static contain(e,t){return z3(e,t)}static cover(e,t){return G3(e,t)}static fill(e){return H3(e)}static getByteLength(e,t,n,s){return UA(e,t,n,s)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Jm}}));typeof window<"u"&&(window.__THREE__?Mt("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Jm);/** 77 * @license 78 * Copyright 2010-2025 Three.js Authors 79 * SPDX-License-Identifier: MIT 80 */function DT(){let a=null,e=!1,t=null,n=null;function s(o,u){t(o,u),n=a.requestAnimationFrame(s)}return{start:function(){e!==!0&&t!==null&&(n=a.requestAnimationFrame(s),e=!0)},stop:function(){a.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(o){t=o},setContext:function(o){a=o}}}function X3(a){const e=new WeakMap;function t(h,d){const g=h.array,y=h.usage,v=g.byteLength,x=a.createBuffer();a.bindBuffer(d,x),a.bufferData(d,g,y),h.onUploadCallback();let S;if(g instanceof Float32Array)S=a.FLOAT;else if(typeof Float16Array<"u"&&g instanceof Float16Array)S=a.HALF_FLOAT;else if(g instanceof Uint16Array)h.isFloat16BufferAttribute?S=a.HALF_FLOAT:S=a.UNSIGNED_SHORT;else if(g instanceof Int16Array)S=a.SHORT;else if(g instanceof Uint32Array)S=a.UNSIGNED_INT;else if(g instanceof Int32Array)S=a.INT;else if(g instanceof Int8Array)S=a.BYTE;else if(g instanceof Uint8Array)S=a.UNSIGNED_BYTE;else if(g instanceof Uint8ClampedArray)S=a.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+g);return{buffer:x,type:S,bytesPerElement:g.BYTES_PER_ELEMENT,version:h.version,size:v}}function n(h,d,g){const y=d.array,v=d.updateRanges;if(a.bindBuffer(g,h),v.length===0)a.bufferSubData(g,0,y);else{v.sort((S,M)=>S.start-M.start);let x=0;for(let S=1;S<v.length;S++){const M=v[x],w=v[S];
vendor: 5,162 bytes, lines 80-193
80w.start<=M.start+M.count+1?M.count=Math.max(M.count,w.start+w.count-M.start):(++x,v[x]=w)}v.length=x+1;for(let S=0,M=v.length;S<M;S++){const w=v[S];a.bufferSubData(g,w.start*y.BYTES_PER_ELEMENT,y,w.start,w.count)}d.clearUpdateRanges()}d.onUploadCallback()}function s(h){return h.isInterleavedBufferAttribute&&(h=h.data),e.get(h)}function o(h){h.isInterleavedBufferAttribute&&(h=h.data);const d=e.get(h);d&&(a.deleteBuffer(d.buffer),e.delete(h))}function u(h,d){if(h.isInterleavedBufferAttribute&&(h=h.data),h.isGLBufferAttribute){const y=e.get(h);(!y||y.version<h.version)&&e.set(h,{buffer:h.buffer,type:h.type,bytesPerElement:h.elementSize,version:h.version});return}const g=e.get(h);if(g===void 0)e.set(h,t(h,d));else if(g.version<h.version){if(g.size!==h.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");n(g.buffer,h,d),g.version=h.version}}return{get:s,remove:o,update:u}}var W3=`#ifdef USE_ALPHAHASH 81 if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard; 82#endif`,J3=`#ifdef USE_ALPHAHASH 83 const float ALPHA_HASH_SCALE = 0.05; 84 float hash2D( vec2 value ) { 85 return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) ); 86 } 87 float hash3D( vec3 value ) { 88 return hash2D( vec2( hash2D( value.xy ), value.z ) ); 89 } 90 float getAlphaHashThreshold( vec3 position ) { 91 float maxDeriv = max( 92 length( dFdx( position.xyz ) ), 93 length( dFdy( position.xyz ) ) 94 ); 95 float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv ); 96 vec2 pixScales = vec2( 97 exp2( floor( log2( pixScale ) ) ), 98 exp2( ceil( log2( pixScale ) ) ) 99 ); 100 vec2 alpha = vec2( 101 hash3D( floor( pixScales.x * position.xyz ) ), 102 hash3D( floor( pixScales.y * position.xyz ) ) 103 ); 104 float lerpFactor = fract( log2( pixScale ) ); 105 float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y; 106 float a = min( lerpFactor, 1.0 - lerpFactor ); 107 vec3 cases = vec3( 108 x * x / ( 2.0 * a * ( 1.0 - a ) ), 109 ( x - 0.5 * a ) / ( 1.0 - a ), 110 1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) ) 111 ); 112 float threshold = ( x < ( 1.0 - a ) ) 113 ? ( ( x < a ) ? cases.x : cases.y ) 114 : cases.z; 115 return clamp( threshold , 1.0e-6, 1.0 ); 116 } 117#endif`,Y3=`#ifdef USE_ALPHAMAP 118 diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g; 119#endif`,q3=`#ifdef USE_ALPHAMAP 120 uniform sampler2D alphaMap; 121#endif`,K3=`#ifdef USE_ALPHATEST 122 #ifdef ALPHA_TO_COVERAGE 123 diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a ); 124 if ( diffuseColor.a == 0.0 ) discard; 125 #else 126 if ( diffuseColor.a < alphaTest ) discard; 127 #endif 128#endif`,Z3=`#ifdef USE_ALPHATEST 129 uniform float alphaTest; 130#endif`,Q3=`#ifdef USE_AOMAP 131 float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0; 132 reflectedLight.indirectDiffuse *= ambientOcclusion; 133 #if defined( USE_CLEARCOAT ) 134 clearcoatSpecularIndirect *= ambientOcclusion; 135 #endif 136 #if defined( USE_SHEEN ) 137 sheenSpecularIndirect *= ambientOcclusion; 138 #endif 139 #if defined( USE_ENVMAP ) && defined( STANDARD ) 140 float dotNV = saturate( dot( geometryNormal, geometryViewDir ) ); 141 reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness ); 142 #endif 143#endif`,j3=`#ifdef USE_AOMAP 144 uniform sampler2D aoMap; 145 uniform float aoMapIntensity; 146#endif`,$3=`#ifdef USE_BATCHING 147 #if ! defined( GL_ANGLE_multi_draw ) 148 #define gl_DrawID _gl_DrawID 149 uniform int _gl_DrawID; 150 #endif 151 uniform highp sampler2D batchingTexture; 152 uniform highp usampler2D batchingIdTexture; 153 mat4 getBatchingMatrix( const in float i ) { 154 int size = textureSize( batchingTexture, 0 ).x; 155 int j = int( i ) * 4; 156 int x = j % size; 157 int y = j / size; 158 vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 ); 159 vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 ); 160 vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 ); 161 vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 ); 162 return mat4( v1, v2, v3, v4 ); 163 } 164 float getIndirectIndex( const in int i ) { 165 int size = textureSize( batchingIdTexture, 0 ).x; 166 int x = i % size; 167 int y = i / size; 168 return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r ); 169 } 170#endif 171#ifdef USE_BATCHING_COLOR 172 uniform sampler2D batchingColorTexture; 173 vec3 getBatchingColor( const in float i ) { 174 int size = textureSize( batchingColorTexture, 0 ).x; 175 int j = int( i ); 176 int x = j % size; 177 int y = j / size; 178 return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb; 179 } 180#endif`,eD=`#ifdef USE_BATCHING 181 mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) ); 182#endif`,tD=`vec3 transformed = vec3( position ); 183#ifdef USE_ALPHAHASH 184 vPosition = vec3( position ); 185#endif`,nD=`vec3 objectNormal = vec3( normal ); 186#ifdef USE_TANGENT 187 vec3 objectTangent = vec3( tangent.xyz ); 188#endif`,iD=`float G_BlinnPhong_Implicit( ) { 189 return 0.25; 190} 191float D_BlinnPhong( const in float shininess, const in float dotNH ) { 192 return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); 193}
194vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) { 195 vec3 halfDir = normalize( lightDir + viewDir ); 196 float dotNH = saturate( dot( normal, halfDir ) ); 197 float dotVH = saturate( dot( viewDir, halfDir ) ); 198 vec3 F = F_Schlick( specularColor, 1.0, dotVH ); 199 float G = G_BlinnPhong_Implicit( ); 200 float D = D_BlinnPhong( shininess, dotNH ); 201 return F * ( G * D ); 202} // validated`,sD=`#ifdef USE_IRIDESCENCE 203 const mat3 XYZ_TO_REC709 = mat3( 204 3.2404542, -0.9692660, 0.0556434, 205 -1.5371385, 1.8760108, -0.2040259, 206 -0.4985314, 0.0415560, 1.0572252 207 ); 208 vec3 Fresnel0ToIor( vec3 fresnel0 ) { 209 vec3 sqrtF0 = sqrt( fresnel0 ); 210 return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 ); 211 } 212 vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) { 213 return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) ); 214 } 215 float IorToFresnel0( float transmittedIor, float incidentIor ) { 216 return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor )); 217 } 218 vec3 evalSensitivity( float OPD, vec3 shift ) { 219 float phase = 2.0 * PI * OPD * 1.0e-9; 220 vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 ); 221 vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 ); 222 vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 ); 223 vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var ); 224 xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) ); 225 xyz /= 1.0685e-7; 226 vec3 rgb = XYZ_TO_REC709 * xyz; 227 return rgb; 228 } 229 vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) { 230 vec3 I; 231 float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) ); 232 float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) ); 233 float cosTheta2Sq = 1.0 - sinTheta2Sq; 234 if ( cosTheta2Sq < 0.0 ) { 235 return vec3( 1.0 ); 236 } 237 float cosTheta2 = sqrt( cosTheta2Sq ); 238 float R0 = IorToFresnel0( iridescenceIOR, outsideIOR ); 239 float R12 = F_Schlick( R0, 1.0, cosTheta1 );
240 float T121 = 1.0 - R12; 241 float phi12 = 0.0; 242 if ( iridescenceIOR < outsideIOR ) phi12 = PI; 243 float phi21 = PI - phi12; 244 vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR ); 245 vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 ); 246 vec3 phi23 = vec3( 0.0 ); 247 if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI; 248 if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI; 249 if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI; 250 float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2; 251 vec3 phi = vec3( phi21 ) + phi23; 252 vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 ); 253 vec3 r123 = sqrt( R123 ); 254 vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 ); 255 vec3 C0 = R12 + Rs; 256 I = C0; 257 vec3 Cm = Rs - T121; 258 for ( int m = 1; m <= 2; ++ m ) { 259 Cm *= r123; 260 vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi ); 261 I += Cm * Sm; 262 } 263 return max( I, vec3( 0.0 ) ); 264 } 265#endif`,rD=`#ifdef USE_BUMPMAP 266 uniform sampler2D bumpMap; 267 uniform float bumpScale; 268 vec2 dHdxy_fwd() { 269 vec2 dSTdx = dFdx( vBumpMapUv ); 270 vec2 dSTdy = dFdy( vBumpMapUv ); 271 float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x; 272 float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll; 273 float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll; 274 return vec2( dBx, dBy ); 275 } 276 vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { 277 vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) ); 278 vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) ); 279 vec3 vN = surf_norm; 280 vec3 R1 = cross( vSigmaY, vN ); 281 vec3 R2 = cross( vN, vSigmaX ); 282 float fDet = dot( vSigmaX, R1 ) * faceDirection; 283 vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); 284 return normalize( abs( fDet ) * surf_norm - vGrad ); 285 } 286#endif`,aD=`#if NUM_CLIPPING_PLANES > 0 287 vec4 plane; 288 #ifdef ALPHA_TO_COVERAGE 289 float distanceToPlane, distanceGradient; 290 float clipOpacity = 1.0; 291 #pragma unroll_loop_start 292 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 293 plane = clippingPlanes[ i ]; 294 distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; 295 distanceGradient = fwidth( distanceToPlane ) / 2.0; 296 clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); 297 if ( clipOpacity == 0.0 ) discard; 298 } 299 #pragma unroll_loop_end 300 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 301 float unionClipOpacity = 1.0; 302 #pragma unroll_loop_start 303 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 304 plane = clippingPlanes[ i ]; 305 distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; 306 distanceGradient = fwidth( distanceToPlane ) / 2.0; 307 unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); 308 } 309 #pragma unroll_loop_end 310 clipOpacity *= 1.0 - unionClipOpacity; 311 #endif 312 diffuseColor.a *= clipOpacity; 313 if ( diffuseColor.a == 0.0 ) discard; 314 #else 315 #pragma unroll_loop_start 316 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 317 plane = clippingPlanes[ i ]; 318 if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; 319 } 320 #pragma unroll_loop_end 321 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 322 bool clipped = true; 323 #pragma unroll_loop_start 324 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 325 plane = clippingPlanes[ i ]; 326 clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; 327 } 328 #pragma unroll_loop_end 329 if ( clipped ) discard; 330 #endif 331 #endif 332#endif`,oD=`#if NUM_CLIPPING_PLANES > 0 333 varying vec3 vClipPosition; 334 uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; 335#endif`,lD=`#if NUM_CLIPPING_PLANES > 0 336 varying vec3 vClipPosition; 337#endif`,cD=`#if NUM_CLIPPING_PLANES > 0 338 vClipPosition = - mvPosition.xyz; 339#endif`,uD=`#if defined( USE_COLOR_ALPHA ) 340 diffuseColor *= vColor; 341#elif defined( USE_COLOR ) 342 diffuseColor.rgb *= vColor; 343#endif`,fD=`#if defined( USE_COLOR_ALPHA ) 344 varying vec4 vColor; 345#elif defined( USE_COLOR ) 346 varying vec3 vColor; 347#endif`,hD=`#if defined( USE_COLOR_ALPHA ) 348 varying vec4 vColor; 349#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) 350 varying vec3 vColor; 351#endif`,dD=`#if defined( USE_COLOR_ALPHA ) 352 vColor = vec4( 1.0 ); 353#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) 354 vColor = vec3( 1.0 ); 355#endif 356#ifdef USE_COLOR 357 vColor *= color; 358#endif 359#ifdef USE_INSTANCING_COLOR 360 vColor.xyz *= instanceColor.xyz; 361#endif 362#ifdef USE_BATCHING_COLOR 363 vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) ); 364 vColor.xyz *= batchingColor.xyz; 365#endif`,pD=`#define PI 3.141592653589793 366#define PI2 6.283185307179586 367#define PI_HALF 1.5707963267948966 368#define RECIPROCAL_PI 0.3183098861837907 369#define RECIPROCAL_PI2 0.15915494309189535 370#define EPSILON 1e-6 371#ifndef saturate 372#define saturate( a ) clamp( a, 0.0, 1.0 ) 373#endif 374#define whiteComplement( a ) ( 1.0 - saturate( a ) ) 375float pow2( const in float x ) { return x*x; } 376vec3 pow2( const in vec3 x ) { return x*x; } 377float pow3( const in float x ) { return x*x*x; } 378float pow4( const in float x ) { float x2 = x*x; return x2*x2; } 379float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } 380float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } 381highp float rand( const in vec2 uv ) { 382 const highp float a = 12.9898, b = 78.233, c = 43758.5453; 383 highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); 384 return fract( sin( sn ) * c ); 385} 386#ifdef HIGH_PRECISION 387 float precisionSafeLength( vec3 v ) { return length( v ); } 388#else 389 float precisionSafeLength( vec3 v ) { 390 float maxComponent = max3( abs( v ) ); 391 return length( v / maxComponent ) * maxComponent; 392 } 393#endif 394struct IncidentLight { 395 vec3 color; 396 vec3 direction; 397 bool visible; 398}; 399struct ReflectedLight { 400 vec3 directDiffuse; 401 vec3 directSpecular; 402 vec3 indirectDiffuse; 403 vec3 indirectSpecular; 404}; 405#ifdef USE_ALPHAHASH 406 varying vec3 vPosition; 407#endif 408vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 409 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 410} 411vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { 412 return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); 413} 414bool isPerspectiveMatrix( mat4 m ) { 415 return m[ 2 ][ 3 ] == - 1.0; 416} 417vec2 equirectUv( in vec3 dir ) { 418 float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; 419 float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; 420 return vec2( u, v ); 421}
422vec3 BRDF_Lambert( const in vec3 diffuseColor ) { 423 return RECIPROCAL_PI * diffuseColor; 424} 425vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { 426 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 427 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 428} 429float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { 430 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 431 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 432} // validated`,mD=`#ifdef ENVMAP_TYPE_CUBE_UV 433 #define cubeUV_minMipLevel 4.0 434 #define cubeUV_minTileSize 16.0 435 float getFace( vec3 direction ) { 436 vec3 absDirection = abs( direction ); 437 float face = - 1.0; 438 if ( absDirection.x > absDirection.z ) { 439 if ( absDirection.x > absDirection.y ) 440 face = direction.x > 0.0 ? 0.0 : 3.0; 441 else 442 face = direction.y > 0.0 ? 1.0 : 4.0; 443 } else { 444 if ( absDirection.z > absDirection.y ) 445 face = direction.z > 0.0 ? 2.0 : 5.0; 446 else 447 face = direction.y > 0.0 ? 1.0 : 4.0; 448 } 449 return face; 450 } 451 vec2 getUV( vec3 direction, float face ) { 452 vec2 uv; 453 if ( face == 0.0 ) { 454 uv = vec2( direction.z, direction.y ) / abs( direction.x ); 455 } else if ( face == 1.0 ) { 456 uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); 457 } else if ( face == 2.0 ) { 458 uv = vec2( - direction.x, direction.y ) / abs( direction.z ); 459 } else if ( face == 3.0 ) { 460 uv = vec2( - direction.z, direction.y ) / abs( direction.x ); 461 } else if ( face == 4.0 ) { 462 uv = vec2( - direction.x, direction.z ) / abs( direction.y ); 463 } else { 464 uv = vec2( direction.x, direction.y ) / abs( direction.z ); 465 } 466 return 0.5 * ( uv + 1.0 ); 467 } 468 vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { 469 float face = getFace( direction ); 470 float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); 471 mipInt = max( mipInt, cubeUV_minMipLevel ); 472 float faceSize = exp2( mipInt ); 473 highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; 474 if ( face > 2.0 ) { 475 uv.y += faceSize; 476 face -= 3.0; 477 } 478 uv.x += face * faceSize; 479 uv.x += filterInt * 3.0 * cubeUV_minTileSize; 480 uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); 481 uv.x *= CUBEUV_TEXEL_WIDTH; 482 uv.y *= CUBEUV_TEXEL_HEIGHT; 483 #ifdef texture2DGradEXT 484 return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; 485 #else 486 return texture2D( envMap, uv ).rgb; 487 #endif 488 } 489 #define cubeUV_r0 1.0 490 #define cubeUV_m0 - 2.0 491 #define cubeUV_r1 0.8 492 #define cubeUV_m1 - 1.0 493 #define cubeUV_r4 0.4 494 #define cubeUV_m4 2.0 495 #define cubeUV_r5 0.305 496 #define cubeUV_m5 3.0 497 #define cubeUV_r6 0.21 498 #define cubeUV_m6 4.0 499 float roughnessToMip( float roughness ) { 500 float mip = 0.0; 501 if ( roughness >= cubeUV_r1 ) { 502 mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; 503 } else if ( roughness >= cubeUV_r4 ) { 504 mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; 505 } else if ( roughness >= cubeUV_r5 ) { 506 mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; 507 } else if ( roughness >= cubeUV_r6 ) { 508 mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; 509 } else { 510 mip = - 2.0 * log2( 1.16 * roughness ); } 511 return mip; 512 } 513 vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { 514 float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); 515 float mipF = fract( mip ); 516 float mipInt = floor( mip ); 517 vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); 518 if ( mipF == 0.0 ) { 519 return vec4( color0, 1.0 ); 520 } else { 521 vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); 522 return vec4( mix( color0, color1, mipF ), 1.0 ); 523 } 524 } 525#endif`,gD=`vec3 transformedNormal = objectNormal; 526#ifdef USE_TANGENT 527 vec3 transformedTangent = objectTangent; 528#endif 529#ifdef USE_BATCHING 530 mat3 bm = mat3( batchingMatrix ); 531 transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); 532 transformedNormal = bm * transformedNormal; 533 #ifdef USE_TANGENT 534 transformedTangent = bm * transformedTangent; 535 #endif 536#endif 537#ifdef USE_INSTANCING 538 mat3 im = mat3( instanceMatrix ); 539 transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); 540 transformedNormal = im * transformedNormal; 541 #ifdef USE_TANGENT 542 transformedTangent = im * transformedTangent; 543 #endif 544#endif 545transformedNormal = normalMatrix * transformedNormal; 546#ifdef FLIP_SIDED 547 transformedNormal = - transformedNormal; 548#endif 549#ifdef USE_TANGENT 550 transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; 551 #ifdef FLIP_SIDED 552 transformedTangent = - transformedTangent; 553 #endif 554#endif`,vD=`#ifdef USE_DISPLACEMENTMAP 555 uniform sampler2D displacementMap; 556 uniform float displacementScale; 557 uniform float displacementBias; 558#endif`,yD=`#ifdef USE_DISPLACEMENTMAP 559 transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + dis
559placementBias ); 560#endif`,_D=`#ifdef USE_EMISSIVEMAP 561 vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); 562 #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE 563 emissiveColor = sRGBTransferEOTF( emissiveColor ); 564 #endif 565 totalEmissiveRadiance *= emissiveColor.rgb; 566#endif`,xD=`#ifdef USE_EMISSIVEMAP 567 uniform sampler2D emissiveMap; 568#endif`,AD="gl_FragColor = linearToOutputTexel( gl_FragColor );",SD=`vec4 LinearTransferOETF( in vec4 value ) { 569 return value; 570} 571vec4 sRGBTransferEOTF( in vec4 value ) { 572 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 ); 573} 574vec4 sRGBTransferOETF( in vec4 value ) { 575 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 ); 576}`,bD=`#ifdef USE_ENVMAP 577 #ifdef ENV_WORLDPOS 578 vec3 cameraToFrag; 579 if ( isOrthographic ) { 580 cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 581 } else { 582 cameraToFrag = normalize( vWorldPosition - cameraPosition ); 583 } 584 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 585 #ifdef ENVMAP_MODE_REFLECTION 586 vec3 reflectVec = reflect( cameraToFrag, worldNormal ); 587 #else 588 vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); 589 #endif 590 #else 591 vec3 reflectVec = vReflect; 592 #endif 593 #ifdef ENVMAP_TYPE_CUBE 594 vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); 595 #else 596 vec4 envColor = vec4( 0.0 ); 597 #endif 598 #ifdef ENVMAP_BLENDING_MULTIPLY 599 outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); 600 #elif defined( ENVMAP_BLENDING_MIX ) 601 outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); 602 #elif defined( ENVMAP_BLENDING_ADD ) 603 outgoingLight += envColor.xyz * specularStrength * reflectivity; 604 #endif 605#endif`,MD=`#ifdef USE_ENVMAP 606 uniform float envMapIntensity; 607 uniform float flipEnvMap; 608 uniform mat3 envMapRotation; 609 #ifdef ENVMAP_TYPE_CUBE 610 uniform samplerCube envMap; 611 #else 612 uniform sampler2D envMap; 613 #endif 614#endif`,ED=`#ifdef USE_ENVMAP 615 uniform float reflectivity; 616 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 617 #define ENV_WORLDPOS 618 #endif 619 #ifdef ENV_WORLDPOS 620 varying vec3 vWorldPosition; 621 uniform float refractionRatio; 622 #else 623 varying vec3 vReflect; 624 #endif 625#endif`,TD=`#ifdef USE_ENVMAP 626 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 627 #define ENV_WORLDPOS 628 #endif 629 #ifdef ENV_WORLDPOS 630 631 varying vec3 vWorldPosition; 632 #else 633 varying vec3 vReflect; 634 uniform float refractionRatio; 635 #endif 636#endif`,CD=`#ifdef USE_ENVMAP 637 #ifdef ENV_WORLDPOS 638 vWorldPosition = worldPosition.xyz; 639 #else 640 vec3 cameraToVertex; 641 if ( isOrthographic ) { 642 cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 643 } else {
644 cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); 645 } 646 vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 647 #ifdef ENVMAP_MODE_REFLECTION 648 vReflect = reflect( cameraToVertex, worldNormal ); 649 #else 650 vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); 651 #endif 652 #endif 653#endif`,wD=`#ifdef USE_FOG 654 vFogDepth = - mvPosition.z; 655#endif`,RD=`#ifdef USE_FOG 656 varying float vFogDepth; 657#endif`,BD=`#ifdef USE_FOG 658 #ifdef FOG_EXP2 659 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); 660 #else 661 float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); 662 #endif 663 gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); 664#endif`,DD=`#ifdef USE_FOG 665 uniform vec3 fogColor; 666 varying float vFogDepth; 667 #ifdef FOG_EXP2 668 uniform float fogDensity; 669 #else 670 uniform float fogNear; 671 uniform float fogFar; 672 #endif 673#endif`,ID=`#ifdef USE_GRADIENTMAP 674 uniform sampler2D gradientMap; 675#endif 676vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { 677 float dotNL = dot( normal, lightDirection ); 678 vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); 679 #ifdef USE_GRADIENTMAP 680 return vec3( texture2D( gradientMap, coord ).r ); 681 #else 682 vec2 fw = fwidth( coord ) * 0.5; 683 return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); 684 #endif 685}`,LD=`#ifdef USE_LIGHTMAP 686 uniform sampler2D lightMap; 687 uniform float lightMapIntensity; 688#endif`,UD=`LambertMaterial material; 689material.diffuseColor = diffuseColor.rgb; 690material.specularStrength = specularStrength;`,ND=`varying vec3 vViewPosition; 691struct LambertMaterial { 692 vec3 diffuseColor; 693 float specularStrength; 694}; 695void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { 696 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 697 vec3 irradiance = dotNL * directLight.color; 698 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 699} 700void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { 701 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 702} 703#define RE_Direct RE_Direct_Lambert 704#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,FD=`uniform bool receiveShadow; 705uniform vec3 ambientLightColor; 706#if defined( USE_LIGHT_PROBES ) 707 uniform vec3 lightProbe[ 9 ]; 708#endif 709vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { 710 float x = normal.x, y = normal.y, z = normal.z; 711 vec3 result = shCoefficients[ 0 ] * 0.886227; 712 result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; 713 result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; 714 result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; 715 result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; 716 result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; 717 result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); 718 result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; 719 result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); 720 return result; 721} 722vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { 723 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 724 vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); 725 return irradiance; 726} 727vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { 728 vec3 irradiance = ambientLightColor; 729 return irradiance; 730} 731float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { 732 float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); 733 if ( cutoffDistance > 0.0 ) { 734 distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); 735 } 736 return distanceFalloff; 737} 738float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { 739 return smoothstep( coneCosine, penumbraCosine, angleCosine ); 740} 741#if NUM_DIR_LIGHTS > 0 742 struct DirectionalLight { 743 vec3 direction; 744 vec3 color; 745 }; 746 uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; 747 void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { 748 light.color = directionalLight.color; 749 light.direction = directionalLight.direction; 750 light.visible = true; 751 } 752#endif 753#if NUM_POINT_LIGHTS > 0 754 struct PointLight { 755 vec3 position; 756 vec3 color; 757 float distance; 758 float decay; 759 }; 760 uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; 761 void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { 762 vec3 lVector = pointLight.position - geometryPosition; 763 light.direction = normalize( lVector ); 764 float lightDistance = length( lVector ); 765 light.color = pointLight.color; 766 light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); 767 light.visible = ( light.color != vec3( 0.0 ) ); 768 } 769#endif
770#if NUM_SPOT_LIGHTS > 0 771 struct SpotLight { 772 vec3 position; 773 vec3 direction; 774 vec3 color; 775 float distance; 776 float decay; 777 float coneCos; 778 float penumbraCos; 779 }; 780 uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; 781 void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { 782 vec3 lVector = spotLight.position - geometryPosition; 783 light.direction = normalize( lVector ); 784 float angleCos = dot( light.direction, spotLight.direction ); 785 float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); 786 if ( spotAttenuation > 0.0 ) { 787 float lightDistance = length( lVector ); 788 light.color = spotLight.color * spotAttenuation; 789 light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); 790 light.visible = ( light.color != vec3( 0.0 ) ); 791 } else { 792 light.color = vec3( 0.0 ); 793 light.visible = false; 794 } 795 } 796#endif 797#if NUM_RECT_AREA_LIGHTS > 0 798 struct RectAreaLight { 799 vec3 color; 800 vec3 position; 801 vec3 halfWidth; 802 vec3 halfHeight; 803 }; 804 uniform sampler2D ltc_1; uniform sampler2D ltc_2; 805 uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; 806#endif 807#if NUM_HEMI_LIGHTS > 0 808 struct HemisphereLight { 809 vec3 direction; 810 vec3 skyColor; 811 vec3 groundColor; 812 }; 813 uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; 814 vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { 815 float dotNL = dot( normal, hemiLight.direction ); 816 float hemiDiffuseWeight = 0.5 * dotNL + 0.5; 817 vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); 818 return irradiance; 819 } 820#endif`,OD=`#ifdef USE_ENVMAP 821 vec3 getIBLIrradiance( const in vec3 normal ) { 822 #ifdef ENVMAP_TYPE_CUBE_UV 823 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 824 vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); 825 return PI * envMapColor.rgb * envMapIntensity; 826 #else 827 return vec3( 0.0 ); 828 #endif 829 } 830 vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { 831 #ifdef ENVMAP_TYPE_CUBE_UV 832 vec3 reflectVec = reflect( - viewDir, normal ); 833 reflectVec = normalize( mix( reflectVec, normal, pow4( roughness ) ) ); 834 reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); 835 vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); 836 return envMapColor.rgb * envMapIntensity; 837 #else 838 return vec3( 0.0 ); 839 #endif 840 } 841 #ifdef USE_ANISOTROPY 842 vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { 843 #ifdef ENVMAP_TYPE_CUBE_UV 844 vec3 bentNormal = cross( bitangent, viewDir ); 845 bentNormal = normalize( cross( bentNormal, bitangent ) ); 846 bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); 847 return getIBLRadiance( viewDir, bentNormal, roughness ); 848 #else 849 return vec3( 0.0 ); 850 #endif 851 } 852 #endif 853#endif`,PD=`ToonMaterial material; 854material.diffuseColor = diffuseColor.rgb;`,zD=`varying vec3 vViewPosition; 855struct ToonMaterial { 856 vec3 diffuseColor; 857}; 858void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { 859 vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; 860 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 861} 862void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { 863 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 864} 865#define RE_Direct RE_Direct_Toon 866#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,GD=`BlinnPhongMaterial material; 867material.diffuseColor = diffuseColor.rgb; 868material.specularColor = specular; 869material.specularShininess = shininess; 870material.specularStrength = specularStrength;`,HD=`varying vec3 vViewPosition; 871struct BlinnPhongMaterial { 872 vec3 diffuseColor; 873 vec3 specularColor; 874 float specularShininess; 875 float specularStrength; 876}; 877void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
878 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 879 vec3 irradiance = dotNL * directLight.color; 880 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 881 reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; 882} 883void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { 884 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 885} 886#define RE_Direct RE_Direct_BlinnPhong 887#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,kD=`PhysicalMaterial material; 888material.diffuseColor = diffuseColor.rgb; 889material.diffuseContribution = diffuseColor.rgb * ( 1.0 - metalnessFactor ); 890material.metalness = metalnessFactor; 891vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); 892float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); 893material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; 894material.roughness = min( material.roughness, 1.0 ); 895#ifdef IOR 896 material.ior = ior; 897 #ifdef USE_SPECULAR 898 float specularIntensityFactor = specularIntensity; 899 vec3 specularColorFactor = specularColor; 900 #ifdef USE_SPECULAR_COLORMAP 901 specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; 902 #endif 903 #ifdef USE_SPECULAR_INTENSITYMAP 904 specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; 905 #endif 906 material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); 907 #else 908 float specularIntensityFactor = 1.0; 909 vec3 specularColorFactor = vec3( 1.0 ); 910 material.specularF90 = 1.0; 911 #endif 912 material.specularColor = min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor; 913 material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor ); 914#else 915 material.specularColor = vec3( 0.04 ); 916 material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor ); 917 material.specularF90 = 1.0; 918#endif 919#ifdef USE_CLEARCOAT 920 material.clearcoat = clearcoat; 921 material.clearcoatRoughness = clearcoatRoughness; 922 material.clearcoatF0 = vec3( 0.04 ); 923 material.clearcoatF90 = 1.0; 924 #ifdef USE_CLEARCOATMAP 925 material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; 926 #endif 927 #ifdef USE_CLEARCOAT_ROUGHNESSMAP 928 material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; 929 #endif 930 material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); 931 material.clearcoatRoughness += geometryRoughness; 932 material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); 933#endif 934#ifdef USE_DISPERSION 935 material.dispersion = dispersion; 936#endif 937#ifdef USE_IRIDESCENCE 938 material.iridescence = iridescence; 939 material.iridescenceIOR = iridescenceIOR; 940 #ifdef USE_IRIDESCENCEMAP 941 material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; 942 #endif 943 #ifdef USE_IRIDESCENCE_THICKNESSMAP 944 material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; 945 #else 946 material.iridescenceThickness = iridescenceThicknessMaximum; 947 #endif 948#endif 949#ifdef USE_SHEEN 950 material.sheenColor = sheenColor; 951 #ifdef USE_SHEEN_COLORMAP 952 material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; 953 #endif 954 material.sheenRoughness = clamp( sheenRoughness, 0.0001, 1.0 ); 955 #ifdef USE_SHEEN_ROUGHNESSMAP 956 material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; 957 #endif 958#endif 959#ifdef USE_ANISOTROPY 960 #ifdef USE_ANISOTROPYMAP 961 mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); 962 vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; 963 vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; 964 #else 965 vec2 anisotropyV = anisotropyVector; 966 #endif 967 material.anisotropy = length( anisotropyV ); 968 if( material.anisotropy == 0.0 ) { 969 anisotropyV = vec2( 1.0, 0.0 ); 970 } else { 971 anisotropyV /= material.anisotropy; 972 material.anisotropy = saturate( material.anisotropy ); 973 } 974 material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
975 material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; 976 material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; 977#endif`,VD
vendor: 17,312 bytes, lines 977-1325
977=`uniform sampler2D dfgLUT; 978struct PhysicalMaterial { 979 vec3 diffuseColor; 980 vec3 diffuseContribution; 981 vec3 specularColor; 982 vec3 specularColorBlended; 983 float roughness; 984 float metalness; 985 float specularF90; 986 float dispersion; 987 #ifdef USE_CLEARCOAT 988 float clearcoat; 989 float clearcoatRoughness; 990 vec3 clearcoatF0; 991 float clearcoatF90; 992 #endif 993 #ifdef USE_IRIDESCENCE 994 float iridescence; 995 float iridescenceIOR; 996 float iridescenceThickness; 997 vec3 iridescenceFresnel; 998 vec3 iridescenceF0; 999 vec3 iridescenceFresnelDielectric; 1000 vec3 iridescenceFresnelMetallic; 1001 #endif 1002 #ifdef USE_SHEEN 1003 vec3 sheenColor; 1004 float sheenRoughness; 1005 #endif 1006 #ifdef IOR 1007 float ior; 1008 #endif 1009 #ifdef USE_TRANSMISSION 1010 float transmission; 1011 float transmissionAlpha; 1012 float thickness; 1013 float attenuationDistance; 1014 vec3 attenuationColor; 1015 #endif 1016 #ifdef USE_ANISOTROPY 1017 float anisotropy; 1018 float alphaT; 1019 vec3 anisotropyT; 1020 vec3 anisotropyB; 1021 #endif 1022}; 1023vec3 clearcoatSpecularDirect = vec3( 0.0 ); 1024vec3 clearcoatSpecularIndirect = vec3( 0.0 ); 1025vec3 sheenSpecularDirect = vec3( 0.0 ); 1026vec3 sheenSpecularIndirect = vec3(0.0 ); 1027vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { 1028 float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); 1029 float x2 = x * x; 1030 float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); 1031 return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); 1032} 1033float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { 1034 float a2 = pow2( alpha ); 1035 float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); 1036 float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); 1037 return 0.5 / max( gv + gl, EPSILON ); 1038} 1039float D_GGX( const in float alpha, const in float dotNH ) { 1040 float a2 = pow2( alpha ); 1041 float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; 1042 return RECIPROCAL_PI * a2 / pow2( denom ); 1043} 1044#ifdef USE_ANISOTROPY 1045 float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) { 1046 float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); 1047 float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); 1048 float v = 0.5 / ( gv + gl ); 1049 return v; 1050 } 1051 float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { 1052 float a2 = alphaT * alphaB; 1053 highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); 1054 highp float v2 = dot( v, v ); 1055 float w2 = a2 / v2; 1056 return RECIPROCAL_PI * a2 * pow2 ( w2 ); 1057 } 1058#endif 1059#ifdef USE_CLEARCOAT 1060 vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { 1061 vec3 f0 = material.clearcoatF0; 1062 float f90 = material.clearcoatF90; 1063 float roughness = material.clearcoatRoughness; 1064 float alpha = pow2( roughness ); 1065 vec3 halfDir = normalize( lightDir + viewDir ); 1066 float dotNL = saturate( dot( normal, lightDir ) ); 1067 float dotNV = saturate( dot( normal, viewDir ) ); 1068 float dotNH = saturate( dot( normal, halfDir ) ); 1069 float dotVH = saturate( dot( viewDir, halfDir ) ); 1070 vec3 F = F_Schlick( f0, f90, dotVH ); 1071 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 1072 float D = D_GGX( alpha, dotNH ); 1073 return F * ( V * D ); 1074 } 1075#endif 1076vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { 1077 vec3 f0 = material.specularColorBlended; 1078 float f90 = material.specularF90; 1079 float roughness = material.roughness; 1080 float alpha = pow2( roughness ); 1081 vec3 halfDir = normalize( lightDir + viewDir ); 1082 float dotNL = saturate( dot( normal, lightDir ) ); 1083 float dotNV = saturate( dot( normal, viewDir ) ); 1084 float dotNH = saturate( dot( normal, halfDir ) ); 1085 float dotVH = saturate( dot( viewDir, halfDir ) ); 1086 vec3 F = F_Schlick( f0, f90, dotVH ); 1087 #ifdef USE_IRIDESCENCE 1088 F = mix( F, material.iridescenceFresnel, material.iridescence ); 1089 #endif 1090 #ifdef USE_ANISOTROPY 1091 float dotTL = dot( material.anisotropyT, lightDir ); 1092 float dotTV = dot( material.anisotropyT, viewDir ); 1093 float dotTH = dot( material.anisotropyT, halfDir ); 1094 float dotBL = dot( material.anisotropyB, lightDir ); 1095 float dotBV = dot( material.anisotropyB, viewDir ); 1096 float dotBH = dot( material.anisotropyB, halfDir ); 1097 float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); 1098 float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); 1099 #else 1100 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 1101 float D = D_GGX( alpha, dotNH ); 1102 #endif 1103 return F * ( V * D ); 1104} 1105vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { 1106 const float LUT_SIZE = 64.0; 1107 const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; 1108 const float LUT_BIAS = 0.5 / LUT_SIZE; 1109 float dotNV = saturate( dot( N, V ) ); 1110 vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); 1111 uv = uv * LUT_SCALE + LUT_BIAS; 1112 return uv; 1113} 1114float LTC_ClippedSphereFormFactor( const in vec3 f ) { 1115 float l = length( f ); 1116 return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); 1117} 1118vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { 1119 float x = dot( v1, v2 ); 1120 float y = abs( x ); 1121 float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; 1122 float b = 3.4175940 + ( 4.1616724 + y ) * y; 1123 float v = a / b; 1124 float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; 1125 return cross( v1, v2 ) * theta_sintheta; 1126} 1127vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { 1128 vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; 1129 vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; 1130 vec3 lightNormal = cross( v1, v2 ); 1131 if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); 1132 vec3 T1, T2; 1133 T1 = normalize( V - N * dot( V, N ) ); 1134 T2 = - cross( N, T1 ); 1135 mat3 mat = mInv * transpose( mat3( T1, T2, N ) ); 1136 vec3 coords[ 4 ]; 1137 coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); 1138 coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); 1139 coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); 1140 coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); 1141 coords[ 0 ] = normalize( coords[ 0 ] ); 1142 coords[ 1 ] = normalize( coords[ 1 ] ); 1143 coords[ 2 ] = normalize( coords[ 2 ] ); 1144 coords[ 3 ] = normalize( coords[ 3 ] ); 1145 vec3 vectorFormFactor = vec3( 0.0 ); 1146 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); 1147 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); 1148 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); 1149 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); 1150 float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); 1151 return vec3( result ); 1152} 1153#if defined( USE_SHEEN ) 1154float D_Charlie( float roughness, float dotNH ) { 1155 float alpha = pow2( roughness ); 1156 float invAlpha = 1.0 / alpha; 1157 float cos2h = dotNH * dotNH; 1158 float sin2h = max( 1.0 - cos2h, 0.0078125 ); 1159 return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); 1160} 1161float V_Neubelt( float dotNV, float dotNL ) { 1162 return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); 1163} 1164vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { 1165 vec3 halfDir = normalize( lightDir + viewDir ); 1166 float dotNL = saturate( dot( normal, lightDir ) ); 1167 float dotNV = saturate( dot( normal, viewDir ) ); 1168 float dotNH = saturate( dot( normal, halfDir ) ); 1169 float D = D_Charlie( sheenRoughness, dotNH ); 1170 float V = V_Neubelt( dotNV, dotNL ); 1171 return sheenColor * ( D * V ); 1172} 1173#endif 1174float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { 1175 float dotNV = saturate( dot( normal, viewDir ) ); 1176 float r2 = roughness * roughness; 1177 float rInv = 1.0 / ( roughness + 0.1 ); 1178 float a = -1.9362 + 1.0678 * roughness + 0.4573 * r2 - 0.8469 * rInv; 1179 float b = -0.6014 + 0.5538 * roughness - 0.4670 * r2 - 0.1255 * rInv; 1180 float DG = exp( a * dotNV + b ); 1181 return saturate( DG ); 1182} 1183vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { 1184 float dotNV = saturate( dot( normal, viewDir ) ); 1185 vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg; 1186 return specularColor * fab.x + specularF90 * fab.y; 1187} 1188#ifdef USE_IRIDESCENCE 1189void 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 ) { 1190#else 1191void 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 ) { 1192#endif 1193 float dotNV = saturate( dot( normal, viewDir ) ); 1194 vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg; 1195 #ifdef USE_IRIDESCENCE 1196 vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); 1197 #else 1198 vec3 Fr = specularColor; 1199 #endif 1200 vec3 FssEss = Fr * fab.x + specularF90 * fab.y; 1201 float Ess = fab.x + fab.y; 1202 float Ems = 1.0 - Ess; 1203 vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); 1204 singleScatter += FssEss; 1205 multiScatter += Fms * Ems; 1206} 1207vec3 BRDF_GGX_Multiscatter( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { 1208 vec3 singleScatter = BRDF_GGX( lightDir, viewDir, normal, material ); 1209 float dotNL = saturate( dot( normal, lightDir ) ); 1210 float dotNV = saturate( dot( normal, viewDir ) ); 1211 vec2 dfgV = texture2D( dfgLUT, vec2( material.roughness, dotNV ) ).rg; 1212 vec2 dfgL = texture2D( dfgLUT, vec2( material.roughness, dotNL ) ).rg; 1213 vec3 FssEss_V = material.specularColorBlended * dfgV.x + material.specularF90 * dfgV.y; 1214 vec3 FssEss_L = material.specularColorBlended * dfgL.x + material.specularF90 * dfgL.y; 1215 float Ess_V = dfgV.x + dfgV.y; 1216 float Ess_L = dfgL.x + dfgL.y; 1217 float Ems_V = 1.0 - Ess_V; 1218 float Ems_L = 1.0 - Ess_L; 1219 vec3 Favg = material.specularColorBlended + ( 1.0 - material.specularColorBlended ) * 0.047619; 1220 vec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg + EPSILON ); 1221 float compensationFactor = Ems_V * Ems_L; 1222 vec3 multiScatter = Fms * compensationFactor; 1223 return singleScatter + multiScatter; 1224} 1225#if NUM_RECT_AREA_LIGHTS > 0 1226 void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { 1227 vec3 normal = geometryNormal; 1228 vec3 viewDir = geometryViewDir; 1229 vec3 position = geometryPosition; 1230 vec3 lightPos = rectAreaLight.position; 1231 vec3 halfWidth = rectAreaLight.halfWidth; 1232 vec3 halfHeight = rectAreaLight.halfHeight; 1233 vec3 lightColor = rectAreaLight.color; 1234 float roughness = material.roughness; 1235 vec3 rectCoords[ 4 ]; 1236 rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; 1237 rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; 1238 rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; 1239 vec2 uv = LTC_Uv( normal, viewDir, roughness ); 1240 vec4 t1 = texture2D( ltc_1, uv ); 1241 vec4 t2 = texture2D( ltc_2, uv ); 1242 mat3 mInv = mat3( 1243 vec3( t1.x, 0, t1.y ), 1244 vec3( 0, 1, 0 ), 1245 vec3( t1.z, 0, t1.w ) 1246 ); 1247 vec3 fresnel = ( material.specularColorBlended * t2.x + ( vec3( 1.0 ) - material.specularColorBlended ) * t2.y ); 1248 reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); 1249 reflectedLight.directDiffuse += lightColor * material.diffuseContribution * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); 1250 } 1251#endif 1252void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { 1253 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 1254 vec3 irradiance = dotNL * directLight.color; 1255 #ifdef USE_CLEARCOAT 1256 float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); 1257 vec3 ccIrradiance = dotNLcc * directLight.color; 1258 clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); 1259 #endif 1260 #ifdef USE_SHEEN 1261 1262 sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); 1263 1264 float sheenAlbedoV = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1265 float sheenAlbedoL = IBLSheenBRDF( geometryNormal, directLight.direction, material.sheenRoughness ); 1266 1267 float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * max( sheenAlbedoV, sheenAlbedoL ); 1268 1269 irradiance *= sheenEnergyComp; 1270 1271 #endif 1272 reflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material ); 1273 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseContribution ); 1274} 1275void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { 1276 vec3 diffuse = irradiance * BRDF_Lambert( material.diffuseContribution ); 1277 #ifdef USE_SHEEN 1278 float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1279 float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo; 1280 diffuse *= sheenEnergyComp; 1281 #endif 1282 reflectedLight.indirectDiffuse += diffuse; 1283} 1284void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { 1285 #ifdef USE_CLEARCOAT 1286 clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); 1287 #endif 1288 #ifdef USE_SHEEN 1289 sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ) * RECIPROCAL_PI; 1290 #endif 1291 vec3 singleScatteringDielectric = vec3( 0.0 ); 1292 vec3 multiScatteringDielectric = vec3( 0.0 ); 1293 vec3 singleScatteringMetallic = vec3( 0.0 ); 1294 vec3 multiScatteringMetallic = vec3( 0.0 ); 1295 #ifdef USE_IRIDESCENCE 1296 computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnelDielectric, material.roughness, singleScatteringDielectric, multiScatteringDielectric ); 1297 computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.iridescence, material.iridescenceFresnelMetallic, material.roughness, singleScatteringMetallic, multiScatteringMetallic ); 1298 #else 1299 computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScatteringDielectric, multiScatteringDielectric ); 1300 computeMultiscattering( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.roughness, singleScatteringMetallic, multiScatteringMetallic ); 1301 #endif 1302 vec3 singleScattering = mix( singleScatteringDielectric, singleScatteringMetallic, material.metalness ); 1303 vec3 multiScattering = mix( multiScatteringDielectric, multiScatteringMetallic, material.metalness ); 1304 vec3 totalScatteringDielectric = singleScatteringDielectric + multiScatteringDielectric; 1305 vec3 diffuse = material.diffuseContribution * ( 1.0 - totalScatteringDielectric ); 1306 vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; 1307 vec3 indirectSpecular = radiance * singleScattering; 1308 indirectSpecular += multiScattering * cosineWeightedIrradiance; 1309 vec3 indirectDiffuse = diffuse * cosineWeightedIrradiance; 1310 #ifdef USE_SHEEN 1311 float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1312 float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo; 1313 indirectSpecular *= sheenEnergyComp; 1314 indirectDiffuse *= sheenEnergyComp; 1315 #endif 1316 reflectedLight.indirectSpecular += indirectSpecular; 1317 reflectedLight.indirectDiffuse += indirectDiffuse; 1318} 1319#define RE_Direct RE_Direct_Physical 1320#define RE_Direct_RectArea RE_Direct_RectArea_Physical 1321#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical 1322#define RE_IndirectSpecular RE_IndirectSpecular_Physical 1323float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { 1324 return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); 1325}`,
1325XD=` 1326vec3 geometryPosition = - vViewPosition; 1327vec3 geometryNormal = normal; 1328vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); 1329vec3 geometryClearcoatNormal = vec3( 0.0 ); 1330#ifdef USE_CLEARCOAT 1331 geometryClearcoatNormal = clearcoatNormal; 1332#endif 1333#ifdef USE_IRIDESCENCE 1334 float dotNVi = saturate( dot( normal, geometryViewDir ) ); 1335 if ( material.iridescenceThickness == 0.0 ) { 1336 material.iridescence = 0.0; 1337 } else { 1338 material.iridescence = saturate( material.iridescence ); 1339 } 1340 if ( material.iridescence > 0.0 ) { 1341 material.iridescenceFresnelDielectric = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); 1342 material.iridescenceFresnelMetallic = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.diffuseColor ); 1343 material.iridescenceFresnel = mix( material.iridescenceFresnelDielectric, material.iridescenceFresnelMetallic, material.metalness ); 1344 material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); 1345 } 1346#endif 1347IncidentLight directLight; 1348#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) 1349 PointLight pointLight; 1350 #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 1351 PointLightShadow pointLightShadow; 1352 #endif 1353 #pragma unroll_loop_start 1354 for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { 1355 pointLight = pointLights[ i ]; 1356 getPointLightInfo( pointLight, geometryPosition, directLight ); 1357 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) ) 1358 pointLightShadow = pointLightShadows[ i ]; 1359 directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; 1360 #endif 1361 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1362 } 1363 #pragma unroll_loop_end 1364#endif 1365#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) 1366 SpotLight spotLight; 1367 vec4 spotColor; 1368 vec3 spotLightCoord; 1369 bool inSpotLightMap; 1370 #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 1371 SpotLightShadow spotLightShadow; 1372 #endif 1373 #pragma unroll_loop_start 1374 for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { 1375 spotLight = spotLights[ i ]; 1376 getSpotLightInfo( spotLight, geometryPosition, directLight ); 1377 #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1378 #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX 1379 #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1380 #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS 1381 #else 1382 #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1383 #endif 1384 #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) 1385 spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; 1386 inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); 1387 spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); 1388 directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; 1389 #endif 1390 #undef SPOT_LIGHT_MAP_INDEX 1391 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1392 spotLightShadow = spotLightShadows[ i ]; 1393 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 1394 #endif 1395 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1396 } 1397 #pragma unroll_loop_end 1398#endif 1399#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) 1400 DirectionalLight directionalLight; 1401 #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 1402 DirectionalLightShadow directionalLightShadow; 1403 #endif 1404 #pragma unroll_loop_start 1405 for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { 1406 directionalLight = directionalLights[ i ]; 1407 getDirectionalLightInfo( directionalLight, directLight ); 1408 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) 1409 directionalLightShadow = directionalLightShadows[ i ]; 1410 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 1411 #endif 1412 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1413 } 1414 #pragma unroll_loop_end 1415#endif 1416#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) 1417 RectAreaLight rectAreaLight; 1418 #pragma unroll_loop_start 1419 for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { 1420 rectAreaLight = rectAreaLights[ i ]; 1421 RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1422 } 1423 #pragma unroll_loop_end 1424#endif 1425#if defined( RE_IndirectDiffuse ) 1426 vec3 iblIrradiance = vec3( 0.0 ); 1427 vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); 1428 #if defined( USE_LIGHT_PROBES ) 1429 irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); 1430 #endif 1431 #if ( NUM_HEMI_LIGHTS > 0 ) 1432 #pragma unroll_loop_start 1433 for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { 1434 irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); 1435 } 1436 #pragma unroll_loop_end 1437 #endif 1438#endif 1439#if defined( RE_IndirectSpecular ) 1440 vec3 radiance = vec3( 0.0 ); 1441 vec3 clearcoatRadiance = vec3( 0.0 ); 1442#endif`,WD=`#if defined( RE_IndirectDiffuse ) 1443 #ifdef USE_LIGHTMAP 1444 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 1445 vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; 1446 irradiance += lightMapIrradiance; 1447 #endif 1448 #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) 1449 iblIrradiance += getIBLIrradiance( geometryNormal ); 1450 #endif 1451#endif 1452#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) 1453 #ifdef USE_ANISOTROPY 1454 radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); 1455 #else 1456 radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); 1457 #endif 1458 #ifdef USE_CLEARCOAT 1459 clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); 1460 #endif 1461#endif`,JD=`#if defined( RE_IndirectDiffuse ) 1462 RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1463#endif 1464#if defined( RE_IndirectSpecular ) 1465 RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1466#endif`,YD=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) 1467 gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; 1468#endif`,qD=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) 1469 uniform float logDepthBufFC; 1470 varying float vFragDepth; 1471 varying float vIsPerspective; 1472#endif`,KD=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER 1473 varying float vFragDepth; 1474 varying float vIsPerspective; 1475#endif`,ZD=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER 1476 vFragDepth = 1.0 + gl_Position.w; 1477 vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); 1478#endif`,QD=`#ifdef USE_MAP 1479 vec4 sampledDiffuseColor = texture2D( map, vMapUv ); 1480 #ifdef DECODE_VIDEO_TEXTURE 1481 sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor ); 1482 #endif 1483 diffuseColor *= sampledDiffuseColor; 1484#endif`,jD=`#ifdef USE_MAP 1485 uniform sampler2D map; 1486#endif`,$D=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1487 #if defined( USE_POINTS_UV ) 1488 vec2 uv = vUv; 1489 #else 1490 vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; 1491 #endif 1492#endif 1493#ifdef USE_MAP 1494 diffuseColor *= texture2D( map, uv ); 1495#endif 1496#ifdef USE_ALPHAMAP 1497 diffuseColor.a *= texture2D( alphaMap, uv ).g; 1498#endif`,eI=`#if defined( USE_POINTS_UV ) 1499 varying vec2 vUv; 1500#else 1501 #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1502 uniform mat3 uvTransform; 1503 #endif 1504#endif 1505#ifdef USE_MAP 1506 uniform sampler2D map; 1507#endif 1508#ifdef USE_ALPHAMAP 1509 uniform sampler2D alphaMap; 1510#endif`,tI=`float metalnessFactor = metalness; 1511#ifdef USE_METALNESSMAP 1512 vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); 1513 metalnessFactor *= texelMetalness.b; 1514#endif`,nI=`#ifdef USE_METALNESSMAP 1515 uniform sampler2D metalnessMap; 1516#endif`,iI=`#ifdef USE_INSTANCING_MORPH 1517 float morphTargetInfluences[ MORPHTARGETS_COUNT ]; 1518 float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; 1519 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1520 morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; 1521 } 1522#endif`,sI=`#if defined( USE_MORPHCOLORS ) 1523 vColor *= morphTargetBaseInfluence; 1524 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1525 #if defined( USE_COLOR_ALPHA ) 1526 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; 1527 #elif defined( USE_COLOR ) 1528 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; 1529 #endif 1530 } 1531#endif`,rI=`#ifdef USE_MORPHNORMALS 1532 objectNormal *= morphTargetBaseInfluence; 1533 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1534 if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; 1535 } 1536#endif`,aI=`#ifdef USE_MORPHTARGETS 1537 #ifndef USE_INSTANCING_MORPH 1538 uniform float morphTargetBaseInfluence; 1539 uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; 1540 #endif 1541 uniform sampler2DArray morphTargetsTexture; 1542 uniform ivec2 morphTargetsTextureSize; 1543 vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { 1544 int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; 1545 int y = texelIndex / morphTargetsTextureSize.x; 1546 int x = texelIndex - y * morphTargetsTextureSize.x; 1547 ivec3 morphUV = ivec3( x, y, morphTargetIndex ); 1548 return texelFetch( morphTargetsTexture, morphUV, 0 ); 1549 } 1550#endif`,oI=`#ifdef USE_MORPHTARGETS 1551 transformed *= morphTargetBaseInfluence; 1552 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1553 if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; 1554 } 1555#endif`,lI=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; 1556#ifdef FLAT_SHADED 1557 vec3 fdx = dFdx( vViewPosition ); 1558 vec3 fdy = dFdy( vViewPosition ); 1559 vec3 normal = normalize( cross( fdx, fdy ) ); 1560#else 1561 vec3 normal = normalize( vNormal ); 1562 #ifdef DOUBLE_SIDED 1563 normal *= faceDirection; 1564 #endif 1565#endif 1566#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) 1567 #ifdef USE_TANGENT 1568 mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 1569 #else 1570 mat3 tbn = getTangentFrame( - vViewPosition, normal, 1571 #if defined( USE_NORMALMAP ) 1572 vNormalMapUv 1573 #elif defined( USE_CLEARCOAT_NORMALMAP ) 1574 vClearcoatNormalMapUv 1575 #else 1576 vUv 1577 #endif 1578 ); 1579 #endif 1580 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 1581 tbn[0] *= faceDirection; 1582 tbn[1] *= faceDirection; 1583 #endif 1584#endif 1585#ifdef USE_CLEARCOAT_NORMALMAP 1586 #ifdef USE_TANGENT 1587 mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 1588 #else 1589 mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); 1590 #endif 1591 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 1592 tbn2[0] *= faceDirection; 1593 tbn2[1] *= faceDirection; 1594 #endif 1595#endif 1596vec3 nonPerturbedNormal = normal;`,cI=`#ifdef USE_NORMALMAP_OBJECTSPACE 1597 normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 1598 #ifdef FLIP_SIDED 1599 normal = - normal; 1600 #endif 1601 #ifdef DOUBLE_SIDED 1602 normal = normal * faceDirection; 1603 #endif 1604 normal = normalize( normalMatrix * normal ); 1605#elif defined( USE_NORMALMAP_TANGENTSPACE ) 1606 vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 1607 mapN.xy *= normalScale; 1608 normal = normalize( tbn * mapN ); 1609#elif defined( USE_BUMPMAP )
1610 normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); 1611#endif`,uI=`#ifndef FLAT_SHADED 1612 varying vec3 vNormal; 1613 #ifdef USE_TANGENT 1614 varying vec3 vTangent; 1615 varying vec3 vBitangent; 1616 #endif 1617#endif`,fI=`#ifndef FLAT_SHADED 1618 varying vec3 vNormal; 1619 #ifdef USE_TANGENT 1620 varying vec3 vTangent; 1621 varying vec3 vBitangent; 1622 #endif 1623#endif`,hI=`#ifndef FLAT_SHADED 1624 vNormal = normalize( transformedNormal ); 1625 #ifdef USE_TANGENT 1626 vTangent = normalize( transformedTangent ); 1627 vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); 1628 #endif 1629#endif`,dI=`#ifdef USE_NORMALMAP 1630 uniform sampler2D normalMap; 1631 uniform vec2 normalScale; 1632#endif 1633#ifdef USE_NORMALMAP_OBJECTSPACE 1634 uniform mat3 normalMatrix; 1635#endif 1636#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) 1637 mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { 1638 vec3 q0 = dFdx( eye_pos.xyz ); 1639 vec3 q1 = dFdy( eye_pos.xyz ); 1640 vec2 st0 = dFdx( uv.st ); 1641 vec2 st1 = dFdy( uv.st ); 1642 vec3 N = surf_norm; 1643 vec3 q1perp = cross( q1, N ); 1644 vec3 q0perp = cross( N, q0 ); 1645 vec3 T = q1perp * st0.x + q0perp * st1.x; 1646 vec3 B = q1perp * st0.y + q0perp * st1.y; 1647 float det = max( dot( T, T ), dot( B, B ) ); 1648 float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); 1649 return mat3( T * scale, B * scale, N ); 1650 } 1651#endif`,pI=`#ifdef USE_CLEARCOAT 1652 vec3 clearcoatNormal = nonPerturbedNormal; 1653#endif`,mI=`#ifdef USE_CLEARCOAT_NORMALMAP 1654 vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; 1655 clearcoatMapN.xy *= clearcoatNormalScale; 1656 clearcoatNormal = normalize( tbn2 * clearcoatMapN ); 1657#endif`,gI=`#ifdef USE_CLEARCOATMAP 1658 uniform sampler2D clearcoatMap; 1659#endif 1660#ifdef USE_CLEARCOAT_NORMALMAP 1661 uniform sampler2D clearcoatNormalMap; 1662 uniform vec2 clearcoatNormalScale; 1663#endif 1664#ifdef USE_CLEARCOAT_ROUGHNESSMAP 1665 uniform sampler2D clearcoatRoughnessMap; 1666#endif`,vI=`#ifdef USE_IRIDESCENCEMAP 1667 uniform sampler2D iridescenceMap; 1668#endif 1669#ifdef USE_IRIDESCENCE_THICKNESSMAP 1670 uniform sampler2D iridescenceThicknessMap; 1671#endif`,yI=`#ifdef OPAQUE 1672diffuseColor.a = 1.0; 1673#endif 1674#ifdef USE_TRANSMISSION 1675diffuseColor.a *= material.transmissionAlpha; 1676#endif 1677gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,_I=`vec3 packNormalToRGB( const in vec3 normal ) { 1678 return normalize( normal ) * 0.5 + 0.5; 1679} 1680vec3 unpackRGBToNormal( const in vec3 rgb ) { 1681 return 2.0 * rgb.xyz - 1.0; 1682} 1683const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.; 1684const float Inv255 = 1. / 255.; 1685const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 ); 1686const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g ); 1687const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b ); 1688const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a ); 1689vec4 packDepthToRGBA( const in float v ) { 1690 if( v <= 0.0 ) 1691 return vec4( 0., 0., 0., 0. ); 1692 if( v >= 1.0 ) 1693 return vec4( 1., 1., 1., 1. ); 1694 float vuf; 1695 float af = modf( v * PackFactors.a, vuf ); 1696 float bf = modf( vuf * ShiftRight8, vuf ); 1697 float gf = modf( vuf * ShiftRight8, vuf ); 1698 return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af ); 1699} 1700vec3 packDepthToRGB( const in float v ) { 1701 if( v <= 0.0 ) 1702 return vec3( 0., 0., 0. ); 1703 if( v >= 1.0 ) 1704 return vec3( 1., 1., 1. ); 1705 float vuf; 1706 float bf = modf( v * PackFactors.b, vuf ); 1707 float gf = modf( vuf * ShiftRight8, vuf ); 1708 return vec3( vuf * Inv255, gf * PackUpscale, bf ); 1709} 1710vec2 packDepthToRG( const in float v ) { 1711 if( v <= 0.0 ) 1712 return vec2( 0., 0. ); 1713 if( v >= 1.0 ) 1714 return vec2( 1., 1. ); 1715 float vuf; 1716 float gf = modf( v * 256., vuf ); 1717 return vec2( vuf * Inv255, gf ); 1718} 1719float unpackRGBAToDepth( const in vec4 v ) { 1720 return dot( v, UnpackFactors4 ); 1721} 1722float unpackRGBToDepth( const in vec3 v ) { 1723 return dot( v, UnpackFactors3 ); 1724} 1725float unpackRGToDepth( const in vec2 v ) { 1726 return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g; 1727} 1728vec4 pack2HalfToRGBA( const in vec2 v ) {
1729 vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); 1730 return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); 1731} 1732vec2 unpackRGBATo2Half( const in vec4 v ) { 1733 return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); 1734} 1735float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { 1736 return ( viewZ + near ) / ( near - far ); 1737} 1738float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { 1739 return depth * ( near - far ) - near; 1740} 1741float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { 1742 return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); 1743} 1744float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { 1745 return ( near * far ) / ( ( far - near ) * depth - far ); 1746}`,xI=`#ifdef PREMULTIPLIED_ALPHA 1747 gl_FragColor.rgb *= gl_FragColor.a; 1748#endif`,AI=`vec4 mvPosition = vec4( transformed, 1.0 ); 1749#ifdef USE_BATCHING 1750 mvPosition = batchingMatrix * mvPosition; 1751#endif 1752#ifdef USE_INSTANCING 1753 mvPosition = instanceMatrix * mvPosition; 1754#endif 1755mvPosition = modelViewMatrix * mvPosition; 1756gl_Position = projectionMatrix * mvPosition;`,SI=`#ifdef DITHERING 1757 gl_FragColor.rgb = dithering( gl_FragColor.rgb ); 1758#endif`,bI=`#ifdef DITHERING 1759 vec3 dithering( vec3 color ) { 1760 float grid_position = rand( gl_FragCoord.xy ); 1761 vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); 1762 dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); 1763 return color + dither_shift_RGB; 1764 } 1765#endif`,MI=`float roughnessFactor = roughness; 1766#ifdef USE_ROUGHNESSMAP 1767 vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); 1768 roughnessFactor *= texelRoughness.g; 1769#endif`,EI=`#ifdef USE_ROUGHNESSMAP 1770 uniform sampler2D roughnessMap; 1771#endif`,TI=`#if NUM_SPOT_LIGHT_COORDS > 0 1772 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 1773#endif 1774#if NUM_SPOT_LIGHT_MAPS > 0 1775 uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; 1776#endif 1777#ifdef USE_SHADOWMAP 1778 #if NUM_DIR_LIGHT_SHADOWS > 0 1779 #if defined( SHADOWMAP_TYPE_PCF ) 1780 uniform sampler2DShadow directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; 1781 #else 1782 uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; 1783 #endif 1784 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 1785 struct DirectionalLightShadow { 1786 float shadowIntensity; 1787 float shadowBias; 1788 float shadowNormalBias; 1789 float shadowRadius; 1790 vec2 shadowMapSize; 1791 }; 1792 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 1793 #endif 1794 #if NUM_SPOT_LIGHT_SHADOWS > 0 1795 #if defined( SHADOWMAP_TYPE_PCF ) 1796 uniform sampler2DShadow spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; 1797 #else 1798 uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; 1799 #endif 1800 struct SpotLightShadow { 1801 float shadowIntensity; 1802 float shadowBias; 1803 float shadowNormalBias; 1804 float shadowRadius; 1805 vec2 shadowMapSize; 1806 }; 1807 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 1808 #endif 1809 #if NUM_POINT_LIGHT_SHADOWS > 0 1810 #if defined( SHADOWMAP_TYPE_PCF ) 1811 uniform samplerCubeShadow pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; 1812 #elif defined( SHADOWMAP_TYPE_BASIC ) 1813 uniform samplerCube pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; 1814 #endif 1815 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 1816 struct PointLightShadow { 1817 float shadowIntensity; 1818 float shadowBias; 1819 float shadowNormalBias; 1820 float shadowRadius; 1821 vec2 shadowMapSize; 1822 float shadowCameraNear; 1823 float shadowCameraFar; 1824 }; 1825 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 1826 #endif 1827 #if defined( SHADOWMAP_TYPE_PCF ) 1828 float interleavedGradientNoise( vec2 position ) { 1829 return fract( 52.9829189 * fract( dot( position, vec2( 0.06711056, 0.00583715 ) ) ) ); 1830 } 1831 vec2 vogelDiskSample( int sampleIndex, int samplesCount, float phi ) { 1832 const float goldenAngle = 2.399963229728653; 1833 float r = sqrt( ( float( sampleIndex ) + 0.5 ) / float( samplesCount ) ); 1834 float theta = float( sampleIndex ) * goldenAngle + phi; 1835 return vec2( cos( theta ), sin( theta ) ) * r; 1836 } 1837 #endif 1838 #if defined( SHADOWMAP_TYPE_PCF ) 1839 float getShadow( sampler2DShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 1840 float shadow = 1.0; 1841 shadowCoord.xyz /= shadowCoord.w; 1842 shadowCoord.z += shadowBias; 1843 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 1844 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 1845 if ( frustumTest ) { 1846 vec2 texelSize = vec2( 1.0 ) / shadowMapSize; 1847 float radius = shadowRadius * texelSize.x; 1848 float phi = interleavedGradientNoise( gl_FragCoord.xy ) * 6.28318530718; 1849 shadow = ( 1850 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 0, 5, phi ) * radius, shadowCoord.z ) ) + 1851 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 1, 5, phi ) * radius, shadowCoord.z ) ) + 1852 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 2, 5, phi ) * radius, shadowCoord.z ) ) + 1853 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 3, 5, phi ) * radius, shadowCoord.z ) ) + 1854 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 4, 5, phi ) * radius, shadowCoord.z ) ) 1855 ) * 0.2; 1856 } 1857 return mix( 1.0, shadow, shadowIntensity ); 1858 } 1859 #elif defined( SHADOWMAP_TYPE_VSM ) 1860 float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 1861 float shadow = 1.0; 1862 shadowCoord.xyz /= shadowCoord.w; 1863 shadowCoord.z += shadowBias; 1864 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 1865 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 1866 if ( frustumTest ) { 1867 vec2 distribution = texture2D( shadowMap, shadowCoord.xy ).rg; 1868 float mean = distribution.x; 1869 float variance = distribution.y * distribution.y; 1870 #ifdef USE_REVERSED_DEPTH_BUFFER 1871 float hard_shadow = step( mean, shadowCoord.z ); 1872 #else 1873 float hard_shadow = step( shadowCoord.z, mean ); 1874 #endif 1875 if ( hard_shadow == 1.0 ) { 1876 shadow = 1.0; 1877 } else { 1878 variance = max( variance, 0.0000001 ); 1879 float d = shadowCoord.z - mean; 1880 float p_max = variance / ( variance + d * d ); 1881 p_max = clamp( ( p_max - 0.3 ) / 0.65, 0.0, 1.0 ); 1882 shadow = max( hard_shadow, p_max ); 1883 } 1884 } 1885 return mix( 1.0, shadow, shadowIntensity ); 1886 } 1887 #else 1888 float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 1889 float shadow = 1.0; 1890 shadowCoord.xyz /= shadowCoord.w; 1891 shadowCoord.z += shadowBias; 1892 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 1893 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 1894 if ( frustumTest ) { 1895 float depth = texture2D( shadowMap, shadowCoord.xy ).r; 1896 #ifdef USE_REVERSED_DEPTH_BUFFER 1897 shadow = step( depth, shadowCoord.z ); 1898 #else 1899 shadow = step( shadowCoord.z, depth ); 1900 #endif 1901 } 1902 return mix( 1.0, shadow, shadowIntensity ); 1903 } 1904 #endif 1905 #if NUM_POINT_LIGHT_SHADOWS > 0 1906 #if defined( SHADOWMAP_TYPE_PCF ) 1907 float getPointShadow( samplerCubeShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { 1908 float shadow = 1.0; 1909 vec3 lightToPosition = shadowCoord.xyz; 1910 vec3 bd3D = normalize( lightToPosition ); 1911 vec3 absVec = abs( lightToPosition ); 1912 float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z ); 1913 if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) { 1914 float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) ); 1915 dp += shadowBias; 1916 float texelSize = shadowRadius / shadowMapSize.x; 1917 vec3 absDir = abs( bd3D ); 1918 vec3 tangent = absDir.x > absDir.z ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 ); 1919 tangent = normalize( cross( bd3D, tangent ) ); 1920 vec3 bitangent = cross( bd3D, tangent ); 1921 float phi = interleavedGradientNoise( gl_FragCoord.xy ) * 6.28318530718; 1922 shadow = ( 1923 texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 0, 5, phi ).x + bitangent * vogelDiskSample( 0, 5, phi ).y ) * texelSize, dp ) ) + 1924 texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 1, 5, phi ).x + bitangent * vogelDiskSample( 1, 5, phi ).y ) * texelSize, dp ) ) + 1925 texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 2, 5, phi ).x + bitangent * vogelDiskSample( 2, 5, phi ).y ) * texelSize, dp ) ) + 1926 texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 3, 5, phi ).x + bitangent * vogelDiskSample( 3, 5, phi ).y ) * texelSize, dp ) ) + 1927 texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 4, 5, phi ).x + bitangent * vogelDiskSample( 4, 5, phi ).y ) * texelSize, dp ) ) 1928 ) * 0.2; 1929 } 1930 return mix( 1.0, shadow, shadowIntensity ); 1931 } 1932 #elif defined( SHADOWMAP_TYPE_BASIC ) 1933 float getPointShadow( samplerCube shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { 1934 float shadow = 1.0; 1935 vec3 lightToPosition = shadowCoord.xyz; 1936 vec3 bd3D = normalize( lightToPosition ); 1937 vec3 absVec = abs( lightToPosition ); 1938 float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z ); 1939 if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) { 1940 float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) ); 1941 dp += shadowBias; 1942 float depth = textureCube( shadowMap, bd3D ).r; 1943 #ifdef USE_REVERSED_DEPTH_BUFFER 1944 shadow = step( depth, dp ); 1945 #else 1946 shadow = step( dp, depth ); 1947 #endif 1948 } 1949 return mix( 1.0, shadow, shadowIntensity ); 1950 } 1951 #endif 1952 #endif
1953#endif`,CI=`#if NUM_SPOT_LIGHT_COORDS > 0 1954 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; 1955 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 1956#endif 1957#ifdef USE_SHADOWMAP 1958 #if NUM_DIR_LIGHT_SHADOWS > 0 1959 uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; 1960 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 1961 struct DirectionalLightShadow { 1962 float shadowIntensity; 1963 float shadowBias; 1964 float shadowNormalBias; 1965 float shadowRadius; 1966 vec2 shadowMapSize; 1967 }; 1968 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 1969 #endif 1970 #if NUM_SPOT_LIGHT_SHADOWS > 0 1971 struct SpotLightShadow { 1972 float shadowIntensity; 1973 float shadowBias; 1974 float shadowNormalBias; 1975 float shadowRadius; 1976 vec2 shadowMapSize; 1977 }; 1978 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 1979 #endif 1980 #if NUM_POINT_LIGHT_SHADOWS > 0 1981 uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; 1982 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 1983 struct PointLightShadow { 1984 float shadowIntensity; 1985 float shadowBias; 1986 float shadowNormalBias; 1987 float shadowRadius; 1988 vec2 shadowMapSize; 1989 float shadowCameraNear; 1990 float shadowCameraFar; 1991 }; 1992 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 1993 #endif 1994#endif`,wI=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) 1995 vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 1996 vec4 shadowWorldPosition; 1997#endif 1998#if defined( USE_SHADOWMAP ) 1999 #if NUM_DIR_LIGHT_SHADOWS > 0 2000 #pragma unroll_loop_start 2001 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 2002 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); 2003 vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; 2004 } 2005 #pragma unroll_loop_end 2006 #endif 2007 #if NUM_POINT_LIGHT_SHADOWS > 0 2008 #pragma unroll_loop_start 2009 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 2010 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); 2011 vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; 2012 } 2013 #pragma unroll_loop_end 2014 #endif 2015#endif 2016#if NUM_SPOT_LIGHT_COORDS > 0 2017 #pragma unroll_loop_start 2018 for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { 2019 shadowWorldPosition = worldPosition; 2020 #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 2021 shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; 2022 #endif 2023 vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; 2024 } 2025 #pragma unroll_loop_end 2026#endif`,RI=`float getShadowMask() { 2027 float shadow = 1.0; 2028 #ifdef USE_SHADOWMAP 2029 #if NUM_DIR_LIGHT_SHADOWS > 0 2030 DirectionalLightShadow directionalLight; 2031 #pragma unroll_loop_start 2032 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 2033 directionalLight = directionalLightShadows[ i ]; 2034 shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 2035 } 2036 #pragma unroll_loop_end 2037 #endif 2038 #if NUM_SPOT_LIGHT_SHADOWS > 0 2039 SpotLightShadow spotLight; 2040 #pragma unroll_loop_start 2041 for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { 2042 spotLight = spotLightShadows[ i ]; 2043 shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 2044 } 2045 #pragma unroll_loop_end 2046 #endif 2047 #if NUM_POINT_LIGHT_SHADOWS > 0 && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) ) 2048 PointLightShadow pointLight; 2049 #pragma unroll_loop_start 2050 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 2051 pointLight = pointLightShadows[ i ]; 2052 shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; 2053 } 2054 #pragma unroll_loop_end 2055 #endif 2056 #endif 2057 return shadow; 2058}`,BI=`#ifdef USE_SKINNING 2059 mat4 boneMatX = getBoneMatrix( skinIndex.x ); 2060 mat4 boneMatY = getBoneMatrix( skinIndex.y ); 2061 mat4 boneMatZ = getBoneMatrix( skinIndex.z ); 2062 mat4 boneMatW = getBoneMatrix( skinIndex.w ); 2063#endif`,DI=`#ifdef USE_SKINNING 2064 uniform mat4 bindMatrix; 2065 uniform mat4 bindMatrixInverse; 2066 uniform highp sampler2D boneTexture; 2067 mat4 getBoneMatrix( const in float i ) { 2068 int size = textureSize( boneTexture, 0 ).x; 2069 int j = int( i ) * 4; 2070 int x = j % size; 2071 int y = j / size; 2072 vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); 2073 vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); 2074 vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); 2075 vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); 2076 return mat4( v1, v2, v3, v4 ); 2077 } 2078#endif`,II=`#ifdef USE_SKINNING 2079 vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); 2080 vec4 skinned = vec4( 0.0 ); 2081 skinned += boneMatX * skinVertex * skinWeight.x; 2082 skinned += boneMatY * skinVertex * skinWeight.y; 2083 skinned += boneMatZ * skinVertex * skinWeight.z; 2084 skinned += boneMatW * skinVertex * skinWeight.w; 2085 transformed = ( bindMatrixInverse * skinned ).xyz; 2086#endif`,LI=`#ifdef USE_SKINNING 2087 mat4 skinMatrix = mat4( 0.0 ); 2088 skinMatrix += skinWeight.x * boneMatX; 2089 skinMatrix += skinWeight.y * boneMatY; 2090 skinMatrix += skinWeight.z * boneMatZ; 2091 skinMatrix += skinWeight.w * boneMatW; 2092 skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; 2093 objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; 2094 #ifdef USE_TANGENT 2095 objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; 2096 #endif 2097#endif`,UI=`float specularStrength; 2098#ifdef USE_SPECULARMAP 2099 vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); 2100 specularStrength = texelSpecular.r; 2101#else 2102 specularStrength = 1.0; 2103#endif`,NI=`#ifdef USE_SPECULARMAP 2104 uniform sampler2D specularMap; 2105#endif`,FI=`#if defined( TONE_MAPPING ) 2106 gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); 2107#endif`,OI=`#ifndef saturate 2108#define saturate( a ) clamp( a, 0.0, 1.0 ) 2109#endif 2110uniform float toneMappingExposure; 2111vec3 LinearToneMapping( vec3 color ) { 2112 return saturate( toneMappingExposure * color ); 2113} 2114vec3 ReinhardToneMapping( vec3 color ) { 2115 color *= toneMappingExposure; 2116 return saturate( color / ( vec3( 1.0 ) + color ) ); 2117} 2118vec3 CineonToneMapping( vec3 color ) { 2119 color *= toneMappingExposure; 2120 color = max( vec3( 0.0 ), color - 0.004 ); 2121 return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); 2122} 2123vec3 RRTAndODTFit( vec3 v ) { 2124 vec3 a = v * ( v + 0.0245786 ) - 0.000090537; 2125 vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; 2126 return a / b; 2127} 2128vec3 ACESFilmicToneMapping( vec3 color ) { 2129 const mat3 ACESInputMat = mat3( 2130 vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), 2131 vec3( 0.04823, 0.01566, 0.83777 ) 2132 ); 2133 const mat3 ACESOutputMat = mat3( 2134 vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), 2135 vec3( -0.07367, -0.00605, 1.07602 ) 2136 ); 2137 color *= toneMappingExposure / 0.6; 2138 color = ACESInputMat * color; 2139 color = RRTAndODTFit( color ); 2140 color = ACESOutputMat * color; 2141 return saturate( color ); 2142} 2143const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( 2144 vec3( 1.6605, - 0.1246, - 0.0182 ), 2145 vec3( - 0.5876, 1.1329, - 0.1006 ), 2146 vec3( - 0.0728, - 0.0083, 1.1187 ) 2147); 2148const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( 2149 vec3( 0.6274, 0.0691, 0.0164 ), 2150 vec3( 0.3293, 0.9195, 0.0880 ), 2151 vec3( 0.0433, 0.0113, 0.8956 ) 2152); 2153vec3 agxDefaultContrastApprox( vec3 x ) { 2154 vec3 x2 = x * x; 2155 vec3 x4 = x2 * x2; 2156 return + 15.5 * x4 * x2 2157 - 40.14 * x4 * x 2158 + 31.96 * x4 2159 - 6.868 * x2 * x 2160 + 0.4298 * x2 2161 + 0.1191 * x 2162 - 0.00232; 2163} 2164vec3 AgXToneMapping( vec3 color ) { 2165 const mat3 AgXInsetMatrix = mat3( 2166 vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), 2167 vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), 2168 vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) 2169 );
2170 const mat3 AgXOutsetMatrix = mat3( 2171 vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), 2172 vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), 2173 vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) 2174 ); 2175 const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; 2176 color *= toneMappingExposure; 2177 color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; 2178 color = AgXInsetMatrix * color; 2179 color = max( color, 1e-10 ); color = log2( color ); 2180 color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); 2181 color = clamp( color, 0.0, 1.0 ); 2182 color = agxDefaultContrastApprox( color ); 2183 color = AgXOutsetMatrix * color; 2184 color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); 2185 color = LINEAR_REC2020_TO_LINEAR_SRGB * color; 2186 color = clamp( color, 0.0, 1.0 ); 2187 return color; 2188} 2189vec3 NeutralToneMapping( vec3 color ) { 2190 const float StartCompression = 0.8 - 0.04; 2191 const float Desaturation = 0.15; 2192 color *= toneMappingExposure; 2193 float x = min( color.r, min( color.g, color.b ) ); 2194 float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; 2195 color -= offset; 2196 float peak = max( color.r, max( color.g, color.b ) ); 2197 if ( peak < StartCompression ) return color; 2198 float d = 1. - StartCompression; 2199 float newPeak = 1. - d * d / ( peak + d - StartCompression ); 2200 color *= newPeak / peak; 2201 float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); 2202 return mix( color, vec3( newPeak ), g ); 2203} 2204vec3 CustomToneMapping( vec3 color ) { return color; }`,PI=`#ifdef USE_TRANSMISSION 2205 material.transmission = transmission; 2206 material.transmissionAlpha = 1.0; 2207 material.thickness = thickness; 2208 material.attenuationDistance = attenuationDistance; 2209 material.attenuationColor = attenuationColor; 2210 #ifdef USE_TRANSMISSIONMAP 2211 material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; 2212 #endif 2213 #ifdef USE_THICKNESSMAP 2214 material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; 2215 #endif 2216 vec3 pos = vWorldPosition; 2217 vec3 v = normalize( cameraPosition - pos ); 2218 vec3 n = inverseTransformDirection( normal, viewMatrix ); 2219 vec4 transmitted = getIBLVolumeRefraction( 2220 n, v, material.roughness, material.diffuseContribution, material.specularColorBlended, material.specularF90, 2221 pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness, 2222 material.attenuationColor, material.attenuationDistance ); 2223 material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); 2224 totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); 2225#endif`,zI=`#ifdef USE_TRANSMISSION 2226 uniform float transmission; 2227 uniform float thickness; 2228 uniform float attenuationDistance; 2229 uniform vec3 attenuationColor; 2230 #ifdef USE_TRANSMISSIONMAP 2231 uniform sampler2D transmissionMap; 2232 #endif 2233 #ifdef USE_THICKNESSMAP 2234 uniform sampler2D thicknessMap; 2235 #endif 2236 uniform vec2 transmissionSamplerSize; 2237 uniform sampler2D transmissionSamplerMap; 2238 uniform mat4 modelMatrix; 2239 uniform mat4 projectionMatrix; 2240 varying vec3 vWorldPosition; 2241 float w0( float a ) { 2242 return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); 2243 } 2244 float w1( float a ) { 2245 return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); 2246 } 2247 float w2( float a ){ 2248 return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); 2249 } 2250 float w3( float a ) { 2251 return ( 1.0 / 6.0 ) * ( a * a * a ); 2252 } 2253 float g0( float a ) { 2254 return w0( a ) + w1( a ); 2255 } 2256 float g1( float a ) { 2257 return w2( a ) + w3( a ); 2258 } 2259 float h0( float a ) { 2260 return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); 2261 } 2262 float h1( float a ) { 2263 return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); 2264 } 2265 vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { 2266 uv = uv * texelSize.zw + 0.5; 2267 vec2 iuv = floor( uv ); 2268 vec2 fuv = fract( uv ); 2269 float g0x = g0( fuv.x ); 2270 float g1x = g1( fuv.x ); 2271 float h0x = h0( fuv.x ); 2272 float h1x = h1( fuv.x ); 2273 float h0y = h0( fuv.y ); 2274 float h1y = h1( fuv.y ); 2275 vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2276 vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2277 vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2278 vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2279 return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + 2280 g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); 2281 } 2282 vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { 2283 vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); 2284 vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); 2285 vec2 fLodSizeInv = 1.0 / fLodSize; 2286 vec2 cLodSizeInv = 1.0 / cLodSize; 2287 vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); 2288 vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); 2289 return mix( fSample, cSample, fract( lod ) ); 2290 } 2291 vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { 2292 vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); 2293 vec3 modelScale; 2294 modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); 2295 modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); 2296 modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); 2297 return normalize( refractionVector ) * thickness * modelScale; 2298 } 2299 float applyIorToRoughness( const in float roughness, const in float ior ) { 2300 return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); 2301 } 2302 vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { 2303 float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); 2304 return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); 2305 } 2306 vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { 2307 if ( isinf( attenuationDistance ) ) { 2308 return vec3( 1.0 ); 2309 } else { 2310 vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; 2311 vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; 2312 } 2313 } 2314 vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, 2315 const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, 2316 const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness, 2317 const in vec3 attenuationColor, const in float attenuationDistance ) { 2318 vec4 transmittedLight; 2319 vec3 transmittance; 2320 #ifdef USE_DISPERSION 2321 float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion; 2322 vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread ); 2323 for ( int i = 0; i < 3; i ++ ) { 2324 vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix ); 2325 vec3 refractedRayExit = position + transmissionRay; 2326 vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); 2327 vec2 refractionCoords = ndcPos.xy / ndcPos.w; 2328 refractionCoords += 1.0; 2329 refractionCoords /= 2.0; 2330 vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] ); 2331 transmittedLight[ i ] = transmissionSample[ i ]; 2332 transmittedLight.a += transmissionSample.a; 2333 transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ]; 2334 } 2335 transmittedLight.a /= 3.0; 2336 #else 2337 vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); 2338 vec3 refractedRayExit = position + transmissionRay; 2339 vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); 2340 vec2 refractionCoords = ndcPos.xy / ndcPos.w; 2341 refractionCoords += 1.0; 2342 refractionCoords /= 2.0; 2343 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); 2344 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); 2345 #endif 2346 vec3 attenuatedColor = transmittance * transmittedLight.rgb; 2347 vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); 2348 float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; 2349 return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); 2350 } 2351#endif`,GI=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2352 varying vec2 vUv; 2353#endif 2354#ifdef USE_MAP 2355 varying vec2 vMapUv; 2356#endif 2357#ifdef USE_ALPHAMAP
2358 varying vec2 vAlphaMapUv; 2359#endif 2360#ifdef USE_LIGHTMAP 2361 varying vec2 vLightMapUv; 2362#endif 2363#ifdef USE_AOMAP 2364 varying vec2 vAoMapUv; 2365#endif 2366#ifdef USE_BUMPMAP 2367 varying vec2 vBumpMapUv; 2368#endif 2369#ifdef USE_NORMALMAP 2370 varying vec2 vNormalMapUv; 2371#endif 2372#ifdef USE_EMISSIVEMAP 2373 varying vec2 vEmissiveMapUv; 2374#endif 2375#ifdef USE_METALNESSMAP 2376 varying vec2 vMetalnessMapUv; 2377#endif 2378#ifdef USE_ROUGHNESSMAP 2379 varying vec2 vRoughnessMapUv; 2380#endif 2381#ifdef USE_ANISOTROPYMAP 2382 varying vec2 vAnisotropyMapUv; 2383#endif 2384#ifdef USE_CLEARCOATMAP 2385 varying vec2 vClearcoatMapUv; 2386#endif 2387#ifdef USE_CLEARCOAT_NORMALMAP 2388 varying vec2 vClearcoatNormalMapUv; 2389#endif 2390#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2391 varying vec2 vClearcoatRoughnessMapUv; 2392#endif 2393#ifdef USE_IRIDESCENCEMAP 2394 varying vec2 vIridescenceMapUv; 2395#endif 2396#ifdef USE_IRIDESCENCE_THICKNESSMAP 2397 varying vec2 vIridescenceThicknessMapUv; 2398#endif 2399#ifdef USE_SHEEN_COLORMAP 2400 varying vec2 vSheenColorMapUv; 2401#endif 2402#ifdef USE_SHEEN_ROUGHNESSMAP 2403 varying vec2 vSheenRoughnessMapUv; 2404#endif 2405#ifdef USE_SPECULARMAP 2406 varying vec2 vSpecularMapUv; 2407#endif 2408#ifdef USE_SPECULAR_COLORMAP 2409 varying vec2 vSpecularColorMapUv; 2410#endif 2411#ifdef USE_SPECULAR_INTENSITYMAP 2412 varying vec2 vSpecularIntensityMapUv; 2413#endif 2414#ifdef USE_TRANSMISSIONMAP 2415 uniform mat3 transmissionMapTransform; 2416 varying vec2 vTransmissionMapUv; 2417#endif 2418#ifdef USE_THICKNESSMAP 2419 uniform mat3 thicknessMapTransform; 2420 varying vec2 vThicknessMapUv; 2421#endif`,HI=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2422 varying vec2 vUv; 2423#endif 2424#ifdef USE_MAP 2425 uniform mat3 mapTransform; 2426 varying vec2 vMapUv; 2427#endif 2428#ifdef USE_ALPHAMAP 2429 uniform mat3 alphaMapTransform; 2430 varying vec2 vAlphaMapUv; 2431#endif 2432#ifdef USE_LIGHTMAP 2433 uniform mat3 lightMapTransform; 2434 varying vec2 vLightMapUv; 2435#endif 2436#ifdef USE_AOMAP 2437 uniform mat3 aoMapTransform; 2438 varying vec2 vAoMapUv; 2439#endif 2440#ifdef USE_BUMPMAP 2441 uniform mat3 bumpMapTransform; 2442 varying vec2 vBumpMapUv; 2443#endif 2444#ifdef USE_NORMALMAP 2445 uniform mat3 normalMapTransform; 2446 varying vec2 vNormalMapUv; 2447#endif 2448#ifdef USE_DISPLACEMENTMAP 2449 uniform mat3 displacementMapTransform; 2450 varying vec2 vDisplacementMapUv; 2451#endif 2452#ifdef USE_EMISSIVEMAP 2453 uniform mat3 emissiveMapTransform; 2454 varying vec2 vEmissiveMapUv; 2455#endif 2456#ifdef USE_METALNESSMAP 2457 uniform mat3 metalnessMapTransform; 2458 varying vec2 vMetalnessMapUv; 2459#endif 2460#ifdef USE_ROUGHNESSMAP 2461 uniform mat3 roughnessMapTransform; 2462 varying vec2 vRoughnessMapUv; 2463#endif 2464#ifdef USE_ANISOTROPYMAP 2465 uniform mat3 anisotropyMapTransform; 2466 varying vec2 vAnisotropyMapUv; 2467#endif 2468#ifdef USE_CLEARCOATMAP 2469 uniform mat3 clearcoatMapTransform; 2470 varying vec2 vClearcoatMapUv; 2471#endif 2472#ifdef USE_CLEARCOAT_NORMALMAP 2473 uniform mat3 clearcoatNormalMapTransform; 2474 varying vec2 vClearcoatNormalMapUv; 2475#endif 2476#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2477 uniform mat3 clearcoatRoughnessMapTransform; 2478 varying vec2 vClearcoatRoughnessMapUv; 2479#endif 2480#ifdef USE_SHEEN_COLORMAP 2481 uniform mat3 sheenColorMapTransform; 2482 varying vec2 vSheenColorMapUv; 2483#endif 2484#ifdef USE_SHEEN_ROUGHNESSMAP 2485 uniform mat3 sheenRoughnessMapTransform; 2486 varying vec2 vSheenRoughnessMapUv; 2487#endif 2488#ifdef USE_IRIDESCENCEMAP 2489 uniform mat3 iridescenceMapTransform; 2490 varying vec2 vIridescenceMapUv; 2491#endif 2492#ifdef USE_IRIDESCENCE_THICKNESSMAP 2493 uniform mat3 iridescenceThicknessMapTransform; 2494 varying vec2 vIridescenceThicknessMapUv; 2495#endif 2496#ifdef USE_SPECULARMAP 2497 uniform mat3 specularMapTransform; 2498 varying vec2 vSpecularMapUv; 2499#endif 2500#ifdef USE_SPECULAR_COLORMAP 2501 uniform mat3 specularColorMapTransform; 2502 varying vec2 vSpecularColorMapUv; 2503#endif 2504#ifdef USE_SPECULAR_INTENSITYMAP 2505 uniform mat3 specularIntensityMapTransform; 2506 varying vec2 vSpecularIntensityMapUv; 2507#endif 2508#ifdef USE_TRANSMISSIONMAP 2509 uniform mat3 transmissionMapTransform; 2510 varying vec2 vTransmissionMapUv; 2511#endif 2512#ifdef USE_THICKNESSMAP 2513 uniform mat3 thicknessMapTransform; 2514 varying vec2 vThicknessMapUv; 2515#endif`,kI=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2516 vUv = vec3( uv, 1 ).xy; 2517#endif 2518#ifdef USE_MAP 2519 vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; 2520#endif 2521#ifdef USE_ALPHAMAP 2522 vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; 2523#endif 2524#ifdef USE_LIGHTMAP 2525 vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; 2526#endif 2527#ifdef USE_AOMAP 2528 vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; 2529#endif 2530#ifdef USE_BUMPMAP 2531 vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; 2532#endif 2533#ifdef USE_NORMALMAP 2534 vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; 2535#endif 2536#ifdef USE_DISPLACEMENTMAP 2537 vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; 2538#endif 2539#ifdef USE_EMISSIVEMAP 2540 vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; 2541#endif 2542#ifdef USE_METALNESSMAP 2543 vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; 2544#endif 2545#ifdef USE_ROUGHNESSMAP 2546 vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; 2547#endif 2548#ifdef USE_ANISOTROPYMAP 2549 vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; 2550#endif 2551#ifdef USE_CLEARCOATMAP 2552 vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; 2553#endif 2554#ifdef USE_CLEARCOAT_NORMALMAP 2555 vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; 2556#endif 2557#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2558 vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; 2559#endif
2560#ifdef USE_IRIDESCENCEMAP 2561 vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; 2562#endif 2563#ifdef USE_IRIDESCENCE_THICKNESSMAP 2564 vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; 2565#endif 2566#ifdef USE_SHEEN_COLORMAP 2567 vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; 2568#endif 2569#ifdef USE_SHEEN_ROUGHNESSMAP 2570 vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; 2571#endif 2572#ifdef USE_SPECULARMAP 2573 vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; 2574#endif 2575#ifdef USE_SPECULAR_COLORMAP 2576 vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; 2577#endif 2578#ifdef USE_SPECULAR_INTENSITYMAP 2579 vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; 2580#endif 2581#ifdef USE_TRANSMISSIONMAP 2582 vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; 2583#endif 2584#ifdef USE_THICKNESSMAP 2585 vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; 2586#endif`,VI=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 2587 vec4 worldPosition = vec4( transformed, 1.0 ); 2588 #ifdef USE_BATCHING 2589 worldPosition = batchingMatrix * worldPosition; 2590 #endif 2591 #ifdef USE_INSTANCING 2592 worldPosition = instanceMatrix * worldPosition; 2593 #endif 2594 worldPosition = modelMatrix * worldPosition; 2595#endif`;const XI=`varying vec2 vUv; 2596uniform mat3 uvTransform; 2597void main() { 2598 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 2599 gl_Position = vec4( position.xy, 1.0, 1.0 ); 2600}`,WI=`uniform sampler2D t2D; 2601uniform float backgroundIntensity; 2602varying vec2 vUv; 2603void main() { 2604 vec4 texColor = texture2D( t2D, vUv ); 2605 #ifdef DECODE_VIDEO_TEXTURE 2606 texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); 2607 #endif 2608 texColor.rgb *= backgroundIntensity; 2609 gl_FragColor = texColor; 2610 #include <tonemapping_fragment> 2611 #include <colorspace_fragment> 2612}`,JI=`varying vec3 vWorldDirection; 2613#include <common> 2614void main() { 2615 vWorldDirection = transformDirection( position, modelMatrix ); 2616 #include <begin_vertex> 2617 #include <project_vertex> 2618 gl_Position.z = gl_Position.w; 2619}`,YI=`#ifdef ENVMAP_TYPE_CUBE 2620 uniform samplerCube envMap; 2621#elif defined( ENVMAP_TYPE_CUBE_UV ) 2622 uniform sampler2D envMap; 2623#endif 2624uniform float flipEnvMap; 2625uniform float backgroundBlurriness; 2626uniform float backgroundIntensity; 2627uniform mat3 backgroundRotation; 2628varying vec3 vWorldDirection; 2629#include <cube_uv_reflection_fragment> 2630void main() { 2631 #ifdef ENVMAP_TYPE_CUBE 2632 vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); 2633 #elif defined( ENVMAP_TYPE_CUBE_UV ) 2634 vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); 2635 #else 2636 vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 2637 #endif 2638 texColor.rgb *= backgroundIntensity; 2639 gl_FragColor = texColor; 2640 #include <tonemapping_fragment> 2641 #include <colorspace_fragment> 2642}`,qI=`varying vec3 vWorldDirection; 2643#include <common> 2644void main() { 2645 vWorldDirection = transformDirection( position, modelMatrix ); 2646 #include <begin_vertex> 2647 #include <project_vertex> 2648 gl_Position.z = gl_Position.w; 2649}`,KI=`uniform samplerCube tCube; 2650uniform float tFlip; 2651uniform float opacity; 2652varying vec3 vWorldDirection; 2653void main() { 2654 vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); 2655 gl_FragColor = texColor; 2656 gl_FragColor.a *= opacity; 2657 #include <tonemapping_fragment> 2658 #include <colorspace_fragment> 2659}`,ZI=`#include <common> 2660#include <batching_pars_vertex> 2661#include <uv_pars_vertex> 2662#include <displacementmap_pars_vertex> 2663#include <morphtarget_pars_vertex> 2664#include <skinning_pars_vertex> 2665#include <logdepthbuf_pars_vertex> 2666#include <clipping_planes_pars_vertex> 2667varying vec2 vHighPrecisionZW; 2668void main() { 2669 #include <uv_vertex> 2670 #include <batching_vertex> 2671 #include <skinbase_vertex> 2672 #include <morphinstance_vertex> 2673 #ifdef USE_DISPLACEMENTMAP 2674 #include <beginnormal_vertex> 2675 #include <morphnormal_vertex> 2676 #include <skinnormal_vertex> 2677 #endif 2678 #include <begin_vertex> 2679 #include <morphtarget_vertex> 2680 #include <skinning_vertex> 2681 #include <displacementmap_vertex> 2682 #include <project_vertex> 2683 #include <logdepthbuf_vertex> 2684 #include <clipping_planes_vertex> 2685 vHighPrecisionZW = gl_Position.zw; 2686}`,QI=`#if DEPTH_PACKING == 3200 2687 uniform float opacity; 2688#endif 2689#include <common> 2690#include <packing> 2691#include <uv_pars_fragment> 2692#include <map_pars_fragment> 2693#include <alphamap_pars_fragment> 2694#include <alphatest_pars_fragment> 2695#include <alphahash_pars_fragment> 2696#include <logdepthbuf_pars_fragment> 2697#include <clipping_planes_pars_fragment> 2698varying vec2 vHighPrecisionZW; 2699void main() { 2700 vec4 diffuseColor = vec4( 1.0 ); 2701 #include <clipping_planes_fragment> 2702 #if DEPTH_PACKING == 3200 2703 diffuseColor.a = opacity; 2704 #endif 2705 #include <map_fragment> 2706 #include <alphamap_fragment> 2707 #include <alphatest_fragment> 2708 #include <alphahash_fragment> 2709 #include <logdepthbuf_fragment> 2710 #ifdef USE_REVERSED_DEPTH_BUFFER 2711 float fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ]; 2712 #else 2713 float fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5; 2714 #endif 2715 #if DEPTH_PACKING == 3200 2716 gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); 2717 #elif DEPTH_PACKING == 3201 2718 gl_FragColor = packDepthToRGBA( fragCoordZ ); 2719 #elif DEPTH_PACKING == 3202 2720 gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 ); 2721 #elif DEPTH_PACKING == 3203 2722 gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 ); 2723 #endif 2724}`,jI=`#define DISTANCE 2725varying vec3 vWorldPosition; 2726#include <common> 2727#include <batching_pars_vertex> 2728#include <uv_pars_vertex> 2729#include <displacementmap_pars_vertex> 2730#include <morphtarget_pars_vertex> 2731#include <skinning_pars_vertex> 2732#include <clipping_planes_pars_vertex> 2733void main() { 2734 #include <uv_vertex> 2735 #include <batching_vertex> 2736 #include <skinbase_vertex> 2737 #include <morphinstance_vertex> 2738 #ifdef USE_DISPLACEMENTMAP 2739 #include <beginnormal_vertex> 2740 #include <morphnormal_vertex> 2741 #include <skinnormal_vertex> 2742 #endif 2743 #include <begin_vertex> 2744 #include <morphtarget_vertex> 2745 #include <skinning_vertex> 2746 #include <displacementmap_vertex> 2747 #include <project_vertex> 2748 #include <worldpos_vertex> 2749 #include <clipping_planes_vertex> 2750 vWorldPosition = worldPosition.xyz; 2751}`,$I=`#define DISTANCE 2752uniform vec3 referencePosition; 2753uniform float nearDistance; 2754uniform float farDistance; 2755varying vec3 vWorldPosition; 2756#include <common> 2757#include <uv_pars_fragment> 2758#include <map_pars_fragment> 2759#include <alphamap_pars_fragment> 2760#include <alphatest_pars_fragment> 2761#include <alphahash_pars_fragment> 2762#include <clipping_planes_pars_fragment> 2763void main () { 2764 vec4 diffuseColor = vec4( 1.0 ); 2765 #include <clipping_planes_fragment> 2766 #include <map_fragment> 2767 #include <alphamap_fragment> 2768 #include <alphatest_fragment> 2769 #include <alphahash_fragment> 2770 float dist = length( vWorldPosition - referencePosition ); 2771 dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); 2772 dist = saturate( dist ); 2773 gl_FragColor = vec4( dist, 0.0, 0.0, 1.0 ); 2774}`,eL=`varying vec3 vWorldDirection; 2775#include <common> 2776void main() { 2777 vWorldDirection = transformDirection( position, modelMatrix ); 2778 #include <begin_vertex> 2779 #include <project_vertex> 2780}
2780`,tL=`uniform sampler2D tEquirect; 2781varying vec3 vWorldDirection; 2782#include <common> 2783void main() { 2784 vec3 direction = normalize( vWorldDirection ); 2785 vec2 sampleUV = equirectUv( direction ); 2786 gl_FragColor = texture2D( tEquirect, sampleUV ); 2787 #include <tonemapping_fragment> 2788 #include <colorspace_fragment> 2789}`,nL=`uniform float scale; 2790attribute float lineDistance; 2791varying float vLineDistance; 2792#include <common> 2793#include <uv_pars_vertex> 2794#include <color_pars_vertex> 2795#include <fog_pars_vertex> 2796#include <morphtarget_pars_vertex> 2797#include <logdepthbuf_pars_vertex> 2798#include <clipping_planes_pars_vertex> 2799void main() { 2800 vLineDistance = scale * lineDistance; 2801 #include <uv_vertex> 2802 #include <color_vertex> 2803 #include <morphinstance_vertex> 2804 #include <morphcolor_vertex> 2805 #include <begin_vertex> 2806 #include <morphtarget_vertex> 2807 #include <project_vertex> 2808 #include <logdepthbuf_vertex> 2809 #include <clipping_planes_vertex> 2810 #include <fog_vertex> 2811}`,iL=`uniform vec3 diffuse; 2812uniform float opacity; 2813uniform float dashSize; 2814uniform float totalSize; 2815varying float vLineDistance; 2816#include <common> 2817#include <color_pars_fragment> 2818#include <uv_pars_fragment> 2819#include <map_pars_fragment> 2820#include <fog_pars_fragment> 2821#include <logdepthbuf_pars_fragment> 2822#include <clipping_planes_pars_fragment> 2823void main() { 2824 vec4 diffuseColor = vec4( diffuse, opacity ); 2825 #include <clipping_planes_fragment> 2826 if ( mod( vLineDistance, totalSize ) > dashSize ) { 2827 discard; 2828 } 2829 vec3 outgoingLight = vec3( 0.0 ); 2830 #include <logdepthbuf_fragment> 2831 #include <map_fragment> 2832 #include <color_fragment> 2833 outgoingLight = diffuseColor.rgb; 2834 #include <opaque_fragment> 2835 #include <tonemapping_fragment> 2836 #include <colorspace_fragment> 2837 #include <fog_fragment> 2838 #include <premultiplied_alpha_fragment> 2839}`,sL=`#include <common> 2840#include <batching_pars_vertex> 2841#include <uv_pars_vertex> 2842#include <envmap_pars_vertex> 2843#include <color_pars_vertex> 2844#include <fog_pars_vertex> 2845#include <morphtarget_pars_vertex> 2846#include <skinning_pars_vertex> 2847#include <logdepthbuf_pars_vertex> 2848#include <clipping_planes_pars_vertex> 2849void main() { 2850 #include <uv_vertex> 2851 #include <color_vertex> 2852 #include <morphinstance_vertex> 2853 #include <morphcolor_vertex> 2854 #include <batching_vertex> 2855 #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) 2856 #include <beginnormal_vertex> 2857 #include <morphnormal_vertex> 2858 #include <skinbase_vertex> 2859 #include <skinnormal_vertex> 2860 #include <defaultnormal_vertex> 2861 #endif 2862 #include <begin_vertex> 2863 #include <morphtarget_vertex> 2864 #include <skinning_vertex> 2865 #include <project_vertex> 2866 #include <logdepthbuf_vertex> 2867 #include <clipping_planes_vertex> 2868 #include <worldpos_vertex> 2869 #include <envmap_vertex> 2870 #include <fog_vertex> 2871}`,rL=`uniform vec3 diffuse; 2872uniform float opacity; 2873#ifndef FLAT_SHADED 2874 varying vec3 vNormal; 2875#endif 2876#include <common> 2877#include <dithering_pars_fragment> 2878#include <color_pars_fragment> 2879#include <uv_pars_fragment> 2880#include <map_pars_fragment> 2881#include <alphamap_pars_fragment> 2882#include <alphatest_pars_fragment> 2883#include <alphahash_pars_fragment> 2884#include <aomap_pars_fragment> 2885#include <lightmap_pars_fragment> 2886#include <envmap_common_pars_fragment> 2887#include <envmap_pars_fragment> 2888#include <fog_pars_fragment> 2889#include <specularmap_pars_fragment> 2890#include <logdepthbuf_pars_fragment> 2891#include <clipping_planes_pars_fragment> 2892void main() { 2893 vec4 diffuseColor = vec4( diffuse, opacity ); 2894 #include <clipping_planes_fragment> 2895 #include <logdepthbuf_fragment> 2896 #include <map_fragment> 2897 #include <color_fragment> 2898 #include <alphamap_fragment> 2899 #include <alphatest_fragment> 2900 #include <alphahash_fragment> 2901 #include <specularmap_fragment> 2902 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 2903 #ifdef USE_LIGHTMAP 2904 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 2905 reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; 2906 #else 2907 reflectedLight.indirectDiffuse += vec3( 1.0 ); 2908 #endif 2909 #include <aomap_fragment> 2910 reflectedLight.indirectDiffuse *= diffuseColor.rgb; 2911 vec3 outgoingLight = reflectedLight.indirectDiffuse; 2912 #include <envmap_fragment> 2913 #include <opaque_fragment> 2914 #include <tonemapping_fragment> 2915 #include <colorspace_fragment> 2916 #include <fog_fragment> 2917 #include <premultiplied_alpha_fragment> 2918 #include <dithering_fragment> 2919}`,aL=`#define LAMBERT 2920varying vec3 vViewPosition; 2921#include <common> 2922#include <batching_pars_vertex> 2923#include <uv_pars_vertex> 2924#include <displacementmap_pars_vertex> 2925#include <envmap_pars_vertex> 2926#include <color_pars_vertex> 2927#include <fog_pars_vertex> 2928#include <normal_pars_vertex> 2929#include <morphtarget_pars_vertex> 2930#include <skinning_pars_vertex> 2931#include <shadowmap_pars_vertex> 2932#include <logdepthbuf_pars_vertex> 2933#include <clipping_planes_pars_vertex> 2934void main() { 2935 #include <uv_vertex> 2936 #include <color_vertex> 2937 #include <morphinstance_vertex> 2938 #include <morphcolor_vertex> 2939 #include <batching_vertex> 2940 #include <beginnormal_vertex> 2941 #include <morphnormal_vertex> 2942 #include <skinbase_vertex> 2943 #include <skinnormal_vertex> 2944 #include <defaultnormal_vertex> 2945 #include <normal_vertex> 2946 #include <begin_vertex> 2947 #include <morphtarget_vertex> 2948 #include <skinning_vertex> 2949 #include <displacementmap_vertex> 2950 #include <project_vertex> 2951 #include <logdepthbuf_vertex> 2952 #include <clipping_planes_vertex> 2953 vViewPosition = - mvPosition.xyz; 2954 #include <worldpos_vertex> 2955 #include <envmap_vertex> 2956 #include <shadowmap_vertex> 2957 #include <fog_vertex> 2958}`,oL=`#define LAMBERT 2959uniform vec3 diffuse; 2960uniform vec3 emissive; 2961uniform float opacity; 2962#include <common> 2963#include <dithering_pars_fragment> 2964#include <color_pars_fragment> 2965#include <uv_pars_fragment> 2966#include <map_pars_fragment> 2967#include <alphamap_pars_fragment> 2968#include <alphatest_pars_fragment> 2969#include <alphahash_pars_fragment> 2970#include <aomap_pars_fragment> 2971#include <lightmap_pars_fragment> 2972#include <emissivemap_pars_fragment> 2973#include <envmap_common_pars_fragment> 2974#include <envmap_pars_fragment> 2975#include <fog_pars_fragment> 2976#include <bsdfs> 2977#include <lights_pars_begin> 2978#include <normal_pars_fragment> 2979#include <lights_lambert_pars_fragment> 2980#include <shadowmap_pars_fragment> 2981#include <bumpmap_pars_fragment> 2982#include <normalmap_pars_fragment> 2983#include <specularmap_pars_fragment> 2984#include <logdepthbuf_pars_fragment> 2985#include <clipping_planes_pars_fragment> 2986void main() { 2987 vec4 diffuseColor = vec4( diffuse, opacity ); 2988 #include <clipping_planes_fragment> 2989 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 2990 vec3 totalEmissiveRadiance = emissive; 2991 #include <logdepthbuf_fragment> 2992 #include <map_fragment> 2993 #include <color_fragment> 2994 #include <alphamap_fragment> 2995 #include <alphatest_fragment> 2996 #include <alphahash_fragment> 2997 #include <specularmap_fragment> 2998 #include <normal_fragment_begin> 2999 #include <normal_fragment_maps> 3000 #include <emissivemap_fragment> 3001 #include <lights_lambert_fragment> 3002 #include <lights_fragment_begin> 3003 #include <lights_fragment_maps> 3004 #include <lights_fragment_end> 3005 #include <aomap_fragment> 3006 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 3007 #include <envmap_fragment> 3008 #include <opaque_fragment> 3009 #include <tonemapping_fragment> 3010 #include <colorspace_fragment> 3011 #include <fog_fragment> 3012 #include <premultiplied_alpha_fragment> 3013 #include <dithering_fragment> 3014}`,lL=`#define MATCAP 3015varying vec3 vViewPosition; 3016#include <common> 3017#include <batching_pars_vertex> 3018#include <uv_pars_vertex> 3019#include <color_pars_vertex> 3020#include <displacementmap_pars_vertex> 3021#include <fog_pars_vertex> 3022#include <normal_pars_vertex> 3023#include <morphtarget_pars_vertex> 3024#include <skinning_pars_vertex> 3025#include <logdepthbuf_pars_vertex> 3026#include <clipping_planes_pars_vertex> 3027void main() { 3028 #include <uv_vertex> 3029 #include <color_vertex> 3030 #include <morphinstance_vertex> 3031 #include <morphcolor_vertex> 3032 #include <batching_vertex> 3033 #include <beginnormal_vertex> 3034 #include <morphnormal_vertex> 3035 #include <skinbase_vertex> 3036 #include <skinnormal_vertex> 3037 #include <defaultnormal_vertex> 3038 #include <normal_vertex> 3039 #include <begin_vertex> 3040 #include <morphtarget_vertex> 3041 #include <skinning_vertex> 3042 #include <displacementmap_vertex> 3043 #include <project_vertex> 3044 #include <logdepthbuf_vertex> 3045 #include <clipping_planes_vertex> 3046 #include <fog_vertex> 3047 vViewPosition = - mvPosition.xyz; 3048}`,cL=`#define MATCAP 3049uniform vec3 diffuse; 3050uniform float opacity; 3051uniform sampler2D matcap; 3052varying vec3 vViewPosition; 3053#include <common> 3054#include <dithering_pars_fragment> 3055#include <color_pars_fragment> 3056#include <uv_pars_fragment> 3057#include <map_pars_fragment> 3058#include <alphamap_pars_fragment> 3059#include <alphatest_pars_fragment> 3060#include <alphahash_pars_fragment> 3061#include <fog_pars_fragment> 3062#include <normal_pars_fragment> 3063#include <bumpmap_pars_fragment> 3064#include <normalmap_pars_fragment> 3065#include <logdepthbuf_pars_fragment> 3066#include <clipping_planes_pars_fragment> 3067void main() { 3068 vec4 diffuseColor = vec4( diffuse, opacity ); 3069 #include <clipping_planes_fragment> 3070 #include <logdepthbuf_fragment> 3071 #include <map_fragment> 3072 #include <color_fragment> 3073 #include <alphamap_fragment> 3074 #include <alphatest_fragment> 3075 #include <alphahash_fragment> 3076 #include <normal_fragment_begin> 3077 #include <normal_fragment_maps> 3078 vec3 viewDir = normalize( vViewPosition ); 3079 vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); 3080 vec3 y = cross( viewDir, x ); 3081 vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; 3082 #ifdef USE_MATCAP
3083 vec4 matcapColor = texture2D( matcap, uv ); 3084 #else 3085 vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); 3086 #endif 3087 vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; 3088 #include <opaque_fragment> 3089 #include <tonemapping_fragment> 3090 #include <colorspace_fragment> 3091 #include <fog_fragment> 3092 #include <premultiplied_alpha_fragment> 3093 #include <dithering_fragment> 3094}`,uL=`#define NORMAL 3095#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3096 varying vec3 vViewPosition; 3097#endif 3098#include <common> 3099#include <batching_pars_vertex> 3100#include <uv_pars_vertex> 3101#include <displacementmap_pars_vertex> 3102#include <normal_pars_vertex> 3103#include <morphtarget_pars_vertex> 3104#include <skinning_pars_vertex> 3105#include <logdepthbuf_pars_vertex> 3106#include <clipping_planes_pars_vertex> 3107void main() { 3108 #include <uv_vertex> 3109 #include <batching_vertex> 3110 #include <beginnormal_vertex> 3111 #include <morphinstance_vertex> 3112 #include <morphnormal_vertex> 3113 #include <skinbase_vertex> 3114 #include <skinnormal_vertex> 3115 #include <defaultnormal_vertex> 3116 #include <normal_vertex> 3117 #include <begin_vertex> 3118 #include <morphtarget_vertex> 3119 #include <skinning_vertex> 3120 #include <displacementmap_vertex> 3121 #include <project_vertex> 3122 #include <logdepthbuf_vertex> 3123 #include <clipping_planes_vertex> 3124#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3125 vViewPosition = - mvPosition.xyz; 3126#endif 3127}`,fL=`#define NORMAL 3128uniform float opacity; 3129#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3130 varying vec3 vViewPosition; 3131#endif 3132#include <uv_pars_fragment> 3133#include <normal_pars_fragment> 3134#include <bumpmap_pars_fragment> 3135#include <normalmap_pars_fragment> 3136#include <logdepthbuf_pars_fragment> 3137#include <clipping_planes_pars_fragment> 3138void main() { 3139 vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); 3140 #include <clipping_planes_fragment> 3141 #include <logdepthbuf_fragment> 3142 #include <normal_fragment_begin> 3143 #include <normal_fragment_maps> 3144 gl_FragColor = vec4( normalize( normal ) * 0.5 + 0.5, diffuseColor.a ); 3145 #ifdef OPAQUE 3146 gl_FragColor.a = 1.0; 3147 #endif 3148}`,hL=`#define PHONG 3149varying vec3 vViewPosition; 3150#include <common> 3151#include <batching_pars_vertex> 3152#include <uv_pars_vertex> 3153#include <displacementmap_pars_vertex> 3154#include <envmap_pars_vertex> 3155#include <color_pars_vertex> 3156#include <fog_pars_vertex> 3157#include <normal_pars_vertex> 3158#include <morphtarget_pars_vertex> 3159#include <skinning_pars_vertex> 3160#include <shadowmap_pars_vertex> 3161#include <logdepthbuf_pars_vertex> 3162#include <clipping_planes_pars_vertex> 3163void main() { 3164 #include <uv_vertex> 3165 #include <color_vertex> 3166 #include <morphcolor_vertex> 3167 #include <batching_vertex> 3168 #include <beginnormal_vertex> 3169 #include <morphinstance_vertex> 3170 #include <morphnormal_vertex> 3171 #include <skinbase_vertex> 3172 #include <skinnormal_vertex> 3173 #include <defaultnormal_vertex> 3174 #include <normal_vertex> 3175 #include <begin_vertex> 3176 #include <morphtarget_vertex> 3177 #include <skinning_vertex> 3178 #include <displacementmap_vertex> 3179 #include <project_vertex> 3180 #include <logdepthbuf_vertex> 3181 #include <clipping_planes_vertex> 3182 vViewPosition = - mvPosition.xyz; 3183 #include <worldpos_vertex> 3184 #include <envmap_vertex> 3185 #include <shadowmap_vertex> 3186 #include <fog_vertex> 3187}`,dL=`#define PHONG 3188uniform vec3 diffuse; 3189uniform vec3 emissive; 3190uniform vec3 specular; 3191uniform float shininess; 3192uniform float opacity; 3193#include <common> 3194#include <dithering_pars_fragment> 3195#include <color_pars_fragment> 3196#include <uv_pars_fragment> 3197#include <map_pars_fragment> 3198#include <alphamap_pars_fragment> 3199#include <alphatest_pars_fragment> 3200#include <alphahash_pars_fragment> 3201#include <aomap_pars_fragment> 3202#include <lightmap_pars_fragment> 3203#include <emissivemap_pars_fragment> 3204#include <envmap_common_pars_fragment> 3205#include <envmap_pars_fragment> 3206#include <fog_pars_fragment> 3207#include <bsdfs> 3208#include <lights_pars_begin> 3209#include <normal_pars_fragment> 3210#include <lights_phong_pars_fragment> 3211#include <shadowmap_pars_fragment> 3212#include <bumpmap_pars_fragment> 3213#include <normalmap_pars_fragment> 3214#include <specularmap_pars_fragment> 3215#include <logdepthbuf_pars_fragment> 3216#include <clipping_planes_pars_fragment> 3217void main() { 3218 vec4 diffuseColor = vec4( diffuse, opacity ); 3219 #include <clipping_planes_fragment> 3220 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3221 vec3 totalEmissiveRadiance = emissive; 3222 #include <logdepthbuf_fragment> 3223 #include <map_fragment> 3224 #include <color_fragment> 3225 #include <alphamap_fragment> 3226 #include <alphatest_fragment> 3227 #include <alphahash_fragment> 3228 #include <specularmap_fragment> 3229 #include <normal_fragment_begin> 3230 #include <normal_fragment_maps> 3231 #include <emissivemap_fragment> 3232 #include <lights_phong_fragment> 3233 #include <lights_fragment_begin> 3234 #include <lights_fragment_maps> 3235 #include <lights_fragment_end> 3236 #include <aomap_fragment> 3237 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; 3238 #include <envmap_fragment> 3239 #include <opaque_fragment> 3240 #include <tonemapping_fragment> 3241 #include <colorspace_fragment> 3242 #include <fog_fragment> 3243 #include <premultiplied_alpha_fragment> 3244 #include <dithering_fragment> 3245}`,pL=`#define STANDARD 3246varying vec3 vViewPosition; 3247#ifdef USE_TRANSMISSION 3248 varying vec3 vWorldPosition; 3249#endif 3250#include <common> 3251#include <batching_pars_vertex> 3252#include <uv_pars_vertex> 3253#include <displacementmap_pars_vertex> 3254#include <color_pars_vertex> 3255#include <fog_pars_vertex> 3256#include <normal_pars_vertex> 3257#include <morphtarget_pars_vertex> 3258#include <skinning_pars_vertex> 3259#include <shadowmap_pars_vertex> 3260#include <logdepthbuf_pars_vertex> 3261#include <clipping_planes_pars_vertex> 3262void main() { 3263 #include <uv_vertex> 3264 #include <color_vertex> 3265 #include <morphinstance_vertex> 3266 #include <morphcolor_vertex> 3267 #include <batching_vertex> 3268 #include <beginnormal_vertex> 3269 #include <morphnormal_vertex> 3270 #include <skinbase_vertex> 3271 #include <skinnormal_vertex> 3272 #include <defaultnormal_vertex> 3273 #include <normal_vertex> 3274 #include <begin_vertex> 3275 #include <morphtarget_vertex> 3276 #include <skinning_vertex> 3277 #include <displacementmap_vertex> 3278 #include <project_vertex> 3279 #include <logdepthbuf_vertex> 3280 #include <clipping_planes_vertex> 3281 vViewPosition = - mvPosition.xyz; 3282 #include <worldpos_vertex> 3283 #include <shadowmap_vertex> 3284 #include <fog_vertex> 3285#ifdef USE_TRANSMISSION 3286 vWorldPosition = worldPosition.xyz; 3287#endif 3288}`,mL=`#define STANDARD 3289#ifdef PHYSICAL 3290 #define IOR 3291 #define USE_SPECULAR 3292#endif 3293uniform vec3 diffuse; 3294uniform vec3 emissive; 3295uniform float roughness; 3296uniform float metalness; 3297uniform float opacity; 3298#ifdef IOR 3299 uniform float ior; 3300#endif 3301#ifdef USE_SPECULAR 3302 uniform float specularIntensity; 3303 uniform vec3 specularColor; 3304 #ifdef USE_SPECULAR_COLORMAP 3305 uniform sampler2D specularColorMap; 3306 #endif 3307 #ifdef USE_SPECULAR_INTENSITYMAP 3308 uniform sampler2D specularIntensityMap; 3309 #endif 3310#endif 3311#ifdef USE_CLEARCOAT 3312 uniform float clearcoat; 3313 uniform float clearcoatRoughness; 3314#endif 3315#ifdef USE_DISPERSION 3316 uniform float dispersion; 3317#endif
3318#ifdef USE_IRIDESCENCE 3319 uniform float iridescence; 3320 uniform float iridescenceIOR; 3321 uniform float iridescenceThicknessMinimum; 3322 uniform float iridescenceThicknessMaximum; 3323#endif 3324#ifdef USE_SHEEN 3325 uniform vec3 sheenColor; 3326 uniform float sheenRoughness; 3327 #ifdef USE_SHEEN_COLORMAP 3328 uniform sampler2D sheenColorMap; 3329 #endif 3330 #ifdef USE_SHEEN_ROUGHNESSMAP 3331 uniform sampler2D sheenRoughnessMap; 3332 #endif 3333#endif 3334#ifdef USE_ANISOTROPY 3335 uniform vec2 anisotropyVector; 3336 #ifdef USE_ANISOTROPYMAP 3337 uniform sampler2D anisotropyMap; 3338 #endif 3339#endif 3340varying vec3 vViewPosition; 3341#include <common> 3342#include <dithering_pars_fragment> 3343#include <color_pars_fragment> 3344#include <uv_pars_fragment> 3345#include <map_pars_fragment> 3346#include <alphamap_pars_fragment> 3347#include <alphatest_pars_fragment> 3348#include <alphahash_pars_fragment> 3349#include <aomap_pars_fragment> 3350#include <lightmap_pars_fragment> 3351#include <emissivemap_pars_fragment> 3352#include <iridescence_fragment> 3353#include <cube_uv_reflection_fragment> 3354#include <envmap_common_pars_fragment> 3355#include <envmap_physical_pars_fragment> 3356#include <fog_pars_fragment> 3357#include <lights_pars_begin> 3358#include <normal_pars_fragment> 3359#include <lights_physical_pars_fragment> 3360#include <transmission_pars_fragment> 3361#include <shadowmap_pars_fragment> 3362#include <bumpmap_pars_fragment> 3363#include <normalmap_pars_fragment> 3364#include <clearcoat_pars_fragment> 3365#include <iridescence_pars_fragment> 3366#include <roughnessmap_pars_fragment> 3367#include <metalnessmap_pars_fragment> 3368#include <logdepthbuf_pars_fragment> 3369#include <clipping_planes_pars_fragment> 3370void main() { 3371 vec4 diffuseColor = vec4( diffuse, opacity ); 3372 #include <clipping_planes_fragment> 3373 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3374 vec3 totalEmissiveRadiance = emissive; 3375 #include <logdepthbuf_fragment> 3376 #include <map_fragment> 3377 #include <color_fragment> 3378 #include <alphamap_fragment> 3379 #include <alphatest_fragment> 3380 #include <alphahash_fragment> 3381 #include <roughnessmap_fragment> 3382 #include <metalnessmap_fragment> 3383 #include <normal_fragment_begin> 3384 #include <normal_fragment_maps> 3385 #include <clearcoat_normal_fragment_begin> 3386 #include <clearcoat_normal_fragment_maps> 3387 #include <emissivemap_fragment> 3388 #include <lights_physical_fragment> 3389 #include <lights_fragment_begin> 3390 #include <lights_fragment_maps> 3391 #include <lights_fragment_end> 3392 #include <aomap_fragment> 3393 vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; 3394 vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; 3395 #include <transmission_fragment> 3396 vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; 3397 #ifdef USE_SHEEN 3398 3399 outgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect; 3400 3401 #endif 3402 #ifdef USE_CLEARCOAT 3403 float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); 3404 vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); 3405 outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; 3406 #endif 3407 #include <opaque_fragment> 3408 #include <tonemapping_fragment> 3409 #include <colorspace_fragment> 3410 #include <fog_fragment> 3411 #include <premultiplied_alpha_fragment> 3412 #include <dithering_fragment> 3413}`,gL=`#define TOON 3414varying vec3 vViewPosition; 3415#include <common> 3416#include <batching_pars_vertex> 3417#include <uv_pars_vertex> 3418#include <displacementmap_pars_vertex> 3419#include <color_pars_vertex> 3420#include <fog_pars_vertex> 3421#include <normal_pars_vertex> 3422#include <morphtarget_pars_vertex> 3423#include <skinning_pars_vertex> 3424#include <shadowmap_pars_vertex> 3425#include <logdepthbuf_pars_vertex> 3426#include <clipping_planes_pars_vertex> 3427void main() { 3428 #include <uv_vertex> 3429 #include <color_vertex> 3430 #include <morphinstance_vertex> 3431 #include <morphcolor_vertex> 3432 #include <batching_vertex> 3433 #include <beginnormal_vertex> 3434 #include <morphnormal_vertex> 3435 #include <skinbase_vertex> 3436 #include <skinnormal_vertex> 3437 #include <defaultnormal_vertex> 3438 #include <normal_vertex> 3439 #include <begin_vertex> 3440 #include <morphtarget_vertex> 3441 #include <skinning_vertex> 3442 #include <displacementmap_vertex> 3443 #include <project_vertex> 3444 #include <logdepthbuf_vertex> 3445 #include <clipping_planes_vertex> 3446 vViewPosition = - mvPosition.xyz; 3447 #include <worldpos_vertex> 3448 #include <shadowmap_vertex> 3449 #include <fog_vertex> 3450}`,vL=`#define TOON 3451uniform vec3 diffuse; 3452uniform vec3 emissive; 3453uniform float opacity; 3454#include <common> 3455#include <dithering_pars_fragment> 3456#include <color_pars_fragment> 3457#include <uv_pars_fragment> 3458#include <map_pars_fragment> 3459#include <alphamap_pars_fragment> 3460#include <alphatest_pars_fragment> 3461#include <alphahash_pars_fragment> 3462#include <aomap_pars_fragment> 3463#include <lightmap_pars_fragment> 3464#include <emissivemap_pars_fragment> 3465#include <gradientmap_pars_fragment> 3466#include <fog_pars_fragment> 3467#include <bsdfs> 3468#include <lights_pars_begin> 3469#include <normal_pars_fragment> 3470#include <lights_toon_pars_fragment> 3471#include <shadowmap_pars_fragment> 3472#include <bumpmap_pars_fragment> 3473#include <normalmap_pars_fragment> 3474#include <logdepthbuf_pars_fragment> 3475#include <clipping_planes_pars_fragment> 3476void main() { 3477 vec4 diffuseColor = vec4( diffuse, opacity ); 3478 #include <clipping_planes_fragment> 3479 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3480 vec3 totalEmissiveRadiance = emissive; 3481 #include <logdepthbuf_fragment> 3482 #include <map_fragment> 3483 #include <color_fragment> 3484 #include <alphamap_fragment> 3485 #include <alphatest_fragment> 3486 #include <alphahash_fragment> 3487 #include <normal_fragment_begin> 3488 #include <normal_fragment_maps> 3489 #include <emissivemap_fragment> 3490 #include <lights_toon_fragment> 3491 #include <lights_fragment_begin> 3492 #include <lights_fragment_maps> 3493 #include <lights_fragment_end> 3494 #include <aomap_fragment> 3495 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 3496 #include <opaque_fragment> 3497 #include <tonemapping_fragment> 3498 #include <colorspace_fragment> 3499 #include <fog_fragment> 3500 #include <premultiplied_alpha_fragment> 3501 #include <dithering_fragment> 3502}`,yL=`uniform float size; 3503uniform float scale; 3504#include <common> 3505#include <color_pars_vertex> 3506#include <fog_pars_vertex> 3507#include <morphtarget_pars_vertex> 3508#include <logdepthbuf_pars_vertex> 3509#include <clipping_planes_pars_vertex> 3510#ifdef USE_POINTS_UV 3511 varying vec2 vUv; 3512 uniform mat3 uvTransform; 3513#endif 3514void main() { 3515 #ifdef USE_POINTS_UV 3516 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 3517 #endif 3518 #include <color_vertex> 3519 #include <morphinstance_vertex> 3520 #include <morphcolor_vertex> 3521 #include <begin_vertex> 3522 #include <morphtarget_vertex> 3523 #include <project_vertex> 3524 gl_PointSize = size; 3525 #ifdef USE_SIZEATTENUATION 3526 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 3527 if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); 3528 #endif 3529 #include <logdepthbuf_vertex> 3530 #include <clipping_planes_vertex> 3531 #include <worldpos_vertex> 3532 #include <fog_vertex> 3533}`,_L=`uniform vec3 diffuse; 3534uniform float opacity; 3535#include <common> 3536#include <color_pars_fragment> 3537#include <map_particle_pars_fragment> 3538#include <alphatest_pars_fragment> 3539#include <alphahash_pars_fragment> 3540#include <fog_pars_fragment> 3541#include <logdepthbuf_pars_fragment> 3542#include <clipping_planes_pars_fragment> 3543void main() { 3544 vec4 diffuseColor = vec4( diffuse, opacity ); 3545 #include <clipping_planes_fragment> 3546 vec3 outgoingLight = vec3( 0.0 ); 3547 #include <logdepthbuf_fragment> 3548 #include <map_particle_fragment> 3549 #include <color_fragment> 3550 #include <alphatest_fragment> 3551 #include <alphahash_fragment> 3552 outgoingLight = diffuseColor.rgb; 3553 #include <opaque_fragment> 3554 #include <tonemapping_fragment> 3555 #include <colorspace_fragment> 3556 #include <fog_fragment> 3557 #include <premultiplied_alpha_fragment> 3558}`,xL=`#include <common> 3559#include <batching_pars_vertex> 3560#include <fog_pars_vertex> 3561#include <morphtarget_pars_vertex> 3562#include <skinning_pars_vertex> 3563#include <logdepthbuf_pars_vertex> 3564#include <shadowmap_pars_vertex> 3565void main() { 3566 #include <batching_vertex> 3567 #include <beginnormal_vertex> 3568 #include <morphinstance_vertex> 3569 #include <morphnormal_vertex> 3570 #include <skinbase_vertex> 3571 #include <skinnormal_vertex> 3572 #include <defaultnormal_vertex> 3573 #include <begin_vertex> 3574 #include <morphtarget_vertex> 3575 #include <skinning_vertex> 3576 #include <project_vertex> 3577 #include <logdepthbuf_vertex> 3578 #include <worldpos_vertex> 3579 #include <shadowmap_vertex> 3580 #include <fog_vertex> 3581}`,AL=`uniform vec3 color; 3582uniform float opacity; 3583#include <common> 3584#include <fog_pars_fragment> 3585#include <bsdfs> 3586#include <lights_pars_begin> 3587#include <logdepthbuf_pars_fragment> 3588#include <shadowmap_pars_fragment> 3589#include <shadowmask_pars_fragment> 3590void main() { 3591 #include <logdepthbuf_fragment> 3592 gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); 3593 #include <tonemapping_fragment> 3594 #include <colorspace_fragment> 3595 #include <fog_fragment> 3596}`,SL=`uniform float rotation; 3597uniform vec2 center; 3598#include <common> 3599#include <uv_pars_vertex> 3600#include <fog_pars_vertex> 3601#include <logdepthbuf_pars_vertex> 3602#include <clipping_planes_pars_vertex> 3603void main() { 3604 #include <uv_vertex> 3605 vec4 mvPosition = modelViewMatrix[ 3 ]; 3606 vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) ); 3607 #ifndef USE_SIZEATTENUATION 3608 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 3609 if ( isPerspective ) scale *= - mvPosition.z; 3610 #endif 3611 vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; 3612 vec2 rotatedPosition; 3613 rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; 3614 rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; 3615 mvPosition.xy += rotatedPosition; 3616 gl_Position = projectionMatrix * mvPosition; 3617 #include <logdepthbuf_vertex> 3618 #include <clipping_planes_vertex> 3619 #include <fog_vertex> 3620}`,bL=`uniform vec3 diffuse; 3621uniform float opacity; 3622#include <common> 3623#include <uv_pars_fragment> 3624#include <map_pars_fragment> 3625#include <alphamap_pars_fragment> 3626#include <alphatest_pars_fragment> 3627#include <alphahash_pars_fragment> 3628#include <fog_pars_fragment> 3629#include <logdepthbuf_pars_fragment> 3630#include <clipping_planes_pars_fragment> 3631void main() { 3632 vec4 diffuseColor = vec4( diffuse, opacity ); 3633 #include <clipping_planes_fragment> 3634 vec3 outgoingLight = vec3( 0.0 ); 3635 #include <logdepthbuf_fragment> 3636 #include <map_fragment> 3637 #include <alphamap_fragment> 3638 #include <alphatest_fragment> 3639 #include <alphahash_fragment> 3640 outgoingLight = diffuseColor.rgb; 3641 #include <opaque_fragment> 3642 #include <tonemapping_fragment> 3643 #include <colorspace_fragment> 3644 #include <fog_fragment> 3645}`,An={alphahash_fragment:W3,alphahash_pars_fragment:J3,alphamap_fragment:Y3,alphamap_pars_fragment:q3,alphatest_fragment:K3,alphatest_pars_fragment:Z3,aomap_fragment:Q3,aomap_pars_fragment:j3,batching_pars_vertex:$3,batching_vertex:eD,begin_vertex:tD,beginnormal_vertex:nD,bsdfs:iD,iridescence_fragment:sD,bumpmap_pars_fragment:rD,clipping_planes_fragment:aD,clipping_planes_pars_fragment:oD,clipping_planes_pars_vertex:lD,clipping_planes_vertex:cD,color_fragment:uD,color_pars_fragment:fD,color_pars_vertex:hD,color_vertex:dD,common:pD,cube_uv_reflection_fragment:mD,defaultnormal_vertex:gD,displacementmap_pars_vertex:vD,displacementmap_vertex:yD,emissivemap_fragment:_D,emissivemap_pars_fragment:xD,colorspace_fragment:AD,colorspace_pars_fragment:SD,envmap_fragment:bD,envmap_common_pars_fragment:MD,envmap_pars_fragment:ED,envmap_pars_vertex:TD,envmap_physical_pars_fragment:OD,envmap_vertex:CD,fog_vertex:wD,fog_pars_vertex:RD,fog_fragment:BD,fog_pars_fragment:DD,gradientmap_pars_fragment:ID,lightmap_pars_fragment:LD,lights_lambert_fragment:UD,lights_lambert_pars_fragment:ND,lights_pars_begin:FD,lights_toon_fragment:PD,lights_toon_pars_fragment:zD,lights_phong_fragment:GD,lights_phong_pars_fragment:HD,lights_physical_fragment:kD,lights_physical_pars_fragment:VD,lights_fragment_begin:XD,lights_fragment_maps:WD,lights_fragment_end:JD,logdepthbuf_fragment:YD,logdepthbuf_pars_fragment:qD,logdepthbuf_pars_vertex:KD,logdepthbuf_vertex:ZD,map_fragment:QD,map_pars_fragment:jD,map_particle_fragment:$D,map_particle_pars_fragment:eI,metalnessmap_fragment:tI,metalnessmap_pars_fragment:nI,morphinstance_vertex:iI,morphcolor_vertex:sI,morphnormal_vertex:rI,morphtarget_pars_vertex:aI,morphtarget_vertex:oI,normal_fragment_begin:lI,normal_fragment_maps:cI,normal_pars_fragment:uI,normal_pars_vertex:fI,normal_vertex:hI,normalmap_pars_fragment:dI,clearcoat_normal_fragment_begin:pI,clearcoat_normal_fragment_maps:mI,clearcoat_pars_fragment:gI,iridescence_pars_fragment:vI,opaque_fragment:yI,packing:_I,premultiplied_alpha_fragment:xI,project_vertex:AI,dithering_fragment:SI,dithering_pars_fragment:bI,roughnessmap_fragment:MI,roughnessmap_pars_fragment:EI,shadowmap_pars_fragment:TI,shadowmap_pars_vertex:CI,shadowmap_vertex:wI,shadowmask_pars_fragment:RI,skinbase_vertex:BI,skinning_pars_vertex:DI,skinning_vertex:II,skinnormal_vertex:LI,specularmap_fragment:UI,specularmap_pars_fragment:NI,tonemapping_fragment:FI,tonemapping_pars_fragment:OI,transmission_fragment:PI,transmission_pars_fragment:zI,uv_pars_fragment:GI,uv_pars_vertex:HI,uv_vertex:kI,worldpos_vertex:VI,background_vert:XI,background_frag:WI,backgroundCube_vert:JI,backgroundCube_frag:YI,cube_vert:qI,cube_frag:KI,depth_vert:ZI,depth_frag:QI,distance_vert:jI,distance_frag:$I,equirect_vert:eL,equirect_frag:tL,linedashed_vert:nL,linedashed_frag:iL,meshbasic_vert:sL,meshbasic_frag:rL,meshlambert_vert:aL,meshlambert_frag:oL,meshmatcap_vert:lL,meshmatcap_frag:cL,meshnormal_vert:uL,meshnormal_frag:fL,meshphong_vert:hL,meshphong_frag:dL,meshphysical_vert:pL,meshphysical_frag:mL,meshtoon_vert:gL,meshtoon_frag:vL,points_vert:yL,points_frag:_L,shadow_vert:xL,shadow_frag:AL,sprite_vert:SL,sprite_frag:bL},Ct={common:{diffuse:{value:new Tt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new dn},alphaMap:{value:null},alphaMapTransform:{value:new dn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new dn}},envmap:{envMap:{value:null},envMapRotation:{value:new dn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new dn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new dn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new dn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new dn},normalScale:{value:new We(1,1)}}
vendor: 7,090 bytes, line 3645
3645,displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new dn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new dn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new dn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new dn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Tt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Tt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new dn},alphaTest:{value:0},uvTransform:{value:new dn}},sprite:{diffuse:{value:new Tt(16777215)},opacity:{value:1},center:{value:new We(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new dn},alphaMap:{value:null},alphaMapTransform:{value:new dn},alphaTest:{value:0}}},co={basic:{uniforms:yr([Ct.common,Ct.specularmap,Ct.envmap,Ct.aomap,Ct.lightmap,Ct.fog]),vertexShader:An.meshbasic_vert,fragmentShader:An.meshbasic_frag},lambert:{uniforms:yr([Ct.common,Ct.specularmap,Ct.envmap,Ct.aomap,Ct.lightmap,Ct.emissivemap,Ct.bumpmap,Ct.normalmap,Ct.displacementmap,Ct.fog,Ct.lights,{emissive:{value:new Tt(0)}}]),vertexShader:An.meshlambert_vert,fragmentShader:An.meshlambert_frag},phong:{uniforms:yr([Ct.common,Ct.specularmap,Ct.envmap,Ct.aomap,Ct.lightmap,Ct.emissivemap,Ct.bumpmap,Ct.normalmap,Ct.displacementmap,Ct.fog,Ct.lights,{emissive:{value:new Tt(0)},specular:{value:new Tt(1118481)},shininess:{value:30}}]),vertexShader:An.meshphong_vert,fragmentShader:An.meshphong_frag},standard:{uniforms:yr([Ct.common,Ct.envmap,Ct.aomap,Ct.lightmap,Ct.emissivemap,Ct.bumpmap,Ct.normalmap,Ct.displacementmap,Ct.roughnessmap,Ct.metalnessmap,Ct.fog,Ct.lights,{emissive:{value:new Tt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:An.meshphysical_vert,fragmentShader:An.meshphysical_frag},toon:{uniforms:yr([Ct.common,Ct.aomap,Ct.lightmap,Ct.emissivemap,Ct.bumpmap,Ct.normalmap,Ct.displacementmap,Ct.gradientmap,Ct.fog,Ct.lights,{emissive:{value:new Tt(0)}}]),vertexShader:An.meshtoon_vert,fragmentShader:An.meshtoon_frag},matcap:{uniforms:yr([Ct.common,Ct.bumpmap,Ct.normalmap,Ct.displacementmap,Ct.fog,{matcap:{value:null}}]),vertexShader:An.meshmatcap_vert,fragmentShader:An.meshmatcap_frag},points:{uniforms:yr([Ct.points,Ct.fog]),vertexShader:An.points_vert,fragmentShader:An.points_frag},dashed:{uniforms:yr([Ct.common,Ct.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:An.linedashed_vert,fragmentShader:An.linedashed_frag},depth:{uniforms:yr([Ct.common,Ct.displacementmap]),vertexShader:An.depth_vert,fragmentShader:An.depth_frag},normal:{uniforms:yr([Ct.common,Ct.bumpmap,Ct.normalmap,Ct.displacementmap,{opacity:{value:1}}]),vertexShader:An.meshnormal_vert,fragmentShader:An.meshnormal_frag},sprite:{uniforms:yr([Ct.sprite,Ct.fog]),vertexShader:An.sprite_vert,fragmentShader:An.sprite_frag},background:{uniforms:{uvTransform:{value:new dn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:An.background_vert,fragmentShader:An.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new dn}},vertexShader:An.backgroundCube_vert,fragmentShader:An.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:An.cube_vert,fragmentShader:An.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:An.equirect_vert,fragmentShader:An.equirect_frag},distance:{uniforms:yr([Ct.common,Ct.displacementmap,{referencePosition:{value:new K},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:An.distance_vert,fragmentShader:An.distance_frag},shadow:{uniforms:yr([Ct.lights,Ct.fog,{color:{value:new Tt(0)},opacity:{value:1}}]),vertexShader:An.shadow_vert,fragmentShader:An.shadow_frag}};co.physical={uniforms:yr([co.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new dn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new dn},clearcoatNormalScale:{value:new We(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new dn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new dn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new dn},sheen:{value:0},sheenColor:{value:new Tt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new dn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new dn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new dn},transmissionSamplerSize:{value:new We},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new dn},attenuationDistance:{value:0},attenuationColor:{value:new Tt(0)},specularColor:{value:new Tt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new dn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new dn},anisotropyVector:{value:new We},anisotropyMap:{value:null},anisotropyMapTransform:{value:new dn}}]),vertexShader:An.meshphysical_vert,fragmentShader:An.meshphysical_frag};const Uv={r:0,b:0,g:0},tf=new sa,ML=new jt;function EL(a,e,t,n,s,o,u){const h=new Tt(0);let d=o===!0?0:1,g,y,v=null,x=0,S=null;function M(D){let U=D.isScene===!0?D.background:null;return U&&U.isTexture&&(U=(D.backgroundBlurriness>0?t:e).get(U)),U}function w(D){let U=!1;const z=M(D);z===null?E(h,d):z&&z.isColor&&(E(z,1),U=!0);const P=a.xr.getEnvironmentBlendMode();
vendor: 5,419 bytes, line 3645
3645P==="additive"?n.buffers.color.setClear(0,0,0,1,u):P==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,u),(a.autoClear||U)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),a.clear(a.autoClearColor,a.autoClearDepth,a.autoClearStencil))}function C(D,U){const z=M(U);z&&(z.isCubeTexture||z.mapping===Td)?(y===void 0&&(y=new wi(new Tf(1,1,1),new br({name:"BackgroundCubeMaterial",uniforms:Ad(co.backgroundCube.uniforms),vertexShader:co.backgroundCube.vertexShader,fragmentShader:co.backgroundCube.fragmentShader,side:Ar,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),y.geometry.deleteAttribute("normal"),y.geometry.deleteAttribute("uv"),y.onBeforeRender=function(P,X,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(y.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),s.update(y)),tf.copy(U.backgroundRotation),tf.x*=-1,tf.y*=-1,tf.z*=-1,z.isCubeTexture&&z.isRenderTargetTexture===!1&&(tf.y*=-1,tf.z*=-1),y.material.uniforms.envMap.value=z,y.material.uniforms.flipEnvMap.value=z.isCubeTexture&&z.isRenderTargetTexture===!1?-1:1,y.material.uniforms.backgroundBlurriness.value=U.backgroundBlurriness,y.material.uniforms.backgroundIntensity.value=U.backgroundIntensity,y.material.uniforms.backgroundRotation.value.setFromMatrix4(ML.makeRotationFromEuler(tf)),y.material.toneMapped=On.getTransfer(z.colorSpace)!==$n,(v!==z||x!==z.version||S!==a.toneMapping)&&(y.material.needsUpdate=!0,v=z,x=z.version,S=a.toneMapping),y.layers.enableAll(),D.unshift(y,y.geometry,y.material,0,0,null)):z&&z.isTexture&&(g===void 0&&(g=new wi(new tu(2,2),new br({name:"BackgroundMaterial",uniforms:Ad(co.background.uniforms),vertexShader:co.background.vertexShader,fragmentShader:co.background.fragmentShader,side:Zo,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),g.geometry.deleteAttribute("normal"),Object.defineProperty(g.material,"map",{get:function(){return this.uniforms.t2D.value}}),s.update(g)),g.material.uniforms.t2D.value=z,g.material.uniforms.backgroundIntensity.value=U.backgroundIntensity,g.material.toneMapped=On.getTransfer(z.colorSpace)!==$n,z.matrixAutoUpdate===!0&&z.updateMatrix(),g.material.uniforms.uvTransform.value.copy(z.matrix),(v!==z||x!==z.version||S!==a.toneMapping)&&(g.material.needsUpdate=!0,v=z,x=z.version,S=a.toneMapping),g.layers.enableAll(),D.unshift(g,g.geometry,g.material,0,0,null))}function E(D,U){D.getRGB(Uv,zE(a)),n.buffers.color.setClear(Uv.r,Uv.g,Uv.b,U,u)}function B(){y!==void 0&&(y.geometry.dispose(),y.material.dispose(),y=void 0),g!==void 0&&(g.geometry.dispose(),g.material.dispose(),g=void 0)}return{getClearColor:function(){return h},setClearColor:function(D,U=1){h.set(D),d=U,E(h,d)},getClearAlpha:function(){return d},setClearAlpha:function(D){d=D,E(h,d)},render:w,addToRenderList:C,dispose:B}}function TL(a,e){const t=a.getParameter(a.MAX_VERTEX_ATTRIBS),n={},s=x(null);let o=s,u=!1;function h(O,q,ie,j,re){let fe=!1;const Y=v(j,ie,q);o!==Y&&(o=Y,g(o.object)),fe=S(O,j,ie,re),fe&&M(O,j,ie,re),re!==null&&e.update(re,a.ELEMENT_ARRAY_BUFFER),(fe||u)&&(u=!1,U(O,q,ie,j),re!==null&&a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,e.get(re).buffer))}function d(){return a.createVertexArray()}function g(O){return a.bindVertexArray(O)}function y(O){return a.deleteVertexArray(O)}function v(O,q,ie){const j=ie.wireframe===!0;let re=n[O.id];re===void 0&&(re={},n[O.id]=re);let fe=re[q.id];fe===void 0&&(fe={},re[q.id]=fe);let Y=fe[j];return Y===void 0&&(Y=x(d()),fe[j]=Y),Y}function x(O){const q=[],ie=[],j=[];for(let re=0;re<t;re++)q[re]=0,ie[re]=0,j[re]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:q,enabledAttributes:ie,attributeDivisors:j,object:O,attributes:{},index:null}}function S(O,q,ie,j){const re=o.attributes,fe=q.attributes;let Y=0;const $=ie.getAttributes();for(const pe in $)if($[pe].location>=0){const Ae=re[pe];let De=fe[pe];if(De===void 0&&(pe==="instanceMatrix"&&O.instanceMatrix&&(De=O.instanceMatrix),pe==="instanceColor"&&O.instanceColor&&(De=O.instanceColor)),Ae===void 0||Ae.attribute!==De||De&&Ae.data!==De.data)return!0;Y++}return o.attributesNum!==Y||o.index!==j}function M(O,q,ie,j){const re={},fe=q.attributes;let Y=0;const $=ie.getAttributes();for(const pe in $)if($[pe].location>=0){let Ae=fe[pe];Ae===void 0&&(pe==="instanceMatrix"&&O.instanceMatrix&&(Ae=O.instanceMatrix),pe==="instanceColor"&&O.instanceColor&&(Ae=O.instanceColor));const De={};De.attribute=Ae,Ae&&Ae.data&&(De.data=Ae.data),re[pe]=De,Y++}o.attributes=re,o.attributesNum=Y,o.index=j}function w(){const O=o.newAttributes;for(let q=0,ie=O.length;q<ie;q++)O[q]=0}function C(O){E(O,0)}function E(O,q){const ie=o.newAttributes,j=o.enabledAttributes,re=o.attributeDivisors;ie[O]=1,j[O]===0&&(a.enableVertexAttribArray(O),j[O]=1),re[O]!==q&&(a.vertexAttribDivisor(O,q),re[O]=q)}function B(){const O=o.newAttributes,q=o.enabledAttributes;for(let ie=0,j=q.length;ie<j;ie++)q[ie]!==O[ie]&&(a.disableVertexAttribArray(ie),q[ie]=0)}function D(O,q,ie,j,re,fe,Y){Y===!0?a.vertexAttribIPointer(O,q,ie,re,fe):a.vertexAttribPointer(O,q,ie,j,re,fe)}function U(O,q,ie,j){w();const re=j.attributes,fe=ie.getAttributes(),Y=q.defaultAttributeValues;for(const $ in fe){const pe=fe[$];if(pe.location>=0){let Be=re[$];if(Be===void 0&&($==="instanceMatrix"&&O.instanceMatrix&&(Be=O.instanceMatrix),$==="instanceColor"&&O.instanceColor&&(Be=O.instanceColor)),Be!==void 0){const Ae=Be.normalized,De=Be.itemSize,He=e.get(Be);
vendor: 2,507 bytes, line 3645
3645if(He===void 0)continue;const Ve=He.buffer,bt=He.type,qt=He.bytesPerElement,me=bt===a.INT||bt===a.UNSIGNED_INT||Be.gpuType===qm;if(Be.isInterleavedBufferAttribute){const Fe=Be.data,mt=Fe.stride,It=Be.offset;if(Fe.isInstancedInterleavedBuffer){for(let wt=0;wt<pe.locationSize;wt++)E(pe.location+wt,Fe.meshPerAttribute);O.isInstancedMesh!==!0&&j._maxInstanceCount===void 0&&(j._maxInstanceCount=Fe.meshPerAttribute*Fe.count)}else for(let wt=0;wt<pe.locationSize;wt++)C(pe.location+wt);a.bindBuffer(a.ARRAY_BUFFER,Ve);for(let wt=0;wt<pe.locationSize;wt++)D(pe.location+wt,De/pe.locationSize,bt,Ae,mt*qt,(It+De/pe.locationSize*wt)*qt,me)}else{if(Be.isInstancedBufferAttribute){for(let Fe=0;Fe<pe.locationSize;Fe++)E(pe.location+Fe,Be.meshPerAttribute);O.isInstancedMesh!==!0&&j._maxInstanceCount===void 0&&(j._maxInstanceCount=Be.meshPerAttribute*Be.count)}else for(let Fe=0;Fe<pe.locationSize;Fe++)C(pe.location+Fe);a.bindBuffer(a.ARRAY_BUFFER,Ve);for(let Fe=0;Fe<pe.locationSize;Fe++)D(pe.location+Fe,De/pe.locationSize,bt,Ae,De*qt,De/pe.locationSize*Fe*qt,me)}}else if(Y!==void 0){const Ae=Y[$];if(Ae!==void 0)switch(Ae.length){case 2:a.vertexAttrib2fv(pe.location,Ae);break;case 3:a.vertexAttrib3fv(pe.location,Ae);break;case 4:a.vertexAttrib4fv(pe.location,Ae);break;default:a.vertexAttrib1fv(pe.location,Ae)}}}}B()}function z(){k();for(const O in n){const q=n[O];for(const ie in q){const j=q[ie];for(const re in j)y(j[re].object),delete j[re];delete q[ie]}delete n[O]}}function P(O){if(n[O.id]===void 0)return;const q=n[O.id];for(const ie in q){const j=q[ie];for(const re in j)y(j[re].object),delete j[re];delete q[ie]}delete n[O.id]}function X(O){for(const q in n){const ie=n[q];if(ie[O.id]===void 0)continue;const j=ie[O.id];for(const re in j)y(j[re].object),delete j[re];delete ie[O.id]}}function k(){I(),u=!0,o!==s&&(o=s,g(o.object))}function I(){s.geometry=null,s.program=null,s.wireframe=!1}return{setup:h,reset:k,resetDefaultState:I,dispose:z,releaseStatesOfGeometry:P,releaseStatesOfProgram:X,initAttributes:w,enableAttribute:C,disableUnusedAttributes:B}}function CL(a,e,t){let n;function s(g){n=g}function o(g,y){a.drawArrays(n,g,y),t.update(y,n,1)}function u(g,y,v){v!==0&&(a.drawArraysInstanced(n,g,y,v),t.update(y,n,v))}function h(g,y,v){if(v===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(n,g,0,y,0,v);let S=0;for(let M=0;M<v;M++)S+=y[M];t.update(S,n,1)}function d(g,y,v,x){if(v===0)return;const S=e.get("WEBGL_multi_draw");if(S===null)for(let M=0;M<g.length;M++)u(g[M],y[M],x[M]);
vendor: 7,249 bytes, line 3645
3645else{S.multiDrawArraysInstancedWEBGL(n,g,0,y,0,x,0,v);let M=0;for(let w=0;w<v;w++)M+=y[w]*x[w];t.update(M,n,1)}}this.setMode=s,this.render=o,this.renderInstances=u,this.renderMultiDraw=h,this.renderMultiDrawInstances=d}function wL(a,e,t,n){let s;function o(){if(s!==void 0)return s;if(e.has("EXT_texture_filter_anisotropic")===!0){const X=e.get("EXT_texture_filter_anisotropic");s=a.getParameter(X.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else s=0;return s}function u(X){return!(X!==ts&&n.convert(X)!==a.getParameter(a.IMPLEMENTATION_COLOR_READ_FORMAT))}function h(X){const k=X===Wi&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(X!==ws&&n.convert(X)!==a.getParameter(a.IMPLEMENTATION_COLOR_READ_TYPE)&&X!==Ci&&!k)}function d(X){if(X==="highp"){if(a.getShaderPrecisionFormat(a.VERTEX_SHADER,a.HIGH_FLOAT).precision>0&&a.getShaderPrecisionFormat(a.FRAGMENT_SHADER,a.HIGH_FLOAT).precision>0)return"highp";X="mediump"}return X==="mediump"&&a.getShaderPrecisionFormat(a.VERTEX_SHADER,a.MEDIUM_FLOAT).precision>0&&a.getShaderPrecisionFormat(a.FRAGMENT_SHADER,a.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let g=t.precision!==void 0?t.precision:"highp";const y=d(g);y!==g&&(Mt("WebGLRenderer:",g,"not supported, using",y,"instead."),g=y);const v=t.logarithmicDepthBuffer===!0,x=t.reversedDepthBuffer===!0&&e.has("EXT_clip_control"),S=a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS),M=a.getParameter(a.MAX_VERTEX_TEXTURE_IMAGE_UNITS),w=a.getParameter(a.MAX_TEXTURE_SIZE),C=a.getParameter(a.MAX_CUBE_MAP_TEXTURE_SIZE),E=a.getParameter(a.MAX_VERTEX_ATTRIBS),B=a.getParameter(a.MAX_VERTEX_UNIFORM_VECTORS),D=a.getParameter(a.MAX_VARYING_VECTORS),U=a.getParameter(a.MAX_FRAGMENT_UNIFORM_VECTORS),z=a.getParameter(a.MAX_SAMPLES),P=a.getParameter(a.SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:o,getMaxPrecision:d,textureFormatReadable:u,textureTypeReadable:h,precision:g,logarithmicDepthBuffer:v,reversedDepthBuffer:x,maxTextures:S,maxVertexTextures:M,maxTextureSize:w,maxCubemapSize:C,maxAttributes:E,maxVertexUniforms:B,maxVaryings:D,maxFragmentUniforms:U,maxSamples:z,samples:P}}function RL(a){const e=this;let t=null,n=0,s=!1,o=!1;const u=new Hc,h=new dn,d={value:null,needsUpdate:!1};this.uniform=d,this.numPlanes=0,this.numIntersection=0,this.init=function(v,x){const S=v.length!==0||x||n!==0||s;return s=x,n=v.length,S},this.beginShadows=function(){o=!0,y(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(v,x){t=y(v,x,0)},this.setState=function(v,x,S){const M=v.clippingPlanes,w=v.clipIntersection,C=v.clipShadows,E=a.get(v);if(!s||M===null||M.length===0||o&&!C)o?y(null):g();else{const B=o?0:n,D=B*4;let U=E.clippingState||null;d.value=U,U=y(M,x,D,S);for(let z=0;z!==D;++z)U[z]=t[z];E.clippingState=U,this.numIntersection=w?this.numPlanes:0,this.numPlanes+=B}};function g(){d.value!==t&&(d.value=t,d.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function y(v,x,S,M){const w=v!==null?v.length:0;let C=null;if(w!==0){if(C=d.value,M!==!0||C===null){const E=S+w*4,B=x.matrixWorldInverse;h.getNormalMatrix(B),(C===null||C.length<E)&&(C=new Float32Array(E));for(let D=0,U=S;D!==w;++D,U+=4)u.copy(v[D]).applyMatrix4(B,h),u.normal.toArray(C,U),C[U+3]=u.constant}d.value=C,d.needsUpdate=!0}return e.numPlanes=w,e.numIntersection=0,C}}function BL(a){let e=new WeakMap;function t(u,h){return h===fd?u.mapping=ho:h===Lm&&(u.mapping=Kc),u}function n(u){if(u&&u.isTexture){const h=u.mapping;if(h===fd||h===Lm)if(e.has(u)){const d=e.get(u).texture;return t(d,u.mapping)}else{const d=u.image;if(d&&d.height>0){const g=new r_(d.height);return g.fromEquirectangularTexture(a,u),e.set(u,g),u.addEventListener("dispose",s),t(g.texture,u.mapping)}else return null}}return u}function s(u){const h=u.target;h.removeEventListener("dispose",s);const d=e.get(h);d!==void 0&&(e.delete(h),d.dispose())}function o(){e=new WeakMap}return{get:n,dispose:o}}const Wc=4,e1=[.125,.215,.35,.446,.526,.582],af=20,DL=256,mm=new iu,t1=new Tt;let Qx=null,jx=0,$x=0,eA=!1;const IL=new K;class NA{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._sizeLods=[],this._sigmas=[],this._lodMeshes=[],this._backgroundBox=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._blurMaterial=null,this._ggxMaterial=null}fromScene(e,t=0,n=.1,s=100,o={}){const{size:u=256,position:h=IL}=o;Qx=this._renderer.getRenderTarget(),jx=this._renderer.getActiveCubeFace(),$x=this._renderer.getActiveMipmapLevel(),eA=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(u);const d=this._allocateTargets();return d.depthBuffer=!0,this._sceneToCubeUV(e,n,s,d,h),t>0&&this._blur(d,0,0,t),this._applyPMREM(d),this._cleanup(d),d}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=s1(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=i1(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose(),this._backgroundBox!==null&&(this._backgroundBox.geometry.dispose(),this._backgroundBox.material.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._ggxMaterial!==null&&this._ggxMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodMeshes.length;e++)this._lodMeshes[e].geometry.dispose()}_cleanup(e){this._renderer.setRenderTarget(Qx,jx,$x),this._renderer.xr.enabled=eA,e.scissorTest=!1,td(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===ho||e.mapping===Kc?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),Qx=this._renderer.getRenderTarget(),jx=this._renderer.getActiveCubeFace(),$x=this._renderer.getActiveMipmapLevel(),eA=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:Un,minFilter:Un,generateMipmaps:!1,type:Wi,format:ts,colorSpace:po,depthBuffer:!1},s=n1(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=n1(e,t,n);const{_lodMax:o}=this;({lodMeshes:this._lodMeshes,sizeLods:this._sizeLods,sigmas:this._sigmas}=LL(o)),this._blurMaterial=NL(o,e,t),this._ggxMaterial=UL(o,e,t)}return s}_compileMaterial(e){const t=new wi(new rn,e);this._renderer.compile(t,mm)}_sceneToCubeUV(e,t,n,s,o){const d=new gs(90,1,t,n),g=[1,-1,1,1,1,1],y=[1,1,1,-1,-1,-1],v=this._renderer,x=v.autoClear,S=v.toneMapping;v.getClearColor(t1),v.toneMapping=Oa,v.autoClear=!1,v.state.buffers.depth.getReversed()&&(v.setRenderTarget(s),v.clearDepth(),v.setRenderTarget(null)),this._backgroundBox===null&&(this._backgroundBox=new wi(new Tf,new Yr({name:"PMREM.Backgroun
3645d",side:Ar,depthWrite:!1,depthTest:!1})));const w=this._backgroundBox,C=w.material;let E=!1;const B=e.background;B?B.isColor&&(C.color.copy(B),e.background=null,E=!0):(C.color.copy(t1),E=!0);for(let D=0;D<6;D++){const U=D%3;U===0?(d.up.set(0,g[D],0),d.position.set(o.x,o.y,o.z),d.lookAt(o.x+y[D],o.y,o.z)):U===1?(d.up.set(0,0,g[D]),d.position.set(o.x,o.y,o.z),d.lookAt(o.x,o.y+y[D],o.z)):(d.up.set(0,g[D],0),d.position.set(o.x,o.y,o.z),d.lookAt(o.x,o.y,o.z+y[D]));const z=this._cubeSize;td(s,U*z,D>2?z:0,z,z),v.setRenderTarget(s),E&&v.render(w,d),v.render(e,d)}v.toneMapping=S,v.autoClear=x,e.background=B}_textureToCubeUV(e,t){const n=this._renderer,s=e.mapping===ho||e.mapping===Kc;s?(this._cubemapMaterial===null&&(this._cubemapMaterial=s1()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=i1());const o=s?this._cubemapMaterial:this._equirectMaterial,u=this._lodMeshes[0];u.material=o;const h=o.uniforms;h.envMap.value=e;const d=this._cubeSize;td(t,0,0,3*d,2*d),n.setRenderTarget(t),n.render(u,mm)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;const s=this._lodMeshes.length;for(let o=1;o<s;o++)this._applyGGXFilter(e,o-1,o);t.autoClear=n}_applyGGXFilter(e,t,n){const s=this._renderer,o=this._pingPongRenderTarget,u=this._ggxMaterial,h=this._lodMeshes[n];h.material=u;const d=u.uniforms,g=n/(this._lodMeshes.length-1),y=t/(this._lodMeshes.length-1),v=Math.sqrt(g*g-y*y),x=0+g*1.25,S=v*x,{_lodMax:M}=this,w=this._sizeLods[n],C=3*w*(n>M-Wc?n-M+Wc:0),E=4*(this._cubeSize-w);d.envMap.value=e.texture,d.roughness.value=S,d.mipInt.value=M-t,td(o,C,E,3*w,2*w),s.setRenderTarget(o),s.render(h,mm),d.envMap.value=o.texture,d.roughness.value=0,d.mipInt.value=M-n,td(e,C,E,3*w,2*w),s.setRenderTarget(e),s.render(h,mm)}_blur(e,t,n,s,o){const u=this._pingPongRenderTarget;this._halfBlur(e,u,t,n,s,"latitudinal",o),this._halfBlur(u,e,n,n,s,"longitudinal",o)}_halfBlur(e,t,n,s,o,u,h){const d=this._renderer,g=this._blurMaterial;u!=="latitudinal"&&u!=="longitudinal"&&Vt("blur direction must be either latitudinal or longitudinal!");const y=3,v=this._lodMeshes[s];v.material=g;const x=g.uniforms,S=this._sizeLods[n]-1,M=isFinite(o)?Math.PI/(2*S):2*Math.PI/(2*af-1),w=o/M,C=isFinite(o)?1+Math.floor(y*w):af;C>af&&Mt(`sigmaRadians, ${o}, is too large and will clip, as it requested ${C} samples when the maximum is set to ${af}`);const E=[];let B=0;for(let X=0;X<af;++X){const k=X/w,I=Math.exp(-k*k/2);E.push(I),X===0?B+=I:X<C&&(B+=2*I)}for(let X=0;X<E.length;X++)E[X]=E[X]/B;x.envMap.value=e.texture,x.samples.value=C,x.weights.value=E,x.latitudinal.value=u==="latitudinal",h&&(x.poleAxis.value=h);const{_lodMax:D}=this;x.dTheta.value=M,x.mipInt.value=D-n;const U=this._sizeLods[s],z=3*U*(s>D-Wc?s-D+Wc:0),P=4*(this._cubeSize-U);td(t,z,P,3*U,2*U),d.setRenderTarget(t),d.render(v,mm)}}function LL(a){const e=[],t=[],n=[];let s=a;const o=a-Wc+1+e1.length;for(let u=0;u<o;u++){const h=Math.pow(2,s);e.push(h);let d=1/h;u>a-Wc?d=e1[u-a+Wc-1]:u===0&&(d=0),t.push(d);const g=1/(h-2),y=-g,v=1+g,x=[y,y,v,y,v,v,y,y,v,v,y,v],S=6,M=6,w=3,C=2,E=1,B=new Float32Array(w*M*S),D=new Float32Array(C*M*S),U=new Float32Array(E*M*S);for(let P=0;P<S;P++){const X=P%3*2/3-1,k=P>2?0:-1,I=[X,k,0,X+2/3,k,0,X+2/3,k+1,0,X,k,0,X+2/3,k+1,0,X,k+1,0];B.set(I,w*M*P),D.set(x,C*M*P);const O=[P,P,P,P,P,P];U.set(O,E*M*P)}const z=new rn;z.setAttribute("position",new Wn(B,w)),z.setAttribute("uv",new Wn(D,C)),z.setAttribute("faceIndex",new Wn(U,E)),n.push(new wi(z,null)),s>Wc&&s--}return{lodMeshes:n,sizeLods:e,sigmas:t}}function n1(a,e,t){const n=new Sr(a,e,t);return n.texture.mapping=Td,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function td(a,e,t,n,s){a.viewport.set(e,t,n,s),a.scissor.set(e,t,n,s)}function UL(a,e,t){return new br({name:"PMREMGGXConvolution",defines:{GGX_SAMPLES:DL,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${a}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:T_(),fragmentShader:` 3646 3647 precision highp float; 3648 precision highp int; 3649 3650 varying vec3 vOutputDirection; 3651 3652 uniform sampler2D envMap; 3653 uniform float roughness; 3654 uniform float mipInt; 3655 3656 #define ENVMAP_TYPE_CUBE_UV 3657 #include <cube_uv_reflection_fragment> 3658 3659 #define PI 3.14159265359 3660 3661 // Van der Corput radical inverse 3662 float radicalInverse_VdC(uint bits) { 3663 bits = (bits << 16u) | (bits >> 16u); 3664 bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u); 3665 bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u); 3666 bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u); 3667 bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u); 3668 return float(bits) * 2.3283064365386963e-10; // / 0x100000000 3669 } 3670 3671 // Hammersley sequence 3672 vec2 hammersley(uint i, uint N) { 3673 return vec2(float(i) / float(N), radicalInverse_VdC(i)); 3674 } 3675 3676 // GGX VNDF importance sampling (Eric Heitz 2018) 3677 // "Sampling the GGX Distribution of Visible Normals" 3678 // https://jcgt.org/published/0007/04/01/ 3679 vec3 importanceSampleGGX_VNDF(vec2 Xi, vec3 V, float roughness) { 3680 float alpha = roughness * roughness; 3681 3682 // Section 3.2: Transform view direction to hemisphere configuration 3683 vec3 Vh = normalize(vec3(alpha * V.x, alpha * V.y, V.z)); 3684 3685 // Section 4.1: Orthonormal basis 3686 float lensq = Vh.x * Vh.x + Vh.y * Vh.y; 3687 vec3 T1 = lensq > 0.0 ? vec3(-Vh.y, Vh.x, 0.0) / sqrt(lensq) : vec3(1.0, 0.0, 0.0); 3688 vec3 T2 = cross(Vh, T1); 3689 3690 // Section 4.2: Parameterization of projected area 3691 float r = sqrt(Xi.x); 3692 float phi = 2.0 * PI * Xi.y; 3693 float t1 = r * cos(phi); 3694 float t2 = r * sin(phi); 3695 float s = 0.5 * (1.0 + Vh.z); 3696 t2 = (1.0 - s) * sqrt(1.0 - t1 * t1) + s * t2; 3697 3698 // Section 4.3: Reprojection onto hemisphere 3699 vec3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * Vh; 3700 3701 // Section 3.4: Transform back to ellipsoid configuration 3702 return normalize(vec3(alpha * Nh.x, alpha * Nh.y, max(0.0, Nh.z))); 3703 } 3704 3705 void main() { 3706 vec3 N = normalize(vOutputDirection); 3707 vec3 V = N; // Assume view direction equals normal for pre-filtering 3708 3709 vec3 prefilteredColor = vec3(0.0); 3710 float totalWeight = 0.0; 3711 3712 // For very low roughness, just sample the environment directly 3713 if (roughness < 0.001) { 3714 gl_FragColor = vec4(bilinearCubeUV(envMap, N, mipInt), 1.0); 3715 return; 3716 } 3717 3718 // Tangent space basis for VNDF sampling 3719 vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0); 3720 vec3 tangent = normalize(cross(up, N)); 3721 vec3 bitangent = cross(N, tangent); 3722
3723 for(uint i = 0u; i < uint(GGX_SAMPLES); i++) { 3724 vec2 Xi = hammersley(i, uint(GGX_SAMPLES)); 3725 3726 // For PMREM, V = N, so in tangent space V is always (0, 0, 1) 3727 vec3 H_tangent = importanceSampleGGX_VNDF(Xi, vec3(0.0, 0.0, 1.0), roughness); 3728 3729 // Transform H back to world space 3730 vec3 H = normalize(tangent * H_tangent.x + bitangent * H_tangent.y + N * H_tangent.z); 3731 vec3 L = normalize(2.0 * dot(V, H) * H - V); 3732 3733 float NdotL = max(dot(N, L), 0.0); 3734 3735 if(NdotL > 0.0) { 3736 // Sample environment at fixed mip level 3737 // VNDF importance sampling handles the distribution filtering 3738 vec3 sampleColor = bilinearCubeUV(envMap, L, mipInt); 3739 3740 // Weight by NdotL for the split-sum approximation 3741 // VNDF PDF naturally accounts for the visible microfacet distribution 3742 prefilteredColor += sampleColor * NdotL; 3743 totalWeight += NdotL; 3744 } 3745 } 3746 3747 if (totalWeight > 0.0) { 3748 prefilteredColor = prefilteredColor / totalWeight; 3749 } 3750 3751 gl_FragColor = vec4(prefilteredColor, 1.0); 3752 } 3753 `,blending:fo,depthTest:!1,depthWrite:!1})}function NL(a,e,t){const n=new Float32Array(af),s=new K(0,1,0);return new br({name:"SphericalGaussianBlur",defines:{n:af,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${a}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:s}},vertexShader:T_(),fragmentShader:` 3754 3755 precision mediump float; 3756 precision mediump int; 3757 3758 varying vec3 vOutputDirection; 3759 3760 uniform sampler2D envMap; 3761 uniform int samples; 3762 uniform float weights[ n ]; 3763 uniform bool latitudinal; 3764 uniform float dTheta; 3765 uniform float mipInt; 3766 uniform vec3 poleAxis; 3767 3768 #define ENVMAP_TYPE_CUBE_UV 3769 #include <cube_uv_reflection_fragment> 3770 3771 vec3 getSample( float theta, vec3 axis ) { 3772 3773 float cosTheta = cos( theta ); 3774 // Rodrigues' axis-angle rotation 3775 vec3 sampleDirection = vOutputDirection * cosTheta 3776 + cross( axis, vOutputDirection ) * sin( theta ) 3777 + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); 3778 3779 return bilinearCubeUV( envMap, sampleDirection, mipInt ); 3780 3781 } 3782 3783 void main() { 3784 3785 vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); 3786 3787 if ( all( equal( axis, vec3( 0.0 ) ) ) ) { 3788 3789 axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); 3790 3791 } 3792 3793 axis = normalize( axis ); 3794 3795 gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 3796 gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); 3797 3798 for ( int i = 1; i < n; i++ ) { 3799 3800 if ( i >= samples ) { 3801 3802 break; 3803 3804 } 3805 3806 float theta = dTheta * float( i ); 3807 gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); 3808 gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); 3809 3810 } 3811 3812 } 3813 `,blending:fo,depthTest:!1,depthWrite:!1})}function i1(){return new br({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:T_(),fragmentShader:` 3814 3815 precision mediump float; 3816 precision mediump int; 3817 3818 varying vec3 vOutputDirection; 3819 3820 uniform sampler2D envMap; 3821 3822 #include <common> 3823 3824 void main() { 3825 3826 vec3 outputDirection = normalize( vOutputDirection ); 3827 vec2 uv = equirectUv( outputDirection ); 3828 3829 gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); 3830 3831 } 3832 `,blending:fo,depthTest:!1,depthWrite:!1})}function s1(){return new br({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:T_(),fragmentShader:` 3833 3834 precision mediump float; 3835 precision mediump int; 3836 3837 uniform float flipEnvMap; 3838 3839 varying vec3 vOutputDirection; 3840 3841 uniform samplerCube envMap; 3842 3843 void main() { 3844 3845 gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); 3846 3847 } 3848 `,blending:fo,depthTest:!1,depthWrite:!1})}function T_(){return` 3849 3850 precision mediump float; 3851 precision mediump int; 3852 3853 attribute float faceIndex; 3854 3855 varying vec3 vOutputDirection; 3856 3857 // RH coordinate system; PMREM face-indexing convention 3858 vec3 getDirection( vec2 uv, float face ) { 3859 3860 uv = 2.0 * uv - 1.0; 3861 3862 vec3 direction = vec3( uv, 1.0 ); 3863 3864 if ( face == 0.0 ) { 3865 3866 direction = direction.zyx; // ( 1, v, u ) pos x 3867 3868 } else if ( face == 1.0 ) { 3869 3870 direction = direction.xzy; 3871 direction.xz *= -1.0; // ( -u, 1, -v ) pos y 3872 3873 } else if ( face == 2.0 ) { 3874 3875 direction.x *= -1.0; // ( -u, v, 1 ) pos z 3876 3877 } else if ( face == 3.0 ) { 3878 3879 direction = direction.zyx; 3880 direction.xz *= -1.0; // ( -1, v, -u ) neg x 3881 3882 } else if ( face == 4.0 ) { 3883 3884 direction = direction.xzy; 3885 direction.xy *= -1.0; // ( -u, -1, v ) neg y 3886 3887 } else if ( face == 5.0 ) { 3888 3889 direction.z *= -1.0; // ( u, v, -1 ) neg z 3890 3891 } 3892 3893 return direction; 3894 3895 } 3896 3897 void main() { 3898 3899 vOutputDirection = getDirection( uv, faceIndex ); 3900 gl_Position = vec4( position, 1.0 ); 3901 3902 } 3903 `}function FL(a){let e=new WeakMap,t=null;function n(h){if(h&&h.isTexture){const d=h.mapping,g=d===fd||d===Lm,y=d===ho||d===Kc;if(g||y){let v=e.get(h);const x=v!==void 0?v.texture.pmremVersion:0;if(h.isRenderTargetTexture&&h.pmremVersion!==x)return t===null&&(t=new NA(a)),v=g?t.fromEquirectangular(h,v):t.fromCubemap(h,v),v.texture.pmremVersion=h.pmremVersion,e.set(h,v),v.texture;if(v!==void 0)return v.texture;{const S=h.image;return g&&S&&S.height>0||y&&S&&s(S)?(t===null&&(t=new NA(a)),v=g?t.fromEquirectangular(h):t.fromCubemap(h),v.texture.pmremVersion=h.pmremVersion,e.set(h,v),h.addEventListener("dispose",o),v.texture):null}}}return h}function s(h){let d=0;const g=6;for(let y=0;y<g;y++)h[y]!==void 0&&d++;return d===g}function o(h){const d=h.target;d.removeEventListener("dispose",o);const g=e.get(d);g!==void 0&&(e.delete(d),g.dispose())}function u(){e=new WeakMap,t!==null&&(t.dispose(),t=null)}return{get:n,dispose:u}}function OL(a){const e={};function t(n){if(e[n]!==void 0)return e[n];const s=a.getExtension(n);return e[n]=s,s}return{has:function(n){return t(n)!==null},init:function(){t("EXT_color_buffer_float"),t("WEBGL_clip_cull_distance"),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture"),t("WEBGL_render_shared_exponent")},get:function(n){const s=t(n);return s===null&&yd("WebGLRenderer: "+n+" extension not supported."),s}}}function PL(a,e,t,n){const s={},o=new WeakMap;function u(v){const x=v.target;x.index!==null&&e.remove(x.index);for(const M in x.attributes)e.remove(x.attributes[M]);x.removeEventListener("dispose",u),delete s[x.id];const S=o.get(x);S&&(e.remove(S),o.delete(x)),n.releaseStatesOfGeometry(x),x.isInstancedBufferGeometry===!0&&delete x._maxInstanceCount,t.memory.geometries--}function h(v,x){return s[x.id]===!0||(x.addEventListener("dispose",u),s[x.id]=!0,t.memory.geometries++),x}function d(v){const x=v.attributes;for(const S in x)e.update(x[S],a.ARRAY_BUFFER)}function g(v){const x=[],S=v.index,M=v.attributes.position;let w=0;if(S!==null){const B=S.array;w=S.version;for(let D=0,U=B.length;D<U;D+=3){const z=B[D+0],P=B[D+1],X=B[D+2];x.push(z,P,P,X,X,z)}}else if(M!==void 0){const B=M.array;w=M.version;for(let D=0,U=B.length/3-1;D<U;D+=3){const z=D+0,P=D+1,X=D+2;x.push(z,P,P,X,X,z)}}else return;const C=new(LE(x)?uS:cS)(x,1);C.version=w;const E=o.get(v);E&&e.remove(E),o.set(v,C)}function y(v){const x=o.get(v);if(x){const S=v.index;S!==null&&x.version<S.version&&g(v)}else g(v);return o.get(v)}return{get:h,update:d,getWireframeAttribute:y}}function zL(a,e,t){let n;function s(x){n=x}let o,u;function h(x){o=x.type,u=x.bytesPerElement}function d(x,S){a.drawElements(n,S,o,x*u),t.update(S,n,1)}function g(x,S,M){M!==0&&(a.drawElementsInstanced(n,S,o,x*u,M),t.update(S,n,M))}function y(x,S,M){if(M===0)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(n,S,0,o,x,0,M);let C=0;for(let E=0;E<M;E++)C+=S[E];t.update(C,n,1)}function v(x,S,M,w){if(M===0)return;const C=e.get("WEBGL_multi_draw");if(C===null)for(let E=0;E<x.length;E++)g(x[E]/u,S[E],w[E]);
vendor: 20,727 bytes, lines 3903-3984
3903else{C.multiDrawElementsInstancedWEBGL(n,S,0,o,x,0,w,0,M);let E=0;for(let B=0;B<M;B++)E+=S[B]*w[B];t.update(E,n,1)}}this.setMode=s,this.setIndex=h,this.render=d,this.renderInstances=g,this.renderMultiDraw=y,this.renderMultiDrawInstances=v}function GL(a){const e={geometries:0,textures:0},t={frame:0,calls:0,triangles:0,points:0,lines:0};function n(o,u,h){switch(t.calls++,u){case a.TRIANGLES:t.triangles+=h*(o/3);break;case a.LINES:t.lines+=h*(o/2);break;case a.LINE_STRIP:t.lines+=h*(o-1);break;case a.LINE_LOOP:t.lines+=h*o;break;case a.POINTS:t.points+=h*o;break;default:Vt("WebGLInfo: Unknown draw mode:",u);break}}function s(){t.calls=0,t.triangles=0,t.points=0,t.lines=0}return{memory:e,render:t,programs:null,autoReset:!0,reset:s,update:n}}function HL(a,e,t){const n=new WeakMap,s=new li;function o(u,h,d){const g=u.morphTargetInfluences,y=h.morphAttributes.position||h.morphAttributes.normal||h.morphAttributes.color,v=y!==void 0?y.length:0;let x=n.get(h);if(x===void 0||x.count!==v){let I=function(){X.dispose(),n.delete(h),h.removeEventListener("dispose",I)};x!==void 0&&x.texture.dispose();const S=h.morphAttributes.position!==void 0,M=h.morphAttributes.normal!==void 0,w=h.morphAttributes.color!==void 0,C=h.morphAttributes.position||[],E=h.morphAttributes.normal||[],B=h.morphAttributes.color||[];let D=0;S===!0&&(D=1),M===!0&&(D=2),w===!0&&(D=3);let U=h.attributes.position.count*D,z=1;U>e.maxTextureSize&&(z=Math.ceil(U/e.maxTextureSize),U=e.maxTextureSize);const P=new Float32Array(U*z*4*v),X=new n_(P,U,z,v);X.type=Ci,X.needsUpdate=!0;const k=D*4;for(let O=0;O<v;O++){const q=C[O],ie=E[O],j=B[O],re=U*z*4*O;for(let fe=0;fe<q.count;fe++){const Y=fe*k;S===!0&&(s.fromBufferAttribute(q,fe),P[re+Y+0]=s.x,P[re+Y+1]=s.y,P[re+Y+2]=s.z,P[re+Y+3]=0),M===!0&&(s.fromBufferAttribute(ie,fe),P[re+Y+4]=s.x,P[re+Y+5]=s.y,P[re+Y+6]=s.z,P[re+Y+7]=0),w===!0&&(s.fromBufferAttribute(j,fe),P[re+Y+8]=s.x,P[re+Y+9]=s.y,P[re+Y+10]=s.z,P[re+Y+11]=j.itemSize===4?s.w:1)}}x={count:v,texture:X,size:new We(U,z)},n.set(h,x),h.addEventListener("dispose",I)}if(u.isInstancedMesh===!0&&u.morphTexture!==null)d.getUniforms().setValue(a,"morphTexture",u.morphTexture,t);else{let S=0;for(let w=0;w<g.length;w++)S+=g[w];const M=h.morphTargetsRelative?1:1-S;d.getUniforms().setValue(a,"morphTargetBaseInfluence",M),d.getUniforms().setValue(a,"morphTargetInfluences",g)}d.getUniforms().setValue(a,"morphTargetsTexture",x.texture,t),d.getUniforms().setValue(a,"morphTargetsTextureSize",x.size)}return{update:o}}function kL(a,e,t,n){let s=new WeakMap;function o(d){const g=n.render.frame,y=d.geometry,v=e.get(d,y);if(s.get(v)!==g&&(e.update(v),s.set(v,g)),d.isInstancedMesh&&(d.hasEventListener("dispose",h)===!1&&d.addEventListener("dispose",h),s.get(d)!==g&&(t.update(d.instanceMatrix,a.ARRAY_BUFFER),d.instanceColor!==null&&t.update(d.instanceColor,a.ARRAY_BUFFER),s.set(d,g))),d.isSkinnedMesh){const x=d.skeleton;s.get(x)!==g&&(x.update(),s.set(x,g))}return v}function u(){s=new WeakMap}function h(d){const g=d.target;g.removeEventListener("dispose",h),t.remove(g.instanceMatrix),g.instanceColor!==null&&t.remove(g.instanceColor)}return{update:o,dispose:u}}const VL={[KA]:"LINEAR_TONE_MAPPING",[ZA]:"REINHARD_TONE_MAPPING",[QA]:"CINEON_TONE_MAPPING",[Wy]:"ACES_FILMIC_TONE_MAPPING",[$A]:"AGX_TONE_MAPPING",[eS]:"NEUTRAL_TONE_MAPPING",[jA]:"CUSTOM_TONE_MAPPING"};function XL(a,e,t,n,s){const o=new Sr(e,t,{type:a,depthBuffer:n,stencilBuffer:s}),u=new Sr(e,t,{type:Wi,depthBuffer:!1,stencilBuffer:!1}),h=new rn;h.setAttribute("position",new Nt([-1,3,0,-1,-1,0,3,-1,0],3)),h.setAttribute("uv",new Nt([0,2,0,0,2,0],2));const d=new bS({uniforms:{tDiffuse:{value:null}},vertexShader:` 3904 precision highp float; 3905 3906 uniform mat4 modelViewMatrix; 3907 uniform mat4 projectionMatrix; 3908 3909 attribute vec3 position; 3910 attribute vec2 uv; 3911 3912 varying vec2 vUv; 3913 3914 void main() { 3915 vUv = uv; 3916 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 3917 }`,fragmentShader:` 3918 precision highp float; 3919 3920 uniform sampler2D tDiffuse; 3921 3922 varying vec2 vUv; 3923 3924 #include <tonemapping_pars_fragment> 3925 #include <colorspace_pars_fragment> 3926 3927 void main() { 3928 gl_FragColor = texture2D( tDiffuse, vUv ); 3929 3930 #ifdef LINEAR_TONE_MAPPING 3931 gl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb ); 3932 #elif defined( REINHARD_TONE_MAPPING ) 3933 gl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb ); 3934 #elif defined( CINEON_TONE_MAPPING ) 3935 gl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb ); 3936 #elif defined( ACES_FILMIC_TONE_MAPPING ) 3937 gl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb ); 3938 #elif defined( AGX_TONE_MAPPING ) 3939 gl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb ); 3940 #elif defined( NEUTRAL_TONE_MAPPING ) 3941 gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb ); 3942 #elif defined( CUSTOM_TONE_MAPPING ) 3943 gl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb ); 3944 #endif 3945 3946 #ifdef SRGB_TRANSFER 3947 gl_FragColor = sRGBTransferOETF( gl_FragColor ); 3948 #endif 3949 }`,depthTest:!1,depthWrite:!1}),g=new wi(h,d),y=new iu(-1,1,1,-1,0,1);let v=null,x=null,S=!1,M,w=null,C=[],E=!1;this.setSize=function(B,D){o.setSize(B,D),u.setSize(B,D);for(let U=0;U<C.length;U++){const z=C[U];z.setSize&&z.setSize(B,D)}},this.setEffects=function(B){C=B,E=C.length>0&&C[0].isRenderPass===!0;const D=o.width,U=o.height;for(let z=0;z<C.length;z++){const P=C[z];P.setSize&&P.setSize(D,U)}},this.begin=function(B,D){if(S||B.toneMapping===Oa&&C.length===0)return!1;if(w=D,D!==null){const U=D.width,z=D.height;(o.width!==U||o.height!==z)&&this.setSize(U,z)}return E===!1&&B.setRenderTarget(o),M=B.toneMapping,B.toneMapping=Oa,!0},this.hasRenderPass=function(){return E},this.end=function(B,D){B.toneMapping=M,S=!0;let U=o,z=u;for(let P=0;P<C.length;P++){const X=C[P];if(X.enabled!==!1&&(X.render(B,z,U,D),X.needsSwap!==!1)){const k=U;U=z,z=k}}if(v!==B.outputColorSpace||x!==B.toneMapping){v=B.outputColorSpace,x=B.toneMapping,d.defines={},On.getTransfer(v)===$n&&(d.defines.SRGB_TRANSFER="");const P=VL[x];P&&(d.defines[P]=""),d.needsUpdate=!0}d.uniforms.tDiffuse.value=U.texture,B.setRenderTarget(w),B.render(g,y),w=null,S=!1},this.isCompositing=function(){return S},this.dispose=function(){o.dispose(),u.dispose(),h.dispose(),d.dispose()}}const IT=new ei,FA=new Sd(1,1),LT=new n_,UT=new i_,NT=new Qm,r1=[],a1=[],o1=new Float32Array(16),l1=new Float32Array(9),c1=new Float32Array(4);function Bd(a,e,t){const n=a[0];if(n<=0||n>0)return a;const s=e*t;let o=r1[s];if(o===void 0&&(o=new Float32Array(s),r1[s]=o),e!==0){n.toArray(o,0);for(let u=1,h=0;u!==e;++u)h+=t,a[u].toArray(o,h)}return o}function _s(a,e){if(a.length!==e.length)return!1;for(let t=0,n=a.length;t<n;t++)if(a[t]!==e[t])return!1;return!0}function xs(a,e){for(let t=0,n=e.length;t<n;t++)a[t]=e[t]}function C_(a,e){let t=a1[e];t===void 0&&(t=new Int32Array(e),a1[e]=t);for(let n=0;n!==e;++n)t[n]=a.allocateTextureUnit();return t}function WL(a,e){const t=this.cache;t[0]!==e&&(a.uniform1f(this.addr,e),t[0]=e)}function JL(a,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(a.uniform2f(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(_s(t,e))return;a.uniform2fv(this.addr,e),xs(t,e)}}function YL(a,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(a.uniform3f(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else if(e.r!==void 0)(t[0]!==e.r||t[1]!==e.g||t[2]!==e.b)&&(a.uniform3f(this.addr,e.r,e.g,e.b),t[0]=e.r,t[1]=e.g,t[2]=e.b);else{if(_s(t,e))return;a.uniform3fv(this.addr,e),xs(t,e)}}function qL(a,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(a.uniform4f(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(_s(t,e))return;a.uniform4fv(this.addr,e),xs(t,e)}}function KL(a,e){const t=this.cache,n=e.elements;if(n===void 0){if(_s(t,e))return;a.uniformMatrix2fv(this.addr,!1,e),xs(t,e)}else{if(_s(t,n))return;c1.set(n),a.uniformMatrix2fv(this.addr,!1,c1),xs(t,n)}}function ZL(a,e){const t=this.cache,n=e.elements;if(n===void 0){if(_s(t,e))return;a.uniformMatrix3fv(this.addr,!1,e),xs(t,e)}else{if(_s(t,n))return;l1.set(n),a.uniformMatrix3fv(this.addr,!1,l1),xs(t,n)}}function QL(a,e){const t=this.cache,n=e.elements;if(n===void 0){if(_s(t,e))return;a.uniformMatrix4fv(this.addr,!1,e),xs(t,e)}else{if(_s(t,n))return;o1.set(n),a.uniformMatrix4fv(this.addr,!1,o1),xs(t,n)}}function jL(a,e){const t=this.cache;t[0]!==e&&(a.uniform1i(this.addr,e),t[0]=e)}function $L(a,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(a.uniform2i(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(_s(t,e))return;a.uniform2iv(this.addr,e),xs(t,e)}}function eU(a,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(a.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(_s(t,e))return;a.uniform3iv(this.addr,e),xs(t,e)}}function tU(a,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(a.uniform4i(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(_s(t,e))return;a.uniform4iv(this.addr,e),xs(t,e)}}function nU(a,e){const t=this.cache;t[0]!==e&&(a.uniform1ui(this.addr,e),t[0]=e)}function iU(a,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(a.uniform2ui(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(_s(t,e))return;a.uniform2uiv(this.addr,e),xs(t,e)}}function sU(a,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(a.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(_s(t,e))return;a.uniform3uiv(this.addr,e),xs(t,e)}}function rU(a,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(a.uniform4ui(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(_s(t,e))return;a.uniform4uiv(this.addr,e),xs(t,e)}}function aU(a,e,t){const n=this.cache,s=t.allocateTextureUnit();n[0]!==s&&(a.uniform1i(this.addr,s),n[0]=s);let o;this.type===a.SAMPLER_2D_SHADOW?(FA.compareFunction=t.isReversedDepthBuffer()?t_:e_,o=FA):o=IT,t.setTexture2D(e||o,s)}function oU(a,e,t){const n=this.cache,s=t.allocateTextureUnit();n[0]!==s&&(a.uniform1i(this.addr,s),n[0]=s),t.setTexture3D(e||UT,s)}function lU(a,e,t){const n=this.cache,s=t.allocateTextureUnit();n[0]!==s&&(a.uniform1i(this.addr,s),n[0]=s),t.setTextureCube(e||NT,s)}function cU(a,e,t){const n=this.cache,s=t.allocateTextureUnit();n[0]!==s&&(a.uniform1i(this.addr,s),n[0]=s),t.setTexture2DArray(e||LT,s)}function uU(a){switch(a){case 5126:return WL;case 35664:return JL;case 35665:return YL;case 35666:return qL;case 35674:return KL;case 35675:return ZL;case 35676:return QL;case 5124:case 35670:return jL;case 35667:case 35671:return $L;case 35668:case 35672:return eU;case 35669:case 35673:return tU;case 5125:return nU;case 36294:return iU;case 36295:return sU;case 36296:return rU;case 35678:case 36198:case 36298:case 36306:case 35682:return aU;case 35679:case 36299:case 36307:return oU;case 35680:case 36300:case 36308:case 36293:return lU;case 36289:case 36303:case 36311:case 36292:return cU}}function fU(a,e){a.uniform1fv(this.addr,e)}function hU(a,e){const t=Bd(e,this.size,2);a.uniform2fv(this.addr,t)}function dU(a,e){const t=Bd(e,this.size,3);a.uniform3fv(this.addr,t)}function pU(a,e){const t=Bd(e,this.size,4);a.uniform4fv(this.addr,t)}function mU(a,e){const t=Bd(e,this.size,4);a.uniformMatrix2fv(this.addr,!1,t)}function gU(a,e){const t=Bd(e,this.size,9);a.uniformMatrix3fv(this.addr,!1,t)}function vU(a,e){const t=Bd(e,this.size,16);a.uniformMatrix4fv(this.addr,!1,t)}function yU(a,e){a.uniform1iv(this.addr,e)}function _U(a,e){a.uniform2iv(this.addr,e)}function xU(a,e){a.uniform3iv(this.addr,e)}function AU(a,e){a.uniform4iv(this.addr,e)}function SU(a,e){a.uniform1uiv(this.addr,e)}function bU(a,e){a.uniform2uiv(this.addr,e)}function MU(a,e){a.uniform3uiv(this.addr,e)}function EU(a,e){a.uniform4uiv(this.addr,e)}function TU(a,e,t){const n=this.cache,s=e.length,o=C_(t,s);_s(n,o)||(a.uniform1iv(this.addr,o),xs(n,o));let u;this.type===a.SAMPLER_2D_SHADOW?u=FA:u=IT;for(let h=0;h!==s;++h)t.setTexture2D(e[h]||u,o[h])}function CU(a,e,t){const n=this.cache,s=e.length,o=C_(t,s);_s(n,o)||(a.uniform1iv(this.addr,o),xs(n,o));for(let u=0;u!==s;++u)t.setTexture3D(e[u]||UT,o[u])}function wU(a,e,t){const n=this.cache,s=e.length,o=C_(t,s);_s(n,o)||(a.uniform1iv(this.addr,o),xs(n,o));for(let u=0;u!==s;++u)t.setTextureCube(e[u]||NT,o[u])}function RU(a,e,t){const n=this.cache,s=e.length,o=C_(t,s);_s(n,o)||(a.uniform1iv(this.addr,o),xs(n,o));for(let u=0;u!==s;++u)t.setTexture2DArray(e[u]||LT,o[u])}function BU(a){switch(a){case 5126:return fU;case 35664:return hU;case 35665:return dU;case 35666:return pU;case 35674:return mU;case 35675:return gU;case 35676:return vU;case 5124:case 35670:return yU;case 35667:case 35671:return _U;case 35668:case 35672:return xU;case 35669:case 35673:return AU;case 5125:return SU;case 36294:return bU;case 36295:return MU;case 36296:return EU;case 35678:case 36198:case 36298:case 36306:case 35682:return TU;case 35679:case 36299:case 36307:return CU;case 35680:case 36300:case 36308:case 36293:return wU;case 36289:case 36303:case 36311:case 36292:return RU}}class DU{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=uU(t.type)}}class IU{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=BU(t.type)}}class LU{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){const s=this.seq;for(let o=0,u=s.length;o!==u;++o){const h=s[o];h.setValue(e,t[h.id],n)}}}const tA=/(\w+)(\])?(\[|\.)?/g;function u1(a,e){a.seq.push(e),a.map[e.id]=e}function UU(a,e,t){const n=a.name,s=n.length;for(tA.lastIndex=0;;){const o=tA.exec(n),u=tA.lastIndex;let h=o[1];const d=o[2]==="]",g=o[3];if(d&&(h=h|0),g===void 0||g==="["&&u+2===s){u1(t,g===void 0?new DU(h,a,e):new IU(h,a,e));break}else{let v=t.map[h];v===void 0&&(v=new LU(h),u1(t,v)),t=v}}}class Xv{constructor(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let u=0;u<n;++u){const h=e.getActiveUniform(t,u),d=e.getUniformLocation(t,h.name);UU(h,d,this)}const s=[],o=[];for(const u of this.seq)u.type===e.SAMPLER_2D_SHADOW||u.type===e.SAMPLER_CUBE_SHADOW||u.type===e.SAMPLER_2D_ARRAY_SHADOW?s.push(u):o.push(u);s.length>0&&(this.seq=s.concat(o))}setValue(e,t,n,s){const o=this.map[t];o!==void 0&&o.setValue(e,n,s)}setOptional(e,t,n){const s=t[n];s!==void 0&&this.setValue(e,n,s)}static upload(e,t,n,s){for(let o=0,u=t.length;o!==u;++o){const h=t[o],d=n[h.id];d.needsUpdate!==!1&&h.setValue(e,d.value,s)}}static seqWithValue(e,t){const n=[];for(let s=0,o=e.length;s!==o;++s){const u=e[s];u.id in t&&n.push(u)}return n}}function f1(a,e,t){const n=a.createShader(e);return a.shaderSource(n,t),a.compileShader(n),n}const NU=37297;let FU=0;function OU(a,e){const t=a.split(` 3950`),n=[],s=Math.max(e-6,0),o=Math.min(e+6,t.length);for(let u=s;u<o;u++){const h=u+1;n.push(`${h===e?">":" "} ${h}: ${t[u]}`)}return n.join(` 3951`)}const h1=new dn;function PU(a){On._getMatrix(h1,On.workingColorSpace,a);const e=`mat3( ${h1.elements.map(t=>t.toFixed(4))} )`;switch(On.getTransfer(a)){case Nm:return[e,"LinearTransferOETF"];case $n:return[e,"sRGBTransferOETF"];default:return Mt("WebGLProgram: Unsupported color space: ",a),[e,"LinearTransferOETF"]}}function d1(a,e,t){const n=a.getShaderParameter(e,a.COMPILE_STATUS),o=(a.getShaderInfoLog(e)||"").trim();if(n&&o==="")return"";const u=/ERROR: 0:(\d+)/.exec(o);if(u){const h=parseInt(u[1]);return t.toUpperCase()+` 3952 3953`+o+` 3954 3955`+OU(a.getShaderSource(e),h)}else return o}function zU(a,e){const t=PU(e);return[`vec4 ${a}( vec4 value ) {`,` return ${t[1]}( vec4( value.rgb * ${t[0]}, value.a ) );`,"}"].join(` 3956`)}const GU={[KA]:"Linear",[ZA]:"Reinhard",[QA]:"Cineon",[Wy]:"ACESFilmic",[$A]:"AgX",[eS]:"Neutral",[jA]:"Custom"};function HU(a,e){const t=GU[e];return t===void 0?(Mt("WebGLProgram: Unsupported toneMapping:",e),"vec3 "+a+"( vec3 color ) { return LinearToneMapping( color ); }"):"vec3 "+a+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}const Nv=new K;function kU(){On.getLuminanceCoefficients(Nv);const a=Nv.x.toFixed(4),e=Nv.y.toFixed(4),t=Nv.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${a}, ${e}, ${t} );`," return dot( weights, rgb );","}"].join(` 3957`)}function VU(a){return[a.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",a.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Sm).join(` 3958`)}function XU(a){const e=[];for(const t in a){const n=a[t];n!==!1&&e.push("#define "+t+" "+n)}return e.join(` 3959`)}function WU(a,e){const t={},n=a.getProgramParameter(e,a.ACTIVE_ATTRIBUTES);for(let s=0;s<n;s++){const o=a.getActiveAttrib(e,s),u=o.name;let h=1;o.type===a.FLOAT_MAT2&&(h=2),o.type===a.FLOAT_MAT3&&(h=3),o.type===a.FLOAT_MAT4&&(h=4),t[u]={type:o.type,location:a.getAttribLocation(e,u),locationSize:h}}return t}function Sm(a){return a!==""}function p1(a,e){const t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return a.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,t).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function m1(a,e){return a.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const JU=/^[ \t]*#include +<([\w\d./]+)>/gm;function OA(a){return a.replace(JU,qU)}const YU=new Map;function qU(a,e){let t=An[e];if(t===void 0){const n=YU.get(e);if(n!==void 0)t=An[n],Mt('WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,n);else throw new Error("Can not resolve #include <"+e+">")}return OA(t)}const KU=/#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 g1(a){return a.replace(KU,ZU)}function ZU(a,e,t,n){let s="";for(let o=parseInt(e);o<parseInt(t);o++)s+=n.replace(/\[\s*i\s*\]/g,"[ "+o+" ]").replace(/UNROLLED_LOOP_INDEX/g,o);return s}function v1(a){let e=`precision ${a.precision} float; 3960 precision ${a.precision} int; 3961 precision ${a.precision} sampler2D; 3962 precision ${a.precision} samplerCube; 3963 precision ${a.precision} sampler3D; 3964 precision ${a.precision} sampler2DArray; 3965 precision ${a.precision} sampler2DShadow; 3966 precision ${a.precision} samplerCubeShadow; 3967 precision ${a.precision} sampler2DArrayShadow; 3968 precision ${a.precision} isampler2D; 3969 precision ${a.precision} isampler3D; 3970 precision ${a.precision} isamplerCube; 3971 precision ${a.precision} isampler2DArray; 3972 precision ${a.precision} usampler2D; 3973 precision ${a.precision} usampler3D; 3974 precision ${a.precision} usamplerCube; 3975 precision ${a.precision} usampler2DArray; 3976 `;return a.precision==="highp"?e+=` 3977#define HIGH_PRECISION`:a.precision==="mediump"?e+=` 3978#define MEDIUM_PRECISION`:a.precision==="lowp"&&(e+=` 3979#define LOW_PRECISION`),e}const QU={[ad]:"SHADOWMAP_TYPE_PCF",[of]:"SHADOWMAP_TYPE_VSM"};function jU(a){return QU[a.shadowMapType]||"SHADOWMAP_TYPE_BASIC"}const $U={[ho]:"ENVMAP_TYPE_CUBE",[Kc]:"ENVMAP_TYPE_CUBE",[Td]:"ENVMAP_TYPE_CUBE_UV"};function eN(a){return a.envMap===!1?"ENVMAP_TYPE_CUBE":$U[a.envMapMode]||"ENVMAP_TYPE_CUBE"}const tN={[Kc]:"ENVMAP_MODE_REFRACTION"};function nN(a){return a.envMap===!1?"ENVMAP_MODE_REFLECTION":tN[a.envMapMode]||"ENVMAP_MODE_REFLECTION"}const iN={[Ym]:"ENVMAP_BLENDING_MULTIPLY",[yE]:"ENVMAP_BLENDING_MIX",[_E]:"ENVMAP_BLENDING_ADD"};function sN(a){return a.envMap===!1?"ENVMAP_BLENDING_NONE":iN[a.combine]||"ENVMAP_BLENDING_NONE"}function rN(a){const e=a.envMapCubeUVHeight;if(e===null)return null;const t=Math.log2(e)-2,n=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),112)),texelHeight:n,maxMip:t}}function aN(a,e,t,n){const s=a.getContext(),o=t.defines;let u=t.vertexShader,h=t.fragmentShader;const d=jU(t),g=eN(t),y=nN(t),v=sN(t),x=rN(t),S=VU(t),M=XU(o),w=s.createProgram();let C,E,B=t.glslVersion?"#version "+t.glslVersion+` 3980`:"";t.isRawShaderMaterial?(C=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,M].filter(Sm).join(` 3981`),C.length>0&&(C+=` 3982`),E=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,M].filter(Sm).join(` 3983`),E.length>0&&(E+=` 3984`)):(C=[v1(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,M,t.extensionCl
vendor: 6,474 bytes, lines 3984-3986
3984ipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.batchingColor?"#define USE_BATCHING_COLOR":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.instancingMorph?"#define USE_INSTANCING_MORPH":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+y:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+d:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",t.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` 3985`].filter(Sm).join(` 3986`),E=[v1(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,M,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+g:"",t.envMap?"#define "+y:"",t.envMap?"#define "+v:"",x?"#define CUBEUV_TEXEL_WIDTH "+x.texelWidth:"",x?"#define CUBEUV_TEXEL_HEIGHT "+x.texelHeight:"",x?"#define CUBEUV_MAX_MIP "+x.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.dispersion?"#define USE_DISPERSION":"",t.iridescence?"#define USE_IR
3986IDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor||t.batchingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+d:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",t.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",t.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==Oa?"#define TONE_MAPPING":"",t.toneMapping!==Oa?An.tonemapping_pars_fragment:"",t.toneMapping!==Oa?HU("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",An.colorspace_pars_fragment,zU("linearToOutputTexel",t.outputColorSpace),kU(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` 3987`].filter(Sm).join(` 3988`)),u=OA(u),u=p1(u,t),u=m1(u,t),h=OA(h),h=p1(h,t),h=m1(h,t),u=g1(u),h=g1(h),t.isRawShaderMaterial!==!0&&(B=`#version 300 es 3989`,C=[S,"#define attribute in","#define varying out","#define texture2D texture"].join(` 3990`)+` 3991`+C,E=["#define varying in",t.glslVersion===wA?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===wA?"":"#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(` 3992`)+` 3993`+E);const D=B+C+u,U=B+E+h,z=f1(s,s.VERTEX_SHADER,D),P=f1(s,s.FRAGMENT_SHADER,U);s.attachShader(w,z),s.attachShader(w,P),t.index0AttributeName!==void 0?s.bindAttribLocation(w,0,t.index0AttributeName):t.morphTargets===!0&&s.bindAttribLocation(w,0,"position"),s.linkProgram(w);function X(q){if(a.debug.checkShaderErrors){const ie=s.getProgramInfoLog(w)||"",j=s.getShaderInfoLog(z)||"",re=s.getShaderInfoLog(P)||"",fe=ie.trim(),Y=j.trim(),$=re.trim();let pe=!0,Be=!0;if(s.getProgramParameter(w,s.LINK_STATUS)===!1)if(pe=!1,typeof a.debug.onShaderError=="function")a.debug.onShaderError(s,w,z,P);else{const Ae=d1(s,z,"vertex"),De=d1(s,P,"fragment");Vt("THREE.WebGLProgram: Shader Error "+s.getError()+" - VALIDATE_STATUS "+s.getProgramParameter(w,s.VALIDATE_STATUS)+` 3994 3995Material Name: `+q.name+` 3996Material Type: `+q.type+` 3997 3998Program Info Log: `+fe+` 3999`+Ae+` 4000`+De)}else fe!==""?Mt("WebGLProgram: Program Info Log:",fe):(Y===""||$==="")&&(Be=!1);Be&&(q.diagnostics={runnable:pe,programLog:fe,vertexShader:{log:Y,prefix:C},fragmentShader:{log:$,prefix:E}})}s.deleteShader(z),s.deleteShader(P),k=new Xv(s,w),I=WU(s,w)}let k;this.getUniforms=function(){return k===void 0&&X(this),k};let I;this.getAttributes=function(){return I===void 0&&X(this),I};let O=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return O===!1&&(O=s.getProgramParameter(w,NU)),O},this.destroy=function(){n.releaseStatesOfProgram(this),s.deleteProgram(w),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=FU++,this.cacheKey=e,this.usedTimes=1,this.program=w,this.vertexShader=z,this.fragmentShader=P,this}let oN=0;class lN{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,s=this._getShaderStage(t),o=this._getShaderStage(n),u=this._getShaderCacheForMaterial(e);return u.has(s)===!1&&(u.add(s),s.usedTimes++),u.has(o)===!1&&(u.add(o),o.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const n of t)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return n===void 0&&(n=new cN(e),t.set(e,n)),n}}class cN{constructor(e){this.id=oN++,this.code=e,this.usedTimes=0}}function uN(a,e,t,n,s,o,u){const h=new xd,d=new lN,g=new Set,y=[],v=new Map,x=s.logarithmicDepthBuffer;let S=s.precision;const M={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distance",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 w(I){return g.add(I),I===0?"uv":`uv${I}`}function C(I,O,q,ie,j){const re=ie.fog,fe=j.geometry,Y=I.isMeshStandardMaterial?ie.environment:null,$=(I.isMeshStandardMaterial?t:e).get(I.envMap||Y),pe=$&&$.mapping===Td?$.image.height:null,Be=M[I.type];I.precision!==null&&(S=s.getMaxPrecision(I.precision),S!==I.precision&&Mt("WebGLProgram.getParameters:",I.precision,"not supported, using",S,"instead."));const Ae=fe.morphAttributes.position||fe.morphAttributes.normal||fe.morphAttributes.color,De=Ae!==void 0?Ae.length:0;let He=0;fe.morphAttributes.position!==void 0&&(He=1),fe.morphAttributes.normal!==void 0&&(He=2),fe.morphAttributes.color!==void 0&&(He=3);let Ve,bt,qt,me;if(Be){const wn=co[Be];Ve=wn.vertexShader,bt=wn.fragmentShader}else Ve=I.vertexShader,bt=I.fragmentShader,d.update(I),qt=d.getVertexShaderID(I),me=d.getFragmentShaderID(I);const Fe=a.getRenderTarget(),mt=a.state.buffers.depth.getReversed(),It=j.isInstancedMesh===!0,wt=j.isBatchedMesh===!0,an=!!I.map,yn=!!I.matcap,Xt=!!$,Le=!!I.aoMap,Ke=!!I.lightMap,Oe=!!I.bumpMap,dt=!!I.normalMap,Z=!!I.displacementMap,Ot=!!I.emissiveMap,yt=!!I.metalnessMap,Pt=!!I.roughnessMap,it=I.anisotropy>0,J=I.clearcoat>0,N=I.dispersion>0,le=I.iridescence>0,Ee=I.sheen>0,Pe=I.transmission>0,Me=it&&!!I.anisotropyMap,St=J&&!!I.clearcoatMap,ot=J&&!!I.clearcoatNormalMap,Lt=J&&!!I.clearcoatRoughnessMap,Wt=le&&!!I.iridescenceMap,Xe=le&&!!I.iridescenceThicknessMap,Je=Ee&&!!I.sheenColorMap,Et=Ee&&!!I.sheenRoughnessMap,_t=!!I.specularMap,tt=!!I.specularColorMap,Ht=!!I.specularIntensityMap,ce=Pe&&!!I.transmissionMap,Se=Pe&&!!I.thicknessMap,Qe=!!I.gradientMap,At=!!I.alphaMap,Ze=I.alph
vendor: 12,042 bytes, line 4000
4000aTest>0,Ue=!!I.alphaHash,ft=!!I.extensions;let $t=Oa;I.toneMapped&&(Fe===null||Fe.isXRRenderTarget===!0)&&($t=a.toneMapping);const Mn={shaderID:Be,shaderType:I.type,shaderName:I.name,vertexShader:Ve,fragmentShader:bt,defines:I.defines,customVertexShaderID:qt,customFragmentShaderID:me,isRawShaderMaterial:I.isRawShaderMaterial===!0,glslVersion:I.glslVersion,precision:S,batching:wt,batchingColor:wt&&j._colorsTexture!==null,instancing:It,instancingColor:It&&j.instanceColor!==null,instancingMorph:It&&j.morphTexture!==null,outputColorSpace:Fe===null?a.outputColorSpace:Fe.isXRRenderTarget===!0?Fe.texture.colorSpace:po,alphaToCoverage:!!I.alphaToCoverage,map:an,matcap:yn,envMap:Xt,envMapMode:Xt&&$.mapping,envMapCubeUVHeight:pe,aoMap:Le,lightMap:Ke,bumpMap:Oe,normalMap:dt,displacementMap:Z,emissiveMap:Ot,normalMapObjectSpace:dt&&I.normalMapType===TE,normalMapTangentSpace:dt&&I.normalMapType===$c,metalnessMap:yt,roughnessMap:Pt,anisotropy:it,anisotropyMap:Me,clearcoat:J,clearcoatMap:St,clearcoatNormalMap:ot,clearcoatRoughnessMap:Lt,dispersion:N,iridescence:le,iridescenceMap:Wt,iridescenceThicknessMap:Xe,sheen:Ee,sheenColorMap:Je,sheenRoughnessMap:Et,specularMap:_t,specularColorMap:tt,specularIntensityMap:Ht,transmission:Pe,transmissionMap:ce,thicknessMap:Se,gradientMap:Qe,opaque:I.transparent===!1&&I.blending===mf&&I.alphaToCoverage===!1,alphaMap:At,alphaTest:Ze,alphaHash:Ue,combine:I.combine,mapUv:an&&w(I.map.channel),aoMapUv:Le&&w(I.aoMap.channel),lightMapUv:Ke&&w(I.lightMap.channel),bumpMapUv:Oe&&w(I.bumpMap.channel),normalMapUv:dt&&w(I.normalMap.channel),displacementMapUv:Z&&w(I.displacementMap.channel),emissiveMapUv:Ot&&w(I.emissiveMap.channel),metalnessMapUv:yt&&w(I.metalnessMap.channel),roughnessMapUv:Pt&&w(I.roughnessMap.channel),anisotropyMapUv:Me&&w(I.anisotropyMap.channel),clearcoatMapUv:St&&w(I.clearcoatMap.channel),clearcoatNormalMapUv:ot&&w(I.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Lt&&w(I.clearcoatRoughnessMap.channel),iridescenceMapUv:Wt&&w(I.iridescenceMap.channel),iridescenceThicknessMapUv:Xe&&w(I.iridescenceThicknessMap.channel),sheenColorMapUv:Je&&w(I.sheenColorMap.channel),sheenRoughnessMapUv:Et&&w(I.sheenRoughnessMap.channel),specularMapUv:_t&&w(I.specularMap.channel),specularColorMapUv:tt&&w(I.specularColorMap.channel),specularIntensityMapUv:Ht&&w(I.specularIntensityMap.channel),transmissionMapUv:ce&&w(I.transmissionMap.channel),thicknessMapUv:Se&&w(I.thicknessMap.channel),alphaMapUv:At&&w(I.alphaMap.channel),vertexTangents:!!fe.attributes.tangent&&(dt||it),vertexColors:I.vertexColors,vertexAlphas:I.vertexColors===!0&&!!fe.attributes.color&&fe.attributes.color.itemSize===4,pointsUvs:j.isPoints===!0&&!!fe.attributes.uv&&(an||At),fog:!!re,useFog:I.fog===!0,fogExp2:!!re&&re.isFogExp2,flatShading:I.flatShading===!0&&I.wireframe===!1,sizeAttenuation:I.sizeAttenuation===!0,logarithmicDepthBuffer:x,reversedDepthBuffer:mt,skinning:j.isSkinnedMesh===!0,morphTargets:fe.morphAttributes.position!==void 0,morphNormals:fe.morphAttributes.normal!==void 0,morphColors:fe.morphAttributes.color!==void 0,morphTargetsCount:De,morphTextureStride:He,numDirLights:O.directional.length,numPointLights:O.point.length,numSpotLights:O.spot.length,numSpotLightMaps:O.spotLightMap.length,numRectAreaLights:O.rectArea.length,numHemiLights:O.hemi.length,numDirLightShadows:O.directionalShadowMap.length,numPointLightShadows:O.pointShadowMap.length,numSpotLightShadows:O.spotShadowMap.length,numSpotLightShadowsWithMaps:O.numSpotLightShadowsWithMaps,numLightProbes:O.numLightProbes,numClippingPlanes:u.numPlanes,numClipIntersection:u.numIntersection,dithering:I.dithering,shadowMapEnabled:a.shadowMap.enabled&&q.length>0,shadowMapType:a.shadowMap.type,toneMapping:$t,decodeVideoTexture:an&&I.map.isVideoTexture===!0&&On.getTransfer(I.map.colorSpace)===$n,decodeVideoTextureEmissive:Ot&&I.emissiveMap.isVideoTexture===!0&&On.getTransfer(I.emissiveMap.colorSpace)===$n,premultipliedAlpha:I.premultipliedAlpha,doubleSided:I.side===Ua,flipSided:I.side===Ar,useDepthPacking:I.depthPacking>=0,depthPacking:I.depthPacking||0,index0AttributeName:I.index0AttributeName,extensionClipCullDistance:ft&&I.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ft&&I.extensions.multiDraw===!0||wt)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:I.customProgramCacheKey()};return Mn.vertexUv1s=g.has(1),Mn.vertexUv2s=g.has(2),Mn.vertexUv3s=g.has(3),g.clear(),Mn}function E(I){const O=[];if(I.shaderID?O.push(I.shaderID):(O.push(I.customVertexShaderID),O.push(I.customFragmentShaderID)),I.defines!==void 0)for(const q in I.defines)O.push(q),O.push(I.defines[q]);return I.isRawShaderMaterial===!1&&(B(O,I),D(O,I),O.push(a.outputColorSpace)),O.push(I.customProgramCacheKey),O.join()}function B(I,O){I.push(O.precision),I.push(O.outputColorSpace),I.push(O.envMapMode),I.push(O.envMapCubeUVHeight),I.push(O.mapUv),I.push(O.alphaMapUv),I.push(O.lightMapUv),I.push(O.aoMapUv),I.push(O.bumpMapUv),I.push(O.normalMapUv),I.push(O.displacementMapUv),I.push(O.emissiveMapUv),I.push(O.metalnessMapUv),I.push(O.roughnessMapUv),I.push(O.anisotropyMapUv),I.push(O.clearcoatMapUv),I.push(O.clearcoatNormalMapUv),I.push(O.clearcoatRoughnessMapUv),I.push(O.iridescenceMapUv),I.push(O.iridescenceThicknessMapUv),I.push(O.sheenColorMapUv),I.push(O.sheenRoughnessMapUv),I.push(O.specularMapUv),I.push(O.specularColorMapUv),I.push(O.specularIntensityMapUv),I.push(O.transmissionMapUv),I.push(O.thicknessMapUv),I.push(O.combine),I.push(O.fogExp2),I.push(O.sizeAttenuation),I.push(O.morphTargetsCount),I.push(O.morphAttributeCount),I.push(O.numDirLights),I.push(O.numPointLights),I.push(O.numSpotLights),I.push(O.numSpotLightMaps),I.push(O.numHemiLights),I.push(O.numRectAreaLights),I.push(O.numDirLightShadows),I.push(O.numPointLightShadows),I.push(O.numSpotLightShadows),I.push(O.numSpotLightShadowsWithMaps),I.push(O.numLightProbes),I.push(O.shadowMapType),I.push(O.toneMapping),I.push(O.numClippingPlanes),I.push(O.numClipIntersection),I.push(O.depthPacking)}function D(I,O){h.disableAll(),O.instancing&&h.enable(0),O.instancingColor&&h.enable(1),O.instancingMorph&&h.enable(2),O.matcap&&h.enable(3),O.envMap&&h.enable(4),O.normalMapObjectSpace&&h.enable(5),O.normalMapTangentSpace&&h.enable(6),O.clearcoat&&h.enable(7),O.iridescence&&h.enable(8),O.alphaTest&&h.enable(9),O.vertexColors&&h.enable(10),O.vertexAlphas&&h.enable(11),O.vertexUv1s&&h.enable(12),O.vertexUv2s&&h.enable(13),O.vertexUv3s&&h.enable(14),O.vertexTangents&&h.enable(15),O.anisotropy&&h.enable(16),O.alphaHash&&h.enable(17),O.batching&&h.enable(18),O.dispersion&&h.enable(19),O.batchingColor&&h.enable(20),O.gradientMap&&h.enable(21),I.push(h.mask),h.disableAll(),O.fog&&h.enable(0),O.useFog&&h.enable(1),O.flatShading&&h.enable(2),O.logarithmicDepthBuffer&&h.enable(3),O.reversedDepthBuffer&&h.enable(4),O.skinning&&h.enable(5),O.morphTargets&&h.enable(6),O.morphNormals&&h.enable(7),O.morphColors&&h.enable(8),O.premultipliedAlpha&&h.enable(9),O.shadowMapEnabled&&h.enable(10),O.doubleSided&&h.enable(11),O.flipSided&&h.enable(12),O.useDepthPacking&&h.enable(13),O.dithering&&h.enable(14),O.transmission&&h.enable(15),O.sheen&&h.enable(16),O.opaque&&h.enable(17),O.pointsUvs&&h.enable(18),O.decodeVideoTexture&&h.enable(19),O.decodeVideoTextureEmissive&&h.enable(20),O.alphaToCoverage&&h.enable(21),I.push(h.mask)}function U(I){const O=M[I.type];let q;if(O){const ie=co[O];q=GE.clone(ie.uniforms)}else q=I.uniforms;return q}function z(I,O){let q=v.get(O);return q!==void 0?++q.usedTimes:(q=new aN(a,O,I,o),y.push(q),v.set(O,q)),q}function P(I){if(--I.usedTimes===0){const O=y.indexOf(I);y[O]=y[y.length-1],y.pop(),v.delete(I.cacheKey),I.destroy()}}function X(I){d.remove(I)}function k(){d.dispose()}return{getParameters:C,getProgramCacheKey:E,getUniforms:U,acquireProgram:z,releaseProgram:P,releaseShaderCache:X,programs:y,dispose:k}}function fN(){let a=new WeakMap;function e(u){return a.has(u)}function t(u){let h=a.get(u);return h===void 0&&(h={},a.set(u,h)),h}function n(u){a.delete(u)}function s(u,h,d){a.get(u)[h]=d}function o(){a=new WeakMap}return{has:e,get:t,remove:n,update:s,dispose:o}}function hN(a,e){return a.groupOrder!==e.groupOrder?a.groupOrder-e.groupOrder:a.renderOrder!==e.renderOrder?a.renderOrder-e.renderOrder:a.material.id!==e.material.id?a.material.id-e.material.id:a.z!==e.z?a.z-e.z:a.id-e.id}function y1(a,e){return a.groupOrder!==e.groupOrder?a.groupOrder-e.groupOrder:a.renderOrder!==e.renderOrder?a.renderOrder-e.renderOrder:a.z!==e.z?e.z-a.z:a.id-e.id}function _1(){const a=[];let e=0;const t=[],n=[],s=[];function o(){e=0,t.length=0,n.length=0,s.length=0}function u(v,x,S,M,w,C){let E=a[e];return E===void 0?(E={id:v.id,object:v,geometry:x,material:S,groupOrder:M,renderOrder:v.renderOrder,z:w,group:C},a[e]=E):(E.id=v.id,E.object=v,E.geometry=x,E.material=S,E.groupOrder=M,E.renderOrder=v.renderOrder,E.z=w,E.group=C),e++,E}function h(v,x,S,M,w,C){const E=u(v,x,S,M,w,C);S.transmission>0?n.push(E):S.transparent===!0?s.push(E):t.push(E)}function d(v,x,S,M,w,C){const E=u(v,x,S,M,w,C);S.transmission>0?n.unshift(E):S.transparent===!0?s.unshift(E):t.unshift(E)}function g(v,x){t.length>1&&t.sort(v||hN),n.length>1&&n.sort(x||y1),s.length>1&&s.sort(x||y1)}function y(){for(let v=e,x=a.length;v<x;v++){const S=a[v];if(S.id===null)break;S.id=null,S.object=null,S.geometry=null,S.material=null,S.group=null}}return{opaque:t,transmissive:n,transparent:s,init:o,push:h,unshift:d,finish:y,sort:g}}function dN(){let a=new WeakMap;function e(n,s){const o=a.get(n);let u;return o===void 0?(u=new _1,a.set(n,[u])):s>=o.length?(u=new _1,o.push(u)):u=o[s],u}function t(){a=new WeakMap}return{get:e,dispose:t}}function pN(){const a={};return{get:function(e){if(a[e.id]!==void 0)return a[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new K,color:new Tt};break;case"SpotLight":t={position:new K,direction:new K,color:new Tt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new K,color:new Tt,distance:0,decay:0};break;case"HemisphereLight":t={direction:new K,skyColor:new Tt,groundColor:new Tt};break;case"RectAreaLight":t={color:new Tt,position:new K,halfWidth:new K,halfHeight:new K};break}return a[e.id]=t,t}}}function mN(){const a={};return{get:function(e){if(a[e.id]!==void 0)return a[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new We};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new We};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new We,shadowCameraNear:1,shadowCameraFar:1e3};break}return a[e.id]=t,t}}}let gN=0;function vN(a,e){return(e.castShadow?2:0)-(a.castShadow?2:0)+(e.map?1:0)-(a.map?1:0)}function yN(a){const e=new pN,t=mN(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let g=0;g<9;g++)n.probe.push(new K);const s=new K,o=new jt,u=new jt;function h(g){let y=0,v=0,x=0;for(let I=0;I<9;I++)n.probe[I].set(0,0,0);let S=0,M=0,w=0,C=0,E=0,B=0,D=0,U=0,z=0,P=0,X=0;g.sort(vN);for(let I=0,O=g.length;I<O;I++){const q=g[I],ie=q.color,j=q.intensity,re=q.distance;let fe=null;if(q.shadow&&q.shadow.map&&(q.shadow.map.texture.format===_f?fe=q.shadow.map.texture:fe=q.shadow.map.depthTexture||q.shadow.map.texture),q.isAmbientLight)y+=ie.r*j,v+=ie.g*j,x+=ie.b*j;else if(q.isLightProbe){for(let Y=0;Y<9;Y++)n.probe[Y].addScaledVector(q.sh.coefficients[Y],j);X++}
vendor: 4,591 bytes, line 4000
4000else if(q.isDirectionalLight){const Y=e.get(q);if(Y.color.copy(q.color).multiplyScalar(q.intensity),q.castShadow){const $=q.shadow,pe=t.get(q);pe.shadowIntensity=$.intensity,pe.shadowBias=$.bias,pe.shadowNormalBias=$.normalBias,pe.shadowRadius=$.radius,pe.shadowMapSize=$.mapSize,n.directionalShadow[S]=pe,n.directionalShadowMap[S]=fe,n.directionalShadowMatrix[S]=q.shadow.matrix,B++}n.directional[S]=Y,S++}else if(q.isSpotLight){const Y=e.get(q);Y.position.setFromMatrixPosition(q.matrixWorld),Y.color.copy(ie).multiplyScalar(j),Y.distance=re,Y.coneCos=Math.cos(q.angle),Y.penumbraCos=Math.cos(q.angle*(1-q.penumbra)),Y.decay=q.decay,n.spot[w]=Y;const $=q.shadow;if(q.map&&(n.spotLightMap[z]=q.map,z++,$.updateMatrices(q),q.castShadow&&P++),n.spotLightMatrix[w]=$.matrix,q.castShadow){const pe=t.get(q);pe.shadowIntensity=$.intensity,pe.shadowBias=$.bias,pe.shadowNormalBias=$.normalBias,pe.shadowRadius=$.radius,pe.shadowMapSize=$.mapSize,n.spotShadow[w]=pe,n.spotShadowMap[w]=fe,U++}w++}else if(q.isRectAreaLight){const Y=e.get(q);Y.color.copy(ie).multiplyScalar(j),Y.halfWidth.set(q.width*.5,0,0),Y.halfHeight.set(0,q.height*.5,0),n.rectArea[C]=Y,C++}else if(q.isPointLight){const Y=e.get(q);if(Y.color.copy(q.color).multiplyScalar(q.intensity),Y.distance=q.distance,Y.decay=q.decay,q.castShadow){const $=q.shadow,pe=t.get(q);pe.shadowIntensity=$.intensity,pe.shadowBias=$.bias,pe.shadowNormalBias=$.normalBias,pe.shadowRadius=$.radius,pe.shadowMapSize=$.mapSize,pe.shadowCameraNear=$.camera.near,pe.shadowCameraFar=$.camera.far,n.pointShadow[M]=pe,n.pointShadowMap[M]=fe,n.pointShadowMatrix[M]=q.shadow.matrix,D++}n.point[M]=Y,M++}else if(q.isHemisphereLight){const Y=e.get(q);Y.skyColor.copy(q.color).multiplyScalar(j),Y.groundColor.copy(q.groundColor).multiplyScalar(j),n.hemi[E]=Y,E++}}C>0&&(a.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=Ct.LTC_FLOAT_1,n.rectAreaLTC2=Ct.LTC_FLOAT_2):(n.rectAreaLTC1=Ct.LTC_HALF_1,n.rectAreaLTC2=Ct.LTC_HALF_2)),n.ambient[0]=y,n.ambient[1]=v,n.ambient[2]=x;const k=n.hash;(k.directionalLength!==S||k.pointLength!==M||k.spotLength!==w||k.rectAreaLength!==C||k.hemiLength!==E||k.numDirectionalShadows!==B||k.numPointShadows!==D||k.numSpotShadows!==U||k.numSpotMaps!==z||k.numLightProbes!==X)&&(n.directional.length=S,n.spot.length=w,n.rectArea.length=C,n.point.length=M,n.hemi.length=E,n.directionalShadow.length=B,n.directionalShadowMap.length=B,n.pointShadow.length=D,n.pointShadowMap.length=D,n.spotShadow.length=U,n.spotShadowMap.length=U,n.directionalShadowMatrix.length=B,n.pointShadowMatrix.length=D,n.spotLightMatrix.length=U+z-P,n.spotLightMap.length=z,n.numSpotLightShadowsWithMaps=P,n.numLightProbes=X,k.directionalLength=S,k.pointLength=M,k.spotLength=w,k.rectAreaLength=C,k.hemiLength=E,k.numDirectionalShadows=B,k.numPointShadows=D,k.numSpotShadows=U,k.numSpotMaps=z,k.numLightProbes=X,n.version=gN++)}function d(g,y){let v=0,x=0,S=0,M=0,w=0;const C=y.matrixWorldInverse;for(let E=0,B=g.length;E<B;E++){const D=g[E];if(D.isDirectionalLight){const U=n.directional[v];U.direction.setFromMatrixPosition(D.matrixWorld),s.setFromMatrixPosition(D.target.matrixWorld),U.direction.sub(s),U.direction.transformDirection(C),v++}else if(D.isSpotLight){const U=n.spot[S];U.position.setFromMatrixPosition(D.matrixWorld),U.position.applyMatrix4(C),U.direction.setFromMatrixPosition(D.matrixWorld),s.setFromMatrixPosition(D.target.matrixWorld),U.direction.sub(s),U.direction.transformDirection(C),S++}else if(D.isRectAreaLight){const U=n.rectArea[M];U.position.setFromMatrixPosition(D.matrixWorld),U.position.applyMatrix4(C),u.identity(),o.copy(D.matrixWorld),o.premultiply(C),u.extractRotation(o),U.halfWidth.set(D.width*.5,0,0),U.halfHeight.set(0,D.height*.5,0),U.halfWidth.applyMatrix4(u),U.halfHeight.applyMatrix4(u),M++}else if(D.isPointLight){const U=n.point[x];U.position.setFromMatrixPosition(D.matrixWorld),U.position.applyMatrix4(C),x++}else if(D.isHemisphereLight){const U=n.hemi[w];U.direction.setFromMatrixPosition(D.matrixWorld),U.direction.transformDirection(C),w++}}}return{setup:h,setupView:d,state:n}}function x1(a){const e=new yN(a),t=[],n=[];function s(y){g.camera=y,t.length=0,n.length=0}function o(y){t.push(y)}function u(y){n.push(y)}function h(){e.setup(t)}function d(y){e.setupView(t,y)}const g={lightsArray:t,shadowsArray:n,camera:null,lights:e,transmissionRenderTarget:{}};return{init:s,state:g,setupLights:h,setupLightsView:d,pushLight:o,pushShadow:u}}function _N(a){let e=new WeakMap;function t(s,o=0){const u=e.get(s);let h;return u===void 0?(h=new x1(a),e.set(s,[h])):o>=u.length?(h=new x1(a),u.push(h)):h=u[o],h}
vendor: 108,131 bytes, lines 4000-4051
4000function n(){e=new WeakMap}return{get:t,dispose:n}}const xN=`void main() { 4001 gl_Position = vec4( position, 1.0 ); 4002}`,AN=`uniform sampler2D shadow_pass; 4003uniform vec2 resolution; 4004uniform float radius; 4005void main() { 4006 const float samples = float( VSM_SAMPLES ); 4007 float mean = 0.0; 4008 float squared_mean = 0.0; 4009 float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); 4010 float uvStart = samples <= 1.0 ? 0.0 : - 1.0; 4011 for ( float i = 0.0; i < samples; i ++ ) { 4012 float uvOffset = uvStart + i * uvStride; 4013 #ifdef HORIZONTAL_PASS 4014 vec2 distribution = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ).rg; 4015 mean += distribution.x; 4016 squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; 4017 #else 4018 float depth = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ).r; 4019 mean += depth; 4020 squared_mean += depth * depth; 4021 #endif 4022 } 4023 mean = mean / samples; 4024 squared_mean = squared_mean / samples; 4025 float std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) ); 4026 gl_FragColor = vec4( mean, std_dev, 0.0, 1.0 ); 4027}`,SN=[new K(1,0,0),new K(-1,0,0),new K(0,1,0),new K(0,-1,0),new K(0,0,1),new K(0,0,-1)],bN=[new K(0,-1,0),new K(0,-1,0),new K(0,0,1),new K(0,0,-1),new K(0,-1,0),new K(0,-1,0)],A1=new jt,gm=new K,nA=new K;function MN(a,e,t){let n=new wd;const s=new We,o=new We,u=new li,h=new MS,d=new ES,g={},y=t.maxTextureSize,v={[Zo]:Ar,[Ar]:Zo,[Ua]:Ua},x=new br({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new We},radius:{value:4}},vertexShader:xN,fragmentShader:AN}),S=x.clone();S.defines.HORIZONTAL_PASS=1;const M=new rn;M.setAttribute("position",new Wn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const w=new wi(M,x),C=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=ad;let E=this.type;this.render=function(P,X,k){if(C.enabled===!1||C.autoUpdate===!1&&C.needsUpdate===!1||P.length===0)return;P.type===bm&&(Mt("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."),P.type=ad);const I=a.getRenderTarget(),O=a.getActiveCubeFace(),q=a.getActiveMipmapLevel(),ie=a.state;ie.setBlending(fo),ie.buffers.depth.getReversed()===!0?ie.buffers.color.setClear(0,0,0,0):ie.buffers.color.setClear(1,1,1,1),ie.buffers.depth.setTest(!0),ie.setScissorTest(!1);const j=E!==this.type;j&&X.traverse(function(re){re.material&&(Array.isArray(re.material)?re.material.forEach(fe=>fe.needsUpdate=!0):re.material.needsUpdate=!0)});for(let re=0,fe=P.length;re<fe;re++){const Y=P[re],$=Y.shadow;if($===void 0){Mt("WebGLShadowMap:",Y,"has no shadow.");continue}if($.autoUpdate===!1&&$.needsUpdate===!1)continue;s.copy($.mapSize);const pe=$.getFrameExtents();if(s.multiply(pe),o.copy($.mapSize),(s.x>y||s.y>y)&&(s.x>y&&(o.x=Math.floor(y/pe.x),s.x=o.x*pe.x,$.mapSize.x=o.x),s.y>y&&(o.y=Math.floor(y/pe.y),s.y=o.y*pe.y,$.mapSize.y=o.y)),$.map===null||j===!0){if($.map!==null&&($.map.depthTexture!==null&&($.map.depthTexture.dispose(),$.map.depthTexture=null),$.map.dispose()),this.type===of){if(Y.isPointLight){Mt("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");continue}$.map=new Sr(s.x,s.y,{format:_f,type:Wi,minFilter:Un,magFilter:Un,generateMipmaps:!1}),$.map.texture.name=Y.name+".shadowMap",$.map.depthTexture=new Sd(s.x,s.y,Ci),$.map.depthTexture.name=Y.name+".shadowMapDepth",$.map.depthTexture.format=Qo,$.map.depthTexture.compareFunction=null,$.map.depthTexture.minFilter=Xi,$.map.depthTexture.magFilter=Xi}else{Y.isPointLight?($.map=new r_(s.x),$.map.depthTexture=new YE(s.x,ia)):($.map=new Sr(s.x,s.y),$.map.depthTexture=new Sd(s.x,s.y,ia)),$.map.depthTexture.name=Y.name+".shadowMap",$.map.depthTexture.format=Qo;const Ae=a.state.buffers.depth.getReversed();this.type===ad?($.map.depthTexture.compareFunction=Ae?t_:e_,$.map.depthTexture.minFilter=Un,$.map.depthTexture.magFilter=Un):($.map.depthTexture.compareFunction=null,$.map.depthTexture.minFilter=Xi,$.map.depthTexture.magFilter=Xi)}$.camera.updateProjectionMatrix()}const Be=$.map.isWebGLCubeRenderTarget?6:1;for(let Ae=0;Ae<Be;Ae++){if($.map.isWebGLCubeRenderTarget)a.setRenderTarget($.map,Ae),a.clear();else{Ae===0&&(a.setRenderTarget($.map),a.clear());const De=$.getViewport(Ae);u.set(o.x*De.x,o.y*De.y,o.x*De.z,o.y*De.w),ie.viewport(u)}if(Y.isPointLight){const De=$.camera,He=$.matrix,Ve=Y.distance||De.far;Ve!==De.far&&(De.far=Ve,De.updateProjectionMatrix()),gm.setFromMatrixPosition(Y.matrixWorld),De.position.copy(gm),nA.copy(De.position),nA.add(SN[Ae]),De.up.copy(bN[Ae]),De.lookAt(nA),De.updateMatrixWorld(),He.makeTranslation(-gm.x,-gm.y,-gm.z),A1.multiplyMatrices(De.projectionMatrix,De.matrixWorldInverse),$._frustum.setFromProjectionMatrix(A1,De.coordinateSystem,De.reversedDepth)}else $.updateMatrices(Y);n=$.getFrustum(),U(X,k,$.camera,Y,this.type)}$.isPointLightShadow!==!0&&this.type===of&&B($,k),$.needsUpdate=!1}E=this.type,C.needsUpdate=!1,a.setRenderTarget(I,O,q)};function B(P,X){const k=e.update(w);x.defines.VSM_SAMPLES!==P.blurSamples&&(x.defines.VSM_SAMPLES=P.blurSamples,S.defines.VSM_SAMPLES=P.blurSamples,x.needsUpdate=!0,S.needsUpdate=!0),P.mapPass===null&&(P.mapPass=new Sr(s.x,s.y,{format:_f,type:Wi})),x.uniforms.shadow_pass.value=P.map.depthTexture,x.uniforms.resolution.value=P.mapSize,x.uniforms.radius.value=P.radius,a.setRenderTarget(P.mapPass),a.clear(),a.renderBufferDirect(X,null,k,x,w,null),S.uniforms.shadow_pass.value=P.mapPass.texture,S.uniforms.resolution.value=P.mapSize,S.uniforms.radius.value=P.radius,a.setRenderTarget(P.map),a.clear(),a.renderBufferDirect(X,null,k,S,w,null)}function D(P,X,k,I){let O=null;const q=k.isPointLight===!0?P.customDistanceMaterial:P.customDepthMaterial;if(q!==void 0)O=q;else if(O=k.isPointLight===!0?d:h,a.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||X.alphaToCoverage===!0){const ie=O.uuid,j=X.uuid;let re=g[ie];re===void 0&&(re={},g[ie]=re);let fe=re[j];fe===void 0&&(fe=O.clone(),re[j]=fe,X.addEventListener("dispose",z)),O=fe}if(O.visible=X.visible,O.wireframe=X.wireframe,I===of?O.side=X.shadowSide!==null?X.shadowSide:X.side:O.side=X.shadowSide!==null?X.shadowSide:v[X.side],O.alphaMap=X.alphaMap,O.alphaTest=X.alphaToCoverage===!0?.5:X.alphaTest,O.map=X.map,O.clipShadows=X.clipShadows,O.clippingPlanes=X.clippingPlanes,O.clipIntersection=X.clipIntersection,O.displacementMap=X.displacementMap,O.displacementScale=X.displacementScale,O.displacementBias=X.displacementBias,O.wireframeLinewidth=X.wireframeLinewidth,O.linewidth=X.linewidth,k.isPointLight===!0&&O.isMeshDistanceMaterial===!0){const ie=a.properties.get(O);ie.light=k}return O}function U(P,X,k,I,O){if(P.visible===!1)return;if(P.layers.test(X.layers)&&(P.isMesh||P.isLine||P.isPoints)&&(P.castShadow||P.receiveShadow&&O===of)&&(!P.frustumCulled||n.intersectsObject(P))){P.modelViewMatrix.multiplyMatrices(k.matrixWorldInverse,P.matrixWorld);const j=e.update(P),re=P.material;if(Array.isArray(re)){const fe=j.groups;for(let Y=0,$=fe.length;Y<$;Y++){const pe=fe[Y],Be=re[pe.materialIndex];if(Be&&Be.visible){const Ae=D(P,Be,I,O);P.onBeforeShadow(a,P,X,k,j,Ae,pe),a.renderBufferDirect(k,null,j,Ae,P,pe),P.onAfterShadow(a,P,X,k,j,Ae,pe)}}}else if(re.visible){const fe=D(P,re,I,O);P.onBeforeShadow(a,P,X,k,j,fe,null),a.renderBufferDirect(k,null,j,fe,P,null),P.onAfterShadow(a,P,X,k,j,fe,null)}}const ie=P.children;for(let j=0,re=ie.length;j<re;j++)U(ie[j],X,k,I,O)}function z(P){P.target.removeEventListener("dispose",z);for(const k in g){const I=g[k],O=P.target.uuid;O in I&&(I[O].dispose(),delete I[O])}}}const EN={[qv]:Kv,[Zv]:$v,[Qv]:ey,[yf]:jv,[Kv]:qv,[$v]:Zv,[ey]:Qv,[jv]:yf};function TN(a,e){function t(){let ce=!1;const Se=new li;let Qe=null;const At=new li(0,0,0,0);return{setMask:function(Ze){Qe!==Ze&&!ce&&(a.colorMask(Ze,Ze,Ze,Ze),Qe=Ze)},setLocked:function(Ze){ce=Ze},setClear:function(Ze,Ue,ft,$t,Mn){Mn===!0&&(Ze*=$t,Ue*=$t,ft*=$t),Se.set(Ze,Ue,ft,$t),At.equals(Se)===!1&&(a.clearColor(Ze,Ue,ft,$t),At.copy(Se))},reset:function(){ce=!1,Qe=null,At.set(-1,0,0,0)}}}function n(){let ce=!1,Se=!1,Qe=null,At=null,Ze=null;return{setReversed:function(Ue){if(Se!==Ue){const ft=e.get("EXT_clip_control");Ue?ft.clipControlEXT(ft.LOWER_LEFT_EXT,ft.ZERO_TO_ONE_EXT):ft.clipControlEXT(ft.LOWER_LEFT_EXT,ft.NEGATIVE_ONE_TO_ONE_EXT),Se=Ue;const $t=Ze;Ze=null,this.setClear($t)}},getReversed:function(){return Se},setTest:function(Ue){Ue?Fe(a.DEPTH_TEST):mt(a.DEPTH_TEST)},setMask:function(Ue){Qe!==Ue&&!ce&&(a.depthMask(Ue),Qe=Ue)},setFunc:function(Ue){if(Se&&(Ue=EN[Ue]),At!==Ue){switch(Ue){case qv:a.depthFunc(a.NEVER);break;case Kv:a.depthFunc(a.ALWAYS);break;case Zv:a.depthFunc(a.LESS);break;case yf:a.depthFunc(a.LEQUAL);break;case Qv:a.depthFunc(a.EQUAL);break;case jv:a.depthFunc(a.GEQUAL);break;case $v:a.depthFunc(a.GREATER);break;case ey:a.depthFunc(a.NOTEQUAL);break;default:a.depthFunc(a.LEQUAL)}At=Ue}},setLocked:function(Ue){ce=Ue},setClear:function(Ue){Ze!==Ue&&(Se&&(Ue=1-Ue),a.clearDepth(Ue),Ze=Ue)},reset:function(){ce=!1,Qe=null,At=null,Ze=null,Se=!1}}}function s(){let ce=!1,Se=null,Qe=null,At=null,Ze=null,Ue=null,ft=null,$t=null,Mn=null;return{setTest:function(wn){ce||(wn?Fe(a.STENCIL_TEST):mt(a.STENCIL_TEST))},setMask:function(wn){Se!==wn&&!ce&&(a.stencilMask(wn),Se=wn)},setFunc:function(wn,Ji,As){(Qe!==wn||At!==Ji||Ze!==As)&&(a.stencilFunc(wn,Ji,As),Qe=wn,At=Ji,Ze=As)},setOp:function(wn,Ji,As){(Ue!==wn||ft!==Ji||$t!==As)&&(a.stencilOp(wn,Ji,As),Ue=wn,ft=Ji,$t=As)},setLocked:function(wn){ce=wn},setClear:function(wn){Mn!==wn&&(a.clearStencil(wn),Mn=wn)},reset:function(){ce=!1,Se=null,Qe=null,At=null,Ze=null,Ue=null,ft=null,$t=null,Mn=null}}}const o=new t,u=new n,h=new s,d=new WeakMap,g=new WeakMap;let y={},v={},x=new WeakMap,S=[],M=null,w=!1,C=null,E=null,B=null,D=null,U=null,z=null,P=null,X=new Tt(0,0,0),k=0,I=!1,O=null,q=null,ie=null,j=null,re=null;const fe=a.getParameter(a.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let Y=!1,$=0;const pe=a.getParameter(a.VERSION);pe.indexOf("WebGL")!==-1?($=parseFloat(/^WebGL (\d)/.exec(pe)[1]),Y=$>=1):pe.indexOf("OpenGL ES")!==-1&&($=parseFloat(/^OpenGL ES (\d)/.exec(pe)[1]),Y=$>=2);let Be=null,Ae={};const De=a.getParameter(a.SCISSOR_BOX),He=a.getParameter(a.VIEWPORT),Ve=new li().fromArray(De),bt=new li().fromArray(He);function qt(ce,Se,Qe,At){const Ze=new Uint8Array(4),Ue=a.createTexture();a.bindTexture(ce,Ue),a.texParameteri(ce,a.TEXTURE_MIN_FILTER,a.NEAREST),a.texParameteri(ce,a.TEXTURE_MAG_FILTER,a.NEAREST);for(let ft=0;ft<Qe;ft++)ce===a.TEXTURE_3D||ce===a.TEXTURE_2D_ARRAY?a.texImage3D(Se,0,a.RGBA,1,1,At,0,a.RGBA,a.UNSIGNED_BYTE,Ze):a.texImage2D(Se+ft,0,a.RGBA,1,1,0,a.RGBA,a.UNSIGNED_BYTE,Ze);return Ue}const me={};me[a.TEXTURE_2D]=qt(a.TEXTURE_2D,a.TEXTURE_2D,1),me[a.TEXTURE_CUBE_MAP]=qt(a.TEXTURE_CUBE_MAP,a.TEXTURE_CUBE_MAP_POSITIVE_X,6),me[a.TEXTURE_2D_ARRAY]=qt(a.TEXTURE_2D_ARRAY,a.TEXTURE_2D_ARRAY,1,1),me[a.TEXTURE_3D]=qt(a.TEXTURE_3D,a.TEXTURE_3D,1,1),o.setClear(0,0,0,1),u.setClear(1),h.setClear(0),Fe(a.DEPTH_TEST),u.setFunc(yf),Oe(!1),dt(AA),Fe(a.CULL_FACE),Le(fo);function Fe(ce){y[ce]!==!0&&(a.enable(ce),y[ce]=!0)}function mt(ce){y[ce]!==!1&&(a.disable(ce),y[ce]=!1)}function It(ce,Se){return v[ce]!==Se?(a.bindFramebuffer(ce,Se),v[ce]=Se,ce===a.DRAW_FRAMEBUFFER&&(v[a.FRAMEBUFFER]=Se),ce===a.FRAMEBUFFER&&(v[a.DRAW_FRAMEBUFFER]=Se),!0):!1}function wt(ce,Se){let Qe=S,At=!1;if(ce){Qe=x.get(Se),Qe===void 0&&(Qe=[],x.set(Se,Qe));const Ze=ce.textures;if(Qe.length!==Ze.length||Qe[0]!==a.COLOR_ATTACHMENT0){for(let Ue=0,ft=Ze.length;Ue<ft;Ue++)Qe[Ue]=a.COLOR_ATTACHMENT0+Ue;Qe.length=Ze.length,At=!0}}else Qe[0]!==a.BACK&&(Qe[0]=a.BACK,At=!0);At&&a.drawBuffers(Qe)}function an(ce){return M!==ce?(a.useProgram(ce),M=ce,!0):!1}const yn={[kc]:a.FUNC_ADD,[tE]:a.FUNC_SUBTRACT,[nE]:a.FUNC_REVERSE_SUBTRACT};yn[iE]=a.MIN,yn[sE]=a.MAX;const Xt={[rE]:a.ZERO,[aE]:a.ONE,[oE]:a.SRC_COLOR,[Jv]:a.SRC_ALPHA,[dE]:a.SRC_ALPHA_SATURATE,[fE]:a.DST_COLOR,[cE]:a.DST_ALPHA,[lE]:a.ONE_MINUS_SRC_COLOR,[Yv]:a.ONE_MINUS_SRC_ALPHA,[hE]:a.ONE_MINUS_DST_COLOR,[uE]:a.ONE_MINUS_DST_ALPHA,[pE]:a.CONSTANT_COLOR,[mE]:a.ONE_MINUS_CONSTANT_COLOR,[gE]:a.CONSTANT_ALPHA,[vE]:a.ONE_MINUS_CONSTANT_ALPHA};function Le(ce,Se,Qe,At,Ze,Ue,ft,$t,Mn,wn){if(ce===fo){w===!0&&(mt(a.BLEND),w=!1);return}if(w===!1&&(Fe(a.BLEND),w=!0),ce!==eE){if(ce!==C||wn!==I){if((E!==kc||U!==kc)&&(a.blendEquation(a.FUNC_ADD),E=kc,U=kc),wn)switch(ce){case mf:a.blendFuncSeparate(a.ONE,a.ONE_MINUS_SRC_ALPHA,a.ONE,a.ONE_MINUS_SRC_ALPHA);break;case SA:a.blendFunc(a.ONE,a.ONE);break;case bA:a.blendFuncSeparate(a.ZERO,a.ONE_MINUS_SRC_COLOR,a.ZERO,a.ONE);break;case MA:a.blendFuncSeparate(a.DST_COLOR,a.ONE_MINUS_SRC_ALPHA,a.ZERO,a.ONE);break;default:Vt("WebGLState: Invalid blending: ",ce);break}else switch(ce){case mf:a.blendFuncSeparate(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA,a.ONE,a.ONE_MINUS_SRC_ALPHA);break;case SA:a.blendFuncSeparate(a.SRC_ALPHA,a.ONE,a.ONE,a.ONE);break;case bA:Vt("WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case MA:Vt("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:Vt("WebGLState: Invalid blending: ",ce);break}B=null,D=null,z=null,P=null,X.set(0,0,0),k=0,C=ce,I=wn}return}Ze=Ze||Se,Ue=Ue||Qe,ft=ft||At,(Se!==E||Ze!==U)&&(a.blendEquationSeparate(yn[Se],yn[Ze]),E=Se,U=Ze),(Qe!==B||At!==D||Ue!==z||ft!==P)&&(a.blendFuncSeparate(Xt[Qe],Xt[At],Xt[Ue],Xt[ft]),B=Qe,D=At,z=Ue,P=ft),($t.equals(X)===!1||Mn!==k)&&(a.blendColor($t.r,$t.g,$t.b,Mn),X.copy($t),k=Mn),C=ce,I=!1}function Ke(ce,Se){ce.side===Ua?mt(a.CULL_FACE):Fe(a.CULL_FACE);let Qe=ce.side===Ar;Se&&(Qe=!Qe),Oe(Qe),ce.blending===mf&&ce.transparent===!1?Le(fo):Le(ce.blending,ce.blendEquation,ce.blendSrc,ce.blendDst,ce.blendEquationAlpha,ce.blendSrcAlpha,ce.blendDstAlpha,ce.blendColor,ce.blendAlpha,ce.premultipliedAlpha),u.setFunc(ce.depthFunc),u.setTest(ce.depthTest),u.setMask(ce.depthWrite),o.setMask(ce.colorWrite);const At=ce.stencilWrite;h.setTest(At),At&&(h.setMask(ce.stencilWriteMask),h.setFunc(ce.stencilFunc,ce.stencilRef,ce.stencilFuncMask),h.setOp(ce.stencilFail,ce.stencilZFail,ce.stencilZPass)),Ot(ce.polygonOffset,ce.polygonOffsetFactor,ce.polygonOffsetUnits),ce.alphaToCoverage===!0?Fe(a.SAMPLE_ALPHA_TO_COVERAGE):mt(a.SAMPLE_ALPHA_TO_COVERAGE)}function Oe(ce){O!==ce&&(ce?a.frontFace(a.CW):a.frontFace(a.CCW),O=ce)}function dt(ce){ce!==Q1?(Fe(a.CULL_FACE),ce!==q&&(ce===AA?a.cullFace(a.BACK):ce===j1?a.cullFace(a.FRONT):a.cullFace(a.FRONT_AND_BACK))):mt(a.CULL_FACE),q=ce}function Z(ce){ce!==ie&&(Y&&a.lineWidth(ce),ie=ce)}function Ot(ce,Se,Qe){ce?(Fe(a.POLYGON_OFFSET_FILL),(j!==Se||re!==Qe)&&(a.polygonOffset(Se,Qe),j=Se,re=Qe)):mt(a.POLYGON_OFFSET_FILL)}function yt(ce){ce?Fe(a.SCISSOR_TEST):mt(a.SCISSOR_TEST)}function Pt(ce){ce===void 0&&(ce=a.TEXTURE0+fe-1),Be!==ce&&(a.activeTexture(ce),Be=ce)}function it(ce,Se,Qe){Qe===void 0&&(Be===null?Qe=a.TEXTURE0+fe-1:Qe=Be);let At=Ae[Qe];At===void 0&&(At={type:void 0,texture:void 0},Ae[Qe]=At),(At.type!==ce||At.texture!==Se)&&(Be!==Qe&&(a.activeTexture(Qe),Be=Qe),a.bindTexture(ce,Se||me[ce]),At.type=ce,At.texture=Se)}function J(){const ce=Ae[Be];ce!==void 0&&ce.type!==void 0&&(a.bindTexture(ce.type,null),ce.type=void 0,ce.texture=void 0)}function N(){try{a.compressedTexImage2D(...arguments)}catch(ce){Vt("WebGLState:",ce)}}function le(){try{a.compressedTexImage3D(...arguments)}catch(ce){Vt("WebGLState:",ce)}}function Ee(){try{a.texSubImage2D(...arguments)}catch(ce){Vt("WebGLState:",ce)}}function Pe(){try{a.texSubImage3D(...arguments)}catch(ce){Vt("WebGLState:",ce)}}function Me(){try{a.compressedTexSubImage2D(...arguments)}catch(ce){Vt("WebGLState:",ce)}}function St(){try{a.compressedTexSubImage3D(...arguments)}catch(ce){Vt("WebGLState:",ce)}}function ot(){try{a.texStorage2D(...arguments)}catch(ce){Vt("WebGLState:",ce)}}function Lt(){try{a.texStorage3D(...arguments)}catch(ce){Vt("WebGLState:",ce)}}function Wt(){try{a.texImage2D(...arguments)}catch(ce){Vt("WebGLState:",ce)}}function Xe(){try{a.texImage3D(...arguments)}catch(ce){Vt("WebGLState:",ce)}}function Je(ce){Ve.equals(ce)===!1&&(a.scissor(ce.x,ce.y,ce.z,ce.w),Ve.copy(ce))}function Et(ce){bt.equals(ce)===!1&&(a.viewport(ce.x,ce.y,ce.z,ce.w),bt.copy(ce))}function _t(ce,Se){let Qe=g.get(Se);Qe===void 0&&(Qe=new WeakMap,g.set(Se,Qe));let At=Qe.get(ce);At===void 0&&(At=a.getUniformBlockIndex(Se,ce.name),Qe.set(ce,At))}function tt(ce,Se){const At=g.get(Se).get(ce);d.get(Se)!==At&&(a.uniformBlockBinding(Se,At,ce.__bindingPointIndex),d.set(Se,At))}function Ht(){a.disable(a.BLEND),a.disable(a.CULL_FACE),a.disable(a.DEPTH_TEST),a.disable(a.POLYGON_OFFSET_FILL),a.disable(a.SCISSOR_TEST),a.disable(a.STENCIL_TEST),a.disable(a.SAMPLE_ALPHA_TO_COVERAGE),a.blendEquation(a.FUNC_ADD),a.blendFunc(a.ONE,a.ZERO),a.blendFuncSeparate(a.ONE,a.ZERO,a.ONE,a.ZERO),a.blendColor(0,0,0,0),a.colorMask(!0,!0,!0,!0),a.clearColor(0,0,0,0),a.depthMask(!0),a.depthFunc(a.LESS),u.setReversed(!1),a.clearDepth(1),a.stencilMask(4294967295),a.stencilFunc(a.ALWAYS,0,4294967295),a.stencilOp(a.KEEP,a.KEEP,a.KEEP),a.clearStencil(0),a.cullFace(a.BACK),a.frontFace(a.CCW),a.polygonOffset(0,0),a.activeTexture(a.TEXTURE0),a.bindFramebuffer(a.FRAMEBUFFER,null),a.bindFramebuffer(a.DRAW_FRAMEBUFFER,null),a.bindFramebuffer(a.READ_FRAMEBUFFER,null),a.useProgram(null),a.lineWidth(1),a.scissor(0,0,a.canvas.width,a.canvas.height),a.viewport(0,0,a.canvas.width,a.canvas.height),y={},Be=null,Ae={},v={},x=new WeakMap,S=[],M=null,w=!1,C=null,E=null,B=null,D=null,U=null,z=null,P=null,X=new Tt(0,0,0),k=0,I=!1,O=null,q=null,ie=null,j=null,re=null,Ve.set(0,0,a.canvas.width,a.canvas.height),bt.set(0,0,a.canvas.width,a.canvas.height),o.reset(),u.reset(),h.reset()}return{buffers:{color:o,depth:u,stencil:h},enable:Fe,disable:mt,bindFramebuffer:It,drawBuffers:wt,useProgram:an,setBlending:Le,setMaterial:Ke,setFlipSided:Oe,setCullFace:dt,setLineWidth:Z,setPolygonOffset:Ot,setScissorTest:yt,activeTexture:Pt,bindTexture:it,unbindTexture:J,compressedTexImage2D:N,compressedTexImage3D:le,texImage2D:Wt,texImage3D:Xe,updateUBOMapping:_t,uniformBlockBinding:tt,texStorage2D:ot,texStorage3D:Lt,texSubImage2D:Ee,texSubImage3D:Pe,compressedTexSubImage2D:Me,compressedTexSubImage3D:St,scissor:Je,viewport:Et,reset:Ht}}function CN(a,e,t,n,s,o,u){const h=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,d=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),g=new We,y=new WeakMap;let v;const x=new WeakMap;let S=!1;try{S=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function M(J,N){return S?new OffscreenCanvas(J,N):Om("canvas")}function w(J,N,le){let Ee=1;const Pe=it(J);if((Pe.width>le||Pe.height>le)&&(Ee=le/Math.max(Pe.width,Pe.height)),Ee<1)if(typeof HTMLImageElement<"u"&&J instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&J instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&J instanceof ImageBitmap||typeof VideoFrame<"u"&&J instanceof VideoFrame){const Me=Math.floor(Ee*Pe.width),St=Math.floor(Ee*Pe.height);v===void 0&&(v=M(Me,St));const ot=N?M(Me,St):v;return ot.width=Me,ot.height=St,ot.getContext("2d").drawImage(J,0,0,Me,St),Mt("WebGLRenderer: Texture has been resized from ("+Pe.width+"x"+Pe.height+") to ("+Me+"x"+St+")."),ot}else return"data"in J&&Mt("WebGLRenderer: Image in DataTexture is too big ("+Pe.width+"x"+Pe.height+")."),J;return J}function C(J){return J.generateMipmaps}function E(J){a.generateMipmap(J)}function B(J){return J.isWebGLCubeRenderTarget?a.TEXTURE_CUBE_MAP:J.isWebGL3DRenderTarget?a.TEXTURE_3D:J.isWebGLArrayRenderTarget||J.isCompressedArrayTexture?a.TEXTURE_2D_ARRAY:a.TEXTURE_2D}function D(J,N,le,Ee,Pe=!1){if(J!==null){if(a[J]!==void 0)return a[J];Mt("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+J+"'")}let Me=N;if(N===a.RED&&(le===a.FLOAT&&(Me=a.R32F),le===a.HALF_FLOAT&&(Me=a.R16F),le===a.UNSIGNED_BYTE&&(Me=a.R8)),N===a.RED_INTEGER&&(le===a.UNSIGNED_BYTE&&(Me=a.R8UI),le===a.UNSIGNED_SHORT&&(Me=a.R16UI),le===a.UNSIGNED_INT&&(Me=a.R32UI),le===a.BYTE&&(Me=a.R8I),le===a.SHORT&&(Me=a.R16I),le===a.INT&&(Me=a.R32I)),N===a.RG&&(le===a.FLOAT&&(Me=a.RG32F),le===a.HALF_FLOAT&&(Me=a.RG16F),le===a.UNSIGNED_BYTE&&(Me=a.RG8)),N===a.RG_INTEGER&&(le===a.UNSIGNED_BYTE&&(Me=a.RG8UI),le===a.UNSIGNED_SHORT&&(Me=a.RG16UI),le===a.UNSIGNED_INT&&(Me=a.RG32UI),le===a.BYTE&&(Me=a.RG8I),le===a.SHORT&&(Me=a.RG16I),le===a.INT&&(Me=a.RG32I)),N===a.RGB_INTEGER&&(le===a.UNSIGNED_BYTE&&(Me=a.RGB8UI),le===a.UNSIGNED_SHORT&&(Me=a.RGB16UI),le===a.UNSIGNED_INT&&(Me=a.RGB32UI),le===a.BYTE&&(Me=a.RGB8I),le===a.SHORT&&(Me=a.RGB16I),le===a.INT&&(Me=a.RGB32I)),N===a.RGBA_INTEGER&&(le===a.UNSIGNED_BYTE&&(Me=a.RGBA8UI),le===a.UNSIGNED_SHORT&&(Me=a.RGBA16UI),le===a.UNSIGNED_INT&&(Me=a.RGBA32UI),le===a.BYTE&&(Me=a.RGBA8I),le===a.SHORT&&(Me=a.RGBA16I),le===a.INT&&(Me=a.RGBA32I)),N===a.RGB&&(le===a.UNSIGNED_INT_5_9_9_9_REV&&(Me=a.RGB9_E5),le===a.UNSIGNED_INT_10F_11F_11F_REV&&(Me=a.R11F_G11F_B10F)),N===a.RGBA){const St=Pe?Nm:On.getTransfer(Ee);le===a.FLOAT&&(Me=a.RGBA32F),le===a.HALF_FLOAT&&(Me=a.RGBA16F),le===a.UNSIGNED_BYTE&&(Me=St===$n?a.SRGB8_ALPHA8:a.RGBA8),le===a.UNSIGNED_SHORT_4_4_4_4&&(Me=a.RGBA4),le===a.UNSIGNED_SHORT_5_5_5_1&&(Me=a.RGB5_A1)}return(Me===a.R16F||Me===a.R32F||Me===a.RG16F||Me===a.RG32F||Me===a.RGBA16F||Me===a.RGBA32F)&&e.get("EXT_color_buffer_float"),Me}function U(J,N){let le;return J?N===null||N===ia||N===pd?le=a.DEPTH24_STENCIL8:N===Ci?le=a.DEPTH32F_STENCIL8:N===dd&&(le=a.DEPTH24_STENCIL8,Mt("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):N===null||N===ia||N===pd?le=a.DEPTH_COMPONENT24:N===Ci?le=a.DEPTH_COMPONENT32F:N===dd&&(le=a.DEPTH_COMPONENT16),le}function z(J,N){return C(J)===!0||J.isFramebufferTexture&&J.minFilter!==Xi&&J.minFilter!==Un?Math.log2(Math.max(N.width,N.height))+1:J.mipmaps!==void 0&&J.mipmaps.length>0?J.mipmaps.length:J.isCompressedTexture&&Array.isArray(J.image)?N.mipmaps.length:1}function P(J){const N=J.target;N.removeEventListener("dispose",P),k(N),N.isVideoTexture&&y.delete(N)}function X(J){const N=J.target;N.removeEventListener("dispose",X),O(N)}function k(J){const N=n.get(J);if(N.__webglInit===void 0)return;const le=J.source,Ee=x.get(le);if(Ee){const Pe=Ee[N.__cacheKey];Pe.usedTimes--,Pe.usedTimes===0&&I(J),Object.keys(Ee).length===0&&x.delete(le)}n.remove(J)}function I(J){const N=n.get(J);a.deleteTexture(N.__webglTexture);const le=J.source,Ee=x.get(le);delete Ee[N.__cacheKey],u.memory.textures--}function O(J){const N=n.get(J);if(J.depthTexture&&(J.depthTexture.dispose(),n.remove(J.depthTexture)),J.isWebGLCubeRenderTarget)for(let Ee=0;Ee<6;Ee++){if(Array.isArray(N.__webglFramebuffer[Ee]))for(let Pe=0;Pe<N.__webglFramebuffer[Ee].length;Pe++)a.deleteFramebuffer(N.__webglFramebuffer[Ee][Pe]);else a.deleteFramebuffer(N.__webglFramebuffer[Ee]);N.__webglDepthbuffer&&a.deleteRenderbuffer(N.__webglDepthbuffer[Ee])}else{if(Array.isArray(N.__webglFramebuffer))for(let Ee=0;Ee<N.__webglFramebuffer.length;Ee++)a.deleteFramebuffer(N.__webglFramebuffer[Ee]);else a.deleteFramebuffer(N.__webglFramebuffer);if(N.__webglDepthbuffer&&a.deleteRenderbuffer(N.__webglDepthbuffer),N.__webglMultisampledFramebuffer&&a.deleteFramebuffer(N.__webglMultisampledFramebuffer),N.__webglColorRenderbuffer)for(let Ee=0;Ee<N.__webglColorRenderbuffer.length;Ee++)N.__webglColorRenderbuffer[Ee]&&a.deleteRenderbuffer(N.__webglColorRenderbuffer[Ee]);N.__webglDepthRenderbuffer&&a.deleteRenderbuffer(N.__webglDepthRenderbuffer)}const le=J.textures;for(let Ee=0,Pe=le.length;Ee<Pe;Ee++){const Me=n.get(le[Ee]);Me.__webglTexture&&(a.deleteTexture(Me.__webglTexture),u.memory.textures--),n.remove(le[Ee])}n.remove(J)}let q=0;function ie(){q=0}function j(){const J=q;return J>=s.maxTextures&&Mt("WebGLTextures: Trying to use "+J+" texture units while this GPU supports only "+s.maxTextures),q+=1,J}function re(J){const N=[];return N.push(J.wrapS),N.push(J.wrapT),N.push(J.wrapR||0),N.push(J.magFilter),N.push(J.minFilter),N.push(J.anisotropy),N.push(J.internalFormat),N.push(J.format),N.push(J.type),N.push(J.generateMipmaps),N.push(J.premultiplyAlpha),N.push(J.flipY),N.push(J.unpackAlignment),N.push(J.colorSpace),N.join()}function fe(J,N){const le=n.get(J);if(J.isVideoTexture&&yt(J),J.isRenderTargetTexture===!1&&J.isExternalTexture!==!0&&J.version>0&&le.__version!==J.version){const Ee=J.image;if(Ee===null)Mt("WebGLRenderer: Texture marked for update but no image data found.");else if(Ee.complete===!1)Mt("WebGLRenderer: Texture marked for update but image is incomplete");else{me(le,J,N);return}}else J.isExternalTexture&&(le.__webglTexture=J.sourceTexture?J.sourceTexture:null);t.bindTexture(a.TEXTURE_2D,le.__webglTexture,a.TEXTURE0+N)}function Y(J,N){const le=n.get(J);if(J.isRenderTargetTexture===!1&&J.version>0&&le.__version!==J.version){me(le,J,N);return}else J.isExternalTexture&&(le.__webglTexture=J.sourceTexture?J.sourceTexture:null);t.bindTexture(a.TEXTURE_2D_ARRAY,le.__webglTexture,a.TEXTURE0+N)}function $(J,N){const le=n.get(J);if(J.isRenderTargetTexture===!1&&J.version>0&&le.__version!==J.version){me(le,J,N);return}t.bindTexture(a.TEXTURE_3D,le.__webglTexture,a.TEXTURE0+N)}function pe(J,N){const le=n.get(J);if(J.isCubeDepthTexture!==!0&&J.version>0&&le.__version!==J.version){Fe(le,J,N);return}t.bindTexture(a.TEXTURE_CUBE_MAP,le.__webglTexture,a.TEXTURE0+N)}const Be={[Zc]:a.REPEAT,[Fi]:a.CLAMP_TO_EDGE,[hd]:a.MIRRORED_REPEAT},Ae={[Xi]:a.NEAREST,[Jy]:a.NEAREST_MIPMAP_NEAREST,[lf]:a.NEAREST_MIPMAP_LINEAR,[Un]:a.LINEAR,[od]:a.LINEAR_MIPMAP_NEAREST,[Fa]:a.LINEAR_MIPMAP_LINEAR},De={[CE]:a.NEVER,[IE]:a.ALWAYS,[wE]:a.LESS,[e_]:a.LEQUAL,[RE]:a.EQUAL,[t_]:a.GEQUAL,[BE]:a.GREATER,[DE]:a.NOTEQUAL};function He(J,N){if(N.type===Ci&&e.has("OES_texture_float_linear")===!1&&(N.magFilter===Un||N.magFilter===od||N.magFilter===lf||N.magFilter===Fa||N.minFilter===Un||N.minFilter===od||N.minFilter===lf||N.minFilter===Fa)&&Mt("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),a.texParameteri(J,a.TEXTURE_WRAP_S,Be[N.wrapS]),a.texParameteri(J,a.TEXTURE_WRAP_T,Be[N.wrapT]),(J===a.TEXTURE_3D||J===a.TEXTURE_2D_ARRAY)&&a.texParameteri(J,a.TEXTURE_WRAP_R,Be[N.wrapR]),a.texParameteri(J,a.TEXTURE_MAG_FILTER,Ae[N.magFilter]),a.texParameteri(J,a.TEXTURE_MIN_FILTER,Ae[N.minFilter]),N.compareFunction&&(a.texParameteri(J,a.TEXTURE_COMPARE_MODE,a.COMPARE_REF_TO_TEXTURE),a.texParameteri(J,a.TEXTURE_COMPARE_FUNC,De[N.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(N.magFilter===Xi||N.minFilter!==lf&&N.minFilter!==Fa||N.type===Ci&&e.has("OES_texture_float_linear")===!1)return;if(N.anisotropy>1||n.get(N).__currentAnisotropy){const le=e.get("EXT_texture_filter_anisotropic");a.texParameterf(J,le.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(N.anisotropy,s.getMaxAnisotropy())),n.get(N).__currentAnisotropy=N.anisotropy}}}function Ve(J,N){let le=!1;J.__webglInit===void 0&&(J.__webglInit=!0,N.addEventListener("dispose",P));const Ee=N.source;let Pe=x.get(Ee);Pe===void 0&&(Pe={},x.set(Ee,Pe));const Me=re(N);if(Me!==J.__cacheKey){Pe[Me]===void 0&&(Pe[Me]={texture:a.createTexture(),usedTimes:0},u.memory.textures++,le=!0),Pe[Me].usedTimes++;const St=Pe[J.__cacheKey];St!==void 0&&(Pe[J.__cacheKey].usedTimes--,St.usedTimes===0&&I(N)),J.__cacheKey=Me,J.__webglTexture=Pe[Me].texture}return le}function bt(J,N,le){return Math.floor(Math.floor(J/le)/N)}function qt(J,N,le,Ee){const Me=J.updateRanges;if(Me.length===0)t.texSubImage2D(a.TEXTURE_2D,0,0,0,N.width,N.height,le,Ee,N.data);else{Me.sort((Xe,Je)=>Xe.start-Je.start);let St=0;for(let Xe=1;Xe<Me.length;Xe++){const Je=Me[St],Et=Me[Xe],_t=Je.start+Je.count,tt=bt(Et.start,N.width,4),Ht=bt(Je.start,N.width,4);Et.start<=_t+1&&tt===Ht&&bt(Et.start+Et.count-1,N.width,4)===tt?Je.count=Math.max(Je.count,Et.start+Et.count-Je.start):(++St,Me[St]=Et)}Me.length=St+1;const ot=a.getParameter(a.UNPACK_ROW_LENGTH),Lt=a.getParameter(a.UNPACK_SKIP_PIXELS),Wt=a.getParameter(a.UNPACK_SKIP_ROWS);a.pixelStorei(a.UNPACK_ROW_LENGTH,N.width);for(let Xe=0,Je=Me.length;Xe<Je;Xe++){const Et=Me[Xe],_t=Math.floor(Et.start/4),tt=Math.ceil(Et.count/4),Ht=_t%N.width,ce=Math.floor(_t/N.width),Se=tt,Qe=1;a.pixelStorei(a.UNPACK_SKIP_PIXELS,Ht),a.pixelStorei(a.UNPACK_SKIP_ROWS,ce),t.texSubImage2D(a.TEXTURE_2D,0,Ht,ce,Se,Qe,le,Ee,N.data)}J.clearUpdateRanges(),a.pixelStorei(a.UNPACK_ROW_LENGTH,ot),a.pixelStorei(a.UNPACK_SKIP_PIXELS,Lt),a.pixelStorei(a.UNPACK_SKIP_ROWS,Wt)}}function me(J,N,le){let Ee=a.TEXTURE_2D;(N.isDataArrayTexture||N.isCompressedArrayTexture)&&(Ee=a.TEXTURE_2D_ARRAY),N.isData3DTexture&&(Ee=a.TEXTURE_3D);const Pe=Ve(J,N),Me=N.source;t.bindTexture(Ee,J.__webglTexture,a.TEXTURE0+le);const St=n.get(Me);if(Me.version!==St.__version||Pe===!0){t.activeTexture(a.TEXTURE0+le);const ot=On.getPrimaries(On.workingColorSpace),Lt=N.colorSpace===Fl?null:On.getPrimaries(N.colorSpace),Wt=N.colorSpace===Fl||ot===Lt?a.NONE:a.BROWSER_DEFAULT_WEBGL;a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,N.flipY),a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,N.premultiplyAlpha),a.pixelStorei(a.UNPACK_ALIGNMENT,N.unpackAlignment),a.pixelStorei(a.UNPACK_COLORSPACE_CONVERSION_WEBGL,Wt);let Xe=w(N.image,!1,s.maxTextureSize);Xe=Pt(N,Xe);const Je=o.convert(N.format,N.colorSpace),Et=o.convert(N.type);let _t=D(N.internalFormat,Je,Et,N.colorSpace,N.isVideoTexture);He(Ee,N);let tt;const Ht=N.mipmaps,ce=N.isVideoTexture!==!0,Se=St.__version===void 0||Pe===!0,Qe=Me.dataReady,At=z(N,Xe);if(N.isDepthTexture)_t=U(N.format===Vc,N.type),Se&&(ce?t.texStorage2D(a.TEXTURE_2D,1,_t,Xe.width,Xe.height):t.texImage2D(a.TEXTURE_2D,0,_t,Xe.width,Xe.height,0,Je,Et,null));else if(N.isDataTexture)if(Ht.length>0){ce&&Se&&t.texStorage2D(a.TEXTURE_2D,At,_t,Ht[0].width,Ht[0].height);for(let Ze=0,Ue=Ht.length;Ze<Ue;Ze++)tt=Ht[Ze],ce?Qe&&t.texSubImage2D(a.TEXTURE_2D,Ze,0,0,tt.width,tt.height,Je,Et,tt.data):t.texImage2D(a.TEXTURE_2D,Ze,_t,tt.width,tt.height,0,Je,Et,tt.data);N.generateMipmaps=!1}else ce?(Se&&t.texStorage2D(a.TEXTURE_2D,At,_t,Xe.width,Xe.height),Qe&&qt(N,Xe,Je,Et)):t.texImage2D(a.TEXTURE_2D,0,_t,Xe.width,Xe.height,0,Je,Et,Xe.data);else if(N.isCompressedTexture)if(N.isCompressedArrayTexture){ce&&Se&&t.texStorage3D(a.TEXTURE_2D_ARRAY,At,_t,Ht[0].width,Ht[0].height,Xe.depth);for(let Ze=0,Ue=Ht.length;Ze<Ue;Ze++)if(tt=Ht[Ze],N.format!==ts)if(Je!==null)if(ce){if(Qe)if(N.layerUpdates.size>0){const ft=UA(tt.width,tt.height,N.format,N.type);for(const $t of N.layerUpdates){const Mn=tt.data.subarray($t*ft/tt.data.BYTES_PER_ELEMENT,($t+1)*ft/tt.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(a.TEXTURE_2D_ARRAY,Ze,0,0,$t,tt.width,tt.height,1,Je,Mn)}N.clearLayerUpdates()}else t.compressedTexSubImage3D(a.TEXTURE_2D_ARRAY,Ze,0,0,0,tt.width,tt.height,Xe.depth,Je,tt.data)}else t.compressedTexImage3D(a.TEXTURE_2D_ARRAY,Ze,_t,tt.width,tt.height,Xe.depth,0,tt.data,0,0);else Mt("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else ce?Qe&&t.texSubImage3D(a.TEXTURE_2D_ARRAY,Ze,0,0,0,tt.width,tt.height,Xe.depth,Je,Et,tt.data):t.texImage3D(a.TEXTURE_2D_ARRAY,Ze,_t,tt.width,tt.height,Xe.depth,0,Je,Et,tt.data)}else{ce&&Se&&t.texStorage2D(a.TEXTURE_2D,At,_t,Ht[0].width,Ht[0].height);for(let Ze=0,Ue=Ht.length;Ze<Ue;Ze++)tt=Ht[Ze],N.format!==ts?Je!==null?ce?Qe&&t.compressedTexSubImage2D(a.TEXTURE_2D,Ze,0,0,tt.width,tt.height,Je,tt.data):t.compressedTexImage2D(a.TEXTURE_2D,Ze,_t,tt.width,tt.height,0,tt.data):Mt("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):ce?Qe&&t.texSubImage2D(a.TEXTURE_2D,Ze,0,0,tt.width,tt.height,Je,Et,tt.data):t.texImage2D(a.TEXTURE_2D,Ze,_t,tt.width,tt.height,0,Je,Et,tt.data)}else if(N.isDataArrayTexture)if(ce){if(Se&&t.texStorage3D(a.TEXTURE_2D_ARRAY,At,_t,Xe.width,Xe.height,Xe.depth),Qe)if(N.layerUpdates.size>0){const Ze=UA(Xe.width,Xe.height,N.format,N.type);for(const Ue of N.layerUpdates){const ft=Xe.data.subarray(Ue*Ze/Xe.data.BYTES_PER_ELEMENT,(Ue+1)*Ze/Xe.data.BYTES_PER_ELEMENT);t.texSubImage3D(a.TEXTURE_2D_ARRAY,0,0,0,Ue,Xe.width,Xe.height,1,Je,Et,ft)}N.clearLayerUpdates()}else t.texSubImage3D(a.TEXTURE_2D_ARRAY,0,0,0,0,Xe.width,Xe.height,Xe.depth,Je,Et,Xe.data)}else t.texImage3D(a.TEXTURE_2D_ARRAY,0,_t,Xe.width,Xe.height,Xe.depth,0,Je,Et,Xe.data);else if(N.isData3DTexture)ce?(Se&&t.texStorage3D(a.TEXTURE_3D,At,_t,Xe.width,Xe.height,Xe.depth),Qe&&t.texSubImage3D(a.TEXTURE_3D,0,0,0,0,Xe.width,Xe.height,Xe.depth,Je,Et,Xe.data)):t.texImage3D(a.TEXTURE_3D,0,_t,Xe.width,Xe.height,Xe.depth,0,Je,Et,Xe.data);else if(N.isFramebufferTexture){if(Se)if(ce)t.texStorage2D(a.TEXTURE_2D,At,_t,Xe.width,Xe.height);else{let Ze=Xe.width,Ue=Xe.height;for(let ft=0;ft<At;ft++)t.texImage2D(a.TEXTURE_2D,ft,_t,Ze,Ue,0,Je,Et,null),Ze>>=1,Ue>>=1}}else if(Ht.length>0){if(ce&&Se){const Ze=it(Ht[0]);t.texStorage2D(a.TEXTURE_2D,At,_t,Ze.width,Ze.height)}for(let Ze=0,Ue=Ht.length;Ze<Ue;Ze++)tt=Ht[Ze],ce?Qe&&t.texSubImage2D(a.TEXTURE_2D,Ze,0,0,Je,Et,tt):t.texImage2D(a.TEXTURE_2D,Ze,_t,Je,Et,tt);N.generateMipmaps=!1}else if(ce){if(Se){const Ze=it(Xe);t.texStorage2D(a.TEXTURE_2D,At,_t,Ze.width,Ze.height)}Qe&&t.texSubImage2D(a.TEXTURE_2D,0,0,0,Je,Et,Xe)}else t.texImage2D(a.TEXTURE_2D,0,_t,Je,Et,Xe);C(N)&&E(Ee),St.__version=Me.version,N.onUpdate&&N.onUpdate(N)}J.__version=N.version}function Fe(J,N,le){if(N.image.length!==6)return;const Ee=Ve(J,N),Pe=N.source;t.bindTexture(a.TEXTURE_CUBE_MAP,J.__webglTexture,a.TEXTURE0+le);const Me=n.get(Pe);if(Pe.version!==Me.__version||Ee===!0){t.activeTexture(a.TEXTURE0+le);const St=On.getPrimaries(On.workingColorSpace),ot=N.colorSpace===Fl?null:On.getPrimaries(N.colorSpace),Lt=N.colorSpace===Fl||St===ot?a.NONE:a.BROWSER_DEFAULT_WEBGL;a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,N.flipY),a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,N.premultiplyAlpha),a.pixelStorei(a.UNPACK_ALIGNMENT,N.unpackAlignment),a.pixelStorei(a.UNPACK_COLORSPACE_CONVERSION_WEBGL,Lt);const Wt=N.isCompressedTexture||N.image[0].isCompressedTexture,Xe=N.image[0]&&N.image[0].isDataTexture,Je=[];for(let Ue=0;Ue<6;Ue++)!Wt&&!Xe?Je[Ue]=w(N.image[Ue],!0,s.maxCubemapSize):Je[Ue]=Xe?N.image[Ue].image:N.image[Ue],Je[Ue]=Pt(N,Je[Ue]);const Et=Je[0],_t=o.convert(N.format,N.colorSpace),tt=o.convert(N.type),Ht=D(N.internalFormat,_t,tt,N.colorSpace),ce=N.isVideoTexture!==!0,Se=Me.__version===void 0||Ee===!0,Qe=Pe.dataReady;let At=z(N,Et);He(a.TEXTURE_CUBE_MAP,N);let Ze;if(Wt){ce&&Se&&t.texStorage2D(a.TEXTURE_CUBE_MAP,At,Ht,Et.width,Et.height);for(let Ue=0;Ue<6;Ue++){Ze=Je[Ue].mipmaps;for(let ft=0;ft<Ze.length;ft++){const $t=Ze[ft];N.format!==ts?_t!==null?ce?Qe&&t.compressedTexSubImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+Ue,ft,0,0,$t.width,$t.height,_t,$t.data):t.compressedTexImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+Ue,ft,Ht,$t.width,$t.height,0,$t.data):Mt("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):ce?Qe&&t.texSubImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+Ue,ft,0,0,$t.width,$t.height,_t,tt,$t.data):t.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+Ue,ft,Ht,$t.width,$t.height,0,_t,tt,$t.data)}}}else{if(Ze=N.mipmaps,ce&&Se){Ze.length>0&&At++;const Ue=it(Je[0]);t.texStorage2D(a.TEXTURE_CUBE_MAP,At,Ht,Ue.width,Ue.height)}for(let Ue=0;Ue<6;Ue++)if(Xe){ce?Qe&&t.texSubImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+Ue,0,0,0,Je[Ue].width,Je[Ue].height,_t,tt,Je[Ue].data):t.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+Ue,0,Ht,Je[Ue].width,Je[Ue].height,0,_t,tt,Je[Ue].data);for(let ft=0;ft<Ze.length;ft++){const Mn=Ze[ft].image[Ue].image;ce?Qe&&t.texSubImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+Ue,ft+1,0,0,Mn.width,Mn.height,_t,tt,Mn.data):t.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+Ue,ft+1,Ht,Mn.width,Mn.height,0,_t,tt,Mn.data)}}else{ce?Qe&&t.texSubImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+Ue,0,0,0,_t,tt,Je[Ue]):t.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+Ue,0,Ht,_t,tt,Je[Ue]);for(let ft=0;ft<Ze.length;ft++){const $t=Ze[ft];ce?Qe&&t.texSubImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+Ue,ft+1,0,0,_t,tt,$t.image[Ue]):t.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+Ue,ft+1,Ht,_t,tt,$t.image[Ue])}}}C(N)&&E(a.TEXTURE_CUBE_MAP),Me.__version=Pe.version,N.onUpdate&&N.onUpdate(N)}J.__version=N.version}function mt(J,N,le,Ee,Pe,Me){const St=o.convert(le.format,le.colorSpace),ot=o.convert(le.type),Lt=D(le.internalFormat,St,ot,le.colorSpace),Wt=n.get(N),Xe=n.get(le);if(Xe.__renderTarget=N,!Wt.__hasExternalTextures){const Je=Math.max(1,N.width>>Me),Et=Math.max(1,N.height>>Me);Pe===a.TEXTURE_3D||Pe===a.TEXTURE_2D_ARRAY?t.texImage3D(Pe,Me,Lt,Je,Et,N.depth,0,St,ot,null):t.texImage2D(Pe,Me,Lt,Je,Et,0,St,ot,null)}t.bindFramebuffer(a.FRAMEBUFFER,J),Ot(N)?h.framebufferTexture2DMultisampleEXT(a.FRAMEBUFFER,Ee,Pe,Xe.__webglTexture,0,Z(N)):(Pe===a.TEXTURE_2D||Pe>=a.TEXTURE_CUBE_MAP_POSITIVE_X&&Pe<=a.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&a.framebufferTexture2D(a.FRAMEBUFFER,Ee,Pe,Xe.__webglTexture,Me),t.bindFramebuffer(a.FRAMEBUFFER,null)}function It(J,N,le){if(a.bindRenderbuffer(a.RENDERBUFFER,J),N.depthBuffer){const Ee=N.depthTexture,Pe=Ee&&Ee.isDepthTexture?Ee.type:null,Me=U(N.stencilBuffer,Pe),St=N.stencilBuffer?a.DEPTH_STENCIL_ATTACHMENT:a.DEPTH_ATTACHMENT;Ot(N)?h.renderbufferStorageMultisampleEXT(a.RENDERBUFFER,Z(N),Me,N.width,N.height):le?a.renderbufferStorageMultisample(a.RENDERBUFFER,Z(N),Me,N.width,N.height):a.renderbufferStorage(a.RENDERBUFFER,Me,N.width,N.height),a.framebufferRenderbuffer(a.FRAMEBUFFER,St,a.RENDERBUFFER,J)}else{const Ee=N.textures;for(let Pe=0;Pe<Ee.length;Pe++){const Me=Ee[Pe],St=o.convert(Me.format,Me.colorSpace),ot=o.convert(Me.type),Lt=D(Me.internalFormat,St,ot,Me.colorSpace);Ot(N)?h.renderbufferStorageMultisampleEXT(a.RENDERBUFFER,Z(N),Lt,N.width,N.height):le?a.renderbufferStorageMultisample(a.RENDERBUFFER,Z(N),Lt,N.width,N.height):a.renderbufferStorage(a.RENDERBUFFER,Lt,N.width,N.height)}}a.bindRenderbuffer(a.RENDERBUFFER,null)}function wt(J,N,le){const Ee=N.isWebGLCubeRenderTarget===!0;if(t.bindFramebuffer(a.FRAMEBUFFER,J),!(N.depthTexture&&N.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const Pe=n.get(N.depthTexture);if(Pe.__renderTarget=N,(!Pe.__webglTexture||N.depthTexture.image.width!==N.width||N.depthTexture.image.height!==N.height)&&(N.depthTexture.image.width=N.width,N.depthTexture.image.height=N.height,N.depthTexture.needsUpdate=!0),Ee){if(Pe.__webglInit===void 0&&(Pe.__webglInit=!0,N.depthTexture.addEventListener("dispose",P)),Pe.__webglTexture===void 0){Pe.__webglTexture=a.createTexture(),t.bindTexture(a.TEXTURE_CUBE_MAP,Pe.__webglTexture),He(a.TEXTURE_CUBE_MAP,N.depthTexture);const Wt=o.convert(N.depthTexture.format),Xe=o.convert(N.depthTexture.type);let Je;N.depthTexture.format===Qo?Je=a.DEPTH_COMPONENT24:N.depthTexture.format===Vc&&(Je=a.DEPTH24_STENCIL8);for(let Et=0;Et<6;Et++)a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+Et,0,Je,N.width,N.height,0,Wt,Xe,null)}}else fe(N.depthTexture,0);const Me=Pe.__webglTexture,St=Z(N),ot=Ee?a.TEXTURE_CUBE_MAP_POSITIVE_X+le:a.TEXTURE_2D,Lt=N.depthTexture.format===Vc?a.DEPTH_STENCIL_ATTACHMENT:a.DEPTH_ATTACHMENT;if(N.depthTexture.format===Qo)Ot(N)?h.framebufferTexture2DMultisampleEXT(a.FRAMEBUFFER,Lt,ot,Me,0,St):a.framebufferTexture2D(a.FRAMEBUFFER,Lt,ot,Me,0);else if(N.depthTexture.format===Vc)Ot(N)?h.framebufferTexture2DMultisampleEXT(a.FRAMEBUFFER,Lt,ot,Me,0,St):a.framebufferTexture2D(a.FRAMEBUFFER,Lt,ot,Me,0);else throw new Error("Unknown depthTexture format")}function an(J){const N=n.get(J),le=J.isWebGLCubeRenderTarget===!0;if(N.__boundDepthTexture!==J.depthTexture){const Ee=J.depthTexture;if(N.__depthDisposeCallback&&N.__depthDisposeCallback(),Ee){const Pe=()=>{delete N.__boundDepthTexture,delete N.__depthDisposeCallback,Ee.removeEventListener("dispose",Pe)};Ee.addEventListener("dispose",Pe),N.__depthDisposeCallback=Pe}N.__boundDepthTexture=Ee}if(J.depthTexture&&!N.__autoAllocateDepthBuffer)if(le)for(let Ee=0;Ee<6;Ee++)wt(N.__webglFramebuffer[Ee],J,Ee);else{const Ee=J.texture.mipmaps;Ee&&Ee.length>0?wt(N.__webglFramebuffer[0],J,0):wt(N.__webglFramebuffer,J,0)}else if(le){N.__webglDepthbuffer=[];for(let Ee=0;Ee<6;Ee++)if(t.bindFramebuffer(a.FRAMEBUFFER,N.__webglFramebuffer[Ee]),N.__webglDepthbuffer[Ee]===void 0)N.__webglDepthbuffer[Ee]=a.createRenderbuffer(),It(N.__webglDepthbuffer[Ee],J,!1);else{const Pe=J.stencilBuffer?a.DEPTH_STENCIL_ATTACHMENT:a.DEPTH_ATTACHMENT,Me=N.__webglDepthbuffer[Ee];a.bindRenderbuffer(a.RENDERBUFFER,Me),a.framebufferRenderbuffer(a.FRAMEBUFFER,Pe,a.RENDERBUFFER,Me)}}else{const Ee=J.texture.mipmaps;if(Ee&&Ee.length>0?t.bindFramebuffer(a.FRAMEBUFFER,N.__webglFramebuffer[0]):t.bindFramebuffer(a.FRAMEBUFFER,N.__webglFramebuffer),N.__webglDepthbuffer===void 0)N.__webglDepthbuffer=a.createRenderbuffer(),It(N.__webglDepthbuffer,J,!1);else{const Pe=J.stencilBuffer?a.DEPTH_STENCIL_ATTACHMENT:a.DEPTH_ATTACHMENT,Me=N.__webglDepthbuffer;a.bindRenderbuffer(a.RENDERBUFFER,Me),a.framebufferRenderbuffer(a.FRAMEBUFFER,Pe,a.RENDERBUFFER,Me)}}t.bindFramebuffer(a.FRAMEBUFFER,null)}function yn(J,N,le){const Ee=n.get(J);N!==void 0&&mt(Ee.__webglFramebuffer,J,J.texture,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,0),le!==void 0&&an(J)}function Xt(J){const N=J.texture,le=n.get(J),Ee=n.get(N);J.addEventListener("dispose",X);const Pe=J.textures,Me=J.isWebGLCubeRenderTarget===!0,St=Pe.length>1;if(St||(Ee.__webglTexture===void 0&&(Ee.__webglTexture=a.createTexture()),Ee.__version=N.version,u.memory.textures++),Me){le.__webglFramebuffer=[];for(let ot=0;ot<6;ot++)if(N.mipmaps&&N.mipmaps.length>0){le.__webglFramebuffer[ot]=[];for(let Lt=0;Lt<N.mipmaps.length;Lt++)le.__webglFramebuffer[ot][Lt]=a.createFramebuffer()}else le.__webglFramebuffer[ot]=a.createFramebuffer()}else{if(N.mipmaps&&N.mipmaps.length>0){le.__webglFramebuffer=[];for(let ot=0;ot<N.mipmaps.length;ot++)le.__webglFramebuffer[ot]=a.createFramebuffer()}else le.__webglFramebuffer=a.createFramebuffer();if(St)for(let ot=0,Lt=Pe.length;ot<Lt;ot++){const Wt=n.get(Pe[ot]);Wt.__webglTexture===void 0&&(Wt.__webglTexture=a.createTexture(),u.memory.textures++)}if(J.samples>0&&Ot(J)===!1){le.__webglMultisampledFramebuffer=a.createFramebuffer(),le.__webglColorRenderbuffer=[],t.bindFramebuffer(a.FRAMEBUFFER,le.__webglMultisampledFramebuffer);for(let ot=0;ot<Pe.length;ot++){const Lt=Pe[ot];le.__webglColorRenderbuffer[ot]=a.createRenderbuffer(),a.bindRenderbuffer(a.RENDERBUFFER,le.__webglColorRenderbuffer[ot]);const Wt=o.convert(Lt.format,Lt.colorSpace),Xe=o.convert(Lt.type),Je=D(Lt.internalFormat,Wt,Xe,Lt.colorSpace,J.isXRRenderTarget===!0),Et=Z(J);a.renderbufferStorageMultisample(a.RENDERBUFFER,Et,Je,J.width,J.height),a.framebufferRenderbuffer(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0+ot,a.RENDERBUFFER,le.__webglColorRenderbuffer[ot])}a.bindRenderbuffer(a.RENDERBUFFER,null),J.depthBuffer&&(le.__webglDepthRenderbuffer=a.createRenderbuffer(),It(le.__webglDepthRenderbuffer,J,!0)),t.bindFramebuffer(a.FRAMEBUFFER,null)}}if(Me){t.bindTexture(a.TEXTURE_CUBE_MAP,Ee.__webglTexture),He(a.TEXTURE_CUBE_MAP,N);for(let ot=0;ot<6;ot++)if(N.mipmaps&&N.mipmaps.length>0)for(let Lt=0;Lt<N.mipmaps.length;Lt++)mt(le.__webglFramebuffer[ot][Lt],J,N,a.COLOR_ATTACHMENT0,a.TEXTURE_CUBE_MAP_POSITIVE_X+ot,Lt);else mt(le.__webglFramebuffer[ot],J,N,a.COLOR_ATTACHMENT0,a.TEXTURE_CUBE_MAP_POSITIVE_X+ot,0);C(N)&&E(a.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(St){for(let ot=0,Lt=Pe.length;ot<Lt;ot++){const Wt=Pe[ot],Xe=n.get(Wt);let Je=a.TEXTURE_2D;(J.isWebGL3DRenderTarget||J.isWebGLArrayRenderTarget)&&(Je=J.isWebGL3DRenderTarget?a.TEXTURE_3D:a.TEXTURE_2D_ARRAY),t.bindTexture(Je,Xe.__webglTexture),He(Je,Wt),mt(le.__webglFramebuffer,J,Wt,a.COLOR_ATTACHMENT0+ot,Je,0),C(Wt)&&E(Je)}t.unbindTexture()}else{let ot=a.TEXTURE_2D;if((J.isWebGL3DRenderTarget||J.isWebGLArrayRenderTarget)&&(ot=J.isWebGL3DRenderTarget?a.TEXTURE_3D:a.TEXTURE_2D_ARRAY),t.bindTexture(ot,Ee.__webglTexture),He(ot,N),N.mipmaps&&N.mipmaps.length>0)for(let Lt=0;Lt<N.mipmaps.length;Lt++)mt(le.__webglFramebuffer[Lt],J,N,a.COLOR_ATTACHMENT0,ot,Lt);else mt(le.__webglFramebuffer,J,N,a.COLOR_ATTACHMENT0,ot,0);C(N)&&E(ot),t.unbindTexture()}J.depthBuffer&&an(J)}function Le(J){const N=J.textures;for(let le=0,Ee=N.length;le<Ee;le++){const Pe=N[le];if(C(Pe)){const Me=B(J),St=n.get(Pe).__webglTexture;t.bindTexture(Me,St),E(Me),t.unbindTexture()}}}const Ke=[],Oe=[];function dt(J){if(J.samples>0){if(Ot(J)===!1){const N=J.textures,le=J.width,Ee=J.height;let Pe=a.COLOR_BUFFER_BIT;const Me=J.stencilBuffer?a.DEPTH_STENCIL_ATTACHMENT:a.DEPTH_ATTACHMENT,St=n.get(J),ot=N.length>1;if(ot)for(let Wt=0;Wt<N.length;Wt++)t.bindFramebuffer(a.FRAMEBUFFER,St.__webglMultisampledFramebuffer),a.framebufferRenderbuffer(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0+Wt,a.RENDERBUFFER,null),t.bindFramebuffer(a.FRAMEBUFFER,St.__webglFramebuffer),a.framebufferTexture2D(a.DRAW_FRAMEBUFFER,a.COLOR_ATTACHMENT0+Wt,a.TEXTURE_2D,null,0);t.bindFramebuffer(a.READ_FRAMEBUFFER,St.__webglMultisampledFramebuffer);const Lt=J.texture.mipmaps;Lt&&Lt.length>0?t.bindFramebuffer(a.DRAW_FRAMEBUFFER,St.__webglFramebuffer[0]):t.bindFramebuffer(a.DRAW_FRAMEBUFFER,St.__webglFramebuffer);for(let Wt=0;Wt<N.length;Wt++){if(J.resolveDepthBuffer&&(J.depthBuffer&&(Pe|=a.DEPTH_BUFFER_BIT),J.stencilBuffer&&J.resolveStencilBuffer&&(Pe|=a.STENCIL_BUFFER_BIT)),ot){a.framebufferRenderbuffer(a.READ_FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.RENDERBUFFER,St.__webglColorRenderbuffer[Wt]);const Xe=n.get(N[Wt]).__webglTexture;a.framebufferTexture2D(a.DRAW_FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,Xe,0)}a.blitFramebuffer(0,0,le,Ee,0,0,le,Ee,Pe,a.NEAREST),d===!0&&(Ke.length=0,Oe.length=0,Ke.push(a.COLOR_ATTACHMENT0+Wt),J.depthBuffer&&J.resolveDepthBuffer===!1&&(Ke.push(Me),Oe.push(Me),a.invalidateFramebuffer(a.DRAW_FRAMEBUFFER,Oe)),a.invalidateFramebuffer(a.READ_FRAMEBUFFER,Ke))}if(t.bindFramebuffer(a.READ_FRAMEBUFFER,null),t.bindFramebuffer(a.DRAW_FRAMEBUFFER,null),ot)for(let Wt=0;Wt<N.length;Wt++){t.bindFramebuffer(a.FRAMEBUFFER,St.__webglMultisampledFramebuffer),a.framebufferRenderbuffer(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0+Wt,a.RENDERBUFFER,St.__webglColorRenderbuffer[Wt]);const Xe=n.get(N[Wt]).__webglTexture;t.bindFramebuffer(a.FRAMEBUFFER,St.__webglFramebuffer),a.framebufferTexture2D(a.DRAW_FRAMEBUFFER,a.COLOR_ATTACHMENT0+Wt,a.TEXTURE_2D,Xe,0)}t.bindFramebuffer(a.DRAW_FRAMEBUFFER,St.__webglMultisampledFramebuffer)}else if(J.depthBuffer&&J.resolveDepthBuffer===!1&&d){const N=J.stencilBuffer?a.DEPTH_STENCIL_ATTACHMENT:a.DEPTH_ATTACHMENT;a.invalidateFramebuffer(a.DRAW_FRAMEBUFFER,[N])}}}function Z(J){return Math.min(s.maxSamples,J.samples)}function Ot(J){const N=n.get(J);return J.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&N.__useRenderToTexture!==!1}function yt(J){const N=u.render.frame;y.get(J)!==N&&(y.set(J,N),J.update())}function Pt(J,N){const le=J.colorSpace,Ee=J.format,Pe=J.type;return J.isCompressedTexture===!0||J.isVideoTexture===!0||le!==po&&le!==Fl&&(On.getTransfer(le)===$n?(Ee!==ts||Pe!==ws)&&Mt("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):Vt("WebGLTextures: Unsupported texture color space:",le)),N}function it(J){return typeof HTMLImageElement<"u"&&J instanceof HTMLImageElement?(g.width=J.naturalWidth||J.width,g.height=J.naturalHeight||J.height):typeof VideoFrame<"u"&&J instanceof VideoFrame?(g.width=J.displayWidth,g.height=J.displayHeight):(g.width=J.width,g.height=J.height),g}this.allocateTextureUnit=j,this.resetTextureUnits=ie,this.setTexture2D=fe,this.setTexture2DArray=Y,this.setTexture3D=$,this.setTextureCube=pe,this.rebindTextures=yn,this.setupRenderTarget=Xt,this.updateRenderTargetMipmap=Le,this.updateMultisampleRenderTarget=dt,this.setupDepthRenderbuffer=an,this.setupFrameBufferTexture=mt,this.useMultisampledRTT=Ot,this.isReversedDepthBuffer=function(){return t.buffers.depth.getReversed()}}function FT(a,e){function t(n,s=Fl){let o;const u=On.getTransfer(s);if(n===ws)return a.UNSIGNED_BYTE;if(n===Ky)return a.UNSIGNED_SHORT_4_4_4_4;if(n===Zy)return a.UNSIGNED_SHORT_5_5_5_1;if(n===tS)return a.UNSIGNED_INT_5_9_9_9_REV;if(n===nS)return a.UNSIGNED_INT_10F_11F_11F_REV;if(n===Yy)return a.BYTE;if(n===qy)return a.SHORT;if(n===dd)return a.UNSIGNED_SHORT;if(n===qm)return a.INT;if(n===ia)return a.UNSIGNED_INT;if(n===Ci)return a.FLOAT;if(n===Wi)return a.HALF_FLOAT;if(n===iS)return a.ALPHA;if(n===sS)return a.RGB;if(n===ts)return a.RGBA;if(n===Qo)return a.DEPTH_COMPONENT;if(n===Vc)return a.DEPTH_STENCIL;if(n===Km)return a.RED;if(n===Zm)return a.RED_INTEGER;if(n===_f)return a.RG;if(n===Qy)return a.RG_INTEGER;if(n===jy)return a.RGBA_INTEGER;if(n===Mm||n===Em||n===Tm||n===Cm)if(u===$n)if(o=e.get("WEBGL_compressed_texture_s3tc_srgb"),o!==null){if(n===Mm)return o.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===Em)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===Tm)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===Cm)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(o=e.get("WEBGL_compressed_texture_s3tc"),o!==null){if(n===Mm)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Em)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===Tm)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===Cm)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===ty||n===ny||n===iy||n===sy)if(o=e.get("WEBGL_compressed_texture_pvrtc"),o!==null){if(n===ty)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===ny)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===iy)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===sy)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===ry||n===ay||n===oy||n===ly||n===cy||n===uy||n===fy)if(o=e.get("WEBGL_compressed_texture_etc"),o!==null){if(n===ry||n===ay)return u===$n?o.COMPRESSED_SRGB8_ETC2:o.COMPRESSED_RGB8_ETC2;if(n===oy)return u===$n?o.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:o.COMPRESSED_RGBA8_ETC2_EAC;if(n===ly)return o.COMPRESSED_R11_EAC;if(n===cy)return o.COMPRESSED_SIGNED_R11_EAC;if(n===uy)return o.COMPRESSED_RG11_EAC;if(n===fy)return o.COMPRESSED_SIGNED_RG11_EAC}else return null;if(n===hy||n===dy||n===py||n===my||n===gy||n===vy||n===yy||n===_y||n===xy||n===Ay||n===Sy||n===by||n===My||n===Ey)if(o=e.get("WEBGL_compressed_texture_astc"),o!==null){if(n===hy)return u===$n?o.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:o.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===dy)return u===$n?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:o.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===py)return u===$n?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:o.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===my)return u===$n?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:o.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===gy)return u===$n?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:o.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===vy)return u===$n?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:o.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===yy)return u===$n?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:o.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===_y)return u===$n?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:o.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===xy)return u===$n?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:o.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===Ay)return u===$n?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:o.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===Sy)return u===$n?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:o.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===by)return u===$n?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:o.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===My)return u===$n?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:o.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===Ey)return u===$n?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:o.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===Ty||n===Cy||n===wy)if(o=e.get("EXT_texture_compression_bptc"),o!==null){if(n===Ty)return u===$n?o.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:o.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===Cy)return o.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===wy)return o.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===Ry||n===By||n===Dy||n===Iy)if(o=e.get("EXT_texture_compression_rgtc"),o!==null){if(n===Ry)return o.COMPRESSED_RED_RGTC1_EXT;if(n===By)return o.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===Dy)return o.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===Iy)return o.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===pd?a.UNSIGNED_INT_24_8:a[n]!==void 0?a[n]:null}return{convert:t}}const wN=` 4028void main() { 4029 4030 gl_Position = vec4( position, 1.0 ); 4031 4032}`,RN=` 4033uniform sampler2DArray depthColor; 4034uniform float depthWidth; 4035uniform float depthHeight; 4036 4037void main() { 4038 4039 vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); 4040 4041 if ( coord.x >= 1.0 ) { 4042 4043 gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; 4044 4045 } else { 4046 4047 gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; 4048 4049 } 4050 4051}`;class BN{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t){if(this.texture===null){const n=new gS(e.texture);(e.depthNear!==t.depthNear||e.depthFar!==t.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=n}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,n=new br({vertexShader:wN,fragmentShader:RN,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new wi(new tu(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class DN extends jo{constructor(e,t){super();const n=this;let s=null,o=1,u=null,h="local-floor",d=1,g=null,y=null,v=null,x=null,S=null,M=null;const w=typeof XRWebGLBinding<"u",C=new BN,E={},B=t.getContextAttributes();let D=null,U=null;const z=[],P=[],X=new We;let k=null;const I=new gs;I.viewport=new li;const O=new gs;O.viewport=new li;const q=[I,O],ie=new TT;let j=null,re=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(me){let Fe=z[me];return Fe===void 0&&(Fe=new Vv,z[me]=Fe),Fe.getTargetRaySpace()},this.getControllerGrip=function(me){let Fe=z[me];return Fe===void 0&&(Fe=new Vv,z[me]=Fe),Fe.getGripSpace()},this.getHand=function(me){let Fe=z[me];return Fe===void 0&&(Fe=new Vv,z[me]=Fe),Fe.getHandSpace()};function fe(me){const Fe=P.indexOf(me.inputSource);if(Fe===-1)return;const mt=z[Fe];mt!==void 0&&(mt.update(me.inputSource,me.frame,g||u),mt.dispatchEvent({type:me.type,data:me.inputSource}))}function Y(){s.removeEventListener("select",fe),s.removeEventListener("selectstart",fe),s.removeEventListener("selectend",fe),s.removeEventListener("squeeze",fe),s.removeEventListener("squeezestart",fe),s.removeEventListener("squeezeend",fe),s.removeEventListener("end",Y),s.removeEventListener("inputsourceschange",$);for(let me=0;me<z.length;me++){const Fe=P[me];Fe!==null&&(P[me]=null,z[me].disconnect(Fe))}j=null,re=null,C.reset();for(const me in E)delete E[me];e.setRenderTarget(D),S=null,x=null,v=null,s=null,U=null,qt.stop(),n.isPresenting=!1,e.setPixelRatio(k),e.setSize(X.width,X.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(me){o=me,n.isPresenting===!0&&Mt("WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(me){h=me,n.isPresenting===!0&&Mt("WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return g||u},this.setReferenceSpace=function(me){g=me},this.getBaseLayer=function(){return x!==null?x:S},this.getBinding=function(){return v===null&&w&&(v=new XRWebGLBinding(s,t)),v},this.getFrame=function(){return M},this.getSession=function(){return s},this.setSession=async function(me){if(s=me,s!==null){if(D=e.getRenderTarget(),s.addEventListener("select",fe),s.addEventListener("selectstart",fe),s.addEventListener("selectend",fe),s.addEventListener("squeeze",fe),s.addEventListener("squeezestart",fe),s.addEventListener("squeezeend",fe),s.addEventListener("end",Y),s.addEventListener("inputsourceschange",$),B.xrCompatible!==!0&&await t.makeXRCompatible(),k=e.getPixelRatio(),e.getSize(X),w&&"createProjectionLayer"in XRWebGLBinding.prototype){let mt=null,It=null,wt=null;B.depth&&(wt=B.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,mt=B.stencil?Vc:Qo,It=B.stencil?pd:ia);const an={colorFormat:t.RGBA8,depthFormat:wt,scaleFactor:o};v=this.getBinding(),x=v.createProjectionLayer(an),s.updateRenderState({layers:[x]}),e.setPixelRatio(1),e.setSize(x.textureWidth,x.textureHeight,!1),U=new Sr(x.textureWidth,x.textureHeight,{format:ts,type:ws,depthTexture:new Sd(x.textureWidth,x.textureHeight,It,void 0,void 0,void 0,void 0,void 0,void 0,mt),stencilBuffer:B.stencil,colorSpace:e.outputColorSpace,samples:B.antialias?4:0,resolveDepthBuffer:x.ignoreDepthValues===!1,resolveStencilBuffer:x.ignoreDepthValues===!1})}else{const mt={antialias:B.antialias,alpha:!0,depth:B.depth,stencil:B.stencil,framebufferScaleFactor:o};S=new XRWebGLLayer(s,t,mt),s.updateRenderState({baseLayer:S}),e.setPixelRatio(1),e.setSize(S.framebufferWidth,S.framebufferHeight,!1),U=new Sr(S.framebufferWidth,S.framebufferHeight,{format:ts,type:ws,colorSpace:e.outputColorSpace,stencilBuffer:B.stencil,resolveDepthBuffer:S.ignoreDepthValues===!1,resolveStencilBuffer:S.ignoreDepthValues===!1})}U.isXRRenderTarget=!0,this.setFoveation(d),g=null,u=await s.requestReferenceSpace(h),qt.setContext(s),qt.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(s!==null)return s.environmentBlendMode},this.getDepthTexture=function(){return C.getDepthTexture()};function $(me){for(let Fe=0;Fe<me.removed.length;Fe++){const mt=me.removed[Fe],It=P.indexOf(mt);It>=0&&(P[It]=null,z[It].disconnect(mt))}for(let Fe=0;Fe<me.added.length;Fe++){const mt=me.added[Fe];let It=P.indexOf(mt);if(It===-1){for(let an=0;an<z.length;an++)if(an>=P.length){P.push(mt),It=an;break}else if(P[an]===null){P[an]=mt,It=an;break}if(It===-1)break}const wt=z[It];wt&&wt.connect(mt)}}const pe=new K,Be=new K;function Ae(me,Fe,mt){pe.setFromMatrixPosition(Fe.matrixWorld),Be.setFromMatrixPosition(mt.matrixWorld);const It=pe.distanceTo(Be),wt=Fe.projectionMatrix.elements,an=mt.projectionMatrix.elements,yn=wt[14]/(wt[10]-1),Xt=wt[14]/(wt[10]+1),Le=(wt[9]+1)/wt[5],Ke=(wt[9]-1)/wt[5],Oe=(wt[8]-1)/wt[0],dt=(an[8]+1)/an[0],Z=yn*Oe,Ot=yn*dt,yt=It/(-Oe+dt),Pt=yt*-Oe;if(Fe.matrixWorld.decompose(me.position,me.quaternion,me.scale),me.translateX(Pt),me.translateZ(yt),me.matrixWorld.compose(me.position,me.quaternion,me.scale),me.matrixWorldInverse.copy(me.matrixWorld).invert(),wt[10]===-1)me.projectionMatrix.copy(Fe.projectionMatrix),me.projectionMatrixInverse.copy(Fe.projectionMatrixInverse);else{const it=yn+yt,J=Xt+yt,N=Z-Pt,le=Ot+(It-Pt),Ee=Le*Xt/J*it,Pe=Ke*Xt/J*it;me.projectionMatrix.makePerspective(N,le,Ee,Pe,it,J),me.projectionMatrixInverse.copy(me.projectionMatrix).invert()}}function De(me,Fe){Fe===null?me.matrixWorld.copy(me.matrix):me.matrixWorld.multiplyMatrices(Fe.matrixWorld,me.matrix),me.matrixWorldInverse.copy(me.matrixWorld).invert()}this.updateCamera=function(me){if(s===null)return;let Fe=me.near,mt=me.far;C.texture!==null&&(C.depthNear>0&&(Fe=C.depthNear),C.depthFar>0&&(mt=C.depthFar)),ie.near=O.near=I.near=Fe,ie.far=O.far=I.far=mt,(j!==ie.near||re!==ie.far)&&(s.updateRenderState({depthNear:ie.near,depthFar:ie.far}),j=ie.near,re=ie.far),ie.layers.mask=me.layers.mask|6,I.layers.mask=ie.layers.mask&3,O.layers.mask=ie.layers.mask&5;const It=me.parent,wt=ie.cameras;De(ie,It);for(let an=0;an<wt.length;an++)De(wt[an],It);wt.length===2?Ae(ie,I,O):ie.projectionMatrix.copy(I.projectionMatrix),He(me,ie,It)};function He(me,Fe,mt){mt===null?me.matrix.copy(Fe.matrixWorld):(me.matrix.copy(mt.matrixWorld),me.matrix.invert(),me.matrix.multiply(Fe.matrixWorld)),me.matrix.decompose(me.position,me.quaternion,me.scale),me.updateMatrixWorld(!0),me.projectionMatrix.copy(Fe.projectionMatrix),me.projectionMatrixInverse.copy(Fe.projectionMatrixInverse),me.isPerspectiveCamera&&(me.fov=_d*2*Math.atan(1/me.projectionMatrix.elements[5]),me.zoom=1)}this.getCamera=function(){return ie},this.getFoveation=function(){if(!(x===null&&S===null))return d},this.setFoveation=function(me){d=me,x!==null&&(x.fixedFoveation=me),S!==null&&S.fixedFoveation!==void 0&&(S.fixedFoveation=me)},this.hasDepthSensing=function(){return C.texture!==null},this.getDepthSensingMesh=function(){return C.getMesh(ie)},this.getCameraTexture=function(me){return E[me]};let Ve=null;function bt(me,Fe){if(y=Fe.getViewerPose(g||u),M=Fe,y!==null){const mt=y.views;S!==null&&(e.setRenderTargetFramebuffer(U,S.framebuffer),e.setRenderTarget(U));let It=!1;mt.length!==ie.cameras.length&&(ie.cameras.length=0,It=!0);for(let Xt=0;Xt<mt.length;Xt++){const Le=mt[Xt];let Ke=null;if(S!==null)Ke=S.getViewport(Le);else{const dt=v.getViewSubImage(x,Le);Ke=dt.viewport,Xt===0&&(e.setRenderTargetTextures(U,dt.colorTexture,dt.depthStencilTexture),e.setRenderTarget(U))}let Oe=q[Xt];Oe===void 0&&(Oe=new gs,Oe.layers.enable(Xt),Oe.viewport=new li,q[Xt]=Oe),Oe.matrix.fromArray(Le.transform.matrix),Oe.matrix.decompose(Oe.position,Oe.quaternion,Oe.scale),Oe.projectionMatrix.fromArray(Le.projectionMatrix),Oe.projectionMatrixInverse.copy(Oe.projectionMatrix).invert(),Oe.viewport.set(Ke.x,Ke.y,Ke.width,Ke.height),Xt===0&&(ie.matrix.copy(Oe.matrix),ie.matrix.decompose(ie.position,ie.quaternion,ie.scale)),It===!0&&ie.cameras.push(Oe)}const wt=s.enabledFeatures;if(wt&&wt.includes("depth-sensing")&&s.depthUsage=="gpu-optimized"&&w){v=n.getBinding();const Xt=v.getDepthInformation(mt[0]);Xt&&Xt.isValid&&Xt.texture&&C.init(Xt,s.renderState)}if(wt&&wt.includes("camera-access")&&w){e.state.unbindTexture(),v=n.getBinding();for(let Xt=0;Xt<mt.length;Xt++){const Le=mt[Xt].camera;if(Le){let Ke=E[Le];Ke||(Ke=new gS,E[Le]=Ke);const Oe=v.getCameraImage(Le);Ke.sourceTexture=Oe}}}}for(let mt=0;mt<z.length;mt++){const It=P[mt],wt=z[mt];It!==null&&wt!==void 0&&wt.update(It,Fe,g||u)}Ve&&Ve(me,Fe),Fe.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:Fe}),M=null}const qt=new DT;qt.setAnimationLoop(bt),this.setAnimationLoop=function(me){Ve=me},this.dispose=function(){}}}const nf=new sa,IN=new jt;function LN(a,e){function t(C,E){C.matrixAutoUpdate===!0&&C.updateMatrix(),E.value.copy(C.matrix)}function n(C,E){E.color.getRGB(C.fogColor.value,zE(a)),E.isFog?(C.fogNear.value=E.near,C.fogFar.value=E.far):E.isFogExp2&&(C.fogDensity.value=E.density)}function s(C,E,B,D,U){E.isMeshBasicMaterial||E.isMeshLambertMaterial?o(C,E):E.isMeshToonMaterial?(o(C,E),v(C,E)):E.isMeshPhongMaterial?(o(C,E),y(C,E)):E.isMeshStandardMaterial?(o(C,E),x(C,E),E.isMeshPhysicalMaterial&&S(C,E,U)):E.isMeshMatcapMaterial?(o(C,E),M(C,E)):E.isMeshDepthMaterial?o(C,E):E.isMeshDistanceMaterial?(o(C,E),w(C,E)):E.isMeshNormalMaterial?o(C,E):E.isLineBasicMaterial?(u(C,E),E.isLineDashedMaterial&&h(C,E)):E.isPointsMaterial?d(C,E,B,D):E.isSpriteMaterial?g(C,E):E.isShadowMaterial?(C.color.value.copy(E.color),C.opacity.value=E.opacity):E.isShaderMaterial&&(E.uniformsNeedUpdate=!1)}function o(C,E){C.opacity.value=E.opacity,E.color&&C.diffuse.value.copy(E.color),E.emissive&&C.emissive.value.copy(E.emissive).multiplyScalar(E.emissiveIntensity),E.map&&(C.map.value=E.map,t(E.map,C.mapTransform)),E.alphaMap&&(C.alphaMap.value=E.alphaMap,t(E.alphaMap,C.alphaMapTransform)),E.bumpMap&&(C.bumpMap.value=E.bumpMap,t(E.bumpMap,C.bumpMapTransform),C.bumpScale.value=E.bumpScale,E.side===Ar&&(C.bumpScale.value*=-1)),E.normalMap&&(C.normalMap.value=E.normalMap,t(E.normalMap,C.normalMapTransform),C.normalScale.value.copy(E.normalScale),E.side===Ar&&C.normalScale.value.negate()),E.displacementMap&&(C.displacementMap.value=E.displacementMap,t(E.displacementMap,C.displacementMapTransform),C.displacementScale.value=E.displacementScale,C.displacementBias.value=E.displacementBias),E.emissiveMap&&(C.emissiveMap.value=E.emissiveMap,t(E.emissiveMap,C.emissiveMapTransform)),E.specularMap&&(C.specularMap.value=E.specularMap,t(E.specularMap,C.specularMapTransform)),E.alphaTest>0&&(C.alphaTest.value=E.alphaTest);const B=e.get(E),D=B.envMap,U=B.envMapRotation;D&&(C.envMap.value=D,nf.copy(U),nf.x*=-1,nf.y*=-1,nf.z*=-1,D.isCubeTexture&&D.isRenderTargetTexture===!1&&(nf.y*=-1,nf.z*=-1),C.envMapRotation.value.setFromMatrix4(IN.makeRotationFromEuler(nf)),C.flipEnvMap.value=D.isCubeTexture&&D.isRenderTargetTexture===!1?-1:1,C.reflectivity.value=E.reflectivity,C.ior.value=E.ior,C.refractionRatio.value=E.refractionRatio),E.lightMap&&(C.lightMap.value=E.lightMap,C.lightMapIntensity.value=E.lightMapIntensity,t(E.lightMap,C.lightMapTransform)),E.aoMap&&(C.aoMap.value=E.aoMap,C.aoMapIntensity.value=E.aoMapIntensity,t(E.aoMap,C.aoMapTransform))}function u(C,E){C.diffuse.value.copy(E.color),C.opacity.value=E.opacity,E.map&&(C.map.value=E.map,t(E.map,C.mapTransform))}function h(C,E){C.dashSize.value=E.dashSize,C.totalSize.value=E.dashSize+E.gapSize,C.scale.value=E.scale}function d(C,E,B,D){C.diffuse.value.copy(E.color),C.opacity.value=E.opacity,C.size.value=E.size*B,C.scale.value=D*.5,E.map&&(C.map.value=E.map,t(E.map,C.uvTransform)),E.alphaMap&&(C.alphaMap.value=E.alphaMap,t(E.alphaMap,C.alphaMapTransform)),E.alphaTest>0&&(C.alphaTest.value=E.alphaTest)}function g(C,E){C.diffuse.value.copy(E.color),C.opacity.value=E.opacity,C.rotation.value=E.rotation,E.map&&(C.map.value=E.map,t(E.map,C.mapTransform)),E.alphaMap&&(C.alphaMap.value=E.alphaMap,t(E.alphaMap,C.alphaMapTransform)),E.alphaTest>0&&(C.alphaTest.value=E.alphaTest)}function y(C,E){C.specular.value.copy(E.specular),C.shininess.value=Math.max(E.shininess,1e-4)}function v(C,E){E.gradientMap&&(C.gradientMap.value=E.gradientMap)}function x(C,E){C.metalness.value=E.metalness,E.metalnessMap&&(C.metalnessMap.value=E.metalnessMap,t(E.metalnessMap,C.metalnessMapTransform)),C.roughness.value=E.roughness,E.roughnessMap&&(C.roughnessMap.value=E.roughnessMap,t(E.roughnessMap,C.roughnessMapTransform)),E.envMap&&(C.envMapIntensity.value=E.envMapIntensity)}function S(C,E,B){C.ior.value=E.ior,E.sheen>0&&(C.sheenColor.value.copy(E.sheenColor).multiplyScalar(E.sheen),C.sheenRoughness.value=E.sheenRoughness,E.sheenColorMap&&(C.sheenColorMap.value=E.sheenColorMap,t(E.sheenColorMap,C.sheenColorMapTransform)),E.sheenRoughnessMap&&(C.sheenRoughnessMap.value=E.sheenRoughnessMap,t(E.sheenRoughnessMap,C.sheenRoughnessMapTransform))),E.clearcoat>0&&(C.clearcoat.value=E.clearcoat,C.clearcoatRoughness.value=E.clearcoatRoughness,E.clearcoatMap&&(C.clearcoatMap.value=E.clearcoatMap,t(E.clearcoatMap,C.clearcoatMapTransform)),E.clearcoatRoughnessMap&&(C.clearcoatRoughnessMap.value=E.clearcoatRoughnessMap,t(E.clearcoatRoughnessMap,C.clearcoatRoughnessMapTransform)),E.clearcoatNormalMap&&(C.clearcoatNormalMap.value=E.clearcoatNormalMap,t(E.clearcoatNormalMap,C.clearcoatNormalMapTransform),C.clearcoatNormalScale.value.copy(E.clearcoatNormalScale),E.side===Ar&&C.clearcoatNormalScale.value.negate())),E.dispersion>0&&(C.dispersion.value=E.dispersion),E.iridescence>0&&(C.iridescence.value=E.iridescence,C.iridescenceIOR.value=E.iridescenceIOR,C.iridescenceThicknessMinimum.value=E.iridescenceThicknessRange[0],C.iridescenceThicknessMaximum.value=E.iridescenceThicknessRange[1],E.iridescenceMap&&(C.iridescenceMap.value=E.iridescenceMap,t(E.iridescenceMap,C.iridescenceMapTransform)),E.iridescenceThicknessMap&&(C.iridescenceThicknessMap.value=E.iridescenceThicknessMap,t(E.iridescenceThicknessMap,C.iridescenceThicknessMapTransform))),E.transmission>0&&(C.transmission.value=E.transmission,C.transmissionSamplerMap.value=B.texture,C.transmissionSamplerSize.value.set(B.width,B.height),E.transmissionMap&&(C.transmissionMap.value=E.transmissionMap,t(E.transmissionMap,C.transmissionMapTransform)),C.thickness.value=E.thickness,E.thicknessMap&&(C.thicknessMap.value=E.thicknessMap,t(E.thicknessMap,C.thicknessMapTransform)),C.attenuationDistance.value=E.attenuationDistance,C.attenuationColor.value.copy(E.attenuationColor)),E.anisotropy>0&&(C.anisotropyVector.value.set(E.anisotropy*Math.cos(E.anisotropyRotation),E.anisotropy*Math.sin(E.anisotropyRotation)),E.anisotropyMap&&(C.anisotropyMap.value=E.anisotropyMap,t(E.anisotropyMap,C.anisotropyMapTransform))),C.specularIntensity.value=E.specularIntensity,C.specularColor.value.copy(E.specularColor),E.specularColorMap&&(C.specularColorMap.value=E.specularColorMap,t(E.specularColorMap,C.specularColorMapTransform)),E.specularIntensityMap&&(C.specularIntensityMap.value=E.specularIntensityMap,t(E.specularIntensityMap,C.specularIntensityMapTransform))}function M(C,E){E.matcap&&(C.matcap.value=E.matcap)}function w(C,E){const B=e.get(E).light;C.referencePosition.value.setFromMatrixPosition(B.matrixWorld),C.nearDistance.value=B.shadow.camera.near,C.farDistance.value=B.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:s}}function UN(a,e,t,n){let s={},o={},u=[];const h=a.getParameter(a.MAX_UNIFORM_BUFFER_BINDINGS);function d(B,D){const U=D.program;n.uniformBlockBinding(B,U)}function g(B,D){let U=s[B.id];U===void 0&&(M(B),U=y(B),s[B.id]=U,B.addEventListener("dispose",C));const z=D.program;n.updateUBOMapping(B,z);const P=e.render.frame;o[B.id]!==P&&(x(B),o[B.id]=P)}function y(B){const D=v();B.__bindingPointIndex=D;const U=a.createBuffer(),z=B.__size,P=B.usage;return a.bindBuffer(a.UNIFORM_BUFFER,U),a.bufferData(a.UNIFORM_BUFFER,z,P),a.bindBuffer(a.UNIFORM_BUFFER,null),a.bindBufferBase(a.UNIFORM_BUFFER,D,U),U}function v(){for(let B=0;B<h;B++)if(u.indexOf(B)===-1)return u.push(B),B;return Vt("WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function x(B){const D=s[B.id],U=B.uniforms,z=B.__cache;a.bindBuffer(a.UNIFORM_BUFFER,D);for(let P=0,X=U.length;P<X;P++){const k=Array.isArray(U[P])?U[P]:[U[P]];for(let I=0,O=k.length;I<O;I++){const q=k[I];if(S(q,P,I,z)===!0){const ie=q.__offset,j=Array.isArray(q.value)?q.value:[q.value];let re=0;for(let fe=0;fe<j.length;fe++){const Y=j[fe],$=w(Y);typeof Y=="number"||typeof Y=="boolean"?(q.__data[0]=Y,a.bufferSubData(a.UNIFORM_BUFFER,ie+re,q.__data)):Y.isMatrix3?(q.__data[0]=Y.elements[0],q.__data[1]=Y.elements[1],q.__data[2]=Y.elements[2],q.__data[3]=0,q.__data[4]=Y.elements[3],q.__data[5]=Y.elements[4],q.__data[6]=Y.elements[5],q.__data[7]=0,q.__data[8]=Y.elements[6],q.__data[9]=Y.elements[7],q.__data[10]=Y.elements[8],q.__data[11]=0):(Y.toArray(q.__data,re),re+=$.storage/Float32Array.BYTES_PER_ELEMENT)}a.bufferSubData(a.UNIFORM_BUFFER,ie,q.__data)}}}a.bindBuffer(a.UNIFORM_BUFFER,null)}function S(B,D,U,z){const P=B.value,X=D+"_"+U;if(z[X]===void 0)return typeof P=="number"||typeof P=="boolean"?z[X]=P:z[X]=P.clone(),!0;{const k=z[X];if(typeof P=="number"||typeof P=="boolean"){if(k!==P)return z[X]=P,!0}else if(k.equals(P)===!1)return k.copy(P),!0}return!1}function M(B){const D=B.uniforms;let U=0;const z=16;for(let X=0,k=D.length;X<k;X++){const I=Array.isArray(D[X])?D[X]:[D[X]];for(let O=0,q=I.length;O<q;O++){const ie=I[O],j=Array.isArray(ie.value)?ie.value:[ie.value];for(let re=0,fe=j.length;re<fe;re++){const Y=j[re],$=w(Y),pe=U%z,Be=pe%$.boundary,Ae=pe+Be;U+=Be,Ae!==0&&z-Ae<$.storage&&(U+=z-Ae),ie.__data=new Float32Array($.storage/Float32Array.BYTES_PER_ELEMENT),ie.__offset=U,U+=$.storage}}}const P=U%z;return P>0&&(U+=z-P),B.__size=U,B.__cache={},this}function w(B){const D={boundary:0,storage:0};return typeof B=="number"||typeof B=="boolean"?(D.boundary=4,D.storage=4):B.isVector2?(D.boundary=8,D.storage=8):B.isVector3||B.isColor?(D.boundary=16,D.storage=12):B.isVector4?(D.boundary=16,D.storage=16):B.isMatrix3?(D.boundary=48,D.storage=48):B.isMatrix4?(D.boundary=64,D.storage=64):B.isTexture?Mt("WebGLRenderer: Texture samplers can not be part of an uniforms group."):Mt("WebGLRenderer: Unsupported uniform value type.",B),D}function C(B){const D=B.target;D.removeEventListener("dispose",C);const U=u.indexOf(D.__bindingPointIndex);u.splice(U,1),a.deleteBuffer(s[D.id]),delete s[D.id],delete o[D.id]}function E(){for(const B in s)a.deleteBuffer(s[B]);u=[],s={},o={}}return{bind:d,update:g,dispose:E}}const NN=new Uint16Array([12469,15057,12620,14925,13266,14620,13807,14376,14323,13990,14545,13625,14713,13328,14840,12882,14931,12528,14996,12233,15039,11829,15066,11525,15080,11295,15085,10976,15082,10705,15073,10495,13880,14564,13898,14542,13977,14430,14158,14124,14393,13732,14556,13410,14702,12996,14814,12596,14891,12291,14937,11834,14957,11489,14958,11194,14943,10803,14921,10506,14893,10278,14858,9960,14484,14039,14487,14025,14499,13941,14524,13740,14574,13468,14654,13106,14743,12678,14818,12344,14867,11893,14889,11509,14893,11180,14881,10751,14852,10428,14812,10128,14765,9754,14712,9466,14764,13480,14764,13475,14766,13440,14766,13347,14769,13070,14786,12713,14816,12387,14844,11957,14860,11549,14868,11215,14855,10751,14825,10403,14782,10044,14729,9651,14666,9352,14599,9029,14967,12835,14966,12831,14963,12804,14954,12723,14936,12564,14917,12347,14900,11958,14886,11569,14878,11247,14859,10765,14828,10401,14784,10011,14727,9600,14660,9289,14586,8893,14508,8533,15111,12234,15110,12234,15104,12216,15092,12156,15067,12010,15028,11776,14981,11500,14942,11205,14902,10752,14861,10393,14812,9991,14752,9570,14682,9252,14603,8808,14519,8445,14431,8145,15209,11449,15208,11451,15202,11451,15190,11438,15163,11384,15117,11274,15055,10979,14994,10648,14932,10343,14871,9936,14803,9532,14729,9218,14645,8742,14556,8381,14461,8020,14365,7603,15273,10603,15272,10607,15267,10619,15256,10631,15231,10614,15182,10535,15118,10389,15042,10167,14963,9787,14883,9447,14800,9115,14710,8665,14615,8318,14514,7911,14411,7507,14279,7198,15314,9675,15313,9683,15309,9712,15298,9759,15277,9797,15229,9773,15166,9668,15084,9487,14995,9274,14898,8910,14800,8539,14697,8234,14590,7790,14479,7409,14367,7067,14178,6621,15337,8619,15337,8631,15333,8677,15325,8769,15305,8871,15264,8940,15202,8909,15119,8775,15022,8565,14916,8328,14804,8009,14688,7614,14569,7287,14448,6888,14321,6483,14088,6171,15350,7402,15350,7419,15347,7480,15340,7613,15322,7804,15287,7973,15229,8057,15148,8012,15046,7846,14933,7611,14810,7357,14682,7069,14552,6656,14421,6316,14251,5948,14007,5528,15356,5942,15356,5977,15353,6119,15348,6294,15332,6551,15302,6824,15249,7044,15171,7122,15070,7050,14949,6861,14818,6611,14679,6349,14538,6067,14398,5651,14189,5311,13935,4958,15359,4123,15359,4153,15356,4296,15353,4646,15338,5160,15311,5508,15263,5829,15188,6042,15088,6094,14966,6001,14826,5796,14678,5543,14527,5287,14377,4985,14133,4586,13869,4257,15360,1563,15360,1642,15358,2076,15354,2636,15341,3350,15317,4019,15273,4429,15203,4732,15105,4911,14981,4932,14836,4818,14679,4621,14517,4386,14359,4156,14083,3795,13808,3437,15360,122,15360,137,15358,285,15355,636,15344,1274,15322,2177,15281,2765,15215,3223,15120,3451,14995,3569,14846,3567,14681,3466,14511,3305,14344,3121,14037,2800,13753,2467,15360,0,15360,1,15359,21,15355,89,15346,253,15325,479,15287,796,15225,1148,15133,1492,15008,1749,14856,1882,14685,1886,14506,1783,14324,1608,13996,1398,13702,1183]);let Yo=null;function FN(){return Yo===null&&(Yo=new Pa(NN,16,16,_f,Wi),Yo.name="DFG_LUT",Yo.minFilter=Un,Yo.magFilter=Un,Yo.wrapS=Fi,Yo.wrapT=Fi,Yo.generateMipmaps=!1,Yo.needsUpdate=!0),Yo}class kS{constructor(e={}){const{canvas:t=NE(),context:n=null,depth:s=!0,stencil:o=!1,alpha:u=!1,antialias:h=!1,premultipliedAlpha:d=!0,preserveDrawingBuffer:g=!1,powerPreference:y="default",failIfMajorPerformanceCaveat:v=!1,reversedDepthBuffer:x=!1,outputBufferType:S=ws}=e;this.isWebGLRenderer=!0;let M;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");M=n.getContextAttributes().alpha}else M=u;const w=S,C=new Set([jy,Qy,Zm]),E=new Set([ws,ia,dd,pd,Ky,Zy]),B=new Uint32Array(4),D=new Int32Array(4);let U=null,z=null;const P=[],X=[];let k=null;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.toneMapping=Oa,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const I=this;let O=!1;this._outputColorSpace=ks;let q=0,ie=0,j=null,re=-1,fe=null;const Y=new li,$=new li;let pe=null;const Be=new Tt(0);let Ae=0,De=t.width,He=t.height,Ve=1,bt=null,qt=null;const me=new li(0,0,De,He),Fe=new li(0,0,De,He);let mt=!1;const It=new wd;let wt=!1,an=!1;const yn=new jt,Xt=new K,Le=new li,Ke={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let Oe=!1;function dt(){return j===null?Ve:1}let Z=n;function Ot(G,Q){return t.getContext(G,Q)}try{const G={alpha:!0,depth:s,stencil:o,antialias:h,premultipliedAlpha:d,preserveDrawingBuffer:g,powerPreference:y,failIfMajorPerformanceCaveat:v};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Jm}`),t.addEventListener("webglcontextlost",$t,!1),t.addEventListener("webglcontextrestored",Mn,!1),t.addEventListener("webglcontextcreationerror",wn,!1),Z===null){const Q="webgl2";if(Z=Ot(Q,G),Z===null)throw Ot(Q)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(G){throw Vt("WebGLRenderer: "+G.message),G}let yt,Pt,it,J,N,le,Ee,Pe,Me,St,ot,Lt,Wt,Xe,Je,Et,_t,tt,Ht,ce,Se,Qe,At,Ze;function Ue(){yt=new OL(Z),yt.init(),Qe=new FT(Z,yt),Pt=new wL(Z,yt,e,Qe),it=new TN(Z,yt),Pt.reversedDepthBuffer&&x&&it.buffers.depth.setReversed(!0),J=new GL(Z),N=new fN,le=new CN(Z,yt,it,N,Pt,Qe,J),Ee=new BL(I),Pe=new FL(I),Me=new X3(Z),At=new TL(Z,Me),St=new PL(Z,Me,J,At),ot=new kL(Z,St,Me,J),Ht=new HL(Z,Pt,le),Et=new RL(N),Lt=new uN(I,Ee,Pe,yt,Pt,At,Et),Wt=new LN(I,N),Xe=new dN,Je=new _N(yt),tt=new EL(I,Ee,Pe,it,ot,M,d),_t=new MN(I,ot,Pt),Ze=new UN(Z,J,Pt,it),ce=new CL(Z,yt,J),Se=new zL(Z,yt,J),J.programs=Lt.programs,I.capabilities=Pt,I.extensions=yt,I.properties=N,I.renderLists=Xe,I.shadowMap=_t,I.state=it,I.info=J}Ue(),w!==ws&&(k=new XL(w,t.width,t.height,s,o));const ft=new DN(I,Z);this.xr=ft,this.getContext=function(){return Z},this.getContextAttributes=function(){return Z.getContextAttributes()},this.forceContextLoss=function(){const G=yt.get("WEBGL_lose_context");G&&G.loseContext()},this.forceContextRestore=function(){const G=yt.get("WEBGL_lose_context");G&&G.restoreContext()},this.getPixelRatio=function(){return Ve},this.setPixelRatio=function(G){G!==void 0&&(Ve=G,this.setSize(De,He,!1))},this.getSize=function(G){return G.set(De,He)},this.setSize=function(G,Q,oe=!0){if(ft.isPresenting){Mt("WebGLRenderer: Can't change size while VR device is presenting.");return}De=G,He=Q,t.width=Math.floor(G*Ve),t.height=Math.floor(Q*Ve),oe===!0&&(t.style.width=G+"px",t.style.height=Q+"px"),k!==null&&k.setSize(t.width,t.height),this.setViewport(0,0,G,Q)},this.getDrawingBufferSize=function(G){return G.set(De*Ve,He*Ve).floor()},this.setDrawingBufferSize=function(G,Q,oe){De=G,He=Q,Ve=oe,t.width=Math.floor(G*oe),t.height=Math.floor(Q*oe),this.setViewport(0,0,G,Q)},this.setEffects=function(G){if(w===ws){console.error("THREE.WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.");return}if(G){for(let Q=0;Q<G.length;Q++)if(G[Q].isOutputPass===!0){console.warn("THREE.WebGLRenderer: OutputPass is not needed in setEffects(). Tone mapping and color space conversion are applied automatically.");break}}k.setEffects(G||[])},this.getCurrentViewport=function(G){return G.copy(Y)},this.getViewport=function(G){return G.copy(me)},this.setViewport=function(G,Q,oe,ue){G.isVector4?me.set(G.x,G.y,G.z,G.w):me.set(G,Q,oe,ue),it.viewport(Y.copy(me).multiplyScalar(Ve).round())},this.getScissor=function(G){return G.copy(Fe)},this.setScissor=function(G,Q,oe,ue){G.isVector4?Fe.set(G.x,G.y,G.z,G.w):Fe.set(G,Q,oe,ue),it.scissor($.copy(Fe).multiplyScalar(Ve).round())},this.getScissorTest=function(){return mt},this.setScissorTest=function(G){it.setScissorTest(mt=G)},this.setOpaqueSort=function(G){bt=G},this.setTransparentSort=function(G){qt=G},this.getClearColor=function(G){return G.copy(tt.getClearColor())},this.setClearColor=function(){tt.setClearColor(...arguments)},this.getClearAlpha=function(){return tt.getClearAlpha()},this.setClearAlpha=function(){tt.setClearAlpha(...arguments)},this.clear=function(G=!0,Q=!0,oe=!0){let ue=0;if(G){let se=!1;if(j!==null){const Ne=j.texture.format;se=C.has(Ne)}if(se){const Ne=j.texture.type,$e=E.has(Ne),ze=tt.getClearColor(),gt=tt.getClearAlpha(),at=ze.r,Ut=ze.g,ut=ze.b;$e?(B[0]=at,B[1]=Ut,B[2]=ut,B[3]=gt,Z.clearBufferuiv(Z.COLOR,0,B)):(D[0]=at,D[1]=Ut,D[2]=ut,D[3]=gt,Z.clearBufferiv(Z.COLOR,0,D))}else ue|=Z.COLOR_BUFFER_BIT}Q&&(ue|=Z.DEPTH_BUFFER_BIT),oe&&(ue|=Z.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),Z.clear(ue)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",$t,!1),t.removeEventListener("webglcontextrestored",Mn,!1),t.removeEventListener("webglcontextcreationerror",wn,!1),tt.dispose(),Xe.dispose(),Je.dispose(),N.dispose(),Ee.dispose(),Pe.dispose(),ot.dispose(),At.dispose(),Ze.dispose(),Lt.dispose(),ft.dispose(),ft.removeEventListener("sessionstart",Bs),ft.removeEventListener("sessionend",ar),Kt.stop()};function $t(G){G.preventDefault(),Pm("WebGLRenderer: Context Lost."),O=!0}function Mn(){Pm("WebGLRenderer: Context Restored."),O=!1;const G=J.autoReset,Q=_t.enabled,oe=_t.autoUpdate,ue=_t.needsUpdate,se=_t.type;Ue(),J.autoReset=G,_t.enabled=Q,_t.autoUpdate=oe,_t.needsUpdate=ue,_t.type=se}function wn(G){Vt("WebGLRenderer: A WebGL context could not be created. Reason: ",G.statusMessage)}function Ji(G){const Q=G.target;Q.removeEventListener("dispose",Ji),As(Q)}function As(G){ra(G),N.remove(G)}function ra(G){const Q=N.get(G).programs;Q!==void 0&&(Q.forEach(function(oe){Lt.releaseProgram(oe)}),G.isShaderMaterial&&Lt.releaseShaderCache(G))}this.renderBufferDirect=function(G,Q,oe,ue,se,Ne){Q===null&&(Q=Ke);const $e=se.isMesh&&se.matrixWorld.determinant()<0,ze=je(G,Q,oe,ue,se);it.setMaterial(ue,$e);let gt=oe.index,at=1;if(ue.wireframe===!0){if(gt=St.getWireframeAttribute(oe),gt===void 0)return;at=2}const Ut=oe.drawRange,ut=oe.attributes.position;let Dt=Ut.start*at,on=(Ut.start+Ut.count)*at;Ne!==null&&(Dt=Math.max(Dt,Ne.start*at),on=Math.min(on,(Ne.start+Ne.count)*at)),gt!==null?(Dt=Math.max(Dt,0),on=Math.min(on,gt.count)):ut!=null&&(Dt=Math.max(Dt,0),on=Math.min(on,ut.count));const Hn=on-Dt;if(Hn<0||Hn===1/0)return;At.setup(se,ue,ze,oe,gt);let fn,Rt=ce;if(gt!==null&&(fn=Me.get(gt),Rt=Se,Rt.setIndex(fn)),se.isMesh)ue.wireframe===!0?(it.setLineWidth(ue.wireframeLinewidth*dt()),Rt.setMode(Z.LINES)):Rt.setMode(Z.TRIANGLES);else if(se.isLine){let nt=ue.linewidth;nt===void 0&&(nt=1),it.setLineWidth(nt*dt()),se.isLineSegments?Rt.setMode(Z.LINES):se.isLineLoop?Rt.setMode(Z.LINE_LOOP):Rt.setMode(Z.LINE_STRIP)}else se.isPoints?Rt.setMode(Z.POINTS):se.isSprite&&Rt.setMode(Z.TRIANGLES);if(se.isBatchedMesh)if(se._multiDrawInstances!==null)yd("WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),Rt.renderMultiDrawInstances(se._multiDrawStarts,se._multiDrawCounts,se._multiDrawCount,se._multiDrawInstances);else if(yt.get("WEBGL_multi_draw"))Rt.renderMultiDraw(se._multiDrawStarts,se._multiDrawCounts,se._multiDrawCount);else{const nt=se._multiDrawStarts,zt=se._multiDrawCounts,xt=se._multiDrawCount,Pn=gt?Me.get(gt).bytesPerElement:1,Yi=N.get(ue).currentProgram.getUniforms();for(let _n=0;_n<xt;_n++)Yi.setValue(Z,"_gl_DrawID",_n),Rt.render(nt[_n]/Pn,zt[_n])}else if(se.isInstancedMesh)Rt.renderInstances(Dt,Hn,se.count);else if(oe.isInstancedBufferGeometry){const nt=oe._maxInstanceCount!==void 0?oe._maxInstanceCount:1/0,zt=Math.min(oe.instanceCount,nt);Rt.renderInstances(Dt,Hn,zt)}else Rt.render(Dt,Hn)};function aa(G,Q,oe){G.transparent===!0&&G.side===Ua&&G.forceSinglePass===!1?(G.side=Ar,G.needsUpdate=!0,ge(G,Q,oe),G.side=Zo,G.needsUpdate=!0,ge(G,Q,oe),G.side=Ua):ge(G,Q,oe)}this.compile=function(G,Q,oe=null){oe===null&&(oe=G),z=Je.get(oe),z.init(Q),X.push(z),oe.traverseVisible(function(se){se.isLight&&se.layers.test(Q.layers)&&(z.pushLight(se),se.castShadow&&z.pushShadow(se))}),G!==oe&&G.traverseVisible(function(se){se.isLight&&se.layers.test(Q.layers)&&(z.pushLight(se),se.castShadow&&z.pushShadow(se))}),z.setupLights();const ue=new Set;return G.traverse(function(se){if(!(se.isMesh||se.isPoints||se.isLine||se.isSprite))return;const Ne=se.material;if(Ne)if(Array.isArray(Ne))for(let $e=0;$e<Ne.length;$e++){const ze=Ne[$e];aa(ze,oe,se),ue.add(ze)}else aa(Ne,oe,se),ue.add(Ne)}),z=X.pop(),ue},this.compileAsync=function(G,Q,oe=null){const ue=this.compile(G,Q,oe);return new Promise(se=>{function Ne(){if(ue.forEach(function($e){N.get($e).currentProgram.isReady()&&ue.delete($e)}),ue.size===0){se(G);return}setTimeout(Ne,10)}yt.get("KHR_parallel_shader_compile")!==null?Ne():setTimeout(Ne,10)})};let Mr=null;function oa(G){Mr&&Mr(G)}function Bs(){Kt.stop()}function ar(){Kt.start()}const Kt=new DT;Kt.setAnimationLoop(oa),typeof self<"u"&&Kt.setContext(self),this.setAnimationLoop=function(G){Mr=G,ft.setAnimationLoop(G),G===null?Kt.stop():Kt.start()},ft.addEventListener("sessionstart",Bs),ft.addEventListener("sessionend",ar),this.render=function(G,Q){if(Q!==void 0&&Q.isCamera!==!0){Vt("WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(O===!0)return;const oe=ft.enabled===!0&&ft.isPresenting===!0,ue=k!==null&&(j===null||oe)&&k.begin(I,j);if(G.matrixWorldAutoUpdate===!0&&G.updateMatrixWorld(),Q.parent===null&&Q.matrixWorldAutoUpdate===!0&&Q.updateMatrixWorld(),ft.enabled===!0&&ft.isPresenting===!0&&(k===null||k.isCompositing()===!1)&&(ft.cameraAutoUpdate===!0&&ft.updateCamera(Q),Q=ft.getCamera()),G.isScene===!0&&G.onBeforeRender(I,G,Q,j),z=Je.get(G,X.length),z.init(Q),X.push(z),yn.multiplyMatrices(Q.projectionMatrix,Q.matrixWorldInverse),It.setFromProjectionMatrix(yn,ta,Q.reversedDepth),an=this.localClippingEnabled,wt=Et.init(this.clippingPlanes,an),U=Xe.get(G,P.length),U.init(),P.push(U),ft.enabled===!0&&ft.isPresenting===!0){const $e=I.xr.getDepthSensingMesh();$e!==null&&Ss($e,Q,-1/0,I.sortObjects)}Ss(G,Q,0,I.sortObjects),U.finish(),I.sortObjects===!0&&U.sort(bt,qt),Oe=ft.enabled===!1||ft.isPresenting===!1||ft.hasDepthSensing()===!1,Oe&&tt.addToRenderList(U,G),this.info.render.frame++,wt===!0&&Et.beginShadows();const se=z.state.shadowsArray;if(_t.render(se,G,Q),wt===!0&&Et.endShadows(),this.info.autoReset===!0&&this.info.reset(),(ue&&k.hasRenderPass())===!1){const $e=U.opaque,ze=U.transmissive;if(z.setupLights(),Q.isArrayCamera){const gt=Q.cameras;if(ze.length>0)for(let at=0,Ut=gt.length;at<Ut;at++){const ut=gt[at];F($e,ze,G,ut)}Oe&&tt.render(G);for(let at=0,Ut=gt.length;at<Ut;at++){const ut=gt[at];ai(U,G,ut,ut.viewport)}}else ze.length>0&&F($e,ze,G,Q),Oe&&tt.render(G),ai(U,G,Q)}j!==null&&ie===0&&(le.updateMultisampleRenderTarget(j),le.updateRenderTargetMipmap(j)),ue&&k.end(I),G.isScene===!0&&G.onAfterRender(I,G,Q),At.resetDefaultState(),re=-1,fe=null,X.pop(),X.length>0?(z=X[X.length-1],wt===!0&&Et.setGlobalState(I.clippingPlanes,z.state.camera)):z=null,P.pop(),P.length>0?U=P[P.length-1]:U=null};function Ss(G,Q,oe,ue){if(G.visible===!1)return;if(G.layers.test(Q.layers)){if(G.isGroup)oe=G.renderOrder;else if(G.isLOD)G.autoUpdate===!0&&G.update(Q);else if(G.isLight)z.pushLight(G),G.castShadow&&z.pushShadow(G);else if(G.isSprite){if(!G.frustumCulled||It.intersectsSprite(G)){ue&&Le.setFromMatrixPosition(G.matrixWorld).applyMatrix4(yn);const $e=ot.update(G),ze=G.material;ze.visible&&U.push(G,$e,ze,oe,Le.z,null)}}else if((G.isMesh||G.isLine||G.isPoints)&&(!G.frustumCulled||It.intersectsObject(G))){const $e=ot.update(G),ze=G.material;if(ue&&(G.boundingSphere!==void 0?(G.boundingSphere===null&&G.computeBoundingSphere(),Le.copy(G.boundingSphere.center)):($e.boundingSphere===null&&$e.computeBoundingSphere(),Le.copy($e.boundingSphere.center)),Le.applyMatrix4(G.matrixWorld).applyMatrix4(yn)),Array.isArray(ze)){const gt=$e.groups;for(let at=0,Ut=gt.length;at<Ut;at++){const ut=gt[at],Dt=ze[ut.materialIndex];Dt&&Dt.visible&&U.push(G,$e,Dt,oe,Le.z,ut)}}else ze.visible&&U.push(G,$e,ze,oe,Le.z,null)}}const Ne=G.children;for(let $e=0,ze=Ne.length;$e<ze;$e++)Ss(Ne[$e],Q,oe,ue)}function ai(G,Q,oe,ue){const{opaque:se,transmissive:Ne,transparent:$e}=G;z.setupLightsView(oe),wt===!0&&Et.setGlobalState(I.clippingPlanes,oe),ue&&it.viewport(Y.copy(ue)),se.length>0&&W(se,Q,oe),Ne.length>0&&W(Ne,Q,oe),$e.length>0&&W($e,Q,oe),it.buffers.depth.setTest(!0),it.buffers.depth.setMask(!0),it.buffers.color.setMask(!0),it.setPolygonOffset(!1)}function F(G,Q,oe,ue){if((oe.isScene===!0?oe.overrideMaterial:null)!==null)return;if(z.state.transmissionRenderTarget[ue.id]===void 0){const Dt=yt.has("EXT_color_buffer_half_float")||yt.has("EXT_color_buffer_float");z.state.transmissionRenderTarget[ue.id]=new Sr(1,1,{generateMipmaps:!0,type:Dt?Wi:ws,minFilter:Fa,samples:Pt.samples,stencilBuffer:o,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:On.workingColorSpace})}const Ne=z.state.transmissionRenderTarget[ue.id],$e=ue.viewport||Y;Ne.setSize($e.z*I.transmissionResolutionScale,$e.w*I.transmissionResolutionScale);const ze=I.getRenderTarget(),gt=I.getActiveCubeFace(),at=I.getActiveMipmapLevel();I.setRenderTarget(Ne),I.getClearColor(Be),Ae=I.getClearAlpha(),Ae<1&&I.setClearColor(16777215,.5),I.clear(),Oe&&tt.render(oe);const Ut=I.toneMapping;I.toneMapping=Oa;const ut=ue.viewport;if(ue.viewport!==void 0&&(ue.viewport=void 0),z.setupLightsView(ue),wt===!0&&Et.setGlobalState(I.clippingPlanes,ue),W(G,oe,ue),le.updateMultisampleRenderTarget(Ne),le.updateRenderTargetMipmap(Ne),yt.has("WEBGL_multisampled_render_to_texture")===!1){let Dt=!1;for(let on=0,Hn=Q.length;on<Hn;on++){const fn=Q[on],{object:Rt,geometry:nt,material:zt,group:xt}=fn;if(zt.side===Ua&&Rt.layers.test(ue.layers)){const Pn=zt.side;zt.side=Ar,zt.needsUpdate=!0,te(Rt,oe,ue,nt,zt,xt),zt.side=Pn,zt.needsUpdate=!0,Dt=!0}}Dt===!0&&(le.updateMultisampleRenderTarget(Ne),le.updateRenderTargetMipmap(Ne))}I.setRenderTarget(ze,gt,at),I.setClearColor(Be,Ae),ut!==void 0&&(ue.viewport=ut),I.toneMapping=Ut}function W(G,Q,oe){const ue=Q.isScene===!0?Q.overrideMaterial:null;for(let se=0,Ne=G.length;se<Ne;se++){const $e=G[se],{object:ze,geometry:gt,group:at}=$e;let Ut=$e.material;Ut.allowOverride===!0&&ue!==null&&(Ut=ue),ze.layers.test(oe.layers)&&te(ze,Q,oe,gt,Ut,at)}}function te(G,Q,oe,ue,se,Ne){G.onBeforeRender(I,Q,oe,ue,se,Ne),G.modelViewMatrix.multiplyMatrices(oe.matrixWorldInverse,G.matrixWorld),G.normalMatrix.getNormalMatrix(G.modelViewMatrix),se.onBeforeRender(I,Q,oe,ue,G,Ne),se.transparent===!0&&se.side===Ua&&se.forceSinglePass===!1?(se.side=Ar,se.needsUpdate=!0,I.renderBufferDirect(oe,Q,ue,se,G,Ne),se.side=Zo,se.needsUpdate=!0,I.renderBufferDirect(oe,Q,ue,se,G,Ne),se.side=Ua):I.renderBufferDirect(oe,Q,ue,se,G,Ne),G.onAfterRender(I,Q,oe,ue,se,Ne)}function ge(G,Q,oe){Q.isScene!==!0&&(Q=Ke);const ue=N.get(G),se=z.state.lights,Ne=z.state.shadowsArray,$e=se.state.version,ze=Lt.getParameters(G,se.state,Ne,Q,oe),gt=Lt.getProgramCacheKey(ze);let at=ue.programs;ue.environment=G.isMeshStandardMaterial?Q.environment:null,ue.fog=Q.fog,ue.envMap=(G.isMeshStandardMaterial?Pe:Ee).get(G.envMap||ue.environment),ue.envMapRotation=ue.environment!==null&&G.envMap===null?Q.environmentRotation:G.envMapRotation,at===void 0&&(G.addEventListener("dispose",Ji),at=new Map,ue.programs=at);let Ut=at.get(gt);if(Ut!==void 0){if(ue.currentProgram===Ut&&ue.lightsStateVersion===$e)return Re(G,ze),Ut}else ze.uniforms=Lt.getUniforms(G),G.onBeforeCompile(ze,I),Ut=Lt.acquireProgram(ze,gt),at.set(gt,Ut),ue.uniforms=ze.uniforms;const ut=ue.uniforms;return(!G.isShaderMaterial&&!G.isRawShaderMaterial||G.clipping===!0)&&(ut.clippingPlanes=Et.uniform),Re(G,ze),ue.needsLights=lt(G),ue.lightsStateVersion=$e,ue.needsLights&&(ut.ambientLightColor.value=se.state.ambient,ut.lightProbe.value=se.state.probe,ut.directionalLights.value=se.state.directional,ut.directionalLightShadows.value=se.state.directionalShadow,ut.spotLights.value=se.state.spot,ut.spotLightShadows.value=se.state.spotShadow,ut.rectAreaLights.value=se.state.rectArea,ut.ltc_1.value=se.state.rectAreaLTC1,ut.ltc_2.value=se.state.rectAreaLTC2,ut.pointLights.value=se.state.point,ut.pointLightShadows.value=se.state.pointShadow,ut.hemisphereLights.value=se.state.hemi,ut.directionalShadowMap.value=se.state.directionalShadowMap,ut.directionalShadowMatrix.value=se.state.directionalShadowMatrix,ut.spotShadowMap.value=se.state.spotShadowMap,ut.spotLightMatrix.value=se.state.spotLightMatrix,ut.spotLightMap.value=se.state.spotLightMap,ut.pointShadowMap.value=se.state.pointShadowMap,ut.pointShadowMatrix.value=se.state.pointShadowMatrix),ue.currentProgram=Ut,ue.uniformsList=null,Ut}function Ce(G){if(G.uniformsList===null){const Q=G.currentProgram.getUniforms();G.uniformsList=Xv.seqWithValue(Q.seq,G.uniforms)}return G.uniformsList}function Re(G,Q){const oe=N.get(G);oe.outputColorSpace=Q.outputColorSpace,oe.batching=Q.batching,oe.batchingColor=Q.batchingColor,oe.instancing=Q.instancing,oe.instancingColor=Q.instancingColor,oe.instancingMorph=Q.instancingMorph,oe.skinning=Q.skinning,oe.morphTargets=Q.morphTargets,oe.morphNormals=Q.morphNormals,oe.morphColors=Q.morphColors,oe.morphTargetsCount=Q.morphTargetsCount,oe.numClippingPlanes=Q.numClippingPlanes,oe.numIntersection=Q.numClipIntersection,oe.vertexAlphas=Q.vertexAlphas,oe.vertexTangents=Q.vertexTangents,oe.toneMapping=Q.toneMapping}function je(G,Q,oe,ue,se){Q.isScene!==!0&&(Q=Ke),le.resetTextureUnits();const Ne=Q.fog,$e=ue.isMeshStandardMaterial?Q.environment:null,ze=j===null?I.outputColorSpace:j.isXRRenderTarget===!0?j.texture.colorSpace:po,gt=(ue.isMeshStandardMaterial?Pe:Ee).get(ue.envMap||$e),at=ue.vertexColors===!0&&!!oe.attributes.color&&oe.attributes.color.itemSize===4,Ut=!!oe.attributes.tangent&&(!!ue.normalMap||ue.anisotropy>0),ut=!!oe.morphAttributes.position,Dt=!!oe.morphAttributes.normal,on=!!oe.morphAttributes.color;let Hn=Oa;ue.toneMapped&&(j===null||j.isXRRenderTarget===!0)&&(Hn=I.toneMapping);const fn=oe.morphAttributes.position||oe.morphAttributes.normal||oe.morphAttributes.color,Rt=fn!==void 0?fn.length:0,nt=N.get(ue),zt=z.state.lights;if(wt===!0&&(an===!0||G!==fe)){const ns=G===fe&&ue.id===re;Et.setState(ue,G,ns)}let xt=!1;ue.version===nt.__version?(nt.needsLights&&nt.lightsStateVersion!==zt.state.version||nt.outputColorSpace!==ze||se.isBatchedMesh&&nt.batching===!1||!se.isBatchedMesh&&nt.batching===!0||se.isBatchedMesh&&nt.batchingColor===!0&&se.colorTexture===null||se.isBatchedMesh&&nt.batchingColor===!1&&se.colorTexture!==null||se.isInstancedMesh&&nt.instancing===!1||!se.isInstancedMesh&&nt.instancing===!0||se.isSkinnedMesh&&nt.skinning===!1||!se.isSkinnedMesh&&nt.skinning===!0||se.isInstancedMesh&&nt.instancingColor===!0&&se.instanceColor===null||se.isInstancedMesh&&nt.instancingColor===!1&&se.instanceColor!==null||se.isInstancedMesh&&nt.instancingMorph===!0&&se.morphTexture===null||se.isInstancedMesh&&nt.instancingMorph===!1&&se.morphTexture!==null||nt.envMap!==gt||ue.fog===!0&&nt.fog!==Ne||nt.numClippingPlanes!==void 0&&(nt.numClippingPlanes!==Et.numPlanes||nt.numIntersection!==Et.numIntersection)||nt.vertexAlphas!==at||nt.vertexTangents!==Ut||nt.morphTargets!==ut||nt.morphNormals!==Dt||nt.morphColors!==on||nt.toneMapping!==Hn||nt.morphTargetsCount!==Rt)&&(xt=!0):(xt=!0,nt.__version=ue.version);let Pn=nt.currentProgram;xt===!0&&(Pn=ge(ue,Q,se));let Yi=!1,_n=!1,ci=!1;const Xn=Pn.getUniforms(),qi=nt.uniforms;if(it.useProgram(Pn.program)&&(Yi=!0,_n=!0,ci=!0),ue.id!==re&&(re=ue.id,_n=!0),Yi||fe!==G){it.buffers.depth.getReversed()&&G.reversedDepth!==!0&&(G._reversedDepth=!0,G.updateProjectionMatrix()),Xn.setValue(Z,"projectionMatrix",G.projectionMatrix),Xn.setValue(Z,"viewMatrix",G.matrixWorldInverse);const is=Xn.map.cameraPosition;is!==void 0&&is.setValue(Z,Xt.setFromMatrixPosition(G.matrixWorld)),Pt.logarithmicDepthBuffer&&Xn.setValue(Z,"logDepthBufFC",2/(Math.log(G.far+1)/Math.LN2)),(ue.isMeshPhongMaterial||ue.isMeshToonMaterial||ue.isMeshLambertMaterial||ue.isMeshBasicMaterial||ue.isMeshStandardMaterial||ue.isShaderMaterial)&&Xn.setValue(Z,"isOrthographic",G.isOrthographicCamera===!0),fe!==G&&(fe=G,_n=!0,ci=!0)}if(nt.needsLights&&(zt.state.directionalShadowMap.length>0&&Xn.setValue(Z,"directionalShadowMap",zt.state.directionalShadowMap,le),zt.state.spotShadowMap.length>0&&Xn.setValue(Z,"spotShadowMap",zt.state.spotShadowMap,le),zt.state.pointShadowMap.length>0&&Xn.setValue(Z,"pointShadowMap",zt.state.pointShadowMap,le)),se.isSkinnedMesh){Xn.setOptional(Z,se,"bindMatrix"),Xn.setOptional(Z,se,"bindMatrixInverse");const ns=se.skeleton;ns&&(ns.boneTexture===null&&ns.computeBoneTexture(),Xn.setValue(Z,"boneTexture",ns.boneTexture,le))}se.isBatchedMesh&&(Xn.setOptional(Z,se,"batchingTexture"),Xn.setValue(Z,"batchingTexture",se._matricesTexture,le),Xn.setOptional(Z,se,"batchingIdTexture"),Xn.setValue(Z,"batchingIdTexture",se._indirectTexture,le),Xn.setOptional(Z,se,"batchingColorTexture"),se._colorsTexture!==null&&Xn.setValue(Z,"batchingColorTexture",se._colorsTexture,le));const Oi=oe.morphAttributes;if((Oi.position!==void 0||Oi.normal!==void 0||Oi.color!==void 0)&&Ht.update(se,oe,Pn),(_n||nt.receiveShadow!==se.receiveShadow)&&(nt.receiveShadow=se.receiveShadow,Xn.setValue(Z,"receiveShadow",se.receiveShadow)),ue.isMeshGouraudMaterial&&ue.envMap!==null&&(qi.envMap.value=gt,qi.flipEnvMap.value=gt.isCubeTexture&>.isRenderTargetTexture===!1?-1:1),ue.isMeshStandardMaterial&&ue.envMap===null&&Q.environment!==null&&(qi.envMapIntensity.value=Q.environmentIntensity),qi.dfgLUT!==void 0&&(qi.dfgLUT.value=FN()),_n&&(Xn.setValue(Z,"toneMappingExposure",I.toneMappingExposure),nt.needsLights&&Ye(qi,ci),Ne&&ue.fog===!0&&Wt.refreshFogUniforms(qi,Ne),Wt.refreshMaterialUniforms(qi,ue,Ve,He,z.state.transmissionRenderTarget[G.id]),Xv.upload(Z,Ce(nt),qi,le)),ue.isShaderMaterial&&ue.uniformsNeedUpdate===!0&&(Xv.upload(Z,Ce(nt),qi,le),ue.uniformsNeedUpdate=!1),ue.isSpriteMaterial&&Xn.setValue(Z,"center",se.center),Xn.setValue(Z,"modelViewMatrix",se.modelViewMatrix),Xn.setValue(Z,"normalMatrix",se.normalMatrix),Xn.setValue(Z,"modelMatrix",se.matrixWorld),ue.isShaderMaterial||ue.isRawShaderMaterial){const ns=ue.uniformsGroups;for(let is=0,$o=ns.length;is<$o;is++){const Er=ns[is];Ze.update(Er,Pn),Ze.bind(Er,Pn)}}return Pn}function Ye(G,Q){G.ambientLightColor.needsUpdate=Q,G.lightProbe.needsUpdate=Q,G.directionalLights.needsUpdate=Q,G.directionalLightShadows.needsUpdate=Q,G.pointLights.needsUpdate=Q,G.pointLightShadows.needsUpdate=Q,G.spotLights.needsUpdate=Q,G.spotLightShadows.needsUpdate=Q,G.rectAreaLights.needsUpdate=Q,G.hemisphereLights.needsUpdate=Q}function lt(G){return G.isMeshLambertMaterial||G.isMeshToonMaterial||G.isMeshPhongMaterial||G.isMeshStandardMaterial||G.isShadowMaterial||G.isShaderMaterial&&G.lights===!0}this.getActiveCubeFace=function(){return q},this.getActiveMipmapLevel=function(){return ie},this.getRenderTarget=function(){return j},this.setRenderTargetTextures=function(G,Q,oe){const ue=N.get(G);ue.__autoAllocateDepthBuffer=G.resolveDepthBuffer===!1,ue.__autoAllocateDepthBuffer===!1&&(ue.__useRenderToTexture=!1),N.get(G.texture).__webglTexture=Q,N.get(G.depthTexture).__webglTexture=ue.__autoAllocateDepthBuffer?void 0:oe,ue.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(G,Q){const oe=N.get(G);oe.__webglFramebuffer=Q,oe.__useDefaultFramebuffer=Q===void 0};const rt=Z.createFramebuffer();this.setRenderTarget=function(G,Q=0,oe=0){j=G,q=Q,ie=oe;let ue=null,se=!1,Ne=!1;if(G){const ze=N.get(G);if(ze.__useDefaultFramebuffer!==void 0){it.bindFramebuffer(Z.FRAMEBUFFER,ze.__webglFramebuffer),Y.copy(G.viewport),$.copy(G.scissor),pe=G.scissorTest,it.viewport(Y),it.scissor($),it.setScissorTest(pe),re=-1;return}else if(ze.__webglFramebuffer===void 0)le.setupRenderTarget(G);else if(ze.__hasExternalTextures)le.rebindTextures(G,N.get(G.texture).__webglTexture,N.get(G.depthTexture).__webglTexture);else if(G.depthBuffer){const Ut=G.depthTexture;if(ze.__boundDepthTexture!==Ut){if(Ut!==null&&N.has(Ut)&&(G.width!==Ut.image.width||G.height!==Ut.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");le.setupDepthRenderbuffer(G)}}const gt=G.texture;(gt.isData3DTexture||gt.isDataArrayTexture||gt.isCompressedArrayTexture)&&(Ne=!0);const at=N.get(G).__webglFramebuffer;G.isWebGLCubeRenderTarget?(Array.isArray(at[Q])?ue=at[Q][oe]:ue=at[Q],se=!0):G.samples>0&&le.useMultisampledRTT(G)===!1?ue=N.get(G).__webglMultisampledFramebuffer:Array.isArray(at)?ue=at[oe]:ue=at,Y.copy(G.viewport),$.copy(G.scissor),pe=G.scissorTest}else Y.copy(me).multiplyScalar(Ve).floor(),$.copy(Fe).multiplyScalar(Ve).floor(),pe=mt;if(oe!==0&&(ue=rt),it.bindFramebuffer(Z.FRAMEBUFFER,ue)&&it.drawBuffers(G,ue),it.viewport(Y),it.scissor($),it.setScissorTest(pe),se){const ze=N.get(G.texture);Z.framebufferTexture2D(Z.FRAMEBUFFER,Z.COLOR_ATTACHMENT0,Z.TEXTURE_CUBE_MAP_POSITIVE_X+Q,ze.__webglTexture,oe)}else if(Ne){const ze=Q;for(let gt=0;gt<G.textures.length;gt++){const at=N.get(G.textures[gt]);Z.framebufferTextureLayer(Z.FRAMEBUFFER,Z.COLOR_ATTACHMENT0+gt,at.__webglTexture,oe,ze)}}else if(G!==null&&oe!==0){const ze=N.get(G.texture);Z.framebufferTexture2D(Z.FRAMEBUFFER,Z.COLOR_ATTACHMENT0,Z.TEXTURE_2D,ze.__webglTexture,oe)}re=-1},this.readRenderTargetPixels=function(G,Q,oe,ue,se,Ne,$e,ze=0){if(!(G&&G.isWebGLRenderTarget)){Vt("WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let gt=N.get(G).__webglFramebuffer;if(G.isWebGLCubeRenderTarget&&$e!==void 0&&(gt=gt[$e]),gt){it.bindFramebuffer(Z.FRAMEBUFFER,gt);try{const at=G.textures[ze],Ut=at.format,ut=at.type;if(!Pt.textureFormatReadable(Ut)){Vt("WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Pt.textureTypeReadable(ut)){Vt("WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}Q>=0&&Q<=G.width-ue&&oe>=0&&oe<=G.height-se&&(G.textures.length>1&&Z.readBuffer(Z.COLOR_ATTACHMENT0+ze),Z.readPixels(Q,oe,ue,se,Qe.convert(Ut),Qe.convert(ut),Ne))}finally{const at=j!==null?N.get(j).__webglFramebuffer:null;it.bindFramebuffer(Z.FRAMEBUFFER,at)}}},this.readRenderTargetPixelsAsync=async function(G,Q,oe,ue,se,Ne,$e,ze=0){if(!(G&&G.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let gt=N.get(G).__webglFramebuffer;if(G.isWebGLCubeRenderTarget&&$e!==void 0&&(gt=gt[$e]),gt)if(Q>=0&&Q<=G.width-ue&&oe>=0&&oe<=G.height-se){it.bindFramebuffer(Z.FRAMEBUFFER,gt);const at=G.textures[ze],Ut=at.format,ut=at.type;if(!Pt.textureFormatReadable(Ut))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Pt.textureTypeReadable(ut))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const Dt=Z.createBuffer();Z.bindBuffer(Z.PIXEL_PACK_BUFFER,Dt),Z.bufferData(Z.PIXEL_PACK_BUFFER,Ne.byteLength,Z.STREAM_READ),G.textures.length>1&&Z.readBuffer(Z.COLOR_ATTACHMENT0+ze),Z.readPixels(Q,oe,ue,se,Qe.convert(Ut),Qe.convert(ut),0);const on=j!==null?N.get(j).__webglFramebuffer:null;it.bindFramebuffer(Z.FRAMEBUFFER,on);const Hn=Z.fenceSync(Z.SYNC_GPU_COMMANDS_COMPLETE,0);return Z.flush(),await Zw(Z,Hn,4),Z.bindBuffer(Z.PIXEL_PACK_BUFFER,Dt),Z.getBufferSubData(Z.PIXEL_PACK_BUFFER,0,Ne),Z.deleteBuffer(Dt),Z.deleteSync(Hn),Ne}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(G,Q=null,oe=0){const ue=Math.pow(2,-oe),se=Math.floor(G.image.width*ue),Ne=Math.floor(G.image.height*ue),$e=Q!==null?Q.x:0,ze=Q!==null?Q.y:0;le.setTexture2D(G,0),Z.copyTexSubImage2D(Z.TEXTURE_2D,oe,0,0,$e,ze,se,Ne),it.unbindTexture()};const ht=Z.createFramebuffer(),st=Z.createFramebuffer();this.copyTextureToTexture=function(G,Q,oe=null,ue=null,se=0,Ne=null){Ne===null&&(se!==0?(yd("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),Ne=se,se=0):Ne=0);let $e,ze,gt,at,Ut,ut,Dt,on,Hn;const fn=G.isCompressedTexture?G.mipmaps[Ne]:G.image;if(oe!==null)$e=oe.max.x-oe.min.x,ze=oe.max.y-oe.min.y,gt=oe.isBox3?oe.max.z-oe.min.z:1,at=oe.min.x,Ut=oe.min.y,ut=oe.isBox3?oe.min.z:0;else{const Oi=Math.pow(2,-se);$e=Math.floor(fn.width*Oi),ze=Math.floor(fn.height*Oi),G.isDataArrayTexture?gt=fn.depth:G.isData3DTexture?gt=Math.floor(fn.depth*Oi):gt=1,at=0,Ut=0,ut=0}ue!==null?(Dt=ue.x,on=ue.y,Hn=ue.z):(Dt=0,on=0,Hn=0);const Rt=Qe.convert(Q.format),nt=Qe.convert(Q.type);let zt;Q.isData3DTexture?(le.setTexture3D(Q,0),zt=Z.TEXTURE_3D):Q.isDataArrayTexture||Q.isCompressedArrayTexture?(le.setTexture2DArray(Q,0),zt=Z.TEXTURE_2D_ARRAY):(le.setTexture2D(Q,0),zt=Z.TEXTURE_2D),Z.pixelStorei(Z.UNPACK_FLIP_Y_WEBGL,Q.flipY),Z.pixelStorei(Z.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Q.premultiplyAlpha),Z.pixelStorei(Z.UNPACK_ALIGNMENT,Q.unpackAlignment);const xt=Z.getParameter(Z.UNPACK_ROW_LENGTH),Pn=Z.getParameter(Z.UNPACK_IMAGE_HEIGHT),Yi=Z.getParameter(Z.UNPACK_SKIP_PIXELS),_n=Z.getParameter(Z.UNPACK_SKIP_ROWS),ci=Z.getParameter(Z.UNPACK_SKIP_IMAGES);Z.pixelStorei(Z.UNPACK_ROW_LENGTH,fn.width),Z.pixelStorei(Z.UNPACK_IMAGE_HEIGHT,fn.height),Z.pixelStorei(Z.UNPACK_SKIP_PIXELS,at),Z.pixelStorei(Z.UNPACK_SKIP_ROWS,Ut),Z.pixelStorei(Z.UNPACK_SKIP_IMAGES,ut);const Xn=G.isDataArrayTexture||G.isData3DTexture,qi=Q.isDataArrayTexture||Q.isData3DTexture;if(G.isDepthTexture){const Oi=N.get(G),ns=N.get(Q),is=N.get(Oi.__renderTarget),$o=N.get(ns.__renderTarget);it.bindFramebuffer(Z.READ_FRAMEBUFFER,is.__webglFramebuffer),it.bindFramebuffer(Z.DRAW_FRAMEBUFFER,$o.__webglFramebuffer);for(let Er=0;Er<gt;Er++)Xn&&(Z.framebufferTextureLayer(Z.READ_FRAMEBUFFER,Z.COLOR_ATTACHMENT0,N.get(G).__webglTexture,se,ut+Er),Z.framebufferTextureLayer(Z.DRAW_FRAMEBUFFER,Z.COLOR_ATTACHMENT0,N.get(Q).__webglTexture,Ne,Hn+Er)),Z.blitFramebuffer(at,Ut,$e,ze,Dt,on,$e,ze,Z.DEPTH_BUFFER_BIT,Z.NEAREST);it.bindFramebuffer(Z.READ_FRAMEBUFFER,null),it.bindFramebuffer(Z.DRAW_FRAMEBUFFER,null)}else if(se!==0||G.isRenderTargetTexture||N.has(G)){const Oi=N.get(G),ns=N.get(Q);it.bindFramebuffer(Z.READ_FRAMEBUFFER,ht),it.bindFramebuffer(Z.DRAW_FRAMEBUFFER,st);for(let is=0;is<gt;is++)Xn?Z.framebufferTextureLayer(Z.READ_FRAMEBUFFER,Z.COLOR_ATTACHMENT0,Oi.__webglTexture,se,ut+is):Z.framebufferTexture2D(Z.READ_FRAMEBUFFER,Z.COLOR_ATTACHMENT0,Z.TEXTURE_2D,Oi.__webglTexture,se),qi?Z.framebufferTextureLayer(Z.DRAW_FRAMEBUFFER,Z.COLOR_ATTACHMENT0,ns.__webglTexture,Ne,Hn+is):Z.framebufferTexture2D(Z.DRAW_FRAMEBUFFER,Z.COLOR_ATTACHMENT0,Z.TEXTURE_2D,ns.__webglTexture,Ne),se!==0?Z.blitFramebuffer(at,Ut,$e,ze,Dt,on,$e,ze,Z.COLOR_BUFFER_BIT,Z.NEAREST):qi?Z.copyTexSubImage3D(zt,Ne,Dt,on,Hn+is,at,Ut,$e,ze):Z.copyTexSubImage2D(zt,Ne,Dt,on,at,Ut,$e,ze);it.bindFramebuffer(Z.READ_FRAMEBUFFER,null),it.bindFramebuffer(Z.DRAW_FRAMEBUFFER,null)}else qi?G.isDataTexture||G.isData3DTexture?Z.texSubImage3D(zt,Ne,Dt,on,Hn,$e,ze,gt,Rt,nt,fn.data):Q.isCompressedArrayTexture?Z.compressedTexSubImage3D(zt,Ne,Dt,on,Hn,$e,ze,gt,Rt,fn.data):Z.texSubImage3D(zt,Ne,Dt,on,Hn,$e,ze,gt,Rt,nt,fn):G.isDataTexture?Z.texSubImage2D(Z.TEXTURE_2D,Ne,Dt,on,$e,ze,Rt,nt,fn.data):G.isCompressedTexture?Z.compressedTexSubImage2D(Z.TEXTURE_2D,Ne,Dt,on,fn.width,fn.height,Rt,fn.data):Z.texSubImage2D(Z.TEXTURE_2D,Ne,Dt,on,$e,ze,Rt,nt,fn);Z.pixelStorei(Z.UNPACK_ROW_LENGTH,xt),Z.pixelStorei(Z.UNPACK_IMAGE_HEIGHT,Pn),Z.pixelStorei(Z.UNPACK_SKIP_PIXELS,Yi),Z.pixelStorei(Z.UNPACK_SKIP_ROWS,_n),Z.pixelStorei(Z.UNPACK_SKIP_IMAGES,ci),Ne===0&&Q.generateMipmaps&&Z.generateMipmap(zt),it.unbindTexture()},this.initRenderTarget=function(G){N.get(G).__webglFramebuffer===void 0&&le.setupRenderTarget(G)},this.initTexture=function(G){G.isCubeTexture?le.setTextureCube(G,0):G.isData3DTexture?le.setTexture3D(G,0):G.isDataArrayTexture||G.isCompressedArrayTexture?le.setTexture2DArray(G,0):le.setTexture2D(G,0),it.unbindTexture()},this.resetState=function(){q=0,ie=0,j=null,it.reset(),At.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return ta}get outputColorSpace(){return this._outputColorSpace}
4051set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=On._getDrawingBufferColorSpace(e),t.unpackColorSpace=On._getUnpackColorSpace()}}const ON=Object.freeze(Object.defineProperty({__proto__:null,ACESFilmicToneMapping:Wy,AddEquation:kc,AddOperation:_E,AdditiveAnimationBlendMode:rS,AdditiveBlending:SA,AgXToneMapping:$A,AlphaFormat:iS,AlwaysCompare:IE,AlwaysDepth:Kv,AlwaysStencilFunc:CA,AmbientLight:xT,AnimationAction:RT,AnimationClip:Md,AnimationLoader:PB,AnimationMixer:c3,AnimationObjectGroup:o3,AnimationUtils:UB,ArcCurve:KE,ArrayCamera:TT,ArrowHelper:N3,AttachedBindMode:EA,Audio:CT,AudioAnalyser:QB,AudioContext:NS,AudioListener:qB,AudioLoader:WB,AxesHelper:F3,BackSide:Ar,BasicDepthPacking:EE,BasicShadowMap:$1,BatchedMesh:WE,Bone:l_,BooleanKeyframeTrack:Cf,Box2:_3,Box3:Rs,Box3Helper:L3,BoxGeometry:Tf,BoxHelper:I3,BufferAttribute:Wn,BufferGeometry:rn,BufferGeometryLoader:MT,ByteType:Yy,Cache:Ko,Camera:s_,CameraHelper:D3,CanvasTexture:iB,CapsuleGeometry:h_,CatmullRomCurve3:ZE,CineonToneMapping:QA,CircleGeometry:d_,ClampToEdgeWrapping:Fi,Clock:FS,Color:Tt,ColorKeyframeTrack:wS,ColorManagement:On,CompressedArrayTexture:tB,CompressedCubeTexture:nB,CompressedTexture:f_,CompressedTextureLoader:zB,ConeGeometry:ng,ConstantAlphaFactor:gE,ConstantColorFactor:pE,Controls:P3,CubeCamera:HE,CubeDepthTexture:YE,CubeReflectionMapping:ho,CubeRefractionMapping:Kc,CubeTexture:Qm,CubeTextureLoader:vT,CubeUVReflectionMapping:Td,CubicBezierCurve:yS,CubicBezierCurve3:QE,CubicInterpolant:dT,CullFaceBack:AA,CullFaceFront:j1,CullFaceFrontBack:uw,CullFaceNone:Q1,Curve:go,CurvePath:$E,CustomBlending:eE,CustomToneMapping:jA,CylinderGeometry:tg,Cylindrical:y3,Data3DTexture:i_,DataArrayTexture:n_,DataTexture:Pa,DataTextureLoader:RS,DataUtils:ff,DecrementStencilOp:Mw,DecrementWrapStencilOp:Tw,DefaultLoadingManager:gT,DepthFormat:Qo,DepthStencilFormat:Vc,DepthTexture:Sd,DetachedBindMode:xE,DirectionalLight:LS,DirectionalLightHelper:B3,DiscreteInterpolant:pT,DodecahedronGeometry:p_,DoubleSide:Ua,DstAlphaFactor:cE,DstColorFactor:fE,DynamicCopyUsage:Hw,DynamicDrawUsage:Nw,DynamicReadUsage:Pw,EdgesGeometry:qE,EllipseCurve:m_,EqualCompare:RE,EqualDepth:Qv,EqualStencilFunc:Bw,EquirectangularReflectionMapping:fd,EquirectangularRefractionMapping:Lm,Euler:sa,EventDispatcher:jo,ExternalTexture:gS,ExtrudeGeometry:g_,FileLoader:Vs,Float16BufferAttribute:LR,Float32BufferAttribute:Nt,FloatType:Ci,Fog:o_,FogExp2:a_,FramebufferTexture:eB,FrontSide:Zo,Frustum:wd,FrustumArray:c_,GLBufferAttribute:p3,GLSL1:Vw,GLSL3:wA,GreaterCompare:BE,GreaterDepth:$v,GreaterEqualCompare:t_,GreaterEqualDepth:jv,GreaterEqualStencilFunc:Uw,GreaterStencilFunc:Iw,GridHelper:w3,Group:Pl,HalfFloatType:Wi,HemisphereLight:_T,HemisphereLightHelper:C3,IcosahedronGeometry:ig,ImageBitmapLoader:ET,ImageLoader:km,ImageUtils:OE,IncrementStencilOp:bw,IncrementWrapStencilOp:Ew,InstancedBufferAttribute:xf,InstancedBufferGeometry:bT,InstancedInterleavedBuffer:d3,InstancedMesh:dS,Int16BufferAttribute:DR,Int32BufferAttribute:IR,Int8BufferAttribute:wR,IntType:qm,InterleavedBuffer:$m,InterleavedBufferAttribute:jc,Interpolant:Rd,InterpolateDiscrete:md,InterpolateLinear:gd,InterpolateSmooth:kv,InterpolationSamplingMode:Jw,InterpolationSamplingType:Ww,InvertStencilOp:Cw,KeepStencilOp:rf,KeyframeTrack:Ga,LOD:XE,LatheGeometry:v_,Layers:xd,LessCompare:wE,LessDepth:Zv,LessEqualCompare:e_,LessEqualDepth:yf,LessEqualStencilFunc:Dw,LessStencilFunc:Rw,Light:nu,LightProbe:ST,Line:Hl,Line3:S3,LineBasicMaterial:rr,LineCurve:_S,LineCurve3:jE,LineDashedMaterial:fT,LineLoop:pS,LineSegments:mo,LinearFilter:Un,LinearInterpolant:CS,LinearMipMapLinearFilter:TA,LinearMipMapNearestFilter:dw,LinearMipmapLinearFilter:Fa,LinearMipmapNearestFilter:od,LinearSRGBColorSpace:po,LinearToneMapping:KA,LinearTransfer:Nm,Loader:Xs,LoaderUtils:Yc,LoadingManager:M_,LoopOnce:AE,LoopPingPong:bE,LoopRepeat:SE,MOUSE:lw,Material:ys,MaterialLoader:E_,MathUtils:FE,Matrix2:HS,Matrix3:dn,Matrix4:jt,MaxEquation:sE,Mesh:wi,MeshBasicMaterial:Yr,MeshDepthMaterial:MS,MeshDistanceMaterial:ES,MeshLambertMaterial:cT,MeshMatcapMaterial:uT,MeshNormalMaterial:lT,MeshPhongMaterial:aT,Me
4051shPhysicalMaterial:za,MeshStandardMaterial:ag,MeshToonMaterial:oT,MinEquation:iE,MirroredRepeatWrapping:hd,MixOperation:yE,MultiplyBlending:MA,MultiplyOperation:Ym,NearestFilter:Xi,NearestMipMapLinearFilter:hw,NearestMipMapNearestFilter:fw,NearestMipmapLinearFilter:lf,NearestMipmapNearestFilter:Jy,NeutralToneMapping:eS,NeverCompare:CE,NeverDepth:qv,NeverStencilFunc:ww,NoBlending:fo,NoColorSpace:Fl,NoNormalPacking:yw,NoToneMapping:Oa,NormalAnimationBlendMode:$y,NormalBlending:mf,NormalGAPacking:xw,NormalRGPacking:_w,NotEqualCompare:DE,NotEqualDepth:ey,NotEqualStencilFunc:Lw,NumberKeyframeTrack:Sf,Object3D:Gn,ObjectLoader:VB,ObjectSpaceNormalMap:TE,OctahedronGeometry:sg,OneFactor:aE,OneMinusConstantAlphaFactor:vE,OneMinusConstantColorFactor:mE,OneMinusDstAlphaFactor:uE,OneMinusDstColorFactor:hE,OneMinusSrcAlphaFactor:Yv,OneMinusSrcColorFactor:lE,OrthographicCamera:iu,PCFShadowMap:ad,PCFSoftShadowMap:bm,PMREMGenerator:NA,Path:Oy,PerspectiveCamera:gs,Plane:Hc,PlaneGeometry:tu,PlaneHelper:U3,PointLight:IS,PointLightHelper:E3,Points:mS,PointsMaterial:u_,PolarGridHelper:R3,PolyhedronGeometry:eu,PositionalAudio:ZB,PropertyBinding:Vn,PropertyMixer:wT,QuadraticBezierCurve:xS,QuadraticBezierCurve3:AS,Quaternion:sr,QuaternionKeyframeTrack:bf,QuaternionLinearInterpolant:mT,R11_EAC_Format:ly,RED_GREEN_RGTC2_Format:Dy,RED_RGTC1_Format:Ry,REVISION:Jm,RG11_EAC_Format:uy,RGBADepthPacking:mw,RGBAFormat:ts,RGBAIntegerFormat:jy,RGBA_ASTC_10x10_Format:by,RGBA_ASTC_10x5_Format:xy,RGBA_ASTC_10x6_Format:Ay,RGBA_ASTC_10x8_Format:Sy,RGBA_ASTC_12x10_Format:My,RGBA_ASTC_12x12_Format:Ey,RGBA_ASTC_4x4_Format:hy,RGBA_ASTC_5x4_Format:dy,RGBA_ASTC_5x5_Format:py,RGBA_ASTC_6x5_Format:my,RGBA_ASTC_6x6_Format:gy,RGBA_ASTC_8x5_Format:vy,RGBA_ASTC_8x6_Format:yy,RGBA_ASTC_8x8_Format:_y,RGBA_BPTC_Format:Ty,RGBA_ETC2_EAC_Format:oy,RGBA_PVRTC_2BPPV1_Format:sy,RGBA_PVRTC_4BPPV1_Format:iy,RGBA_S3TC_DXT1_Format:Em,RGBA_S3TC_DXT3_Format:Tm,RGBA_S3TC_DXT5_Format:Cm,RGBDepthPacking:gw,RGBFormat:sS,RGBIntegerFormat:pw,RGB_BPTC_SIGNED_Format:Cy,RGB_BPTC_UNSIGNED_Format:wy,RGB_ETC1_Format:ry,RGB_
vendor: 4,984 bytes, lines 4051-4067
4051ETC2_Format:ay,RGB_PVRTC_2BPPV1_Format:ny,RGB_PVRTC_4BPPV1_Format:ty,RGB_S3TC_DXT1_Format:Mm,RGDepthPacking:vw,RGFormat:_f,RGIntegerFormat:Qy,RawShaderMaterial:bS,Ray:Cd,Raycaster:GS,RectAreaLight:AT,RedFormat:Km,RedIntegerFormat:Zm,ReinhardToneMapping:ZA,RenderTarget:lS,RenderTarget3D:u3,RepeatWrapping:Zc,ReplaceStencilOp:Sw,ReverseSubtractEquation:nE,RingGeometry:y_,SIGNED_R11_EAC_Format:cy,SIGNED_RED_GREEN_RGTC2_Format:Iy,SIGNED_RED_RGTC1_Format:By,SIGNED_RG11_EAC_Format:fy,SRGBColorSpace:ks,SRGBTransfer:$n,Scene:jm,ShaderChunk:An,ShaderLib:co,ShaderMaterial:br,ShadowMaterial:rT,Shape:vf,ShapeGeometry:__,ShapePath:O3,ShapeUtils:uo,ShortType:qy,Skeleton:eg,SkeletonHelper:M3,SkinnedMesh:hS,Source:Xc,Sphere:vs,SphereGeometry:rg,Spherical:v3,SphericalHarmonics3:US,SplineCurve:SS,SpotLight:DS,SpotLightHelper:b3,Sprite:VE,SpriteMaterial:fS,SrcAlphaFactor:Jv,SrcAlphaSaturateFactor:dE,SrcColorFactor:oE,StaticCopyUsage:Gw,StaticDrawUsage:Fm,StaticReadUsage:Ow,StereoCamera:JB,StreamCopyUsage:kw,StreamDrawUsage:Fw,StreamReadUsage:zw,StringKeyframeTrack:wf,SubtractEquation:tE,SubtractiveBlending:bA,TOUCH:cw,TangentSpaceNormalMap:$c,TetrahedronGeometry:x_,Texture:ei,TextureLoader:yT,TextureUtils:V3,Timer:m3,TimestampQuery:Xw,TorusGeometry:A_,TorusKnotGeometry:S_,Triangle:Jr,TriangleFanDrawMode:Ly,TriangleStripDrawMode:aS,TrianglesDrawMode:ME,TubeGeometry:b_,UVMapping:qc,Uint16BufferAttribute:cS,Uint32BufferAttribute:uS,Uint8BufferAttribute:RR,Uint8ClampedBufferAttribute:BR,Uniform:zS,UniformsGroup:h3,UniformsLib:Ct,UniformsUtils:GE,UnsignedByteType:ws,UnsignedInt101111Type:nS,UnsignedInt248Type:pd,UnsignedInt5999Type:tS,UnsignedIntType:ia,UnsignedShort4444Type:Ky,UnsignedShort5551Type:Zy,UnsignedShortType:dd,VSMShadowMap:of,Vector2:We,Vector3:K,Vector4:li,VectorKeyframeTrack:Mf,VideoFrameTexture:$R,VideoTexture:JE,WebGL3DRenderTarget:vR,WebGLArrayRenderTarget:gR,WebGLCoordinateSystem:ta,WebGLCubeRenderTarget:r_,WebGLRenderTarget:Sr,WebGLRenderer:kS,WebGLUtils:FT,WebGPUCoordinateSystem:vd,WebXRController:Vv,WireframeGeometry:sT,WrapAroundEnding:Um,ZeroCurvatureEnding:cf,ZeroFactor:rE,ZeroSlopeEnding:uf,ZeroStencilOp:Aw,createCanvasElement:NE,error:Vt,getConsoleFunction:Kw,log:Pm,setConsoleFunction:qw,warn:Mt,warnOnce:yd},Symbol.toStringTag,{value:"Module"}));var iA={exports:{}},sA={},rA={exports:{}},aA={};/** 4052 * @license React 4053 * use-sync-external-store-shim.production.js 4054 * 4055 * Copyright (c) Meta Platforms, Inc. and affiliates. 4056 * 4057 * This source code is licensed under the MIT license found in the 4058 * LICENSE file in the root directory of this source tree. 4059 */var S1;function PN(){if(S1)return aA;S1=1;var a=qA();function e(v,x){return v===x&&(v!==0||1/v===1/x)||v!==v&&x!==x}var t=typeof Object.is=="function"?Object.is:e,n=a.useState,s=a.useEffect,o=a.useLayoutEffect,u=a.useDebugValue;function h(v,x){var S=x(),M=n({inst:{value:S,getSnapshot:x}}),w=M[0].inst,C=M[1];return o(function(){w.value=S,w.getSnapshot=x,d(w)&&C({inst:w})},[v,S,x]),s(function(){return d(w)&&C({inst:w}),v(function(){d(w)&&C({inst:w})})},[v]),u(S),S}function d(v){var x=v.getSnapshot;v=v.value;try{var S=x();return!t(v,S)}catch{return!0}}function g(v,x){return x()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:h;return aA.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:y,aA}var b1;function zN(){return b1||(b1=1,rA.exports=PN()),rA.exports}/** 4060 * @license React 4061 * use-sync-external-store-shim/with-selector.production.js 4062 * 4063 * Copyright (c) Meta Platforms, Inc. and affiliates. 4064 * 4065 * This source code is licensed under the MIT license found in the 4066 * LICENSE file in the root directory of this source tree. 4067 */var M1;function GN(){if(M1)return sA;M1=1;var a=qA(),e=zN();function t(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var n=typeof Object.is=="function"?Object.is:t,s=e.useSyncExternalStore,o=a.useRef,u=a.useEffect,h=a.useMemo,d=a.useDebugValue;return sA.useSyncExternalStoreWithSelector=function(g,y,v,x,S){var M=o(null);if(M.current===null){var w={hasValue:!1,value:null};M.current=w}else w=M.current;M=h(function(){function E(P){if(!B){if(B=!0,D=P,P=x(P),S!==void 0&&w.hasValue){var X=w.value;if(S(X,P))return U=X}return U=P}if(X=U,n(D,P))return X;var k=x(P);return S!==void 0&&S(X,k)?(D=P,X):(D=P,U=k)}var B=!1,D,U,z=v===void 0?null:v;return[function(){return E(y())},z===null?void 0:function(){return E(z())}]},[y,v,x,S]);var C=s(g,M[0],M[1]);return u(function(){w.hasValue=!0,w.value=C},[C]),d(C),C},sA}var E1;function HN(){return E1||(E1=1,iA.exports=GN()),iA.exports}var kN=HN();const VN=q1(kN),T1=a=>{let e;const t=new Set,n=(g,y)=>{const v=typeof g=="function"?g(e):g;if(!Object.is(v,e)){const x=e;e=y??(typeof v!="object"||v===null)?v:Object.assign({},e,v),t.forEach(S=>S(e,x))}},s=()=>e,h={setState:n,getState:s,getInitialState:()=>d,subscribe:g=>(t.add(g),()=>t.delete(g))},d=e=a(n,s,h);return h},XN=(a=>a?T1(a):T1),{useSyncExternalStoreWithSelector:WN}=VN,JN=a=>a;
4067function YN(a,e=JN,t){const n=WN(a.subscribe,a.getState,a.getInitialState,e,t);return K1.useDebugValue(n),n}const C1=(a,e)=>{const t=XN(a),n=(s,o=e)=>YN(t,s,o);return Object.assign(n,t),n},OT=((a,e)=>a?C1(a,e):C1),qN=a=>typeof a=="object"&&typeof a.then=="function",df=[];function PT(a,e,t=(n,s)=>n===s){if(a===e)return!0;if(!a||!e)return!1;const n=a.length;if(e.length!==n)return!1;for(let s=0;s<n;s++)if(!t(a[s],e[s]))return!1;return!0}function zT(a,e=null,t=!1,n={}){e===null&&(e=[a]);for(const o of df)if(PT(e,o.keys,o.equal)){if(t)return;if(Object.prototype.hasOwnProperty.call(o,"error"))throw o.error;if(Object.prototype.hasOwnProperty.call(o,"response"))return n.lifespan&&n.lifespan>0&&(o.timeout&&clearTimeout(o.timeout),o.timeout=setTimeout(o.remove,n.lifespan)),o.response;if(!t)throw o.promise}const s={keys:e,equal:n.equal,remove:()=>{const o=df.indexOf(s);o!==-1&&df.splice(o,1)},promise:(qN(a)?a:a(...e)).then(o=>{s.response=o,n.lifespan&&n.lifespan>0&&(s.timeout=setTimeout(s.remove,n.lifespan))}).catch(o=>s.error=o)};if(df.push(s),!t)throw s.promise}const KN=(a,e,t)=>zT(a,e,!1,t),ZN=(a,e,t)=>void zT(a,e,!0,t),QN=a=>{if(a===void 0||a.length===0)df.splice(0,df.length);else{const e=df.find(t=>PT(a,t.keys,t.equal));e&&e.remove()}};var PA=Z1();const jN=q1(PA);function VS(a,e,t){if(!a)return;if(t(a)===!0)return a;let n=e?a.return:a.child;for(;n;){const s=VS(n,e,t);if(s)return s;n=e?null:n.sibling}}function GT(a){try{return Object.defineProperties(a,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return a}}const XS=GT(vt.createContext(null));class HT extends vt.Component{render(){return vt.createElement(XS.Provider,{value:this._reactInternals},this.props.children)}}function kT(){const a=vt.useContext(XS);if(a===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=vt.useId();return vt.useMemo(()=>{for(const t of[a,a==null?void 0:a.alternate]){if(!t)continue;const n=VS(t,!1,s=>{let o=s.memoizedState;for(;o;){if(o.memoizedState===e)return!0;o=o.next}});if(n)return n}},[a,e])}const $N=Symbol.for("react.context"),eF=a=>a!==null&&typeof a=="object"&&"$$typeof"in a&&a.$$typeof===$N;function tF(){const a=kT(),[e]=vt.useState(()=>new Map);e.clear();let t=a;for(;t;){const n=t.type;eF(n)&&n!==XS&&!e.has(n)&&e.set(n,vt.use(GT(n))),t=t.return}return e}function nF(){const a=tF();return vt.useMemo(()=>Array.from(a.keys()).reduce((e,t)=>n=>vt.createElement(e,null,vt.createElement(t.Provider,{...n,value:a.get(t)})),e=>vt.createElement(HT,{...e})),[a])}function VT(a){let e=a.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const XT=a=>a&&a.isOrthographicCamera,iF=a=>a&&a.hasOwnProperty("current"),sF=a=>a!=null&&(typeof a=="string"||typeof a=="number"||a.isColor),og=((a,e)=>typeof window<"u"&&(((a=window.document)==null?void 0:a.createElement)||((e=window.navigator)==null?void 0:e.product)==="ReactNative"))()?vt.useLayoutEffect:vt.useEffect;function WS(a){const e=vt.useRef(a);return og(()=>void(e.current=a),[a]),e}function rF(){const a=kT(),e=nF();return vt.useMemo(()=>({children:t})=>{const s=!!VS(a,!0,o=>o.type===vt.StrictMode)?vt.StrictMode:vt.Fragment;return Hs.jsx(s,{children:Hs.jsx(e,{children:t})})},[a,e])}function aF({set:a}){return og(()=>(a(new Promise(()=>null)),()=>a(!1)),[a]),null}const oF=(a=>(a=class extends vt.Component{constructor(...t){super(...t),this.state={error:!1}}componentDidCatch(t){this.props.set(t)}render(){return this.state.error?null:this.props.children}},a.getDerivedStateFromError=()=>({error:!0}),a))();function WT(a){var e;const t=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(a)?Math.min(Math.max(a[0],t),a[1]):a}function nd(a){var e;return(e=a.__r3f)==null?void 0:e.root.getState()}const Ti={obj:a=>a===Object(a)&&!Ti.arr(a)&&typeof a!="function",fun:a=>typeof a=="function",str:a=>typeof a=="string",num:a=>typeof a=="number",boo:a=>typeof a=="boolean",und:a=>a===void 0,nul:a=>a===null,arr:a=>Array.isArray(a),equ(a,e,{arrays:t="shallow",objects:n="reference",strict:s=!0}={}){if(typeof a!=typeof e||!!a!=!!e)return!1;if(Ti.str(a)||Ti.num(a)||Ti.boo(a))return a===e;const o=Ti.obj(a);if(o&&n==="reference")return a===e;const u=Ti.arr(a);if(u&&t==="reference")return a===e;if((u||o)&&a===e)return!0;let h;for(h in a)if(!(h in e))return!1;if(o&&t==="shallow"&&n==="shallow"){for(h in s?e:a)if(!Ti.equ(a[h],e[h],{strict:s,objects:"reference"}))return!1}else for(h in s?e:a)if(a[h]!==e[h])return!1;if(Ti.und(h)){if(u&&a.length===0&&e.length===0||o&&Object.keys(a).length===0&&Object.keys(e).length===0)return!0;
4067if(a!==e)return!1}return!0}};function lF(a){const e={nodes:{},materials:{},meshes:{}};return a&&a.traverse(t=>{t.name&&(e.nodes[t.name]=t),t.material&&!e.materials[t.material.name]&&(e.materials[t.material.name]=t.material),t.isMesh&&!e.meshes[t.name]&&(e.meshes[t.name]=t)}),e}function cF(a){a.type!=="Scene"&&(a.dispose==null||a.dispose());for(const e in a){const t=a[e];(t==null?void 0:t.type)!=="Scene"&&(t==null||t.dispose==null||t.dispose())}}const JT=["children","key","ref"];function uF(a){const e={};for(const t in a)JT.includes(t)||(e[t]=a[t]);return e}function Py(a,e,t,n){const s=a;let o=s==null?void 0:s.__r3f;return o||(o={root:e,type:t,parent:null,children:[],props:uF(n),object:s,eventCount:0,handlers:{},isHidden:!1},s&&(s.__r3f=o)),o}function Vm(a,e){if(!e.includes("-"))return{root:a,key:e,target:a[e]};if(e in a)return{root:a,key:e,target:a[e]};let t=a;const n=e.split("-");for(const s of n){if(typeof t!="object"||t===null){if(t!==void 0){const o=n.slice(n.indexOf(s)).join("-");return{root:t,key:o,target:void 0}}return{root:a,key:e,target:void 0}}e=s,a=t,t=t[e]}return{root:a,key:e,target:t}}const w1=/-\d+$/;function zy(a,e){if(Ti.str(e.props.attach)){if(w1.test(e.props.attach)){const s=e.props.attach.replace(w1,""),{root:o,key:u}=Vm(a.object,s);Array.isArray(o[u])||(o[u]=[])}const{root:t,key:n}=Vm(a.object,e.props.attach);e.previousAttach=t[n],t[n]=e.object}else Ti.fun(e.props.attach)&&(e.previousAttach=e.props.attach(a.object,e.object))}function Gy(a,e){if(Ti.str(e.props.attach)){const{root:t,key:n}=Vm(a.object,e.props.attach),s=e.previousAttach;s===void 0?delete t[n]:t[n]=s}else e.previousAttach==null||e.previousAttach(a.object,e.object);delete e.previousAttach}const zA=[...JT,"args","dispose","attach","object","onUpdate","dispose"],R1=new Map;function fF(a){let e=R1.get(a.constructor);try{e||(e=new a.constructor,R1.set(a.constructor,e))}catch{}return e}function hF(a,e){const t={};for(const n in e)if(!zA.includes(n)&&!Ti.equ(e[n],a.props[n])){t[n]=e[n];for(const s in e)s.startsWith(`${n}-`)&&(t[s]=e[s])}for(const n in a.props){if(zA.includes(n)||e.hasOwnProperty(n))continue;const{root:s,key:o}=Vm(a.object,n);if(s.constructor&&s.constructor.length===0){const u=fF(s);Ti.und(u)||(t[o]=u[o])}else t[o]=0}return t}const dF=["map","emissiveMap","sheenColorMap","specularColorMap","envMap"],pF=/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/;function qo(a,e){var t;const n=a.__r3f,s=n&&VT(n).getState(),o=n==null?void 0:n.eventCount;for(const h in e){let d=e[h];if(zA.includes(h))continue;if(n&&pF.test(h)){typeof d=="function"?n.handlers[h]=d:delete n.handlers[h],n.eventCount=Object.keys(n.handlers).length;continue}if(d===void 0)continue;let{root:g,key:y,target:v}=Vm(a,h);if(v===void 0&&(typeof g!="object"||g===null))throw Error(`R3F: Cannot set "${h}". Ensure it is an object before setting "${y}".`);if(v instanceof xd&&d instanceof xd)v.mask=d.mask;else if(v instanceof Tt&&sF(d))v.set(d);else if(v!==null&&typeof v=="object"&&typeof v.set=="function"&&typeof v.copy=="function"&&d!=null&&d.constructor&&v.constructor===d.constructor)v.copy(d);else if(v!==null&&typeof v=="object"&&typeof v.set=="function"&&Array.isArray(d))typeof v.fromArray=="function"?v.fromArray(d):v.set(...d);else if(v!==null&&typeof v=="object"&&typeof v.set=="function"&&typeof d=="number")typeof v.setScalar=="function"?v.setScalar(d):v.set(d);else{var u;g[y]=d,s&&!s.linear&&dF.includes(y)&&(u=g[y])!=null&&u.isTexture&&g[y].format===ts&&g[y].type===ws&&(g[y].colorSpace
vendor: 13,111 bytes, lines 4067-4075
4067=ks)}}if(n!=null&&n.parent&&s!=null&&s.internal&&(t=n.object)!=null&&t.isObject3D&&o!==n.eventCount){const h=n.object,d=s.internal.interaction.indexOf(h);d>-1&&s.internal.interaction.splice(d,1),n.eventCount&&h.raycast!==null&&s.internal.interaction.push(h)}return n&&n.props.attach===void 0&&(n.object.isBufferGeometry?n.props.attach="geometry":n.object.isMaterial&&(n.props.attach="material")),n&&Dd(n),a}function Dd(a){var e;if(!a.parent)return;a.props.onUpdate==null||a.props.onUpdate(a.object);const t=(e=a.root)==null||e.getState==null?void 0:e.getState();t&&t.internal.frames===0&&t.invalidate()}function YT(a,e){a.manual||(XT(a)?(a.left=e.width/-2,a.right=e.width/2,a.top=e.height/2,a.bottom=e.height/-2):a.aspect=e.width/e.height,a.updateProjectionMatrix())}const _r=a=>a==null?void 0:a.isObject3D;function Fv(a){return(a.eventObject||a.object).uuid+"/"+a.index+a.instanceId}function qT(a,e,t,n){const s=t.get(e);s&&(t.delete(e),t.size===0&&(a.delete(n),s.target.releasePointerCapture(n)))}function mF(a,e){const{internal:t}=a.getState();t.interaction=t.interaction.filter(n=>n!==e),t.initialHits=t.initialHits.filter(n=>n!==e),t.hovered.forEach((n,s)=>{(n.eventObject===e||n.object===e)&&t.hovered.delete(s)}),t.capturedMap.forEach((n,s)=>{qT(t.capturedMap,e,n,s)})}function gF(a){function e(d){const{internal:g}=a.getState(),y=d.offsetX-g.initialClick[0],v=d.offsetY-g.initialClick[1];return Math.round(Math.sqrt(y*y+v*v))}function t(d){return d.filter(g=>["Move","Over","Enter","Out","Leave"].some(y=>{var v;return(v=g.__r3f)==null?void 0:v.handlers["onPointer"+y]}))}function n(d,g){const y=a.getState(),v=new Set,x=[],S=g?g(y.internal.interaction):y.internal.interaction;for(let E=0;E<S.length;E++){const B=nd(S[E]);B&&(B.raycaster.camera=void 0)}y.previousRoot||y.events.compute==null||y.events.compute(d,y);function M(E){const B=nd(E);if(!B||!B.events.enabled||B.raycaster.camera===null)return[];if(B.raycaster.camera===void 0){var D;B.events.compute==null||B.events.compute(d,B,(D=B.previousRoot)==null?void 0:D.getState()),B.raycaster.camera===void 0&&(B.raycaster.camera=null)}return B.raycaster.camera?B.raycaster.intersectObject(E,!0):[]}let w=S.flatMap(M).sort((E,B)=>{const D=nd(E.object),U=nd(B.object);return!D||!U?E.distance-B.distance:U.events.priority-D.events.priority||E.distance-B.distance}).filter(E=>{const B=Fv(E);return v.has(B)?!1:(v.add(B),!0)});y.events.filter&&(w=y.events.filter(w,y));for(const E of w){let B=E.object;for(;B;){var C;(C=B.__r3f)!=null&&C.eventCount&&x.push({...E,eventObject:B}),B=B.parent}}if("pointerId"in d&&y.internal.capturedMap.has(d.pointerId))for(let E of y.internal.capturedMap.get(d.pointerId).values())v.has(Fv(E.intersection))||x.push(E.intersection);return x}function s(d,g,y,v){if(d.length){const x={stopped:!1};for(const S of d){let M=nd(S.object);if(M||S.object.traverseAncestors(w=>{const C=nd(w);if(C)return M=C,!1}),M){const{raycaster:w,pointer:C,camera:E,internal:B}=M,D=new K(C.x,C.y,0).unproject(E),U=I=>{var O,q;return(O=(q=B.capturedMap.get(I))==null?void 0:q.has(S.eventObject))!=null?O:!1},z=I=>{const O={intersection:S,target:g.target};B.capturedMap.has(I)?B.capturedMap.get(I).set(S.eventObject,O):B.capturedMap.set(I,new Map([[S.eventObject,O]])),g.target.setPointerCapture(I)},P=I=>{const O=B.capturedMap.get(I);O&&qT(B.capturedMap,S.eventObject,O,I)};let X={};for(let I in g){let O=g[I];typeof O!="function"&&(X[I]=O)}let k={...S,...X,pointer:C,intersections:d,stopped:x.stopped,delta:y,unprojectedPoint:D,ray:w.ray,camera:E,stopPropagation(){const I="pointerId"in g&&B.capturedMap.get(g.pointerId);if((!I||I.has(S.eventObject))&&(k.stopped=x.stopped=!0,B.hovered.size&&Array.from(B.hovered.values()).find(O=>O.eventObject===S.eventObject))){const O=d.slice(0,d.indexOf(S));o([...O,S])}},target:{hasPointerCapture:U,setPointerCapture:z,releasePointerCapture:P},currentTarget:{hasPointerCapture:U,setPointerCapture:z,releasePointerCapture:P},nativeEvent:g};if(v(k),x.stopped===!0)break}}}return d}function o(d){const{internal:g}=a.getState();for(const y of g.hovered.values())if(!d.length||!d.find(v=>v.object===y.object&&v.index===y.index&&v.instanceId===y.instanceId)){const x=y.eventObject.__r3f;if(g.hovered.delete(Fv(y)),x!=null&&x.eventCount){const S=x.handlers,M={...y,intersections:d};S.onPointerOut==null||S.onPointerOut(M),S.onPointerLeave==null||S.onPointerLeave(M)}}}function u(d,g){for(let y=0;y<g.length;y++){const v=g[y].__r3f;v==null||v.handlers.onPointerMissed==null||v.handlers.onPointerMissed(d)}}function h(d){switch(d){case"onPointerLeave":case"onPointerCancel":return()=>o([]);case"onLostPointerCapture":return g=>{const{internal:y}=a.getState();"pointerId"in g&&y.capturedMap.has(g.pointerId)&&requestAnimationFrame(()=>{y.capturedMap.has(g.pointerId)&&(y.capturedMap.delete(g.pointerId),o([]))})}}return function(y){const{onPointerMissed:v,internal:x}=a.getState();x.lastEvent.current=y;const S=d==="onPointerMove",M=d==="onClick"||d==="onContextMenu"||d==="onDoubleClick",C=n(y,S?t:void 0),E=M?e(y):0;d==="onPointerDown"&&(x.initialClick=[y.offsetX,y.offsetY],x.initialHits=C.map(D=>D.eventObject)),M&&!C.length&&E<=2&&(u(y,x.interaction),v&&v(y)),S&&o(C);function B(D){const U=D.eventObject,z=U.__r3f;if(!(z!=null&&z.eventCount))return;const P=z.handlers;if(S){if(P.onPointerOver||P.onPointerEnter||P.onPointerOut||P.onPointerLeave){const X=Fv(D),k=x.hovered.get(X);k?k.stopped&&D.stopPropagation():(x.hovered.set(X,D),P.onPointerOver==null||P.onPointerOver(D),P.onPointerEnter==null||P.onPointerEnter(D))}P.onPointerMove==null||P.onPointerMove(D)}else{const X=P[d];X?(!M||x.initialHits.includes(U))&&(u(y,x.interaction.filter(k=>!x.initialHits.includes(k))),X(D)):M&&x.initialHits.includes(U)&&u(y,x.interaction.filter(k=>!x.initialHits.includes(k)))}}s(C,y,E,B)}}return{handlePointer:h}}const B1=a=>!!(a!=null&&a.render),JS=vt.createContext(null),vF=(a,e)=>{const t=OT((h,d)=>{const g=new K,y=new K,v=new K;function x(E=d().camera,B=y,D=d().size){const{width:U,height:z,top:P,left:X}=D,k=U/z;B.isVector3?v.copy(B):v.set(...B);const I=E.getWorldPosition(g).distanceTo(v);if(XT(E))return{width:U/E.zoom,height:z/E.zoom,top:P,left:X,factor:1,distance:I,aspect:k};{const O=E.fov*Math.PI/180,q=2*Math.tan(O/2)*I,ie=q*(U/z);return{width:ie,height:q,top:P,left:X,factor:U/ie,distance:I,aspect:k}}}let S;const M=E=>h(B=>({performance:{...B.performance,current:E}})),w=new We;return{set:h,get:d,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},scene:null,xr:null,invalidate:(E=1)=>a(d(),E),advance:(E,B)=>e(E,B,d()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new FS,pointer:w,mouse:w,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const E=d();S&&clearTimeout(S),E.performance.current!==E.performance.min&&M(E.performance.min),S=setTimeout(()=>M(d().performance.max),E.performance.debounce)}},size:{width:0,height:0,top:0,left:0},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:x},setEvents:E=>h(B=>({...B,events:{...B.events,...E}})),setSize:(E,B,D=0,U=0)=>{const z=d().camera,P={width:E,height:B,top:D,left:U};h(X=>({size:P,viewport:{...X.viewport,...x(z,y,P)}}))},setDpr:E=>h(B=>{const D=WT(E);return{viewport:{...B.viewport,dpr:D,initialDpr:B.viewport.initialDpr||D}}}),setFrameloop:(E="always")=>{const B=d().clock;B.stop(),B.elapsedTime=0,E!=="never"&&(B.start(),B.elapsedTime=0),h(()=>({frameloop:E}))},previousRoot:void 0,internal:{interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,lastEvent:vt.createRef(),active:!1,frames:0,priority:0,subscribe:(E,B,D)=>{const U=d().internal;return U.priority=U.priority+(B>0?1:0),U.subscribers.push({ref:E,priority:B,store:D}),U.subscribers=U.subscribers.sort((z,P)=>z.priority-P.priority),()=>{const z=d().internal;z!=null&&z.subscribers&&(z.priority=z.priority-(B>0?1:0),z.subscribers=z.subscribers.filter(P=>P.ref!==E))}}}}}),n=t.getState();let s=n.size,o=n.viewport.dpr,u=n.camera;return t.subscribe(()=>{const{camera:h,size:d,viewport:g,gl:y,set:v}=t.getState();if(d.width!==s.width||d.height!==s.height||g.dpr!==o){s=d,o=g.dpr,YT(h,d),g.dpr>0&&y.setPixelRatio(g.dpr);const x=typeof HTMLCanvasElement<"u"&&y.domElement instanceof HTMLCanvasElement;y.setSize(d.width,d.height,x)}h!==u&&(u=h,v(x=>({viewport:{...x.viewport,...x.viewport.getCurrentViewport(h)}})))}),t.subscribe(h=>a(h)),t};function YS(){const a=vt.useContext(JS);if(!a)throw new Error("R3F: Hooks can only be used within the Canvas component!");return a}function Xm(a=t=>t,e){return YS()(a,e)}function yF(a,e=0){const t=YS(),n=t.getState().internal.subscribe,s=WS(a);return og(()=>n(s,e,t),[e,n,t]),null}const D1=new WeakMap,_F=a=>{var e;return typeof a=="function"&&(a==null||(e=a.prototype)==null?void 0:e.constructor)===a};function KT(a,e){return function(t,...n){let s;return _F(t)?(s=D1.get(t),s||(s=new t,D1.set(t,s))):s=t,a&&a(s),Promise.all(n.map(o=>new Promise((u,h)=>s.load(o,d=>{_r(d==null?void 0:d.scene)&&Object.assign(d,lF(d.scene)),u(d)},e,d=>h(new Error(`Could not load ${o}: ${d==null?void 0:d.message}`))))))}}function kl(a,e,t,n){const s=Array.isArray(e)?e:[e],o=KN(KT(t,n),[a,...s],{equal:Ti.equ});return Array.isArray(e)?o:o[0]}kl.preload=function(a,e,t){const n=Array.isArray(e)?e:[e];return ZN(KT(t),[a,...n])};kl.clear=function(a,e){const t=Array.isArray(e)?e:[e];return QN([a,...t])};/** 4068 * @license React 4069 * react-reconciler-constants.production.js 4070 * 4071 * Copyright (c) Meta Platforms, Inc. and affiliates. 4072 * 4073 * This source code is licensed under the MIT license found in the 4074 * LICENSE file in the root directory of this source tree. 4075 */const xF=1,AF=8,SF=32,bF=2;var MF={version:"9.5.0"};function EF(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var I1={exports:{}},L1={exports:{}},U1;function TF(){return U1||(U1=1,(function(a){a.exports=function(e){function t(l,c,m,_){return new np(l,c,m,_)}function n(){}function s(l){var c="https://react.dev/errors/"+l;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)c+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+l+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(l){var c=l,m=l;if(l.alternate)for(;c.return;)c=c.return;else{l=c;do c=l,(c.flags&4098)!==0&&(m=c.return),l=c.return;while(l)}return c.tag===3?m:null}function u(l){if(o(l)!==l)throw Error(s(188))}function h(l){var c=l.alternate;if(!c){if(c=o(l),c===null)throw Error(s(188));return c!==l?null:l}for(var m=l,_=c;;){var T=m.return;if(T===null)break;var R=T.alternate;if(R===null){if(_=T.return,_!==null){m=_;continue}break}if(T.child===R.child){for(R=T.child;R;){if(R===m)return u(T),l;if(R===_)return u(T),c;R=R.sibling}throw Error(s(188))}if(m.return!==_.return)m=T,_=R;else{for(var H=!1,ne=T.child;ne;){if(ne===m){H=!0,m=T,_=R;break}if(ne===_){H=!0,_=T,m=R;break}ne=ne.sibling}if(!H){for(ne=R.child;ne;){if(ne===m){H=!0,m=R,_=T;break}if(ne===_){H=!0,_=R,m=T;break}ne=ne.sibling}if(!H)throw Error(s(189))}}if(m.alternate!==_)throw Error(s(190))}if(m.tag!==3)throw Error(s(188));return m.stateNode.current===m?l:c}function d(l){var c=l.tag;if(c===5||c===26||c===27||c===6)return l;for(l=l.child;l!==null;){if(c=d(l),c!==null)return c;l=l.sibling}return null}function g(l){var c=l.tag;if(c===5||c===26||c===27||c===6)return l;for(l=l.child;l!==null;){if(l.tag!==4&&(c=g(l),c!==null))return c;l=l.sibling}return null}function y(l){return l===null||typeof l!="object"?null:(l=Ka&&l[Ka]||l["@@iterator"],typeof l=="function"?l:null)}function v(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===Ro?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case fl:return"Fragment";case dl:return"Profiler";case hl:return"StrictMode";case ih:return"Suspense";case qa:return"SuspenseList";case Mu:return"Activity"}if(typeof l=="object")switch(l.$$typeof){case ul:return"Portal";case Ir:return l.displayName||"Context";case bu:return(l._context.displayName||"Context")+".Consumer";case cc:var c=l.render;return l=l.displayName,l||(l=c.displayName||c.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case sh:return c=l.displayName||null,c!==null?c:v(l.type)||"Memo";case Us:c=l._payload,l=l._init;try{return v(l(c))}catch{}}return null}function x(l){return{current:l}}function S(l){0>yl||(l.current=vh[yl],vh[yl]=null,yl--)}function M(l,c){yl++,vh[yl]=l.current,l.current=c}function w(l){return l>>>=0,l===0?32:31-(yh(l)/E0|0)|0}function C(l){var c=l&42;if(c!==0)return c;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;
vendor: 16,372 bytes, lines 4075-4082
4075case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function E(l,c,m){var _=l.pendingLanes;if(_===0)return 0;var T=0,R=l.suspendedLanes,H=l.pingedLanes;l=l.warmLanes;var ne=_&134217727;return ne!==0?(_=ne&~R,_!==0?T=C(_):(H&=ne,H!==0?T=C(H):m||(m=ne&~l,m!==0&&(T=C(m))))):(ne=_&~R,ne!==0?T=C(ne):H!==0?T=C(H):m||(m=_&~l,m!==0&&(T=C(m)))),T===0?0:c!==0&&c!==T&&(c&R)===0&&(R=T&-T,m=c&-c,R>=m||R===32&&(m&4194048)!==0)?c:T}function B(l,c){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&c)===0}function D(l,c){switch(l){case 1:case 2:case 4:case 8:case 64:return c+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function U(){var l=gc;return gc<<=1,(gc&62914560)===0&&(gc=4194304),l}function z(l){for(var c=[],m=0;31>m;m++)c.push(l);return c}function P(l,c){l.pendingLanes|=c,c!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function X(l,c,m,_,T,R){var H=l.pendingLanes;l.pendingLanes=m,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=m,l.entangledLanes&=m,l.errorRecoveryDisabledLanes&=m,l.shellSuspendCounter=0;var ne=l.entanglements,Te=l.expirationTimes,qe=l.hiddenUpdates;for(m=H&~m;0<m;){var pt=31-Zs(m),et=1<<pt;ne[pt]=0,Te[pt]=-1;var Bt=qe[pt];if(Bt!==null)for(qe[pt]=null,pt=0;pt<Bt.length;pt++){var ln=Bt[pt];ln!==null&&(ln.lane&=-536870913)}m&=~et}_!==0&&k(l,_,0),R!==0&&T===0&&l.tag!==0&&(l.suspendedLanes|=R&~(H&~c))}function k(l,c,m){l.pendingLanes|=c,l.suspendedLanes&=~c;var _=31-Zs(c);l.entangledLanes|=c,l.entanglements[_]=l.entanglements[_]|1073741824|m&261930}function I(l,c){var m=l.entangledLanes|=c;for(l=l.entanglements;m;){var _=31-Zs(m),T=1<<_;T&c|l[_]&c&&(l[_]|=c),m&=~T}}function O(l,c){var m=c&-c;return m=(m&42)!==0?1:q(m),(m&(l.suspendedLanes|c))!==0?0:m}function q(l){switch(l){case 2:l=1;break;case 8:l=4;break;case 32:l=16;break;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:l=128;break;case 268435456:l=134217728;break;default:l=0}return l}function ie(l){return l&=-l,2<l?8<l?(l&134217727)!==0?32:268435456:8:2}function j(l){if(typeof Hp=="function"&&w0(l),Qs&&typeof Qs.setStrictMode=="function")try{Qs.setStrictMode(xl,l)}catch{}}function re(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}function fe(l){if(Mh===void 0)try{throw Error()}catch(m){var c=m.stack.trim().match(/\n( *(at )?)/);Mh=c&&c[1]||"",Sa=-1<m.stack.indexOf(` 4076 at`)?" (<anonymous>)":-1<m.stack.indexOf("@")?"@unknown:0:0":""}return` 4077`+Mh+l+Sa}function Y(l,c){if(!l||Lu)return"";Lu=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var _={DetermineComponentFrameRoot:function(){try{if(c){var et=function(){throw Error()};if(Object.defineProperty(et.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(et,[])}catch(ln){var Bt=ln}Reflect.construct(l,[],et)}else{try{et.call()}catch(ln){Bt=ln}l.call(et.prototype)}}else{try{throw Error()}catch(ln){Bt=ln}(et=l())&&typeof et.catch=="function"&&et.catch(function(){})}}catch(ln){if(ln&&Bt&&typeof ln.stack=="string")return[ln.stack,Bt.stack]}return[null,null]}};_.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var T=Object.getOwnPropertyDescriptor(_.DetermineComponentFrameRoot,"name");T&&T.configurable&&Object.defineProperty(_.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var R=_.DetermineComponentFrameRoot(),H=R[0],ne=R[1];if(H&&ne){var Te=H.split(` 4078`),qe=ne.split(` 4079`);for(T=_=0;_<Te.length&&!Te[_].includes("DetermineComponentFrameRoot");)_++;for(;T<qe.length&&!qe[T].includes("DetermineComponentFrameRoot");)T++;if(_===Te.length||T===qe.length)for(_=Te.length-1,T=qe.length-1;1<=_&&0<=T&&Te[_]!==qe[T];)T--;for(;1<=_&&0<=T;_--,T--)if(Te[_]!==qe[T]){if(_!==1||T!==1)do if(_--,T--,0>T||Te[_]!==qe[T]){var pt=` 4080`+Te[_].replace(" at new "," at ");return l.displayName&&pt.includes("<anonymous>")&&(pt=pt.replace("<anonymous>",l.displayName)),pt}while(1<=_&&0<=T);break}}}finally{Lu=!1,Error.prepareStackTrace=m}return(m=l?l.displayName||l.name:"")?fe(m):""}function $(l,c){switch(l.tag){case 26:case 27:case 5:return fe(l.type);case 16:return fe("Lazy");case 13:return l.child!==c&&c!==null?fe("Suspense Fallback"):fe("Suspense");case 19:return fe("SuspenseList");case 0:case 15:return Y(l.type,!1);case 11:return Y(l.type.render,!1);case 1:return Y(l.type,!0);case 31:return fe("Activity");default:return""}}function pe(l){try{var c="",m=null;do c+=$(l,m),m=l,l=l.return;while(l);return c}catch(_){return` 4081Error generating stack: `+_.message+` 4082`+_.stack}}function Be(l,c){if(typeof l=="object"&&l!==null){var m=kp.get(l);return m!==void 0?m:(c={value:l,source:c,stack:pe(c)},kp.set(l,c),c)}return{value:l,source:c,stack:pe(c)}}function Ae(l,c){ja[ba++]=Uu,ja[ba++]=jn,jn=l,Uu=c}function De(l,c,m){Nr[hr++]=hs,Nr[hr++]=Kr,Nr[hr++]=Fr,Fr=l;var _=hs;l=Kr;var T=32-Zs(_)-1;_&=~(1<<T),m+=1;var R=32-Zs(c)+T;if(30<R){var H=T-T%5;R=(_&(1<<H)-1).toString(32),_>>=H,T-=H,hs=1<<32-Zs(c)+T|m<<T|_,Kr=R+l}else hs=1<<R|m<<T|_,Kr=l}function He(l){l.return!==null&&(Ae(l,1),De(l,1,0))}function Ve(l){for(;l===jn;)jn=ja[--ba],ja[ba]=null,Uu=ja[--ba],ja[ba]=null;for(;l===Fr;)Fr=Nr[--hr],Nr[hr]=null,Kr=Nr[--hr],Nr[hr]=null,hs=Nr[--hr],Nr[hr]=null}function bt(l,c){Nr[hr++]=hs,Nr[hr++]=Kr,Nr[hr++]=Fr,hs=c.id,Kr=c.overflow,Fr=l}function qt(l,c){M(ds,c),M($a,l),M(os,null),l=Hg(c),S(os),M(os,l)}function me(){S(os),S($a),S(ds)}function Fe(l){l.memoizedState!==null&&M(Nu,l);var c=os.current,m=hc(c,l.type);c!==m&&(M($a,l),M(os,m))}function mt(l){$a.current===l&&(S(os),S($a)),Nu.current===l&&(S(Nu),Ri?gl._currentValue=ml:gl._currentValue2=ml)}function It(l){var c=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ke(Be(c,l)),Eh}function wt(l,c){if(!fi)throw Error(s(175));d0(l.stateNode,l.type,l.memoizedProps,c,l)||It(l,!0)}function an(l){for(Qi=l.return;Qi;)switch(Qi.tag){case 5:case 31:case 13:Fs=!1;return;case 27:case 3:Fs=!0;return;default:Qi=Qi.return}}function yn(l){if(!fi||l!==Qi)return!1;if(!Tn)return an(l),Tn=!0,!1;var c=l.tag;if(Zi?c!==3&&c!==27&&(c!==5||mc(l.type)&&!Ns(l.type,l.memoizedProps))&&hi&&It(l):c!==3&&(c!==5||mc(l.type)&&!Ns(l.type,l.memoizedProps))&&hi&&It(l),an(l),c===13){if(!fi)throw Error(s(316));if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(s(317));hi=Bp(l)}else if(c===31){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(s(317));hi=m0(l)}else hi=Zi&&c===27?r0(l.type,hi):Qi?s0(l.stateNode):null;return!0}function Xt(){fi&&(hi=Qi=null,Tn=!1)}function Le(){var l=Ma;return l!==null&&(er===null?er=l:er.push.apply(er,l),Ma=null),l}function Ke(l){Ma===null?Ma=[l]:Ma.push(l)}function Oe(l,c,m){Ri?(M(Or,c._currentValue),c._currentValue=m):(M(Or,c._currentValue2),c._currentValue2=m)}function dt(l){var c=Or.current;Ri?l._currentValue=c:l._currentValue2=c,S(Or)}function Z(l,c,m){for(;l!==null;){var _=l.alternate;if((l.childLanes&c)!==c?(l.childLanes|=c,_!==null&&(_.childLanes|=c)):_!==null&&(_.childLanes&c)!==c&&(_.childLanes|=c),l===m)break;l=l.return}}function Ot(l,c,m,_){var T=l.child;for(T!==null&&(T.return=l);T!==null;){var R=T.dependencies;if(R!==null){var H=T.child;R=R.firstContext;e:for(;R!==null;){var ne=R;R=T;for(var Te=0;Te<c.length;Te++)if(ne.context===c[Te]){R.lanes|=m,ne=R.alternate,ne!==null&&(ne.lanes|=m),Z(R.return,m,l),_||(H=null);break e}R=ne.next}}else if(T.tag===18){if(H=T.return,H===null)throw Error(s(341));H.lanes|=m,R=H.alternate,R!==null&&(R.lanes|=m),Z(H,m,l),H=null}else H=T.child;if(H!==null)H.return=T;else for(H=T;H!==null;){if(H===l){H=null;break}if(T=H.sibling,T!==null){T.return=H.return,H=T;break}H=H.return}T=H}}function yt(l,c,m,_){l=null;for(var T=c,R=!1;T!==null;){if(!R){if((T.flags&524288)!==0)R=!0;else if((T.flags&262144)!==0)break}if(T.tag===10){var H=T.alternate;if(H===null)throw Error(s(387));if(H=H.memoizedProps,H!==null){var ne=T.type;Di(T.pendingProps.value,H.value)||(l!==null?l.push(ne):l=[ne])}}else if(T===Nu.current){if(H=T.alternate,H===null)throw Error(s(387));H.memoizedState.memoizedState!==T.memoizedState.memoizedState&&(l!==null?l.push(gl):l=[gl])}T=T.return}l!==null&&Ot(c,l,m,_),c.flags|=262144}function Pt(l){for(l=l.firstContext;l!==null;){var c=l.context;if(!Di(Ri?c._currentValue:c._currentValue2,l.memoizedValue))return!0;l=l.next}return!1}function it(l){ii=l,Zr=null,l=l.dependencies,l!==null&&(l.firstContext=null)}function J(l){return le(ii,l)}function N(l,c){return ii===null&&it(l),le(l,c)}function le(l,c){var m=Ri?c._currentValue:c._currentValue2;if(c={context:c,memoizedValue:m,next:null},Zr===null){if(l===null)throw Error(s(308));Zr=c,l.dependencies={lanes:0,firstContext:c},l.flags|=524288}else Zr=Zr.next=c;return m}function Ee(){return{controller:new R0,data:new Map,refCount:0}}function Pe(l){l.refCount--,l.refCount===0&&ls(H_,function(){l.controller.abort()})}function Me(){}function St(l){l!==qn&&l.next===null&&(qn===null?Fu=qn=l:qn=qn.next=l),Pr=!0,Es||(Es=!0,_t())}function ot(l,c){if(!Th&&Pr){Th=!0;do for(var m=!1,_=Fu;_!==null;){if(l!==0){var T=_.pendingLanes;if(T===0)var R=0;else{var H=_.suspendedLanes,ne=_.pingedLanes;R=(1<<31-Zs(42|l)+1)-1,R&=T&~(H&~ne),R=R&201326741?R&201326741|1:R?R|2:0}R!==0&&(m=!0,Et(_,R))}else R=Cn,R=E(_,_===gn?R:0,_.cancelPendingCommit!==null||_.timeoutHandle!==Ks),(R&3)===0||B(_,R)||(m=!0,Et(_,R));_=_.next}while(m);Th=!1}}function Lt(){Wt()}function Wt(){Pr=Es=!1;var l=0;Uo!==0&&pl()&&(l=Uo);for(var c=Ms(),m=null,_=Fu;_!==null;){var T=_.next,R=Xe(_,c);R===0?(_.next=null,m===null?Fu=T:m.next=T,T===null&&(qn=m)):(m=_,(l!==0||(R&3)!==0)&&(Pr=!0)),_=T}Hi!==0&&Hi!==5||ot(l),Uo!==0&&(Uo=0)}function Xe(l,c){for(var m=l.suspendedLanes,_=l.pingedLanes,T=l.expirationTimes,R=l.pendingLanes&-62914561;0<R;){var H=31-Zs(R),ne=1<<H,Te=T[H];Te===-1?((ne&m)===0||(ne&_)!==0)&&(T[H]=D(ne,c)):Te<=c&&(l.expiredLanes|=ne),R&=~ne}if(c=gn,m=Cn,m=E(l,l===c?m:0,l.cancelPendingCommit!==null||l.timeoutHandle!==Ks),_=l.callbackNode,m===0||l===c&&(Zn===2||Zn===9)||l.cancelPendingCommit!==null)return _!==null&&_!==null&&xh(_),l.callbackNode=null,l.callbackPriority=0;if((m&3)===0||B(l,m)){if(c=m&-m,c===l.callbackPriority)return c;switch(_!==null&&xh(_),ie(m)){case 2:case 8:m=C0;break;case 32:m=Iu;break;case 268435456:m=Sh;break;default:m=Iu}return _=Je.bind(null,l),m=Du(m,_),l.callbackPriority=c,l.callbackNode=m,c}return _!==null&&_!==null&&xh(_),l.callbackPriority=2,l.callbackNode=null,2}function Je(l,c){if(Hi!==0&&Hi!==5)return l.callbackNode=null,l.callbackPriority=0,null;var m=l.callbackNode;if(_a()&&l.callbackNode!==m)return null;var _=Cn;return _=E(l,l===gn?_:0,l.cancelPendingCommit!==null||l.timeoutHandle!==Ks),_===0?null:(qr(l,_,c),Xe(l,Ms()),l.callbackNode!=null&&l.callbackNode===m?Je.bind(null,l):null)}function Et(l,c){if(_a())return null;qr(l,c,!0)}function _t(){pp?mp(function(){(Sn&6)!==0?Du(Ah,Lt):Wt()}):Du(Ah,Lt)}function tt(){if(Uo===0){var l=eo;l===0&&(l=_h,_h<<=1,(_h&261888)===0&&(_h=256)),Uo=l}return Uo}function Ht(l,c){if(vc===null){var m=vc=[];Vp=0,eo=tt(),ji={status:"pending",value:void 0,then:function(_){m.push(_)}}}return Vp++,c.then(ce,ce),c}function ce(){if(--Vp===0&&vc!==null){ji!==null&&(ji.status="fulfilled");var l=vc;vc=null,eo=0,ji=null;for(var c=0;c<l.length;c++)(0,l[c])()}}function Se(l,c){var m=[],_={status:"pending",value:null,reason:null,then:function(T){m.push(T)}};return l.then(function(){_.status="fulfilled",_.value=c;for(var T=0;T<m.length;T++)(0,m[T])(c)},function(T){for(_.status="rejected",_.reason=T,T=0;T<m.length;T++)(0,m[T])(void 0)}),_}function Qe(){var l=No.current;return l!==null?l:gn.pooledCache}function At(l,c){c===null?M(No,No.current):M(No,c.pool)}function Ze(){var l=Qe();return l===null?null:{parent:Ri?di._currentValue:di._currentValue2,pool:l}}function Ue(l,c){if(Di(l,c))return!0;if(typeof l!="object"||l===null||typeof c!="object"||c===null)return!1;var m=Object.keys(l),_=Object.keys(c);if(m.length!==_.length)return!1;for(_=0;_<m.length;_++){var T=m[_];if(!G_.call(c,T)||!Di(l[T],c[T]))return!1}return!0}function ft(l){return l=l.status,l==="fulfilled"||l==="rejected"}function $t(l,c,m){switch(m=l[m],m===void 0?l.push(c):m!==c&&(c.then(Me,Me),c=m),c.status){case"fulfilled":return c.value;case"rejected":throw l=c.reason,Ji(l),l;default:if(typeof c.status=="string")c.then(Me,Me);else{if(l=gn,l!==null&&100<l.shellSuspendCounter)throw Error(s(482));l=c,l.status="pending",l.then(function(_){if(c.status==="pending"){var T=c;T.status="fulfilled",T.value=_}},function(_){if(c.status==="pending"){var T=c;T.status="rejected",T.reason=_}})}switch(c.status){case"fulfilled":return c.value;case"rejected":throw l=c.reason,Ji(l),l}throw Os=c,$i}}function Mn(l){try{var c=l._init;return c(l._payload)}catch(m){throw m!==null&&typeof m=="object"&&typeof m.then=="function"?(Os=m,$i):m}}function wn(){if(Os===null)throw Error(s(459));var l=Os;return Os=null,l}function Ji(l){if(l===$i||l===Gr)throw Error(s(483))}function As(l){var c=Al;return Al+=1,Fo===null&&(Fo=[]),$t(Fo,l,c)}function ra(l,c){c=c.props.ref,l.ref=c!==void 0?c:null}function aa(l,c){throw c.$$typeof===cl?Error(s(525)):(l=Object.prototype.toString.call(c),Error(s(31,l==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":l)))}function Mr(l){function c(_e,de){if(l){var be=_e.deletions;be===null?(_e.deletions=[de],_e.flags|=16):be.push(de)}}function m(_e,de){if(!l)return null;for(;de!==null;)c(_e,de),de=de.sibling;return null}function _(_e){for(var de=new Map;_e!==null;)_e.key!==null?de.set(_e.key,_e):de.set(_e.index,_e),_e=_e.sibling;return de}function T(_e,de){return _e=ur(_e,de),_e.index=0,_e.sibling=null,_e}function R(_e,de,be){return _e.index=be,l?(be=_e.alternate,be!==null?(be=be.index,be<de?(_e.flags|=67108866,de):be):(_e.flags|=67108866,de)):(_e.flags|=1048576,de)}function H(_e){return l&&_e.alternate===null&&(_e.flags|=67108866),_e}function ne(_e,de,be,ct){return de===null||de.tag!==6?(de=ip(be,_e.mode,ct),de.return=_e,de):(de=T(de,be),de.return=_e,de)}function Te(_e,de,be,ct){var Zt=be.type;return Zt===fl?pt(_e,de,be.props.children,ct,be.key):de!==null&&(de.elementType===Zt||typeof Zt=="object"&&Zt!==null&&Zt.$$typeof===Us&&Mn(Zt)===de.type)?(de=T(de,be.props),ra(de,be),de.return=_e,de):(de=Ya(be.type,be.key,be.props,null,_e.mode,ct),ra(de,be),de.return=_e,de)}function qe(_e,de,be,ct){return de===null||de.tag!==4||de.stateNode.containerInfo!==be.containerInfo||de.stateNode.implementation!==be.implementation?(de=rp(be,_e.mode,ct),de.return=_e,de):(de=T(de,be.children||[]),de.return=_e,de)}function pt(_e,de,be,ct,Zt){return de===null||de.tag!==7?(de=Dr(be,_e.mode,ct,Zt),de.return=_e,de):(de=T(de,be),de.return=_e,de)}function et(_e,de,be){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return de=ip(""+de,_e.mode,be),de.return=_e,de;if(typeof de=="object"&&de!==null){switch(de.$$typeof){case xa:return be=Ya(de.type,de.key,de.props,null,_e.mode,be),ra(be,de),be.return=_e,be;case ul:return de=rp(de,_e.mode,be),de.return=_e,de;case Us:return de=Mn(de),et(_e,de,be)}if(Bo(de)||y(de))return de=Dr(de,_e.mode,be,null),de.return=_e,de;if(typeof de.then=="function")return et(_e,As(de),be);if(de.$$typeof===Ir)return et(_e,N(_e,de),be);aa(_e,de)}return null}function Bt(_e,de,be,ct){var Zt=de!==null?de.key:null;if(typeof be=="string"&&be!==""||typeof be=="number"||typeof be=="bigint")return Zt!==null?null:ne(_e,de,""+be,ct);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case xa:return be.key===Zt?Te(_e,de,be,ct):null;case ul:return be.key===Zt?qe(_e,de,be,ct):null;case Us:return be=Mn(be),Bt(_e,de,be,ct)}if(Bo(be)||y(be))return Zt!==null?null:pt(_e,de,be,ct,null);if(typeof be.then=="function")return Bt(_e,de,As(be),ct);if(be.$$typeof===Ir)return Bt(_e,de,N(_e,be),ct);aa(_e,be)}return null}function ln(_e,de,be,ct,Zt){if(typeof ct=="string"&&ct!==""||typeof ct=="number"||typeof ct=="bigint")return _e=_e.get(be)||null,
vendor: 6,038 bytes, line 4082
4082ne(de,_e,""+ct,Zt);if(typeof ct=="object"&&ct!==null){switch(ct.$$typeof){case xa:return _e=_e.get(ct.key===null?be:ct.key)||null,Te(de,_e,ct,Zt);case ul:return _e=_e.get(ct.key===null?be:ct.key)||null,qe(de,_e,ct,Zt);case Us:return ct=Mn(ct),ln(_e,de,be,ct,Zt)}if(Bo(ct)||y(ct))return _e=_e.get(be)||null,pt(de,_e,ct,Zt,null);if(typeof ct.then=="function")return ln(_e,de,be,As(ct),Zt);if(ct.$$typeof===Ir)return ln(_e,de,be,N(de,ct),Zt);aa(de,ct)}return null}function Ui(_e,de,be,ct){for(var Zt=null,xi=null,Qt=de,Nn=de=0,cs=null;Qt!==null&&Nn<be.length;Nn++){Qt.index>Nn?(cs=Qt,Qt=null):cs=Qt.sibling;var kn=Bt(_e,Qt,be[Nn],ct);if(kn===null){Qt===null&&(Qt=cs);break}l&&Qt&&kn.alternate===null&&c(_e,Qt),de=R(kn,de,Nn),xi===null?Zt=kn:xi.sibling=kn,xi=kn,Qt=cs}if(Nn===be.length)return m(_e,Qt),Tn&&Ae(_e,Nn),Zt;if(Qt===null){for(;Nn<be.length;Nn++)Qt=et(_e,be[Nn],ct),Qt!==null&&(de=R(Qt,de,Nn),xi===null?Zt=Qt:xi.sibling=Qt,xi=Qt);return Tn&&Ae(_e,Nn),Zt}for(Qt=_(Qt);Nn<be.length;Nn++)cs=ln(Qt,_e,Nn,be[Nn],ct),cs!==null&&(l&&cs.alternate!==null&&Qt.delete(cs.key===null?Nn:cs.key),de=R(cs,de,Nn),xi===null?Zt=cs:xi.sibling=cs,xi=cs);return l&&Qt.forEach(function(Vr){return c(_e,Vr)}),Tn&&Ae(_e,Nn),Zt}function Ec(_e,de,be,ct){if(be==null)throw Error(s(151));for(var Zt=null,xi=null,Qt=de,Nn=de=0,cs=null,kn=be.next();Qt!==null&&!kn.done;Nn++,kn=be.next()){Qt.index>Nn?(cs=Qt,Qt=null):cs=Qt.sibling;var Vr=Bt(_e,Qt,kn.value,ct);if(Vr===null){Qt===null&&(Qt=cs);break}l&&Qt&&Vr.alternate===null&&c(_e,Qt),de=R(Vr,de,Nn),xi===null?Zt=Vr:xi.sibling=Vr,xi=Vr,Qt=cs}if(kn.done)return m(_e,Qt),Tn&&Ae(_e,Nn),Zt;if(Qt===null){for(;!kn.done;Nn++,kn=be.next())kn=et(_e,kn.value,ct),kn!==null&&(de=R(kn,de,Nn),xi===null?Zt=kn:xi.sibling=kn,xi=kn);return Tn&&Ae(_e,Nn),Zt}for(Qt=_(Qt);!kn.done;Nn++,kn=be.next())kn=ln(Qt,_e,Nn,kn.value,ct),kn!==null&&(l&&kn.alternate!==null&&Qt.delete(kn.key===null?Nn:kn.key),de=R(kn,de,Nn),xi===null?Zt=kn:xi.sibling=kn,xi=kn);return l&&Qt.forEach(function(k_){return c(_e,k_)}),Tn&&Ae(_e,Nn),Zt}function Xo(_e,de,be,ct){if(typeof be=="object"&&be!==null&&be.type===fl&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case xa:e:{for(var Zt=be.key;de!==null;){if(de.key===Zt){if(Zt=be.type,Zt===fl){if(de.tag===7){m(_e,de.sibling),ct=T(de,be.props.children),ct.return=_e,_e=ct;break e}}else if(de.elementType===Zt||typeof Zt=="object"&&Zt!==null&&Zt.$$typeof===Us&&Mn(Zt)===de.type){m(_e,de.sibling),ct=T(de,be.props),ra(ct,be),ct.return=_e,_e=ct;break e}m(_e,de);break}else c(_e,de);de=de.sibling}be.type===fl?(ct=Dr(be.props.children,_e.mode,ct,be.key),ct.return=_e,_e=ct):(ct=Ya(be.type,be.key,be.props,null,_e.mode,ct),ra(ct,be),ct.return=_e,_e=ct)}return H(_e);case ul:e:{for(Zt=be.key;de!==null;){if(de.key===Zt)if(de.tag===4&&de.stateNode.containerInfo===be.containerInfo&&de.stateNode.implementation===be.implementation){m(_e,de.sibling),ct=T(de,be.children||[]),ct.return=_e,_e=ct;break e}else{m(_e,de);break}else c(_e,de);de=de.sibling}ct=rp(be,_e.mode,ct),ct.return=_e,_e=ct}return H(_e);case Us:return be=Mn(be),Xo(_e,de,be,ct)}if(Bo(be))return Ui(_e,de,be,ct);if(y(be)){if(Zt=y(be),typeof Zt!="function")throw Error(s(150));return be=Zt.call(be),Ec(_e,de,be,ct)}if(typeof be.then=="function")return Xo(_e,de,As(be),ct);if(be.$$typeof===Ir)return Xo(_e,de,N(_e,be),ct);aa(_e,be)}return typeof be=="string"&&be!==""||typeof be=="number"||typeof be=="bigint"?(be=""+be,de!==null&&de.tag===6?(m(_e,de.sibling),ct=T(de,be),ct.return=_e,_e=ct):(m(_e,de),ct=ip(be,_e.mode,ct),ct.return=_e,_e=ct),H(_e)):m(_e,de)}return function(_e,de,be,ct){try{Al=0;var Zt=Xo(_e,de,be,ct);return Fo=null,Zt}catch(Qt){if(Qt===$i||Qt===Gr)throw Qt;var xi=t(29,Qt,null,_e.mode);return xi.lanes=ct,xi.return=_e,xi}finally{}}}function oa(){for(var l=Ta,c=Sl=Ta=0;c<l;){var m=ms[c];ms[c++]=null;var _=ms[c];ms[c++]=null;var T=ms[c];ms[c++]=null;var R=ms[c];if(ms[c++]=null,_!==null&&T!==null){var H=_.pending;H===null?T.next=T:(T.next=H.next,H.next=T),_.pending=T}R!==0&&Ss(m,T,R)}}function Bs(l,c,m,_){ms[Ta++]=l,ms[Ta++]=c,ms[Ta++]=m,ms[Ta++]=_,Sl|=_,l.lanes|=_,l=l.alternate,l!==null&&(l.lanes|=_)}function ar(l,c,m,_){return Bs(l,c,m,_),ai(l)}function Kt(l,c){return Bs(l,null,null,c),ai(l)}function Ss(l,c,m){l.lanes|=m;var _=l.alternate;_!==null&&(_.lanes|=m);for(var T=!1,R=l.return;R!==null;)R.childLanes|=m,_=R.alternate,_!==null&&(_.childLanes|=m),R.tag===22&&(l=R.stateNode,l===null||l._visibility&1||(T=!0)),l=R,R=R.return;return l.tag===3?(R=l.stateNode,T&&c!==null&&(T=31-Zs(m),l=R.hiddenUpdates,_=l[T],_===null?l[T]=[c]:_.push(c),c.lane=m|536870912),R):null}function ai(l){if(50<zn)throw zn=0,ku=null,Error(s(185));for(var c=l.return;c!==null;)l=c,c=l.return;return l.tag===3?l.stateNode:null}function F(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function W(l,c){l=l.updateQueue,c.updateQueue===l&&(c.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function te(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function ge(l,c,m){var _=l.updateQueue;if(_===null)return null;if(_=_.shared,(Sn&2)!==0){var T=_.pending;return T===null?c.next=c:(c.next=T.next,T.next=c),_.pending=c,c=ai(l),Ss(l,null,m),c}return Bs(l,_,c,m),ai(l)}function Ce(l,c,m){if(c=c.updateQueue,c!==null&&(c=c.shared,(m&4194048)!==0)){var _=c.lanes;_&=l.pendingLanes,m|=_,c.lanes=m,I(l,m)}}function Re(l,c){var m=l.updateQueue,_=l.alternate;if(_!==null&&(_=_.updateQueue,m===_)){var T=null,R=null;if(m=m.firstBaseUpdate,m!==null){do{var H={lane:m.lane,tag:m.tag,payload:m.payload,callback:null,next:null};R===null?T=R=H:R=R.next=H,m=m.next}while(m!==null);R===null?T=R=c:R=R.next=c}else T=R=c;m={baseState:_.baseState,firstBaseUpdate:T,lastBaseUpdate:R,shared:_.shared,callbacks:_.callbacks},l.updateQueue=m;return}l=m.lastBaseUpdate,l===null?m.firstBaseUpdate=c:l.next=c,m.lastBaseUpdate=c}
vendor: 5,086 bytes, line 4082
4082function je(){if(wh){var l=ji;if(l!==null)throw l}}function Ye(l,c,m,_){wh=!1;var T=l.updateQueue;dr=!1;var R=T.firstBaseUpdate,H=T.lastBaseUpdate,ne=T.shared.pending;if(ne!==null){T.shared.pending=null;var Te=ne,qe=Te.next;Te.next=null,H===null?R=qe:H.next=qe,H=Te;var pt=l.alternate;pt!==null&&(pt=pt.updateQueue,ne=pt.lastBaseUpdate,ne!==H&&(ne===null?pt.firstBaseUpdate=qe:ne.next=qe,pt.lastBaseUpdate=Te))}if(R!==null){var et=T.baseState;H=0,pt=qe=Te=null,ne=R;do{var Bt=ne.lane&-536870913,ln=Bt!==ne.lane;if(ln?(Cn&Bt)===Bt:(_&Bt)===Bt){Bt!==0&&Bt===eo&&(wh=!0),pt!==null&&(pt=pt.next={lane:0,tag:ne.tag,payload:ne.payload,callback:null,next:null});e:{var Ui=l,Ec=ne;Bt=c;var Xo=m;switch(Ec.tag){case 1:if(Ui=Ec.payload,typeof Ui=="function"){et=Ui.call(Xo,et,Bt);break e}et=Ui;break e;case 3:Ui.flags=Ui.flags&-65537|128;case 0:if(Ui=Ec.payload,Bt=typeof Ui=="function"?Ui.call(Xo,et,Bt):Ui,Bt==null)break e;et=nh({},et,Bt);break e;case 2:dr=!0}}Bt=ne.callback,Bt!==null&&(l.flags|=64,ln&&(l.flags|=8192),ln=T.callbacks,ln===null?T.callbacks=[Bt]:ln.push(Bt))}else ln={lane:Bt,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null},pt===null?(qe=pt=ln,Te=et):pt=pt.next=ln,H|=Bt;if(ne=ne.next,ne===null){if(ne=T.shared.pending,ne===null)break;ln=ne,ne=ln.next,ln.next=null,T.lastBaseUpdate=ln,T.shared.pending=null}}while(!0);pt===null&&(Te=et),T.baseState=Te,T.firstBaseUpdate=qe,T.lastBaseUpdate=pt,R===null&&(T.shared.lanes=0),no|=H,l.lanes=H,l.memoizedState=et}}function lt(l,c){if(typeof l!="function")throw Error(s(191,l));l.call(c)}function rt(l,c){var m=l.callbacks;if(m!==null)for(l.callbacks=null,l=0;l<m.length;l++)lt(m[l],c)}function ht(l,c){l=wa,M(Oo,l),M(bl,c),wa=l|c.baseLanes}function st(){M(Oo,wa),M(bl,bl.current)}function G(){wa=Oo.current,S(bl),S(Oo)}function Q(l){var c=l.alternate;M(bi,bi.current&1),M(js,l),$s===null&&(c===null||bl.current!==null||c.memoizedState!==null)&&($s=l)}function oe(l){M(bi,bi.current),M(js,l),$s===null&&($s=l)}function ue(l){l.tag===22?(M(bi,bi.current),M(js,l),$s===null&&($s=l)):se()}function se(){M(bi,bi.current),M(js,js.current)}function Ne(l){S(js),$s===l&&($s=null),S(bi)}function $e(l){for(var c=l;c!==null;){if(c.tag===13){var m=c.memoizedState;if(m!==null&&(m=m.dehydrated,m===null||Io(m)||uh(m)))return c}else if(c.tag===19&&(c.memoizedProps.revealOrder==="forwards"||c.memoizedProps.revealOrder==="backwards"||c.memoizedProps.revealOrder==="unstable_legacy-backwards"||c.memoizedProps.revealOrder==="together")){if((c.flags&128)!==0)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===l)break;for(;c.sibling===null;){if(c.return===null||c.return===l)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}function ze(){throw Error(s(321))}function gt(l,c){if(c===null)return!1;for(var m=0;m<c.length&&m<l.length;m++)if(!Di(l[m],c[m]))return!1;return!0}function at(l,c,m,_,T,R){return to=R,un=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,Jt.H=l===null||l.memoizedState===null?vi:Ca,Dn=!1,R=m(_,T),Dn=!1,hn&&(R=ut(c,m,_,T)),Ut(l),R}function Ut(l){Jt.H=pr;var c=kt!==null&&kt.next!==null;if(to=0,sn=kt=un=null,mn=!1,Hr=0,Qr=null,c)throw Error(s(300));l===null||oi||(l=l.dependencies,l!==null&&Pt(l)&&(oi=!0))}function ut(l,c,m,_){un=l;var T=0;do{if(hn&&(Qr=null),Hr=0,hn=!1,25<=T)throw Error(s(301));if(T+=1,sn=kt=null,l.updateQueue!=null){var R=l.updateQueue;R.lastEffect=null,R.events=null,R.stores=null,R.memoCache!=null&&(R.memoCache.index=0)}Jt.H=Po,R=c(m,_)}while(hn);return R}function Dt(){var l=Jt.H,c=l.useState()[0];return c=typeof c.then=="function"?xt(c):c,l=l.useState()[0],(kt!==null?kt.memoizedState:null)!==l&&(un.flags|=1024),c}function on(){var l=Ts!==0;return Ts=0,l}function Hn(l,c,m){c.updateQueue=l.updateQueue,c.flags&=-2053,l.lanes&=~m}function fn(l){if(mn){for(l=l.memoizedState;l!==null;){var c=l.queue;c!==null&&(c.pending=null),l=l.next}mn=!1}to=0,sn=kt=un=null,hn=!1,Hr=Ts=0,Qr=null}function Rt(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return sn===null?un.memoizedState=sn=l:sn=sn.next=l,sn}function nt(){if(kt===null){var l=un.alternate;l=l!==null?l.memoizedState:null}else l=kt.next;var c=sn===null?un.memoizedState:sn.next;if(c!==null)sn=c,kt=l;else{if(l===null)throw un.alternate===null?Error(s(467)):Error(s(310));kt=l,l={memoizedState:kt.memoizedState,baseState:kt.baseState,baseQueue:kt.baseQueue,queue:kt.queue,next:null},sn===null?un.memoizedState=sn=l:sn=sn.next=l}return sn}function zt(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xt(l){var c=Hr;return Hr+=1,Qr===null&&(Qr=[]),l=$t(Qr,l,c),c=un,(sn===null?c.memoizedState:sn.next)===null&&(c=c.alternate,Jt.H=c===null||c.memoizedState===null?vi:Ca),l}function Pn(l){if(l!==null&&typeof l=="object"){if(typeof l.then=="function")return xt(l);if(l.$$typeof===Ir)return J(l)}throw Error(s(438,String(l)))}function Yi(l){var c=null,m=un.updateQueue;if(m!==null&&(c=m.memoCache),c==null){var _=un.alternate;_!==null&&(_=_.updateQueue,_!==null&&(_=_.memoCache,_!=null&&(c={data:_.data.map(function(T){return T.
vendor: 4,272 bytes, line 4082
4082slice()}),index:0})))}if(c==null&&(c={data:[],index:0}),m===null&&(m=zt(),un.updateQueue=m),m.memoCache=c,m=c.data[c.index],m===void 0)for(m=c.data[c.index]=Array(l),_=0;_<l;_++)m[_]=op;return c.index++,m}function _n(l,c){return typeof c=="function"?c(l):c}function ci(l){var c=nt();return Xn(c,kt,l)}function Xn(l,c,m){var _=l.queue;if(_===null)throw Error(s(311));_.lastRenderedReducer=m;var T=l.baseQueue,R=_.pending;if(R!==null){if(T!==null){var H=T.next;T.next=R.next,R.next=H}c.baseQueue=T=R,_.pending=null}if(R=l.baseState,T===null)l.memoizedState=R;else{c=T.next;var ne=H=null,Te=null,qe=c,pt=!1;do{var et=qe.lane&-536870913;if(et!==qe.lane?(Cn&et)===et:(to&et)===et){var Bt=qe.revertLane;if(Bt===0)Te!==null&&(Te=Te.next={lane:0,revertLane:0,gesture:null,action:qe.action,hasEagerState:qe.hasEagerState,eagerState:qe.eagerState,next:null}),et===eo&&(pt=!0);else if((to&Bt)===Bt){qe=qe.next,Bt===eo&&(pt=!0);continue}else et={lane:0,revertLane:qe.revertLane,gesture:null,action:qe.action,hasEagerState:qe.hasEagerState,eagerState:qe.eagerState,next:null},Te===null?(ne=Te=et,H=R):Te=Te.next=et,un.lanes|=Bt,no|=Bt;et=qe.action,Dn&&m(R,et),R=qe.hasEagerState?qe.eagerState:m(R,et)}else Bt={lane:et,revertLane:qe.revertLane,gesture:qe.gesture,action:qe.action,hasEagerState:qe.hasEagerState,eagerState:qe.eagerState,next:null},Te===null?(ne=Te=Bt,H=R):Te=Te.next=Bt,un.lanes|=et,no|=et;qe=qe.next}while(qe!==null&&qe!==c);if(Te===null?H=R:Te.next=ne,!Di(R,l.memoizedState)&&(oi=!0,pt&&(m=ji,m!==null)))throw m;l.memoizedState=R,l.baseState=H,l.baseQueue=Te,_.lastRenderedState=R}return T===null&&(_.lanes=0),[l.memoizedState,_.dispatch]}function qi(l){var c=nt(),m=c.queue;if(m===null)throw Error(s(311));m.lastRenderedReducer=l;var _=m.dispatch,T=m.pending,R=c.memoizedState;if(T!==null){m.pending=null;var H=T=T.next;do R=l(R,H.action),H=H.next;while(H!==T);Di(R,c.memoizedState)||(oi=!0),c.memoizedState=R,c.baseQueue===null&&(c.baseState=R),m.lastRenderedState=R}return[R,_]}function Oi(l,c,m){var _=un,T=nt(),R=Tn;if(R){if(m===void 0)throw Error(s(407));m=m()}else m=c();var H=!Di((kt||T).memoizedState,m);if(H&&(T.memoizedState=m,oi=!0),T=T.queue,Wl($o.bind(null,_,T,l),[l]),T.getSnapshot!==c||H||sn!==null&&sn.memoizedState.tag&1){if(_.flags|=2048,or(9,{destroy:void 0},is.bind(null,_,T,m,c),null),gn===null)throw Error(s(349));R||(to&127)!==0||ns(_,c,m)}return m}function ns(l,c,m){l.flags|=16384,l={getSnapshot:c,value:m},c=un.updateQueue,c===null?(c=zt(),un.updateQueue=c,c.stores=[l]):(m=c.stores,m===null?c.stores=[l]:m.push(l))}function is(l,c,m,_){c.value=m,c.getSnapshot=_,Er(c)&&cg(l)}function $o(l,c,m){return m(function(){Er(c)&&cg(l)})}function Er(l){var c=l.getSnapshot;l=l.value;try{var m=c();return!Di(l,m)}catch{return!0}}function cg(l){var c=Kt(l,2);c!==null&&mi(c,l,2)}function Id(l){var c=Rt();if(typeof l=="function"){var m=l;if(l=m(),Dn){j(!0);try{m()}finally{j(!1)}}}return c.memoizedState=c.baseState=l,c.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_n,lastRenderedState:l},c}function su(l,c,m,_){return l.baseState=m,Xn(l,kt,typeof _=="function"?_:_n)}function Ha(l,c,m,_,T){if(Ff(l))throw Error(s(485));if(l=c.action,l!==null){var R={payload:T,action:l,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(H){R.listeners.push(H)}};Jt.T!==null?m(!0):R.isTransition=!1,_(R),m=c.pending,m===null?(R.next=c.pending=R,Rf(c,R)):(R.next=m.next,c.pending=m.next=R)}}function Rf(l,c){var m=c.action,_=c.payload,T=l.state;if(c.isTransition){var R=Jt.T,H={};Jt.T=H;try{var ne=m(T,_),Te=Jt.S;Te!==null&&Te(H,ne),Bf(l,c,ne)}catch(qe){vo(l,c,qe)}finally{R!==null&&H.types!==null&&(R.types=H.types),Jt.T=R}}else try{R=m(T,_),Bf(l,c,R)}catch(qe){vo(l,c,qe)}}function Bf(l,c,m){m!==null&&typeof m=="object"&&typeof m.then=="function"?m.then(function(_){el(l,c,_)},function(_){return vo(l,c,_)}):el(l,c,m)}function el(l,c,m){c.status="fulfilled",c.value=m,Ld(c),l.state=m,c=l.pending,c!==null&&(m=c.next,m===c?l.pending=null:(m=m.next,c.next=m,Rf(l,m)))}function vo(l,c,m){var _=l.pending;if(l.pending=null,_!==null){_=_.next;do c.status="rejected",c.reason=m,Ld(c),c=c.next;while(c!==_)}l.action=null}function Ld(l){l=l.listeners;for(var c=0;c<l.length;c++)(0,l[c])()}function Df(l,c){return c}
vendor: 14,590 bytes, line 4082
4082function Ud(l,c){if(Tn){var m=gn.formState;if(m!==null){e:{var _=un;if(Tn){if(hi){var T=i0(hi,Fs);if(T){hi=s0(T),_=Tp(T);break e}}It(_)}_=!1}_&&(c=m[0])}}m=Rt(),m.memoizedState=m.baseState=c,_={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Df,lastRenderedState:c},m.queue=_,m=mg.bind(null,un,_),_.dispatch=m,_=Id(!1);var R=Nf.bind(null,un,!1,_.queue);return _=Rt(),T={state:c,dispatch:null,action:l,pending:null},_.queue=T,m=Ha.bind(null,un,T,R,m),T.dispatch=m,_.memoizedState=l,[c,m,!1]}function Vl(l){var c=nt();return la(c,kt,l)}function la(l,c,m){if(c=Xn(l,c,Df)[0],l=ci(_n)[0],typeof c=="object"&&c!==null&&typeof c.then=="function")try{var _=xt(c)}catch(H){throw H===$i?Gr:H}else _=c;c=nt();var T=c.queue,R=T.dispatch;return m!==c.memoizedState&&(un.flags|=2048,or(9,{destroy:void 0},Nd.bind(null,T,m),null)),[_,R,l]}function Nd(l,c){l.action=c}function Xl(l){var c=nt(),m=kt;if(m!==null)return la(c,m,l);nt(),c=c.memoizedState,m=nt();var _=m.queue.dispatch;return m.memoizedState=l,[c,_,!1]}function or(l,c,m,_){return l={tag:l,create:m,deps:_,inst:c,next:null},c=un.updateQueue,c===null&&(c=zt(),un.updateQueue=c),m=c.lastEffect,m===null?c.lastEffect=l.next=l:(_=m.next,m.next=l,l.next=_,c.lastEffect=l),l}function If(){return nt().memoizedState}function tl(l,c,m,_){var T=Rt();un.flags|=l,T.memoizedState=or(1|c,{destroy:void 0},m,_===void 0?null:_)}function ru(l,c,m,_){var T=nt();_=_===void 0?null:_;var R=T.memoizedState.inst;kt!==null&&_!==null&>(_,kt.memoizedState.deps)?T.memoizedState=or(c,R,m,_):(un.flags|=l,T.memoizedState=or(1|c,R,m,_))}function au(l,c){tl(8390656,8,l,c)}function Wl(l,c){ru(2048,8,l,c)}function ug(l){un.flags|=4;var c=un.updateQueue;if(c===null)c=zt(),un.updateQueue=c,c.events=[l];else{var m=c.events;m===null?c.events=[l]:m.push(l)}}function Ds(l){var c=nt().memoizedState;return ug({ref:c,nextImpl:l}),function(){if((Sn&2)!==0)throw Error(s(440));return c.impl.apply(void 0,arguments)}}function yo(l,c){return ru(4,2,l,c)}function ou(l,c){return ru(4,4,l,c)}function Jl(l,c){if(typeof c=="function"){l=l();var m=c(l);return function(){typeof m=="function"?m():c(null)}}if(c!=null)return l=l(),c.current=l,function(){c.current=null}}function fg(l,c,m){m=m!=null?m.concat([l]):null,ru(4,4,Jl.bind(null,c,l),m)}function lu(){}function Lf(l,c){var m=nt();c=c===void 0?null:c;var _=m.memoizedState;return c!==null&>(c,_[1])?_[0]:(m.memoizedState=[l,c],l)}function Yl(l,c){var m=nt();c=c===void 0?null:c;var _=m.memoizedState;if(c!==null&>(c,_[1]))return _[0];if(_=l(),Dn){j(!0);try{l()}finally{j(!1)}}return m.memoizedState=[_,c],_}function ql(l,c,m){return m===void 0||(to&1073741824)!==0&&(Cn&261930)===0?l.memoizedState=c:(l.memoizedState=m,l=Xa(),un.lanes|=l,no|=l,m)}function Fd(l,c,m,_){return Di(m,c)?m:bl.current!==null?(l=ql(l,m,_),Di(l,c)||(oi=!0),l):(to&42)===0||(to&1073741824)!==0&&(Cn&261930)===0?(oi=!0,l.memoizedState=m):(l=Xa(),un.lanes|=l,no|=l,c)}function hg(l,c,m,_,T){var R=Lr();En(R!==0&&8>R?R:8);var H=Jt.T,ne={};Jt.T=ne,Nf(l,!1,c,m);try{var Te=T(),qe=Jt.S;if(qe!==null&&qe(ne,Te),Te!==null&&typeof Te=="object"&&typeof Te.then=="function"){var pt=Se(Te,_);cu(l,c,pt,ui(l))}else cu(l,c,_,ui(l))}catch(et){cu(l,c,{then:function(){},status:"rejected",reason:et},ui())}finally{En(R),H!==null&&ne.types!==null&&(H.types=ne.types),Jt.T=H}}function dg(l){var c=l.memoizedState;if(c!==null)return c;c={memoizedState:ml,baseState:ml,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_n,lastRenderedState:ml},next:null};var m={};return c.next={memoizedState:m,baseState:m,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_n,lastRenderedState:m},next:null},l.memoizedState=c,l=l.alternate,l!==null&&(l.memoizedState=c),c}function Od(){return J(gl)}function Uf(){return nt().memoizedState}function pg(){return nt().memoizedState}function B_(l){for(var c=l.return;c!==null;){switch(c.tag){case 24:case 3:var m=ui();l=te(m);var _=ge(c,l,m);_!==null&&(mi(_,c,m),Ce(_,c,m)),c={cache:Ee()},l.payload=c;return}c=c.return}}function D_(l,c,m){var _=ui();m={lane:_,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Ff(l)?gg(c,m):(m=ar(l,c,m,_),m!==null&&(mi(m,l,_),vg(m,c,_)))}function mg(l,c,m){var _=ui();cu(l,c,m,_)}function cu(l,c,m,_){var T={lane:_,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null};if(Ff(l))gg(c,T);else{var R=l.alternate;if(l.lanes===0&&(R===null||R.lanes===0)&&(R=c.lastRenderedReducer,R!==null))try{var H=c.lastRenderedState,ne=R(H,m);if(T.hasEagerState=!0,T.eagerState=ne,Di(ne,H))return Bs(l,c,T,0),gn===null&&oa(),!1}catch{}finally{}if(m=ar(l,c,T,_),m!==null)return mi(m,l,_),vg(m,c,_),!0}return!1}function Nf(l,c,m,_){if(_={lane:2,revertLane:tt(),gesture:null,action:_,hasEagerState:!1,eagerState:null,next:null},Ff(l)){if(c)throw Error(s(479))}else c=ar(l,m,_,2),c!==null&&mi(c,l,2)}function Ff(l){var c=l.alternate;return l===un||c!==null&&c===un}function gg(l,c){hn=mn=!0;var m=l.pending;m===null?c.next=c:(c.next=m.next,m.next=c),l.pending=c}function vg(l,c,m){if((m&4194048)!==0){var _=c.lanes;_&=l.pendingLanes,m|=_,c.lanes=m,I(l,m)}}function Pd(l,c,m,_){c=l.memoizedState,m=m(_,c),m=m==null?c:nh({},c,m),l.memoizedState=m,l.lanes===0&&(l.updateQueue.baseState=m)}function Of(l,c,m,_,T,R,H){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(_,R,H):c.prototype&&c.prototype.isPureReactComponent?!Ue(m,_)||!Ue(T,R):!0}function yg(l,c,m,_){l=c.state,typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps(m,_),typeof c.UNSAFE_componentWillReceiveProps=="function"&&c.UNSAFE_componentWillReceiveProps(m,_),c.state!==l&&Ou.enqueueReplaceState(c,c.state,null)}function nl(l,c){var m=c;if("ref"in c){m={};for(var _ in c)_!=="ref"&&(m[_]=c[_])}if(l=l.defaultProps){m===c&&(m=nh({},m));for(var T in l)m[T]===void 0&&(m[T]=l[T])}return m}function Pf(l,c){try{var m=l.onUncaughtError;m(c.value,{componentStack:c.stack})}catch(_){setTimeout(function(){throw _})}}function zd(l,c,m){try{var _=l.onCaughtError;_(m.value,{componentStack:m.stack,errorBoundary:c.tag===1?c.stateNode:null})}catch(T){setTimeout(function(){throw T})}}function Gd(l,c,m){return m=te(m),m.tag=3,m.payload={element:null},m.callback=function(){Pf(l,c)},m}function _g(l){return l=te(l),l.tag=3,l}function xg(l,c,m,_){var T=m.type.getDerivedStateFromError;if(typeof T=="function"){var R=_.value;l.payload=function(){return T(R)},l.callback=function(){zd(c,m,_)}}var H=m.stateNode;H!==null&&typeof H.componentDidCatch=="function"&&(l.callback=function(){zd(c,m,_),typeof T!="function"&&(io===null?io=new Set([this]):io.add(this));var ne=_.stack;this.componentDidCatch(_.value,{componentStack:ne!==null?ne:""})})}function I_(l,c,m,_,T){if(m.flags|=32768,_!==null&&typeof _=="object"&&typeof _.then=="function"){if(c=m.alternate,c!==null&&yt(c,m,T,!0),m=js.current,m!==null){switch(m.tag){case 31:case 13:return $s===null?rc():m.alternate===null&&_i===0&&(_i=3),m.flags&=-257,m.flags|=65536,m.lanes=T,_===Ea?m.flags|=16384:(c=m.updateQueue,c===null?m.updateQueue=new Set([_]):c.add(_),lc(l,_,T)),!1;case 22:return m.flags|=65536,_===Ea?m.flags|=16384:(c=m.updateQueue,c===null?(c={transitions:null,markerInstances:null,retryQueue:new Set([_])},m.updateQueue=c):(m=c.retryQueue,m===null?c.retryQueue=new Set([_]):m.add(_)),lc(l,_,T)),!1}throw Error(s(435,m.tag))}return lc(l,_,T),rc(),!1}if(Tn)return c=js.current,c!==null?((c.flags&65536)===0&&(c.flags|=256),c.flags|=65536,c.lanes=T,_!==Eh&&(l=Error(s(422),{cause:_}),Ke(Be(l,m)))):(_!==Eh&&(c=Error(s(423),{cause:_}),Ke(Be(c,m))),l=l.current.alternate,l.flags|=65536,T&=-T,l.lanes|=T,_=Be(_,m),T=Gd(l.stateNode,_,T),Re(l,T),_i!==4&&(_i=2)),!1;var R=Error(s(520),{cause:_});if(R=Be(R,m),zu===null?zu=[R]:zu.push(R),_i!==4&&(_i=2),c===null)return!0;_=Be(_,m),m=c;do{switch(m.tag){case 3:return m.flags|=65536,l=T&-T,m.lanes|=l,l=Gd(m.stateNode,_,l),Re(m,l),!1;case 1:if(c=m.type,R=m.stateNode,(m.flags&128)===0&&(typeof c.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(io===null||!io.has(R))))return m.flags|=65536,T&=-T,m.lanes|=T,T=_g(T),xg(T,l,m,_),Re(m,T),!1}m=m.return}while(m!==null);return!1}function fs(l,c,m,_){c.child=l===null?Xp(c,null,m,_):ps(c,l.child,m,_)}function Ag(l,c,m,_,T){m=m.render;var R=c.ref;if("ref"in _){var H={};for(var ne in _)ne!=="ref"&&(H[ne]=_[ne])}else H=_;return it(c),_=at(l,c,m,H,R,T),ne=on(),l!==null&&!oi?(Hn(l,c,T),ca(l,c,T)):(Tn&&ne&&He(c),c.flags|=1,fs(l,c,_,T),c.child)}function Sg(l,c,m,_,T){if(l===null){var R=m.type;return typeof R=="function"&&!ol(R)&&R.defaultProps===void 0&&m.compare===null?(c.tag=15,c.type=R,bg(l,c,R,_,T)):(l=Ya(m.type,null,_,c,c.mode,T),l.ref=c.ref,l.return=c,c.child=l)}if(R=l.child,!fu(l,T)){var H=R.memoizedProps;if(m=m.compare,m=m!==null?m:Ue,m(H,_)&&l.ref===c.ref)return ca(l,c,T)}return c.flags|=1,l=ur(R,_),l.ref=c.ref,l.return=c,c.child=l}function bg(l,c,m,_,T){if(l!==null){var R=l.memoizedProps;if(Ue(R,_)&&l.ref===c.ref)if(oi=!1,c.pendingProps=_=R,fu(l,T))(l.flags&131072)!==0&&(oi=!0);else return c.lanes=l.lanes,ca(l,c,T)}return Gf(l,c,m,_,T)}function Mg(l,c,m,_){var T=_.children,R=l!==null?l.memoizedState:null;if(l===null&&c.stateNode===null&&(c.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),_.mode==="hidden"){if((c.flags&128)!==0){if(R=R!==null?R.baseLanes|m:m,l!==null){for(_=c.child=l.child,T=0;_!==null;)T=T|_.lanes|_.childLanes,_=_.sibling;_=T&~R}else _=0,c.child=null;return Kl(l,c,R,m,_)}if((m&536870912)!==0)c.memoizedState={baseLanes:0,cachePool:null},l!==null&&At(c,R!==null?R.cachePool:null),R!==null?ht(c,R):st(),ue(c);else return _=c.lanes=536870912,Kl(l,c,R!==null?R.baseLanes|m:m,m,_)}else R!==null?(At(c,R.cachePool),ht(c,R),se(),c.memoizedState=null):(l!==null&&At(c,null),st(),se());return fs(l,c,T,m),c.child}function il(l,c){return l!==null&&l.tag===22||c.stateNode!==null||(c.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.sibling}function Kl(l,c,m,_,T){var R=Qe();return R=R===null?null:{parent:Ri?di._currentValue:di._currentValue2,pool:R},c.memoizedState={baseLanes:m,cachePool:R},l!==null&&At(c,null),st(),ue(c),l!==null&&yt(l,c,_,!0),c.childLanes=T,null}function zf(l,c){return c=_o({mode:c.mode,children:c.children},l.mode),c.ref=l.ref,l.child=c,c.return=l,c}function Hd(l,c,m){return ps(c,l.child,null,m),l=zf(c,c.pendingProps),l.flags|=2,Ne(c),c.memoizedState=null,l}function Eg(l,c,m){var _=c.pendingProps,T=(c.flags&128)!==0;if(c.flags&=-129,l===null){if(Tn){if(_.mode==="hidden")return l=zf(c,_),c.lanes=536870912,il(null,l);if(oe(c),(l=hi)?(l=wp(l,Fs),l!==null&&(c.memoizedState={dehydrated:l,treeContext:Fr!==null?{id:hs,overflow:Kr}:null,retryLane:536870912,hydrationErrors:null},m=sp(l),m.return=c,c.child=m,Qi=c,hi=null)):l=null,l===null)throw It(c);return c.lanes=536870912,null}return zf(c,_)}var R=l.memoizedState;if(R!==null){var H=R.dehydrated;if(oe(c),T)if(c.flags&256)c.flags&=-257,c=Hd(l,c,m);else if(c.memoizedState!==null)c.child=l.child,c.flags|=128,c=null;else throw Error(s(558));else if(oi||yt(l,c,m,!1),T=(m&l.childLanes)!==0,oi||T){if(_=gn,_!==null&&(H=O(_,m),H!==0&&H!==R.retryLane))throw R.retryLane=H,Kt(l,H),mi(_,l,H),Ps;rc(),c=Hd(l,c,m)}else l=R.treeContext,fi&&(hi=l0(H),Qi=c,Tn=!0,Ma=null,Fs=!1,l!==null&&bt(c,l)),c=zf(c,_),c.flags|=4096;return c}return l=ur(l.child,{mode:_.mode,children:_.children}),l.ref=c.ref,c.child=l,l.return=c,l}function uu(l,c){var m=c.ref;if(m===null)l!==null&&l.ref!==null&&(c.flags|=4194816);else{if(typeof m!="function"&&typeof m!="object")throw Error(s(284));(l===null||l.ref!==m)&&(c.flags|=4194816)}}function Gf(l,c,m,_,T){return it(c),m=at(l,c,m,_,void 0,T),_=on(),l!==null&&!oi?(Hn(l,c,T),ca(l,c,T)):(Tn&&_&&He(c),c.flags|=1,fs(l,c,m,T),c.child)}function kd(l,c,m,_,T,R){return it(c),c.updateQueue=null,m=ut(c,_,m,T),Ut(l),_=on(),l!==null&&!oi?(Hn(l,c,R),ca(l,c,R)):(Tn&&_&&He(c),c.flags|=1,fs(l,c,m,R),c.child)}function sl(l,c,m,_,T){if(it(c),c.stateNode===null){var R=Aa,H=m.contextType;typeof H=="object"&&H!==null&&(R=J(H)),R=new m(_,R),c.memoizedState=R.state!==null&&R.state!==void 0?R.state:null,R.updater=Ou,c.stateNode=R,R._reactInternals=c,R=c.stateNode,R.props=_,R.state=c.memoizedState,R.refs={},F(c),H=m.contextType,R.context=typeof H=="object"&&H!==null?J(H):Aa,R.state=c.memoizedState,H=m.getDerivedStateFromProps,typeof H=="function"&&(Pd(c,m,H,_),R.state=c.memoizedState),typeof m.getDerivedStateFromProps=="function"||typeof R.getSnapshotBeforeUpdate=="function"||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(H=R.state,typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount(),H!==R.state&&Ou.enqueueReplaceState(R,R.state,null),Ye(c,_,R,T),je(),R.state=c.memoizedState),typeof R.componentDidMount=="function"&&(c.flags|=4194308),_=!0}else if(l===null){R=c.stateNode;var ne=c.memoizedProps,Te=nl(m,ne);R.props=Te;var qe=R.context,pt=m.contextType;H=Aa,typeof pt=="object"&&pt!==null&&(H=J(pt));var et=m.getDerivedStateFromProps;pt=typeof et=="function"||typeof R.getSnapshotBeforeUpdate=="function",ne=c.pendingProps!==ne,pt||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(ne||qe!==H)&&yg(c,R,_,H),dr=!1;var Bt=c.memoizedState;R.state=Bt,Ye(c,_,R,T),je(),qe=c.memoizedState,ne||Bt!==qe||dr?(typeof et=="function"&&(Pd(c,m,et,_),qe=c.memoizedState),(Te=dr||Of(c,m,Te,_,Bt,qe,H))?(pt||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount()),typeof R.componentDidMount=="function"&&(c.flags|=4194308)):(typeof R.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=_,c.memoizedState=qe),R.props=_,R.state=qe,R.context=H,_=Te):(typeof R.componentDidMount=="function"&&(c.flags|=4194308),_=!1)}else{R=c.stateNode,W(l,c),H=c.memoizedProps,pt=nl(m,H),R.props=pt,et=c.pendingProps,Bt=R.context,qe=m.contextType,Te=Aa,typeof qe=="object"&&qe!==null&&(Te=J(qe)),ne=m.getDerivedStateFromProps,(qe=typeof ne=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(H!==et||Bt!==Te)&&yg(c,R,_,Te),dr=!1,Bt=c.memoizedState,R.state=Bt,Ye(c,_,R,T),je();var ln=c.memoizedState;H!==et||Bt!==ln||dr||l!==null&&l.dependencies!==null&&Pt(l.depen
vendor: 9,886 bytes, line 4082
4082dencies)?(typeof ne=="function"&&(Pd(c,m,ne,_),ln=c.memoizedState),(pt=dr||Of(c,m,pt,_,Bt,ln,Te)||l!==null&&l.dependencies!==null&&Pt(l.dependencies))?(qe||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(_,ln,Te),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(_,ln,Te)),typeof R.componentDidUpdate=="function"&&(c.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof R.componentDidUpdate!="function"||H===l.memoizedProps&&Bt===l.memoizedState||(c.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||H===l.memoizedProps&&Bt===l.memoizedState||(c.flags|=1024),c.memoizedProps=_,c.memoizedState=ln),R.props=_,R.state=ln,R.context=Te,_=pt):(typeof R.componentDidUpdate!="function"||H===l.memoizedProps&&Bt===l.memoizedState||(c.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||H===l.memoizedProps&&Bt===l.memoizedState||(c.flags|=1024),_=!1)}return R=_,uu(l,c),_=(c.flags&128)!==0,R||_?(R=c.stateNode,m=_&&typeof m.getDerivedStateFromError!="function"?null:R.render(),c.flags|=1,l!==null&&_?(c.child=ps(c,l.child,null,T),c.child=ps(c,null,m,T)):fs(l,c,m,T),c.memoizedState=R.state,l=c.child):l=ca(l,c,T),l}function Tg(l,c,m,_){return Xt(),c.flags|=256,fs(l,c,m,_),c.child}function Vd(l){return{baseLanes:l,cachePool:Ze()}}function Xd(l,c,m){return l=l!==null?l.childLanes&~m:0,c&&(l|=zs),l}function Wd(l,c,m){var _=c.pendingProps,T=!1,R=(c.flags&128)!==0,H;if((H=R)||(H=l!==null&&l.memoizedState===null?!1:(bi.current&2)!==0),H&&(T=!0,c.flags&=-129),H=(c.flags&32)!==0,c.flags&=-33,l===null){if(Tn){if(T?Q(c):se(),(l=hi)?(l=h0(l,Fs),l!==null&&(c.memoizedState={dehydrated:l,treeContext:Fr!==null?{id:hs,overflow:Kr}:null,retryLane:536870912,hydrationErrors:null},m=sp(l),m.return=c,c.child=m,Qi=c,hi=null)):l=null,l===null)throw It(c);return uh(l)?c.lanes=32:c.lanes=536870912,null}var ne=_.children;return _=_.fallback,T?(se(),T=c.mode,ne=_o({mode:"hidden",children:ne},T),_=Dr(_,T,m,null),ne.return=c,_.return=c,ne.sibling=_,c.child=ne,_=c.child,_.memoizedState=Vd(m),_.childLanes=Xd(l,H,m),c.memoizedState=Ml,il(null,_)):(Q(c),Hf(c,ne))}var Te=l.memoizedState;if(Te!==null&&(ne=Te.dehydrated,ne!==null)){if(R)c.flags&256?(Q(c),c.flags&=-257,c=rl(l,c,m)):c.memoizedState!==null?(se(),c.child=l.child,c.flags|=128,c=null):(se(),ne=_.fallback,T=c.mode,_=_o({mode:"visible",children:_.children},T),ne=Dr(ne,T,m,null),ne.flags|=2,_.return=c,ne.return=c,_.sibling=ne,c.child=_,ps(c,l.child,null,m),_=c.child,_.memoizedState=Vd(m),_.childLanes=Xd(l,H,m),c.memoizedState=Ml,c=il(null,_));else if(Q(c),uh(ne))H=fh(ne).digest,_=Error(s(419)),_.stack="",_.digest=H,Ke({value:_,source:null,stack:null}),c=rl(l,c,m);else if(oi||yt(l,c,m,!1),H=(m&l.childLanes)!==0,oi||H){if(H=gn,H!==null&&(_=O(H,m),_!==0&&_!==Te.retryLane))throw Te.retryLane=_,Kt(l,_),mi(H,l,_),Ps;Io(ne)||rc(),c=rl(l,c,m)}else Io(ne)?(c.flags|=192,c.child=l.child,c=null):(l=Te.treeContext,fi&&(hi=c0(ne),Qi=c,Tn=!0,Ma=null,Fs=!1,l!==null&&bt(c,l)),c=Hf(c,_.children),c.flags|=4096);return c}return T?(se(),ne=_.fallback,T=c.mode,Te=l.child,R=Te.sibling,_=ur(Te,{mode:"hidden",children:_.children}),_.subtreeFlags=Te.subtreeFlags&65011712,R!==null?ne=ur(R,ne):(ne=Dr(ne,T,m,null),ne.flags|=2),ne.return=c,_.return=c,_.sibling=ne,c.child=_,il(null,_),_=c.child,ne=l.child.memoizedState,ne===null?ne=Vd(m):(T=ne.cachePool,T!==null?(Te=Ri?di._currentValue:di._currentValue2,T=T.parent!==Te?{parent:Te,pool:Te}:T):T=Ze(),ne={baseLanes:ne.baseLanes|m,cachePool:T}),_.memoizedState=ne,_.childLanes=Xd(l,H,m),c.memoizedState=Ml,il(l.child,_)):(Q(c),m=l.child,l=m.sibling,m=ur(m,{mode:"visible",children:_.children}),m.return=c,m.sibling=null,l!==null&&(H=c.deletions,H===null?(c.deletions=[l],c.flags|=16):H.push(l)),c.child=m,c.memoizedState=null,m)}function Hf(l,c){return c=_o({mode:"visible",children:c},l.mode),c.return=l,l.child=c}function _o(l,c){return l=t(22,l,null,c),l.lanes=0,l}function rl(l,c,m){return ps(c,l.child,null,m),l=Hf(c,c.pendingProps.children),l.flags|=2,c.memoizedState=null,l}function Cg(l,c,m){l.lanes|=c;var _=l.alternate;_!==null&&(_.lanes|=c),Z(l.return,c,m)}function Zl(l,c,m,_,T,R){var H=l.memoizedState;H===null?l.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:_,tail:m,tailMode:T,treeForkCount:R}:(H.isBackwards=c,H.rendering=null,H.renderingStartTime=0,H.last=_,H.tail=m,H.tailMode=T,H.treeForkCount=R)}function Jd(l,c,m){var _=c.pendingProps,T=_.revealOrder,R=_.tail;_=_.children;var H=bi.current,ne=(H&2)!==0;if(ne?(H=H&1|2,c.flags|=128):H&=1,M(bi,H),fs(l,c,_,m),_=Tn?Uu:0,!ne&&l!==null&&(l.flags&128)!==0)e:for(l=c.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&Cg(l,m,c);else if(l.tag===19)Cg(l,m,c);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===c)break e;for(;l.sibling===null;){if(l.return===null||l.return===c)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(T){case"forwards":for(m=c.child,T=null;m!==null;)l=m.alternate,l!==null&&$e(l)===null&&(T=m),m=m.sibling;m=T,m===null?(T=c.child,c.child=null):(T=m.sibling,m.sibling=null),Zl(c,!1,T,m,R,_);break;case"backwards":case"unstable_legacy-backwards":for(m=null,T=c.child,c.child=null;T!==null;){if(l=T.alternate,l!==null&&$e(l)===null){c.child=T;break}l=T.sibling,T.sibling=m,m=T,T=l}Zl(c,!0,m,null,R,_);break;case"together":Zl(c,!1,null,null,void 0,_);break;default:c.memoizedState=null}return c.child}function ca(l,c,m){if(l!==null&&(c.dependencies=l.dependencies),no|=c.lanes,(m&c.childLanes)===0)if(l!==null){if(yt(l,c,m,!1),(m&c.childLanes)===0)return null}else return null;if(l!==null&&c.child!==l.child)throw Error(s(153));if(c.child!==null){for(l=c.child,m=ur(l,l.pendingProps),c.child=m,m.return=c;l.sibling!==null;)l=l.sibling,m=m.sibling=ur(l,l.pendingProps),m.return=c;m.sibling=null}return c.child}function fu(l,c){return(l.lanes&c)!==0?!0:(l=l.dependencies,!!(l!==null&&Pt(l)))}function Yd(l,c,m){switch(c.tag){case 3:qt(c,c.stateNode.containerInfo),Oe(c,di,l.memoizedState.cache),Xt();break;case 27:case 5:Fe(c);break;case 4:qt(c,c.stateNode.containerInfo);break;case 10:Oe(c,c.type,c.memoizedProps.value);break;case 31:if(c.memoizedState!==null)return c.flags|=128,oe(c),null;break;case 13:var _=c.memoizedState;if(_!==null)return _.dehydrated!==null?(Q(c),c.flags|=128,null):(m&c.child.childLanes)!==0?Wd(l,c,m):(Q(c),l=ca(l,c,m),l!==null?l.sibling:null);Q(c);break;case 19:var T=(l.flags&128)!==0;if(_=(m&c.childLanes)!==0,_||(yt(l,c,m,!1),_=(m&c.childLanes)!==0),T){if(_)return Jd(l,c,m);c.flags|=128}if(T=c.memoizedState,T!==null&&(T.rendering=null,T.tail=null,T.lastEffect=null),M(bi,bi.current),_)break;return null;case 22:return c.lanes=0,Mg(l,c,m,c.pendingProps);case 24:Oe(c,di,l.memoizedState.cache)}return ca(l,c,m)}function qd(l,c,m){if(l!==null)if(l.memoizedProps!==c.pendingProps)oi=!0;else{if(!fu(l,m)&&(c.flags&128)===0)return oi=!1,Yd(l,c,m);oi=(l.flags&131072)!==0}else oi=!1,Tn&&(c.flags&1048576)!==0&&De(c,Uu,c.index);switch(c.lanes=0,c.tag){case 16:e:{var _=c.pendingProps;if(l=Mn(c.elementType),c.type=l,typeof l=="function")ol(l)?(_=nl(l,_),c.tag=1,c=sl(null,c,l,_,m)):(c.tag=0,c=Gf(null,c,l,_,m));else{if(l!=null){var T=l.$$typeof;if(T===cc){c.tag=11,c=Ag(null,c,l,_,m);break e}else if(T===sh){c.tag=14,c=Sg(null,c,l,_,m);break e}}throw c=v(l)||l,Error(s(306,c,""))}}return c;case 0:return Gf(l,c,c.type,c.pendingProps,m);case 1:return _=c.type,T=nl(_,c.pendingProps),sl(l,c,_,T,m);case 3:e:{if(qt(c,c.stateNode.containerInfo),l===null)throw Error(s(387));var R=c.pendingProps;T=c.memoizedState,_=T.element,W(l,c),Ye(c,R,null,m);var H=c.memoizedState;if(R=H.cache,Oe(c,di,R),R!==T.cache&&Ot(c,[di],m,!0),je(),R=H.element,fi&&T.isDehydrated)if(T={element:R,isDehydrated:!1,cache:H.cache},c.updateQueue.baseState=T,c.memoizedState=T,c.flags&256){c=Tg(l,c,R,m);break e}else if(R!==_){_=Be(Error(s(424)),c),Ke(_),c=Tg(l,c,R,m);break e}else for(fi&&(hi=o0(c.stateNode.containerInfo),Qi=c,Tn=!0,Ma=null,Fs=!0),m=Xp(c,null,R,m),c.child=m;m;)m.flags=m.flags&-3|4096,m=m.sibling;else{if(Xt(),R===_){c=ca(l,c,m);break e}fs(l,c,R,m)}c=c.child}return c;case 26:if(Ur)return uu(l,c),l===null?(m=Lp(c.type,null,c.pendingProps,null))?c.memoizedState=m:Tn||(c.stateNode=mh(c.type,c.pendingProps,ds.current,c)):c.memoizedState=Lp(c.type,l.memoizedProps,c.pendingProps,l.memoizedState),null;case 27:if(Zi)return Fe(c),l===null&&Zi&&Tn&&(_=c.stateNode=gh(c.type,c.pendingProps,ds.current,os.current,!1),Qi=c,Fs=!0,hi=Cp(c.type,_,hi)),fs(l,c,c.pendingProps.children,m),uu(l,c),l===null&&(c.flags|=4194304),c.child;case 5:return l===null&&Tn&&(A0(c.type,c.pendingProps,os.current),(T=_=hi)&&(_=u0(_,c.type,c.pendingProps,Fs),_!==null?(c.stateNode=_,Qi=c,hi=a0(_),Fs=!1,T=!0):T=!1),T||It(c)),Fe(c),T=c.type,R=c.pendingProps,H=l!==null?l.memoizedProps:null,_=R.children,Ns(T,R)?_=null:H!==null&&Ns(T,H)&&(c.flags|=32),c.memoizedState!==null&&(T=at(l,c,Dt,null,null,m),Ri?gl._currentValue=T:gl._currentValue2=T),uu(l,c),fs(l,c,_,m),c.child;case 6:return l===null&&Tn&&(Ip(c.pendingProps,os.current),(l=m=hi)&&(m=f0(m,c.pendingProps,Fs),m!==null?(c.stateNode=m,Qi=c,hi=null,l=!0):l=!1),l||It(c)),null;case 13:return Wd(l,c,m);case 4:return qt(c,c.stateNode.containerInfo),_=c.pendingProps,l===null?c.child=ps(c,null,_,m):fs(l,c,_,m),c.child;case 11:return Ag(l,c,c.type,c.pendingProps,m);case 7:return fs(l,c,c.pendingProps,m),c.child;case 8:return fs(l,c,c.pendingProps.children,m),c.child;case 12:return fs(l,c,c.pendingProps.children,m),c.child;case 10:return _=c.pendingProps,Oe(c,c.type,_.value),fs(l,c,_.children,m),c.child;case 9:return T=c.type._context,_=c.pendingProps.children,it(c),T=J(T),_=_(T),c.flags|=1,fs(l,c,_,m),c.child;case 14:return Sg(l,c,c.type,c.pendingProps,m);case 15:return bg(l,c,c.type,c.pendingProps,m);case 19:return Jd(l,c,m);case 31:return Eg(l,c,m);
vendor: 4,959 bytes, line 4082
4082case 22:return Mg(l,c,m,c.pendingProps);case 24:return it(c),_=J(di),l===null?(T=Qe(),T===null&&(T=gn,R=Ee(),T.pooledCache=R,R.refCount++,R!==null&&(T.pooledCacheLanes|=m),T=R),c.memoizedState={parent:_,cache:T},F(c),Oe(c,di,T)):((l.lanes&m)!==0&&(W(l,c),Ye(c,null,null,m),je()),T=l.memoizedState,R=c.memoizedState,T.parent!==_?(T={parent:_,cache:_},c.memoizedState=T,c.lanes===0&&(c.memoizedState=c.updateQueue.baseState=T),Oe(c,di,_)):(_=R.cache,Oe(c,di,_),_!==T.cache&&Ot(c,[di],m,!0))),fs(l,c,c.pendingProps.children,m),c.child;case 29:throw c.pendingProps}throw Error(s(156,c.tag))}function Tr(l){l.flags|=4}function hu(l){fr&&(l.flags|=8)}function wg(l,c){if(l!==null&&l.child===c.child)return!1;if((c.flags&16)!==0)return!0;for(l=c.child;l!==null;){if((l.flags&8218)!==0||(l.subtreeFlags&8218)!==0)return!0;l=l.sibling}return!1}function Kd(l,c,m,_){if(Bn)for(m=c.child;m!==null;){if(m.tag===5||m.tag===6)Tu(l,m.stateNode);else if(!(m.tag===4||Zi&&m.tag===27)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===c)break;for(;m.sibling===null;){if(m.return===null||m.return===c)return;m=m.return}m.sibling.return=m.return,m=m.sibling}else if(fr)for(var T=c.child;T!==null;){if(T.tag===5){var R=T.stateNode;m&&_&&(R=n0(R,T.type,T.memoizedProps)),Tu(l,R)}else if(T.tag===6)R=T.stateNode,m&&_&&(R=Ep(R,T.memoizedProps)),Tu(l,R);else if(T.tag!==4){if(T.tag===22&&T.memoizedState!==null)R=T.child,R!==null&&(R.return=T),Kd(l,T,!0,!0);else if(T.child!==null){T.child.return=T,T=T.child;continue}}if(T===c)break;for(;T.sibling===null;){if(T.return===null||T.return===c)return;T=T.return}T.sibling.return=T.return,T=T.sibling}}function Rg(l,c,m,_){var T=!1;if(fr)for(var R=c.child;R!==null;){if(R.tag===5){var H=R.stateNode;m&&_&&(H=n0(H,R.type,R.memoizedProps)),bp(l,H)}else if(R.tag===6)H=R.stateNode,m&&_&&(H=Ep(H,R.memoizedProps)),bp(l,H);else if(R.tag!==4){if(R.tag===22&&R.memoizedState!==null)T=R.child,T!==null&&(T.return=R),Rg(l,R,!0,!0),T=!0;else if(R.child!==null){R.child.return=R,R=R.child;continue}}if(R===c)break;for(;R.sibling===null;){if(R.return===null||R.return===c)return T;R=R.return}R.sibling.return=R.return,R=R.sibling}return T}function Bg(l,c){if(fr&&wg(l,c)){l=c.stateNode;var m=l.containerInfo,_=Sp();Rg(_,c,!1,!1),l.pendingChildren=_,Tr(c),t0(m,_)}}function Zd(l,c,m,_){if(Bn)l.memoizedProps!==_&&Tr(c);else if(fr){var T=l.stateNode,R=l.memoizedProps;if((l=wg(l,c))||R!==_){var H=os.current;R=e0(T,m,R,_,!l,null),R===T?c.stateNode=T:(hu(c),qs(R,m,_,H)&&Tr(c),c.stateNode=R,l&&Kd(R,c,!1,!1))}else c.stateNode=T}}function Is(l,c,m,_,T){if((l.mode&32)!==0&&(m===null?Cu(c,_):pc(c,m,_))){if(l.flags|=16777216,(T&335544128)===T||fp(c,_))if(gi(l.stateNode,c,_))l.flags|=8192;else if(Rn())l.flags|=8192;else throw Os=Ea,Ch}else l.flags&=-16777217}function Ql(l,c){if(Op(c)){if(l.flags|=16777216,!Pp(c))if(Rn())l.flags|=8192;else throw Os=Ea,Ch}else l.flags&=-16777217}function du(l,c){c!==null&&(l.flags|=4),l.flags&16384&&(c=l.tag!==22?U():536870912,l.lanes|=c,bc|=c)}function jl(l,c){if(!Tn)switch(l.tailMode){case"hidden":c=l.tail;for(var m=null;c!==null;)c.alternate!==null&&(m=c),c=c.sibling;m===null?l.tail=null:m.sibling=null;break;case"collapsed":m=l.tail;for(var _=null;m!==null;)m.alternate!==null&&(_=m),m=m.sibling;_===null?c||l.tail===null?l.tail=null:l.tail.sibling=null:_.sibling=null}}function ti(l){var c=l.alternate!==null&&l.alternate.child===l.child,m=0,_=0;if(c)for(var T=l.child;T!==null;)m|=T.lanes|T.childLanes,_|=T.subtreeFlags&65011712,_|=T.flags&65011712,T.return=l,T=T.sibling;else for(T=l.child;T!==null;)m|=T.lanes|T.childLanes,_|=T.subtreeFlags,_|=T.flags,T.return=l,T=T.sibling;return l.subtreeFlags|=_,l.childLanes=m,c}function Dg(l,c,m){var _=c.pendingProps;switch(Ve(c),c.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ti(c),null;case 1:return ti(c),null;case 3:return m=c.stateNode,_=null,l!==null&&(_=l.memoizedState.cache),c.memoizedState.cache!==_&&(c.flags|=2048),dt(di),me(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(l===null||l.child===null)&&(yn(c)?Tr(c):l===null||l.memoizedState.isDehydrated&&(c.flags&256)===0||(c.flags|=1024,Le())),Bg(l,c),ti(c),null;case 26:if(Ur){var T=c.type,R=c.memoizedState;return l===null?(Tr(c),R!==null?(ti(c),Ql(c,R)):(ti(c),Is(c,T,null,_,m))):R?R!==l.memoizedState?(Tr(c),ti(c),Ql(c,R)):(ti(c),c.flags&=-16777217):(R=l.memoizedProps,Bn?R!==_&&Tr(c):Zd(l,c,T,_),ti(c),Is(c,T,R,_,m)),null}case 27:if(Zi){if(mt(c),m=ds.current,T=c.type,l!==null&&c.stateNode!=null)Bn?l.memoizedProps!==_&&Tr(c):Zd(l,c,T,_);else{if(!_){if(c.stateNode===null)throw Error(s(166));return ti(c),null}l=os.current,yn(c)?wt(c,l):(l=gh(T,_,m,l,!0),c.stateNode=l,Tr(c))}return ti(c),null}case 5:if(mt(c),T=c.type,l!==null&&c.stateNode!=null)Zd(l,c,T,_);else{if(!_){if(c.stateNode===null)throw Error(s(166));return ti(c),null}if(R=os.current,yn(c))wt(c,R),y0(c.stateNode,T,_,R)&&(c.flags|=64);else{var H=cp(T,_,ds.current,R,c);
vendor: 19,113 bytes, line 4082
4082hu(c),Kd(H,c,!1,!1),c.stateNode=H,qs(H,T,_,R)&&Tr(c)}}return ti(c),Is(c,c.type,l===null?null:l.memoizedProps,c.pendingProps,m),null;case 6:if(l&&c.stateNode!=null)m=l.memoizedProps,Bn?m!==_&&Tr(c):fr&&(m!==_?(l=ds.current,m=os.current,hu(c),c.stateNode=Za(_,l,m,c)):c.stateNode=l.stateNode);else{if(typeof _!="string"&&c.stateNode===null)throw Error(s(166));if(l=ds.current,m=os.current,yn(c)){if(!fi)throw Error(s(176));if(l=c.stateNode,m=c.memoizedProps,_=null,T=Qi,T!==null)switch(T.tag){case 27:case 5:_=T.memoizedProps}O_(l,m,c,_)||It(c,!0)}else hu(c),c.stateNode=Za(_,l,m,c)}return ti(c),null;case 31:if(m=c.memoizedState,l===null||l.memoizedState!==null){if(_=yn(c),m!==null){if(l===null){if(!_)throw Error(s(318));if(!fi)throw Error(s(556));if(l=c.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(s(557));Rp(l,c)}else Xt(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;ti(c),l=!1}else m=Le(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=m),l=!0;if(!l)return c.flags&256?(Ne(c),c):(Ne(c),null);if((c.flags&128)!==0)throw Error(s(558))}return ti(c),null;case 13:if(_=c.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(T=yn(c),_!==null&&_.dehydrated!==null){if(l===null){if(!T)throw Error(s(318));if(!fi)throw Error(s(344));if(T=c.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(s(317));p0(T,c)}else Xt(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;ti(c),T=!1}else T=Le(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=T),T=!0;if(!T)return c.flags&256?(Ne(c),c):(Ne(c),null)}return Ne(c),(c.flags&128)!==0?(c.lanes=m,c):(m=_!==null,l=l!==null&&l.memoizedState!==null,m&&(_=c.child,T=null,_.alternate!==null&&_.alternate.memoizedState!==null&&_.alternate.memoizedState.cachePool!==null&&(T=_.alternate.memoizedState.cachePool.pool),R=null,_.memoizedState!==null&&_.memoizedState.cachePool!==null&&(R=_.memoizedState.cachePool.pool),R!==T&&(_.flags|=2048)),m!==l&&m&&(c.child.flags|=8192),du(c,c.updateQueue),ti(c),null);case 4:return me(),Bg(l,c),l===null&&Qn(c.stateNode.containerInfo),ti(c),null;case 10:return dt(c.type),ti(c),null;case 19:if(S(bi),_=c.memoizedState,_===null)return ti(c),null;if(T=(c.flags&128)!==0,R=_.rendering,R===null)if(T)jl(_,!1);else{if(_i!==0||l!==null&&(l.flags&128)!==0)for(l=c.child;l!==null;){if(R=$e(l),R!==null){for(c.flags|=128,jl(_,!1),l=R.updateQueue,c.updateQueue=l,du(c,l),c.subtreeFlags=0,l=m,m=c.child;m!==null;)$f(m,l),m=m.sibling;return M(bi,bi.current&1|2),Tn&&Ae(c,_.treeForkCount),c.child}l=l.sibling}_.tail!==null&&Ms()>Vo&&(c.flags|=128,T=!0,jl(_,!1),c.lanes=4194304)}else{if(!T)if(l=$e(R),l!==null){if(c.flags|=128,T=!0,l=l.updateQueue,c.updateQueue=l,du(c,l),jl(_,!0),_.tail===null&&_.tailMode==="hidden"&&!R.alternate&&!Tn)return ti(c),null}else 2*Ms()-_.renderingStartTime>Vo&&m!==536870912&&(c.flags|=128,T=!0,jl(_,!1),c.lanes=4194304);_.isBackwards?(R.sibling=c.child,c.child=R):(l=_.last,l!==null?l.sibling=R:c.child=R,_.last=R)}return _.tail!==null?(l=_.tail,_.rendering=l,_.tail=l.sibling,_.renderingStartTime=Ms(),l.sibling=null,m=bi.current,M(bi,T?m&1|2:m&1),Tn&&Ae(c,_.treeForkCount),l):(ti(c),null);case 22:case 23:return Ne(c),G(),_=c.memoizedState!==null,l!==null?l.memoizedState!==null!==_&&(c.flags|=8192):_&&(c.flags|=8192),_?(m&536870912)!==0&&(c.flags&128)===0&&(ti(c),c.subtreeFlags&6&&(c.flags|=8192)):ti(c),m=c.updateQueue,m!==null&&du(c,m.retryQueue),m=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),_=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(_=c.memoizedState.cachePool.pool),_!==m&&(c.flags|=2048),l!==null&&S(No),null;case 24:return m=null,l!==null&&(m=l.memoizedState.cache),c.memoizedState.cache!==m&&(c.flags|=2048),dt(di),ti(c),null;case 25:return null;case 30:return null}throw Error(s(156,c.tag))}function Qd(l,c){switch(Ve(c),c.tag){case 1:return l=c.flags,l&65536?(c.flags=l&-65537|128,c):null;case 3:return dt(di),me(),l=c.flags,(l&65536)!==0&&(l&128)===0?(c.flags=l&-65537|128,c):null;case 26:case 27:case 5:return mt(c),null;case 31:if(c.memoizedState!==null){if(Ne(c),c.alternate===null)throw Error(s(340));Xt()}return l=c.flags,l&65536?(c.flags=l&-65537|128,c):null;case 13:if(Ne(c),l=c.memoizedState,l!==null&&l.dehydrated!==null){if(c.alternate===null)throw Error(s(340));Xt()}return l=c.flags,l&65536?(c.flags=l&-65537|128,c):null;case 19:return S(bi),null;case 4:return me(),null;case 10:return dt(c.type),null;case 22:case 23:return Ne(c),G(),l!==null&&S(No),l=c.flags,l&65536?(c.flags=l&-65537|128,c):null;case 24:return dt(di),null;case 25:return null;default:return null}}function Ig(l,c){switch(Ve(c),c.tag){case 3:dt(di),me();break;case 26:case 27:case 5:mt(c);break;case 4:me();break;case 31:c.memoizedState!==null&&Ne(c);break;case 13:Ne(c);break;case 19:S(bi);break;case 10:dt(c.type);break;case 22:case 23:Ne(c),G(),l!==null&&S(No);break;case 24:dt(di)}}function ua(l,c){try{var m=c.updateQueue,_=m!==null?m.lastEffect:null;if(_!==null){var T=_.next;m=T;do{if((m.tag&l)===l){_=void 0;var R=m.create,H=m.inst;_=R(),H.destroy=_}m=m.next}while(m!==T)}}catch(ne){tn(c,c.return,ne)}}function fa(l,c,m){try{var _=c.updateQueue,T=_!==null?_.lastEffect:null;if(T!==null){var R=T.next;_=R;do{if((_.tag&l)===l){var H=_.inst,ne=H.destroy;if(ne!==void 0){H.destroy=void 0,T=c;var Te=m,qe=ne;try{qe()}catch(pt){tn(T,Te,pt)}}}_=_.next}while(_!==R)}}catch(pt){tn(c,c.return,pt)}}function $l(l){var c=l.updateQueue;if(c!==null){var m=l.stateNode;try{rt(c,m)}catch(_){tn(l,l.return,_)}}}function kf(l,c,m){m.props=nl(l.type,l.memoizedProps),m.state=l.memoizedState;try{m.componentWillUnmount()}catch(_){tn(l,c,_)}}function ec(l,c){try{var m=l.ref;if(m!==null){switch(l.tag){case 26:case 27:case 5:var _=fc(l.stateNode);break;case 30:_=l.stateNode;break;default:_=l.stateNode}typeof m=="function"?l.refCleanup=m(_):m.current=_}}catch(T){tn(l,c,T)}}function bs(l,c){var m=l.ref,_=l.refCleanup;if(m!==null)if(typeof _=="function")try{_()}catch(T){tn(l,c,T)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof m=="function")try{m(null)}catch(T){tn(l,c,T)}else m.current=null}function al(l){var c=l.type,m=l.memoizedProps,_=l.stateNode;try{Jg(_,c,m,l)}catch(T){tn(l,l.return,T)}}function pu(l,c,m){try{Yg(l.stateNode,l.type,m,c,l)}catch(_){tn(l,l.return,_)}}function jd(l){return l.tag===5||l.tag===3||(Ur?l.tag===26:!1)||(Zi?l.tag===27&&vl(l.type):!1)||l.tag===4}function ka(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||jd(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(Zi&&l.tag===27&&vl(l.type)||l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function Vf(l,c,m){var _=l.tag;if(_===5||_===6)l=l.stateNode,c?Kg(m,l,c):yp(m,l);else if(_!==4&&(Zi&&_===27&&vl(l.type)&&(m=l.stateNode,c=null),l=l.child,l!==null))for(Vf(l,c,m),l=l.sibling;l!==null;)Vf(l,c,m),l=l.sibling}function mu(l,c,m){var _=l.tag;if(_===5||_===6)l=l.stateNode,c?qg(m,l,c):vp(m,l);else if(_!==4&&(Zi&&_===27&&vl(l.type)&&(m=l.stateNode),l=l.child,l!==null))for(mu(l,c,m),l=l.sibling;l!==null;)mu(l,c,m),l=l.sibling}function $d(l,c,m){l=l.containerInfo;try{Mp(l,m)}catch(_){tn(c,c.return,_)}}function Lg(l){var c=l.stateNode,m=l.memoizedProps;try{zi(l.type,m,c,l)}catch(_){tn(l,l.return,_)}}function L_(l,c){for(rh(l.containerInfo),Ii=c;Ii!==null;)if(l=Ii,c=l.child,(l.subtreeFlags&1028)!==0&&c!==null)c.return=l,Ii=c;else for(;Ii!==null;){l=Ii;var m=l.alternate;switch(c=l.flags,l.tag){case 0:if((c&4)!==0&&(c=l.updateQueue,c=c!==null?c.events:null,c!==null))for(var _=0;_<c.length;_++){var T=c[_];T.ref.impl=T.nextImpl}break;case 11:case 15:break;case 1:if((c&1024)!==0&&m!==null){c=void 0,_=l,T=m.memoizedProps,m=m.memoizedState;var R=_.stateNode;try{var H=nl(_.type,T);c=R.getSnapshotBeforeUpdate(H,m),R.__reactInternalSnapshotBeforeUpdate=c}catch(ne){tn(_,_.return,ne)}}break;case 3:(c&1024)!==0&&Bn&&Ap(l.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((c&1024)!==0)throw Error(s(163))}if(c=l.sibling,c!==null){c.return=l.return,Ii=c;break}Ii=l.return}}function Ug(l,c,m){var _=m.flags;switch(m.tag){case 0:case 11:case 15:Ls(l,m),_&4&&ua(5,m);break;case 1:if(Ls(l,m),_&4)if(l=m.stateNode,c===null)try{l.componentDidMount()}catch(H){tn(m,m.return,H)}else{var T=nl(m.type,c.memoizedProps);c=c.memoizedState;try{l.componentDidUpdate(T,c,l.__reactInternalSnapshotBeforeUpdate)}catch(H){tn(m,m.return,H)}}_&64&&$l(m),_&512&&ec(m,m.return);break;case 3:if(Ls(l,m),_&64&&(_=m.updateQueue,_!==null)){if(l=null,m.child!==null)switch(m.child.tag){case 27:case 5:l=fc(m.child.stateNode);break;case 1:l=m.child.stateNode}try{rt(_,l)}catch(H){tn(m,m.return,H)}}break;case 27:Zi&&c===null&&_&4&&Lg(m);case 26:case 5:if(Ls(l,m),c===null){if(_&4)al(m);else if(_&64){l=m.type,c=m.memoizedProps,T=m.stateNode;try{g0(T,l,c,m)}catch(H){tn(m,m.return,H)}}}_&512&&ec(m,m.return);break;case 12:Ls(l,m);break;case 31:Ls(l,m),_&4&&wr(l,m);break;case 13:Ls(l,m),_&4&&vu(l,m),_&64&&(_=m.memoizedState,_!==null&&(_=_.dehydrated,_!==null&&(m=U_.bind(null,m),hh(_,m))));break;case 22:if(_=m.memoizedState!==null||Mi,!_){c=c!==null&&c.memoizedState!==null||Ei,T=Mi;var R=Ei;Mi=_,(Ei=c)&&!R?Br(l,m,(m.subtreeFlags&8772)!==0):Ls(l,m),Mi=T,Ei=R}break;case 30:break;default:Ls(l,m)}}function ep(l){var c=l.alternate;c!==null&&(l.alternate=null,ep(c)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(c=l.stateNode,c!==null&&ah(c)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function Cr(l,c,m){for(m=m.child;m!==null;)gu(l,c,m),m=m.sibling}function gu(l,c,m){if(Qs&&typeof Qs.onCommitFiberUnmount=="function")try{Qs.onCommitFiberUnmount(xl,m)}catch{}switch(m.tag){case 26:if(Ur){Ei||bs(m,c),Cr(l,c,m),m.memoizedState?Lo(m.memoizedState):m.stateNode&&Fp(m.stateNode);break}case 27:if(Zi){Ei||bs(m,c);var _=yi,T=Li;vl(m.type)&&(yi=m.stateNode,Li=!1),Cr(l,c,m),as(m.stateNode),yi=_,Li=T;break}case 5:Ei||bs(m,c);case 6:if(Bn){if(_=yi,T=Li,yi=null,Cr(l,c,m),yi=_,Li=T,yi!==null)if(Li)try{_p(yi,m.stateNode)}catch(R){tn(m,c,R)}else try{Zg(yi,m.stateNode)}catch(R){tn(m,c,R)}}else Cr(l,c,m);break;case 18:Bn&&yi!==null&&(Li?dh(yi,m.stateNode):Dp(yi,m.stateNode));break;case 4:Bn?(_=yi,T=Li,yi=m.stateNode.containerInfo,Li=!0,Cr(l,c,m),yi=_,Li=T):(fr&&$d(m.stateNode,m,Sp()),Cr(l,c,m));break;case 0:case 11:case 14:case 15:fa(2,m,c),Ei||fa(4,m,c),Cr(l,c,m);break;case 1:Ei||(bs(m,c),_=m.stateNode,typeof _.componentWillUnmount=="function"&&kf(m,c,_)),Cr(l,c,m);break;case 21:Cr(l,c,m);break;case 22:Ei=(_=Ei)||m.memoizedState!==null,Cr(l,c,m),Ei=_;break;default:Cr(l,c,m)}}function wr(l,c){if(fi&&c.memoizedState===null&&(l=c.alternate,l!==null&&(l=l.memoizedState,l!==null))){l=l.dehydrated;try{P_(l)}catch(m){tn(c,c.return,m)}}}function vu(l,c){if(fi&&c.memoizedState===null&&(l=c.alternate,l!==null&&(l=l.memoizedState,l!==null&&(l=l.dehydrated,l!==null))))try{z_(l)}catch(m){tn(c,c.return,m)}}function Rr(l){switch(l.tag){case 31:case 13:case 19:var c=l.stateNode;return c===null&&(c=l.stateNode=new Jp),c;case 22:return l=l.stateNode,c=l._retryCache,c===null&&(c=l._retryCache=new Jp),c;default:throw Error(s(435,l.tag))}}function Va(l,c){var m=Rr(l);c.forEach(function(_){if(!m.has(_)){m.add(_);var T=N_.bind(null,l,_);_.then(T,T)}})}function ss(l,c){var m=c.deletions;if(m!==null)for(var _=0;_<m.length;_++){var T=m[_],R=l,H=c;if(Bn){var ne=H;e:for(;ne!==null;){switch(ne.tag){case 27:if(Zi){if(vl(ne.type)){yi=ne.stateNode,Li=!1;break e}break}case 5:yi=ne.stateNode,Li=!1;break e;case 3:case 4:yi=ne.stateNode.containerInfo,Li=!0;break e}ne=ne.return}if(yi===null)throw Error(s(160));gu(R,H,T),yi=null,Li=!1}else gu(R,H,T);R=T.alternate,R!==null&&(R.return=null),T.return=null}if(c.subtreeFlags&13886)for(c=c.child;c!==null;)yu(c,l),c=c.sibling}function yu(l,c){var m=l.alternate,_=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:ss(c,l),rs(l),_&4&&(fa(3,l,l.return),ua(3,l),fa(5,l,l.return));break;case 1:ss(c,l),rs(l),_&512&&(Ei||m===null||bs(m,m.return)),_&64&&Mi&&(l=l.updateQueue,l!==null&&(_=l.callbacks,_!==null&&(m=l.shared.hiddenCallbacks,l.shared.hiddenCallbacks=m===null?_:m.concat(_))));break;case 26:if(Ur){var T=Kn;if(ss(c,l),rs(l),_&512&&(Ei||m===null||bs(m,m.return)),_&4){_=m!==null?m.memoizedState:null;var R=l.memoizedState;m===null?R===null?l.stateNode===null?l.stateNode=S0(T,l.type,l.memoizedProps,l):Np(T,l.type,l.stateNode):l.stateNode=Up(T,R,l.memoizedProps):_!==R?(_===null?m.stateNode!==null&&Fp(m.stateNode):Lo(_),R===null?Np(T,l.type,l.stateNode):Up(T,R,l.memoizedProps)):R===null&&l.stateNode!==null&&pu(l,l.memoizedProps,m.memoizedProps)}break}case 27:if(Zi){ss(c,l),rs(l),_&512&&(Ei||m===null||bs(m,m.return)),m!==null&&_&4&&pu(l,l.memoizedProps,m.memoizedProps);break}case 5:if(ss(c,l),rs(l),_&512&&(Ei||m===null||bs(m,m.return)),Bn){if(l.flags&32){T=l.stateNode;try{xp(T)}catch(et){tn(l,l.return,et)}}_&4&&l.stateNode!=null&&(T=l.memoizedProps,pu(l,T,m!==null?m.memoizedProps:T)),_&1024&&(yc=!0)}else fr&&l.alternate!==null&&(l.alternate.stateNode=l.stateNode);break;case 6:if(ss(c,l),rs(l),_&4&&Bn){if(l.stateNode===null)throw Error(s(162));_=l.memoizedProps,m=m!==null?m.memoizedProps:_,T=l.stateNode;try{Wg(T,m,_)}catch(et){tn(l,l.return,et)}}break;case 3:if(Ur?(b0(),T=Kn,Kn=Bu(c.containerInfo),ss(c,l),Kn=T):ss(c,l),rs(l),_&4){if(Bn&&fi&&m!==null&&m.memoizedState.isDehydrated)try{v0(c.containerInfo)}catch(et){tn(l,l.return,et)}if(fr){_=c.containerInfo,m=c.pendingChildren;try{Mp(_,m)}catch(et){tn(l,l.return,et)}}}yc&&(yc=!1,Xf(l));break;case 4:Ur?(m=Kn,Kn=Bu(l.stateNode.containerInfo),ss(c,l),rs(l),Kn=m):(ss(c,l),rs(l)),_&4&&fr&&$d(l.stateNode,l,l.stateNode.pendingChildren);break;case 12:ss(c,l),rs(l);break;case 31:ss(c,l),rs(l),_&4&&(_=l.updateQueue,_!==null&&(l.updateQueue=null,Va(l,_)));break;case 13:ss(c,l),rs(l),l.child.flags&8192&&l.memoizedState!==null!=(m!==null&&m.memoizedState!==null)&&(Gu=Ms()),_&4&&(_=l.updateQueue,_!==null&&(l.updateQueue=null,Va(l,_)));break;case 22:T=l.memoizedState!==null;var H=m!==null&&m.memoizedState!==null,ne=Mi,Te=Ei;if(Mi=ne||T,Ei=Te||H,ss(c,l),Ei=Te,Mi=ne,rs(l),_&8192&&(c=l.stateNode,c._visibility=T?c._visibility&-2:c._visibility|1,T&&(m===null||H||Mi||Ei||xo(l)),Bn)){e:if(m=null,Bn)for(c=l;;){if(c.tag===5||Ur&&c.tag===26){if(m===null){H=m=c;try{R=H.stateNode,T?F_(R):jg(H.stateNode,H.memoizedProps)}catch(et){tn(H,H.return,et)}}}else if(c.tag===6){if(m===null){H=c;try{var qe=H.stateNode;T?Qg(qe):$g(qe,H.memoizedProps)}catch(et){tn(H,H.return,et)}}}else if(c.tag===18){if(m===null){H=c;try{var pt=H.stateNode;T?_0(pt):x0(H.stateNode)}catch(et){tn(H,H.return,et)}}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===l)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===l)break e;for(;c.sibling===null;){if(c.return===null||c.return===l)break e;m===c&&(m=null),c=c.return}m===c&&(m=null),c.sibling.return=c.return,c=c.sibling}}_&4&&(_=l.updateQueue,_!==null&&(m=_.retryQueue,m!==null&&(_.retryQueue=null,Va(l,m))));break;case 19:ss(c,l),rs(l),_&4&&(_=l.updateQueue,_!==null&&(l.updateQueue=null,Va(l,_)));break;case 30:break;case 21:break;default:ss(c,l),rs(l)}}function rs(l){var c=l.flags;if(c&2){try{for(var m,_=l.return;_!==null;){if(jd(_)){m=_;break}_=_.return}if(Bn){if(m==null)throw Error(s(160));switch(m.tag){case 27:if(Zi){var T=m.stateNode,R=ka(l);mu(l,R,T);break}case 5:var H=m.stateNode;m.flags&32&&(xp(H),m.flags&=-33);var ne=ka(l);mu(l,ne,H);break;case 3:case 4:var Te=m.stateNode.containerInfo,qe=ka(l);Vf(l,qe,Te);break;default:throw Error(s(161))}}}catch(pt){tn(l,l.return,pt)}l.flags&=-3}c&4096&&(l.flags&=-4097)}function Xf(l){if(l.subtreeFlags&1024)for(l=l.child;l!==null;){var c=l;Xf(c),c.tag===5&&c.flags&1024&&dp(c.stateNode),l=l.sibling}}function Ls(l,c){if(c.subtreeFlags&8772)for(c=c.child;c!==null;)Ug(l,c.alternate,c),c=c.sibling}function xo(l){for(l=l.child;l!==null;){var c=l;switch(c.tag){case 0:case 11:case 14:case 15:fa(4,c,c.return),xo(c);break;case 1:bs(c,c.return);var m=c.stateNode;typeof m.componentWillUnmount=="function"&&kf(c,c.return,m),xo(c);break;case 27:Zi&&as(c.stateNode);case 26:case 5:bs(c,c.return),xo(c);break;case 22:c.memoizedState===null&&xo(c);break;case 30:xo(c);break;default:xo(c)}l=l.sibling}}function Br(l,c,m){for(m=m&&(c.subtreeFlags&8772)!==0,c=c.child;c!==null;){var _=c.alternate,T=l,R=c,H=R.flags;switch(R.tag){case 0:case 11:case 15:Br(T,R,m),ua(4,R);break;case 1:if(Br(T,R,m),_=R,T=_.stateNode,typeof T.componentDidMount=="function")try{T.componentDidMount()}catch(qe){tn(_,_.return,qe)}if(_=R,T=_.updateQueue,T!==null){var ne=_.stateNode;try{var Te=T.shared.hiddenCallbacks;if(Te!==null)for(T.shared.hiddenCallbacks=null,T=0;T<Te.length;T++)lt(Te[T],ne)}catch(qe){tn(_,_.return,qe)}}m&&H&64&&$l(R),ec(R,R.return);break;case 27:Zi&&Lg(R);case 26:case 5:Br(T,R,m),m&&_===null&&H&4&&al(R),ec(R,R.return);break;case 12:Br(T,R,m);break;case 31:Br(T,R,m),m&&H&4&&wr(T,R);break;case 13:Br(T,R,m),m&&H&4&&vu(T,R);break;case 22:R.memoizedState===null&&Br(T,R,m),ec(R,R.return);break;case 30:break;default:Br(T,R,m)}c=c.sibling}}function Ao(l,c){var m=null;l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),l=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(l=c.memoizedState.cachePool.pool),l!==m&&(l!=null&&l.refCount++,m!=null&&Pe(m))}function tp(l,c){l=null,c.alternate!==null&&(l=c.alternate.memoizedState.cache),c=c.memoizedState.cache,c!==l&&(c.refCount++,l!=null&&Pe(l))}function pi(l,c,m,_){if(c.subtreeFlags&10256)for(c=c.child;c!==null;)Wf(l,c,m,_),c=c.sibling}function Wf(l,c,m,_){var T=c.flags;switch(c.tag){case 0:case 11:case 15:pi(l,c,m,_),T&2048&&ua(9,c);break;case 1:pi(l,c,m,_);break;case 3:pi(l,c,m,_),T&2048&&(l=null,c.alternate!==null&&(l=c.alternate.memoizedState.cache),c=c.memoizedState.cache,c!==l&&(c.refCount++,l!=null&&Pe(l)));break;case 12:if(T&2048){pi(l,c,m,_),l=c.stateNode;try{var R=c.memoizedProps,H=R.id,ne=R.onPostCommit;typeof ne=="function"&&ne(H,c.alternate===null?"mount":"update",l.passiveEffectDuration,-0)}catch(Te){tn(c,c.return,Te)}}else pi(l,c,m,_);break;case 31:pi(l,c,m,_);break;case 13:pi(l,c,m,_);break;case 23:break;case 22:R=c.stateNode,H=c.alternate,c.memoizedState!==null?R._visibility&2?pi(l,c,m,_):tc(l,c):R._visibility&2?pi(l,c,m,_):(R._visibility|=2,Ws(l,c,m,_,(c.subtreeFlags&10256)!==0||!1)),T&2048&&Ao(H,c);break;case 24:pi(l,c,m,_),T&2048&&tp(c.alternate,c);break;default:pi(l,c,m,_)}}function Ws(l,c,m,_,T){for(T=T&&((c.subtreeFlags&10256)!==0||!1),c=c.child;c!==null;){var R=l,H=c,ne=m,Te=_,qe=H.flags;switch(H.tag){case 0:case 11:case 15:Ws(R,H,ne,Te,T),ua(8,H);break;case 23:break;case 22:var pt=H.stateNode;H.memoizedState!==null?pt._visibility&2?Ws(R,H,ne,Te,T):tc(R,H):(pt._visibility|=2,Ws(R,H,ne,Te,T)),T&&qe&2048&&Ao(H.alternate,H);break;case 24:Ws(R,H,ne,Te,T),T&&qe&2048&&tp(H.alternate,H);break;default:Ws(R,H,ne,Te,T)}c=c.sibling}}
vendor: 6,418 bytes, line 4082
4082function tc(l,c){if(c.subtreeFlags&10256)for(c=c.child;c!==null;){var m=l,_=c,T=_.flags;switch(_.tag){case 22:tc(m,_),T&2048&&Ao(_.alternate,_);break;case 24:tc(m,_),T&2048&&tp(_.alternate,_);break;default:tc(m,_)}c=c.sibling}}function ha(l,c,m){if(l.subtreeFlags&mr)for(l=l.child;l!==null;)So(l,c,m),l=l.sibling}function So(l,c,m){switch(l.tag){case 26:if(ha(l,c,m),l.flags&mr)if(l.memoizedState!==null)M0(m,Kn,l.memoizedState,l.memoizedProps);else{var _=l.stateNode,T=l.type;l=l.memoizedProps,((c&335544128)===c||fp(T,l))&&oh(m,_,T,l)}break;case 5:ha(l,c,m),l.flags&mr&&(_=l.stateNode,T=l.type,l=l.memoizedProps,((c&335544128)===c||fp(T,l))&&oh(m,_,T,l));break;case 3:case 4:Ur?(_=Kn,Kn=Bu(l.stateNode.containerInfo),ha(l,c,m),Kn=_):ha(l,c,m);break;case 22:l.memoizedState===null&&(_=l.alternate,_!==null&&_.memoizedState!==null?(_=mr,mr=16777216,ha(l,c,m),mr=_):ha(l,c,m));break;default:ha(l,c,m)}}function Jf(l){var c=l.alternate;if(c!==null&&(l=c.child,l!==null)){c.child=null;do c=l.sibling,l.sibling=null,l=c;while(l!==null)}}function nc(l){var c=l.deletions;if((l.flags&16)!==0){if(c!==null)for(var m=0;m<c.length;m++){var _=c[m];Ii=_,lr(_,l)}Jf(l)}if(l.subtreeFlags&10256)for(l=l.child;l!==null;)Yf(l),l=l.sibling}function Yf(l){switch(l.tag){case 0:case 11:case 15:nc(l),l.flags&2048&&fa(9,l,l.return);break;case 3:nc(l);break;case 12:nc(l);break;case 22:var c=l.stateNode;l.memoizedState!==null&&c._visibility&2&&(l.return===null||l.return.tag!==13)?(c._visibility&=-3,_u(l)):nc(l);break;default:nc(l)}}function _u(l){var c=l.deletions;if((l.flags&16)!==0){if(c!==null)for(var m=0;m<c.length;m++){var _=c[m];Ii=_,lr(_,l)}Jf(l)}for(l=l.child;l!==null;){switch(c=l,c.tag){case 0:case 11:case 15:fa(8,c,c.return),_u(c);break;case 22:m=c.stateNode,m._visibility&2&&(m._visibility&=-3,_u(c));break;default:_u(c)}l=l.sibling}}function lr(l,c){for(;Ii!==null;){var m=Ii;switch(m.tag){case 0:case 11:case 15:fa(8,m,c);break;case 23:case 22:if(m.memoizedState!==null&&m.memoizedState.cachePool!==null){var _=m.memoizedState.cachePool.pool;_!=null&&_.refCount++}break;case 24:Pe(m.memoizedState.cache)}if(_=m.child,_!==null)_.return=m,Ii=_;else e:for(m=l;Ii!==null;){_=Ii;var T=_.sibling,R=_.return;if(ep(_),_===m){Ii=null;break e}if(T!==null){T.return=R,Ii=T;break e}Ii=R}}}function bo(l){var c=cn(l);if(c!=null){if(typeof c.memoizedProps["data-testname"]!="string")throw Error(s(364));return c}if(l=Bi(l),l===null)throw Error(s(362));return l.stateNode.current}function Mo(l,c){var m=l.tag;switch(c.$$typeof){case kr:if(l.type===c.value)return!0;break;case xc:e:{for(c=c.value,l=[l,0],m=0;m<l.length;){var _=l[m++],T=_.tag,R=l[m++],H=c[R];if(T!==5&&T!==26&&T!==27||!Do(_)){for(;H!=null&&Mo(_,H);)R++,H=c[R];if(R===c.length){c=!0;break e}else for(_=_.child;_!==null;)l.push(_,R),_=_.sibling}}c=!1}return c;case Ac:if((m===5||m===26||m===27)&&gp(l.stateNode,c.value))return!0;break;case zo:if((m===5||m===6||m===26||m===27)&&(l=wu(l),l!==null&&0<=l.indexOf(c.value)))return!0;break;case Pu:if((m===5||m===26||m===27)&&(l=l.memoizedProps["data-testname"],typeof l=="string"&&l.toLowerCase()===c.value.toLowerCase()))return!0;break;default:throw Error(s(365))}return!1}function ic(l){switch(l.$$typeof){case kr:return"<"+(v(l.value)||"Unknown")+">";case xc:return":has("+(ic(l)||"")+")";case Ac:return'[role="'+l.value+'"]';case zo:return'"'+l.value+'"';case Pu:return'[data-testname="'+l.value+'"]';default:throw Error(s(365))}}function sc(l,c){var m=[];l=[l,0];for(var _=0;_<l.length;){var T=l[_++],R=T.tag,H=l[_++],ne=c[H];if(R!==5&&R!==26&&R!==27||!Do(T)){for(;ne!=null&&Mo(T,ne);)H++,ne=c[H];if(H===c.length)m.push(T);else for(T=T.child;T!==null;)l.push(T,H),T=T.sibling}}return m}function Js(l,c){if(!Ki)throw Error(s(363));l=bo(l),l=sc(l,c),c=[],l=Array.from(l);for(var m=0;m<l.length;){var _=l[m++],T=_.tag;if(T===5||T===26||T===27)Do(_)||c.push(_.stateNode);else for(_=_.child;_!==null;)l.push(_),_=_.sibling}return c}function ui(){return(Sn&2)!==0&&Cn!==0?Cn&-Cn:Jt.T!==null?tt():dc()}function Xa(){if(zs===0)if((Cn&536870912)===0||Tn){var l=_l;_l<<=1,(_l&3932160)===0&&(_l=262144),zs=l}else zs=536870912;return l=js.current,l!==null&&(l.flags|=32),zs}function mi(l,c,m){(l===gn&&(Zn===2||Zn===9)||l.cancelPendingCommit!==null)&&(Si(l,0),pa(l,Cn,zs,!1)),P(l,m),((Sn&2)===0||l!==gn)&&(l===gn&&((Sn&2)===0&&(ko|=m),_i===4&&pa(l,Cn,zs,!1)),St(l))}function qr(l,c,m){if((Sn&6)!==0)throw Error(s(327));var _=!m&&(c&127)===0&&(c&l.expiredLanes)===0||B(l,c),T=_?Og(l,c):ma(l,c,!0),R=_;do{if(T===0){Go&&!_&&pa(l,c,0,!1);break}else{if(m=l.current.alternate,R&&!Ng(m)){T=ma(l,c,!1),R=!1;continue}if(T===2){if(R=c,l.errorRecoveryDisabledLanes&R)var H=0;else H=l.pendingLanes&-536870913,H=H!==0?H:H&536870912?536870912:0;if(H!==0){c=H;e:{var ne=l;T=zu;var Te=fi&&ne.current.memoizedState.isDehydrated;if(Te&&(Si(ne,H).flags|=256),H=ma(ne,H,!1),H!==2){if(Ho&&!Te){ne.errorRecoveryDisabledLanes|=R,ko|=R,T=4;break e}R=er,er=T,R!==null&&(er===null?er=R:er.push.apply(er,R))}T=H}if(R=!1,T!==2)continue}}if(T===1){Si(l,0),pa(l,c,0,!0);break}e:{switch(_=l,R=T,R){case 0:case 1:throw Error(s(345));case 4:if((c&4194048)!==c)break;case 6:pa(_,c,zs,!jr);break e;case 2:er=null;break;case 3:case 5:break;default:throw Error(s(329))}if((c&62914560)===c&&(T=Gu+300-Ms(),10<T)){if(pa(_,c,zs,!jr),E(_,0,!0)!==0)break e;Ra=c,_.timeoutHandle=up(da.bind(null,_,m,er,Hu,Rh,c,zs,ko,bc,jr,R,"Throttled",-0,0),T);break e}da(_,m,er,Hu,Rh,c,zs,ko,bc,jr,R,null,-0,0)}}break}while(!0);St(l)}function da(l,c,m,_,T,R,H,ne,Te,qe,pt,et,Bt,ln){if(l.timeoutHandle=Ks,et=c.subtreeFlags,et&8192||(et&16785408)===16785408){et=hp(),So(c,R,et);var Ui=(R&62914560)===R?Gu-Ms():(R&4194048)===R?Tl-Ms():0;if(Ui=Xg(et,Ui),Ui!==null){Ra=R,l.cancelPendingCommit=Ui(va.bind(null,l,c,R,m,_,T,H,ne,Te,pt,et,null,Bt,ln)),pa(l,R,H,!qe);return}}va(l,c,R,m,_,T,H,ne,Te)}function Ng(l){for(var c=l;;){var m=c.tag;if((m===0||m===11||m===15)&&c.flags&16384&&(m=c.updateQueue,m!==null&&(m=m.stores,m!==null)))for(var _=0;_<m.length;_++){var T=m[_],R=T.getSnapshot;T=T.value;try{if(!Di(R(),T))return!1}catch{return!1}}if(m=c.child,c.subtreeFlags&16384&&m!==null)m.return=c,c=m;else{if(c===l)break;for(;c.sibling===null;){if(c.return===null||c.return===l)return!0;c=c.return}c.sibling.return=c.return,c=c.sibling}}return!0}function pa(l,c,m,_){c&=~Sc,c&=~ko,l.suspendedLanes|=c,l.pingedLanes&=~c,_&&(l.warmLanes|=c),_=l.expirationTimes;for(var T=c;0<T;){var R=31-Zs(T),H=1<<R;
vendor: 7,435 bytes, line 4082
4082_[R]=-1,T&=~H}m!==0&&k(l,m,c)}function qf(){return(Sn&6)===0?(ot(0),!1):!0}function Kf(){if(bn!==null){if(Zn===0)var l=bn.return;else l=bn,Zr=ii=null,fn(l),Fo=null,Al=0,l=bn;for(;l!==null;)Ig(l.alternate,l),l=l.return;bn=null}}function Si(l,c){var m=l.timeoutHandle;m!==Ks&&(l.timeoutHandle=Ks,Vg(m)),m=l.cancelPendingCommit,m!==null&&(l.cancelPendingCommit=null,m()),Ra=0,Kf(),gn=l,bn=m=ur(l.current,null),Cn=c,Zn=0,Gi=null,jr=!1,Go=B(l,c),Ho=!1,bc=zs=Sc=ko=no=_i=0,er=zu=null,Rh=!1,(c&8)!==0&&(c|=c&32);var _=l.entangledLanes;if(_!==0)for(l=l.entanglements,_&=c;0<_;){var T=31-Zs(_),R=1<<T;c|=l[T],_&=~R}return wa=c,oa(),m}function ni(l,c){un=null,Jt.H=pr,c===$i||c===Gr?(c=wn(),Zn=3):c===Ch?(c=wn(),Zn=4):Zn=c===Ps?8:c!==null&&typeof c=="object"&&typeof c.then=="function"?6:1,Gi=c,bn===null&&(_i=1,Pf(l,Be(c,l.current)))}function Rn(){var l=js.current;return l===null?!0:(Cn&4194048)===Cn?$s===null:(Cn&62914560)===Cn||(Cn&536870912)!==0?l===$s:!1}function Wa(){var l=Jt.H;return Jt.H=pr,l===null?pr:l}function cr(){var l=Jt.A;return Jt.A=_c,l}function rc(){_i=4,jr||(Cn&4194048)!==Cn&&js.current!==null||(Go=!0),(no&134217727)===0&&(ko&134217727)===0||gn===null||pa(gn,Cn,zs,!1)}function ma(l,c,m){var _=Sn;Sn|=2;var T=Wa(),R=cr();(gn!==l||Cn!==c)&&(Hu=null,Si(l,c)),c=!1;var H=_i;e:do try{if(Zn!==0&&bn!==null){var ne=bn,Te=Gi;switch(Zn){case 8:Kf(),H=6;break e;case 3:case 2:case 9:case 6:js.current===null&&(c=!0);var qe=Zn;if(Zn=0,Gi=null,ga(l,ne,Te,qe),m&&Go){H=0;break e}break;default:qe=Zn,Zn=0,Gi=null,ga(l,ne,Te,qe)}}Fg(),H=_i;break}catch(pt){ni(l,pt)}while(!0);return c&&l.shellSuspendCounter++,Zr=ii=null,Sn=_,Jt.H=T,Jt.A=R,bn===null&&(gn=null,Cn=0,oa()),H}function Fg(){for(;bn!==null;)Eo(bn)}function Og(l,c){var m=Sn;Sn|=2;var _=Wa(),T=cr();gn!==l||Cn!==c?(Hu=null,Vo=Ms()+500,Si(l,c)):Go=B(l,c);e:do try{if(Zn!==0&&bn!==null){c=bn;var R=Gi;t:switch(Zn){case 1:Zn=0,Gi=null,ga(l,c,R,1);break;case 2:case 9:if(ft(R)){Zn=0,Gi=null,Zf(c);break}c=function(){Zn!==2&&Zn!==9||gn!==l||(Zn=7),St(l)},R.then(c,c);break e;case 3:Zn=7;break e;case 4:Zn=5;break e;case 7:ft(R)?(Zn=0,Gi=null,Zf(c)):(Zn=0,Gi=null,ga(l,c,R,7));break;case 5:var H=null;switch(bn.tag){case 26:H=bn.memoizedState;case 5:case 27:var ne=bn,Te=ne.type,qe=ne.pendingProps;if(H?Pp(H):gi(ne.stateNode,Te,qe)){Zn=0,Gi=null;var pt=ne.sibling;if(pt!==null)bn=pt;else{var et=ne.return;et!==null?(bn=et,oc(et)):bn=null}break t}}Zn=0,Gi=null,ga(l,c,R,5);break;case 6:Zn=0,Gi=null,ga(l,c,R,6);break;case 8:Kf(),_i=6;break e;default:throw Error(s(462))}}ac();break}catch(Bt){ni(l,Bt)}while(!0);return Zr=ii=null,Jt.H=_,Jt.A=T,Sn=m,bn!==null?0:(gn=null,Cn=0,oa(),_i)}function ac(){for(;bn!==null&&!T0();)Eo(bn)}function Eo(l){var c=qd(l.alternate,l,wa);l.memoizedProps=l.pendingProps,c===null?oc(l):bn=c}function Zf(l){var c=l,m=c.alternate;switch(c.tag){case 15:case 0:c=kd(m,c,c.pendingProps,c.type,void 0,Cn);break;case 11:c=kd(m,c,c.pendingProps,c.type.render,c.ref,Cn);break;case 5:fn(c);default:Ig(m,c),c=bn=$f(c,wa),c=qd(m,c,wa)}l.memoizedProps=l.pendingProps,c===null?oc(l):bn=c}function ga(l,c,m,_){Zr=ii=null,fn(c),Fo=null,Al=0;var T=c.return;try{if(I_(l,T,c,m,Cn)){_i=1,Pf(l,Be(m,l.current)),bn=null;return}}catch(R){if(T!==null)throw bn=T,R;_i=1,Pf(l,Be(m,l.current)),bn=null;return}c.flags&32768?(Tn||_===1?l=!0:Go||(Cn&536870912)!==0?l=!1:(jr=l=!0,(_===2||_===9||_===3||_===6)&&(_=js.current,_!==null&&_.tag===13&&(_.flags|=16384))),To(c,l)):oc(c)}function oc(l){var c=l;do{if((c.flags&32768)!==0){To(c,jr);return}l=c.return;var m=Dg(c.alternate,c,wa);if(m!==null){bn=m;return}if(c=c.sibling,c!==null){bn=c;return}bn=c=l}while(c!==null);_i===0&&(_i=5)}function To(l,c){do{var m=Qd(l.alternate,l);if(m!==null){m.flags&=32767,bn=m;return}if(m=l.return,m!==null&&(m.flags|=32768,m.subtreeFlags=0,m.deletions=null),!c&&(l=l.sibling,l!==null)){bn=l;return}bn=l=m}while(l!==null);_i=6,bn=null}function va(l,c,m,_,T,R,H,ne,Te){l.cancelPendingCommit=null;do _a();while(Hi!==0);if((Sn&6)!==0)throw Error(s(327));if(c!==null){if(c===l.current)throw Error(s(177));if(R=c.lanes|c.childLanes,R|=Sl,X(l,m,R,H,ne,Te),l===gn&&(bn=gn=null,Cn=0),Cl=c,so=l,Ra=m,Mc=R,Bh=T,Yp=_,(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?(l.callbackNode=null,l.callbackPriority=0,Pi(Iu,function(){return xu(),null})):(l.callbackNode=null,l.callbackPriority=0),_=(c.flags&13878)!==0,(c.subtreeFlags&13878)!==0||_){_=Jt.T,Jt.T=null,T=Lr(),En(2),H=Sn,Sn|=4;try{L_(l,c,m)}finally{Sn=H,En(T),Jt.T=_}}Hi=1,Ja(),ya(),Qf()}}function Ja(){if(Hi===1){Hi=0;var l=so,c=Cl,m=(c.flags&13878)!==0;if((c.subtreeFlags&13878)!==0||m){m=Jt.T,Jt.T=null;var _=Lr();En(2);var T=Sn;Sn|=4;try{yu(c,l),kg(l.containerInfo)}finally{Sn=T,En(_),Jt.T=m}}l.current=c,Hi=2}}function ya(){if(Hi===2){Hi=0;var l=so,c=Cl,m=(c.flags&8772)!==0;if((c.subtreeFlags&8772)!==0||m){m=Jt.T,Jt.T=null;var _=Lr();En(2);var T=Sn;Sn|=4;try{Ug(l,c.alternate,c)}finally{Sn=T,En(_),Jt.T=m}}Hi=3}}function Qf(){if(Hi===4||Hi===3){Hi=0,Gp();var l=so,c=Cl,m=Ra,_=Yp;(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?Hi=5:(Hi=0,Cl=so=null,jf(l,l.pendingLanes));var T=l.pendingLanes;if(T===0&&(io=null),ie(m),c=c.stateNode,Qs&&typeof Qs.onCommitFiberRoot=="function")try{Qs.onCommitFiberRoot(xl,c,void 0,(c.current.flags&128)===128)}catch{}if(_!==null){c=Jt.T,T=Lr(),En(2),Jt.T=null;try{for(var R=l.onRecoverableError,H=0;H<_.length;H++){var ne=_[H];R(ne.value,{componentStack:ne.stack})}}finally{Jt.T=c,En(T)}}(Ra&3)!==0&&_a(),St(l),T=l.pendingLanes,(m&261930)!==0&&(T&42)!==0?l===ku?zn++:(zn=0,ku=l):zn=0,fi&&Ru(),ot(0)}}function jf(l,c){(l.pooledCacheLanes&=c)===0&&(c=l.pooledCache,c!=null&&(l.pooledCache=null,Pe(c)))}function _a(){return Ja(),ya(),Qf(),xu()}function xu(){if(Hi!==5)return!1;var l=so,c=Mc;Mc=0;var m=ie(Ra),_=32>m?32:m;m=Jt.T;var T=Lr();try{En(_),Jt.T=null,_=Bh,Bh=null;var R=so,H=Ra;if(Hi=0,Cl=so=null,Ra=0,(Sn&6)!==0)throw Error(s(331));var ne=Sn;if(Sn|=4,Yf(R.current),Wf(R,R.current,H,_),Sn=ne,ot(0,!1),Qs&&typeof Qs.onPostCommitFiberRoot=="function")try{Qs.onPostCommitFiberRoot(xl,R)}catch{}return!0}finally{En(T),Jt.T=m,jf(l,c)}}function Co(l,c,m){c=Be(m,c),c=Gd(l.stateNode,c,2),l=ge(l,c,2),l!==null&&(P(l,2),St(l))}function tn(l,c,m){if(l.tag===3)Co(l,l,m);else for(;c!==null;){if(c.tag===3){Co(c,l,m);break}else if(c.tag===1){var _=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof _.componentDidCatch=="function"&&(io===null||!io.has(_))){l=Be(m,l),m=_g(2),_=ge(c,m,2),_!==null&&(xg(m,_,c,l),P(_,2),St(_));break}}c=c.return}}function lc(l,c,m){var _=l.pingCache;if(_===null){_=l.pingCache=new gr;var T=new Set;_.set(c,T)}else T=_.get(c),T===void 0&&(T=new Set,_.set(c,T));T.has(m)||(Ho=!0,T.add(m),l=Pg.bind(null,l,c,m),c.then(l,l))}function Pg(l,c,m){var _=l.pingCache;_!==null&&_.delete(c),l.pingedLanes|=l.suspendedLanes&m,l.warmLanes&=~m,gn===l&&(Cn&m)===m&&(_i===4||_i===3&&(Cn&62914560)===Cn&&300>Ms()-Gu?(Sn&2)===0&&Si(l,0):Sc|=m,bc===Cn&&(bc=0)),St(l)}function zg(l,c){c===0&&(c=U()),l=Kt(l,c),l!==null&&(P(l,c),St(l))}function U_(l){var c=l.memoizedState,m=0;c!==null&&(m=c.retryLane),zg(l,m)}function N_(l,c){var m=0;switch(l.tag){case 31:case 13:var _=l.stateNode,T=l.memoizedState;T!==null&&(m=T.retryLane);break;case 19:_=l.stateNode;break;case 22:_=l.stateNode._retryCache;break;default:throw Error(s(314))}_!==null&&_.delete(c),zg(l,m)}function Pi(l,c){return Du(l,c)}function np(l,c,m,_){this.tag=l,this.key=m,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 5,445 bytes, line 4082
4082ype=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ol(l){return l=l.prototype,!(!l||!l.isReactComponent)}function ur(l,c){var m=l.alternate;return m===null?(m=t(l.tag,c,l.key,l.mode),m.elementType=l.elementType,m.type=l.type,m.stateNode=l.stateNode,m.alternate=l,l.alternate=m):(m.pendingProps=c,m.type=l.type,m.flags=0,m.subtreeFlags=0,m.deletions=null),m.flags=l.flags&65011712,m.childLanes=l.childLanes,m.lanes=l.lanes,m.child=l.child,m.memoizedProps=l.memoizedProps,m.memoizedState=l.memoizedState,m.updateQueue=l.updateQueue,c=l.dependencies,m.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},m.sibling=l.sibling,m.index=l.index,m.ref=l.ref,m.refCleanup=l.refCleanup,m}function $f(l,c){l.flags&=65011714;var m=l.alternate;return m===null?(l.childLanes=0,l.lanes=c,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=m.childLanes,l.lanes=m.lanes,l.child=m.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=m.memoizedProps,l.memoizedState=m.memoizedState,l.updateQueue=m.updateQueue,l.type=m.type,c=m.dependencies,l.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext}),l}function Ya(l,c,m,_,T,R){var H=0;if(_=l,typeof l=="function")ol(l)&&(H=1);else if(typeof l=="string")H=Ur&&Zi?ph(l,m,os.current)?26:zp(l)?27:5:Ur?ph(l,m,os.current)?26:5:Zi&&zp(l)?27:5;else e:switch(l){case Mu:return l=t(31,m,c,T),l.elementType=Mu,l.lanes=R,l;case fl:return Dr(m.children,T,R,c);case hl:H=8,T|=24;break;case dl:return l=t(12,m,c,T|2),l.elementType=dl,l.lanes=R,l;case ih:return l=t(13,m,c,T),l.elementType=ih,l.lanes=R,l;case qa:return l=t(19,m,c,T),l.elementType=qa,l.lanes=R,l;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case Ir:H=10;break e;case bu:H=9;break e;case cc:H=11;break e;case sh:H=14;break e;case Us:H=16,_=null;break e}H=29,m=Error(s(130,l===null?"null":typeof l,"")),_=null}return c=t(H,m,c,T),c.elementType=l,c.type=_,c.lanes=R,c}function Dr(l,c,m,_){return l=t(7,l,_,c),l.lanes=m,l}function ip(l,c,m){return l=t(6,l,null,c),l.lanes=m,l}function sp(l){var c=t(18,null,null,0);return c.stateNode=l,c}function rp(l,c,m){return c=t(4,l.children!==null?l.children:[],l.key,c),c.lanes=m,c.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},c}function Gg(l,c,m,_,T,R,H,ne,Te){this.tag=1,this.containerInfo=l,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Ks,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=z(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=z(0),this.hiddenUpdates=z(null),this.identifierPrefix=_,this.onUncaughtError=T,this.onCaughtError=R,this.onRecoverableError=H,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Te,this.incompleteTransitions=new Map}function wo(l,c,m,_,T,R,H,ne,Te,qe,pt,et){return l=new Gg(l,c,m,H,Te,qe,pt,et,ne),c=1,R===!0&&(c|=24),R=t(3,null,null,c),l.current=R,R.stateNode=l,c=Ee(),c.refCount++,l.pooledCache=c,c.refCount++,R.memoizedState={element:_,isDehydrated:m,cache:c},F(R),l}function eh(l){return l?(l=Aa,l):Aa}function Au(l){var c=l._reactInternals;if(c===void 0)throw typeof l.render=="function"?Error(s(188)):(l=Object.keys(l).join(","),Error(s(268,l)));return l=h(c),l=l!==null?d(l):null,l===null?null:fc(l.stateNode)}function ap(l,c,m,_,T,R){T=eh(T),_.context===null?_.context=T:_.pendingContext=T,_=te(c),_.payload={element:m},R=R===void 0?null:R,R!==null&&(_.callback=R),m=ge(l,_,c),m!==null&&(mi(m,l,c),Ce(m,l,c))}function ll(l,c){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var m=l.retryLane;l.retryLane=m!==0&&m<c?m:c}}function Su(l,c){ll(l,c),(l=l.alternate)&&ll(l,c)}var pn={},th=K1,Ys=jN,nh=Object.assign,cl=Symbol.for("react.element"),xa=Symbol.for("react.transitional.element"),ul=Symbol.for("react.portal"),fl=Symbol.for("react.fragment"),hl=Symbol.for("react.strict_mode"),dl=Symbol.for("react.profiler"),bu=Symbol.for("react.consumer"),Ir=Symbol.for("react.context"),cc=Symbol.for("react.forward_ref"),ih=Symbol.for("react.suspense"),qa=Symbol.for("react.suspense_list"),sh=Symbol.for("react.memo"),Us=Symbol.for("react.lazy"),Mu=Symbol.for("react.activity"),op=Symbol.for("react.memo_cache_sentinel"),Ka=Symbol.iterator,Ro=Symbol.for("react.client.reference"),Bo=Array.isArray,Jt=th.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,lp=e.rendererVersion,Eu=e.rendererPackageName,uc=e.extraDevToolsConfig,fc=e.getPublicInstance,Hg=e.getRootHostContext,hc=e.getChildHostContext,rh=e.prepareForCommit,kg=e.resetAfterCommit,cp=e.createInstance;e.cloneMutableInstance;var Tu=e.appendInitialChild,qs=e.finalizeInitialChildren,Ns=e.shouldSetTextContent,Za=e.createTextInstance;e.cloneMutableTextInstance;var up=e.scheduleTimeout,Vg=e.cancelTimeout,Ks=e.noTimeout,Ri=e.isPrimaryRenderer;e.warnsIfNotActing;var Bn=e.supportsMutation,fr=e.supportsPersistence,fi=e.supportsHydration,cn=e.getInstanceFromNode;e.beforeActiveInstanceBlur;var Qn=e.preparePortalMount;
vendor: 6,941 bytes, line 4082
4082e.prepareScopeUpdate,e.getInstanceFromScope;var En=e.setCurrentUpdatePriority,Lr=e.getCurrentUpdatePriority,dc=e.resolveUpdatePriority;e.trackSchedulerEvent,e.resolveEventType,e.resolveEventTimeStamp;var pl=e.shouldAttemptEagerTransition,ah=e.detachDeletedInstance;e.requestPostPaintCallback;var Cu=e.maySuspendCommit,pc=e.maySuspendCommitOnUpdate,fp=e.maySuspendCommitInSyncRender,gi=e.preloadInstance,hp=e.startSuspendingCommit,oh=e.suspendInstance;e.suspendOnActiveViewTransition;var Xg=e.waitForCommitToBeReady;e.getSuspendedCommitReason;var ml=e.NotPendingTransition,gl=e.HostTransitionContext,dp=e.resetFormInstance;e.bindToConsole;var pp=e.supportsMicrotasks,mp=e.scheduleMicrotask,Ki=e.supportsTestSelectors,Bi=e.findFiberRoot,lh=e.getBoundingRect,wu=e.getTextContent,Do=e.isHiddenSubtree,gp=e.matchAccessibilityRole,Qa=e.setFocusIfFocusable,ch=e.setupIntersectionObserver,vp=e.appendChild,yp=e.appendChildToContainer,Wg=e.commitTextUpdate,Jg=e.commitMount,Yg=e.commitUpdate,qg=e.insertBefore,Kg=e.insertInContainerBefore,Zg=e.removeChild,_p=e.removeChildFromContainer,xp=e.resetTextContent,F_=e.hideInstance,Qg=e.hideTextInstance,jg=e.unhideInstance,$g=e.unhideTextInstance;e.cancelViewTransitionName,e.cancelRootViewTransitionName,e.restoreRootViewTransitionName,e.cloneRootViewTransitionContainer,e.removeRootViewTransitionClone,e.measureClonedInstance,e.hasInstanceChanged,e.hasInstanceAffectedParent,e.startViewTransition,e.startGestureTransition,e.stopViewTransition,e.getCurrentGestureOffset,e.createViewTransitionInstance;var Ap=e.clearContainer;e.createFragmentInstance,e.updateFragmentInstanceFiber,e.commitNewChildToFragmentInstance,e.deleteChildFromFragmentInstance;var e0=e.cloneInstance,Sp=e.createContainerChildSet,bp=e.appendChildToContainerChildSet,t0=e.finalizeContainerChildren,Mp=e.replaceContainerChildren,n0=e.cloneHiddenInstance,Ep=e.cloneHiddenTextInstance,Io=e.isSuspenseInstancePending,uh=e.isSuspenseInstanceFallback,fh=e.getSuspenseInstanceFallbackErrorDetails,hh=e.registerSuspenseInstanceRetry,i0=e.canHydrateFormStateMarker,Tp=e.isFormStateMarkerMatching,s0=e.getNextHydratableSibling,r0=e.getNextHydratableSiblingAfterSingleton,a0=e.getFirstHydratableChild,o0=e.getFirstHydratableChildWithinContainer,l0=e.getFirstHydratableChildWithinActivityInstance,c0=e.getFirstHydratableChildWithinSuspenseInstance,Cp=e.getFirstHydratableChildWithinSingleton,u0=e.canHydrateInstance,f0=e.canHydrateTextInstance,wp=e.canHydrateActivityInstance,h0=e.canHydrateSuspenseInstance,d0=e.hydrateInstance,O_=e.hydrateTextInstance,Rp=e.hydrateActivityInstance,p0=e.hydrateSuspenseInstance,m0=e.getNextHydratableInstanceAfterActivityInstance,Bp=e.getNextHydratableInstanceAfterSuspenseInstance,g0=e.commitHydratedInstance,v0=e.commitHydratedContainer,P_=e.commitHydratedActivityInstance,z_=e.commitHydratedSuspenseInstance,y0=e.finalizeHydratedChildren,Ru=e.flushHydrationEvents;e.clearActivityBoundary;var Dp=e.clearSuspenseBoundary;e.clearActivityBoundaryFromContainer;var dh=e.clearSuspenseBoundaryFromContainer,_0=e.hideDehydratedBoundary,x0=e.unhideDehydratedBoundary,mc=e.shouldDeleteUnhydratedTailInstances;e.diffHydratedPropsForDevWarnings,e.diffHydratedTextForDevWarnings,e.describeHydratableInstanceForDevWarnings;var A0=e.validateHydratableInstance,Ip=e.validateHydratableTextInstance,Ur=e.supportsResources,ph=e.isHostHoistableType,Bu=e.getHoistableRoot,Lp=e.getResource,Up=e.acquireResource,Lo=e.releaseResource,S0=e.hydrateHoistable,Np=e.mountHoistable,Fp=e.unmountHoistable,mh=e.createHoistableInstance,b0=e.prepareToCommitHoistables,Op=e.mayResourceSuspendCommit,Pp=e.preloadResource,M0=e.suspendResource,Zi=e.supportsSingletons,gh=e.resolveSingletonInstance,zi=e.acquireSingletonInstance,as=e.releaseSingletonInstance,zp=e.isHostSingletonType,vl=e.isSingletonScope,vh=[],yl=-1,Aa={},Zs=Math.clz32?Math.clz32:w,yh=Math.log,E0=Math.LN2,_h=256,_l=262144,gc=4194304,Du=Ys.unstable_scheduleCallback,xh=Ys.unstable_cancelCallback,T0=Ys.unstable_shouldYield,Gp=Ys.unstable_requestPaint,Ms=Ys.unstable_now,Ah=Ys.unstable_ImmediatePriority,C0=Ys.unstable_UserBlockingPriority,Iu=Ys.unstable_NormalPriority,Sh=Ys.unstable_IdlePriority,Hp=Ys.log,w0=Ys.unstable_setDisableYieldValue,xl=null,Qs=null,Di=typeof Object.is=="function"?Object.is:re,bh=typeof reportError=="function"?reportError:function(l){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var c=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof l=="object"&&l!==null&&typeof l.message=="string"?String(l.message):String(l),error:l});if(!window.dispatchEvent(c))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",l);return}console.error(l)},G_=Object.prototype.hasOwnProperty,Mh,Sa,Lu=!1,kp=new WeakMap,ja=[],ba=0,jn=null,Uu=0,Nr=[],hr=0,Fr=null,hs=1,Kr="",os=x(null),$a=x(null),ds=x(null),Nu=x(null),Qi=null,hi=null,Tn=!1,Ma=null,Fs=!1,Eh=Error(s(519)),Or=x(null),ii=null,Zr=null,R0=typeof AbortController<"u"?AbortController:function(){var l=[],c=this.signal={aborted:!1,addEventListener:function(m,_){l.push(_)}};this.abort=function(){c.aborted=!0,l.forEach(function(m){return m()})}},ls=Ys.unstable_scheduleCallback,H_=Ys.unstable_NormalPriority,di={$$typeof:Ir,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},Fu=null,qn=null,Es=!1,Pr=!1,Th=!1,Uo=0,vc=null,Vp=0,eo=0,ji=null,zr=Jt.S;Jt.S=function(l,c){Tl=Ms(),typeof c=="object"&&c!==null&&typeof c.then=="function"&&Ht(l,c),zr!==null&&zr(l,c)};var No=x(null),$i=Error(s(460)),Ch=Error(s(474)),Gr=Error(s(542)),Ea={then:function(){}},Os=null,Fo=null,Al=0,ps=Mr(!0),Xp=Mr(!1),ms=[],Ta=0,Sl=0,dr=!1,wh=!1,bl=x(null),Oo=x(0),js=x(null),$s=null,bi=x(0),to=0,un=null,kt=null,sn=null,mn=!1,hn=!1,Dn=!1,Ts=0,Hr=0,Qr=null,Wp=0,pr={readContext:J,use:Pn,useCallback:ze,useContext:ze,useEffect:ze,useImperativeHandle:ze,useLayoutEffect:ze,useInsertionEffect:ze,useMemo:ze,useReducer:ze,useRef:ze,useState:ze,useDebugValue:ze,useDeferredValue:ze,useTransition:ze,useSyncExternalStore:ze,useId:ze,useHostTransitionStatus:ze,useFormState:ze,useActionState:ze,useOptimistic:ze,useMemoCache:ze,useCacheRefresh:ze};pr.useEffectEvent=ze;var vi={readContext:J,use:Pn,useCallback:function(l,c){return Rt().memoizedState=[l,c===void 0?null:c],l},useContext:J,useEffect:au,useImperativeHandle:function(l,c,m){m=m!=null?m.concat([l]):null,tl(4194308,4,Jl.bind(null,c,l),m)},useLayoutEffect:function(l,c){return tl(4194308,4,l,c)},useInsertionEffect:function(l,c){tl(4,2,l,c)},useMemo:function(l,c){var m=Rt();c=c===void 0?null:c;var _=l();if(Dn){j(!0);try{l()}finally{j(!1)}}return m.memoizedState=[_,c],_},useReducer:function(l,c,m){var _=Rt();if(m!==void 0){var T=m(c);if(Dn){j(!0);try{m(c)}finally{j(!1)}}}else T=c;return _.memoizedState=_.baseState=T,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:T},_.queue=l,l=l.dispatch=D_.bind(null,un,l),[_.memoizedState,l]}
vendor: 5,975 bytes, line 4082
4082,useRef:function(l){var c=Rt();return l={current:l},c.memoizedState=l},useState:function(l){l=Id(l);var c=l.queue,m=mg.bind(null,un,c);return c.dispatch=m,[l.memoizedState,m]},useDebugValue:lu,useDeferredValue:function(l,c){var m=Rt();return ql(m,l,c)},useTransition:function(){var l=Id(!1);return l=hg.bind(null,un,l.queue,!0,!1),Rt().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,c,m){var _=un,T=Rt();if(Tn){if(m===void 0)throw Error(s(407));m=m()}else{if(m=c(),gn===null)throw Error(s(349));(Cn&127)!==0||ns(_,c,m)}T.memoizedState=m;var R={value:m,getSnapshot:c};return T.queue=R,au($o.bind(null,_,R,l),[l]),_.flags|=2048,or(9,{destroy:void 0},is.bind(null,_,R,m,c),null),m},useId:function(){var l=Rt(),c=gn.identifierPrefix;if(Tn){var m=Kr,_=hs;m=(_&~(1<<32-Zs(_)-1)).toString(32)+m,c="_"+c+"R_"+m,m=Ts++,0<m&&(c+="H"+m.toString(32)),c+="_"}else m=Wp++,c="_"+c+"r_"+m.toString(32)+"_";return l.memoizedState=c},useHostTransitionStatus:Od,useFormState:Ud,useActionState:Ud,useOptimistic:function(l){var c=Rt();c.memoizedState=c.baseState=l;var m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return c.queue=m,c=Nf.bind(null,un,!0,m),m.dispatch=c,[l,c]},useMemoCache:Yi,useCacheRefresh:function(){return Rt().memoizedState=B_.bind(null,un)},useEffectEvent:function(l){var c=Rt(),m={impl:l};return c.memoizedState=m,function(){if((Sn&2)!==0)throw Error(s(440));return m.impl.apply(void 0,arguments)}}},Ca={readContext:J,use:Pn,useCallback:Lf,useContext:J,useEffect:Wl,useImperativeHandle:fg,useInsertionEffect:yo,useLayoutEffect:ou,useMemo:Yl,useReducer:ci,useRef:If,useState:function(){return ci(_n)},useDebugValue:lu,useDeferredValue:function(l,c){var m=nt();return Fd(m,kt.memoizedState,l,c)},useTransition:function(){var l=ci(_n)[0],c=nt().memoizedState;return[typeof l=="boolean"?l:xt(l),c]},useSyncExternalStore:Oi,useId:Uf,useHostTransitionStatus:Od,useFormState:Vl,useActionState:Vl,useOptimistic:function(l,c){var m=nt();return su(m,kt,l,c)},useMemoCache:Yi,useCacheRefresh:pg};Ca.useEffectEvent=Ds;var Po={readContext:J,use:Pn,useCallback:Lf,useContext:J,useEffect:Wl,useImperativeHandle:fg,useInsertionEffect:yo,useLayoutEffect:ou,useMemo:Yl,useReducer:qi,useRef:If,useState:function(){return qi(_n)},useDebugValue:lu,useDeferredValue:function(l,c){var m=nt();return kt===null?ql(m,l,c):Fd(m,kt.memoizedState,l,c)},useTransition:function(){var l=qi(_n)[0],c=nt().memoizedState;return[typeof l=="boolean"?l:xt(l),c]},useSyncExternalStore:Oi,useId:Uf,useHostTransitionStatus:Od,useFormState:Xl,useActionState:Xl,useOptimistic:function(l,c){var m=nt();return kt!==null?su(m,kt,l,c):(m.baseState=l,[l,m.queue.dispatch])},useMemoCache:Yi,useCacheRefresh:pg};Po.useEffectEvent=Ds;var Ou={enqueueSetState:function(l,c,m){l=l._reactInternals;var _=ui(),T=te(_);T.payload=c,m!=null&&(T.callback=m),c=ge(l,T,_),c!==null&&(mi(c,l,_),Ce(c,l,_))},enqueueReplaceState:function(l,c,m){l=l._reactInternals;var _=ui(),T=te(_);T.tag=1,T.payload=c,m!=null&&(T.callback=m),c=ge(l,T,_),c!==null&&(mi(c,l,_),Ce(c,l,_))},enqueueForceUpdate:function(l,c){l=l._reactInternals;var m=ui(),_=te(m);_.tag=2,c!=null&&(_.callback=c),c=ge(l,_,m),c!==null&&(mi(c,l,m),Ce(c,l,m))}},Ps=Error(s(461)),oi=!1,Ml={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},Mi=!1,Ei=!1,yc=!1,Jp=typeof WeakSet=="function"?WeakSet:Set,Ii=null,yi=null,Li=!1,Kn=null,mr=8192,_c={getCacheForType:function(l){var c=J(di),m=c.data.get(l);return m===void 0&&(m=l(),c.data.set(l,m)),m},cacheSignal:function(){return J(di).controller.signal}},kr=0,xc=1,Ac=2,Pu=3,zo=4;if(typeof Symbol=="function"&&Symbol.for){var El=Symbol.for;kr=El("selector.component"),xc=El("selector.has_pseudo_class"),Ac=El("selector.role"),Pu=El("selector.test_id"),zo=El("selector.text")}var gr=typeof WeakMap=="function"?WeakMap:Map,Sn=0,gn=null,bn=null,Cn=0,Zn=0,Gi=null,jr=!1,Go=!1,Ho=!1,wa=0,_i=0,no=0,ko=0,Sc=0,zs=0,bc=0,zu=null,er=null,Rh=!1,Gu=0,Tl=0,Vo=1/0,Hu=null,io=null,Hi=0,so=null,Cl=null,Ra=0,Mc=0,Bh=null,Yp=null,zn=0,ku=null;return pn.attemptContinuousHydration=function(l){if(l.tag===13||l.tag===31){var c=Kt(l,67108864);c!==null&&mi(c,l,67108864),Su(l,67108864)}},pn.attemptHydrationAtCurrentPriority=function(l){if(l.tag===13||l.tag===31){var c=ui();c=q(c);var m=Kt(l,c);m!==null&&mi(m,l,c),Su(l,c)}},pn.attemptSynchronousHydration=function(l){switch(l.tag){case 3:if(l=l.stateNode,l.current.memoizedState.isDehydrated){var c=C(l.pendingLanes);if(c!==0){for(l.pendingLanes|=2,l.entangledLanes|=2;c;){var m=1<<31-Zs(c);l.entanglements[1]|=m,c&=~m}St(l),(Sn&6)===0&&(Vo=Ms()+500,ot(0))}}break;case 31:case 13:c=Kt(l,2),c!==null&&mi(c,l,2),qf(),Su(l,2)}},pn.batchedUpdates=function(l,c){return l(c)},pn.createComponentSelector=function(l){return{$$typeof:kr,value:l}},pn.createContainer=function(l,c,m,_,T,R,H,ne,Te,qe){return wo(l,c,!1,null,m,_,R,null,H,ne,Te,qe)},pn.createHasPseudoClassSelector=function(l){return{$$typeof:xc,value:l}},pn.createHydrationContainer=function(l,c,m,_,T,R,H,ne,Te,qe,pt,et,Bt,ln){var Ui;return l=wo(m,_,!0,l,T,R,ne,ln,Te,qe,pt,et),l.context=eh(null),m=l.current,_=ui(),_=q(_),T=te(_),T.callback=(Ui=c)!=null?Ui:null,ge(m,T,_),c=_,l.current.lanes=c,P(l,c),St(l),l},pn.createPortal=function(l,c,m){var _=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ul,key:_==null?null:""+_,children:l,containerInfo:c,implementation:m}},pn.createRoleSelector=function(l){return{$$typeof:Ac,value:l}},pn.createTestNameSelector=function(l){return{$$typeof:Pu,value:l}},pn.createTextSelector=function(l){return{$$typeof:zo,value:l}},pn.defaultOnCaughtError=function(l){console.error(l)},pn.defaultOnRecoverableError=function(l){bh(l)},pn.defaultOnUncaughtError=function(l){bh(l)},pn.deferredUpdates=function(l){var c=Jt.T,m=Lr();try{return En(32),Jt.T=null,l()}finally{En(m),Jt.T=c}},pn.discreteUpdates=function(l,c,m,_,T){var R=Jt.T,H=Lr();try{return En(2),Jt.T=null,l(c,m,_,T)}finally{En(H),Jt.T=R,Sn===0&&(Vo=Ms()+500)}}
4082,pn.findAllNodes=Js,pn.findBoundingRects=function(l,c){if(!Ki)throw Error(s(363));c=Js(l,c),l=[];for(var m=0;m<c.length;m++)l.push(lh(c[m]));for(c=l.length-1;0<c;c--){m=l[c];for(var _=m.x,T=_+m.width,R=m.y,H=R+m.height,ne=c-1;0<=ne;ne--)if(c!==ne){var Te=l[ne],qe=Te.x,pt=qe+Te.width,et=Te.y,Bt=et+Te.height;if(_>=qe&&R>=et&&T<=pt&&H<=Bt){l.splice(c,1);break}else if(_!==qe||m.width!==Te.width||Bt<R||et>H){if(!(R!==et||m.height!==Te.height||pt<_||qe>T)){qe>_&&(Te.width+=qe-_,Te.x=_),pt<T&&(Te.width=T-qe),l.splice(c,1);break}}else{et>R&&(Te.height+=et-R,Te.y=R),Bt<H&&(Te.height=H-et),l.splice(c,1);break}}}return l},pn.findHostInstance=Au,pn.findHostInstanceWithNoPortals=function(l){return l=h(l),l=l!==null?g(l):null,l===null?null:fc(l.stateNode)},pn.findHostInstanceWithWarning=function(l){return Au(l)},pn.flushPassiveEffects=_a,pn.flushSyncFromReconciler=function(l){var c=Sn;Sn|=1;var m=Jt.T,_=Lr();try{if(En(2),Jt.T=null,l)return l()}finally{En(_),Jt.T=m,Sn=c,(Sn&6)===0&&ot(0)}},pn.flushSyncWork=qf,pn.focusWithin=function(l,c){if(!Ki)throw Error(s(363));for(l=bo(l),c=sc(l,c),c=Array.from(c),l=0;l<c.length;){var m=c[l++],_=m.tag;if(!Do(m)){if((_===5||_===26||_===27)&&Qa(m.stateNode))return!0;for(m=m.child;m!==null;)c.push(m),m=m.sibling}}return!1},pn.getFindAllNodesFailureDescription=function(l,c){if(!Ki)throw Error(s(363));var m=0,_=[];l=[bo(l),0];for(var T=0;T<l.length;){var R=l[T++],H=R.tag,ne=l[T++],Te=c[ne];if((H!==5&&H!==26&&H!==27||!Do(R))&&(Mo(R,Te)&&(_.push(ic(Te)),ne++,ne>m&&(m=ne)),ne<c.length))for(R=R.child;R!==null;)l.push(R,ne),R=R.sibling}if(m<c.length){for(l=[];m<c.length;m++)l.push(ic(c[m]));return`findAllNodes was able to match part of the selector: 4083 `+(_.join(" > ")+` 4084 4085No matching component was found for: 4086 `)+l.join(" > ")}return null},pn.getPublicRootInstance=function(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 27:case 5:return fc(l.child.stateNode);default:return l.child.stateNode}},pn.injectIntoDevTools=function(){var l={bundleType:0,version:lp,rendererPackageName:Eu,currentDispatcherRef:Jt,reconcilerVersion:"19.2.0"};if(uc!==null&&(l.rendererConfig=uc),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(c.isDisabled||!c.supportsFiber)l=!0;else{try{xl=c.inject(l),Qs=c}catch{}l=!!c.checkDCE}}return l},pn.isAlreadyRendering=function(){return(Sn&6)!==0},pn.observeVisibleRects=function(l,c,m,_){if(!Ki)throw Error(s(363));l=Js(l,c);var T=ch(l,m,_).disconnect;return{disconnect:function(){T()}}},pn.shouldError=function(){return null},pn.shouldSuspend=function(){return!1},pn.startHostTransition=function(l,c,m,_){if(l.tag!==5)throw Error(s(476));var T=dg(l).queue;hg(l,T,c,ml,m===null?n:function(){var R=dg(l);return R.next===null&&(R=l.alternate.memoizedState),cu(l,R.next.queue,{},ui()),m(_)})},pn.updateContainer=function(l,c,m,_){var T=c.current,R=ui();return ap(T,R,l,c,m,_),R},pn.updateContainerSync=function(l,c,m,_){return ap(c.current,2,l,c,m,_),2},pn},a.exports.default=a.exports,Object.defineProperty(a.exports,"__esModule",{value:!0})})(L1)),L1.exports}var N1;function CF(){return N1||(N1=1,I1.exports=TF()),I1.exports}var wF=CF();const RF=EF(wF);function BF(a){const e=RF(a);return e.injectIntoDevTools(),e}const ZT=0,Ed={},DF=/^three(?=[A-Z])/,w_=a=>`${a[0].toUpperCase()}${a.slice(1)}`;let IF=0;const LF=a=>typeof a=="function";function QT(a){if(LF(a)){const e=`${IF++}`;return Ed[e]=a,e}else Object.assign(Ed,a)}function jT(a,e){const t=w_(a),n=Ed[t];if(a!=="primitive"&&!n)throw new Error(`R3F: ${t} 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(a==="primitive"&&!e.object)throw new Error("R3F: Primitives without 'object' are invalid!");if(e.args!==void 0&&!Array.isArray(e.args))throw new Error("R3F: The args prop must be an array!")}function UF(a,e,t){var n;return a=w_(a)in Ed?a:a.replace(DF,""),jT(a,e),a==="primitive"&&(n=e.object)!=null&&n.__r3f&&delete e.object.__r3f,Py(e.object,t,a,e)}function NF(a){if(!a.isHidden){var e;a.props.attach&&(e=a.parent)!=null&&e.object?Gy(a.parent,a):_r(a.object)&&(a.object.visible=!1),a.isHidden=!0,Dd(a)}}function $T(a){if(a.isHidden){var e;a.props.attach&&(e=a.parent)!=null&&e.object?zy(a.parent,a):_r(a.object)&&a.props.visible!==!1&&(a.object.visible=!0),a.isHidden=!1,Dd(a)}}function qS(a,e,t){const n=e.root.getState();if(!(!a.parent&&a.object!==n.scene)){if(!e.object){var s,o;const u=Ed[w_(e.type)];
4086e.object=(s=e.props.object)!=null?s:new u(...(o=e.props.args)!=null?o:[]),e.object.__r3f=e}if(qo(e.object,e.props),e.props.attach)zy(a,e);else if(_r(e.object)&&_r(a.object)){const u=a.object.children.indexOf(t==null?void 0:t.object);if(t&&u!==-1){const h=a.object.children.indexOf(e.object);if(h!==-1){a.object.children.splice(h,1);const d=h<u?u-1:u;a.object.children.splice(d,0,e.object)}else e.object.parent=a.object,a.object.children.splice(u,0,e.object),e.object.dispatchEvent({type:"added"}),a.object.dispatchEvent({type:"childadded",child:e.object})}else a.object.add(e.object)}for(const u of e.children)qS(e,u);Dd(e)}}function oA(a,e){e&&(e.parent=a,a.children.push(e),qS(a,e))}function F1(a,e,t){if(!e||!t)return;e.parent=a;const n=a.children.indexOf(t);n!==-1?a.children.splice(n,0,e):a.children.push(e),qS(a,e,t)}function eC(a){if(typeof a.dispose=="function"){const e=()=>{try{a.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT<"u"?e():PA.unstable_scheduleCallback(PA.unstable_IdlePriority,e)}}function GA(a,e,t){if(!e)return;e.parent=null;const n=a.children.indexOf(e);n!==-1&&a.children.splice(n,1),e.props.attach?Gy(a,e):_r(e.object)&&_r(a.object)&&(a.object.remove(e.object),mF(VT(e),e.object));const s=e.props.dispose!==null&&t!==!1;for(let o=e.children.length-1;o>=0;o--){const u=e.children[o];GA(e,u,s)}e.children.length=0,delete e.object.__r3f,s&&e.type!=="primitive"&&e.object.type!=="Scene"&&eC(e.object),t===void 0&&Dd(e)}function FF(a,e){for(const t of[a,a.alternate])if(t!==null)if(typeof t.ref=="function"){t.refCleanup==null||t.refCleanup();const n=t.ref(e);typeof n=="function"&&(t.refCleanup=n)}else t.ref&&(t.ref.current=e)}const Wv=[];function OF(){for(const[t]of Wv){const n=t.parent;if(n){t.props.attach?Gy(n,t):_r(t.object)&&_r(n.object)&&n.object.remove(t.object);for(const s of t.children)s.props.attach?Gy(t,s):_r(s.object)&&_r(t.object)&&t.object.remove(s.object)}t.isHidden&&$T(t),t.object.__r3f&&delete t.object.__r3f,t.type!=="primitive"&&eC(t.object)}for(const[t,n,s]of Wv){t.props=n;const o=t.parent;if(o){var a,e;const u=Ed[w_(t.type)];
4086t.object=(a=t.props.object)!=null?a:new u(...(e=t.props.args)!=null?e:[]),t.object.__r3f=t,FF(s,t.object),qo(t.object,t.props),t.props.attach?zy(o,t):_r(t.object)&&_r(o.object)&&o.object.add(t.object);for(const h of t.children)h.props.attach?zy(t,h):_r(h.object)&&_r(t.object)&&t.object.add(h.object);Dd(t)}}Wv.length=0}const lA=()=>{},O1={};let Ov=ZT;const PF=0,zF=4,Hy=BF({isPrimaryRenderer:!1,warnsIfNotActing:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,createInstance:UF,removeChild:GA,appendChild:oA,appendInitialChild:oA,insertBefore:F1,appendChildToContainer(a,e){const t=a.getState().scene.__r3f;!e||!t||oA(t,e)},removeChildFromContainer(a,e){const t=a.getState().scene.__r3f;!e||!t||GA(t,e)},insertInContainerBefore(a,e,t){const n=a.getState().scene.__r3f;!e||!t||!n||F1(n,e,t)},getRootHostContext:()=>O1,getChildHostContext:()=>O1,commitUpdate(a,e,t,n,s){var o,u,h;jT(e,n);let d=!1;if((a.type==="primitive"&&t.object!==n.object||((o=n.args)==null?void 0:o.length)!==((u=t.args)==null?void 0:u.length)||(h=n.args)!=null&&h.some((y,v)=>{var x;return y!==((x=t.args)==null?void 0:x[v])}))&&(d=!0),d)Wv.push([a,{...n},s]);else{const y=hF(a,n);Object.keys(y).length&&(Object.assign(a.props,y),qo(a.object,y))}(s.sibling===null||(s.flags&zF)===PF)&&OF()},finalizeInitialChildren:()=>!1,commitMount(){},getPublicInstance:a=>a==null?void 0:a.object,prepareForCommit:()=>null,preparePortalMount:a=>Py(a.getState().scene,a,"",{}),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance:NF,unhideInstance:$T,createTextInstance:lA,hideTextInstance:lA,unhideTextInstance:lA,scheduleTimeout:typeof setTimeout=="function"?setTimeout:void 0,cancelTimeout:typeof clearTimeout=="function"?clearTimeout:void 0,noTimeout:-1,getInstanceFromNode:()=>null,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},prepareScopeUpdate(){},getInstanceFromScope:()=>null,shouldAttemptEagerTransition:()=>!1,trackSchedulerEvent:()=>{},resolveEventType:()=>null,resolveEventTimeStamp:()=>-1.1,requestPostPaintCallback(){},maySuspendCommit:()=>!1,preloadInstance:()=>!0,suspendInstance(){},waitForCommitToBeReady:()=>null,NotPendingTransition:null,HostTransitionContext:vt.createContext(null),setCurrentUpdatePriority(a){Ov=a},getCurrentUpdatePriority(){return Ov},resolveUpdatePriority(){var a;if(Ov!==ZT)return Ov;switch(typeof window<"u"&&((a=window.event)==null?void 0:a.type)){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return bF;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return AF;default:return SF}},resetFormInstance(){},rendererPackageName:"@react-three/fiber",rendererVersion:MF.version,applyViewTransitionName(a,e,t){},restoreViewTransitionName(a,e){},cancelViewTransitionName(a,e,t){},cancelRootViewTransitionName(a){},restoreRootViewTransitionName(a){},InstanceMeasurement:null,measureInstance:a=>null,wasInstanceInViewport:a=>!0,hasInstanceChanged:(a,e)=>!1,hasInstanceAffectedParent:(a,e)=>!1,suspendOnActiveViewTransition(a,e){},startGestureTransition:()=>null,startViewTransition:()=>null,stopViewTransition(a){},createViewTransitionInstance:a=>null,getCurrentGestureOffset(a){throw new Error("startGestureTransition is not yet supported in react-three-fiber.")},cloneMutableInstance(a,e){return a},cloneMutableTextInstance(a){return a},cloneRootViewTransitionContainer(a){throw new Error("Not implemented.")},removeRootViewTransitionClone(a,e){throw new Error("Not implemented.")},createFragmentInstance:a=>null,updateFragmentInstanceFiber(a,e){},commitNewChildToFragmentInstance(a,e){},deleteChildFromFragmentInstance(a,e){},measureClonedInstance:a=>null,maySuspendCommitOnUpdate:(a,e,t)=>!1,maySuspendCommitInSyncRender:(a,e)=>!1,startSuspendingCommit:()=>null,getSuspendedCommitReason:(a,e)=>null}),Ef=new Map,id={objects:"shallow",strict:!1};function GF(a,e){if(!e&&typeof HTMLCanvasElement<"u"&&a instanceof HTMLCanvasElement&&a.parentElement){const{width:t,height:n,top:s,left:o}=a.parentElement.getBoundingClientRect();return{width:t,height:n,top:s,left:o}}else if(!e&&typeof OffscreenCanvas<"u"&&a instanceof OffscreenCanvas)return{width:a.width,height:a.height,top:0,left:0};return{width:0,height:0,top:0,left:0,...e}}function HF(a){const e=Ef.get(a),t=e==null?void 0:e.fiber,n=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const s=typeof reportError=="function"?reportError:console.error,o=n||vF(VA,z1),u=t||Hy.createContainer(o,xF,null,!1,null,"",s,s,s,null);e||Ef.set(a,{fiber:u,store:o});let h,d,g=!1,y=null;return{async configure(v={}){let x;y=new Promise(De=>x=De);let{gl:S,size:M,scene:w,events:C,onCreated:E,shadows:B=!1,linear:D=!1,flat:U=!1,legacy:z=!1,orthographic:P=!1,frameloop:X="always",dpr:k=[1,2],performance:I,raycaster:O,camera:q,onPointerMissed:ie}=v,j=o.getState(),re=j.gl;if(!j.gl){const De={canvas:a,powerPreference:"high-performance",antialias:!0,alpha:!0},He=typeof S=="function"?await S(De):S;B1(He)?re=He:re=new kS({...De,...S}),j.set({gl:re})}let fe=j.raycaster;fe||j.set({raycaster:fe=new GS});const{params:Y,...$}=O||{};if(Ti.equ($,fe,id)||qo(fe,{...$}),Ti.equ(Y,fe.params,id)||qo(fe,{params:{...fe.params,...Y}}),!j.camera||j.camera===d&&!Ti.equ(d,q,id)){d=q;const De=q==null?void 0:q.isCamera,He=De?q:P?new iu(0,0,0,0,.1,1e3):new gs(75,0,.1,1e3);De||(He.position.z=5,q&&(qo(He,q),He.manual||("aspect"in q||"left"in q||"right"in q||"bottom"in q||"top"in q)&&(He.manual=!0,He.updateProjectionMatrix())),!j.camera&&!(q!=null&&q.rotation)&&He.lookAt(0,0,0)),j.set({camera:He}),fe.camera=He}if(!j.scene){let De;w!=null&&w.isScene?(De=w,Py(De,o,"",{})):(De=new jm,Py(De,o,"",{}),w&&qo(De,w)),j.set({scene:De})}C&&!j.events.handlers&&j.set({events:C(o)});const pe=GF(a,M);if(Ti.equ(pe,j.size,id)||j.setSize(pe.width,pe.height,pe.top,pe.left),k&&j.viewport.dpr!==WT(k)&&j.setDpr(k),j.frameloop!==X&&j.setFrameloop(X),j.onPointerMissed||j.set({onPointerMissed:ie}),I&&!Ti.equ(I,j.performance,id)&&j.set(De=>({performance:{...De.performance,...I}})),!j.xr){var Be;const De=(bt,qt)=>{const me=o.getState();me.frameloop!=="never"&&z1(bt,!0,me,qt)},He=()=>{const bt=o.getState();bt.gl.xr.enabled=bt.gl.xr.isPresenting,bt.gl.xr.setAnimationLoop(bt.gl.xr.isPresenting?De:null),bt.gl.xr.isPresenting||VA(bt)},Ve={connect(){const bt=o.getState().gl;bt.xr.addEventListener("sessionstart",He),bt.xr.addEventListener("sessionend",He)},disconnect(){const bt=o.getState().gl;bt.xr.removeEventListener("sessionstart",He),bt.xr.removeEventListener("sessionend",He)}};typeof((Be=re.xr)==null?void 0:Be.addEventListener)=="function"&&Ve.connect(),j.set({xr:Ve})}if(re.shadowMap){const De=re.shadowMap.enabled,He=re.shadowMap.type;if(re.shadowMap.enabled=!!B,Ti.boo(B))re.shadowMap.type=bm;else if(Ti.str(B)){var Ae;const Ve={basic:$1,percentage:ad,soft:bm,variance:of};re.shadowMap.type=(Ae=Ve[B])!=null?Ae:bm}else Ti.obj(B)&&Object.assign(re.shadowMap,B);(De!==re.shadowMap.enabled||He!==re.shadowMap.type)&&(re.shadowMap.needsUpdate=!0)}
vendor: 21,175 bytes, lines 4086-4167
4086return On.enabled=!z,g||(re.outputColorSpace=D?po:ks,re.toneMapping=U?Oa:Wy),j.legacy!==z&&j.set(()=>({legacy:z})),j.linear!==D&&j.set(()=>({linear:D})),j.flat!==U&&j.set(()=>({flat:U})),S&&!Ti.fun(S)&&!B1(S)&&!Ti.equ(S,re,id)&&qo(re,S),h=E,g=!0,x(),this},render(v){return!g&&!y&&this.configure(),y.then(()=>{Hy.updateContainer(Hs.jsx(kF,{store:o,children:v,onCreated:h,rootElement:a}),u,null,()=>{})}),o},unmount(){tC(a)}}}function kF({store:a,children:e,onCreated:t,rootElement:n}){return og(()=>{const s=a.getState();s.set(o=>({internal:{...o.internal,active:!0}})),t&&t(s),a.getState().events.connected||s.events.connect==null||s.events.connect(n)},[]),Hs.jsx(JS.Provider,{value:a,children:e})}function tC(a,e){const t=Ef.get(a),n=t==null?void 0:t.fiber;if(n){const s=t==null?void 0:t.store.getState();s&&(s.internal.active=!1),Hy.updateContainer(null,n,null,()=>{s&&setTimeout(()=>{try{var o,u,h,d;s.events.disconnect==null||s.events.disconnect(),(o=s.gl)==null||(u=o.renderLists)==null||u.dispose==null||u.dispose(),(h=s.gl)==null||h.forceContextLoss==null||h.forceContextLoss(),(d=s.gl)!=null&&d.xr&&s.xr.disconnect(),cF(s.scene),Ef.delete(a)}catch{}},500)})}}function VF(a,e,t){return Hs.jsx(XF,{children:a,container:e,state:t})}function XF({state:a={},children:e,container:t}){const{events:n,size:s,...o}=a,u=YS(),[h]=vt.useState(()=>new GS),[d]=vt.useState(()=>new We),g=WS((v,x)=>{let S;if(x.camera&&s){const M=x.camera;S=v.viewport.getCurrentViewport(M,new K,s),M!==v.camera&&YT(M,s)}return{...v,...x,scene:t,raycaster:h,pointer:d,mouse:d,previousRoot:u,events:{...v.events,...x.events,...n},size:{...v.size,...s},viewport:{...v.viewport,...S},setEvents:M=>x.set(w=>({...w,events:{...w.events,...M}}))}}),y=vt.useMemo(()=>{const v=OT((S,M)=>({...o,set:S,get:M})),x=S=>v.setState(M=>g.current(S,M));return x(u.getState()),u.subscribe(x),v},[u,t]);return Hs.jsx(Hs.Fragment,{children:Hy.createPortal(Hs.jsx(JS.Provider,{value:y,children:e}),y,null)})}const WF=new Set,JF=new Set,YF=new Set;function cA(a,e){if(a.size)for(const{callback:t}of a.values())t(e)}function Dm(a,e){switch(a){case"before":return cA(WF,e);case"after":return cA(JF,e);case"tail":return cA(YF,e)}}let uA,fA;function HA(a,e,t){let n=e.clock.getDelta();e.frameloop==="never"&&typeof a=="number"&&(n=a-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=a),uA=e.internal.subscribers;for(let s=0;s<uA.length;s++)fA=uA[s],fA.ref.current(fA.store.getState(),n,t);return!e.internal.priority&&e.gl.render&&e.gl.render(e.scene,e.camera),e.internal.frames=Math.max(0,e.internal.frames-1),e.frameloop==="always"?1:e.internal.frames}let ky=!1,kA=!1,hA,P1,sd;function nC(a){P1=requestAnimationFrame(nC),ky=!0,hA=0,Dm("before",a),kA=!0;for(const t of Ef.values()){var e;sd=t.store.getState(),sd.internal.active&&(sd.frameloop==="always"||sd.internal.frames>0)&&!((e=sd.gl.xr)!=null&&e.isPresenting)&&(hA+=HA(a,sd))}if(kA=!1,Dm("after",a),hA===0)return Dm("tail",a),ky=!1,cancelAnimationFrame(P1)}function VA(a,e=1){var t;if(!a)return Ef.forEach(n=>VA(n.store.getState(),e));(t=a.gl.xr)!=null&&t.isPresenting||!a.internal.active||a.frameloop==="never"||(e>1?a.internal.frames=Math.min(60,a.internal.frames+e):kA?a.internal.frames=2:a.internal.frames=1,ky||(ky=!0,requestAnimationFrame(nC)))}function z1(a,e=!0,t,n){if(e&&Dm("before",a),t)HA(a,t,n);else for(const s of Ef.values())HA(a,s.store.getState());e&&Dm("after",a)}const dA={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 qF(a){const{handlePointer:e}=gF(a);return{priority:1,enabled:!0,compute(t,n,s){n.pointer.set(t.offsetX/n.size.width*2-1,-(t.offsetY/n.size.height)*2+1),n.raycaster.setFromCamera(n.pointer,n.camera)},connected:void 0,handlers:Object.keys(dA).reduce((t,n)=>({...t,[n]:e(n)}),{}),update:()=>{var t;const{events:n,internal:s}=a.getState();(t=s.lastEvent)!=null&&t.current&&n.handlers&&n.handlers.onPointerMove(s.lastEvent.current)},connect:t=>{const{set:n,events:s}=a.getState();if(s.disconnect==null||s.disconnect(),n(o=>({events:{...o.events,connected:t}})),s.handlers)for(const o in s.handlers){const u=s.handlers[o],[h,d]=dA[o];t.addEventListener(h,u,{passive:d})}},disconnect:()=>{const{set:t,events:n}=a.getState();if(n.connected){if(n.handlers)for(const s in n.handlers){const o=n.handlers[s],[u]=dA[s];n.connected.removeEventListener(u,o)}t(s=>({events:{...s.events,connected:void 0}}))}}}}function G1(a,e){let t;return(...n)=>{window.clearTimeout(t),t=window.setTimeout(()=>a(...n),e)}}function KF({debounce:a,scroll:e,polyfill:t,offsetSize:n}={debounce:0,scroll:!1,offsetSize:!1}){const s=t||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[o,u]=vt.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),h=vt.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o,orientationHandler:null}),d=a?typeof a=="number"?a:a.scroll:null,g=a?typeof a=="number"?a:a.resize:null,y=vt.useRef(!1);vt.useEffect(()=>(y.current=!0,()=>void(y.current=!1)));const[v,x,S]=vt.useMemo(()=>{const E=()=>{if(!h.current.element)return;const{left:B,top:D,width:U,height:z,bottom:P,right:X,x:k,y:I}=h.current.element.getBoundingClientRect(),O={left:B,top:D,width:U,height:z,bottom:P,right:X,x:k,y:I};h.current.element instanceof HTMLElement&&n&&(O.height=h.current.element.offsetHeight,O.width=h.current.element.offsetWidth),Object.freeze(O),y.current&&!$F(h.current.lastBounds,O)&&u(h.current.lastBounds=O)};return[E,g?G1(E,g):E,d?G1(E,d):E]},[u,n,d,g]);function M(){h.current.scrollContainers&&(h.current.scrollContainers.forEach(E=>E.removeEventListener("scroll",S,!0)),h.current.scrollContainers=null),h.current.resizeObserver&&(h.current.resizeObserver.disconnect(),h.current.resizeObserver=null),h.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",h.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",h.current.orientationHandler))}function w(){h.current.element&&(h.current.resizeObserver=new s(S),h.current.resizeObserver.observe(h.current.element),e&&h.current.scrollContainers&&h.current.scrollContainers.forEach(E=>E.addEventListener("scroll",S,{capture:!0,passive:!0})),h.current.orientationHandler=()=>{S()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",h.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",h.current.orientationHandler))}const C=E=>{!E||E===h.current.element||(M(),h.current.element=E,h.current.scrollContainers=iC(E),w())};return QF(S,!!e),ZF(x),vt.useEffect(()=>{M(),w()},[e,S,x]),vt.useEffect(()=>M,[]),[C,o,v]}function ZF(a){vt.useEffect(()=>{const e=a;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[a])}function QF(a,e){vt.useEffect(()=>{if(e){const t=a;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[a,e])}function iC(a){const e=[];if(!a||a===document.body)return e;const{overflow:t,overflowX:n,overflowY:s}=window.getComputedStyle(a);return[t,n,s].some(o=>o==="auto"||o==="scroll")&&e.push(a),[...e,...iC(a.parentElement)]}const jF=["x","y","top","bottom","left","right","width","height"],$F=(a,e)=>jF.every(t=>a[t]===e[t]);function eO({ref:a,children:e,fallback:t,resize:n,style:s,gl:o,events:u=qF,eventSource:h,eventPrefix:d,shadows:g,linear:y,flat:v,legacy:x,orthographic:S,frameloop:M,dpr:w,performance:C,raycaster:E,camera:B,scene:D,onPointerMissed:U,onCreated:z,...P}){vt.useMemo(()=>QT(ON),[]);const X=rF(),[k,I]=KF({scroll:!0,debounce:{scroll:50,resize:0},...n}),O=vt.useRef(null),q=vt.useRef(null);vt.useImperativeHandle(a,()=>O.current);const ie=WS(U),[j,re]=vt.useState(!1),[fe,Y]=vt.useState(!1);if(j)throw j;if(fe)throw fe;const $=vt.useRef(null);og(()=>{const Be=O.current;if(I.width>0&&I.height>0&&Be){$.current||($.current=HF(Be));async function Ae(){await $.current.configure({gl:o,scene:D,events:u,shadows:g,linear:y,flat:v,legacy:x,orthographic:S,frameloop:M,dpr:w,performance:C,raycaster:E,camera:B,size:I,onPointerMissed:(...De)=>ie.current==null?void 0:ie.current(...De),onCreated:De=>{De.events.connect==null||De.events.connect(h?iF(h)?h.current:h:q.current),d&&De.setEvents({compute:(He,Ve)=>{const bt=He[d+"X"],qt=He[d+"Y"];Ve.pointer.set(bt/Ve.size.width*2-1,-(qt/Ve.size.height)*2+1),Ve.raycaster.setFromCamera(Ve.pointer,Ve.camera)}}),z==null||z(De)}}),$.current.render(Hs.jsx(X,{children:Hs.jsx(oF,{set:Y,children:Hs.jsx(vt.Suspense,{fallback:Hs.jsx(aF,{set:re}),children:e??null})})}))}Ae()}}),vt.useEffect(()=>{const Be=O.current;if(Be)return()=>tC(Be)},[]);const pe=h?"none":"auto";return Hs.jsx("div",{ref:q,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:pe,...s},...P,children:Hs.jsx("div",{ref:k,style:{width:"100%",height:"100%"},children:Hs.jsx("canvas",{ref:O,style:{display:"block"},children:t})})})}function AP(a){return Hs.jsx(HT,{children:Hs.jsx(eO,{...a})})}function Vy(){return Vy=Object.assign?Object.assign.bind():function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(a[n]=t[n])}return a},Vy.apply(null,arguments)}const KS=parseInt(Jm.replace(/\D+/g,""));function H1(a,e){if(e===ME)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),a;if(e===Ly||e===aS){let t=a.getIndex();if(t===null){const u=[],h=a.getAttribute("position");if(h!==void 0){for(let d=0;d<h.count;d++)u.push(d);a.setIndex(u),t=a.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),a}const n=t.count-2,s=[];if(t)if(e===Ly)for(let u=1;u<=n;u++)s.push(t.getX(0)),s.push(t.getX(u)),s.push(t.getX(u+1));else for(let u=0;u<n;u++)u%2===0?(s.push(t.getX(u)),s.push(t.getX(u+1)),s.push(t.getX(u+2))):(s.push(t.getX(u+2)),s.push(t.getX(u+1)),s.push(t.getX(u)));s.length/3!==n&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const o=a.clone();return o.setIndex(s),o.clearGroups(),o}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),a}var Na=Uint8Array,Jc=Uint16Array,XA=Uint32Array,sC=new Na([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),rC=new Na([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),tO=new Na([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),aC=function(a,e){for(var t=new Jc(31),n=0;n<31;++n)t[n]=e+=1<<a[n-1];for(var s=new XA(t[30]),n=1;n<30;++n)for(var o=t[n];o<t[n+1];++o)s[o]=o-t[n]<<5|n;return[t,s]},oC=aC(sC,2),lC=oC[0],nO=oC[1];lC[28]=258,nO[258]=28;var iO=aC(rC,0),sO=iO[0],WA=new Jc(32768);for(var Ai=0;Ai<32768;++Ai){var zc=(Ai&43690)>>>1|(Ai&21845)<<1;zc=(zc&52428)>>>2|(zc&13107)<<2,zc=(zc&61680)>>>4|(zc&3855)<<4,WA[Ai]=((zc&65280)>>>8|(zc&255)<<8)>>>1}var Im=(function(a,e,t){for(var n=a.length,s=0,o=new Jc(e);s<n;++s)++o[a[s]-1];var u=new Jc(e);for(s=0;s<e;++s)u[s]=u[s-1]+o[s-1]<<1;var h;if(t){h=new Jc(1<<e);var d=15-e;for(s=0;s<n;++s)if(a[s])for(var g=s<<4|a[s],y=e-a[s],v=u[a[s]-1]++<<y,x=v|(1<<y)-1;v<=x;++v)h[WA[v]>>>d]=g}else for(h=new Jc(n),s=0;s<n;++s)a[s]&&(h[s]=WA[u[a[s]-1]++]>>>15-a[s]);return h}),lg=new Na(288);for(var Ai=0;Ai<144;++Ai)lg[Ai]=8;for(var Ai=144;Ai<256;++Ai)lg[Ai]=9;for(var Ai=256;Ai<280;++Ai)lg[Ai]=7;for(var Ai=280;Ai<288;++Ai)lg[Ai]=8;var cC=new Na(32);for(var Ai=0;Ai<32;++Ai)cC[Ai]=5;var rO=Im(lg,9,1),aO=Im(cC,5,1),pA=function(a){for(var e=a[0],t=1;t<a.length;++t)a[t]>e&&(e=a[t]);return e},lo=function(a,e,t){var n=e/8|0;return(a[n]|a[n+1]<<8)>>(e&7)&t},mA=function(a,e){var t=e/8|0;return(a[t]|a[t+1]<<8|a[t+2]<<16)>>(e&7)},oO=function(a){return(a/8|0)+(a&7&&1)},lO=function(a,e,t){(t==null||t>a.length)&&(t=a.length);var n=new(a instanceof Jc?Jc:a instanceof XA?XA:Na)(t-e);return n.set(a.subarray(e,t)),n},cO=function(a,e,t){var n=a.length;if(!n||t&&!t.l&&n<5)return e||new Na(0);var s=!e||t,o=!t||t.i;t||(t={}),e||(e=new Na(n*3));var u=function(me){var Fe=e.length;if(me>Fe){var mt=new Na(Math.max(Fe*2,me));mt.set(e),e=mt}},h=t.f||0,d=t.p||0,g=t.b||0,y=t.l,v=t.d,x=t.m,S=t.n,M=n*8;do{if(!y){t.f=h=lo(a,d,1);var w=lo(a,d+1,3);if(d+=3,w)if(w==1)y=rO,v=aO,x=9,S=5;else if(w==2){var D=lo(a,d,31)+257,U=lo(a,d+10,15)+4,z=D+lo(a,d+5,31)+1;d+=14;for(var P=new Na(z),X=new Na(19),k=0;k<U;++k)X[tO[k]]=lo(a,d+k*3,7);d+=U*3;for(var I=pA(X),O=(1<<I)-1,q=Im(X,I,1),k=0;k<z;){var ie=q[lo(a,d,O)];d+=ie&15;var C=ie>>>4;if(C<16)P[k++]=C;else{var j=0,re=0;for(C==16?(re=3+lo(a,d,3),d+=2,j=P[k-1]):C==17?(re=3+lo(a,d,7),d+=3):C==18&&(re=11+lo(a,d,127),d+=7);re--;)P[k++]=j}}var fe=P.subarray(0,D),Y=P.subarray(D);x=pA(fe),S=pA(Y),y=Im(fe,x,1),v=Im(Y,S,1)}else throw"invalid block type";else{var C=oO(d)+4,E=a[C-4]|a[C-3]<<8,B=C+E;if(B>n){if(o)throw"unexpected EOF";break}s&&u(g+E),e.set(a.subarray(C,B),g),t.b=g+=E,t.p=d=B*8;continue}if(d>M){if(o)throw"unexpected EOF";break}}s&&u(g+131072);for(var $=(1<<x)-1,pe=(1<<S)-1,Be=d;;Be=d){var j=y[mA(a,d)&$],Ae=j>>>4;if(d+=j&15,d>M){if(o)throw"unexpected EOF";break}if(!j)throw"invalid length/literal";if(Ae<256)e[g++]=Ae;else if(Ae==256){Be=d,y=null;break}else{var De=Ae-254;if(Ae>264){var k=Ae-257,He=sC[k];De=lo(a,d,(1<<He)-1)+lC[k],d+=He}var Ve=v[mA(a,d)&pe],bt=Ve>>>4;if(!Ve)throw"invalid distance";d+=Ve&15;var Y=sO[bt];if(bt>3){var He=rC[bt];Y+=mA(a,d)&(1<<He)-1,d+=He}if(d>M){if(o)throw"unexpected EOF";break}s&&u(g+131072);for(var qt=g+De;g<qt;g+=4)e[g]=e[g-Y],e[g+1]=e[g+1-Y],e[g+2]=e[g+2-Y],e[g+3]=e[g+3-Y];g=qt}}t.l=y,t.p=Be,t.b=g,y&&(h=1,t.m=x,t.d=v,t.n=S)}while(!h);return g==e.length?e:lO(e,0,g)},uO=new Na(0),fO=function(a){if((a[0]&15)!=8||a[0]>>>4>7||(a[0]<<8|a[1])%31)throw"invalid zlib data";if(a[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function Pv(a,e){return cO((fO(a),a.subarray(2,-4)),e)}var hO=typeof TextDecoder<"u"&&new TextDecoder,dO=0;try{hO.decode(uO,{stream:!0}),dO=1}catch{}const pO=a=>a&&a.isCubeTexture;class mO extends wi{constructor(e,t){var n,s;const o=pO(e),h=((s=o?(n=e.image[0])==null?void 0:n.width:e.image.width)!=null?s:1024)/4,d=Math.floor(Math.log2(h)),g=Math.pow(2,d),y=3*Math.max(g,112),v=4*g,x=[o?"#define ENVMAP_TYPE_CUBE":"",`#define CUBEUV_TEXEL_WIDTH ${1/y}`,`#define CUBEUV_TEXEL_HEIGHT ${1/v}`,`#define CUBEUV_MAX_MIP ${d}.0`],S=` 4087 varying vec3 vWorldPosition; 4088 void main() 4089 { 4090 vec4 worldPosition = ( modelMatrix * vec4( position, 1.0 ) ); 4091 vWorldPosition = worldPosition.xyz; 4092 4093 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 4094 } 4095 `,M=x.join(` 4096`)+` 4097 #define ENVMAP_TYPE_CUBE_UV 4098 varying vec3 vWorldPosition; 4099 uniform float radius; 4100 uniform float height; 4101 uniform float angle; 4102 #ifdef ENVMAP_TYPE_CUBE 4103 uniform samplerCube map; 4104 #else 4105 uniform sampler2D map; 4106 #endif 4107 // From: https://www.shadertoy.com/view/4tsBD7 4108 float diskIntersectWithBackFaceCulling( vec3 ro, vec3 rd, vec3 c, vec3 n, float r ) 4109 { 4110 float d = dot ( rd, n ); 4111 4112 if( d > 0.0 ) { return 1e6; } 4113 4114 vec3 o = ro - c; 4115 float t = - dot( n, o ) / d; 4116 vec3 q = o + rd * t; 4117 4118 return ( dot( q, q ) < r * r ) ? t : 1e6; 4119 } 4120 // From: https://www.iquilezles.org/www/articles/intersectors/intersectors.htm 4121 float sphereIntersect( vec3 ro, vec3 rd, vec3 ce, float ra ) 4122 { 4123 vec3 oc = ro - ce; 4124 float b = dot( oc, rd ); 4125 float c = dot( oc, oc ) - ra * ra; 4126 float h = b * b - c; 4127 4128 if( h < 0.0 ) { return -1.0; } 4129 4130 h = sqrt( h ); 4131 4132 return - b + h; 4133 } 4134 vec3 project() 4135 { 4136 vec3 p = normalize( vWorldPosition ); 4137 vec3 camPos = cameraPosition; 4138 camPos.y -= height; 4139 float intersection = sphereIntersect( camPos, p, vec3( 0.0 ), radius ); 4140 if( intersection > 0.0 ) { 4141 4142 vec3 h = vec3( 0.0, - height, 0.0 ); 4143 float intersection2 = diskIntersectWithBackFaceCulling( camPos, p, h, vec3( 0.0, 1.0, 0.0 ), radius ); 4144 p = ( camPos + min( intersection, intersection2 ) * p ) / radius; 4145 } else { 4146 p = vec3( 0.0, 1.0, 0.0 ); 4147 } 4148 return p; 4149 } 4150 #include <common> 4151 #include <cube_uv_reflection_fragment> 4152 void main() 4153 { 4154 vec3 projectedWorldPosition = project(); 4155 4156 #ifdef ENVMAP_TYPE_CUBE 4157 vec3 outcolor = textureCube( map, projectedWorldPosition ).rgb; 4158 #else 4159 vec3 direction = normalize( projectedWorldPosition ); 4160 vec2 uv = equirectUv( direction ); 4161 vec3 outcolor = texture2D( map, uv ).rgb; 4162 #endif 4163 gl_FragColor = vec4( outcolor, 1.0 ); 4164 #include <tonemapping_fragment> 4165 #include <${KS>=154?"colorspace_fragment":"encodings_fragment"}> 4166 } 4167 `,w={map:{value:e},height:{value:(t==null?void 0:t.height)||15},radius:{value:(t==null?void 0:t.radius)||100}},C=new ig(1,16),E=new br({uniforms:w,fragmentShader:M,vertexShader:S,side:Ua});super(C,E)}set radius(e){this.material.uniforms.radius.value=e}get radius(){return this.material.uniforms.radius.value}set height(e){this.material.uniforms.height.value=e}get height(){return this.material.uniforms.height.value}}function Xy(a){if(typeof TextDecoder<"u")return new TextDecoder().decode(a);let e="";for(let t=0,n=a.length;t<n;t++)e+=String.fromCharCode(a[t]);try{return decodeURIComponent(escape(e))}catch{return e}}const pf="srgb",Gl="srgb-linear",k1=3001,gO=3e3;class ZS extends Xs{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new AO(t)}),this.register(function(t){return new SO(t)}),this.register(function(t){return new DO(t)}),this.register(function(t){return new IO(t)}),this.register(function(t){return new LO(t)}),this.register(function(t){return new MO(t)}),this.register(function(t){return new EO(t)}),this.register(function(t){return new TO(t)}),this.register(function(t){return new CO(t)}),this.register(function(t){return new xO(t)}),this.register(function(t){return new wO(t)}),this.register(function(t){return new bO(t)}),this.register(function(t){return new BO(t)}),this.register(function(t){return new RO(t)}),this.register(function(t){return new yO(t)}),this.register(function(t){return new UO(t)}),this.register(function(t){return new NO(t)})}load(e,t,n,s){const o=this;let u;if(this.resourcePath!=="")u=this.resourcePath;else if(this.path!==""){const g=Yc.extractUrlBase(e);u=Yc.resolveURL(g,this.path)}else u=Yc.extractUrlBase(e);this.manager.itemStart(e);const h=function(g){s?s(g):console.error(g),o.manager.itemError(e),o.manager.itemEnd(e)},d=new Vs(this.manager);d.setPath(this.path),d.setResponseType("arraybuffer"),d.setRequestHeader(this.requestHeader),d.setWithCredentials(this.withCredentials),d.load(e,function(g){try{o.parse(g,u,function(y){t(y),o.manager.itemEnd(e)},h)}catch(y){h(y)}},n,h)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,s){let o;const u={},h={};if(typeof e=="string")o=JSON.parse(e);else if(e instanceof ArrayBuffer)if(Xy(new Uint8Array(e.slice(0,4)))===uC){try{u[Ln.KHR_BINARY_GLTF]=new FO(e)}catch(y){s&&s(y);return}o=JSON.parse(u[Ln.KHR_BINARY_GLTF].content)}else o=JSON.parse(Xy(new Uint8Array(e)));else o=e;if(o.asset===void 0||o.asset.version[0]<2){s&&s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const d=new KO(o,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});d.fileLoader.setRequestHeader(this.requestHeader);for(let g=0;g<this.pluginCallbacks.length;g++){const y=this.pluginCallbacks[g](d);
vendor: 13,294 bytes, line 4167
4167y.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),h[y.name]=y,u[y.name]=!0}if(o.extensionsUsed)for(let g=0;g<o.extensionsUsed.length;++g){const y=o.extensionsUsed[g],v=o.extensionsRequired||[];switch(y){case Ln.KHR_MATERIALS_UNLIT:u[y]=new _O;break;case Ln.KHR_DRACO_MESH_COMPRESSION:u[y]=new OO(o,this.dracoLoader);break;case Ln.KHR_TEXTURE_TRANSFORM:u[y]=new PO;break;case Ln.KHR_MESH_QUANTIZATION:u[y]=new zO;break;default:v.indexOf(y)>=0&&h[y]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+y+'".')}}d.setExtensions(u),d.setPlugins(h),d.parse(n,s)}parseAsync(e,t){const n=this;return new Promise(function(s,o){n.parse(e,t,s,o)})}}function vO(){let a={};return{get:function(e){return a[e]},add:function(e,t){a[e]=t},remove:function(e){delete a[e]},removeAll:function(){a={}}}}const Ln={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class yO{constructor(e){this.parser=e,this.name=Ln.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,s=t.length;n<s;n++){const o=t[n];o.extensions&&o.extensions[this.name]&&o.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,o.extensions[this.name].light)}}_loadLight(e){const t=this.parser,n="light:"+e;let s=t.cache.get(n);if(s)return s;const o=t.json,d=((o.extensions&&o.extensions[this.name]||{}).lights||[])[e];let g;const y=new Tt(16777215);d.color!==void 0&&y.setRGB(d.color[0],d.color[1],d.color[2],Gl);const v=d.range!==void 0?d.range:0;switch(d.type){case"directional":g=new LS(y),g.target.position.set(0,0,-1),g.add(g.target);break;case"point":g=new IS(y),g.distance=v;break;case"spot":g=new DS(y),g.distance=v,d.spot=d.spot||{},d.spot.innerConeAngle=d.spot.innerConeAngle!==void 0?d.spot.innerConeAngle:0,d.spot.outerConeAngle=d.spot.outerConeAngle!==void 0?d.spot.outerConeAngle:Math.PI/4,g.angle=d.spot.outerConeAngle,g.penumbra=1-d.spot.innerConeAngle/d.spot.outerConeAngle,g.target.position.set(0,0,-1),g.add(g.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+d.type)}return g.position.set(0,0,0),g.decay=2,Nl(g,d),d.intensity!==void 0&&(g.intensity=d.intensity),g.name=t.createUniqueName(d.name||"light_"+e),s=Promise.resolve(g),t.cache.add(n,s),s}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){const t=this,n=this.parser,o=n.json.nodes[e],h=(o.extensions&&o.extensions[this.name]||{}).light;return h===void 0?null:this._loadLight(h).then(function(d){return n._getNodeRef(t.cache,h,d)})}}class _O{constructor(){this.name=Ln.KHR_MATERIALS_UNLIT}getMaterialType(){return Yr}extendParams(e,t,n){const s=[];e.color=new Tt(1,1,1),e.opacity=1;const o=t.pbrMetallicRoughness;if(o){if(Array.isArray(o.baseColorFactor)){const u=o.baseColorFactor;e.color.setRGB(u[0],u[1],u[2],Gl),e.opacity=u[3]}o.baseColorTexture!==void 0&&s.push(n.assignTexture(e,"map",o.baseColorTexture,pf))}return Promise.all(s)}}class xO{constructor(e){this.parser=e,this.name=Ln.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const o=s.extensions[this.name].emissiveStrength;return o!==void 0&&(t.emissiveIntensity=o),Promise.resolve()}}class AO{constructor(e){this.parser=e,this.name=Ln.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:za}extendMaterialParams(e,t){const n=this.parser,s=n.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const o=[],u=s.extensions[this.name];if(u.clearcoatFactor!==void 0&&(t.clearcoat=u.clearcoatFactor),u.clearcoatTexture!==void 0&&o.push(n.assignTexture(t,"clearcoatMap",u.clearcoatTexture)),u.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=u.clearcoatRoughnessFactor),u.clearcoatRoughnessTexture!==void 0&&o.push(n.assignTexture(t,"clearcoatRoughnessMap",u.clearcoatRoughnessTexture)),u.clearcoatNormalTexture!==void 0&&(o.push(n.assignTexture(t,"clearcoatNormalMap",u.clearcoatNormalTexture)),u.clearcoatNormalTexture.scale!==void 0)){const h=u.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new We(h,h)}return Promise.all(o)}}class SO{constructor(e){this.parser=e,this.name=Ln.KHR_MATERIALS_DISPERSION}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:za}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const o=s.extensions[this.name];return t.dispersion=o.dispersion!==void 0?o.dispersion:0,Promise.resolve()}}class bO{constructor(e){this.parser=e,this.name=Ln.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:za}extendMaterialParams(e,t){const n=this.parser,s=n.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const o=[],u=s.extensions[this.name];return u.iridescenceFactor!==void 0&&(t.iridescence=u.iridescenceFactor),u.iridescenceTexture!==void 0&&o.push(n.assignTexture(t,"iridescenceMap",u.iridescenceTexture)),u.iridescenceIor!==void 0&&(t.iridescenceIOR=u.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),u.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=u.iridescenceThicknessMinimum),u.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=u.iridescenceThicknessMaximum),u.iridescenceThicknessTexture!==void 0&&o.push(n.assignTexture(t,"iridescenceThicknessMap",u.iridescenceThicknessTexture)),Promise.all(o)}}class MO{constructor(e){this.parser=e,this.name=Ln.KHR_MATERIALS_SHEEN}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:za}extendMaterialParams(e,t){const n=this.parser,s=n.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const o=[];t.sheenColor=new Tt(0,0,0),t.sheenRoughness=0,t.sheen=1;const u=s.extensions[this.name];if(u.sheenColorFactor!==void 0){const h=u.sheenColorFactor;t.sheenColor.setRGB(h[0],h[1],h[2],Gl)}return u.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=u.sheenRoughnessFactor),u.sheenColorTexture!==void 0&&o.push(n.assignTexture(t,"sheenColorMap",u.sheenColorTexture,pf)),u.sheenRoughnessTexture!==void 0&&o.push(n.assignTexture(t,"sheenRoughnessMap",u.sheenRoughnessTexture)),Promise.all(o)}}class EO{constructor(e){this.parser=e,this.name=Ln.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:za}extendMaterialParams(e,t){const n=this.parser,s=n.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const o=[],u=s.extensions[this.name];return u.transmissionFactor!==void 0&&(t.transmission=u.transmissionFactor),u.transmissionTexture!==void 0&&o.push(n.assignTexture(t,"transmissionMap",u.transmissionTexture)),Promise.all(o)}}class TO{constructor(e){this.parser=e,this.name=Ln.KHR_MATERIALS_VOLUME}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:za}extendMaterialParams(e,t){const n=this.parser,s=n.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const o=[],u=s.extensions[this.name];t.thickness=u.thicknessFactor!==void 0?u.thicknessFactor:0,u.thicknessTexture!==void 0&&o.push(n.assignTexture(t,"thicknessMap",u.thicknessTexture)),t.attenuationDistance=u.attenuationDistance||1/0;const h=u.attenuationColor||[1,1,1];return t.attenuationColor=new Tt().setRGB(h[0],h[1],h[2],Gl),Promise.all(o)}}class CO{constructor(e){this.parser=e,this.name=Ln.KHR_MATERIALS_IOR}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:za}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const o=s.extensions[this.name];return t.ior=o.ior!==void 0?o.ior:1.5,Promise.resolve()}}class wO{constructor(e){this.parser=e,this.name=Ln.KHR_MATERIALS_SPECULAR}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:za}extendMaterialParams(e,t){const n=this.parser,s=n.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const o=[],u=s.extensions[this.name];t.specularIntensity=u.specularFactor!==void 0?u.specularFactor:1,u.specularTexture!==void 0&&o.push(n.assignTexture(t,"specularIntensityMap",u.specularTexture));const h=u.specularColorFactor||[1,1,1];return t.specularColor=new Tt().setRGB(h[0],h[1],h[2],Gl),u.specularColorTexture!==void 0&&o.push(n.assignTexture(t,"specularColorMap",u.specularColorTexture,pf)),Promise.all(o)}}class RO{constructor(e){this.parser=e,this.name=Ln.EXT_MATERIALS_BUMP}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:za}extendMaterialParams(e,t){const n=this.parser,s=n.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const o=[],u=s.extensions[this.name];return t.bumpScale=u.bumpFactor!==void 0?u.bumpFactor:1,u.bumpTexture!==void 0&&o.push(n.assignTexture(t,"bumpMap",u.bumpTexture)),Promise.all(o)}}class BO{constructor(e){this.parser=e,this.name=Ln.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:za}extendMaterialParams(e,t){const n=this.parser,s=n.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const o=[],u=s.extensions[this.name];return u.anisotropyStrength!==void 0&&(t.anisotropy=u.anisotropyStrength),u.anisotropyRotation!==void 0&&(t.anisotropyRotation=u.anisotropyRotation),u.anisotropyTexture!==void 0&&o.push(n.assignTexture(t,"anisotropyMap",u.anisotropyTexture)),Promise.all(o)}}class DO{constructor(e){this.parser=e,this.name=Ln.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,n=t.json,s=n.textures[e];if(!s.extensions||!s.extensions[this.name])return null;const o=s.extensions[this.name],u=t.options.ktx2Loader;if(!u){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,o.source,u)}}class IO{constructor(e){this.parser=e,this.name=Ln.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,s=n.json,o=s.textures[e];if(!o.extensions||!o.extensions[t])return null;const u=o.extensions[t],h=s.images[u.source];let d=n.textureLoader;if(h.uri){const g=n.options.manager.getHandler(h.uri);g!==null&&(d=g)}return this.detectSupport().then(function(g){if(g)return n.loadTextureImage(e,u.source,d);if(s.extensionsRequired&&s.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class LO{constructor(e){this.parser=e,this.name=Ln.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,s=n.json,o=s.textures[e];if(!o.extensions||!o.extensions[t])return null;const u=o.extensions[t],h=s.images[u.source];let d=n.textureLoader;if(h.uri){const g=n.options.manager.getHandler(h.uri);g!==null&&(d=g)}return this.detectSupport().then(function(g){if(g)return n.loadTextureImage(e,u.source,d);if(s.extensionsRequired&&s.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return n.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdj
4167FDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class UO{constructor(e){this.name=Ln.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const s=n.extensions[this.name],o=this.parser.getDependency("buffer",s.buffer),u=this.parser.options.meshoptDecoder;if(!u||!u.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return o.then(function(h){const d=s.byteOffset||0,g=s.byteLength||0,y=s.count,v=s.byteStride,x=new Uint8Array(h,d,g);return u.decodeGltfBufferAsync?u.decodeGltfBufferAsync(y,v,x,s.mode,s.filter).then(function(S){return S.buffer}):u.ready.then(function(){const S=new ArrayBuffer(y*v);return u.decodeGltfBuffer(new Uint8Array(S),y,v,x,s.mode,s.filter),S})})}else return null}}class NO{constructor(e){this.name=Ln.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||n.mesh===void 0)return null;const s=t.meshes[n.mesh];for(const g of s.primitives)if(g.mode!==La.TRIANGLES&&g.mode!==La.TRIANGLE_STRIP&&g.mode!==La.TRIANGLE_FAN&&g.mode!==void 0)return null;const u=n.extensions[this.name].attributes,h=[],d={};for(const g in u)h.push(this.parser.getDependency("accessor",u[g]).then(y=>(d[g]=y,d[g])));return h.length<1?null:(h.push(this.parser.createNodeMesh(e)),Promise.all(h).then(g=>{const y=g.pop(),v=y.isGroup?y.children:[y],x=g[0].count,S=[];for(const M of v){const w=new jt,C=new K,E=new sr,B=new K(1,1,1),D=new dS(M.geometry,M.material,x);for(let U=0;U<x;U++)d.TRANSLATION&&C.fromBufferAttribute(d.TRANSLATION,U),d.ROTATION&&E.fromBufferAttribute(d.ROTATION,U),d.SCALE&&B.fromBufferAttribute(d.SCALE,U),D.setMatrixAt(U,w.compose(C,E,B));for(const U in d)if(U==="_COLOR_0"){const z=d[U];D.instanceColor=new xf(z.array,z.itemSize,z.normalized)}else U!=="TRANSLATION"&&U!=="ROTATION"&&U!=="SCALE"&&M.geometry.setAttribute(U,d[U]);Gn.prototype.copy.call(D,M),this.parser.assignFinalMaterial(D),S.push(D)}return y.isGroup?(y.clear(),y.add(...S),y):S[0]}))}}const uC="glTF",vm=12,V1={JSON:1313821514,BIN:5130562};class FO{constructor(e){this.name=Ln.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,vm);if(this.header={magic:Xy(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==uC)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const n=this.header.length-vm,s=new DataView(e,vm);let o=0;for(;o<n;){const u=s.getUint32(o,!0);o+=4;const h=s.getUint32(o,!0);if(o+=4,h===V1.JSON){const d=new Uint8Array(e,vm+o,u);this.content=Xy(d)}else if(h===V1.BIN){const d=vm+o;this.body=e.slice(d,d+u)}o+=u}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class OO{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=Ln.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const n=this.json,s=this.dracoLoader,o=e.extensions[this.name].bufferView,u=e.extensions[this.name].attributes,h={},d={},g={};for(const y in u){const v=JA[y]||y.toLowerCase();h[v]=u[y]}for(const y in e.attributes){const v=JA[y]||y.toLowerCase();if(u[y]!==void 0){const x=n.accessors[e.attributes[y]],S=cd[x.componentType];g[v]=S.name,d[v]=x.normalized===!0}}return t.getDependency("bufferView",o).then(function(y){return new Promise(function(v,x){s.decodeDracoFile(y,function(S){for(const M in S.attributes){const w=S.attributes[M],C=d[M];C!==void 0&&(w.normalized=C)}v(S)},h,g,Gl,x)})})}}class PO{constructor(){this.name=Ln.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}
vendor: 22,136 bytes, line 4167
4167class zO{constructor(){this.name=Ln.KHR_MESH_QUANTIZATION}}class fC extends Rd{constructor(e,t,n,s){super(e,t,n,s)}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,s=this.valueSize,o=e*s*3+s;for(let u=0;u!==s;u++)t[u]=n[o+u];return t}interpolate_(e,t,n,s){const o=this.resultBuffer,u=this.sampleValues,h=this.valueSize,d=h*2,g=h*3,y=s-t,v=(n-t)/y,x=v*v,S=x*v,M=e*g,w=M-g,C=-2*S+3*x,E=S-x,B=1-C,D=E-x+v;for(let U=0;U!==h;U++){const z=u[w+U+h],P=u[w+U+d]*y,X=u[M+U+h],k=u[M+U]*y;o[U]=B*z+D*P+C*X+E*k}return o}}const GO=new sr;class HO extends fC{interpolate_(e,t,n,s){const o=super.interpolate_(e,t,n,s);return GO.fromArray(o).normalize().toArray(o),o}}const La={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},cd={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},X1={9728:Xi,9729:Un,9984:Jy,9985:od,9986:lf,9987:Fa},W1={33071:Fi,33648:hd,10497:Zc},gA={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},JA={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",...KS>=152?{TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3"}:{TEXCOORD_0:"uv",TEXCOORD_1:"uv2"},COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Gc={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},kO={CUBICSPLINE:void 0,LINEAR:gd,STEP:md},vA={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function VO(a){return a.DefaultMaterial===void 0&&(a.DefaultMaterial=new ag({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:Zo})),a.DefaultMaterial}function sf(a,e,t){for(const n in t.extensions)a[n]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[n]=t.extensions[n])}function Nl(a,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(a.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function XO(a,e,t){let n=!1,s=!1,o=!1;for(let g=0,y=e.length;g<y;g++){const v=e[g];if(v.POSITION!==void 0&&(n=!0),v.NORMAL!==void 0&&(s=!0),v.COLOR_0!==void 0&&(o=!0),n&&s&&o)break}if(!n&&!s&&!o)return Promise.resolve(a);const u=[],h=[],d=[];for(let g=0,y=e.length;g<y;g++){const v=e[g];if(n){const x=v.POSITION!==void 0?t.getDependency("accessor",v.POSITION):a.attributes.position;u.push(x)}if(s){const x=v.NORMAL!==void 0?t.getDependency("accessor",v.NORMAL):a.attributes.normal;h.push(x)}if(o){const x=v.COLOR_0!==void 0?t.getDependency("accessor",v.COLOR_0):a.attributes.color;d.push(x)}}return Promise.all([Promise.all(u),Promise.all(h),Promise.all(d)]).then(function(g){const y=g[0],v=g[1],x=g[2];return n&&(a.morphAttributes.position=y),s&&(a.morphAttributes.normal=v),o&&(a.morphAttributes.color=x),a.morphTargetsRelative=!0,a})}function WO(a,e){if(a.updateMorphTargets(),e.weights!==void 0)for(let t=0,n=e.weights.length;t<n;t++)a.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(a.morphTargetInfluences.length===t.length){a.morphTargetDictionary={};for(let n=0,s=t.length;n<s;n++)a.morphTargetDictionary[t[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function JO(a){let e;const t=a.extensions&&a.extensions[Ln.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+yA(t.attributes):e=a.indices+":"+yA(a.attributes)+":"+a.mode,a.targets!==void 0)for(let n=0,s=a.targets.length;n<s;n++)e+=":"+yA(a.targets[n]);return e}function yA(a){let e="";const t=Object.keys(a).sort();for(let n=0,s=t.length;n<s;n++)e+=t[n]+":"+a[t[n]]+";";return e}function YA(a){switch(a){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function YO(a){return a.search(/\.jpe?g($|\?)/i)>0||a.search(/^data\:image\/jpeg/)===0?"image/jpeg":a.search(/\.webp($|\?)/i)>0||a.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const qO=new jt;class KO{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new vO,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,s=!1,o=-1;typeof navigator<"u"&&typeof navigator.userAgent<"u"&&(n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,s=navigator.userAgent.indexOf("Firefox")>-1,o=s?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||n||s&&o<98?this.textureLoader=new yT(this.options.manager):this.textureLoader=new ET(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Vs(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,s=this.json,o=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(u){return u._markDefs&&u._markDefs()}),Promise.all(this._invokeAll(function(u){return u.beforeRoot&&u.beforeRoot()})).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])}).then(function(u){const h={scene:u[0][s.scene||0],scenes:u[0],animations:u[1],cameras:u[2],asset:s.asset,parser:n,userData:{}};return sf(o,h,s),Nl(h,s),Promise.all(n._invokeAll(function(d){return d.afterRoot&&d.afterRoot(h)})).then(function(){for(const d of h.scenes)d.updateMatrixWorld();e(h)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let s=0,o=t.length;s<o;s++){const u=t[s].joints;for(let h=0,d=u.length;h<d;h++)e[u[h]].isBone=!0}for(let s=0,o=e.length;s<o;s++){const u=e[s];u.mesh!==void 0&&(this._addNodeRef(this.meshCache,u.mesh),u.skin!==void 0&&(n[u.mesh].isSkinnedMesh=!0)),u.camera!==void 0&&this._addNodeRef(this.cameraCache,u.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;const s=n.clone(),o=(u,h)=>{const d=this.associations.get(u);d!=null&&this.associations.set(h,d);for(const[g,y]of u.children.entries())o(y,h.children[g])};return o(n,s),s.name+="_instance_"+e.uses[t]++,s}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){const s=e(t[n]);if(s)return s}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const n=[];for(let s=0;s<t.length;s++){const o=e(t[s]);o&&n.push(o)}return n}getDependency(e,t){const n=e+":"+t;let s=this.cache.get(n);if(!s){switch(e){case"scene":s=this.loadScene(t);break;case"node":s=this._invokeOne(function(o){return o.loadNode&&o.loadNode(t)});break;case"mesh":s=this._invokeOne(function(o){return o.loadMesh&&o.loadMesh(t)});break;case"accessor":s=this.loadAccessor(t);break;case"bufferView":s=this._invokeOne(function(o){return o.loadBufferView&&o.loadBufferView(t)});break;case"buffer":s=this.loadBuffer(t);break;case"material":s=this._invokeOne(function(o){return o.loadMaterial&&o.loadMaterial(t)});break;case"texture":s=this._invokeOne(function(o){return o.loadTexture&&o.loadTexture(t)});break;case"skin":s=this.loadSkin(t);break;case"animation":s=this._invokeOne(function(o){return o.loadAnimation&&o.loadAnimation(t)});break;case"camera":s=this.loadCamera(t);break;default:if(s=this._invokeOne(function(o){return o!=this&&o.getDependency&&o.getDependency(e,t)}),!s)throw new Error("Unknown type: "+e);break}this.cache.add(n,s)}return s}getDependencies(e){let t=this.cache.get(e);if(!t){const n=this,s=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(s.map(function(o,u){return n.getDependency(e,u)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],n=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[Ln.KHR_BINARY_GLTF].body);const s=this.options;return new Promise(function(o,u){n.load(Yc.resolveURL(t.uri,s.path),o,void 0,function(){u(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(n){const s=t.byteLength||0,o=t.byteOffset||0;return n.slice(o,o+s)})}loadAccessor(e){const t=this,n=this.json,s=this.json.accessors[e];if(s.bufferView===void 0&&s.sparse===void 0){const u=gA[s.type],h=cd[s.componentType],d=s.normalized===!0,g=new h(s.count*u);return Promise.resolve(new Wn(g,u,d))}const o=[];return s.bufferView!==void 0?o.push(this.getDependency("bufferView",s.bufferView)):o.push(null),s.sparse!==void 0&&(o.push(this.getDependency("bufferView",s.sparse.indices.bufferView)),o.push(this.getDependency("bufferView",s.sparse.values.bufferView))),Promise.all(o).then(function(u){const h=u[0],d=gA[s.type],g=cd[s.componentType],y=g.BYTES_PER_ELEMENT,v=y*d,x=s.byteOffset||0,S=s.bufferView!==void 0?n.bufferViews[s.bufferView].byteStride:void 0,M=s.normalized===!0;let w,C;if(S&&S!==v){const E=Math.floor(x/S),B="InterleavedBuffer:"+s.bufferView+":"+s.componentType+":"+E+":"+s.count;let D=t.cache.get(B);D||(w=new g(h,E*S,s.count*S/y),D=new $m(w,S/y),t.cache.add(B,D)),C=new jc(D,d,x%S/y,M)}else h===null?w=new g(s.count*d):w=new g(h,x,s.count*d),C=new Wn(w,d,M);if(s.sparse!==void 0){const E=gA.SCALAR,B=cd[s.sparse.indices.componentType],D=s.sparse.indices.byteOffset||0,U=s.sparse.values.byteOffset||0,z=new B(u[1],D,s.sparse.count*E),P=new g(u[2],U,s.sparse.count*d);h!==null&&(C=new Wn(C.array.slice(),C.itemSize,C.normalized));for(let X=0,k=z.length;X<k;X++){const I=z[X];if(C.setX(I,P[X*d]),d>=2&&C.setY(I,P[X*d+1]),d>=3&&C.setZ(I,P[X*d+2]),d>=4&&C.setW(I,P[X*d+3]),d>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return C})}loadTexture(e){const t=this.json,n=this.options,o=t.textures[e].source,u=t.images[o];let h=this.textureLoader;if(u.uri){const d=n.manager.getHandler(u.uri);d!==null&&(h=d)}return this.loadTextureImage(e,o,h)}loadTextureImage(e,t,n){const s=this,o=this.json,u=o.textures[e],h=o.images[t],d=(h.uri||h.bufferView)+":"+u.sampler;if(this.textureCache[d])return this.textureCache[d];const g=this.loadImageSource(t,n).then(function(y){y.flipY=!1,y.name=u.name||h.name||"",y.name===""&&typeof h.uri=="string"&&h.uri.startsWith("data:image/")===!1&&(y.name=h.uri);const x=(o.samplers||{})[u.sampler]||{};return y.magFilter=X1[x.magFilter]||Un,y.minFilter=X1[x.minFilter]||Fa,y.wrapS=W1[x.wrapS]||Zc,y.wrapT=W1[x.wrapT]||Zc,s.associations.set(y,{textures:e}),y}).catch(function(){return null});return this.textureCache[d]=g,g}loadImageSource(e,t){const n=this,s=this.json,o=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(v=>v.clone());const u=s.images[e],h=self.URL||self.webkitURL;let d=u.uri||"",g=!1;if(u.bufferView!==void 0)d=n.getDependency("bufferView",u.bufferView).then(function(v){g=!0;const x=new Blob([v],{type:u.mimeType});return d=h.createObjectURL(x),d});else if(u.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const y=Promise.resolve(d).then(function(v){return new Promise(function(x,S){let M=x;t.isImageBitmapLoader===!0&&(M=function(w){const C=new ei(w);C.needsUpdate=!0,x(C)}),t.load(Yc.resolveURL(v,o.path),M,void 0,S)})}).then(function(v){return g===!0&&h.revokeObjectURL(d),Nl(v,u),v.userData.mimeType=u.mimeType||YO(u.uri),v}).catch(function(v){throw console.error("THREE.GLTFLoader: Couldn't load texture",d),v});return this.sourceCache[e]=y,y}assignTexture(e,t,n,s){const o=this;return this.getDependency("texture",n.index).then(function(u){if(!u)return null;if(n.texCoord!==void 0&&n.texCoord>0&&(u=u.clone(),u.channel=n.texCoord),o.extensions[Ln.KHR_TEXTURE_TRANSFORM]){const h=n.extensions!==void 0?n.extensions[Ln.KHR_TEXTURE_TRANSFORM]:void 0;if(h){const d=o.associations.get(u);u=o.extensions[Ln.KHR_TEXTURE_TRANSFORM].extendTexture(u,h),o.associations.set(u,d)}}return s!==void 0&&(typeof s=="number"&&(s=s===k1?pf:Gl),"colorSpace"in u?u.colorSpace=s:u.encoding=s===pf?k1:gO),e[t]=u,u})}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const s=t.attributes.tangent===void 0,o=t.attributes.color!==void 0,u=t.attributes.normal===void 0;if(e.isPoints){const h="PointsMaterial:"+n.uuid;let d=this.cache.get(h);d||(d=new u_,ys.prototype.copy.call(d,n),d.color.copy(n.color),d.map=n.map,d.sizeAttenuation=!1,this.cache.add(h,d)),n=d}else if(e.isLine){const h="LineBasicMaterial:"+n.uuid;let d=this.cache.get(h);d||(d=new rr,ys.prototype.copy.call(d,n),d.color.copy(n.color),d.map=n.map,this.cache.add(h,d)),n=d}if(s||o||u){let h="ClonedMaterial:"+n.uuid+":";s&&(h+="derivative-tangents:"),o&&(h+="vertex-colors:"),u&&(h+="flat-shading:");let d=this.cache.get(h);d||(d=n.clone(),o&&(d.vertexColors=!0),u&&(d.flatShading=!0),s&&(d.normalScale&&(d.normalScale.y*=-1),d.clearcoatNormalScale&&(d.clearcoatNormalScale.y*=-1)),this.cache.add(h,d),this.associations.set(d,this.associations.get(n))),n=d}e.material=n}getMaterialType(){return ag}loadMaterial(e){const t=this,n=this.json,s=this.extensions,o=n.materials[e];let u;const h={},d=o.extensions||{},g=[];if(d[Ln.KHR_MATERIALS_UNLIT]){const v=s[Ln.KHR_MATERIALS_UNLIT];u=v.getMaterialType(),g.push(v.extendParams(h,o,t))}else{const v=o.pbrMetallicRoughness||{};if(h.color=new Tt(1,1,1),h.opacity=1,Array.isArray(v.baseColorFactor)){const x=v.baseColorFactor;h.color.setRGB(x[0],x[1],x[2],Gl),h.opacity=x[3]}v.baseColorTexture!==void 0&&g.push(t.assignTexture(h,"map",v.baseColorTexture,pf)),h.metalness=v.metallicFactor!==void 0?v.metallicFactor:1,h.roughness=v.roughnessFactor!==void 0?v.roughnessFactor:1,v.metallicRoughnessTexture!==void 0&&(g.push(t.assignTexture(h,"metalnessMap",v.metallicRoughnessTexture)),g.push(t.assignTexture(h,"roughnessMap",v.metallicRoughnessTexture))),u=this._invokeOne(function(x){return x.getMaterialType&&x.getMaterialType(e)}),g.push(Promise.all(this._invokeAll(function(x){return x.extendMaterialParams&&x.extendMaterialParams(e,h)})))}o.doubleSided===!0&&(h.side=Ua);const y=o.alphaMode||vA.OPAQUE;if(y===vA.BLEND?(h.transparent=!0,h.depthWrite=!1):(h.transparent=!1,y===vA.MASK&&(h.alphaTest=o.alphaCutoff!==void 0?o.alphaCutoff:.5)),o.normalTexture!==void 0&&u!==Yr&&(g.push(t.assignTexture(h,"normalMap",o.normalTexture)),h.normalScale=new We(1,1),o.normalTexture.scale!==void 0)){const v=o.normalTexture.scale;h.normalScale.set(v,v)}if(o.occlusionTexture!==void 0&&u!==Yr&&(g.push(t.assignTexture(h,"aoMap",o.occlusionTexture)),o.occlusionTexture.strength!==void 0&&(h.aoMapIntensity=o.occlusionTexture.strength)),o.emissiveFactor!==void 0&&u!==Yr){const v=o.emissiveFactor;h.emissive=new Tt().setRGB(v[0],v[1],v[2],Gl)}return o.emissiveTexture!==void 0&&u!==Yr&&g.push(t.assignTexture(h,"emissiveMap",o.emissiveTexture,pf)),Promise.all(g).then(function(){const v=new u(h);return o.name&&(v.name=o.name),Nl(v,o),t.associations.set(v,{materials:e}),o.extensions&&sf(s,v,o),v})}createUniqueName(e){const t=Vn.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,n=this.extensions,s=this.primitiveCache;function o(h){return n[Ln.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(h,t).then(function(d){return J1(d,h,t)})}const u=[];for(let h=0,d=e.length;h<d;h++){const g=e[h],y=JO(g),v=s[y];if(v)u.push(v.promise);else{let x;g.extensions&&g.extensions[Ln.KHR_DRACO_MESH_COMPRESSION]?x=o(g):x=J1(new rn,g,t),s[y]={primitive:g,promise:x},u.push(x)}}return Promise.all(u)}loadMesh(e){const t=this,n=this.json,s=this.extensions,o=n.meshes[e],u=o.primitives,h=[];for(let d=0,g=u.length;d<g;d++){const y=u[d].material===void 0?VO(this.cache):this.getDependency("material",u[d].material);h.push(y)}return h.push(t.loadGeometries(u)),Promise.all(h).then(function(d){const g=d.slice(0,d.length-1),y=d[d.length-1],v=[];for(let S=0,M=y.length;S<M;S++){const w=y[S],C=u[S];let E;const B=g[S];if(C.mode===La.TRIANGLES||C.mode===La.TRIANGLE_STRIP||C.mode===La.TRIANGLE_FAN||C.mode===void 0)E=o.isSkinnedMesh===!0?new hS(w,B):new wi(w,B),E.isSkinnedMesh===!0&&E.normalizeSkinWeights(),C.mode===La.TRIANGLE_STRIP?E.geometry=H1(E.geometry,aS):C.mode===La.TRIANGLE_FAN&&(E.geometry=H1(E.geometry,Ly));else if(C.mode===La.LINES)E=new mo(w,B);else if(C.mode===La.LINE_STRIP)E=new Hl(w,B);else if(C.mode===La.LINE_LOOP)E=new pS(w,B);else if(C.mode===La.POINTS)E=new mS(w,B);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+C.mode);Object.keys(E.geometry.morphAttributes).length>0&&WO(E,o),E.name=t.createUniqueName(o.name||"mesh_"+e),Nl(E,o),C.extensions&&sf(s,E,C),t.assignFinalMaterial(E),v.push(E)}for(let S=0,M=v.length;S<M;S++)t.associations.set(v[S],{meshes:e,primitives:S});if(v.length===1)return o.extensions&&sf(s,v[0],o),v[0];const x=new Pl;o.extensions&&sf(s,x,o),t.associations.set(x,{meshes:e});for(let S=0,M=v.length;S<M;S++)x.add(v[S]);return x})}loadCamera(e){let t;const n=this.json.cameras[e],s=n[n.type];if(!s){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?t=new gs(FE.radToDeg(s.yfov),s.aspectRatio||1,s.znear||1,s.zfar||2e6):n.type==="orthographic"&&(t=new iu(-s.xmag,s.xmag,s.ymag,-s.ymag,s.znear,s.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),Nl(t,n),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],n=[];for(let s=0,o=t.joints.length;s<o;s++)n.push(this._loadNodeShallow(t.joints[s]));return t.inverseBindMatrices!==void 0?n.push(this.getDependency("accessor",t.inverseBindMatrices)):n.push(null),Promise.all(n).then(function(s){const o=s.pop(),u=s,h=[],d=[];for(let g=0,y=u.length;g<y;g++){const v=u[g];if(v){h.push(v);const x=new jt;o!==null&&x.fromArray(o.array,g*16),d.push(x)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[g])}return new eg(h,d)})}loadAnimation(e){const t=this.json,n=this,s=t.animations[e],o=s.name?s.name:"animation_"+e,u=[],h=[],d=[],g=[],y=[];for(let v=0,x=s.channels.length;v<x;v++){const S=s.channels[v],M=s.samplers[S.sampler],w=S.target,C=w.node,E=s.parameters!==void 0?s.parameters[M.input]:M.input,B=s.parameters!==void 0?s.parameters[M.output]:M.output;w.node!==void 0&&(u.push(this.getDependency("node",C)),h.push(this.getDependency("accessor",E)),d.push(this.getDependency("accessor",B)),g.push(M),y.push(w))}return Promise.all([Promise.all(u),Promise.all(h),Promise.all(d),Promise.all(g),Promise.all(y)]).then(function(v){const x=v[0],S=v[1],M=v[2],w=v[3],C=v[4],E=[];for(let B=0,D=x.length;B<D;B++){const U=x[B],z=S[B],P=M[B],X=w[B],k=C[B];if(U===void 0)continue;U.updateMatrix&&U.updateMatrix();const I=n._createAnimationTracks(U,z,P,X,k);if(I)for(let O=0;O<I.length;O++)E.push(I[O])}return new Md(o,void 0,E)})}createNodeMesh(e){const t=this.json,n=this,s=t.nodes[e];return s.mesh===void 0?null:n.getDependency("mesh",s.mesh).then(function(o){const u=n._getNodeRef(n.meshCache,s.mesh,o);return s.weights!==void 0&&u.traverse(function(h){if(h.isMesh)for(let d=0,g=s.weights.length;d<g;d++)h.morphTargetInfluences[d]=s.weights[d]}),u})}loadNode(e){const t=this.json,n=this,s=t.nodes[e],o=n._loadNodeShallow(e),u=[],h=s.children||[];for(let g=0,y=h.length;g<y;g++)u.push(n.getDependency("node",h[g]));const d=s.skin===void 0?Promise.resolve(null):n.getDependency("skin",s.skin);return Promise.all([o,Promise.all(u),d]).then(function(g){const y=g[0],v=g[1],x=g[2];x!==null&&y.traverse(function(S){S.isSkinnedMesh&&S.bind(x,qO)});for(let S=0,M=v.length;S<M;S++)y.add(v[S]);return y})}_loadNodeShallow(e){const t=this.json,n=this.extensions,s=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const o=t.nodes[e],u=o.name?s.createUniqueName(o.name):"",h=[],d=s._invokeOne(function(g){return g.createNodeMesh&&g.createNodeMesh(e)});return d&&h.push(d),o.camera!==void 0&&h.push(s.getDependency("camera",o.camera).then(function(g){return s._getNodeRef(s.cameraCache,o.camera,g)})),s._invokeAll(function(g){return g.createNodeAttachment&&g.createNodeAttachment(e)}).forEach(function(g){h.push(g)}),this.nodeCache[e]=Promise.all(h).then(function(g){let y;if(o.isBone===!0?y=new l_:g.length>1?y=new Pl:g.length===1?y=g[0]:y=new Gn,y!==g[0])for(let v=0,x=g.length;v<x;v++)y.add(g[v]);if(o.name&&(y.userData.name=o.name,y.name=u),Nl(y,o),o.extensions&&sf(n,y,o),o.matrix!==void 0){const v=new jt;v.fromArray(o.matrix),y.applyMatrix4(v)}else o.translation!==void 0&&y.position.fromArray(o.translation),o.rotation!==void 0&&y.quaternion.fromArray(o.rotation),o.scale!==void 0&&y.scale.fromArray(o.scale);return s.associations.has(y)||s.associations.set(y,{}),s.associations.get(y).nodes=e,y}),this.nodeCache[e]}loadScene(e){const t=this.extensions,n=this.json.scenes[e],s=this,o=new Pl;n.name&&(o.name=s.createUniqueName(n.name)),Nl(o,n),n.extensions&&sf(t,o,n);const u=n.nodes||[],h=[];for(let d=0,g=u.length;d<g;d++)h.push(s.getDependency("node",u[d]));return Promise.all(h).then(function(d){for(let y=0,v=d.length;y<v;y++)o.add(d[y]);const g=y=>{const v=new Map;for(const[x,S]of s.associations)(x instanceof ys||x instanceof ei)&&v.set(x,S);return y.traverse(x=>{const S=s.associations.get(x);S!=null&&v.set(x,S)}),v};return s.associations=g(o),o})}_createAnimationTracks(e,t,n,s,o){const u=[],h=e.name?e.name:e.uuid,d=[];Gc[o.path]===Gc.weights?e.traverse(function(x){x.morphTargetInfluences&&d.push(x.name?x.name:x.uuid)}):d.push(h);let g;switch(Gc[o.path]){case Gc.weights:g=Sf;break;case Gc.rotation:g=bf;break;case Gc.position:case Gc.scale:g=Mf;break;default:switch(n.itemSize){case 1:g=Sf;break;case 2:case 3:default:g=Mf;break}break}const y=s.interpolation!==void 0?kO[s.interpolation]:gd,v=this._getArrayFromAccessor(n);for(let x=0,S=d.length;x<S;x++){const M=new g(d[x]+"."+Gc[o.path],t.array,v,y);
vendor: 4,351 bytes, lines 4167-4171
4167s.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(M),u.push(M)}return u}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const n=YA(t.constructor),s=new Float32Array(t.length);for(let o=0,u=t.length;o<u;o++)s[o]=t[o]*n;t=s}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(n){const s=this instanceof bf?HO:fC;return new s(this.times,this.values,this.getValueSize()/3,n)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function ZO(a,e,t){const n=e.attributes,s=new Rs;if(n.POSITION!==void 0){const h=t.json.accessors[n.POSITION],d=h.min,g=h.max;if(d!==void 0&&g!==void 0){if(s.set(new K(d[0],d[1],d[2]),new K(g[0],g[1],g[2])),h.normalized){const y=YA(cd[h.componentType]);s.min.multiplyScalar(y),s.max.multiplyScalar(y)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const o=e.targets;if(o!==void 0){const h=new K,d=new K;for(let g=0,y=o.length;g<y;g++){const v=o[g];if(v.POSITION!==void 0){const x=t.json.accessors[v.POSITION],S=x.min,M=x.max;if(S!==void 0&&M!==void 0){if(d.setX(Math.max(Math.abs(S[0]),Math.abs(M[0]))),d.setY(Math.max(Math.abs(S[1]),Math.abs(M[1]))),d.setZ(Math.max(Math.abs(S[2]),Math.abs(M[2]))),x.normalized){const w=YA(cd[x.componentType]);d.multiplyScalar(w)}h.max(d)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}s.expandByVector(h)}a.boundingBox=s;const u=new vs;s.getCenter(u.center),u.radius=s.min.distanceTo(s.max)/2,a.boundingSphere=u}function J1(a,e,t){const n=e.attributes,s=[];function o(u,h){return t.getDependency("accessor",u).then(function(d){a.setAttribute(h,d)})}for(const u in n){const h=JA[u]||u.toLowerCase();h in a.attributes||s.push(o(n[u],h))}if(e.indices!==void 0&&!a.index){const u=t.getDependency("accessor",e.indices).then(function(h){a.setIndex(h)});s.push(u)}return Nl(a,e),ZO(a,e,t),Promise.all(s).then(function(){return e.targets!==void 0?XO(a,e.targets,t):a})}class QO extends RS{constructor(e){super(e),this.type=Wi}parse(e){const u=function(k,I){switch(k){case 1:throw new Error("THREE.RGBELoader: Read Error: "+(I||""));case 2:throw new Error("THREE.RGBELoader: Write Error: "+(I||""));case 3:throw new Error("THREE.RGBELoader: Bad File Format: "+(I||""));default:case 4:throw new Error("THREE.RGBELoader: Memory Error: "+(I||""))}},v=function(k,I,O){I=I||1024;let ie=k.pos,j=-1,re=0,fe="",Y=String.fromCharCode.apply(null,new Uint16Array(k.subarray(ie,ie+128)));for(;0>(j=Y.indexOf(` 4168`))&&re<I&&ie<k.byteLength;)fe+=Y,re+=Y.length,ie+=128,Y+=String.fromCharCode.apply(null,new Uint16Array(k.subarray(ie,ie+128)));return-1<j?(k.pos+=re+j+1,fe+Y.slice(0,j)):!1},x=function(k){const I=/^#\?(\S+)/,O=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,q=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,ie=/^\s*FORMAT=(\S+)\s*$/,j=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,re={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let fe,Y;for((k.pos>=k.byteLength||!(fe=v(k)))&&u(1,"no header found"),(Y=fe.match(I))||u(3,"bad initial token"),re.valid|=1,re.programtype=Y[1],re.string+=fe+` 4169`;fe=v(k),fe!==!1;){if(re.string+=fe+` 4170`,fe.charAt(0)==="#"){re.comments+=fe+` 4171`;continue}if((Y=fe.match(O))&&(re.gamma=parseFloat(Y[1])),(Y=fe.match(q))&&(re.exposure=parseFloat(Y[1])),(Y=fe.match(ie))&&(re.valid|=2,re.format=Y[1]),(Y=fe.match(j))&&(re.valid|=4,re.height=parseInt(Y[1],10),re.width=parseInt(Y[2],10)),re.valid&2&&re.valid&4)break}return re.valid&2||u(3,"missing format specifier"),re.valid&4||u(3,"missing image size specifier"),re},S=function(k,I,O){const q=I;if(q<8||q>32767||k[0]!==2||k[1]!==2||k[2]&128)return new Uint8Array(k);q!==(k[2]<<8|k[3])&&u(3,"wrong scanline width");const ie=new Uint8Array(4*I*O);ie.length||u(4,"unable to allocate buffer space");let j=0,re=0;const fe=4*q,Y=new Uint8Array(4),$=new Uint8Array(fe);let pe=O;for(;pe>0&&re<k.byteLength;){re+4>k.byteLength&&u(1),Y[0]=k[re++],Y[1]=k[re++],Y[2]=k[re++],Y[3]=k[re++],(Y[0]!=2||Y[1]!=2||(Y[2]<<8|Y[3])!=q)&&u(3,"bad rgbe scanline format");let Be=0,Ae;for(;Be<fe&&re<k.byteLength;){Ae=k[re++];const He=Ae>128;if(He&&(Ae-=128),(Ae===0||Be+Ae>fe)&&u(3,"bad scanline data"),He){const Ve=k[re++];for(let bt=0;bt<Ae;bt++)$[Be++]=Ve}else $.set(k.subarray(re,re+Ae),Be),Be+=Ae,re+=Ae}const De=q;for(let He=0;He<De;He++){let Ve=0;
vendor: 30,690 bytes, lines 4171-4172
4171ie[j]=$[He+Ve],Ve+=q,ie[j+1]=$[He+Ve],Ve+=q,ie[j+2]=$[He+Ve],Ve+=q,ie[j+3]=$[He+Ve],j+=4}pe--}return ie},M=function(k,I,O,q){const ie=k[I+3],j=Math.pow(2,ie-128)/255;O[q+0]=k[I+0]*j,O[q+1]=k[I+1]*j,O[q+2]=k[I+2]*j,O[q+3]=1},w=function(k,I,O,q){const ie=k[I+3],j=Math.pow(2,ie-128)/255;O[q+0]=ff.toHalfFloat(Math.min(k[I+0]*j,65504)),O[q+1]=ff.toHalfFloat(Math.min(k[I+1]*j,65504)),O[q+2]=ff.toHalfFloat(Math.min(k[I+2]*j,65504)),O[q+3]=ff.toHalfFloat(1)},C=new Uint8Array(e);C.pos=0;const E=x(C),B=E.width,D=E.height,U=S(C.subarray(C.pos),B,D);let z,P,X;switch(this.type){case Ci:X=U.length/4;const k=new Float32Array(X*4);for(let O=0;O<X;O++)M(U,O*4,k,O*4);z=k,P=Ci;break;case Wi:X=U.length/4;const I=new Uint16Array(X*4);for(let O=0;O<X;O++)w(U,O*4,I,O*4);z=I,P=Wi;break;default:throw new Error("THREE.RGBELoader: Unsupported type: "+this.type)}return{width:B,height:D,data:z,header:E.string,gamma:E.gamma,exposure:E.exposure,type:P}}setDataType(e){return this.type=e,this}load(e,t,n,s){function o(u,h){switch(u.type){case Ci:case Wi:"colorSpace"in u?u.colorSpace="srgb-linear":u.encoding=3e3,u.minFilter=Un,u.magFilter=Un,u.generateMipmaps=!1,u.flipY=!0;break}t&&t(u,h)}return super.load(e,o,n,s)}}const ym=KS>=152;class jO extends RS{constructor(e){super(e),this.type=Wi}parse(e){const I=Math.pow(2.7182818,2.2);function O(F,W){for(var te=0,ge=0;ge<65536;++ge)(ge==0||F[ge>>3]&1<<(ge&7))&&(W[te++]=ge);for(var Ce=te-1;te<65536;)W[te++]=0;return Ce}function q(F){for(var W=0;W<16384;W++)F[W]={},F[W].len=0,F[W].lit=0,F[W].p=null}const ie={l:0,c:0,lc:0};function j(F,W,te,ge,Ce){for(;te<F;)W=W<<8|Et(ge,Ce),te+=8;te-=F,ie.l=W>>te&(1<<F)-1,ie.c=W,ie.lc=te}const re=new Array(59);function fe(F){for(var W=0;W<=58;++W)re[W]=0;for(var W=0;W<65537;++W)re[F[W]]+=1;for(var te=0,W=58;W>0;--W){var ge=te+re[W]>>1;re[W]=te,te=ge}for(var W=0;W<65537;++W){var Ce=F[W];Ce>0&&(F[W]=Ce|re[Ce]++<<6)}}function Y(F,W,te,ge,Ce,Re,je){for(var Ye=te,lt=0,rt=0;Ce<=Re;Ce++){if(Ye.value-te.value>ge)return!1;j(6,lt,rt,F,Ye);var ht=ie.l;if(lt=ie.c,rt=ie.lc,je[Ce]=ht,ht==63){if(Ye.value-te.value>ge)throw"Something wrong with hufUnpackEncTable";j(8,lt,rt,F,Ye);var st=ie.l+6;if(lt=ie.c,rt=ie.lc,Ce+st>Re+1)throw"Something wrong with hufUnpackEncTable";for(;st--;)je[Ce++]=0;Ce--}else if(ht>=59){var st=ht-59+2;if(Ce+st>Re+1)throw"Something wrong with hufUnpackEncTable";for(;st--;)je[Ce++]=0;Ce--}}fe(je)}function $(F){return F&63}function pe(F){return F>>6}function Be(F,W,te,ge){for(;W<=te;W++){var Ce=pe(F[W]),Re=$(F[W]);if(Ce>>Re)throw"Invalid table entry";if(Re>14){var je=ge[Ce>>Re-14];if(je.len)throw"Invalid table entry";if(je.lit++,je.p){var Ye=je.p;je.p=new Array(je.lit);for(var lt=0;lt<je.lit-1;++lt)je.p[lt]=Ye[lt]}else je.p=new Array(1);je.p[je.lit-1]=W}else if(Re)for(var rt=0,lt=1<<14-Re;lt>0;lt--){var je=ge[(Ce<<14-Re)+rt];if(je.len||je.p)throw"Invalid table entry";je.len=Re,je.lit=W,rt++}}return!0}const Ae={c:0,lc:0};function De(F,W,te,ge){F=F<<8|Et(te,ge),W+=8,Ae.c=F,Ae.lc=W}const He={c:0,lc:0};function Ve(F,W,te,ge,Ce,Re,je,Ye,lt,rt){if(F==W){ge<8&&(De(te,ge,Ce,je),te=Ae.c,ge=Ae.lc),ge-=8;var ht=te>>ge,ht=new Uint8Array([ht])[0];if(lt.value+ht>rt)return!1;for(var st=Ye[lt.value-1];ht-- >0;)Ye[lt.value++]=st}else if(lt.value<rt)Ye[lt.value++]=F;else return!1;He.c=te,He.lc=ge}function bt(F){return F&65535}function qt(F){var W=bt(F);return W>32767?W-65536:W}const me={a:0,b:0};function Fe(F,W){var te=qt(F),ge=qt(W),Ce=ge,Re=te+(Ce&1)+(Ce>>1),je=Re,Ye=Re-Ce;me.a=je,me.b=Ye}function mt(F,W){var te=bt(F),ge=bt(W),Ce=te-(ge>>1)&65535,Re=ge+Ce-32768&65535;me.a=Re,me.b=Ce}function It(F,W,te,ge,Ce,Re,je){for(var Ye=je<16384,lt=te>Ce?Ce:te,rt=1,ht;rt<=lt;)rt<<=1;for(rt>>=1,ht=rt,rt>>=1;rt>=1;){for(var st=0,G=st+Re*(Ce-ht),Q=Re*rt,oe=Re*ht,ue=ge*rt,se=ge*ht,Ne,$e,ze,gt;st<=G;st+=oe){for(var at=st,Ut=st+ge*(te-ht);at<=Ut;at+=se){var ut=at+ue,Dt=at+Q,on=Dt+ue;Ye?(Fe(F[at+W],F[Dt+W]),Ne=me.a,ze=me.b,Fe(F[ut+W],F[on+W]),$e=me.a,gt=me.b,Fe(Ne,$e),F[at+W]=me.a,F[ut+W]=me.b,Fe(ze,gt),F[Dt+W]=me.a,F[on+W]=me.b):(mt(F[at+W],F[Dt+W]),Ne=me.a,ze=me.b,mt(F[ut+W],F[on+W]),$e=me.a,gt=me.b,mt(Ne,$e),F[at+W]=me.a,F[ut+W]=me.b,mt(ze,gt),F[Dt+W]=me.a,F[on+W]=me.b)}if(te&rt){var Dt=at+Q;Ye?Fe(F[at+W],F[Dt+W]):mt(F[at+W],F[Dt+W]),Ne=me.a,F[Dt+W]=me.b,F[at+W]=Ne}}if(Ce&rt)for(var at=st,Ut=st+ge*(te-ht);at<=Ut;at+=se){var ut=at+ue;Ye?Fe(F[at+W],F[ut+W]):mt(F[at+W],F[ut+W]),Ne=me.a,F[ut+W]=me.b,F[at+W]=Ne}ht=rt,rt>>=1}return st}function wt(F,W,te,ge,Ce,Re,je,Ye,lt,rt){for(var ht=0,st=0,G=Ye,Q=Math.trunc(Ce.value+(Re+7)/8);Ce.value<Q;)for(De(ht,st,te,Ce),ht=Ae.c,st=Ae.lc;st>=14;){var oe=ht>>st-14&16383,ue=W[oe];if(ue.len)st-=ue.len,Ve(ue.lit,je,ht,st,te,ge,Ce,lt,rt,G),ht=He.c,st=He.lc;else{if(!ue.p)throw"hufDecode issues";var se;for(se=0;se<ue.lit;se++){for(var Ne=$(F[ue.p[se]]);st<Ne&&Ce.value<Q;)De(ht,st,te,Ce),ht=Ae.c,st=Ae.lc;if(st>=Ne&&pe(F[ue.p[se]])==(ht>>st-Ne&(1<<Ne)-1)){st-=Ne,Ve(ue.p[se],je,ht,st,te,ge,Ce,lt,rt,G),ht=He.c,st=He.lc;break}}if(se==ue.lit)throw"hufDecode issues"}}var $e=8-Re&7;for(ht>>=$e,st-=$e;st>0;){var ue=W[ht<<14-st&16383];if(ue.len)st-=ue.len,Ve(ue.lit,je,ht,st,te,ge,Ce,lt,rt,G),ht=He.c,st=He.lc;else throw"hufDecode issues"}return!0}function an(F,W,te,ge,Ce,Re){var je={value:0},Ye=te.value,lt=Je(W,te),rt=Je(W,te);te.value+=4;var ht=Je(W,te);if(te.value+=4,lt<0||lt>=65537||rt<0||rt>=65537)throw"Something wrong with HUF_ENCSIZE";var st=new Array(65537),G=new Array(16384);q(G);var Q=ge-(te.value-Ye);if(Y(F,W,te,Q,lt,rt,st),ht>8*(ge-(te.value-Ye)))throw"Something wrong with hufUncompress";Be(st,lt,rt,G),wt(st,G,F,W,te,ht,rt,Re,Ce,je)}function yn(F,W,te){for(var ge=0;ge<te;++ge)W[ge]=F[W[ge]]}function Xt(F){for(var W=1;W<F.length;W++){var te=F[W-1]+F[W]-128;F[W]=te}}function Le(F,W){for(var te=0,ge=Math.floor((F.length+1)/2),Ce=0,Re=F.length-1;!(Ce>Re||(W[Ce++]=F[te++],Ce>Re));)W[Ce++]=F[ge++]}function Ke(F){for(var W=F.byteLength,te=new Array,ge=0,Ce=new DataView(F);W>0;){var Re=Ce.getInt8(ge++);if(Re<0){var je=-Re;W-=je+1;for(var Ye=0;Ye<je;Ye++)te.push(Ce.getUint8(ge++))}else{var je=Re;W-=2;for(var lt=Ce.getUint8(ge++),Ye=0;Ye<je+1;Ye++)te.push(lt)}}return te}function Oe(F,W,te,ge,Ce,Re){var ut=new DataView(Re.buffer),je=te[F.idx[0]].width,Ye=te[F.idx[0]].height,lt=3,rt=Math.floor(je/8),ht=Math.ceil(je/8),st=Math.ceil(Ye/8),G=je-(ht-1)*8,Q=Ye-(st-1)*8,oe={value:0},ue=new Array(lt),se=new Array(lt),Ne=new Array(lt),$e=new Array(lt),ze=new Array(lt);for(let Rt=0;Rt<lt;++Rt)ze[Rt]=W[F.idx[Rt]],ue[Rt]=Rt<1?0:ue[Rt-1]+ht*st,se[Rt]=new Float32Array(64),Ne[Rt]=new Uint16Array(64),$e[Rt]=new Uint16Array(ht*64);for(let Rt=0;Rt<st;++Rt){var gt=8;Rt==st-1&&(gt=Q);var at=8;for(let zt=0;zt<ht;++zt){zt==ht-1&&(at=G);for(let xt=0;xt<lt;++xt)Ne[xt].fill(0),Ne[xt][0]=Ce[ue[xt]++],dt(oe,ge,Ne[xt]),Z(Ne[xt],se[xt]),Ot(se[xt]);yt(se);for(let xt=0;xt<lt;++xt)Pt(se[xt],$e[xt],zt*64)}let nt=0;for(let zt=0;zt<lt;++zt){const xt=te[F.idx[zt]].type;for(let Pn=8*Rt;Pn<8*Rt+gt;++Pn){nt=ze[zt][Pn];for(let Yi=0;Yi<rt;++Yi){const _n=Yi*64+(Pn&7)*8;ut.setUint16(nt+0*xt,$e[zt][_n+0],!0),ut.setUint16(nt+2*xt,$e[zt][_n+1],!0),ut.setUint16(nt+4*xt,$e[zt][_n+2],!0),ut.setUint16(nt+6*xt,$e[zt][_n+3],!0),ut.setUint16(nt+8*xt,$e[zt][_n+4],!0),ut.setUint16(nt+10*xt,$e[zt][_n+5],!0),ut.setUint16(nt+12*xt,$e[zt][_n+6],!0),ut.setUint16(nt+14*xt,$e[zt][_n+7],!0),nt+=16*xt}}if(rt!=ht)for(let Pn=8*Rt;Pn<8*Rt+gt;++Pn){const Yi=ze[zt][Pn]+8*rt*2*xt,_n=rt*64+(Pn&7)*8;for(let ci=0;ci<at;++ci)ut.setUint16(Yi+ci*2*xt,$e[zt][_n+ci],!0)}}}for(var Ut=new Uint16Array(je),ut=new DataView(Re.buffer),Dt=0;Dt<lt;++Dt){te[F.idx[Dt]].decoded=!0;var on=te[F.idx[Dt]].type;if(te[Dt].type==2)for(var Hn=0;Hn<Ye;++Hn){const Rt=ze[Dt][Hn];for(var fn=0;fn<je;++fn)Ut[fn]=ut.getUint16(Rt+fn*2*on,!0);for(var fn=0;fn<je;++fn)ut.setFloat32(Rt+fn*2*on,Se(Ut[fn]),!0)}}}function dt(F,W,te){for(var ge,Ce=1;Ce<64;)ge=W[F.value],ge==65280?Ce=64:ge>>8==255?Ce+=ge&255:(te[Ce]=ge,Ce++),F.value++}function Z(F,W){W[0]=Se(F[0]),W[1]=Se(F[1]),W[2]=Se(F[5]),W[3]=Se(F[6]),W[4]=Se(F[14]),W[5]=Se(F[15]),W[6]=Se(F[27]),W[7]=Se(F[28]),W[8]=Se(F[2]),W[9]=Se(F[4]),W[10]=Se(F[7]),W[11]=Se(F[13]),W[12]=Se(F[16]),W[13]=Se(F[26]),W[14]=Se(F[29]),W[15]=Se(F[42]),W[16]=Se(F[3]),W[17]=Se(F[8]),W[18]=Se(F[12]),W[19]=Se(F[17]),W[20]=Se(F[25]),W[21]=Se(F[30]),W[22]=Se(F[41]),W[23]=Se(F[43]),W[24]=Se(F[9]),W[25]=Se(F[11]),W[26]=Se(F[18]),W[27]=Se(F[24]),W[28]=Se(F[31]),W[29]=Se(F[40]),W[30]=Se(F[44]),W[31]=Se(F[53]),W[32]=Se(F[10]),W[33]=Se(F[19]),W[34]=Se(F[23]),W[35]=Se(F[32]),W[36]=Se(F[39]),W[37]=Se(F[45]),W[38]=Se(F[52]),W[39]=Se(F[54]),W[40]=Se(F[20]),W[41]=Se(F[22]),W[42]=Se(F[33]),W[43]=Se(F[38]),W[44]=Se(F[46]),W[45]=Se(F[51]),W[46]=Se(F[55]),W[47]=Se(F[60]),W[48]=Se(F[21]),W[49]=Se(F[34]),W[50]=Se(F[37]),W[51]=Se(F[47]),W[52]=Se(F[50]),W[53]=Se(F[56]),W[54]=Se(F[59]),W[55]=Se(F[61]),W[56]=Se(F[35]),W[57]=Se(F[36]),W[58]=Se(F[48]),W[59]=Se(F[49]),W[60]=Se(F[57]),W[61]=Se(F[58]),W[62]=Se(F[62]),W[63]=Se(F[63])}function Ot(F){const W=.5*Math.cos(.7853975),te=.5*Math.cos(3.14159/16),ge=.5*Math.cos(3.14159/8),Ce=.5*Math.cos(3*3.14159/16),Re=.5*Math.cos(5*3.14159/16),je=.5*Math.cos(3*3.14159/8),Ye=.5*Math.cos(7*3.14159/16);for(var lt=new Array(4),rt=new Array(4),ht=new Array(4),st=new Array(4),G=0;G<8;++G){var Q=G*8;lt[0]=ge*F[Q+2],lt[1]=je*F[Q+2],lt[2]=ge*F[Q+6],lt[3]=je*F[Q+6],rt[0]=te*F[Q+1]+Ce*F[Q+3]+Re*F[Q+5]+Ye*F[Q+7],rt[1]=Ce*F[Q+1]-Ye*F[Q+3]-te*F[Q+5]-Re*F[Q+7],rt[2]=Re*F[Q+1]-te*F[Q+3]+Ye*F[Q+5]+Ce*F[Q+7],rt[3]=Ye*F[Q+1]-Re*F[Q+3]+Ce*F[Q+5]-te*F[Q+7],ht[0]=W*(F[Q+0]+F[Q+4]),ht[3]=W*(F[Q+0]-F[Q+4]),ht[1]=lt[0]+lt[3],ht[2]=lt[1]-lt[2],st[0]=ht[0]+ht[1],st[1]=ht[3]+ht[2],st[2]=ht[3]-ht[2],st[3]=ht[0]-ht[1],F[Q+0]=st[0]+rt[0],F[Q+1]=st[1]+rt[1],F[Q+2]=st[2]+rt[2],F[Q+3]=st[3]+rt[3],F[Q+4]=st[3]-rt[3],F[Q+5]=st[2]-rt[2],F[Q+6]=st[1]-rt[1],F[Q+7]=st[0]-rt[0]}for(var oe=0;oe<8;++oe)lt[0]=ge*F[16+oe],lt[1]=je*F[16+oe],lt[2]=ge*F[48+oe],lt[3]=je*F[48+oe],rt[0]=te*F[8+oe]+Ce*F[24+oe]+Re*F[40+oe]+Ye*F[56+oe],rt[1]=Ce*F[8+oe]-Ye*F[24+oe]-te*F[40+oe]-Re*F[56+oe],rt[2]=Re*F[8+oe]-te*F[24+oe]+Ye*F[40+oe]+Ce*F[56+oe],rt[3]=Ye*F[8+oe]-Re*F[24+oe]+Ce*F[40+oe]-te*F[56+oe],ht[0]=W*(F[oe]+F[32+oe]),ht[3]=W*(F[oe]-F[32+oe]),ht[1]=lt[0]+lt[3],ht[2]=lt[1]-lt[2],st[0]=ht[0]+ht[1],st[1]=ht[3]+ht[2],st[2]=ht[3]-ht[2],st[3]=ht[0]-ht[1],F[0+oe]=st[0]+rt[0],F[8+oe]=st[1]+rt[1],F[16+oe]=st[2]+rt[2],F[24+oe]=st[3]+rt[3],F[32+oe]=st[3]-rt[3],F[40+oe]=st[2]-rt[2],F[48+oe]=st[1]-rt[1],F[56+oe]=st[0]-rt[0]}function yt(F){for(var W=0;W<64;++W){var te=F[0][W],ge=F[1][W],Ce=F[2][W];F[0][W]=te+1.5747*Ce,F[1][W]=te-.1873*ge-.4682*Ce,F[2][W]=te+1.8556*ge}}function Pt(F,W,te){for(var ge=0;ge<64;++ge)W[te+ge]=ff.toHalfFloat(it(F[ge]))}function it(F){return F<=1?Math.sign(F)*Math.pow(Math.abs(F),2.2):Math.sign(F)*Math.pow(I,Math.abs(F)-1)}function J(F){return new DataView(F.array.buffer,F.offset.value,F.size)}function N(F){var W=F.viewer.buffer.slice(F.offset.value,F.offset.value+F.size),te=new Uint8Array(Ke(W)),ge=new Uint8Array(te.length);return Xt(te),Le(te,ge),new DataView(ge.buffer)}function le(F){var W=F.array.slice(F.offset.value,F.offset.value+F.size),te=Pv(W),ge=new Uint8Array(te.length);return Xt(te),Le(te,ge),new DataView(ge.buffer)}function Ee(F){for(var W=F.viewer,te={value:F.offset.value},ge=new Uint16Array(F.width*F.scanlineBlockSize*(F.channels*F.type)),Ce=new Uint8Array(8192),Re=0,je=new Array(F.channels),Ye=0;Ye<F.channels;Ye++)je[Ye]={},je[Ye].start=Re,je[Ye].end=je[Ye].start,je[Ye].nx=F.width,je[Ye].ny=F.lines,je[Ye].size=F.type,Re+=je[Ye].nx*je[Ye].ny*je[Ye].size;var lt=Qe(W,te),rt=Qe(W,te);if(rt>=8192)throw"Something is wrong with PIZ_COMPRESSION BITMAP_SIZE";if(lt<=rt)for(var Ye=0;Ye<rt-lt+1;Ye++)Ce[Ye+lt]=_t(W,te);var ht=new Uint16Array(65536),st=O(Ce,ht),G=Je(W,te);an(F.array,W,te,G,ge,Re);for(var Ye=0;Ye<F.channels;++Ye)for(var Q=je[Ye],oe=0;oe<je[Ye].size;++oe)It(ge,Q.start+oe,Q.nx,Q.size,Q.ny,Q.nx*Q.size,st);yn(ht,ge,Re);for(var ue=0,se=new Uint8Array(ge.buffer.byteLength),Ne=0;Ne<F.lines;Ne++)for(var $e=0;$e<F.channels;$e++){var Q=je[$e],ze=Q.nx*Q.size,gt=new Uint8Array(ge.buffer,Q.end*2,ze*2);se.set(gt,ue),ue+=ze*2,Q.end+=ze}return new DataView(se.buffer)}function Pe(F){var W=F.array.slice(F.offset.value,F.offset.value+F.size),te=Pv(W);const ge=F.lines*F.channels*F.width,Ce=F.type==1?new Uint16Array(ge):new Uint32Array(ge);let Re=0,je=0;const Ye=new Array(4);for(let lt=0;lt<F.lines;lt++)for(let rt=0;rt<F.channels;rt++){let ht=0;switch(F.type){case 1:Ye[0]=Re,Ye[1]=Ye[0]+F.width,Re=Ye[1]+F.width;for(let st=0;st<F.width;++st){const G=te[Ye[0]++]<<8|te[Ye[1]++];ht+=G,Ce[je]=ht,je++}break;case 2:Ye[0]=Re,Ye[1]=Ye[0]+F.width,Ye[2]=Ye[1]+F.width,Re=Ye[2]+F.width;for(let st=0;st<F.width;++st){const G=te[Ye[0]++]<<24|te[Ye[1]++]<<16|te[Ye[2]++]<<8;ht+=G,Ce[je]=ht,je++}break}}return new DataView(Ce.buffer)}function Me(F){var W=F.viewer,te={value:F.offset.value},ge=new Uint8Array(F.width*F.lines*(F.channels*F.type*2)),Ce={version:tt(W,te),unknownUncompressedSize:tt(W,te),unknownCompressedSize:tt(W,te),acCompressedSize:tt(W,te),dcCompressedSize:tt(W,te),rleCompressedSize:tt(W,te),rleUncompressedSize:tt(W,te),rleRawSize:tt(W,te),totalAcUncompressedCount:tt(W,te),totalDcUncompressedCount:tt(W,te),acCompression:tt(W,te)};if(Ce.version<2)throw"EXRLoader.parse: "+ar.compression+" version "+Ce.version+" is unsupported";for(var Re=new Array,je=Qe(W,te)-2;je>0;){var Ye=St(W.buffer,te),lt=_t(W,te),rt=lt>>2&3,ht=(lt>>4)-1,st=new Int8Array([ht])[0],G=_t(W,te);Re.push({name:Ye,index:st,type:G,compression:rt}),je-=Ye.length+3}for(var Q=ar.channels,oe=new Array(F.channels),ue=0;ue<F.channels;++ue){var se=oe[ue]={},Ne=Q[ue];se.name=Ne.name,se.compression=0,se.decoded=!1,se.type=Ne.pixelType,se.pLinear=Ne.pLinear,se.width=F.width,se.height=F.lines}for(var $e={idx:new Array(3)},ze=0;ze<F.channels;++ze)for(var se=oe[ze],ue=0;ue<Re.length;++ue){var gt=Re[ue];se.name==gt.name&&(se.compression=gt.compression,gt.index>=0&&($e.idx[gt.index]=ze),se.offset=ze)}if(Ce.acCompressedSize>0)switch(Ce.acCompression){case 0:var ut=new Uint16Array(Ce.totalAcUncompressedCount);an(F.array,W,te,Ce.acCompressedSize,ut,Ce.totalAcUncompressedCount);break;case 1:var at=F.array.slice(te.value,te.value+Ce.totalAcUncompressedCount),Ut=Pv(at),ut=new Uint16Array(Ut.buffer);te.value+=Ce.totalAcUncompressedCount;break}if(Ce.dcCompressedSize>0){var Dt={array:F.array,offset:te,size:Ce.dcCompressedSize},on=new Uint16Array(le(Dt).buffer);te.value+=Ce.dcCompressedSize}if(Ce.rleRawSize>0){var at=F.array.slice(te.value,te.value+Ce.rleCompressedSize),Ut=Pv(at),Hn=Ke(Ut.buffer);te.value+=Ce.rleCompressedSize}for(var fn=0,Rt=new Array(oe.length),ue=0;ue<Rt.length;++ue)Rt[ue]=new Array;for(var nt=0;nt<F.lines;++nt)for(var zt=0;zt<oe.length;++zt)Rt[zt].push(fn),fn+=oe[zt].width*F.type*2;Oe($e,Rt,oe,ut,on,ge);for(var ue=0;ue<oe.length;++ue){var se=oe[ue];if(!se.decoded)switch(se.compression){case 2:for(var xt=0,Pn=0,nt=0;nt<F.lines;++nt){for(var Yi=Rt[ue][xt],_n=0;_n<se.width;++_n){for(var ci=0;ci<2*se.type;++ci)ge[Yi++]=Hn[Pn+ci*se.width*se.height];Pn++}xt++}break;case 1:default:throw"EXRLoader.parse: unsupported channel compression"}}return new DataView(ge.buffer)}function St(F,W){for(var te=new Uint8Array(F),ge=0;te[W.value+ge]!=0;)ge+=1;var Ce=new TextDecoder().decode(te.slice(W.value,W.value+ge));return W.value=W.value+ge+1,Ce}function ot(F,W,te){var ge=new TextDecoder().decode(new Uint8Array(F).slice(W.value,W.value+te));return W.value=W.value+te,ge}function Lt(F,W){var te=Xe(F,W),ge=Je(F,W);return[te,ge]}function Wt(F,W){var te=Je(F,W),ge=Je(F,W);return[te,ge]}function Xe(F,W){var te=F.getInt32(W.value,!0);return W.value=W.value+4,te}function Je(F,W){var te=F.getUint32(W.value,!0);return W.value=W.value+4,te}function Et(F,W){var te=F[W.value];return W.value=W.value+1,te}function _t(F,W){var te=F.getUint8(W.value);return W.value=W.value+1,te}const tt=function(F,W){let te;return"getBigInt64"in DataView.prototype?te=Number(F.getBigInt64(W.value,!0)):te=F.getUint32(W.value+4,!0)+Number(F.getUint32(W.value,!0)<<32),W.value+=8,te};function Ht(F,W){var te=F.getFloat32(W.value,!0);return W.value+=4,te}function ce(F,W){return ff.toHalfFloat(Ht(F,W))}function Se(F){var W=(F&31744)>>10,te=F&1023;return(F>>15?-1:1)*(W?W===31?te?NaN:1/0:Math.pow(2,W-15)*(1+te/1024):6103515625e-14*(te/1024))}function Qe(F,W){var te=F.getUint16(W.value,!0);return W.value+=2,te}function At(F,W){return Se(Qe(F,W))}function Ze(F,W,te,ge){for(var Ce=te.value,Re=[];te.value<Ce+ge-1;){var je=St(W,te),Ye=Xe(F,te),lt=_t(F,te);te.value+=3;var rt=Xe(F,te),ht=Xe(F,te);Re.push({name:je,pixelType:Ye,pLinear:lt,xSampling:rt,ySampling:ht})}return te.value+=1,Re}function Ue(F,W){var te=Ht(F,W),ge=Ht(F,W),Ce=Ht(F,W),Re=Ht(F,W),je=Ht(F,W),Ye=Ht(F,W),lt=Ht(F,W),rt=Ht(F,W);return{redX:te,redY:ge,greenX:Ce,greenY:Re,blueX:je,blueY:Ye,whiteX:lt,whiteY:rt}}function ft(F,W){var te=["NO_COMPRESSION","RLE_COMPRESSION","ZIPS_COMPRESSION","ZIP_COMPRESSION","PIZ_COMPRESSION","PXR24_COMPRESSION","B44_COMPRESSION","B44A_COMPRESSION","DWAA_COMPRESSION","DWAB_COMPRESSION"],ge=_t(F,W);return te[ge]}function $t(F,W){var te=Je(F,W),ge=Je(F,W),Ce=Je(F,W),Re=Je(F,W);return{xMin:te,yMin:ge,xMax:Ce,yMax:Re}}function Mn(F,W){var te=["INCREASING_Y"],ge=_t(F,W);return te[ge]}function wn(F,W){var te=Ht(F,W),ge=Ht(F,W);return[te,ge]}function Ji(F,W){var te=Ht(F,W),ge=Ht(F,W),Ce=Ht(F,W);return[te,ge,Ce]}function As(F,W,te,ge,Ce){if(ge==="string"||ge==="stringvector"||ge==="iccProfile")return ot(W,te,Ce);if(ge==="chlist")return Ze(F,W,te,Ce);if(ge==="chromaticities")return Ue(F,te);if(ge==="compression")return ft(F,te);if(ge==="box2i")return $t(F,te);if(ge==="lineOrder")return Mn(F,te);if(ge==="float")return Ht(F,te);if(ge==="v2f")return wn(F,te);if(ge==="v3f")return Ji(F,te);if(ge==="int")return Xe(F,te);if(ge==="rational")return Lt(F,te);if(ge==="timecode")return Wt(F,te);if(ge==="preview")return te.value+=Ce,"skipped";te.value+=Ce}function ra(F,W,te){const ge={};if(F.getUint32(0,!0)!=20000630)throw"THREE.EXRLoader: provided file doesn't appear to be in OpenEXR format.";ge.version=F.getUint8(4);const Ce=F.getUint8(5);ge.spec={singleTile:!!(Ce&2),longName:!!(Ce&4),deepFormat:!!(Ce&8),multiPart:!!(Ce&16)},te.value=8;for(var Re=!0;Re;){var je=St(W,te);if(je==0)Re=!1;else{var Ye=St(W,te),lt=Je(F,te),rt=As(F,W,te,Ye,lt);rt===void 0?console.warn(`EXRLoader.parse: skipped unknown header attribute type '${Ye}'.`):ge[je]=rt}}if((Ce&-5)!=0)throw console.error("EXRHeader:",ge),"THREE.EXRLoader: provided file is currently unsupported.";return ge}function aa(F,W,te,ge,Ce){const Re={size:0,viewer:W,array:te,offset:ge,width:F.dataWindow.xMax-F.dataWindow.xMin+1,height:F.dataWindow.yMax-F.dataWindow.yMin+1,channels:F.channels.length,bytesPerLine:null,lines:null,inputSize:null,type:F.channels[0].pixelType,uncompress:null,getter:null,format:null,[ym?"colorSpace":"encoding"]:null};switch(F.compression){case"NO_COMPRESSION":Re.lines=1,Re.uncompress=J;break;case"RLE_COMPRESSION":Re.lines=1,Re.uncompress=N;break;case"ZIPS_COMPRESSION":Re.lines=1,Re.uncompress=le;break;case"ZIP_COMPRESSION":Re.lines=16,Re.uncompress=le;break;case"PIZ_COMPRESSION":Re.lines=32,Re.uncompress=Ee;break;case"PXR24_COMPRESSION":Re.lines=16,Re.uncompress=Pe;break;case"DWAA_COMPRESSION":Re.lines=32,Re.uncompress=Me;break;case"DWAB_COMPRESSION":Re.lines=256,Re.uncompress=Me;break;default:throw"EXRLoader.parse: "+F.compression+" is unsupported"}if(Re.scanlineBlockSize=Re.lines,Re.type==1)switch(Ce){case Ci:Re.getter=At,Re.inputSize=2;break;case Wi:Re.getter=Qe,Re.inputSize=2;break}else if(Re.type==2)switch(Ce){case Ci:Re.getter=Ht,Re.inputSize=4;break;case Wi:Re.getter=ce,Re.inputSize=4}else throw"EXRLoader.parse: unsupported pixelType "+Re.type+" for "+F.compression+".";Re.blockCount=(F.dataWindow.yMax+1)/Re.scanlineBlockSize;for(var je=0;je<Re.blockCount;je++)tt(W,ge);Re.outputChannels=Re.channels==3?4:Re.channels;const Ye=Re.width*Re.height*Re.outputChannels;switch(Ce){case Ci:Re.byteArray=new Float32Array(Ye),Re.channels<Re.outputChannels&&Re.byteArray.fill(1,0,Ye);break;case Wi:Re.byteArray=new Uint16Array(Ye),Re.channels<Re.outputChannels&&Re.byteArray.fill(15360,0,Ye);break;default:console.error("THREE.EXRLoader: unsupported type: ",Ce);break}return Re.bytesPerLine=Re.width*Re.inputSize*Re.channels,Re.outputChannels==4?Re.format=ts:Re.format=Km,ym?Re.colorSpace="srgb-linear":Re.encoding=3e3,Re}const Mr=new DataView(e),oa=new Uint8Array(e),Bs={value:0},ar=ra(Mr,e,Bs),Kt=aa(ar,Mr,oa,Bs,this.type),Ss={value:0},ai={R:0,G:1,B:2,A:3,Y:0};for(let F=0;F<Kt.height/Kt.scanlineBlockSize;F++){const W=Je(Mr,Bs);Kt.size=Je(Mr,Bs),Kt.lines=W+Kt.scanlineBlockSize>Kt.height?Kt.height-W:Kt.scanlineBlockSize;const ge=Kt.size<Kt.lines*Kt.bytesPerLine?Kt.uncompress(Kt):J(Kt);Bs.value+=Kt.size;for(let Ce=0;Ce<Kt.scanlineBlockSize;Ce++){const Re=Ce+F*Kt.scanlineBlockSize;if(Re>=Kt.height)break;for(let je=0;je<Kt.channels;je++){const Ye=ai[ar.channels[je].name];for(let lt=0;lt<Kt.width;lt++){Ss.value=(Ce*(Kt.channels*Kt.width)+je*Kt.width+lt)*Kt.inputSize;const rt=(Kt.height-1-Re)*(Kt.width*Kt.outputChannels)+lt*Kt.outputChannels+Ye;Kt.byteArray[rt]=Kt.getter(ge,Ss)}}}}return{header:ar,width:Kt.width,height:Kt.height,data:Kt.byteArray,format:Kt.format,[ym?"colorSpace":"encoding"]:Kt[ym?"colorSpace":"encoding"],type:this.type}}setDataType(e){return this.type=e,this}load(e,t,n,s){function o(u,h){ym?u.colorSpace=h.colorSpace:u.encoding=h.encoding,u.minFilter=Un,u.magFilter=Un,u.generateMipmaps=!1,u.flipY=!1,t&&t(u,h)}return super.load(e,o,n,s)}}const _A=new WeakMap;class $O extends Xs{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,n,s){const o=new Vs(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,u=>{const h={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(u,h).then(t).catch(s)},n,s)}decodeDracoFile(e,t,n,s){const o={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:s||this.defaultAttributeTypes,useUniqueIDs:!!n};this.decodeGeometry(e,o).then(t)}decodeGeometry(e,t){for(const d in t.attributeTypes){const g=t.attributeTypes[d];g.BYTES_PER_ELEMENT!==void 0&&(t.attributeTypes[d]=g.name)}const n=JSON.stringify(t);if(_A.has(e)){const d=_A.get(e);if(d.key===n)return d.promise;if(e.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let s;const o=this.workerNextTaskID++,u=e.byteLength,h=this._getWorker(o,u).then(d=>(s=d,new Promise((g,y)=>{s._callbacks[o]={resolve:g,reject:y},s.postMessage({type:"decode",id:o,taskConfig:t,buffer:e},[e])}))).then(d=>this._createGeometry(d.geometry));return h.catch(()=>!0).then(()=>{s&&o&&this._releaseTask(s,o)}),_A.set(e,{key:n,promise:h}),h}_createGeometry(e){const t=new rn;e.index&&t.setIndex(new Wn(e.index.array,1));for(let n=0;n<e.attributes.length;n++){const s=e.attributes[n],o=s.name,u=s.array,h=s.itemSize;t.setAttribute(o,new Wn(u,h))}return t}_loadLibrary(e,t){const n=new Vs(this.manager);return n.setPath(this.decoderPath),n.setResponseType(t),n.setWithCredentials(this.withCredentials),new Promise((s,o)=>{n.load(e,s,void 0,o)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e=typeof WebAssembly!="object"||this.decoderConfig.type==="js",t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(n=>{const s=n[0];e||(this.decoderConfig.wasmBinary=n[1]);const o=eP.toString(),u=["/* draco decoder */",s,"","/* worker */",o.substring(o.indexOf("{")+1,o.lastIndexOf("}"))].join(` 4172`);this.workerSourceURL=URL.createObjectURL(new Blob([u]))}),this.decoderPending}_getWorker(e,t){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const s=new Worker(this.workerSourceURL);s._callbacks={},s._taskCosts={},s._taskLoad=0,s.postMessage({type:"init",decoderConfig:this.decoderConfig}),s.onmessage=function(o){const u=o.data;switch(u.type){case"decode":s._callbacks[u.id].resolve(u);break;case"error":s._callbacks[u.id].reject(u);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+u.type+'"')}},this.workerPool.push(s)}else this.workerPool.sort(function(s,o){return s._taskLoad>o._taskLoad?-1:1});const n=this.workerPool[this.workerPool.length-1];return n._taskCosts[e]=t,n._taskLoad+=t,n})}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))}dispose(){for(let e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,this}}function eP(){let a,e;onmessage=function(u){const h=u.data;switch(h.type){case"init":a=h.decoderConfig,e=new Promise(function(y){a.onModuleLoaded=function(v){y({draco:v})},DracoDecoderModule(a)});break;case"decode":const d=h.buffer,g=h.taskConfig;e.then(y=>{const v=y.draco,x=new v.Decoder,S=new v.DecoderBuffer;S.Init(new Int8Array(d),d.byteLength);try{const M=t(v,x,S,g),w=M.attributes.map(C=>C.array.buffer);M.index&&w.push(M.index.array.buffer),self.postMessage({type:"decode",id:h.id,geometry:M},w)}catch(M){console.error(M),self.postMessage({type:"error",id:h.id,error:M.message})}finally{v.destroy(S),v.destroy(x)}});break}};function t(u,h,d,g){const y=g.attributeIDs,v=g.attributeTypes;let x,S;const M=h.GetEncodedGeometryType(d);if(M===u.TRIANGULAR_MESH)x=new u.Mesh,S=h.DecodeBufferToMesh(d,x);else if(M===u.POINT_CLOUD)x=new u.PointCloud,S=h.DecodeBufferToPointCloud(d,x);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!S.ok()||x.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+S.error_msg());const w={index:null,attributes:[]};for(const C in y){const E=self[v[C]];let B,D;if(g.useUniqueIDs)D=y[C],B=h.GetAttributeByUniqueId(x,D);else{if(D=h.GetAttributeId(x,u[y[C]]),D===-1)continue;B=h.GetAttribute(x,D)}w.attributes.push(s(u,h,x,C,E,B))}return M===u.TRIANGULAR_MESH&&(w.index=n(u,h,x)),u.destroy(x),w}function n(u,h,d){const y=d.num_faces()*3,v=y*4,x=u._malloc(v);h.GetTrianglesUInt32Array(d,v,x);const S=new Uint32Array(u.HEAPF32.buffer,x,y).slice();return u._free(x),{array:S,itemSize:1}}function s(u,h,d,g,y,v){const x=v.num_components(),M=d.num_points()*x,w=M*y.BYTES_PER_ELEMENT,C=o(u,y),E=u._malloc(w);h.GetAttributeDataArrayForAllPoints(d,v,C,w,E);const B=new y(u.HEAPF32.buffer,E,M).slice();return u._free(E),{name:g,array:B,itemSize:x}}function o(u,h){switch(h){case Float32Array:return u.DT_FLOAT32;case Int8Array:return u.DT_INT8;case Int16Array:return u.DT_INT16;case Int32Array:return u.DT_INT32;case Uint8Array:return u.DT_UINT8;case Uint16Array:return u.DT_UINT16;case Uint32Array:return u.DT_UINT32}}}let zv;const xA=()=>{if(zv)return zv;const a="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9
4172LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB",e="B9h9z9tFB
4172BBFiI9gBB9gLaaaaaFa9gEaaaB9gFaFaEMcBBFBFFGGGEILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBOn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBNI9z9iqlBVc+N9IcIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMk8lLbaE97F9+FaL978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAeDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAeDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMG
4172XAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBReCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBH8ZCFD9tA8ZAPD9OD9hD9RH8ZDQBTFtGmEYIPLdKeOnHpAIAQJDBIBHyCFD9tAyAPD9OD9hD9RHyAIASJDBIBH8cCFD9tA8cAPD9OD9hD9RH8cDQBTFtGmEYIPLdKeOnH8dDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAeD9uHeDyBjGBAEAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeApA8dDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNiV8ZcpMyS8cQ8df8eb8fHdAyA8cDQNiV8ZcpMyS8cQ8df8eb8fH8ZDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/dLEK97FaF97GXGXAGCI9HQBAF9FQFCBRGEXABABDBBBHECiD+rFCiD+sFD/6FHIAECND+rFCiD+sFD/6FAID/gFAECTD+rFCiD+sFD/6FHLD/gFD/kFD/lFHKCBDtD+2FHOAICUUUU94DtHND9OD9RD/kFHI9DBB/+hDYAIAID/mFAKAKD/mFALAOALAND9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHLD/mF9DBBX9LDYHOD/kFCgFDtD9OAECUUU94DtD9OD9QAIALD/mFAOD/kFCND+rFCU/+EDtD9OD9QAKALD/mFAOD/kFCTD+rFCUU/8ODtD9OD9QDMBBABCTJRBAGCIJHGAF9JQBSGMMAF9FQBCBRGEXABCTJHVAVDBBBHECBDtHOCUU98D8cFCUU98D8cEHND9OABDBBBHKAEDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAKAEDQBFGENVcMTtmYi8ZpyHECTD+sFD/6FHID/gFAECTD+rFCTD+sFD/6FHLD/gFD/kFD/lFHE9DB/+g6DYALAEAOD+2FHOALCUUUU94DtHcD9OD9RD/kFHLALD/mFAEAED/mFAIAOAIAcD9OD9RD/kFHEAED/mFD/kFD/kFD/jFD/nFHID/mF9DBBX9LDYHOD/kFCTD+rFALAID/mFAOD/kFCggEDtD9OD9QHLAEAID/mFAOD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHEDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAKAND9OALAEDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM/hEIGaF97FaL978jUUUUBCTlREGXAF9FQBCBRIEXAEABDBBBHLABCTJHKDBBBHODQILKOSQfbPden8c8d8e8fHNCTD+sFHVCID+rFDMIBAB9DBBU8/DY9D/zI818/DYAVCEDtD9QD/6FD/nFHVALAODQBFGENVcMTtmYi8ZpyHLCTD+rFCTD+sFD/6FD/mFHOAOD/mFAVALCTD+sFD/6FD/mFHcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB",t=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),n=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if(typeof WebAssembly!="object")return{supported:!1};let s=a;WebAssembly.validate(t)&&(s=e);let o;const u=WebAssembly.instantiate(h(s),{}).then(v=>{o=v.instance,o.exports.__wasm_call_ctors()});function h(v){const x=new Uint8Array(v.length);for(let M=0;M<v.length;++M){const w=v.charCodeAt(M);x[M]=w>96?w-71:w>64?w-65:w>47?w+4:w>46?63:62}let S=0;for(let M=0;M<v.length;++M)x[S++]=x[M]<60?n[x[M]]:(x[M]-60)*64+x[++M];return x.buffer.slice(0,S)}function d(v,x,S,M,w,C){const E=o.exports.sbrk,B=S+3&-4,D=E(B*M),U=E(w.length),z=new Uint8Array(o.exports.memory.buffer);z.set(w,U);const P=v(D,S,M,U,w.length);if(P===0&&C&&C(D,B,M),x.set(z.subarray(D,D+S*M)),E(D-E(0)),P!==0)throw new Error(`Malformed buffer data: ${P}`)}const g={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},y={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return zv={ready:u,supported:!0,decodeVertexBuffer(v,x,S,M,w){d(o.exports.meshopt_decodeVertexBuffer,v,x,S,M,o.exports[g[w]])},decodeIndexBuffer(v,x,S,M){d(o.exports.meshopt_decodeIndexBuffer,v,x,S,M)},decodeIndexSequence(v,x,S,M){d(o.exports.meshopt_decodeIndexSequence,v,x,S,M)},decodeGltfBuffer(v,x,S,M,w,C){d(o.exports[y[w]],v,x,S,M,o.exports[g[C]])}},zv};
4172let Gv=null,hC="https://www.gstatic.com/draco/versioned/decoders/1.5.5/";function dC(a=!0,e=!0,t){return n=>{t&&t(n),a&&(Gv||(Gv=new $O),Gv.setDecoderPath(typeof a=="string"?a:hC),n.setDRACOLoader(Gv)),e&&n.setMeshoptDecoder(typeof xA=="function"?xA():xA)}}const QS=(a,e,t,n)=>kl(ZS,a,dC(e,t,n));QS.preload=(a,e,t,n)=>kl.preload(ZS,a,dC(e,t,n));QS.clear=a=>kl.clear(ZS,a);QS.setDecoderPath=a=>{hC=a};const SP=vt.forwardRef(function({children:e,object:t,disable:n,disableX:s,disableY:o,disableZ:u,left:h,right:d,top:g,bottom:y,front:v,back:x,onCentered:S,precise:M=!0,cacheKey:w=0,...C},E){const B=vt.useRef(null),D=vt.useRef(null),U=vt.useRef(null),[z]=vt.useState(()=>new Rs),[P]=vt.useState(()=>new K),[X]=vt.useState(()=>new vs);return vt.useLayoutEffect(()=>{D.current.matrixWorld.identity(),z.setFromObject(t??U.current,M);const k=z.max.x-z.min.x,I=z.max.y-z.min.y,O=z.max.z-z.min.z;z.getCenter(P),z.getBoundingSphere(X);const q=g?I/2:y?-I/2:0,ie=h?-k/2:d?k/2:0,j=v?O/2:x?-O/2:0;D.current.position.set(n||s?0:-P.x+ie,n||o?0:-P.y+q,n||u?0:-P.z+j),S==null||S({parent:B.current.parent,container:B.current,width:k,height:I,depth:O,boundingBox:z,boundingSphere:X,center:P,verticalAlignment:q,horizontalAlignment:ie,depthAlignment:j})},[w,S,g,h,v,n,s,o,u,t,M,d,y,x,z,P,X]),vt.useImperativeHandle(E,()=>B.current,[]),vt.createElement("group",Vy({ref:B},C),vt.createElement("group",{ref:D},vt.createElement("group",{ref:U},e)))}),pC=(a,e,t)=>{let n;switch(a){case ws:n=new Uint8ClampedArray(e*t*4);break;case Wi:n=new Uint16Array(e*t*4);break;case ia:n=new Uint32Array(e*t*4);break;case Yy:n=new Int8Array(e*t*4);break;case qy:n=new Int16Array(e*t*4);break;case qm:n=new Int32Array(e*t*4);break;case Ci:n=new Float32Array(e*t*4);break;default:throw new Error("Unsupported data type")}return n};let Hv;const tP=(a,e,t,n)=>{if(Hv!==void 0)return Hv;const s=new Sr(1,1,n);e.setRenderTarget(s);const o=new wi(new tu,new Yr({color:16777215}));e.render(o,t),e.setRenderTarget(null);const u=pC(a,s.width,s.height);return e.readRenderTargetPixels(s,0,0,s.width,s.height,u),s.dispose(),o.geometry.dispose(),o.material.dispose(),Hv=u[0]!==0,Hv};class jS{constructor(e){ki(this,"_renderer");ki(this,"_rendererIsDisposable",!1);ki(this,"_material");ki(this,"_scene");ki(this,"_camera");ki(this,"_quad");ki(this,"_renderTarget");ki(this,"_width");ki(this,"_height");ki(this,"_type");ki(this,"_colorSpace");ki(this,"_supportsReadPixels",!0);ki(this,"render",()=>{this._renderer.setRenderTarget(this._renderTarget);try{this._renderer.render(this._scene,this._camera)}catch(e){throw this._renderer.setRenderTarget(null),e}this._renderer.setRenderTarget(null)});var n,s,o,u,h,d,g,y,v,x,S,M,w,C,E,B;this._width=e.width,this._height=e.height,this._type=e.type,this._colorSpace
vendor: 4,706 bytes, line 4172
4172=e.colorSpace;const t={format:ts,depthBuffer:!1,stencilBuffer:!1,type:this._type,colorSpace:this._colorSpace,anisotropy:((n=e.renderTargetOptions)==null?void 0:n.anisotropy)!==void 0?(s=e.renderTargetOptions)==null?void 0:s.anisotropy:1,generateMipmaps:((o=e.renderTargetOptions)==null?void 0:o.generateMipmaps)!==void 0?(u=e.renderTargetOptions)==null?void 0:u.generateMipmaps:!1,magFilter:((h=e.renderTargetOptions)==null?void 0:h.magFilter)!==void 0?(d=e.renderTargetOptions)==null?void 0:d.magFilter:Un,minFilter:((g=e.renderTargetOptions)==null?void 0:g.minFilter)!==void 0?(y=e.renderTargetOptions)==null?void 0:y.minFilter:Un,samples:((v=e.renderTargetOptions)==null?void 0:v.samples)!==void 0?(x=e.renderTargetOptions)==null?void 0:x.samples:void 0,wrapS:((S=e.renderTargetOptions)==null?void 0:S.wrapS)!==void 0?(M=e.renderTargetOptions)==null?void 0:M.wrapS:Fi,wrapT:((w=e.renderTargetOptions)==null?void 0:w.wrapT)!==void 0?(C=e.renderTargetOptions)==null?void 0:C.wrapT:Fi};if(this._material=e.material,e.renderer?this._renderer=e.renderer:(this._renderer=jS.instantiateRenderer(),this._rendererIsDisposable=!0),this._scene=new jm,this._camera=new iu,this._camera.position.set(0,0,10),this._camera.left=-.5,this._camera.right=.5,this._camera.top=.5,this._camera.bottom=-.5,this._camera.updateProjectionMatrix(),!tP(this._type,this._renderer,this._camera,t)){let D;switch(this._type){case Wi:D=this._renderer.extensions.has("EXT_color_buffer_float")?Ci:void 0;break}D!==void 0?(console.warn(`This browser does not support reading pixels from ${this._type} RenderTargets, switching to ${Ci}`),this._type=D):(this._supportsReadPixels=!1,console.warn("This browser dos not support toArray or toDataTexture, calls to those methods will result in an error thrown"))}this._quad=new wi(new tu,this._material),this._quad.geometry.computeBoundingBox(),this._scene.add(this._quad),this._renderTarget=new Sr(this.width,this.height,t),this._renderTarget.texture.mapping=((E=e.renderTargetOptions)==null?void 0:E.mapping)!==void 0?(B=e.renderTargetOptions)==null?void 0:B.mapping:qc}static instantiateRenderer(){const e=new kS;return e.setSize(128,128),e}toArray(){if(!this._supportsReadPixels)throw new Error("Can't read pixels in this browser");const e=pC(this._type,this._width,this._height);return this._renderer.readRenderTargetPixels(this._renderTarget,0,0,this._width,this._height,e),e}toDataTexture(e){const t=new Pa(this.toArray(),this.width,this.height,ts,this._type,(e==null?void 0:e.mapping)||qc,(e==null?void 0:e.wrapS)||Fi,(e==null?void 0:e.wrapT)||Fi,(e==null?void 0:e.magFilter)||Un,(e==null?void 0:e.minFilter)||Un,(e==null?void 0:e.anisotropy)||1,po);return t.generateMipmaps=(e==null?void 0:e.generateMipmaps)!==void 0?e==null?void 0:e.generateMipmaps:!1,t}disposeOnDemandRenderer(){this._renderer.setRenderTarget(null),this._rendererIsDisposable&&(this._renderer.dispose(),this._renderer.forceContextLoss())}dispose(e){this.disposeOnDemandRenderer(),e&&this.renderTarget.dispose(),this.material instanceof br&&Object.values(this.material.uniforms).forEach(t=>{t.value instanceof ei&&t.value.dispose()}),Object.values(this.material).forEach(t=>{t instanceof ei&&t.dispose()}),this.material.dispose(),this._quad.geometry.dispose()}get width(){return this._width}set width(e){this._width=e,this._renderTarget.setSize(this._width,this._height)}get height(){return this._height}set height(e){this._height=e,this._renderTarget.setSize(this._width,this._height)}get renderer(){return this._renderer}get renderTarget(){return this._renderTarget}set renderTarget(e){this._renderTarget=e,this._width=e.width,this._height=e.height}get material(){return this._material}get type(){return this._type}get colorSpace(){return this._colorSpace}}class mC extends Error{}class gC extends Error{}const _m=(a,e,t)=>{const n=new RegExp(`${e}="([^"]*)"`,"i").exec(a);if(n)return n[1];const s=new RegExp(`<${e}[^>]*>([\\s\\S]*?)</${e}>`,"i").exec(a);if(s){const o=s[1].match(/<rdf:li>([^<]*)<\/rdf:li>/g);return o&&o.length===3?o.map(u=>u.replace(/<\/?rdf:li>/g,"")):s[1].trim()}if(t!==void 0)return t;throw new Error(`Can't find ${e} in gainmap metadata`)},nP=a=>{let e;typeof TextDecoder<"u"?e=new TextDecoder().decode(a):e=a.toString();let t=e.indexOf("<x:xmpmeta");for(;t!==-1;){const n=e.indexOf("x:xmpmeta>",t),s=e.slice(t,n+10);try{const o=_m(s,"hdrgm:GainMapMin","0"),u=_m(s,"hdrgm:GainMapMax"),h=_m(s,"hdrgm:Gamma","1"),d=_m(s,"hdrgm:OffsetSDR","0.015625"),g=_m(s,"hdrgm:OffsetHDR","0.015625"),y=/hdrgm:HDRCapacityMin="([^"]*)"/.exec(s),v=y?y[1]:"0",x=/hdrgm:HDRCapacityMax="([^"]*)"/.exec(s);if(!x)throw new Error("Incomplete gainmap metadata");const S=x[1];return{gainMapMin:Array.isArray(o)?o.map(M=>
vendor: 5,030 bytes, lines 4172-4177
4172parseFloat(M)):[parseFloat(o),parseFloat(o),parseFloat(o)],gainMapMax:Array.isArray(u)?u.map(M=>parseFloat(M)):[parseFloat(u),parseFloat(u),parseFloat(u)],gamma:Array.isArray(h)?h.map(M=>parseFloat(M)):[parseFloat(h),parseFloat(h),parseFloat(h)],offsetSdr:Array.isArray(d)?d.map(M=>parseFloat(M)):[parseFloat(d),parseFloat(d),parseFloat(d)],offsetHdr:Array.isArray(g)?g.map(M=>parseFloat(M)):[parseFloat(g),parseFloat(g),parseFloat(g)],hdrCapacityMin:parseFloat(v),hdrCapacityMax:parseFloat(S)}}catch{}t=e.indexOf("<x:xmpmeta",n)}};class iP{constructor(e){ki(this,"options");this.options={debug:e&&e.debug!==void 0?e.debug:!1,extractFII:e&&e.extractFII!==void 0?e.extractFII:!0,extractNonFII:e&&e.extractNonFII!==void 0?e.extractNonFII:!0}}extract(e){return new Promise((t,n)=>{const s=this.options.debug,o=new DataView(e.buffer);if(o.getUint16(0)!==65496){n(new Error("Not a valid jpeg"));return}const u=o.byteLength;let h=2,d=0,g;for(;h<u;){if(++d>250){n(new Error(`Found no marker after ${d} loops ðµ`));return}if(o.getUint8(h)!==255){n(new Error(`Not a valid marker at offset 0x${h.toString(16)}, found: 0x${o.getUint8(h).toString(16)}`));return}if(g=o.getUint8(h+1),s&&console.log(`Marker: ${g.toString(16)}`),g===226){s&&console.log("Found APP2 marker (0xffe2)");const y=h+4;if(o.getUint32(y)===1297106432){const v=y+4;let x;if(o.getUint16(v)===18761)x=!1;else if(o.getUint16(v)===19789)x=!0;else{n(new Error("No valid endianness marker found in TIFF header"));return}if(o.getUint16(v+2,!x)!==42){n(new Error("Not valid TIFF data! (no 0x002A marker)"));return}const S=o.getUint32(v+4,!x);if(S<8){n(new Error("Not valid TIFF data! (First offset less than 8)"));return}const M=v+S,w=o.getUint16(M,!x),C=M+2;let E=0;for(let z=C;z<C+12*w;z+=12)o.getUint16(z,!x)===45057&&(E=o.getUint32(z+8,!x));const D=M+2+w*12+4,U=[];for(let z=D;z<D+E*16;z+=16){const P={MPType:o.getUint32(z,!x),size:o.getUint32(z+4,!x),dataOffset:o.getUint32(z+8,!x),dependantImages:o.getUint32(z+12,!x),start:-1,end:-1,isFII:!1};P.dataOffset?(P.start=v+P.dataOffset,P.isFII=!1):(P.start=0,P.isFII=!0),P.end=P.start+P.size,U.push(P)}if(this.options.extractNonFII&&U.length){const z=new Blob([o]),P=[];for(const X of U){if(X.isFII&&!this.options.extractFII)continue;const k=z.slice(X.start,X.end+1,"image/jpeg");P.push(k)}t(P)}}}h+=2+o.getUint16(h+2)}})}}const sP=async a=>{const e=nP(a);if(!e)throw new gC("Gain map XMP metadata not found");const n=await new iP({extractFII:!0,extractNonFII:!0}).extract(a);if(n.length!==2)throw new mC("Gain map recovery image not found");return{sdr:new Uint8Array(await n[0].arrayBuffer()),gainMap:new Uint8Array(await n[1].arrayBuffer()),metadata:e}},Y1=a=>new Promise((e,t)=>{const n=document.createElement("img");n.onload=()=>{e(n)},n.onerror=s=>{t(s)},n.src=URL.createObjectURL(a)});class rP extends Xs{constructor(t,n){super(n);ki(this,"_renderer");ki(this,"_renderTargetOptions");ki(this,"_internalLoadingManager");ki(this,"_config");this._config=t,t.renderer&&(this._renderer=t.renderer),this._internalLoadingManager=new M_}setRenderer(t){return this._renderer=t,this}setRenderTargetOptions(t){return this._renderTargetOptions=t,this}prepareQuadRenderer(){this._renderer||console.warn("WARNING: A Renderer was not passed to this Loader constructor or in setRenderer, the result of this Loader will need to be converted to a Data Texture with toDataTexture() before you can use it in your renderer.");const t=this._config.createMaterial({gainMapMax:[1,1,1],gainMapMin:[0,0,0],gamma:[1,1,1],offsetHdr:[1,1,1],offsetSdr:[1,1,1],hdrCapacityMax:1,hdrCapacityMin:0,maxDisplayBoost:1,gainMap:new ei,sdr:new ei});return this._config.createQuadRenderer({width:16,height:16,type:Wi,colorSpace:po,material:t,renderer:this._renderer,renderTargetOptions:this._renderTargetOptions})}async processImages(t,n,s){const o=n?new Blob([n],{type:"image/jpeg"}):void 0,u=new Blob([t],{type:"image/jpeg"});let h,d,g=!1;if(typeof createImageBitmap>"u"){const y=await Promise.all([o?Y1(o):Promise.resolve(void 0),Y1(u)]);d=y[0],h=y[1],g=s==="flipY"}else{const y=await Promise.all([o?createImageBitmap(o,{imageOrientation:s||"flipY"}):Promise.resolve(void 0),createImageBitmap(u,{imageOrientation:s||"flipY"})]);d=y[0],h=y[1]}return{sdrImage:h,gainMapImage:d,needsFlip:g}}createTextures(t,n,s){const o=new ei(n||new ImageData(2,2),qc,Fi,Fi,Un,TA,ts,ws,1,po);o.flipY=s,o.needsUpdate=!0;const u=new ei(t,qc,Fi,Fi,Un,TA,ts,ws,1,ks);return u.flipY=s,u.needsUpdate=!0,{gainMap:o,sdr:u}}updateQuadRenderer(t,n,s,o,u){t.width=n.width,t.height=n.height,t.material.gainMap=s,t.material.sdr=o,t.material.gainMapMin=u.gainMapMin,t.material.gainMapMax=u.gainMapMax,t.material.offsetHdr=u.offsetHdr,t.material.offsetSdr=u.offsetSdr,t.material.gamma=u.gamma,t.material.hdrCapacityMin=u.hdrCapacityMin,t.material.hdrCapacityMax=u.hdrCapacityMax,t.material.maxDisplayBoost=Math.pow(2,u.hdrCapacityMax),t.material.needsUpdate=!0}}const aP=` 4173varying vec2 vUv; 4174 4175void main() { 4176 vUv = uv; 4177 gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0
4177); 4178} 4179`,oP=` 4180// min half float value 4181#define HALF_FLOAT_MIN vec3( -65504, -65504, -65504 ) 4182// max half float value 4183#define HALF_FLOAT_MAX vec3( 65504, 65504, 65504 ) 4184 4185uniform sampler2D sdr; 4186uniform sampler2D gainMap; 4187uniform vec3 gamma; 4188uniform vec3 offsetHdr; 4189uniform vec3 offsetSdr; 4190uniform vec3 gainMapMin; 4191uniform vec3 gainMapMax; 4192uniform float weightFactor; 4193 4194varying vec2 vUv; 4195 4196void main() { 4197 vec3 rgb = texture2D( sdr, vUv ).rgb; 4198 vec3 recovery = texture2D( gainMap, vUv ).rgb; 4199 vec3 logRecovery = pow( recovery, gamma ); 4200 vec3 logBoost = gainMapMin * ( 1.0 - logRecovery ) + gainMapMax * logRecovery; 4201 vec3 hdrColor = (rgb + offsetSdr) * exp2( logBoost * weightFactor ) - offsetHdr; 4202 vec3 clampedHdrColor = max( HALF_FLOAT_MIN, min( HALF_FLOAT_MAX, hdrColor )); 4203 gl_FragColor = vec4( clampedHdrColor , 1.0 ); 4204} 4205`;class lP extends br{constructor({gamma:t,offsetHdr:n,offsetSdr:s,gainMapMin:o,gainMapMax:u,maxDisplayBoost:h,hdrCapacityMin:d,hdrCapacityMax:g,sdr:y,gainMap:v}){super({name:"GainMapDecoderMaterial",vertexShader:aP,fragmentShader:oP,uniforms:{sdr:{value:y},gainMap:{value:v},gamma:{value:new K(1/t[0],1/t[1],1/t[2])},offsetHdr:{value:new K().fromArray(n)},offsetSdr:{value:new K().fromArray(s)},gainMapMin:{value:new K().fromArray(o)},gainMapMax:{value:new K().fromArray(u)},weightFactor:{value:(Math.log2(h)-d)/(g-d)}},blending:fo,depthTest:!1,depthWrite:!1});ki(this,"_maxDisplayBoost");ki(this,"_hdrCapacityMin");ki(this,"_hdrCapacityMax");this._maxDisplayBoost=h,this._hdrCapacityMin=d,this._hdrCapacityMax=g,this.needsUpdate=!0,this.uniformsNeedUpdate=!0}get sdr(){return this.uniforms.sdr.value}set sdr(t){this.uniforms.sdr.value=t}get gainMap(){return this.uniforms.gainMap.value}set gainMap(t){this.uniforms.gainMap.value=t}get offsetHdr(){return this.uniforms.offsetHdr.value.toArray()}set offsetHdr(t){this.uniforms.offsetHdr.value.fromArray(t)}get offsetSdr(){return this.uniforms.offsetSdr.value.toArray()}set offsetSdr(t){this.uniforms.offsetSdr.value.fromArray(t)}get gainMapMin(){return this.uniforms.gainMapMin.value.toArray()}set gainMapMin(t){this.uniforms.gainMapMin.value.fromArray(t)}get gainMapMax(){return this.uniforms.gainMapMax.value.toArray()}set gainMapMax(t){this.uniforms.gainMapMax.value.fromArray(t)}get gamma(){const t=this.uniforms.gamma.value;return[1/t.x,1/t.y,1/t.z]}set gamma(t){const n=this.uniforms.gamma.value;n.x=1/t[0],n.y=1/t[1],n.z=1/t[2]}get hdrCapacityMin(){return this._hdrCapacityMin}set hdrCapacityMin(t){this._hdrCapacityMin=t,this.calculateWeight()}get hdrCapacityMax(){return this._hdrCapacityMax}set hdrCapacityMax(t){this._hdrCapacityMax=t,this.calculateWeight()}get maxDisplayBoost(){return this._maxDisplayBoost}set maxDisplayBoost(t){this._maxDisplayBoost=Math.max(1,Math.min(65504,t)),this.calculateWeight()}calculateWeight(){const t=(Math.log2(this._maxDisplayBoost)-this._hdrCapacityMin)/(this._hdrCapacityMax-this._hdrCapacityMin);this.uniforms.weightFactor.value=Math.max(0,Math.min(1,t))}}class vC extends rP{constructor(e,t){super({renderer:e,createMaterial:n=>new lP(n),createQuadRenderer:n=>new jS(n)},t)}async render(e,t,n,s){const{sdrImage:o,gainMapImage:u,needsFlip:h}=await this.processImages(n,s,"flipY"),{gainMap:d,sdr:g}=this.createTextures(o,u,h);this.updateQuadRenderer(e,o,d,g,t),e.render()}}class cP extends vC{load([e,t,n],s,o,u){const h=this.prepareQuadRenderer();let d,g,y;const v=async()=>{if(d&&g&&y){try{await this.render(h,y,d,g)}catch(I){this.manager.itemError(e),this.manager.itemError(t),this.manager.itemError(n),typeof u=="function"&&u(I),h.disposeOnDemandRenderer();return}typeof s=="function"&&s(h),this.manager.itemEnd(e),this.manager.itemEnd(t),this.manager.itemEnd(n),h.disposeOnDemandRenderer()}};let x=!0,S=0,M=0,w=!0,C=0,E=0,B=!0,D=0,U=0;const z=()=>{if(typeof o=="function"){const I=S+C+D,O=M+E+U,q=x&&w&&B;o(new ProgressEvent("progress",{lengthComputable:q,loaded:O,total:I}))}};this.manager.itemStart(e),this.manager.itemStart(t),this.manager.itemStart(n);const P=new Vs(this._internalLoadingManager);P.setResponseType("arraybuffer"),P.setRequestHeader(this.requestHeader),P.setPath(this.path),P.setWithCredentials(this.withCredentials),P.load(e,async I=>
vendor: 3,429 bytes, line 4205
4205{if(typeof I=="string")throw new Error("Invalid sdr buffer");d=I,await v()},I=>{x=I.lengthComputable,M=I.loaded,S=I.total,z()},I=>{this.manager.itemError(e),typeof u=="function"&&u(I)});const X=new Vs(this._internalLoadingManager);X.setResponseType("arraybuffer"),X.setRequestHeader(this.requestHeader),X.setPath(this.path),X.setWithCredentials(this.withCredentials),X.load(t,async I=>{if(typeof I=="string")throw new Error("Invalid gainmap buffer");g=I,await v()},I=>{w=I.lengthComputable,E=I.loaded,C=I.total,z()},I=>{this.manager.itemError(t),typeof u=="function"&&u(I)});const k=new Vs(this._internalLoadingManager);return k.setRequestHeader(this.requestHeader),k.setPath(this.path),k.setWithCredentials(this.withCredentials),k.load(n,async I=>{if(typeof I!="string")throw new Error("Invalid metadata string");y=JSON.parse(I),await v()},I=>{B=I.lengthComputable,U=I.loaded,D=I.total,z()},I=>{this.manager.itemError(n),typeof u=="function"&&u(I)}),h}}class uP extends vC{load(e,t,n,s){const o=this.prepareQuadRenderer(),u=new Vs(this._internalLoadingManager);return u.setResponseType("arraybuffer"),u.setRequestHeader(this.requestHeader),u.setPath(this.path),u.setWithCredentials(this.withCredentials),this.manager.itemStart(e),u.load(e,async h=>{if(typeof h=="string")throw new Error("Invalid buffer, received [string], was expecting [ArrayBuffer]");const d=new Uint8Array(h);let g,y,v;try{const x=await sP(d);g=x.sdr,y=x.gainMap,v=x.metadata}catch(x){if(x instanceof gC||x instanceof mC)console.warn(`Failure to reconstruct an HDR image from ${e}: Gain map metadata not found in the file, HDRJPGLoader will render the SDR jpeg`),v={gainMapMin:[0,0,0],gainMapMax:[1,1,1],gamma:[1,1,1],hdrCapacityMin:0,hdrCapacityMax:1,offsetHdr:[0,0,0],offsetSdr:[0,0,0]},g=d;else throw x}try{await this.render(o,v,g.buffer,y==null?void 0:y.buffer)}catch(x){this.manager.itemError(e),typeof s=="function"&&s(x),o.disposeOnDemandRenderer();return}typeof t=="function"&&t(o),this.manager.itemEnd(e),o.disposeOnDemandRenderer()},n,h=>{this.manager.itemError(e),typeof s=="function"&&s(h)}),o}}const Wm={apartment:"lebombo_1k.hdr",city:"potsdamer_platz_1k.hdr",dawn:"kiara_1_dawn_1k.hdr",forest:"forest_slope_1k.hdr",lobby:"st_fagans_interior_1k.hdr",night:"dikhololo_night_1k.hdr",park:"rooitou_park_1k.hdr",studio:"studio_small_03_1k.hdr",sunset:"venice_sunset_1k.hdr",warehouse:"empty_warehouse_01_1k.hdr"},yC="https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/",ud=a=>Array.isArray(a),$S=["/px.png","/nx.png","/py.png","/ny.png","/pz.png","/nz.png"];function R_({files:a=$S,path:e="",preset:t=void 0,colorSpace:n=void 0,extensions:s}={}){t&&(eb(t),a=Wm[t],e=yC);const o=ud(a),{extension:u,isCubemap:h}=tb(a),d=nb(u);if(!d)throw new Error("useEnvironment: Unrecognized file extension: "+a);const g=Xm(S=>S.gl);vt.useLayoutEffect(()=>{if(u!=="webp"&&u!=="jpg"&&u!=="jpeg")return;function S(){kl.clear(d,o?[a]:a)}g.domElement.addEventListener("webglcontextlost",S,{once:!0})},[a,g.domElement]);const y=kl(d,o?[a]:a,S=>{(u==="webp"||u==="jpg"||u==="jpeg")&&S.setRenderer(g),S.setPath==null||S.setPath(e),s&&s(S)});let v=o?y[0]:y;if(u==="jpg"||u==="jpeg"||u==="webp"){var x;v=(x=v.renderTarget)==null?void 0:x.texture}return v.mapping=h?ho:fd,v.colorSpace=n??(h?"srgb":"srgb-linear"),v}const fP={files:$S,path:"",preset:void 0,extensions:void 0};R_.preload=a=>{const e={...fP,...a};let{files:t,path:n=""}=e;
4205const{preset:s,extensions:o}=e;s&&(eb(s),t=Wm[s],n=yC);const{extension:u}=tb(t);if(u==="webp"||u==="jpg"||u==="jpeg")throw new Error("useEnvironment: Preloading gainmaps is not supported");const h=nb(u);if(!h)throw new Error("useEnvironment: Unrecognized file extension: "+t);kl.preload(h,ud(t)?[t]:t,d=>{d.setPath==null||d.setPath(n),o&&o(d)})};const hP={files:$S,preset:void 0};R_.clear=a=>{const e={...hP,...a};let{files:t}=e;const{preset:n}=e;n&&(eb(n),t=Wm[n]);const{extension:s}=tb(t),o=nb(s);if(!o)throw new Error("useEnvironment: Unrecognized file extension: "+t);kl.clear(o,ud(t)?[t]:t)};function eb(a){if(!(a in Wm))throw new Error("Preset must be one of: "+Object.keys(Wm).join(", "))}function tb(a){var e;const t=ud(a)&&a.length===6,n=ud(a)&&a.length===3&&a.some(u=>u.endsWith("json")),s=ud(a)?a[0]:a;return{extension:t?"cube":n?"webp":s.startsWith("data:application/exr")?"exr":s.startsWith("data:application/hdr")?"hdr":s.startsWith("data:image/jpeg")?"jpg":(e=s.split(".").pop())==null||(e=e.split("?"))==null||(e=e.shift())==null?void 0:e.toLowerCase(),isCubemap:t,isGainmap:n}}function nb(a){return a==="cube"?vT:a==="hdr"?QO:a==="exr"?jO:a==="jpg"||a==="jpeg"?uP:a==="webp"?cP:null}const dP=a=>a.current&&a.current.isScene,pP=a=>dP(a)?a.current:a;function ib(a,e,t,n,s={}){var o,u,h,d;s={backgroundBlurriness:0,backgroundIntensity:1,backgroundRotation:[0,0,0],environmentIntensity:1,environmentRotation:[0,0,0],...s};const g=pP(e||t),y=g.background,v=g.environment,x={backgroundBlurriness:g.backgroundBlurriness,backgroundIntensity:g.backgroundIntensity,backgroundRotation:(o=(u=g.backgroundRotation)==null||u.clone==null?void 0:u.clone())!==null&&o!==void 0?o:[0,0,0],environmentIntensity:g.environmentIntensity,environmentRotation:(h=(d=g.environmentRotation)==null||d.clone==null?void 0:d.clone())!==null&&h!==void 0?h:[0,0,0]};return a!=="only"&&(g.environment=n),a&&(g.background=n),qo(g,s),()=>{a!=="only"&&(g.environment=v),a&&(g.background=y),qo(g,x)}}function sb({scene:a,background:e=!1,map:t,...n}){const s=Xm(o=>o.scene);return vt.useLayoutEffect(()=>{if(t)return ib(e,a,s,t,n)}),null}function _C({background:a=!1,scene:e,blur:t,backgroundBlurriness:n,backgroundIntensity:s,backgroundRotation:o,environmentIntensity:u,environmentRotation:h,...d}){const g=R_(d),y=Xm(v=>v.scene);return vt.useLayoutEffect(()=>ib(a,e,y,g,{backgroundBlurriness:t??n,backgroundIntensity:s,backgroundRotation:o,environmentIntensity:u,environmentRotation:h})),vt.useEffect(()=>()=>{g.dispose()},[g]),null}function mP({children:a,near:e=.1,far:t=1e3,resolution:n=256,frames:s=1,map:o,background:u=!1,blur:h,backgroundBlurriness:d,backgroundIntensity:g,backgroundRotation:y,environmentIntensity:v,environmentRotation:x,scene:S,files:M,path:w,preset:C=void 0,extensions:E}){const B=Xm(k=>k.gl),D=Xm(k=>k.scene),U=vt.useRef(null),[z]=vt.useState(()=>new jm),P=vt.useMemo(()=>{const k=new r_(n);return k.texture.type=Wi,k},[n]);vt.useEffect(()=>()=>{P.dispose()},[P]),vt.useLayoutEffect(()=>{if(s===1){const k=B.autoClear;B.autoClear=!0,U.current.update(B,z),B.autoClear=k}return ib(u,S,D,P.texture,{backgroundBlurriness:h??d,backgroundIntensity:g,backgroundRotation:y,environmentIntensity:v,environmentRotation:x})},[a,z,P.texture,S,D,u,s,B]);let X=1;return yF(()=>{if(s===1/0||X<s){const k=B.autoClear;B.autoClear=!0,U.current.update(B,z),B.autoClear=k,X++}}),vt.createElement(vt.Fragment,null,VF(vt.createElement(vt.Fragment,null,a,vt.createElement("cubeCamera",{ref:U,args:[e,t,P]}),M||C?vt.createElement(_C,{background:!0,files:M,preset:C,path:w,extensions:E}):o?vt.createElement(sb,{background:!0,map:o,extensions:E}):null),z))}function gP(a){var e,t,n,s;const o=R_(a),u=a.map||o;vt.useMemo(()=>QT({GroundProjectedEnvImpl:mO}),[]),vt.useEffect(()=>()=>{o.dispose()},[o]);const h=vt.useMemo(()=>[u],[u]),d=(e=a.ground)==null?void 0:e.height,g=(t=a.ground)==null?void 0:t.radius,y=(n=(s=a.ground)==null?void 0:s.scale)!==null&&n!==void 0?n:1e3;return vt.createElement(vt.Fragment,null,vt.createElement(sb,Vy({},a,{map:u})),vt.createElement("groundProjectedEnvImpl",{args:h,scale:y,height:d,radius:g}))}function bP(a){return a.ground?vt.createElement(gP,a):a.map?vt.createElement(sb,a):a.children?vt.createElement(mP,a):vt.createElement(_C,a)}export{SA as A,AP as C,Ua as D,bP as E,FE as M,yF as a,SP as b,_P as c,Tt as d,iB as e,Hs as
4205j,QS as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.