PageSourceSearch

https://cor3.gg/assets/c-ymmLSYIx.js

js cor3.gg collected 2026-10-04 04:27:06 UTC 1,219,048 bytes, 26 lines download raw bytes

vendor: 8,475 bytes, lines 1-11
1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"v1.25.37"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0e1f6001-303f-4977-a4ed-91ac7363abb0",e._sentryDebugIdIdentifier="sentry-dbid-0e1f6001-303f-4977-a4ed-91ac7363abb0")}catch(e){}}();var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var r={exports:{}},i={},a=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function o(e,t,n){var r=null;if(void 0!==n&&(r=""+n),void 0!==t.key&&(r=""+t.key),"key"in t)for(var i in n={},t)"key"!==i&&(n[i]=t[i]);else n=t;return t=n.ref,{$$typeof:a,type:e,key:r,ref:void 0!==t?t:null,props:n}}i.Fragment=s,i.jsx=o,i.jsxs=o,r.exports=i;var l=r.exports,c={exports:{}},u={},d={exports:{}},h={};
2/**
3 * @license React
4 * scheduler.production.js
5 *
6 * Copyright (c) Meta Platforms, Inc. and affiliates.
7 *
8 * This source code is licensed under the MIT license found in the
9 * LICENSE file in the root directory of this source tree.
10 */
11!function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,a=e[r];if(!(0<i(a,t)))break e;e[r]=t,e[n]=a,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length,s=a>>>1;r<s;){var o=2*(r+1)-1,l=e[o],c=o+1,u=e[c];if(0>i(l,n))c<a&&0>i(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[o]=n,r=o);else{if(!(c<a&&0>i(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(e.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var l=[],c=[],u=1,d=null,h=3,f=!1,p=!1,m=!1,g=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,_="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))break;r(c),i.sortIndex=i.expirationTime,t(l,i)}i=n(c)}}function x(e){if(m=!1,b(e),!p)if(null!==n(l))p=!0,A||(A=!0,S());else{var t=n(c);null!==t&&P(x,t.startTime-e)}}var S,A=!1,M=-1,w=5,E=-1;function C(){return!(!g&&e.unstable_now()-E<w)}function T(){if(g=!1,A){var t=e.unstable_now();E=t;var i=!0;try{e:{p=!1,m&&(m=!1,y(M),M=-1),f=!0;var a=h;try{t:{for(b(t),d=n(l);null!==d&&!(d.expirationTime>t&&C());){var s=d.callback;if("function"==typeof s){d.callback=null,h=d.priorityLevel;var o=s(d.expirationTime<=t);if(t=e.unstable_now(),"function"==typeof o){d.callback=o,b(t),i=!0;break t}d===n(l)&&r(l),b(t)}else r(l);d=n(l)}if(null!==d)i=!0;else{var u=n(c);null!==u&&P(x,u.startTime-t),i=!1}}break e}finally{d=null,h=a,f=!1}i=void 0}}finally{i?S():A=!1}}}if("function"==typeof _)S=function(){_(T)};else if("undefined"!=typeof MessageChannel){var R=new MessageChannel,I=R.port2;R.port1.onmessage=T,S=function(){I.postMessage(null)}}else S=function(){v(T,0)};function P(t,n){M=v(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},e.unstable_scheduleCallback=function(r,i,a){var s=e.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?s+a:s,r){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:o=a+o,sortIndex:-1},a>s?(r.sortIndex=a,t(c,r),null===n(l)&&r===n(c)&&(m?(y(M),M=-1):m=!0,P(x,a-s))):(r.sortIndex=o,t(l,r),p||f||(p=!0,A||(A=!0,S()))),r},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}}(h),d.exports=h;var f=d.exports;const p=t(f);var m={exports:{}},g={},v=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),A=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),E=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),R=Symbol.iterator,I={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},P=Object.assign,B={};function L(e,t,n){this.props=e,this.context=t,this.refs=B,this.updater=n||I}function D(){}function F(e,t,n){this.props=e,this.context=t,this.refs=B,this.updater=n||I}L.prototype.isReactComponent={},L.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},L.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},D.prototype=L.prototype;var N=F.prototype=new D;N.constructor=F,P(N,L.prototype),N.isPureReactComponent=!0;var U=Array.isArray;function O(){}var k={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function H(e,t,n){var r=n.ref;return{$$typeof:v,type:e,key:t,ref:void 0!==r?r:null,props:n}}function G(e){return"object"==typeof e&&null!==e&&e.$$typeof===v}var V=/\/+/g;function W(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var n,r}function j(e,t,n,r,i){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var s,o,l=!1;if(null===e)l=!0;else switch(a){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case v:case y:l=!0;break;case C:return j((l=e._init)(e._payload),t,n,r,i)}}if(l)return i=i(e),l=""===r?"."+W(e,0):r,U(i)?(n="",null!=l&&(n=l.replace(V,"$&/")+"/"),j(i,t,n,"",function(e){return e})):null!=i&&(G(i)&&(s=i,o=n+(null==i.key||e&&e.key===i.key?"":(""+i.key).replace(V,"$&/")+"/")+l,i=H(s.type,o,s.props)),t.push(i)),1;l=0;var c,u=""===r?".":r+":";if(U(e))for(var d=0;d<e.length;d++)l+=j(r=e[d],t,n,a=u+W(r,d),i);else if("function"==typeof(d=null===(c=e)||"object"!=typeof c?null:"function"==typeof(c=R&&c[R]||c["@@iterator"])?c:null))for(e=d.call(e),d=0;!(r=e.next()).done;)l+=j(r=r.value,t,n,a=u+W(r,d++),i);else if("object"===a){if("function"==typeof e.then)return j(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(O,O):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(e),t,n,r,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return l}
vendor: 6,828 bytes, line 11
11function X(e,t,n){if(null==e)return e;var r=[],i=0;return j(e,r,"","",function(e){return t.call(n,e,i++)}),r}function J(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var Y="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},K={map:X,forEach:function(e,t,n){X(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return X(e,function(){t++}),t},toArray:function(e){return X(e,function(e){return e})||[]},only:function(e){if(!G(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};g.Activity=T,g.Children=K,g.Component=L,g.Fragment=_,g.Profiler=x,g.PureComponent=F,g.StrictMode=b,g.Suspense=w,g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,g.__COMPILER_RUNTIME={__proto__:null,c:function(e){return k.H.useMemoCache(e)}},g.cache=function(e){return function(){return e.apply(null,arguments)}},g.cacheSignal=function(){return null},g.cloneElement=function(e,t,n){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var r=P({},e.props),i=e.key;if(null!=t)for(a in void 0!==t.key&&(i=""+t.key),t)!z.call(t,a)||"key"===a||"__self"===a||"__source"===a||"ref"===a&&void 0===t.ref||(r[a]=t[a]);var a=arguments.length-2;if(1===a)r.children=n;else if(1<a){for(var s=Array(a),o=0;o<a;o++)s[o]=arguments[o+2];r.children=s}return H(e.type,i,r)},g.createContext=function(e){return(e={$$typeof:A,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:S,_context:e},e},g.createElement=function(e,t,n){var r,i={},a=null;if(null!=t)for(r in void 0!==t.key&&(a=""+t.key),t)z.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(i[r]=t[r]);var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){for(var o=Array(s),l=0;l<s;l++)o[l]=arguments[l+2];i.children=o}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===i[r]&&(i[r]=s[r]);return H(e,a,i)},g.createRef=function(){return{current:null}},g.forwardRef=function(e){return{$$typeof:M,render:e}},g.isValidElement=G,g.lazy=function(e){return{$$typeof:C,_payload:{_status:-1,_result:e},_init:J}},g.memo=function(e,t){return{$$typeof:E,type:e,compare:void 0===t?null:t}},g.startTransition=function(e){var t=k.T,n={};k.T=n;try{var r=e(),i=k.S;null!==i&&i(n,r),"object"==typeof r&&null!==r&&"function"==typeof r.then&&r.then(O,Y)}catch(dv){Y(dv)}finally{null!==t&&null!==n.types&&(t.types=n.types),k.T=t}},g.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},g.use=function(e){return k.H.use(e)},g.useActionState=function(e,t,n){return k.H.useActionState(e,t,n)},g.useCallback=function(e,t){return k.H.useCallback(e,t)},g.useContext=function(e){return k.H.useContext(e)},g.useDebugValue=function(){},g.useDeferredValue=function(e,t){return k.H.useDeferredValue(e,t)},g.useEffect=function(e,t){return k.H.useEffect(e,t)},g.useEffectEvent=function(e){return k.H.useEffectEvent(e)},g.useId=function(){return k.H.useId()},g.useImperativeHandle=function(e,t,n){return k.H.useImperativeHandle(e,t,n)},g.useInsertionEffect=function(e,t){return k.H.useInsertionEffect(e,t)},g.useLayoutEffect=function(e,t){return k.H.useLayoutEffect(e,t)},g.useMemo=function(e,t){return k.H.useMemo(e,t)},g.useOptimistic=function(e,t){return k.H.useOptimistic(e,t)},g.useReducer=function(e,t,n){return k.H.useReducer(e,t,n)},g.useRef=function(e){return k.H.useRef(e)},g.useState=function(e){return k.H.useState(e)},g.useSyncExternalStore=function(e,t,n){return k.H.useSyncExternalStore(e,t,n)},g.useTransition=function(){return k.H.useTransition()},g.version="19.2.0",m.exports=g;var q=m.exports;const Q=t(q);var Z={exports:{}},$={},ee=q;function te(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function ne(){}var re={d:{f:ne,r:function(){throw Error(te(522))},D:ne,C:ne,L:ne,m:ne,X:ne,S:ne,M:ne},p:0,findDOMNode:null},ie=Symbol.for("react.portal"),ae=ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function se(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}$.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=re,$.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(te(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ie,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},$.flushSync=function(e){var t=ae.T,n=re.p;try{if(ae.T=null,re.p=2,e)return e()}finally{ae.T=t,re.p=n,re.d.f()}},$.preconnect=function(e,t){"string"==typeof e&&(t=t?"string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:null,re.d.C(e,t))},$.prefetchDNS=function(e){"string"==typeof e&&re.d.D(e)},$.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var n=t.as,r=se(n,t.crossOrigin),i="string"==typeof t.integrity?t.integrity:void 0,a="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?re.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:a}):"script"===n&&re.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:a,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},$.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=se(t.as,t.crossOrigin);re.d.M(e,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&re.d.M(e)},$.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var n=t.as,r=se(n,t.crossOrigin);re.d.L(e,n,{crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"str
vendor: 4,248 bytes, lines 11-20
11ing"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},$.preloadModule=function(e,t){if("string"==typeof e)if(t){var n=se(t.as,t.crossOrigin);re.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else re.d.m(e)},$.requestFormReset=function(e){re.d.r(e)},$.unstable_batchedUpdates=function(e,t){return e(t)},$.useFormState=function(e,t,n){return ae.H.useFormState(e,t,n)},$.useFormStatus=function(){return ae.H.useHostTransitionStatus()},$.version="19.2.0",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),Z.exports=$;var oe=Z.exports,le=f,ce=q,ue=oe;
12/**
13 * @license React
14 * react-dom-client.production.js
15 *
16 * Copyright (c) Meta Platforms, Inc. and affiliates.
17 *
18 * This source code is licensed under the MIT license found in the
19 * LICENSE file in the root directory of this source tree.
20 */function de(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function he(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function fe(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function pe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function me(e){if(31===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function ge(e){if(fe(e)!==e)throw Error(de(188))}function ve(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=ve(e)))return t;e=e.sibling}return null}var ye=Object.assign,_e=Symbol.for("react.element"),be=Symbol.for("react.transitional.element"),xe=Symbol.for("react.portal"),Se=Symbol.for("react.fragment"),Ae=Symbol.for("react.strict_mode"),Me=Symbol.for("react.profiler"),we=Symbol.for("react.consumer"),Ee=Symbol.for("react.context"),Ce=Symbol.for("react.forward_ref"),Te=Symbol.for("react.suspense"),Re=Symbol.for("react.suspense_list"),Ie=Symbol.for("react.memo"),Pe=Symbol.for("react.lazy"),Be=Symbol.for("react.activity"),Le=Symbol.for("react.memo_cache_sentinel"),De=Symbol.iterator;function Fe(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=De&&e[De]||e["@@iterator"])?e:null}var Ne=Symbol.for("react.client.reference");function Ue(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===Ne?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Se:return"Fragment";case Me:return"Profiler";case Ae:return"StrictMode";case Te:return"Suspense";case Re:return"SuspenseList";case Be:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case xe:return"Portal";case Ee:return e.displayName||"Context";case we:return(e._context.displayName||"Context")+".Consumer";case Ce:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case Ie:return null!==(t=e.displayName||null)?t:Ue(e.type)||"Memo";case Pe:t=e._payload,e=e._init;try{return Ue(e(t))}catch(UP){}}return null}var Oe=Array.isArray,ke=ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ze=ue.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,He={pending:!1,data:null,method:null,action:null},Ge=[],Ve=-1;function We(e){return{current:e}}function je(e){0>Ve||(e.current=Ge[Ve],Ge[Ve]=null,Ve--)}function Xe(e,t){Ve++,Ge[Ve]=e.current,e.current=t}var Je,Ye,Ke=We(null),qe=We(null),Qe=We(null),Ze=We(null);function $e(e,t){switch(Xe(Qe,t),Xe(qe,e),Xe(Ke,null),t.nodeType){case 9:case 11:e=(e
vendor: 1,061 bytes, line 20
20=t.documentElement)&&(e=e.namespaceURI)?Sh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=Ah(t=Sh(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}je(Ke),Xe(Ke,e)}function et(){je(Ke),je(qe),je(Qe)}function tt(e){null!==e.memoizedState&&Xe(Ze,e);var t=Ke.current,n=Ah(t,e.type);t!==n&&(Xe(qe,e),Xe(Ke,n))}function nt(e){qe.current===e&&(je(Ke),je(qe)),Ze.current===e&&(je(Ze),gf._currentValue=He)}function rt(e){if(void 0===Je)try{throw Error()}catch(UP){var t=UP.stack.trim().match(/\n( *(at )?)/);Je=t&&t[1]||"",Ye=-1<UP.stack.indexOf("\n    at")?" (<anonymous>)":-1<UP.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+Je+e+Ye}var it=!1;function at(e,t){if(!e||it)return"";it=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(UP){var r=UP}Reflect.construct(e,[],n)}
vendor: 5,947 bytes, line 20
20else{try{n.call()}catch(i){r=i}e.call(n.prototype)}}else{try{throw Error()}catch(a){r=a}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(s){if(s&&r&&"string"==typeof s.stack)return[s.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=r.DetermineComponentFrameRoot(),s=a[0],o=a[1];if(s&&o){var l=s.split("\n"),c=o.split("\n");for(i=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;i<c.length&&!c[i].includes("DetermineComponentFrameRoot");)i++;if(r===l.length||i===c.length)for(r=l.length-1,i=c.length-1;1<=r&&0<=i&&l[r]!==c[i];)i--;for(;1<=r&&0<=i;r--,i--)if(l[r]!==c[i]){if(1!==r||1!==i)do{if(r--,0>--i||l[r]!==c[i]){var u="\n"+l[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=r&&0<=i);break}}}finally{it=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?rt(n):""}function st(e,t){switch(e.tag){case 26:case 27:case 5:return rt(e.type);case 16:return rt("Lazy");case 13:return e.child!==t&&null!==t?rt("Suspense Fallback"):rt("Suspense");case 19:return rt("SuspenseList");case 0:case 15:return at(e.type,!1);case 11:return at(e.type.render,!1);case 1:return at(e.type,!0);case 31:return rt("Activity");default:return""}}function ot(e){try{var t="",n=null;do{t+=st(e,n),n=e,e=e.return}while(e);return t}catch(UP){return"\nError generating stack: "+UP.message+"\n"+UP.stack}}var lt=Object.prototype.hasOwnProperty,ct=le.unstable_scheduleCallback,ut=le.unstable_cancelCallback,dt=le.unstable_shouldYield,ht=le.unstable_requestPaint,ft=le.unstable_now,pt=le.unstable_getCurrentPriorityLevel,mt=le.unstable_ImmediatePriority,gt=le.unstable_UserBlockingPriority,vt=le.unstable_NormalPriority,yt=le.unstable_LowPriority,_t=le.unstable_IdlePriority,bt=le.log,xt=le.unstable_setDisableYieldValue,St=null,At=null;function Mt(e){if("function"==typeof bt&&xt(e),At&&"function"==typeof At.setStrictMode)try{At.setStrictMode(St,e)}catch(t){}}var wt=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(Et(e)/Ct|0)|0},Et=Math.log,Ct=Math.LN2,Tt=256,Rt=262144,It=4194304;function Pt(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Bt(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var i=0,a=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var o=134217727&r;return 0!==o?0!==(r=o&~a)?i=Pt(r):0!==(s&=o)?i=Pt(s):n||0!==(n=o&~e)&&(i=Pt(n)):0!==(o=r&~a)?i=Pt(o):0!==s?i=Pt(s):n||0!==(n=r&~e)&&(i=Pt(n)),0===i?0:0!==t&&t!==i&&0===(t&a)&&((a=i&-i)>=(n=t&-t)||32===a&&4194048&n)?t:i}function Lt(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Dt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+5e3;default:return-1}}function Ft(){var e=It;return!(62914560&(It<<=1))&&(It=4194304),e}function Nt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ut(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ot(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-wt(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function kt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-wt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function zt(e,t){var n=t&-t;return 0!==((n=42&n?1:Ht(n))&(e.suspendedLanes|t))?0:n}function Ht(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Gt(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function Vt(){var e=ze.p;return 0!==e?e:void 0===(e=window.event)?32:Bf(e.type)}function Wt(e,t){var n=ze.p;try{return ze.p=e,t()}finally{ze.p=n}}var jt=Math.random().toString(36).slice(2),Xt="__reactFiber$"+jt,Jt="__reactProps$"+jt,Yt="__reactContainer$"+jt,Kt="__reactEvents$"+jt,qt="__reactListeners$"+jt,Qt="__reactHandles$"+jt,Zt="__reactResources$"+jt,$t="__reactMarker$"+jt;function en(e){delete e[Xt],delete e[Jt],delete e[Kt],delete e[qt],delete e[Qt]}function tn(e){var t=e[Xt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Yt]||n[Xt]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Hh(e);null!==e;){if(n=e[Xt])return n;e=Hh(e)}return t}n=(e=n).parentNode}return null}function nn(e){if(e=e[Xt]||e[Yt]){var t=e.tag;if(5===t||6===t||13===t||31===t||26===t||27===t||3===t)return e}return null}function rn(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(de(33))}function an(e){var t=e[Zt];return t||(t=e[Zt]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function sn(e){e[$t]=!0}var on=new Set,ln={};function cn(e,t){un(e,t),un(e+"Capture",t)}function un(e,t){for(ln[e]=t,e=0;e<t.length;e++)on.add(t[e])}var dn=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
vendor: 4,377 bytes, line 20
20037D\\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]*$"),hn={},fn={};function pn(e,t,n){if(i=t,lt.call(fn,i)||!lt.call(hn,i)&&(dn.test(i)?fn[i]=!0:(hn[i]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var i}function mn(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function gn(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function vn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function yn(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function _n(e){if(!e._valueTracker){var t=yn(e)?"checked":"value";e._valueTracker=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&void 0!==r&&"function"==typeof r.get&&"function"==typeof r.set){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e,t,""+e[t])}}function bn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=yn(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function xn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var Sn=/[\n"\\]/g;function An(e){return e.replace(Sn,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Mn(e,t,n,r,i,a,s,o){e.name="",null!=s&&"function"!=typeof s&&"symbol"!=typeof s&&"boolean"!=typeof s?e.type=s:e.removeAttribute("type"),null!=t?"number"===s?(0===t&&""===e.value||e.value!=t)&&(e.value=""+vn(t)):e.value!==""+vn(t)&&(e.value=""+vn(t)):"submit"!==s&&"reset"!==s||e.removeAttribute("value"),null!=t?En(e,s,vn(t)):null!=n?En(e,s,vn(n)):null!=r&&e.removeAttribute("value"),null==i&&null!=a&&(e.defaultChecked=!!a),null!=i&&(e.checked=i&&"function"!=typeof i&&"symbol"!=typeof i),null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o?e.name=""+vn(o):e.removeAttribute("name")}function wn(e,t,n,r,i,a,s,o){if(null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.type=a),null!=t||null!=n){if(("submit"===a||"reset"===a)&&null==t)return void _n(e);n=null!=n?""+vn(n):"",t=null!=t?""+vn(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:i)&&"symbol"!=typeof r&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,null!=s&&"function"!=typeof s&&"symbol"!=typeof s&&"boolean"!=typeof s&&(e.name=s),_n(e)}function En(e,t,n){"number"===t&&xn(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Cn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+vn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function Tn(e,t,n){null==t||((t=""+vn(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+vn(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function Rn(e,t,n,r){if(null==t){if(null!=r){if(null!=n)throw Error(de(92));if(Oe(r)){if(1<r.length)throw Error(de(93));r=r[0]}n=r}null==n&&(n=""),t=n}n=vn(t),e.defaultValue=n,(r=e.textContent)===n&&""!==r&&null!==r&&(e.value=r),_n(e)}function In(e,t){if(t){var n=e.firstChild;
vendor: 4,145 bytes, line 20
20if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var Pn=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 Bn(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||Pn.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Ln(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(de(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&Bn(e,i,r)}else for(var a in t)t.hasOwnProperty(a)&&Bn(e,a,t[a])}function Dn(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Fn=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
20-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"]]),Nn=/^[\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 Un(e){return Nn.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function On(){}var kn=null;function zn(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Hn=null,Gn=null;function Vn(e){var t=nn(e);if(t&&(e=t.stateNode)){var n=e[Jt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Mn(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+An(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[Jt]||null;if(!i)throw Error(de(90));Mn(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)(r=n[t]).form===e.form&&bn(r)}break e;case"textarea":Tn(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&Cn(e,!!n.multiple,t,!1)}}}var Wn=!1;function jn(e,t,n){if(Wn)return e(t,n);Wn=!0;try{return e(t)}finally{if(Wn=!1,(null!==Hn||null!==Gn)&&(id(),Hn&&(t=Hn,e=Gn,Gn=Hn=null,Vn(t),e)))for(t=0;t<e.length;t++)Vn(e[t])}}function Xn(e,t){var n=e.stateNode;if(null===n)return null;var r=n[Jt]||null;if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(de(231,t,typeof n));return n}var Jn=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Yn=!1;if(Jn)try{var Kn={};Object.defineProperty(Kn,"passive",{get:function(){Yn=!0}}),window.addEventListener("test",Kn,Kn),window.removeEventListener("test",Kn,Kn)}catch(WL){Yn=!1}var qn=null,Qn=null,Zn=null;function $n(){if(Zn)return Zn;var e,t,n=Qn,r=n.length,i="value"in qn?qn.value:qn.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===i[a-t];t++);return Zn=i.slice(e,1<t?1-t:void 0)}function er(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function tr(){return!0}function nr(){return!1}function rr(e){function t(t,n,r,i,a){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(i):i[s]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?tr:nr,this.isPropagationStopped=nr,this}return ye(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=tr)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=tr)},persist:function(){},isPersistent:tr}),t}var ir,ar,sr,or={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lr=rr(or),cr=ye({},or,{view:0,detail:0}),ur=rr(cr),dr=ye({},cr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sr,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.from
vendor: 8,636 bytes, line 20
20Element===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==sr&&(sr&&"mousemove"===e.type?(ir=e.screenX-sr.screenX,ar=e.screenY-sr.screenY):ar=ir=0,sr=e),ir)},movementY:function(e){return"movementY"in e?e.movementY:ar}}),hr=rr(dr),fr=rr(ye({},dr,{dataTransfer:0})),pr=rr(ye({},cr,{relatedTarget:0})),mr=rr(ye({},or,{animationName:0,elapsedTime:0,pseudoElement:0})),gr=rr(ye({},or,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),vr=rr(ye({},or,{data:0})),yr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_r={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"},br={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=br[e])&&!!t[e]}function Sr(){return xr}var Ar=rr(ye({},cr,{key:function(e){if(e.key){var t=yr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=er(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?_r[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sr,charCode:function(e){return"keypress"===e.type?er(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?er(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),Mr=rr(ye({},dr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),wr=rr(ye({},cr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sr})),Er=rr(ye({},or,{propertyName:0,elapsedTime:0,pseudoElement:0})),Cr=rr(ye({},dr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Tr=rr(ye({},or,{newState:0,oldState:0})),Rr=[9,13,27,32],Ir=Jn&&"CompositionEvent"in window,Pr=null;Jn&&"documentMode"in document&&(Pr=document.documentMode);var Br=Jn&&"TextEvent"in window&&!Pr,Lr=Jn&&(!Ir||Pr&&8<Pr&&11>=Pr),Dr=String.fromCharCode(32),Fr=!1;function Nr(e,t){switch(e){case"keyup":return-1!==Rr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ur(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Or=!1,kr={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 zr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!kr[e.type]:"textarea"===t}function Hr(e,t,n,r){Hn?Gn?Gn.push(r):Gn=[r]:Hn=r,0<(t=lh(t,"onChange")).length&&(n=new lr("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Gr=null,Vr=null;function Wr(e){eh(e,0)}function jr(e){if(bn(rn(e)))return e}function Xr(e,t){if("change"===e)return t}var Jr=!1;if(Jn){var Yr;if(Jn){var Kr="oninput"in document;if(!Kr){var qr=document.createElement("div");qr.setAttribute("oninput","return;"),Kr="function"==typeof qr.oninput}Yr=Kr}else Yr=!1;Jr=Yr&&(!document.documentMode||9<document.documentMode)}function Qr(){Gr&&(Gr.detachEvent("onpropertychange",Zr),Vr=Gr=null)}function Zr(e){if("value"===e.propertyName&&jr(Vr)){var t=[];Hr(t,Vr,e,zn(e)),jn(Wr,t)}}function $r(e,t,n){"focusin"===e?(Qr(),Vr=n,(Gr=t).attachEvent("onpropertychange",Zr)):"focusout"===e&&Qr()}function ei(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return jr(Vr)}function ti(e,t){if("click"===e)return jr(t)}function ni(e,t){if("input"===e||"change"===e)return jr(t)}var ri="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function ii(e,t){if(ri(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!lt.call(t,i)||!ri(e[i],t[i]))return!1}return!0}function ai(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function si(e,t){var n,r=ai(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ai(r)}}function oi(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?oi(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function li(e){for(var t=xn((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=xn((e=t.contentWindow).document)}return t}function ci(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var ui=Jn&&"documentMode"in document&&11>=document.documentMode,di=null,hi=null,fi=null,pi=!1;function mi(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;pi||null==di||di!==xn(r)||(r="selectionStart"in(r=di)&&ci(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},fi&&ii(fi,r)||(fi=r,0<(r=lh(hi,"onSelect")).length&&(t=new lr("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=di)))}function gi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var vi={animationend:gi("Animation","AnimationEnd"),animationiteration:gi("Animation","AnimationIteration"),animationstart:gi("Animation","AnimationStart"),transitionrun:gi("Transition","TransitionRun"),transitionstart:gi("Transition","TransitionStart"),transitioncancel:gi("Transition","TransitionCancel"),transitionend:gi("Transition","TransitionEnd")},yi={},_i={};function bi(e){if(yi[e])return yi[e];if(!vi[e])return e;var t,n=vi[e];for(t in n)if(n.hasOwnProperty(t)&&t in _i)return yi[e]=n[t];return e}Jn&&(_i=document.createElement("div").style,"AnimationEvent"in window||(delete vi.animationend.animation,delete vi.animationiteration.animation,delete vi.animationstart.animation),"TransitionEvent"in window||delete vi.transitionend.transition);var xi=bi("animationend"),Si=bi("animationiteration"),Ai=bi("animationstart"),Mi=bi("transitionrun"),wi=bi("transitionstart"),Ei=bi("transitioncancel"),Ci=bi("transitionend"),Ti=new Map,Ri="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(" ");function Ii(e,t){Ti.set(e,t),cn(t,[e])}Ri.push("scrollEnd");var Pi="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},Bi=[],Li=0,Di=0;function Fi(){for(var e=Li,t=Di=Li=0;t<e;){var n=Bi[t];Bi[t++]=null;var r=Bi[t];Bi[t++]=null;var i=Bi[t];Bi[t++]=null;var a=Bi[t];if(Bi[t++]=null,null!==r&&null!==i){var s=r.pending;
vendor: 4,575 bytes, line 20
20null===s?i.next=i:(i.next=s.next,s.next=i),r.pending=i}0!==a&&ki(n,i,a)}}function Ni(e,t,n,r){Bi[Li++]=e,Bi[Li++]=t,Bi[Li++]=n,Bi[Li++]=r,Di|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Ui(e,t,n,r){return Ni(e,t,n,r),zi(e)}function Oi(e,t){return Ni(e,null,null,t),zi(e)}function ki(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var i=!1,a=e.return;null!==a;)a.childLanes|=n,null!==(r=a.alternate)&&(r.childLanes|=n),22===a.tag&&(null===(e=a.stateNode)||1&e._visibility||(i=!0)),e=a,a=a.return;return 3===e.tag?(a=e.stateNode,i&&null!==t&&(i=31-wt(n),null===(r=(e=a.hiddenUpdates)[i])?e[i]=[t]:r.push(t),t.lane=536870912|n),a):null}function zi(e){if(50<Ku)throw Ku=0,qu=null,Error(de(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var Hi={};function Gi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vi(e,t,n,r){return new Gi(e,t,n,r)}function Wi(e){return!(!(e=e.prototype)||!e.isReactComponent)}function ji(e,t){var n=e.alternate;return null===n?((n=Vi(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=65011712&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Xi(e,t){e.flags&=65011714;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ji(e,t,n,r,i,a){var s=0;if(r=e,"function"==typeof e)Wi(e)&&(s=1);else if("string"==typeof e)s=function(e,t){if(1===Ke.current||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"==typeof t.precedence&&null==e);case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case Be:return(e=Vi(31,n,t,i)).elementType=Be,e.lanes=a,e;case Se:return Yi(n.children,i,a,t);case Ae:s=8,i|=24;break;case Me:return(e=Vi(12,n,t,2|i)).elementType=Me,e.lanes=a,e;case Te:return(e=Vi(13,n,t,i)).elementType=Te,e.lanes=a,e;case Re:return(e=Vi(19,n,t,i)).elementType=Re,e.lanes=a,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Ee:s=10;break e;case we:s=9;break e;case Ce:s=11;break e;case Ie:s=14;break e;case Pe:s=16,r=null;break e}s=29,n=Error(de(130,null===e?"null":typeof e,"")),r=null}return(t=Vi(s,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function Yi(e,t,n,r){return(e=Vi(7,e,r,t)).lanes=n,e}function Ki(e,t,n){return(e=Vi(6,e,null,t)).lanes=n,e}function qi(e){var t=Vi(18,null,null,0);return t.stateNode=e,t}function Qi(e,t,n){return(t=Vi(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Zi=new WeakMap;function $i(e,t){if("object"==typeof e&&null!==e){var n=Zi.get(e);return void 0!==n?n:(t={value:e,source:t,stack:ot(t)},Zi.set(e,t),t)}return{value:e,source:t,stack:ot(t)}}var ea=[],ta=0,na=null,ra=0,ia=[],aa=0,sa=null,oa=1,la="";function ca(e,t){ea[ta++]=ra,ea[ta++]=na,na=e,ra=t}function ua(e,t,n){ia[aa++]=oa,ia[aa++]=la,ia[aa++]=sa,sa=e;var r=oa;e=la;var i=32-wt(r)-1;r&=~(1<<i),n+=1;var a=32-wt(t)+i;if(30<a){var s=i-i%5;a=(r&(1<<s)-1).toString(32),r>>=s,i-=s,oa=1<<32-wt(t)+i|n<<i|r,la=a+e}else oa=1<<a|n<<i|r,la=e}
vendor: 25,246 bytes, line 20
20function da(e){null!==e.return&&(ca(e,1),ua(e,1,0))}function ha(e){for(;e===na;)na=ea[--ta],ea[ta]=null,ra=ea[--ta],ea[ta]=null;for(;e===sa;)sa=ia[--aa],ia[aa]=null,la=ia[--aa],ia[aa]=null,oa=ia[--aa],ia[aa]=null}function fa(e,t){ia[aa++]=oa,ia[aa++]=la,ia[aa++]=sa,oa=t.id,la=t.overflow,sa=e}var pa=null,ma=null,ga=!1,va=null,ya=!1,_a=Error(de(519));function ba(e){throw Ea($i(Error(de(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML","")),e)),_a}function xa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Xt]=e,t[Jt]=r,n){case"dialog":th("cancel",t),th("close",t);break;case"iframe":case"object":case"embed":th("load",t);break;case"video":case"audio":for(n=0;n<Zd.length;n++)th(Zd[n],t);break;case"source":th("error",t);break;case"img":case"image":case"link":th("error",t),th("load",t);break;case"details":th("toggle",t);break;case"input":th("invalid",t),wn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":th("invalid",t);break;case"textarea":th("invalid",t),Rn(t,r.value,r.defaultValue,r.children)}"string"!=typeof(n=r.children)&&"number"!=typeof n&&"bigint"!=typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||ph(t.textContent,n)?(null!=r.popover&&(th("beforetoggle",t),th("toggle",t)),null!=r.onScroll&&th("scroll",t),null!=r.onScrollEnd&&th("scrollend",t),null!=r.onClick&&(t.onclick=On),t=!0):t=!1,t||ba(e,!0)}function Sa(e){for(pa=e.return;pa;)switch(pa.tag){case 5:case 31:case 13:return void(ya=!1);case 27:case 3:return void(ya=!0);default:pa=pa.return}}function Aa(e){if(e!==pa)return!1;if(!ga)return Sa(e),ga=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t=!("form"!==(t=e.type)&&"button"!==t)||Mh(e.type,e.memoizedProps)),t=!t),t&&ma&&ba(e),Sa(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(de(317));ma=zh(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(de(317));ma=zh(e)}else 27===n?(n=ma,Ph(e.type)?(e=kh,kh=null,ma=e):ma=n):ma=pa?Oh(e.stateNode.nextSibling):null;return!0}function Ma(){ma=pa=null,ga=!1}function wa(){var e=va;return null!==e&&(null===Fu?Fu=e:Fu.push.apply(Fu,e),va=null),e}function Ea(e){null===va?va=[e]:va.push(e)}var Ca=We(null),Ta=null,Ra=null;function Ia(e,t,n){Xe(Ca,t._currentValue),t._currentValue=n}function Pa(e){e._currentValue=Ca.current,je(Ca)}function Ba(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function La(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){var a=i.dependencies;if(null!==a){var s=i.child;a=a.firstContext;e:for(;null!==a;){var o=a;a=i;for(var l=0;l<t.length;l++)if(o.context===t[l]){a.lanes|=n,null!==(o=a.alternate)&&(o.lanes|=n),Ba(a.return,n,e),r||(s=null);break e}a=o.next}}else if(18===i.tag){if(null===(s=i.return))throw Error(de(341));s.lanes|=n,null!==(a=s.alternate)&&(a.lanes|=n),Ba(s,n,e),s=null}else s=i.child;if(null!==s)s.return=i;else for(s=i;null!==s;){if(s===e){s=null;break}if(null!==(i=s.sibling)){i.return=s.return,s=i;break}s=s.return}i=s}}function Da(e,t,n,r){e=null;for(var i=t,a=!1;null!==i;){if(!a)if(524288&i.flags)a=!0;else if(262144&i.flags)break;if(10===i.tag){var s=i.alternate;if(null===s)throw Error(de(387));if(null!==(s=s.memoizedProps)){var o=i.type;ri(i.pendingProps.value,s.value)||(null!==e?e.push(o):e=[o])}}else if(i===Ze.current){if(null===(s=i.alternate))throw Error(de(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(null!==e?e.push(gf):e=[gf])}i=i.return}null!==e&&La(t,e,n,r),t.flags|=262144}function Fa(e){for(e=e.firstContext;null!==e;){if(!ri(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Na(e){Ta=e,Ra=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Ua(e){return ka(Ta,e)}function Oa(e,t){return null===Ta&&Na(e),ka(e,t)}function ka(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===Ra){if(null===e)throw Error(de(308));Ra=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ra=Ra.next=t;return n}var za="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Ha=le.unstable_scheduleCallback,Ga=le.unstable_NormalPriority,Va={$$typeof:Ee,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wa(){return{controller:new za,data:new Map,refCount:0}}function ja(e){e.refCount--,0===e.refCount&&Ha(Ga,function(){e.controller.abort()})}var Xa=null,Ja=0,Ya=0,Ka=null;function qa(){if(0===--Ja&&null!==Xa){null!==Ka&&(Ka.status="fulfilled");var e=Xa;Xa=null,Ya=0,Ka=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var Qa=ke.S;ke.S=function(e,t){Ou=ft(),"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===Xa){var n=Xa=[];Ja=0,Ya=Jd(),Ka={status:"pending",value:void 0,then:function(e){n.push(e)}}}Ja++,t.then(qa,qa)}(0,t),null!==Qa&&Qa(e,t)};var Za=We(null);function $a(){var e=Za.current;return null!==e?e:_u.pooledCache}function es(e,t){Xe(Za,null===t?Za.current:t.pool)}function ts(){var e=$a();return null===e?null:{parent:Va._currentValue,pool:e}}var ns=Error(de(460)),rs=Error(de(474)),is=Error(de(542)),as={then:function(){}};function ss(e){return"fulfilled"===(e=e.status)||"rejected"===e}function os(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(On,On),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw ds(e=t.reason),e;default:if("string"==typeof t.status)t.then(On,On);else{if(null!==(e=_u)&&100<e.shellSuspendCounter)throw Error(de(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw ds(e=t.reason),e}throw cs=t,ns}}function ls(e){try{return(0,e._init)(e._payload)}catch(UP){if(null!==UP&&"object"==typeof UP&&"function"==typeof UP.then)throw cs=UP,ns;throw UP}}var cs=null;function us(){if(null===cs)throw Error(de(459));var e=cs;return cs=null,e}function ds(e){if(e===ns||e===is)throw Error(de(483))}var hs=null,fs=0;function ps(e){var t=fs;return fs+=1,null===hs&&(hs=[]),os(hs,e,t)}function ms(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function gs(e,t){if(t.$$typeof===_e)throw Error(de(525));throw e=Object.prototype.toString.call(t),Error(de(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function vs(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(e,t){return(e=ji(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=67108866,n):r:(t.flags|=67108866,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function o(e,t,n,r){return null===t||6!==t.tag?((t=Ki(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){var a=n.type;return a===Se?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===Pe&&ls(a)===t.type)?(ms(t=i(t,n.props),n),t.return=e,t):(ms(t=Ji(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Qi(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function u(e,t,n,r,a){return null===t||7!==t.tag?((t=Yi(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=Ki(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case be:return ms(n=Ji(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case xe:return(t=Qi(t,e.mode,n)).return=e,t;case Pe:return d(e,t=ls(t),n)}if(Oe(t)||Fe(t))return(t=Yi(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return d(e,ps(t),n);if(t.$$typeof===Ee)return d(e,Oa(e,t),n);gs(e,t)}return null}function h(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==i?null:o(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case be:return n.key===i?l(e,t,n,r):null;case xe:return n.key===i?c(e,t,n,r):null;case Pe:return h(e,t,n=ls(n),r)}if(Oe(n)||Fe(n))return null!==i?null:u(e,t,n,r,null);if("function"==typeof n.then)return h(e,t,ps(n),r);if(n.$$typeof===Ee)return h(e,t,Oa(e,n),r);gs(e,n)}return null}function f(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return o(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case be:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case xe:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case Pe:return f(e,t,n,r=ls(r),i)}if(Oe(r)||Fe(r))return u(t,e=e.get(n)||null,r,i,null);if("function"==typeof r.then)return f(e,t,n,ps(r),i);if(r.$$typeof===Ee)return f(e,t,n,Oa(t,r),i);gs(t,r)}return null}function p(o,l,c,u){if("object"==typeof c&&null!==c&&c.type===Se&&null===c.key&&(c=c.props.children),"object"==typeof c&&null!==c){switch(c.$$typeof){case be:e:{for(var m=c.key;null!==l;){if(l.key===m){if((m=c.type)===Se){if(7===l.tag){n(o,l.sibling),(u=i(l,c.props.children)).return=o,o=u;break e}}else if(l.elementType===m||"object"==typeof m&&null!==m&&m.$$typeof===Pe&&ls(m)===l.type){n(o,l.sibling),ms(u=i(l,c.props),c),u.return=o,o=u;break e}n(o,l);break}t(o,l),l=l.sibling}c.type===Se?((u=Yi(c.props.children,o.mode,u,c.key)).return=o,o=u):(ms(u=Ji(c.type,c.key,c.props,null,o.mode,u),c),u.return=o,o=u)}return s(o);case xe:e:{for(m=c.key;null!==l;){if(l.key===m){if(4===l.tag&&l.stateNode.containerInfo===c.containerInfo&&l.stateNode.implementation===c.implementation){n(o,l.sibling),(u=i(l,c.children||[])).return=o,o=u;break e}n(o,l);break}t(o,l),l=l.sibling}(u=Qi(c,o.mode,u)).return=o,o=u}return s(o);case Pe:return p(o,l,c=ls(c),u)}if(Oe(c))return function(i,s,o,l){for(var c=null,u=null,p=s,m=s=0,g=null;null!==p&&m<o.length;m++){p.index>m?(g=p,p=null):g=p.sibling;var v=h(i,p,o[m],l);if(null===v){null===p&&(p=g);break}e&&p&&null===v.alternate&&t(i,p),s=a(v,s,m),null===u?c=v:u.sibling=v,u=v,p=g}if(m===o.length)return n(i,p),ga&&ca(i,m),c;if(null===p){for(;m<o.length;m++)null!==(p=d(i,o[m],l))&&(s=a(p,s,m),null===u?c=p:u.sibling=p,u=p);return ga&&ca(i,m),c}for(p=r(p);m<o.length;m++)null!==(g=f(p,i,m,o[m],l))&&(e&&null!==g.alternate&&p.delete(null===g.key?m:g.key),s=a(g,s,m),null===u?c=g:u.sibling=g,u=g);return e&&p.forEach(function(e){return t(i,e)}),ga&&ca(i,m),c}(o,l,c,u);if(Fe(c)){if("function"!=typeof(m=Fe(c)))throw Error(de(150));return function(i,s,o,l){if(null==o)throw Error(de(151));for(var c=null,u=null,p=s,m=s=0,g=null,v=o.next();null!==p&&!v.done;m++,v=o.next()){p.index>m?(g=p,p=null):g=p.sibling;var y=h(i,p,v.value,l);if(null===y){null===p&&(p=g);break}e&&p&&null===y.alternate&&t(i,p),s=a(y,s,m),null===u?c=y:u.sibling=y,u=y,p=g}if(v.done)return n(i,p),ga&&ca(i,m),c;if(null===p){for(;!v.done;m++,v=o.next())null!==(v=d(i,v.value,l))&&(s=a(v,s,m),null===u?c=v:u.sibling=v,u=v);return ga&&ca(i,m),c}for(p=r(p);!v.done;m++,v=o.next())null!==(v=f(p,i,m,v.value,l))&&(e&&null!==v.alternate&&p.delete(null===v.key?m:v.key),s=a(v,s,m),null===u?c=v:u.sibling=v,u=v);return e&&p.forEach(function(e){return t(i,e)}),ga&&ca(i,m),c}(o,l,c=m.call(c),u)}if("function"==typeof c.then)return p(o,l,ps(c),u);if(c.$$typeof===Ee)return p(o,l,Oa(o,c),u);gs(o,c)}return"string"==typeof c&&""!==c||"number"==typeof c||"bigint"==typeof c?(c=""+c,null!==l&&6===l.tag?(n(o,l.sibling),(u=i(l,c)).return=o,o=u):(n(o,l),(u=Ki(c,o.mode,u)).return=o,o=u),s(o)):n(o,l)}return function(e,t,n,r){try{fs=0;var i=p(e,t,n,r);return hs=null,i}catch(UP){if(UP===ns||UP===is)throw UP;var a=Vi(29,UP,null,e.mode);return a.lanes=r,a.return=e,a}}}var ys=vs(!0),_s=vs(!1),bs=!1;function xs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ss(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function As(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ms(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&yu){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=zi(e),ki(e,null,n),t}return Ni(e,r,t,n),zi(e)}function ws(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,kt(e,n)}}function Es(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===a?i=a=s:a=a.next=s,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Cs=!1;function Ts(){if(Cs&&null!==Ka)throw Ka}function Rs(e,t,n,r){Cs=!1;var i=e.updateQueue;bs=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,o=i.shared.pending;if(null!==o){i.shared.pending=null;var l=o,c=l.next;l.next=null,null===s?a=c:s.next=c,s=l;var u=e.alternate;null!==u&&(o=(u=u.updateQueue).lastBaseUpdate)!==s&&(null===o?u.firstBaseUpdate=c:o.next=c,u.lastBaseUpdate=l)}if(null!==a){var d=i.baseState;for(s=0,u=c=l=null,o=a;;){var h=-536870913&o.lane,f=h!==o.lane;if(f?(xu&h)===h:(r&h)===h){0!==h&&h===Ya&&(Cs=!0),null!==u&&(u=u.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var p=e,m=o;h=t;var g=n;switch(m.tag){case 1:if("function"==typeof(p=m.payload)){d=p.call(g,d,h);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(h="function"==typeof(p=m.payload)?p.call(g,d,h):p))break e;d=ye({},d,h);break e;case 2:bs=!0}}null!==(h=o.callback)&&(e.flags|=64,f&&(e.flags|=8192),null===(f=i.callbacks)?i.callbacks=[h]:f.push(h))}else f={lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===u?(c=u=f,l=d):u=u.next=f,s|=h;if(null===(o=o.next)){if(null===(o=i.shared.pending))break;o=(f=o).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null===a&&(i.shared.lanes=0),Ru|=s,e.lanes=s,e.memoizedState=d}}function Is(e,t){if("function"!=typeof e)throw Error(de(191,e));e.call(t)}function Ps(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)Is(n[e],t)}var Bs=We(null),Ls=We(0);function Ds(e,t){Xe(Ls,e=Cu),Xe(Bs,t),Cu=e|t.baseLanes}function Fs(){Xe(Ls,Cu),Xe(Bs,Bs.current)}function Ns(){Cu=Ls.current,je(Bs),je(Ls)}var Us=We(null),Os=null;function ks(e){var t=e.alternate;Xe(Ws,1&Ws.current),Xe(Us,e),null===Os&&(null===t||null!==Bs.current||null!==t.memoizedState)&&(Os=e)}function zs(e){Xe(Ws,Ws.current),Xe(Us,e),null===Os&&(Os=e)}function Hs(e){22===e.tag?(Xe(Ws,Ws.current),Xe(Us,e),null===Os&&(Os=e)):Gs()}function Gs(){Xe(Ws,Ws.current),Xe(Us,Us.current)}function Vs(e){je(Us),Os===e&&(Os=null),je(Ws)}var Ws=We(0);function js(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Nh(n)||Uh(n)))return t}else if(19!==t.tag||"forwards"!==t.memoizedProps.revealOrder&&"backwards"!==t.memoizedProps.revealOrder&&"unstable_legacy-backwards"!==t.memoizedProps.revealOrder&&"together"!==t.memoizedProps.revealOrder){if(null!==t.child){t.child.return=t,t=t.child;continue}}else if(128&t.flags)return t;if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Xs=0,Js=null,Ys=null,Ks=null,qs=!1,Qs=!1,Zs=!1,$s=0,eo=0,to=null,no=0;function ro(){throw Error(de(321))}function io(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ri(e[n],t[n]))return!1;return!0}function ao(e,t,n,r,i,a){return Xs=a,Js=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ke.H=null===e||null===e.memoizedState?xl:Sl,Zs=!1,a=n(r,i),Zs=!1,Qs&&(a=oo(t,n,r,i)),so(e),a}function so(e){ke.H=bl;var t=null!==Ys&&null!==Ys.next;if(Xs=0,Ks=Ys=Js=null,qs=!1,eo=0,to=null,t)throw Error(de(300));null===e||Ol||null!==(e=e.dependencies)&&Fa(e)&&(Ol=!0)}function oo(e,t,n,r){Js=e;var i=0;do{if(Qs&&(to=null),eo=0,Qs=!1,25<=i)throw Error(de(301));if(i+=1,Ks=Ys=null,null!=e.updateQueue){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,null!=a.memoCache&&(a.memoCache.index=0)}ke.H=Al,a=t(n,r)}while(Qs);return a}function lo(){var e=ke.H,t=e.useState()[0];return t="function"==typeof t.then?mo(t):t,e=e.useState()[0],(null!==Ys?Ys.memoizedState:null)!==e&&(Js.flags|=1024),t}function co(){var e=0!==$s;return $s=0,e}function uo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ho(e){if(qs){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}qs=!1}Xs=0,Ks=Ys=Js=null,Qs=!1,eo=$s=0,to=null}function fo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Ks?Js.memoizedState=Ks=e:Ks=Ks.next=e,Ks}function po(){if(null===Ys){var e=Js.alternate;e=null!==e?e.memoizedState:null}else e=Ys.next;var t=null===Ks?Js.memoizedState:Ks.next;if(null!==t)Ks=t,Ys=e;else{if(null===e){if(null===Js.alternate)throw Error(de(467));throw Error(de(310))}e={memoizedState:(Ys=e).memoizedState,baseState:Ys.baseState,baseQueue:Ys.baseQueue,queue:Ys.queue,next:null},null===Ks?Js.memoizedState=Ks=e:Ks=Ks.next=e}return Ks}function mo(e){var t=eo;return eo+=1,null===to&&(to=[]),e=os(to,e,t),t=Js,null===(null===Ks?t.memoizedState:Ks.next)&&(t=t.alternate,ke.H=null===t||null===t.memoizedState?xl:Sl),e}function go(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return mo(e);if(e.$$typeof===Ee)return Ua(e)}throw Error(de(438,String(e)))}function vo(e){var t=null,n=Js.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=Js.alternate;null!==r&&null!==(r=r.updateQueue)&&null!=(r=r.memoCache)&&(t={data:r.data.map(function(e){return e.slice()}),index:0})}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Js.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=Le;return t.index++,n}function yo(e,t){return"function"==typeof t?t(e):t}function _o(e){return bo(po(),Ys,e)}function bo(e,t,n){var r=e.queue;if(null===r)throw Error(de(311));r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}t.baseQueue=i=a,r.pending=null}if(a=e.baseState,null===i)e.memoizedState=a;else{var o=s=null,l=null,c=t=i.next,u=!1;do{var d=-536870913&c.lane;if(d!==c.lane?(xu&d)===d:(Xs&d)===d){var h=c.revertLane;if(0===h)null!==l&&(l=l.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),d===Ya&&(u=!0);else{if((Xs&h)===h){c=c.next,h===Ya&&(u=!0);continue}d={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===l?(o=l=d,s=a):l=l.next=d,Js.lanes|=h,Ru|=h}d=c.action,Zs&&n(a,d),a=c.hasEagerState?c.eagerState:n(a,d)}else h={lane:d,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===l?(o=l=h,s=a):l=l.next=h,Js.lanes|=d,Ru|=d;c=c.next}while(null!==c&&c!==t);if(null===l?s=a:l.next=o,!ri(a,e.memoizedState)&&(Ol=!0,u&&null!==(n=Ka)))throw n;e.memoizedState=a,e.baseState=s,e.baseQueue=l,r.lastRenderedState=a}return null===i&&(r.lanes=0),[e.memoizedState,r.dispatch]}function xo(e){var t=po(),n=t.queue;if(null===n)throw Error(de(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);ri(a,t.memoizedState)||(Ol=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function So(e,t,n){var r=Js,i=po(),a=ga;if(a){if(void 0===n)throw Error(de(407));n=n()}else n=t();var s=!ri((Ys||i).memoizedState,n);if(s&&(i.memoizedState=n,Ol=!0),i=i.queue,Jo(wo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||null!==Ks&&1&Ks.memoizedState.tag){if(r.flags|=2048,Go(9,{destroy:void 0},Mo.bind(null,r,i,n,t),null),null===_u)throw Error(de(349));a||127&Xs||Ao(r,t,n)}return n}function Ao(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Js.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},Js.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Mo(e,t,n,r){t.value=n,t.getSnapshot=r,Eo(t)&&Co(e)}function wo(e,t,n){return n(function(){Eo(t)&&Co(e)})}function Eo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ri(e,n)}catch(dv){return!0}}function Co(e){var t=Oi(e,2);null!==t&&$u(t,0,2)}function To(e){var t=fo();if("function"==typeof e){var n=e;if(e=n(),Zs){Mt(!0);try{n()}finally{Mt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yo,lastRenderedState:e},t}function Ro(e,t,n,r){return e.baseState=n,bo(e,Ys,"function"==typeof r?r:yo)}function Io(e,t,n,r,i){if(vl(e))throw Error(de(485));if(null!==(e=t.action)){var a={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};null!==ke.T?n(!0):a.isTransition=!1,r(a),null===(n=t.pending)?(a.next=t.pending=a,Po(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Po(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=ke.T,s={};ke.T=s;try{var o=n(i,r),l=ke.S;null!==l&&l(s,o),Bo(e,t,o)}catch(dv){Do(e,t,dv)}finally{null!==a&&null!==s.types&&(a.types=s.types),ke.T=a}}else try{Bo(e,t,a=n(i,r))}catch(c){Do(e,t,c)}}function Bo(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then(function(n){Lo(e,t,n)},function(n){return Do(e,t,n)}):Lo(e,t,n)}function Lo(e,t,n){t.status="fulfilled",t.value=n,Fo(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Po(e,n)))}function Do(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,Fo(t),t=t.next}while(t!==r)}e.action=null}function Fo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function No(e,t){return t}function Uo(e,t){if(ga){var n=_u.formState;if(null!==n){e:{var r=Js;if(ga){if(ma){t:{for(var i=ma,a=ya;8!==i.nodeType;){if(!a){i=null;break t}if(null===(i=Oh(i.nextSibling))){i=null;break t}}i="F!"===(a=i.data)||"F"===a?i:null}if(i){ma=Oh(i.nextSibling),r="F!"===i.data;break e}}ba(r)}r=!1}r&&(t=n[0])}}return(n=fo()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:t},n.queue=r,n=pl.bind(null,Js,r),r.dispatch=n,r=To(!1),a=gl.bind(null,Js,!1,r.queue),i={state:t,dispatch:null,action:e,pending:null},(r=fo()).queue=i,n=Io.bind(null,Js,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Oo(e){return ko(po(),Ys,e)}function ko(e,t,n){if(t=bo(e,t,No)[0],e=_o(yo)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var r=mo(t)}catch(UP){if(UP===ns)throw is;throw UP}else r=t;var i=(t=po()).queue,a=i.dispatch;return n!==t.memoizedState&&(Js.flags|=2048,Go(9,{destroy:void 0},zo.bind(null,i,n),null)),[r,a,e]}function zo(e,t){e.action=t}function Ho(e){var t=po(),n=Ys;if(null!==n)return ko(t,n,e);po(),t=t.memoizedState;var r=(n=po()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Go(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=Js.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Js.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Vo(){return po().memoizedState}function Wo(e,t,n,r){var i=fo();Js.flags|=e,i.memoizedState=Go(1|t,{destroy:void 0},n,void 0===r?null:r)}function jo(e,t,n,r){var i=po();r=void 0===r?null:r;var a=i.memoizedState.inst;null!==Ys&&null!==r&&io(r,Ys.memoizedState.deps)?i.memoizedState=Go(t,a,n,r):(Js.flags|=e,i.memoizedState=Go(1|t,a,n,r))}function Xo(e,t){Wo(8390656,8,e,t)}function Jo(e,t){jo(2048,8,e,t)}function Yo(e){var t=po().memoizedState;return function(e){Js.flags|=4;var t=Js.updateQueue;if(null===t)t={lastEffect:null,events:null,stores:null,memoCache:null},Js.updateQueue=t,t.events=[e];else{var n=t.events;null===n?t.events=[e]:n.push(e)}}({ref:t,nextImpl:e}),function(){if(2&yu)throw Error(de(440));return t.impl.apply(void 0,arguments)}}function Ko(e,t){return jo(4,2,e,t)}function qo(e,t){return jo(4,4,e,t)}function Qo(e,t){if("function"==typeof t){e=e();var n=t(e);return function(){"function"==typeof n?n():t(null)}}if(null!=t)return e=e(),t.current=e,function(){t.current=null}}
vendor: 4,556 bytes, line 20
20function Zo(e,t,n){n=null!=n?n.concat([e]):null,jo(4,4,Qo.bind(null,t,e),n)}function $o(){}function el(e,t){var n=po();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&io(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function tl(e,t){var n=po();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&io(t,r[1]))return r[0];if(r=e(),Zs){Mt(!0);try{e()}finally{Mt(!1)}}return n.memoizedState=[r,t],r}function nl(e,t,n){return void 0===n||1073741824&Xs&&!(261930&xu)?e.memoizedState=t:(e.memoizedState=n,e=Zu(),Js.lanes|=e,Ru|=e,n)}function rl(e,t,n,r){return ri(n,t)?n:null!==Bs.current?(e=nl(e,n,r),ri(e,t)||(Ol=!0),e):42&Xs&&(!(1073741824&Xs)||261930&xu)?(e=Zu(),Js.lanes|=e,Ru|=e,t):(Ol=!0,e.memoizedState=n)}function il(e,t,n,r,i){var a=ze.p;ze.p=0!==a&&8>a?a:8;var s,o,l,c=ke.T,u={};ke.T=u,gl(e,!1,t,n);try{var d=i(),h=ke.S;if(null!==h&&h(u,d),null!==d&&"object"==typeof d&&"function"==typeof d.then){var f=(s=r,o=[],l={status:"pending",value:null,reason:null,then:function(e){o.push(e)}},d.then(function(){l.status="fulfilled",l.value=s;for(var e=0;e<o.length;e++)(0,o[e])(s)},function(e){for(l.status="rejected",l.reason=e,e=0;e<o.length;e++)(0,o[e])(void 0)}),l);ml(e,t,f,Qu())}else ml(e,t,r,Qu())}catch(dv){ml(e,t,{then:function(){},status:"rejected",reason:dv},Qu())}finally{ze.p=a,null!==c&&null!==u.types&&(c.types=u.types),ke.T=c}}function al(){}function sl(e,t,n,r){if(5!==e.tag)throw Error(de(476));var i=ol(e).queue;il(e,i,t,He,null===n?al:function(){return ll(e),n(r)})}function ol(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:He,baseState:He,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yo,lastRenderedState:He},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yo,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function ll(e){var t=ol(e);null===t.next&&(t=e.alternate.memoizedState),ml(e,t.next.queue,{},Qu())}function cl(){return Ua(gf)}function ul(){return po().memoizedState}function dl(){return po().memoizedState}function hl(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Qu(),r=Ms(t,e=As(n),n);return null!==r&&($u(r,0,n),ws(r,t,n)),t={cache:Wa()},void(e.payload=t)}t=t.return}}function fl(e,t,n){var r=Qu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},vl(e)?yl(t,n):null!==(n=Ui(e,t,n,r))&&($u(n,0,r),_l(n,t,r))}function pl(e,t,n){ml(e,t,n,Qu())}function ml(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(vl(e))yl(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,o=a(s,n);if(i.hasEagerState=!0,i.eagerState=o,ri(o,s))return Ni(e,t,i,0),null===_u&&Fi(),!1}catch(dv){}if(null!==(n=Ui(e,t,i,r)))return $u(n,0,r),_l(n,t,r),!0}return!1}function gl(e,t,n,r){if(r={lane:2,revertLane:Jd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},vl(e)){if(t)throw Error(de(479))}else null!==(t=Ui(e,n,r,2))&&$u(t,0,2)}function vl(e){var t=e.alternate;return e===Js||null!==t&&t===Js}function yl(e,t){Qs=qs=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function _l(e,t,n){if(4194048&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,kt(e,n)}}var bl={readContext:Ua,use:go,useCallback:ro,useContext:ro,useEffect:ro,useImperativeHandle:ro,useLayoutEffect:ro,useInsertionEffect:ro,useMemo:ro,useReducer:ro,useRef:ro,useState:ro,useDebugValue:ro,useDeferredValue:ro,useTransition:ro,useSyncExternalStore:ro,useId:ro,useHostTransitionStatus:ro,useFormState:ro,useActionState:ro,useOptimistic:ro,useMemoCache:ro,useCacheRefresh:ro};bl.useEffectEvent=ro;var xl={readContext:Ua,use:go,useCallback:function(e,t){return fo().memoizedState=[e,void 0===t?null:t],e},useContext:Ua,useEffect:Xo,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,Wo(4194308,4,Qo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wo(4194308,4,e,t)},useInsertionEffect:function(e,t){Wo(4,2,e,t)},useMemo:function(e,t){var n=fo();t=void 0===t?null:t;var r=e();if(Zs){Mt(!0);try{e()}finally{Mt(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=fo();if(void 0!==n){var i=n(t);if(Zs){Mt(!0);try{n(t)}finally{Mt(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=fl.bind(null,Js,e),[r.memoizedState,e]}
vendor: 51,826 bytes, line 20
20,useRef:function(e){return e={current:e},fo().memoizedState=e},useState:function(e){var t=(e=To(e)).queue,n=pl.bind(null,Js,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:$o,useDeferredValue:function(e,t){return nl(fo(),e,t)},useTransition:function(){var e=To(!1);return e=il.bind(null,Js,e.queue,!0,!1),fo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Js,i=fo();if(ga){if(void 0===n)throw Error(de(407));n=n()}else{if(n=t(),null===_u)throw Error(de(349));127&xu||Ao(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Xo(wo.bind(null,r,a,e),[e]),r.flags|=2048,Go(9,{destroy:void 0},Mo.bind(null,r,a,n,t),null),n},useId:function(){var e=fo(),t=_u.identifierPrefix;if(ga){var n=la;t="_"+t+"R_"+(n=(oa&~(1<<32-wt(oa)-1)).toString(32)+n),0<(n=$s++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=no++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:cl,useFormState:Uo,useActionState:Uo,useOptimistic:function(e){var t=fo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=gl.bind(null,Js,!0,n),n.dispatch=t,[e,t]},useMemoCache:vo,useCacheRefresh:function(){return fo().memoizedState=hl.bind(null,Js)},useEffectEvent:function(e){var t=fo(),n={impl:e};return t.memoizedState=n,function(){if(2&yu)throw Error(de(440));return n.impl.apply(void 0,arguments)}}},Sl={readContext:Ua,use:go,useCallback:el,useContext:Ua,useEffect:Jo,useImperativeHandle:Zo,useInsertionEffect:Ko,useLayoutEffect:qo,useMemo:tl,useReducer:_o,useRef:Vo,useState:function(){return _o(yo)},useDebugValue:$o,useDeferredValue:function(e,t){return rl(po(),Ys.memoizedState,e,t)},useTransition:function(){var e=_o(yo)[0],t=po().memoizedState;return["boolean"==typeof e?e:mo(e),t]},useSyncExternalStore:So,useId:ul,useHostTransitionStatus:cl,useFormState:Oo,useActionState:Oo,useOptimistic:function(e,t){return Ro(po(),0,e,t)},useMemoCache:vo,useCacheRefresh:dl};Sl.useEffectEvent=Yo;var Al={readContext:Ua,use:go,useCallback:el,useContext:Ua,useEffect:Jo,useImperativeHandle:Zo,useInsertionEffect:Ko,useLayoutEffect:qo,useMemo:tl,useReducer:xo,useRef:Vo,useState:function(){return xo(yo)},useDebugValue:$o,useDeferredValue:function(e,t){var n=po();return null===Ys?nl(n,e,t):rl(n,Ys.memoizedState,e,t)},useTransition:function(){var e=xo(yo)[0],t=po().memoizedState;return["boolean"==typeof e?e:mo(e),t]},useSyncExternalStore:So,useId:ul,useHostTransitionStatus:cl,useFormState:Ho,useActionState:Ho,useOptimistic:function(e,t){var n=po();return null!==Ys?Ro(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:vo,useCacheRefresh:dl};function Ml(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:ye({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}Al.useEffectEvent=Yo;var wl={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Qu(),i=As(r);i.payload=t,null!=n&&(i.callback=n),null!==(t=Ms(e,i,r))&&($u(t,0,r),ws(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Qu(),i=As(r);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=Ms(e,i,r))&&($u(t,0,r),ws(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Qu(),r=As(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=Ms(e,r,n))&&($u(t,0,n),ws(t,e,n))}};function El(e,t,n,r,i,a,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,s):!(t.prototype&&t.prototype.isPureReactComponent&&ii(n,r)&&ii(i,a))}function Cl(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&wl.enqueueReplaceState(t,t.state,null)}function Tl(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=ye({},n)),e)void 0===n[i]&&(n[i]=e[i]);return n}function Rl(e){Pi(e)}function Il(e){console.error(e)}function Pl(e){Pi(e)}function Bl(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Ll(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Dl(e,t,n){return(n=As(n)).tag=3,n.payload={element:null},n.callback=function(){Bl(e,t)},n}function Fl(e){return(e=As(e)).tag=3,e}function Nl(e,t,n,r){var i=n.type.getDerivedStateFromError;if("function"==typeof i){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Ll(t,n,r)}}var s=n.stateNode;null!==s&&"function"==typeof s.componentDidCatch&&(e.callback=function(){Ll(t,n,r),"function"!=typeof i&&(null===Hu?Hu=new Set([this]):Hu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var Ul=Error(de(461)),Ol=!1;function kl(e,t,n,r){t.child=null===e?_s(t,null,n,r):ys(t,e.child,n,r)}function zl(e,t,n,r,i){n=n.render;var a=t.ref;if("ref"in r){var s={};for(var o in r)"ref"!==o&&(s[o]=r[o])}else s=r;return Na(t),r=ao(e,t,n,s,a,i),o=co(),null===e||Ol?(ga&&o&&da(t),t.flags|=1,kl(e,t,r,i),t.child):(uo(e,t,i),cc(e,t,i))}function Hl(e,t,n,r,i){if(null===e){var a=n.type;return"function"!=typeof a||Wi(a)||void 0!==a.defaultProps||null!==n.compare?((e=Ji(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Gl(e,t,a,r,i))}if(a=e.child,!uc(e,i)){var s=a.memoizedProps;if((n=null!==(n=n.compare)?n:ii)(s,r)&&e.ref===t.ref)return cc(e,t,i)}return t.flags|=1,(e=ji(a,r)).ref=t.ref,e.return=t,t.child=e}function Gl(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(ii(a,r)&&e.ref===t.ref){if(Ol=!1,t.pendingProps=r=a,!uc(e,i))return t.lanes=e.lanes,cc(e,t,i);131072&e.flags&&(Ol=!0)}}return Kl(e,t,n,r,i)}function Vl(e,t,n,r){var i=r.children,a=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===r.mode){if(128&t.flags){if(a=null!==a?a.baseLanes|n:n,null!==e){for(r=t.child=e.child,i=0;null!==r;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return jl(e,t,a,n,r)}if(!(536870912&n))return r=t.lanes=536870912,jl(e,t,null!==a?a.baseLanes|n:n,n,r);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&es(0,null!==a?a.cachePool:null),null!==a?Ds(t,a):Fs(),Hs(t)}else null!==a?(es(0,a.cachePool),Ds(t,a),Gs(),t.memoizedState=null):(null!==e&&es(0,null),Fs(),Gs());return kl(e,t,i,n),t.child}function Wl(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function jl(e,t,n,r,i){var a=$a();return a=null===a?null:{parent:Va._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},null!==e&&es(0,null),Fs(),Hs(t),null!==e&&Da(e,t,r,!0),t.childLanes=i,null}function Xl(e,t){return(t=ic({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function Jl(e,t,n){return ys(t,e.child,null,n),(e=Xl(t,t.pendingProps)).flags|=2,Vs(t),t.memoizedState=null,e}function Yl(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(de(284));null!==e&&e.ref===n||(t.flags|=4194816)}}function Kl(e,t,n,r,i){return Na(t),n=ao(e,t,n,r,void 0,i),r=co(),null===e||Ol?(ga&&r&&da(t),t.flags|=1,kl(e,t,n,i),t.child):(uo(e,t,i),cc(e,t,i))}function ql(e,t,n,r,i,a){return Na(t),t.updateQueue=null,n=oo(t,r,n,i),so(e),r=co(),null===e||Ol?(ga&&r&&da(t),t.flags|=1,kl(e,t,n,a),t.child):(uo(e,t,a),cc(e,t,a))}function Ql(e,t,n,r,i){if(Na(t),null===t.stateNode){var a=Hi,s=n.contextType;"object"==typeof s&&null!==s&&(a=Ua(s)),a=new n(r,a),t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,a.updater=wl,t.stateNode=a,a._reactInternals=t,(a=t.stateNode).props=r,a.state=t.memoizedState,a.refs={},xs(t),s=n.contextType,a.context="object"==typeof s&&null!==s?Ua(s):Hi,a.state=t.memoizedState,"function"==typeof(s=n.getDerivedStateFromProps)&&(Ml(t,n,s,r),a.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(s=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),s!==a.state&&wl.enqueueReplaceState(a,a.state,null),Rs(t,r,a,i),Ts(),a.state=t.memoizedState),"function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){a=t.stateNode;var o=t.memoizedProps,l=Tl(n,o);a.props=l;var c=a.context,u=n.contextType;s=Hi,"object"==typeof u&&null!==u&&(s=Ua(u));var d=n.getDerivedStateFromProps;u="function"==typeof d||"function"==typeof a.getSnapshotBeforeUpdate,o=t.pendingProps!==o,u||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o||c!==s)&&Cl(t,a,r,s),bs=!1;var h=t.memoizedState;a.state=h,Rs(t,r,a,i),Ts(),c=t.memoizedState,o||h!==c||bs?("function"==typeof d&&(Ml(t,n,d,r),c=t.memoizedState),(l=bs||El(t,n,l,r,h,c,s))?(u||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=s,r=l):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ss(e,t),u=Tl(n,s=t.memoizedProps),a.props=u,d=t.pendingProps,h=a.context,c=n.contextType,l=Hi,"object"==typeof c&&null!==c&&(l=Ua(c)),(c="function"==typeof(o=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||h!==l)&&Cl(t,a,r,l),bs=!1,h=t.memoizedState,a.state=h,Rs(t,r,a,i),Ts();var f=t.memoizedState;s!==d||h!==f||bs||null!==e&&null!==e.dependencies&&Fa(e.dependencies)?("function"==typeof o&&(Ml(t,n,o,r),f=t.memoizedState),(u=bs||El(t,n,u,r,h,f,l)||null!==e&&null!==e.dependencies&&Fa(e.dependencies))?(c||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,f,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,f,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=l,r=u):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Yl(e,t),r=!!(128&t.flags),a||r?(a=t.stateNode,n=r&&"function"!=typeof n.getDerivedStateFromError?null:a.render(),t.flags|=1,null!==e&&r?(t.child=ys(t,e.child,null,i),t.child=ys(t,null,n,i)):kl(e,t,n,i),t.memoizedState=a.state,e=t.child):e=cc(e,t,i),e}function Zl(e,t,n,r){return Ma(),t.flags|=256,kl(e,t,n,r),t.child}var $l={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ec(e){return{baseLanes:e,cachePool:ts()}}function tc(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=Bu),e}function nc(e,t,n){var r,i=t.pendingProps,a=!1,s=!!(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&!!(2&Ws.current)),r&&(a=!0,t.flags&=-129),r=!!(32&t.flags),t.flags&=-33,null===e){if(ga){if(a?ks(t):Gs(),(e=ma)?null!==(e=null!==(e=Fh(e,ya))&&"&"!==e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==sa?{id:oa,overflow:la}:null,retryLane:536870912,hydrationErrors:null},(n=qi(e)).return=t,t.child=n,pa=t,ma=null):e=null,null===e)throw ba(t);return Uh(e)?t.lanes=32:t.lanes=536870912,null}var o=i.children;return i=i.fallback,a?(Gs(),o=ic({mode:"hidden",children:o},a=t.mode),i=Yi(i,a,n,null),o.return=t,i.return=t,o.sibling=i,t.child=o,(i=t.child).memoizedState=ec(n),i.childLanes=tc(e,r,n),t.memoizedState=$l,Wl(null,i)):(ks(t),rc(t,o))}var l=e.memoizedState;if(null!==l&&null!==(o=l.dehydrated)){if(s)256&t.flags?(ks(t),t.flags&=-257,t=ac(e,t,n)):null!==t.memoizedState?(Gs(),t.child=e.child,t.flags|=128,t=null):(Gs(),o=i.fallback,a=t.mode,i=ic({mode:"visible",children:i.children},a),(o=Yi(o,a,n,null)).flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,ys(t,e.child,null,n),(i=t.child).memoizedState=ec(n),i.childLanes=tc(e,r,n),t.memoizedState=$l,t=Wl(null,i));else if(ks(t),Uh(o)){if(r=o.nextSibling&&o.nextSibling.dataset)var c=r.dgst;r=c,(i=Error(de(419))).stack="",i.digest=r,Ea({value:i,source:null,stack:null}),t=ac(e,t,n)}else if(Ol||Da(e,t,n,!1),r=0!==(n&e.childLanes),Ol||r){if(null!==(r=_u)&&0!==(i=zt(r,n))&&i!==l.retryLane)throw l.retryLane=i,Oi(e,i),$u(r,0,i),Ul;Nh(o)||dd(),t=ac(e,t,n)}else Nh(o)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,ma=Oh(o.nextSibling),pa=t,ga=!0,va=null,ya=!1,null!==e&&fa(t,e),(t=rc(t,i.children)).flags|=4096);return t}return a?(Gs(),o=i.fallback,a=t.mode,c=(l=e.child).sibling,(i=ji(l,{mode:"hidden",children:i.children})).subtreeFlags=65011712&l.subtreeFlags,null!==c?o=ji(c,o):(o=Yi(o,a,n,null)).flags|=2,o.return=t,i.return=t,i.sibling=o,t.child=i,Wl(null,i),i=t.child,null===(o=e.child.memoizedState)?o=ec(n):(null!==(a=o.cachePool)?(l=Va._currentValue,a=a.parent!==l?{parent:l,pool:l}:a):a=ts(),o={baseLanes:o.baseLanes|n,cachePool:a}),i.memoizedState=o,i.childLanes=tc(e,r,n),t.memoizedState=$l,Wl(e.child,i)):(ks(t),e=(n=e.child).sibling,(n=ji(n,{mode:"visible",children:i.children})).return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function rc(e,t){return(t=ic({mode:"visible",children:t},e.mode)).return=e,e.child=t}function ic(e,t){return(e=Vi(22,e,null,t)).lanes=0,e}function ac(e,t,n){return ys(t,e.child,null,n),(e=rc(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function sc(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ba(e.return,t,n)}function oc(e,t,n,r,i,a){var s=e.memoizedState;null===s?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i,s.treeForkCount=a)}function lc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var s=Ws.current,o=!!(2&s);if(o?(s=1&s|2,t.flags|=128):s&=1,Xe(Ws,s),kl(e,t,r,n),r=ga?ra:0,!o&&null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&sc(e,n,t);else if(19===e.tag)sc(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===js(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),oc(t,!1,i,n,a,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===js(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}oc(t,!0,n,null,a,r);break;case"together":oc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function cc(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ru|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(Da(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(de(153));if(null!==t.child){for(n=ji(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=ji(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function uc(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Fa(e))}function dc(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)Ol=!0;else{if(!(uc(e,n)||128&t.flags))return Ol=!1,function(e,t,n){switch(t.tag){case 3:$e(t,t.stateNode.containerInfo),Ia(0,Va,e.memoizedState.cache),Ma();break;case 27:case 5:tt(t);break;case 4:$e(t,t.stateNode.containerInfo);break;case 10:Ia(0,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,zs(t),null;break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(ks(t),t.flags|=128,null):0!==(n&t.child.childLanes)?nc(e,t,n):(ks(t),null!==(e=cc(e,t,n))?e.sibling:null);ks(t);break;case 19:var i=!!(128&e.flags);if((r=0!==(n&t.childLanes))||(Da(e,t,n,!1),r=0!==(n&t.childLanes)),i){if(r)return lc(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Xe(Ws,Ws.current),r)break;return null;case 22:return t.lanes=0,Vl(e,t,n,t.pendingProps);case 24:Ia(0,Va,e.memoizedState.cache)}return cc(e,t,n)}(e,t,n);Ol=!!(131072&e.flags)}else Ol=!1,ga&&1048576&t.flags&&ua(t,ra,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=ls(t.elementType),t.type=e,"function"!=typeof e){if(null!=e){var i=e.$$typeof;if(i===Ce){t.tag=11,t=zl(null,t,e,r,n);break e}if(i===Ie){t.tag=14,t=Hl(null,t,e,r,n);break e}}throw t=Ue(e)||e,Error(de(306,t,""))}Wi(e)?(r=Tl(e,r),t.tag=1,t=Ql(null,t,e,r,n)):(t.tag=0,t=Kl(null,t,e,r,n))}return t;case 0:return Kl(e,t,t.type,t.pendingProps,n);case 1:return Ql(e,t,r=t.type,i=Tl(r,t.pendingProps),n);case 3:e:{if($e(t,t.stateNode.containerInfo),null===e)throw Error(de(387));r=t.pendingProps;var a=t.memoizedState;i=a.element,Ss(e,t),Rs(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ia(0,Va,r),r!==a.cache&&La(t,[Va],n,!0),Ts(),r=s.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Zl(e,t,r,n);break e}if(r!==i){Ea(i=$i(Error(de(424)),t)),t=Zl(e,t,r,n);break e}for(e=9===(e=t.stateNode.containerInfo).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,ma=Oh(e.firstChild),pa=t,ga=!0,va=null,ya=!0,n=_s(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(Ma(),r===i){t=cc(e,t,n);break e}kl(e,t,r,n)}t=t.child}return t;case 26:return Yl(e,t),null===e?(n=qh(t.type,null,t.pendingProps,null))?t.memoizedState=n:ga||(n=t.type,e=t.pendingProps,(r=xh(Qe.current).createElement(n))[Xt]=t,r[Jt]=e,vh(r,n,e),sn(r),t.stateNode=r):t.memoizedState=qh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return tt(t),null===e&&ga&&(r=t.stateNode=Gh(t.type,t.pendingProps,Qe.current),pa=t,ya=!0,i=ma,Ph(t.type)?(kh=i,ma=Oh(r.firstChild)):ma=i),kl(e,t,t.pendingProps.children,n),Yl(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&ga&&((i=r=ma)&&(null!==(r=function(e,t,n,r){for(;1===e.nodeType;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[$t])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(a=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(a!==i.rel||e.getAttribute("href")!==(null==i.href||""===i.href?null:i.href)||e.getAttribute("crossorigin")!==(null==i.crossOrigin?null:i.crossOrigin)||e.getAttribute("title")!==(null==i.title?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((a=e.getAttribute("src"))!==(null==i.src?null:i.src)||e.getAttribute("type")!==(null==i.type?null:i.type)||e.getAttribute("crossorigin")!==(null==i.crossOrigin?null:i.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var a=null==i.name?null:""+i.name;if("hidden"===i.type&&e.getAttribute("name")===a)return e}if(null===(e=Oh(e.nextSibling)))break}return null}(r,t.type,t.pendingProps,ya))?(t.stateNode=r,pa=t,ma=Oh(r.firstChild),ya=!1,i=!0):i=!1),i||ba(t)),tt(t),i=t.type,a=t.pendingProps,s=null!==e?e.memoizedProps:null,r=a.children,Mh(i,a)?r=null:null!==s&&Mh(i,s)&&(t.flags|=32),null!==t.memoizedState&&(i=ao(e,t,lo,null,null,n),gf._currentValue=i),Yl(e,t),kl(e,t,r,n),t.child;case 6:return null===e&&ga&&((e=n=ma)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=Oh(e.nextSibling)))return null}return e}(n,t.pendingProps,ya))?(t.stateNode=n,pa=t,ma=null,e=!0):e=!1),e||ba(t)),null;case 13:return nc(e,t,n);case 4:return $e(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=ys(t,null,r,n):kl(e,t,r,n),t.child;case 11:return zl(e,t,t.type,t.pendingProps,n);case 7:return kl(e,t,t.pendingProps,n),t.child;case 8:case 12:return kl(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ia(0,t.type,r.value),kl(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Na(t),r=r(i=Ua(i)),t.flags|=1,kl(e,t,r,n),t.child;case 14:return Hl(e,t,t.type,t.pendingProps,n);case 15:return Gl(e,t,t.type,t.pendingProps,n);case 19:return lc(e,t,n);case 31:return function(e,t,n){var r=t.pendingProps,i=!!(128&t.flags);if(t.flags&=-129,null===e){if(ga){if("hidden"===r.mode)return e=Xl(t,r),t.lanes=536870912,Wl(null,e);if(zs(t),(e=ma)?null!==(e=null!==(e=Fh(e,ya))&&"&"===e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==sa?{id:oa,overflow:la}:null,retryLane:536870912,hydrationErrors:null},(n=qi(e)).return=t,t.child=n,pa=t,ma=null):e=null,null===e)throw ba(t);return t.lanes=536870912,null}return Xl(t,r)}var a=e.memoizedState;if(null!==a){var s=a.dehydrated;if(zs(t),i)if(256&t.flags)t.flags&=-257,t=Jl(e,t,n);else{if(null===t.memoizedState)throw Error(de(558));t.child=e.child,t.flags|=128,t=null}else if(Ol||Da(e,t,n,!1),i=0!==(n&e.childLanes),Ol||i){if(null!==(r=_u)&&0!==(s=zt(r,n))&&s!==a.retryLane)throw a.retryLane=s,Oi(e,s),$u(r,0,s),Ul;dd(),t=Jl(e,t,n)}else e=a.treeContext,ma=Oh(s.nextSibling),pa=t,ga=!0,va=null,ya=!1,null!==e&&fa(t,e),(t=Xl(t,r)).flags|=4096;return t}return(e=ji(e.child,{mode:r.mode,children:r.children})).ref=t.ref,t.child=e,e.return=t,e}(e,t,n);case 22:return Vl(e,t,n,t.pendingProps);case 24:return Na(t),r=Ua(Va),null===e?(null===(i=$a())&&(i=_u,a=Wa(),i.pooledCache=a,a.refCount++,null!==a&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},xs(t),Ia(0,Va,i)):(0!==(e.lanes&n)&&(Ss(e,t),Rs(t,null,null,n),Ts()),i=e.memoizedState,a=t.memoizedState,i.parent!==r?(i={parent:r,cache:r},t.memoizedState=i,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=i),Ia(0,Va,r)):(r=a.cache,Ia(0,Va,r),r!==i.cache&&La(t,[Va],n,!0))),kl(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(de(156,t.tag))}function hc(e){e.flags|=4}function fc(e,t,n,r,i){if((t=!!(32&e.mode))&&(t=!1),t){if(e.flags|=16777216,(335544128&i)===i)if(e.stateNode.complete)e.flags|=8192;else{if(!ld())throw cs=as,rs;e.flags|=8192}}else e.flags&=-16777217}function pc(e,t){if("stylesheet"!==t.type||4&t.state.loading)e.flags&=-16777217;else if(e.flags|=16777216,!uf(t)){if(!ld())throw cs=as,rs;e.flags|=8192}}function mc(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Ft():536870912,e.lanes|=t,Lu|=t)}function gc(e,t){if(!ga)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function vc(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=65011712&i.subtreeFlags,r|=65011712&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function yc(e,t,n){var r=t.pendingProps;switch(ha(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return vc(t),null;case 3:return n=t.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Pa(Va),et(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(Aa(t)?hc(t):null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,wa())),vc(t),null;case 26:var i=t.type,a=t.memoizedState;return null===e?(hc(t),null!==a?(vc(t),pc(t,a)):(vc(t),fc(t,i,0,0,n))):a?a!==e.memoizedState?(hc(t),vc(t),pc(t,a)):(vc(t),t.flags&=-16777217):((e=e.memoizedProps)!==r&&hc(t),vc(t),fc(t,i,0,0,n)),null;case 27:if(nt(t),n=Qe.current,i=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&hc(t);else{if(!r){if(null===t.stateNode)throw Error(de(166));return vc(t),null}e=Ke.current,Aa(t)?xa(t):(e=Gh(i,r,n),t.stateNode=e,hc(t))}return vc(t),null;case 5:if(nt(t),i=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&hc(t);else{if(!r){if(null===t.stateNode)throw Error(de(166));return vc(t),null}if(a=Ke.current,Aa(t))xa(t);else{var s=xh(Qe.current);switch(a){case 1:a=s.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:a=s.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":a=s.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":a=s.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":(a=s.createElement("div")).innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a="string"==typeof r.is?s.createElement("select",{is:r.is}):s.createElement("select"),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a="string"==typeof r.is?s.createElement(i,{is:r.is}):s.createElement(i)}}a[Xt]=t,a[Jt]=r;e:for(s=t.child;null!==s;){if(5===s.tag||6===s.tag)a.appendChild(s.stateNode);else if(4!==s.tag&&27!==s.tag&&null!==s.child){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;null===s.sibling;){if(null===s.return||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=a;e:switch(vh(a,i,r),i){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&hc(t)}}return vc(t),fc(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&hc(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(de(166));if(e=Qe.current,Aa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(i=pa))switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Xt]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||ph(e.nodeValue,n)))||ba(t,!0)}else(e=xh(e).createTextNode(r))[Xt]=t,t.stateNode=e}return vc(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(r=Aa(t),null!==n){if(null===e){if(!r)throw Error(de(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(de(557));e[Xt]=t}else Ma(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;vc(t),e=!1}else n=wa(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(Vs(t),t):(Vs(t),null);if(128&t.flags)throw Error(de(558))}return vc(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=Aa(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(de(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(de(317));i[Xt]=t}else Ma(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;vc(t),i=!1}else i=wa(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return 256&t.flags?(Vs(t),t):(Vs(t),null)}return Vs(t),128&t.flags?(t.lanes=n,t):(n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(i=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(i=r.alternate.memoizedState.cachePool.pool),a=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),mc(t,t.updateQueue),vc(t),null);case 4:return et(),null===e&&ih(t.stateNode.containerInfo),vc(t),null;case 10:return Pa(t.type),vc(t),null;case 19:if(je(Ws),null===(r=t.memoizedState))return vc(t),null;if(i=!!(128&t.flags),null===(a=r.rendering))if(i)gc(r,!1);else{if(0!==Tu||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(a=js(e))){for(t.flags|=128,gc(r,!1),e=a.updateQueue,t.updateQueue=e,mc(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Xi(n,e),n=n.sibling;return Xe(Ws,1&Ws.current|2),ga&&ca(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&ft()>ku&&(t.flags|=128,i=!0,gc(r,!1),t.lanes=4194304)}else{if(!i)if(null!==(e=js(a))){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,mc(t,e),gc(r,!0),null===r.tail&&"hidden"===r.tailMode&&!a.alternate&&!ga)return vc(t),null}else 2*ft()-r.renderingStartTime>ku&&536870912!==n&&(t.flags|=128,i=!0,gc(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=r.last)?e.sibling=a:t.child=a,r.last=a)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ft(),e.sibling=null,n=Ws.current,Xe(Ws,i?1&n|2:1&n),ga&&ca(t,r.treeForkCount),e):(vc(t),null);case 22:case 23:return Vs(t),Ns(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?!!(536870912&n)&&!(128&t.flags)&&(vc(t),6&t.subtreeFlags&&(t.flags|=8192)):vc(t),null!==(n=t.updateQueue)&&mc(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&je(Za),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Pa(Va),vc(t),null;case 25:case 30:return null}throw Error(de(156,t.tag))}function _c(e,t){switch(ha(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Pa(Va),et(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return nt(t),null;case 31:if(null!==t.memoizedState){if(Vs(t),null===t.alternate)throw Error(de(340));Ma()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(Vs(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(de(340));Ma()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return je(Ws),null;case 4:return et(),null;case 10:return Pa(t.type),null;case 22:case 23:return Vs(t),Ns(),null!==e&&je(Za),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return Pa(Va),null;default:return null}}function bc(e,t){switch(ha(t),t.tag){case 3:Pa(Va),et();break;case 26:case 27:case 5:nt(t);break;case 4:et();break;case 31:null!==t.memoizedState&&Vs(t);break;case 13:Vs(t);break;case 19:je(Ws);break;case 10:Pa(t.type);break;case 22:case 23:Vs(t),Ns(),null!==e&&je(Za);break;case 24:Pa(Va)}}function xc(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,s=n.inst;r=a(),s.destroy=r}n=n.next}while(n!==i)}}catch(dv){Td(t,t.return,dv)}}function Sc(e,t,n){try{var r=t.updateQueue,i=null!==r?r.lastEffect:null;if(null!==i){var a=i.next;r=a;do{if((r.tag&e)===e){var s=r.inst,o=s.destroy;if(void 0!==o){s.destroy=void 0,i=t;var l=n,c=o;try{c()}catch(dv){Td(i,l,dv)}}}r=r.next}while(r!==a)}}catch(dv){Td(t,t.return,dv)}}function Ac(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Ps(t,n)}catch(dv){Td(e,e.return,dv)}}}function Mc(e,t,n){n.props=Tl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(dv){Td(e,t,dv)}}function wc(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"==typeof n?e.refCleanup=n(r):n.current=r}}catch(dv){Td(e,t,dv)}}function Ec(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(dv){Td(e,t,dv)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(i){Td(e,t,i)}else n.current=null}function Cc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(dv){Td(e,e.return,dv)}}function Tc(e,t,n){try{var r=e.stateNode;!function(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,a=null,s=null,o=null,l=null,c=null,u=null;for(f in n){var d=n[f];if(n.hasOwnProperty(f)&&null!=d)switch(f){case"checked":case"value":break;case"defaultValue":l=d;default:r.hasOwnProperty(f)||mh(e,t,f,null,r,d)}}for(var h in r){var f=r[h];if(d=n[h],r.hasOwnProperty(h)&&(null!=f||null!=d))switch(h){case"type":a=f;break;case"name":i=f;break;case"checked":c=f;break;case"defaultChecked":u=f;break;case"value":s=f;break;case"defaultValue":o=f;break;case"children":case"dangerouslySetInnerHTML":if(null!=f)throw Error(de(137,t));break;default:f!==d&&mh(e,t,h,f,r,d)}}return void Mn(e,s,o,l,c,u,a,i);case"select":for(a in f=s=o=h=null,n)if(l=n[a],n.hasOwnProperty(a)&&null!=l)switch(a){case"value":break;case"multiple":f=l;default:r.hasOwnProperty(a)||mh(e,t,a,null,r,l)}for(i in r)if(a=r[i],l=n[i],r.hasOwnProperty(i)&&(null!=a||null!=l))switch(i){case"value":h=a;break;case"defaultValue":o=a;break;case"multiple":s=a;default:a!==l&&mh(e,t,i,a,r,l)}return t=o,n=s,r=f,void(null!=h?Cn(e,!!n,h,!1):!!r!=!!n&&(null!=t?Cn(e,!!n,t,!0):Cn(e,!!n,n?[]:"",!1)));case"textarea":for(o in f=h=null,n)if(i=n[o],n.hasOwnProperty(o)&&null!=i&&!r.hasOwnProperty(o))switch(o){case"value":case"children":break;default:mh(e,t,o,null,r,i)}for(s in r)if(i=r[s],a=n[s],r.hasOwnProperty(s)&&(null!=i||null!=a))switch(s){case"value":h=i;break;case"defaultValue":f=i;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=i)throw Error(de(91));break;default:i!==a&&mh(e,t,s,i,r,a)}return void Tn(e,h,f);case"option":for(var p in n)h=n[p],n.hasOwnProperty(p)&&null!=h&&!r.hasOwnProperty(p)&&("selected"===p?e.selected=!1:mh(e,t,p,null,r,h));for(l in r)h=r[l],f=n[l],!r.hasOwnProperty(l)||h===f||null==h&&null==f||("selected"===l?e.selected=h&&"function"!=typeof h&&"symbol"!=typeof h:mh(e,t,l,h,r,f));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 m in n)h=n[m],n.hasOwnProperty(m)&&null!=h&&!r.hasOwnProperty(m)&&mh(e,t,m,null,r,h);for(c in r)if(h=r[c],f=n[c],r.hasOwnProperty(c)&&h!==f&&(null!=h||null!=f))switch(c){case"children":case"dangerouslySetInnerHTML":if(null!=h)throw Error(de(137,t));break;default:mh(e,t,c,h,r,f)}return;default:if(Dn(t)){for(var g in n)h=n[g],n.hasOwnProperty(g)&&void 0!==h&&!r.hasOwnProperty(g)&&gh(e,t,g,void 0,r,h);for(u in r)h=r[u],f=n[u],!r.hasOwnProperty(u)||h===f||void 0===h&&void 0===f||gh(e,t,u,h,r,f);return}}for(var v in n)h=n[v],n.hasOwnProperty(v)&&null!=h&&!r.hasOwnProperty(v)&&mh(e,t,v,null,r,h);for(d in r)h=r[d],f=n[d],!r.hasOwnProperty(d)||h===f||null==h&&null==f||mh(e,t,d,h,r,f)}(r,e.type,n,t),r[Jt]=t}catch(dv){Td(e,e.return,dv)}}function Rc(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&Ph(e.type)||4===e.tag}function Ic(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Rc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&Ph(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Pc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=On));else if(4!==r&&(27===r&&Ph(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(Pc(e,t,n),e=e.sibling;null!==e;)Pc(e,t,n),e=e.sibling}function Bc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&Ph(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(Bc(e,t,n),e=e.sibling;null!==e;)Bc(e,t,n),e=e.sibling}function Lc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);vh(t,r,n),t[Xt]=e,t[Jt]=n}catch(dv){Td(e,e.return,dv)}}var Dc=!1,Fc=!1,Nc=!1,Uc="function"==typeof WeakSet?WeakSet:Set,Oc=null;function kc(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:$c(e,n),4&r&&xc(5,n);break;case 1:if($c(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(dv){Td(n,n.return,dv)}else{var i=Tl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){Td(n,n.return,s)}}64&r&&Ac(n),512&r&&wc(n,n.return);break;case 3:if($c(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{Ps(e,t)}catch(dv){Td(n,n.return,dv)}}break;case 27:null===t&&4&r&&Lc(n);case 26:case 5:$c(e,n),null===t&&4&r&&Cc(n),512&r&&wc(n,n.return);break;case 12:$c(e,n);break;case 31:$c(e,n),4&r&&jc(e,n);break;case 13:$c(e,n),4&r&&Xc(e,n),64&r&&null!==(e=n.memoizedState)&&null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=Bd.bind(null,n));break;case 22:if(!(r=null!==n.memoizedState||Dc)){t=null!==t&&null!==t.memoizedState||Fc,i=Dc;var a=Fc;Dc=r,(Fc=t)&&!a?tu(e,n,!!(8772&n.subtreeFlags)):$c(e,n),Dc=i,Fc=a}break;case 30:break;default:$c(e,n)}}function zc(e){var t=e.alternate;null!==t&&(e.alternate=null,zc(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&en(t),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Hc=null,Gc=!1;function Vc(e,t,n){for(n=n.child;null!==n;)Wc(e,t,n),n=n.sibling}function Wc(e,t,n){if(At&&"function"==typeof At.onCommitFiberUnmount)try{At.onCommitFiberUnmount(St,n)}catch(a){}switch(n.tag){case 26:Fc||Ec(n,t),Vc(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Fc||Ec(n,t);var r=Hc,i=Gc;Ph(n.type)&&(Hc=n.stateNode,Gc=!1),Vc(e,t,n),Vh(n.stateNode),Hc=r,Gc=i;break;case 5:Fc||Ec(n,t);case 6:if(r=Hc,i=Gc,Hc=null,Vc(e,t,n),Gc=i,null!==(Hc=r))if(Gc)try{(9===Hc.nodeType?Hc.body:"HTML"===Hc.nodeName?Hc.ownerDocument.body:Hc).removeChild(n.stateNode)}catch(dv){Td(n,t,dv)}else try{Hc.removeChild(n.stateNode)}catch(dv){Td(n,t,dv)}break;case 18:null!==Hc&&(Gc?(Bh(9===(e=Hc).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),qf(e)):Bh(Hc,n.stateNode));break;case 4:r=Hc,i=Gc,Hc=n.stateNode.containerInfo,Gc=!0,Vc(e,t,n),Hc=r,Gc=i;break;case 0:case 11:case 14:case 15:Sc(2,n,t),Fc||Sc(4,n,t),Vc(e,t,n);break;case 1:Fc||(Ec(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&Mc(n,t,r)),Vc(e,t,n);break;case 21:Vc(e,t,n);break;case 22:Fc=(r=Fc)||null!==n.memoizedState,Vc(e,t,n),Fc=r;break;default:Vc(e,t,n)}}function jc(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)){e=e.dehydrated;try{qf(e)}catch(dv){Td(t,t.return,dv)}}}function Xc(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))try{qf(e)}catch(dv){Td(t,t.return,dv)}}function Jc(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Uc),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Uc),t;default:throw Error(de(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ld.bind(null,e,t);t.then(r,r)}})}function Yc(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r],a=e,s=t,o=s;e:for(;null!==o;){switch(o.tag){case 27:if(Ph(o.type)){Hc=o.stateNode,Gc=!1;break e}break;case 5:Hc=o.stateNode,Gc=!1;break e;case 3:case 4:Hc=o.stateNode.containerInfo,Gc=!0;break e}o=o.return}if(null===Hc)throw Error(de(160));Wc(a,s,i),Hc=null,Gc=!1,null!==(a=i.alternate)&&(a.return=null),i.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)qc(t,e),t=t.sibling}var Kc=null;function qc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Yc(t,e),Qc(e),4&r&&(Sc(3,e,e.return),xc(3,e),Sc(5,e,e.return));break;case 1:Yc(t,e),Qc(e),512&r&&(Fc||null===n||Ec(n,n.return)),64&r&&Dc&&null!==(e=e.updateQueue)&&null!==(r=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?r:n.concat(r));break;case 26:var i=Kc;if(Yc(t,e),Qc(e),512&r&&(Fc||null===n||Ec(n,n.return)),4&r){var a=null!==n?n.memoizedState:null;if(r=e.memoizedState,null===n)if(null===r)if(null===e.stateNode){e:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(r){case"title":(!(a=i.getElementsByTagName("title")[0])||a[$t]||a[Xt]||"http://www.w3.org/2000/svg"===a.namespaceURI||a.hasAttribute("itemprop"))&&(a=i.createElement(r),i.head.insertBefore(a,i.querySelector("head > title"))),vh(a,r,n),a[Xt]=e,sn(a),r=a;break e;case"link":var s=lf("link","href",i).get(r+(n.href||""));if(s)for(var o=0;o<s.length;o++)if((a=s[o]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&a.getAttribute("rel")===(null==n.rel?null:n.rel)&&a.getAttribute("title")===(null==n.title?null:n.title)&&a.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){s.splice(o,1);break t}vh(a=i.createElement(r),r,n),i.head.appendChild(a);break;case"meta":if(s=lf("meta","content",i).get(r+(n.content||"")))for(o=0;o<s.length;o++)if((a=s[o]).getAttribute("content")===(null==n.content?null:""+n.content)&&a.getAttribute("name")===(null==n.name?null:n.name)&&a.getAttribute("property")===(null==n.property?null:n.property)&&a.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&a.getAttribute("charset")===(null==n.charSet?null:n.charSet)){s.splice(o,1);break t}vh(a=i.createElement(r),r,n),i.head.appendChild(a);break;default:throw Error(de(468,r))}a[Xt]=e,sn(a),r=a}e.stateNode=r}else cf(i,e.type,e.stateNode);else e.stateNode=nf(i,r,e.memoizedProps);else a!==r?(null===a?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):a.count--,null===r?cf(i,e.type,e.stateNode):nf(i,r,e.memoizedProps)):null===r&&null!==e.stateNode&&Tc(e,e.memoizedProps,n.memoizedProps)}break;case 27:Yc(t,e),Qc(e),512&r&&(Fc||null===n||Ec(n,n.return)),null!==n&&4&r&&Tc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Yc(t,e),Qc(e),512&r&&(Fc||null===n||Ec(n,n.return)),32&e.flags){i=e.stateNode;try{In(i,"")}catch(dv){Td(e,e.return,dv)}}4&r&&null!=e.stateNode&&Tc(e,i=e.memoizedProps,null!==n?n.memoizedProps:i),1024&r&&(Nc=!0);break;case 6:if(Yc(t,e),Qc(e),4&r){if(null===e.stateNode)throw Error(de(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(dv){Td(e,e.return,dv)}}break;case 3:if(of=null,i=Kc,Kc=Xh(t.containerInfo),Yc(t,e),Kc=i,Qc(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{qf(t.containerInfo)}catch(dv){Td(e,e.return,dv)}Nc&&(Nc=!1,Zc(e));break;case 4:r=Kc,Kc=Xh(e.stateNode.containerInfo),Yc(t,e),Qc(e),Kc=r;break;case 12:default:Yc(t,e),Qc(e);break;case 31:case 19:Yc(t,e),Qc(e),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,Jc(e,r));break;case 13:Yc(t,e),Qc(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(Uu=ft()),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,Jc(e,r));break;case 22:i=null!==e.memoizedState;var l=null!==n&&null!==n.memoizedState,c=Dc,u=Fc;if(Dc=c||i,Fc=u||l,Yc(t,e),Fc=u,Dc=c,Qc(e),8192&r)e:for(t=e.stateNode,t._visibility=i?-2&t._visibility:1|t._visibility,i&&(null===n||l||Dc||Fc||eu(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){l=n=t;try{if(a=l.stateNode,i)"function"==typeof(s=a.style).setProperty?s.setProperty("display","none","important"):s.display="none";else{o=l.stateNode;var d=l.memoizedProps.style,h=null!=d&&d.hasOwnProperty("display")?d.display:null;o.style.display=null==h||"boolean"==typeof h?"":(""+h).trim()}}catch(dv){Td(l,l.return,dv)}}}else if(6===t.tag){if(null===n){l=t;try{l.stateNode.nodeValue=i?"":l.memoizedProps}catch(dv){Td(l,l.return,dv)}}}else if(18===t.tag){if(null===n){l=t;try{var f=l.stateNode;i?Lh(f,!0):Lh(l.stateNode,!1)}catch(dv){Td(l,l.return,dv)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&r&&null!==(r=e.updateQueue)&&null!==(n=r.retryQueue)&&(r.retryQueue=null,Jc(e,n));case 30:case 21:}}function Qc(e){var t=e.flags;if(2&t){try{for(var n,r=e.return;null!==r;){if(Rc(r)){n=r;break}r=r.return}if(null==n)throw Error(de(160));switch(n.tag){case 27:var i=n.stateNode;Bc(e,Ic(e),i);break;case 5:var a=n.stateNode;32&n.flags&&(In(a,""),n.flags&=-33),Bc(e,Ic(e),a);break;case 3:case 4:var s=n.stateNode.containerInfo;Pc(e,Ic(e),s);break;default:throw Error(de(161))}}catch(dv){Td(e,e.return,dv)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Zc(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;Zc(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function $c(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)kc(e,t.alternate,t),t=t.sibling}function eu(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Sc(4,t,t.return),eu(t);break;case 1:Ec(t,t.return);var n=t.stateNode;"function"==typeof n.componentWillUnmount&&Mc(t,t.return,n),eu(t);break;case 27:Vh(t.stateNode);case 26:case 5:Ec(t,t.return),eu(t);break;case 22:null===t.memoizedState&&eu(t);break;default:eu(t)}e=e.sibling}}function tu(e,t,n){for(n=n&&!!(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,i=e,a=t,s=a.flags;switch(a.tag){case 0:case 11:case 15:tu(i,a,n),xc(4,a);break;case 1:if(tu(i,a,n),"function"==typeof(i=(r=a).stateNode).componentDidMount)try{i.componentDidMount()}catch(dv){Td(r,r.return,dv)}if(null!==(i=(r=a).updateQueue)){var o=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(null!==l)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)Is(l[i],o)}catch(dv){Td(r,r.return,dv)}}n&&64&s&&Ac(a),wc(a,a.return);break;case 27:Lc(a);case 26:case 5:tu(i,a,n),n&&null===r&&4&s&&Cc(a),wc(a,a.return);break;case 12:tu(i,a,n);break;case 31:tu(i,a,n),n&&4&s&&jc(i,a);break;case 13:tu(i,a,n),n&&4&s&&Xc(i,a);break;case 22:null===a.memoizedState&&tu(i,a,n),wc(a,a.return);break;case 30:break;default:tu(i,a,n)}t=t.sibling}}function nu(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&ja(n))}function ru(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&ja(e))}function iu(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)au(e,t,n,r),t=t.sibling}function au(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:iu(e,t,n,r),2048&i&&xc(9,t);break;case 1:case 31:case 13:default:iu(e,t,n,r);break;case 3:iu(e,t,n,r),2048&i&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&ja(e)));break;case 12:if(2048&i){iu(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,s=a.id,o=a.onPostCommit;"function"==typeof o&&o(s,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(dv){Td(t,t.return,dv)}}else iu(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,s=t.alternate,null!==t.memoizedState?2&a._visibility?iu(e,t,n,r):ou(e,t):2&a._visibility?iu(e,t,n,r):(a._visibility|=2,su(e,t,n,r,!!(10256&t.subtreeFlags)||!1)),2048&i&&nu(s,t);break;case 24:iu(e,t,n,r),2048&i&&ru(t.alternate,t)}}function su(e,t,n,r,i){for(i=i&&(!!(10256&t.subtreeFlags)||!1),t=t.child;null!==t;){var a=e,s=t,o=n,l=r,c=s.flags;switch(s.tag){case 0:case 11:case 15:su(a,s,o,l,i),xc(8,s);break;case 23:break;case 22:var u=s.stateNode;null!==s.memoizedState?2&u._visibility?su(a,s,o,l,i):ou(a,s):(u._visibility|=2,su(a,s,o,l,i)),i&&2048&c&&nu(s.alternate,s);break;case 24:su(a,s,o,l,i),i&&2048&c&&ru(s.alternate,s);break;default:su(a,s,o,l,i)}t=t.sibling}}function ou(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:ou(n,r),2048&i&&nu(r.alternate,r);break;case 24:ou(n,r),2048&i&&ru(r.alternate,r);break;default:ou(n,r)}t=t.sibling}}var lu=8192;function cu(e,t,n){if(e.subtreeFlags&lu)for(e=e.child;null!==e;)uu(e,t,n),e=e.sibling}function uu(e,t,n){switch(e.tag){case 26:cu(e,t,n),e.flags&lu&&null!==e.memoizedState&&function(e,t,n,r){if(!("stylesheet"!==n.type||"string"==typeof r.media&&!1===matchMedia(r.media).matches||4&n.state.loading)){if(null===n.instance){var i=Qh(r.href),a=t.querySelector(Zh(i));if(a)return null!==(t=a._p)&&"object"==typeof t&&"function"==typeof t.then&&(e.count++,e=hf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,void sn(a);a=t.ownerDocument||t,r=$h(r),(i=Wh.get(i))&&af(r,i),sn(a=a.createElement("link"));var s=a;s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),vh(a,"link",r),n.instance=a}null===e.stylesheets&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(3&n.state.loading)&&(e.count++,n=hf.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}(n,Kc,e.memoizedState,e.memoizedProps);break;case 5:default:cu(e,t,n);break;case 3:case 4:var r=Kc;Kc=Xh(e.stateNode.containerInfo),cu(e,t,n),Kc=r;break;case 22:null===e.memoizedState&&(null!==(r=e.alternate)&&null!==r.memoizedState?(r=lu,lu=16777216,cu(e,t,n),lu=r):cu(e,t,n))}}function du(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function hu(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Oc=r,mu(r,e)}du(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)fu(e),e=e.sibling}function fu(e){switch(e.tag){case 0:case 11:case 15:hu(e),2048&e.flags&&Sc(9,e,e.return);break;case 3:case 12:default:hu(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,pu(e)):hu(e)}}function pu(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Oc=r,mu(r,e)}du(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:Sc(8,t,t.return),pu(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,pu(t));break;default:pu(t)}e=e.sibling}}function mu(e,t){for(;null!==Oc;){var n=Oc;switch(n.tag){case 0:case 11:case 15:Sc(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:ja(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,Oc=r;else e:for(n=e;null!==Oc;){var i=(r=Oc).sibling,a=r.return;if(zc(r),r===n){Oc=null;break e}if(null!==i){i.return=a,Oc=i;break e}Oc=a}}}var gu={getCacheForType:function(e){var t=Ua(Va),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ua(Va).controller.signal}},vu="function"==typeof WeakMap?WeakMap:Map,yu=0,_u=null,bu=null,xu=0,Su=0,Au=null,Mu=!1,wu=!1,Eu=!1,Cu=0,Tu=0,Ru=0,Iu=0,Pu=0,Bu
vendor: 5,753 bytes, line 20
20=0,Lu=0,Du=null,Fu=null,Nu=!1,Uu=0,Ou=0,ku=1/0,zu=null,Hu=null,Gu=0,Vu=null,Wu=null,ju=0,Xu=0,Ju=null,Yu=null,Ku=0,qu=null;function Qu(){return 2&yu&&0!==xu?xu&-xu:null!==ke.T?Jd():Vt()}function Zu(){if(0===Bu)if(536870912&xu&&!ga)Bu=536870912;else{var e=Rt;!(3932160&(Rt<<=1))&&(Rt=262144),Bu=e}return null!==(e=Us.current)&&(e.flags|=32),Bu}function $u(e,t,n){(e!==_u||2!==Su&&9!==Su)&&null===e.cancelPendingCommit||(sd(e,0),rd(e,xu,Bu,!1)),Ut(e,n),2&yu&&e===_u||(e===_u&&(!(2&yu)&&(Iu|=n),4===Tu&&rd(e,xu,Bu,!1)),zd(e))}function ed(e,t,n){if(6&yu)throw Error(de(327));for(var r=!n&&!(127&t)&&0===(t&e.expiredLanes)||Lt(e,t),i=r?function(e,t){var n=yu;yu|=2;var r=cd(),i=ud();_u!==e||xu!==t?(zu=null,ku=ft()+500,sd(e,t)):wu=Lt(e,t);e:for(;;)try{if(0!==Su&&null!==bu){t=bu;var a=Au;t:switch(Su){case 1:Su=0,Au=null,vd(e,t,a,1);break;case 2:case 9:if(ss(a)){Su=0,Au=null,gd(t);break}t=function(){2!==Su&&9!==Su||_u!==e||(Su=7),zd(e)},a.then(t,t);break e;case 3:Su=7;break e;case 4:Su=5;break e;case 7:ss(a)?(Su=0,Au=null,gd(t)):(Su=0,Au=null,vd(e,t,a,7));break;case 5:var s=null;switch(bu.tag){case 26:s=bu.memoizedState;case 5:case 27:var o=bu;if(s?uf(s):o.stateNode.complete){Su=0,Au=null;var l=o.sibling;if(null!==l)bu=l;else{var c=o.return;null!==c?(bu=c,yd(c)):bu=null}break t}}Su=0,Au=null,vd(e,t,a,5);break;case 6:Su=0,Au=null,vd(e,t,a,6);break;case 8:ad(),Tu=6;break e;default:throw Error(de(462))}}pd();break}catch(u){od(e,u)}return Ra=Ta=null,ke.H=r,ke.A=i,yu=n,null!==bu?0:(_u=null,xu=0,Fi(),Tu)}(e,t):hd(e,t,!0),a=r;;){if(0===i){wu&&!r&&rd(e,t,0,!1);break}if(n=e.current.alternate,!a||nd(n)){if(2===i){if(a=t,e.errorRecoveryDisabledLanes&a)var s=0;else s=0!=(s=-536870913&e.pendingLanes)?s:536870912&s?536870912:0;if(0!==s){t=s;e:{var o=e;i=Du;var l=o.current.memoizedState.isDehydrated;if(l&&(sd(o,s).flags|=256),2!==(s=hd(o,s,!1))){if(Eu&&!l){o.errorRecoveryDisabledLanes|=a,Iu|=a,i=4;break e}a=Fu,Fu=i,null!==a&&(null===Fu?Fu=a:Fu.push.apply(Fu,a))}i=s}if(a=!1,2!==i)continue}}if(1===i){sd(e,0),rd(e,t,0,!0);break}e:{switch(r=e,a=i){case 0:case 1:throw Error(de(345));case 4:if((4194048&t)!==t)break;case 6:rd(r,t,Bu,!Mu);break e;case 2:Fu=null;break;case 3:case 5:break;default:throw Error(de(329))}if((62914560&t)===t&&10<(i=Uu+300-ft())){if(rd(r,t,Bu,!Mu),0!==Bt(r,0,!0))break e;ju=t,r.timeoutHandle=Eh(td.bind(null,r,n,Fu,zu,Nu,t,Bu,Iu,Lu,Mu,a,"Throttled",-0,0),i)}else td(r,n,Fu,zu,Nu,t,Bu,Iu,Lu,Mu,a,null,-0,0)}break}i=hd(e,t,!1),a=!1}zd(e)}function td(e,t,n,r,i,a,s,o,l,c,u,d,h,f){if(e.timeoutHandle=-1,8192&(d=t.subtreeFlags)||!(16785408&~d)){uu(t,a,d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:On});var p=(62914560&a)===a?Uu-ft():(4194048&a)===a?Ou-ft():0;if(p=function(e,t){return e.stylesheets&&0===e.count&&pf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&pf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&0===df&&(df=62500*function(){if("function"==typeof performance.getEntriesByType){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,s=i.initiatorType,o=i.duration;if(a&&o&&yh(s)){for(s=0,o=i.responseEnd,r+=1;r<n.length;r++){var l=n[r],c=l.startTime;if(c>o)break;var u=l.transferSize,d=l.initiatorType;u&&yh(d)&&(s+=u*((l=l.responseEnd)<o?1:(o-c)/(l-c)))}if(--r,t+=8*(a+s)/(i.duration/1e3),10<++e)break}}if(0<e)return t/e/1e6}return navigator.connection&&"number"==typeof(e=navigator.connection.downlink)?e:5}());var i=setTimeout(function(){if(e.waitingForImages=!1,0===e.count&&(e.stylesheets&&pf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>df?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}(d,p),null!==p)return ju=a,e.cancelPendingCommit=p(bd.bind(null,e,t,a,n,r,i,s,o,l,u,d,null,h,f)),void rd(e,a,s,!c)}bd(e,t,a,n,r,i,s,o,l)}function nd(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&null!==(n=t.updateQueue)&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!ri(a(),i))return!1}catch(dv){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function rd(e,t,n,r){t&=~Pu,t&=~Iu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-wt(i),s=1<<a;r[a]=-1,i&=~s}0!==n&&Ot(e,n,t)}function id(){return!!(6&yu)||(Hd(0),!1)}function ad(){if(null!==bu){if(0===Su)var e=bu.return;else Ra=Ta=null,ho(e=bu),hs=null,fs=0,e=bu;for(;null!==e;)bc(e.alternate,e),e=e.return;bu=null}}function sd(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,Ch(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),ju=0,ad(),_u=e,bu=n=ji(e.current,null),xu=t,Su=0,Au=null,Mu=!1,wu=Lt(e,t),Eu=!1,Lu=Bu=Pu=Iu=Ru=Tu=0,Fu=Du=null,Nu=!1,8&t&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var i=31-wt(r),a=1<<i;t|=e[i],r&=~a}return Cu=t,Fi(),n}function od(e,t){Js=null,ke.H=bl,t===ns||t===is?(t=us(),Su=3):t===rs?(t=us(),Su=4):Su=t===Ul?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,Au=t,null===bu&&(Tu=1,Bl(e,$i(t,e.current)))}function ld(){var e=Us.current;return null===e||((4194048&xu)===xu?null===Os:!!((62914560&xu)===xu||536870912&xu)&&e===Os)}function cd(){var e=ke.H;return ke.H=bl,null===e?bl:e}function ud(){var e=ke.A;return ke.A=gu,e}function dd(){Tu=4,Mu||(4194048&xu)!==xu&&null!==Us.current||(wu=!0),!(134217727&Ru)&&!(134217727&Iu)||null===_u||rd(_u,xu,Bu,!1)}
vendor: 4,779 bytes, line 20
20function hd(e,t,n){var r=yu;yu|=2;var i=cd(),a=ud();_u===e&&xu===t||(zu=null,sd(e,t)),t=!1;var s=Tu;e:for(;;)try{if(0!==Su&&null!==bu){var o=bu,l=Au;switch(Su){case 8:ad(),s=6;break e;case 3:case 2:case 9:case 6:null===Us.current&&(t=!0);var c=Su;if(Su=0,Au=null,vd(e,o,l,c),n&&wu){s=0;break e}break;default:c=Su,Su=0,Au=null,vd(e,o,l,c)}}fd(),s=Tu;break}catch(u){od(e,u)}return t&&e.shellSuspendCounter++,Ra=Ta=null,yu=r,ke.H=i,ke.A=a,null===bu&&(_u=null,xu=0,Fi()),s}function fd(){for(;null!==bu;)md(bu)}function pd(){for(;null!==bu&&!dt();)md(bu)}function md(e){var t=dc(e.alternate,e,Cu);e.memoizedProps=e.pendingProps,null===t?yd(e):bu=t}function gd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=ql(n,t,t.pendingProps,t.type,void 0,xu);break;case 11:t=ql(n,t,t.pendingProps,t.type.render,t.ref,xu);break;case 5:ho(t);default:bc(n,t),t=dc(n,t=bu=Xi(t,Cu),Cu)}e.memoizedProps=e.pendingProps,null===t?yd(e):bu=t}function vd(e,t,n,r){Ra=Ta=null,ho(t),hs=null,fs=0;var i=t.return;try{if(function(e,t,n,r,i){if(n.flags|=32768,null!==r&&"object"==typeof r&&"function"==typeof r.then){if(null!==(t=n.alternate)&&Da(t,n,i,!0),null!==(n=Us.current)){switch(n.tag){case 31:case 13:return null===Os?dd():null===n.alternate&&0===Tu&&(Tu=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===as?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([r]):t.add(r),Rd(e,r,i)),!1;case 22:return n.flags|=65536,r===as?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([r]):n.add(r),Rd(e,r,i)),!1}throw Error(de(435,n.tag))}return Rd(e,r,i),dd(),!1}if(ga)return null!==(t=Us.current)?(!(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==_a&&Ea($i(e=Error(de(422),{cause:r}),n))):(r!==_a&&Ea($i(t=Error(de(423),{cause:r}),n)),(e=e.current.alternate).flags|=65536,i&=-i,e.lanes|=i,r=$i(r,n),Es(e,i=Dl(e.stateNode,r,i)),4!==Tu&&(Tu=2)),!1;var a=Error(de(520),{cause:r});if(a=$i(a,n),null===Du?Du=[a]:Du.push(a),4!==Tu&&(Tu=2),null===t)return!0;r=$i(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,Es(n,e=Dl(n.stateNode,r,e)),!1;case 1:if(t=n.type,a=n.stateNode,!(128&n.flags||"function"!=typeof t.getDerivedStateFromError&&(null===a||"function"!=typeof a.componentDidCatch||null!==Hu&&Hu.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,Nl(i=Fl(i),e,n,r),Es(n,i),!1}n=n.return}while(null!==n);return!1}(e,i,t,n,xu))return Tu=1,Bl(e,$i(n,e.current)),void(bu=null)}catch(dv){if(null!==i)throw bu=i,dv;return Tu=1,Bl(e,$i(n,e.current)),void(bu=null)}32768&t.flags?(ga||1===r?e=!0:wu||536870912&xu?e=!1:(Mu=e=!0,(2===r||9===r||3===r||6===r)&&null!==(r=Us.current)&&13===r.tag&&(r.flags|=16384)),_d(t,e)):yd(t)}function yd(e){var t=e;do{if(32768&t.flags)return void _d(t,Mu);e=t.return;var n=yc(t.alternate,t,Cu);if(null!==n)return void(bu=n);if(null!==(t=t.sibling))return void(bu=t);bu=t=e}while(null!==t);0===Tu&&(Tu=5)}function _d(e,t){do{var n=_c(e.alternate,e);if(null!==n)return n.flags&=32767,void(bu=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(bu=e);bu=e=n}while(null!==e);Tu=6,bu=null}function bd(e,t,n,r,i,a,s,o,l){e.cancelPendingCommit=null;do{wd()}while(0!==Gu);if(6&yu)throw Error(de(327));if(null!==t){if(t===e.current)throw Error(de(177));if(a=t.lanes|t.childLanes,function(e,t,n,r,i,a){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=s&~n;0<n;){var u=31-wt(n),d=1<<u;o[u]=0,l[u]=-1;var h=c[u];if(null!==h)for(c[u]=null,u=0;u<h.length;u++){var f=h[u];null!==f&&(f.lane&=-536870913)}n&=~d}0!==r&&Ot(e,r,0),0!==a&&0===i&&0!==e.tag&&(e.suspendedLanes|=a&~(s&~t))}(e,n,a|=Di,s,o,l),e===_u&&(bu=_u=null,xu=0),Wu=t,Vu=e,ju=n,Xu=a,Ju=i,Yu=r,10256&t.subtreeFlags||10256&t.flags?(e.callbackNode=null,e.callbackPriority=0,ct(vt,function(){return Ed(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(13878&t.flags),13878&t.subtreeFlags||r){r=ke.T,ke.T=null,i=ze.p,ze.p=2,s=yu,yu|=4;try{!function(e,t){if(e=e.containerInfo,_h=wf,ci(e=li(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(m){n=null;break e}var s=0,o=-1,l=-1,c=0,u=0,d=e,h=null;t:for(;;){for(var f;d!==n||0!==i&&3!==d.nodeType||(o=s+i),d!==a||0!==r&&3!==d.nodeType||(l=s+r),3===d.nodeType&&(s+=d.nodeValue.length),null!==(f=d.firstChild);)h=d,d=f;
vendor: 9,481 bytes, line 20
20for(;;){if(d===e)break t;if(h===n&&++c===i&&(o=s),h===a&&++u===r&&(l=s),null!==(f=d.nextSibling))break;h=(d=h).parentNode}d=f}n=-1===o||-1===l?null:{start:o,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(bh={focusedElem:e,selectionRange:n},wf=!1,Oc=t;null!==Oc;)if(e=(t=Oc).child,1028&t.subtreeFlags&&null!==e)e.return=t,Oc=e;else for(;null!==Oc;){switch(a=(t=Oc).alternate,e=t.flags,t.tag){case 0:if(4&e&&null!==(e=null!==(e=t.updateQueue)?e.events:null))for(n=0;n<e.length;n++)(i=e[n]).ref.impl=i.nextImpl;break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&e&&null!==a){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,r=n.stateNode;try{var p=Tl(n.type,i);e=r.getSnapshotBeforeUpdate(p,a),r.__reactInternalSnapshotBeforeUpdate=e}catch(dv){Td(n,n.return,dv)}}break;case 3:if(1024&e)if(9===(n=(e=t.stateNode.containerInfo).nodeType))Dh(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Dh(e);break;default:e.textContent=""}break;default:if(1024&e)throw Error(de(163))}if(null!==(e=t.sibling)){e.return=t.return,Oc=e;break}Oc=t.return}}(e,t)}finally{yu=s,ze.p=i,ke.T=r}}Gu=1,xd(),Sd(),Ad()}}function xd(){if(1===Gu){Gu=0;var e=Vu,t=Wu,n=!!(13878&t.flags);if(13878&t.subtreeFlags||n){n=ke.T,ke.T=null;var r=ze.p;ze.p=2;var i=yu;yu|=4;try{qc(t,e);var a=bh,s=li(e.containerInfo),o=a.focusedElem,l=a.selectionRange;if(s!==o&&o&&o.ownerDocument&&oi(o.ownerDocument.documentElement,o)){if(null!==l&&ci(o)){var c=l.start,u=l.end;if(void 0===u&&(u=c),"selectionStart"in o)o.selectionStart=c,o.selectionEnd=Math.min(u,o.value.length);else{var d=o.ownerDocument||document,h=d&&d.defaultView||window;if(h.getSelection){var f=h.getSelection(),p=o.textContent.length,m=Math.min(l.start,p),g=void 0===l.end?m:Math.min(l.end,p);!f.extend&&m>g&&(s=g,g=m,m=s);var v=si(o,m),y=si(o,g);if(v&&y&&(1!==f.rangeCount||f.anchorNode!==v.node||f.anchorOffset!==v.offset||f.focusNode!==y.node||f.focusOffset!==y.offset)){var _=d.createRange();_.setStart(v.node,v.offset),f.removeAllRanges(),m>g?(f.addRange(_),f.extend(y.node,y.offset)):(_.setEnd(y.node,y.offset),f.addRange(_))}}}}for(d=[],f=o;f=f.parentNode;)1===f.nodeType&&d.push({element:f,left:f.scrollLeft,top:f.scrollTop});for("function"==typeof o.focus&&o.focus(),o=0;o<d.length;o++){var b=d[o];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}wf=!!_h,bh=_h=null}finally{yu=i,ze.p=r,ke.T=n}}e.current=t,Gu=2}}function Sd(){if(2===Gu){Gu=0;var e=Vu,t=Wu,n=!!(8772&t.flags);if(8772&t.subtreeFlags||n){n=ke.T,ke.T=null;var r=ze.p;ze.p=2;var i=yu;yu|=4;try{kc(e,t.alternate,t)}finally{yu=i,ze.p=r,ke.T=n}}Gu=3}}function Ad(){if(4===Gu||3===Gu){Gu=0,ht();var e=Vu,t=Wu,n=ju,r=Yu;10256&t.subtreeFlags||10256&t.flags?Gu=5:(Gu=0,Wu=Vu=null,Md(e,e.pendingLanes));var i=e.pendingLanes;if(0===i&&(Hu=null),Gt(n),t=t.stateNode,At&&"function"==typeof At.onCommitFiberRoot)try{At.onCommitFiberRoot(St,t,void 0,!(128&~t.current.flags))}catch(l){}if(null!==r){t=ke.T,i=ze.p,ze.p=2,ke.T=null;try{for(var a=e.onRecoverableError,s=0;s<r.length;s++){var o=r[s];a(o.value,{componentStack:o.stack})}}finally{ke.T=t,ze.p=i}}3&ju&&wd(),zd(e),i=e.pendingLanes,261930&n&&42&i?e===qu?Ku++:(Ku=0,qu=e):Ku=0,Hd(0)}}function Md(e,t){0===(e.pooledCacheLanes&=t)&&null!=(t=e.pooledCache)&&(e.pooledCache=null,ja(t))}function wd(){return xd(),Sd(),Ad(),Ed()}function Ed(){if(5!==Gu)return!1;var e=Vu,t=Xu;Xu=0;var n=Gt(ju),r=ke.T,i=ze.p;try{ze.p=32>n?32:n,ke.T=null,n=Ju,Ju=null;var a=Vu,s=ju;if(Gu=0,Wu=Vu=null,ju=0,6&yu)throw Error(de(331));var o=yu;if(yu|=4,fu(a.current),au(a,a.current,s,n),yu=o,Hd(0),At&&"function"==typeof At.onPostCommitFiberRoot)try{At.onPostCommitFiberRoot(St,a)}catch(l){}return!0}finally{ze.p=i,ke.T=r,Md(e,t)}}function Cd(e,t,n){t=$i(n,t),null!==(e=Ms(e,t=Dl(e.stateNode,t,2),2))&&(Ut(e,2),zd(e))}function Td(e,t,n){if(3===e.tag)Cd(e,e,n);else for(;null!==t;){if(3===t.tag){Cd(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Hu||!Hu.has(r))){e=$i(n,e),null!==(r=Ms(t,n=Fl(2),2))&&(Nl(n,r,t,e),Ut(r,2),zd(r));break}}t=t.return}}function Rd(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new vu;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(Eu=!0,i.add(n),e=Id.bind(null,e,t,n),t.then(e,e))}function Id(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,_u===e&&(xu&n)===n&&(4===Tu||3===Tu&&(62914560&xu)===xu&&300>ft()-Uu?!(2&yu)&&sd(e,0):Pu|=n,Lu===xu&&(Lu=0)),zd(e)}function Pd(e,t){0===t&&(t=Ft()),null!==(e=Oi(e,t))&&(Ut(e,t),zd(e))}function Bd(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Pd(e,n)}function Ld(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(de(314))}null!==r&&r.delete(t),Pd(e,n)}var Dd=null,Fd=null,Nd=!1,Ud=!1,Od=!1,kd=0;function zd(e){e!==Fd&&null===e.next&&(null===Fd?Dd=Fd=e:Fd=Fd.next=e),Ud=!0,Nd||(Nd=!0,Rh(function(){6&yu?ct(mt,Gd):Vd()}))}function Hd(e,t){if(!Od&&Ud){Od=!0;do{for(var n=!1,r=Dd;null!==r;){if(0!==e){var i=r.pendingLanes;if(0===i)var a=0;else{var s=r.suspendedLanes,o=r.pingedLanes;a=(1<<31-wt(42|e)+1)-1,a=201326741&(a&=i&~(s&~o))?201326741&a|1:a?2|a:0}0!==a&&(n=!0,Xd(r,a))}else a=xu,!(3&(a=Bt(r,r===_u?a:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Lt(r,a)||(n=!0,Xd(r,a));r=r.next}}while(n);Od=!1}}function Gd(){Vd()}function Vd(){Ud=Nd=!1;var e,t=0;0!==kd&&((e=window.event)&&"popstate"===e.type?e!==wh&&(wh=e,1):(wh=null,0))&&(t=kd);for(var n=ft(),r=null,i=Dd;null!==i;){var a=i.next,s=Wd(i,n);0===s?(i.next=null,null===r?Dd=a:r.next=a,null===a&&(Fd=r)):(r=i,(0!==t||3&s)&&(Ud=!0)),i=a}0!==Gu&&5!==Gu||Hd(t),0!==kd&&(kd=0)}function Wd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=-62914561&e.pendingLanes;0<a;){var s=31-wt(a),o=1<<s,l=i[s];-1===l?0!==(o&n)&&0===(o&r)||(i[s]=Dt(o,t)):l<=t&&(e.expiredLanes|=o),a&=~o}if(n=xu,n=Bt(e,e===(t=_u)?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===n||e===t&&(2===Su||9===Su)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&ut(r),e.callbackNode=null,e.callbackPriority=0;if(!(3&n)||Lt(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&ut(r),Gt(n)){case 2:case 8:n=gt;break;case 32:default:n=vt;break;case 268435456:n=_t}return r=jd.bind(null,e),n=ct(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&ut(r),e.callbackPriority=2,e.callbackNode=null,2}function jd(e,t){if(0!==Gu&&5!==Gu)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(wd()&&e.callbackNode!==n)return null;var r=xu;return 0===(r=Bt(e,e===_u?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(ed(e,r,t),Wd(e,ft()),null!=e.callbackNode&&e.callbackNode===n?jd.bind(null,e):null)}function Xd(e,t){if(wd())return null;ed(e,t,!0)}function Jd(){if(0===kd){var e=Ya;0===e&&(e=Tt,!(261888&(Tt<<=1))&&(Tt=256)),kd=e}return kd}function Yd(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:Un(""+e)}function Kd(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var qd=0;qd<Ri.length;qd++){var Qd=Ri[qd];Ii(Qd.toLowerCase(),"on"+(Qd[0].toUpperCase()+Qd.slice(1)))}Ii(xi,"onAnimationEnd"),Ii(Si,"onAnimationIteration"),Ii(Ai,"onAnimationStart"),Ii("dblclick","onDoubleClick"),Ii("focusin","onFocus"),Ii("focusout","onBlur"),Ii(Mi,"onTransitionRun"),Ii(wi,"onTransitionStart"),Ii(Ei,"onTransitionCancel"),Ii(Ci,"onTransitionEnd"),un("onMouseEnter",["mouseout","mouseover"]),un("onMouseLeave",["mouseout","mouseover"]),un("onPointerEnter",["pointerout","pointerover"]),un("onPointerLeave",["pointerout","pointerover"]),cn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),cn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),cn("onBeforeInput",["compositionend","keypress","textInput","paste"]),cn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),cn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),cn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zd="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(" "),$d=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Zd));function eh(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var s=r.length-1;0<=s;s--){var o=r[s],l=o.instance,c=o.currentTarget;if(o=o.listener,l!==a&&i.isPropagationStopped())break e;a=o,i.currentTarget=c;try{a(i)}catch(dv){Pi(dv)}i.currentTarget=null,a=l}else for(s=0;s<r.length;s++){if(l=(o=r[s]).instance,c=o.currentTarget,o=o.listener,l!==a&&i.isPropagationStopped())break e;a=o,i.currentTarget=c;try{a(i)}catch(dv){Pi(dv)}i.currentTarget=null,a=l}}}}function th(e,t){var n=t[Kt];void 0===n&&(n=t[Kt]=new Set);var r=e+"__bubble";n.has(r)||(ah(t,e,2,!1),n.add(r))}
vendor: 9,588 bytes, line 20
20function nh(e,t,n){var r=0;t&&(r|=4),ah(n,e,r,t)}var rh="_reactListening"+Math.random().toString(36).slice(2);function ih(e){if(!e[rh]){e[rh]=!0,on.forEach(function(t){"selectionchange"!==t&&($d.has(t)||nh(t,!1,e),nh(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[rh]||(t[rh]=!0,nh("selectionchange",!1,t))}}function ah(e,t,n,r){switch(Bf(t)){case 2:var i=Ef;break;case 8:i=Cf;break;default:i=Tf}n=i.bind(null,t,n,e),i=void 0,!Yn||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function sh(e,t,n,r,i){var a=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var o=r.stateNode.containerInfo;if(o===i)break;if(4===s)for(s=r.return;null!==s;){var l=s.tag;if((3===l||4===l)&&s.stateNode.containerInfo===i)return;s=s.return}for(;null!==o;){if(null===(s=tn(o)))return;if(5===(l=s.tag)||6===l||26===l||27===l){r=a=s;continue e}o=o.parentNode}}r=r.return}jn(function(){var r=a,i=zn(n),s=[];e:{var o=Ti.get(e);if(void 0!==o){var l=lr,c=e;switch(e){case"keypress":if(0===er(n))break e;case"keydown":case"keyup":l=Ar;break;case"focusin":c="focus",l=pr;break;case"focusout":c="blur",l=pr;break;case"beforeblur":case"afterblur":l=pr;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=hr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=fr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=wr;break;case xi:case Si:case Ai:l=mr;break;case Ci:l=Er;break;case"scroll":case"scrollend":l=ur;break;case"wheel":l=Cr;break;case"copy":case"cut":case"paste":l=gr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Mr;break;case"toggle":case"beforetoggle":l=Tr}var u=!!(4&t),d=!u&&("scroll"===e||"scrollend"===e),h=u?null!==o?o+"Capture":null:o;u=[];for(var f,p=r;null!==p;){var m=p;if(f=m.stateNode,5!==(m=m.tag)&&26!==m&&27!==m||null===f||null===h||null!=(m=Xn(p,h))&&u.push(oh(p,m,f)),d)break;p=p.return}0<u.length&&(o=new l(o,c,null,n,i),s.push({event:o,listeners:u}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(o="mouseover"===e||"pointerover"===e)||n===kn||!(c=n.relatedTarget||n.fromElement)||!tn(c)&&!c[Yt])&&(l||o)&&(o=i.window===i?i:(o=i.ownerDocument)?o.defaultView||o.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?tn(c):null)&&(d=fe(c),u=c.tag,c!==d||5!==u&&27!==u&&6!==u)&&(c=null)):(l=null,c=r),l!==c)){if(u=hr,m="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=Mr,m="onPointerLeave",h="onPointerEnter",p="pointer"),d=null==l?o:rn(l),f=null==c?o:rn(c),(o=new u(m,p+"leave",l,n,i)).target=d,o.relatedTarget=f,m=null,tn(i)===r&&((u=new u(h,p+"enter",c,n,i)).target=f,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(u=ch,p=c,f=0,m=h=l;m;m=u(m))f++;m=0;for(var g=p;g;g=u(g))m++;for(;0<f-m;)h=u(h),f--;for(;0<m-f;)p=u(p),m--;for(;f--;){if(h===p||null!==p&&h===p.alternate){u=h;break e}h=u(h),p=u(p)}u=null}else u=null;null!==l&&uh(s,o,l,u,!1),null!==c&&null!==d&&uh(s,d,c,u,!0)}if("select"===(l=(o=r?rn(r):window).nodeName&&o.nodeName.toLowerCase())||"input"===l&&"file"===o.type)var v=Xr;else if(zr(o))if(Jr)v=ni;else{v=ei;var y=$r}else!(l=o.nodeName)||"input"!==l.toLowerCase()||"checkbox"!==o.type&&"radio"!==o.type?r&&Dn(r.elementType)&&(v=Xr):v=ti;switch(v&&(v=v(e,r))?Hr(s,v,n,i):(y&&y(e,o,r),"focusout"===e&&r&&"number"===o.type&&null!=r.memoizedProps.value&&En(o,"number",o.value)),y=r?rn(r):window,e){case"focusin":(zr(y)||"true"===y.contentEditable)&&(di=y,hi=r,fi=null);break;case"focusout":fi=hi=di=null;break;case"mousedown":pi=!0;break;case"contextmenu":case"mouseup":case"dragend":pi=!1,mi(s,n,i);break;case"selectionchange":if(ui)break;case"keydown":case"keyup":mi(s,n,i)}var _;if(Ir)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Or?Nr(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Lr&&"ko"!==n.locale&&(Or||"onCompositionStart"!==b?"onCompositionEnd"===b&&Or&&(_=$n()):(Qn="value"in(qn=i)?qn.value:qn.textContent,Or=!0)),0<(y=lh(r,b)).length&&(b=new vr(b,e,null,n,i),s.push({event:b,listeners:y}),(_||null!==(_=Ur(n)))&&(b.data=_))),(_=Br?function(e,t){switch(e){case"compositionend":return Ur(t);case"keypress":return 32!==t.which?null:(Fr=!0,Dr);case"textInput":return(e=t.data)===Dr&&Fr?null:e;default:return null}}(e,n):function(e,t){if(Or)return"compositionend"===e||!Ir&&Nr(e,t)?(e=$n(),Zn=Qn=qn=null,Or=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Lr&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(b=lh(r,"onBeforeInput")).length&&(y=new vr("onBeforeInput","beforeinput",null,n,i),s.push({event:y,listeners:b}),y.data=_),function(e,t,n,r,i){if("submit"===t&&n&&n.stateNode===i){var a=Yd((i[Jt]||null).action),s=r.submitter;s&&null!==(t=(t=s[Jt]||null)?Yd(t.formAction):s.getAttribute("formAction"))&&(a=t,s=null);var o=new lr("action","action",null,r,i);e.push({event:o,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==kd){var e=s?Kd(i,s):new FormData(i);sl(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else"function"==typeof a&&(o.preventDefault(),e=s?Kd(i,s):new FormData(i),sl(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}(s,e,r,n,i)}eh(s,t)})}function oh(e,t,n){return{instance:e,listener:t,currentTarget:n}}function lh(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;if(5!==(i=i.tag)&&26!==i&&27!==i||null===a||(null!=(i=Xn(e,n))&&r.unshift(oh(e,i,a)),null!=(i=Xn(e,t))&&r.push(oh(e,i,a))),3===e.tag)return r;e=e.return}return[]}function ch(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function uh(e,t,n,r,i){for(var a=t._reactName,s=[];null!==n&&n!==r;){var o=n,l=o.alternate,c=o.stateNode;if(o=o.tag,null!==l&&l===r)break;5!==o&&26!==o&&27!==o||null===c||(l=c,i?null!=(c=Xn(n,a))&&s.unshift(oh(n,c,l)):i||null!=(c=Xn(n,a))&&s.push(oh(n,c,l))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var dh=/\r\n?/g,hh=/\u0000|\uFFFD/g;function fh(e){return("string"==typeof e?e:""+e).replace(dh,"\n").replace(hh,"")}function ph(e,t){return t=fh(t),fh(e)===t}function mh(e,t,n,r,i,a){switch(n){case"children":"string"==typeof r?"body"===t||"textarea"===t&&""===r||In(e,r):("number"==typeof r||"bigint"==typeof r)&&"body"!==t&&In(e,""+r);break;case"className":mn(e,"class",r);break;case"tabIndex":mn(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":mn(e,n,r);break;case"style":Ln(e,r,a);break;case"data":if("object"!==t){mn(e,"data",r);break}case"src":case"href":if(""===r&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==r||"function"==typeof r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=Un(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if("function"==typeof r){e.setAttribute(n,"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}if("function"==typeof a&&("formAction"===n?("input"!==t&&mh(e,t,"name",i.name,i,null),mh(e,t,"formEncType",i.formEncType,i,null),mh(e,t,"formMethod",i.formMethod,i,null),mh(e,t,"formTarget",i.formTarget,i,null)):(mh(e,t,"encType",i.encType,i,null),mh(e,t,"method",i.method,i,null),mh(e,t,"target",i.target,i,null))),null==r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=Un(""+r),e.setAttribute(n,r);break;case"onClick":null!=r&&(e.onclick=On);break;case"onScroll":null!=r&&th("scroll",e);break;case"onScrollEnd":null!=r&&th("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(de(61));if(null!=(n=r.__html)){if(null!=i.children)throw Error(de(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"muted":e.muted=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==r||"function"==typeof r||"boolean"==typeof r||"symbol"==typeof r){e.removeAttribute("xlink:href");break}n=Un(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""+r):e.removeAttribute(n);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"playsInl
20ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===r?e.setAttribute(n,""):!1!==r&&null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=r&&"function"!=typeof r&&"symbol"!=typeof r&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":null==r||"function"==typeof r||"symbol"==typeof r||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":th("beforetoggle",e),th("toggle",e),pn(e,"popover",r);break;case"xlinkActuate":gn(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":gn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":gn(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":gn(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":gn(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":gn(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":gn(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":gn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":gn(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":pn(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&pn(e,n=Fn.get(n)||n,r)}}function gh(e,t,n,r,i,a){switch(n){case"style":Ln(e,r,a);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(de(61));if(null!=(n=r.__html)){if(null!=i.children)throw Error(de(60));e.innerHTML=n}}break;case"children":"string"==typeof r?In(e,r):("number"==typeof r||"bigint"==typeof r)&&In(e,""+r);break;case"onScroll":null!=r&&th("scroll",e);break;case"onScrollEnd":null!=r&&th("scrollend",e);break;case"onClick":null!=r&&(e.onclick=On);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:ln.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),"function"==typeof(a=null!=(a=e[Jt]||null)?a[n]:null)&&e.removeEventListener(t,a,i),"function"!=typeof r)?n in e?e[n]=r:!0===r?e.setAttribute(n,""):pn(e,n,r):("function"!=typeof a&&null!==a&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i)))}}function vh(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":th("error",e),th("load",e);var r,i=!1,a=!1;for(r in n)if(n.hasOwnProperty(r)){var s=n[r];if(null!=s)switch(r){case"src":i=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(de(137,t));default:mh(e,t,r,s,n,null)}}return a&&mh(e,t,"srcSet",n.srcSet,n,null),void(i&&mh(e,t,"src",n.src,n,null));case"input":th("invalid",e);var o=r=s=a=null,l=null,c=null;for(i in n)if(n.hasOwnProperty(i)){var u=n[i];if(null!=u)switch(i){case"name":a=u;break;case"type":s=u;break;case"checked":l=u;break;case"defaultChecked":c=u;break;case"value":r=u;break;case"defaultValue":o=u;break;case"children":case"dangerouslySetInnerHTML":if(null!=u)throw Error(de(137,t));break;default:mh(e,t,i,u,n,null)}}return void wn(e,r,o,l,c,s,a,!1);case"select":for(a in th("invalid",e),i=s=r=null,n)if(n.hasOwnProperty(a)&&null!=(o=n[a]))switch(a){case"value":r=o;break;case"defaultValue":s=o;break;case"multiple":i=o;default:mh(e,t,a,o,n,null)}return t=r,n=s,e.multiple=!!i,void(null!=t?Cn(e,!!i,t,!1):null!=n&&Cn(e,!!i,n,!0));case"textarea":for(s in th("invalid",e),r=a=i=null,n)if(n.hasOwnProperty(s)&&null!=(o=n[s]))switch(s){case"value":i=o;break;case"defaultValue":a=o;break;case"children":r=o;break;case"dangerouslySetInnerHTML":if(null!=o)throw Error(de(91));break;default:mh(e,t,s,o,n,null)}return void Rn(e,i,a,r);case"option":for(l in n)n.hasOwnProperty(l)&&null!=(i=n[l])&&("selected"===l?e.selected=i&&"function"!=typeof i&&"symbol"!=typeof i:mh(e,t,l,i,n,null));return;case"dialog":th("beforetoggle",e),th("toggle",e),th("cancel",e),th("close",e);break;case"iframe":case"object":th("load",e);break;case"video":case"audio":for(i=0;i<Zd.length;i++)th(Zd[i],e);break;case"image":th("error",e),th("load",e);break;case"details":th("toggle",e);break;case"embed":case"source":case"link":th("error",e),th("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&null!=(i=n[c]))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(de(137,t));default:mh(e,t,c,i,n,null)}return;default:if(Dn(t)){for(u in n)n.hasOwnProperty(u)&&void 0!==(i=n[u])&&gh(e,t,u,i,n,void 0);return}}for(o in n)n.hasOwnProperty(o)&&null!=(i=n[o])&&mh(e,t,o,i,n,null)}function yh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}var _h=null,bh=null;
vendor: 11,250 bytes, line 20
20function xh(e){return 9===e.nodeType?e:e.ownerDocument}function Sh(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ah(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function Mh(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var wh=null,Eh="function"==typeof setTimeout?setTimeout:void 0,Ch="function"==typeof clearTimeout?clearTimeout:void 0,Th="function"==typeof Promise?Promise:void 0,Rh="function"==typeof queueMicrotask?queueMicrotask:void 0!==Th?function(e){return Th.resolve(null).then(e).catch(Ih)}:Eh;function Ih(e){setTimeout(function(){throw e})}function Ph(e){return"head"===e}function Bh(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)||"/&"===n){if(0===r)return e.removeChild(i),void qf(t);r--}else if("$"===n||"$?"===n||"$~"===n||"$!"===n||"&"===n)r++;else if("html"===n)Vh(e.ownerDocument.documentElement);else if("head"===n){Vh(n=e.ownerDocument.head);for(var a=n.firstChild;a;){var s=a.nextSibling,o=a.nodeName;a[$t]||"SCRIPT"===o||"STYLE"===o||"LINK"===o&&"stylesheet"===a.rel.toLowerCase()||n.removeChild(a),a=s}}else"body"===n&&Vh(e.ownerDocument.body);n=i}while(n);qf(t)}function Lh(e,t){var n=e;e=0;do{var r=n.nextSibling;if(1===n.nodeType?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",""===n.getAttribute("style")&&n.removeAttribute("style")):3===n.nodeType&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===e)break;e--}else"$"!==n&&"$?"!==n&&"$~"!==n&&"$!"!==n||e++;n=r}while(n)}function Dh(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Dh(n),en(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function Fh(e,t){for(;8!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t)return null;if(null===(e=Oh(e.nextSibling)))return null}return e}function Nh(e){return"$?"===e.data||"$~"===e.data}function Uh(e){return"$!"===e.data||"$?"===e.data&&"loading"!==e.ownerDocument.readyState}function Oh(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"$~"===t||"&"===t||"F!"===t||"F"===t)break;if("/$"===t||"/&"===t)return null}}return e}var kh=null;function zh(e){e=e.nextSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n||"/&"===n){if(0===t)return Oh(e.nextSibling);t--}else"$"!==n&&"$!"!==n&&"$?"!==n&&"$~"!==n&&"&"!==n||t++}e=e.nextSibling}return null}function Hh(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n||"$~"===n||"&"===n){if(0===t)return e;t--}else"/$"!==n&&"/&"!==n||t++}e=e.previousSibling}return null}function Gh(e,t,n){switch(t=xh(n),e){case"html":if(!(e=t.documentElement))throw Error(de(452));return e;case"head":if(!(e=t.head))throw Error(de(453));return e;case"body":if(!(e=t.body))throw Error(de(454));return e;default:throw Error(de(451))}}function Vh(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);en(e)}var Wh=new Map,jh=new Set;function Xh(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var Jh=ze.d;ze.d={f:function(){var e=Jh.f(),t=id();return e||t},r:function(e){var t=nn(e);null!==t&&5===t.tag&&"form"===t.type?ll(t):Jh.r(e)},D:function(e){Jh.D(e),Kh("dns-prefetch",e,null)},C:function(e,t){Jh.C(e,t),Kh("preconnect",e,t)},L:function(e,t,n){Jh.L(e,t,n);var r=Yh;if(r&&e&&t){var i='link[rel="preload"][as="'+An(t)+'"]';"image"===t&&n&&n.imageSrcSet?(i+='[imagesrcset="'+An(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(i+='[imagesizes="'+An(n.imageSizes)+'"]')):i+='[href="'+An(e)+'"]';var a=i;switch(t){case"style":a=Qh(e);break;case"script":a=ef(e)}Wh.has(a)||(e=ye({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),Wh.set(a,e),null!==r.querySelector(i)||"style"===t&&r.querySelector(Zh(a))||"script"===t&&r.querySelector(tf(a))||(vh(t=r.createElement("link"),"link",e),sn(t),r.head.appendChild(t)))}},m:function(e,t){Jh.m(e,t);var n=Yh;if(n&&e){var r=t&&"string"==typeof t.as?t.as:"script",i='link[rel="modulepreload"][as="'+An(r)+'"][href="'+An(e)+'"]',a=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=ef(e)}if(!Wh.has(a)&&(e=ye({rel:"modulepreload",href:e},t),Wh.set(a,e),null===n.querySelector(i))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(tf(a)))return}vh(r=n.createElement("link"),"link",e),sn(r),n.head.appendChild(r)}}},X:function(e,t){Jh.X(e,t);var n=Yh;if(n&&e){var r=an(n).hoistableScripts,i=ef(e),a=r.get(i);a||((a=n.querySelector(tf(i)))||(e=ye({src:e,async:!0},t),(t=Wh.get(i))&&sf(e,t),sn(a=n.createElement("script")),vh(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(i,a))}},S:function(e,t,n){Jh.S(e,t,n);var r=Yh;if(r&&e){var i=an(r).hoistableStyles,a=Qh(e);t=t||"default";var s=i.get(a);if(!s){var o={loading:0,preload:null};if(s=r.querySelector(Zh(a)))o.loading=5;else{e=ye({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Wh.get(a))&&af(e,n);var l=s=r.createElement("link");sn(l),vh(l,"link",e),l._p=new Promise(function(e,t){l.onload=e,l.onerror=t}),l.addEventListener("load",function(){o.loading|=1}),l.addEventListener("error",function(){o.loading|=2}),o.loading|=4,rf(s,t,r)}s={type:"stylesheet",instance:s,count:1,state:o},i.set(a,s)}}},M:function(e,t){Jh.M(e,t);var n=Yh;if(n&&e){var r=an(n).hoistableScripts,i=ef(e),a=r.get(i);a||((a=n.querySelector(tf(i)))||(e=ye({src:e,async:!0,type:"module"},t),(t=Wh.get(i))&&sf(e,t),sn(a=n.createElement("script")),vh(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(i,a))}}};var Yh="undefined"==typeof document?null:document;function Kh(e,t,n){var r=Yh;if(r&&"string"==typeof t&&t){var i=An(t);i='link[rel="'+e+'"][href="'+i+'"]',"string"==typeof n&&(i+='[crossorigin="'+n+'"]'),jh.has(i)||(jh.add(i),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(i)&&(vh(t=r.createElement("link"),"link",e),sn(t),r.head.appendChild(t)))}}function qh(e,t,n,r){var i=(i=Qe.current)?Xh(i):null;if(!i)throw Error(de(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=Qh(n.href),(r=(n=an(i).hoistableStyles).get(t))||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=Qh(n.href);var a=an(i).hoistableStyles,s=a.get(e);if(s||(i=i.ownerDocument||i,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,s),(a=i.querySelector(Zh(e)))&&!a._p&&(s.instance=a,s.state.loading=5),Wh.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Wh.set(e,n),a||function(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),vh(t,"link",n),sn(t),e.head.appendChild(t))}(i,e,n,s.state))),t&&null===r)throw Error(de(528,""));return s}if(t&&null!==r)throw Error(de(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=ef(n),(r=(n=an(i).hoistableScripts).get(t))||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(de(444,e))}}function Qh(e){return'href="'+An(e)+'"'}function Zh(e){return'link[rel="stylesheet"]['+e+"]"}function $h(e){return ye({},e,{"data-precedence":e.precedence,precedence:null})}function ef(e){return'[src="'+An(e)+'"]'}function tf(e){return"script[async]"+e}function nf(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+An(n.href)+'"]');if(r)return t.instance=r,sn(r),r;var i=ye({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return sn(r=(e.ownerDocument||e).createElement("style")),vh(r,"style",i),rf(r,n.precedence,e),t.instance=r;case"stylesheet":i=Qh(n.href);var a=e.querySelector(Zh(i));if(a)return t.state.loading|=4,t.instance=a,sn(a),a;r=$h(n),(i=Wh.get(i))&&af(r,i),sn(a=(e.ownerDocument||e).createElement("link"));var s=a;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),vh(a,"link",r),t.state.loading|=4,rf(a,n.precedence,e),t.instance=a;case"script":return a=ef(n.src),(i=e.querySelector(tf(a)))?(t.instance=i,sn(i),i):(r=n,(i=Wh.get(a))&&sf(r=ye({},n),i),sn(i=(e=e.ownerDocument||e).createElement("script")),vh(i,"link",r),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(de(443,t.type))}else"stylesheet"===t.type&&!(4&t.state.loading)&&(r=t.instance,t.state.loading|=4,rf(r,n.precedence,e));return t.instance}function rf(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,a=i,s=0;s<r.length;s++){var o=r[s];if(o.dataset.precedence===t)a=o;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function af(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function sf(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var of=null;function lf(e,t,n){if(null===of){var r=new Map,i=of=new Map;i.set(n,r)}else(r=(i=of).get(n))||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[$t]||a[Xt]||"link"===e&&"stylesheet"===a.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==a.namespaceURI){var s=a.getAttribute(t)||"";s=e+s;var o=r.get(s);o?o.push(a):r.set(s,[a])}}return r}function cf(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function uf(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var df=0;function hf(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)pf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var ff=null;function pf(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,ff=new Map,t.forEach(mf,e),ff=null,hf.call(e))}function mf(e,t){if(!(4&t.state.loading)){var n=ff.get(e);
vendor: 6,014 bytes, line 20
20if(n)var r=n.get(null);else{n=new Map,ff.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<i.length;a++){var s=i[a];"LINK"!==s.nodeName&&"not all"===s.getAttribute("media")||(n.set(s.dataset.precedence,s),r=s)}r&&n.set(null,r)}s=(i=t.instance).getAttribute("data-precedence"),(a=n.get(s)||r)===r&&n.set(null,i),n.set(s,i),this.count++,r=hf.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(i,e.firstChild),t.state.loading|=4}}var gf={$$typeof:Ee,Provider:null,Consumer:null,_currentValue:He,_currentValue2:He,_threadCount:0};function vf(e,t,n,r,i,a,s,o,l){this.tag=1,this.containerInfo=e,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=Nt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nt(0),this.hiddenUpdates=Nt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function yf(e,t,n,r,i,a,s,o,l,c,u,d){return e=new vf(e,t,n,s,l,c,u,d,o),t=1,!0===a&&(t|=24),a=Vi(3,null,null,t),e.current=a,a.stateNode=e,(t=Wa()).refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},xs(a),e}function _f(e){return e?e=Hi:Hi}function bf(e,t,n,r,i,a){i=_f(i),null===r.context?r.context=i:r.pendingContext=i,(r=As(t)).payload={element:n},null!==(a=void 0===a?null:a)&&(r.callback=a),null!==(n=Ms(e,r,t))&&($u(n,0,t),ws(n,e,t))}function xf(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Sf(e,t){xf(e,t),(e=e.alternate)&&xf(e,t)}function Af(e){if(13===e.tag||31===e.tag){var t=Oi(e,67108864);null!==t&&$u(t,0,67108864),Sf(e,67108864)}}function Mf(e){if(13===e.tag||31===e.tag){var t=Qu(),n=Oi(e,t=Ht(t));null!==n&&$u(n,0,t),Sf(e,t)}}var wf=!0;function Ef(e,t,n,r){var i=ke.T;ke.T=null;var a=ze.p;try{ze.p=2,Tf(e,t,n,r)}finally{ze.p=a,ke.T=i}}function Cf(e,t,n,r){var i=ke.T;ke.T=null;var a=ze.p;try{ze.p=8,Tf(e,t,n,r)}finally{ze.p=a,ke.T=i}}function Tf(e,t,n,r){if(wf){var i=Rf(r);if(null===i)sh(e,t,r,If,n),Hf(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Df=Gf(Df,e,t,n,r,i),!0;case"dragenter":return Ff=Gf(Ff,e,t,n,r,i),!0;case"mouseover":return Nf=Gf(Nf,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Uf.set(a,Gf(Uf.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,Of.set(a,Gf(Of.get(a)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Hf(e,r),4&t&&-1<zf.indexOf(e)){for(;null!==i;){var a=nn(i);if(null!==a)switch(a.tag){case 3:if((a=a.stateNode).current.memoizedState.isDehydrated){var s=Pt(a.pendingLanes);if(0!==s){var o=a;for(o.pendingLanes|=2,o.entangledLanes|=2;s;){var l=1<<31-wt(s);o.entanglements[1]|=l,s&=~l}zd(a),!(6&yu)&&(ku=ft()+500,Hd(0))}}break;case 31:case 13:null!==(o=Oi(a,2))&&$u(o,0,2),id(),Sf(a,2)}if(null===(a=Rf(r))&&sh(e,t,r,If,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else sh(e,t,r,null,n)}}function Rf(e){return Pf(e=zn(e))}var If=null;function Pf(e){if(If=null,null!==(e=tn(e))){var t=fe(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=pe(t)))return e;e=null}else if(31===n){if(null!==(e=me(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return If=e,null}function Bf(e){switch(e){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(pt()){case mt:return 2;case gt:return 8;case vt:case yt:return 32;case _t:return 268435456;default:return 32}default:return 32}}var Lf=!1,Df=null,Ff=null,Nf=null,Uf=new Map,Of=new Map,kf=[],zf="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 Hf(e,t){switch(e){case"focusin":case"focusout":Df=null;break;case"dragenter":case"dragleave":Ff=null;break;case"mouseover":case"mouseout":Nf=null;break;case"pointerover":case"pointerout":Uf.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Of.delete(t.pointerId)}}function Gf(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},null!==t&&null!==(t=nn(t))&&Af(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Vf(e){var t=tn(e.target);if(null!==t){var n=fe(t);
vendor: 5,521 bytes, line 20
20if(null!==n)if(13===(t=n.tag)){if(null!==(t=pe(n)))return e.blockedOn=t,void Wt(e.priority,function(){Mf(n)})}else if(31===t){if(null!==(t=me(n)))return e.blockedOn=t,void Wt(e.priority,function(){Mf(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Wf(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Rf(e.nativeEvent);if(null!==n)return null!==(t=nn(n))&&Af(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);kn=r,n.target.dispatchEvent(r),kn=null,t.shift()}return!0}function jf(e,t,n){Wf(e)&&n.delete(t)}function Xf(){Lf=!1,null!==Df&&Wf(Df)&&(Df=null),null!==Ff&&Wf(Ff)&&(Ff=null),null!==Nf&&Wf(Nf)&&(Nf=null),Uf.forEach(jf),Of.forEach(jf)}function Jf(e,t){e.blockedOn===t&&(e.blockedOn=null,Lf||(Lf=!0,le.unstable_scheduleCallback(le.unstable_NormalPriority,Xf)))}var Yf=null;function Kf(e){Yf!==e&&(Yf=e,le.unstable_scheduleCallback(le.unstable_NormalPriority,function(){Yf===e&&(Yf=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if("function"!=typeof r){if(null===Pf(r||n))continue;break}var a=nn(n);null!==a&&(e.splice(t,3),t-=3,sl(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function qf(e){function t(t){return Jf(t,e)}null!==Df&&Jf(Df,e),null!==Ff&&Jf(Ff,e),null!==Nf&&Jf(Nf,e),Uf.forEach(t),Of.forEach(t);for(var n=0;n<kf.length;n++){var r=kf[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<kf.length&&null===(n=kf[0]).blockedOn;)Vf(n),null===n.blockedOn&&kf.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],s=i[Jt]||null;if("function"==typeof a)s||Kf(n);else if(s){var o=null;if(a&&a.hasAttribute("formAction")){if(i=a,s=a[Jt]||null)o=s.formAction;else if(null!==Pf(i))continue}else o=s.action;"function"==typeof o?n[r+1]=o:(n.splice(r,3),r-=3),Kf(n)}}}function Qf(){function e(e){e.canIntercept&&"react-transition"===e.info&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:"manual",scroll:"manual"})}function t(){null!==i&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&null!=e.url&&navigation.navigate(e.url,{state:e.getState(),info:"react-transition",history:"replace"})}}if("object"==typeof navigation){var r=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),null!==i&&(i(),i=null)}}}function Zf(e){this._internalRoot=e}function $f(e){this._internalRoot=e}$f.prototype.render=Zf.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(de(409));bf(t.current,Qu(),e,t,null,null)},$f.prototype.unmount=Zf.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;bf(e.current,2,null,e,null,null),id(),t[Yt]=null}},$f.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<kf.length&&0!==t&&t<kf[n].priority;n++);kf.splice(n,0,e),0===n&&Vf(e)}};var ep=ce.version;if("19.2.0"!==ep)throw Error(de(527,ep,"19.2.0"));ze.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(de(188));throw e=Object.keys(e).join(","),Error(de(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=fe(e)))throw Error(de(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return ge(i),e;if(a===r)return ge(i),t;a=a.sibling}throw Error(de(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,o=i.child;o;){if(o===n){s=!0,n=i,r=a;break}if(o===r){s=!0,r=i,n=a;break}o=o.sibling}if(!s){for(o=a.child;o;){if(o===n){s=!0,n=a,r=i;break}if(o===r){s=!0,r=a,n=i;break}o=o.sibling}if(!s)throw Error(de(189))}}if(n.alternate!==r)throw Error(de(190))}if(3!==n.tag)throw Error(de(188));return n.stateNode.current===n?e:t}(t),null===(e=null!==e?ve(e):null)?null:e.stateNode};var tp={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:ke,reconcilerVersion:"19.2.0"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var np=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!np.isDisabled&&np.supportsFiber)try{St=np.inject(tp),At=np}catch(jL){}}u.createRoot=function(e,t){if(!he(e))throw Error(de(299));var n=!1,r="",i=Rl,a=Il,s=Pl;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onUncaughtError&&(i=t.onUncaughtError),void 0!==t.onCaughtError&&(a=t.onCaughtError),void 0!==t.onRecoverableError&&(s=t.onRecoverableError)),t=yf(e,1,!1,null,0,n,r,null,i,a,s,Qf),e[Yt]=t.current,ih(e),new Zf(t)},u.hydrateRoot=function(e,t,n){if(!he(e))throw Error(de(299));var r=!1,i="",a=Rl,s=Il,o=Pl,l=null;return null!=n&&(!0===n.unstable_strictMode&&(r=!0),void 0!==n.identifierPrefix&&(i=n.identifierPrefix),void 0!==n.onUncaughtError&&(a=n.onUncaughtError),void 0!==n.onCaughtError&&(s=n.onCaughtError),void 0!==n.onRecoverableError&&(o=n.onRecoverableError),void 0!==n.formState&&(l=n.formState)),(t=yf(e,1,!0,t,0,r,i,l,a,s,o,Qf)).context=_f(null),n=t.current,(i=As(r=Ht(r=Qu()))).c
20allback=null,Ms(n,i,r),n=r,t.current.lanes=n,Ut(t,n),zd(t),e[Yt]=t.current,ih(e),new $f(t)},u.version="19.2.0",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(jL){console.error(jL)}}(),c.exports=u;var rp=c.exports,ip={exports:{}},ap={},sp=q,op="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},lp=sp.useState,cp=sp.useEffect,up=sp.useLayoutEffect,dp=sp.useDebugValue;function hp(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!op(e,n)}catch(dv){return!0}}var fp="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=lp({inst:{value:n,getSnapshot:t}}),i=r[0].inst,a=r[1];return up(function(){i.value=n,i.getSnapshot=t,hp(i)&&a({inst:i})},[e,n,t]),cp(function(){return hp(i)&&a({inst:i}),e(function(){hp(i)&&a({inst:i})})},[e]),dp(n),n};ap.useSyncExternalStore=void 0!==sp.useSyncExternalStore?sp.useSyncExternalStore:fp,ip.exports=ap;var pp=ip.exports;const mp={},gp=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),n=e?.nonce||e?.getAttribute("nonce");r=Promise.all(t.map(e=>{if((e=function(e){return"/"+e}(e))in mp)return;mp[e]=!0;const t=e.endsWith(".css"),r=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${r}`))return;const i=document.createElement("link");return i.rel=t?"stylesheet":"modulepreload",t||(i.as="script",i.crossOrigin=""),i.href=e,n&&i.setAttribute("nonce",n),document.head.appendChild(i),t?new Promise((t,n)=>{i.addEventListener("load",t),i.addEventListener("error",()=>n(new Error(`Unable to preload CSS for ${e}`)))}):void 0}))}return r.then(()=>e()).catch(e=>{const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e})},vp="182",yp={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},_p={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},bp=1,xp=3,Sp=0,Ap=1,Mp=2,wp=100,Ep=101,Cp=102,Tp=200,Rp=201,Ip=202,Pp=203,Bp=204,Lp=205,Dp=206,Fp=207,Np=208,Up=209,Op=210,kp=211,zp=212,Hp=213,Gp=214,Vp=0,Wp=1,jp=2,Xp=3,Jp=4,Yp=5,Kp=6,qp=7,Qp=0,Zp=1,$p=2,em=1,tm=2,nm=3,rm=4,im=5,am=6,sm=7,om="attached",lm="detached",cm=300,um=301,dm=302,hm=303,fm=304,pm=306,mm=1e3,gm=1001,vm=1002,ym=1003,_m=1004,bm=1005,xm=1006,Sm=1007,Am=1008,Mm=1008,wm=1009,Em=1010,Cm=1011,Tm=1012,Rm=1013,Im=1014,Pm=1015,Bm=1016,Lm=1017,Dm=1018,Fm=1020,Nm=35902,Um=35899,Om=1021,km=1022,zm=1023,Hm=1026,Gm=1027,Vm=1028,Wm=1029,jm=1030,Xm=1031,Jm=1033,Ym=33776,Km=33777,qm=33778,Qm=33779,Zm=35840,$m=35841,eg=35842,tg=35843,ng=36196,rg=37492,ig=37496,ag=37488,sg=37489,og=37490,lg=37491,cg=37808,ug=37809,dg=37810,hg=37811,fg=37812,pg=37813,mg=37814,gg=37815,vg=37816,yg=37817,_g=37818,bg=37819,xg=37820,Sg=37821,Ag=36492,Mg=36494,wg=36495,Eg=36283,Cg=36284,Tg=36285,Rg=36286,Ig=2300,Pg=2301,Bg=2302,Lg=2400,Dg=2401,Fg=2402,Ng=2501,Ug="",Og="srgb",kg="srgb-linear",zg="linear",Hg="srgb",Gg=7680,Vg=512,Wg=513,jg=514,Xg=515,Jg=516,Yg=517,Kg=518,qg=519,Qg=35044,Zg="300 es",$g=2e3,ev=2001;function tv(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}const nv={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function rv(e,t){return new nv[e](t)}function iv(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function av(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function sv(){const e=av("canvas");return e.style.display="block",e}const ov={};let lv=null;function cv(...e){const t="THREE."+e.shift();lv?lv("log",t,...e):console.log(t,...e)}function uv(...e){const t="THREE."+e.shift();lv?lv("warn",t,...e):console.warn(t,...e)}function dv(...e){const t="THREE."+e.shift();lv?lv("error",t,...e):console.error(t,...e)}function hv(...e){const t=e.join(" ");t in ov||(ov[t]=!0,uv(...e))}let fv=class{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return void 0!==n&&void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){const n=this._listeners;if(void 0===n)return;const r=n[e];if(void 0!==r){const e=r.indexOf(t);-1!==e&&r.splice(e,1)}}dispatchEvent(e){const t=this._listeners;if(void 0===t)return;const n=t[e.type];if(void 0!==n){e.target=this;const t=n.slice(0);for(let n=0,r=t.length;n<r;n++)t[n].call(this,e);e.target=null}}};const pv=["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
205","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 mv=1234567;const gv=Math.PI/180,vv=180/Math.PI;function yv(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(pv[255&e]+pv[e>>8&255]+pv[e>>16&255]+pv[e>>24&255]+"-"+pv[255&t]+pv[t>>8&255]+"-"+pv[t>>16&15|64]+pv[t>>24&255]+"-"+pv[63&n|128]+pv[n>>8&255]+"-"+pv[n>>16&255]+pv[n>>24&255]+pv[255&r]+pv[r>>8&255]+pv[r>>16&255]+pv[r>>24&255]).toLowerCase()}function _v(e,t,n){return Math.max(t,Math.min(n,e))}function bv(e,t){return(e%t+t)%t}function xv(e,t,n){return(1-n)*e+n*t}function Sv(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function Av(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(4294967295*e);case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int32Array:return Math.round(2147483647*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}}const Mv={DEG2RAD:gv,RAD2DEG:vv,generateUUID:yv,clamp:_v,euclideanModulo:bv,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:xv,damp:function(e,t,n,r){return xv(e,t,1-Math.exp(-n*r))},pingpong:function(e,t=1){return t-Math.abs(bv(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(mv=e);let t=mv+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296},degToRad:function(e){return e*gv},radToDeg:function(e){return e*vv},isPowerOfTwo:function(e){return!(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},setQuaternionFromProperEuler:function(e,t,n,r,i){const a=Math.cos,s=Math.sin,o=a(n/2),l=s(n/2),c=a((t+r)/2),u=s((t+r)/2),d=a((t-r)/2),h=s((t-r)/2),f=a((r-t)/2),p=s((r-t)/2);switch(i){case"XYX":e.set(o*u,l*d,l*h,o*c);break;case"YZY":e.set(l*h,o*u,l*d,o*c);break;case"ZXZ":e.set(l*d,l*h,o*u,o*c);break;case"XZX":e.set(o*u,l*p,l*f,o*c);break;case"YXY":e.set(l*f,o*u,l*p,o*c);break;case"ZYZ":e.set(l*p,l*f,o*u,o*c);break;default:uv("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},normalize:Av,denormalize:Sv};class wv{constructor(e=0,t=0){wv.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: 10,092 bytes, line 20
20sub(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,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=_v(this.x,e.x,t.x),this.y=_v(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=_v(this.x,e,t),this.y=_v(this.y,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(_v(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(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(_v(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),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Ev{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,i,a,s){let o=n[r+0],l=n[r+1],c=n[r+2],u=n[r+3],d=i[a+0],h=i[a+1],f=i[a+2],p=i[a+3];if(s<=0)return e[t+0]=o,e[t+1]=l,e[t+2]=c,void(e[t+3]=u);if(s>=1)return e[t+0]=d,e[t+1]=h,e[t+2]=f,void(e[t+3]=p);if(u!==p||o!==d||l!==h||c!==f){let e=o*d+l*h+c*f+u*p;e<0&&(d=-d,h=-h,f=-f,p=-p,e=-e);let t=1-s;if(e<.9995){const n=Math.acos(e),r=Math.sin(n);t=Math.sin(t*n)/r,o=o*t+d*(s=Math.sin(s*n)/r),l=l*t+h*s,c=c*t+f*s,u=u*t+p*s}else{o=o*t+d*s,l=l*t+h*s,c=c*t+f*s,u=u*t+p*s;const e=1/Math.sqrt(o*o+l*l+c*c+u*u);o*=e,l*=e,c*=e,u*=e}}e[t]=o,e[t+1]=l,e[t+2]=c,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,i,a){const s=n[r],o=n[r+1],l=n[r+2],c=n[r+3],u=i[a],d=i[a+1],h=i[a+2],f=i[a+3];return e[t]=s*f+c*u+o*h-l*d,e[t+1]=o*f+c*d+l*u-s*h,e[t+2]=l*f+c*h+s*d-o*u,e[t+3]=c*f-s*u-o*d-l*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const n=e._x,r=e._y,i=e._z,a=e._order,s=Math.cos,o=Math.sin,l=s(n/2),c=s(r/2),u=s(i/2),d=o(n/2),h=o(r/2),f=o(i/2);switch(a){case"XYZ":this._x=d*c*u+l*h*f,this._y=l*h*u-d*c*f,this._z=l*c*f+d*h*u,this._w=l*c*u-d*h*f;break;case"YXZ":this._x=d*c*u+l*h*f,this._y=l*h*u-d*c*f,this._z=l*c*f-d*h*u,this._w=l*c*u+d*h*f;break;case"ZXY":this._x=d*c*u-l*h*f,this._y=l*h*u+d*c*f,this._z=l*c*f+d*h*u,this._w=l*c*u-d*h*f;break;case"ZYX":this._x=d*c*u-l*h*f,this._y=l*h*u+d*c*f,this._z=l*c*f-d*h*u,this._w=l*c*u+d*h*f;break;case"YZX":this._x=d*c*u+l*h*f,this._y=l*h*u+d*c*f,this._z=l*c*f-d*h*u,this._w=l*c*u-d*h*f;break;case"XZY":this._x=d*c*u-l*h*f,this._y=l*h*u-d*c*f,this._z=l*c*f+d*h*u,this._w=l*c*u+d*h*f;break;default:uv("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!0===t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],i=t[8],a=t[1],s=t[5],o=t[9],l=t[2],c=t[6],u=t[10],d=n+s+u;if(d>0){const e=.5/Math.sqrt(d+1);this._w=.25/e,this._x=(c-o)*e,this._y=(i-l)*e,this._z=(a-r)*e}else if(n>s&&n>u){const e=2*Math.sqrt(1+n-s-u);this._w=(c-o)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(i+l)/e}else if(s>u){const e=2*Math.sqrt(1+s-n-u);this._w=(i-l)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(o+c)/e}else{const e=2*Math.sqrt(1+u-n-s);this._w=(a-r)/e,this._x=(i+l)/e,this._y=(o+c)/e,this._z=.25*e}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(_v(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(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,r=e._y,i=e._z,a=e._w,s=t._x,o=t._y,l=t._z,c=t._w;return this._x=n*c+a*s+r*l-i*o,this._y=r*c+a*o+i*s-n*l,this._z=i*c+a*l+n*o-r*s,this._w=a*c-n*s-r*o-i*l,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let n=e._x,r=e._y,i=e._z,a=e._w,s=this.dot(e);s<0&&(n=-n,r=-r,i=-i,a=-a,s=-s);let o=1-t;if(s<.9995){const e=Math.acos(s),l=Math.sin(e);o=Math.sin(o*e)/l,t=Math.sin(t*e)/l,this._x=this._x*o+n*t,this._y=this._y*o+r*t,this._z=this._z*o+i*t,this._w=this._w*o+a*t,this._onChangeCallback()}else this._x=this._x*o+n*t,this._y=this._y*o+r*t,this._z=this._z*o+i*t,this._w=this._w*o+a*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(),r=Math.sqrt(1-n),i=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),i*Math.sin(t),i*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 Cv{constructor(e=0,t=0,n=0){Cv.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(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(Rv.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Rv.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this}
vendor: 9,900 bytes, line 20
20applyQuaternion(e){const t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,s=e.z,o=e.w,l=2*(a*r-s*n),c=2*(s*t-i*r),u=2*(i*n-a*t);return this.x=t+o*l+a*u-s*c,this.y=n+o*c+s*l-i*u,this.z=r+o*u+i*c-a*l,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,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=_v(this.x,e.x,t.x),this.y=_v(this.y,e.y,t.y),this.z=_v(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=_v(this.x,e,t),this.y=_v(this.y,e,t),this.z=_v(this.z,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(_v(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,r=e.y,i=e.z,a=t.x,s=t.y,o=t.z;return this.x=r*o-i*s,this.y=i*a-n*o,this.z=n*s-r*a,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return Tv.copy(this).projectOnVector(e),this.sub(Tv)}reflect(e){return this.sub(Tv.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(_v(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*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(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}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=2*Math.random()-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 Tv=new Cv,Rv=new Ev;class Iv{constructor(e,t,n,r,i,a,s,o,l){Iv.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,a,s,o,l)}set(e,t,n,r,i,a,s,o,l){const c=this.elements;return c[0]=e,c[1]=r,c[2]=s,c[3]=t,c[4]=i,c[5]=o,c[6]=n,c[7]=a,c[8]=l,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,r=t.elements,i=this.elements,a=n[0],s=n[3],o=n[6],l=n[1],c=n[4],u=n[7],d=n[2],h=n[5],f=n[8],p=r[0],m=r[3],g=r[6],v=r[1],y=r[4],_=r[7],b=r[2],x=r[5],S=r[8];return i[0]=a*p+s*v+o*b,i[3]=a*m+s*y+o*x,i[6]=a*g+s*_+o*S,i[1]=l*p+c*v+u*b,i[4]=l*m+c*y+u*x,i[7]=l*g+c*_+u*S,i[2]=d*p+h*v+f*b,i[5]=d*m+h*y+f*x,i[8]=d*g+h*_+f*S,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],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],c=e[8];return t*a*c-t*s*l-n*i*c+n*s*o+r*i*l-r*a*o}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],c=e[8],u=c*a-s*l,d=s*o-c*i,h=l*i-a*o,f=t*u+n*d+r*h;if(0===f)return this.set(0,0,0,0,0,0,0,0,0);const p=1/f;return e[0]=u*p,e[1]=(r*l-c*n)*p,e[2]=(s*n-r*a)*p,e[3]=d*p,e[4]=(c*t-r*o)*p,e[5]=(r*i-s*t)*p,e[6]=h*p,e[7]=(n*o-l*t)*p,e[8]=(a*t-n*i)*p,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,r,i,a,s){const o=Math.cos(i),l=Math.sin(i);return this.set(n*o,n*l,-n*(o*a+l*s)+a+e,-r*l,r*o,-r*(-l*a+o*s)+s+t,0,0,1),this}scale(e,t){return this.premultiply(Pv.makeScale(e,t)),this}rotate(e){return this.premultiply(Pv.makeRotation(-e)),this}translate(e,t){return this.premultiply(Pv.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 r=0;r<9;r++)if(t[r]!==n[r])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 Pv=new Iv,Bv=(new Iv).set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Lv=(new Iv).set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function Dv(){const e={enabled:!0,workingColorSpace:kg,spaces:{},convert:function(e,t,n){return!1!==this.enabled&&t!==n&&t&&n?(this.spaces[t].transfer===Hg&&(e.r=Nv(e.r),e.g=Nv(e.g),e.b=Nv(e.b)),this.spaces[t].primaries!==this.spaces[n].primaries&&(e.applyMatrix3(this.spaces[t].toXYZ),e.applyMatrix3(this.spaces[n].fromXYZ)),this.spaces[n].transfer===Hg&&(e.r=Uv(e.r),e.g=Uv(e.g),e.b=Uv(e.b)),e):e},workingToColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},colorSpaceToWorking:function(e,t){return this.convert(e,t,this.workingColorSpace)},getPrimaries:function(e){return this.spaces[e].primaries},getTransfer:function(e){return e===Ug?zg:this.spaces[e].transfer},getToneMappingMode:function(e){return this.spaces[e].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(e,t=this.workingColorSpace){return e.fromArray(this.spaces[t].luminanceCoefficients)},define:function(e){Object.assign(this.spaces,e)},_getMatrix:function(e,t,n){return e.copy(this.spaces[t].toXYZ).multiply(this.spaces[n].fromXYZ)},_getDrawingBufferColorSpace:function(e){return this.spaces[e].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(e=this.workingColorSpace){return this.spaces[e].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(t,n){return hv("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),e.workingToColorSpace(t,n)},toWorkingColorSpace:function(t,n){return hv("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),e.colorSpaceToWorking(t,n)}},t=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],r=[.3127,.329];return e.define({[kg]:{primaries:t,whitePoint:r,transfer:zg,toXYZ:Bv,fromXYZ:Lv,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:Og},outputColorSpaceConfig:{drawingBufferColorSpace:Og}},[Og]:{primaries:t,whitePoint:r,transfer:Hg,toXYZ:Bv,fromXYZ:Lv,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:Og}}}),e}const Fv=Dv();function Nv(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}
vendor: 4,531 bytes, line 20
20function Uv(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}let Ov;class kv{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{void 0===Ov&&(Ov=av("canvas")),Ov.width=e.width,Ov.height=e.height;const t=Ov.getContext("2d");e instanceof ImageData?t.putImageData(e,0,0):t.drawImage(e,0,0,e.width,e.height),n=Ov}return n.toDataURL(t)}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=av("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e<i.length;e++)i[e]=255*Nv(i[e]/255);return n.putImageData(r,0,0),t}if(e.data){const t=e.data.slice(0);for(let e=0;e<t.length;e++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[e]=Math.floor(255*Nv(t[e]/255)):t[e]=Nv(t[e]);return{data:t,width:e.width,height:e.height}}return uv("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let zv=0;class Hv{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:zv++}),this.uuid=yv(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const t=this.data;return"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):"undefined"!=typeof VideoFrame&&t instanceof VideoFrame?e.set(t.displayHeight,t.displayWidth,0):null!==t?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){!0===e&&this.version++}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.images[this.uuid])return e.images[this.uuid];const n={uuid:this.uuid,url:""},r=this.data;if(null!==r){let e;if(Array.isArray(r)){e=[];for(let t=0,n=r.length;t<n;t++)r[t].isDataTexture?e.push(Gv(r[t].image)):e.push(Gv(r[t]))}else e=Gv(r);n.url=e}return t||(e.images[this.uuid]=n),n}}function Gv(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?kv.getDataURL(e):e.data?{data:Array.from(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(uv("Texture: Unable to serialize Texture."),{})}let Vv=0;const Wv=new Cv;class jv extends fv{constructor(e=jv.DEFAULT_IMAGE,t=jv.DEFAULT_MAPPING,n=1001,r=1001,i=1006,a=1008,s=1023,o=wm,l=jv.DEFAULT_ANISOTROPY,c=""){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:Vv++}),this.uuid=yv(),this.name="",this.source=new Hv(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=a,this.anisotropy=l,this.format=s,this.internalFormat=null,this.type=o,this.offset=new wv(0,0),this.repeat=new wv(1,1),this.center=new wv(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Iv,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=c,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(Wv).x}get height(){return this.source.getSize(Wv).y}get depth(){return this.source.getSize(Wv).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
vendor: 5,980 bytes, line 20
20=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(void 0===n){uv(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const r=this[t];void 0!==r?r&&n&&r.isVector2&&n.isVector2||r&&n&&r.isVector3&&n.isVector3||r&&n&&r.isMatrix3&&n.isMatrix3?r.copy(n):this[t]=n:uv(`Texture.setValues(): property '${t}' does not exist.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])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!==cm)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case mm:e.x=e.x-Math.floor(e.x);break;case gm:e.x=e.x<0?0:1;break;case vm:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case mm:e.y=e.y-Math.floor(e.y);break;case gm:e.y=e.y<0?0:1;break;case vm:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){!0===e&&this.pmremVersion++}}jv.DEFAULT_IMAGE=null,jv.DEFAULT_MAPPING=cm,jv.DEFAULT_ANISOTROPY=1;class Xv{constructor(e=0,t=0,n=0,r=1){Xv.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?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,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,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,r,i;const a=.01,s=.1,o=e.elements,l=o[0],c=o[4],u=o[8],d=o[1],h=o[5],f=o[9],p=o[2],m=o[6],g=o[10];if(Math.abs(c-d)<a&&Math.abs(u-p)<a&&Math.abs(f-m)<a){if(Math.abs(c+d)<s&&Math.abs(u+p)<s&&Math.abs(f+m)<s&&Math.abs(l+h+g-3)<s)return this.set(1,0,0,0),this;t=Math.PI;const e=(l+1)/2,o=(h+1)/2,v=(g+1)/2,y=(c+d)/4,_=(u+p)/4,b=(f+m)/4;return e>o&&e>v?e<a?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(e),r=y/n,i=_/n):o>v?o<a?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(o),n=y/r,i=b/r):v<a?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(v),n=_/i,r=b/i),this.set(n,r,i,t),this}let v=Math.sqrt((m-f)*(m-f)+(u-p)*(u-p)+(d-c)*(d-c));return Math.abs(v)<.001&&(v=1),this.x=(m-f)/v,this.y=(u-p)/v,this.z=(d-c)/v,this.w=Math.acos((l+h+g-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=_v(this.x,e.x,t.x),this.y=_v(this.y,e.y,t.y),this.z=_v(this.z,e.z,t.z),this.w=_v(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=_v(this.x,e,t),this.y=_v(this.y,e,t),this.z=_v(this.z,e,t),this.w=_v(this.w,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(_v(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}
vendor: 11,760 bytes, line 20
20round(){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 Jv extends fv{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:xm,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 Xv(0,0,e,t),this.scissorTest=!1,this.viewport=new Xv(0,0,e,t);const r={width:e,height:t,depth:n.depth},i=new jv(r);this.textures=[];const a=n.count;for(let s=0;s<a;s++)this.textures[s]=i.clone(),this.textures[s].isRenderTargetTexture=!0,this.textures[s].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:xm,generateMipmaps:!1,flipY:!1,internalFormat:null};void 0!==e.mapping&&(t.mapping=e.mapping),void 0!==e.wrapS&&(t.wrapS=e.wrapS),void 0!==e.wrapT&&(t.wrapT=e.wrapT),void 0!==e.wrapR&&(t.wrapR=e.wrapR),void 0!==e.magFilter&&(t.magFilter=e.magFilter),void 0!==e.minFilter&&(t.minFilter=e.minFilter),void 0!==e.format&&(t.format=e.format),void 0!==e.type&&(t.type=e.type),void 0!==e.anisotropy&&(t.anisotropy=e.anisotropy),void 0!==e.colorSpace&&(t.colorSpace=e.colorSpace),void 0!==e.flipY&&(t.flipY=e.flipY),void 0!==e.generateMipmaps&&(t.generateMipmaps=e.generateMipmaps),void 0!==e.internalFormat&&(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){null!==this._depthTexture&&(this._depthTexture.renderTarget=null),null!==e&&(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 r=0,i=this.textures.length;r<i;r++)this.textures[r].image.width=e,this.textures[r].image.height=t,this.textures[r].image.depth=n,!0!==this.textures[r].isData3DTexture&&(this.textures[r].isArrayTexture=this.textures[r].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 n=Object.assign({},e.textures[t].image);this.textures[t].source=new Hv(n)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Yv extends Jv{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class Kv extends jv{constructor(e=null,t=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=ym,this.minFilter=ym,this.wrapR=gm,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class qv extends jv{constructor(e=null,t=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=ym,this.minFilter=ym,this.wrapR=gm,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Qv{constructor(e=new Cv(1/0,1/0,1/0),t=new Cv(-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($v.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint($v.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=$v.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(void 0!==n){const r=n.getAttribute("position");if(!0===t&&void 0!==r&&!0!==e.isInstancedMesh)for(let t=0,n=r.count;t<n;t++)!0===e.isMesh?e.getVertexPosition(t,$v):$v.fromBufferAttribute(r,t),$v.applyMatrix4(e.matrixWorld),this.expandByPoint($v);else void 0!==e.boundingBox?(null===e.boundingBox&&e.computeBoundingBox(),ey.copy(e.boundingBox)):(null===n.boundingBox&&n.computeBoundingBox(),ey.copy(n.boundingBox)),ey.applyMatrix4(e.matrixWorld),this.union(ey)}const r=e.children;for(let i=0,a=r.length;i<a;i++)this.expandByObject(r[i],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,$v),$v.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(oy),ly.subVectors(this.max,oy),ty.subVectors(e.a,oy),ny.subVectors(e.b,oy),ry.subVectors(e.c,oy),iy.subVectors(ny,ty),ay.subVectors(ry,ny),sy.subVectors(ty,ry);let t=[0,-iy.z,iy.y,0,-ay.z,ay.y,0,-sy.z,sy.y,iy.z,0,-iy.x,ay.z,0,-ay.x,sy.z,0,-sy.x,-iy.y,iy.x,0,-ay.y,ay.x,0,-sy.y,sy.x,0];return!!dy(t,ty,ny,ry,ly)&&(t=[1,0,0,0,1,0,0,0,1],!!dy(t,ty,ny,ry,ly)&&(cy.crossVectors(iy,ay),t=[cy.x,cy.y,cy.z],dy(t,ty,ny,ry,ly)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,$v).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize($v).length()),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()||(Zv[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Zv[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Zv[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Zv[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Zv[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Zv[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Zv[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Zv[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Zv)),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 Zv=[new Cv,new Cv,new Cv,new Cv,new Cv,new Cv,new Cv,new Cv],$v=new Cv,ey=new Qv,ty=new Cv,ny=new Cv,ry=new Cv,iy=new Cv,ay=new Cv,sy=new Cv,oy=new Cv,ly=new Cv,cy=new Cv,uy=new Cv;function dy(e,t,n,r,i){for(let a=0,s=e.length-3;a<=s;a+=3){uy.fromArray(e,a);const s=i.x*Math.abs(uy.x)+i.y*Math.abs(uy.y)+i.z*Math.abs(uy.z),o=t.dot(uy),l=n.dot(uy),c=r.dot(uy);if(Math.max(-Math.max(o,l,c),Math.min(o,l,c))>s)return!1}return!0}const hy=new Qv,fy=new Cv,py=new Cv;class my{constructor(e=new Cv,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;void 0!==t?n.copy(t):hy.setFromPoints(e).getCenter(n);let r=0;for(let i=0,a=e.length;i<a;i++)r=Math.max(r,n.distanceToSquared(e[i]));return this.radius=Math.sqrt(r),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)}
vendor: 7,152 bytes, line 20
20applyMatrix4(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;fy.subVectors(e,this.center);const t=fy.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.addScaledVector(fy,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(py.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(fy.copy(e.center).add(py)),this.expandByPoint(fy.copy(e.center).sub(py))),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 gy=new Cv,vy=new Cv,yy=new Cv,_y=new Cv,by=new Cv,xy=new Cv,Sy=new Cv;class Ay{constructor(e=new Cv,t=new Cv(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,gy)),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=gy.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(gy.copy(this.origin).addScaledVector(this.direction,t),gy.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){vy.copy(e).add(t).multiplyScalar(.5),yy.copy(t).sub(e).normalize(),_y.copy(this.origin).sub(vy);const i=.5*e.distanceTo(t),a=-this.direction.dot(yy),s=_y.dot(this.direction),o=-_y.dot(yy),l=_y.lengthSq(),c=Math.abs(1-a*a);let u,d,h,f;if(c>0)if(u=a*o-s,d=a*s-o,f=i*c,u>=0)if(d>=-f)if(d<=f){const e=1/c;u*=e,d*=e,h=u*(u+a*d+2*s)+d*(a*u+d+2*o)+l}else d=i,u=Math.max(0,-(a*d+s)),h=-u*u+d*(d+2*o)+l;else d=-i,u=Math.max(0,-(a*d+s)),h=-u*u+d*(d+2*o)+l;else d<=-f?(u=Math.max(0,-(-a*i+s)),d=u>0?-i:Math.min(Math.max(-i,-o),i),h=-u*u+d*(d+2*o)+l):d<=f?(u=0,d=Math.min(Math.max(-i,-o),i),h=d*(d+2*o)+l):(u=Math.max(0,-(a*i+s)),d=u>0?i:Math.min(Math.max(-i,-o),i),h=-u*u+d*(d+2*o)+l);else d=a>0?-i:i,u=Math.max(0,-(a*d+s)),h=-u*u+d*(d+2*o)+l;return n&&n.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(vy).addScaledVector(yy,d),h}intersectSphere(e,t){gy.subVectors(e.center,this.origin);const n=gy.dot(this.direction),r=gy.dot(gy)-n*n,i=e.radius*e.radius;if(r>i)return null;const a=Math.sqrt(i-r),s=n-a,o=n+a;return o<0?null:s<0?this.at(o,t):this.at(s,t)}intersectsSphere(e){return!(e.radius<0)&&this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?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 null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,a,s,o;const l=1/this.direction.x,c=1/this.direction.y,u=1/this.direction.z,d=this.origin;return l>=0?(n=(e.min.x-d.x)*l,r=(e.max.x-d.x)*l):(n=(e.max.x-d.x)*l,r=(e.min.x-d.x)*l),c>=0?(i=(e.min.y-d.y)*c,a=(e.max.y-d.y)*c):(i=(e.max.y-d.y)*c,a=(e.min.y-d.y)*c),n>a||i>r?null:((i>n||isNaN(n))&&(n=i),(a<r||isNaN(r))&&(r=a),u>=0?(s=(e.min.z-d.z)*u,o=(e.max.z-d.z)*u):(s=(e.max.z-d.z)*u,o=(e.min.z-d.z)*u),n>o||s>r?null:((s>n||n!=n)&&(n=s),(o<r||r!=r)&&(r=o),r<0?null:this.at(n>=0?n:r,t)))}intersectsBox(e){return null!==this.intersectBox(e,gy)}intersectTriangle(e,t,n,r,i){by.subVectors(t,e),xy.subVectors(n,e),Sy.crossVectors(by,xy);let a,s=this.direction.dot(Sy);if(s>0){if(r)return null;a=1}else{if(!(s<0))return null;a=-1,s=-s}_y.subVectors(this.origin,e);const o=a*this.direction.dot(xy.crossVectors(_y,xy));if(o<0)return null;const l=a*this.direction.dot(by.cross(_y));if(l<0)return null;if(o+l>s)return null;const c=-a*_y.dot(Sy);return c<0?null:this.at(c/s,i)}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 My{constructor(e,t,n,r,i,a,s,o,l,c,u,d,h,f,p,m){My.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,a,s,o,l,c,u,d,h,f,p,m)}set(e,t,n,r,i,a,s,o,l,c,u,d,h,f,p,m){const g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=a,g[9]=s,g[13]=o,g[2]=l,g[6]=c,g[10]=u,g[14]=d,g[3]=h,g[7]=f,g[11]=p,g[15]=m,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 My).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 0===this.determinant()?(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(0===e.determinant())return this.identity();const t=this.elements,n=e.elements,r=1/wy.setFromMatrixColumn(e,0).length(),i=1/wy.setFromMatrixColumn(e,1).length(),a=1/wy.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,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,r=e.y,i=e.z,a=Math.cos(n),s=Math.sin(n),o=Math.cos(r),l=Math.sin(r),c=Math.cos(i),u=Math.sin(i);if("XYZ"===e.order){const e=a*c,n=a*u,r=s*c,i=s*u;t[0]=o*c,t[4]=-o*u,t[8]=l,t[1]=n+r*l,t[5]=e-i*l,t[9]=-s*o,t[2]=i-e*l,t[6]=r+n*l,t[10]=a*o}else if("YXZ"===e.order){const e=o*c,n=o*u,r=l*c,i=l*u;t[0]=e+i*s,t[4]=r*s-n,t[8]=a*l,t[1]=a*u,t[5]=a*c,t[9]=-s,t[2]=n*s-r,t[6]=i+e*s,t[10]=a*o}else if("ZXY"===e.order){const e=o*c,n=o*u,r=l*c,i=l*u;t[0]=e-i*s,t[4]=-a*u,t[8]=r+n*s,t[1]=n+r*s,t[5]=a*c,t[9]=i-e*s,t[2]=-a*l,t[6]=s,t[10]=a*o}else if("ZYX"===e.order){const e=a*c,n=a*u,r=s*c,i=s*u;t[0]=o*c,t[4]=r*l-n,t[8]=e*l+i,t[1]=o*u,t[5]=i*l+e,t[9]=n*l-r,t[2]=-l,t[6]=s*o,t[10]=a*o}else if("YZX"===e.order){const e=a*o,n=a*l,r=s*o,i=s*l;t[0]=o*c,t[4]=i-e*u,t[8]=r*u+n,t[1]=u,t[5]=a*c,t[9]=-s*c,t[2]=-l*c,t[6]=n*u+r,t[10]=e-i*u}
vendor: 5,342 bytes, line 20
20else if("XZY"===e.order){const e=a*o,n=a*l,r=s*o,i=s*l;t[0]=o*c,t[4]=-u,t[8]=l*c,t[1]=e*u+i,t[5]=a*c,t[9]=n*u-r,t[2]=r*u-n,t[6]=s*c,t[10]=i*u+e}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(Cy,e,Ty)}lookAt(e,t,n){const r=this.elements;return Py.subVectors(e,t),0===Py.lengthSq()&&(Py.z=1),Py.normalize(),Ry.crossVectors(n,Py),0===Ry.lengthSq()&&(1===Math.abs(n.z)?Py.x+=1e-4:Py.z+=1e-4,Py.normalize(),Ry.crossVectors(n,Py)),Ry.normalize(),Iy.crossVectors(Py,Ry),r[0]=Ry.x,r[4]=Iy.x,r[8]=Py.x,r[1]=Ry.y,r[5]=Iy.y,r[9]=Py.y,r[2]=Ry.z,r[6]=Iy.z,r[10]=Py.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,a=n[0],s=n[4],o=n[8],l=n[12],c=n[1],u=n[5],d=n[9],h=n[13],f=n[2],p=n[6],m=n[10],g=n[14],v=n[3],y=n[7],_=n[11],b=n[15],x=r[0],S=r[4],A=r[8],M=r[12],w=r[1],E=r[5],C=r[9],T=r[13],R=r[2],I=r[6],P=r[10],B=r[14],L=r[3],D=r[7],F=r[11],N=r[15];return i[0]=a*x+s*w+o*R+l*L,i[4]=a*S+s*E+o*I+l*D,i[8]=a*A+s*C+o*P+l*F,i[12]=a*M+s*T+o*B+l*N,i[1]=c*x+u*w+d*R+h*L,i[5]=c*S+u*E+d*I+h*D,i[9]=c*A+u*C+d*P+h*F,i[13]=c*M+u*T+d*B+h*N,i[2]=f*x+p*w+m*R+g*L,i[6]=f*S+p*E+m*I+g*D,i[10]=f*A+p*C+m*P+g*F,i[14]=f*M+p*T+m*B+g*N,i[3]=v*x+y*w+_*R+b*L,i[7]=v*S+y*E+_*I+b*D,i[11]=v*A+y*C+_*P+b*F,i[15]=v*M+y*T+_*B+b*N,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],r=e[8],i=e[12],a=e[1],s=e[5],o=e[9],l=e[13],c=e[2],u=e[6],d=e[10],h=e[14],f=e[3],p=e[7],m=e[11],g=e[15],v=o*h-l*d,y=s*h-l*u,_=s*d-o*u,b=a*h-l*c,x=a*d-o*c,S=a*u-s*c;return t*(p*v-m*y+g*_)-n*(f*v-m*b+g*x)+r*(f*y-p*b+g*S)-i*(f*_-p*x+m*S)}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 r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],c=e[8],u=e[9],d=e[10],h=e[11],f=e[12],p=e[13],m=e[14],g=e[15],v=u*m*l-p*d*l+p*o*h-s*m*h-u*o*g+s*d*g,y=f*d*l-c*m*l-f*o*h+a*m*h+c*o*g-a*d*g,_=c*p*l-f*u*l+f*s*h-a*p*h-c*s*g+a*u*g,b=f*u*o-c*p*o-f*s*d+a*p*d+c*s*m-a*u*m,x=t*v+n*y+r*_+i*b;if(0===x)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const S=1/x;return e[0]=v*S,e[1]=(p*d*i-u*m*i-p*r*h+n*m*h+u*r*g-n*d*g)*S,e[2]=(s*m*i-p*o*i+p*r*l-n*m*l-s*r*g+n*o*g)*S,e[3]=(u*o*i-s*d*i-u*r*l+n*d*l+s*r*h-n*o*h)*S,e[4]=y*S,e[5]=(c*m*i-f*d*i+f*r*h-t*m*h-c*r*g+t*d*g)*S,e[6]=(f*o*i-a*m*i-f*r*l+t*m*l+a*r*g-t*o*g)*S,e[7]=(a*d*i-c*o*i+c*r*l-t*d*l-a*r*h+t*o*h)*S,e[8]=_*S,e[9]=(f*u*i-c*p*i-f*n*h+t*p*h+c*n*g-t*u*g)*S,e[10]=(a*p*i-f*s*i+f*n*l-t*p*l-a*n*g+t*s*g)*S,e[11]=(c*s*i-a*u*i-c*n*l+t*u*l+a*n*h-t*s*h)*S,e[12]=b*S,e[13]=(c*p*r-f*u*r+f*n*d-t*p*d-c*n*m+t*u*m)*S,e[14]=(f*s*r-a*p*r-f*n*o+t*p*o+a*n*m-t*s*m)*S,e[15]=(a*u*r-c*s*r+c*n*o-t*u*o-a*n*d+t*s*d)*S,this}scale(e){const t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,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],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}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),r=Math.sin(t),i=1-n,a=e.x,s=e.y,o=e.z,l=i*a,c=i*s;return this.set(l*a+n,l*s-r*o,l*o+r*s,0,l*s+r*o,c*s+n,c*o-r*a,0,l*o-r*s,c*o+r*a,i*o*o+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,r,i,a){return this.set(1,n,i,0,e,1,a,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,a=t._y,s=t._z,o=t._w,l=i+i,c=a+a,u=s+s,d=i*l,h=i*c,f=i*u,p=a*c,m=a*u,g=s*u,v=o*l,y=o*c,_=o*u,b=n.x,x=n.y,S=n.z;return r[0]=(1-(p+g))*b,r[1]=(h+_)*b,r[2]=(f-y)*b,r[3]=0,r[4]=(h-_)*x,r[5]=(1-(d+g))*x,r[6]=(m+v)*x,r[7]=0,r[8]=(f+y)*S,r[9]=(m-v)*S,r[10]=(1-(d+p))*S,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;if(e.x=r[12],e.y=r[13],e.z=r[14],0===this.determinant())return n.set(1,1,1),t.identity(),this;let i=wy.set(r[0],r[1],r[2]).length();const a=wy.set(r[4],r[5],r[6]).length(),s=wy.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),Ey.copy(this);const o=1/i,l=1/a,c=1/s;return Ey.elements[0]*=o,Ey.elements[1]*=o,Ey.elements[2]*=o,Ey.elements[4]*=l,Ey.elements[5]*=l,Ey.elements[6]*=l,Ey.elements[8]*=c,Ey.elements[9]*=c,Ey.elements[10]*=c,t.setFromRotationMatrix(Ey),n.x=i,n.y=a,n.z=s,this}makePerspective(e,t,n,r,i,a,s=2e3,o=!1){const l=this.elements,c=2*i/(t-e),u=2*i/(n-r),d=(t+e)/(t-e),h=(n+r)/(n-r);let f,p;if(o)f=i/(a-i),p=a*i/(a-i);
vendor: 5,854 bytes, line 20
20else if(s===$g)f=-(a+i)/(a-i),p=-2*a*i/(a-i);else{if(s!==ev)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);f=-a/(a-i),p=-a*i/(a-i)}return l[0]=c,l[4]=0,l[8]=d,l[12]=0,l[1]=0,l[5]=u,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=f,l[14]=p,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,n,r,i,a,s=2e3,o=!1){const l=this.elements,c=2/(t-e),u=2/(n-r),d=-(t+e)/(t-e),h=-(n+r)/(n-r);let f,p;if(o)f=1/(a-i),p=a/(a-i);else if(s===$g)f=-2/(a-i),p=-(a+i)/(a-i);else{if(s!==ev)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);f=-1/(a-i),p=-i/(a-i)}return l[0]=c,l[4]=0,l[8]=0,l[12]=d,l[1]=0,l[5]=u,l[9]=0,l[13]=h,l[2]=0,l[6]=0,l[10]=f,l[14]=p,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])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 wy=new Cv,Ey=new My,Cy=new Cv(0,0,0),Ty=new Cv(1,1,1),Ry=new Cv,Iy=new Cv,Py=new Cv,By=new My,Ly=new Ev;class Dy{constructor(e=0,t=0,n=0,r=Dy.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const r=e.elements,i=r[0],a=r[4],s=r[8],o=r[1],l=r[5],c=r[9],u=r[2],d=r[6],h=r[10];switch(t){case"XYZ":this._y=Math.asin(_v(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-c,h),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(d,l),this._z=0);break;case"YXZ":this._x=Math.asin(-_v(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(s,h),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-u,i),this._z=0);break;case"ZXY":this._x=Math.asin(_v(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,h),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(o,i));break;case"ZYX":this._y=Math.asin(-_v(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,h),this._z=Math.atan2(o,i)):(this._x=0,this._z=Math.atan2(-a,l));break;case"YZX":this._z=Math.asin(_v(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(s,h));break;case"XZY":this._z=Math.asin(-_v(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,l),this._y=Math.atan2(s,i)):(this._x=Math.atan2(-c,h),this._y=0);break;default:uv("Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return By.makeRotationFromQuaternion(e),this.setFromRotationMatrix(By,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Ly.setFromEuler(this),this.setFromQuaternion(Ly,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],void 0!==e[3]&&(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}}Dy.DEFAULT_ORDER="XYZ";class Fy{constructor(){this.mask=1}set(e){this.mask=1<<e>>>0}enable(e){this.mask|=1<<e}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e}disable(e){this.mask&=~(1<<e)}disableAll(){this.mask=0}test(e){return 0!==(this.mask&e.mask)}isEnabled(e){return!!(this.mask&1<<e)}}let Ny=0;const Uy=new Cv,Oy=new Ev,ky=new My,zy=new Cv,Hy=new Cv,Gy=new Cv,Vy=new Ev,Wy=new Cv(1,0,0),jy=new Cv(0,1,0),Xy=new Cv(0,0,1),Jy={type:"added"},Yy={type:"removed"},Ky={type:"childadded",child:null},qy={type:"childremoved",child:null};class Qy extends fv{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:Ny++}),this.uuid=yv(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Qy.DEFAULT_UP.clone();const e=new Cv,t=new Dy,n=new Ev,r=new Cv(1,1,1);t._onChange(function(){n.setFromEuler(t,!1)}),n._onChange(function(){t.setFromQuaternion(n,void 0,!1)}),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:r},modelViewMatrix:{value:new My},normalMatrix:{value:new Iv}}),this.matrix=new My,this.matrixWorld=new My,this.matrixAutoUpdate=Qy.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Qy.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Fy,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)}
vendor: 4,254 bytes, line 20
20setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Oy.setFromAxisAngle(e,t),this.quaternion.multiply(Oy),this}rotateOnWorldAxis(e,t){return Oy.setFromAxisAngle(e,t),this.quaternion.premultiply(Oy),this}rotateX(e){return this.rotateOnAxis(Wy,e)}rotateY(e){return this.rotateOnAxis(jy,e)}rotateZ(e){return this.rotateOnAxis(Xy,e)}translateOnAxis(e,t){return Uy.copy(e).applyQuaternion(this.quaternion),this.position.add(Uy.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(Wy,e)}translateY(e){return this.translateOnAxis(jy,e)}translateZ(e){return this.translateOnAxis(Xy,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(ky.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?zy.copy(e):zy.set(e,t,n);const r=this.parent;this.updateWorldMatrix(!0,!1),Hy.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ky.lookAt(Hy,zy,this.up):ky.lookAt(zy,Hy,this.up),this.quaternion.setFromRotationMatrix(ky),r&&(ky.extractRotation(r.matrixWorld),Oy.setFromRotationMatrix(ky),this.quaternion.premultiply(Oy.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return e===this?(dv("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(Jy),Ky.child=e,this.dispatchEvent(Ky),Ky.child=null):dv("Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}const t=this.children.indexOf(e);return-1!==t&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(Yy),qy.child=e,this.dispatchEvent(qy),qy.child=null),this}removeFromParent(){const e=this.parent;return null!==e&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),ky.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),ky.multiply(e.parent.matrixWorld)),e.applyMatrix4(ky),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(Jy),Ky.child=e,this.dispatchEvent(Ky),Ky.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,r=this.children.length;n<r;n++){const r=this.children[n].getObjectByProperty(e,t);if(void 0!==r)return r}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);const r=this.children;for(let i=0,a=r.length;i<a;i++)r[i].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(Hy,e,Gy),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Hy,Vy,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,r=t.length;n<r;n++)t[n].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;null!==t&&(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)&&(!0===this.matrixWorldAutoUpdate&&(null===this.parent?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,r=t.length;n<r;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(!0===e&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),!0===this.matrixWorldAutoUpdate&&(null===this.parent?this.matrixWorld.copy(this.matrix
vendor: 17,727 bytes, line 20
20):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),!0===t){const e=this.children;for(let t=0,n=e.length;t<n;t++)e[t].updateWorldMatrix(!1,!0)}}toJSON(e){const t=void 0===e||"string"==typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const r={};function i(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.geometryInfo=this._geometryInfo.map(e=>({...e,boundingBox:e.boundingBox?e.boundingBox.toJSON():void 0,boundingSphere:e.boundingSphere?e.boundingSphere.toJSON():void 0})),r.instanceInfo=this._instanceInfo.map(e=>({...e})),r.availableInstanceIds=this._availableInstanceIds.slice(),r.availableGeometryIds=this._availableGeometryIds.slice(),r.nextIndexStart=this._nextIndexStart,r.nextVertexStart=this._nextVertexStart,r.geometryCount=this._geometryCount,r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.matricesTexture=this._matricesTexture.toJSON(e),r.indirectTexture=this._indirectTexture.toJSON(e),null!==this._colorsTexture&&(r.colorsTexture=this._colorsTexture.toJSON(e)),null!==this.boundingSphere&&(r.boundingSphere=this.boundingSphere.toJSON()),null!==this.boundingBox&&(r.boundingBox=this.boundingBox.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t<r;t++){const r=n[t];i(e.shapes,r)}else i(e.shapes,n)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const t=[];for(let n=0,r=this.material.length;n<r;n++)t.push(i(e.materials,this.material[n]));r.material=t}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(let t=0;t<this.children.length;t++)r.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let t=0;t<this.animations.length;t++){const n=this.animations[t];r.animations.push(i(e.animations,n))}}if(t){const t=a(e.geometries),r=a(e.materials),i=a(e.textures),s=a(e.images),o=a(e.shapes),l=a(e.skeletons),c=a(e.animations),u=a(e.nodes);t.length>0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),s.length>0&&(n.images=s),o.length>0&&(n.shapes=o),l.length>0&&(n.skeletons=l),c.length>0&&(n.animations=c),u.length>0&&(n.nodes=u)}return n.object=r,n;function a(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}}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)),!0===t)for(let n=0;n<e.children.length;n++){const t=e.children[n];this.add(t.clone())}return this}}Qy.DEFAULT_UP=new Cv(0,1,0),Qy.DEFAULT_MATRIX_AUTO_UPDATE=!0,Qy.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Zy=new Cv,$y=new Cv,e_=new Cv,t_=new Cv,n_=new Cv,r_=new Cv,i_=new Cv,a_=new Cv,s_=new Cv,o_=new Cv,l_=new Xv,c_=new Xv,u_=new Xv;class d_{constructor(e=new Cv,t=new Cv,n=new Cv){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),Zy.subVectors(e,t),r.cross(Zy);const i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){Zy.subVectors(r,t),$y.subVectors(n,t),e_.subVectors(e,t);const a=Zy.dot(Zy),s=Zy.dot($y),o=Zy.dot(e_),l=$y.dot($y),c=$y.dot(e_),u=a*l-s*s;if(0===u)return i.set(0,0,0),null;const d=1/u,h=(l*o-s*c)*d,f=(a*c-s*o)*d;return i.set(1-h-f,f,h)}static containsPoint(e,t,n,r){return null!==this.getBarycoord(e,t,n,r,t_)&&t_.x>=0&&t_.y>=0&&t_.x+t_.y<=1}static getInterpolation(e,t,n,r,i,a,s,o){return null===this.getBarycoord(e,t,n,r,t_)?(o.x=0,o.y=0,"z"in o&&(o.z=0),"w"in o&&(o.w=0),null):(o.setScalar(0),o.addScaledVector(i,t_.x),o.addScaledVector(a,t_.y),o.addScaledVector(s,t_.z),o)}static getInterpolatedAttribute(e,t,n,r,i,a){return l_.setScalar(0),c_.setScalar(0),u_.setScalar(0),l_.fromBufferAttribute(e,t),c_.fromBufferAttribute(e,n),u_.fromBufferAttribute(e,r),a.setScalar(0),a.addScaledVector(l_,i.x),a.addScaledVector(c_,i.y),a.addScaledVector(u_,i.z),a}static isFrontFacing(e,t,n,r){return Zy.subVectors(n,t),$y.subVectors(e,t),Zy.cross($y).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Zy.subVectors(this.c,this.b),$y.subVectors(this.a,this.b),.5*Zy.cross($y).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return d_.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return d_.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,r,i){return d_.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return d_.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return d_.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,i=this.c;let a,s;n_.subVectors(r,n),r_.subVectors(i,n),a_.subVectors(e,n);const o=n_.dot(a_),l=r_.dot(a_);if(o<=0&&l<=0)return t.copy(n);s_.subVectors(e,r);const c=n_.dot(s_),u=r_.dot(s_);if(c>=0&&u<=c)return t.copy(r);const d=o*u-c*l;if(d<=0&&o>=0&&c<=0)return a=o/(o-c),t.copy(n).addScaledVector(n_,a);o_.subVectors(e,i);const h=n_.dot(o_),f=r_.dot(o_);if(f>=0&&h<=f)return t.copy(i);const p=h*l-o*f;if(p<=0&&l>=0&&f<=0)return s=l/(l-f),t.copy(n).addScaledVector(r_,s);const m=c*f-h*u;if(m<=0&&u-c>=0&&h-f>=0)return i_.subVectors(i,r),s=(u-c)/(u-c+(h-f)),t.copy(r).addScaledVector(i_,s);const g=1/(m+p+d);return a=p*g,s=d*g,t.copy(n).addScaledVector(n_,a).addScaledVector(r_,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const h_={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},f_={h:0,s:0,l:0},p_={h:0,s:0,l:0};function m_(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}class g_{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(void 0===t&&void 0===n){const t=e;t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Og){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,Fv.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=Fv.workingColorSpace){return this.r=e,this.g=t,this.b=n,Fv.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=Fv.workingColorSpace){if(e=bv(e,1),t=_v(t,0,1),n=_v(n,0,1),0===t)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=m_(i,r,e+1/3),this.g=m_(i,r,e),this.b=m_(i,r,e-1/3)}return Fv.colorSpaceToWorking(this,r),this}setStyle(e,t=Og){function n(t){void 0!==t&&parseFloat(t)<1&&uv("Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let i;const a=r[1],s=r[2];switch(a){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,t);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,t);break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,t);break;default:uv("Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const n=r[1],i=n.length;if(3===i)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,t);if(6===i)return this.setHex(parseInt(n,16),t);uv("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Og){const n=h_[e.toLowerCase()];return void 0!==n?this.setHex(n,t):uv("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=Nv(e.r),this.g=Nv(e.g),this.b=Nv(e.b),this}copyLinearToSRGB(e){return this.r=Uv(e.r),this.g=Uv(e.g),this.b=Uv(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Og){return Fv.workingToColorSpace(v_.copy(this),e),65536*Math.round(_v(255*v_.r,0,255))+256*Math.round(_v(255*v_.g,0,255))+Math.round(_v(255*v_.b,0,255))}getHexString(e=Og){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Fv.workingColorSpace){Fv.workingToColorSpace(v_.copy(this),t);const n=v_.r,r=v_.g,i=v_.b,a=Math.max(n,r,i),s=Math.min(n,r,i);let o,l;const c=(s+a)/2;if(s===a)o=0,l=0;else{const e=a-s;switch(l=c<=.5?e/(a+s):e/(2-a-s),a){case n:o=(r-i)/e+(r<i?6:0);break;case r:o=(i-n)/e+2;break;case i:o=(n-r)/e+4}o/=6}return e.h=o,e.s=l,e.l=c,e}getRGB(e,t=Fv.workingColorSpace){return Fv.workingToColorSpace(v_.copy(this),t),e.r=v_.r,e.g=v_.g,e.b=v_.b,e}getStyle(e=Og){Fv.workingToColorSpace(v_.copy(this),e);const t=v_.r,n=v_.g,r=v_.b;return e!==Og?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(255*t)},${Math.round(255*n)},${Math.round(255*r)})`}offsetHSL(e,t,n){return this.getHSL(f_),this.setHSL(f_.h+e,f_.s+t,f_.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(f_),e.getHSL(p_);const n=xv(f_.h,p_.h,t),r=xv(f_.s,p_.s,t),i=xv(f_.l,p_.l,t);return this.setHSL(n,r,i),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,r=this.b,i=e.elements;return this.r=i[0]*t+i[3]*n+i[6]*r,this.g=i[1]*t+i[4]*n+i[7]*r,this.b=i[2]*t+i[5]*n+i[8]*r,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 v_=new g_;g_.NAMES=h_;let y_=0;class __ extends fv{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:y_++}),this.uuid=yv(),this.name="",this.type="Material",this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Bp,this.blendDst=Lp,this.blendEquation=wp,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new g_(0,0,0),this.blendAlpha=0,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Gg,this.stencilZFail=Gg,this.stencilZPass=Gg,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(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){uv(`Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:uv(`Material: '${t}' is not a property of THREE.${this.type}.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};function r(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}
vendor: 5,645 bytes, line 20
20if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),void 0!==this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(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),void 0!==this.dispersion&&(n.dispersion=this.dispersion),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(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),void 0!==this.anisotropy&&(n.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(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,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapRotation&&(n.envMapRotation=this.envMapRotation.toArray()),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),0!==this.side&&(n.side=this.side),!0===this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=!0),this.blendSrc!==Bp&&(n.blendSrc=this.blendSrc),this.blendDst!==Lp&&(n.blendDst=this.blendDst),this.blendEquation!==wp&&(n.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(n.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&
vendor: 7,371 bytes, line 20
20(n.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(n.blendAlpha=this.blendAlpha),3!==this.depthFunc&&(n.depthFunc=this.depthFunc),!1===this.depthTest&&(n.depthTest=this.depthTest),!1===this.depthWrite&&(n.depthWrite=this.depthWrite),!1===this.colorWrite&&(n.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(n.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(n.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(n.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Gg&&(n.stencilFail=this.stencilFail),this.stencilZFail!==Gg&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==Gg&&(n.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(n.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaHash&&(n.alphaHash=!0),!0===this.alphaToCoverage&&(n.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=!0),!0===this.forceSinglePass&&(n.forceSinglePass=!0),!1===this.allowOverride&&(n.allowOverride=!1),!0===this.wireframe&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),t){const t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}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(null!==t){const e=t.length;n=new Array(e);for(let r=0;r!==e;++r)n[r]=t[r].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){!0===e&&this.version++}}class b_ extends __{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new g_(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 Dy,this.combine=0,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 x_=S_();function S_(){const e=new ArrayBuffer(4),t=new Float32Array(e),n=new Uint32Array(e),r=new Uint32Array(512),i=new Uint32Array(512);for(let l=0;l<256;++l){const e=l-127;e<-27?(r[l]=0,r[256|l]=32768,i[l]=24,i[256|l]=24):e<-14?(r[l]=1024>>-e-14,r[256|l]=1024>>-e-14|32768,i[l]=-e-1,i[256|l]=-e-1):e<=15?(r[l]=e+15<<10,r[256|l]=e+15<<10|32768,i[l]=13,i[256|l]=13):e<128?(r[l]=31744,r[256|l]=64512,i[l]=24,i[256|l]=24):(r[l]=31744,r[256|l]=64512,i[l]=13,i[256|l]=13)}const a=new Uint32Array(2048),s=new Uint32Array(64),o=new Uint32Array(64);for(let l=1;l<1024;++l){let e=l<<13,t=0;for(;!(8388608&e);)e<<=1,t-=8388608;e&=-8388609,t+=947912704,a[l]=e|t}for(let l=1024;l<2048;++l)a[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)s[l]=l<<23;s[31]=1199570944,s[32]=2147483648;for(let l=33;l<63;++l)s[l]=2147483648+(l-32<<23);s[63]=3347054592;for(let l=1;l<64;++l)32!==l&&(o[l]=1024);return{floatView:t,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:a,exponentTable:s,offsetTable:o}}function A_(e){Math.abs(e)>65504&&uv("DataUtils.toHalfFloat(): Value out of range."),e=_v(e,-65504,65504),x_.floatView[0]=e;const t=x_.uint32View[0],n=t>>23&511;return x_.baseTable[n]+((8388607&t)>>x_.shiftTable[n])}function M_(e){const t=e>>10;return x_.uint32View[0]=x_.mantissaTable[x_.offsetTable[t]+(1023&e)]+x_.exponentTable[t],x_.floatView[0]}class w_{static toHalfFloat(e){return A_(e)}static fromHalfFloat(e){return M_(e)}}const E_=new Cv,C_=new wv;let T_=0;class R_{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:T_++}),this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=n,this.usage=Qg,this.updateRanges=[],this.gpuType=Pm,this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&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: 11,341 bytes, line 20
20for(let r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,n=this.count;t<n;t++)C_.fromBufferAttribute(this,t),C_.applyMatrix3(e),this.setXY(t,C_.x,C_.y);else if(3===this.itemSize)for(let t=0,n=this.count;t<n;t++)E_.fromBufferAttribute(this,t),E_.applyMatrix3(e),this.setXYZ(t,E_.x,E_.y,E_.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)E_.fromBufferAttribute(this,t),E_.applyMatrix4(e),this.setXYZ(t,E_.x,E_.y,E_.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)E_.fromBufferAttribute(this,t),E_.applyNormalMatrix(e),this.setXYZ(t,E_.x,E_.y,E_.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)E_.fromBufferAttribute(this,t),E_.transformDirection(e),this.setXYZ(t,E_.x,E_.y,E_.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=Sv(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=Av(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=Sv(t,this.array)),t}setX(e,t){return this.normalized&&(t=Av(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Sv(t,this.array)),t}setY(e,t){return this.normalized&&(t=Av(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=Sv(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Av(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=Sv(t,this.array)),t}setW(e,t){return this.normalized&&(t=Av(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Av(t,this.array),n=Av(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=Av(t,this.array),n=Av(n,this.array),r=Av(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.normalized&&(t=Av(t,this.array),n=Av(n,this.array),r=Av(r,this.array),i=Av(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,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!==Qg&&(e.usage=this.usage),e}}class I_ extends R_{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class P_ extends R_{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class B_ extends R_{constructor(e,t,n){super(new Float32Array(e),t,n)}}let L_=0;const D_=new My,F_=new Qy,N_=new Cv,U_=new Qv,O_=new Qv,k_=new Cv;class z_ extends fv{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:L_++}),this.uuid=yv(),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(tv(e)?P_:I_)(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 void 0!==this.attributes[e]}addGroup(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;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const t=(new Iv).getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}const r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(e),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return D_.makeRotationFromQuaternion(e),this.applyMatrix4(D_),this}rotateX(e){return D_.makeRotationX(e),this.applyMatrix4(D_),this}rotateY(e){return D_.makeRotationY(e),this.applyMatrix4(D_),this}rotateZ(e){return D_.makeRotationZ(e),this.applyMatrix4(D_),this}translate(e,t,n){return D_.makeTranslation(e,t,n),this.applyMatrix4(D_),this}scale(e,t,n){return D_.makeScale(e,t,n),this.applyMatrix4(D_),this}lookAt(e){return F_.lookAt(e),F_.updateMatrix(),this.applyMatrix4(F_.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(N_).negate(),this.translate(N_.x,N_.y,N_.z),this}setFromPoints(e){const t=this.getAttribute("position");if(void 0===t){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t.push(r.x,r.y,r.z||0)}this.setAttribute("position",new B_(t,3))}else{const n=Math.min(e.length,t.count);for(let r=0;r<n;r++){const n=e[r];t.setXYZ(r,n.x,n.y,n.z||0)}e.length>t.count&&uv("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new Qv);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return dv("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),void this.boundingBox.set(new Cv(-1/0,-1/0,-1/0),new Cv(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,r=t.length;n<r;n++){const e=t[n];U_.setFromBufferAttribute(e),this.morphTargetsRelative?(k_.addVectors(this.boundingBox.min,U_.min),this.boundingBox.expandByPoint(k_),k_.addVectors(this.boundingBox.max,U_.max),this.boundingBox.expandByPoint(k_)):(this.boundingBox.expandByPoint(U_.min),this.boundingBox.expandByPoint(U_.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&dv('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new my);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return dv("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),void this.boundingSphere.set(new Cv,1/0);if(e){const n=this.boundingSphere.center;if(U_.setFromBufferAttribute(e),t)for(let e=0,i=t.length;e<i;e++){const n=t[e];O_.setFromBufferAttribute(n),this.morphTargetsRelative?(k_.addVectors(U_.min,O_.min),U_.expandByPoint(k_),k_.addVectors(U_.max,O_.max),U_.expandByPoint(k_)):(U_.expandByPoint(O_.min),U_.expandByPoint(O_.max))}U_.getCenter(n);let r=0;for(let t=0,i=e.count;t<i;t++)k_.fromBufferAttribute(e,t),r=Math.max(r,n.distanceToSquared(k_));if(t)for(let i=0,a=t.length;i<a;i++){const a=t[i],s=this.morphTargetsRelative;for(let t=0,i=a.count;t<i;t++)k_.fromBufferAttribute(a,t),s&&(N_.fromBufferAttribute(e,t),k_.add(N_)),r=Math.max(r,n.distanceToSquared(k_))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&dv('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(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void dv("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=t.position,r=t.normal,i=t.uv;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new R_(new Float32Array(4*n.count),4));const a=this.getAttribute("tangent"),s=[],o=[];for(let A=0;A<n.count;A++)s[A]=new Cv,o[A]=new Cv;const l=new Cv,c=new Cv,u=new Cv,d=new wv,h=new wv,f=new wv,p=new Cv,m=new Cv;function g(e,t,r){l.fromBufferAttribute(n,e),c.fromBufferAttribute(n,t),u.fromBufferAttribute(n,r),d.fromBufferAttribute(i,e),h.fromBufferAttribute(i,t),f.fromBufferAttribute(i,r),c.sub(l),u.sub(l),h.sub(d),f.sub(d);const a=1/(h.x*f.y-f.x*h.y);isFinite(a)&&(p.copy(c).multiplyScalar(f.y).addScaledVector(u,-h.y).multiplyScalar(a),m.copy(u).multiplyScalar(h.x).addScaledVector(c,-f.x).multiplyScalar(a),s[e].add(p),s[t].add(p),s[r].add(p),o[e].add(m),o[t].add(m),o[r].add(m))}let v=this.groups;0===v.length&&(v=[{start:0,count:e.count}]);for(let A=0,M=v.length;A<M;++A){const t=v[A],n=t.start;for(let r=n,i=n+t.count;r<i;r+=3)g(e.getX(r+0),e.getX(r+1),e.getX(r+2))}const y=new Cv,_=new Cv,b=new Cv,x=new Cv;function S(e){b.fromBufferAttribute(r,e),x.copy(b);const t=s[e];y.copy(t),y.sub(b.multiplyScalar(b.dot(t))).normalize(),_.crossVectors(x,t);const n=_.dot(o[e])<0?-1:1;a.setXYZW(e,y.x,y.y,y.z,n)}for(let A=0,M=v.length;A<M;++A){const t=v[A],n=t.start;for(let r=n,i=n+t.count;r<i;r+=3)S(e.getX(r+0)),S(e.getX(r+1)),S(e.getX(r+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(void 0!==t){let n=this.getAttribute("normal");if(void 0===n)n=new R_(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(let e=0,t=n.count;e<t;e++)n.setXYZ(e,0,0,0);const r=new Cv,i=new Cv,a=new Cv,s=new Cv,o=new Cv,l=new Cv,c=new Cv,u=new Cv;if(e)for(let d=0,h=e.count;d<h;d+=3){const h=e.getX(d+0),f=e.getX(d+1),p=e.getX(d+2);r.fromBufferAttribute(t,h),i.fromBufferAttribute(t,f),a.fromBufferAttribute(t,p),c.subVectors(a,i),u.subVectors(r,i),c.cross(u),s.fromBufferAttribute(n,h),o.fromBufferAttribute(n,f),l.fromBufferAttribute(n,p),s.add(c),o.add(c),l.add(c),n.setXYZ(h,s.x,s.y,s.z),n.setXYZ(f,o.x,o.y,o.z),n.setXYZ(p,l.x,l.y,l.z)}else for(let e=0,d=t.count;e<d;e+=3)r.fromBufferAttribute(t,e+0),i.fromBufferAttribute(t,e+1),a.fromBufferAttribute(t,e+2),c.subVectors(a,i),u.subVectors(r,i),c.cross(u),n.setXYZ(e+0,c.x,c.y,c.z),n.setXYZ(e+1,c.x,c.y,c.z),n.setXYZ(e+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)k_.fromBufferAttribute(e,t),k_.normalize(),e.setXYZ(t,k_.x,k_.y,k_.z)}toNonIndexed(){function e(e,t){const n=e.array,r=e.itemSize,i=e.normalized,a=new n.constructor(t.length*r);let s=0,o=0;for(let l=0,c=t.length;l<c;l++){s=e.isInterleavedBufferAttribute?t[l]*e.data.stride+e.offset:t[l]*r;for(let e=0;e<r;e++)a[o++]=n[s++]}return new R_(a,r,i)}if(null===this.index)return uv("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new z_,n=this.index.array,r=this.attributes;for(const s in r){const i=e(r[s],n);t.setAttribute(s,i)}const i=this.morphAttributes;for(const s in i){const r=[],a=i[s];for(let t=0,i=a.length;t<i;t++){const i=e(a[t],n);r.push(i)}t.morphAttributes[s]=r}t.morphTargetsRelative=this.morphTargetsRelative;const a=this.groups;for(let s=0,o=a.length;s<o;s++){const e=a[s];t.addGroup(e.start,e.count,e.materialIndex)}return t}toJSON(){const e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};
vendor: 4,094 bytes, line 20
20if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const o in n){const t=n[o];e.data.attributes[o]=t.toJSON(e.data)}const r={};let i=!1;for(const o in this.morphAttributes){const t=this.morphAttributes[o],n=[];for(let r=0,i=t.length;r<i;r++){const i=t[r];n.push(i.toJSON(e.data))}n.length>0&&(r[o]=n,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const s=this.boundingSphere;return null!==s&&(e.data.boundingSphere=s.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;null!==n&&this.setIndex(n.clone());const r=e.attributes;for(const l in r){const e=r[l];this.setAttribute(l,e.clone(t))}const i=e.morphAttributes;for(const l in i){const e=[],n=i[l];for(let r=0,i=n.length;r<i;r++)e.push(n[r].clone(t));this.morphAttributes[l]=e}this.morphTargetsRelative=e.morphTargetsRelative;const a=e.groups;for(let l=0,c=a.length;l<c;l++){const e=a[l];this.addGroup(e.start,e.count,e.materialIndex)}const s=e.boundingBox;null!==s&&(this.boundingBox=s.clone());const o=e.boundingSphere;return null!==o&&(this.boundingSphere=o.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const H_=new My,G_=new Ay,V_=new my,W_=new Cv,j_=new Cv,X_=new Cv,J_=new Cv,Y_=new Cv,K_=new Cv,q_=new Cv,Q_=new Cv;class Z_ extends Qy{constructor(e=new z_,t=new b_){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),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}getVertexPosition(e,t){const n=this.geometry,r=n.attributes.position,i=n.morphAttributes.position,a=n.morphTargetsRelative;t.fromBufferAttribute(r,e);const s=this.morphTargetInfluences;if(i&&s){K_.set(0,0,0);for(let n=0,r=i.length;n<r;n++){const r=s[n],o=i[n];0!==r&&(Y_.fromBufferAttribute(o,e),a?K_.addScaledVector(Y_,r):K_.addScaledVector(Y_.sub(t),r))}t.add(K_)}return t}raycast(e,t){const n=this.geometry,r=this.material,i=this.matrixWorld;if(void 0!==r){if(null===n.boundingSphere&&n.computeBoundingSphere(),V_.copy(n.boundingSphere),V_.applyMatrix4(i),G_.copy(e.ray).recast(e.near),!1===V_.containsPoint(G_.origin)){if(null===G_.intersectSphere(V_,W_))return;if(G_.origin.distanceToSquared(W_)>(e.far-e.near)**2)return}H_.copy(i).invert(),G_.copy(e.ray).applyMatrix4(H_),null!==n.boundingBox&&!1===G_.intersectsBox(n.boundingBox)||this._computeIntersections(e,t,G_)}}_computeIntersections(e,t,n){let r;const i=this.geometry,a=this.material,s=i.index,o=i.attributes.position,l=i.attributes.uv,c=i.attributes.uv1,u=i.attributes.normal,d=i.groups,h=i.drawRange;if(null!==s)if(Array.isArray(a))for(let f=0,p=d.length;f<p;f++){const i=d[f],o=a[i.materialIndex];for(let a=Math.max(i.start,h.start),d=Math.min(s.count,Math.min(i.start+i.count,h.start+h.count));a<d;
vendor: 7,434 bytes, line 20
20a+=3)r=$_(this,o,e,n,l,c,u,s.getX(a),s.getX(a+1),s.getX(a+2)),r&&(r.faceIndex=Math.floor(a/3),r.face.materialIndex=i.materialIndex,t.push(r))}else for(let f=Math.max(0,h.start),p=Math.min(s.count,h.start+h.count);f<p;f+=3)r=$_(this,a,e,n,l,c,u,s.getX(f),s.getX(f+1),s.getX(f+2)),r&&(r.faceIndex=Math.floor(f/3),t.push(r));else if(void 0!==o)if(Array.isArray(a))for(let f=0,p=d.length;f<p;f++){const i=d[f],s=a[i.materialIndex];for(let a=Math.max(i.start,h.start),d=Math.min(o.count,Math.min(i.start+i.count,h.start+h.count));a<d;a+=3)r=$_(this,s,e,n,l,c,u,a,a+1,a+2),r&&(r.faceIndex=Math.floor(a/3),r.face.materialIndex=i.materialIndex,t.push(r))}else for(let f=Math.max(0,h.start),p=Math.min(o.count,h.start+h.count);f<p;f+=3)r=$_(this,a,e,n,l,c,u,f,f+1,f+2),r&&(r.faceIndex=Math.floor(f/3),t.push(r))}}function $_(e,t,n,r,i,a,s,o,l,c){e.getVertexPosition(o,j_),e.getVertexPosition(l,X_),e.getVertexPosition(c,J_);const u=function(e,t,n,r,i,a,s,o){let l;if(l=1===t.side?r.intersectTriangle(s,a,i,!0,o):r.intersectTriangle(i,a,s,0===t.side,o),null===l)return null;Q_.copy(o),Q_.applyMatrix4(e.matrixWorld);const c=n.ray.origin.distanceTo(Q_);return c<n.near||c>n.far?null:{distance:c,point:Q_.clone(),object:e}}(e,t,n,r,j_,X_,J_,q_);if(u){const e=new Cv;d_.getBarycoord(q_,j_,X_,J_,e),i&&(u.uv=d_.getInterpolatedAttribute(i,o,l,c,e,new wv)),a&&(u.uv1=d_.getInterpolatedAttribute(a,o,l,c,e,new wv)),s&&(u.normal=d_.getInterpolatedAttribute(s,o,l,c,e,new Cv),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const t={a:o,b:l,c:c,normal:new Cv,materialIndex:0};d_.getNormal(j_,X_,J_,t.normal),u.face=t,u.barycoord=e}return u}class eb extends z_{constructor(e=1,t=1,n=1,r=1,i=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:a};const s=this;r=Math.floor(r),i=Math.floor(i),a=Math.floor(a);const o=[],l=[],c=[],u=[];let d=0,h=0;function f(e,t,n,r,i,a,f,p,m,g,v){const y=a/m,_=f/g,b=a/2,x=f/2,S=p/2,A=m+1,M=g+1;let w=0,E=0;const C=new Cv;for(let s=0;s<M;s++){const a=s*_-x;for(let o=0;o<A;o++){const d=o*y-b;C[e]=d*r,C[t]=a*i,C[n]=S,l.push(C.x,C.y,C.z),C[e]=0,C[t]=0,C[n]=p>0?1:-1,c.push(C.x,C.y,C.z),u.push(o/m),u.push(1-s/g),w+=1}}for(let s=0;s<g;s++)for(let e=0;e<m;e++){const t=d+e+A*s,n=d+e+A*(s+1),r=d+(e+1)+A*(s+1),i=d+(e+1)+A*s;o.push(t,n,i),o.push(n,r,i),E+=6}s.addGroup(h,E,v),h+=E,d+=w}f("z","y","x",-1,-1,n,t,e,a,i,0),f("z","y","x",1,-1,n,t,-e,a,i,1),f("x","z","y",1,1,e,n,t,r,a,2),f("x","z","y",1,-1,e,n,-t,r,a,3),f("x","y","z",1,-1,e,t,n,r,i,4),f("x","y","z",-1,-1,e,t,-n,r,i,5),this.setIndex(o),this.setAttribute("position",new B_(l,3)),this.setAttribute("normal",new B_(c,3)),this.setAttribute("uv",new B_(u,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new eb(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function tb(e){const t={};for(const n in e){t[n]={};for(const r in e[n]){const i=e[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?i.isRenderTargetTexture?(uv("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[n][r]=null):t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}}return t}function nb(e){const t={};for(let n=0;n<e.length;n++){const r=tb(e[n]);for(const e in r)t[e]=r[e]}return t}function rb(e){const t=e.getRenderTarget();return null===t?e.outputColorSpace:!0===t.isXRRenderTarget?t.texture.colorSpace:Fv.workingColorSpace}const ib={clone:tb,merge:nb};class ab extends __{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",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,void 0!==e&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=tb(e.uniforms),this.uniformsGroups=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].clone());return t}(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 r in this.uniforms){const n=this.uniforms[r].value;n&&n.isTexture?t.uniforms[r]={type:"t",value:n.toJSON(e).uuid}:n&&n.isColor?t.uniforms[r]={type:"c",value:n.getHex()}:n&&n.isVector2?t.uniforms[r]={type:"v2",value:n.toArray()}:n&&n.isVector3?t.uniforms[r]={type:"v3",value:n.toArray()}:n&&n.isVector4?t.uniforms[r]={type:"v4",value:n.toArray()}:n&&n.isMatrix3?t.uniforms[r]={type:"m3",value:n.toArray()}:n&&n.isMatrix4?t.uniforms[r]={type:"m4",value:n.toArray()}:t.uniforms[r]={value:n}}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 r in this.extensions)!0===this.extensions[r]&&(n[r]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class sb extends Qy{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new My,this.projectionMatrix=new My,this.projectionMatrixInverse=new My,this.coordinateSystem=$g,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 ob=new Cv,lb=new wv,cb=new wv;class ub extends sb{constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*vv*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*gv*this.fov);return.5*this.getFilmHeight()/e}
vendor: 4,160 bytes, line 20
20getEffectiveFOV(){return 2*vv*Math.atan(Math.tan(.5*gv*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){ob.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(ob.x,ob.y).multiplyScalar(-e/ob.z),ob.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(ob.x,ob.y).multiplyScalar(-e/ob.z)}getViewSize(e,t){return this.getViewBounds(e,lb,cb),t.subVectors(cb,lb)}setViewOffset(e,t,n,r,i,a){this.aspect=e/t,null===this.view&&(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=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*gv*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const a=this.view;if(null!==this.view&&this.view.enabled){const e=a.fullWidth,s=a.fullHeight;i+=a.offsetX*r/e,t-=a.offsetY*n/s,r*=a.width/e,n*=a.height/s}const s=this.filmOffset;0!==s&&(i+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,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,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const db=-90;class hb extends Qy{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new ub(db,1,e,t);r.layers=this.layers,this.add(r);const i=new ub(db,1,e,t);i.layers=this.layers,this.add(i);const a=new ub(db,1,e,t);a.layers=this.layers,this.add(a);const s=new ub(db,1,e,t);s.layers=this.layers,this.add(s);const o=new ub(db,1,e,t);o.layers=this.layers,this.add(o);const l=new ub(db,1,e,t);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,r,i,a,s,o]=t;for(const l of t)this.remove(l);if(e===$g)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),i.up.set(0,0,-1),i.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),s.up.set(0,1,0),s.lookAt(0,0,1),o.up.set(0,1,0),o.lookAt(0,0,-1);else{if(e!==ev)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),i.up.set(0,0,1),i.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),s.up.set(0,-1,0),s.lookAt(0,0,1),o.up.set(0,-1,0),o.lookAt(0,0,-1)}for(const l of t)this.add(l),l.updateMatrixWorld()}update(e,t){null===this.parent&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[i,a,s,o,l,c]=this.children,u=e.getRenderTarget(),d=e.getActiveCubeFace(),h=e.getActiveMipmapLevel(),f=e.xr.enabled;e.xr.enabled=!1;const p=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,r),e.render(t,i),e.setRenderTarget(n,1,r),e.render(t,a),e.setRenderTarget(n,2,r),e.render(t,s),e.setRenderTarget(n,3,r),e.render(t,o),e.setRenderTarget(n,4,r),e.render(t,l),n.texture.generateMipmaps=p,e.setRenderTarget(n,5,r),e.render(t,c),e.setRenderTarget(u,d,h),e.xr.enabled=f,n.texture.needsPMREMUpdate=!0}}class fb extends jv{constructor(e=[],t=301,n,r,i,a,s,o,l,c){super(e,t,n,r,i,a,s,o,l,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class pb extends Yv{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];this.texture=new fb(r),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace
vendor: 16,926 bytes, line 20
20=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={tEquirect:{value:null}},r="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",i="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",a=new eb(5,5,5),s=new ab({name:"CubemapFromEquirect",uniforms:tb(n),vertexShader:r,fragmentShader:i,side:1,blending:0});s.uniforms.tEquirect.value=t;const o=new Z_(a,s),l=t.minFilter;return t.minFilter===Am&&(t.minFilter=xm),new hb(1,10,this).update(e,o),t.minFilter=l,o.geometry.dispose(),o.material.dispose(),this}clear(e,t=!0,n=!0,r=!0){const i=e.getRenderTarget();for(let a=0;a<6;a++)e.setRenderTarget(this,a),e.clear(t,n,r);e.setRenderTarget(i)}}class mb extends Qy{constructor(){super(),this.isGroup=!0,this.type="Group"}}const gb={type:"move"};class vb{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new mb,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new mb,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Cv,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Cv),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new mb,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Cv,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Cv),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&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}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,a=null;const s=this._targetRay,o=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState){if(l&&e.hand){a=!0;for(const a of e.hand.values()){const e=t.getJointPose(a,n),r=this._getHandJoint(l,a);null!==e&&(r.matrix.fromArray(e.transform.matrix),r.matrix.decompose(r.position,r.rotation,r.scale),r.matrixWorldNeedsUpdate=!0,r.jointRadius=e.radius),r.visible=null!==e}const r=l.joints["index-finger-tip"],i=l.joints["thumb-tip"],s=r.position.distanceTo(i.position),o=.02,c=.005;l.inputState.pinching&&s>o+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&s<=o-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==o&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),null!==i&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1));null!==s&&(r=t.getPose(e.targetRaySpace,n),null===r&&null!==i&&(r=i),null!==r&&(s.matrix.fromArray(r.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,r.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(r.linearVelocity)):s.hasLinearVelocity=!1,r.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(r.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(gb)))}return null!==s&&(s.visible=null!==r),null!==o&&(o.visible=null!==i),null!==l&&(l.visible=null!==a),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){const n=new mb;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class yb{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new g_(e),this.density=t}clone(){return new yb(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class _b{constructor(e,t=1,n=1e3){this.isFog=!0,this.name="",this.color=new g_(e),this.near=t,this.far=n}clone(){return new _b(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class bb extends Qy{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 Dy,this.environmentIntensity=1,this.environmentRotation=new Dy,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(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),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),1!==this.environmentIntensity&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}class xb{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=Qg,this.updateRanges=[],this.version=0,this.uuid=yv()}onUploadCallback(){}set needsUpdate(e){!0===e&&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 r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=yv()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(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 void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=yv()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(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 Sb=new Cv;class Ab{constructor(e,t,n,r=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=r}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++)Sb.fromBufferAttribute(this,t),Sb.applyMatrix4(e),this.setXYZ(t,Sb.x,Sb.y,Sb.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Sb.fromBufferAttribute(this,t),Sb.applyNormalMatrix(e),this.setXYZ(t,Sb.x,Sb.y,Sb.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Sb.fromBufferAttribute(this,t),Sb.transformDirection(e),this.setXYZ(t,Sb.x,Sb.y,Sb.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=Sv(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=Av(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=Av(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=Av(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=Av(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=Av(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=Sv(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=Sv(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=Sv(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=Sv(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=Av(t,this.array),n=Av(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=Av(t,this.array),n=Av(n,this.array),r=Av(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=Av(t,this.array),n=Av(n,this.array),r=Av(r,this.array),i=Av(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=i,this}clone(e){if(void 0===e){cv("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return new R_(new this.array.constructor(e),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new Ab(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(void 0===e){cv("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(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 Mb extends __{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new g_(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 wb;const Eb=new Cv,Cb=new Cv,Tb=new Cv,Rb=new wv,Ib=new wv,Pb=new My,Bb=new Cv,Lb=new Cv,Db=new Cv,Fb=new wv,Nb=new wv,Ub=new wv;class Ob extends Qy{constructor(e=new Mb){if(super(),this.isSprite=!0,this.type="Sprite",void 0===wb){wb=new z_;const e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),t=new xb(e,5);wb.setIndex([0,1,2,0,2,3]),wb.setAttribute("position",new Ab(t,3,0,!1)),wb.setAttribute("uv",new Ab(t,2,3,!1))}this.geometry=wb,this.material=e,this.center=new wv(.5,.5),this.count=1}raycast(e,t){null===e.camera&&dv('Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Cb.setFromMatrixScale(this.matrixWorld),Pb.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Tb.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&Cb.multiplyScalar(-Tb.z);const n=this.material.rotation;let r,i;0!==n&&(i=Math.cos(n),r=Math.sin(n));const a=this.center;kb(Bb.set(-.5,-.5,0),Tb,a,Cb,r,i),kb(Lb.set(.5,-.5,0),Tb,a,Cb,r,i),kb(Db.set(.5,.5,0),Tb,a,Cb,r,i),Fb.set(0,0),Nb.set(1,0),Ub.set(1,1);let s=e.ray.intersectTriangle(Bb,Lb,Db,!1,Eb);if(null===s&&(kb(Lb.set(-.5,.5,0),Tb,a,Cb,r,i),Nb.set(0,1),s=e.ray.intersectTriangle(Bb,Db,Lb,!1,Eb),null===s))return;const o=e.ray.origin.distanceTo(Eb);o<e.near||o>e.far||t.push({distance:o,point:Eb.clone(),uv:d_.getInterpolation(Eb,Bb,Lb,Db,Fb,Nb,Ub,new wv),face:null,object:this})}copy(e,t){return super.copy(e,t),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function kb(e,t,n,r,i,a){Rb.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(Ib.x=a*Rb.x-i*Rb.y,Ib.y=i*Rb.x+a*Rb.y):Ib.copy(Rb),e.copy(t),e.x+=Ib.x,e.y+=Ib.y,e.applyMatrix4(Pb)}const zb=new Cv,Hb=new Cv;class Gb extends Qy{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,r=t.length;n<r;n++){const e=t[n];this.addLevel(e.object.clone(),e.distance,e.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,n=0){t=Math.abs(t);const r=this.levels;let i;for(i=0;i<r.length&&!(t<r[i].distance);i++);return r.splice(i,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 e=t.splice(n,1);return this.remove(e[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,r;for(n=1,r=t.length;n<r;n++){let r=t[n].distance;if(t[n].object.visible&&(r-=r*t[n].hysteresis),e<r)break}return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){zb.setFromMatrixPosition(this.matrixWorld);const n=e.ray.origin.distanceTo(zb);this.getObjectForDistance(n).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){zb.setFromMatrixPosition(e.matrixWorld),Hb.setFromMatrixPosition(this.matrixWorld);const n=zb.distanceTo(Hb)/e.zoom;let r,i;for(t[0].object.visible=!0,r=1,i=t.length;r<i;r++){let e=t[r].distance;if(t[r].object.visible&&(e-=e*t[r].hysteresis),!(n>=e))break;t[r-1].object.visible=!1,t[r].object.visible=!0}for(this._currentLevel=r-1;r<i;r++)t[r].object.visible=!1}}toJSON(e){const t=super.toJSON(e);!1===this.autoUpdate&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let r=0,i=n.length;r<i;r++){const e=n[r];t.object.levels.push({object:e.object.uuid,distance:e.distance,hysteresis:e.hysteresis})}return t}}const Vb=new Cv,Wb=new Xv,jb=new Xv,Xb=new Cv,Jb=new My,Yb=new Cv,Kb=new my,qb=new My,Qb=new Ay;class Zb extends Z_{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=om,this.bindMatrix=new My,this.bindMatrixInverse=new My,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;null===this.boundingBox&&(this.boundingBox=new Qv),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,Yb),this.boundingBox.expandByPoint(Yb)}computeBoundingSphere(){const e=this.geometry;null===this.boundingSphere&&(this.boundingSphere=new my),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,Yb),this.boundingSphere.expandByPoint(Yb)}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,null!==e.boundingBox&&
vendor: 9,492 bytes, line 20
20(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const n=this.material,r=this.matrixWorld;void 0!==n&&(null===this.boundingSphere&&this.computeBoundingSphere(),Kb.copy(this.boundingSphere),Kb.applyMatrix4(r),!1!==e.ray.intersectsSphere(Kb)&&(qb.copy(r).invert(),Qb.copy(e.ray).applyMatrix4(qb),null!==this.boundingBox&&!1===Qb.intersectsBox(this.boundingBox)||this._computeIntersections(e,t,Qb)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,void 0===t&&(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 Xv,t=this.geometry.attributes.skinWeight;for(let n=0,r=t.count;n<r;n++){e.fromBufferAttribute(t,n);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===om?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===lm?this.bindMatrixInverse.copy(this.bindMatrix).invert():uv("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const n=this.skeleton,r=this.geometry;Wb.fromBufferAttribute(r.attributes.skinIndex,e),jb.fromBufferAttribute(r.attributes.skinWeight,e),Vb.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let i=0;i<4;i++){const e=jb.getComponent(i);if(0!==e){const r=Wb.getComponent(i);Jb.multiplyMatrices(n.bones[r].matrixWorld,n.boneInverses[r]),t.addScaledVector(Xb.copy(Vb).applyMatrix4(Jb),e)}}return t.applyMatrix4(this.bindMatrixInverse)}}class $b extends Qy{constructor(){super(),this.isBone=!0,this.type="Bone"}}class ex extends jv{constructor(e=null,t=1,n=1,r,i,a,s,o,l=1003,c=1003,u,d){super(null,a,s,o,l,c,r,i,u,d),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const tx=new My,nx=new My;class rx{constructor(e=[],t=[]){this.uuid=yv(),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(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){uv("Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let e=0,t=this.bones.length;e<t;e++)this.boneInverses.push(new My)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const t=new My;this.bones[e]&&t.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(t)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&t.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&(t.parent&&t.parent.isBone?(t.matrix.copy(t.parent.matrixWorld).invert(),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,r=this.boneTexture;for(let i=0,a=e.length;i<a;i++){const r=e[i]?e[i].matrixWorld:nx;tx.multiplyMatrices(r,t[i]),tx.toArray(n,16*i)}null!==r&&(r.needsUpdate=!0)}clone(){return new rx(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(4*this.bones.length);e=4*Math.ceil(e/4),e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new ex(t,e,e,zm,Pm);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 n=this.bones[t];if(n.name===e)return n}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,r=e.bones.length;n<r;n++){const r=e.bones[n];let i=t[r];void 0===i&&(uv("Skeleton: No bone found with UUID:",r),i=new $b),this.bones.push(i),this.boneInverses.push((new My).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 r=0,i=t.length;r<i;r++){const i=t[r];e.bones.push(i.uuid);const a=n[r];e.boneInverses.push(a.toArray())}return e}}class ix extends R_{constructor(e,t,n,r=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=r}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 ax=new My,sx=new My,ox=[],lx=new Qv,cx=new My,ux=new Z_,dx=new my;class hx extends Z_{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new ix(new Float32Array(16*n),16),this.instanceColor=null,this.morphTexture=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let r=0;r<n;r++)this.setMatrixAt(r,cx)}computeBoundingBox(){const e=this.geometry,t=this.count;null===this.boundingBox&&(this.boundingBox=new Qv),null===e.boundingBox&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,ax),lx.copy(e.boundingBox).applyMatrix4(ax),this.boundingBox.union(lx)}computeBoundingSphere(){const e=this.geometry,t=this.count;null===this.boundingSphere&&(this.boundingSphere=new my),null===e.boundingSphere&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,ax),dx.copy(e.boundingSphere).applyMatrix4(ax),this.boundingSphere.union(dx)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),null!==e.morphTexture&&(this.morphTexture=e.morphTexture.clone()),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,16*e)}getMorphAt(e,t){const n=t.morphTargetInfluences,r=this.morphTexture.source.data.data,i=e*(n.length+1)+1;for(let a=0;a<n.length;a++)n[a]=r[i+a]}raycast(e,t){const n=this.matrixWorld,r=this.count;if(ux.geometry=this.geometry,ux.material=this.material,void 0!==ux.material&&(null===this.boundingSphere&&this.computeBoundingSphere(),dx.copy(this.boundingSphere),dx.applyMatrix4(n),!1!==e.ray.intersectsSphere(dx)))for(let i=0;i<r;i++){this.getMatrixAt(i,ax),sx.multiplyMatrices(n,ax),ux.matrixWorld=sx,ux.raycast(e,ox);for(let e=0,n=ox.length;e<n;e++){const n=ox[e];n.instanceId=i,n.object=this,t.push(n)}ox.length=0}}setColorAt(e,t){null===this.instanceColor&&(this.instanceColor=new ix(new Float32Array(3*this.instanceMatrix.count).fill(1),3)),t.toArray(this.instanceColor.array,3*e)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,16*e)}setMorphAt(e,t){const n=t.morphTargetInfluences,r=n.length+1;null===this.morphTexture&&(this.morphTexture=new ex(new Float32Array(r*this.count),r,this.count,Vm,Pm));const i=this.morphTexture.source.data.data;let a=0;for(let l=0;l<n.length;l++)a+=n[l];const s=this.geometry.morphTargetsRelative?1:1-a,o=r*e;i[o]=s,i.set(n,o+1)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),null!==this.morphTexture&&(this.morphTexture.dispose(),this.morphTexture=null)}}const fx=new Cv,px=new Cv,mx=new Iv;class gx{constructor(e=new Cv(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,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=fx.subVectors(n,t).cross(px.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const n=e.delta(fx),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(e.start).addScaledVector(n,i)}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||mx.getNormalMatrix(e),r=this.coplanarPoint(fx).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),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 vx=new my,yx=new wv(.5,.5),_x=new Cv;class bx{constructor(e=new gx,t=new gx,n=new gx,r=new gx,i=new gx,a=new gx){this.planes=[e,t,n,r,i,a]}set(e,t,n,r,i,a){const s=this.planes;
vendor: 20,596 bytes, line 20
20return s[0].copy(e),s[1].copy(t),s[2].copy(n),s[3].copy(r),s[4].copy(i),s[5].copy(a),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=2e3,n=!1){const r=this.planes,i=e.elements,a=i[0],s=i[1],o=i[2],l=i[3],c=i[4],u=i[5],d=i[6],h=i[7],f=i[8],p=i[9],m=i[10],g=i[11],v=i[12],y=i[13],_=i[14],b=i[15];if(r[0].setComponents(l-a,h-c,g-f,b-v).normalize(),r[1].setComponents(l+a,h+c,g+f,b+v).normalize(),r[2].setComponents(l+s,h+u,g+p,b+y).normalize(),r[3].setComponents(l-s,h-u,g-p,b-y).normalize(),n)r[4].setComponents(o,d,m,_).normalize(),r[5].setComponents(l-o,h-d,g-m,b-_).normalize();else if(r[4].setComponents(l-o,h-d,g-m,b-_).normalize(),t===$g)r[5].setComponents(l+o,h+d,g+m,b+_).normalize();else{if(t!==ev)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);r[5].setComponents(o,d,m,_).normalize()}return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),vx.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),vx.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(vx)}intersectsSprite(e){vx.center.set(0,0,0);const t=yx.distanceTo(e.center);return vx.radius=.7071067811865476+t,vx.applyMatrix4(e.matrixWorld),this.intersectsSphere(vx)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let i=0;i<6;i++)if(t[i].distanceToPoint(n)<r)return!1;return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const r=t[n];if(_x.x=r.normal.x>0?e.max.x:e.min.x,_x.y=r.normal.y>0?e.max.y:e.min.y,_x.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(_x)<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 xx=new My,Sx=new bx;class Ax{constructor(){this.coordinateSystem=$g}intersectsObject(e,t){if(!t.isArrayCamera||0===t.cameras.length)return!1;for(let n=0;n<t.cameras.length;n++){const r=t.cameras[n];if(xx.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),Sx.setFromProjectionMatrix(xx,r.coordinateSystem,r.reversedDepth),Sx.intersectsObject(e))return!0}return!1}intersectsSprite(e,t){if(!t||!t.cameras||0===t.cameras.length)return!1;for(let n=0;n<t.cameras.length;n++){const r=t.cameras[n];if(xx.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),Sx.setFromProjectionMatrix(xx,r.coordinateSystem,r.reversedDepth),Sx.intersectsSprite(e))return!0}return!1}intersectsSphere(e,t){if(!t||!t.cameras||0===t.cameras.length)return!1;for(let n=0;n<t.cameras.length;n++){const r=t.cameras[n];if(xx.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),Sx.setFromProjectionMatrix(xx,r.coordinateSystem,r.reversedDepth),Sx.intersectsSphere(e))return!0}return!1}intersectsBox(e,t){if(!t||!t.cameras||0===t.cameras.length)return!1;for(let n=0;n<t.cameras.length;n++){const r=t.cameras[n];if(xx.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),Sx.setFromProjectionMatrix(xx,r.coordinateSystem,r.reversedDepth),Sx.intersectsBox(e))return!0}return!1}containsPoint(e,t){if(!t||!t.cameras||0===t.cameras.length)return!1;for(let n=0;n<t.cameras.length;n++){const r=t.cameras[n];if(xx.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),Sx.setFromProjectionMatrix(xx,r.coordinateSystem,r.reversedDepth),Sx.containsPoint(e))return!0}return!1}clone(){return new Ax}}function Mx(e,t){return e-t}function wx(e,t){return e.z-t.z}function Ex(e,t){return t.z-e.z}class Cx{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,t,n,r){const i=this.pool,a=this.list;this.index>=i.length&&i.push({start:-1,count:-1,z:-1,index:-1});const s=i[this.index];a.push(s),this.index++,s.start=e,s.count=t,s.z=n,s.index=r}reset(){this.list.length=0,this.index=0}}const Tx=new My,Rx=new g_(1,1,1),Ix=new bx,Px=new Ax,Bx=new Qv,Lx=new my,Dx=new Cv,Fx=new Cv,Nx=new Cv,Ux=new Cx,Ox=new Z_,kx=[];function zx(e,t,n=0){const r=t.itemSize;if(e.isInterleavedBufferAttribute||e.array.constructor!==t.array.constructor){const i=e.count;for(let a=0;a<i;a++)for(let i=0;i<r;i++)t.setComponent(a+n,i,e.getComponent(a,i))}else t.array.set(e.array,n*r);t.needsUpdate=!0}function Hx(e,t){if(e.constructor!==t.constructor){const n=Math.min(e.length,t.length);for(let r=0;r<n;r++)t[r]=e[r]}else{const n=Math.min(e.length,t.length);t.set(new e.constructor(e.buffer,0,n))}}class Gx extends Z_{constructor(e,t,n=2*t,r){super(new z_,r),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(4*this._maxInstanceCount);e=4*Math.ceil(e/4),e=Math.max(e,4);const t=new Float32Array(e*e*4),n=new ex(t,e,e,zm,Pm);this._matricesTexture=n}_initIndirectTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Uint32Array(e*e),n=new ex(t,e,e,Wm,Im);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 ex(t,e,e,zm,Pm);n.colorSpace=Fv.workingColorSpace,this._colorsTexture=n}_initializeGeometry(e){const t=this.geometry,n=this._maxVertexCount,r=this._maxIndexCount;if(!1===this._geometryInitialized){for(const r in e.attributes){const i=e.getAttribute(r),{array:a,itemSize:s,normalized:o}=i,l=new a.constructor(n*s),c=new R_(l,s,o);t.setAttribute(r,c)}if(null!==e.getIndex()){const e=n>65535?new Uint32Array(r):new Uint16Array(r);t.setIndex(new R_(e,1))}this._geometryInitialized=!0}}_validateGeometry(e){const t=this.geometry;if(Boolean(e.getIndex())!==Boolean(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 r=e.getAttribute(n),i=t.getAttribute(n);if(r.itemSize!==i.itemSize||r.normalized!==i.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||!1===t[e].active)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||!1===t[e].active)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(){null===this.boundingBox&&(this.boundingBox=new Qv);const e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let n=0,r=t.length;n<r;n++){if(!1===t[n].active)continue;const r=t[n].geometryIndex;this.getMatrixAt(n,Tx),this.getBoundingBoxAt(r,Bx).applyMatrix4(Tx),e.union(Bx)}}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new my);const e=this.boundingSphere,t=this._instanceInfo;e.makeEmpty();for(let n=0,r=t.length;n<r;n++){if(!1===t[n].active)continue;const r=t[n].geometryIndex;this.getMatrixAt(n,Tx),this.getBoundingSphereAt(r,Lx).applyMatrix4(Tx),e.union(Lx)}}addInstance(e){if(this._instanceInfo.length>=this.maxInstanceCount&&0===this._availableInstanceIds.length)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const t={visible:!0,active:!0,geometryIndex:e};let n=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(Mx),n=this._availableInstanceIds.shift(),this._instanceInfo[n]=t):(n=this._instanceInfo.length,this._instanceInfo.push(t));const r=this._matricesTexture;Tx.identity().toArray(r.image.data,16*n),r.needsUpdate=!0;const i=this._colorsTexture;return i&&(Rx.toArray(i.image.data,4*n),i.needsUpdate=!0),this._visibilityChanged=!0,n}addGeometry(e,t=-1,n=-1){this._initializeGeometry(e),this._validateGeometry(e);const r={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},i=this._geometryInfo;r.vertexStart=this._nextVertexStart,r.reservedVertexCount=-1===t?e.getAttribute("position").count:t;const a=e.getIndex();if(null!==a&&(r.indexStart=this._nextIndexStart,r.reservedIndexCount=-1===n?a.count:n),-1!==r.indexStart&&r.indexStart+r.reservedIndexCount>this._maxIndexCount||r.vertexStart+r.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let s;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(Mx),s=this._availableGeometryIds.shift(),i[s]=r):(s=this._geometryCount,this._geometryCount++,i.push(r)),this.setGeometryAt(s,e),this._nextIndexStart=r.indexStart+r.reservedIndexCount,this._nextVertexStart=r.vertexStart+r.reservedVertexCount,s}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const n=this.geometry,r=null!==n.getIndex(),i=n.getIndex(),a=t.getIndex(),s=this._geometryInfo[e];if(r&&a.count>s.reservedIndexCount||t.attributes.position.count>s.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const o=s.vertexStart,l=s.reservedVertexCount;s.vertexCount=t.getAttribute("position").count;for(const c in n.attributes){const e=t.getAttribute(c),r=n.getAttribute(c);zx(e,r,o);const i=e.itemSize;for(let t=e.count,n=l;t<n;t++){const e=o+t;for(let t=0;t<i;t++)r.setComponent(e,t,0)}r.needsUpdate=!0,r.addUpdateRange(o*i,l*i)}if(r){const e=s.indexStart,n=s.reservedIndexCount;s.indexCount=t.getIndex().count;for(let t=0;t<a.count;t++)i.setX(e+t,o+a.getX(t));for(let t=a.count,r=n;t<r;t++)i.setX(e+t,o);i.needsUpdate=!0,i.addUpdateRange(e,s.reservedIndexCount)}return s.start=r?s.indexStart:s.vertexStart,s.count=r?s.indexCount:s.vertexCount,s.boundingBox=null,null!==t.boundingBox&&(s.boundingBox=t.boundingBox.clone()),s.boundingSphere=null,null!==t.boundingSphere&&(s.boundingSphere=t.boundingSphere.clone()),this._visibilityChanged=!0,e}deleteGeometry(e){const t=this._geometryInfo;if(e>=t.length||!1===t[e].active)return this;const n=this._instanceInfo;for(let r=0,i=n.length;r<i;r++)n[r].active&&n[r].geometryIndex===e&&this.deleteInstance(r);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,r=n.map((e,t)=>t).sort((e,t)=>n[e].vertexStart-n[t].vertexStart),i=this.geometry;for(let a=0,s=n.length;a<s;a++){const s=r[a],o=n[s];if(!1!==o.active){if(null!==i.index){if(o.indexStart!==t){const{indexStart:n,vertexStart:r,reservedIndexCount:a}=o,s=i.index,l=s.array,c=e-r;for(let e=n;e<n+a;e++)l[e]=l[e]+c;s.array.copyWithin(t,n,n+a),s.addUpdateRange(t,a),s.needsUpdate=!0,o.indexStart=t}t+=o.reservedIndexCount}if(o.vertexStart!==e){const{vertexStart:t,reservedVertexCount:n}=o,r=i.attributes;for(const i in r){const a=r[i],{array:s,itemSize:o}=a;s.copyWithin(e*o,t*o,(t+n)*o),a.addUpdateRange(e*o,n*o),a.needsUpdate=!0}o.vertexStart=e}e+=o.reservedVertexCount,o.start=i.index?o.indexStart:o.vertexStart,this._nextIndexStart=i.index?o.indexStart+o.reservedIndexCount:0,this._nextVertexStart=o.vertexStart+o.reservedVertexCount}}return this._visibilityChanged=!0,this}getBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;const n=this.geometry,r=this._geometryInfo[e];if(null===r.boundingBox){const e=new Qv,t=n.index,i=n.attributes.position;for(let n=r.start,a=r.start+r.count;n<a;n++){let r=n;t&&(r=t.getX(r)),e.expandByPoint(Dx.fromBufferAttribute(i,r))}r.boundingBox=e}return t.copy(r.boundingBox),t}getBoundingSphereAt(e,t){if(e>=this._geometryCount)return null;const n=this.geometry,r=this._geometryInfo[e];if(null===r.boundingSphere){const t=new my;this.getBoundingBoxAt(e,Bx),Bx.getCenter(t.center);const i=n.index,a=n.attributes.position;let s=0;for(let e=r.start,n=r.start+r.count;e<n;e++){let n=e;i&&(n=i.getX(n)),Dx.fromBufferAttribute(a,n),s=Math.max(s,t.center.distanceToSquared(Dx))}t.radius=Math.sqrt(s),r.boundingSphere=t}return t.copy(r.boundingSphere),t}setMatrixAt(e,t){this.validateInstanceId(e);const n=this._matricesTexture,r=this._matricesTexture.image.data;return t.toArray(r,16*e),n.needsUpdate=!0,this}getMatrixAt(e,t){return this.validateInstanceId(e),t.fromArray(this._matricesTexture.image.data,16*e)}setColorAt(e,t){return this.validateInstanceId(e),null===this._colorsTexture&&this._initColorsTexture(),t.toArray(this._colorsTexture.image.data,4*e),this._colorsTexture.needsUpdate=!0,this}getColorAt(e,t){return this.validateInstanceId(e),t.fromArray(this._colorsTexture.image.data,4*e)}setVisibleAt(e,t){return this.validateInstanceId(e),this._instanceInfo[e].visible===t||(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(Mx);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 r=new Int32Array(e),i=new Int32Array(e);Hx(this._multiDrawCounts,r),Hx(this._multiDrawStarts,i),this._multiDrawCounts=r,this._multiDrawStarts=i,this._maxInstanceCount=e;const a=this._indirectTexture,s=this._matricesTexture,o=this._colorsTexture;a.dispose(),this._initIndirectTexture(),Hx(a.image.data,this._indirectTexture.image.data),s.dispose(),this._initMatricesTexture(),Hx(s.image.data,this._matricesTexture.image.data),o&&(o.dispose(),this._initColorsTexture(),Hx(o.image.data,this._colorsTexture.image.data))}setGeometrySize(e,t){const n=[...this._geometryInfo].filter(e=>e.active);if(Math.max(...n.map(e=>e.vertexStart+e.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(e=>e.indexStart+e.reservedIndexCount))>t)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`);const r=this.geometry;r.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new z_,this._initializeGeometry(r));const i=this.geometry;r.index&&Hx(r.index.array,i.index.array);for(const a in r.attributes)Hx(r.attributes[a].array,i.attributes[a].array)}raycast(e,t){const n=this._instanceInfo,r=this._geometryInfo,i=this.matrixWorld,a=this.geometry;Ox.material=this.material,Ox.geometry.index=a.index,Ox.geometry.attributes=a.attributes,null===Ox.geometry.boundingBox&&(Ox.geometry.boundingBox=new Qv),null===Ox.geometry.boundingSphere&&(Ox.geometry.boundingSphere=new my);for(let s=0,o=n.length;s<o;s++){if(!n[s].visible||!n[s].active)continue;const a=n[s].geometryIndex,o=r[a];Ox.geometry.setDrawRange(o.start,o.count),this.getMatrixAt(s,Ox.matrixWorld).premultiply(i),this.getBoundingBoxAt(a,Ox.geometry.boundingBox),this.getBoundingSphereAt(a,Ox.geometry.boundingSphere),Ox.raycast(e,kx);for(let e=0,n=kx.length;e<n;e++){const n=kx[e];n.object=this,n.batchId=s,t.push(n)}kx.length=0}Ox.material=null,Ox.geometry.index=null,Ox.geometry.attributes={},Ox.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=null!==e.boundingBox?e.boundingBox.clone():null,this.boundingSphere=null!==e.boundingSphere?e.boundingSphere.clone():null,this._geometryInfo=e._geometryInfo.map(e=>({...e,boundingBox:null!==e.boundingBox?e.boundingBox.clone():null,boundingSphere:null!==e.boundingSphere?e.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(e=>({...e})),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(),null!==this._colorsTexture&&(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,null!==this._colorsTexture&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,n,r,i){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const a=r.getIndex(),s=null===a?1:a.array.BYTES_PER_ELEMENT,o=this._instanceInfo,l=this._multiDrawStarts,c=this._multiDrawCounts,u=this._geometryInfo,d=this.perObjectFrustumCulled,h=this._indirectTexture,f=h.image.data,p=n.isArrayCamera?Px:Ix;d&&!n.isArrayCamera&&(Tx.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),Ix.setFromProjectionMatrix(Tx,n.coordinateSystem,n.reversedDepth));let m=0;if(this.sortObjects){Tx.copy(this.matrixWorld).invert(),Dx.setFromMatrixPosition(n.matrixWorld).applyMatrix4(Tx),Fx.set(0,0,-1).transformDirection(n.matrixWorld).transformDirection(Tx);for(let r=0,i=o.length;r<i;r++)if(o[r].visible&&o[r].active){const e=o[r].geometryIndex;this.getMatrixAt(r,Tx),this.getBoundingSphereAt(e,Lx).applyMatrix4(Tx);let t=!1;if(d&&(t=!p.intersectsSphere(Lx,n)),!t){const t=u[e],n=Nx.subVectors(Lx.center,Dx).dot(Fx);Ux.push(t.start,t.count,n,r)}}const e=Ux.list,t=this.customSort;null===t?e.sort(i.transparent?Ex:wx):t.call(this,e,n);for(let n=0,r=e.length;n<r;n++){const t=e[n];l[m]=t.start*s,c[m]=t.count,f[m]=t.index,m++}Ux.reset()}else for(let g=0,v=o.length;g<v;g++)if(o[g].visible&&o[g].active){const e=o[g].geometryIndex;let t=!1;if(d&&(this.getMatrixAt(g,Tx),this.getBoundingSphereAt(e,Lx).applyMatrix4(Tx),t=!p.intersectsSphere(Lx,n)),!t){const t=u[e];l[m]=t.start*s,c[m]=t.count,f[m]=g,m++}}h.needsUpdate=!0,this._multiDrawCount=m,this._visibilityChanged=!1}onBeforeShadow(e,t,n,r,i,a){this.onBeforeRender(e,null,r,i,a)}}class Vx extends __{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new g_(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 Wx=new Cv,jx=new Cv,Xx=new My,Jx=new Ay,Yx=new my,Kx=new Cv,qx=new Cv;
vendor: 7,071 bytes, line 20
20class Qx extends Qy{constructor(e=new z_,t=new Vx){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(null===e.index){const t=e.attributes.position,n=[0];for(let e=1,r=t.count;e<r;e++)Wx.fromBufferAttribute(t,e-1),jx.fromBufferAttribute(t,e),n[e]=n[e-1],n[e]+=Wx.distanceTo(jx);e.setAttribute("lineDistance",new B_(n,1))}else uv("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Line.threshold,a=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),Yx.copy(n.boundingSphere),Yx.applyMatrix4(r),Yx.radius+=i,!1===e.ray.intersectsSphere(Yx))return;Xx.copy(r).invert(),Jx.copy(e.ray).applyMatrix4(Xx);const s=i/((this.scale.x+this.scale.y+this.scale.z)/3),o=s*s,l=this.isLineSegments?2:1,c=n.index,u=n.attributes.position;if(null!==c){const n=Math.max(0,a.start),r=Math.min(c.count,a.start+a.count);for(let i=n,a=r-1;i<a;i+=l){const n=c.getX(i),r=c.getX(i+1),a=Zx(this,e,Jx,o,n,r,i);a&&t.push(a)}if(this.isLineLoop){const i=c.getX(r-1),a=c.getX(n),s=Zx(this,e,Jx,o,i,a,r-1);s&&t.push(s)}}else{const n=Math.max(0,a.start),r=Math.min(u.count,a.start+a.count);for(let i=n,a=r-1;i<a;i+=l){const n=Zx(this,e,Jx,o,i,i+1,i);n&&t.push(n)}if(this.isLineLoop){const i=Zx(this,e,Jx,o,r-1,n,r-1);i&&t.push(i)}}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}function Zx(e,t,n,r,i,a,s){const o=e.geometry.attributes.position;if(Wx.fromBufferAttribute(o,i),jx.fromBufferAttribute(o,a),n.distanceSqToSegment(Wx,jx,Kx,qx)>r)return;Kx.applyMatrix4(e.matrixWorld);const l=t.ray.origin.distanceTo(Kx);return l<t.near||l>t.far?void 0:{distance:l,point:qx.clone().applyMatrix4(e.matrixWorld),index:s,face:null,faceIndex:null,barycoord:null,object:e}}const $x=new Cv,eS=new Cv;class tS extends Qx{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(null===e.index){const t=e.attributes.position,n=[];for(let e=0,r=t.count;e<r;e+=2)$x.fromBufferAttribute(t,e),eS.fromBufferAttribute(t,e+1),n[e]=0===e?0:n[e-1],n[e+1]=n[e]+$x.distanceTo(eS);e.setAttribute("lineDistance",new B_(n,1))}else uv("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class nS extends Qx{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class rS extends __{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new g_(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 iS=new My,aS=new Ay,sS=new my,oS=new Cv;class lS extends Qy{constructor(e=new z_,t=new rS){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,r=this.matrixWorld,i=e.params.Points.threshold,a=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),sS.copy(n.boundingSphere),sS.applyMatrix4(r),sS.radius+=i,!1===e.ray.intersectsSphere(sS))return;iS.copy(r).invert(),aS.copy(e.ray).applyMatrix4(iS);const s=i/((this.scale.x+this.scale.y+this.scale.z)/3),o=s*s,l=n.index,c=n.attributes.position;if(null!==l)for(let u=Math.max(0,a.start),d=Math.min(l.count,a.start+a.count);u<d;u++){const n=l.getX(u);oS.fromBufferAttribute(c,n),cS(oS,n,o,r,e,t,this)}else for(let u=Math.max(0,a.start),d=Math.min(c.count,a.start+a.count);u<d;u++)oS.fromBufferAttribute(c,u),cS(oS,u,o,r,e,t,this)}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}function cS(e,t,n,r,i,a,s){const o=aS.distanceSqToPoint(e);if(o<n){const n=new Cv;aS.closestPointToPoint(e,n),n.applyMatrix4(r);const l=i.ray.origin.distanceTo(n);if(l<i.near||l>i.far)return;a.push({distance:l,distanceToRay:Math.sqrt(o),point:n,index:t,face:null,faceIndex:null,barycoord:null,object:s})}}class uS extends jv{constructor(e,t,n,r,i=1006,a=1006,s,o,l){super(e,t,n,r,i,a,s,o,l),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;const c=this;"requestVideoFrameCallback"in e&&(this._requestVideoFrameCallbackId=e.requestVideoFrameCallback(function t(){c.needsUpdate=!0,c._requestVideoFrameCallbackId=e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1=="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}dispose(){0!==this._requestVideoFrameCallbackId&&(this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),this._requestVideoFrameCallbackId=0),super.dispose()}}class dS extends jv{constructor(e,t,n,r,i,a,s,o,l,c,u,d){super(null,a,s,o,l,c,r,i,u,d),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class hS extends jv{constructor(e,t,n=1014,r,i,a,s=1003,o=1003,l,c=1026,u=1){if(c!==Hm&&c!==Gm)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");super({width:e,height:t,depth:u},r,i,a,s,o,c,n,l),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new Hv(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return null!==this.compareFunction&&(t.compareFunction=this.compareFunction),t}}class fS extends hS{constructor(e,t=1014,n=301,r,i,a=1003,s=1003,o,l=1026){const c={width:e,height:e,depth:1},u=[c,c,c,c,c,c];super(e,e,t,n,r,i,a,s,o,l),this.image=u,this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(e){this.image=e}}class pS extends jv{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}}class mS extends z_{constructor(e=1,t=1,n=4,r=8,i=1){super(),this.type="CapsuleGeometry",this.parameters={radiu
vendor: 3,783 bytes, line 20
20s:e,height:t,capSegments:n,radialSegments:r,heightSegments:i},t=Math.max(0,t),n=Math.max(1,Math.floor(n)),r=Math.max(3,Math.floor(r)),i=Math.max(1,Math.floor(i));const a=[],s=[],o=[],l=[],c=t/2,u=Math.PI/2*e,d=t,h=2*u+d,f=2*n+i,p=r+1,m=new Cv,g=new Cv;for(let v=0;v<=f;v++){let y=0,_=0,b=0,x=0;if(v<=n){const t=v/n,r=t*Math.PI/2;_=-c-e*Math.cos(r),b=e*Math.sin(r),x=-e*Math.cos(r),y=t*u}else if(v<=n+i){const r=(v-n)/i;_=r*t-c,b=e,x=0,y=u+r*d}else{const t=(v-n-i)/n,r=t*Math.PI/2;_=c+e*Math.sin(r),b=e*Math.cos(r),x=e*Math.sin(r),y=u+d+t*u}const S=Math.max(0,Math.min(1,y/h));let A=0;0===v?A=.5/r:v===f&&(A=-.5/r);for(let e=0;e<=r;e++){const t=e/r,n=t*Math.PI*2,i=Math.sin(n),a=Math.cos(n);g.x=-b*a,g.y=_,g.z=b*i,s.push(g.x,g.y,g.z),m.set(-b*a,x,b*i),m.normalize(),o.push(m.x,m.y,m.z),l.push(t+A,S)}if(v>0){const e=(v-1)*p;for(let t=0;t<r;t++){const n=e+t,r=e+t+1,i=v*p+t,s=v*p+t+1;a.push(n,r,i),a.push(r,s,i)}}}this.setIndex(a),this.setAttribute("position",new B_(s,3)),this.setAttribute("normal",new B_(o,3)),this.setAttribute("uv",new B_(l,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new mS(e.radius,e.height,e.capSegments,e.radialSegments,e.heightSegments)}}class gS extends z_{constructor(e=1,t=32,n=0,r=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},t=Math.max(3,t);const i=[],a=[],s=[],o=[],l=new Cv,c=new wv;a.push(0,0,0),s.push(0,0,1),o.push(.5,.5);for(let u=0,d=3;u<=t;u++,d+=3){const i=n+u/t*r;l.x=e*Math.cos(i),l.y=e*Math.sin(i),a.push(l.x,l.y,l.z),s.push(0,0,1),c.x=(a[d]/e+1)/2,c.y=(a[d+1]/e+1)/2,o.push(c.x,c.y)}for(let u=1;u<=t;u++)i.push(u,u+1,0);this.setIndex(i),this.setAttribute("position",new B_(a,3)),this.setAttribute("normal",new B_(s,3)),this.setAttribute("uv",new B_(o,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new gS(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class vS extends z_{constructor(e=1,t=1,n=1,r=32,i=1,a=!1,s=0,o=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:a,thetaStart:s,thetaLength:o};const l=this;r=Math.floor(r),i=Math.floor(i);const c=[],u=[],d=[],h=[];let f=0;const p=[],m=n/2;let g=0;function v(n){const i=f,a=new wv,p=new Cv;let v=0;const y=!0===n?e:t,_=!0===n?1:-1;for(let e=1;e<=r;e++)u.push(0,m*_,0),d.push(0,_,0),h.push(.5,.5),f++;const b=f;for(let e=0;e<=r;e++){const t=e/r*o+s,n=Math.cos(t),i=Math.sin(t);p.x=y*i,p.y=m*_,p.z=y*n,u.push(p.x,p.y,p.z),d.push(0,_,0),a.x=.5*n+.5,a.y=.5*i*_+.5,h.push(a.x,a.y),f++}for(let e=0;e<r;e++){const t=i+e,r=b+e;!0===n?c.push(r,r+1,t):c.push(r+1,r,t),v+=3}l.addGroup(g,v,!0===n?1:2),g+=v}!function(){const a=new Cv,v=new Cv;let y=0;const _=(t-e)/n;for(let l=0;l<=i;l++){const c=[],g=l/i,y=g*(t-e)+e;for(let e=0;e<=r;e++){const t=e/r,i=t*o+s,l=Math.sin(i),p=Math.cos(i);v.x=y*l,v.y=-g*n+m,v.z=y*p,u.push(v.x,v.y,v.z),a.set(l,_,p).normalize(),d.push(a.x,a.y,a.z),h.push(t,1-g),c.push(f++)}p.push(c)}for(let n=0;n<r;n++)for(let r=0;r<i;r++){const a=p[r][n],s=p[r+1][n],o=p[r+1][n+1],l=p[r][n+1];(e>0||0!==r)&&(c.push(a,s,l),y+=3),(t>0||r!==i-1)&&(c.push(s,o,l),y+=3)}l.addGroup(g,y,0),g+=y}(),!1===a&&(e>0&&v(!0),t>0&&v(!1)),this.setIndex(c),this.setAttribute("position",new B_(u,3)),this.setAttribute("normal",new B_(d,3)),this.setAttribute("uv",new B_(h,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new vS(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class yS extends vS{constructor(e=1,t=1,n=32,r=1,i=!1,a=0,s=2*Math.PI){super(0,e,t,n,r,i,a,s),this.type="C
20oneGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:a,thetaLength:s}}static fromJSON(e){return new yS(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class _S extends z_{constructor(e=[],t=[],n=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r};const i=[],a=[];function s(e,t,n,r){const i=r+1,a=[];for(let s=0;s<=i;s++){a[s]=[];const r=e.clone().lerp(n,s/i),o=t.clone().lerp(n,s/i),l=i-s;for(let e=0;e<=l;e++)a[s][e]=0===e&&s===i?r:r.clone().lerp(o,e/l)}for(let s=0;s<i;s++)for(let e=0;e<2*(i-s)-1;e++){const t=Math.floor(e/2);e%2==0?(o(a[s][t+1]),o(a[s+1][t]),o(a[s][t])):(o(a[s][t+1]),o(a[s+1][t+1]),o(a[s+1][t]))}}function o(e){i.push(e.x,e.y,e.z)}function l(t,n){const r=3*t;n.x=e[r+0],n.y=e[r+1],n.z=e[r+2]}function c(e,t,n,r){r<0&&1===e.x&&(a[t]=e.x-1),0===n.x&&0===n.z&&(a[t]=r/2/Math.PI+.5)}function u(e){return Math.atan2(e.z,-e.x)}function d(e){return Math.atan2(-e.y,Math.sqrt(e.x*e.x+e.z*e.z))}!function(e){const n=new Cv,r=new Cv,i=new Cv;for(let a=0;a<t.length;a+=3)l(t[a+0],n),l(t[a+1],r),l(t[a+2],i),s(n,r,i,e)}(r),function(e){const t=new Cv;for(let n=0;n<i.length;n+=3)t.x=i[n+0],t.y=i[n+1],t.z=i[n+2],t.normalize().multiplyScalar(e),i[n+0]=t.x,i[n+1]=t.y,i[n+2]=t.z}(n),function(){const e=new Cv;for(let t=0;t<i.length;t+=3){e.x=i[t+0],e.y=i[t+1],e.z=i[t+2];const n=u(e)/2/Math.PI+.5,r=d(e)/Math.PI+.5;a.push(n,1-r)}(function(){const e=new Cv,t=new Cv,n=new Cv,r=new Cv,s=new wv,o=new wv,l=new wv;for(let d=0,h=0;d<i.length;d+=9,h+=6){e.set(i[d+0],i[d+1],i[d+2]),t.set(i[d+3],i[d+4],i[d+5]),n.set(i[d+6],i[d+7],i[d+8]),s.set(a[h+0],a[h+1]),o.set(a[h+2],a[h+3]),l.set(a[h+4],a[h+5]),r.copy(e).add(t).add(n).divideScalar(3);const f=u(r);c(s,h+0,e,f),c(o,h+2,t,f),c(l,h+4,n,f)}})(),function(){for(let e=0;e<a.length;e+=6){const t=a[e+0],n=a[e+2],r=a[e+4],i=Math.max(t,n,r),s=Math.min(t,n,r);i>.9&&s<.1&&(t<.2&&(a[e+0]+=1),n<.2&&(a[e+2]+=1),r<.2&&(a[e+4]+=1))}}()}(),this.setAttribute("position",new B_(i,3)),this.setAttribute("normal",new B_(i.slice(),3)),this.setAttribute("uv",new B_(a,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new _S(e.vertices,e.indices,e.radius,e.detail)}}class bS extends _S{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,r=1/n;super([-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,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,
vendor: 8,383 bytes, line 20
2019,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new bS(e.radius,e.detail)}}const xS=new Cv,SS=new Cv,AS=new Cv,MS=new d_;class wS extends z_{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},null!==e){const n=4,r=Math.pow(10,n),i=Math.cos(gv*t),a=e.getIndex(),s=e.getAttribute("position"),o=a?a.count:s.count,l=[0,0,0],c=["a","b","c"],u=new Array(3),d={},h=[];for(let e=0;e<o;e+=3){a?(l[0]=a.getX(e),l[1]=a.getX(e+1),l[2]=a.getX(e+2)):(l[0]=e,l[1]=e+1,l[2]=e+2);const{a:t,b:n,c:o}=MS;if(t.fromBufferAttribute(s,l[0]),n.fromBufferAttribute(s,l[1]),o.fromBufferAttribute(s,l[2]),MS.getNormal(AS),u[0]=`${Math.round(t.x*r)},${Math.round(t.y*r)},${Math.round(t.z*r)}`,u[1]=`${Math.round(n.x*r)},${Math.round(n.y*r)},${Math.round(n.z*r)}`,u[2]=`${Math.round(o.x*r)},${Math.round(o.y*r)},${Math.round(o.z*r)}`,u[0]!==u[1]&&u[1]!==u[2]&&u[2]!==u[0])for(let e=0;e<3;e++){const t=(e+1)%3,n=u[e],r=u[t],a=MS[c[e]],s=MS[c[t]],o=`${n}_${r}`,f=`${r}_${n}`;f in d&&d[f]?(AS.dot(d[f].normal)<=i&&(h.push(a.x,a.y,a.z),h.push(s.x,s.y,s.z)),d[f]=null):o in d||(d[o]={index0:l[e],index1:l[t],normal:AS.clone()})}}for(const e in d)if(d[e]){const{index0:t,index1:n}=d[e];xS.fromBufferAttribute(s,t),SS.fromBufferAttribute(s,n),h.push(xS.x,xS.y,xS.z),h.push(SS.x,SS.y,SS.z)}this.setAttribute("position",new B_(h,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class ES{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){uv("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,r=this.getPoint(0),i=0;t.push(0);for(let a=1;a<=e;a++)n=this.getPoint(a/e),i+=n.distanceTo(r),t.push(i),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t=null){const n=this.getLengths();let r=0;const i=n.length;let a;a=t||e*n[i-1];let s,o=0,l=i-1;for(;o<=l;)if(r=Math.floor(o+(l-o)/2),s=n[r]-a,s<0)o=r+1;else{if(!(s>0)){l=r;break}l=r-1}if(r=l,n[r]===a)return r/(i-1);const c=n[r];return(r+(a-c)/(n[r+1]-c))/(i-1)}getTangent(e,t){const n=1e-4;let r=e-n,i=e+n;r<0&&(r=0),i>1&&(i=1);const a=this.getPoint(r),s=this.getPoint(i),o=t||(a.isVector2?new wv:new Cv);return o.copy(s).sub(a).normalize(),o}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t=!1){const n=new Cv,r=[],i=[],a=[],s=new Cv,o=new My;for(let h=0;h<=e;h++){const t=h/e;r[h]=this.getTangentAt(t,new Cv)}i[0]=new Cv,a[0]=new Cv;let l=Number.MAX_VALUE;const c=Math.abs(r[0].x),u=Math.abs(r[0].y),d=Math.abs(r[0].z);c<=l&&(l=c,n.set(1,0,0)),u<=l&&(l=u,n.set(0,1,0)),d<=l&&n.set(0,0,1),s.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],s),a[0].crossVectors(r[0],i[0]);for(let h=1;h<=e;h++){if(i[h]=i[h-1].clone(),a[h]=a[h-1].clone(),s.crossVectors(r[h-1],r[h]),s.length()>Number.EPSILON){s.normalize();const e=Math.acos(_v(r[h-1].dot(r[h]),-1,1));i[h].applyMatrix4(o.makeRotationAxis(s,e))}a[h].crossVectors(r[h],i[h])}if(!0===t){let t=Math.acos(_v(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(s.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(o.makeRotationAxis(r[n],t*n)),a[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:a}}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 CS extends ES{constructor(e=0,t=0,n=1,r=1,i=0,a=2*Math.PI,s=!1,o=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=a,this.aClockwise=s,this.aRotation=o}getPoint(e,t=new wv){const n=t,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const a=Math.abs(i)<Number.EPSILON;for(;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=a?0:r),!0!==this.aClockwise||a||(i===r?i=-r:i-=r);const s=this.aStartAngle+e*i;let o=this.aX+this.xRadius*Math.cos(s),l=this.aY+this.yRadius*Math.sin(s);if(0!==this.aRotation){const e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),n=o-this.aX,r=l-this.aY;o=n*e-r*t+this.aX,l=n*t+r*e+this.aY}return n.set(o,l)}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 TS extends CS{constructor(e,t,n,r,i,a){super(e,t,n,n,r,i,a),this.isArcCurve=!0,this.type="ArcCurve"}}function RS(){let e=0,t=0,n=0,r=0;function i(i,a,s,o){e=i,t=s,n=-3*i+3*a-2*s-o,r=2*i-2*a+s+o}return{initCatmullRom:function(e,t,n,r,a){i(t,n,a*(n-e),a*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,a,s,o){let l=(t-e)/a-(n-e)/(a+s)+(n-t)/s,c=(n-t)/s-(r-t)/(s+o)+(r-n)/o;l*=s,c*=s,i(t,n,l,c)},calc:function(i){const a=i*i;return e+t*i+n*a+r*(a*i)}}}const IS=new Cv,PS=new RS,BS=new RS,LS=new RS;class DS extends ES{constructor(e=[],t=!1,n="centripetal",r=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=r}getPoint(e,t=new Cv){const n=t,r=this.points,i=r.length,a=(i-(this.closed?0:1))*e;let s,o,l=Math.floor(a),c=a-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/i)+1)*i:0===c&&l===i-1&&(l=i-2,c=1),this.closed||l>0?s=r[(l-1)%i]:(IS.subVectors(r[0],r[1]).add(r[0]),s=IS);const u=r[l%i],d=r[(l+1)%i];if(this.closed||l+2<i?o=r[(l+2)%i]:(IS.subVectors(r[i-1],r[i-2]).add(r[i-1]),o=IS),"centripetal"===this.curveType||"chordal"===this.curveType){const e="chordal"===this.curveType?.5:.25;let t=Math.pow(s.distanceToSquared(u),e),n=Math.pow(u.distanceToSquared(d),e),r=Math.pow(d.distanceToSquared(o),e);n<1e-4&&(n=1),t<1e-4&&(t=n),r<1e-4&&(r=n),PS.initNonuniformCatmullRom(s.x,u.x,d.x,o.x,t,n,r),BS.initNonuniformCatmullRom(s.y,u.y,d.y,o.y,t,n,r),LS.initNonuniformCatmullRom(s.z,u.z,d.z,o.z,t,n,r)}else"catmullrom"===this.curveType&&(PS.initCatmullRom(s.x,u.x,d.x,o.x,this.tension),BS.initCatmullRom(s.y,u.y,d.y,o.y,this.tension),LS.initCatmullRom(s.z,u.z,d.z,o.z,this.tension));return n.set(PS.calc(c),BS.calc(c),LS.calc(c)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.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 n=this.points[t];e.points.push(n.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 n=e.points[t];this.points.push((new Cv).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function FS(e,t,n,r,i){const a=.5*(r-t),s=.5*(i-n),o=e*e;return(2*n-2*r+a+s)*(e*o)+(-3*n+3*r-2*a-s)*o+a*e+n}function NS(e,t,n,r){return function(e,t){const n=1-e;return n*n*t}(e,t)+function(e,t){return 2*(1-e)*e*t}(e,n)+function(e,t){return e*e*t}(e,r)}function US(e,t,n,r,i){return function(e,t){const n=1-e;return n*n*n*t}(e,t)+function(e,t){const n=1-e;return 3*n*n*e*t}(e,n)+function(e,t){return 3*(1-e)*e*e*t}(e,r)+function(e,t){return e*e*e*t}(e,i)}
vendor: 6,107 bytes, line 20
20class OS extends ES{constructor(e=new wv,t=new wv,n=new wv,r=new wv){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new wv){const n=t,r=this.v0,i=this.v1,a=this.v2,s=this.v3;return n.set(US(e,r.x,i.x,a.x,s.x),US(e,r.y,i.y,a.y,s.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 kS extends ES{constructor(e=new Cv,t=new Cv,n=new Cv,r=new Cv){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new Cv){const n=t,r=this.v0,i=this.v1,a=this.v2,s=this.v3;return n.set(US(e,r.x,i.x,a.x,s.x),US(e,r.y,i.y,a.y,s.y),US(e,r.z,i.z,a.z,s.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 zS extends ES{constructor(e=new wv,t=new wv){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new wv){const n=t;return 1===e?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 wv){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 HS extends ES{constructor(e=new Cv,t=new Cv){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new Cv){const n=t;return 1===e?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 Cv){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 GS extends ES{constructor(e=new wv,t=new wv,n=new wv){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new wv){const n=t,r=this.v0,i=this.v1,a=this.v2;return n.set(NS(e,r.x,i.x,a.x),NS(e,r.y,i.y,a.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 VS extends ES{constructor(e=new Cv,t=new Cv,n=new Cv){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Cv){const n=t,r=this.v0,i=this.v1,a=this.v2;return n.set(NS(e,r.x,i.x,a.x),NS(e,r.y,i.y,a.y),NS(e,r.z,i.z,a.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 WS extends ES{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new wv){const n=t,r=this.points,i=(r.length-1)*e,a=Math.floor(i),s=i-a,o=r[0===a?a:a-1],l=r[a],c=r[a>r.length-2?r.length-1:a+1],u=r[a>r.length-3?r.length-1:a+2];return n.set(FS(s,o.x,l.x,c.x,u.x),FS(s,o.y,l.y,c.y,u.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new wv).fromArray(n))}return this}}var jS=Object.freeze({__proto__:null,ArcCurve:TS,CatmullRomCurve3:DS,CubicBezierCurve:OS,CubicBezierCurve3:kS,EllipseCurve:CS,LineCurve:zS,LineCurve3:HS,QuadraticBezierCurve:GS,QuadraticBezierCurve3:VS,SplineCurve:WS});class XS extends ES{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=!0===e.isVector2?"LineCurve":"LineCurve3";this.curves.push(new jS[n](t,e))}return this}getPoint(e,t){const n=e*this.getLength(),r=this.getCurveLengths();let i=0;for(;i<r.length;){if(r[i]>=n){const e=r[i]-n,a=this.curves[i],s=a.getLength(),o=0===s?0:1-e/s;return a.getPointAt(o,t)}i++}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,r=this.curves.length;n<r;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 r=0,i=this.curves;r<i.length;r++){const a=i[r],s=a.isEllipseCurve?2*e:a.isLineCurve||a.isLineCurve3?1:a.isS
vendor: 37,316 bytes, line 20
20plineCurve?e*a.points.length:e,o=a.getPoints(s);for(let e=0;e<o.length;e++){const r=o[e];n&&n.equals(r)||(t.push(r),n=r)}}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 n=e.curves[t];this.curves.push(n.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 n=this.curves[t];e.curves.push(n.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 n=e.curves[t];this.curves.push((new jS[n.type]).fromJSON(n))}return this}}class JS extends XS{constructor(e){super(),this.type="Path",this.currentPoint=new wv,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 zS(this.currentPoint.clone(),new wv(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,r){const i=new GS(this.currentPoint.clone(),new wv(e,t),new wv(n,r));return this.curves.push(i),this.currentPoint.set(n,r),this}bezierCurveTo(e,t,n,r,i,a){const s=new OS(this.currentPoint.clone(),new wv(e,t),new wv(n,r),new wv(i,a));return this.curves.push(s),this.currentPoint.set(i,a),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new WS(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,r,i,a){const s=this.currentPoint.x,o=this.currentPoint.y;return this.absarc(e+s,t+o,n,r,i,a),this}absarc(e,t,n,r,i,a){return this.absellipse(e,t,n,n,r,i,a),this}ellipse(e,t,n,r,i,a,s,o){const l=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(e+l,t+c,n,r,i,a,s,o),this}absellipse(e,t,n,r,i,a,s,o){const l=new CS(e,t,n,r,i,a,s,o);if(this.curves.length>0){const e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);const c=l.getPoint(1);return this.currentPoint.copy(c),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 YS extends JS{constructor(e){super(e),this.uuid=yv(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,r=this.holes.length;n<r;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 n=e.holes[t];this.holes.push(n.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 n=this.holes[t];e.holes.push(n.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 n=e.holes[t];this.holes.push((new JS).fromJSON(n))}return this}}function KS(e,t,n,r,i){let a;if(i===function(e,t,n,r){let i=0;for(let a=t,s=n-r;a<n;a+=r)i+=(e[s]-e[a])*(e[a+1]+e[s+1]),s=a;return i}(e,t,n,r)>0)for(let s=t;s<n;s+=r)a=vA(s/r|0,e[s],e[s+1],a);else for(let s=n-r;s>=t;s-=r)a=vA(s/r|0,e[s],e[s+1],a);return a&&dA(a,a.next)&&(yA(a),a=a.next),a}function qS(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!dA(r,r.next)&&0!==uA(r.prev,r,r.next))r=r.next;else{if(yA(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function QS(e,t,n,r,i,a,s){if(!e)return;!s&&a&&function(e,t,n,r){let i=e;do{0===i.z&&(i.z=aA(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n=1;do{let r,i=e;e=null;let a=null;for(t=0;i;){t++;let s=i,o=0;for(let e=0;e<n&&(o++,s=s.nextZ,s);e++);let l=n;for(;o>0||l>0&&s;)0!==o&&(0===l||!s||i.z<=s.z)?(r=i,i=i.nextZ,o--):(r=s,s=s.nextZ,l--),a?a.nextZ=r:e=r,r.prevZ=a,a=r;i=s}a.nextZ=null,n*=2}while(t>1)}(i)}(e,r,i,a);let o=e;for(;e.prev!==e.next;){const l=e.prev,c=e.next;if(a?$S(e,r,i,a):ZS(e))t.push(l.i,e.i,c.i),yA(e),e=c.next,o=c.next;else if((e=c)===o){s?1===s?QS(e=eA(qS(e),t),t,n,r,i,a,2):2===s&&tA(e,t,n,r,i,a):QS(qS(e),t,n,r,i,a,1);break}}}function ZS(e){const t=e.prev,n=e,r=e.next;if(uA(t,n,r)>=0)return!1;const i=t.x,a=n.x,s=r.x,o=t.y,l=n.y,c=r.y,u=Math.min(i,a,s),d=Math.min(o,l,c),h=Math.max(i,a,s),f=Math.max(o,l,c);let p=r.next;for(;p!==t;){if(p.x>=u&&p.x<=h&&p.y>=d&&p.y<=f&&lA(i,o,a,l,s,c,p.x,p.y)&&uA(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function $S(e,t,n,r){const i=e.prev,a=e,s=e.next;if(uA(i,a,s)>=0)return!1;const o=i.x,l=a.x,c=s.x,u=i.y,d=a.y,h=s.y,f=Math.min(o,l,c),p=Math.min(u,d,h),m=Math.max(o,l,c),g=Math.max(u,d,h),v=aA(f,p,t,n,r),y=aA(m,g,t,n,r);let _=e.prevZ,b=e.nextZ;for(;_&&_.z>=v&&b&&b.z<=y;){if(_.x>=f&&_.x<=m&&_.y>=p&&_.y<=g&&_!==i&&_!==s&&lA(o,u,l,d,c,h,_.x,_.y)&&uA(_.prev,_,_.next)>=0)return!1;if(_=_.prevZ,b.x>=f&&b.x<=m&&b.y>=p&&b.y<=g&&b!==i&&b!==s&&lA(o,u,l,d,c,h,b.x,b.y)&&uA(b.prev,b,b.next)>=0)return!1;b=b.nextZ}for(;_&&_.z>=v;){if(_.x>=f&&_.x<=m&&_.y>=p&&_.y<=g&&_!==i&&_!==s&&lA(o,u,l,d,c,h,_.x,_.y)&&uA(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;b&&b.z<=y;){if(b.x>=f&&b.x<=m&&b.y>=p&&b.y<=g&&b!==i&&b!==s&&lA(o,u,l,d,c,h,b.x,b.y)&&uA(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function eA(e,t){let n=e;do{const r=n.prev,i=n.next.next;!dA(r,i)&&hA(r,n,n.next,i)&&mA(r,i)&&mA(i,r)&&(t.push(r.i,n.i,i.i),yA(n),yA(n.next),n=e=i),n=n.next}while(n!==e);return qS(n)}function tA(e,t,n,r,i,a){let s=e;do{let e=s.next.next;for(;e!==s.prev;){if(s.i!==e.i&&cA(s,e)){let o=gA(s,e);return s=qS(s,s.next),o=qS(o,o.next),QS(s,t,n,r,i,a,0),void QS(o,t,n,r,i,a,0)}e=e.next}s=s.next}while(s!==e)}function nA(e,t){let n=e.x-t.x;return 0===n&&(n=e.y-t.y,0===n)&&(n=(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)),n}function rA(e,t){const n=function(e,t){let n=t;const r=e.x,i=e.y;let a,s=-1/0;if(dA(e,n))return n;do{if(dA(e,n.next))return n.next;if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const e=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=r&&e>s&&(s=e,a=n.x<n.next.x?n:n.next,e===r))return a}n=n.next}while(n!==t);if(!a)return null;const o=a,l=a.x,c=a.y;let u=1/0;n=a;do{if(r>=n.x&&n.x>=l&&r!==n.x&&oA(i<c?r:s,i,l,c,i<c?s:r,i,n.x,n.y)){const t=Math.abs(i-n.y)/(r-n.x);mA(n,e)&&(t<u||t===u&&(n.x>a.x||n.x===a.x&&iA(a,n)))&&(a=n,u=t)}n=n.next}while(n!==o);return a}(e,t);if(!n)return t;const r=gA(n,e);return qS(r,r.next),qS(n,n.next)}function iA(e,t){return uA(e.prev,e,t.prev)<0&&uA(t.next,e,e.next)<0}function aA(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function sA(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function oA(e,t,n,r,i,a,s,o){return(i-s)*(t-o)>=(e-s)*(a-o)&&(e-s)*(r-o)>=(n-s)*(t-o)&&(n-s)*(a-o)>=(i-s)*(r-o)}function lA(e,t,n,r,i,a,s,o){return!(e===s&&t===o)&&oA(e,t,n,r,i,a,s,o)}function cA(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&hA(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(mA(e,t)&&mA(t,e)&&function(e,t){let n=e,r=!1;const i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(uA(e.prev,e,t.prev)||uA(e,t.prev,t))||dA(e,t)&&uA(e.prev,e,e.next)>0&&uA(t.prev,t,t.next)>0)}function uA(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function dA(e,t){return e.x===t.x&&e.y===t.y}function hA(e,t,n,r){const i=pA(uA(e,t,n)),a=pA(uA(e,t,r)),s=pA(uA(n,r,e)),o=pA(uA(n,r,t));return i!==a&&s!==o||!(0!==i||!fA(e,n,t))||!(0!==a||!fA(e,r,t))||!(0!==s||!fA(n,e,r))||!(0!==o||!fA(n,t,r))}function fA(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function pA(e){return e>0?1:e<0?-1:0}function mA(e,t){return uA(e.prev,e,e.next)<0?uA(e,t,e.next)>=0&&uA(e,e.prev,t)>=0:uA(e,t,e.prev)<0||uA(e,e.next,t)<0}function gA(e,t){const n=_A(e.i,e.x,e.y),r=_A(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function vA(e,t,n,r){const i=_A(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function yA(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function _A(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class bA{static triangulate(e,t,n=2){return function(e,t,n=2){const r=t&&t.length,i=r?t[0]*n:e.length;let a=KS(e,0,i,n,!0);const s=[];if(!a||a.next===a.prev)return s;let o,l,c;if(r&&(a=function(e,t,n,r){const i=[];for(let a=0,s=t.length;a<s;a++){const n=KS(e,t[a]*r,a<s-1?t[a+1]*r:e.length,r,!1);n===n.next&&(n.steiner=!0),i.push(sA(n))}i.sort(nA);for(let a=0;a<i.length;a++)n=rA(i[a],n);return n}(e,t,a,n)),e.length>80*n){o=e[0],l=e[1];let t=o,r=l;for(let a=n;a<i;a+=n){const n=e[a],i=e[a+1];n<o&&(o=n),i<l&&(l=i),n>t&&(t=n),i>r&&(r=i)}c=Math.max(t-o,r-l),c=0!==c?32767/c:0}return QS(a,s,n,o,l,c,0),s}(e,t,n)}}class xA{static area(e){const t=e.length;let n=0;for(let r=t-1,i=0;i<t;r=i++)n+=e[r].x*e[i].y-e[i].x*e[r].y;return.5*n}static isClockWise(e){return xA.area(e)<0}static triangulateShape(e,t){const n=[],r=[],i=[];SA(e),AA(n,e);let a=e.length;t.forEach(SA);for(let o=0;o<t.length;o++)r.push(a),a+=t[o].length,AA(n,t[o]);const s=bA.triangulate(n,r);for(let o=0;o<s.length;o+=3)i.push(s.slice(o,o+3));return i}}function SA(e){const t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function AA(e,t){for(let n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}class MA extends z_{constructor(e=new YS([new wv(.5,.5),new wv(-.5,.5),new wv(-.5,-.5),new wv(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,r=[],i=[];for(let s=0,o=e.length;s<o;s++)a(e[s]);function a(e){const a=[],s=void 0!==t.curveSegments?t.curveSegments:12,o=void 0!==t.steps?t.steps:1,l=void 0!==t.depth?t.depth:1;let c=void 0===t.bevelEnabled||t.bevelEnabled,u=void 0!==t.bevelThickness?t.bevelThickness:.2,d=void 0!==t.bevelSize?t.bevelSize:u-.1,h=void 0!==t.bevelOffset?t.bevelOffset:0,f=void 0!==t.bevelSegments?t.bevelSegments:3;const p=t.extrudePath,m=void 0!==t.UVGenerator?t.UVGenerator:wA;let g,v,y,_,b,x=!1;if(p){g=p.getSpacedPoints(o),x=!0,c=!1;const e=!!p.isCatmullRomCurve3&&p.closed;v=p.computeFrenetFrames(o,e),y=new Cv,_=new Cv,b=new Cv}c||(f=0,u=0,d=0,h=0);const S=e.extractPoints(s);let A=S.shape;const M=S.holes;if(!xA.isClockWise(A)){A=A.reverse();for(let e=0,t=M.length;e<t;e++){const t=M[e];xA.isClockWise(t)&&(M[e]=t.reverse())}}function w(e){const t=1e-10*1e-10;let n=e[0];for(let r=1;r<=e.length;r++){const i=r%e.length,a=e[i],s=a.x-n.x,o=a.y-n.y,l=s*s+o*o,c=Math.max(Math.abs(a.x),Math.abs(a.y),Math.abs(n.x),Math.abs(n.y));l<=t*c*c?(e.splice(i,1),r--):n=a}}w(A),M.forEach(w);const E=M.length,C=A;for(let t=0;t<E;t++){const e=M[t];A=A.concat(e)}function T(e,t,n){return t||dv("ExtrudeGeometry: vec does not exist"),e.clone().addScaledVector(t,n)}const R=A.length;function I(e,t,n){let r,i,a;const s=e.x-t.x,o=e.y-t.y,l=n.x-e.x,c=n.y-e.y,u=s*s+o*o,d=s*c-o*l;if(Math.abs(d)>Number.EPSILON){const d=Math.sqrt(u),h=Math.sqrt(l*l+c*c),f=t.x-o/d,p=t.y+s/d,m=((n.x-c/h-f)*c-(n.y+l/h-p)*l)/(s*c-o*l);r=f+s*m-e.x,i=p+o*m-e.y;const g=r*r+i*i;if(g<=2)return new wv(r,i);a=Math.sqrt(g/2)}else{let e=!1;s>Number.EPSILON?l>Number.EPSILON&&(e=!0):s<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(o)===Math.sign(c)&&(e=!0),e?(r=-o,i=s,a=Math.sqrt(u)):(r=s,i=o,a=Math.sqrt(u/2))}return new wv(r/a,i/a)}const P=[];for(let t=0,n=C.length,r=n-1,i=t+1;t<n;t++,r++,i++)r===n&&(r=0),i===n&&(i=0),P[t]=I(C[t],C[r],C[i]);const B=[];let L,D,F=P.concat();for(let t=0,n=E;t<n;t++){const e=M[t];L=[];for(let t=0,n=e.length,r=n-1,i=t+1;t<n;t++,r++,i++)r===n&&(r=0),i===n&&(i=0),L[t]=I(e[t],e[r],e[i]);B.push(L),F=F.concat(L)}if(0===f)D=xA.triangulateShape(C,M);else{const e=[],t=[];for(let n=0;n<f;n++){const r=n/f,i=u*Math.cos(r*Math.PI/2),a=d*Math.sin(r*Math.PI/2)+h;for(let t=0,n=C.length;t<n;t++){const n=T(C[t],P[t],a);k(n.x,n.y,-i),0===r&&e.push(n)}for(let e=0,n=E;e<n;e++){const n=M[e];L=B[e];const s=[];for(let e=0,t=n.length;e<t;e++){const t=T(n[e],L[e],a);k(t.x,t.y,-i),0===r&&s.push(t)}0===r&&t.push(s)}}D=xA.triangulateShape(e,t)}const N=D.length,U=d+h;for(let t=0;t<R;t++){const e=c?T(A[t],F[t],U):A[t];x?(_.copy(v.normals[0]).multiplyScalar(e.x),y.copy(v.binormals[0]).multiplyScalar(e.y),b.copy(g[0]).add(_).add(y),k(b.x,b.y,b.z)):k(e.x,e.y,0)}for(let t=1;t<=o;t++)for(let e=0;e<R;e++){const n=c?T(A[e],F[e],U):A[e];x?(_.copy(v.normals[t]).multiplyScalar(n.x),y.copy(v.binormals[t]).multiplyScalar(n.y),b.copy(g[t]).add(_).add(y),k(b.x,b.y,b.z)):k(n.x,n.y,l/o*t)}for(let t=f-1;t>=0;t--){const e=t/f,n=u*Math.cos(e*Math.PI/2),r=d*Math.sin(e*Math.PI/2)+h;for(let t=0,i=C.length;t<i;t++){const e=T(C[t],P[t],r);k(e.x,e.y,l+n)}for(let t=0,i=M.length;t<i;t++){const e=M[t];L=B[t];for(let t=0,i=e.length;t<i;t++){const i=T(e[t],L[t],r);x?k(i.x,i.y+g[o-1].y,g[o-1].x+n):k(i.x,i.y,l+n)}}}function O(e,t){let n=e.length;for(;--n>=0;){const r=n;let i=n-1;i<0&&(i=e.length-1);for(let e=0,n=o+2*f;e<n;e++){const n=R*e,a=R*(e+1);H(t+r+n,t+i+n,t+i+a,t+r+a)}}}function k(e,t,n){a.push(e),a.push(t),a.push(n)}function z(e,t,i){G(e),G(t),G(i);const a=r.length/3,s=m.generateTopUV(n,r,a-3,a-2,a-1);V(s[0]),V(s[1]),V(s[2])}function H(e,t,i,a){G(e),G(t),G(a),G(t),G(i),G(a);const s=r.length/3,o=m.generateSideWallUV(n,r,s-6,s-3,s-2,s-1);V(o[0]),V(o[1]),V(o[3]),V(o[1]),V(o[2]),V(o[3])}function G(e){r.push(a[3*e+0]),r.push(a[3*e+1]),r.push(a[3*e+2])}function V(e){i.push(e.x),i.push(e.y)}!function(){const e=r.length/3;if(c){let e=0,t=R*e;for(let n=0;n<N;n++){const e=D[n];z(e[2]+t,e[1]+t,e[0]+t)}e=o+2*f,t=R*e;for(let n=0;n<N;n++){const e=D[n];z(e[0]+t,e[1]+t,e[2]+t)}}else{for(let e=0;e<N;e++){const t=D[e];z(t[2],t[1],t[0])}for(let e=0;e<N;e++){const t=D[e];z(t[0]+R*o,t[1]+R*o,t[2]+R*o)}}n.addGroup(e,r.length/3-e,0)}(),function(){const e=r.length/3;let t=0;O(C,t),t+=C.length;for(let n=0,r=M.length;n<r;n++){const e=M[n];O(e,t),t+=e.length}n.addGroup(e,r.length/3-e,1)}()}this.setAttribute("position",new B_(r,3)),this.setAttribute("uv",new B_(i,2)),this.computeVertexNormals()}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return function(e,t,n){if(n.shapes=[],Array.isArray(e))for(let r=0,i=e.length;r<i;r++){const t=e[r];n.shapes.push(t.uuid)}else n.shapes.push(e.uuid);return n.options=Object.assign({},t),void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON()),n}(this.parameters.shapes,this.parameters.options,e)}static fromJSON(e,t){const n=[];for(let i=0,a=e.shapes.length;i<a;i++){const r=t[e.shapes[i]];n.push(r)}const r=e.options.extrudePath;return void 0!==r&&(e.options.extrudePath=(new jS[r.type]).fromJSON(r)),new MA(n,e.options)}}const wA={generateTopUV:function(e,t,n,r,i){const a=t[3*n],s=t[3*n+1],o=t[3*r],l=t[3*r+1],c=t[3*i],u=t[3*i+1];return[new wv(a,s),new wv(o,l),new wv(c,u)]},generateSideWallUV:function(e,t,n,r,i,a){const s=t[3*n],o=t[3*n+1],l=t[3*n+2],c=t[3*r],u=t[3*r+1],d=t[3*r+2],h=t[3*i],f=t[3*i+1],p=t[3*i+2],m=t[3*a],g=t[3*a+1],v=t[3*a+2];return Math.abs(o-u)<Math.abs(s-c)?[new wv(s,1-l),new wv(c,1-d),new wv(h,1-p),new wv(m,1-v)]:[new wv(o,1-l),new wv(u,1-d),new wv(f,1-p),new wv(g,1-v)]}};class EA extends _S{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2;super([-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],[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],e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new EA(e.radius,e.detail)}}class CA extends z_{constructor(e=[new wv(0,-.5),new wv(.5,0),new wv(0,.5)],t=12,n=0,r=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},t=Math.floor(t),r=_v(r,0,2*Math.PI);const i=[],a=[],s=[],o=[],l=[],c=1/t,u=new Cv,d=new wv,h=new Cv,f=new Cv,p=new Cv;let m=0,g=0;for(let v=0;v<=e.length-1;v++)switch(v){case 0:m=e[v+1].x-e[v].x,g=e[v+1].y-e[v].y,h.x=1*g,h.y=-m,h.z=0*g,p.copy(h),h.normalize(),o.push(h.x,h.y,h.z);break;case e.length-1:o.push(p.x,p.y,p.z);break;default:m=e[v+1].x-e[v].x,g=e[v+1].y-e[v].y,h.x=1*g,h.y=-m,h.z=0*g,f.copy(h),h.x+=p.x,h.y+=p.y,h.z+=p.z,h.normalize(),o.push(h.x,h.y,h.z),p.copy(f)}for(let v=0;v<=t;v++){const i=n+v*c*r,h=Math.sin(i),f=Math.cos(i);for(let n=0;n<=e.length-1;n++){u.x=e[n].x*h,u.y=e[n].y,u.z=e[n].x*f,a.push(u.x,u.y,u.z),d.x=v/t,d.y=n/(e.length-1),s.push(d.x,d.y);const r=o[3*n+0]*h,i=o[3*n+1],c=o[3*n+0]*f;l.push(r,i,c)}}for(let v=0;v<t;v++)for(let t=0;t<e.length-1;t++){const n=t+v*e.length,r=n,a=n+e.length,s=n+e.length+1,o=n+1;i.push(r,a,o),i.push(s,o,a)}this.setIndex(i),this.setAttribute("position",new B_(a,3)),this.setAttribute("uv",new B_(s,2)),this.setAttribute("normal",new B_(l,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new CA(e.points,e.segments,e.phiStart,e.phiLength)}}class TA extends _S{constructor(e=1,t=0){super([1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new TA(e.radius,e.detail)}}class RA extends z_{constructor(e=1,t=1,n=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};const i=e/2,a=t/2,s=Math.floor(n),o=Math.floor(r),l=s+1,c=o+1,u=e/s,d=t/o,h=[],f=[],p=[],m=[];for(let g=0;g<c;g++){const e=g*d-a;for(let t=0;t<l;t++){const n=t*u-i;f.push(n,-e,0),p.push(0,0,1),m.push(t/s),m.push(1-g/o)}}for(let g=0;g<o;g++)for(let e=0;e<s;e++){const t=e+l*g,n=e+l*(g+1),r=e+1+l*(g+1),i=e+1+l*g;h.push(t,n,i),h.push(n,r,i)}this.setIndex(h),this.setAttribute("position",new B_(f,3)),this.setAttribute("normal",new B_(p,3)),this.setAttribute("uv",new B_(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new RA(e.width,e.height,e.widthSegments,e.heightSegments)}}class IA extends z_{constructor(e=.5,t=1,n=32,r=1,i=0,a=2*Math.PI){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:a},n=Math.max(3,n);const s=[],o=[],l=[],c=[];let u=e;const d=(t-e)/(r=Math.max(1,r)),h=new Cv,f=new wv;for(let p=0;p<=r;p++){for(let e=0;e<=n;e++){const r=i+e/n*a;h.x=u*Math.cos(r),h.y=u*Math.sin(r),o.push(h.x,h.y,h.z),l.push(0,0,1),f.x=(h.x/t+1)/2,f.y=(h.y/t+1)/2,c.push(f.x,f.y)}u+=d}for(let p=0;p<r;p++){const e=p*(n+1);for(let t=0;t<n;t++){const r=t+e,i=r,a=r+n+1,o=r+n+2,l=r+1;s.push(i,a,l),s.push(a,o,l)}}this.setIndex(s),this.setAttribute("position",new B_(o,3)),this.setAttribute("normal",new B_(l,3)),this.setAttribute("uv",new B_(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new IA(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class PA extends z_{constructor(e=new YS([new wv(0,.5),new wv(-.5,-.5),new wv(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],r=[],i=[],a=[];let s=0,o=0;if(!1===Array.isArray(e))l(e);else for(let c=0;c<e.length;c++)l(e[c]),this.addGroup(s,o,c),s+=o,o=0;function l(e){const s=r.length/3,l=e.extractPoints(t);let c=l.shape;const u=l.holes;!1===xA.isClockWise(c)&&(c=c.reverse());for(let t=0,n=u.length;t<n;t++){const e=u[t];!0===xA.isClockWise(e)&&(u[t]=e.reverse())}const d=xA.triangulateShape(c,u);for(let t=0,n=u.length;t<n;t++){const e=u[t];c=c.concat(e)}for(let t=0,n=c.length;t<n;t++){const e=c[t];r.push(e.x,e.y,0),i.push(0,0,1),a.push(e.x,e.y)}for(let t=0,r=d.length;t<r;t++){const e=d[t],r=e[0]+s,i=e[1]+s,a=e[2]+s;n.push(r,i,a),o+=3}}this.setIndex(n),this.setAttribute("position",new B_(r,3)),this.setAttribute("normal",new B_(i,3)),this.setAttribute("uv",new B_(a,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return function(e,t){if(t.shapes=[],Array.isArray(e))for(let n=0,r=e.length;n<r;n++){const r=e[n];t.shapes.push(r.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)}static fromJSON(e,t){const n=[];for(let r=0,i=e.shapes.length;r<i;r++){const i=t[e.shapes[r]];n.push(i)}return new PA(n,e.curveSegments)}}class BA extends z_{constructor(e=1,t=32,n=16,r=0,i=2*Math.PI,a=0,s=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:a,thetaLength:s},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const o=Math.min(a+s,Math.PI);let l=0;const c=[],u=new Cv,d=new Cv,h=[],f=[],p=[],m=[];for(let g=0;g<=n;g++){const h=[],v=g/n;let y=0;0===g&&0===a?y=.5/t:g===n&&o===Math.PI&&(y=-.5/t);for(let n=0;n<=t;n++){const o=n/t;u.x=-e*Math.cos(r+o*i)*Math.sin(a+v*s),u.y=e*Math.cos(a+v*s),u.z=e*Math.sin(r+o*i)*Math.sin(a+v*s),f.push(u.x,u.y,u.z),d.copy(u).normalize(),p.push(d.x,d.y,d.z),m.push(o+y,1-v),h.push(l++)}c.push(h)}for(let g=0;g<n;g++)for(let e=0;e<t;e++){const t=c[g][e+1],r=c[g][e],i=c[g+1][e],s=c[g+1][e+1];(0!==g||a>0)&&h.push(t,r,s),(g!==n-1||o<Math.PI)&&h.push(r,i,s)}this.setIndex(h),this.setAttribute("position",new B_(f,3)),this.setAttribute("normal",new B_(p,3)),this.setAttribute("uv",new B_(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new BA(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class LA extends _S{constructor(e=1,t=0){super([1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new LA(e.radius,e.detail)}}class DA extends z_{constructor(e=1,t=.4,n=12,r=48,i=2*Math.PI){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:i},n=Math.floor(n),r=Math.floor(r);const a=[],s=[],o=[],l=[],c=new Cv,u=new Cv,d=new Cv;for(let h=0;h<=n;h++)for(let a=0;a<=r;a++){const f=a/r*i,p=h/n*Math.PI*2;u.x=(e+t*Math.cos(p))*Math.cos(f),u.y=(e+t*Math.cos(p))*Math.sin(f),u.z=t*Math.sin(p),s.push(u.x,u.y,u.z),c.x=e*Math.cos(f),c.y=e*Math.sin(f),d.subVectors(u,c).normalize(),o.push(d.x,d.y,d.z),l.push(a/r),l.push(h/n)}for(let h=1;h<=n;h++)for(let e=1;e<=r;e++){const t=(r+1)*h+e-1,n=(r+1)*(h-1)+e-1,i=(r+1)*(h-1)+e,s=(r+1)*h+e;a.push(t,n,s),a.push(n,i,s)}this.setIndex(a),this.setAttribute("position",new B_(s,3)),this.setAttribute("normal",new B_(o,3)),this.setAttribute("uv",new B_(l,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new DA(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class FA extends z_{constructor(e=1,t=.4,n=64,r=8,i=2,a=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:r,p:i,q:a},n=Math.floor(n),r=Math.floor(r);const s=[],o=[],l=[],c=[],u=new Cv,d=new Cv,h=new Cv,f=new Cv,p=new Cv,m=new Cv,g=new Cv;for(let y=0;y<=n;++y){const s=y/n*i*Math.PI*2;v(s,i,a,e,h),v(s+.01,i,a,e,f),m.subVectors(f,h),g.addVectors(f,h),p.crossVectors(m,g),g.crossVectors(p,m),p.normalize(),g.normalize();for(let e=0;e<=r;++e){const i=e/r*Math.PI*2,a=-t*Math.cos(i),s=t*Math.sin(i);u.x=h.x+(a*g.x+s*p.x),u.y=h.y+(a*g.y+s*p.y),u.z=h.z+(a*g.z+s*p.z),o.push(u.x,u.y,u.z),d.subVectors(u,h).normalize(),l.push(d.x,d.y,d.z),c.push(y/n),c.push(e/r)}}for(let y=1;y<=n;y++)for(let e=1;e<=r;e++){const t=(r+1)*(y-1)+(e-1),n=(r+1)*y+(e-1),i=(r+1)*y+e,a=(r+1)*(y-1)+e;s.push(t,n,a),s.push(n,i,a)}function v(e,t,n,r,i){const a=Math.cos(e),s=Math.sin(e),o=n/t*e,l=Math.cos(o);i.x=r*(2+l)*.5*a,i.y=r*(2+l)*s*.5,i.z=r*Math.sin(o)*.5}this.setIndex(s),this.setAttribute("position",new B_(o,3)),this.setAttribute("normal",new B_(l,3)),this.setAttribute("uv",new B_(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new FA(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class NA extends z_{constructor(e=new VS(new Cv(-1,-1,0),new Cv(-1,1,0),new Cv(1,1,0)),t=64,n=1,r=8,i=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i};const a=e.computeFrenetFrames(t,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals;const s=new Cv,o=new Cv,l=new wv;let c=new Cv;const u=[],d=[],h=[],f=[];function p(i){c=e.getPointAt(i/t,c);const l=a.normals[i],h=a.binormals[i];for(let e=0;e<=r;e++){const t=e/r*Math.PI*2,i=Math.sin(t),a=-Math.cos(t);o.x=a*l.x+i*h.x,o.y=a*l.y+i*h.y,o.z=a*l.z+i*h.z,o.normalize(),d.push(o.x,o.y,o.z),s.x=c.x+n*o.x,s.y=c.y+n*o.y,s.z=c.z+n*o.z,u.push(s.x,s.y,s.z)}}!function(){for(let e=0;e<t;e++)p(e);p(!1===i?t:0),function(){for(let e=0;e<=t;e++)for(let n=0;n<=r;n++)l.x=e/t,l.y=n/r,h.push(l.x,l.y)}(),function(){for(let e=1;e<=t;e++)for(let t=1;t<=r;t++){const n=(r+1)*(e-1)+(t-1),i=(r+1)*e+(t-1),a=(r+1)*e+t,s=(r+1)*(e-1)+t;f.push(n,i,s),f.push(i,a,s)}}()}(),this.setIndex(f),this.setAttribute("position",new B_(u,3)),this.setAttribute("normal",new B_(d,3)),this.setAttribute("uv",new B_(h,2))}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 NA((new jS[e.path.type]).fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class UA extends z_{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},null!==e){const t=[],n=new Set,r=new Cv,i=new Cv;if(null!==e.index){const a=e.attributes.position,s=e.index;let o=e.groups;0===o.length&&(o=[{start:0,count:s.count,materialIndex:0}]);for(let e=0,l=o.length;e<l;++e){const l=o[e],c=l.start;for(let e=c,o=c+l.count;e<o;e+=3)for(let l=0;l<3;l++){const o=s.getX(e+l),c=s.getX(e+(l+1)%3);r.fromBufferAttribute(a,o),i.fromBufferAttribute(a,c),!0===OA(r,i,n)&&(t.push(r.x,r.y,r.z),t.push(i.x,i.y,i.z))}}}else{const a=e.attributes.position;for(let e=0,s=a.count/3;e<s;e++)for(let o=0;o<3;o++){const s=3*e+o,l=3*e+(o+1)%3;r.fromBufferAttribute(a,s),i.fromBufferAttribute(a,l),!0===OA(r,i,n)&&(t.push(r.x,r.y,r.z),t.push(i.x,i.y,i.z))}}this.setAttribute("position",new B_(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function OA(e,t,n){const r=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`,i=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`;return!0!==n.has(r)&&!0!==n.has(i)&&(n.add(r),n.add(i),!0)}var kA=Object.freeze({__proto__:null,BoxGeometry:eb,CapsuleGeometry:mS,CircleGeometry:gS,ConeGeometry:yS,CylinderGeometry:vS,DodecahedronGeometry:bS,EdgesGeometry:wS,ExtrudeGeometry:MA,IcosahedronGeometry:EA,LatheGeometry:CA,OctahedronGeometry:TA,PlaneGeometry:RA,PolyhedronGeometry:_S,RingGeometry:IA,ShapeGeometry:PA,SphereGeometry:BA,TetrahedronGeometry:LA,TorusGeometry:DA,TorusKnotGeometry:FA,TubeGeometry:NA,WireframeGeometry:UA});class zA extends __{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new g_(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 HA extends ab{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class GA extends __{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new g_(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 g_(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new wv(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 Dy,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 VA extends GA{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 wv(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return _v(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new g_(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 g_(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new g_(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 WA extends __{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new g_(16777215),this.specular=new g_(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new g_(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new wv(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Dy,this.combine=0,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 jA extends __{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new g_(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new g_(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new wv(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 XA extends __{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new wv(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 JA extends __{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new g_(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new g_(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new wv(1,1),this.displacementMap=null,this.dis
vendor: 26,586 bytes, line 20
20placementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Dy,this.combine=0,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 YA extends __{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,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 KA extends __{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 qA extends __{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new g_(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new wv(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 QA extends Vx{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 ZA(e,t){return e&&e.constructor!==t?"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e):e}function $A(e){const t=e.length,n=new Array(t);for(let r=0;r!==t;++r)n[r]=r;return n.sort(function(t,n){return e[t]-e[n]}),n}function eM(e,t,n){const r=e.length,i=new e.constructor(r);for(let a=0,s=0;s!==r;++a){const r=n[a]*t;for(let n=0;n!==t;++n)i[s++]=e[r+n]}return i}function tM(e,t,n,r){let i=1,a=e[0];for(;void 0!==a&&void 0===a[r];)a=e[i++];if(void 0===a)return;let s=a[r];if(void 0!==s)if(Array.isArray(s))do{s=a[r],void 0!==s&&(t.push(a.time),n.push(...s)),a=e[i++]}while(void 0!==a);else if(void 0!==s.toArray)do{s=a[r],void 0!==s&&(t.push(a.time),s.toArray(n,n.length)),a=e[i++]}while(void 0!==a);else do{s=a[r],void 0!==s&&(t.push(a.time),n.push(s)),a=e[i++]}while(void 0!==a)}class nM{constructor(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r: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,r=t[n],i=t[n-1];e:{t:{let a;n:{r:if(!(e<r)){for(let a=n+2;;){if(void 0===r){if(e<i)break r;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===a)break;if(i=r,r=t[++n],e<r)break t}a=t.length;break n}if(!(e>=i)){const s=t[1];e<s&&(n=2,i=s);for(let a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.copySampleValue_(0);if(n===a)break;if(r=i,i=t[--n-1],e>=i)break t}a=n,n=0;break n}break e}for(;n<a;){const r=n+a>>>1;e<t[r]?a=r:n=r+1}if(r=t[n],i=t[n-1],void 0===i)return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===r)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r;for(let a=0;a!==r;++a)t[a]=n[i+a];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class rM extends nM{constructor(e,t,n,r){super(e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:Lg,endingEnd:Lg}}intervalChanged_(e,t,n){const r=this.parameterPositions;let i=e-2,a=e+1,s=r[i],o=r[a];if(void 0===s)switch(this.getSettings_().endingStart){case Dg:i=e,s=2*t-n;break;case Fg:i=r.length-2,s=t+r[i]-r[i+1];break;default:i=e,s=n}if(void 0===o)switch(this.getSettings_().endingEnd){case Dg:a=e,o=2*n-t;break;case Fg:a=1,o=n+r[1]-r[0];break;default:a=e-1,o=t}const l=.5*(n-t),c=this.valueSize;this._weightPrev=l/(t-s),this._weightNext=l/(o-n),this._offsetPrev=i*c,this._offsetNext=a*c}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,c=this._offsetPrev,u=this._offsetNext,d=this._weightPrev,h=this._weightNext,f=(n-t)/(r-t),p=f*f,m=p*f,g=-d*m+2*d*p-d*f,v=(1+d)*m+(-1.5-2*d)*p+(-.5+d)*f+1,y=(-1-h)*m+(1.5+h)*p+.5*f,_=h*m-h*p;for(let b=0;b!==s;++b)i[b]=g*a[c+b]+v*a[l+b]+y*a[o+b]+_*a[u+b];return i}}class iM extends nM{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,c=(n-t)/(r-t),u=1-c;for(let d=0;d!==s;++d)i[d]=a[l+d]*u+a[o+d]*c;return i}}class aM extends nM{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class sM{constructor(e,t,n,r){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=ZA(t,this.TimeBufferType),this.values=ZA(n,this.ValueBufferType),this.setInterpolation(r||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:ZA(e.times,Array),values:ZA(e.values,Array)};const t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new aM(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new iM(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new rM(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case Ig:t=this.InterpolantFactoryMethodDiscrete;break;case Pg:t=this.InterpolantFactoryMethodLinear;break;case Bg:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){const t="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(t);this.setInterpolation(this.DefaultInterpolation)}return uv("KeyframeTrack:",t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Ig;case this.InterpolantFactoryMethodLinear:return Pg;case this.InterpolantFactoryMethodSmooth:return Bg}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]+=e}return this}scale(e){if(1!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]*=e}return this}trim(e,t){const n=this.times,r=n.length;let i=0,a=r-1;for(;i!==r&&n[i]<e;)++i;for(;-1!==a&&n[a]>t;)--a;if(++a,0!==i||a!==r){i>=a&&(a=Math.max(a,1),i=a-1);const e=this.getValueSize();this.times=n.slice(i,a),this.values=this.values.slice(i*e,a*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(dv("KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,i=n.length;0===i&&(dv("KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let s=0;s!==i;s++){const t=n[s];if("number"==typeof t&&isNaN(t)){dv("KeyframeTrack: Time is not a valid number.",this,s,t),e=!1;break}if(null!==a&&a>t){dv("KeyframeTrack: Out of order keys.",this,s,t,a),e=!1;break}a=t}if(void 0!==r&&iv(r))for(let s=0,o=r.length;s!==o;++s){const t=r[s];if(isNaN(t)){dv("KeyframeTrack: Value is not a valid number.",this,s,t),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),r=this.getInterpolation()===Bg,i=e.length-1;let a=1;for(let s=1;s<i;++s){let i=!1;const o=e[s];if(o!==e[s+1]&&(1!==s||o!==e[0]))if(r)i=!0;else{const e=s*n,r=e-n,a=e+n;for(let s=0;s!==n;++s){const n=t[e+s];if(n!==t[r+s]||n!==t[a+s]){i=!0;break}}}if(i){if(s!==a){e[a]=e[s];const r=s*n,i=a*n;for(let e=0;e!==n;++e)t[i+e]=t[r+e]}++a}}if(i>0){e[a]=e[i];for(let e=i*n,r=a*n,s=0;s!==n;++s)t[r+s]=t[e+s];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=t.slice(0,a*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}sM.prototype.ValueTypeName="",sM.prototype.TimeBufferType=Float32Array,sM.prototype.ValueBufferType=Float32Array,sM.prototype.DefaultInterpolation=Pg;class oM extends sM{constructor(e,t,n){super(e,t,n)}}oM.prototype.ValueTypeName="bool",oM.prototype.ValueBufferType=Array,oM.prototype.DefaultInterpolation=Ig,oM.prototype.InterpolantFactoryMethodLinear=void 0,oM.prototype.InterpolantFactoryMethodSmooth=void 0;class lM extends sM{constructor(e,t,n,r){super(e,t,n,r)}}lM.prototype.ValueTypeName="color";class cM extends sM{constructor(e,t,n,r){super(e,t,n,r)}}cM.prototype.ValueTypeName="number";class uM extends nM{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=(n-t)/(r-t);let l=e*s;for(let c=l+s;l!==c;l+=4)Ev.slerpFlat(i,0,a,l-s,a,l,o);return i}}class dM extends sM{constructor(e,t,n,r){super(e,t,n,r)}InterpolantFactoryMethodLinear(e){return new uM(this.times,this.values,this.getValueSize(),e)}}dM.prototype.ValueTypeName="quaternion",dM.prototype.InterpolantFactoryMethodSmooth=void 0;class hM extends sM{constructor(e,t,n){super(e,t,n)}}hM.prototype.ValueTypeName="string",hM.prototype.ValueBufferType=Array,hM.prototype.DefaultInterpolation=Ig,hM.prototype.InterpolantFactoryMethodLinear=void 0,hM.prototype.InterpolantFactoryMethodSmooth=void 0;class fM extends sM{constructor(e,t,n,r){super(e,t,n,r)}}fM.prototype.ValueTypeName="vector";class pM{constructor(e="",t=-1,n=[],r=2500){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=yv(),this.userData={},this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let a=0,s=n.length;a!==s;++a)t.push(mM(n[a]).scale(r));const i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i.userData=JSON.parse(e.userData||"{}"),i}static toJSON(e){const t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode,userData:JSON.stringify(e.userData)};for(let i=0,a=n.length;i!==a;++i)t.push(sM.toJSON(n[i]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const i=t.length,a=[];for(let s=0;s<i;s++){let e=[],o=[];e.push((s+i-1)%i,s,(s+1)%i),o.push(0,1,0);const l=$A(e);e=eM(e,1,l),o=eM(o,1,l),r||0!==e[0]||(e.push(i),o.push(o[0])),a.push(new cM(".morphTargetInfluences["+t[s].name+"]",e,o).scale(1/n))}return new this(e,-1,a)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const t=e;n=t.geometry&&t.geometry.animations||t.animations}for(let r=0;r<n.length;r++)if(n[r].name===t)return n[r];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const r={},i=/^([\w-]*?)([\d]+)$/;for(let s=0,o=e.length;s<o;s++){const t=e[s],n=t.name.match(i);if(n&&n.length>1){const e=n[1];let i=r[e];i||(r[e]=i=[]),i.push(t)}}const a=[];for(const s in r)a.push(this.CreateFromMorphTargetSequence(s,r[s],t,n));return a}static parseAnimation(e,t){if(uv("AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return dv("AnimationClip: No animation in JSONLoader data."),null;const n=function(e,t,n,r,i){if(0!==n.length){const a=[],s=[];tM(n,a,s,r),0!==a.length&&i.push(new e(t,a,s))}},r=[],i=e.name||"default",a=e.fps||30,s=e.blendMode;let o=e.length||-1;const l=e.hierarchy||[];for(let c=0;c<l.length;c++){const e=l[c].keys;if(e&&0!==e.length)if(e[0].morphTargets){const t={};let n;for(n=0;n<e.length;n++)if(e[n].morphTargets)for(let r=0;r<e[n].morphTargets.length;r++)t[e[n].morphTargets[r]]=-1;for(const i in t){const t=[],a=[];for(let r=0;r!==e[n].morphTargets.length;++r){const r=e[n];t.push(r.time),a.push(r.morphTarget===i?1:0)}r.push(new cM(".morphTargetInfluence["+i+"]",t,a))}o=t.length*a}else{const i=".bones["+t[c].name+"]";n(fM,i+".position",e,"pos",r),n(dM,i+".quaternion",e,"rot",r),n(fM,i+".scale",e,"scl",r)}}return 0===r.length?null:new this(i,o,r,s)}resetDuration(){let e=0;for(let t=0,n=this.tracks.length;t!==n;++t){const n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,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 mM(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return cM;case"vector":case"vector2":case"vector3":case"vector4":return fM;case"color":return lM;case"quaternion":return dM;case"bool":case"boolean":return oM;case"string":return hM}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){const t=[],n=[];tM(e.keys,t,n,"value"),e.times=t,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}const gM={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class vM{constructor(e,t,n){const r=this;let i,a=!1,s=0,o=0;const l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this._abortController=null,this.itemStart=function(e){o++,!1===a&&void 0!==r.onStart&&r.onStart(e,s,o),a=!0},this.itemEnd=function(e){s++,void 0!==r.onProgress&&r.onProgress(e,s,o),s===o&&(a=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return i?i(e):e},this.setURLModifier=function(e){return i=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){const t=l.indexOf(e);return-1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=l.length;t<n;t+=2){const n=l[t],r=l[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return r}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 yM=new vM;class _M{constructor(e){this.manager=void 0!==e?e:yM,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise(function(r,i){n.load(e,r,t,i)})}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}}_M.DEFAULT_MATERIAL_NAME="__DEFAULT";const bM={};class xM extends Error{constructor(e,t){super(e),this.response=t}}class SM extends _M{constructor(e){super(e),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=gM.get(`file:${e}`);if(void 0!==i)return this.manager.itemStart(e),setTimeout(()=>{t&&t(i),this.manager.itemEnd(e)},0),i;if(void 0!==bM[e])return void bM[e].push({onLoad:t,onProgress:n,onError:r});bM[e]=[],bM[e].push({onLoad:t,onProgress:n,onError:r});const a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:"function"==typeof AbortSignal.any?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),s=this.mimeType,o=this.responseType;fetch(a).then(t=>{if(200===t.status||0===t.status){if(0===t.status&&uv("FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;const n=bM[e],r=t.body.getReader(),i=t.headers.get("X-File-Size")||t.headers.get("Content-Length"),a=i?parseInt(i):0,s=0!==a;let o=0;const l=new ReadableStream({start(e){!function t(){r.read().then(({done:r,value:i})=>{if(r)e.close();else{o+=i.byteLength;const r=new ProgressEvent("progress",{lengthComputable:s,loaded:o,total:a});for(let e=0,t=n.length;e<t;e++){const t=n[e];t.onProgress&&t.onProgress(r)}e.enqueue(i),t()}},t=>{e.error(t)})}()}});return new Response(l)}throw new xM(`fetch for "${t.url}" responded with ${t.status}: ${t.statusText}`,t)}).then(e=>{switch(o){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then(e=>(new DOMParser).parseFromString(e,s));case"json":return e.json();default:if(""===s)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(s),n=t&&t[1]?t[1].toLowerCase():void 0,r=new TextDecoder(n);return e.arrayBuffer().then(e=>r.decode(e))}}}).then(t=>{gM.add(`file:${e}`,t);const n=bM[e];delete bM[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onLoad&&r.onLoad(t)}}).catch(t=>{const n=bM[e];if(void 0===n)throw this.manager.itemError(e),t;delete bM[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onError&&r.onError(t)}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}}const AM=new WeakMap;class MM extends _M{constructor(e){super(e)}load(e,t,n,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,a=gM.get(`image:${e}`);if(void 0!==a){if(!0===a.complete)i.manager.itemStart(e),setTimeout(function(){t&&t(a),i.manager.itemEnd(e)},0);else{let e=AM.get(a);void 0===e&&(e=[],AM.set(a,e)),e.push({onLoad:t,onError:r})}return a}const s=av("img");function o(){c(),t&&t(this);const n=AM.get(this)||[];for(let e=0;e<n.length;e++){const t=n[e];t.onLoad&&t.onLoad(this)}AM.delete(this),i.manager.itemEnd(e)}function l(t){c(),r&&r(t),gM.remove(`image:${e}`);const n=AM.get(this)||[];for(let e=0;e<n.length;e++){const r=n[e];r.onError&&r.onError(t)}AM.delete(this),i.manager.itemError(e),i.manager.itemEnd(e)}function c(){s.removeEventListener("load",o,!1),s.removeEventListener("error",l,!1)}return s.addEventListener("load",o,!1),s.addEventListener("error",l,!1),"data:"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(s.crossOrigin=this.crossOrigin),gM.add(`image:${e}`,s),i.manager.itemStart(e),s.src=e,s}}class wM extends _M{constructor(e){super(e)}load(e,t,n,r){const i=new fb;i.colorSpace=Og;const a=new MM(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);let s=0;function o(n){a.load(e[n],function(e){i.images[n]=e,s++,6===s&&(i.needsUpdate=!0,t&&t(i))},void 0,r)}for(let l=0;l<e.length;++l)o(l);return i}}class EM extends _M{constructor(e){super(e)}load(e,t,n,r){const i=this,a=new ex,s=new SM(this.manager);return s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setPath(this.path),s.setWithCredentials(i.withCredentials),s.load(e,function(e){let n;try{n=i.parse(e)}catch(dv){if(void 0===r)return void dv(dv);r(dv)}void 0!==n.image?a.image=n.image:void 0!==n.data&&(a.image.width=n.width,a.image.height=n.height,a.image.data=n.data),a.wrapS=void 0!==n.wrapS?n.wrapS:gm,a.wrapT=void 0!==n.wrapT?n.wrapT:gm,a.magFilter=void 0!==n.magFilter?n.magFilter:xm,a.minFilter=void 0!==n.minFilter?n.minFilter:xm,a.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.colorSpace&&(a.colorSpace=n.colorSpace),void 0!==n.flipY&&(a.flipY=n.flipY),void 0!==n.format&&(a.format=n.format),void 0!==n.type&&(a.type=n.type),void 0!==n.mipmaps&&(a.mipmaps=n.mipmaps,a.minFilter=Am),1===n.mipmapCount&&(a.minFilter=xm),void 0!==n.generateMipmaps&&(a.generateMipmaps=n.generateMipmaps),a.needsUpdate=!0,t&&t(a,n)},n,r),a}}class CM extends _M{constructor(e){super(e)}load(e,t,n,r){const i=new jv,a=new MM(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,function(e){i.image=e,i.needsUpdate=!0,void 0!==t&&t(i)},n,r),i}}class TM extends Qy{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new g_(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 RM extends TM{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(Qy.DEFAULT_UP),this.updateMatrix(),this.groundColor=new g_(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 IM=new My,PM=new Cv,BM=new Cv;class LM{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new wv(512,512),this.mapType=wm,this.map=null,this.mapPass=null,this.matrix=new My,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new bx,this._frameExtents=new wv(1,1),this._viewportCount=1,this._viewports=[new Xv(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;PM.setFromMatrixPosition(e.matrixWorld),t.position.copy(PM),BM.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(BM),t.updateMatrixWorld(),IM.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(IM,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(IM)}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 1!==this.intensity&&(e.intensity=this.intensity),0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class DM extends LM{constructor(){super(new ub(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(e){const t=this.camera,n=2*vv*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height*this.aspect,i=e.distance||t.far;n===t.fov&&r===t.aspect&&i===t.far||(t.fov=n,t.aspect=r,t.far=i,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class FM extends TM{constructor(e,t,n=0,r=Math.PI/3,i=0,a=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Qy.DEFAULT_UP),this.updateMatrix(),this.target=new Qy,this.distance=n,this.angle=r,this.penumbra=i,this.decay=a,this.map=null,this.shadow=new DM}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 NM extends LM{constructor(){super(new ub(90,1,.5,500)),this.isPointLightShadow=!0}
vendor: 8,507 bytes, line 20
20}class UM extends TM{constructor(e,t,n=0,r=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new NM}get power(){return 4*this.intensity*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 OM extends sb{constructor(e=-1,t=1,n=1,r=-1,i=.1,a=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=r,this.near=i,this.far=a,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=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,a){null===this.view&&(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=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(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,r=(this.top+this.bottom)/2;let i=n-e,a=n+e,s=r+t,o=r-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,a=i+e*this.view.width,s-=t*this.view.offsetY,o=s-t*this.view.height}this.projectionMatrix.makeOrthographic(i,a,s,o,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,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}class kM extends LM{constructor(){super(new OM(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class zM extends TM{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Qy.DEFAULT_UP),this.updateMatrix(),this.target=new Qy,this.shadow=new kM}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 HM extends TM{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class GM extends TM{constructor(e,t,n=10,r=10){super(e,t),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=n,this.height=r}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 VM{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new Cv)}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,r=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.282095),t.addScaledVector(a[1],.488603*r),t.addScaledVector(a[2],.488603*i),t.addScaledVector(a[3],.488603*n),t.addScaledVector(a[4],n*r*1.092548),t.addScaledVector(a[5],r*i*1.092548),t.addScaledVector(a[6],.315392*(3*i*i-1)),t.addScaledVector(a[7],n*i*1.092548),t.addScaledVector(a[8],.546274*(n*n-r*r)),t}getIrradianceAt(e,t){const n=e.x,r=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.886227),t.addScaledVector(a[1],1.023328*r),t.addScaledVector(a[2],1.023328*i),t.addScaledVector(a[3],1.023328*n),t.addScaledVector(a[4],.858086*n*r),t.addScaledVector(a[5],.858086*r*i),t.addScaledVector(a[6],.743125*i*i-.247708),t.addScaledVector(a[7],.858086*n*i),t.addScaledVector(a[8],.429043*(n*n-r*r)),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 r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this}toArray(e=[],t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].toArray(e,t+3*r);return e}static getBasisAt(e,t){const n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)}}class WM extends TM{constructor(e=new VM,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 jM extends _M{constructor(e){super(e),this.textures={}}load(e,t,n,r){const i=this,a=new SM(i.manager);a.setPath(i.path),a.setRequestHeader(i.requestHeader),a.setWithCredentials(i.withCredentials),a.load(e,function(n){try{t(i.parse(JSON.parse(n)))}catch(WL){r?r(WL):dv(WL),i.manager.itemError(e)}},n,r)}parse(e){const t=this.textures;function n(e){return void 0===t[e]&&uv("MaterialLoader: Undefined texture",e),t[e]}const r=this.createMaterialFromType(e.type);if(void 0!==e.uuid&&(r.uuid=e.uuid),void 0!==e.name&&(r.name=e.name),void 0!==e.color&&void 0!==r.color&&r.color.setHex(e.color),void 0!==e.roughness&&(r.roughness=e.roughness),void 0!==e.metalness&&(r.metalness=e.metalness),void 0!==e.sheen&&(r.sheen=e.sheen),void 0!==e.sheenColor&&(r.sheenColor=(new g_).setHex(e.sheenColor)),void 0!==e.sheenRoughness&&(r.sheenRoughness=e.sheenRoughness),void 0!==e.emissive&&void 0!==r.emissive&&r.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==r.specular&&r.specular.setHex(e.specular),void 0!==e.specularIntensity&&(r.specularIntensity=e.specularIntensity),void 0!==e.specularColor&&void 0!==r.specularColor&&r.specularColor.setHex(e.specularColor),void 0!==e.shininess&&(r.shininess=e.shininess),void 0!==e.clearcoat&&(r.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(r.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.dispersion&&(r.dispersion=e.dispersion),void 0!==e.iridescence&&(r.iridescence=e.iridescence),void 0!==e.iridescenceIOR&&(r.iridescenceIOR=e.iridescenceIOR),void 0!==e.iridescenceThicknessRange&&(r.iridescenceThicknessRange=e.iridescenceThicknessRange),void 0!==e.transmission&&(r.transmission=e.transmission),void 0!==e.thickness&&(r.thickness=e.thickness),void 0!==e.attenuationDistance&&(r.attenuationDistance=e.attenuationDistance),void 0!==e.attenuationColor&&void 0!==r.attenuationColor&&r.attenuationColor.setHex(e.attenuationColor),void 0!==e.anisotropy&&(r.anisotropy=e.anisotropy),void 0!==e.anisotropyRotation&&(r.anisotropyRotation=e.anisotropyRotation),void 0!==e.fog&&(r.fog=e.fog),void 0!==e.flatShading&&(r.flatShading=e.flatShading),void 0!==e.blending&&(r.blending=e.blending),void 0!==e.combine&&(r.combine=e.combine),void 0!==e.side&&(r.side=e.side),void 0!==e.shadowSide&&(r.shadowSide=e.shadowSide),void 0!==e.opacity&&(r.opacity=e.opacity),void 0!==e.transparent&&(r.transparent=e.transparent),void 0!==e.alphaTest&&(r.alphaTest=e.alphaTest),void 0!==e.alphaHash&&(r.alphaHash=e.alphaHash),void 0!==e.depthFunc&&(r.depthFunc=e.depthFunc),void 0!==e.depthTest&&(r.depthTest=e.depthTest),void 0!==e.depthWrite&&(r.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(r.colorWrite=e.colorWrite),void 0!==e.blendSrc&&(r.blendSrc=e.blendSrc),void 0!==e.blendDst&&(r.blendDst=e.blendDst),void 0!==e.blendEquation&&(r.blendEquation=e.blendEquation),void 0!==e.blendSrcAlpha&&(r.blendSrcAlpha=e.blendSrcAlpha),void 0!==e.blendDstAlpha&&
vendor: 2,429 bytes, line 20
20(r.blendDstAlpha=e.blendDstAlpha),void 0!==e.blendEquationAlpha&&(r.blendEquationAlpha=e.blendEquationAlpha),void 0!==e.blendColor&&void 0!==r.blendColor&&r.blendColor.setHex(e.blendColor),void 0!==e.blendAlpha&&(r.blendAlpha=e.blendAlpha),void 0!==e.stencilWriteMask&&(r.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(r.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(r.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(r.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(r.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(r.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(r.stencilZPass=e.stencilZPass),void 0!==e.stencilWrite&&(r.stencilWrite=e.stencilWrite),void 0!==e.wireframe&&(r.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(r.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(r.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(r.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(r.rotation=e.rotation),void 0!==e.linewidth&&(r.linewidth=e.linewidth),void 0!==e.dashSize&&(r.dashSize=e.dashSize),void 0!==e.gapSize&&(r.gapSize=e.gapSize),void 0!==e.scale&&(r.scale=e.scale),void 0!==e.polygonOffset&&(r.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(r.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(r.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.dithering&&(r.dithering=e.dithering),void 0!==e.alphaToCoverage&&(r.alphaToCoverage=e.alphaToCoverage),void 0!==e.premultipliedAlpha&&(r.premultipliedAlpha=e.premultipliedAlpha),void 0!==e.forceSinglePass&&(r.forceSinglePass=e.forceSinglePass),void 0!==e.allowOverride&&(r.allowOverride=e.allowOverride),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.toneMapped&&(r.toneMapped=e.toneMapped),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.vertexColors&&("number"==typeof e.vertexColors?r.vertexColors=e.vertexColors>0:r.vertexColors=e.vertexColors),void 0!==e.uniforms)for(const i in e.uniforms){const t=e.uniforms[i];switch(r.uniforms[i]={},t.type){case"t":r.uniforms[i].value=n(t.value);break;case"c":r.uniforms[i].value=(new g_).setHex(t.value);break;case"v2":r.uniforms[i].value=(new wv).fromArray(t.value);break;case"v3":r.uniforms[i].value=(new Cv).fromArray(t.value);break;case"v4":r.uniforms[i].value=(new Xv).fromArray(t.value);break;case"m3":r.uniforms[i].value=(new Iv).fromArray(t.value);break;
vendor: 15,380 bytes, line 20
20case"m4":r.uniforms[i].value=(new My).fromArray(t.value);break;default:r.uniforms[i].value=t.value}}if(void 0!==e.defines&&(r.defines=e.defines),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.glslVersion&&(r.glslVersion=e.glslVersion),void 0!==e.extensions)for(const i in e.extensions)r.extensions[i]=e.extensions[i];if(void 0!==e.lights&&(r.lights=e.lights),void 0!==e.clipping&&(r.clipping=e.clipping),void 0!==e.size&&(r.size=e.size),void 0!==e.sizeAttenuation&&(r.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(r.map=n(e.map)),void 0!==e.matcap&&(r.matcap=n(e.matcap)),void 0!==e.alphaMap&&(r.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(r.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(r.bumpScale=e.bumpScale),void 0!==e.normalMap&&(r.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(r.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),r.normalScale=(new wv).fromArray(t)}return void 0!==e.displacementMap&&(r.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(r.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(r.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(r.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(r.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(r.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(r.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(r.specularMap=n(e.specularMap)),void 0!==e.specularIntensityMap&&(r.specularIntensityMap=n(e.specularIntensityMap)),void 0!==e.specularColorMap&&(r.specularColorMap=n(e.specularColorMap)),void 0!==e.envMap&&(r.envMap=n(e.envMap)),void 0!==e.envMapRotation&&r.envMapRotation.fromArray(e.envMapRotation),void 0!==e.envMapIntensity&&(r.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(r.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(r.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(r.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(r.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(r.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(r.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(r.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(r.clearcoatNormalScale=(new wv).fromArray(e.clearcoatNormalScale)),void 0!==e.iridescenceMap&&(r.iridescenceMap=n(e.iridescenceMap)),void 0!==e.iridescenceThicknessMap&&(r.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),void 0!==e.transmissionMap&&(r.transmissionMap=n(e.transmissionMap)),void 0!==e.thicknessMap&&(r.thicknessMap=n(e.thicknessMap)),void 0!==e.anisotropyMap&&(r.anisotropyMap=n(e.anisotropyMap)),void 0!==e.sheenColorMap&&(r.sheenColorMap=n(e.sheenColorMap)),void 0!==e.sheenRoughnessMap&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return jM.createMaterialFromType(e)}static createMaterialFromType(e){return new{ShadowMaterial:zA,SpriteMaterial:Mb,RawShaderMaterial:HA,ShaderMaterial:ab,PointsMaterial:rS,MeshPhysicalMaterial:VA,MeshStandardMaterial:GA,MeshPhongMaterial:WA,MeshToonMaterial:jA,MeshNormalMaterial:XA,MeshLambertMaterial:JA,MeshDepthMaterial:YA,MeshDistanceMaterial:KA,MeshBasicMaterial:b_,MeshMatcapMaterial:qA,LineDashedMaterial:QA,LineBasicMaterial:Vx,Material:__}[e]}}class XM{static extractUrlBase(e){const t=e.lastIndexOf("/");return-1===t?"./":e.slice(0,t+1)}static resolveURL(e,t){return"string"!=typeof e||""===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 JM extends z_{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 YM extends _M{constructor(e){super(e)}load(e,t,n,r){const i=this,a=new SM(i.manager);a.setPath(i.path),a.setRequestHeader(i.requestHeader),a.setWithCredentials(i.withCredentials),a.load(e,function(n){try{t(i.parse(JSON.parse(n)))}catch(WL){r?r(WL):dv(WL),i.manager.itemError(e)}},n,r)}parse(e){const t={},n={};function r(e,r){if(void 0!==t[r])return t[r];const i=e.interleavedBuffers[r],a=function(e,t){if(void 0!==n[t])return n[t];const r=e.arrayBuffers[t],i=new Uint32Array(r).buffer;return n[t]=i,i}(e,i.buffer),s=rv(i.type,a),o=new xb(s,i.stride);return o.uuid=i.uuid,t[r]=o,o}const i=e.isInstancedBufferGeometry?new JM:new z_,a=e.data.index;if(void 0!==a){const e=rv(a.type,a.array);i.setIndex(new R_(e,1))}const s=e.data.attributes;for(const u in s){const t=s[u];let n;if(t.isInterleavedBufferAttribute){const i=r(e.data,t.data);n=new Ab(i,t.itemSize,t.offset,t.normalized)}else{const e=rv(t.type,t.array);n=new(t.isInstancedBufferAttribute?ix:R_)(e,t.itemSize,t.normalized)}void 0!==t.name&&(n.name=t.name),void 0!==t.usage&&n.setUsage(t.usage),i.setAttribute(u,n)}const o=e.data.morphAttributes;if(o)for(const u in o){const t=o[u],n=[];for(let i=0,a=t.length;i<a;i++){const a=t[i];let s;if(a.isInterleavedBufferAttribute){const t=r(e.data,a.data);s=new Ab(t,a.itemSize,a.offset,a.normalized)}else{const e=rv(a.type,a.array);s=new R_(e,a.itemSize,a.normalized)}void 0!==a.name&&(s.name=a.name),n.push(s)}i.morphAttributes[u]=n}e.data.morphTargetsRelative&&(i.morphTargetsRelative=!0);const l=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==l)for(let u=0,d=l.length;u!==d;++u){const e=l[u];i.addGroup(e.start,e.count,e.materialIndex)}const c=e.data.boundingSphere;return void 0!==c&&(i.boundingSphere=(new my).fromJSON(c)),e.name&&(i.name=e.name),e.userData&&(i.userData=e.userData),i}}const KM={UVMapping:cm,CubeReflectionMapping:um,CubeRefractionMapping:dm,EquirectangularReflectionMapping:hm,EquirectangularRefractionMapping:fm,CubeUVReflectionMapping:pm},qM={RepeatWrapping:mm,ClampToEdgeWrapping:gm,MirroredRepeatWrapping:vm},QM={NearestFilter:ym,NearestMipmapNearestFilter:_m,NearestMipmapLinearFilter:bm,LinearFilter:xm,LinearMipmapNearestFilter:Sm,LinearMipmapLinearFilter:Am},ZM=new WeakMap;class $M extends _M{constructor(e){super(e),this.isImageBitmapLoader=!0,"undefined"==typeof createImageBitmap&&uv("ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&uv("ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(e){return this.options=e,this}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,a=gM.get(`image-bitmap:${e}`);if(void 0!==a)return i.manager.itemStart(e),a.then?void a.then(n=>{if(!0!==ZM.has(a))return t&&t(n),i.manager.itemEnd(e),n;r&&r(ZM.get(a)),i.manager.itemError(e),i.manager.itemEnd(e)}):(setTimeout(function(){t&&t(a),i.manager.itemEnd(e)},0),a);const s={};s.credentials="anonymous"===this.crossOrigin?"same-origin":"include",s.headers=this.requestHeader,s.signal="function"==typeof AbortSignal.any?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const o=fetch(e,s).then(function(e){return e.blob()}).then(function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:"none"}))}).then(function(n){return gM.add(`image-bitmap:${e}`,n),t&&t(n),i.manager.itemEnd(e),n}).catch(function(t){r&&r(t),ZM.set(o,t),gM.remove(`image-bitmap:${e}`),i.manager.itemError(e),i.manager.itemEnd(e)});gM.add(`image-bitmap:${e}`,o),i.manager.itemStart(e)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}let ew;class tw{static getContext(){return void 0===ew&&(ew=new(window.AudioContext||window.webkitAudioContext)),ew}static setContext(e){ew=e}}const nw=new My,rw=new My,iw=new My;class aw extends ub{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class sw{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 ow=new Cv,lw=new Ev,cw=new Cv,uw=new Cv,dw=new Cv;class hw extends Qy{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(!0===this.isPlaying)return void uv("Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void uv("Audio: this Audio has no playback control.");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(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;uv("Audio: this Audio has no playback control.")}stop(e=0){if(!1!==this.hasPlaybackControl)return this._progress=0,null!==this.source&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this;uv("Audio: this Audio has no playback control.")}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(!1!==this._connected){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=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){return this.detune=e,!0===this.isPlaying&&void 0!==this.source.detune&&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(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;uv("Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1,this._progress=0}getLoop(){return!1===this.hasPlaybackControl?(uv("Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;uv("Audio: this Audio has no playback control.")}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),"buffer"!==e.sourceType?(uv("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=e.hasPlaybackControl,this.sourceType=e.sourceType,this.filters=e.filters.slice(),this)}clone(e){return new this.constructor(this.listener).copy(this,e)}}const fw=new Cv,pw=new Ev,mw=new Cv,gw=new Cv;class vw{constructor(e,t,n){let r,i,a;switch(this.binding=e,this.valueSize=n,t){case"quaternion":r=this._slerp,i=this._slerpAdditive,a=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,a=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,a=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=a,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,r=this.valueSize,i=e*r+r;let a=this.cumulativeWeight;if(0===a){for(let e=0;e!==r;++e)n[i+e]=n[e];a=t}else{a+=t;const e=t/a;this._mixBufferRegion(n,i,0,e,r)}this.cumulativeWeight=a}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,r=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,r,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,a=this.cumulativeWeightAdditive,s=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){const e=t*this._origIndex;this._mixBufferRegion(n,r,e,1-i,t)}a>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let o=t,l=t+t;o!==l;++o)if(n[o]!==n[o+t]){s.setValue(n,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let i=n,a=r;i!==a;++i)t[i]=t[r+i%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;
vendor: 4,613 bytes, line 20
20for(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,r,i){if(r>=.5)for(let a=0;a!==i;++a)e[t+a]=e[n+a]}_slerp(e,t,n,r){Ev.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){const a=this._workIndex*i;Ev.multiplyQuaternionsFlat(e,a,e,t,e,n),Ev.slerpFlat(e,t,e,t,e,a,r)}_lerp(e,t,n,r,i){const a=1-r;for(let s=0;s!==i;++s){const i=t+s;e[i]=e[i]*a+e[n+s]*r}}_lerpAdditive(e,t,n,r,i){for(let a=0;a!==i;++a){const i=t+a;e[i]=e[i]+e[n+a]*r}}}const yw="\\[\\]\\.:\\/",_w=new RegExp("["+yw+"]","g"),bw="[^"+yw+"]",xw="[^"+yw.replace("\\.","")+"]",Sw=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",bw)+/(WCOD+)?/.source.replace("WCOD",xw)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",bw)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",bw)+"$"),Aw=["material","materials","bones","map"];class Mw{constructor(e,t,n){this.path=t,this.parsedPath=n||Mw.parseTrackName(t),this.node=Mw.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 Mw.Composite(e,t,n):new Mw(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(_w,"")}static parseTrackName(e){const t=Sw.exec(e);if(null===t)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]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){const e=n.nodeName.substring(r+1);-1!==Aw.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const n=function(e){for(let r=0;r<e.length;r++){const i=e[r];if(i.name===t||i.uuid===t)return i;const a=n(i.children);if(a)return a}return null},r=n(e.children);if(r)return r}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 r=0,i=n.length;r!==i;++r)e[t++]=n[r]}_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 r=0,i=n.length;r!==i;++r)n[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=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,r=t.propertyName;let i=t.propertyIndex;if(e||(e=Mw.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void uv("PropertyBinding: No target node found for track: "+this.path+".");if(n){let r=t.objectIndex;switch(n){case"materials":if(!e.material)return void dv("PropertyBinding: Can not bind to material as no
20de does not have a material.",this);if(!e.material.materials)return void dv("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void dv("PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(let t=0;t<e.length;t++)if(e[t].name===r){r=t;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material)return void dv("PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.map)return void dv("PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);e=e.material.map;break;default:if(void 0===e[n])return void dv("PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==r){if(void 0===e[r])return void dv("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[r]}}const a=e[r];if(void 0===a)return void dv("PropertyBinding: Trying to update property for track: "+t.nodeName+"."+r+" but it wasn't found.",e);let s=this.Versioning.None;this.targetObject=e,!0===e.isMaterial?s=this.Versioning.NeedsUpdate:!0===e.isObject3D&&(s=this.Versioning.MatrixWorldNeedsUpdate);let o=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!e.geometry)return void dv("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.morphAttributes)return void dv("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[i]&&(i=e.morphTargetDictionary[i])}o=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=i}else void 0!==a.fromArray&&void 0!==a.toArray?(o=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(o=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=r;this.getValue=this.GetterByBindingType[o],this.setValue=this.SetterByBindingTypeAndVersioning[o][s]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Mw.Composite=class{constructor(e,t,n){const r=n||Mw.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].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()}},Mw.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Mw.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Mw.prototype.GetterByBindingType=[Mw.prototype._getValue_direct,Mw.prototype._getValue_array,Mw.prototype._getValue_arrayElement,Mw.prototype._getValue_toArray],Mw.prototype.SetterByBindingTypeAndVersioning=[[Mw.prototype._setValue_direct,Mw.prototype._setValue_direct_setNeedsUpdate,Mw.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Mw.prototype._setValue_array,Mw.prototype._setValue_array_setNeedsUpdate,Mw.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Mw.prototype._setValue_arrayElement,Mw.prototype._setValue_arrayElement_setNeedsUpdate,Mw.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Mw.prototype._setValue_fromArray,Mw.prototype._setValue_fromArray_setNeedsUpdate,Mw.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class ww{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;const i=t.tracks,a=i.length,s=new Array(a),o={endingStart:Lg,endingEnd:Lg};for(let l=0;l!==a;++l){const e=i[l].createInterpolant(null);s[l]=e,e.settings=o}this._interpolantSettings=o,this._interpolants=s,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,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&&0!==this.timeScale&&null===this._startTime&&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}
vendor: 4,512 bytes, line 20
20fadeIn(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),!0===n){const n=this._clip.duration,r=e._clip.duration,i=r/n,a=n/r;e.warp(1,i,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,n=!1){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return null!==e&&(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 r=this._mixer,i=r.time,a=this.timeScale;let s=this._timeScaleInterpolant;null===s&&(s=r._lendControlInterpolant(),this._timeScaleInterpolant=s);const o=s.parameterPositions,l=s.sampleValues;return o[0]=i,o[1]=i+n,l[0]=e/a,l[1]=t/a,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(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,r){if(!this.enabled)return void this._updateWeight(e);const i=this._startTime;if(null!==i){const r=(e-i)*n;r<0||0===n?t=0:(this._startTime=null,t=n*r)}t*=this._updateTimeScale(e);const a=this._updateTime(t),s=this._updateWeight(e);if(s>0){const e=this._interpolants,t=this._propertyBindings;if(this.blendMode===Ng)for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(a),t[n].accumulateAdditive(s);else for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(a),t[n].accumulate(r,s)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(null!==n){const r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;null!==n&&(t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t))}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let r=this.time+e,i=this._loopCount;const a=2202===n;if(0===e)return-1===i||!a||1&~i?r:t-r;if(2200===n){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),r>=t||r<0){const n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);const s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){const t=e<0;this._setEndings(t,!t,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=r;if(a&&!(1&~i))return t-r}return r}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=Dg,r.endingEnd=Dg):(r.endingStart=e?this.zeroSlopeAtStart?Dg:Lg:Fg,r.endingEnd=t?this.zeroSlopeAtEnd?Dg:Lg:Fg)}_scheduleFading(e,t,n){const r=this._mixer,i=r.time;let a=this._weightInterpolant;null===a&&(a=r._lendControlInterpolant(),this._weightInterpolant=a);const s=a.parameterPositions,o=a.sampleValues;return s[0]=i,o[0]=t,s[1]=i+e,o[1]=n,this}}const Ew=new Float32Array(1);class Cw{constructor(e){this.value=e}clone(){return new Cw(void 0===this.value.clone?this.value:this.value.clone())}}let Tw=0;const Rw=new My;class Iw{constructor(e,t,n=0,r=1/0){this.ray=new Ay(e,t),this.near=n,this.far=r,this.camera=null,this.layers=new Fy,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):dv("Raycaster: 
vendor: 6,790 bytes, lines 20-26
20Unsupported camera type: "+t.type)}setFromXRController(e){return Rw.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(Rw),this}intersectObject(e,t=!0,n=[]){return Bw(e,this,n,t),n.sort(Pw),n}intersectObjects(e,t=!0,n=[]){for(let r=0,i=e.length;r<i;r++)Bw(e[r],this,n,t);return n.sort(Pw),n}}function Pw(e,t){return e.distance-t.distance}function Bw(e,t,n,r){let i=!0;if(e.layers.test(t.layers)&&!1===e.raycast(t,n)&&(i=!1),!0===i&&!0===r){const r=e.children;for(let e=0,i=r.length;e<i;e++)Bw(r[e],t,n,!0)}}function Lw(){!1===this._document.hidden&&this.reset()}class Dw{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(){const e=1e-6;return this.phi=_v(this.phi,e,Math.PI-e),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),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(_v(t/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}}class Fw{constructor(e,t,n,r){Fw.prototype.isMatrix2=!0,this.elements=[1,0,0,1],void 0!==e&&this.set(e,t,n,r)}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,r){const i=this.elements;return i[0]=e,i[2]=t,i[1]=n,i[3]=r,this}}const Nw=new wv,Uw=new Cv,Ow=new Cv,kw=new Cv,zw=new Cv,Hw=new Cv,Gw=new Cv,Vw=new Cv,Ww=new Cv,jw=new Cv,Xw=new My,Jw=new My;function Yw(e){const t=[];!0===e.isBone&&t.push(e);for(let n=0;n<e.children.length;n++)t.push(...Yw(e.children[n]));return t}const Kw=new Cv,qw=new g_,Qw=new g_,Zw=new Cv,$w=new Cv,eE=new Cv,tE=new Cv,nE=new sb;function rE(e,t,n,r,i,a,s){tE.set(i,a,s).unproject(r);const o=t[e];if(void 0!==o){const e=n.getAttribute("position");for(let t=0,n=o.length;t<n;t++)e.setXYZ(o[t],tE.x,tE.y,tE.z)}}const iE=new Qv,aE=new Cv;let sE,oE;function lE(e,t,n,r){const i=function(e){switch(e){case wm:case Em:return{byteLength:1,components:1};case Tm:case Cm:case Bm:return{byteLength:2,components:1};case Lm:case Dm:return{byteLength:2,components:4};case Im:case Rm:case Pm:return{byteLength:4,components:1};case Nm:case Um:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${e}.`)}(r);switch(n){case Om:return e*t;case Vm:case Wm:return e*t/i.components*i.byteLength;case jm:case Xm:return e*t*2/i.components*i.byteLength;case km:return e*t*3/i.components*i.byteLength;case zm:case Jm:return e*t*4/i.components*i.byteLength;case Ym:case Km:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case qm:case Qm:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case $m:case tg:return Math.max(e,16)*Math.max(t,8)/4;case Zm:case eg:return Math.max(e,8)*Math.max(t,8)/2;case ng:case rg:case ag:case sg:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case ig:case og:case lg:case cg:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case ug:return Math.floor((e+4)/5)*Math.floor((t+3)/4)*16;case dg:return Math.floor((e+4)/5)*Math.floor((t+4)/5)*16;case hg:return Math.floor((e+5)/6)*Math.floor((t+4)/5)*16;case fg:return Math.floor((e+5)/6)*Math.floor((t+5)/6)*16;case pg:return Math.floor((e+7)/8)*Math.floor((t+4)/5)*16;case mg:return Math.floor((e+7)/8)*Math.floor((t+5)/6)*16;case gg:return Math.floor((e+7)/8)*Math.floor((t+7)/8)*16;case vg:return Math.floor((e+9)/10)*Math.floor((t+4)/5)*16;case yg:return Math.floor((e+9)/10)*Math.floor((t+5)/6)*16;case _g:return Math.floor((e+9)/10)*Math.floor((t+7)/8)*16;case bg:return Math.floor((e+9)/10)*Math.floor((t+9)/10)*16;case xg:return Math.floor((e+11)/12)*Math.floor((t+9)/10)*16;case Sg:return Math.floor((e+11)/12)*Math.floor((t+11)/12)*16;case Ag:case Mg:case wg:return Math.ceil(e/4)*Math.ceil(t/4)*16;case Eg:case Cg:return Math.ceil(e/4)*Math.ceil(t/4)*8;case Tg:case Rg:return Math.ceil(e/4)*Math.ceil(t/4)*16}throw new Error(`Unable to determine texture byte length for ${n} format.`)}
21/**
22 * @license
23 * Copyright 2010-2025 Three.js Authors
24 * SPDX-License-Identifier: MIT
25 */
26function cE(){let e=null,t=!1,n=null,r=null;function i(t,a){n(t,a),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function uE(e){const t=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),t.get(e)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);const r=t.get(n);r&&(e.deleteBuffer(r.buffer),t.delete(n))},update:function(n,r){if(n.isInterleavedBufferAttribute&&(n=n.data),n.isGLBufferAttribute){const e=t.get(n);return void((!e||e.version<n.version)&&t.set(n,{buffer:n.buffer,type:n.type,bytesPerElement:n.elementSize,version:n.version}))}const i=t.get(n);if(void 0===i)t.set(n,function(t,n){const r=t.array,i=t.usage,a=r.byteLength,s=e.createBuffer();let o;if(e.bindBuffer(n,s),e.bufferData(n,r,i),t.onUploadCallback(),r instanceof Float32Array)o=e.FLOAT;else if("undefined"!=typeof Float16Array&&r instanceof Float16Array)o=e.HALF_FLOAT;else if(r instanceof Uint16Array)o=t.isFloat16BufferAttribute?e.HALF_FLOAT:e.UNSIGNED_SHORT;else if(r instanceof Int16Array)o=e.SHORT;else if(r instanceof Uint32Array)o=e.UNSIGNED_INT;else if(r instanceof Int32Array)o=e.INT;else if(r instanceof Int8Array)o=e.BYTE;else if(r instanceof Uint8Array)o=e.UNSIGNED_BYTE;else{if(!(r instanceof Uint8ClampedArray))throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+r);o=e.UNSIGNED_BYTE}return{buffer:s,type:o,bytesPerElement:r.BYTES_PER_ELEMENT,version:t.version,size:a}}(n,r));else if(i.version<n.version){if(i.size!==n.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.");!function(t,n,r){const i=n.array,a=n.updateRanges;if(e.bindBuffer(r,t),0===a.length)e.bufferSubData(r,0,i);else{a.sort((e,t)=>e.start-t.start);let t=0;for(let e=1;e<a.length;e++){const n=a[t],r=a[e];r.start<=n.start+n.count+1?n.count=Math.max(n.count,r.start+r.count-n.start):(++t,a[t]=r)}a.length=t+1;for(let n=0,s=a.length;n<s;n++){const t=a[n];e.bufferSubData(r,t.start*i.BYTES_PER_ELEMENT,i,t.start,t.count)}n.clearUpdateRanges()}n.onUploadCallback()}(i.buffer,n,r),i.version=n.version}}}}"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:vp}})),"undefined"!=typeof window&&(window.__THREE__?uv("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=vp);const dE
vendor: 6,923 bytes, line 26
26={alphahash_fragment:"#ifdef USE_ALPHAHASH\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif",alphahash_pars_fragment:"#ifdef USE_ALPHAHASH\n\tconst float ALPHA_HASH_SCALE = 0.05;\n\tfloat hash2D( vec2 value ) {\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\t}\n\tfloat hash3D( vec3 value ) {\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\t}\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\t}\n#endif",alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n\t#ifdef ALPHA_TO_COVERAGE\n\tdiffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\tif ( diffuseColor.a < alphaTest ) discard;\n\t#endif\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_CLEARCOAT ) \n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_SHEEN ) \n\t\tsheenSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",batching_pars_vertex:"#ifdef USE_BATCHING\n\t#if ! defined( GL_ANGLE_multi_draw )\n\t#define gl_DrawID _gl_DrawID\n\tuniform int _gl_DrawID;\n\t#endif\n\tuniform highp sampler2D batchingTexture;\n\tuniform highp usampler2D batchingIdTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n\tfloat getIndirectIndex( const in int i ) {\n\t\tint size = textureSize( batchingIdTexture, 0 ).x;\n\t\tint x = i % size;\n\t\tint y = i / size;\n\t\treturn float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );\n\t}\n#endif\n#ifdef USE_BATCHING_COLOR\n\tuniform sampler2D batchingColorTexture;\n\tvec3 getBatchingColor( const in float i ) {\n\t\tint size = textureSize( batchingColorTexture, 0 ).x;\n\t\tint j = int( i );\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\treturn texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;\n\t}\n#endif",batching_vertex:"#ifdef USE_BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );\n#endif",begin_vertex:"vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n\tvPosition = vec3( position );\n#endif",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated",iridescence_fragment:"#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660,  0.0556434,\n\t\t-1.5371385,  1.8760108, -0.2040259,\n\t\t-0.4985314,  0.0415560,  1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\treturn vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );
vendor: 16,472 bytes, line 26
26\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#ifdef ALPHA_TO_COVERAGE\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tfloat unionClipOpacity = 1.0;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\t\t#endif\n\t\tdiffuseColor.a *= clipOpacity;\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tbool clipped = true;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tif ( clipped ) discard;\n\t\t#endif\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE_EMISSIVE\n\t\temissiveColor = sRGBTransferEOTF( emissiveColor );\n\t#endif\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"vec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferEOTF( in vec4 value ) {\n\treturn 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 );\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn 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 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform mat3 envMapRotation;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );
vendor: 6,915 bytes, line 26
26\n\t\t\treflectVec = normalize( mix( reflectVec, normal, pow4( roughness ) ) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid 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 ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid 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 ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}
vendor: 6,173 bytes, line 26
26\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid 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 ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid 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 ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid 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 ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid 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 ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.diffuseContribution = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.metalness = metalnessFactor;\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor;\n\tmaterial.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = vec3( 0.04 );\n\tmaterial.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;
vendor: 4,881 bytes, line 26
26\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n\tmaterial.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.0001, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"uniform sampler2D dfgLUT;\nstruct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tvec3 diffuseContribution;\n\tvec3 specularColor;\n\tvec3 specularColorBlended;\n\tfloat roughness;\n\tfloat metalness;\n\tfloat specularF90;\n\tfloat dispersion;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t\tvec3 iridescenceFresnelDielectric;\n\t\tvec3 iridescenceFresnelMetallic;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n    float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n    float x2 = x * x;\n    float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n    return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat 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 ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alph
vendor: 3,489 bytes, line 26
26aB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn v;\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColorBlended;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x >
vendor: 6,461 bytes, line 26
26 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transpose( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat rInv = 1.0 / ( roughness + 0.1 );\n\tfloat a = -1.9362 + 1.0678 * roughness + 0.4573 * r2 - 0.8469 * rInv;\n\tfloat b = -0.6014 + 0.5538 * roughness - 0.4670 * r2 - 0.1255 * rInv;\n\tfloat DG = exp( a * dotNV + b );\n\treturn saturate( DG );\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid 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 ) {\n#else\nvoid 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 ) {\n#endif\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nvec3 BRDF_GGX_Multiscatter( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 singleScatter = BRDF_GGX( lightDir, viewDir, normal, material );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 dfgV = texture2D( dfgLUT, vec2( material.roughness, dotNV ) ).rg;\n\tvec2 dfgL = texture2D( dfgLUT, vec2( material.roughness, dotNL ) ).rg;\n\tvec3 FssEss_V = material.specularColorBlended * dfgV.x + material.specularF90 * dfgV.y;\n\tvec3 FssEss_L = material.specularColorBlended * dfgL.x + material.specularF90 * dfgL.y;\n\tfloat Ess_V = dfgV.x + dfgV.y;\n\tfloat Ess_L = dfgL.x + dfgL.y;\n\tfloat Ems_V = 1.0 - Ess_V;\n\tfloat Ems_L = 1.0 - Ess_L;\n\tvec3 Favg = material.specularColorBlended + ( 1.0 - material.specularColorBlended ) * 0.047619;\n\tvec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg + EPSILON );\n\tfloat compensationFactor = Ems_V * Ems_L;\n\tvec3 multiScatter = Fms * compensationFactor;\n\treturn singleScatter + multiScatter;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid 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 ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(    0, 1,    0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColorBlended * t2.x + ( 
26vec3( 1.0 ) - material.specularColorBlended ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseContribution * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );
vendor: 11,549 bytes, line 26
26\n\t}\n#endif\nvoid 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 ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n \n \t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n \n \t\tfloat sheenAlbedoV = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n \t\tfloat sheenAlbedoL = IBLSheenBRDF( geometryNormal, directLight.direction, material.sheenRoughness );\n \n \t\tfloat sheenEnergyComp = 1.0 - max3( material.sheenColor ) * max( sheenAlbedoV, sheenAlbedoL );\n \n \t\tirradiance *= sheenEnergyComp;\n \n \t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseContribution );\n}\nvoid 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 ) {\n\tvec3 diffuse = irradiance * BRDF_Lambert( material.diffuseContribution );\n\t#ifdef USE_SHEEN\n\t\tfloat sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t\tfloat sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;\n\t\tdiffuse *= sheenEnergyComp;\n\t#endif\n\treflectedLight.indirectDiffuse += diffuse;\n}\nvoid 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) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ) * RECIPROCAL_PI;\n \t#endif\n\tvec3 singleScatteringDielectric = vec3( 0.0 );\n\tvec3 multiScatteringDielectric = vec3( 0.0 );\n\tvec3 singleScatteringMetallic = vec3( 0.0 );\n\tvec3 multiScatteringMetallic = vec3( 0.0 );\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnelDielectric, material.roughness, singleScatteringDielectric, multiScatteringDielectric );\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.iridescence, material.iridescenceFresnelMetallic, material.roughness, singleScatteringMetallic, multiScatteringMetallic );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScatteringDielectric, multiScatteringDielectric );\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.roughness, singleScatteringMetallic, multiScatteringMetallic );\n\t#endif\n\tvec3 singleScattering = mix( singleScatteringDielectric, singleScatteringMetallic, material.metalness );\n\tvec3 multiScattering = mix( multiScatteringDielectric, multiScatteringMetallic, material.metalness );\n\tvec3 totalScatteringDielectric = singleScatteringDielectric + multiScatteringDielectric;\n\tvec3 diffuse = material.diffuseContribution * ( 1.0 - totalScatteringDielectric );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tvec3 indirectSpecular = radiance * singleScattering;\n\tindirectSpecular += multiScattering * cosineWeightedIrradiance;\n\tvec3 indirectDiffuse = diffuse * cosineWeightedIrradiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t\tfloat sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;\n\t\tindirectSpecular *= sheenEnergyComp;\n\t\tindirectDiffuse *= sheenEnergyComp;\n\t#endif\n\treflectedLight.indirectSpecular += indirectSpecular;\n\treflectedLight.indirectDiffuse += indirectDiffuse;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnelDielectric = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceFresnelMetallic = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.diffuseColor );\n\t\tmaterial.iridescenceFresnel = mix( material.iridescenceFresnelDielectric, material.iridescenceFresnelMetallic, material.metalness );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n
26#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n\tgl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n\tvFragDepth = 1.0 + gl_Position.w;\n\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphinstance_vertex:"#ifdef USE_INSTANCING_MORPH\n\tfloat morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\tfloat morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tmorphTargetInfluences[i] =  texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n\t}\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
vendor: 5,127 bytes, line 26
26\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( const in vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\t
26return depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tuniform sampler2DShadow directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\t#else\n\t\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\t#endif\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tuniform sampler2DShadow spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\t#else\n\t\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\t#endif\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tuniform samplerCubeShadow pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\t#elif defined( SHADOWMAP_TYPE_BASIC )\n\t\t\tuniform samplerCube pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\t#endif\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\tfloat interleavedGradientNoise( vec2 position ) {\n\t\t\treturn fract( 52.9829189 * fract( dot( position, vec2( 0.06711056, 0.00583715 ) ) ) );\n\t\t}\n\t\tvec2 vogelDiskSample( int sampleIndex, int samplesCount, float phi ) {\n\t\t\tconst float goldenAngle = 2.399963229728653;\n\t\t\tfloat r = sqrt( ( float( sampleIndex ) + 0.5 ) / float( samplesCount ) );\n\t\t\tfloat theta = float( sampleIndex ) * goldenAngle + phi;\n\t\t\treturn vec2( cos( theta ), sin( theta ) ) * r;\n\t\t}\n\t#endif\n\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\tfloat getShadow( sampler2DShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\t\tfloat shadow = 1.0;\n\t\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\t\tshadowCoord.z += shadowBias;\n\t\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\t\tif ( frustumTest ) {\n\t\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\t\tfloat radius = shadowRadius * texelSize.x;\n\t\t\t\tfloat phi = interleavedGradientNoise( gl_FragCoord.xy ) * 6.28318530718;\n\t\t\t\tshadow = (\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 0, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 1, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 2, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 3, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 4, 5, phi ) * radius, shadowCoord.z ) )\n\t\t\t\t) * 0.2;\n\t\t\t}\n\t\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t\t}\n\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\t\tfloat shadow = 1.0;\n\t\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\t\tshadowCoord.z += shadowBias;\n\t\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\t\tif ( frustumTest ) {\n\t\t\t\tvec2 distribution = texture2D( shadowMap, shadowCoord.xy ).rg;\n\t\t\t\tfloat mean = distribution.x;\n\t\t\t\tfloat variance = distribution.y * distribution.y;\n\t\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\t\t\t\tfloat hard_shadow = step( mean, shadowCoord.z );\n\t\t\t\t#else\n\t\t\t\t\tfloat hard_shadow = step( shadowCoord.z, mean );\n\t\t\t\t#endif\n\t\t\t\tif ( hard_shadow == 1.0 ) {\n\t\t\t\t\tshadow = 1.0;\n\t\t\t\t} else {\n\t\t\t\t\tvariance = max( variance, 0.0000001 );\n\t\t\t\t\tfloat d = shadowCoord.z - mean;\n\t\t\t\t\tfloat p_max = variance / ( variance + d * d );\n\t\t\t\t\tp_max = clamp( ( p_max - 0.3 ) / 0.65, 0.0, 1.0 );\n\t\t\t\t\tshadow = max( hard_shadow, p_max );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t\t}\n\t#else\n\t\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\t\tfloat shadow = 1.0;\n\t\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\t\tshadowCoord.z += shadowBias;\n\t\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\t\tif ( frustumTest ) {\n\t\t\t\tfloat depth = texture2D( shadowMap, shadowCoord.xy ).r;\n\t\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\t\t\t\tshadow = step( depth, shadowCoord.z );\n\t\t\t\t#else\n\t\t\t\t\tshadow = step( shadowCoord.z, depth );\n\t\t\t\t#endif\n\t\t\t}\n\t\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t\t}\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#if defined( SHADOWMAP_TYPE_PCF )\n\tfloat getPointShadow( samplerCubeShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tfloat shadow = 1.0;\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\tvec3 absVec = abs( lightToPosition );\n\t\tfloat viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );\n\t\tif ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {\n\t\t\tfloat dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );\n\t\t\tdp += shadowBias;\n\t\t\tfloat texelSize = shadowRadius / shadowMapSize.x;\n\t\t\tvec3 absDir = abs( bd3D );\n\t\t\tvec3 tangent = absDir.x > absDir.z ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 );\n\t\t\ttangent = normalize( cross( bd3D, tangent ) );\n\t\t\tvec3 bitangent = cross( bd3D, tangent );\n\t\t\tfloat phi = interleavedGradientNoise( gl_FragCoord.xy ) * 6.28318530718;\n\t\t\tshadow = (\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 0, 5, phi ).x + bitangent * vogelDiskSample( 0, 5, phi ).y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 1, 5, phi ).x + bitangent * vogelDiskSample( 1, 5, phi ).y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 2, 5, phi ).x + bitangent * vogelDiskSample( 2, 5, phi ).y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 3, 5, phi ).x + bitangent * vogelDiskSample( 3, 5, phi ).y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 4, 5, phi ).x + bitangent * vogelDiskSample( 4, 5, phi ).y ) * texelSize, dp ) )\n\t\t\t) * 0.2;\n\t\t}\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t}\n\t#elif defined( SHADOWMAP_TYPE_BASIC )\n\tfloat getPointShadow( samplerCube shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tfloat shadow = 1.0;\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\tvec3 absVec = abs( lightToPosition );\n\t\tfloat viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );\n\t\tif ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {\n\t\t\tfloat dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );\n\t\t\tdp += shadowBias;\n\t\t\tfloat depth = textureCube( shadowMap, bd3D ).r;\n\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\t\t\tshadow = step( depth, dp );\n\t\t\t#else\n\t\t\t\tshadow = step( dp, depth );\n\t\t\t#endif\n\t\t}\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t}\n\t#endif\n\t#endif\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_L
26IGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
vendor: 7,200 bytes, line 26
26\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0 && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 CineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(  1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,  1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,  1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);
vendor: 9,119 bytes, line 26
26\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor *= toneMappingExposure;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\tcolor = clamp( color, 0.0, 1.0 );\n\treturn color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n\tconst float StartCompression = 0.8 - 0.04;\n\tconst float Desaturation = 0.15;\n\tcolor *= toneMappingExposure;\n\tfloat x = min( color.r, min( color.g, color.b ) );\n\tfloat offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n\tcolor -= offset;\n\tfloat peak = max( color.r, max( color.g, color.b ) );\n\tif ( peak < StartCompression ) return color;\n\tfloat d = 1. - StartCompression;\n\tfloat newPeak = 1. - d * d / ( peak + d - StartCompression );\n\tcolor *= newPeak / peak;\n\tfloat g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n\treturn mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseContribution, material.specularColorBlended, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a *  a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t#else\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t#endif\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;
vendor: 8,453 bytes, line 26
26\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = 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 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float 
26flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",depth_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <logdepthbuf_fragment>\n\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\tfloat fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ];\n\t#else\n\t\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5;\n\t#endif\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\n\t#endif\n}",distance_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distance_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = vec4( dist, 0.0, 0.0, 1.0 );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;
26\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( normalize( normal ) * 0.5 + 0.5, diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap
vendor: 13,006 bytes, line 26
26_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n\tuniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n \n\t\toutgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect;\n \n \t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n
26}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix[ 3 ];\n\tvec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}"},hE={common:{diffuse:{value:new g_(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Iv},alphaMap:{value:null},alphaMapTransform:{value:new Iv},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Iv}},envmap:{envMap:{value:null},envMapRotation:{value:new Iv},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 Iv}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Iv}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Iv},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Iv},normalScale:{value:new wv(1,1)}}
vendor: 7,755 bytes, line 26
26,displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Iv},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Iv}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Iv}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Iv}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new g_(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 g_(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Iv},alphaTest:{value:0},uvTransform:{value:new Iv}},sprite:{diffuse:{value:new g_(16777215)},opacity:{value:1},center:{value:new wv(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Iv},alphaMap:{value:null},alphaMapTransform:{value:new Iv},alphaTest:{value:0}}},fE={basic:{uniforms:nb([hE.common,hE.specularmap,hE.envmap,hE.aomap,hE.lightmap,hE.fog]),vertexShader:dE.meshbasic_vert,fragmentShader:dE.meshbasic_frag},lambert:{uniforms:nb([hE.common,hE.specularmap,hE.envmap,hE.aomap,hE.lightmap,hE.emissivemap,hE.bumpmap,hE.normalmap,hE.displacementmap,hE.fog,hE.lights,{emissive:{value:new g_(0)}}]),vertexShader:dE.meshlambert_vert,fragmentShader:dE.meshlambert_frag},phong:{uniforms:nb([hE.common,hE.specularmap,hE.envmap,hE.aomap,hE.lightmap,hE.emissivemap,hE.bumpmap,hE.normalmap,hE.displacementmap,hE.fog,hE.lights,{emissive:{value:new g_(0)},specular:{value:new g_(1118481)},shininess:{value:30}}]),vertexShader:dE.meshphong_vert,fragmentShader:dE.meshphong_frag},standard:{uniforms:nb([hE.common,hE.envmap,hE.aomap,hE.lightmap,hE.emissivemap,hE.bumpmap,hE.normalmap,hE.displacementmap,hE.roughnessmap,hE.metalnessmap,hE.fog,hE.lights,{emissive:{value:new g_(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:dE.meshphysical_vert,fragmentShader:dE.meshphysical_frag},toon:{uniforms:nb([hE.common,hE.aomap,hE.lightmap,hE.emissivemap,hE.bumpmap,hE.normalmap,hE.displacementmap,hE.gradientmap,hE.fog,hE.lights,{emissive:{value:new g_(0)}}]),vertexShader:dE.meshtoon_vert,fragmentShader:dE.meshtoon_frag},matcap:{uniforms:nb([hE.common,hE.bumpmap,hE.normalmap,hE.displacementmap,hE.fog,{matcap:{value:null}}]),vertexShader:dE.meshmatcap_vert,fragmentShader:dE.meshmatcap_frag},points:{uniforms:nb([hE.points,hE.fog]),vertexShader:dE.points_vert,fragmentShader:dE.points_frag},dashed:{uniforms:nb([hE.common,hE.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:dE.linedashed_vert,fragmentShader:dE.linedashed_frag},depth:{uniforms:nb([hE.common,hE.displacementmap]),vertexShader:dE.depth_vert,fragmentShader:dE.depth_frag},normal:{uniforms:nb([hE.common,hE.bumpmap,hE.normalmap,hE.displacementmap,{opacity:{value:1}}]),vertexShader:dE.meshnormal_vert,fragmentShader:dE.meshnormal_frag},sprite:{uniforms:nb([hE.sprite,hE.fog]),vertexShader:dE.sprite_vert,fragmentShader:dE.sprite_frag},background:{uniforms:{uvTransform:{value:new Iv},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:dE.background_vert,fragmentShader:dE.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Iv}},vertexShader:dE.backgroundCube_vert,fragmentShader:dE.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:dE.cube_vert,fragmentShader:dE.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:dE.equirect_vert,fragmentShader:dE.equirect_frag},distance:{uniforms:nb([hE.common,hE.displacementmap,{referencePosition:{value:new Cv},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:dE.distance_vert,fragmentShader:dE.distance_frag},shadow:{uniforms:nb([hE.lights,hE.fog,{color:{value:new g_(0)},opacity:{value:1}}]),vertexShader:dE.shadow_vert,fragmentShader:dE.shadow_frag}};fE.physical={uniforms:nb([fE.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Iv},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Iv},clearcoatNormalScale:{value:new wv(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Iv},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Iv},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Iv},sheen:{value:0},sheenColor:{value:new g_(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Iv},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Iv},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Iv},transmissionSamplerSize:{value:new wv},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Iv},attenuationDistance:{value:0},attenuationColor:{value:new g_(0)},specularColor:{value:new g_(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Iv},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Iv},anisotropyVector:{value:new wv},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Iv}}]),vertexShader:dE.meshphysical_vert,fragmentShader:dE.meshphysical_frag};const pE={r:0,b:0,g:0},mE=new Dy,gE=new My;function vE(e,t,n,r,i,a,s){const o=new g_(0);let l,c,u=!0===a?0:1,d=null,h=0,f=null;function p(e){let r=!0===e.isScene?e.background:null;return r&&r.isTexture&&(r=(e.backgroundBlurriness>0?n:t).get(r)),r}function m(t,n){t.getRGB(pE,rb(e)),r.buffers.color.setClear(pE.r,pE.g,pE.b,n,s)}return{getClearColor:function(){return o},setClearColor:function(e,t=1){o.set(e),u=t,m(o,u)},getClearAlpha:function(){return u},setClearAlpha:function(e){u=e,m(o,u)},render:function(t){let n=!1;const i=p(t);null===i?m(o,u):i&&i.isColor&&(m(i,1),n=!0);const a=e.xr.getEnvironmentBlendMode();"additive"===a?r.buffers.color.setClear(0,0,0,1,s):"alpha-blend"===a&&r.buffers.color.setClear(0,0,0,0,s),(e.autoClear||n)&&(r.buffers.depth.setTest(!0),r.buffers.depth.setMask(!0),r.buffers.color.setMask(!0),e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil))},addToRenderList:function(t,n){const r=p(n);r&&(r.isCubeTexture||r.mapping===pm)?(void 0===c&&(c=new Z_(new eb(1,1,1),new ab({name:"Backgroun
26dCubeMaterial",uniforms:tb(fE.backgroundCube.uniforms),vertexShader:fE.backgroundCube.vertexShader,fragmentShader:fE.backgroundCube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(c)),mE.copy(n.backgroundRotation),mE.x*=-1,mE.y*=-1,mE.z*=-1,r.isCubeTexture&&!1===r.isRenderTargetTexture&&(mE.y*=-1,mE.z*=-1),c.material.uniforms.envMap.value=r,c.material.uniforms.flipEnvMap.value=r.isCubeTexture&&!1===r.isRenderTargetTexture?-1:1,c.material.uniforms.backgroundBlurriness.value=n.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,c.material.uniforms.backgroundRotation.value.setFromMatrix4(gE.makeRotationFromEuler(mE)),c.material.toneMapped=Fv.getTransfer(r.colorSpace)!==Hg,d===r&&h===r.version&&f===e.toneMapping||(c.material.needsUpdate=!0,d=r,h=r.version,f=e.toneMapping),c.layers.enableAll(),t.unshift(c,c.geometry,c.material,0,0,null)):r&&r.isTexture&&(void 0===l&&(l=new Z_(new RA(2,2),new ab({name:"BackgroundMaterial",uniforms:tb(fE.background.uniforms),vertexShader:fE.background.vertexShader,fragmentShader:fE.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),l.geometry.deleteAttribute("normal"),Object.defineProperty(l.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(l)),l.material.uniforms.t2D.value=r,l.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,l.material.toneMapped=Fv.getTransfer(r.colorSpace)!==Hg,!0===r.matrixAutoUpdate&&r.updateMatrix(),l.material.uniforms.uvTransform.value.copy(r.matrix),d===r&&h===r.version&&f===e.toneMapping||(l.material.needsUpdate=!0,d=r,h=r.version,f=e.toneMapping),l.layers.enableAll(),t.unshift(l,l.geometry,l.material,0,0,null))},dispose:function(){void 0!==c&&(c.geometry.dispose(),c.material.dispose(),c=void 0),void 0!==l&&(l.geometry.dispose(),l.material.dispose(),l=void 0)}}}function yE(e,t){const n=e.getParameter(e.MAX_VERTEX_ATTRIBS),r={},i=c(null);let a=i,s=!1;function o(t){return e.bindVertexArray(t)}function l(t){return e.deleteVertexArray(t)}function c(e){const t=[],r=[],i=[];for(let a=0;a<n;a++)t[a]=0,r[a]=0,i[a]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:r,attributeDivisors:i,object:e,attributes:{},index:null}}function u(){const e=a.newAttributes;for(let t=0,n=e.length;t<n;t++)e[t]=0}function d(e){h(e,0)}function h(t,n){const r=a.newAttributes,i=a.enabledAttributes,s=a.attributeDivisors;r[t]=1,0===i[t]&&(e.enableVertexAttribArray(t),i[t]=1),s[t]!==n&&(e.vertexAttribDivisor(t,n),s[t]=n)}function f(){const t=a.newAttributes,n=a.enabledAttributes;for(let r=0,i=n.length;r<i;r++)n[r]!==t[r]&&(e.disableVertexAttribArray(r),n[r]=0)}function p(t,n,r,i,a,s,o){!0===o?e.vertexAttribIPointer(t,n,r,a,s):e.vertexAttribPointer(t,n,r,i,a,s)}function m(){g(),s=!0,a!==i&&(a=i,o(a.object))}function g(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:function(n,i,l,m,g){let v=!1;const y=function(t,n,i){const a=!0===i.wireframe;let s=r[t.id];void 0===s&&(s={},r[t.id]=s);let o=s[n.id];void 0===o&&(o={},s[n.id]=o);let l=o[a];return void 0===l&&(l=c(e.createVertexArray()),o[a]=l),l}(m,l,i);a!==y&&(a=y,o(a.object)),v=function(e,t,n,r){const i=a.attributes,s=t.attributes;let o=0;const l=n.getAttributes();for(const a in l)if(l[a].location>=0){const t=i[a];let n=s[a];if(void 0===n&&("instanceMatrix"===a&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===a&&e.instanceColor&&(n=e.instanceColor)),void 0===t)return!0;if(t.attribute!==n)return!0;if(n&&t.data!==n.data)return!0;o++}return a.attributesNum!==o||a.index!==r}(n,m,l,g),v&&function(e,t,n,r){const i={},s=t.attributes;let o=0;const l=n.getAttributes();for(const a in l)if(l[a].location>=0){let t=s[a];void 0===t&&("instanceMatrix"===a&&e.instanceMatrix&&(t=e.instanceMatrix),"instanceColor"===a&&e.instanceColor&&(t=e.instanceColor));const n={};n.attribute=t,t&&t.data&&(n.data=t.data),i[a]=n,o++}a.attributes=i,a.attributesNum=o,a.index=r}(n,m,l,g),null!==g&&t.update(g,e.ELEMENT_ARRAY_BUFFER),(v||s)&&(s=!1,function(n,r,i,a){u();const s=a.attributes,o=i.getAttributes(),l=r.defaultAttributeValues;for(const c in o){const r=o[c];if(r.location>=0){let i=s[c];if(void 0===i&&("instanceMatrix"===c&&n.instanceMatrix&&(i=n.instanceMatrix),"instanceColor"===c&&n.instanceColor&&(i=n.instanceColor)),void 0!==i){const s=i.normalized,o=i.itemSize,l=t.get(i);if(void 0===l)continue;const c=l.buffer,u=l.type,f=l.bytesPerElement,m=u===e.INT||u===e.UNSIGNED_INT||i.gpuType===Rm;if(i.isInterleavedBufferAttribute){const t=i.data,l=t.stride,g=i.offset;if(t.isInstancedInterleavedBuffer){for(let e=0;e<r.locationSize;e++)h(r.location+e,t.meshPerAttribute);!0!==n.isInstancedMesh&&void 0===a._maxInstanceCount&&(a._maxInstanceCount=t.meshPerAttribute*t.count)}else for(let e=0;e<r.locationSize;e++)d(r.location+e);e.bindBuffer(e.ARRAY_BUFFER,c);for(let e=0;e<r.locationSize;e++)p(r.location+e,o/r.locationSize,u,s,l*f,(g+o/r.locationSize*e)*f,m)}else{if(i.isInstancedBufferAttribute){for(let e=0;e<r.locationSize;e++)h(r.location+e,i.meshPerAttribute);!0!==n.isInstancedMesh&&void 0===a._maxInstanceCount&&(a._maxInstanceCount=i.meshPerAttribute*i.count)}else for(let e=0;e<r.locationSize;e++)d(r.location+e);e.bindBuffer(e.ARRAY_BUFFER,c);for(let e=0;e<r.locationSize;e++)p(r.location+e,o/r.locationSize,u,s,o*f,o/r.locationSize*e*f,m)}
vendor: 1,457 bytes, line 26
26}else if(void 0!==l){const t=l[c];if(void 0!==t)switch(t.length){case 2:e.vertexAttrib2fv(r.location,t);break;case 3:e.vertexAttrib3fv(r.location,t);break;case 4:e.vertexAttrib4fv(r.location,t);break;default:e.vertexAttrib1fv(r.location,t)}}}}f()}(n,i,l,m),null!==g&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.get(g).buffer))},reset:m,resetDefaultState:g,dispose:function(){m();for(const e in r){const t=r[e];for(const e in t){const n=t[e];for(const e in n)l(n[e].object),delete n[e];delete t[e]}delete r[e]}},releaseStatesOfGeometry:function(e){if(void 0===r[e.id])return;const t=r[e.id];for(const n in t){const e=t[n];for(const t in e)l(e[t].object),delete e[t];delete t[n]}delete r[e.id]},releaseStatesOfProgram:function(e){for(const t in r){const n=r[t];if(void 0===n[e.id])continue;const i=n[e.id];for(const e in i)l(i[e].object),delete i[e];delete n[e.id]}},initAttributes:u,enableAttribute:d,disableUnusedAttributes:f}}function _E(e,t,n){let r;function i(t,i,a){0!==a&&(e.drawArraysInstanced(r,t,i,a),n.update(i,r,a))}this.setMode=function(e){r=e},this.render=function(t,i){e.drawArrays(r,t,i),n.update(i,r,1)},this.renderInstances=i,this.renderMultiDraw=function(e,i,a){if(0===a)return;t.get("WEBGL_multi_draw").multiDrawArraysWEBGL(r,e,0,i,0,a);let s=0;for(let t=0;t<a;t++)s+=i[t];n.update(s,r,1)},this.renderMultiDrawInstances=function(e,a,s,o){if(0===s)return;const l=t.get("WEBGL_multi_draw");if(null===l)for(let t=0;t<e.length;t++)i(e[t],a[t],o[t]);
vendor: 13,019 bytes, line 26
26else{l.multiDrawArraysInstancedWEBGL(r,e,0,a,0,o,0,s);let t=0;for(let e=0;e<s;e++)t+=a[e]*o[e];n.update(t,r,1)}}}function bE(e,t,n,r){let i;function a(t){if("highp"===t){if(e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let s=void 0!==n.precision?n.precision:"highp";const o=a(s);return o!==s&&(uv("WebGLRenderer:",s,"not supported, using",o,"instead."),s=o),{isWebGL2:!0,getMaxAnisotropy:function(){if(void 0!==i)return i;if(!0===t.has("EXT_texture_filter_anisotropic")){const n=t.get("EXT_texture_filter_anisotropic");i=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i},getMaxPrecision:a,textureFormatReadable:function(t){return t===zm||r.convert(t)===e.getParameter(e.IMPLEMENTATION_COLOR_READ_FORMAT)},textureTypeReadable:function(n){const i=n===Bm&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(n!==wm&&r.convert(n)!==e.getParameter(e.IMPLEMENTATION_COLOR_READ_TYPE)&&n!==Pm&&!i)},precision:s,logarithmicDepthBuffer:!0===n.logarithmicDepthBuffer,reversedDepthBuffer:!0===n.reversedDepthBuffer&&t.has("EXT_clip_control"),maxTextures:e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),maxVertexTextures:e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),maxTextureSize:e.getParameter(e.MAX_TEXTURE_SIZE),maxCubemapSize:e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),maxAttributes:e.getParameter(e.MAX_VERTEX_ATTRIBS),maxVertexUniforms:e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),maxVaryings:e.getParameter(e.MAX_VARYING_VECTORS),maxFragmentUniforms:e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),maxSamples:e.getParameter(e.MAX_SAMPLES),samples:e.getParameter(e.SAMPLES)}}function xE(e){const t=this;let n=null,r=0,i=!1,a=!1;const s=new gx,o=new Iv,l={value:null,needsUpdate:!1};function c(e,n,r,i){const a=null!==e?e.length:0;let c=null;if(0!==a){if(c=l.value,!0!==i||null===c){const t=r+4*a,i=n.matrixWorldInverse;o.getNormalMatrix(i),(null===c||c.length<t)&&(c=new Float32Array(t));for(let n=0,l=r;n!==a;++n,l+=4)s.copy(e[n]).applyMatrix4(i,o),s.normal.toArray(c,l),c[l+3]=s.constant}l.value=c,l.needsUpdate=!0}return t.numPlanes=a,t.numIntersection=0,c}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t){const n=0!==e.length||t||0!==r||i;return i=t,r=e.length,n},this.beginShadows=function(){a=!0,c(null)},this.endShadows=function(){a=!1},this.setGlobalState=function(e,t){n=c(e,t,0)},this.setState=function(s,o,u){const d=s.clippingPlanes,h=s.clipIntersection,f=s.clipShadows,p=e.get(s);if(!i||null===d||0===d.length||a&&!f)a?c(null):(l.value!==n&&(l.value=n,l.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0);else{const e=a?0:r,t=4*e;let i=p.clippingState||null;l.value=i,i=c(d,o,t,u);for(let r=0;r!==t;++r)i[r]=n[r];p.clippingState=i,this.numIntersection=h?this.numPlanes:0,this.numPlanes+=e}}}function SE(e){let t=new WeakMap;function n(e,t){return t===hm?e.mapping=um:t===fm&&(e.mapping=dm),e}function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const a=i.mapping;if(a===hm||a===fm){if(t.has(i))return n(t.get(i).texture,i.mapping);{const a=i.image;if(a&&a.height>0){const s=new pb(a.height);return s.fromEquirectangularTexture(e,i),t.set(i,s),i.addEventListener("dispose",r),n(s.texture,i.mapping)}return null}}}return i},dispose:function(){t=new WeakMap}}}const AE=[.125,.215,.35,.446,.526,.582],ME=new OM,wE=new g_;let EE=null,CE=0,TE=0,RE=!1;const IE=new Cv;class PE{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,r=100,i={}){const{size:a=256,position:s=IE}=i;EE=this._renderer.getRenderTarget(),CE=this._renderer.getActiveCubeFace(),TE=this._renderer.getActiveMipmapLevel(),RE=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(a);const o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(e,n,r,o,s),t>0&&this._blur(o,0,0,t),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=FE(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=DE(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose(),null!==this._backgroundBox&&(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(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._ggxMaterial&&this._ggxMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodMeshes.length;e++)this._lodMeshes[e].geometry.dispose()}_cleanup(e){this._renderer.setRenderTarget(EE,CE,TE),this._renderer.xr.enabled=RE,e.scissorTest=!1,LE(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===um||e.mapping===dm?this._setSize(0===e.image.length?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),EE=this._renderer.getRenderTarget(),CE=this._renderer.getActiveCubeFace(),TE=this._renderer.getActiveMipmapLevel(),RE=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:xm,minFilter:xm,generateMipmaps:!1,type:Bm,format:zm,colorSpace:kg,depthBuffer:!1},r=BE(e,t,n);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=BE(e,t,n);const{_lodMax:r}=this;({lodMeshes:this._lodMeshes,sizeLods:this._sizeLods,sigmas:this._sigmas}=function(e){const t=[],n=[],r=[];let i=e;const a=e-4+1+AE.length;for(let s=0;s<a;s++){const a=Math.pow(2,i);t.push(a);let o=1/a;s>e-4?o=AE[s-e+4-1]:0===s&&(o=0),n.push(o);const l=1/(a-2),c=-l,u=1+l,d=[c,c,u,c,u,u,c,c,u,u,c,u],h=6,f=6,p=3,m=2,g=1,v=new Float32Array(p*f*h),y=new Float32Array(m*f*h),_=new Float32Array(g*f*h);for(let e=0;e<h;e++){const t=e%3*2/3-1,n=e>2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];v.set(r,p*f*e),y.set(d,m*f*e);const i=[e,e,e,e,e,e];_.set(i,g*f*e)}const b=new z_;b.setAttribute("position",new R_(v,p)),b.setAttribute("uv",new R_(y,m)),b.setAttribute("faceIndex",new R_(_,g)),r.push(new Z_(b,null)),i>4&&i--}return{lodMeshes:r,sizeLods:t,sigmas:n}}(r)),this._blurMaterial=function(e,t,n){const r=new Float32Array(20),i=new Cv(0,1,0);return new ab({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}(r,e,t),this._ggxMaterial=function(e,t,n){return new ab({name:"PMREMGGXConvolution",defines:{GGX_SAMPLES:256,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:'\n\n\t\t\tprecision highp float;\n\t\t\tprecision highp int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform float roughness;\n\t\t\tuniform float mipInt;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\t#define PI 3.14159265359\n\n\t\t\t// Van der Corput radical inverse\n\t\t\tfloat radicalInverse_VdC(uint bits) {\n\t\t\t\tbits = (bits << 16u) | (bits >> 16u);\n\t\t\t\tbits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u);\n\t\t\t\tbits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u);\n\t\t\t\tbits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u);\n\t\t\t\tbits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u);\n\t\t\t\treturn float(bits) * 2.3283064365386963e-10; // / 0x100000000\n\t\t\t}\n\n\t\t\t// Hammersley sequence\n\t\t\tvec2 hammersley(uint i, uint N) {\n\t\t\t\treturn vec2(float(i) / float(N), radicalInverse_VdC(i));\n\t\t\t}\n\n\t\t\t// GGX VNDF importance sampling (Eric Heitz 2018)\n\t\t\t// "Sampling the GGX Distribution of Visible Normals"\n\t\t\t// https://jcgt.org/published/0007/04/01/\n\t\t\tvec3 importanceSampleGGX_VNDF(vec2 Xi, vec3 V, float roughness) {\
26n\t\t\t\tfloat alpha = roughness * roughness;\n\n\t\t\t\t// Section 3.2: Transform view direction to hemisphere configuration\n\t\t\t\tvec3 Vh = normalize(vec3(alpha * V.x, alpha * V.y, V.z));\n\n\t\t\t\t// Section 4.1: Orthonormal basis\n\t\t\t\tfloat lensq = Vh.x * Vh.x + Vh.y * Vh.y;\n\t\t\t\tvec3 T1 = lensq > 0.0 ? vec3(-Vh.y, Vh.x, 0.0) / sqrt(lensq) : vec3(1.0, 0.0, 0.0);\n\t\t\t\tvec3 T2 = cross(Vh, T1);\n\n\t\t\t\t// Section 4.2: Parameterization of projected area\n\t\t\t\tfloat r = sqrt(Xi.x);\n\t\t\t\tfloat phi = 2.0 * PI * Xi.y;\n\t\t\t\tfloat t1 = r * cos(phi);\n\t\t\t\tfloat t2 = r * sin(phi);\n\t\t\t\tfloat s = 0.5 * (1.0 + Vh.z);\n\t\t\t\tt2 = (1.0 - s) * sqrt(1.0 - t1 * t1) + s * t2;\n\n\t\t\t\t// Section 4.3: Reprojection onto hemisphere\n\t\t\t\tvec3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * Vh;\n\n\t\t\t\t// Section 3.4: Transform back to ellipsoid configuration\n\t\t\t\treturn normalize(vec3(alpha * Nh.x, alpha * Nh.y, max(0.0, Nh.z)));\n\t\t\t}\n\n\t\t\tvoid main() {\n\t\t\t\tvec3 N = normalize(vOutputDirection);\n\t\t\t\tvec3 V = N; // Assume view direction equals normal for pre-filtering\n\n\t\t\t\tvec3 prefilteredColor = vec3(0.0);\n\t\t\t\tfloat totalWeight = 0.0;\n\n\t\t\t\t// For very low roughness, just sample the environment directly\n\t\t\t\tif (roughness < 0.001) {\n\t\t\t\t\tgl_FragColor = vec4(bilinearCubeUV(envMap, N, mipInt), 1.0);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Tangent space basis for VNDF sampling\n\t\t\t\tvec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);\n\t\t\t\tvec3 tangent = normalize(cross(up, N));\n\t\t\t\tvec3 bitangent = cross(N, tangent);\n\n\t\t\t\tfor(uint i = 0u; i < uint(GGX_SAMPLES); i++) {\n\t\t\t\t\tvec2 Xi = hammersley(i, uint(GGX_SAMPLES));\n\n\t\t\t\t\t// For PMREM, V = N, so in tangent space V is always (0, 0, 1)\n\t\t\t\t\tvec3 H_tangent = importanceSampleGGX_VNDF(Xi, vec3(0.0, 0.0, 1.0), roughness);\n\n\t\t\t\t\t// Transform H back to world space\n\t\t\t\t\tvec3 H = normalize(tangent * H_tangent.x + bitangent * H_tangent.y + N * H_tangent.z);\n\t\t\t\t\tvec3 L = normalize(2.0 * dot(V, H) * H - V);\n\n\t\t\t\t\tfloat NdotL = max(dot(N, L), 0.0);\n\n\t\t\t\t\tif(NdotL > 0.0) {\n\t\t\t\t\t\t// Sample environment at fixed mip level\n\t\t\t\t\t\t// VNDF importance sampling handles the distribution filtering\n\t\t\t\t\t\tvec3 sampleColor = bilinearCubeUV(envMap, L, mipInt);\n\n\t\t\t\t\t\t// Weight by NdotL for the split-sum approximation\n\t\t\t\t\t\t// VNDF PDF naturally accounts for the visible microfacet distribution\n\t\t\t\t\t\tprefilteredColor += sampleColor * NdotL;\n\t\t\t\t\t\ttotalWeight += NdotL;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (totalWeight > 0.0) {\n\t\t\t\t\tprefilteredColor = prefilteredColor / totalWeight;\n\t\t\t\t}\n\n\t\t\t\tgl_FragColor = vec4(prefilteredColor, 1.0);\n\t\t\t}\n\t\t',blending:0,depthTest:!1,depthWrite:!1})}(r,e,t)}return r}_compileMaterial(e){const t=new Z_(new z_,e);this._renderer.compile(t,ME)}_sceneToCubeUV(e,t,n,r,i){const a=new ub(90,1,t,n),s=[1,-1,1,1,1,1],o=[1,1,1,-1,-1,-1],l=this._renderer,c=l.autoClear,u=l.toneMapping;l.getClearColor(wE),l.toneMapping=0,l.autoClear=!1,l.state.buffers.depth.getReversed()&&(l.setRenderTarget(r),l.clearDepth(),l.setRenderTarget(null)),null===this._backgroundBox&&(this._backgroundBox=new Z_(new eb,new b_({name:"PMREM.Backgroun
26d",side:1,depthWrite:!1,depthTest:!1})));const d=this._backgroundBox,h=d.material;let f=!1;const p=e.background;p?p.isColor&&(h.color.copy(p),e.background=null,f=!0):(h.color.copy(wE),f=!0);for(let m=0;m<6;m++){const t=m%3;0===t?(a.up.set(0,s[m],0),a.position.set(i.x,i.y,i.z),a.lookAt(i.x+o[m],i.y,i.z)):1===t?(a.up.set(0,0,s[m]),a.position.set(i.x,i.y,i.z),a.lookAt(i.x,i.y+o[m],i.z)):(a.up.set(0,s[m],0),a.position.set(i.x,i.y,i.z),a.lookAt(i.x,i.y,i.z+o[m]));const n=this._cubeSize;LE(r,t*n,m>2?n:0,n,n),l.setRenderTarget(r),f&&l.render(d,a),l.render(e,a)}l.toneMapping=u,l.autoClear=c,e.background=p}_textureToCubeUV(e,t){const n=this._renderer,r=e.mapping===um||e.mapping===dm;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=FE()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=DE());const i=r?this._cubemapMaterial:this._equirectMaterial,a=this._lodMeshes[0];a.material=i,i.uniforms.envMap.value=e;const s=this._cubeSize;LE(t,0,0,3*s,2*s),n.setRenderTarget(t),n.render(a,ME)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;const r=this._lodMeshes.length;for(let i=1;i<r;i++)this._applyGGXFilter(e,i-1,i);t.autoClear=n}_applyGGXFilter(e,t,n){const r=this._renderer,i=this._pingPongRenderTarget,a=this._ggxMaterial,s=this._lodMeshes[n];s.material=a;const o=a.uniforms,l=n/(this._lodMeshes.length-1),c=t/(this._lodMeshes.length-1),u=Math.sqrt(l*l-c*c)*(0+1.25*l),{_lodMax:d}=this,h=this._sizeLods[n],f=3*h*(n>d-4?n-d+4:0),p=4*(this._cubeSize-h);o.envMap.value=e.texture,o.roughness.value=u,o.mipInt.value=d-t,LE(i,f,p,3*h,2*h),r.setRenderTarget(i),r.render(s,ME),o.envMap.value=i.texture,o.roughness.value=0,o.mipInt.value=d-n,LE(e,f,p,3*h,2*h),r.setRenderTarget(e),r.render(s,ME)}_blur(e,t,n,r,i){const a=this._pingPongRenderTarget;this._halfBlur(e,a,t,n,r,"latitudinal",i),this._halfBlur(a,e,n,n,r,"longitudinal",i)}_halfBlur(e,t,n,r,i,a,s){const o=this._renderer,l=this._blurMaterial;"latitudinal"!==a&&"longitudinal"!==a&&dv("blur direction must be either latitudinal or longitudinal!");const c=this._lodMeshes[r];c.material=l;const u=l.uniforms,d=this._sizeLods[n]-1,h=isFinite(i)?Math.PI/(2*d):2*Math.PI/39,f=i/h,p=isFinite(i)?1+Math.floor(3*f):20;p>20&&uv(`sigmaRadians, ${i}, is too large and will clip, as it requested ${p} samples when the maximum is set to 20`);const m=[];let g=0;for(let _=0;_<20;++_){const e=_/f,t=Math.exp(-e*e/2);m.push(t),0===_?g+=t:_<p&&(g+=2*t)}for(let _=0;_<m.length;_++)m[_]=m[_]/g;u.envMap.value=e.texture,u.samples.value=p,u.weights.value=m,u.latitudinal.value="latitudinal"===a,s&&(u.poleAxis.value=s);const{_lodMax:v}=this;u.dTheta.value=h,u.mipInt.value=v-n;const y=this._sizeLods[r];LE(t,3*y*(r>v-4?r-v+4:0),4*(this._cubeSize-y),3*y,2*y),o.setRenderTarget(t),o.render(c,ME)}}function BE(e,t,n){const r=new Yv(e,t,n);return r.texture.mapping=pm,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function LE(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function DE(){return new ab({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );
26\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function FE(){return new ab({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function NE(e){let t=new WeakMap,n=null;function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const a=i.mapping,s=a===hm||a===fm,o=a===um||a===dm;if(s||o){let a=t.get(i);const l=void 0!==a?a.texture.pmremVersion:0;if(i.isRenderTargetTexture&&i.pmremVersion!==l)return null===n&&(n=new PE(e)),a=s?n.fromEquirectangular(i,a):n.fromCubemap(i,a),a.texture.pmremVersion=i.pmremVersion,t.set(i,a),a.texture;if(void 0!==a)return a.texture;{const l=i.image;return s&&l&&l.height>0||o&&l&&function(e){let t=0;for(let n=0;n<6;n++)void 0!==e[n]&&t++;return 6===t}(l)?(null===n&&(n=new PE(e)),a=s?n.fromEquirectangular(i):n.fromCubemap(i),a.texture.pmremVersion=i.pmremVersion,t.set(i,a),i.addEventListener("dispose",r),a.texture):null}}}return i},dispose:function(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function UE(e){const t={};
vendor: 5,074 bytes, line 26
26function n(n){if(void 0!==t[n])return t[n];const r=e.getExtension(n);return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(){n("EXT_color_buffer_float"),n("WEBGL_clip_cull_distance"),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture"),n("WEBGL_render_shared_exponent")},get:function(e){const t=n(e);return null===t&&hv("WebGLRenderer: "+e+" extension not supported."),t}}}function OE(e,t,n,r){const i={},a=new WeakMap;function s(e){const o=e.target;null!==o.index&&t.remove(o.index);for(const n in o.attributes)t.remove(o.attributes[n]);o.removeEventListener("dispose",s),delete i[o.id];const l=a.get(o);l&&(t.remove(l),a.delete(o)),r.releaseStatesOfGeometry(o),!0===o.isInstancedBufferGeometry&&delete o._maxInstanceCount,n.memory.geometries--}function o(e){const n=[],r=e.index,i=e.attributes.position;let s=0;if(null!==r){const e=r.array;s=r.version;for(let t=0,r=e.length;t<r;t+=3){const r=e[t+0],i=e[t+1],a=e[t+2];n.push(r,i,i,a,a,r)}}else{if(void 0===i)return;{const e=i.array;s=i.version;for(let t=0,r=e.length/3-1;t<r;t+=3){const e=t+0,r=t+1,i=t+2;n.push(e,r,r,i,i,e)}}}const o=new(tv(n)?P_:I_)(n,1);o.version=s;const l=a.get(e);l&&t.remove(l),a.set(e,o)}return{get:function(e,t){return!0===i[t.id]||(t.addEventListener("dispose",s),i[t.id]=!0,n.memory.geometries++),t},update:function(n){const r=n.attributes;for(const i in r)t.update(r[i],e.ARRAY_BUFFER)},getWireframeAttribute:function(e){const t=a.get(e);if(t){const n=e.index;null!==n&&t.version<n.version&&o(e)}else o(e);return a.get(e)}}}function kE(e,t,n){let r,i,a;function s(t,s,o){0!==o&&(e.drawElementsInstanced(r,s,i,t*a,o),n.update(s,r,o))}this.setMode=function(e){r=e},this.setIndex=function(e){i=e.type,a=e.bytesPerElement},this.render=function(t,s){e.drawElements(r,s,i,t*a),n.update(s,r,1)},this.renderInstances=s,this.renderMultiDraw=function(e,a,s){if(0===s)return;t.get("WEBGL_multi_draw").multiDrawElementsWEBGL(r,a,0,i,e,0,s);let o=0;for(let t=0;t<s;t++)o+=a[t];n.update(o,r,1)},this.renderMultiDrawInstances=function(e,o,l,c){if(0===l)return;const u=t.get("WEBGL_multi_draw");if(null===u)for(let t=0;t<e.length;t++)s(e[t]/a,o[t],c[t]);else{u.multiDrawElementsInstancedWEBGL(r,o,0,i,e,0,c,0,l);let t=0;for(let e=0;e<l;e++)t+=o[e]*c[e];n.update(t,r,1)}}}function zE(e){const t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(n,r,i){switch(t.calls++,r){case e.TRIANGLES:t.triangles+=i*(n/3);break;case e.LINES:t.lines+=i*(n/2);break;case e.LINE_STRIP:t.lines+=i*(n-1);break;case e.LINE_LOOP:t.lines+=i*n;break;case e.POINTS:t.points+=i*n;break;default:dv("WebGLInfo: Unknown draw mode:",r)}}}}function HE(e,t,n){const r=new WeakMap,i=new Xv;return{update:function(a,s,o){const l=a.morphTargetInfluences,c=s.morphAttributes.position||s.morphAttributes.normal||s.morphAttributes.color,u=void 0!==c?c.length:0;let d=r.get(s);if(void 0===d||d.count!==u){void 0!==d&&d.texture.dispose();const h=void 0!==s.morphAttributes.position,f=void 0!==s.morphAttributes.normal,p=void 0!==s.morphAttributes.color,m=s.morphAttributes.position||[],g=s.morphAttributes.normal||[],v=s.morphAttributes.color||[];let y=0;!0===h&&(y=1),!0===f&&(y=2),!0===p&&(y=3);let _=s.attributes.position.count*y,b=1;_>t.maxTextureSize&&(b=Math.ceil(_/t.maxTextureSize),_=t.maxTextureSize);const x=new Float32Array(_*b*4*u),S=new Kv(x,_,b,u);S.type=Pm,S.needsUpdate=!0;const A=4*y;for(let w=0;w<u;w++){const E=m[w],C=g[w],T=v[w],R=_*b*4*w;for(let I=0;I<E.count;I++){const P=I*A;!0===h&&(i.fromBufferAttribute(E,I),x[R+P+0]=i.x,x[R+P+1]=i.y,x[R+P+2]=i.z,x[R+P+3]=0),!0===f&&(i.fromBufferAttribute(C,I),x[R+P+4]=i.x,x[R+P+5]=i.y,x[R+P+6]=i.z,x[R+P+7]=0),!0===p&&(i.fromBufferAttribute(T,I),x[R+P+8]=i.x,x[R+P+9]=i.y,x[R+P+10]=i.z,x[R+P+11]=4===T.itemSize?i.w:1)}}function M(){S.dispose(),r.delete(s),s.removeEventListener("dispose",M)}d={count:u,texture:S,size:new wv(_,b)},r.set(s,d),s.addEventListener("dispose",M)}if(!0===a.isInstancedMesh&&null!==a.morphTexture)o.getUniforms().setValue(e,"morphTexture",a.morphTexture,n);else{let B=0;for(let D=0;D<l.length;D++)B+=l[D];const L=s.morphTargetsRelative?1:1-B;o.getUniforms().setValue(e,"morphTargetBaseInfluence",L),o.getUniforms().setValue(e,"morphTargetInfluences",l)}o.getUniforms().setValue(e,"morphTargetsTexture",d.texture,n),o.getUniforms().setValue(e,"morphTargetsTextureSize",d.size)}}}function GE(e,t,n,r){let i=new WeakMap;function a(e){const t=e.target;t.removeEventListener("dispose",a),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(s){const o=r.render.frame,l=s.geometry,c=t.get(s,l);if(i.get(c)!==o&&(t.update(c),i.set(c,o)),s.isInstancedMesh&&(!1===s.hasEventListener("dispose",a)&&s.addEventListener("dispose",a),i.get(s)!==o&&(n.update(s.instanceMatrix,e.ARRAY_BUFFER),null!==s.instanceColor&&n.update(s.instanceColor,e.ARRAY_BUFFER),i.set(s,o))),s.isSkinnedMesh){const e=s.skeleton;
vendor: 6,920 bytes, line 26
26i.get(e)!==o&&(e.update(),i.set(e,o))}return c},dispose:function(){i=new WeakMap}}}const VE={[em]:"LINEAR_TONE_MAPPING",[tm]:"REINHARD_TONE_MAPPING",[nm]:"CINEON_TONE_MAPPING",[rm]:"ACES_FILMIC_TONE_MAPPING",[am]:"AGX_TONE_MAPPING",[sm]:"NEUTRAL_TONE_MAPPING",[im]:"CUSTOM_TONE_MAPPING"};function WE(e,t,n,r,i){const a=new Yv(t,n,{type:e,depthBuffer:r,stencilBuffer:i}),s=new Yv(t,n,{type:Bm,depthBuffer:!1,stencilBuffer:!1}),o=new z_;o.setAttribute("position",new B_([-1,3,0,-1,-1,0,3,-1,0],3)),o.setAttribute("uv",new B_([0,2,0,0,2,0],2));const l=new HA({uniforms:{tDiffuse:{value:null}},vertexShader:"\n\t\t\tprecision highp float;\n\n\t\t\tuniform mat4 modelViewMatrix;\n\t\t\tuniform mat4 projectionMatrix;\n\n\t\t\tattribute vec3 position;\n\t\t\tattribute vec2 uv;\n\n\t\t\tvarying vec2 vUv;\n\n\t\t\tvoid main() {\n\t\t\t\tvUv = uv;\n\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t}",fragmentShader:"\n\t\t\tprecision highp float;\n\n\t\t\tuniform sampler2D tDiffuse;\n\n\t\t\tvarying vec2 vUv;\n\n\t\t\t#include <tonemapping_pars_fragment>\n\t\t\t#include <colorspace_pars_fragment>\n\n\t\t\tvoid main() {\n\t\t\t\tgl_FragColor = texture2D( tDiffuse, vUv );\n\n\t\t\t\t#ifdef LINEAR_TONE_MAPPING\n\t\t\t\t\tgl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb );\n\t\t\t\t#elif defined( REINHARD_TONE_MAPPING )\n\t\t\t\t\tgl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb );\n\t\t\t\t#elif defined( CINEON_TONE_MAPPING )\n\t\t\t\t\tgl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb );\n\t\t\t\t#elif defined( ACES_FILMIC_TONE_MAPPING )\n\t\t\t\t\tgl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb );\n\t\t\t\t#elif defined( AGX_TONE_MAPPING )\n\t\t\t\t\tgl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb );\n\t\t\t\t#elif defined( NEUTRAL_TONE_MAPPING )\n\t\t\t\t\tgl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb );\n\t\t\t\t#elif defined( CUSTOM_TONE_MAPPING )\n\t\t\t\t\tgl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb );\n\t\t\t\t#endif\n\n\t\t\t\t#ifdef SRGB_TRANSFER\n\t\t\t\t\tgl_FragColor = sRGBTransferOETF( gl_FragColor );\n\t\t\t\t#endif\n\t\t\t}",depthTest:!1,depthWrite:!1}),c=new Z_(o,l),u=new OM(-1,1,1,-1,0,1);let d,h=null,f=null,p=!1,m=null,g=[],v=!1;this.setSize=function(e,t){a.setSize(e,t),s.setSize(e,t);for(let n=0;n<g.length;n++){const r=g[n];r.setSize&&r.setSize(e,t)}},this.setEffects=function(e){g=e,v=g.length>0&&!0===g[0].isRenderPass;const t=a.width,n=a.height;for(let r=0;r<g.length;r++){const e=g[r];e.setSize&&e.setSize(t,n)}},this.begin=function(e,t){if(p)return!1;if(0===e.toneMapping&&0===g.length)return!1;if(m=t,null!==t){const e=t.width,n=t.height;a.width===e&&a.height===n||this.setSize(e,n)}return!1===v&&e.setRenderTarget(a),d=e.toneMapping,e.toneMapping=0,!0},this.hasRenderPass=function(){return v},this.end=function(e,t){e.toneMapping=d,p=!0;let n=a,r=s;for(let i=0;i<g.length;i++){const a=g[i];if(!1!==a.enabled&&(a.render(e,r,n,t),!1!==a.needsSwap)){const e=n;n=r,r=e}}if(h!==e.outputColorSpace||f!==e.toneMapping){h=e.outputColorSpace,f=e.toneMapping,l.defines={},Fv.getTransfer(h)===Hg&&(l.defines.SRGB_TRANSFER="");const t=VE[f];t&&(l.defines[t]=""),l.needsUpdate=!0}l.uniforms.tDiffuse.value=n.texture,e.setRenderTarget(m),e.render(c,u),m=null,p=!1},this.isCompositing=function(){return p},this.dispose=function(){a.dispose(),s.dispose(),o.dispose(),l.dispose()}}const jE=new jv,XE=new hS(1,1),JE=new Kv,YE=new qv,KE=new fb,qE=[],QE=[],ZE=new Float32Array(16),$E=new Float32Array(9),eC=new Float32Array(4);function tC(e,t,n){const r=e[0];if(r<=0||r>0)return e;const i=t*n;let a=qE[i];if(void 0===a&&(a=new Float32Array(i),qE[i]=a),0!==t){r.toArray(a,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(a,i)}return a}function nC(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function rC(e,t){for(let n=0,r=t.length;n<r;n++)e[n]=t[n]}function iC(e,t){let n=QE[t];void 0===n&&(n=new Int32Array(t),QE[t]=n);for(let r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function aC(e,t){const n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function sC(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(nC(n,t))return;e.uniform2fv(this.addr,t),rC(n,t)}}function oC(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(nC(n,t))return;e.uniform3fv(this.addr,t),rC(n,t)}}function lC(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(nC(n,t))return;e.uniform4fv(this.addr,t),rC(n,t)}}function cC(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(nC(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),rC(n,t)}else{if(nC(n,r))return;eC.set(r),e.uniformMatrix2fv(this.addr,!1,eC),rC(n,r)}}function uC(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(nC(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),rC(n,t)}else{if(nC(n,r))return;$E.set(r),e.uniformMatrix3fv(this.addr,!1,$E),rC(n,r)}}function dC(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(nC(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),rC(n,t)}else{if(nC(n,r))return;ZE.set(r),e.uniformMatrix4fv(this.addr,!1,ZE),rC(n,r)}}function hC(e,t){const n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function fC(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2i(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(nC(n,t))return;e.uniform2iv(this.addr,t),rC(n,t)}}function pC(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3i(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(nC(n,t))return;e.uniform3iv(this.addr,t),rC(n,t)}}function mC(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4i(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(nC(n,t))return;e.uniform4iv(this.addr,t),rC(n,t)}}function gC(e,t){const n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function vC(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2ui(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(nC(n,t))return;e.uniform2uiv(this.addr,t),rC(n,t)}}function yC(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3ui(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(nC(n,t))return;e.uniform3uiv(this.addr,t),rC(n,t)}}function _C(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4ui(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(nC(n,t))return;e.uniform4uiv(this.addr,t),rC(n,t)}}
vendor: 4,967 bytes, line 26
26function bC(e,t,n){const r=this.cache,i=n.allocateTextureUnit();let a;r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),this.type===e.SAMPLER_2D_SHADOW?(XE.compareFunction=n.isReversedDepthBuffer()?Kg:Xg,a=XE):a=jE,n.setTexture2D(t||a,i)}function xC(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||YE,i)}function SC(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTextureCube(t||KE,i)}function AC(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||JE,i)}function MC(e,t){e.uniform1fv(this.addr,t)}function wC(e,t){const n=tC(t,this.size,2);e.uniform2fv(this.addr,n)}function EC(e,t){const n=tC(t,this.size,3);e.uniform3fv(this.addr,n)}function CC(e,t){const n=tC(t,this.size,4);e.uniform4fv(this.addr,n)}function TC(e,t){const n=tC(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function RC(e,t){const n=tC(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function IC(e,t){const n=tC(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function PC(e,t){e.uniform1iv(this.addr,t)}function BC(e,t){e.uniform2iv(this.addr,t)}function LC(e,t){e.uniform3iv(this.addr,t)}function DC(e,t){e.uniform4iv(this.addr,t)}function FC(e,t){e.uniform1uiv(this.addr,t)}function NC(e,t){e.uniform2uiv(this.addr,t)}function UC(e,t){e.uniform3uiv(this.addr,t)}function OC(e,t){e.uniform4uiv(this.addr,t)}function kC(e,t,n){const r=this.cache,i=t.length,a=iC(n,i);let s;nC(r,a)||(e.uniform1iv(this.addr,a),rC(r,a)),s=this.type===e.SAMPLER_2D_SHADOW?XE:jE;for(let o=0;o!==i;++o)n.setTexture2D(t[o]||s,a[o])}function zC(e,t,n){const r=this.cache,i=t.length,a=iC(n,i);nC(r,a)||(e.uniform1iv(this.addr,a),rC(r,a));for(let s=0;s!==i;++s)n.setTexture3D(t[s]||YE,a[s])}function HC(e,t,n){const r=this.cache,i=t.length,a=iC(n,i);nC(r,a)||(e.uniform1iv(this.addr,a),rC(r,a));for(let s=0;s!==i;++s)n.setTextureCube(t[s]||KE,a[s])}function GC(e,t,n){const r=this.cache,i=t.length,a=iC(n,i);nC(r,a)||(e.uniform1iv(this.addr,a),rC(r,a));for(let s=0;s!==i;++s)n.setTexture2DArray(t[s]||JE,a[s])}class VC{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=function(e){switch(e){case 5126:return aC;case 35664:return sC;case 35665:return oC;case 35666:return lC;case 35674:return cC;case 35675:return uC;case 35676:return dC;case 5124:case 35670:return hC;case 35667:case 35671:return fC;case 35668:case 35672:return pC;case 35669:case 35673:return mC;case 5125:return gC;case 36294:return vC;case 36295:return yC;case 36296:return _C;case 35678:case 36198:case 36298:case 36306:case 35682:return bC;case 35679:case 36299:case 36307:return xC;case 35680:case 36300:case 36308:case 36293:return SC;case 36289:case 36303:case 36311:case 36292:return AC}}(t.type)}}class WC{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=function(e){switch(e){case 5126:return MC;case 35664:return wC;case 35665:return EC;case 35666:return CC;case 35674:return TC;case 35675:return RC;case 35676:return IC;case 5124:case 35670:return PC;case 35667:case 35671:return BC;case 35668:case 35672:return LC;case 35669:case 35673:return DC;case 5125:return FC;case 36294:return NC;case 36295:return UC;case 36296:return OC;case 35678:case 36198:case 36298:case 36306:case 35682:return kC;case 35679:case 36299:case 36307:return zC;case 35680:case 36300:case 36308:case 36293:return HC;case 36289:case 36303:case 36311:case 36292:return GC}}(t.type)}}class jC{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){const r=this.seq;for(let i=0,a=r.length;i!==a;++i){const a=r[i];a.setValue(e,t[a.id],n)}}}const XC=/(\w+)(\])?(\[|\.)?/g;function JC(e,t){e.seq.push(t),e.map[t.id]=t}function YC(e,t,n){const r=e.name,i=r.length;for(XC.lastIndex=0;;){const a=XC.exec(r),s=XC.lastIndex;let o=a[1];const l="]"===a[2],c=a[3];if(l&&(o|=0),void 0===c||"["===c&&s+2===i){JC(n,void 0===c?new VC(o,e,t):new WC(o,e,t));break}{let e=n.map[o];void 0===e&&(e=new jC(o),JC(n,e)),n=e}}}class KC{constructor(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let a=0;a<n;++a){const n=e.getActiveUniform(t,a);YC(n,e.getUniformLocation(t,n.name),this)}const r=[],i=[];for(const a of this.seq)a.type===e.SAMPLER_2D_SHADOW||a.type===e.SAMPLER_CUBE_SHADOW||a.type===e.SAMPLER_2D_ARRAY_SHADOW?r.push(a):i.push(a);r.length>0&&(this.seq=r.concat(i))}setValue(e,t,n,r){const i=this.map[t];void 0!==i&&i.setValue(e,n,r)}setOptional(e,t,n){const r=t[n];void 0!==r&&this.setValue(e,n,r)}static upload(e,t,n,r){for(let i=0,a=t.length;i!==a;++i){const a=t[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(e,s.value,r)}}static seqWithValue(e,t){const n=[];for(let r=0,i=e.length;r!==i;++r){const i=e[r];i.id in t&&n.push(i)}return n}}function qC(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}let QC=0;const ZC=new Iv;
vendor: 4,565 bytes, line 26
26function $C(e,t,n){const r=e.getShaderParameter(t,e.COMPILE_STATUS),i=(e.getShaderInfoLog(t)||"").trim();if(r&&""===i)return"";const a=/ERROR: 0:(\d+)/.exec(i);if(a){const r=parseInt(a[1]);return n.toUpperCase()+"\n\n"+i+"\n\n"+function(e,t){const n=e.split("\n"),r=[],i=Math.max(t-6,0),a=Math.min(t+6,n.length);for(let s=i;s<a;s++){const e=s+1;r.push(`${e===t?">":" "} ${e}: ${n[s]}`)}return r.join("\n")}(e.getShaderSource(t),r)}return i}function eT(e,t){const n=function(e){Fv._getMatrix(ZC,Fv.workingColorSpace,e);const t=`mat3( ${ZC.elements.map(e=>e.toFixed(4))} )`;switch(Fv.getTransfer(e)){case zg:return[t,"LinearTransferOETF"];case Hg:return[t,"sRGBTransferOETF"];default:return uv("WebGLProgram: Unsupported color space: ",e),[t,"LinearTransferOETF"]}}(t);return[`vec4 ${e}( vec4 value ) {`,`\treturn ${n[1]}( vec4( value.rgb * ${n[0]}, value.a ) );`,"}"].join("\n")}const tT={[em]:"Linear",[tm]:"Reinhard",[nm]:"Cineon",[rm]:"ACESFilmic",[am]:"AgX",[sm]:"Neutral",[im]:"Custom"};function nT(e,t){const n=tT[t];return void 0===n?(uv("WebGLProgram: Unsupported toneMapping:",t),"vec3 "+e+"( vec3 color ) { return LinearToneMapping( color ); }"):"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}const rT=new Cv;function iT(e){return""!==e}function aT(e,t){const n=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function sT(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const oT=/^[ \t]*#include +<([\w\d./]+)>/gm;function lT(e){return e.replace(oT,uT)}const cT=new Map;function uT(e,t){let n=dE[t];if(void 0===n){const e=cT.get(t);if(void 0===e)throw new Error("Can not resolve #include <"+t+">");n=dE[e],uv('WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,e)}return lT(n)}const dT=/#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 hT(e){return e.replace(dT,fT)}function fT(e,t,n,r){let i="";for(let a=parseInt(t);a<parseInt(n);a++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+a+" ]").replace(/UNROLLED_LOOP_INDEX/g,a);return i}function pT(e){let t=`precision ${e.precision} float;\n\tprecision ${e.precision} int;\n\tprecision ${e.precision} sampler2D;\n\tprecision ${e.precision} samplerCube;\n\tprecision ${e.precision} sampler3D;\n\tprecision ${e.precision} sampler2DArray;\n\tprecision ${e.precision} sampler2DShadow;\n\tprecision ${e.precision} samplerCubeShadow;\n\tprecision ${e.precision} sampler2DArrayShadow;\n\tprecision ${e.precision} isampler2D;\n\tprecision ${e.precision} isampler3D;\n\tprecision ${e.precision} isamplerCube;\n\tprecision ${e.precision} isampler2DArray;\n\tprecision ${e.precision} usampler2D;\n\tprecision ${e.precision} usampler3D;\n\tprecision ${e.precision} usamplerCube;\n\tprecision ${e.precision} usampler2DArray;\n\t`;return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}const mT={[bp]:"SHADOWMAP_TYPE_PCF",[xp]:"SHADOWMAP_TYPE_VSM"},gT={[um]:"ENVMAP_TYPE_CUBE",[dm]:"ENVMAP_TYPE_CUBE",[pm]:"ENVMAP_TYPE_CUBE_UV"},vT={[dm]:"ENVMAP_MODE_REFRACTION"},yT={[Qp]:"ENVMAP_BLENDING_MULTIPLY",[Zp]:"ENVMAP_BLENDING_MIX",[$p]:"ENVMAP_BLENDING_ADD"};function _T(e,t,n,r){const i=e.getContext(),a=n.defines;let s=n.vertexShader,o=n.fragmentShader;const l=function(e){return mT[e.shadowMapType]||"SHADOWMAP_TYPE_BASIC"}(n),c=function(e){return!1===e.envMap?"ENVMAP_TYPE_CUBE":gT[e.envMapMode]||"ENVMAP_TYPE_CUBE"}(n),u=function(e){return!1===e.envMap?"ENVMAP_MODE_REFLECTION":vT[e.envMapMode]||"ENVMAP_MODE_REFLECTION"}(n),d=function(e){return!1===e.envMap?"ENVMAP_BLENDING_NONE":yT[e.combine]||"ENVMAP_BLENDING_NONE"}(n),h=function(e){const t=e.envMapCubeUVHeight;if(null===t)return null;const n=Math.log2(t)-2,r=1/t;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:r,max
vendor: 6,224 bytes, line 26
26Mip:n}}(n),f=function(e){return[e.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",e.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(iT).join("\n")}(n),p=function(e){const t=[];for(const n in e){const r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(a),m=i.createProgram();let g,v,y=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(g=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,p].filter(iT).join("\n"),g.length>0&&(g+="\n"),v=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,p].filter(iT).join("\n"),v.length>0&&(v+="\n")):(g=[pT(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,p,n.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.batchingColor?"#define USE_BATCHING_COLOR":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.instancingMorph?"#define USE_INSTANCING_MORPH":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",n.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","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH","\tuniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(iT).join("\n"),v=[pT(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,p,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alph
vendor: 4,251 bytes, line 26
26aToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+d:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.dispersion?"#define USE_DISPERSION":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor||n.batchingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",n.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",n.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==n.toneMapping?"#define TONE_MAPPING":"",0!==n.toneMapping?dE.tonemapping_pars_fragment:"",0!==n.toneMapping?nT("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",dE.colorspace_pars_fragment,eT("linearToOutputTexel",n.outputColorSpace),(Fv.getLuminanceCoefficients(rT),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${rT.x.toFixed(4)}, ${rT.y.toFixed(4)}, ${rT.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(iT).join("\n")),s=lT(s),s=aT(s,n),s=sT(s,n),o=lT(o),o=aT(o,n),o=sT(o,n),s=hT(s),o=hT(o),!0!==n.isRawShaderMaterial&&(y="#version 300 es\n",g=[f,"#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+g,v=["#define varying in",n.glslVersion===Zg?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===Zg?"":"#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("\n")+"\n"+v);const _=y+g+s,b=y+v+o,x=qC(i,i.VERTEX_SHADER,_),S=qC(i,i.FRAGMENT_SHADER,b);
vendor: 4,976 bytes, line 26
26function A(t){if(e.debug.checkShaderErrors){const n=i.getProgramInfoLog(m)||"",r=i.getShaderInfoLog(x)||"",a=i.getShaderInfoLog(S)||"",s=n.trim(),o=r.trim(),l=a.trim();let c=!0,u=!0;if(!1===i.getProgramParameter(m,i.LINK_STATUS))if(c=!1,"function"==typeof e.debug.onShaderError)e.debug.onShaderError(i,m,x,S);else{const e=$C(i,x,"vertex"),n=$C(i,S,"fragment");dv("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(m,i.VALIDATE_STATUS)+"\n\nMaterial Name: "+t.name+"\nMaterial Type: "+t.type+"\n\nProgram Info Log: "+s+"\n"+e+"\n"+n)}else""!==s?uv("WebGLProgram: Program Info Log:",s):""!==o&&""!==l||(u=!1);u&&(t.diagnostics={runnable:c,programLog:s,vertexShader:{log:o,prefix:g},fragmentShader:{log:l,prefix:v}})}i.deleteShader(x),i.deleteShader(S),M=new KC(i,m),w=function(e,t){const n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let i=0;i<r;i++){const r=e.getActiveAttrib(t,i),a=r.name;let s=1;r.type===e.FLOAT_MAT2&&(s=2),r.type===e.FLOAT_MAT3&&(s=3),r.type===e.FLOAT_MAT4&&(s=4),n[a]={type:r.type,location:e.getAttribLocation(t,a),locationSize:s}}return n}(i,m)}let M,w;i.attachShader(m,x),i.attachShader(m,S),void 0!==n.index0AttributeName?i.bindAttribLocation(m,0,n.index0AttributeName):!0===n.morphTargets&&i.bindAttribLocation(m,0,"position"),i.linkProgram(m),this.getUniforms=function(){return void 0===M&&A(this),M},this.getAttributes=function(){return void 0===w&&A(this),w};let E=!1===n.rendererExtensionParallelShaderCompile;return this.isReady=function(){return!1===E&&(E=i.getProgramParameter(m,37297)),E},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(m),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=QC++,this.cacheKey=t,this.usedTimes=1,this.program=m,this.vertexShader=x,this.fragmentShader=S,this}let bT=0;class xT{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,r=this._getShaderStage(t),i=this._getShaderStage(n),a=this._getShaderCacheForMaterial(e);return!1===a.has(r)&&(a.add(r),r.usedTimes++),!1===a.has(i)&&(a.add(i),i.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const n of t)n.usedTimes--,0===n.usedTimes&&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 void 0===n&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return void 0===n&&(n=new ST(e),t.set(e,n)),n}}class ST{constructor(e){this.id=bT++,this.code=e,this.usedTimes=0}}function AT(e,t,n,r,i,a,s){const o=new Fy,l=new xT,c=new Set,u=[],d=new Map,h=i.logarithmicDepthBuffer;let f=i.precision;const p={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 m(e){return c.add(e),0===e?"uv":`uv${e}`}return{getParameters:function(a,o,u,d,g){const v=d.fog,y=g.geometry,_=a.isMeshStandardMaterial?d.environment:null,b=(a.isMeshStandardMaterial?n:t).get(a.envMap||_),x=b&&b.mapping===pm?b.image.height:null,S=p[a.type];null!==a.precision&&(f=i.getMaxPrecision(a.precision),f!==a.precision&&uv("WebGLProgram.getParameters:",a.precision,"not supported, using",f,"instead."));const A=y.morphAttributes.position||y.morphAttributes.normal||y.morphAttributes.color,M=void 0!==A?A.length:0;let w,E,C,T,R=0;if(void 0!==y.morphAttributes.position&&(R=1),void 0!==y.morphAttributes.normal&&(R=2),void 0!==y.morphAttributes.color&&(R=3),S){const e=fE[S];w=e.vertexShader,E=e.fragmentShader}else w=a.vertexShader,E=a.fragmentShader,l.update(a),C=l.getVertexShaderID(a),T=l.getFragmentShaderID(a);const I=e.getRenderTarget(),P=e.state.buffers.depth.getReversed(),B=!0===g.isInstancedMesh,L=!0===g.isBatchedMesh,D=!!a.map,F=!!a.matcap,N=!!b,U=!!a.aoMap,O=!!a.lightMap,k=!!a.bumpMap,z=!!a.normalMap,H=!!a.displacementMap,G=!!a.emissiveMap,V=!!a.metalnessMap,W=!!a.roughnessMap,j=a.anisotropy>0,X=a.clearcoat>0,J=a.dispersion>0,Y=a.iridescence>0,K=a.sheen>0,q=a.transmission>0,Q=j&&!!a.anisotropyMap,Z=X&&!!a.clearcoatMap,$=X&&!!a.clearcoatNormalMap,ee=X&&!!a.clearcoatRoughnessMap,te=Y&&!!a.iridescenceMap,ne=Y&&!!a.iridescenceThicknessMap,re=K&&!!a.sheenColorMap,ie=K&&!!a.sheenRoughnessMap,ae=!!a.specularMap,se=!!a.specularColorMap,oe=!!a.specularIntensityMap,le=q&&!!a.transmissionMap,ce=q&&!!a.thicknessMap,ue=!!a.gradientMap,de=!!a.alphaMap,he=a.alphaTest>0,fe=!!a.alphaHash,pe=!!a.extensions;let me=0;
vendor: 16,651 bytes, line 26
26a.toneMapped&&(null!==I&&!0!==I.isXRRenderTarget||(me=e.toneMapping));const ge={shaderID:S,shaderType:a.type,shaderName:a.name,vertexShader:w,fragmentShader:E,defines:a.defines,customVertexShaderID:C,customFragmentShaderID:T,isRawShaderMaterial:!0===a.isRawShaderMaterial,glslVersion:a.glslVersion,precision:f,batching:L,batchingColor:L&&null!==g._colorsTexture,instancing:B,instancingColor:B&&null!==g.instanceColor,instancingMorph:B&&null!==g.morphTexture,outputColorSpace:null===I?e.outputColorSpace:!0===I.isXRRenderTarget?I.texture.colorSpace:kg,alphaToCoverage:!!a.alphaToCoverage,map:D,matcap:F,envMap:N,envMapMode:N&&b.mapping,envMapCubeUVHeight:x,aoMap:U,lightMap:O,bumpMap:k,normalMap:z,displacementMap:H,emissiveMap:G,normalMapObjectSpace:z&&1===a.normalMapType,normalMapTangentSpace:z&&0===a.normalMapType,metalnessMap:V,roughnessMap:W,anisotropy:j,anisotropyMap:Q,clearcoat:X,clearcoatMap:Z,clearcoatNormalMap:$,clearcoatRoughnessMap:ee,dispersion:J,iridescence:Y,iridescenceMap:te,iridescenceThicknessMap:ne,sheen:K,sheenColorMap:re,sheenRoughnessMap:ie,specularMap:ae,specularColorMap:se,specularIntensityMap:oe,transmission:q,transmissionMap:le,thicknessMap:ce,gradientMap:ue,opaque:!1===a.transparent&&1===a.blending&&!1===a.alphaToCoverage,alphaMap:de,alphaTest:he,alphaHash:fe,combine:a.combine,mapUv:D&&m(a.map.channel),aoMapUv:U&&m(a.aoMap.channel),lightMapUv:O&&m(a.lightMap.channel),bumpMapUv:k&&m(a.bumpMap.channel),normalMapUv:z&&m(a.normalMap.channel),displacementMapUv:H&&m(a.displacementMap.channel),emissiveMapUv:G&&m(a.emissiveMap.channel),metalnessMapUv:V&&m(a.metalnessMap.channel),roughnessMapUv:W&&m(a.roughnessMap.channel),anisotropyMapUv:Q&&m(a.anisotropyMap.channel),clearcoatMapUv:Z&&m(a.clearcoatMap.channel),clearcoatNormalMapUv:$&&m(a.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ee&&m(a.clearcoatRoughnessMap.channel),iridescenceMapUv:te&&m(a.iridescenceMap.channel),iridescenceThicknessMapUv:ne&&m(a.iridescenceThicknessMap.channel),sheenColorMapUv:re&&m(a.sheenColorMap.channel),sheenRoughnessMapUv:ie&&m(a.sheenRoughnessMap.channel),specularMapUv:ae&&m(a.specularMap.channel),specularColorMapUv:se&&m(a.specularColorMap.channel),specularIntensityMapUv:oe&&m(a.specularIntensityMap.channel),transmissionMapUv:le&&m(a.transmissionMap.channel),thicknessMapUv:ce&&m(a.thicknessMap.channel),alphaMapUv:de&&m(a.alphaMap.channel),vertexTangents:!!y.attributes.tangent&&(z||j),vertexColors:a.vertexColors,vertexAlphas:!0===a.vertexColors&&!!y.attributes.color&&4===y.attributes.color.itemSize,pointsUvs:!0===g.isPoints&&!!y.attributes.uv&&(D||de),fog:!!v,useFog:!0===a.fog,fogExp2:!!v&&v.isFogExp2,flatShading:!0===a.flatShading&&!1===a.wireframe,sizeAttenuation:!0===a.sizeAttenuation,logarithmicDepthBuffer:h,reversedDepthBuffer:P,skinning:!0===g.isSkinnedMesh,morphTargets:void 0!==y.morphAttributes.position,morphNormals:void 0!==y.morphAttributes.normal,morphColors:void 0!==y.morphAttributes.color,morphTargetsCount:M,morphTextureStride:R,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:s.numPlanes,numClipIntersection:s.numIntersection,dithering:a.dithering,shadowMapEnabled:e.shadowMap.enabled&&u.length>0,shadowMapType:e.shadowMap.type,toneMapping:me,decodeVideoTexture:D&&!0===a.map.isVideoTexture&&Fv.getTransfer(a.map.colorSpace)===Hg,decodeVideoTextureEmissive:G&&!0===a.emissiveMap.isVideoTexture&&Fv.getTransfer(a.emissiveMap.colorSpace)===Hg,premultipliedAlpha:a.premultipliedAlpha,doubleSided:2===a.side,flipSided:1===a.side,useDepthPacking:a.depthPacking>=0,depthPacking:a.depthPacking||0,index0AttributeName:a.index0AttributeName,extensionClipCullDistance:pe&&!0===a.extensions.clipCullDistance&&r.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(pe&&!0===a.extensions.multiDraw||L)&&r.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:a.customProgramCacheKey()};return ge.vertexUv1s=c.has(1),ge.vertexUv2s=c.has(2),ge.vertexUv3s=c.has(3),c.clear(),ge},getProgramCacheKey:function(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(function(e,t){e.push(t.precision),e.push(t.outputColorSpace),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.mapUv),e.push(t.alphaMapUv),e.push(t.lightMapUv),e.push(t.aoMapUv),e.push(t.bumpMapUv),e.push(t.normalMapUv),e.push(t.displacementMapUv),e.push(t.emissiveMapUv),e.push(t.metalnessMapUv),e.push(t.roughnessMapUv),e.push(t.anisotropyMapUv),e.push(t.clearcoatMapUv),e.push(t.clearcoatNormalMapUv),e.push(t.clearcoatRoughnessMapUv),e.push(t.iridescenceMapUv),e.push(t.iridescenceThicknessMapUv),e.push(t.sheenColorMapUv),e.push(t.sheenRoughnessMapUv),e.push(t.specularMapUv),e.push(t.specularColorMapUv),e.push(t.specularIntensityMapUv),e.push(t.transmissionMapUv),e.push(t.thicknessMapUv),e.push(t.combine),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.numLightProbes),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}(n,t),function(e,t){o.disableAll(),t.instancing&&o.enable(0),t.instancingColor&&o.enable(1),t.instancingMorph&&o.enable(2),t.matcap&&o.enable(3),t.envMap&&o.enable(4),t.normalMapObjectSpace&&o.enable(5),t.normalMapTangentSpace&&o.enable(6),t.clearcoat&&o.enable(7),t.iridescence&&o.enable(8),t.alphaTest&&o.enable(9),t.vertexColors&&o.enable(10),t.vertexAlphas&&o.enable(11),t.vertexUv1s&&o.enable(12),t.vertexUv2s&&o.enable(13),t.vertexUv3s&&o.enable(14),t.vertexTangents&&o.enable(15),t.anisotropy&&o.enable(16),t.alphaHash&&o.enable(17),t.batching&&o.enable(18),t.dispersion&&o.enable(19),t.batchingColor&&o.enable(20),t.gradientMap&&o.enable(21),e.push(o.mask),o.disableAll(),t.fog&&o.enable(0),t.useFog&&o.enable(1),t.flatShading&&o.enable(2),t.logarithmicDepthBuffer&&o.enable(3),t.reversedDepthBuffer&&o.enable(4),t.skinning&&o.enable(5),t.morphTargets&&o.enable(6),t.morphNormals&&o.enable(7),t.morphColors&&o.enable(8),t.premultipliedAlpha&&o.enable(9),t.shadowMapEnabled&&o.enable(10),t.doubleSided&&o.enable(11),t.flipSided&&o.enable(12),t.useDepthPacking&&o.enable(13),t.dithering&&o.enable(14),t.transmission&&o.enable(15),t.sheen&&o.enable(16),t.opaque&&o.enable(17),t.pointsUvs&&o.enable(18),t.decodeVideoTexture&&o.enable(19),t.decodeVideoTextureEmissive&&o.enable(20),t.alphaToCoverage&&o.enable(21),e.push(o.mask)}(n,t),n.push(e.outputColorSpace)),n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=p[e.type];let n;if(t){const e=fE[t];n=ib.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let r=d.get(n);return void 0!==r?++r.usedTimes:(r=new _T(e,n,t,a),u.push(r),d.set(n,r)),r},releaseProgram:function(e){if(0===--e.usedTimes){const t=u.indexOf(e);u[t]=u[u.length-1],u.pop(),d.delete(e.cacheKey),e.destroy()}},releaseShaderCache:function(e){l.remove(e)},programs:u,dispose:function(){l.dispose()}}}function MT(){let e=new WeakMap;return{has:function(t){return e.has(t)},get:function(t){let n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,r){e.get(t)[n]=r},dispose:function(){e=new WeakMap}}}function wT(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function ET(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function CT(){const e=[];let t=0;const n=[],r=[],i=[];function a(n,r,i,a,s,o){let l=e[t];return void 0===l?(l={id:n.id,object:n,geometry:r,material:i,groupOrder:a,renderOrder:n.renderOrder,z:s,group:o},e[t]=l):(l.id=n.id,l.object=n,l.geometry=r,l.material=i,l.groupOrder=a,l.renderOrder=n.renderOrder,l.z=s,l.group=o),t++,l}return{opaque:n,transmissive:r,transparent:i,init:function(){t=0,n.length=0,r.length=0,i.length=0},push:function(e,t,s,o,l,c){const u=a(e,t,s,o,l,c);s.transmission>0?r.push(u):!0===s.transparent?i.push(u):n.push(u)},unshift:function(e,t,s,o,l,c){const u=a(e,t,s,o,l,c);s.transmission>0?r.unshift(u):!0===s.transparent?i.unshift(u):n.unshift(u)},finish:function(){for(let n=t,r=e.length;n<r;n++){const t=e[n];if(null===t.id)break;t.id=null,t.object=null,t.geometry=null,t.material=null,t.group=null}},sort:function(e,t){n.length>1&&n.sort(e||wT),r.length>1&&r.sort(t||ET),i.length>1&&i.sort(t||ET)}}}function TT(){let e=new WeakMap;return{get:function(t,n){const r=e.get(t);let i;return void 0===r?(i=new CT,e.set(t,[i])):n>=r.length?(i=new CT,r.push(i)):i=r[n],i},dispose:function(){e=new WeakMap}}}function RT(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new Cv,color:new g_};break;case"SpotLight":n={position:new Cv,direction:new Cv,color:new g_,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new Cv,color:new g_,distance:0,decay:0};break;case"HemisphereLight":n={direction:new Cv,skyColor:new g_,groundColor:new g_};break;case"RectAreaLight":n={color:new g_,position:new Cv,halfWidth:new Cv,halfHeight:new Cv}}return e[t.id]=n,n}}}let IT=0;function PT(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function BT(e){const t=new RT,n=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new wv};break;case"PointLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new wv,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),r={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 o=0;o<9;o++)r.probe.push(new Cv);const i=new Cv,a=new My,s=new My;return{setup:function(i){let a=0,s=0,o=0;for(let e=0;e<9;e++)r.probe[e].set(0,0,0);let l=0,c=0,u=0,d=0,h=0,f=0,p=0,m=0,g=0,v=0,y=0;i.sort(PT);for(let e=0,b=i.length;e<b;e++){const _=i[e],b=_.color,x=_.intensity,S=_.distance;let A=null;if(_.shadow&&_.shadow.map&&(A=_.shadow.map.texture.format===jm?_.shadow.map.texture:_.shadow.map.depthTexture||_.shadow.map.texture),_.isAmbientLight)a+=b.r*x,s+=b.g*x,o+=b.b*x;else if(_.isLightProbe){for(let e=0;e<9;e++)r.probe[e].addScaledVector(_.sh.coefficients[e],x);y++}else if(_.isDirectionalLight){const e=t.get(_);if(e.color.copy(_.color).multiplyScalar(_.intensity),_.castShadow){const e=_.shadow,t=n.get(_);t.shadowIntensity=e.intensity,t.shadowBias=e.bias,t.shadowNormalBias=e.normalBias,t.shadowRadius=e.radius,t.shadowMapSize=e.mapSize,r.directionalShadow[l]=t,r.directionalShadowMap[l]=A,r.directionalShadowMatrix[l]=_.shadow.matrix,f++}r.directional[l]=e,l++}else if(_.isSpotLight){const e=t.get(_);e.position.setFromMatrixPosition(_.matrixWorld),e.color.copy(b).multiplyScalar(x),e.distance=S,e.coneCos=Math.cos(_.angle),e.penumbraCos=Math.cos(_.angle*(1-_.penumbra)),e.decay=_.decay,r.spot[u]=e;const i=_.shadow;if(_.map&&(r.spotLightMap[g]=_.map,g++,i.updateMatrices(_),_.castShadow&&v++),r.spotLightMatrix[u]=i.matrix,_.castShadow){const e=n.get(_);e.shadowIntensity=i.intensity,e.shadowBias=i.bias,e.shadowNormalBias=i.normalBias,e.shadowRadius=i.radius,e.shadowMapSize=i.mapSize,r.spotShadow[u]=e,r.spotShadowMap[u]=A,m++}u++}else if(_.isRectAreaLight){const e=t.get(_);e.color.copy(b).multiplyScalar(x),e.halfWidth.set(.5*_.width,0,0),e.halfHeight.set(0,.5*_.height,0),r.rectArea[d]=e,d++}else if(_.isPointLight){const e=t.get(_);if(e.color.copy(_.color).multiplyScalar(_.intensity),e.distance=_.distance,e.decay=_.decay,_.castShadow){const e=_.shadow,t=n.get(_);t.shadowIntensity=e.intensity,t.shadowBias=e.bias,t.shadowNormalBias=e.normalBias,t.shadowRadius=e.radius,t.shadowMapSize=e.mapSize,t.shadowCameraNear=e.camera.near,t.shadowCameraFar=e.camera.far,r.pointShadow[c]=t,r.pointShadowMap[c]=A,r.pointShadowMatrix[c]=_.shadow.matrix,p++}r.point[c]=e,c++}else if(_.isHemisphereLight){const e=t.get(_);e.skyColor.copy(_.color).multiplyScalar(x),e.groundColor.copy(_.groundColor).multiplyScalar(x),r.hemi[h]=e,h++}}d>0&&(!0===e.has("OES_texture_float_linear")?(r.rectAreaLTC1=hE.LTC_FLOAT_1,r.rectAreaLTC2=hE.LTC_FLOAT_2):(r.rectAreaLTC1=hE.LTC_HALF_1,r.rectAreaLTC2=hE.LTC_HALF_2)),r.ambient[0]=a,r.ambient[1]=s,r.ambient[2]=o;const _=r.hash;_.directionalLength===l&&_.pointLength===c&&_.spotLength===u&&_.rectAreaLength===d&&_.hemiLength===h&&_.numDirectionalShadows===f&&_.numPointShadows===p&&_.numSpotShadows===m&&_.numSpotMaps===g&&_.numLightProbes===y||(r.directional.length=l,r.spot.length=u,r.rectArea.length=d,r.point.length=c,r.hemi.length=h,r.directionalShadow.length=f,r.directionalShadowMap.length=f,r.pointShadow.length=p,r.pointShadowMap.length=p,r.spotShadow.length=m,r.spotShadowMap.length=m,r.directionalShadowMatrix.length=f,r.pointShadowMatrix.length=p,r.spotLightMatrix.length=m+g-v,r.spotLightMap.length=g,r.numSpotLightShadowsWithMaps=v,r.numLightProbes=y,_.directionalLength=l,_.pointLength=c,_.spotLength=u,_.rectAreaLength=d,_.hemiLength=h,_.numDirectionalShadows=f,_.numPointShadows=p,_.numSpotShadows=m,_.numSpotMaps=g,_.numLightProbes=y,r.version=IT++)},setupView:function(e,t){let n=0,o=0,l=0,c=0,u=0;const d=t.matrixWorldInverse;for(let h=0,f=e.length;h<f;h++){const t=e[h];if(t.isDirectionalLight){const e=r.directional[n];e.direction.setFromMatrixPosition(t.matrixWorld),i.setFromMatrixPosition(t.target.matrixWorld),e.direction.sub(i),e.direction.transformDirection(d),n++}else if(t.isSpotLight){const e=r.spot[l];e.position.setFromMatrixPosition(t.matrixWorld),e.position.applyMatrix4(d),e.direction.setFromMatrixPosition(t.matrixWorld),i.setFromMatrixPosition(t.target.matrixWorld),e.direction.sub(i),e.direction.transformDirection(d),l++}else if(t.isRectAreaLight){const e=r.rectArea[c];e.position.setFromMatrixPosition(t.matrixWorld),e.position.applyMatrix4(d),s.identity(),a.copy(t.matrixWorld),a.premultiply(d),s.extractRotation(a),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),e.halfWidth.applyMatrix4(s),e.halfHeight.applyMatrix4(s),c++}else if(t.isPointLight){const e=r.point[o];e.position.setFromMatrixPosition(t.matrixWorld),e.position.applyMatrix4(d),o++}else if(t.isHemisphereLight){const e=r.hemi[u];e.direction.setFromMatrixPosition(t.matrixWorld),e.direction.transformDirection(d),u++}}},state:r}}function LT(e){const t=new BT(e),n=[],r=[],i={lightsArray:n,shadowsArray:r,camera:null,lights:t,transmissionRenderTarget:{}};return{init:function(e){i.camera=e,n.length=0,r.length=0},state:i,setupLights:function(){t.setup(n)},setupLightsView:function(e){t.setupView(n,e)},pushLight:function(e){n.push(e)},pushShadow:function(e){r.push(e)}}}function DT(e){let t=new WeakMap;return{get:function(n,r=0){const i=t.get(n);let a;return void 0===i?(a=new LT(e),t.set(n,[a])):r>=i.length?(a=new LT(e),i.push(a)):a=i[r],a},dispose:function(){t=new WeakMap}}}const FT=[new Cv(1,0,0),new Cv(-1,0,0),new Cv(0,1,0),new Cv(0,-1,0),new Cv(0,0,1),new Cv(0,0,-1)],NT=[new Cv(0,-1,0),new Cv(0,-1,0),new Cv(0,0,1),new Cv(0,0,-1),new Cv(0,-1,0),new Cv(0,-1,0)],UT=new My,OT=new Cv,kT=new Cv;function zT(e,t,n){let r=new bx;const i=new wv,a=new wv,s=new Xv,o=new YA,l=new KA,c={},u=n.maxTextureSize,d={[Sp]:1,[Ap]:0,[Mp]:2}
vendor: 4,130 bytes, line 26
26,h=new ab({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new wv},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ).rg;\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ).r;\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) );\n\tgl_FragColor = vec4( mean, std_dev, 0.0, 1.0 );\n}"}),f=h.clone();f.defines.HORIZONTAL_PASS=1;const p=new z_;p.setAttribute("position",new R_(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const m=new Z_(p,h),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1;let v=this.type;function y(n,r){const a=t.update(m);h.defines.VSM_SAMPLES!==n.blurSamples&&(h.defines.VSM_SAMPLES=n.blurSamples,f.defines.VSM_SAMPLES=n.blurSamples,h.needsUpdate=!0,f.needsUpdate=!0),null===n.mapPass&&(n.mapPass=new Yv(i.x,i.y,{format:jm,type:Bm})),h.uniforms.shadow_pass.value=n.map.depthTexture,h.uniforms.resolution.value=n.mapSize,h.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,a,h,m,null),f.uniforms.shadow_pass.value=n.mapPass.texture,f.uniforms.resolution.value=n.mapSize,f.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,a,f,m,null)}function _(t,n,r,i){let a=null;const s=!0===r.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==s)a=s;else if(a=!0===r.isPointLight?l:o,e.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0||!0===n.alphaToCoverage){const e=a.uuid,t=n.uuid;let r=c[e];void 0===r&&(r={},c[e]=r);let i=r[t];void 0===i&&(i=a.clone(),r[t]=i,n.addEventListener("dispose",x)),a=i}return a.visible=n.visible,a.wireframe=n.wireframe,a.side=3===i?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:d[n.side],a.alphaMap=n.alphaMap,a.alphaTest=!0===n.alphaToCoverage?.5:n.alphaTest,a.map=n.map,a.clipShadows=n.clipShadows,a.clippingPlanes=n.clippingPlanes,a.clipIntersection=n.clipIntersection,a.displacementMap=n.displacementMap,a.displacementScale=n.displacementScale,a.displacementBias=n.displacementBias,a.wireframeLinewidth=n.wireframeLinewidth,a.linewidth=n.linewidth,!0===r.isPointLight&&!0===a.isMeshDistanceMaterial&&(e.properties.get(a).light=r),a}function b(n,i,a,s,o){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&3===o)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,n.matrixWorld);const r=t.update(n),l=n.material;if(Array.isArray(l)){const t=r.groups;for(let c=0,u=t.length;c<u;c++){const u=t[c],d=l[u.materialIndex];if(d&&d.visible){const t=_(n,d,s,o);n.onBeforeShadow(e,n,i,a,r,t,u),e.renderBufferDirect(a,null,r,t,n,u),n.onAfterShadow(e,n,i,a,r,t,u)}}}else if(l.visible){const t=_(n,l,s,o);n.onBeforeShadow(e,n,i,a,r,t,null),e.renderBufferDirect(a,null,r,t,n,null),n.onAfterShadow(e,n,i,a,r,t,null)}}const l=n.children;for(let e=0,t=l.length;e<t;e++)b(l[e],i,a,s,o)}function x(e){e.target.removeEventListener("dispose",x);for(const t in c){const n=c[t],r=e.target.uuid;
vendor: 5,409 bytes, line 26
26r in n&&(n[r].dispose(),delete n[r])}}this.render=function(t,n,o){if(!1===g.enabled)return;if(!1===g.autoUpdate&&!1===g.needsUpdate)return;if(0===t.length)return;2===t.type&&(uv("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."),t.type=1);const l=e.getRenderTarget(),c=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),h=e.state;h.setBlending(0),!0===h.buffers.depth.getReversed()?h.buffers.color.setClear(0,0,0,0):h.buffers.color.setClear(1,1,1,1),h.buffers.depth.setTest(!0),h.setScissorTest(!1);const f=v!==this.type;f&&n.traverse(function(e){e.material&&(Array.isArray(e.material)?e.material.forEach(e=>e.needsUpdate=!0):e.material.needsUpdate=!0)});for(let p=0,m=t.length;p<m;p++){const l=t[p],c=l.shadow;if(void 0===c){uv("WebGLShadowMap:",l,"has no shadow.");continue}if(!1===c.autoUpdate&&!1===c.needsUpdate)continue;i.copy(c.mapSize);const d=c.getFrameExtents();if(i.multiply(d),a.copy(c.mapSize),(i.x>u||i.y>u)&&(i.x>u&&(a.x=Math.floor(u/d.x),i.x=a.x*d.x,c.mapSize.x=a.x),i.y>u&&(a.y=Math.floor(u/d.y),i.y=a.y*d.y,c.mapSize.y=a.y)),null===c.map||!0===f){if(null!==c.map&&(null!==c.map.depthTexture&&(c.map.depthTexture.dispose(),c.map.depthTexture=null),c.map.dispose()),3===this.type){if(l.isPointLight){uv("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");continue}c.map=new Yv(i.x,i.y,{format:jm,type:Bm,minFilter:xm,magFilter:xm,generateMipmaps:!1}),c.map.texture.name=l.name+".shadowMap",c.map.depthTexture=new hS(i.x,i.y,Pm),c.map.depthTexture.name=l.name+".shadowMapDepth",c.map.depthTexture.format=Hm,c.map.depthTexture.compareFunction=null,c.map.depthTexture.minFilter=ym,c.map.depthTexture.magFilter=ym}else{l.isPointLight?(c.map=new pb(i.x),c.map.depthTexture=new fS(i.x,Im)):(c.map=new Yv(i.x,i.y),c.map.depthTexture=new hS(i.x,i.y,Im)),c.map.depthTexture.name=l.name+".shadowMap",c.map.depthTexture.format=Hm;const t=e.state.buffers.depth.getReversed();1===this.type?(c.map.depthTexture.compareFunction=t?Kg:Xg,c.map.depthTexture.minFilter=xm,c.map.depthTexture.magFilter=xm):(c.map.depthTexture.compareFunction=null,c.map.depthTexture.minFilter=ym,c.map.depthTexture.magFilter=ym)}c.camera.updateProjectionMatrix()}const m=c.map.isWebGLCubeRenderTarget?6:1;for(let t=0;t<m;t++){if(c.map.isWebGLCubeRenderTarget)e.setRenderTarget(c.map,t),e.clear();else{0===t&&(e.setRenderTarget(c.map),e.clear());const n=c.getViewport(t);s.set(a.x*n.x,a.y*n.y,a.x*n.z,a.y*n.w),h.viewport(s)}if(l.isPointLight){const e=c.camera,n=c.matrix,r=l.distance||e.far;r!==e.far&&(e.far=r,e.updateProjectionMatrix()),OT.setFromMatrixPosition(l.matrixWorld),e.position.copy(OT),kT.copy(e.position),kT.add(FT[t]),e.up.copy(NT[t]),e.lookAt(kT),e.updateMatrixWorld(),n.makeTranslation(-OT.x,-OT.y,-OT.z),UT.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),c._frustum.setFromProjectionMatrix(UT,e.coordinateSystem,e.reversedDepth)}else c.updateMatrices(l);r=c.getFrustum(),b(n,o,c.camera,l,this.type)}!0!==c.isPointLightShadow&&3===this.type&&y(c,o),c.needsUpdate=!1}v=this.type,g.needsUpdate=!1,e.setRenderTarget(l,c,d)}}const HT={[Vp]:1,[jp]:6,[Jp]:7,[Xp]:5,[Wp]:0,[Kp]:2,[qp]:4,[Yp]:3};function GT(e,t){const n=new function(){let t=!1;const n=new Xv;let r=null;const i=new Xv(0,0,0,0);return{setMask:function(n){r===n||t||(e.colorMask(n,n,n,n),r=n)},setLocked:function(e){t=e},setClear:function(t,r,a,s,o){!0===o&&(t*=s,r*=s,a*=s),n.set(t,r,a,s),!1===i.equals(n)&&(e.clearColor(t,r,a,s),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}},r=new function(){let n=!1,r=!1,i=null,a=null,s=null;return{setReversed:function(e){if(r!==e){const n=t.get("EXT_clip_control");e?n.clipControlEXT(n.LOWER_LEFT_EXT,n.ZERO_TO_ONE_EXT):n.clipControlEXT(n.LOWER_LEFT_EXT,n.NEGATIVE_ONE_TO_ONE_EXT),r=e;const i=s;s=null,this.setClear(i)}},getReversed:function(){return r},setTest:function(t){t?z(e.DEPTH_TEST):H(e.DEPTH_TEST)},setMask:function(t){i===t||n||(e.depthMask(t),i=t)},setFunc:function(t){if(r&&(t=HT[t]),a!==t){switch(t){case 0:e.depthFunc(e.NEVER);break;case 1:e.depthFunc(e.ALWAYS);break;case 2:e.depthFunc(e.LESS);break;case 3:default:e.depthFunc(e.LEQUAL);break;case 4:e.depthFunc(e.EQUAL);break;case 5:e.depthFunc(e.GEQUAL);break;case 6:e.depthFunc(e.GREATER);break;case 7:e.depthFunc(e.NOTEQUAL)}a=t}},setLocked:function(e){n=e},setClear:function(t){s!==t&&(r&&(t=1-t),e.clearDepth(t),s=t)},reset:function(){n=!1,i=null,a=null,s=null,r=!1}}},i=new function(){let t=!1,n=null,r=null,i=null,a=null,s=null,o=null,l=null,c=null;return{setTest:function(n){t||(n?z(e.STENCIL_TEST):H(e.STENCIL_TEST))},setMask:function(r){n===r||t||(e.stencilMask(r),n=r)},setFunc:function(t,n,s){r===t&&i===n&&a===s||(e.stencilFunc(t,n,s),r=t,i=n,a=s)},setOp:function(t,n,r){s===t&&o===n&&l===r||(e.stencilOp(t,n,r),s=t,o=n,l=r)},setLocked:function(e){t=e},setClear:function(t){c!==t&&(e.clearStencil(t),c=t)},reset:function(){t=!1,n=null,r=null,i=null,a=null,s=null,o=null,l=null,c=null}}},a=new WeakMap,s=new WeakMap;let o={},l={},c=new WeakMap,u=[],d=null,h=!1,f=null,p=null,m=null,g=null,v=null,y=null,_=null,b=new g_(0,0,0),x=0,S=!1,A=null,M=null,w=null,E=null,C=null;const T=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let R=!1,I=0;const P=e.getParameter(e.VERSION);-1!==P.indexOf("WebGL")?(I=parseFloat(/^WebGL (\d)/.exec(P)[1]),R=I>=1):-1!==P.indexOf("OpenGL ES")&&(I=parseFloat(/^OpenGL ES (\d)/.exec(P)[1]),R=I>=2);
vendor: 2,640 bytes, line 26
26let B=null,L={};const D=e.getParameter(e.SCISSOR_BOX),F=e.getParameter(e.VIEWPORT),N=(new Xv).fromArray(D),U=(new Xv).fromArray(F);function O(t,n,r,i){const a=new Uint8Array(4),s=e.createTexture();e.bindTexture(t,s),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let o=0;o<r;o++)t===e.TEXTURE_3D||t===e.TEXTURE_2D_ARRAY?e.texImage3D(n,0,e.RGBA,1,1,i,0,e.RGBA,e.UNSIGNED_BYTE,a):e.texImage2D(n+o,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,a);return s}const k={};function z(t){!0!==o[t]&&(e.enable(t),o[t]=!0)}function H(t){!1!==o[t]&&(e.disable(t),o[t]=!1)}k[e.TEXTURE_2D]=O(e.TEXTURE_2D,e.TEXTURE_2D,1),k[e.TEXTURE_CUBE_MAP]=O(e.TEXTURE_CUBE_MAP,e.TEXTURE_CUBE_MAP_POSITIVE_X,6),k[e.TEXTURE_2D_ARRAY]=O(e.TEXTURE_2D_ARRAY,e.TEXTURE_2D_ARRAY,1,1),k[e.TEXTURE_3D]=O(e.TEXTURE_3D,e.TEXTURE_3D,1,1),n.setClear(0,0,0,1),r.setClear(1),i.setClear(0),z(e.DEPTH_TEST),r.setFunc(3),j(!1),X(1),z(e.CULL_FACE),W(0);const G={[wp]:e.FUNC_ADD,[Ep]:e.FUNC_SUBTRACT,[Cp]:e.FUNC_REVERSE_SUBTRACT};G[103]=e.MIN,G[104]=e.MAX;const V={[Tp]:e.ZERO,[Rp]:e.ONE,[Ip]:e.SRC_COLOR,[Bp]:e.SRC_ALPHA,[Op]:e.SRC_ALPHA_SATURATE,[Np]:e.DST_COLOR,[Dp]:e.DST_ALPHA,[Pp]:e.ONE_MINUS_SRC_COLOR,[Lp]:e.ONE_MINUS_SRC_ALPHA,[Up]:e.ONE_MINUS_DST_COLOR,[Fp]:e.ONE_MINUS_DST_ALPHA,[kp]:e.CONSTANT_COLOR,[zp]:e.ONE_MINUS_CONSTANT_COLOR,[Hp]:e.CONSTANT_ALPHA,[Gp]:e.ONE_MINUS_CONSTANT_ALPHA};function W(t,n,r,i,a,s,o,l,c,u){if(0!==t){if(!1===h&&(z(e.BLEND),h=!0),5===t)a=a||n,s=s||r,o=o||i,n===p&&a===v||(e.blendEquationSeparate(G[n],G[a]),p=n,v=a),r===m&&i===g&&s===y&&o===_||(e.blendFuncSeparate(V[r],V[i],V[s],V[o]),m=r,g=i,y=s,_=o),!1!==l.equals(b)&&c===x||(e.blendColor(l.r,l.g,l.b,c),b.copy(l),x=c),f=t,S=!1;else if(t!==f||u!==S){if(p===wp&&v===wp||(e.blendEquation(e.FUNC_ADD),p=wp,v=wp),u)switch(t){case 1:e.blendFuncSeparate(e.ONE,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case 2:e.blendFunc(e.ONE,e.ONE);break;case 3:e.blendFuncSeparate(e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ZERO,e.ONE);break;case 4:e.blendFuncSeparate(e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ZERO,e.ONE);break;default:dv("WebGLState: Invalid blending: ",t)}else switch(t){case 1:e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case 2:e.blendFuncSeparate(e.SRC_ALPHA,e.ONE,e.ONE,e.ONE);break;case 3:dv("WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case 4:dv("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:dv("WebGLState: Invalid blending: ",t)}m=null,g=null,y=null,_=null,b.set(0,0,0),x=0,f=t,S=u}}else!0===h&&(H(e.BLEND),h=!1)}
vendor: 4,609 bytes, line 26
26function j(t){A!==t&&(t?e.frontFace(e.CW):e.frontFace(e.CCW),A=t)}function X(t){0!==t?(z(e.CULL_FACE),t!==M&&(1===t?e.cullFace(e.BACK):2===t?e.cullFace(e.FRONT):e.cullFace(e.FRONT_AND_BACK))):H(e.CULL_FACE),M=t}function J(t,n,r){t?(z(e.POLYGON_OFFSET_FILL),E===n&&C===r||(e.polygonOffset(n,r),E=n,C=r)):H(e.POLYGON_OFFSET_FILL)}return{buffers:{color:n,depth:r,stencil:i},enable:z,disable:H,bindFramebuffer:function(t,n){return l[t]!==n&&(e.bindFramebuffer(t,n),l[t]=n,t===e.DRAW_FRAMEBUFFER&&(l[e.FRAMEBUFFER]=n),t===e.FRAMEBUFFER&&(l[e.DRAW_FRAMEBUFFER]=n),!0)},drawBuffers:function(t,n){let r=u,i=!1;if(t){r=c.get(n),void 0===r&&(r=[],c.set(n,r));const a=t.textures;if(r.length!==a.length||r[0]!==e.COLOR_ATTACHMENT0){for(let t=0,n=a.length;t<n;t++)r[t]=e.COLOR_ATTACHMENT0+t;r.length=a.length,i=!0}}else r[0]!==e.BACK&&(r[0]=e.BACK,i=!0);i&&e.drawBuffers(r)},useProgram:function(t){return d!==t&&(e.useProgram(t),d=t,!0)},setBlending:W,setMaterial:function(t,a){2===t.side?H(e.CULL_FACE):z(e.CULL_FACE);let s=1===t.side;a&&(s=!s),j(s),1===t.blending&&!1===t.transparent?W(0):W(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.blendColor,t.blendAlpha,t.premultipliedAlpha),r.setFunc(t.depthFunc),r.setTest(t.depthTest),r.setMask(t.depthWrite),n.setMask(t.colorWrite);const o=t.stencilWrite;i.setTest(o),o&&(i.setMask(t.stencilWriteMask),i.setFunc(t.stencilFunc,t.stencilRef,t.stencilFuncMask),i.setOp(t.stencilFail,t.stencilZFail,t.stencilZPass)),J(t.polygonOffset,t.polygonOffsetFactor,t.polygonOffsetUnits),!0===t.alphaToCoverage?z(e.SAMPLE_ALPHA_TO_COVERAGE):H(e.SAMPLE_ALPHA_TO_COVERAGE)},setFlipSided:j,setCullFace:X,setLineWidth:function(t){t!==w&&(R&&e.lineWidth(t),w=t)},setPolygonOffset:J,setScissorTest:function(t){t?z(e.SCISSOR_TEST):H(e.SCISSOR_TEST)},activeTexture:function(t){void 0===t&&(t=e.TEXTURE0+T-1),B!==t&&(e.activeTexture(t),B=t)},bindTexture:function(t,n,r){void 0===r&&(r=null===B?e.TEXTURE0+T-1:B);let i=L[r];void 0===i&&(i={type:void 0,texture:void 0},L[r]=i),i.type===t&&i.texture===n||(B!==r&&(e.activeTexture(r),B=r),e.bindTexture(t,n||k[t]),i.type=t,i.texture=n)},unbindTexture:function(){const t=L[B];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D(...arguments)}catch(WL){dv("WebGLState:",WL)}},compressedTexImage3D:function(){try{e.compressedTexImage3D(...arguments)}catch(WL){dv("WebGLState:",WL)}},texImage2D:function(){try{e.texImage2D(...arguments)}catch(WL){dv("WebGLState:",WL)}},texImage3D:function(){try{e.texImage3D(...arguments)}catch(WL){dv("WebGLState:",WL)}},updateUBOMapping:function(t,n){let r=s.get(n);void 0===r&&(r=new WeakMap,s.set(n,r));let i=r.get(t);void 0===i&&(i=e.getUniformBlockIndex(n,t.name),r.set(t,i))},uniformBlockBinding:function(t,n){const r=s.get(n).get(t);a.get(n)!==r&&(e.uniformBlockBinding(n,r,t.__bindingPointIndex),a.set(n,r))},texStorage2D:function(){try{e.texStorage2D(...arguments)}catch(WL){dv("WebGLState:",WL)}},texStorage3D:function(){try{e.texStorage3D(...arguments)}catch(WL){dv("WebGLState:",WL)}},texSubImage2D:function(){try{e.texSubImage2D(...arguments)}catch(WL){dv("WebGLState:",WL)}},texSubImage3D:function(){try{e.texSubImage3D(...arguments)}catch(WL){dv("WebGLState:",WL)}},compressedTexSubImage2D:function(){try{e.compressedTexSubImage2D(...arguments)}catch(WL){dv("WebGLState:",WL)}},compressedTexSubImage3D:function(){try{e.compressedTexSubImage3D(...arguments)}catch(WL){dv("WebGLState:",WL)}},scissor:function(t){!1===N.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),N.copy(t))},viewport:function(t){!1===U.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),U.copy(t))},reset:function(){e.disable(e.BLEND),e.disable(e.CULL_FACE),e.disable(e.DEPTH_TEST),e.disable(e.POLYGON_OFFSET_FILL),e.disable(e.SCISSOR_TEST),e.disable(e.STENCIL_TEST),e.disable(e.SAMPLE_ALPHA_TO_COVERAGE),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ZERO),e.blendFuncSeparate(e.ONE,e.ZERO,e.ONE,e.ZERO),e.blendColor(0,0,0,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(e.LESS),r.setReversed(!1),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(e.ALWAYS,0,4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),e.clearStencil(0),e.cullFace(e.BACK),e.frontFace(e.CCW),e.polygonOffset(0,0),e.activeTexture(e.TEXTURE0),e.bindFramebuffer(e.FRAMEBUFFER,null),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),e.bindFramebuffer(e.READ_FRAMEBUFFER,null),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),o={}
vendor: 36,183 bytes, line 26
26,B=null,L={},l={},c=new WeakMap,u=[],d=null,h=!1,f=null,p=null,m=null,g=null,v=null,y=null,_=null,b=new g_(0,0,0),x=0,S=!1,A=null,M=null,w=null,E=null,C=null,N.set(0,0,e.canvas.width,e.canvas.height),U.set(0,0,e.canvas.width,e.canvas.height),n.reset(),r.reset(),i.reset()}}}function VT(e,t,n,r,i,a,s){const o=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,l="undefined"!=typeof navigator&&/OculusBrowser/g.test(navigator.userAgent),c=new wv,u=new WeakMap;let d;const h=new WeakMap;let f=!1;try{f="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(jL){}function p(e,t){return f?new OffscreenCanvas(e,t):av("canvas")}function m(e,t,n){let r=1;const i=V(e);if((i.width>n||i.height>n)&&(r=n/Math.max(i.width,i.height)),r<1){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof VideoFrame&&e instanceof VideoFrame){const n=Math.floor(r*i.width),a=Math.floor(r*i.height);void 0===d&&(d=p(n,a));const s=t?p(n,a):d;return s.width=n,s.height=a,s.getContext("2d").drawImage(e,0,0,n,a),uv("WebGLRenderer: Texture has been resized from ("+i.width+"x"+i.height+") to ("+n+"x"+a+")."),s}return"data"in e&&uv("WebGLRenderer: Image in DataTexture is too big ("+i.width+"x"+i.height+")."),e}return e}function g(e){return e.generateMipmaps}function v(t){e.generateMipmap(t)}function y(t){return t.isWebGLCubeRenderTarget?e.TEXTURE_CUBE_MAP:t.isWebGL3DRenderTarget?e.TEXTURE_3D:t.isWebGLArrayRenderTarget||t.isCompressedArrayTexture?e.TEXTURE_2D_ARRAY:e.TEXTURE_2D}function _(n,r,i,a,s=!1){if(null!==n){if(void 0!==e[n])return e[n];uv("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let o=r;if(r===e.RED&&(i===e.FLOAT&&(o=e.R32F),i===e.HALF_FLOAT&&(o=e.R16F),i===e.UNSIGNED_BYTE&&(o=e.R8)),r===e.RED_INTEGER&&(i===e.UNSIGNED_BYTE&&(o=e.R8UI),i===e.UNSIGNED_SHORT&&(o=e.R16UI),i===e.UNSIGNED_INT&&(o=e.R32UI),i===e.BYTE&&(o=e.R8I),i===e.SHORT&&(o=e.R16I),i===e.INT&&(o=e.R32I)),r===e.RG&&(i===e.FLOAT&&(o=e.RG32F),i===e.HALF_FLOAT&&(o=e.RG16F),i===e.UNSIGNED_BYTE&&(o=e.RG8)),r===e.RG_INTEGER&&(i===e.UNSIGNED_BYTE&&(o=e.RG8UI),i===e.UNSIGNED_SHORT&&(o=e.RG16UI),i===e.UNSIGNED_INT&&(o=e.RG32UI),i===e.BYTE&&(o=e.RG8I),i===e.SHORT&&(o=e.RG16I),i===e.INT&&(o=e.RG32I)),r===e.RGB_INTEGER&&(i===e.UNSIGNED_BYTE&&(o=e.RGB8UI),i===e.UNSIGNED_SHORT&&(o=e.RGB16UI),i===e.UNSIGNED_INT&&(o=e.RGB32UI),i===e.BYTE&&(o=e.RGB8I),i===e.SHORT&&(o=e.RGB16I),i===e.INT&&(o=e.RGB32I)),r===e.RGBA_INTEGER&&(i===e.UNSIGNED_BYTE&&(o=e.RGBA8UI),i===e.UNSIGNED_SHORT&&(o=e.RGBA16UI),i===e.UNSIGNED_INT&&(o=e.RGBA32UI),i===e.BYTE&&(o=e.RGBA8I),i===e.SHORT&&(o=e.RGBA16I),i===e.INT&&(o=e.RGBA32I)),r===e.RGB&&(i===e.UNSIGNED_INT_5_9_9_9_REV&&(o=e.RGB9_E5),i===e.UNSIGNED_INT_10F_11F_11F_REV&&(o=e.R11F_G11F_B10F)),r===e.RGBA){const t=s?zg:Fv.getTransfer(a);i===e.FLOAT&&(o=e.RGBA32F),i===e.HALF_FLOAT&&(o=e.RGBA16F),i===e.UNSIGNED_BYTE&&(o=t===Hg?e.SRGB8_ALPHA8:e.RGBA8),i===e.UNSIGNED_SHORT_4_4_4_4&&(o=e.RGBA4),i===e.UNSIGNED_SHORT_5_5_5_1&&(o=e.RGB5_A1)}return o!==e.R16F&&o!==e.R32F&&o!==e.RG16F&&o!==e.RG32F&&o!==e.RGBA16F&&o!==e.RGBA32F||t.get("EXT_color_buffer_float"),o}function b(t,n){let r;return t?null===n||n===Im||n===Fm?r=e.DEPTH24_STENCIL8:n===Pm?r=e.DEPTH32F_STENCIL8:n===Tm&&(r=e.DEPTH24_STENCIL8,uv("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===n||n===Im||n===Fm?r=e.DEPTH_COMPONENT24:n===Pm?r=e.DEPTH_COMPONENT32F:n===Tm&&(r=e.DEPTH_COMPONENT16),r}function x(e,t){return!0===g(e)||e.isFramebufferTexture&&e.minFilter!==ym&&e.minFilter!==xm?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function S(e){const t=e.target;t.removeEventListener("dispose",S),function(e){const t=r.get(e);if(void 0===t.__webglInit)return;const n=e.source,i=h.get(n);if(i){const r=i[t.__cacheKey];r.usedTimes--,0===r.usedTimes&&M(e),0===Object.keys(i).length&&h.delete(n)}r.remove(e)}(t),t.isVideoTexture&&u.delete(t)}function A(t){const n=t.target;n.removeEventListener("dispose",A),function(t){const n=r.get(t);if(t.depthTexture&&(t.depthTexture.dispose(),r.remove(t.depthTexture)),t.isWebGLCubeRenderTarget)for(let r=0;r<6;r++){if(Array.isArray(n.__webglFramebuffer[r]))for(let t=0;t<n.__webglFramebuffer[r].length;t++)e.deleteFramebuffer(n.__webglFramebuffer[r][t]);else e.deleteFramebuffer(n.__webglFramebuffer[r]);n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer[r])}else{if(Array.isArray(n.__webglFramebuffer))for(let t=0;t<n.__webglFramebuffer.length;t++)e.deleteFramebuffer(n.__webglFramebuffer[t]);else e.deleteFramebuffer(n.__webglFramebuffer);if(n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer),n.__webglMultisampledFramebuffer&&e.deleteFramebuffer(n.__webglMultisampledFramebuffer),n.__webglColorRenderbuffer)for(let t=0;t<n.__webglColorRenderbuffer.length;t++)n.__webglColorRenderbuffer[t]&&e.deleteRenderbuffer(n.__webglColorRenderbuffer[t]);n.__webglDepthRenderbuffer&&e.deleteRenderbuffer(n.__webglDepthRenderbuffer)}const i=t.textures;for(let a=0,o=i.length;a<o;a++){const t=r.get(i[a]);t.__webglTexture&&(e.deleteTexture(t.__webglTexture),s.memory.textures--),r.remove(i[a])}r.remove(t)}(n)}function M(t){const n=r.get(t);e.deleteTexture(n.__webglTexture);const i=t.source;delete h.get(i)[n.__cacheKey],s.memory.textures--}let w=0;function E(t,i){const a=r.get(t);if(t.isVideoTexture&&function(e){const t=s.render.frame;u.get(e)!==t&&(u.set(e,t),e.update())}(t),!1===t.isRenderTargetTexture&&!0!==t.isExternalTexture&&t.version>0&&a.__version!==t.version){const e=t.image;if(null===e)uv("WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==e.complete)return void L(a,t,i);uv("WebGLRenderer: Texture marked for update but image is incomplete")}}else t.isExternalTexture&&(a.__webglTexture=t.sourceTexture?t.sourceTexture:null);n.bindTexture(e.TEXTURE_2D,a.__webglTexture,e.TEXTURE0+i)}const C={[mm]:e.REPEAT,[gm]:e.CLAMP_TO_EDGE,[vm]:e.MIRRORED_REPEAT},T={[ym]:e.NEAREST,[_m]:e.NEAREST_MIPMAP_NEAREST,[bm]:e.NEAREST_MIPMAP_LINEAR,[xm]:e.LINEAR,[Sm]:e.LINEAR_MIPMAP_NEAREST,[Am]:e.LINEAR_MIPMAP_LINEAR},R={[Vg]:e.NEVER,[qg]:e.ALWAYS,[Wg]:e.LESS,[Xg]:e.LEQUAL,[jg]:e.EQUAL,[Kg]:e.GEQUAL,[Jg]:e.GREATER,[Yg]:e.NOTEQUAL};function I(n,a){if(a.type!==Pm||!1!==t.has("OES_texture_float_linear")||a.magFilter!==xm&&a.magFilter!==Sm&&a.magFilter!==bm&&a.magFilter!==Am&&a.minFilter!==xm&&a.minFilter!==Sm&&a.minFilter!==bm&&a.minFilter!==Am||uv("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),e.texParameteri(n,e.TEXTURE_WRAP_S,C[a.wrapS]),e.texParameteri(n,e.TEXTURE_WRAP_T,C[a.wrapT]),n!==e.TEXTURE_3D&&n!==e.TEXTURE_2D_ARRAY||e.texParameteri(n,e.TEXTURE_WRAP_R,C[a.wrapR]),e.texParameteri(n,e.TEXTURE_MAG_FILTER,T[a.magFilter]),e.texParameteri(n,e.TEXTURE_MIN_FILTER,T[a.minFilter]),a.compareFunction&&(e.texParameteri(n,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(n,e.TEXTURE_COMPARE_FUNC,R[a.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(a.magFilter===ym)return;if(a.minFilter!==bm&&a.minFilter!==Am)return;if(a.type===Pm&&!1===t.has("OES_texture_float_linear"))return;if(a.anisotropy>1||r.get(a).__currentAnisotropy){const s=t.get("EXT_texture_filter_anisotropic");e.texParameterf(n,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy}}}function P(t,n){let r=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",S));const i=n.source;let a=h.get(i);void 0===a&&(a={},h.set(i,a));const o=function(e){const t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.colorSpace),t.join()}(n);if(o!==t.__cacheKey){void 0===a[o]&&(a[o]={texture:e.createTexture(),usedTimes:0},s.memory.textures++,r=!0),a[o].usedTimes++;const i=a[t.__cacheKey];void 0!==i&&(a[t.__cacheKey].usedTimes--,0===i.usedTimes&&M(n)),t.__cacheKey=o,t.__webglTexture=a[o].texture}return r}function B(e,t,n){return Math.floor(Math.floor(e/n)/t)}function L(t,s,o){let l=e.TEXTURE_2D;(s.isDataArrayTexture||s.isCompressedArrayTexture)&&(l=e.TEXTURE_2D_ARRAY),s.isData3DTexture&&(l=e.TEXTURE_3D);const c=P(t,s),u=s.source;n.bindTexture(l,t.__webglTexture,e.TEXTURE0+o);const d=r.get(u);if(u.version!==d.__version||!0===c){n.activeTexture(e.TEXTURE0+o);const t=Fv.getPrimaries(Fv.workingColorSpace),r=s.colorSpace===Ug?null:Fv.getPrimaries(s.colorSpace),h=s.colorSpace===Ug||t===r?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,s.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,s.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,h);let f=m(s.image,!1,i.maxTextureSize);f=G(s,f);const p=a.convert(s.format,s.colorSpace),y=a.convert(s.type);let S,A=_(s.internalFormat,p,y,s.colorSpace,s.isVideoTexture);I(l,s);const M=s.mipmaps,w=!0!==s.isVideoTexture,E=void 0===d.__version||!0===c,C=u.dataReady,T=x(s,f);if(s.isDepthTexture)A=b(s.format===Gm,s.type),E&&(w?n.texStorage2D(e.TEXTURE_2D,1,A,f.width,f.height):n.texImage2D(e.TEXTURE_2D,0,A,f.width,f.height,0,p,y,null));else if(s.isDataTexture)if(M.length>0){w&&E&&n.texStorage2D(e.TEXTURE_2D,T,A,M[0].width,M[0].height);for(let t=0,r=M.length;t<r;t++)S=M[t],w?C&&n.texSubImage2D(e.TEXTURE_2D,t,0,0,S.width,S.height,p,y,S.data):n.texImage2D(e.TEXTURE_2D,t,A,S.width,S.height,0,p,y,S.data);s.generateMipmaps=!1}else w?(E&&n.texStorage2D(e.TEXTURE_2D,T,A,f.width,f.height),C&&function(t,r,i,a){const s=t.updateRanges;if(0===s.length)n.texSubImage2D(e.TEXTURE_2D,0,0,0,r.width,r.height,i,a,r.data);else{s.sort((e,t)=>e.start-t.start);let o=0;for(let e=1;e<s.length;e++){const t=s[o],n=s[e],i=t.start+t.count,a=B(n.start,r.width,4),l=B(t.start,r.width,4);n.start<=i+1&&a===l&&B(n.start+n.count-1,r.width,4)===a?t.count=Math.max(t.count,n.start+n.count-t.start):(++o,s[o]=n)}s.length=o+1;const l=e.getParameter(e.UNPACK_ROW_LENGTH),c=e.getParameter(e.UNPACK_SKIP_PIXELS),u=e.getParameter(e.UNPACK_SKIP_ROWS);e.pixelStorei(e.UNPACK_ROW_LENGTH,r.width);for(let t=0,d=s.length;t<d;t++){const o=s[t],l=Math.floor(o.start/4),c=Math.ceil(o.count/4),u=l%r.width,d=Math.floor(l/r.width),h=c,f=1;e.pixelStorei(e.UNPACK_SKIP_PIXELS,u),e.pixelStorei(e.UNPACK_SKIP_ROWS,d),n.texSubImage2D(e.TEXTURE_2D,0,u,d,h,f,i,a,r.data)}t.clearUpdateRanges(),e.pixelStorei(e.UNPACK_ROW_LENGTH,l),e.pixelStorei(e.UNPACK_SKIP_PIXELS,c),e.pixelStorei(e.UNPACK_SKIP_ROWS,u)}}(s,f,p,y)):n.texImage2D(e.TEXTURE_2D,0,A,f.width,f.height,0,p,y,f.data);else if(s.isCompressedTexture)if(s.isCompressedArrayTexture){w&&E&&n.texStorage3D(e.TEXTURE_2D_ARRAY,T,A,M[0].width,M[0].height,f.depth);for(let t=0,r=M.length;t<r;t++)if(S=M[t],s.format!==zm)if(null!==p)if(w){if(C)if(s.layerUpdates.size>0){const r=lE(S.width,S.height,s.format,s.type);for(const i of s.layerUpdates){const a=S.data.subarray(i*r/S.data.BYTES_PER_ELEMENT,(i+1)*r/S.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,i,S.width,S.height,1,p,a)}s.clearLayerUpdates()}else n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,0,S.width,S.height,f.depth,p,S.data)}else n.compressedTexImage3D(e.TEXTURE_2D_ARRAY,t,A,S.width,S.height,f.depth,0,S.data,0,0);else uv("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else w?C&&n.texSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,0,S.width,S.height,f.depth,p,y,S.data):n.texImage3D(e.TEXTURE_2D_ARRAY,t,A,S.width,S.height,f.depth,0,p,y,S.data)}else{w&&E&&n.texStorage2D(e.TEXTURE_2D,T,A,M[0].width,M[0].height);for(let t=0,r=M.length;t<r;t++)S=M[t],s.format!==zm?null!==p?w?C&&n.compressedTexSubImage2D(e.TEXTURE_2D,t,0,0,S.width,S.height,p,S.data):n.compressedTexImage2D(e.TEXTURE_2D,t,A,S.width,S.height,0,S.data):uv("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):w?C&&n.texSubImage2D(e.TEXTURE_2D,t,0,0,S.width,S.height,p,y,S.data):n.texImage2D(e.TEXTURE_2D,t,A,S.width,S.height,0,p,y,S.data)}else if(s.isDataArrayTexture)if(w){if(E&&n.texStorage3D(e.TEXTURE_2D_ARRAY,T,A,f.width,f.height,f.depth),C)if(s.layerUpdates.size>0){const t=lE(f.width,f.height,s.format,s.type);for(const r of s.layerUpdates){const i=f.data.subarray(r*t/f.data.BYTES_PER_ELEMENT,(r+1)*t/f.data.BYTES_PER_ELEMENT);n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,r,f.width,f.height,1,p,y,i)}s.clearLayerUpdates()}else n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,0,f.width,f.height,f.depth,p,y,f.data)}else n.texImage3D(e.TEXTURE_2D_ARRAY,0,A,f.width,f.height,f.depth,0,p,y,f.data);else if(s.isData3DTexture)w?(E&&n.texStorage3D(e.TEXTURE_3D,T,A,f.width,f.height,f.depth),C&&n.texSubImage3D(e.TEXTURE_3D,0,0,0,0,f.width,f.height,f.depth,p,y,f.data)):n.texImage3D(e.TEXTURE_3D,0,A,f.width,f.height,f.depth,0,p,y,f.data);else if(s.isFramebufferTexture){if(E)if(w)n.texStorage2D(e.TEXTURE_2D,T,A,f.width,f.height);else{let t=f.width,r=f.height;for(let i=0;i<T;i++)n.texImage2D(e.TEXTURE_2D,i,A,t,r,0,p,y,null),t>>=1,r>>=1}}else if(M.length>0){if(w&&E){const t=V(M[0]);n.texStorage2D(e.TEXTURE_2D,T,A,t.width,t.height)}for(let t=0,r=M.length;t<r;t++)S=M[t],w?C&&n.texSubImage2D(e.TEXTURE_2D,t,0,0,p,y,S):n.texImage2D(e.TEXTURE_2D,t,A,p,y,S);s.generateMipmaps=!1}else if(w){if(E){const t=V(f);n.texStorage2D(e.TEXTURE_2D,T,A,t.width,t.height)}C&&n.texSubImage2D(e.TEXTURE_2D,0,0,0,p,y,f)}else n.texImage2D(e.TEXTURE_2D,0,A,p,y,f);g(s)&&v(l),d.__version=u.version,s.onUpdate&&s.onUpdate(s)}t.__version=s.version}function D(t,i,s,l,c,u){const d=a.convert(s.format,s.colorSpace),h=a.convert(s.type),f=_(s.internalFormat,d,h,s.colorSpace),p=r.get(i),m=r.get(s);if(m.__renderTarget=i,!p.__hasExternalTextures){const t=Math.max(1,i.width>>u),r=Math.max(1,i.height>>u);c===e.TEXTURE_3D||c===e.TEXTURE_2D_ARRAY?n.texImage3D(c,u,f,t,r,i.depth,0,d,h,null):n.texImage2D(c,u,f,t,r,0,d,h,null)}n.bindFramebuffer(e.FRAMEBUFFER,t),H(i)?o.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,l,c,m.__webglTexture,0,z(i)):(c===e.TEXTURE_2D||c>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&c<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,l,c,m.__webglTexture,u),n.bindFramebuffer(e.FRAMEBUFFER,null)}function F(t,n,r){if(e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer){const i=n.depthTexture,a=i&&i.isDepthTexture?i.type:null,s=b(n.stencilBuffer,a),l=n.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;H(n)?o.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,z(n),s,n.width,n.height):r?e.renderbufferStorageMultisample(e.RENDERBUFFER,z(n),s,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,s,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,l,e.RENDERBUFFER,t)}else{const t=n.textures;for(let i=0;i<t.length;i++){const s=t[i],l=a.convert(s.format,s.colorSpace),c=a.convert(s.type),u=_(s.internalFormat,l,c,s.colorSpace);H(n)?o.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,z(n),u,n.width,n.height):r?e.renderbufferStorageMultisample(e.RENDERBUFFER,z(n),u,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,u,n.width,n.height)}}e.bindRenderbuffer(e.RENDERBUFFER,null)}function N(t,i,s){const l=!0===i.isWebGLCubeRenderTarget;if(n.bindFramebuffer(e.FRAMEBUFFER,t),!i.depthTexture||!i.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const c=r.get(i.depthTexture);if(c.__renderTarget=i,c.__webglTexture&&i.depthTexture.image.width===i.width&&i.depthTexture.image.height===i.height||(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),l){if(void 0===c.__webglInit&&(c.__webglInit=!0,i.depthTexture.addEventListener("dispose",S)),void 0===c.__webglTexture){c.__webglTexture=e.createTexture(),n.bindTexture(e.TEXTURE_CUBE_MAP,c.__webglTexture),I(e.TEXTURE_CUBE_MAP,i.depthTexture);const t=a.convert(i.depthTexture.format),r=a.convert(i.depthTexture.type);let s;i.depthTexture.format===Hm?s=e.DEPTH_COMPONENT24:i.depthTexture.format===Gm&&(s=e.DEPTH24_STENCIL8);for(let n=0;n<6;n++)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,s,i.width,i.height,0,t,r,null)}}else E(i.depthTexture,0);const u=c.__webglTexture,d=z(i),h=l?e.TEXTURE_CUBE_MAP_POSITIVE_X+s:e.TEXTURE_2D,f=i.depthTexture.format===Gm?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;if(i.depthTexture.format===Hm)H(i)?o.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,f,h,u,0,d):e.framebufferTexture2D(e.FRAMEBUFFER,f,h,u,0);else{if(i.depthTexture.format!==Gm)throw new Error("Unknown depthTexture format");H(i)?o.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,f,h,u,0,d):e.framebufferTexture2D(e.FRAMEBUFFER,f,h,u,0)}}function U(t){const i=r.get(t),a=!0===t.isWebGLCubeRenderTarget;if(i.__boundDepthTexture!==t.depthTexture){const e=t.depthTexture;if(i.__depthDisposeCallback&&i.__depthDisposeCallback(),e){const t=()=>{delete i.__boundDepthTexture,delete i.__depthDisposeCallback,e.removeEventListener("dispose",t)};e.addEventListener("dispose",t),i.__depthDisposeCallback=t}i.__boundDepthTexture=e}if(t.depthTexture&&!i.__autoAllocateDepthBuffer)if(a)for(let e=0;e<6;e++)N(i.__webglFramebuffer[e],t,e);else{const e=t.texture.mipmaps;e&&e.length>0?N(i.__webglFramebuffer[0],t,0):N(i.__webglFramebuffer,t,0)}else if(a){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)if(n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[r]),void 0===i.__webglDepthbuffer[r])i.__webglDepthbuffer[r]=e.createRenderbuffer(),F(i.__webglDepthbuffer[r],t,!1);else{const n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,a=i.__webglDepthbuffer[r];e.bindRenderbuffer(e.RENDERBUFFER,a),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,a)}}else{const r=t.texture.mipmaps;if(r&&r.length>0?n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[0]):n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer),void 0===i.__webglDepthbuffer)i.__webglDepthbuffer=e.createRenderbuffer(),F(i.__webglDepthbuffer,t,!1);else{const n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,r=i.__webglDepthbuffer;e.bindRenderbuffer(e.RENDERBUFFER,r),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,r)}}n.bindFramebuffer(e.FRAMEBUFFER,null)}const O=[],k=[];function z(e){return Math.min(i.maxSamples,e.samples)}function H(e){const n=r.get(e);return e.samples>0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function G(e,t){const n=e.colorSpace,r=e.format,i=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||n!==kg&&n!==Ug&&(Fv.getTransfer(n)===Hg?r===zm&&i===wm||uv("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):dv("WebGLTextures: Unsupported texture color space:",n)),t}function V(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?(c.width=e.naturalWidth||e.width,c.height=e.naturalHeight||e.height):"undefined"!=typeof VideoFrame&&e instanceof VideoFrame?(c.width=e.displayWidth,c.height=e.displayHeight):(c.width=e.width,c.height=e.height),c}this.allocateTextureUnit=function(){const e=w;return e>=i.maxTextures&&uv("WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+i.maxTextures),w+=1,e},this.resetTextureUnits=function(){w=0},this.setTexture2D=E,this.setTexture2DArray=function(t,i){const a=r.get(t);!1===t.isRenderTargetTexture&&t.version>0&&a.__version!==t.version?L(a,t,i):(t.isExternalTexture&&(a.__webglTexture=t.sourceTexture?t.sourceTexture:null),n.bindTexture(e.TEXTURE_2D_ARRAY,a.__webglTexture,e.TEXTURE0+i))},this.setTexture3D=function(t,i){const a=r.get(t);!1===t.isRenderTargetTexture&&t.version>0&&a.__version!==t.version?L(a,t,i):n.bindTexture(e.TEXTURE_3D,a.__webglTexture,e.TEXTURE0+i)},this.setTextureCube=function(t,s){const o=r.get(t);!0!==t.isCubeDepthTexture&&t.version>0&&o.__version!==t.version?function(t,s,o){if(6!==s.image.length)return;const l=P(t,s),c=s.source;n.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture,e.TEXTURE0+o);const u=r.get(c);if(c.version!==u.__version||!0===l){n.activeTexture(e.TEXTURE0+o);const t=Fv.getPrimaries(Fv.workingColorSpace),r=s.colorSpace===Ug?null:Fv.getPrimaries(s.colorSpace),d=s.colorSpace===Ug||t===r?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,s.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,s.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,d);const h=s.isCompressedTexture||s.image[0].isCompressedTexture,f=s.image[0]&&s.image[0].isDataTexture,p=[];for(let e=0;e<6;e++)p[e]=h||f?f?s.image[e].image:s.image[e]:m(s.image[e],!0,i.maxCubemapSize),p[e]=G(s,p[e]);const y=p[0],b=a.convert(s.format,s.colorSpace),S=a.convert(s.type),A=_(s.internalFormat,b,S,s.colorSpace),M=!0!==s.isVideoTexture,w=void 0===u.__version||!0===l,E=c.dataReady;let C,T=x(s,y);if(I(e.TEXTURE_CUBE_MAP,s),h){M&&w&&n.texStorage2D(e.TEXTURE_CUBE_MAP,T,A,y.width,y.height);for(let t=0;t<6;t++){C=p[t].mipmaps;for(let r=0;r<C.length;r++){const i=C[r];s.format!==zm?null!==b?M?E&&n.compressedTexSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,0,0,i.width,i.height,b,i.data):n.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,A,i.width,i.height,0,i.data):uv("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):M?E&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,0,0,i.width,i.height,b,S,i.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,A,i.width,i.height,0,b,S,i.data)}}}else{if(C=s.mipmaps,M&&w){C.length>0&&T++;const t=V(p[0]);n.texStorage2D(e.TEXTURE_CUBE_MAP,T,A,t.width,t.height)}for(let t=0;t<6;t++)if(f){M?E&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,p[t].width,p[t].height,b,S,p[t].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,A,p[t].width,p[t].height,0,b,S,p[t].data);for(let r=0;r<C.length;r++){const i=C[r].image[t].image;M?E&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r+1,0,0,i.width,i.height,b,S,i.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r+1,A,i.width,i.height,0,b,S,i.data)}}else{M?E&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,b,S,p[t]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,A,b,S,p[t]);for(let r=0;r<C.length;r++){const i=C[r];M?E&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r+1,0,0,b,S,i.image[t]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r+1,A,b,S,i.image[t])}}}g(s)&&v(e.TEXTURE_CUBE_MAP),u.__version=c.version,s.onUpdate&&s.onUpdate(s)}t.__version=s.version}(o,t,s):n.bindTexture(e.TEXTURE_CUBE_MAP,o.__webglTexture,e.TEXTURE0+s)},this.rebindTextures=function(t,n,i){const a=r.get(t);void 0!==n&&D(a.__webglFramebuffer,t,t.texture,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,0),void 0!==i&&U(t)},this.setupRenderTarget=function(t){const i=t.texture,o=r.get(t),l=r.get(i);t.addEventListener("dispose",A);const c=t.textures,u=!0===t.isWebGLCubeRenderTarget,d=c.length>1;if(d||(void 0===l.__webglTexture&&(l.__webglTexture=e.createTexture()),l.__version=i.version,s.memory.textures++),u){o.__webglFramebuffer=[];for(let t=0;t<6;t++)if(i.mipmaps&&i.mipmaps.length>0){o.__webglFramebuffer[t]=[];for(let n=0;n<i.mipmaps.length;n++)o.__webglFramebuffer[t][n]=e.createFramebuffer()}else o.__webglFramebuffer[t]=e.createFramebuffer()}else{if(i.mipmaps&&i.mipmaps.length>0){o.__webglFramebuffer=[];for(let t=0;t<i.mipmaps.length;t++)o.__webglFramebuffer[t]=e.createFramebuffer()}else o.__webglFramebuffer=e.createFramebuffer();if(d)for(let t=0,n=c.length;t<n;t++){const n=r.get(c[t]);void 0===n.__webglTexture&&(n.__webglTexture=e.createTexture(),s.memory.textures++)}if(t.samples>0&&!1===H(t)){o.__webglMultisampledFramebuffer=e.createFramebuffer(),o.__webglColorRenderbuffer=[],n.bindFramebuffer(e.FRAMEBUFFER,o.__webglMultisampledFramebuffer);for(let n=0;n<c.length;n++){const r=c[n];o.__webglColorRenderbuffer[n]=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,o.__webglColorRenderbuffer[n]);const i=a.convert(r.format,r.colorSpace),s=a.convert(r.type),l=_(r.internalFormat,i,s,r.colorSpace,!0===t.isXRRenderTarget),u=z(t);e.renderbufferStorageMultisample(e.RENDERBUFFER,u,l,t.width,t.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+n,e.RENDERBUFFER,o.__webglColorRenderbuffer[n])}e.bindRenderbuffer(e.RENDERBUFFER,null),t.depthBuffer&&(o.__webglDepthRenderbuffer=e.createRenderbuffer(),F(o.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(e.FRAMEBUFFER,null)}}if(u){n.bindTexture(e.TEXTURE_CUBE_MAP,l.__webglTexture),I(e.TEXTURE_CUBE_MAP,i);for(let n=0;n<6;n++)if(i.mipmaps&&i.mipmaps.length>0)for(let r=0;r<i.mipmaps.length;r++)D(o.__webglFramebuffer[n][r],t,i,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+n,r);else D(o.__webglFramebuffer[n],t,i,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0);g(i)&&v(e.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(d){for(let i=0,a=c.length;i<a;i++){const a=c[i],s=r.get(a);let l=e.TEXTURE_2D;(t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(l=t.isWebGL3DRenderTarget?e.TEXTURE_3D:e.TEXTURE_2D_ARRAY),n.bindTexture(l,s.__webglTexture),I(l,a),D(o.__webglFramebuffer,t,a,e.COLOR_ATTACHMENT0+i,l,0),g(a)&&v(l)}n.unbindTexture()}else{let r=e.TEXTURE_2D;if((t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(r=t.isWebGL3DRenderTarget?e.TEXTURE_3D:e.TEXTURE_2D_ARRAY),n.bindTexture(r,l.__webglTexture),I(r,i),i.mipmaps&&i.mipmaps.length>0)for(let n=0;n<i.mipmaps.length;n++)D(o.__webglFramebuffer[n],t,i,e.COLOR_ATTACHMENT0,r,n);else D(o.__webglFramebuffer,t,i,e.COLOR_ATTACHMENT0,r,0);g(i)&&v(r),n.unbindTexture()}t.depthBuffer&&U(t)},this.updateRenderTargetMipmap=function(e){const t=e.textures;for(let i=0,a=t.length;i<a;i++){const a=t[i];if(g(a)){const t=y(e),i=r.get(a).__webglTexture;n.bindTexture(t,i),v(t),n.unbindTexture()}}},this.updateMultisampleRenderTarget=function(t){if(t.samples>0)if(!1===H(t)){const i=t.textures,a=t.width,s=t.height;let o=e.COLOR_BUFFER_BIT;const c=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,u=r.get(t),d=i.length>1;if(d)for(let t=0;t<i.length;t++)n.bindFramebuffer(e.FRAMEBUFFER,u.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.RENDERBUFFER,null),n.bindFramebuffer(e.FRAMEBUFFER,u.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.TEXTURE_2D,null,0);n.bindFramebuffer(e.READ_FRAMEBUFFER,u.__webglMultisampledFramebuffer);const h=t.texture.mipmaps;h&&h.length>0?n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglFramebuffer[0]):n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglFramebuffer);for(let n=0;n<i.length;n++){if(t.resolveDepthBuffer&&(t.depthBuffer&&(o|=e.DEPTH_BUFFER_BIT),t.stencilBuffer&&t.resolveStencilBuffer&&(o|=e.STENCIL_BUFFER_BIT)),d){e.framebufferRenderbuffer(e.READ_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,u.__webglColorRenderbuffer[n]);const t=r.get(i[n]).__webglTexture;e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0)}e.blitFramebuffer(0,0,a,s,0,0,a,s,o,e.NEAREST),!0===l&&(O.length=0,k.length=0,O.push(e.COLOR_ATTACHMENT0+n),t.depthBuffer&&!1===t.resolveDepthBuffer&&(O.push(c),k.push(c),e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,k)),e.invalidateFramebuffer(e.READ_FRAMEBUFFER,O))}if(n.bindFramebuffer(e.READ_FRAMEBUFFER,null),n.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),d)for(let t=0;t<i.length;t++){n.bindFramebuffer(e.FRAMEBUFFER,u.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.RENDERBUFFER,u.__webglColorRenderbuffer[t]);const a=r.get(i[t]).__webglTexture;n.bindFramebuffer(e.FRAMEBUFFER,u.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.TEXTURE_2D,a,0)}n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglMultisampledFramebuffer)}else if(t.depthBuffer&&!1===t.resolveDepthBuffer&&l){const n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,[n])}},this.setupDepthRenderbuffer=U,this.setupFrameBufferTexture=D,this.useMultisampledRTT=H,this.isReversedDepthBuffer=function(){return n.buffers.depth.getReversed()}}function WT(e,t){return{convert:function(n,r=""){let i;const a=Fv.getTransfer(r);if(n===wm)return e.UNSIGNED_BYTE;if(n===Lm)return e.UNSIGNED_SHORT_4_4_4_4;if(n===Dm)return e.UNSIGNED_SHORT_5_5_5_1;if(n===Nm)return e.UNSIGNED_INT_5_9_9_9_REV;if(n===Um)return e.UNSIGNED_INT_10F_11F_11F_REV;if(n===Em)return e.BYTE;if(n===Cm)return e.SHORT;if(n===Tm)return e.UNSIGNED_SHORT;if(n===Rm)return e.INT;if(n===Im)return e.UNSIGNED_INT;if(n===Pm)return e.FLOAT;if(n===Bm)return e.HALF_FLOAT;if(n===Om)return e.ALPHA;if(n===km)return e.RGB;if(n===zm)return e.RGBA;if(n===Hm)return e.DEPTH_COMPONENT;if(n===Gm)return e.DEPTH_STENCIL;if(n===Vm)return e.RED;if(n===Wm)return e.RED_INTEGER;if(n===jm)return e.RG;if(n===Xm)return e.RG_INTEGER;if(n===Jm)return e.RGBA_INTEGER;if(n===Ym||n===Km||n===qm||n===Qm)if(a===Hg){if(i=t.get("WEBGL_compressed_texture_s3tc_srgb"),null===i)return null;if(n===Ym)return i.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===Km)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===qm)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===Qm)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(i=t.get("WEBGL_compressed_texture_s3tc"),null===i)return null;if(n===Ym)return i.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Km)return i.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===qm)return i.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===Qm)return i.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(n===Zm||n===$m||n===eg||n===tg){if(i=t.get("WEBGL_compressed_texture_pvrtc"),null===i)return null;if(n===Zm)return i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===$m)return i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===eg)return i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===tg)return i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===ng||n===rg||n===ig||n===ag||n===sg||n===og||n===lg){if(i=t.get("WEBGL_compressed_texture_etc"),null===i)return null;if(n===ng||n===rg)return a===Hg?i.COMPRESSED_SRGB8_ETC2:i.COMPRESSED_RGB8_ETC2;if(n===ig)return a===Hg?i.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:i.COMPRESSED_RGBA8_ETC2_EAC;if(n===ag)return i.COMPRESSED_R11_EAC;if(n===sg)return i.COMPRESSED_SIGNED_R11_EAC;if(n===og)return i.COMPRESSED_RG11_EAC;if(n===lg)return i.COMPRESSED_SIGNED_RG11_EAC}if(n===cg||n===ug||n===dg||n===hg||n===fg||n===pg||n===mg||n===gg||n===vg||n===yg||n===_g||n===bg||n===xg||n===Sg){if(i=t.get("WEBGL_compressed_texture_astc"),null===i)return null;if(n===cg)return a===Hg?i.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:i.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===ug)return a===Hg?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:i.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===dg)return a===Hg?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:i.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===hg)return a===Hg?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:i.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===fg)return a===Hg?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:i.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===pg)return a===Hg?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:i.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===mg)return a===Hg?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:i.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===gg)return a===Hg?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:i.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===vg)return a===Hg?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:i.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===yg)return a===Hg?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:i.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===_g)return a===Hg?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:i.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===bg)return a===Hg?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:i.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===xg)return a===Hg?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:i.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===Sg)return a===Hg?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:i.COMPRESSED_RGBA_ASTC_12x12_KHR}if(n===Ag||n===Mg||n===wg){if(i=t.get("EXT_texture_compression_bptc"),null===i)return null;if(n===Ag)return a===Hg?i.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:i.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===Mg)return i.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===wg)return i.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}if(n===Eg||n===Cg||n===Tg||n===Rg){if(i=t.get("EXT_texture_compression_rgtc"),null===i)return null;if(n===Eg)return i.COMPRESSED_RED_RGTC1_EXT;if(n===Cg)return i.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===Tg)return i.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===Rg)return i.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}return n===Fm?e.UNSIGNED_INT_24_8:void 0!==e[n]?e[n]:null}}}class jT{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t){if(null===this.texture){const n=new pS(e.texture);e.depthNear===t.depthNear&&e.depthFar===t.depthFar||(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=n}}getMesh(e){if(null!==this.texture&&null===this.mesh){const t=e.cameras[0].viewport,n=new ab({vertexShader:"\nvoid main() {\n\n\tgl_Position = vec4( position, 1.0 );\n\n}",fragmentShader:"\nuniform sampler2DArray depthColor;\nuniform float depthWidth;\nuniform float depthHeight;\n\nvoid main() {\n\n\tvec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );\n\n\tif ( coord.x >= 1.0 ) {\n\n\t\tgl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;\n\n\t} else {\n\n\t\tgl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;\n\n\t}\n\n}",uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new Z_(new RA(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class XT extends fv{constructor(e,t){super();const n=this;let r=null,i=1,a=null,s="local-floor",o=1,l=null,c=null,u=null,d=null,h=null,f=null;const p="undefined"!=typeof XRWebGLBinding,m=new jT,g={},v=t.getContextAttributes();let y=null,_=null;const b=[],x=[],S=new wv;let A=null;const M=new ub;M.viewport=new Xv;const w=new ub;w.viewport=new Xv;const E=[M,w],C=new aw;let T=null,R=null;function I(e){const t=x.indexOf(e.inputSource);if(-1===t)return;const n=b[t];void 0!==n&&(n.update(e.inputSource,e.frame,l||a),n.dispatchEvent({type:e.type,data:e.inputSource}))}function P(){r.removeEventListener("select",I),r.removeEventListener("selectstart",I),r.removeEventListener("selectend",I),r.removeEventListener("squeeze",I),r.removeEventListener("squeezestart",I),r.removeEventListener("squeezeend",I),r.removeEventListener("end",P),r.removeEventListener("inputsourceschange",B);for(let e=0;e<b.length;e++){const t=x[e];null!==t&&(x[e]=null,b[e].disconnect(t))}T=null,R=null,m.reset();for(const e in g)delete g[e];e.setRenderTarget(y),h=null,d=null,u=null,r=null,_=null,U.stop(),n.isPresenting=!1,e.setPixelRatio(A),e.setSize(S.width,S.height,!1),n.dispatchEvent({type:"sessionend"})}function B(e){for(let t=0;t<e.removed.length;t++){const n=e.removed[t],r=x.indexOf(n);r>=0&&(x[r]=null,b[r].disconnect(n))}for(let t=0;t<e.added.length;t++){const n=e.added[t];let r=x.indexOf(n);if(-1===r){for(let e=0;e<b.length;e++){if(e>=x.length){x.push(n),r=e;break}if(null===x[e]){x[e]=n,r=e;break}}if(-1===r)break}const i=b[r];i&&i.connect(n)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=b[e];return void 0===t&&(t=new vb,b[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=b[e];return void 0===t&&(t=new vb,b[e]=t),t.getGripSpace()},this.getHand=function(e){let t=b[e];return void 0===t&&(t=new vb,b[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){i=e,!0===n.isPresenting&&uv("WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){s=e,!0===n.isPresenting&&uv("WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||a},this.setReferenceSpace=function(e){l=e},this.getBaseLayer=function(){return null!==d?d:h},this.getBinding=function(){return null===u&&p&&(u=new XRWebGLBinding(r,t)),u},this.getFrame=function(){return f}
vendor: 9,400 bytes, line 26
26,this.getSession=function(){return r},this.setSession=async function(c){if(r=c,null!==r){if(y=e.getRenderTarget(),r.addEventListener("select",I),r.addEventListener("selectstart",I),r.addEventListener("selectend",I),r.addEventListener("squeeze",I),r.addEventListener("squeezestart",I),r.addEventListener("squeezeend",I),r.addEventListener("end",P),r.addEventListener("inputsourceschange",B),!0!==v.xrCompatible&&await t.makeXRCompatible(),A=e.getPixelRatio(),e.getSize(S),p&&"createProjectionLayer"in XRWebGLBinding.prototype){let n=null,a=null,s=null;v.depth&&(s=v.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,n=v.stencil?Gm:Hm,a=v.stencil?Fm:Im);const o={colorFormat:t.RGBA8,depthFormat:s,scaleFactor:i};u=this.getBinding(),d=u.createProjectionLayer(o),r.updateRenderState({layers:[d]}),e.setPixelRatio(1),e.setSize(d.textureWidth,d.textureHeight,!1),_=new Yv(d.textureWidth,d.textureHeight,{format:zm,type:wm,depthTexture:new hS(d.textureWidth,d.textureHeight,a,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:v.stencil,colorSpace:e.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:!1===d.ignoreDepthValues,resolveStencilBuffer:!1===d.ignoreDepthValues})}else{const n={antialias:v.antialias,alpha:!0,depth:v.depth,stencil:v.stencil,framebufferScaleFactor:i};h=new XRWebGLLayer(r,t,n),r.updateRenderState({baseLayer:h}),e.setPixelRatio(1),e.setSize(h.framebufferWidth,h.framebufferHeight,!1),_=new Yv(h.framebufferWidth,h.framebufferHeight,{format:zm,type:wm,colorSpace:e.outputColorSpace,stencilBuffer:v.stencil,resolveDepthBuffer:!1===h.ignoreDepthValues,resolveStencilBuffer:!1===h.ignoreDepthValues})}_.isXRRenderTarget=!0,this.setFoveation(o),l=null,a=await r.requestReferenceSpace(s),U.setContext(r),U.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return m.getDepthTexture()};const L=new Cv,D=new Cv;function F(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===r)return;let t=e.near,n=e.far;null!==m.texture&&(m.depthNear>0&&(t=m.depthNear),m.depthFar>0&&(n=m.depthFar)),C.near=w.near=M.near=t,C.far=w.far=M.far=n,T===C.near&&R===C.far||(r.updateRenderState({depthNear:C.near,depthFar:C.far}),T=C.near,R=C.far),C.layers.mask=6|e.layers.mask,M.layers.mask=3&C.layers.mask,w.layers.mask=5&C.layers.mask;const i=e.parent,a=C.cameras;F(C,i);for(let r=0;r<a.length;r++)F(a[r],i);2===a.length?function(e,t,n){L.setFromMatrixPosition(t.matrixWorld),D.setFromMatrixPosition(n.matrixWorld);const r=L.distanceTo(D),i=t.projectionMatrix.elements,a=n.projectionMatrix.elements,s=i[14]/(i[10]-1),o=i[14]/(i[10]+1),l=(i[9]+1)/i[5],c=(i[9]-1)/i[5],u=(i[8]-1)/i[0],d=(a[8]+1)/a[0],h=s*u,f=s*d,p=r/(-u+d),m=p*-u;if(t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(p),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert(),-1===i[10])e.projectionMatrix.copy(t.projectionMatrix),e.projectionMatrixInverse.copy(t.projectionMatrixInverse);else{const t=s+p,n=o+p,i=h-m,a=f+(r-m),u=l*o/n*t,d=c*o/n*t;e.projectionMatrix.makePerspective(i,a,u,d,t,n),e.projectionMatrixInverse.copy(e.projectionMatrix).invert()}}(C,M,w):C.projectionMatrix.copy(M.projectionMatrix),function(e,t,n){null===n?e.matrix.copy(t.matrixWorld):(e.matrix.copy(n.matrixWorld),e.matrix.invert(),e.matrix.multiply(t.matrixWorld)),e.matrix.decompose(e.position,e.quaternion,e.scale),e.updateMatrixWorld(!0),e.projectionMatrix.copy(t.projectionMatrix),e.projectionMatrixInverse.copy(t.projectionMatrixInverse),e.isPerspectiveCamera&&(e.fov=2*vv*Math.atan(1/e.projectionMatrix.elements[5]),e.zoom=1)}(e,C,i)},this.getCamera=function(){return C},this.getFoveation=function(){if(null!==d||null!==h)return o},this.setFoveation=function(e){o=e,null!==d&&(d.fixedFoveation=e),null!==h&&void 0!==h.fixedFoveation&&(h.fixedFoveation=e)},this.hasDepthSensing=function(){return null!==m.texture},this.getDepthSensingMesh=function(){return m.getMesh(C)},this.getCameraTexture=function(e){return g[e]};let N=null;const U=new cE;U.setAnimationLoop(function(t,i){if(c=i.getViewerPose(l||a),f=i,null!==c){const t=c.views;null!==h&&(e.setRenderTargetFramebuffer(_,h.framebuffer),e.setRenderTarget(_));let i=!1;t.length!==C.cameras.length&&(C.cameras.length=0,i=!0);for(let n=0;n<t.length;n++){const r=t[n];let a=null;if(null!==h)a=h.getViewport(r);else{const t=u.getViewSubImage(d,r);a=t.viewport,0===n&&(e.setRenderTargetTextures(_,t.colorTexture,t.depthStencilTexture),e.setRenderTarget(_))}let s=E[n];void 0===s&&(s=new ub,s.layers.enable(n),s.viewport=new Xv,E[n]=s),s.matrix.fromArray(r.transform.matrix),s.matrix.decompose(s.position,s.quaternion,s.scale),s.projectionMatrix.fromArray(r.projectionMatrix),s.projectionMatrixInverse.copy(s.projectionMatrix).invert(),s.viewport.set(a.x,a.y,a.width,a.height),0===n&&(C.matrix.copy(s.matrix),C.matrix.decompose(C.position,C.quaternion,C.scale)),!0===i&&C.cameras.push(s)}const a=r.enabledFeatures;if(a&&a.includes("depth-sensing")&&"gpu-optimized"==r.depthUsage&&p){u=n.getBinding();const e=u.getDepthInformation(t[0]);e&&e.isValid&&e.texture&&m.init(e,r.renderState)}if(a&&a.includes("camera-access")&&p){e.state.unbindTexture(),u=n.getBinding();for(let e=0;e<t.length;e++){const n=t[e].camera;if(n){let e=g[n];e||(e=new pS,g[n]=e);const t=u.getCameraImage(n);e.sourceTexture=t}}}}for(let e=0;e<b.length;e++){const t=x[e],n=b[e];null!==t&&void 0!==n&&n.update(t,i,l||a)}N&&N(t,i),i.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:i}),f=null}),this.setAnimationLoop=function(e){N=e},this.dispose=function(){}}}const JT=new Dy,YT=new My;function KT(e,t){function n(e,t){!0===e.matrixAutoUpdate&&e.updateMatrix(),t.value.copy(e.matrix)}function r(e,r){e.opacity.value=r.opacity,r.color&&e.diffuse.value.copy(r.color),r.emissive&&e.emissive.value.copy(r.emissive).multiplyScalar(r.emissiveIntensity),r.map&&(e.map.value=r.map,n(r.map,e.mapTransform)),r.alphaMap&&(e.alphaMap.value=r.alphaMap,n(r.alphaMap,e.alphaMapTransform)),r.bumpMap&&(e.bumpMap.value=r.bumpMap,n(r.bumpMap,e.bumpMapTransform),e.bumpScale.value=r.bumpScale,1===r.side&&(e.bumpScale.value*=-1)),r.normalMap&&(e.normalMap.value=r.normalMap,n(r.normalMap,e.normalMapTransform),e.normalScale.value.copy(r.normalScale),1===r.side&&e.normalScale.value.negate()),r.displacementMap&&(e.displacementMap.value=r.displacementMap,n(r.displacementMap,e.displacementMapTransform),e.displacementScale.value=r.displacementScale,e.displacementBias.value=r.displacementBias),r.emissiveMap&&(e.emissiveMap.value=r.emissiveMap,n(r.emissiveMap,e.emissiveMapTransform)),r.specularMap&&(e.specularMap.value=r.specularMap,n(r.specularMap,e.specularMapTransform)),r.alphaTest>0&&(e.alphaTest.value=r.alphaTest);const i=t.get(r),a=i.envMap,s=i.envMapRotation;a&&(e.envMap.value=a,JT.copy(s),JT.x*=-1,JT.y*=-1,JT.z*=-1,a.isCubeTexture&&!1===a.isRenderTargetTexture&&(JT.y*=-1,JT.z*=-1),e.envMapRotation.value.setFromMatrix4(YT.makeRotationFromEuler(JT)),e.flipEnvMap.value=a.isCubeTexture&&!1===a.isRenderTargetTexture?-1:1,e.reflectivity.value=r.reflectivity,e.ior.value=r.ior,e.refractionRatio.value=r.refractionRatio),r.lightMap&&(e.lightMap.value=r.lightMap,e.lightMapIntensity.value=r.lightMapIntensity,n(r.lightMap,e.lightMapTransform)),r.aoMap&&(e.aoMap.value=r.aoMap,e.aoMapIntensity.value=r.aoMapIntensity,n(r.aoMap,e.aoMapTransform))}return{refreshFogUniforms:function(t,n){n.color.getRGB(t.fogColor.value,rb(e)),n.isFog?(t.fogNear.value=n.near,t.fogFar.value=n.far):n.isFogExp2&&(t.fogDensity.value=n.density)},refreshMaterialUniforms:function(e,i,a,s,o){i.isMeshBasicMaterial||i.isMeshLambertMaterial?r(e,i):i.isMeshToonMaterial?(r(e,i),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(e,i)):i.isMeshPhongMaterial?(r(e,i),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}(e,i)):i.isMeshStandardMaterial?(r(e,i),function(e,t){e.metalness.value=t.metalness,t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap,n(t.metalnessMap,e.metalnessMapTransform)),e.roughness.value=t.roughness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap,n(t.roughnessMap,e.roughnessMapTransform)),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)}(e,i),i.isMeshPhysicalMaterial&&function(e,t,r){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap,n(t.sheenColorMap,e.sheenColorMapTransform)),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap,n(t.sheenRoughnessMap,e.sheenRoughnessMapTransform))),t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap,n(t.clearcoatMap,e.clearcoatMapTransform)),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap,n(t.clearcoatRoughnessMap,e.clearcoatRoughnessMapTransform)),t.clearcoatNormalMap&&(e.clearcoatNormalMap.value=t.clearcoatNormalMap,n(t.clearcoatNormalMap,e.clearcoatNormalMapTransform),e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),1===t.side&&e.clearcoatNormalScale.value.negate())),t.dis
vendor: 6,659 bytes, line 26
26persion>0&&(e.dispersion.value=t.dispersion),t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap,n(t.iridescenceMap,e.iridescenceMapTransform)),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap,n(t.iridescenceThicknessMap,e.iridescenceThicknessMapTransform))),t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap,n(t.transmissionMap,e.transmissionMapTransform)),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap,n(t.thicknessMap,e.thicknessMapTransform)),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)),t.anisotropy>0&&(e.anisotropyVector.value.set(t.anisotropy*Math.cos(t.anisotropyRotation),t.anisotropy*Math.sin(t.anisotropyRotation)),t.anisotropyMap&&(e.anisotropyMap.value=t.anisotropyMap,n(t.anisotropyMap,e.anisotropyMapTransform))),e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap,n(t.specularColorMap,e.specularColorMapTransform)),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap,n(t.specularIntensityMap,e.specularIntensityMapTransform))}(e,i,o)):i.isMeshMatcapMaterial?(r(e,i),function(e,t){t.matcap&&(e.matcap.value=t.matcap)}(e,i)):i.isMeshDepthMaterial?r(e,i):i.isMeshDistanceMaterial?(r(e,i),function(e,n){const r=t.get(n).light;e.referencePosition.value.setFromMatrixPosition(r.matrixWorld),e.nearDistance.value=r.shadow.camera.near,e.farDistance.value=r.shadow.camera.far}(e,i)):i.isMeshNormalMaterial?r(e,i):i.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform))}(e,i),i.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,i)):i.isPointsMaterial?function(e,t,r,i){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*r,e.scale.value=.5*i,t.map&&(e.map.value=t.map,n(t.map,e.uvTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,i,a,s):i.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,i):i.isShadowMaterial?(e.color.value.copy(i.color),e.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function qT(e,t,n,r){let i={},a={},s=[];const o=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS);function l(e,t,n,r){const i=e.value,a=t+"_"+n;if(void 0===r[a])return r[a]="number"==typeof i||"boolean"==typeof i?i:i.clone(),!0;{const e=r[a];if("number"==typeof i||"boolean"==typeof i){if(e!==i)return r[a]=i,!0}else if(!1===e.equals(i))return e.copy(i),!0}return!1}function c(e){const t={boundary:0,storage:0};return"number"==typeof e||"boolean"==typeof e?(t.boundary=4,t.storage=4):e.isVector2?(t.boundary=8,t.storage=8):e.isVector3||e.isColor?(t.boundary=16,t.storage=12):e.isVector4?(t.boundary=16,t.storage=16):e.isMatrix3?(t.boundary=48,t.storage=48):e.isMatrix4?(t.boundary=64,t.storage=64):e.isTexture?uv("WebGLRenderer: Texture samplers can not be part of an uniforms group."):uv("WebGLRenderer: Unsupported uniform value type.",e),t}function u(t){const n=t.target;n.removeEventListener("dispose",u);const r=s.indexOf(n.__bindingPointIndex);s.splice(r,1),e.deleteBuffer(i[n.id]),delete i[n.id],delete a[n.id]}return{bind:function(e,t){const n=t.program;r.uniformBlockBinding(e,n)},update:function(n,d){let h=i[n.id];void 0===h&&(function(e){const t=e.uniforms;let n=0;for(let i=0,a=t.length;i<a;i++){const e=Array.isArray(t[i])?t[i]:[t[i]];for(let t=0,r=e.length;t<r;t++){const r=e[t],i=Array.isArray(r.value)?r.value:[r.value];for(let e=0,t=i.length;e<t;e++){const t=c(i[e]),a=n%16,s=a%t.boundary,o=a+s;n+=s,0!==o&&16-o<t.storage&&(n+=16-o),r.__data=new Float32Array(t.storage/Float32Array.BYTES_PER_ELEMENT),r.__offset=n,n+=t.storage}}}const r=n%16;r>0&&(n+=16-r),e.__size=n,e.__cache={}}(n),h=function(t){const n=function(){for(let e=0;e<o;e++)if(-1===s.indexOf(e))return s.push(e),e;return dv("WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}();t.__bindingPointIndex=n;const r=e.createBuffer(),i=t.__size,a=t.usage;return e.bindBuffer(e.UNIFORM_BUFFER,r),e.bufferData(e.UNIFORM_BUFFER,i,a),e.bindBuffer(e.UNIFORM_BUFFER,null),e.bindBufferBase(e.UNIFORM_BUFFER,n,r),r}(n),i[n.id]=h,n.addEventListener("dispose",u));const f=d.program;r.updateUBOMapping(n,f);const p=t.render.frame;a[n.id]!==p&&(function(t){const n=i[t.id],r=t.uniforms,a=t.__cache;e.bindBuffer(e.UNIFORM_BUFFER,n);for(let i=0,s=r.length;i<s;i++){const t=Array.isArray(r[i])?r[i]:[r[i]];for(let n=0,r=t.length;n<r;n++){const r=t[n];if(!0===l(r,i,n,a)){const t=r.__offset,n=Array.isArray(r.value)?r.value:[r.value];let i=0;for(let a=0;a<n.length;a++){const s=n[a],o=c(s);"number"==typeof s||"boolean"==typeof s?(r.__data[0]=s,e.bufferSubData(e.UNIFORM_BUFFER,t+i,r.__data)):s.isMatrix3?(r.__data[0]=s.elements[0],r.__data[1]=s.elements[1],r.__data[2]=s.elements[2],r.__data[3]=0,r.__data[4]=s.elements[3],r.__data[5]=s.elements[4],r.__data[6]=s.elements[5],r.__data[7]=0,r.__data[8]=s.elements[6],r.__data[9]=s.elements[7],r.__data[10]=s.elements[8],r.__data[11]=0):(s.toArray(r.__data,i),i+=o.storage/Float32Array.BYTES_PER_ELEMENT)}e.bufferSubData(e.UNIFORM_BUFFER,t,r.__data)}}}e.bindBuffer(e.UNIFORM_BUFFER,null)}(n),a[n.id]=p)},dispose:function(){for(const t in i)e.deleteBuffer(i[t]);s=[],i={},a={}}}}const QT=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,10
vendor: 6,427 bytes, line 26
26751,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 ZT=null;class $T{constructor(e={}){const{canvas:t=sv(),context:n=null,depth:r=!0,stencil:i=!1,alpha:a=!1,antialias:s=!1,premultipliedAlpha:o=!0,preserveDrawingBuffer:l=!1,powerPreference:c="default",failIfMajorPerformanceCaveat:u=!1,reversedDepthBuffer:d=!1,outputBufferType:h=wm}=e;let f;if(this.isWebGLRenderer=!0,null!==n){if("undefined"!=typeof WebGLRenderingContext&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");f=n.getContextAttributes().alpha}else f=a;const p=h,m=new Set([Jm,Xm,Wm]),g=new Set([wm,Im,Tm,Fm,Lm,Dm]),v=new Uint32Array(4),y=new Int32Array(4);let _=null,b=null;const x=[],S=[];let A=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=0,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const M=this;let w=!1;this._outputColorSpace=Og;let E=0,C=0,T=null,R=-1,I=null;const P=new Xv,B=new Xv;let L=null;const D=new g_(0);let F=0,N=t.width,U=t.height,O=1,k=null,z=null;const H=new Xv(0,0,N,U),G=new Xv(0,0,N,U);let V=!1;const W=new bx;let j=!1,X=!1;const J=new My,Y=new Cv,K=new Xv,q={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let Q=!1;function Z(){return null===T?O:1}let $,ee,te,ne,re,ie,ae,se,oe,le,ce,ue,de,he,fe,pe,me,ge,ve,ye,_e,be,xe,Se,Ae=n;function Me(e,n){return t.getContext(e,n)}try{const e={alpha:!0,depth:r,stencil:i,antialias:s,premultipliedAlpha:o,preserveDrawingBuffer:l,powerPreference:c,failIfMajorPerformanceCaveat:u};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${vp}`),t.addEventListener("webglcontextlost",Ce,!1),t.addEventListener("webglcontextrestored",Te,!1),t.addEventListener("webglcontextcreationerror",Re,!1),null===Ae){const t="webgl2";if(Ae=Me(t,e),null===Ae)throw Me(t)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(WL){throw dv("WebGLRenderer: "+WL.message),WL}function we(){$=new UE(Ae),$.init(),be=new WT(Ae,$),ee=new bE(Ae,$,e,be),te=new GT(Ae,$),ee.reversedDepthBuffer&&d&&te.buffers.depth.setReversed(!0),ne=new zE(Ae),re=new MT,ie=new VT(Ae,$,te,re,ee,be,ne),ae=new SE(M),se=new NE(M),oe=new uE(Ae),xe=new yE(Ae,oe),le=new OE(Ae,oe,ne,xe),ce=new GE(Ae,le,oe,ne),ve=new HE(Ae,ee,ie),pe=new xE(re),ue=new AT(M,ae,se,$,ee,xe,pe),de=new KT(M,re),he=new TT,fe=new DT($),ge=new vE(M,ae,se,te,ce,f,o),me=new zT(M,ce,ee),Se=new qT(Ae,ne,ee,te),ye=new _E(Ae,$,ne),_e=new kE(Ae,$,ne),ne.programs=ue.programs,M.capabilities=ee,M.extensions=$,M.properties=re,M.renderLists=he,M.shadowMap=me,M.state=te,M.info=ne}we(),p!==wm&&(A=new WE(p,t.width,t.height,r,i));const Ee=new XT(M,Ae);function Ce(e){e.preventDefault(),cv("WebGLRenderer: Context Lost."),w=!0}function Te(){cv("WebGLRenderer: Context Restored."),w=!1;const e=ne.autoReset,t=me.enabled,n=me.autoUpdate,r=me.needsUpdate,i=me.type;we(),ne.autoReset=e,me.enabled=t,me.autoUpdate=n,me.needsUpdate=r,me.type=i}function Re(e){dv("WebGLRenderer: A WebGL context could not be created. Reason: ",e.statusMessage)}function Ie(e){const t=e.target;t.removeEventListener("dispose",Ie),function(e){(function(e){const t=re.get(e).programs;void 0!==t&&(t.forEach(function(e){ue.releaseProgram(e)}),e.isShaderMaterial&&ue.releaseShaderCache(e))})(e),re.remove(e)}(t)}function Pe(e,t,n){!0===e.transparent&&2===e.side&&!1===e.forceSinglePass?(e.side=1,e.needsUpdate=!0,He(e,t,n),e.side=0,e.needsUpdate=!0,He(e,t,n),e.side=2):He(e,t,n)}this.xr=Ee,this.getContext=function(){return Ae},this.getContextAttributes=function(){return Ae.getContextAttributes()},this.forceContextLoss=function(){const e=$.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){const e=$.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return O},this.setPixelRatio=function(e){void 0!==e&&(O=e,this.setSize(N,U,!1))}
vendor: 4,088 bytes, line 26
26,this.getSize=function(e){return e.set(N,U)},this.setSize=function(e,n,r=!0){Ee.isPresenting?uv("WebGLRenderer: Can't change size while VR device is presenting."):(N=e,U=n,t.width=Math.floor(e*O),t.height=Math.floor(n*O),!0===r&&(t.style.width=e+"px",t.style.height=n+"px"),null!==A&&A.setSize(t.width,t.height),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(e){return e.set(N*O,U*O).floor()},this.setDrawingBufferSize=function(e,n,r){N=e,U=n,O=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.setEffects=function(e){if(p!==wm){if(e)for(let t=0;t<e.length;t++)if(!0===e[t].isOutputPass){console.warn("THREE.WebGLRenderer: OutputPass is not needed in setEffects(). Tone mapping and color space conversion are applied automatically.");break}A.setEffects(e||[])}else console.error("THREE.WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.")},this.getCurrentViewport=function(e){return e.copy(P)},this.getViewport=function(e){return e.copy(H)},this.setViewport=function(e,t,n,r){e.isVector4?H.set(e.x,e.y,e.z,e.w):H.set(e,t,n,r),te.viewport(P.copy(H).multiplyScalar(O).round())},this.getScissor=function(e){return e.copy(G)},this.setScissor=function(e,t,n,r){e.isVector4?G.set(e.x,e.y,e.z,e.w):G.set(e,t,n,r),te.scissor(B.copy(G).multiplyScalar(O).round())},this.getScissorTest=function(){return V},this.setScissorTest=function(e){te.setScissorTest(V=e)},this.setOpaqueSort=function(e){k=e},this.setTransparentSort=function(e){z=e},this.getClearColor=function(e){return e.copy(ge.getClearColor())},this.setClearColor=function(){ge.setClearColor(...arguments)},this.getClearAlpha=function(){return ge.getClearAlpha()},this.setClearAlpha=function(){ge.setClearAlpha(...arguments)},this.clear=function(e=!0,t=!0,n=!0){let r=0;if(e){let e=!1;if(null!==T){const t=T.texture.format;e=m.has(t)}if(e){const e=T.texture.type,t=g.has(e),n=ge.getClearColor(),r=ge.getClearAlpha(),i=n.r,a=n.g,s=n.b;t?(v[0]=i,v[1]=a,v[2]=s,v[3]=r,Ae.clearBufferuiv(Ae.COLOR,0,v)):(y[0]=i,y[1]=a,y[2]=s,y[3]=r,Ae.clearBufferiv(Ae.COLOR,0,y))}else r|=Ae.COLOR_BUFFER_BIT}t&&(r|=Ae.DEPTH_BUFFER_BIT),n&&(r|=Ae.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),Ae.clear(r)},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",Ce,!1),t.removeEventListener("webglcontextrestored",Te,!1),t.removeEventListener("webglcontextcreationerror",Re,!1),ge.dispose(),he.dispose(),fe.dispose(),re.dispose(),ae.dispose(),se.dispose(),ce.dispose(),xe.dispose(),Se.dispose(),ue.dispose(),Ee.dispose(),Ee.removeEventListener("sessionstart",Le),Ee.removeEventListener("sessionend",De),Fe.stop()},this.renderBufferDirect=function(e,t,n,r,i,a){null===t&&(t=q);const s=i.isMesh&&i.matrixWorld.determinant()<0,o=function(e,t,n,r,i){!0!==t.isScene&&(t=q),ie.resetTextureUnits();const a=t.fog,s=r.isMeshStandardMaterial?t.environment:null,o=null===T?M.outputColorSpace:!0===T.isXRRenderTarget?T.texture.colorSpace:kg,l=(r.isMeshStandardMaterial?se:ae).get(r.envMap||s),c=!0===r.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,u=!!n.attributes.tangent&&(!!r.normalMap||r.anisotropy>0),d=!!n.morphAttributes.position,h=!!n.morphAttributes.normal,f=!!n.morphAttributes.color;let p=0;r.toneMapped&&(null!==T&&!0!==T.isXRRenderTarget||(p=M.toneMapping));const m=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,g=void 0!==m?m.length:0,v=re.get(r),y=b.state.lights;if(!0===j&&(!0===X||e!==I)){const t=e===I&&r.id===R;pe.setState(r,e,t)}let _=!1;r.version===v.__version?v.needsLights&&v.lightsStateVersion!==y.state.version||v.outputColorSpace!==o||i.isBatchedMesh&&!1===v.batching?_=!0:i.isBatchedMesh||!0!==v.batching?i.isBatchedMesh&&!0===v.batchingColor&&null===i.colorTexture||i.isBatchedMesh&&!1===v.batchingColor&&null!==i.colorTexture||i.isInstancedMesh&&!1===v.instancing?_=!0:i.isInstancedMesh||!0!==v.instancing?i.isSkinnedMesh&&
vendor: 10,243 bytes, line 26
26!1===v.skinning?_=!0:i.isSkinnedMesh||!0!==v.skinning?i.isInstancedMesh&&!0===v.instancingColor&&null===i.instanceColor||i.isInstancedMesh&&!1===v.instancingColor&&null!==i.instanceColor||i.isInstancedMesh&&!0===v.instancingMorph&&null===i.morphTexture||i.isInstancedMesh&&!1===v.instancingMorph&&null!==i.morphTexture||v.envMap!==l||!0===r.fog&&v.fog!==a?_=!0:void 0===v.numClippingPlanes||v.numClippingPlanes===pe.numPlanes&&v.numIntersection===pe.numIntersection?(v.vertexAlphas!==c||v.vertexTangents!==u||v.morphTargets!==d||v.morphNormals!==h||v.morphColors!==f||v.toneMapping!==p||v.morphTargetsCount!==g)&&(_=!0):_=!0:_=!0:_=!0:_=!0:(_=!0,v.__version=r.version);let x=v.currentProgram;!0===_&&(x=He(r,t,i));let S=!1,A=!1,w=!1;const E=x.getUniforms(),C=v.uniforms;if(te.useProgram(x.program)&&(S=!0,A=!0,w=!0),r.id!==R&&(R=r.id,A=!0),S||I!==e){te.buffers.depth.getReversed()&&!0!==e.reversedDepth&&(e._reversedDepth=!0,e.updateProjectionMatrix()),E.setValue(Ae,"projectionMatrix",e.projectionMatrix),E.setValue(Ae,"viewMatrix",e.matrixWorldInverse);const t=E.map.cameraPosition;void 0!==t&&t.setValue(Ae,Y.setFromMatrixPosition(e.matrixWorld)),ee.logarithmicDepthBuffer&&E.setValue(Ae,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&E.setValue(Ae,"isOrthographic",!0===e.isOrthographicCamera),I!==e&&(I=e,A=!0,w=!0)}if(v.needsLights&&(y.state.directionalShadowMap.length>0&&E.setValue(Ae,"directionalShadowMap",y.state.directionalShadowMap,ie),y.state.spotShadowMap.length>0&&E.setValue(Ae,"spotShadowMap",y.state.spotShadowMap,ie),y.state.pointShadowMap.length>0&&E.setValue(Ae,"pointShadowMap",y.state.pointShadowMap,ie)),i.isSkinnedMesh){E.setOptional(Ae,i,"bindMatrix"),E.setOptional(Ae,i,"bindMatrixInverse");const e=i.skeleton;e&&(null===e.boneTexture&&e.computeBoneTexture(),E.setValue(Ae,"boneTexture",e.boneTexture,ie))}i.isBatchedMesh&&(E.setOptional(Ae,i,"batchingTexture"),E.setValue(Ae,"batchingTexture",i._matricesTexture,ie),E.setOptional(Ae,i,"batchingIdTexture"),E.setValue(Ae,"batchingIdTexture",i._indirectTexture,ie),E.setOptional(Ae,i,"batchingColorTexture"),null!==i._colorsTexture&&E.setValue(Ae,"batchingColorTexture",i._colorsTexture,ie));const P=n.morphAttributes;var B,L;if(void 0===P.position&&void 0===P.normal&&void 0===P.color||ve.update(i,n,x),(A||v.receiveShadow!==i.receiveShadow)&&(v.receiveShadow=i.receiveShadow,E.setValue(Ae,"receiveShadow",i.receiveShadow)),r.isMeshGouraudMaterial&&null!==r.envMap&&(C.envMap.value=l,C.flipEnvMap.value=l.isCubeTexture&&!1===l.isRenderTargetTexture?-1:1),r.isMeshStandardMaterial&&null===r.envMap&&null!==t.environment&&(C.envMapIntensity.value=t.environmentIntensity),void 0!==C.dfgLUT&&(C.dfgLUT.value=(null===ZT&&(ZT=new ex(QT,16,16,jm,Bm),ZT.name="DFG_LUT",ZT.minFilter=xm,ZT.magFilter=xm,ZT.wrapS=gm,ZT.wrapT=gm,ZT.generateMipmaps=!1,ZT.needsUpdate=!0),ZT)),A&&(E.setValue(Ae,"toneMappingExposure",M.toneMappingExposure),v.needsLights&&(L=w,(B=C).ambientLightColor.needsUpdate=L,B.lightProbe.needsUpdate=L,B.directionalLights.needsUpdate=L,B.directionalLightShadows.needsUpdate=L,B.pointLights.needsUpdate=L,B.pointLightShadows.needsUpdate=L,B.spotLights.needsUpdate=L,B.spotLightShadows.needsUpdate=L,B.rectAreaLights.needsUpdate=L,B.hemisphereLights.needsUpdate=L),a&&!0===r.fog&&de.refreshFogUniforms(C,a),de.refreshMaterialUniforms(C,r,O,U,b.state.transmissionRenderTarget[e.id]),KC.upload(Ae,Ge(v),C,ie)),r.isShaderMaterial&&!0===r.uniformsNeedUpdate&&(KC.upload(Ae,Ge(v),C,ie),r.uniformsNeedUpdate=!1),r.isSpriteMaterial&&E.setValue(Ae,"center",i.center),E.setValue(Ae,"modelViewMatrix",i.modelViewMatrix),E.setValue(Ae,"normalMatrix",i.normalMatrix),E.setValue(Ae,"modelMatrix",i.matrixWorld),r.isShaderMaterial||r.isRawShaderMaterial){const e=r.uniformsGroups;for(let t=0,n=e.length;t<n;t++){const n=e[t];Se.update(n,x),Se.bind(n,x)}}return x}(e,t,n,r,i);te.setMaterial(r,s);let l=n.index,c=1;if(!0===r.wireframe){if(l=le.getWireframeAttribute(n),void 0===l)return;c=2}const u=n.drawRange,d=n.attributes.position;let h=u.start*c,f=(u.start+u.count)*c;null!==a&&(h=Math.max(h,a.start*c),f=Math.min(f,(a.start+a.count)*c)),null!==l?(h=Math.max(h,0),f=Math.min(f,l.count)):null!=d&&(h=Math.max(h,0),f=Math.min(f,d.count));const p=f-h;if(p<0||p===1/0)return;let m;xe.setup(i,r,o,n,l);let g=ye;if(null!==l&&(m=oe.get(l),g=_e,g.setIndex(m)),i.isMesh)!0===r.wireframe?(te.setLineWidth(r.wireframeLinewidth*Z()),g.setMode(Ae.LINES)):g.setMode(Ae.TRIANGLES);else if(i.isLine){let e=r.linewidth;void 0===e&&(e=1),te.setLineWidth(e*Z()),i.isLineSegments?g.setMode(Ae.LINES):i.isLineLoop?g.setMode(Ae.LINE_LOOP):g.setMode(Ae.LINE_STRIP)}else i.isPoints?g.setMode(Ae.POINTS):i.isSprite&&g.setMode(Ae.TRIANGLES);if(i.isBatchedMesh)if(null!==i._multiDrawInstances)hv("WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),g.renderMultiDrawInstances(i._multiDrawStarts,i._multiDrawCounts,i._multiDrawCount,i._multiDrawInstances);else if($.get("WEBGL_multi_draw"))g.renderMultiDraw(i._multiDrawStarts,i._multiDrawCounts,i._multiDrawCount);else{const e=i._multiDrawStarts,t=i._multiDrawCounts,n=i._multiDrawCount,a=l?oe.get(l).bytesPerElement:1,s=re.get(r).currentProgram.getUniforms();for(let r=0;r<n;r++)s.setValue(Ae,"_gl_DrawID",r),g.render(e[r]/a,t[r])}else if(i.isInstancedMesh)g.renderInstances(h,p,i.count);else if(n.isInstancedBufferGeometry){const e=void 0!==n._maxInstanceCount?n._maxInstanceCount:1/0,t=Math.min(n.instanceCount,e);g.renderInstances(h,p,t)}else g.render(h,p)},this.compile=function(e,t,n=null){null===n&&(n=e),b=fe.get(n),b.init(t),S.push(b),n.traverseVisible(function(e){e.isLight&&e.layers.test(t.layers)&&(b.pushLight(e),e.castShadow&&b.pushShadow(e))}),e!==n&&e.traverseVisible(function(e){e.isLight&&e.layers.test(t.layers)&&(b.pushLight(e),e.castShadow&&b.pushShadow(e))}),b.setupLights();const r=new Set;return e.traverse(function(e){if(!(e.isMesh||e.isPoints||e.isLine||e.isSprite))return;const t=e.material;if(t)if(Array.isArray(t))for(let i=0;i<t.length;i++){const a=t[i];Pe(a,n,e),r.add(a)}else Pe(t,n,e),r.add(t)}),b=S.pop(),r},this.compileAsync=function(e,t,n=null){const r=this.compile(e,t,n);return new Promise(t=>{function n(){r.forEach(function(e){re.get(e).currentProgram.isReady()&&r.delete(e)}),0!==r.size?setTimeout(n,10):t(e)}null!==$.get("KHR_parallel_shader_compile")?n():setTimeout(n,10)})};let Be=null;function Le(){Fe.stop()}function De(){Fe.start()}const Fe=new cE;function Ne(e,t,n,r){if(!1===e.visible)return;if(e.layers.test(t.layers))if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)b.pushLight(e),e.castShadow&&b.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||W.intersectsSprite(e)){r&&K.setFromMatrixPosition(e.matrixWorld).applyMatrix4(J);const t=ce.update(e),i=e.material;i.visible&&_.push(e,t,i,n,K.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||W.intersectsObject(e))){const t=ce.update(e),i=e.material;if(r&&(void 0!==e.boundingSphere?(null===e.boundingSphere&&e.computeBoundingSphere(),K.copy(e.boundingSphere.center)):(null===t.boundingSphere&&t.computeBoundingSphere(),K.copy(t.boundingSphere.center)),K.applyMatrix4(e.matrixWorld).applyMatrix4(J)),Array.isArray(i)){const r=t.groups;for(let a=0,s=r.length;a<s;a++){const s=r[a],o=i[s.materialIndex];o&&o.visible&&_.push(e,t,o,n,K.z,s)}}else i.visible&&_.push(e,t,i,n,K.z,null)}const i=e.children;for(let a=0,s=i.length;a<s;a++)Ne(i[a],t,n,r)}function Ue(e,t,n,r){const{opaque:i,transmissive:a,transparent:s}=e;b.setupLightsView(n),!0===j&&pe.setGlobalState(M.clippingPlanes,n),r&&te.viewport(P.copy(r)),i.length>0&&ke(i,t,n),a.length>0&&ke(a,t,n),s.length>0&&ke(s,t,n),te.buffers.depth.setTest(!0),te.buffers.depth.setMask(!0),te.buffers.color.setMask(!0),te.setPolygonOffset(!1)}function Oe(e,t,n,r){if(null!==(!0===n.isScene?n.overrideMaterial:null))return;if(void 0===b.state.transmissionRenderTarget[r.id]){const e=$.has("EXT_color_buffer_half_float")||$.has("EXT_color_buffer_float");b.state.transmissionRenderTarget[r.id]=new Yv(1,1,{generateMipmaps:!0,type:e?Bm:wm,minFilter:Am,samples:ee.samples,stencilBuffer:i,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Fv.workingColorSpace})}const a=b.state.transmissionRenderTarget[r.id],s=r.viewport||P;a.setSize(s.z*M.transmissionResolutionScale,s.w*M.transmissionResolutionScale);const o=M.getRenderTarget(),l=M.getActiveCubeFace(),c=M.getActiveMipmapLevel();M.setRenderTarget(a),M.getClearColor(D),F=M.getClearAlpha(),F<1&&M.setClearColor(16777215,.5),M.clear(),Q&&ge.render(n);const u=M.toneMapping;M.toneMapping=0;const d=r.viewport;if(void 0!==r.viewport&&(r.viewport=void 0),b.setupLightsView(r),!0===j&&pe.setGlobalState(M.clippingPlanes,r),ke(e,n,r),ie.updateMultisampleRenderTarget(a),ie.updateRenderTargetMipmap(a),!1===$.has("WEBGL_multisampled_render_to_texture")){let e=!1;for(let i=0,a=t.length;i<a;i++){const a=t[i],{object:s,geometry:o,material:l,group:c}=a;if(2===l.side&&s.layers.test(r.layers)){const t=l.side;l.side=1,l.needsUpdate=!0,ze(s,n,r,o,l,c),l.side=t,l.needsUpdate=!0,e=!0}}!0===e&&(ie.updateMultisampleRenderTarget(a),ie.updateRenderTargetMipmap(a))}M.setRenderTarget(o,l,c),M.setClearColor(D,F),void 0!==d&&(r.viewport=d),M.toneMapping=u}function ke(e,t,n){const r=!0===t.isScene?t.overrideMaterial:null;for(let i=0,a=e.length;i<a;i++){const a=e[i],{object:s,geometry:o,group:l}=a;let c=a.material;!0===c.allowOverride&&null!==r&&(c=r),s.layers.test(n.layers)&&ze(s,t,n,o,c,l)}}function ze(e,t,n,r,i,a){e.onBeforeRender(M,t,n,r,i,a),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),i.onBeforeRender(M,t,n,r,e,a),!0===i.transparent&&2===i.side&&!1===i.forceSinglePass?(i.side=1,i.needsUpdate=!0,M.renderBufferDirect(n,t,r,i,e,a),i.side=0,i.needsUpdate=!0,M.renderBufferDirect(n,t,r,i,e,a),i.side=2):M.renderBufferDirect(n,t,r,i,e,a),e.onAfterRender(M,t,n,r,i,a)}function He(e,t,n){!0!==t.isScene&&(t=q);const r=re.get(e),i=b.state.lights,a=b.state.shadowsArray,s=i.state.ver
vendor: 6,171 bytes, line 26
26sion,o=ue.getParameters(e,i.state,a,t,n),l=ue.getProgramCacheKey(o);let c=r.programs;r.environment=e.isMeshStandardMaterial?t.environment:null,r.fog=t.fog,r.envMap=(e.isMeshStandardMaterial?se:ae).get(e.envMap||r.environment),r.envMapRotation=null!==r.environment&&null===e.envMap?t.environmentRotation:e.envMapRotation,void 0===c&&(e.addEventListener("dispose",Ie),c=new Map,r.programs=c);let u=c.get(l);if(void 0!==u){if(r.currentProgram===u&&r.lightsStateVersion===s)return Ve(e,o),u}else o.uniforms=ue.getUniforms(e),e.onBeforeCompile(o,M),u=ue.acquireProgram(o,l),c.set(l,u),r.uniforms=o.uniforms;const d=r.uniforms;return(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(d.clippingPlanes=pe.uniform),Ve(e,o),r.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),r.lightsStateVersion=s,r.needsLights&&(d.ambientLightColor.value=i.state.ambient,d.lightProbe.value=i.state.probe,d.directionalLights.value=i.state.directional,d.directionalLightShadows.value=i.state.directionalShadow,d.spotLights.value=i.state.spot,d.spotLightShadows.value=i.state.spotShadow,d.rectAreaLights.value=i.state.rectArea,d.ltc_1.value=i.state.rectAreaLTC1,d.ltc_2.value=i.state.rectAreaLTC2,d.pointLights.value=i.state.point,d.pointLightShadows.value=i.state.pointShadow,d.hemisphereLights.value=i.state.hemi,d.directionalShadowMap.value=i.state.directionalShadowMap,d.directionalShadowMatrix.value=i.state.directionalShadowMatrix,d.spotShadowMap.value=i.state.spotShadowMap,d.spotLightMatrix.value=i.state.spotLightMatrix,d.spotLightMap.value=i.state.spotLightMap,d.pointShadowMap.value=i.state.pointShadowMap,d.pointShadowMatrix.value=i.state.pointShadowMatrix),r.currentProgram=u,r.uniformsList=null,u}function Ge(e){if(null===e.uniformsList){const t=e.currentProgram.getUniforms();e.uniformsList=KC.seqWithValue(t.seq,e.uniforms)}return e.uniformsList}function Ve(e,t){const n=re.get(e);n.outputColorSpace=t.outputColorSpace,n.batching=t.batching,n.batchingColor=t.batchingColor,n.instancing=t.instancing,n.instancingColor=t.instancingColor,n.instancingMorph=t.instancingMorph,n.skinning=t.skinning,n.morphTargets=t.morphTargets,n.morphNormals=t.morphNormals,n.morphColors=t.morphColors,n.morphTargetsCount=t.morphTargetsCount,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas,n.vertexTangents=t.vertexTangents,n.toneMapping=t.toneMapping}Fe.setAnimationLoop(function(e){Be&&Be(e)}),"undefined"!=typeof self&&Fe.setContext(self),this.setAnimationLoop=function(e){Be=e,Ee.setAnimationLoop(e),null===e?Fe.stop():Fe.start()},Ee.addEventListener("sessionstart",Le),Ee.addEventListener("sessionend",De),this.render=function(e,t){if(void 0!==t&&!0!==t.isCamera)return void dv("WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===w)return;const n=!0===Ee.enabled&&!0===Ee.isPresenting,r=null!==A&&(null===T||n)&&A.begin(M,T);if(!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),!0!==Ee.enabled||!0!==Ee.isPresenting||null!==A&&!1!==A.isCompositing()||(!0===Ee.cameraAutoUpdate&&Ee.updateCamera(t),t=Ee.getCamera()),!0===e.isScene&&e.onBeforeRender(M,e,t,T),b=fe.get(e,S.length),b.init(t),S.push(b),J.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),W.setFromProjectionMatrix(J,$g,t.reversedDepth),X=this.localClippingEnabled,j=pe.init(this.clippingPlanes,X),_=he.get(e,x.length),_.init(),x.push(_),!0===Ee.enabled&&!0===Ee.isPresenting){const e=M.xr.getDepthSensingMesh();null!==e&&Ne(e,t,-1/0,M.sortObjects)}Ne(e,t,0,M.sortObjects),_.finish(),!0===M.sortObjects&&_.sort(k,z),Q=!1===Ee.enabled||!1===Ee.isPresenting||!1===Ee.hasDepthSensing(),Q&&ge.addToRenderList(_,e),this.info.render.frame++,!0===j&&pe.beginShadows();const i=b.state.shadowsArray;if(me.render(i,e,t),!0===j&&pe.endShadows(),!0===this.info.autoReset&&this.info.reset(),!1===(r&&A.hasRenderPass())){const n=_.opaque,r=_.transmissive;if(b.setupLights(),t.isArrayCamera){const i=t.cameras;if(r.length>0)for(let t=0,a=i.length;t<a;t++)Oe(n,r,e,i[t]);Q&&ge.render(e);for(let t=0,n=i.length;t<n;t++){const n=i[t];Ue(_,e,n,n.viewport)}}else r.length>0&&Oe(n,r,e,t),Q&&ge.render(e),Ue(_,e,t)}null!==T&&0===C&&(ie.updateMultisampleRenderTarget(T),ie.updateRenderTargetMipmap(T)),r&&A.end(M),!0===e.isScene&&e.onAfterRender(M,e,t),xe.resetDefaultState(),R=-1,I=null,S.pop(),S.length>0?(b=S[S.length-1],!0===j&&pe.setGlobalState(M.clippingPlanes,b.state.camera)):b=null,x.pop(),_=x.length>0?x[x.length-1]:null},this.getActiveCubeFace=function(){return E},this.getActiveMipmapLevel=function(){return C},this.getRenderTarget=function(){return T},this.setRenderTargetTextures=function(e,t,n){const r=re.get(e);r.__autoAllocateDepthBuffer=!1===e.resolveDepthBuffer,!1===r.__autoAllocateDepthBuffer&&(r.__useRenderToTexture=!1),re.get(e.texture).__webglTexture=t,re.get(e.depthTexture).__webglTexture=r.__autoAllocateDepthBuffer?void 0:n,r.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(e,t){const n=re.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t};const We=Ae.createFramebuffer();this.setRenderTarget=function(e,t=0,n=0){T=e,E=t,C=n;let r=null,i=!1,a=!1;if(e){const s=re.get(e);if(void 0!==s.__useDefaultFramebuffer)return te.bindFramebuffer(Ae.FRAMEBUFFER,s.__webglFramebuffer),P.copy(e.viewport),B.copy(e.scissor),L=e.scissorTest,te.viewport(P),te.scissor(B),te.setScissorTest(L),void(R=-1);if(void 0===s.__webglFramebuffer)ie.setupRenderTarget(e);else if(s.__hasExternalTextures)ie.rebindTextures(e,re.get(e.texture).__webglTexture,re.get(e.depthTexture).__webglTexture);else if(e.depthBuffer){const t=e.depthTexture;if(s.__boundDepthTexture!==t){if(null!==t&&re.has(t)&&(e.width!==t.image.width||e.height!==t.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");ie.setupDepthRenderbuffer(e)}}const o=e.texture;(o.isData3DTexture||o.isDataArrayTexture||o.isCompressedArrayTexture)&&(a=!0);const l=re.get(e).__webglFramebuffer;
vendor: 7,995 bytes, line 26
26e.isWebGLCubeRenderTarget?(r=Array.isArray(l[t])?l[t][n]:l[t],i=!0):r=e.samples>0&&!1===ie.useMultisampledRTT(e)?re.get(e).__webglMultisampledFramebuffer:Array.isArray(l)?l[n]:l,P.copy(e.viewport),B.copy(e.scissor),L=e.scissorTest}else P.copy(H).multiplyScalar(O).floor(),B.copy(G).multiplyScalar(O).floor(),L=V;if(0!==n&&(r=We),te.bindFramebuffer(Ae.FRAMEBUFFER,r)&&te.drawBuffers(e,r),te.viewport(P),te.scissor(B),te.setScissorTest(L),i){const r=re.get(e.texture);Ae.framebufferTexture2D(Ae.FRAMEBUFFER,Ae.COLOR_ATTACHMENT0,Ae.TEXTURE_CUBE_MAP_POSITIVE_X+t,r.__webglTexture,n)}else if(a){const r=t;for(let t=0;t<e.textures.length;t++){const i=re.get(e.textures[t]);Ae.framebufferTextureLayer(Ae.FRAMEBUFFER,Ae.COLOR_ATTACHMENT0+t,i.__webglTexture,n,r)}}else if(null!==e&&0!==n){const t=re.get(e.texture);Ae.framebufferTexture2D(Ae.FRAMEBUFFER,Ae.COLOR_ATTACHMENT0,Ae.TEXTURE_2D,t.__webglTexture,n)}R=-1},this.readRenderTargetPixels=function(e,t,n,r,i,a,s,o=0){if(!e||!e.isWebGLRenderTarget)return void dv("WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let l=re.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==s&&(l=l[s]),l){te.bindFramebuffer(Ae.FRAMEBUFFER,l);try{const s=e.textures[o],l=s.format,c=s.type;if(!ee.textureFormatReadable(l))return void dv("WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!ee.textureTypeReadable(c))return void dv("WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&(e.textures.length>1&&Ae.readBuffer(Ae.COLOR_ATTACHMENT0+o),Ae.readPixels(t,n,r,i,be.convert(l),be.convert(c),a))}finally{const e=null!==T?re.get(T).__webglFramebuffer:null;te.bindFramebuffer(Ae.FRAMEBUFFER,e)}}},this.readRenderTargetPixelsAsync=async function(e,t,n,r,i,a,s,o=0){if(!e||!e.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let l=re.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==s&&(l=l[s]),l){if(t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i){te.bindFramebuffer(Ae.FRAMEBUFFER,l);const s=e.textures[o],c=s.format,u=s.type;if(!ee.textureFormatReadable(c))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!ee.textureTypeReadable(u))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const d=Ae.createBuffer();Ae.bindBuffer(Ae.PIXEL_PACK_BUFFER,d),Ae.bufferData(Ae.PIXEL_PACK_BUFFER,a.byteLength,Ae.STREAM_READ),e.textures.length>1&&Ae.readBuffer(Ae.COLOR_ATTACHMENT0+o),Ae.readPixels(t,n,r,i,be.convert(c),be.convert(u),0);const h=null!==T?re.get(T).__webglFramebuffer:null;te.bindFramebuffer(Ae.FRAMEBUFFER,h);const f=Ae.fenceSync(Ae.SYNC_GPU_COMMANDS_COMPLETE,0);return Ae.flush(),await function(e,t){return new Promise(function(n,r){setTimeout(function i(){switch(e.clientWaitSync(t,e.SYNC_FLUSH_COMMANDS_BIT,0)){case e.WAIT_FAILED:r();break;case e.TIMEOUT_EXPIRED:setTimeout(i,4);break;default:n()}},4)})}(Ae,f),Ae.bindBuffer(Ae.PIXEL_PACK_BUFFER,d),Ae.getBufferSubData(Ae.PIXEL_PACK_BUFFER,0,a),Ae.deleteBuffer(d),Ae.deleteSync(f),a}throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(e,t=null,n=0){const r=Math.pow(2,-n),i=Math.floor(e.image.width*r),a=Math.floor(e.image.height*r),s=null!==t?t.x:0,o=null!==t?t.y:0;ie.setTexture2D(e,0),Ae.copyTexSubImage2D(Ae.TEXTURE_2D,n,0,0,s,o,i,a),te.unbindTexture()};const je=Ae.createFramebuffer(),Xe=Ae.createFramebuffer();this.copyTextureToTexture=function(e,t,n=null,r=null,i=0,a=null){let s,o,l,c,u,d,h,f,p;null===a&&(0!==i?(hv("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),a=i,i=0):a=0);const m=e.isCompressedTexture?e.mipmaps[a]:e.image;if(null!==n)s=n.max.x-n.min.x,o=n.max.y-n.min.y,l=n.isBox3?n.max.z-n.min.z:1,c=n.min.x,u=n.min.y,d=n.isBox3?n.min.z:0;else{const t=Math.pow(2,-i);s=Math.floor(m.width*t),o=Math.floor(m.height*t),l=e.isDataArrayTexture?m.depth:e.isData3DTexture?Math.floor(m.depth*t):1,c=0,u=0,d=0}null!==r?(h=r.x,f=r.y,p=r.z):(h=0,f=0,p=0);const g=be.convert(t.format),v=be.convert(t.type);let y;t.isData3DTexture?(ie.setTexture3D(t,0),y=Ae.TEXTURE_3D):t.isDataArrayTexture||t.isCompressedArrayTexture?(ie.setTexture2DArray(t,0),y=Ae.TEXTURE_2D_ARRAY):(ie.setTexture2D(t,0),y=Ae.TEXTURE_2D),Ae.pixelStorei(Ae.UNPACK_FLIP_Y_WEBGL,t.flipY),Ae.pixelStorei(Ae.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),Ae.pixelStorei(Ae.UNPACK_ALIGNMENT,t.unpackAlignment);const _=Ae.getParameter(Ae.UNPACK_ROW_LENGTH),b=Ae.getParameter(Ae.UNPACK_IMAGE_HEIGHT),x=Ae.getParameter(Ae.UNPACK_SKIP_PIXELS),S=Ae.getParameter(Ae.UNPACK_SKIP_ROWS),A=Ae.getParameter(Ae.UNPACK_SKIP_IMAGES);Ae.pixelStorei(Ae.UNPACK_ROW_LENGTH,m.width),Ae.pixelStorei(Ae.UNPACK_IMAGE_HEIGHT,m.height),Ae.pixelStorei(Ae.UNPACK_SKIP_PIXELS,c),Ae.pixelStorei(Ae.UNPACK_SKIP_ROWS,u),Ae.pixelStorei(Ae.UNPACK_SKIP_IMAGES,d);const M=e.isDataArrayTexture||e.isData3DTexture,w=t.isDataArrayTexture||t.isData3DTexture;if(e.isDepthTexture){const n=re.get(e),r=re.get(t),m=re.get(n.__renderTarget),g=re.get(r.__renderTarget);te.bindFramebuffer(Ae.READ_FRAMEBUFFER,m.__webglFramebuffer),te.bindFramebuffer(Ae.DRAW_FRAMEBUFFER,g.__webglFramebuffer);for(let v=0;v<l;v++)M&&(Ae.framebufferTextureLayer(Ae.READ_FRAMEBUFFER,Ae.COLOR_ATTACHMENT0,re.get(e).__webglTexture,i,d+v),Ae.framebufferTextureLayer(Ae.DRAW_FRAMEBUFFER,Ae.COLOR_ATTACHMENT0,re.get(t).__webglTexture,a,p+v)),Ae.blitFramebuffer(c,u,s,o,h,f,s,o,Ae.DEPTH_BUFFER_BIT,Ae.NEAREST);te.bindFramebuffer(Ae.READ_FRAMEBUFFER,null),te.bindFramebuffer(Ae.DRAW_FRAMEBUFFER,null)}else if(0!==i||e.isRenderTargetTexture||re.has(e)){const n=re.get(e),r=re.get(t);te.bindFramebuffer(Ae.READ_FRAMEBUFFER,je),te.bindFramebuffer(Ae.DRAW_FRAMEBUFFER,Xe);for(let e=0;e<l;e++)M?Ae.framebufferTextureLayer(Ae.READ_FRAMEBUFFER,Ae.COLOR_ATTACHMENT0,n.__webglTexture,i,d+e):Ae.framebufferTexture2D(Ae.READ_FRAMEBUFFER,Ae.COLOR_ATTACHMENT0,Ae.TEXTURE_2D,n.__webglTexture,i),w?Ae.framebufferTextureLayer(Ae.DRAW_FRAMEBUFFER,Ae.COLOR_ATTACHMENT0,r.__webglTexture,a,p+e):Ae.framebufferTexture2D(Ae.DRAW_FRAMEBUFFER,Ae.COLOR_ATTACHMENT0,Ae.TEXTURE_2D,r.__webglTexture,a),0!==i?Ae.blitFramebuffer(c,u,s,o,h,f,s,o,Ae.COLOR_BUFFER_BIT,Ae.NEAREST):w?Ae.copyTexSubImage3D(y,a,h,f,p+e,c,u,s,o):Ae.copyTexSubImage2D(y,a,h,f,c,u,s,o);te.bindFramebuffer(Ae.READ_FRAMEBUFFER,null),te.bindFramebuffer(Ae.DRAW_FRAMEBUFFER,null)}else w?e.isDataTexture||e.isData3DTexture?Ae.texSubImage3D(y,a,h,f,p,s,o,l,g,v,m.data):t.isCompressedArrayTexture?Ae.compressedTexSubImage3D(y,a,h,f,p,s,o,l,g,m.data):Ae.texSubImage3D(y,a,h,f,p,s,o,l,g,v,m):e.isDataTexture?Ae.texSubImage2D(Ae.TEXTURE_2D,a,h,f,s,o,g,v,m.data):e.isCompressedTexture?Ae.compressedTexSubImage2D(Ae.TEXTURE_2D,a,h,f,m.width,m.height,g,m.data):Ae.texSubImage2D(Ae.TEXTURE_2D,a,h,f,s,o,g,v,m);Ae.pixelStorei(Ae.UNPACK_ROW_LENGTH,_),Ae.pixelStorei(Ae.UNPACK_IMAGE_HEIGHT,b),Ae.pixelStorei(Ae.UNPACK_SKIP_PIXELS,x),Ae.pixelStorei(Ae.UNPACK_SKIP_ROWS,S),Ae.pixelStorei(Ae.UNPACK_SKIP_IMAGES,A),0===a&&t.generateMipmaps&&Ae.generateMipmap(y),te.unbindTexture()},this.initRenderTarget=function(e){void 0===re.get(e).__webglFramebuffer&&ie.setupRenderTarget(e)},this.initTexture=function(e){e.isCubeTexture?ie.setTextureCube(e,0):e.isData3DTexture?ie.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?ie.setTexture2DArray(e,0):ie.setTexture2D(e,0),te.unbindTexture()},this.resetState=function(){E=0,C=0,T=null,te.reset(),xe.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return $g}get outputColorSpace(){return this._outputColorSpace}
vendor: 8,101 bytes, line 26
26set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=Fv._getDrawingBufferColorSpace(e),t.unpackColorSpace=Fv._getUnpackColorSpace()}}const eR=Object.freeze(Object.defineProperty({__proto__:null,ACESFilmicToneMapping:4,AddEquation:wp,AddOperation:2,AdditiveAnimationBlendMode:Ng,AdditiveBlending:2,AgXToneMapping:6,AlphaFormat:Om,AlwaysCompare:519,AlwaysDepth:1,AlwaysStencilFunc:519,AmbientLight:HM,AnimationAction:ww,AnimationClip:pM,AnimationLoader:class extends _M{constructor(e){super(e)}load(e,t,n,r){const i=this,a=new SM(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(n){try{t(i.parse(JSON.parse(n)))}catch(WL){r?r(WL):dv(WL),i.manager.itemError(e)}},n,r)}parse(e){const t=[];for(let n=0;n<e.length;n++){const r=pM.parse(e[n]);t.push(r)}return t}},AnimationMixer:class extends fv{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,r=e._clip.tracks,i=r.length,a=e._propertyBindings,s=e._interpolants,o=n.uuid,l=this._bindingsByRootAndName;let c=l[o];void 0===c&&(c={},l[o]=c);for(let u=0;u!==i;++u){const e=r[u],i=e.name;let l=c[i];if(void 0!==l)++l.referenceCount,a[u]=l;else{if(l=a[u],void 0!==l){null===l._cacheIndex&&(++l.referenceCount,this._addInactiveBinding(l,o,i));continue}const r=t&&t._propertyBindings[u].binding.parsedPath;l=new vw(Mw.create(n,i,r),e.ValueTypeName,e.getValueSize()),++l.referenceCount,this._addInactiveBinding(l,o,i),a[u]=l}s[u].resultBuffer=l.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0===n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0===--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}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 null!==t&&t<this._nActiveActions}_addInactiveAction(e,t,n){const r=this._actions,i=this._actionsByClip;let a=i[t];if(void 0===a)a={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=a;else{const t=a.knownActions;e._byClipCacheIndex=t.length,t.push(e)}e._cacheIndex=r.length,r.push(e),a.actionByRoot[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],r=e._cacheIndex;n._cacheIndex=r,t[r]=n,t.pop(),e._cacheIndex=null;const i=e._clip.uuid,a=this._actionsByClip,s=a[i],o=s.knownActions,l=o[o.length-1],c=e._byClipCacheIndex;l._byClipCacheIndex=c,o[c]=l,o.pop(),e._byClipCacheIndex=null,delete s.actionByRoot[(e._localRoot||this._root).uuid],0===o.length&&delete a[i],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let n=0,r=t.length;n!==r;++n){const e=t[n];0===--e.referenceCount&&this._removeInactiveBinding(e)}}_lendAction(e){const t=this._actions,n=e._cacheIndex,r=this._nActiveActions++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackAction(e){const t=this._actions,n=e._cacheIndex,r=--this._nActiveActions,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_addInactiveBinding(e,t,n){const r=this._bindingsByRootAndName,i=this._bindings;let a=r[t];void 0===a&&(a={},r[t]=a),a[n]=e,e._cacheIndex=i.length,i.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,r=n.rootNode.uuid,i=n.path,a=this._bindingsByRootAndName,s=a[r],o=t[t.length-1],l=e._cacheIndex;o._cacheIndex=l,t[l]=o,t.pop(),delete s[i],0===Object.keys(s).length&&delete a[r]}_lendBinding(e){const t=this._bindings,n=e._cacheIndex,r=this._nActiveBindings++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackBinding(e){const t=this._bindings,n=e._cacheIndex,r=--this._nActiveBindings,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return void 0===n&&(n=new iM(new Float32Array(2),new Float32Array(2),1,Ew),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,r=--this._nActiveControlInterpolants,i=t[r];e.__cacheIndex=r,t[r]=e,i.__cacheIndex=n,t[n]=i}clipAction(e,t,n){const r=t||this._root,i=r.uuid;let a="string"==typeof e?pM.findByName(r,e):e;const s=null!==a?a.uuid:e,o=this._actionsByClip[s];let l=null;if(void 0===n&&(n=null!==a?a.blendMode:2500),void 0!==o){const e=o.actionByRoot[i];if(void 0!==e&&e.blendMode===n)return e;l=o.knownActions[0],null===a&&(a=l._clip)}if(null===a)return null;const c=new ww(this,a,t,n);return this._bindAction(c,l),this._addInactiveAction(c,s,i),c}existingAction(e,t){const n=t||this._root,r=n.uuid,i="string"==typeof e?pM.findByName(n,e):e,a=i?i.uuid:e,s=this._actionsByClip[a];return void 0!==s&&s.actionByRoot[r]||null}stopAllAction(){const e=this._actions;for(let t=this._nActiveActions-1;t>=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),a=this._accuIndex^=1;for(let l=0;l!==n;++l)t[l]._update(r,e,i,a);const s=this._bindings,o=this._nActiveBindings;for(let l=0;l!==o;++l)s[l].apply(a);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,r=this._actionsByClip,i=r[n];if(void 0!==i){const e=i.knownActions;for(let n=0,r=e.length;n!==r;++n){const r=e[n];this._deactivateAction(r);const i=r._cacheIndex,a=t[t.length-1];r._cacheIndex=null,r._byClipCacheIndex=null,a._cacheIndex=i,t[i]=a,t.pop(),this._removeInactiveBindingsForAction(r)}delete r[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const i in n){const e=n[i].actionByRoot[t];void 0!==e&&(this._deactivateAction(e),this._removeInactiveAction(e))}const r=this._bindingsByRootAndName[t];if(void 0!==r)for(const i in r){const e=r[i];e.restoreOriginalState(),this._removeInactiveBinding(e)}}uncacheAction(e,t){const n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}},AnimationObjectGroup:class{constructor(){this.isAnimationObjectGroup=!0,this.uuid=yv(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let n=0,r=arguments.length;n!==r;++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,r=this._parsedPaths,i=this._bindings,a=i.length;let s,o=e.length,l=this.nCachedObjects_;for(let c=0,u=arguments.length;c!==u;++c){const u=arguments[c],d=u.uuid;let h=t[d];if(void 0===h){h=o++,t[d]=h,e.push(u);for(let e=0,t=a;e!==t;++e)i[e].push(new Mw(u,n[e],r[e]))}else if(h<l){s=e[h];const o=--l,c=e[o];t[c.uuid]=h,e[h]=c,t[d]=o,e[o]=u;for(let e=0,t=a;e!==t;++e){const t=i[e],a=t[o];let s=t[h];t[h]=a,void 0===s&&(s=new Mw(u,n[e],r[e])),t[o]=s}}else e[h]!==s&&dv("AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastru
26cture when reloading scenes.")}this.nCachedObjects_=l}remove(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_;for(let a=0,s=arguments.length;a!==s;++a){const s=arguments[a],o=s.uuid,l=t[o];if(void 0!==l&&l>=i){const a=i++,c=e[a];t[c.uuid]=l,e[l]=c,t[o]=a,e[a]=s;for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[a],i=t[l];t[l]=r,t[a]=i}}}this.nCachedObjects_=i}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_,a=e.length;for(let s=0,o=arguments.length;s!==o;++s){const o=arguments[s].uuid,l=t[o];if(void 0!==l)if(delete t[o],l<i){const s=--i,o=e[s],c=--a,u=e[c];t[o.uuid]=l,e[l]=o,t[u.uuid]=s,e[s]=u,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[s],i=t[c];t[l]=r,t[s]=i,t.pop()}}else{const i=--a,s=e[i];i>0&&(t[s.uuid]=l),e[l]=s,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e];t[l]=t[i],t.pop()}}}this.nCachedObjects_=i}subscribe_(e,t){const n=this._bindingsIndicesByPath;let r=n[e];const i=this._bindings;if(void 0!==r)return i[r];const a=this._paths,s=this._parsedPaths,o=this._objects,l=o.length,c=this.nCachedObjects_,u=new Array(l);r=i.length,n[e]=r,a.push(e),s.push(t),i.push(u);for(let d=c,h=o.length;d!==h;++d){const n=o[d];u[d]=new Mw(n,e,t)}return u}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){const r=this._paths,i=this._parsedPaths,a=this._bindings,s=a.length-1,o=a[s];t[e[s]]=n,a[n]=o,a.pop(),i[n]=i[s],i.pop(),r[n]=r[s],r.pop()}}},AnimationUtils:class{static convertArray(e,t){return ZA(e,t)}static isTypedArray(e){return iv(e)}static getKeyframeOrder(e){return $A(e)}static sortedArray(e,t,n){return eM(e,t,n)}static flattenJSON(e,t,n,r){tM(e,t,n,r)}static subclip(e,t,n,r,i=30){return function(e,t,n,r,i=30){const a=e.clone();a.name=t;const s=[];for(let l=0;l<a.tracks.length;++l){const e=a.tracks[l],t=e.getValueSize(),o=[],c=[];for(let a=0;a<e.times.length;++a){const s=e.times[a]*i;if(!(s<n||s>=r)){o.push(e.times[a]);for(let n=0;n<t;++n)c.push(e.values[a*t+n])}}0!==o.length&&(e.times=ZA(o,e.times.constructor),e.values=ZA(c,e.values.constructor),s.push(e))}a.tracks=s;let o=1/0;for(let l=0;l<a.tracks.length;++l)o>a.tracks[l].times[0]&&(o=a.tracks[l].times[0]);for(let l=0;l<a.tracks.length;++l)a.tracks[l].shift(-1*o);return a.resetDuration(),a}(e,t,n,r,i)}static makeClipAdditive(e,t=0,n=e,r=30){return function(e,t=0,n=e,r=30){r<=0&&(r=30);const i=n.tracks.length,a=t/r;for(let s=0;s<i;++s){const t=n.tracks[s],r=t.ValueTypeName;if("bool"===r||"string"===r)continue;const i=e.tracks.find(function(e){return e.name===t.name&&e.ValueTypeName===r});if(void 0===i)continue;let o=0;const l=t.getValueSize();t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(o=l/3);let c=0;const u=i.getValueSize();i.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=u/3);const d=t.times.length-1;let h;if(a<=t.times[0]){const e=o,n=l-o;h=t.values.slice(e,n)}else if(a>=t.times[d]){const e=d*l+o,n=e+l-o;h=t.values.slice(e,n)}else{const e=t.createInterpolant(),n=o,r=l-o;e.evaluate(a),h=e.resultBuffer.slice(n,r)}"quaternion"===r&&(new Ev).fromArray(h).normalize().conjugate().toArray(h);const f=i.times.length;for(let e=0;e<f;++e){const t=e*u+c;if("quaternion"===r)Ev.multiplyQuaternionsFlat(i.values,t,h,0,i.values,t);else{const e=u-2*c;for(let n=0;n<e;++n)i.values[t+n]-=h[n]}}}return e.blendMode=Ng,e}(e,t,n,r)}},ArcCurve:TS,ArrayCamera:aw,ArrowHelper:class extends Qy{constructor(e=new Cv(0,0,1),t=new Cv(0,0,0),n=1,r=16776960,i=.2*n,a=.2*i){super(),this.type="ArrowHelper",void 0===sE&&(sE=new z_,sE.setAttribute("position",new B_([0,0,0,0,1,0],3)),oE=new yS(.5,1,5,1),oE.translate(0,-.5,0)),this.position.copy(t),this.line=new Qx(sE,new Vx({color:r,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Z_(oE,new b_({color:r,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,i,a)}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{aE.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(aE,t)}}setLength(e,t=.2*e,n=.2*t){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()}},AttachedBindMode:om,Audio:hw,AudioAnalyser:class{constructor(e,t=2
vendor: 50,649 bytes, line 26
26048){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}},AudioContext:tw,AudioListener:class extends Qy{constructor(){super(),this.type="AudioListener",this.context=tw.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new sw}getInput(){return this.gain}removeFilter(){return null!==this.filter&&(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 null!==this.filter?(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(ow,lw,cw),uw.set(0,0,-1).applyQuaternion(lw),dw.set(0,1,0).applyQuaternion(lw),t.positionX){const e=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(ow.x,e),t.positionY.linearRampToValueAtTime(ow.y,e),t.positionZ.linearRampToValueAtTime(ow.z,e),t.forwardX.linearRampToValueAtTime(uw.x,e),t.forwardY.linearRampToValueAtTime(uw.y,e),t.forwardZ.linearRampToValueAtTime(uw.z,e),t.upX.linearRampToValueAtTime(dw.x,e),t.upY.linearRampToValueAtTime(dw.y,e),t.upZ.linearRampToValueAtTime(dw.z,e)}else t.setPosition(ow.x,ow.y,ow.z),t.setOrientation(uw.x,uw.y,uw.z,dw.x,dw.y,dw.z)}},AudioLoader:class extends _M{constructor(e){super(e)}load(e,t,n,r){const i=this,a=new SM(this.manager);function s(t){r?r(t):dv(t),i.manager.itemError(e)}a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(e){try{const n=e.slice(0);tw.getContext().decodeAudioData(n,function(e){t(e)}).catch(s)}catch(WL){s(WL)}},n,r)}},AxesHelper:class extends tS{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=new z_;n.setAttribute("position",new B_(t,3)),n.setAttribute("color",new B_([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(n,new Vx({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(e,t,n){const r=new g_,i=this.geometry.attributes.color.array;return r.set(e),r.toArray(i,0),r.toArray(i,3),r.set(t),r.toArray(i,6),r.toArray(i,9),r.set(n),r.toArray(i,12),r.toArray(i,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}},BackSide:1,BasicDepthPacking:3200,BasicShadowMap:0,BatchedMesh:Gx,Bone:$b,BooleanKeyframeTrack:oM,Box2:class{constructor(e=new wv(1/0,1/0),t=new wv(-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=Nw.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,Nw).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)}},Box3:Qv,Box3Helper:class extends tS{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]),r=new z_;r.setIndex(new R_(n,1)),r.setAttribute("position",new B_([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),super(r,new Vx({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()}},BoxGeometry:eb,BoxHelper:class extends tS{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]),r=new Float32Array(24),i=new z_;i.setIndex(new R_(n,1)),i.setAttribute("position",new R_(r,3)),super(i,new Vx({color:t,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(){if(void 0!==this.object&&iE.setFromObject(this.object),iE.isEmpty())return;const e=iE.min,t=iE.max,n=this.geometry.attributes.position,r=n.array;r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=e.x,r[4]=t.y,r[5]=t.z,r[6]=e.x,r[7]=e.y,r[8]=t.z,r[9]=t.x,r[10]=e.y,r[11]=t.z,r[12]=t.x,r[13]=t.y,r[14]=e.z,r[15]=e.x,r[16]=t.y,r[17]=e.z,r[18]=e.x,r[19]=e.y,r[20]=e.z,r[21]=t.x,r[22]=e.y,r[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()}},BufferAttribute:R_,BufferGeometry:z_,BufferGeometryLoader:YM,ByteType:Em,Cache:gM,Camera:sb,CameraHelper:class extends tS{constructor(e){const t=new z_,n=new Vx({color:16777215,vertexColors:!0,toneMapped:!1}),r=[],i=[],a={};function s(e,t){o(e),o(t)}function o(e){r.push(0,0,0),i.push(0,0,0),void 0===a[e]&&(a[e]=[]),a[e].push(r.length/3-1)}s("n1","n2"),s("n2","n4"),s("n4","n3"),s("n3","n1"),s("f1","f2"),s("f2","f4"),s("f4","f3"),s("f3","f1"),s("n1","f1"),s("n2","f2"),s("n3","f3"),s("n4","f4"),s("p","n1"),s("p","n2"),s("p","n3"),s("p","n4"),s("u1","u2"),s("u2","u3"),s("u3","u1"),s("c","t"),s("p","c"),s("cn1","cn2"),s("cn3","cn4"),s("cf1","cf2"),s("cf3","cf4"),t.setAttribute("position",new B_(r,3)),t.setAttribute("color",new B_(i,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=a,this.update();const l=new g_(16755200),c=new g_(16711680),u=new g_(43775),d=new g_(16777215),h=new g_(3355443);this.setColors(l,c,u,d,h)}setColors(e,t,n,r,i){const a=this.geometry.getAttribute("color");return a.setXYZ(0,e.r,e.g,e.b),a.setXYZ(1,e.r,e.g,e.b),a.setXYZ(2,e.r,e.g,e.b),a.setXYZ(3,e.r,e.g,e.b),a.setXYZ(4,e.r,e.g,e.b),a.setXYZ(5,e.r,e.g,e.b),a.setXYZ(6,e.r,e.g,e.b),a.setXYZ(7,e.r,e.g,e.b),a.setXYZ(8,e.r,e.g,e.b),a.setXYZ(9,e.r,e.g,e.b),a.setXYZ(10,e.r,e.g,e.b),a.setXYZ(11,e.r,e.g,e.b),a.setXYZ(12,e.r,e.g,e.b),a.setXYZ(13,e.r,e.g,e.b),a.setXYZ(14,e.r,e.g,e.b),a.setXYZ(15,e.r,e.g,e.b),a.setXYZ(16,e.r,e.g,e.b),a.setXYZ(17,e.r,e.g,e.b),a.setXYZ(18,e.r,e.g,e.b),a.setXYZ(19,e.r,e.g,e.b),a.setXYZ(20,e.r,e.g,e.b),a.setXYZ(21,e.r,e.g,e.b),a.setXYZ(22,e.r,e.g,e.b),a.setXYZ(23,e.r,e.g,e.b),a.setXYZ(24,t.r,t.g,t.b),a.setXYZ(25,t.r,t.g,t.b),a.setXYZ(26,t.r,t.g,t.b),a.setXYZ(27,t.r,t.g,t.b),a.setXYZ(28,t.r,t.g,t.b),a.setXYZ(29,t.r,t.g,t.b),a.setXYZ(30,t.r,t.g,t.b),a.setXYZ(31,t.r,t.g,t.b),a.setXYZ(32,n.r,n.g,n.b),a.setXYZ(33,n.r,n.g,n.b),a.setXYZ(34,n.r,n.g,n.b),a.setXYZ(35,n.r,n.g,n.b),a.setXYZ(36,n.r,n.g,n.b),a.setXYZ(37,n.r,n.g,n.b),a.setXYZ(38,r.r,r.g,r.b),a.setXYZ(39,r.r,r.g,r.b),a.setXYZ(40,i.r,i.g,i.b),a.setXYZ(41,i.r,i.g,i.b),a.setXYZ(42,i.r,i.g,i.b),a.setXYZ(43,i.r,i.g,i.b),a.setXYZ(44,i.r,i.g,i.b),a.setXYZ(45,i.r,i.g,i.b),a.setXYZ(46,i.r,i.g,i.b),a.setXYZ(47,i.r,i.g,i.b),a.setXYZ(48,i.r,i.g,i.b),a.setXYZ(49,i.r,i.g,i.b),a.needsUpdate=!0,this}update(){const e=this.geometry,t=this.pointMap;let n,r;if(nE.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),!0===this.camera.reversedDepth)n=1,r=0;else if(this.camera.coordinateSystem===$g)n=-1,r=1;else{if(this.camera.coordinateSystem!==ev)throw new Error("THREE.CameraHelper.update(): Invalid coordinate system: "+this.camera.coordinateSystem);n=0,r=1}rE("c",t,e,nE,0,0,n),rE("t",t,e,nE,0,0,r),rE("n1",t,e,nE,-1,-1,n),rE("n2",t,e,nE,1,-1,n),rE("n3",t,e,nE,-1,1,n),rE("n4",t,e,nE,1,1,n),rE("f1",t,e,nE,-1,-1,r),rE("f2",t,e,nE,1,-1,r),rE("f3",t,e,nE,-1,1,r),rE("f4",t,e,nE,1,1,r),rE("u1",t,e,nE,.7,1.1,n),rE("u2",t,e,nE,-.7,1.1,n),rE("u3",t,e,nE,0,2,n),rE("cf1",t,e,nE,-1,0,r),rE("cf2",t,e,nE,1,0,r),rE("cf3",t,e,nE,0,-1,r),rE("cf4",t,e,nE,0,1,r),rE("cn1",t,e,nE,-1,0,n),rE("cn2",t,e,nE,1,0,n),rE("cn3",t,e,nE,0,-1,n),rE("cn4",t,e,nE,0,1,n),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}},CanvasTexture:class extends jv{constructor(e,t,n,r,i,a,s,o,l){super(e,t,n,r,i,a,s,o,l),this.isCanvasTexture=!0,this.needsUpdate=!0}},CapsuleGeometry:mS,CatmullRomCurve3:DS,CineonToneMapping:3,CircleGeometry:gS,ClampToEdgeWrapping:gm,Clock:sw,Color:g_,ColorKeyframeTrack:lM,ColorManagement:Fv,CompressedArrayTexture:class extends dS{constructor(e,t,n,r,i,a){super(e,t,n,i,a),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=gm,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}},CompressedCubeTexture:class extends dS{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,um),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}},CompressedTexture:dS,CompressedTextureLoader:class extends _M{constructor(e){super(e)}load(e,t,n,r){const i=this,a=[],s=new dS,o=new SM(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(i.withCredentials);let l=0;function c(c){o.load(e[c],function(e){const n=i.parse(e,!0);a[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},l+=1,6===l&&(1===n.mipmapCount&&(s.minFilter=xm),s.image=a,s.format=n.format,s.needsUpdate=!0,t&&t(s))},n,r)}if(Array.isArray(e))for(let u=0,d=e.length;u<d;++u)c(u);else o.load(e,function(e){const n=i.parse(e,!0);if(n.isCubemap){const e=n.mipmaps.length/n.mipmapCount;for(let t=0;t<e;t++){a[t]={mipmaps:[]};for(let e=0;e<n.mipmapCount;e++)a[t].mipmaps.push(n.mipmaps[t*n.mipmapCount+e]),a[t].format=n.format,a[t].width=n.width,a[t].height=n.height}s.image=a}else s.image.width=n.width,s.image.height=n.height,s.mipmaps=n.mipmaps;1===n.mipmapCount&&(s.minFilter=xm),s.format=n.format,s.needsUpdate=!0,t&&t(s)},n,r);return s}},ConeGeometry:yS,ConstantAlphaFactor:213,ConstantColorFactor:211,Controls:class extends fv{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){void 0!==e?(null!==this.domElement&&this.disconnect(),this.domElement=e):uv("Controls: connect() now requires an element.")}disconnect(){}dispose(){}update(){}},CubeCamera:hb,CubeDepthTexture:fS,CubeReflectionMapping:um,CubeRefractionMapping:dm,CubeTexture:fb,CubeTextureLoader:wM,CubeUVReflectionMapping:pm,CubicBezierCurve:OS,CubicBezierCurve3:kS,CubicInterpolant:rM,CullFaceBack:1,CullFaceFront:2,CullFaceFrontBack:3,CullFaceNone:0,Curve:ES,CurvePath:XS,CustomBlending:5,CustomToneMapping:5,CylinderGeometry:vS,Cylindrical:class{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)}},Data3DTexture:qv,DataArrayTexture:Kv,DataTexture:ex,DataTextureLoader:EM,DataUtils:w_,DecrementStencilOp:7683,DecrementWrapStencilOp:34056,DefaultLoadingManager:yM,DepthFormat:Hm,DepthStencilFormat:Gm,DepthTexture:hS,DetachedBindMode:lm,DirectionalLight:zM,DirectionalLightHelper:class extends Qy{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="DirectionalLightHelper",void 0===t&&(t=1);let r=new z_;r.setAttribute("position",new B_([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const i=new Vx({fog:!1,toneMapped:!1});this.lightPlane=new Qx(r,i),this.add(this.lightPlane),r=new z_,r.setAttribute("position",new B_([0,0,0,0,0,1],3)),this.targetLine=new Qx(r,i),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),Zw.setFromMatrixPosition(this.light.matrixWorld),$w.setFromMatrixPosition(this.light.target.matrixWorld),eE.subVectors($w,Zw),this.lightPlane.lookAt($w),void 0!==this.color?(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($w),this.targetLine.scale.z=eE.length()}},DiscreteInterpolant:aM,DodecahedronGeometry:bS,DoubleSide:2,DstAlphaFactor:206,DstColorFactor:208,DynamicCopyUsage:35050,DynamicDrawUsage:35048,DynamicReadUsage:35049,EdgesGeometry:wS,EllipseCurve:CS,EqualCompare:514,EqualDepth:4,EqualStencilFunc:514,EquirectangularReflectionMapping:hm,EquirectangularRefractionMapping:fm,Euler:Dy,EventDispatcher:fv,ExternalTexture:pS,ExtrudeGeometry:MA,FileLoader:SM,Float16BufferAttribute:class extends R_{constructor(e,t,n){super(new Uint16Array(e),t,n),this.isFloat16BufferAttribute=!0}getX(e){let t=M_(this.array[e*this.itemSize]);return this.normalized&&(t=Sv(t,this.array)),t}setX(e,t){return this.normalized&&(t=Av(t,this.array)),this.array[e*this.itemSize]=A_(t),this}getY(e){let t=M_(this.array[e*this.itemSize+1]);return this.normalized&&(t=Sv(t,this.array)),t}setY(e,t){return this.normalized&&(t=Av(t,this.array)),this.array[e*this.itemSize+1]=A_(t),this}getZ(e){let t=M_(this.array[e*this.itemSize+2]);return this.normalized&&(t=Sv(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Av(t,this.array)),this.array[e*this.itemSize+2]=A_(t),this}getW(e){let t=M_(this.array[e*this.itemSize+3]);return this.normalized&&(t=Sv(t,this.array)),t}setW(e,t){return this.normalized&&(t=Av(t,this.array)),this.array[e*this.itemSize+3]=A_(t),this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Av(t,this.array),n=Av(n,this.array)),this.array[e+0]=A_(t),this.array[e+1]=A_(n),this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=Av(t,this.array),n=Av(n,this.array),r=Av(r,this.array)),this.array[e+0]=A_(t),this.array[e+1]=A_(n),this.array[e+2]=A_(r),this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.normalized&&(t=Av(t,this.array),n=Av(n,this.array),r=Av(r,this.array),i=Av(i,this.array)),this.array[e+0]=A_(t),this.array[e+1]=A_(n),this.array[e+2]=A_(r),this.array[e+3]=A_(i),this}},Float32BufferAttribute:B_,FloatType:Pm,Fog:_b,FogExp2:yb,FramebufferTexture:class extends jv{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=ym,this.minFilter=ym,this.generateMipmaps=!1,this.needsUpdate=!0}},FrontSide:0,Frustum:bx,FrustumArray:Ax,GLBufferAttribute:class{constructor(e,t,n,r,i,a=!1){this.isGLBufferAttribute=!0,this.name="",this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=r,this.count=i,this.normalized=a,this.version=0}set needsUpdate(e){!0===e&&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}},GLSL1:"100",GLSL3:Zg,GreaterCompare:516,GreaterDepth:6,GreaterEqualCompare:Kg,GreaterEqualDepth:5,GreaterEqualStencilFunc:518,GreaterStencilFunc:516,GridHelper:class extends tS{constructor(e=10,t=10,n=4473924,r=8947848){n=new g_(n),r=new g_(r);const i=t/2,a=e/t,s=e/2,o=[],l=[];for(let u=0,d=0,h=-s;u<=t;u++,h+=a){o.push(-s,0,h,s,0,h),o.push(h,0,-s,h,0,s);const e=u===i?n:r;e.toArray(l,d),d+=3,e.toArray(l,d),d+=3,e.toArray(l,d),d+=3,e.toArray(l,d),d+=3}const c=new z_;c.setAttribute("position",new B_(o,3)),c.setAttribute("color",new B_(l,3)),super(c,new Vx({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}},Group:mb,HalfFloatType:Bm,HemisphereLight:RM,HemisphereLightHelper:class extends Qy{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="HemisphereLightHelper";const r=new TA(t);r.rotateY(.5*Math.PI),this.material=new b_({wireframe:!0,fog:!1,toneMapped:!1}),void 0===this.color&&(this.material.vertexColors=!0);const i=r.getAttribute("position"),a=new Float32Array(3*i.count);r.setAttribute("color",new R_(a,3)),this.add(new Z_(r,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const e=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{const t=e.geometry.getAttribute("color");qw.copy(this.light.color),Qw.copy(this.light.groundColor);for(let e=0,n=t.count;e<n;e++){const r=e<n/2?qw:Qw;t.setXYZ(e,r.r,r.g,r.b)}t.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(Kw.setFromMatrixPosition(this.light.matrixWorld).negate())}},IcosahedronGeometry:EA,ImageBitmapLoader:$M,ImageLoader:MM,ImageUtils:kv,IncrementStencilOp:7682,IncrementWrapStencilOp:34055,InstancedBufferAttribute:ix,InstancedBufferGeometry:JM,InstancedInterleavedBuffer:class extends xb{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}},InstancedMesh:hx,Int16BufferAttribute:class extends R_{constructor(e,t,n){super(new Int16Array(e),t,n)}},Int32BufferAttribute:class extends R_{constructor(e,t,n){super(new Int32Array(e),t,n)}},Int8BufferAttribute:class extends R_{constructor(e,t,n){super(new Int8Array(e),t,n)}},IntType:Rm,InterleavedBuffer:xb,InterleavedBufferAttribute:Ab,Interpolant:nM,InterpolateDiscrete:Ig,InterpolateLinear:Pg,InterpolateSmooth:Bg,InterpolationSamplingMode:{NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FIRST:"first",EITHER:"either"},InterpolationSamplingType:{PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"},InvertStencilOp:5386,KeepStencilOp:Gg,KeyframeTrack:sM,LOD:Gb,LatheGeometry:CA,Layers:Fy,LessCompare:513,LessDepth:2,LessEqualCompare:Xg,LessEqualDepth:3,LessEqualStencilFunc:515,LessStencilFunc:513,Light:TM,LightProbe:WM,Line:Qx,Line3:class{constructor(e=new Cv,t=new Cv){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){Uw.subVectors(e,this.start),Ow.subVectors(this.end,this.start);const n=Ow.dot(Ow);let r=Ow.dot(Uw)/n;return t&&(r=_v(r,0,1)),r}closestPointToPoint(e,t,n){const r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}distanceSqToLine3(e,t=Gw,n=Vw){const r=1e-8*1e-8;let i,a;const s=this.start,o=e.start,l=this.end,c=e.end;kw.subVectors(l,s),zw.subVectors(c,o),Hw.subVectors(s,o);const u=kw.dot(kw),d=zw.dot(zw),h=zw.dot(Hw);if(u<=r&&d<=r)return t.copy(s),n.copy(o),t.sub(n),t.dot(t);if(u<=r)i=0,a=h/d,a=_v(a,0,1);else{const e=kw.dot(Hw);if(d<=r)a=0,i=_v(-e/u,0,1);else{const t=kw.dot(zw),n=u*d-t*t;i=0!==n?_v((t*h-e*d)/n,0,1):0,a=(t*i+h)/d,a<0?(a=0,i=_v(-e/u,0,1)):a>1&&(a=1,i=_v((t-e)/u,0,1))}}return t.copy(s).add(kw.multiplyScalar(i)),n.copy(o).add(zw.multiplyScalar(a)),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)}},LineBasicMaterial:Vx,LineCurve:zS,LineCurve3:HS,LineDashedMaterial:QA,LineLoop:nS,LineSegments:tS,LinearFilter:xm,LinearInterpolant:iM,LinearMipMapLinearFilter:Mm,LinearMipMapNearestFilter:1007,LinearMipmapLinearFilter:Am,LinearMipmapNearestFilter:Sm,LinearSRGBColorSpace:kg,LinearToneMapping:1,LinearTransfer:zg,Loader:_M,LoaderUtils:XM,LoadingManager:vM,LoopOnce:2200,LoopPingPong:2202,LoopRepeat:2201,MOUSE:yp,Material:__,MaterialLoader:jM,MathUtils:Mv,Matrix2:Fw,Matrix3:Iv,Matrix4:My,MaxEquation:104,Mesh:Z_,MeshBasicMaterial:b_,MeshDepthMaterial:YA,MeshDistanceMaterial:KA,MeshLambertMaterial:JA,MeshMatcapMaterial:qA,MeshNormalMaterial:XA,MeshPhongMaterial:WA,MeshPhysicalMaterial:VA,MeshStandardMaterial:GA,MeshToonMaterial:jA,MinEquation:103,MirroredRepeatWrapping:vm,MixOperation:1,MultiplyBlending:4,MultiplyOperation:0,NearestFilter:ym,NearestMipMapLinearFilter:1005,NearestMipMapNearestFilter:1004,NearestMipmapLinearFilter:bm,NearestMipmapNearestFilter:_m,NeutralToneMapping:7,NeverCompare:512,NeverDepth:0,NeverStencilFunc:512,NoBlending:0,NoColorSpace:Ug,NoNormalPacking:"",NoToneMapping:0,NormalAnimationBlendMode:2500,NormalBlending:1,NormalGAPacking:"ga",NormalRGPacking:"rg",NotEqualCompare:517,NotEqualDepth:7,NotEqualStencilFunc:517,NumberKeyframeTrack:cM,Object3D:Qy,ObjectLoader:class extends _M{constructor(e){super(e)}load(e,t,n,r){const i=this,a=""===this.path?XM.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||a;const s=new SM(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(n){let a=null;try{a=JSON.parse(n)}catch(dv){return void 0!==r&&r(dv),void dv("ObjectLoader: Can't parse "+e+".",dv.message)}const s=a.metadata;if(void 0===s||void 0===s.type||"geometry"===s.type.toLowerCase())return void 0!==r&&r(new Error("THREE.ObjectLoader: Can't load "+e)),void dv("ObjectLoader: Can't load "+e);i.parse(a,t)},n,r)}async loadAsync(e,t){const n=""===this.path?XM.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||n;const r=new SM(this.manager);r.setPath(this.path),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials);const i=await r.loadAsync(e,t),a=JSON.parse(i),s=a.metadata;if(void 0===s||void 0===s.type||"geometry"===s.type.toLowerCase())throw new Error("THREE.ObjectLoader: Can't load "+e);return await this.parseAsync(a)}parse(e,t){const n=this.parseAnimations(e.animations),r=this.parseShapes(e.shapes),i=this.parseGeometries(e.geometries,r),a=this.parseImages(e.images,function(){void 0!==t&&t(l)}),s=this.parseTextures(e.textures,a),o=this.parseMaterials(e.materials,s),l=this.parseObject(e.object,i,o,s,n),c=this.parseSkeletons(e.skeletons,l);if(this.bindSkeletons(l,c),this.bindLightTargets(l),void 0!==t){let e=!1;for(const t in a)if(a[t].data instanceof HTMLImageElement){e=!0;break}!1===e&&t(l)}return l}async parseAsync(e){const t=this.parseAnimations(e.animations),n=this.parseShapes(e.shapes),r=this.parseGeometries(e.geometries,n),i=await this.parseImagesAsync(e.images),a=this.parseTextures(e.textures,i),s=this.parseMaterials(e.materials,a),o=this.parseObject(e.object,r,s,a,t),l=this.parseSkeletons(e.skeletons,o);return this.bindSkeletons(o,l),this.bindLightTargets(o),o}parseShapes(e){const t={};if(void 0!==e)for(let n=0,r=e.length;n<r;n++){const r=(new YS).fromJSON(e[n]);t[r.uuid]=r}return t}parseSkeletons(e,t){const n={},r={};if(t.traverse(function(e){e.isBone&&(r[e.uuid]=e)}),void 0!==e)for(let i=0,a=e.length;i<a;i++){const t=(new rx).fromJSON(e[i],r);n[t.uuid]=t}return n}parseGeometries(e,t){const n={};if(void 0!==e){const r=new YM;for(let i=0,a=e.length;i<a;i++){let a;const s=e[i];switch(s.type){case"BufferGeometry":case"InstancedBufferGeometry":a=r.parse(s);break;default:s.type in kA?a=kA[s.type].fromJSON(s,t):uv(`ObjectLoader: Unsupported geometry type "${s.type}"`)}a.uuid=s.uuid,void 0!==s.name&&(a.name=s.name),void 0!==s.userData&&(a.userData=s.userData),n[s.uuid]=a}}return n}parseMaterials(e,t){const n={},r={};if(void 0!==e){const i=new jM;i.setTextures(t);for(let t=0,a=e.length;t<a;t++){const a=e[t];void 0===n[a.uuid]&&(n[a.uuid]=i.parse(a)),r[a.uuid]=n[a.uuid]}}return r}parseAnimations(e){const t={};if(void 0!==e)for(let n=0;n<e.length;n++){const r=e[n],i=pM.parse(r);t[i.uuid]=i}return t}parseImages(e,t){const n=this,r={};let i;function a(e){if("string"==typeof e){const t=e;return function(e){return n.manager.itemStart(e),i.load(e,function(){n.manager.itemEnd(e)},void 0,function(){n.manager.itemError(e),n.manager.itemEnd(e)})}(/^(\/\/)|([a-z]+:(\/\/)?)/i.test(t)?t:n.resourcePath+t)}return e.data?{data:rv(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){const n=new vM(t);i=new MM(n),i.setCrossOrigin(this.crossOrigin);for(let t=0,i=e.length;t<i;t++){const n=e[t],i=n.url;if(Array.isArray(i)){const e=[];for(let t=0,n=i.length;t<n;t++){const n=a(i[t]);null!==n&&(n instanceof HTMLImageElement?e.push(n):e.push(new ex(n.data,n.width,n.height)))}r[n.uuid]=new Hv(e)}else{const e=a(n.url);r[n.uuid]=new Hv(e)}}}return r}async parseImagesAsync(e){const t=this,n={};let r;async function i(e){if("string"==typeof e){const n=e,i=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(n)?n:t.resourcePath+n;return await r.loadAsync(i)}return e.data?{data:rv(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){r=new MM(this.manager),r.setCrossOrigin(this.crossOrigin);for(let t=0,r=e.length;t<r;t++){const r=e[t],a=r.url;if(Array.isArray(a)){const e=[];for(let t=0,n=a.length;t<n;t++){const n=a[t],r=await i(n);null!==r&&(r instanceof HTMLImageElement?e.push(r):e.push(new ex(r.data,r.width,r.height)))}n[r.uuid]=new Hv(e)}else{const e=await i(r.url);n[r.uuid]=new Hv(e)}}}return n}parseTextures(e,t){function n(e,t){return"number"==typeof e?e:(uv("ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}const r={};if(void 0!==e)for(let i=0,a=e.length;i<a;i++){const a=e[i];void 0===a.image&&uv('ObjectLoader: No "image" specified for',a.uuid),void 0===t[a.image]&&uv("ObjectLoader: Undefined image",a.image);const s=t[a.image],o=s.data;let l;Array.isArray(o)?(l=new fb,6===o.length&&(l.needsUpdate=!0)):(l=o&&o.data?new ex:new jv,o&&(l.needsUpdate=!0)),l.source=s,l.uuid=a.uuid,void 0!==a.name&&(l.name=a.name),void 0!==a.mapping&&(l.mapping=n(a.mapping,KM)),void 0!==a.channel&&(l.channel=a.channel),void 0!==a.offset&&l.offset.fromArray(a.offset),void 0!==a.repeat&&l.repeat.fromArray(a.repeat),void 0!==a.center&&l.center.fromArray(a.center),void 0!==a.rotation&&(l.rotation=a.rotation),void 0!==a.wrap&&(l.wrapS=n(a.wrap[0],qM),l.wrapT=n(a.wrap[1],qM)),void 0!==a.format&&(l.format=a.format),void 0!==a.internalFormat&&(l.internalFormat=a.internalFormat),void 0!==a.type&&(l.type=a.type),void 0!==a.colorSpace&&(l.colorSpace=a.colorSpace),void 0!==a.minFilter&&(l.minFilter=n(a.minFilter,QM)),void 0!==a.magFilter&&(l.magFilter=n(a.magFilter,QM)),void 0!==a.anisotropy&&(l.anisotropy=a.anisotropy),void 0!==a.flipY&&(l.flipY=a.flipY),void 0!==a.generateMipmaps&&(l.generateMipmaps=a.generateMipmaps),void 0!==a.premultiplyAlpha&&(l.premultiplyAlpha=a.premultiplyAlpha),void 0!==a.unpackAlignment&&(l.unpackAlignment=a.unpackAlignment),void 0!==a.compareFunction&&(l.compareFunction=a.compareFunction),void 0!==a.userData&&(l.userData=a.userData),r[a.uuid]=l}return r}parseObject(e,t,n,r,i){let a,s,o;function l(e){return void 0===t[e]&&uv("ObjectLoader: Undefined geometry",e),t[e]}function c(e){if(void 0!==e){if(Array.isArray(e)){const t=[];for(let r=0,i=e.length;r<i;r++){const i=e[r];void 0===n[i]&&uv("ObjectLoader: Undefined material",i),t.push(n[i])}return t}return void 0===n[e]&&uv("ObjectLoader: Undefined material",e),n[e]}}function u(e){return void 0===r[e]&&uv("ObjectLoader: Undefined texture",e),r[e]}switch(e.type){case"Scene":a=new bb,void 0!==e.background&&(Number.isInteger(e.background)?a.background=new g_(e.background):a.background=u(e.background)),void 0!==e.environment&&(a.environment=u(e.environment)),void 0!==e.fog&&("Fog"===e.fog.type?a.fog=new _b(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(a.fog=new yb(e.fog.color,e.fog.density)),""!==e.fog.name&&(a.fog.name=e.fog.name)),void 0!==e.backgroundBlurriness&&(a.backgroundBlurriness=e.backgroundBlurriness),void 0!==e.backgroundIntensity&&(a.backgroundIntensity=e.backgroundIntensity),void 0!==e.backgroundRotation&&a.backgroundRotation.fromArray(e.backgroundRotation),void 0!==e.environmentIntensity&&(a.environmentIntensity=e.environmentIntensity),void 0!==e.environmentRotation&&a.environmentRotation.fromArray(e.environmentRotation);break;case"PerspectiveCamera":a=new ub(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(a.focus=e.focus),void 0!==e.zoom&&(a.zoom=e.zoom),void 0!==e.filmGauge&&(a.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(a.filmOffset=e.filmOffset),void 0!==e.view&&(a.view=Object.assign({},e.view));break;case"OrthographicCamera":a=new OM(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(a.zoom=e.zoom),void 0!==e.view&&(a.view=Object.assign({},e.view));break;case"AmbientLight":a=new HM(e.color,e.intensity);break;case"DirectionalLight":a=new zM(e.color,e.intensity),a.target=e.target||"";break;case"PointLight":a=new UM(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":a=new GM(e.color,e.intensity,e.width,e.height);break;case"SpotLight":a=new FM(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay),a.target=e.target||"";break;case"HemisphereLight":a=new RM(e.color,e.groundColor,e.intensity);break;case"LightProbe":const t=(new VM).fromArray(e.sh);a=new WM(t,e.intensity);break;case"SkinnedMesh":s=l(e.geometry),o=c(e.material),a=new Zb(s,o),void 0!==e.bindMode&&(a.bindMode=e.bindMode),void 0!==e.bindMatrix&&a.bindMatrix.fromArray(e.bindMatrix),void 0!==e.skeleton&&(a.skeleton=e.skeleton);break;case"Mesh":s=l(e.geometry),o=c(e.material),a=new Z_(s,o);break;case"InstancedMesh":s=l(e.geometry),o=c(e.material);const n=e.count,r=e.instanceMatrix,i=e.instanceColor;a=new hx(s,o,n),a.instanceMatrix=new ix(new Float32Array(r.array),16),void 0!==i&&(a.instanceColor=new ix(new Float32Array(i.array),i.itemSize));break;case"BatchedMesh":s=l(e.geometry),o=c(e.material),a=new Gx(e.maxInstanceCount,e.maxVertexCount,e.maxIndexCount,o),a.geometry=s,a.perObjectFrustumCulled=e.perObjectFrustumCulled,a.sortObjects=e.sortObjects,a._drawRanges=e.drawRanges,a._reservedRanges=e.reservedRanges,a._geometryInfo=e.geometryInfo.map(e=>{let t=null,n=null;return void 0!==e.boundingBox&&(t=(new Qv).fromJSON(e.boundingBox)),void 0!==e.boundingSphere&&(n=(new my).fromJSON(e.boundingSphere)),{...e,boundingBox:t,boundingSphere:n}}),a._instanceInfo=e.instanceInfo,a._availableInstanceIds=e._availableInstanceIds,a._availableGeometryIds=e._availableGeometryIds,a._nextIndexStart=e.nextIndexStart,a._nextVertexStart=e.nextVertexStart,a._geometryCount=e.geometryCount,a._maxInstanceCount=e.maxInstanceCount,a._maxVertexCount=e.maxVertexCount,a._maxIndexCount=e.maxIndexCount,a._geometryInitialized=e.geometryInitialized,a._matricesTexture=u(e.matricesTexture.uuid),a._indirectTexture=u(e.indirectTexture.uuid),void 0!==e.colorsTexture&&(a._colorsTexture=u(e.colorsTexture.uuid)),void 0!==e.boundingSphere&&(a.boundingSphere=(new my).fromJSON(e.boundingSphere)),void 0!==e.boundingBox&&(a.boundingBox=(new Qv).fromJSON(e.boundingBox));break;case"LOD":a=new Gb;break;case"Line":a=new Qx(l(e.geometry),c(e.material));break;case"LineLoop":a=new nS(l(e.geometry),c(e.material));break;case"LineSegments":a=new tS(l(e.geometry),c(e.material));break;case"PointCloud":case"Points":a=new lS(l(e.geometry),c(e.material));break;case"Sprite":a=new Ob(c(e.material));break;case"Group":a=new mb;break;case"Bone":a=new $b;break;default:a=new Qy}if(a.uuid=e.uuid,void 0!==e.name&&(a.name=e.name),void 0!==e.matrix?(a.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(a.matrixAutoUpdate=e.matrixAutoUpdate),a.matrixAutoUpdate&&a.matrix.decompose(a.position,a.quaternion,a.scale)):(void 0!==e.position&&a.position.fromArray(e.position),void 0!==e.rotation&&a.rotation.fromArray(e.rotation),void 0!==e.quaternion&&a.quaternion.fromArray(e.quaternion),void 0!==e.scale&&a.scale.fromArray(e.scale)),void 0!==e.up&&a.up.fromArray(e.up),void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.intensity&&(a.shadow.intensity=e.shadow.intensity),void 0!==e.shadow.bias&&(a.shadow.bias=e.shadow.bias),void 0!==e.shadow.normalBias&&(a.shadow.normalBias=e.shadow.normalBias),void 0!==e.shadow.radius&&(a.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&a.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(a.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(a.visible=e.visible),void 0!==e.frustumCulled&&(a.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(a.renderOrder=e.renderOrder),void 0!==e.userData&&(a.userData=e.userData),void 0!==e.layers&&(a.layers.mask=e.layers),void 0!==e.children){const s=e.children;for(let e=0;e<s.length;e++)a.add(this.parseObject(s[e],t,n,r,i))}if(void 0!==e.animations){const t=e.animations;for(let e=0;e<t.length;e++){const n=t[e];a.animations.push(i[n])}}if("LOD"===e.type){void 0!==e.autoUpdate&&(a.autoUpdate=e.autoUpdate);const t=e.levels;for(let e=0;e<t.length;e++){const n=t[e],r=a.getObjectByProperty("uuid",n.object);void 0!==r&&a.addLevel(r,n.distance,n.hysteresis)}}return a}bindSkeletons(e,t){0!==Object.keys(t).length&&e.traverse(function(e){if(!0===e.isSkinnedMesh&&void 0!==e.skeleton){const n=t[e.skeleton];void 0===n?uv("ObjectLoader: No skeleton found with UUID:",e.skeleton):e.bind(n,e.bindMatrix)}})}bindLightTargets(e){e.traverse(function(t){if(t.isDirectionalLight||t.isSpotLight){const n=t.target,r=e.getObjectByProperty("uuid",n);t.target=void 0!==r?r:new Qy}})}},ObjectSpaceNormalMap:1,OctahedronGeometry:TA,OneFactor:201,OneMinusConstantAlphaFactor:214,OneMinusConstantColorFactor:212,OneMinusDstAlphaFactor:207,OneMinusDstColorFactor:209,OneMinusSrcAlphaFactor:Lp,OneMinusSrcColorFactor:203,OrthographicCamera:OM,PCFShadowMap:1,PCFSoftShadowMap:2,PMREMGenerator:PE,Path:JS,PerspectiveCamera:ub,Plane:gx,PlaneGeometry:RA,PlaneHelper:class extends Qx{constructor(e,t=1,n=16776960){const r=n,i=new z_;i.setAttribute("position",new B_([1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],3)),i.computeBoundingSphere(),super(i,new Vx({color:r,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=t;const a=new z_;a.setAttribute("position",new B_([1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],3)),a.computeBoundingSphere(),this.add(new Z_(a,new b_({color:r,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()}},PointLight:UM,PointLightHelper:class extends Z_{constructor(e,t,n){super(new BA(t,4,2),new b_({wireframe:!0,fog:!1,toneMapped:!1})),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),void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)}},Points:lS,PointsMaterial:rS,PolarGridHelper:class extends tS{constructor(e=10,t=16,n=8,r=64,i=4473924,a=8947848){i=new g_(i),a=new g_(a);const s=[],o=[];if(t>1)for(let c=0;c<t;c++){const n=c/t*(2*Math.PI),r=Math.sin(n)*e,l=Math.cos(n)*e;s.push(0,0,0),s.push(r,0,l);const u=1&c?i:a;o.push(u.r,u.g,u.b),o.push(u.r,u.g,u.b)}for(let c=0;c<n;c++){const t=1&c?i:a,l=e-e/n*c;for(let e=0;e<r;e++){let n=e/r*(2*Math.PI),i=Math.sin(n)*l,a=Math.cos(n)*l;s.push(i,0,a),o.push(t.r,t.g,t.b),n=(e+1)/r*(2*Math.PI),i=Math.sin(n)*l,a=Math.cos(n)*l,s.push(i,0,a),o.push(t.r,t.g,t.b)}}const l=new z_;l.setAttribute("position",new B_(s,3)),l.setAttribute("color",new B_(o,3)),super(l,new Vx({vertexColors:!0,toneMapped:!1})),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}},PolyhedronGeometry:_S,PositionalAudio:class extends hw{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),!0===this.hasPlaybackControl&&!1===this.isPlaying)return;this.matrixWorld.decompose(fw,pw,mw),gw.set(0,0,1).applyQuaternion(pw);const t=this.panner;if(t.positionX){const e=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(fw.x,e),t.positionY.linearRampToValueAtTime(fw.y,e),t.positionZ.linearRampToValueAtTime(fw.z,e),t.orientationX.linearRampToValueAtTime(gw.x,e),t.orientationY.linearRampToValueAtTime(gw.y,e),t.orientationZ.linearRampToValueAtTime(gw.z,e)}else t.setPosition(fw.x,fw.y,fw.z),t.setOrientation(gw.x,gw.y,gw.z)}},PropertyBinding:Mw,PropertyMixer:vw,QuadraticBezierCurve:GS,QuadraticBezierCurve3:VS,Quaternion:Ev,QuaternionKeyframeTrack:dM,QuaternionLinearInterpolant:uM,R11_EAC_Format:ag,RED_GREEN_RGTC2_Format:Tg,RED_RGTC1_Format:Eg,REVISION:vp,RG11_EAC_Format:og,RGBADepthPacking:3201,RGBAFormat:zm,RGBAIntegerFormat:Jm,RGBA_ASTC_10x10_Format:bg,RGBA_ASTC_10x5_Format:vg,RGBA_ASTC_10x6_Format:yg,RGBA_ASTC_10x8_Format:_g,RGBA_ASTC_12x10_Format:xg,RGBA_ASTC_12x12_Format:Sg,RGBA_ASTC_4x4_Format:cg,RGBA_ASTC_5x4_Format:ug,RGBA_ASTC_5x5_Format:dg,RGBA_ASTC_6x5_Format:hg,RGBA_ASTC_6x6_Format:fg,RGBA_ASTC_8x5_Format:pg,RGBA_ASTC_8x6_Format:mg,RGBA_ASTC_8x8_Format:gg,RGBA_BPTC_Format:Ag,RGBA_ETC2_EAC_Format:ig,RGBA_PVRTC_2BPPV1_Format:tg,RGBA_PVRTC_4BPPV1_Format:eg,RGBA_S3TC_DXT1_Format:Km,RGBA_S3TC_DXT3_Format:qm,RGBA_S3TC_DXT5_Format:Qm,RGBDepthPacking:3202,RGBFormat:km,RGBIntegerFormat:1032,RGB_BPTC_SIGNED_Format:Mg,RGB_BPTC_UNSIGNED_Format:wg,RGB_ETC1_Format:ng,RGB_ETC2_Format:rg,RGB_PVRTC_2BPPV1_Format:$m,RGB_PVRTC_4BPPV1_Format:Zm,RGB_S3TC_DXT1_Format:Ym,RGDepthPacking:3203,RGFormat:jm,RGIntegerFormat:Xm,RawShaderMaterial:HA,Ray:Ay,Raycaster:Iw,RectAreaLight:GM,RedFormat:Vm,RedIntegerFormat:Wm,ReinhardToneMapping:2,RenderTarget:Jv,RenderTarget3D:class extends Jv{constructor(e=1,t=1,n=1,r={}){super(e,t,r),this.isRenderTarget3D=!0,this.depth=n,this.texture=new qv(null,e,t,n),this._setTextureOptions(r),this.texture.isRenderTargetTexture=!0}},RepeatWrapping:mm,ReplaceStencilOp:7681,ReverseSubtractEquation:102,RingGeometry:IA,SIGNED_R11_EAC_Format:sg,SIGNED_RED_GREEN_RGTC2_Format:Rg,SIGNED_RED_RGTC1_Format:Cg,SIGNED_RG11_EAC_Format:lg,SRGBColorSpace:Og,SRGBTransfer:Hg,Scene:bb,ShaderChunk:dE,ShaderLib:fE,ShaderMaterial:ab,ShadowMaterial:zA,Shape:YS,ShapeGeometry:PA,ShapePath:class{constructor(){this.type="ShapePath",this.color=new g_,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new JS,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,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,i,a){return this.currentPath.bezierCurveTo(e,t,n,r,i,a),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(e,t){const n=t.length;let r=!1;for(let i=n-1,a=0;a<n;i=a++){let n=t[i],s=t[a],o=s.x-n.x,l=s.y-n.y;if(Math.abs(l)>Number.EPSILON){if(l<0&&(n=t[a],o=-o,s=t[i],l=-l),e.y<n.y||e.y>s.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{const t=l*(e.x-n.x)-o*(e.y-n.y);if(0===t)return!0;if(t<0)continue;r=!r}}else{if(e.y!==n.y)continue;if(s.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=s.x)return!0}}return r}const n=xA.isClockWise,r=this.subPaths;if(0===r.length)return[];let i,a,s;const o=[];if(1===r.length)return a=r[0],s=new YS,s.curves=a.curves,o.push(s),o;let l=!n(r[0].getPoints());l=e?!l:l;const c=[],u=[];let d,h,f=[],p=0;u[p]=void 0,f[p]=[];for(let m=0,g=r.length;m<g;m++)a=r[m],d=a.getPoints(),i=n(d),i=e?!i:i,i?(!l&&u[p]&&p++,u[p]={s:new YS,p:d},u[p].s.curves=a.curves,l&&p++,f[p]=[]):f[p].push({h:a,p:d[0]});if(!u[0])return function(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n],i=new YS;i.curves=r.curves,t.push(i)}return t}(r);if(u.length>1){let e=!1,n=0;for(let t=0,r=u.length;t<r;t++)c[t]=[];for(let r=0,i=u.length;r<i;r++){const i=f[r];for(let a=0;a<i.length;a++){const s=i[a];let o=!0;for(let i=0;i<u.length;i++)t(s.p,u[i].p)&&(r!==i&&n++,o?(o=!1,c[i].push(s)):e=!0);o&&c[r].push(s)}}n>0&&!1===e&&(f=c)}for(let m=0,g=u.length;m<g;m++){s=u[m].s,o.push(s),h=f[m];for(let e=0,t=h.length;e<t;e++)s.holes.push(h[e].h)}return o}},ShapeUtils:xA,ShortType:Cm,Skeleton:rx,SkeletonHelper:class extends tS{constructor(e){const t=Yw(e),n=new z_,r=[],i=[];for(let o=0;o<t.length;o++){const e=t[o];e.parent&&e.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(0,0,0),i.push(0,0,0))}n.setAttribute("position",new B_(r,3)),n.setAttribute("color",new B_(i,3)),super(n,new Vx({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1;const a=new g_(255),s=new g_(65280);this.setColors(a,s)}updateMatrixWorld(e){const t=this.bones,n=this.geometry,r=n.getAttribute("position");Jw.copy(this.root.matrixWorld).invert();for(let i=0,a=0;i<t.length;i++){const e=t[i];e.parent&&e.parent.isBone&&(Xw.multiplyMatrices(Jw,e.matrixWorld),jw.setFromMatrixPosition(Xw),r.setXYZ(a,jw.x,jw.y,jw.z),Xw.multiplyMatrices(Jw,e.parent.matrixWorld),jw.setFromMatrixPosition(Xw),r.setXYZ(a+1,jw.x,jw.y,jw.z),a+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}setColors(e,t){const n=this.geometry.getAttribute("color");for(let r=0;r<n.count;r+=2)n.setXYZ(r,e.r,e.g,e.b),n.setXYZ(r+1,t.r,t.g,t.b);return n.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}},SkinnedMesh:Zb,Source:Hv,Sphere:my,SphereGeometry:BA,Spherical:Dw,SphericalHarmonics3:VM,SplineCurve:WS,SpotLight:FM,SpotLightHelper:class extends Qy{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const n=new z_,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let a=0,s=1,o=32;a<o;a++,s++){const e=a/o*Math.PI*2,t=s/o*Math.PI*2;r.push(Math.cos(e),Math.sin(e),1,Math.cos(t),Math.sin(t),1)}n.setAttribute("position",new B_(r,3));const i=new Vx({fog:!1,toneMapped:!1});this.cone=new tS(n,i),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),Ww.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(Ww),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}},Sprite:Ob,SpriteMaterial:Mb,SrcAlphaFactor:Bp,SrcAlphaSaturateFactor:210,SrcColorFactor:202,StaticCopyUsage:35046,StaticDrawUsage:Qg,StaticReadUsage:35045,StereoCamera:class{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new ub,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new ub,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,iw.copy(e.projectionMatrix);const n=t.eyeSep/2,r=n*t.near/t.focus,i=t.near*Math.tan(gv*t.fov*.5)/t.zoom;let a,s;rw.elements[12]=-n,nw.elements[12]=n,a=-i*t.aspect+r,s=i*t.aspect+r,iw.elements[0]=2*t.near/(s-a),iw.elements[8]=(s+a)/(s-a),this.cameraL.projectionMatrix.copy(iw),a=-i*t.aspect-r,s=i*t.aspect-r,iw.elements[0]=2*t.near/(s-a),iw.elements[8]=(s+a)/(s-a),this.cameraR.projectionMatrix.copy(iw)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(rw),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(nw)}},StreamCopyUsage:35042,StreamDrawUsage:35040,StreamReadUsage:35041,StringKeyframeTrack:hM,SubtractEquation:101,SubtractiveBlending:3,TOUCH:_p,TangentSpaceNormalMap:0,TetrahedronGeometry:LA,Texture:jv,TextureLoader:CM,TextureUtils:class{static contain(e,t){return function(e,t){const n=e.image&&e.image.width?e.image.width/e.image.height:1;return n>t?(e.repeat.x=1,e.repeat.y=n/t,e.offset.x=0,e.offset.y=(1-e.repeat.y)/2):(e.repeat.x=t/n,e.repeat.y=1,e.offset.x=(1-e.repeat.x)/2,e.offset.y=0),e}(e,t)}static cover(e,t){return function(e,t){const n=e.image&&e.image.width?e.image.width/e.image.height:1;return n>t?(e.repeat.x=t/n,e.repeat.y=1,e.offset.x=(1-e.repeat.x)/2,e.offset.y=0):(e.repeat.x=1,e.repeat.y=n/t,e.offset.x=0,e.offset.y=(1-e.repeat.y)/2),e}(e,t)}static fill(e){return function(e){return e.repeat.x=1,e.repeat.y=1,e.offset.x=0,e.offset.y=0,e}(e)}static getByteLength(e,t,n,r){return lE(e,t,n,r)}},Timer:class{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,void 0!==e.hidden&&(this._pageVisibilityHandler=Lw.bind(this),e.addEventListener("visibilitychange",this._pageVisibilityHandler,!1))}disconnect(){null!==this._pageVisibilityHandler&&(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 null!==this._pageVisibilityHandler&&!0===this._document.hidden?this._delta=0:(this._previousTime=this._currentTime,this._currentTime=(void 0!==e?e:performance.now())-this._startTime,this._delta=(this._currentTime-this._previousTime)*this._timescale,this._elapsed+=this._delta),this}},TimestampQuery:{COMPUTE:"compute",RENDER:"render"},TorusGeometry:DA,TorusKnotGeometry:FA,Triangle:d_,TriangleFanDrawMode:2,TriangleStripDrawMode:1,TrianglesDrawMode:0,TubeGeometry:NA,UVMapping:cm,Uint16BufferAttribute:I_,Uint32BufferAttribute:P_,Uint8BufferAttribute:class extends R_{constructor(e,t,n){super(new Uint8Array(e),t,n)}},Uint8ClampedBufferAttribute:class extends R_{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}},Uniform:Cw,UniformsGroup:class extends fv{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:Tw++}),this.name="",this.usage=Qg,this.uniforms=[]}add(e){return this.uniforms.push(e),this}remove(e){const t=this.uniforms.indexOf(e);return-1!==t&&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,r=t.length;n<r;n++){const e=Array.isArray(t[n])?t[n]:[t[n]];for(let t=0;t<e.length;t++)this.uniforms.push(e[t].clone())}return this}clone(){return(new this.constructor).copy(this)}},UniformsLib:hE,UniformsUtils:ib,UnsignedByteType:wm,UnsignedInt101111Type:Um,UnsignedInt248Type:Fm,UnsignedInt5999Type:Nm,UnsignedIntType:Im,UnsignedShort4444Type:Lm,UnsignedShort5551Type:Dm,UnsignedShortType:Tm,VSMShadowMap:3,Vector2:wv,Vector3:Cv,Vector4:Xv,VectorKeyframeTrack:fM,VideoFrameTexture:class extends uS{constructor(e,t,n,r,i,a,s,o){super({},e,t,n,r,i,a,s,o),this.isVideoFrameTexture=!0}update(){}clone(){return(new this.constructor).copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}},VideoTexture:uS,WebGL3DRenderTarget:class extends Yv{constructor(e=1,t=1,n=1,r={}
26){super(e,t,r),this.isWebGL3DRenderTarget=!0,this.depth=n,this.texture=new qv(null,e,t,n),this._setTextureOptions(r),this.texture.isRenderTargetTexture=!0}},WebGLArrayRenderTarget:class extends Yv{constructor(e=1,t=1,n=1,r={}){super(e,t,r),this.isWebGLArrayRenderTarget=!0,this.depth=n,this.texture=new Kv(null,e,t,n),this._setTextureOptions(r),this.texture.isRenderTargetTexture=!0}},WebGLCoordinateSystem:$g,WebGLCubeRenderTarget:pb,WebGLRenderTarget:Yv,WebGLRenderer:$T,WebGLUtils:WT,WebGPUCoordinateSystem:ev,WebXRController:vb,WireframeGeometry:UA,WrapAroundEnding:Fg,ZeroCurvatureEnding:Lg,ZeroFactor:200,ZeroSlopeEnding:Dg,ZeroStencilOp:0,createCanvasElement:sv,error:dv,getConsoleFunction:function(){return lv},log:cv,setConsoleFunction:function(e){lv=e},warn:uv,warnOnce:hv},Symbol.toStringTag,{value:"Module"}));var tR={exports:{}},nR={},rR=q,iR=pp,aR="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},sR=iR.useSyncExternalStore,oR=rR.useRef,lR=rR.useEffect,cR=rR.useMemo,uR=rR.useDebugValue;nR.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var a=oR(null);if(null===a.current){var s={hasValue:!1,value:null};a.current=s}else s=a.current;a=cR(function(){function e(e){if(!l){if(l=!0,a=e,e=r(e),void 0!==i&&s.hasValue){var t=s.value;if(i(t,e))return o=t}return o=e}if(t=o,aR(a,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(a=e,t):(a=e,o=n)}var a,o,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,r,i]);var o=sR(e,a[0],a[1]);return lR(function(){s.hasValue=!0,s.value=o},[o]),uR(o),o},tR.exports=nR;const dR=t(tR.exports),hR=e=>{let t;const n=new Set,r=(e,r)=>{const i="function"==typeof e?e(t):e;if(!Object.is(i,t)){const e=t;t=(null!=r?r:"object"!=typeof i||null===i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>s,subscribe:e=>(n.add(e),()=>n.delete(e))},s=t=e(r,i,a);return a},{useSyncExternalStoreWithSelector:fR}=dR,pR=e=>e,mR=(e,t)=>{const n=(e=>e?hR(e):hR)(e),r=(e,r=t)=>function(e,t=pR,n){const r=fR(e.subscribe,e.getState,e.getInitialState,t,n);return Q.useDebugValue(r),r}(n,e,r);return Object.assign(r,n),r},gR=(e,t)=>e?mR(e,t):mR,vR=[];function yR(e,t,n=(e,t)=>e===t){if(e===t)return!0;if(!e||!t)return!1;const r=e.length;if(t.length!==r)return!1;for(let i=0;i<r;i++)if(!n(e[i],t[i]))return!1;return!0}function _R(e,t=null,n=!1,r={}){null===t&&(t=[e]);for(const s of vR)if(yR(t,s.keys,s.equal)){if(n)return;if(Object.prototype.hasOwnProperty.call(s,"error"))throw s.error;if(Object.prototype.hasOwnProperty.call(s,"response"))return r.lifespan&&r.lifespan>0&&(s.timeout&&clearTimeout(s.timeout),s.timeout=setTimeout(s.remove,r.lifespan)),s.response;if(!n)throw s.promise}const i={keys:t,equal:r.equal,remove:()=>{const e=vR.indexOf(i);-1!==e&&vR.splice(e,1)},promise:(a=e,"object"==typeof a&&"function"==typeof a.then?e:e(...t)).then(e=>{i.response=e,r.lifespan&&r.lifespan>0&&(i.timeout=setTimeout(i.remove,r.lifespan))}).catch(e=>i.error=e)};var a;if(vR.push(i),!n)throw i.promise}function bR(e,t,n){if(!e)return;if(!0===n(e))return e;let r=t?e.return:e.child;for(;r;){const e=bR(r,t,n);if(e)return e;r=t?null:r.sibling}}function xR(e){try{return Object.defineProperties(e,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(t){return e}}const SR=xR(q.createContext(null));class AR extends q.Component{render(){return q.createElement(SR.Provider,{value:this._reactInternals},this.props.children)}}function MR(){const e=q.useContext(SR);if(null===e)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=q.useId();return q.useMemo(()=>{for(const n of[e,null==e?void 0:e.alternate]){if(!n)continue;const e=bR(n,!1,e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}});if(e)return e}},[e,t])}const wR=Symbol.for("react.context"),ER=e=>null!==e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===wR;function CR(e){let t=e.root;for(;t.getState().previousRoot;)t=t.getState().previousRoot;return t}const TR=e=>e&&e.isOrthographicCamera,RR=e=>null!=e&&("string"==typeof e||"number"==typeof e||e.isColor),IR=((e,t)=>"undefined"!=typeof window&&((null==(e=window.document)?void 0:e.createElement)||"ReactNative"===(null==(t=window.navigator)?void 0:t.product)))()?q.useLayoutEffect:q.useEffect;function PR(e){const t=q.useRef(e);return IR(()=>{t.current=e},[e]),t}function BR({set:e}){return IR(()=>(e(new Promise(()=>null)),()=>e(!1)),[e]),null}const LR=(e=>((e=class extends q.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}).getDerivedStateFromError=()=>({error:!0}),e))();function DR(e){var t;const n="undefined"!=typeof window?null!=(t=window.devicePixelRatio)?t:2:1;return Array.isArray(e)?Math.min(Math.max(e[0],n),e[1]):e}function FR(e){var t;return null==(t=e.__r3f)?void 0:t.root.getState()}const NR={obj:e=>e===Object(e)&&!NR.arr(e)&&"function"!=typeof e,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,boo:e=>"boolean"==typeof e,und:e=>void 0===e,nul:e=>null===e,arr:e=>Array.isArray(e),equ(e,t,{arrays:n="shallow",objects:r="reference",strict:i=!0}={}){if(typeof e!=typeof t||!!e!=!!t)return!1;if(NR.str(e)||NR.num(e)||NR.boo(e))return e===t;const a=NR.obj(e);if(a&&"reference"===r)return e===t;const s=NR.arr(e);if(s&&"reference"===n)return e===t;if((s||a)&&e===t)return!0;let o;for(o in e)if(!(o in t))return!1;if(a&&"shallow"===n&&"shallow"===r){for(o in i?t:e)if(!NR.equ(e[o],t[o],{strict:i,objects:"reference"}))return!1}else for(o in i?t:e)if(e[o]!==t[o])return!1;if(NR.und(o)){if(s&&0===e.length&&0===t.length)return!0;
26if(a&&0===Object.keys(e).length&&0===Object.keys(t).length)return!0;if(e!==t)return!1}return!0}},UR=["children","key","ref"];function OR(e){const t={};for(const n in e)UR.includes(n)||(t[n]=e[n]);return t}function kR(e,t,n,r){const i=e;let a=null==i?void 0:i.__r3f;return a||(a={root:t,type:n,parent:null,children:[],props:OR(r),object:i,eventCount:0,handlers:{},isHidden:!1},i&&(i.__r3f=a)),a}function zR(e,t){if(!t.includes("-"))return{root:e,key:t,target:e[t]};if(t in e)return{root:e,key:t,target:e[t]};let n=e;const r=t.split("-");for(const i of r){if("object"!=typeof n||null===n)return void 0!==n?{root:n,key:r.slice(r.indexOf(i)).join("-"),target:void 0}:{root:e,key:t,target:void 0};e=n,n=n[t=i]}return{root:e,key:t,target:n}}const HR=/-\d+$/;function GR(e,t){if(NR.str(t.props.attach)){if(HR.test(t.props.attach)){const n=t.props.attach.replace(HR,""),{root:r,key:i}=zR(e.object,n);Array.isArray(r[i])||(r[i]=[])}const{root:n,key:r}=zR(e.object,t.props.attach);t.previousAttach=n[r],n[r]=t.object}else NR.fun(t.props.attach)&&(t.previousAttach=t.props.attach(e.object,t.object))}function VR(e,t){if(NR.str(t.props.attach)){const{root:n,key:r}=zR(e.object,t.props.attach),i=t.previousAttach;void 0===i?delete n[r]:n[r]=i}else null==t.previousAttach||t.previousAttach(e.object,t.object);delete t.previousAttach}const WR=[...UR,"args","dispose","attach","object","onUpdate","dispose"],jR=new Map;function XR(e){let t=jR.get(e.constructor);try{t||(t=new e.constructor,jR.set(e.constructor,t))}catch(n){}return t}const JR=["map","emissiveMap","sheenColorMap","specularColorMap","envMap"],YR=/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/;function KR(e,t){var n;const r=e.__r3f,i=r&&CR(r).getState(),a=null==r?void 0:r.eventCount;for(const o in t){let n=t[o];if(WR.includes(o))continue;if(r&&YR.test(o)){"function"==typeof n?r.handlers[o]=n:delete r.handlers[o],r.eventCount=Object.keys(r.handlers).length;continue}if(void 0===n)continue;let{root:a,key:l,target:c}=zR(e,o);if(void 0===c&&("object"!=typeof a||null===a))throw Error(`R3F: Cannot set "${o}". Ensure it is an object before setting "${l}".`);if(c instanceof Fy&&n instanceof Fy)c.mask=n.mask;else if(c instanceof g_&&RR(n))c.set(n);else if(null!==c&&"object"==typeof c&&"function"==typeof c.set&&"function"==typeof c.copy&&null!=n&&n.constructor&&c.constructor===n.constructor)c.copy(n);else if(null!==c&&"object"==typeof c&&"function"==typeof c.set&&Array.isArray(n))"function"==typeof c.fromArray?c.fromArray(n):c.set(...n);else if(null!==c&&"object"==typeof c&&"function"==typeof c.set&&"number"==typeof n)"function"==typeof c.setScalar?c.setScalar(n):c.set(n);else{var s;a[l]=n,i&&!i.linear&&JR.includes(l)&&null!=(s=a[l])&&s.isTexture&&a[l].format===zm&&a[l].type===wm&&(a[l].colorSpace=Og)}}if(null!=r&&r.parent&&null!=i&&i.internal&&null!=(n=r.object)&&n.isObject3D&&a!==r.eventCount){const e=r.object,t=i.internal.interaction.indexOf(e);t>-1&&i.internal.interaction.splice(t,1),r.eventCount&&null!==e.raycast&&i.internal.interaction.push(e)}return r&&void 0===r.props.attach&&(r.object.isBufferGeometry?r.props.attach="geometry":r.object.isMaterial&&(r.props.attach="material")),r&&qR(r),e}function qR(e){var t;if(!e.parent)return;null==e.props.onUpdate||e.props.onUpdate(e.object);const n=null==(t=e.root)||null==t.getState?void 0:t.getState();n&&0===n.internal.frames&&n.invalidate()}function QR(e,t){e.manual||(TR(e)?(e.left=t.width/-2,e.right=t.width/2,e.top=t.height/2,e.bottom=t.height/-2):e.aspect=t.width/t.height,e.updateProjectionMatrix())}const ZR=e=>null==e?void 0:e.isObject3D;function $R(e){return(e.eventObject||e.object).uuid+"/"+e.index+e.instanceId}function eI(e,t,n,r){const i=n.get(t);i&&(n.delete(t),0===n.size&&(e.delete(r),i.target.releasePointerCapture(r)))}const tI=e=>!(null==e||!e.render),nI=q.createContext(null);function rI(){const e=q.useContext(nI);if(!e)throw new Error("R3F: Hooks can only be used within the Canvas component!");return e}function iI(e=e=>e,t){return rI()(e,t)}function aI(e,t=0){const n=rI(),r=n.getState().internal.subscribe,i=PR(e);return IR(()=>r(i,t,n),[t,r,n]),null}const sI=new WeakMap;function oI(e,t){return function(n,...r){let i;var a,s;return"function"==typeof(a=n)&&(null==a||null==(s=a.prototype)?void 0:s.constructor)===a?(i=sI.get(n),i||(i=new n,sI.set(n,i))):i=n,e&&e(i),Promise.all(r.map(e=>new Promise((n,r)=>i.load(e,e=>{ZR(null==e?void 0:e.scene)&&Object.assign(e,function(e){const t={nodes:{},materials:{},meshes:{}};return e&&e.traverse(e=>{e.name&&(t.nodes[e.name]=e),e.material&&!t.materials[e.material.name]&&(t.materials[e.material.name]=e.material),e.isMesh&&!t.meshes[e.name]&&(t.meshes[e.name]=e)}),t}(e.scene)),n(e)},t,t=>r(new Error(`Could not load ${e}: ${null==t?void 0:t.message}`))))))}}function lI(e,t,n,r){const i=Array.isArray(t)?t:[t],a=((e,t)=>_R(e,t,!1,{equal:NR.equ}))(oI(n,r),[e,...i]);return Array.isArray(t)?a:a[0]}lI.preload=function(e,t,n){const r=Array.isArray(t)?t:[t];return((e,t)=>{_R(e,t,!0,void 0)})(oI(n),[e,...r])},lI.clear=function(e,t){return(e=>{if(void 0===e||0===e.length)vR.splice(0,vR.length);else{const t=vR.find(t=>yR(e,t.keys,t.equal));t&&t.remove()}})([e,...Array.isArray(t)?t:[t]])};
vendor: 4,193 bytes, line 26
26var cI,uI,dI={exports:{}},hI={exports:{}};var fI=(uI||(uI=1,dI.exports=function(){return cI||(cI=1,(e=hI).exports=function(e){function t(e,t,n,r){return new Hi(e,t,n,r)}function n(){}function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function a(e){if(i(e)!==e)throw Error(r(188))}function s(e){var t=e.alternate;if(!t){if(null===(t=i(e)))throw Error(r(188));return t!==e?null:e}for(var n=e,s=t;;){var o=n.return;if(null===o)break;var l=o.alternate;if(null===l){if(null!==(s=o.return)){n=s;continue}break}if(o.child===l.child){for(l=o.child;l;){if(l===n)return a(o),e;if(l===s)return a(o),t;l=l.sibling}throw Error(r(188))}if(n.return!==s.return)n=o,s=l;else{for(var c=!1,u=o.child;u;){if(u===n){c=!0,n=o,s=l;break}if(u===s){c=!0,s=o,n=l;break}u=u.sibling}if(!c){for(u=l.child;u;){if(u===n){c=!0,n=l,s=o;break}if(u===s){c=!0,s=l,n=o;break}u=u.sibling}if(!c)throw Error(r(189))}}if(n.alternate!==s)throw Error(r(190))}if(3!==n.tag)throw Error(r(188));return n.stateNode.current===n?e:t}function o(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=o(e)))return t;e=e.sibling}return null}function l(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(4!==e.tag&&null!==(t=l(e)))return t;e=e.sibling}return null}function c(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Sa&&e[Sa]||e["@@iterator"])?e:null}function u(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===Aa?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ua:return"Fragment";case ha:return"Profiler";case da:return"StrictMode";case ga:return"Suspense";case va:return"SuspenseList";case ba:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case ca:return"Portal";case pa:return e.displayName||"Context";case fa:return(e._context.displayName||"Context")+".Consumer";case ma:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case ya:return null!==(t=e.displayName||null)?t:u(e.type)||"Memo";case _a:t=e._payload,e=e._init;try{return u(e(t))}catch{}}return null}function d(e){return{current:e}}function h(e){0>Jo||(e.current=Xo[Jo],Xo[Jo]=null,Jo--)}function f(e,t){Jo++,Xo[Jo]=e.current,e.current=t}function m(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function g(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var i=0,a=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var o=134217727&r;return 0!==o?0!==(r=o&~a)?i=m(r):0!==(s&=o)?i=m(s):n||0!==(n=o&~e)&&(i=m(n)):0!==(o=r&~a)?i=m(o):0!==s?i=m(s):n||0!==(n=r&~e)&&(i=m(n)),0===i?0:0!==t&&t!==i&&0===(t&a)&&((a=i&-i)>=(n=t&-t)||32===a&&4194048&n)?t:i}function v(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function y(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+5e3;default:return-1}}function _(){var e=el;return!(62914560&(el<<=1))&&(el=4194304),e}function b(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}
vendor: 1,603 bytes, line 26
26function x(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function S(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ko(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function A(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ko(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function M(e,t){var n=t&-t;return 0!==((n=42&n?1:w(n))&(e.suspendedLanes|t))?0:n}function w(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function E(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function C(e){if("function"==typeof ul&&dl(e),fl&&"function"==typeof fl.setStrictMode)try{fl.setStrictMode(hl,e)}catch{}}function T(e){if(void 0===So)try{throw Error()}catch(SR){var t=SR.stack.trim().match(/\n( *(at )?)/);So=t&&t[1]||"",Ao=-1<SR.stack.indexOf("\n    at")?" (<anonymous>)":-1<SR.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+So+e+Ao}function R(e,t){if(!e||vl)return"";vl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(i){var r=i}Reflect.construct(e,[],n)}
vendor: 5,365 bytes, line 26
26else{try{n.call()}catch(i){r=i}e.call(n.prototype)}}else{try{throw Error()}catch(i){r=i}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(i){if(i&&r&&"string"==typeof i.stack)return[i.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=r.DetermineComponentFrameRoot(),s=a[0],o=a[1];if(s&&o){var l=s.split("\n"),c=o.split("\n");for(i=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;i<c.length&&!c[i].includes("DetermineComponentFrameRoot");)i++;if(r===l.length||i===c.length)for(r=l.length-1,i=c.length-1;1<=r&&0<=i&&l[r]!==c[i];)i--;for(;1<=r&&0<=i;r--,i--)if(l[r]!==c[i]){if(1!==r||1!==i)do{if(r--,0>--i||l[r]!==c[i]){var u="\n"+l[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=r&&0<=i);break}}}finally{vl=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?T(n):""}function I(e,t){switch(e.tag){case 26:case 27:case 5:return T(e.type);case 16:return T("Lazy");case 13:return e.child!==t&&null!==t?T("Suspense Fallback"):T("Suspense");case 19:return T("SuspenseList");case 0:case 15:return R(e.type,!1);case 11:return R(e.type.render,!1);case 1:return R(e.type,!0);case 31:return T("Activity");default:return""}}function P(e){try{var t="",n=null;do{t+=I(e,n),n=e,e=e.return}while(e);return t}catch(xR){return"\nError generating stack: "+xR.message+"\n"+xR.stack}}function B(e,t){if("object"==typeof e&&null!==e){var n=yl.get(e);return void 0!==n?n:(t={value:e,source:t,stack:P(t)},yl.set(e,t),t)}return{value:e,source:t,stack:P(t)}}function L(e,t){_l[bl++]=Sl,_l[bl++]=xl,xl=e,Sl=t}function D(e,t,n){Al[Ml++]=El,Al[Ml++]=Cl,Al[Ml++]=wl,wl=e;var r=El;e=Cl;var i=32-Ko(r)-1;r&=~(1<<i),n+=1;var a=32-Ko(t)+i;if(30<a){var s=i-i%5;a=(r&(1<<s)-1).toString(32),r>>=s,i-=s,El=1<<32-Ko(t)+i|n<<i|r,Cl=a+e}else El=1<<a|n<<i|r,Cl=e}function F(e){null!==e.return&&(L(e,1),D(e,1,0))}function N(e){for(;e===xl;)xl=_l[--bl],_l[bl]=null,Sl=_l[--bl],_l[bl]=null;for(;e===wl;)wl=Al[--Ml],Al[Ml]=null,Cl=Al[--Ml],Al[Ml]=null,El=Al[--Ml],Al[Ml]=null}function U(e,t){Al[Ml++]=El,Al[Ml++]=Cl,Al[Ml++]=wl,El=t.id,Cl=t.overflow,wl=e}function O(e,t){f(Il,t),f(Rl,e),f(Tl,null),e=Ia(t),h(Tl),f(Tl,e)}function k(){h(Tl),h(Rl),h(Il)}function z(e){null!==e.memoizedState&&f(Pl,e);var t=Tl.current,n=Pa(t,e.type);t!==n&&(f(Rl,e),f(Tl,n))}function H(e){Rl.current===e&&(h(Tl),h(Rl)),Pl.current===e&&(h(Pl),Ga?os._currentValue=ss:os._currentValue2=ss)}function G(e){throw Y(B(Error(r(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML","")),e)),Ul}function V(e,t){if(!ja)throw Error(r(175));io(e.stateNode,e.type,e.memoizedProps,t,e)||G(e,!0)}function W(e){for(Bl=e.return;Bl;)switch(Bl.tag){case 5:case 31:case 13:return void(Nl=!1);case 27:case 3:return void(Nl=!0);default:Bl=Bl.return}}function j(e){if(!ja||e!==Bl)return!1;if(!Dl)return W(e),Dl=!0,!1;var t=e.tag;if(zo?3!==t&&27!==t&&(5!==t||xo(e.type)&&!Ua(e.type,e.memoizedProps))&&Ll&&G(e):3!==t&&(5!==t||xo(e.type)&&!Ua(e.type,e.memoizedProps))&&Ll&&G(e),W(e),13===t){if(!ja)throw Error(r(316));if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));Ll=co(e)}else if(31===t){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));Ll=lo(e)}else Ll=zo&&27===t?Ys(e.type,Ll):Bl?Js(e.stateNode):null;return!0}function X(){ja&&(Ll=Bl=null,Dl=!1)}function J(){var e=Fl;return null!==e&&(null===xu?xu=e:xu.push.apply(xu,e),Fl=null),e}function Y(e){null===Fl?Fl=[e]:Fl.push(e)}function K(e,t,n){Ga?(f(Ol,t._currentValue),t._currentValue=n):(f(Ol,t._currentValue2),t._currentValue2=n)}function q(e){var t=Ol.current;Ga?e._currentValue=t:e._currentValue2=t,h(Ol)}function Z(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function $(e,t,n,i){var a=e.child;for(null!==a&&(a.return=e);null!==a;){var s=a.dependencies;if(null!==s){var o=a.child;s=s.firstContext;e:for(;null!==s;){var l=s;s=a;for(var c=0;c<t.length;c++)if(l.context===t[c]){s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Z(s.return,n,e),i||(o=null);break e}s=l.next}}else if(18===a.tag){if(null===(o=a.return))throw Error(r(341));o.lanes|=n,null!==(s=o.alternate)&&(s.lanes|=n),Z(o,n,e),o=null}else o=a.child;if(null!==o)o.return=a;else for(o=a;null!==o;){if(o===e){o=null;break}if(null!==(a=o.sibling)){a.return=o.return,o=a;break}o=o.return}a=o}}function ee(e,t,n,i){e=null;for(var a=t,s=!1;null!==a;){if(!s)if(524288&a.flags)s=!0;else if(262144&a.flags)break;if(10===a.tag){var o=a.alternate;if(null===o)throw Error(r(387));if(null!==(o=o.memoizedProps)){var l=a.type;pl(a.pendingProps.value,o.value)||(null!==e?e.push(l):e=[l])}}else if(a===Pl.current){if(null===(o=a.alternate))throw Error(r(387));o.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(null!==e?e.push(os):e=[os])}a=a.return}null!==e&&$(t,e,n,i),t.flags|=262144}function te(e){for(e=e.firstContext;null!==e;){var t=e.context;if(!pl(Ga?t._currentValue:t._currentValue2,e.memoizedValue))return!0;e=e.next}return!1}
vendor: 7,313 bytes, line 26
26function ne(e){kl=e,zl=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function re(e){return ae(kl,e)}function ie(e,t){return null===kl&&ne(e),ae(e,t)}function ae(e,t){var n=Ga?t._currentValue:t._currentValue2;if(t={context:t,memoizedValue:n,next:null},null===zl){if(null===e)throw Error(r(308));zl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else zl=zl.next=t;return n}function se(){return{controller:new Hl,data:new Map,refCount:0}}function oe(e){e.refCount--,0===e.refCount&&Gl(Vl,function(){e.controller.abort()})}function le(){}function ce(e){e!==Xl&&null===e.next&&(null===Xl?jl=Xl=e:Xl=Xl.next=e),Yl=!0,Jl||(Jl=!0,cs?us(function(){6&iu?tl(sl,de):he()}):tl(sl,de))}function ue(e,t){if(!Kl&&Yl){Kl=!0;do{for(var n=!1,r=jl;null!==r;){if(0!==e){var i=r.pendingLanes;if(0===i)var a=0;else{var s=r.suspendedLanes,o=r.pingedLanes;a=(1<<31-Ko(42|e)+1)-1,a=201326741&(a&=i&~(s&~o))?201326741&a|1:a?2|a:0}0!==a&&(n=!0,me(r,a))}else a=ou,!(3&(a=g(r,r===au?a:0,null!==r.cancelPendingCommit||r.timeoutHandle!==Ha)))||v(r,a)||(n=!0,me(r,a));r=r.next}}while(n);Kl=!1}}function de(){he()}function he(){Yl=Jl=!1;var e=0;0!==ql&&Qa()&&(e=ql);for(var t=al(),n=null,r=jl;null!==r;){var i=r.next,a=fe(r,t);0===a?(r.next=null,null===n?jl=i:n.next=i,null===i&&(Xl=n)):(n=r,(0!==e||!!(3&a))&&(Yl=!0)),r=i}0!==Tu&&5!==Tu||ue(e),0!==ql&&(ql=0)}function fe(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=-62914561&e.pendingLanes;0<a;){var s=31-Ko(a),o=1<<s,l=i[s];-1===l?(0===(o&n)||0!==(o&r))&&(i[s]=y(o,t)):l<=t&&(e.expiredLanes|=o),a&=~o}if(n=ou,n=g(e,e===(t=au)?n:0,null!==e.cancelPendingCommit||e.timeoutHandle!==Ha),r=e.callbackNode,0===n||e===t&&(2===lu||9===lu)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&nl(r),e.callbackNode=null,e.callbackPriority=0;if(!(3&n)||v(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&nl(r),E(n)){case 2:case 8:n=ol;break;case 32:default:n=ll;break;case 268435456:n=cl}return r=pe.bind(null,e),n=tl(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&nl(r),e.callbackPriority=2,e.callbackNode=null,2}function pe(e,t){if(0!==Tu&&5!==Tu)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Bi()&&e.callbackNode!==n)return null;var r=ou;return 0===(r=g(e,e===au?r:0,null!==e.cancelPendingCommit||e.timeoutHandle!==Ha))?null:(oi(e,r,t),fe(e,al()),null!=e.callbackNode&&e.callbackNode===n?pe.bind(null,e):null)}function me(e,t){if(Bi())return null;oi(e,t,!0)}function ge(){if(0===ql){var e=$l;0===e&&(e=Zo,!(261888&(Zo<<=1))&&(Zo=256)),ql=e}return ql}function ve(){if(0===--Zl&&null!==Ql){null!==ec&&(ec.status="fulfilled");var e=Ql;Ql=null,$l=0,ec=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ye(){var e=nc.current;return null!==e?e:au.pooledCache}function _e(e,t){f(nc,null===t?nc.current:t.pool)}function be(){var e=ye();return null===e?null:{parent:Ga?Wl._currentValue:Wl._currentValue2,pool:e}}function xe(e,t){if(pl(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!gl.call(t,i)||!pl(e[i],t[i]))return!1}return!0}function Se(e){return"fulfilled"===(e=e.status)||"rejected"===e}function Ae(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(le,le),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw Ee(e=t.reason),e;default:if("string"==typeof t.status)t.then(le,le);else{if(null!==(e=au)&&100<e.shellSuspendCounter)throw Error(r(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw Ee(e=t.reason),e}throw oc=t,rc}}function Me(e){try{return(0,e._init)(e._payload)}catch(SR){throw null!==SR&&"object"==typeof SR&&"function"==typeof SR.then?(oc=SR,rc):SR}}function we(){if(null===oc)throw Error(r(459));var e=oc;return oc=null,e}function Ee(e){if(e===rc||e===ac)throw Error(r(483))}function Ce(e){var t=cc;return cc+=1,null===lc&&(lc=[]),Ae(lc,e,t)}function Te(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function Re(e,t){throw t.$$typeof===oa?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ie(e){function n(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function i(t,r){if(!e)return null;for(;null!==r;)n(t,r),r=r.sibling;return null}function a(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function s(e,t){return(e=Vi(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=67108866,n):r:(t.flags|=67108866,n):(t.flags|=1048576,n)}function l(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Ji(n,e.mode,r)).return=e,t):((t=s(t,n)).return=e,t)}function d(e,t,n,r){var i=n.type;return i===ua?f(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===_a&&Me(i)===t.type)?(Te(t=s(t,n.props),n),t.return=e,t):(Te(t=ji(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function h(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Ki(n,e.mode,r)).return=e,t):((t=s(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=Xi(n,e.mode,r,i)).return=e,t):((t=s(t,n)).return=e,t)}function p(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=Ji(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case la:return Te(n=ji(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case ca:return(t=Ki(t,e.mode,n)).return=e,t;case _a:return p(e,t=Me(t),n)}if(Ma(t)||c(t))return(t=Xi(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return p(e,Ce(t),n);if(t.$$typeof===pa)return p(e,ie(e,t),n);Re(e,t)}return null}function m(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==i?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case la:return n.key===i?d(e,t,n,r):null;case ca:return n.key===i?h(e,t,n,r):null;case _a:return m(e,t,n=Me(n),r)}if(Ma(n)||c(n))return null!==i?null:f(e,t,n,r,null);if("function"==typeof n.then)return m(e,t,Ce(n),r);if(n.$$typeof===pa)return m(e,t,ie(e,n),r);Re(e,n)}return null}function g(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return u(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case la:return d(t,e=e.get(null===r.key?n:r.key)||null,r,i);case ca:return h(t,e=e.get(null===r.key?n:r.key)||null,r,i);case _a:return g(e,t,n,r=Me(r),i)}if(Ma(r)||c(r))return f(t,e=e.get(n)||null,r,i,null);if("function"==typeof r.then)return g(e,t,n,Ce(r),i);if(r.$$typeof===pa)return g(e,t,n,ie(t,r),i);Re(t,r)}return null}function v(t,u,d,h){if("object"==typeof d&&null!==d&&d.type===ua&&null===d.key&&(d=d.props.children),"object"==typeof d&&null!==d){switch(d.$$typeof){case la:e:{for(var f=d.key;null!==u;
vendor: 13,891 bytes, line 26
26){if(u.key===f){if((f=d.type)===ua){if(7===u.tag){i(t,u.sibling),(h=s(u,d.props.children)).return=t,t=h;break e}}else if(u.elementType===f||"object"==typeof f&&null!==f&&f.$$typeof===_a&&Me(f)===u.type){i(t,u.sibling),Te(h=s(u,d.props),d),h.return=t,t=h;break e}i(t,u);break}n(t,u),u=u.sibling}d.type===ua?((h=Xi(d.props.children,t.mode,h,d.key)).return=t,t=h):(Te(h=ji(d.type,d.key,d.props,null,t.mode,h),d),h.return=t,t=h)}return l(t);case ca:e:{for(f=d.key;null!==u;){if(u.key===f){if(4===u.tag&&u.stateNode.containerInfo===d.containerInfo&&u.stateNode.implementation===d.implementation){i(t,u.sibling),(h=s(u,d.children||[])).return=t,t=h;break e}i(t,u);break}n(t,u),u=u.sibling}(h=Ki(d,t.mode,h)).return=t,t=h}return l(t);case _a:return v(t,u,d=Me(d),h)}if(Ma(d))return function(t,r,s,l){for(var c=null,u=null,d=r,h=r=0,f=null;null!==d&&h<s.length;h++){d.index>h?(f=d,d=null):f=d.sibling;var v=m(t,d,s[h],l);if(null===v){null===d&&(d=f);break}e&&d&&null===v.alternate&&n(t,d),r=o(v,r,h),null===u?c=v:u.sibling=v,u=v,d=f}if(h===s.length)return i(t,d),Dl&&L(t,h),c;if(null===d){for(;h<s.length;h++)null!==(d=p(t,s[h],l))&&(r=o(d,r,h),null===u?c=d:u.sibling=d,u=d);return Dl&&L(t,h),c}for(d=a(d);h<s.length;h++)null!==(f=g(d,t,h,s[h],l))&&(e&&null!==f.alternate&&d.delete(null===f.key?h:f.key),r=o(f,r,h),null===u?c=f:u.sibling=f,u=f);return e&&d.forEach(function(e){return n(t,e)}),Dl&&L(t,h),c}(t,u,d,h);if(c(d)){if("function"!=typeof(f=c(d)))throw Error(r(150));return function(t,s,l,c){if(null==l)throw Error(r(151));for(var u=null,d=null,h=s,f=s=0,v=null,y=l.next();null!==h&&!y.done;f++,y=l.next()){h.index>f?(v=h,h=null):v=h.sibling;var _=m(t,h,y.value,c);if(null===_){null===h&&(h=v);break}e&&h&&null===_.alternate&&n(t,h),s=o(_,s,f),null===d?u=_:d.sibling=_,d=_,h=v}if(y.done)return i(t,h),Dl&&L(t,f),u;if(null===h){for(;!y.done;f++,y=l.next())null!==(y=p(t,y.value,c))&&(s=o(y,s,f),null===d?u=y:d.sibling=y,d=y);return Dl&&L(t,f),u}for(h=a(h);!y.done;f++,y=l.next())null!==(y=g(h,t,f,y.value,c))&&(e&&null!==y.alternate&&h.delete(null===y.key?f:y.key),s=o(y,s,f),null===d?u=y:d.sibling=y,d=y);return e&&h.forEach(function(e){return n(t,e)}),Dl&&L(t,f),u}(t,u,d=f.call(d),h)}if("function"==typeof d.then)return v(t,u,Ce(d),h);if(d.$$typeof===pa)return v(t,u,ie(t,d),h);Re(t,d)}return"string"==typeof d&&""!==d||"number"==typeof d||"bigint"==typeof d?(d=""+d,null!==u&&6===u.tag?(i(t,u.sibling),(h=s(u,d)).return=t,t=h):(i(t,u),(h=Ji(d,t.mode,h)).return=t,t=h),l(t)):i(t,u)}return function(e,n,r,i){try{cc=0;var a=v(e,n,r,i);return lc=null,a}catch(o){if(o===rc||o===ac)throw o;var s=t(29,o,null,e.mode);return s.lanes=i,s.return=e,s}}}function Pe(){for(var e=fc,t=pc=fc=0;t<e;){var n=hc[t];hc[t++]=null;var r=hc[t];hc[t++]=null;var i=hc[t];hc[t++]=null;var a=hc[t];if(hc[t++]=null,null!==r&&null!==i){var s=r.pending;null===s?i.next=i:(i.next=s.next,s.next=i),r.pending=i}0!==a&&Fe(n,i,a)}}function Be(e,t,n,r){hc[fc++]=e,hc[fc++]=t,hc[fc++]=n,hc[fc++]=r,pc|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Le(e,t,n,r){return Be(e,t,n,r),Ne(e)}function De(e,t){return Be(e,null,null,t),Ne(e)}function Fe(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var i=!1,a=e.return;null!==a;)a.childLanes|=n,null!==(r=a.alternate)&&(r.childLanes|=n),22===a.tag&&(null===(e=a.stateNode)||1&e._visibility||(i=!0)),e=a,a=a.return;return 3===e.tag?(a=e.stateNode,i&&null!==t&&(i=31-Ko(n),null===(r=(e=a.hiddenUpdates)[i])?e[i]=[t]:r.push(t),t.lane=536870912|n),a):null}function Ne(e){if(50<Fu)throw Fu=0,Nu=null,Error(r(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}function Ue(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Oe(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ke(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ze(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&iu){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ne(e),Fe(e,null,n),t}return Be(e,r,t,n),Ne(e)}function He(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,A(e,n)}}function Ge(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===a?i=a=s:a=a.next=s,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ve(){if(gc&&null!==ec)throw ec}function We(e,t,n,r){gc=!1;var i=e.updateQueue;mc=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,o=i.shared.pending;if(null!==o){i.shared.pending=null;var l=o,c=l.next;l.next=null,null===s?a=c:s.next=c,s=l;var u=e.alternate;null!==u&&(o=(u=u.updateQueue).lastBaseUpdate)!==s&&(null===o?u.firstBaseUpdate=c:o.next=c,u.lastBaseUpdate=l)}if(null!==a){var d=i.baseState;for(s=0,u=c=l=null,o=a;;){var h=-536870913&o.lane,f=h!==o.lane;if(f?(ou&h)===h:(r&h)===h){0!==h&&h===$l&&(gc=!0),null!==u&&(u=u.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var p=e,m=o;h=t;var g=n;switch(m.tag){case 1:if("function"==typeof(p=m.payload)){d=p.call(g,d,h);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(h="function"==typeof(p=m.payload)?p.call(g,d,h):p))break e;d=sa({},d,h);break e;case 2:mc=!0}}null!==(h=o.callback)&&(e.flags|=64,f&&(e.flags|=8192),null===(f=i.callbacks)?i.callbacks=[h]:f.push(h))}else f={lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===u?(c=u=f,l=d):u=u.next=f,s|=h;if(null===(o=o.next)){if(null===(o=i.shared.pending))break;o=(f=o).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null===a&&(i.shared.lanes=0),mu|=s,e.lanes=s,e.memoizedState=d}}function je(e,t){if("function"!=typeof e)throw Error(r(191,e));e.call(t)}function Xe(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)je(n[e],t)}function Je(e,t){f(yc,e=fu),f(vc,t),fu=e|t.baseLanes}function Ye(){f(yc,fu),f(vc,vc.current)}function Ke(){fu=yc.current,h(vc),h(yc)}function qe(e){var t=e.alternate;f(xc,1&xc.current),f(_c,e),null===bc&&(null===t||null!==vc.current||null!==t.memoizedState)&&(bc=e)}function Qe(e){f(xc,xc.current),f(_c,e),null===bc&&(bc=e)}function Ze(e){22===e.tag?(f(xc,xc.current),f(_c,e),null===bc&&(bc=e)):$e()}function $e(){f(xc,xc.current),f(_c,_c.current)}function et(e){h(_c),bc===e&&(bc=null),h(xc)}function tt(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Hs(n)||Gs(n)))return t}else if(19!==t.tag||"forwards"!==t.memoizedProps.revealOrder&&"backwards"!==t.memoizedProps.revealOrder&&"unstable_legacy-backwards"!==t.memoizedProps.revealOrder&&"together"!==t.memoizedProps.revealOrder){if(null!==t.child){t.child.return=t,t=t.child;continue}}else if(128&t.flags)return t;if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function nt(){throw Error(r(321))}function rt(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!pl(e[n],t[n]))return!1;return!0}function it(e,t,n,r,i,a){return Sc=a,Ac=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,wa.H=null===e||null===e.memoizedState?Dc:Fc,Tc=!1,a=n(r,i),Tc=!1,Cc&&(a=st(t,n,r,i)),at(e),a}function at(e){wa.H=Lc;var t=null!==Mc&&null!==Mc.next;if(Sc=0,wc=Mc=Ac=null,Ec=!1,Ic=0,Pc=null,t)throw Error(r(300));null===e||kc||null!==(e=e.dependencies)&&te(e)&&(kc=!0)}function st(e,t,n,i){Ac=e;var a=0;do{if(Cc&&(Pc=null),Ic=0,Cc=!1,25<=a)throw Error(r(301));if(a+=1,wc=Mc=null,null!=e.updateQueue){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,null!=s.memoCache&&(s.memoCache.index=0)}wa.H=Nc,s=t(n,i)}while(Cc);return s}function ot(){var e=wa.H,t=e.useState()[0];return t="function"==typeof t.then?ft(t):t,e=e.useState()[0],(null!==Mc?Mc.memoizedState:null)!==e&&(Ac.flags|=1024),t}function lt(){var e=0!==Rc;return Rc=0,e}function ct(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ut(e){if(Ec){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}Ec=!1}Sc=0,wc=Mc=Ac=null,Cc=!1,Ic=Rc=0,Pc=null}function dt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===wc?Ac.memoizedState=wc=e:wc=wc.next=e,wc}function ht(){if(null===Mc){var e=Ac.alternate;e=null!==e?e.memoizedState:null}else e=Mc.next;var t=null===wc?Ac.memoizedState:wc.next;if(null!==t)wc=t,Mc=e;else{if(null===e)throw null===Ac.alternate?Error(r(467)):Error(r(310));e={memoizedState:(Mc=e).memoizedState,baseState:Mc.baseState,baseQueue:Mc.baseQueue,queue:Mc.queue,next:null},null===wc?Ac.memoizedState=wc=e:wc=wc.next=e}return wc}function ft(e){var t=Ic;return Ic+=1,null===Pc&&(Pc=[]),e=Ae(Pc,e,t),t=Ac,null===(null===wc?t.memoizedState:wc.next)&&(t=t.alternate,wa.H=null===t||null===t.memoizedState?Dc:Fc),e}function pt(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return ft(e);if(e.$$typeof===pa)return re(e)}throw Error(r(438,String(e)))}function mt(e){var t=null,n=Ac.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=Ac.alternate;null!==r&&null!==(r=r.updateQueue)&&null!=(r=r.memoCache)&&(t={data:r.data.map(function(e){return e.slice()}),index:0})}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Ac.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=xa;return t.index++,n}function gt(e,t){return"function"==typeof t?t(e):t}function vt(e){return yt(ht(),Mc,e)}function yt(e,t,n){var i=e.queue;if(null===i)throw Error(r(311));i.lastRenderedReducer=n;var a=e.baseQueue,s=i.pending;if(null!==s){if(null!==a){var o=a.next;a.next=s.next,s.next=o}t.baseQueue=a=s,i.pending=null}if(s=e.baseState,null===a)e.memoizedState=s;else{var l=o=null,c=null,u=t=a.next,d=!1;do{var h=-536870913&u.lane;if(h!==u.lane?(ou&h)===h:(Sc&h)===h){var f=u.revertLane;if(0===f)null!==c&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),h===$l&&(d=!0);else{if((Sc&f)===f){u=u.next,f===$l&&(d=!0);continue}h={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=h,o=s):c=c.next=h,Ac.lanes|=f,mu|=f}h=u.action,Tc&&n(s,h),s=u.hasEagerState?u.eagerState:n(s,h)}else f={lane:h,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=f,o=s):c=c.next=f,Ac.lanes|=h,mu|=h;u=u.next}while(null!==u&&u!==t);if(null===c?o=s:c.next=l,!pl(s,e.memoizedState)&&(kc=!0,d&&null!==(n=ec)))throw n;e.memoizedState=s,e.baseState=o,e.baseQueue=c,i.lastRenderedState=s}return null===a&&(i.lanes=0),[e.memoizedState,i.dispatch]}function _t(e){var t=ht(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,s=t.memoizedState;if(null!==a){n.pending=null;var o=a=a.next;do{s=e(s,o.action),o=o.next}while(o!==a);pl(s,t.memoizedState)||(kc=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),n.lastRenderedState=s}return[s,i]}function bt(e,t,n){var i=Ac,a=ht(),s=Dl;if(s){if(void 0===n)throw Error(r(407));n=n()}else n=t();var o=!pl((Mc||a).memoizedState,n);if(o&&(a.memoizedState=n,kc=!0),a=a.queue,jt(At.bind(null,i,a,e),[e]),a.getSnapshot!==t||o||null!==wc&&1&wc.memoizedState.tag){if(i.flags|=2048,zt(9,{destroy:void 0},St.bind(null,i,a,n,t),null),null===au)throw Error(r(349));s||127&Sc||xt(i,t,n)}return n}function xt(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Ac.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},Ac.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function St(e,t,n,r){t.value=n,t.getSnapshot=r,Mt(t)&&wt(e)}function At(e,t,n){return n(function(){Mt(t)&&wt(e)})}function Mt(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!pl(e,n)}catch{return!0}}function wt(e){var t=De(e,2);null!==t&&si(t,0,2)}function Et(e){var t=dt();if("function"==typeof e){var n=e;if(e=n(),Tc){C(!0);try{n()}finally{C(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gt,lastRenderedState:e},t}function Ct(e,t,n,r){return e.baseState=n,yt(e,Mc,"function"==typeof r?r:gt)}function Tt(e,t,n,i,a){if(fn(e))throw Error(r(485));if(null!==(e=t.action)){var s={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){s.listeners.push(e)}};null!==wa.T?n(!0):s.isTransition=!1,i(s),null===(n=t.pending)?(s.next=t.pending=s,Rt(t,s)):(s.next=n.next,t.pending=n.next=s)}}function Rt(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=wa.T,s={};wa.T=s;try{var o=n(i,r),l=wa.S;null!==l&&l(s,o),It(e,t,o)}catch(c){Bt(e,t,c)}finally{null!==a&&null!==s.types&&(a.types=s.types),wa.T=a}}else try{It(e,t,a=n(i,r))}catch(c){Bt(e,t,c)}}function It(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then(function(n){Pt(e,t,n)},function(n){return Bt(e,t,n)}):Pt(e,t,n)}function Pt(e,t,n){t.status="fulfilled",t.value=n,Lt(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Rt(e,n)))}function Bt(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,Lt(t),t=t.next}
vendor: 4,652 bytes, line 26
26while(t!==r)}e.action=null}function Lt(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Dt(e,t){return t}function Ft(e,t){if(Dl){var n=au.formState;if(null!==n){e:{var r=Ac;if(Dl){if(Ll){var i=js(Ll,Nl);if(i){Ll=Js(i),r=Xs(i);break e}}G(r)}r=!1}r&&(t=n[0])}}(n=dt()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dt,lastRenderedState:t},n.queue=r,n=un.bind(null,Ac,r),r.dispatch=n,r=Et(!1);var a=hn.bind(null,Ac,!1,r.queue);return i={state:t,dispatch:null,action:e,pending:null},(r=dt()).queue=i,n=Tt.bind(null,Ac,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Nt(e){return Ut(ht(),Mc,e)}function Ut(e,t,n){if(t=yt(e,t,Dt)[0],e=vt(gt)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var r=ft(t)}catch(s){throw s===rc?ac:s}else r=t;var i=(t=ht()).queue,a=i.dispatch;return n!==t.memoizedState&&(Ac.flags|=2048,zt(9,{destroy:void 0},Ot.bind(null,i,n),null)),[r,a,e]}function Ot(e,t){e.action=t}function kt(e){var t=ht(),n=Mc;if(null!==n)return Ut(t,n,e);ht(),t=t.memoizedState;var r=(n=ht()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function zt(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=Ac.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Ac.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ht(){return ht().memoizedState}function Gt(e,t,n,r){var i=dt();Ac.flags|=e,i.memoizedState=zt(1|t,{destroy:void 0},n,void 0===r?null:r)}function Vt(e,t,n,r){var i=ht();r=void 0===r?null:r;var a=i.memoizedState.inst;null!==Mc&&null!==r&&rt(r,Mc.memoizedState.deps)?i.memoizedState=zt(t,a,n,r):(Ac.flags|=e,i.memoizedState=zt(1|t,a,n,r))}function Wt(e,t){Gt(8390656,8,e,t)}function jt(e,t){Vt(2048,8,e,t)}function Xt(e){var t=ht().memoizedState;return function(e){Ac.flags|=4;var t=Ac.updateQueue;if(null===t)t={lastEffect:null,events:null,stores:null,memoCache:null},Ac.updateQueue=t,t.events=[e];else{var n=t.events;null===n?t.events=[e]:n.push(e)}}({ref:t,nextImpl:e}),function(){if(2&iu)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Jt(e,t){return Vt(4,2,e,t)}function Yt(e,t){return Vt(4,4,e,t)}function Kt(e,t){if("function"==typeof t){e=e();var n=t(e);return function(){"function"==typeof n?n():t(null)}}if(null!=t)return e=e(),t.current=e,function(){t.current=null}}function qt(e,t,n){n=null!=n?n.concat([e]):null,Vt(4,4,Kt.bind(null,t,e),n)}function Qt(){}function Zt(e,t){var n=ht();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&rt(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function $t(e,t){var n=ht();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&rt(t,r[1]))return r[0];if(r=e(),Tc){C(!0);try{e()}finally{C(!1)}}return n.memoizedState=[r,t],r}function en(e,t,n){return void 0===n||1073741824&Sc&&!(261930&ou)?e.memoizedState=t:(e.memoizedState=n,e=ai(),Ac.lanes|=e,mu|=e,n)}function tn(e,t,n,r){return pl(n,t)?n:null!==vc.current?(e=en(e,n,r),pl(e,t)||(kc=!0),e):42&Sc&&(!(1073741824&Sc)||261930&ou)?(e=ai(),Ac.lanes|=e,mu|=e,t):(kc=!0,e.memoizedState=n)}function nn(e,t,n,r,i){var a=Ka();Ya(0!==a&&8>a?a:8);var s=wa.T,o={};wa.T=o,hn(e,!1,t,n);try{var l=i(),c=wa.S;if(null!==c&&c(o,l),null!==l&&"object"==typeof l&&"function"==typeof l.then){var u=function(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status="rejected",r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}(l,r);dn(e,t,u,ii())}else dn(e,t,r,ii())}catch(d){dn(e,t,{then:function(){},status:"rejected",reason:d},ii())}finally{Ya(a),null!==s&&null!==o.types&&(s.types=o.types),wa.T=s}}function rn(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:ss,baseState:ss,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gt,lastRenderedState:ss},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gt,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function an(){return re(os)}function sn(){return ht().memoizedState}function on(){return ht().memoizedState}function ln(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=ii(),r=ze(t,e=ke(n),n);return null!==r&&(si(r,0,n),He(r,t,n)),t={cache:se()},void(e.payload=t)}t=t.return}}function cn(e,t,n){var r=ii();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},fn(e)?pn(t,n):null!==(n=Le(e,t,n,r))&&(si(n,0,r),mn(n,t,r))}
vendor: 18,610 bytes, line 26
26function un(e,t,n){dn(e,t,n,ii())}function dn(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(fn(e))pn(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,o=a(s,n);if(i.hasEagerState=!0,i.eagerState=o,pl(o,s))return Be(e,t,i,0),null===au&&Pe(),!1}catch{}if(null!==(n=Le(e,t,i,r)))return si(n,0,r),mn(n,t,r),!0}return!1}function hn(e,t,n,i){if(i={lane:2,revertLane:ge(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},fn(e)){if(t)throw Error(r(479))}else null!==(t=Le(e,n,i,2))&&si(t,0,2)}function fn(e){var t=e.alternate;return e===Ac||null!==t&&t===Ac}function pn(e,t){Cc=Ec=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function mn(e,t,n){if(4194048&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,A(e,n)}}function gn(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:sa({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}function vn(e,t,n,r,i,a,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,s):!(t.prototype&&t.prototype.isPureReactComponent&&xe(n,r)&&xe(i,a))}function yn(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Uc.enqueueReplaceState(t,t.state,null)}function _n(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=sa({},n)),e)void 0===n[i]&&(n[i]=e[i]);return n}function bn(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(xR){setTimeout(function(){throw xR})}}function xn(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(MR){setTimeout(function(){throw MR})}}function Sn(e,t,n){return(n=ke(n)).tag=3,n.payload={element:null},n.callback=function(){bn(e,t)},n}function An(e){return(e=ke(e)).tag=3,e}function Mn(e,t,n,r){var i=n.type.getDerivedStateFromError;if("function"==typeof i){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){xn(t,n,r)}}var s=n.stateNode;null!==s&&"function"==typeof s.componentDidCatch&&(e.callback=function(){xn(t,n,r),"function"!=typeof i&&(null===Cu?Cu=new Set([this]):Cu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}function wn(e,t,n,r){t.child=null===e?dc(t,null,n,r):uc(t,e.child,n,r)}function En(e,t,n,r,i){n=n.render;var a=t.ref;if("ref"in r){var s={};for(var o in r)"ref"!==o&&(s[o]=r[o])}else s=r;return ne(t),r=it(e,t,n,s,a,i),o=lt(),null===e||kc?(Dl&&o&&F(t),t.flags|=1,wn(e,t,r,i),t.child):(ct(e,t,i),Yn(e,t,i))}function Cn(e,t,n,r,i){if(null===e){var a=n.type;return"function"!=typeof a||Gi(a)||void 0!==a.defaultProps||null!==n.compare?((e=ji(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Tn(e,t,a,r,i))}if(a=e.child,!Kn(e,i)){var s=a.memoizedProps;if((n=null!==(n=n.compare)?n:xe)(s,r)&&e.ref===t.ref)return Yn(e,t,i)}return t.flags|=1,(e=Vi(a,r)).ref=t.ref,e.return=t,t.child=e}function Tn(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(xe(a,r)&&e.ref===t.ref){if(kc=!1,t.pendingProps=r=a,!Kn(e,i))return t.lanes=e.lanes,Yn(e,t,i);131072&e.flags&&(kc=!0)}}return Fn(e,t,n,r,i)}function Rn(e,t,n,r){var i=r.children,a=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===r.mode){if(128&t.flags){if(a=null!==a?a.baseLanes|n:n,null!==e){for(r=t.child=e.child,i=0;null!==r;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Pn(e,t,a,n,r)}if(!(536870912&n))return r=t.lanes=536870912,Pn(e,t,null!==a?a.baseLanes|n:n,n,r);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&_e(0,null!==a?a.cachePool:null),null!==a?Je(t,a):Ye(),Ze(t)}else null!==a?(_e(0,a.cachePool),Je(t,a),$e(),t.memoizedState=null):(null!==e&&_e(0,null),Ye(),$e());return wn(e,t,i,n),t.child}function In(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Pn(e,t,n,r,i){var a=ye();return a=null===a?null:{parent:Ga?Wl._currentValue:Wl._currentValue2,pool:a},t.memoizedState={baseLanes:n,cachePool:a},null!==e&&_e(0,null),Ye(),Ze(t),null!==e&&ee(e,t,r,!0),t.childLanes=i,null}function Bn(e,t){return(t=Vn({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function Ln(e,t,n){return uc(t,e.child,null,n),(e=Bn(t,t.pendingProps)).flags|=2,et(t),t.memoizedState=null,e}function Dn(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(r(284));(null===e||e.ref!==n)&&(t.flags|=4194816)}}function Fn(e,t,n,r,i){return ne(t),n=it(e,t,n,r,void 0,i),r=lt(),null===e||kc?(Dl&&r&&F(t),t.flags|=1,wn(e,t,n,i),t.child):(ct(e,t,i),Yn(e,t,i))}function Nn(e,t,n,r,i,a){return ne(t),t.updateQueue=null,n=st(t,r,n,i),at(e),r=lt(),null===e||kc?(Dl&&r&&F(t),t.flags|=1,wn(e,t,n,a),t.child):(ct(e,t,a),Yn(e,t,a))}function Un(e,t,n,r,i){if(ne(t),null===t.stateNode){var a=Yo,s=n.contextType;"object"==typeof s&&null!==s&&(a=re(s)),a=new n(r,a),t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,a.updater=Uc,t.stateNode=a,a._reactInternals=t,(a=t.stateNode).props=r,a.state=t.memoizedState,a.refs={},Ue(t),s=n.contextType,a.context="object"==typeof s&&null!==s?re(s):Yo,a.state=t.memoizedState,"function"==typeof(s=n.getDerivedStateFromProps)&&(gn(t,n,s,r),a.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(s=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),s!==a.state&&Uc.enqueueReplaceState(a,a.state,null),We(t,r,a,i),Ve(),a.state=t.memoizedState),"function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){a=t.stateNode;var o=t.memoizedProps,l=_n(n,o);a.props=l;var c=a.context,u=n.contextType;s=Yo,"object"==typeof u&&null!==u&&(s=re(u));var d=n.getDerivedStateFromProps;u="function"==typeof d||"function"==typeof a.getSnapshotBeforeUpdate,o=t.pendingProps!==o,u||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o||c!==s)&&yn(t,a,r,s),mc=!1;var h=t.memoizedState;a.state=h,We(t,r,a,i),Ve(),c=t.memoizedState,o||h!==c||mc?("function"==typeof d&&(gn(t,n,d,r),c=t.memoizedState),(l=mc||vn(t,n,l,r,h,c,s))?(u||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=s,r=l):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Oe(e,t),u=_n(n,s=t.memoizedProps),a.props=u,d=t.pendingProps,h=a.context,c=n.contextType,l=Yo,"object"==typeof c&&null!==c&&(l=re(c)),(c="function"==typeof(o=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||h!==l)&&yn(t,a,r,l),mc=!1,h=t.memoizedState,a.state=h,We(t,r,a,i),Ve();var f=t.memoizedState;s!==d||h!==f||mc||null!==e&&null!==e.dependencies&&te(e.dependencies)?("function"==typeof o&&(gn(t,n,o,r),f=t.memoizedState),(u=mc||vn(t,n,u,r,h,f,l)||null!==e&&null!==e.dependencies&&te(e.dependencies))?(c||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,f,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,f,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=l,r=u):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Dn(e,t),r=!!(128&t.flags),a||r?(a=t.stateNode,n=r&&"function"!=typeof n.getDerivedStateFromError?null:a.render(),t.flags|=1,null!==e&&r?(t.child=uc(t,e.child,null,i),t.child=uc(t,null,n,i)):wn(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Yn(e,t,i),e}function On(e,t,n,r){return X(),t.flags|=256,wn(e,t,n,r),t.child}function kn(e){return{baseLanes:e,cachePool:be()}}function zn(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=yu),e}function Hn(e,t,n){var i,a=t.pendingProps,s=!1,o=!!(128&t.flags);if((i=o)||(i=(null===e||null!==e.memoizedState)&&!!(2&xc.current)),i&&(s=!0,t.flags&=-129),i=!!(32&t.flags),t.flags&=-33,null===e){if(Dl){if(s?qe(t):$e(),(e=Ll)?null!==(e=ro(e,Nl))&&(t.memoizedState={dehydrated:e,treeContext:null!==wl?{id:El,overflow:Cl}:null,retryLane:536870912,hydrationErrors:null},(n=Yi(e)).return=t,t.child=n,Bl=t,Ll=null):e=null,null===e)throw G(t);return Gs(e)?t.lanes=32:t.lanes=536870912,null}var l=a.children;return a=a.fallback,s?($e(),l=Vn({mode:"hidden",children:l},s=t.mode),a=Xi(a,s,n,null),l.return=t,a.return=t,l.sibling=a,t.child=l,(a=t.child).memoizedState=kn(n),a.childLanes=zn(e,i,n),t.memoizedState=zc,In(null,a)):(qe(t),Gn(t,l))}var c=e.memoizedState;if(null!==c&&null!==(l=c.dehydrated)){if(o)256&t.flags?(qe(t),t.flags&=-257,t=Wn(e,t,n)):null!==t.memoizedState?($e(),t.child=e.child,t.flags|=128,t=null):($e(),l=a.fallback,s=t.mode,a=Vn({mode:"visible",children:a.children},s),(l=Xi(l,s,n,null)).flags|=2,a.return=t,l.return=t,a.sibling=l,t.child=a,uc(t,e.child,null,n),(a=t.child).memoizedState=kn(n),a.childLanes=zn(e,i,n),t.memoizedState=zc,t=In(null,a));else if(qe(t),Gs(l))i=Vs(l).digest,(a=Error(r(419))).stack="",a.digest=i,Y({value:a,source:null,stack:null}),t=Wn(e,t,n);else if(kc||ee(e,t,n,!1),i=0!==(n&e.childLanes),kc||i){if(null!==(i=au)&&0!==(a=M(i,n))&&a!==c.retryLane)throw c.retryLane=a,De(e,a),si(i,0,a),Oc;Hs(l)||yi(),t=Wn(e,t,n)}else Hs(l)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,ja&&(Ll=Zs(l),Bl=t,Dl=!0,Fl=null,Nl=!1,null!==e&&U(t,e)),(t=Gn(t,a.children)).flags|=4096);return t}return s?($e(),l=a.fallback,s=t.mode,o=(c=e.child).sibling,(a=Vi(c,{mode:"hidden",children:a.children})).subtreeFlags=65011712&c.subtreeFlags,null!==o?l=Vi(o,l):(l=Xi(l,s,n,null)).flags|=2,l.return=t,a.return=t,a.sibling=l,t.child=a,In(null,a),a=t.child,null===(l=e.child.memoizedState)?l=kn(n):(null!==(s=l.cachePool)?(c=Ga?Wl._currentValue:Wl._currentValue2,s=s.parent!==c?{parent:c,pool:c}:s):s=be(),l={baseLanes:l.baseLanes|n,cachePool:s}),a.memoizedState=l,a.childLanes=zn(e,i,n),t.memoizedState=zc,In(e.child,a)):(qe(t),e=(n=e.child).sibling,(n=Vi(n,{mode:"visible",children:a.children})).return=t,n.sibling=null,null!==e&&(null===(i=t.deletions)?(t.deletions=[e],t.flags|=16):i.push(e)),t.child=n,t.memoizedState=null,n)}function Gn(e,t){return(t=Vn({mode:"visible",children:t},e.mode)).return=e,e.child=t}function Vn(e,n){return(e=t(22,e,null,n)).lanes=0,e}function Wn(e,t,n){return uc(t,e.child,null,n),(e=Gn(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function jn(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Z(e.return,t,n)}function Xn(e,t,n,r,i,a){var s=e.memoizedState;null===s?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i,s.treeForkCount=a)}function Jn(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var s=xc.current,o=!!(2&s);if(o?(s=1&s|2,t.flags|=128):s&=1,f(xc,s),wn(e,t,r,n),r=Dl?Sl:0,!o&&null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&jn(e,n,t);else if(19===e.tag)jn(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===tt(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Xn(t,!1,i,n,a,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===tt(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Xn(t,!0,n,null,a,r);break;case"together":Xn(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Yn(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),mu|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(ee(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(r(153));if(null!==t.child){for(n=Vi(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Vi(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Kn(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!te(e))}function qn(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)kc=!0;else{if(!(Kn(e,n)||128&t.flags))return kc=!1,function(e,t,n){switch(t.tag){case 3:O(t,t.stateNode.containerInfo),K(0,Wl,e.memoizedState.cache),X();break;case 27:case 5:z(t);break;case 4:O(t,t.stateNode.containerInfo);break;case 10:K(0,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,Qe(t),null;break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(qe(t),t.flags|=128,null):0!==(n&t.child.childLanes)?Hn(e,t,n):(qe(t),null!==(e=Yn(e,t,n))?e.sibling:null);qe(t);break;case 19:var i=!!(128&e.flags);if((r=0!==(n&t.childLanes))||(ee(e,t,n,!1),r=0!==(n&t.childLanes)),i){if(r)return Jn(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),f(xc,xc.current),r)break;return null;case 22:return t.lanes=0,Rn(e,t,n,t.pendingProps);case 24:K(0,Wl,e.memoizedState.cache)}return Yn(e,t,n)}(e,t,n);kc=!!(131072&e.flags)}else kc=!1,Dl&&1048576&t.flags&&D(t,Sl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=Me(t.elementType),t.type=e,"function"!=typeof e){if(null!=e){var a=e.$$typeof;if(a===ma){t.tag=11,t=En(null,t,e,i,n);break e}if(a===ya){t.tag=14,t=Cn(null,t,e,i,n);break e}}throw t=u(e)||e,Error(r(306,t,""))}Gi(e)?(i=_n(e,i),t.tag=1,t=Un(null,t,e,i,n)):(t.tag=0,t=Fn(null,t,e,i,n))}return t;case 0:return Fn(e,t,t.type,t.pendingProps,n);case 1:return Un(e,t,i=t.type,a=_n(i,t.pendingProps),n);case 3:e:{if(O(t,t.stateNode.containerInfo),null===e)throw Error(r(387));var s=t.pendingProps;i=(a=t.memoizedState).element,Oe(e,t),We(t,s,null,n);var o=t.memoizedState;if(s=o.cache,K(0,Wl,s),s!==a.cache&&$(t,[Wl],n,!0),Ve(),s=o.element,ja&&a.isDehydrated){if(a={element:s,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=On(e,t,s,n);break e}if(s!==i){Y(i=B(Error(r(424)),t)),t=On(e,t,s,n);break e}for(ja&&(Ll=qs(t.stateNode.containerInfo),Bl=t,Dl=!0,Fl=null,Nl=!0),n=dc(t,null,s,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(X(),s===i){t=Yn(e,t,n);break e}wn(e,t,s,n)}t=t.child}return t;case 26:if(Eo)return Dn(e,t),null===e?(n=Ro(t.type,null,t.pendingProps,null))?t.memoizedState=n:Dl||(t.stateNode=Fo(t.type,t.pendingProps,Il.current,t)):t.memoizedState=Ro(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:if(zo)return z(t),null===e&&zo&&Dl&&(i=t.stateNode=Ho(t.type,t.pendingProps,Il.current,Tl.current,!1),Bl=t,Nl=!0,Ll=$s(t.type,i,Ll)),wn(e,t,t.pendingProps.children,n),Dn(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&Dl&&(Mo(t.type,t.pendingProps,Tl.current),(a=i=Ll)&&(null!==(i=eo(i,t.type,t.pendingProps,Nl))?(t.stateNode=i,Bl=t,Ll=Ks(i),Nl=!1,a=!0):a=!1),a||G(t)),z(t),a=t.type,s=t.pendingProps,o=null!==e?e.memoizedProps:null,i=s.children,Ua(a,s)?i=null:null!==o&&Ua(a,o)&&(t.flags|=32),null!==t.memoizedState&&(a=it(e,t,ot,null,null,n),Ga?os._currentValue=a:os._currentValue2=a),Dn(e,t),wn(e,t,i,n),t.child;case 6:return null===e&&Dl&&(wo(t.pendingProps,Tl.current),(e=n=Ll)&&(null!==(n=to(n,t.pendingProps,Nl))?(t.stateNode=n,Bl=t,Ll=null,e=!0):e=!1),e||G(t)),null;case 13:return Hn(e,t,n);case 4:return O(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=uc(t,null,i,n):wn(e,t,i,n),t.child;case 11:return En(e,t,t.type,t.pendingProps,n);case 7:return wn(e,t,t.pendingProps,n),t.child;case 8:case 12:return wn(e,t,t.pendingProps.children,n),t.child;case 10:return i=t.pendingProps,K(0,t.type,i.value),wn(e,t,i.children,n),t.child;case 9:return a=t.type._context,i=t.pendingProps.children,ne(t),i=i(a=re(a)),t.flags|=1,wn(e,t,i,n),t.child;case 14:return Cn(e,t,t.type,t.pendingProps,n);case 15:return Tn(e,t,t.type,t.pendingProps,n);case 19:return Jn(e,t,n);case 31:return function(e,t,n){var i=t.pendingProps,a=!!(128&t.flags);if(t.flags&=-129,null===e){if(Dl){if("hidden"===i.mode)return e=Bn(t,i),t.lanes=536870912,In(null,e);if(Qe(t),(e=Ll)?null!==(e=no(e,Nl))&&(t.memoizedState={dehydrated:e,treeContext:null!==wl?{id:El,overflow:Cl}:null,retryLane:536870912,hydrationErrors:null},(n=Yi(e)).return=t,t.child=n,Bl=t,Ll=null):e=null,null===e)throw G(t);return t.lanes=536870912,null}return Bn(t,i)}var s=e.memoizedState;if(null!==s){var o=s.dehydrated;if(Qe(t),a)if(256&t.flags)t.flags&=-257,t=Ln(e,t,n);else{if(null===t.memoizedState)throw Error(r(558));t.child=e.child,t.flags|=128,t=null}else if(kc||ee(e,t,n,!1),a=0!==(n&e.childLanes),kc||a){if(null!==(i=au)&&0!==(o=M(i,n))&&o!==s.retryLane)throw s.retryLane=o,De(e,o),si(i,0,o),Oc;yi(),t=Ln(e,t,n)}else e=s.treeContext,ja&&(Ll=Qs(o),Bl=t,Dl=!0,Fl=null,Nl=!1,null!==e&&U(t,e)),(t=Bn(t,i)).flags|=4096;return t}return(e=Vi(e.child,{mode:i.mode,children:i.children})).ref=t.ref,t.child=e,e.return=t,e}(e,t,n);case 22:return Rn(e,t,n,t.pendingProps);case 24:return ne(t),i=re(Wl),null===e?(null===(a=ye())&&(a=au,s=se(),a.pooledCache=s,s.refCount++,null!==s&&(a.pooledCacheLanes|=n),a=s),t.memoizedState={parent:i,
26cache:a},Ue(t),K(0,Wl,a)):(0!==(e.lanes&n)&&(Oe(e,t),We(t,null,null,n),Ve()),a=e.memoizedState,s=t.memoizedState,a.parent!==i?(a={parent:i,cache:i},t.memoizedState=a,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=a),K(0,Wl,i)):(i=s.cache,K(0,Wl,i),i!==a.cache&&$(t,[Wl],n,!0))),wn(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Qn(e){e.flags|=4}function Zn(e){Wa&&(e.flags|=8)}function $n(e,t){if(null!==e&&e.child===t.child)return!1;if(16&t.flags)return!0;for(e=t.child;null!==e;){if(8218&e.flags||8218&e.subtreeFlags)return!0;e=e.sibling}return!1}function er(e,t,n,r){if(Va)for(n=t.child;null!==n;){if(5===n.tag||6===n.tag)Fa(e,n.stateNode);else if(!(4===n.tag||zo&&27===n.tag)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}else if(Wa)for(var i=t.child;null!==i;){if(5===i.tag){var a=i.stateNode;n&&r&&(a=ks(a,i.type,i.memoizedProps)),Fa(e,a)}else if(6===i.tag)a=i.stateNode,n&&r&&(a=zs(a,i.memoizedProps)),Fa(e,a);else if(4!==i.tag)if(22===i.tag&&null!==i.memoizedState)null!==(a=i.child)&&(a.return=i),er(e,i,!0,!0);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function tr(e,t,n,r){var i=!1;if(Wa)for(var a=t.child;null!==a;){if(5===a.tag){var s=a.stateNode;n&&r&&(s=ks(s,a.type,a.memoizedProps)),Ns(e,s)}else if(6===a.tag)s=a.stateNode,n&&r&&(s=zs(s,a.memoizedProps)),Ns(e,s);else if(4!==a.tag)if(22===a.tag&&null!==a.memoizedState)null!==(i=a.child)&&(i.return=a),tr(e,a,!0,!0),i=!0;else if(null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return i;a=a.return}a.sibling.return=a.return,a=a.sibling}return i}function nr(e,t){if(Wa&&$n(e,t)){var n=(e=t.stateNode).containerInfo,r=Fs();tr(r,t,!1,!1),e.pendingChildren=r,Qn(t),Us(n,r)}}function rr(e,t,n,r){if(Va)e.memoizedProps!==r&&Qn(t);else if(Wa){var i=e.stateNode,a=e.memoizedProps;if((e=$n(e,t))||a!==r){var s=Tl.current;(a=Ds(i,n,a,r,!e,null))===i?t.stateNode=i:(Zn(t),Na(a,n,r,s)&&Qn(t),t.stateNode=a,e&&er(a,t,!1,!1))}else t.stateNode=i}}function ir(e,t,n,r,i){if(32&e.mode&&(null===n?$a(t,r):es(t,n,r))){if(e.flags|=16777216,(335544128&i)===i||ts(t,r))if(ns(e.stateNode,t,r))e.flags|=8192;else{if(!mi())throw oc=sc,ic;e.flags|=8192}}else e.flags&=-16777217}function ar(e,t){if(Uo(t)){if(e.flags|=16777216,!Oo(t)){if(!mi())throw oc=sc,ic;e.flags|=8192}}else e.flags&=-16777217}function sr(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?_():536870912,e.lanes|=t,_u|=t)}function or(e,t){if(!Dl)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function lr(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=65011712&i.subtreeFlags,r|=65011712&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function cr(e,t,n){var i=t.pendingProps;switch(N(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return lr(t),null;case 3:return n=t.stateNode,i=null,null!==e&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),q(Wl),k(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(null===e||null===e.child)&&(j(t)?Qn(t):null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,J())),nr(e,t),lr(t),null;case 26:if(Eo){var a=t.type,s=t.memoizedState;return null===e?(Qn(t),null!==s?(lr(t),ar(t,s)):(lr(t),ir(t,a,null,i,n))):s?s!==e.memoizedState?(Qn(t),lr(t),ar(t,s)):(lr(t),t.flags&=-16777217):(s=e.memoizedProps,Va?s!==i&&Qn(t):rr(e,t,a,i),lr(t),ir(t,a,s,i,n)),null}case 27:if(zo){if(H(t),n=Il.current,a=t.type,null!==e&&null!=t.stateNode)Va?e.memoizedProps!==i&&Qn(t):rr(e,t,a,i);else{if(!i){if(null===t.stateNode)throw Error(r(166));return lr(t),null}e=Tl.current,j(t)?V(t,e):(e=Ho(a,i,n,e,!0),t.stateNode=e,Qn(t))}return lr(t),null}case 5:if(H(t),a=t.type,null!==e&&null!=t.stateNode)rr(e,t,a,i);else{if(!i){if(null===t.stateNode)throw Error(r(166));return lr(t),null}if(s=Tl.current,j(t))V(t,s),mo(t.stateNode,a,i,s)&&(t.flags|=64);else{var o=Da(a,i,Il.current,s,t);Zn(t),er(o,t,!1,!1),t.stateNode=o,Na(o,a,i,s)&&Qn(t)}}return lr(t),ir(t,t.type,null===e?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)n=e.memoizedProps,Va?n!==i&&Qn(t):Wa&&(n!==i?(e=Il.current,n=Tl.current,Zn(t),t.stateNode=Oa(i,e,n,t)):t.stateNode=e.stateNode);else{if("string"!=typeof i&&null===t.stateNode)throw Error(r(166));
vendor: 4,961 bytes, line 26
26if(e=Il.current,n=Tl.current,j(t)){if(!ja)throw Error(r(176));if(e=t.stateNode,n=t.memoizedProps,i=null,null!==(a=Bl))switch(a.tag){case 27:case 5:i=a.memoizedProps}ao(e,n,t,i)||G(t,!0)}else Zn(t),t.stateNode=Oa(i,e,n,t)}return lr(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(i=j(t),null!==n){if(null===e){if(!i)throw Error(r(318));if(!ja)throw Error(r(556));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(r(557));so(e,t)}else X(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;lr(t),e=!1}else n=J(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(et(t),t):(et(t),null);if(128&t.flags)throw Error(r(558))}return lr(t),null;case 13:if(i=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(a=j(t),null!==i&&null!==i.dehydrated){if(null===e){if(!a)throw Error(r(318));if(!ja)throw Error(r(344));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(r(317));oo(a,t)}else X(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;lr(t),a=!1}else a=J(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return 256&t.flags?(et(t),t):(et(t),null)}return et(t),128&t.flags?(t.lanes=n,t):(n=null!==i,e=null!==e&&null!==e.memoizedState,n&&(a=null,null!==(i=t.child).alternate&&null!==i.alternate.memoizedState&&null!==i.alternate.memoizedState.cachePool&&(a=i.alternate.memoizedState.cachePool.pool),s=null,null!==i.memoizedState&&null!==i.memoizedState.cachePool&&(s=i.memoizedState.cachePool.pool),s!==a&&(i.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),sr(t,t.updateQueue),lr(t),null);case 4:return k(),nr(e,t),null===e&&Ja(t.stateNode.containerInfo),lr(t),null;case 10:return q(t.type),lr(t),null;case 19:if(h(xc),null===(i=t.memoizedState))return lr(t),null;if(a=!!(128&t.flags),null===(s=i.rendering))if(a)or(i,!1);else{if(0!==pu||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(s=tt(e))){for(t.flags|=128,or(i,!1),e=s.updateQueue,t.updateQueue=e,sr(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Wi(n,e),n=n.sibling;return f(xc,1&xc.current|2),Dl&&L(t,i.treeForkCount),t.child}e=e.sibling}null!==i.tail&&al()>wu&&(t.flags|=128,a=!0,or(i,!1),t.lanes=4194304)}else{if(!a)if(null!==(e=tt(s))){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,sr(t,e),or(i,!0),null===i.tail&&"hidden"===i.tailMode&&!s.alternate&&!Dl)return lr(t),null}else 2*al()-i.renderingStartTime>wu&&536870912!==n&&(t.flags|=128,a=!0,or(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(null!==(e=i.last)?e.sibling=s:t.child=s,i.last=s)}return null!==i.tail?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=al(),e.sibling=null,n=xc.current,f(xc,a?1&n|2:1&n),Dl&&L(t,i.treeForkCount),e):(lr(t),null);case 22:case 23:return et(t),Ke(),i=null!==t.memoizedState,null!==e?null!==e.memoizedState!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?!!(536870912&n)&&!(128&t.flags)&&(lr(t),6&t.subtreeFlags&&(t.flags|=8192)):lr(t),null!==(n=t.updateQueue)&&sr(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),i=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),null!==e&&h(nc),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),q(Wl),lr(t),null;case 25:case 30:return null}throw Error(r(156,t.tag))}function ur(e,t){switch(N(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return q(Wl),k(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return H(t),null;case 31:if(null!==t.memoizedState){if(et(t),null===t.alternate)throw Error(r(340));X()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(et(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(r(340));X()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return h(xc),null;case 4:return k(),null;case 10:return q(t.type),null;case 22:case 23:return et(t),Ke(),null!==e&&h(nc),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return q(Wl),null;default:return null}}function dr(e,t){switch(N(t),t.tag){case 3:q(Wl),k();break;case 26:case 27:case 5:H(t);break;case 4:k();break;case 31:null!==t.memoizedState&&et(t);break;case 13:et(t);break;case 19:h(xc);break;case 10:q(t.type);break;case 22:case 23:et(t),Ke(),null!==e&&h(nc);break;case 24:q(Wl)}}function hr(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,s=n.inst;r=a(),s.destroy=r}n=n.next}while(n!==i)}}catch(o){Fi(t,t.return,o)}}function fr(e,t,n){try{var r=t.updateQueue,i=null!==r?r.lastEffect:null;if(null!==i){var a=i.next;r=a;do{if((r.tag&e)===e){var s=r.inst,o=s.destroy;if(void 0!==o){s.destroy=void 0,i=t;var l=n,c=o;try{c()}catch(aP){Fi(i,l,aP)}}}r=r.next}
26while(r!==a)}}catch(aP){Fi(t,t.return,aP)}}function pr(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Xe(t,n)}catch(xR){Fi(e,e.return,xR)}}}function mr(e,t,n){n.props=_n(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(xR){Fi(e,t,xR)}}function gr(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=Ra(e.stateNode);break;default:r=e.stateNode}"function"==typeof n?e.refCleanup=n(r):n.current=r}}catch(MR){Fi(e,t,MR)}}function vr(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(MR){Fi(e,t,MR)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(MR){Fi(e,t,MR)}else n.current=null}function yr(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{Ss(r,t,n,e)}catch(MR){Fi(e,e.return,MR)}}function _r(e,t,n){try{As(e.stateNode,e.type,n,t,e)}catch(xR){Fi(e,e.return,xR)}}function br(e){return 5===e.tag||3===e.tag||!!Eo&&26===e.tag||!!zo&&27===e.tag&&jo(e.type)||4===e.tag}function xr(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||br(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(zo&&27===e.tag&&jo(e.type)||2&e.flags||null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Sr(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?ws(n,e,t):bs(n,e);else if(4!==r&&(zo&&27===r&&jo(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(Sr(e,t,n),e=e.sibling;null!==e;)Sr(e,t,n),e=e.sibling}function Ar(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?Ms(n,e,t):_s(n,e);else if(4!==r&&(zo&&27===r&&jo(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(Ar(e,t,n),e=e.sibling;null!==e;)Ar(e,t,n),e=e.sibling}function Mr(e,t,n){e=e.containerInfo;try{Os(e,n)}catch(xR){Fi(t,t.return,xR)}}function wr(e){var t=e.stateNode,n=e.memoizedProps;try{Go(e.type,n,t,e)}catch(xR){Fi(e,e.return,xR)}}function Er(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Ur(e,n),4&r&&hr(5,n);break;case 1:if(Ur(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(s){Fi(n,n.return,s)}else{var i=_n(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){Fi(n,n.return,s)}}64&r&&pr(n),512&r&&gr(n,n.return);break;case 3:if(Ur(e,n),64&r&&null!==(r=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 27:case 5:e=Ra(n.child.stateNode);break;case 1:e=n.child.stateNode}try{Xe(r,e)}catch(s){Fi(n,n.return,s)}}break;case 27:zo&&null===t&&4&r&&wr(n);case 26:case 5:if(Ur(e,n),null===t)if(4&r)yr(n);else if(64&r){e=n.type,t=n.memoizedProps,i=n.stateNode;try{uo(i,e,t,n)}catch(s){Fi(n,n.return,s)}}512&r&&gr(n,n.return);break;case 12:Ur(e,n);break;case 31:Ur(e,n),4&r&&Ir(e,n);break;case 13:Ur(e,n),4&r&&Pr(e,n),64&r&&null!==(r=n.memoizedState)&&null!==(r=r.dehydrated)&&(n=ki.bind(null,n),Ws(r,n));break;case 22:if(!(r=null!==n.memoizedState||Hc)){t=null!==t&&null!==t.memoizedState||Gc,i=Hc;var a=Gc;Hc=r,(Gc=t)&&!a?kr(e,n,!!(8772&n.subtreeFlags)):Ur(e,n),Hc=i,Gc=a}break;case 30:break;default:Ur(e,n)}}function Cr(e){var t=e.alternate;null!==t&&(e.alternate=null,Cr(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&Za(t),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Tr(e,t,n){for(n=n.child;null!==n;)Rr(e,t,n),n=n.sibling}function Rr(e,t,n){if(fl&&"function"==typeof fl.onCommitFiberUnmount)try{fl.onCommitFiberUnmount(hl,n)}catch{}switch(n.tag){case 26:if(Eo){Gc||vr(n,t),Tr(e,t,n),n.memoizedState?Po(n.memoizedState):n.stateNode&&Do(n.stateNode);break}case 27:if(zo){Gc||vr(n,t);var r=Xc,i=Jc;jo(n.type)&&(Xc=n.stateNode,Jc=!1),Tr(e,t,n),Vo(n.stateNode),Xc=r,Jc=i;break}case 5:Gc||vr(n,t);case 6:if(Va){if(r=Xc,i=Jc,Xc=null,Tr(e,t,n),Jc=i,null!==(Xc=r))if(Jc)try{Cs(Xc,n.stateNode)}catch(a){Fi(n,t,a)}else try{Es(Xc,n.stateNode)}catch(a){Fi(n,t,a)}}else Tr(e,t,n);break;case 18:Va&&null!==Xc&&(Jc?yo(Xc,n.stateNode):vo(Xc,n.stateNode));break;case 4:Va?(r=Xc,i=Jc,Xc=n.stateNode.containerInfo,Jc=!0,Tr(e,t,n),Xc=r,Jc=i):(Wa&&Mr(n.stateNode,n,Fs()),Tr(e,t,n));break;case 0:case 11:case 14:case 15:fr(2,n,t),Gc||fr(4,n,t),Tr(e,t,n);break;case 1:Gc||(vr(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&mr(n,t,r)),Tr(e,t,n);break;case 21:Tr(e,t,n);break;case 22:Gc=(r=Gc)||null!==n.memoizedState,Tr(e,t,n),Gc=r;break;default:Tr(e,t,n)}}function Ir(e,t){if(ja&&null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)){e=e.dehydrated;try{fo(e)}catch(SR){Fi(t,t.return,SR)}}}function Pr(e,t){if(ja&&null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))try{po(e)}catch(SR){Fi(t,t.return,SR)}}function Br(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Wc),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Wc),t;default:throw Error(r(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=zi.bind(null,e,t);t.then(r,r)}})}function Lr(e,t){var n=t.deletions;if(null!==n)for(var i=0;i<n.length;i++){var a=n[i],s=e,o=t;if(Va){var l=o;e:for(;null!==l;){switch(l.tag){case 27:if(zo){if(jo(l.type)){Xc=l.stateNode,Jc=!1;break e}break}case 5:Xc=l.stateNode,Jc=!1;break e;case 3:case 4:Xc=l.stateNode.containerInfo,Jc=!0;break e}l=l.return}if(null===Xc)throw Error(r(160));Rr(s,o,a),Xc=null,Jc=!1}else Rr(s,o,a);null!==(s=a.alternate)&&(s.return=null),a.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)Dr(t,e),t=t.sibling}function Dr(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Lr(t,e),Fr(e),4&i&&(fr(3,e,e.return),hr(3,e),fr(5,e,e.return));break;
26case 1:Lr(t,e),Fr(e),512&i&&(Gc||null===n||vr(n,n.return)),64&i&&Hc&&null!==(e=e.updateQueue)&&null!==(i=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?i:n.concat(i));break;case 26:if(Eo){var a=Yc;if(Lr(t,e),Fr(e),512&i&&(Gc||null===n||vr(n,n.return)),4&i){i=null!==n?n.memoizedState:null;var s=e.memoizedState;null===n?null===s?null===e.stateNode?e.stateNode=Bo(a,e.type,e.memoizedProps,e):Lo(a,e.type,e.stateNode):e.stateNode=Io(a,s,e.memoizedProps):i!==s?(null===i?null!==n.stateNode&&Do(n.stateNode):Po(i),null===s?Lo(a,e.type,e.stateNode):Io(a,s,e.memoizedProps)):null===s&&null!==e.stateNode&&_r(e,e.memoizedProps,n.memoizedProps)}break}case 27:if(zo){Lr(t,e),Fr(e),512&i&&(Gc||null===n||vr(n,n.return)),null!==n&&4&i&&_r(e,e.memoizedProps,n.memoizedProps);break}case 5:if(Lr(t,e),Fr(e),512&i&&(Gc||null===n||vr(n,n.return)),Va){if(32&e.flags){a=e.stateNode;try{Ts(a)}catch(h){Fi(e,e.return,h)}}4&i&&null!=e.stateNode&&_r(e,a=e.memoizedProps,null!==n?n.memoizedProps:a),1024&i&&(Vc=!0)}else Wa&&null!==e.alternate&&(e.alternate.stateNode=e.stateNode);break;case 6:if(Lr(t,e),Fr(e),4&i&&Va){if(null===e.stateNode)throw Error(r(162));i=e.memoizedProps,n=null!==n?n.memoizedProps:i,a=e.stateNode;try{xs(a,n,i)}catch(h){Fi(e,e.return,h)}}break;case 3:if(Eo?(No(),a=Yc,Yc=To(t.containerInfo),Lr(t,e),Yc=a):Lr(t,e),Fr(e),4&i){if(Va&&ja&&null!==n&&n.memoizedState.isDehydrated)try{ho(t.containerInfo)}catch(h){Fi(e,e.return,h)}if(Wa){i=t.containerInfo,n=t.pendingChildren;try{Os(i,n)}catch(h){Fi(e,e.return,h)}}}Vc&&(Vc=!1,Nr(e));break;case 4:Eo?(n=Yc,Yc=To(e.stateNode.containerInfo),Lr(t,e),Fr(e),Yc=n):(Lr(t,e),Fr(e)),4&i&&Wa&&Mr(e.stateNode,e,e.stateNode.pendingChildren);break;case 12:Lr(t,e),Fr(e);break;case 31:Lr(t,e),Fr(e),4&i&&null!==(i=e.updateQueue)&&(e.updateQueue=null,Br(e,i));break;case 13:Lr(t,e),Fr(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(Au=al()),4&i&&null!==(i=e.updateQueue)&&(e.updateQueue=null,Br(e,i));break;case 22:a=null!==e.memoizedState;var o=null!==n&&null!==n.memoizedState,l=Hc,c=Gc;if(Hc=l||a,Gc=c||o,Lr(t,e),Gc=c,Hc=l,Fr(e),8192&i&&((t=e.stateNode)._visibility=a?-2&t._visibility:1|t._visibility,a&&(null===n||o||Hc||Gc||Or(e)),Va))e:if(n=null,Va)for(t=e;;){if(5===t.tag||Eo&&26===t.tag){if(null===n){o=n=t;try{s=o.stateNode,a?Rs(s):Ps(o.stateNode,o.memoizedProps)}catch(h){Fi(o,o.return,h)}}}else if(6===t.tag){if(null===n){o=t;try{var u=o.stateNode;a?Is(u):Bs(u,o.memoizedProps)}catch(h){Fi(o,o.return,h)}}}else if(18===t.tag){if(null===n){o=t;try{var d=o.stateNode;a?_o(d):bo(o.stateNode)}catch(h){Fi(o,o.return,h)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&i&&null!==(i=e.updateQueue)&&null!==(n=i.retryQueue)&&(i.retryQueue=null,Br(e,n));break;case 19:Lr(t,e),Fr(e),4&i&&null!==(i=e.updateQueue)&&(e.updateQueue=null,Br(e,i));break;case 30:case 21:break;default:Lr(t,e),Fr(e)}}function Fr(e){var t=e.flags;if(2&t){try{for(var n,i=e.return;null!==i;){if(br(i)){n=i;break}i=i.return}if(Va){if(null==n)throw Error(r(160));switch(n.tag){case 27:if(zo){var a=n.stateNode;Ar(e,xr(e),a);break}case 5:var s=n.stateNode;32&n.flags&&(Ts(s),n.flags&=-33),Ar(e,xr(e),s);break;case 3:case 4:var o=n.stateNode.containerInfo;Sr(e,xr(e),o);break;default:throw Error(r(161))}}}catch(aP){Fi(e,e.return,aP)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Nr(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;Nr(t),5===t.tag&&1024&t.flags&&ls(t.stateNode),e=e.sibling}}function Ur(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)Er(e,t.alternate,t),t=t.sibling}function Or(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:fr(4,t,t.return),Or(t);break;case 1:vr(t,t.return);var n=t.stateNode;"function"==typeof n.componentWillUnmount&&mr(t,t.return,n),Or(t);break;case 27:zo&&Vo(t.stateNode);case 26:case 5:vr(t,t.return),Or(t);break;case 22:null===t.memoizedState&&Or(t);break;default:Or(t)}e=e.sibling}}function kr(e,t,n){for(n=n&&!!(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,i=e,a=t,s=a.flags;switch(a.tag){case 0:case 11:case 15:kr(i,a,n),hr(4,a);break;case 1:if(kr(i,a,n),"function"==typeof(i=(r=a).stateNode).componentDidMount)try{i.componentDidMount()}catch(c){Fi(r,r.return,c)}if(null!==(i=(r=a).updateQueue)){var o=r.stateNode;try{var l=i.shared.hiddenCallbacks;
26if(null!==l)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)je(l[i],o)}catch(c){Fi(r,r.return,c)}}n&&64&s&&pr(a),gr(a,a.return);break;case 27:zo&&wr(a);case 26:case 5:kr(i,a,n),n&&null===r&&4&s&&yr(a),gr(a,a.return);break;case 12:kr(i,a,n);break;case 31:kr(i,a,n),n&&4&s&&Ir(i,a);break;case 13:kr(i,a,n),n&&4&s&&Pr(i,a);break;case 22:null===a.memoizedState&&kr(i,a,n),gr(a,a.return);break;case 30:break;default:kr(i,a,n)}t=t.sibling}}function zr(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&oe(n))}function Hr(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&oe(e))}function Gr(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)Vr(e,t,n,r),t=t.sibling}function Vr(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Gr(e,t,n,r),2048&i&&hr(9,t);break;case 1:case 31:case 13:default:Gr(e,t,n,r);break;case 3:Gr(e,t,n,r),2048&i&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&oe(e)));break;case 12:if(2048&i){Gr(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,s=a.id,o=a.onPostCommit;"function"==typeof o&&o(s,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(l){Fi(t,t.return,l)}}else Gr(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,s=t.alternate,null!==t.memoizedState?2&a._visibility?Gr(e,t,n,r):jr(e,t):2&a._visibility?Gr(e,t,n,r):(a._visibility|=2,Wr(e,t,n,r,!!(10256&t.subtreeFlags)||!1)),2048&i&&zr(s,t);break;case 24:Gr(e,t,n,r),2048&i&&Hr(t.alternate,t)}}function Wr(e,t,n,r,i){for(i=i&&(!!(10256&t.subtreeFlags)||!1),t=t.child;null!==t;){var a=e,s=t,o=n,l=r,c=s.flags;switch(s.tag){case 0:case 11:case 15:Wr(a,s,o,l,i),hr(8,s);break;case 23:break;case 22:var u=s.stateNode;null!==s.memoizedState?2&u._visibility?Wr(a,s,o,l,i):jr(a,s):(u._visibility|=2,Wr(a,s,o,l,i)),i&&2048&c&&zr(s.alternate,s);break;case 24:Wr(a,s,o,l,i),i&&2048&c&&Hr(s.alternate,s);break;default:Wr(a,s,o,l,i)}t=t.sibling}}function jr(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:jr(n,r),2048&i&&zr(r.alternate,r);break;case 24:jr(n,r),2048&i&&Hr(r.alternate,r);break;default:jr(n,r)}t=t.sibling}}function Xr(e,t,n){if(e.subtreeFlags&Kc)for(e=e.child;null!==e;)Jr(e,t,n),e=e.sibling}function Jr(e,t,n){switch(e.tag){case 26:if(Xr(e,t,n),e.flags&Kc)if(null!==e.memoizedState)ko(n,Yc,e.memoizedState,e.memoizedProps);else{var r=e.stateNode,i=e.type;e=e.memoizedProps,((335544128&t)===t||ts(i,e))&&is(n,r,i,e)}break;case 5:Xr(e,t,n),e.flags&Kc&&(r=e.stateNode,i=e.type,e=e.memoizedProps,((335544128&t)===t||ts(i,e))&&is(n,r,i,e));break;case 3:case 4:Eo?(r=Yc,Yc=To(e.stateNode.containerInfo),Xr(e,t,n),Yc=r):Xr(e,t,n);break;case 22:null===e.memoizedState&&(null!==(r=e.alternate)&&null!==r.memoizedState?(r=Kc,Kc=16777216,Xr(e,t,n),Kc=r):Xr(e,t,n));break;default:Xr(e,t,n)}}function Yr(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function Kr(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];jc=r,Zr(r,e)}Yr(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)qr(e),e=e.sibling}function qr(e){switch(e.tag){case 0:case 11:case 15:Kr(e),2048&e.flags&&fr(9,e,e.return);break;case 3:case 12:default:Kr(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,Qr(e)):Kr(e)}}function Qr(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];jc=r,Zr(r,e)}Yr(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:fr(8,t,t.return),Qr(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,Qr(t));break;default:Qr(t)}e=e.sibling}}function Zr(e,t){for(;null!==jc;){var n=jc;switch(n.tag){case 0:case 11:case 15:fr(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:oe(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,jc=r;else e:for(n=e;null!==jc;){var i=(r=jc).sibling,a=r.return;if(Cr(r),r===n){jc=null;break e}if(null!==i){i.return=a,jc=i;break e}jc=a}}}function $r(e){var t=Xa(e);if(null!=t){if("string"!=typeof t.memoizedProps["data-testname"])throw Error(r(364));return t}if(null===(e=hs(e)))throw Error(r(362));return e.stateNode.current}function ei(e,t){var n=e.tag;switch(t.$$typeof){case Qc:if(e.type===t.value)return!0;break;case Zc:e:{for(t=t.value,e=[e,0],n=0;n<e.length;){var i=e[n++],a=i.tag,s=e[n++],o=t[s];if(5!==a&&26!==a&&27!==a||!ms(i)){for(;null!=o&&ei(i,o);)o=t[++s];if(s===t.length){t=!0;break e}for(i=i.child;null!==i;)e.push(i,s),i=i.sibling}}t=!1}return t;case $c:if((5===n||26===n||27===n)&&gs(e.stateNode,t.value))return!0;break;case tu:if((5===n||6===n||26===n||27===n)&&null!==(e=ps(e))&&0<=e.indexOf(t.value))return!0;break;case eu:if((5===n||26===n||27===n)&&"string"==typeof(e=e.memoizedProps["data-testname"])&&e.toLowerCase()===t.value.toLowerCase())return!0;break;default:throw Error(r(365))}return!1}function ti(e){switch(e.$$typeof){case Qc:return"<"+(u(e.value)||"Unknown")+">";case Zc:return":has("+(ti(e)||"")+")";case $c:return'[role="'+e.value+'"]';
26case tu:return'"'+e.value+'"';case eu:return'[data-testname="'+e.value+'"]';default:throw Error(r(365))}}function ni(e,t){var n=[];e=[e,0];for(var r=0;r<e.length;){var i=e[r++],a=i.tag,s=e[r++],o=t[s];if(5!==a&&26!==a&&27!==a||!ms(i)){for(;null!=o&&ei(i,o);)o=t[++s];if(s===t.length)n.push(i);else for(i=i.child;null!==i;)e.push(i,s),i=i.sibling}}return n}function ri(e,t){if(!ds)throw Error(r(363));e=ni(e=$r(e),t),t=[],e=Array.from(e);for(var n=0;n<e.length;){var i=e[n++],a=i.tag;if(5===a||26===a||27===a)ms(i)||t.push(i.stateNode);else for(i=i.child;null!==i;)e.push(i),i=i.sibling}return t}function ii(){return 2&iu&&0!==ou?ou&-ou:null!==wa.T?ge():qa()}function ai(){if(0===yu)if(536870912&ou&&!Dl)yu=536870912;else{var e=$o;!(3932160&($o<<=1))&&($o=262144),yu=e}return null!==(e=_c.current)&&(e.flags|=32),yu}function si(e,t,n){(e===au&&(2===lu||9===lu)||null!==e.cancelPendingCommit)&&(fi(e,0),ui(e,ou,yu,!1)),x(e,n),(!(2&iu)||e!==au)&&(e===au&&(!(2&iu)&&(gu|=n),4===pu&&ui(e,ou,yu,!1)),ce(e))}function oi(e,t,n){if(6&iu)throw Error(r(327));for(var i=!n&&!(127&t)&&0===(t&e.expiredLanes)||v(e,t),a=i?function(e,t){var n=iu;iu|=2;var i=gi(),a=vi();au!==e||ou!==t?(Eu=null,wu=al()+500,fi(e,t)):du=v(e,t);e:for(;;)try{if(0!==lu&&null!==su){t=su;var s=cu;t:switch(lu){case 1:lu=0,cu=null,Mi(e,t,s,1);break;case 2:case 9:if(Se(s)){lu=0,cu=null,Ai(t);break}t=function(){2!==lu&&9!==lu||au!==e||(lu=7),ce(e)},s.then(t,t);break e;case 3:lu=7;break e;case 4:lu=5;break e;case 7:Se(s)?(lu=0,cu=null,Ai(t)):(lu=0,cu=null,Mi(e,t,s,7));break;case 5:var o=null;switch(su.tag){case 26:o=su.memoizedState;case 5:case 27:var l=su,c=l.type,u=l.pendingProps;if(o?Oo(o):ns(l.stateNode,c,u)){lu=0,cu=null;var d=l.sibling;if(null!==d)su=d;else{var h=l.return;null!==h?(su=h,wi(h)):su=null}break t}}lu=0,cu=null,Mi(e,t,s,5);break;case 6:lu=0,cu=null,Mi(e,t,s,6);break;case 8:hi(),pu=6;break e;default:throw Error(r(462))}}xi();break}catch(f){pi(e,f)}return zl=kl=null,wa.H=i,wa.A=a,iu=n,null!==su?0:(au=null,ou=0,Pe(),pu)}(e,t):_i(e,t,!0),s=i;;){if(0===a){du&&!i&&ui(e,t,0,!1);break}if(n=e.current.alternate,!s||ci(n)){if(2===a){if(s=t,e.errorRecoveryDisabledLanes&s)var o=0;else o=0!=(o=-536870913&e.pendingLanes)?o:536870912&o?536870912:0;if(0!==o){t=o;e:{var l=e;a=bu;var c=ja&&l.current.memoizedState.isDehydrated;if(c&&(fi(l,o).flags|=256),2!==(o=_i(l,o,!1))){if(hu&&!c){l.errorRecoveryDisabledLanes|=s,gu|=s,a=4;break e}s=xu,xu=a,null!==s&&(null===xu?xu=s:xu.push.apply(xu,s))}a=o}if(s=!1,2!==a)continue}}if(1===a){fi(e,0),ui(e,t,0,!0);break}e:{switch(i=e,s=a){case 0:case 1:throw Error(r(345));case 4:if((4194048&t)!==t)break;case 6:ui(i,t,yu,!uu);break e;case 2:xu=null;break;case 3:case 5:break;default:throw Error(r(329))}if((62914560&t)===t&&10<(a=Au+300-al())){if(ui(i,t,yu,!uu),0!==g(i,0,!0))break e;Pu=t,i.timeoutHandle=ka(li.bind(null,i,n,xu,Eu,Su,t,yu,gu,_u,uu,s,"Throttled",-0,0),a)}else li(i,n,xu,Eu,Su,t,yu,gu,_u,uu,s,null,-0,0)}break}a=_i(e,t,!1),s=!1}ce(e)}function li(e,t,n,r,i,a,s,o,l,c,u,d,h,f){if(e.timeoutHandle=Ha,8192&(d=t.subtreeFlags)||!(16785408&~d)){Jr(t,a,d=rs());var p=(62914560&a)===a?Au-al():(4194048&a)===a?Mu-al():0;if(null!==(p=as(d,p)))return Pu=a,e.cancelPendingCommit=p(Ci.bind(null,e,t,a,n,r,i,s,o,l,u,d,null,h,f)),void ui(e,a,s,!c)}Ci(e,t,a,n,r,i,s,o,l)}function ci(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&null!==(n=t.updateQueue)&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!pl(a(),i))return!1}catch{return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ui(e,t,n,r){t&=~vu,t&=~gu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ko(i),s=1<<a;r[a]=-1,i&=~s}0!==n&&S(e,n,t)}function di(){return!!(6&iu)||(ue(0),!1)}function hi(){if(null!==su){if(0===lu)var e=su.return;else zl=kl=null,ut(e=su),lc=null,cc=0,e=su;for(;null!==e;)dr(e.alternate,e),e=e.return;su=null}}function fi(e,t){var n=e.timeoutHandle;n!==Ha&&(e.timeoutHandle=Ha,za(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),Pu=0,hi(),au=e,su=n=Vi(e.current,null),ou=t,lu=0,cu=null,uu=!1,du=v(e,t),hu=!1,_u=yu=vu=gu=mu=pu=0,xu
vendor: 4,640 bytes, line 26
26=bu=null,Su=!1,8&t&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var i=31-Ko(r),a=1<<i;t|=e[i],r&=~a}return fu=t,Pe(),n}function pi(e,t){Ac=null,wa.H=Lc,t===rc||t===ac?(t=we(),lu=3):t===ic?(t=we(),lu=4):lu=t===Oc?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,cu=t,null===su&&(pu=1,bn(e,B(t,e.current)))}function mi(){var e=_c.current;return null===e||((4194048&ou)===ou?null===bc:!!((62914560&ou)===ou||536870912&ou)&&e===bc)}function gi(){var e=wa.H;return wa.H=Lc,null===e?Lc:e}function vi(){var e=wa.A;return wa.A=qc,e}function yi(){pu=4,uu||(4194048&ou)!==ou&&null!==_c.current||(du=!0),!(134217727&mu)&&!(134217727&gu)||null===au||ui(au,ou,yu,!1)}function _i(e,t,n){var r=iu;iu|=2;var i=gi(),a=vi();(au!==e||ou!==t)&&(Eu=null,fi(e,t)),t=!1;var s=pu;e:for(;;)try{if(0!==lu&&null!==su){var o=su,l=cu;switch(lu){case 8:hi(),s=6;break e;case 3:case 2:case 9:case 6:null===_c.current&&(t=!0);var c=lu;if(lu=0,cu=null,Mi(e,o,l,c),n&&du){s=0;break e}break;default:c=lu,lu=0,cu=null,Mi(e,o,l,c)}}bi(),s=pu;break}catch(aP){pi(e,aP)}return t&&e.shellSuspendCounter++,zl=kl=null,iu=r,wa.H=i,wa.A=a,null===su&&(au=null,ou=0,Pe()),s}function bi(){for(;null!==su;)Si(su)}function xi(){for(;null!==su&&!rl();)Si(su)}function Si(e){var t=qn(e.alternate,e,fu);e.memoizedProps=e.pendingProps,null===t?wi(e):su=t}function Ai(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Nn(n,t,t.pendingProps,t.type,void 0,ou);break;case 11:t=Nn(n,t,t.pendingProps,t.type.render,t.ref,ou);break;case 5:ut(t);default:dr(n,t),t=qn(n,t=su=Wi(t,fu),fu)}e.memoizedProps=e.pendingProps,null===t?wi(e):su=t}function Mi(e,t,n,i){zl=kl=null,ut(t),lc=null,cc=0;var a=t.return;try{if(function(e,t,n,i,a){if(n.flags|=32768,null!==i&&"object"==typeof i&&"function"==typeof i.then){if(null!==(t=n.alternate)&&ee(t,n,a,!0),null!==(n=_c.current)){switch(n.tag){case 31:case 13:return null===bc?yi():null===n.alternate&&0===pu&&(pu=3),n.flags&=-257,n.flags|=65536,n.lanes=a,i===sc?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([i]):t.add(i),Ni(e,i,a)),!1;case 22:return n.flags|=65536,i===sc?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([i]):n.add(i),Ni(e,i,a)),!1}throw Error(r(435,n.tag))}return Ni(e,i,a),yi(),!1}if(Dl)return null!==(t=_c.current)?(!(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=a,i!==Ul&&Y(B(e=Error(r(422),{cause:i}),n))):(i!==Ul&&Y(B(t=Error(r(423),{cause:i}),n)),(e=e.current.alternate).flags|=65536,a&=-a,e.lanes|=a,i=B(i,n),Ge(e,a=Sn(e.stateNode,i,a)),4!==pu&&(pu=2)),!1;var s=Error(r(520),{cause:i});if(s=B(s,n),null===bu?bu=[s]:bu.push(s),4!==pu&&(pu=2),null===t)return!0;i=B(i,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,Ge(n,e=Sn(n.stateNode,i,e)),!1;case 1:if(t=n.type,s=n.stateNode,!(128&n.flags||"function"!=typeof t.getDerivedStateFromError&&(null===s||"function"!=typeof s.componentDidCatch||null!==Cu&&Cu.has(s))))return n.flags|=65536,a&=-a,n.lanes|=a,Mn(a=An(a),e,n,i),Ge(n,a),!1}n=n.return}while(null!==n);return!1}(e,a,t,n,ou))return pu=1,bn(e,B(n,e.current)),void(su=null)}catch(s){if(null!==a)throw su=a,s;return pu=1,bn(e,B(n,e.current)),void(su=null)}32768&t.flags?(Dl||1===i?e=!0:du||536870912&ou?e=!1:(uu=e=!0,(2===i||9===i||3===i||6===i)&&null!==(i=_c.current)&&13===i.tag&&(i.flags|=16384)),Ei(t,e)):wi(t)}function wi(e){var t=e;do{if(32768&t.flags)return void Ei(t,uu);e=t.return;var n=cr(t.alternate,t,fu);if(null!==n)return void(su=n);if(null!==(t=t.sibling))return void(su=t);su=t=e}while(null!==t);0===pu&&(pu=5)}function Ei(e,t){do{var n=ur(e.alternate,e);if(null!==n)return n.flags&=32767,void(su=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(su=e);su=e=n}while(null!==e);pu=6,su=null}function Ci(e,t,n,i,a,s,o,l,c){e.cancelPendingCommit=null;do{Bi()}while(0!==Tu);if(6&iu)throw Error(r(327));if(null!==t){if(t===e.current)throw Error(r(177));if(s=t.lanes|t.childLanes,function(e,t,n,r,i,a){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=s&~n;0<n;){var u=31-Ko(n),d=1<<u;o[u]=0,l[u]=-1;var h=c[u];if(null!==h)for(c[u]=null,u=0;u<h.length;u++){var f=h[u];null!==f&&(f.lane&=-536870913)}n&=~d}0!==r&&S(e,r,0),0!==a&&0===i&&0!==e.tag&&(e.suspendedLanes|=a&~(s&~t))}(e,n,s|=pc,o,l,c),e===au&&(su=au=null,ou=0),Iu=t,Ru=e,Pu=n,Bu=s,Lu=
26a,Du=i,10256&t.subtreeFlags||10256&t.flags?(e.callbackNode=null,e.callbackPriority=0,function(e){tl(e,function(){return Li(),null})}(ll)):(e.callbackNode=null,e.callbackPriority=0),i=!!(13878&t.flags),13878&t.subtreeFlags||i){i=wa.T,wa.T=null,a=Ka(),Ya(2),o=iu,iu|=4;try{!function(e,t){for(Ba(e.containerInfo),jc=t;null!==jc;)if(t=(e=jc).child,1028&e.subtreeFlags&&null!==t)t.return=e,jc=t;else for(;null!==jc;){var n=(e=jc).alternate;switch(t=e.flags,e.tag){case 0:if(4&t&&null!==(t=null!==(t=e.updateQueue)?t.events:null))for(var i=0;i<t.length;i++){var a=t[i];a.ref.impl=a.nextImpl}break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&t&&null!==n){t=void 0,i=e,a=n.memoizedProps,n=n.memoizedState;var s=i.stateNode;try{var o=_n(i.type,a);t=s.getSnapshotBeforeUpdate(o,n),s.__reactInternalSnapshotBeforeUpdate=t}catch(l){Fi(i,i.return,l)}}break;case 3:1024&t&&Va&&Ls(e.stateNode.containerInfo);break;default:if(1024&t)throw Error(r(163))}if(null!==(t=e.sibling)){t.return=e.return,jc=t;break}jc=e.return}}(e,t)}finally{iu=o,Ya(a),wa.T=i}}Tu=1,Ti(),Ri(),Ii()}}function Ti(){if(1===Tu){Tu=0;var e=Ru,t=Iu,n=!!(13878&t.flags);if(13878&t.subtreeFlags||n){n=wa.T,wa.T=null;var r=Ka();Ya(2);var i=iu;iu|=4;try{Dr(t,e),La(e.containerInfo)}finally{iu=i,Ya(r),wa.T=n}}e.current=t,Tu=2}}function Ri(){if(2===Tu){Tu=0;var e=Ru,t=Iu,n=!!(8772&t.flags);if(8772&t.subtreeFlags||n){n=wa.T,wa.T=null;var r=Ka();Ya(2);var i=iu;iu|=4;try{Er(e,t.alternate,t)}finally{iu=i,Ya(r),wa.T=n}}Tu=3}}function Ii(){if(4===Tu||3===Tu){Tu=0,il();var e=Ru,t=Iu,n=Pu,r=Du;10256&t.subtreeFlags||10256&t.flags?Tu=5:(Tu=0,Iu=Ru=null,Pi(e,e.pendingLanes));var i=e.pendingLanes;if(0===i&&(Cu=null),E(n),t=t.stateNode,fl&&"function"==typeof fl.onCommitFiberRoot)try{fl.onCommitFiberRoot(hl,t,void 0,!(128&~t.current.flags))}catch{}if(null!==r){t=wa.T,i=Ka(),Ya(2),wa.T=null;try{for(var a=e.onRecoverableError,s=0;s<r.length;s++){var o=r[s];a(o.value,{componentStack:o.stack})}}finally{wa.T=t,Ya(i)}}!!(3&Pu)&&Bi(),ce(e),i=e.pendingLanes,261930&n&&42&i?e===Nu?Fu++:(Fu=0,Nu=e):Fu=0,ja&&go(),ue(0)}}function Pi(e,t){0===(e.pooledCacheLanes&=t)&&null!=(t=e.pooledCache)&&(e.pooledCache=null,oe(t))}function Bi(){return Ti(),Ri(),Ii(),Li()}function Li(){if(5!==Tu)return!1;var e=Ru,t=Bu;Bu=0;var n=E(Pu),i=32>n?32:n;n=wa.T;var a=Ka();try{Ya(i),wa.T=null,i=Lu,Lu=null;var s=Ru,o=Pu;if(Tu=0,Iu=Ru=null,Pu=0,6&iu)throw Error(r(331));var l=iu;if(iu|=4,qr(s.current),Vr(s,s.current,o,i),iu=l,ue(0),fl&&"function"==typeof fl.onPostCommitFiberRoot)try{fl.onPostCommitFiberRoot(hl,s)}catch{}return!0}finally{Ya(a),wa.T=n,Pi(e,t)}}function Di(e,t,n){t=B(n,t),null!==(e=ze(e,t=Sn(e.stateNode,t,2),2))&&(x(e,2),ce(e))}function Fi(e,t,n){if(3===e.tag)Di(e,e,n);else for(;null!==t;){if(3===t.tag){Di(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Cu||!Cu.has(r))){e=B(n,e),null!==(r=ze(t,n=An(2),2))&&(Mn(n,r,t,e),x(r,2),ce(r));break}}t=t.return}}function Ni(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ru;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(hu=!0,i.add(n),e=Ui.bind(null,e,t,n),t.then(e,e))}function Ui(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,au===e&&(ou&n)===n&&(4===pu||3===pu&&(62914560&ou)===ou&&300>al()-Au?!(2&iu)&&fi(e,0):vu|=n,_u===ou&&(_u=0)),ce(e)}function Oi(e,t){0===t&&(t=_()),null!==(e=De(e,t))&&(x(e,t),ce(e))}function ki(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Oi(e,n)}function zi(e,t){var n=0;switch(e.tag){case 31:case 13:var i=e.stateNode,a=e.memoizedState;null!==a&&(n=a.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(r(314))}null!==i&&i.delete(t),Oi(e,n)}function Hi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gi(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Vi(e,n){var r=e.alternate;return null===r?((r=t(e.tag,n,e.key,e.mode)).elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=n,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=65011712&e.flags,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,n=e.dependencies,r.dependencies=null===n?null:{lanes:n.lanes,firstContext:n.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function Wi(e,t){e.flags&=65011714;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.
26childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ji(e,n,i,a,s,o){var l=0;if(a=e,"function"==typeof e)Gi(e)&&(l=1);else if("string"==typeof e)l=Eo&&zo?Co(e,i,Tl.current)?26:Wo(e)?27:5:Eo?Co(e,i,Tl.current)?26:5:zo&&Wo(e)?27:5;else e:switch(e){case ba:return(e=t(31,i,n,s)).elementType=ba,e.lanes=o,e;case ua:return Xi(i.children,s,o,n);case da:l=8,s|=24;break;case ha:return(e=t(12,i,n,2|s)).elementType=ha,e.lanes=o,e;case ga:return(e=t(13,i,n,s)).elementType=ga,e.lanes=o,e;case va:return(e=t(19,i,n,s)).elementType=va,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case pa:l=10;break e;case fa:l=9;break e;case ma:l=11;break e;case ya:l=14;break e;case _a:l=16,a=null;break e}l=29,i=Error(r(130,null===e?"null":typeof e,"")),a=null}return(n=t(l,i,n,s)).elementType=e,n.type=a,n.lanes=o,n}function Xi(e,n,r,i){return(e=t(7,e,i,n)).lanes=r,e}function Ji(e,n,r){return(e=t(6,e,null,n)).lanes=r,e}function Yi(e){var n=t(18,null,null,0);return n.stateNode=e,n}function Ki(e,n,r){return(n=t(4,null!==e.children?e.children:[],e.key,n)).lanes=r,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function qi(e,t,n,r,i,a,s,o,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Ha,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=b(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=b(0),this.hiddenUpdates=b(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function Qi(e,n,r,i,a,s,o,l,c,u,d,h){return e=new qi(e,n,r,o,c,u,d,h,l),n=1,!0===s&&(n|=24),s=t(3,null,null,n),e.current=s,s.stateNode=e,(n=se()).refCount++,e.pooledCache=n,n.refCount++,s.memoizedState={element:i,isDehydrated:r,cache:n},Ue(s),e}function Zi(e){return e?e=Yo:Yo}function $i(e){var t=e._reactInternals;if(void 0===t)throw"function"==typeof e.render?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return null===(e=null!==(e=s(t))?o(e):null)?null:Ra(e.stateNode)}function ea(e,t,n,r,i,a){i=Zi(i),null===r.context?r.context=i:r.pendingContext=i,(r=ke(t)).payload={element:n},null!==(a=void 0===a?null:a)&&(r.callback=a),null!==(n=ze(e,r,t))&&(si(n,0,t),He(n,e,t))}function ta(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function na(e,t){ta(e,t),(e=e.alternate)&&ta(e,t)}var ra={},ia=Q,aa=p,sa=Object.assign,oa=Symbol.for("react.element"),la=Symbol.for("react.transitional.element"),ca=Symbol.for("react.portal"),ua=Symbol.for("react.fragment"),da=Symbol.for("react.strict_mode"),ha=Symbol.for("react.profiler"),fa=Symbol.for("react.consumer"),pa=Symbol.for("react.context"),ma=Symbol.for("react.forward_ref"),ga=Symbol.for("react.suspense"),va=Symbol.for("react.suspense_list"),ya=Symbol.for("react.memo"),_a=Symbol.for("react.lazy"),ba=Symbol.for("react.activity"),xa=Symbol.for("react.memo_cache_sentinel"),Sa=Symbol.iterator,Aa=Symbol.for("react.client.reference"),Ma=Array.isArray,wa=ia.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ea=e.rendererVersion,Ca=e.rendererPackageName,Ta=e.extraDevToolsConfig,Ra=e.getPublicInstance,Ia=e.getRootHostContext,Pa=e.getChildHostContext,Ba=e.prepareForCommit,La=e.resetAfterCommit,Da=e.createInstance;e.cloneMutableInstance;var Fa=e.appendInitialChild,Na=e.finalizeInitialChildren,Ua=e.shouldSetTextContent,Oa=e.createTextInstance;e.cloneMutableTextInstance;var ka=e.scheduleTimeout,za=e.cancelTimeout,Ha=e.noTimeout,Ga=e.isPrimaryRenderer;e.warnsIfNotActing;
26var Va=e.supportsMutation,Wa=e.supportsPersistence,ja=e.supportsHydration,Xa=e.getInstanceFromNode;e.beforeActiveInstanceBlur;var Ja=e.preparePortalMount;e.prepareScopeUpdate,e.getInstanceFromScope;var Ya=e.setCurrentUpdatePriority,Ka=e.getCurrentUpdatePriority,qa=e.resolveUpdatePriority;e.trackSchedulerEvent,e.resolveEventType,e.resolveEventTimeStamp;var Qa=e.shouldAttemptEagerTransition,Za=e.detachDeletedInstance;e.requestPostPaintCallback;var $a=e.maySuspendCommit,es=e.maySuspendCommitOnUpdate,ts=e.maySuspendCommitInSyncRender,ns=e.preloadInstance,rs=e.startSuspendingCommit,is=e.suspendInstance;e.suspendOnActiveViewTransition;var as=e.waitForCommitToBeReady;e.getSuspendedCommitReason;var ss=e.NotPendingTransition,os=e.HostTransitionContext,ls=e.resetFormInstance;e.bindToConsole;var cs=e.supportsMicrotasks,us=e.scheduleMicrotask,ds=e.supportsTestSelectors,hs=e.findFiberRoot,fs=e.getBoundingRect,ps=e.getTextContent,ms=e.isHiddenSubtree,gs=e.matchAccessibilityRole,vs=e.setFocusIfFocusable,ys=e.setupIntersectionObserver,_s=e.appendChild,bs=e.appendChildToContainer,xs=e.commitTextUpdate,Ss=e.commitMount,As=e.commitUpdate,Ms=e.insertBefore,ws=e.insertInContainerBefore,Es=e.removeChild,Cs=e.removeChildFromContainer,Ts=e.resetTextContent,Rs=e.hideInstance,Is=e.hideTextInstance,Ps=e.unhideInstance,Bs=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 Ls=e.clearContainer;e.createFragmentInstance,e.updateFragmentInstanceFiber,e.commitNewChildToFragmentInstance,e.deleteChildFromFragmentInstance;var Ds=e.cloneInstance,Fs=e.createContainerChildSet,Ns=e.appendChildToContainerChildSet,Us=e.finalizeContainerChildren,Os=e.replaceContainerChildren,ks=e.cloneHiddenInstance,zs=e.cloneHiddenTextInstance,Hs=e.isSuspenseInstancePending,Gs=e.isSuspenseInstanceFallback,Vs=e.getSuspenseInstanceFallbackErrorDetails,Ws=e.registerSuspenseInstanceRetry,js=e.canHydrateFormStateMarker,Xs=e.isFormStateMarkerMatching,Js=e.getNextHydratableSibling,Ys=e.getNextHydratableSiblingAfterSingleton,Ks=e.getFirstHydratableChild,qs=e.getFirstHydratableChildWithinContainer,Qs=e.getFirstHydratableChildWithinActivityInstance,Zs=e.getFirstHydratableChildWithinSuspenseInstance,$s=e.getFirstHydratableChildWithinSingleton,eo=e.canHydrateInstance,to=e.canHydrateTextInstance,no=e.canHydrateActivityInstance,ro=e.canHydrateSuspenseInstance,io=e.hydrateInstance,ao=e.hydrateTextInstance,so=e.hydrateActivityInstance,oo=e.hydrateSuspenseInstance,lo=e.getNextHydratableInstanceAfterActivityInstance,co=e.getNextHydratableInstanceAfterSuspenseInstance,uo=e.commitHydratedInstance,ho=e.commitHydratedContainer,fo=e.commitHydratedActivityInstance,po=e.commitHydratedSuspenseInstance,mo=e.finalizeHydratedChildren,go=e.flushHydrationEvents;e.clearActivityBoundary;var vo=e.clearSuspenseBoundary;e.clearActivityBoundaryFromContainer;var yo=e.clearSuspenseBoundaryFromContainer,_o=e.hideDehydratedBoundary,bo=e.unhideDehydratedBoundary,xo=e.shouldDeleteUnhydratedTailInstances;e.diffHydratedPropsForDevWarnings,e.diffHydratedTextForDevWarnings,e.describeHydratableInstanceForDevWarnings;var So,Ao,Mo=e.validateHydratableInstance,wo=e.validateHydratableTextInstance,Eo=e.supportsResources,Co=e.isHostHoistableType,To=e.getHoistableRoot,Ro=e.getResource,Io=e.acquireResource,Po=e.releaseResource,Bo=e.hydrateHoistable,Lo=e.mountHoistable,Do=e.unmountHoistable,Fo=e.createHoistableInstance,No=e.prepareToCommitHoistables,Uo=e.mayResourceSuspendCommit,Oo=e.preloadResource,ko=e.suspendResource,zo=e.supportsSingletons,Ho=e.resolveSingletonInstance,Go=e.acquireSingletonInstance,Vo=e.releaseSingletonInstance,Wo=e.isHostSingletonType,jo=e.isSingletonScope,Xo=[],Jo=-1,Yo={},Ko=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(qo(e)/Qo|0)|0},qo=Math.log,Qo=Math.LN2,Zo=256,$o=262144,el=4194304,tl=aa.unstable_scheduleCallback,nl=aa.unstable_cancelCallback,rl=aa.unstable_shouldYield,il=aa.unstable_requestPaint,al=aa.unstable_now,sl=aa.unstable_ImmediatePriority,ol=aa.unstable_UserBlockingPriority,ll=a
vendor: 8,678 bytes, line 26
26a.unstable_NormalPriority,cl=aa.unstable_IdlePriority,ul=aa.log,dl=aa.unstable_setDisableYieldValue,hl=null,fl=null,pl="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},ml="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},gl=Object.prototype.hasOwnProperty,vl=!1,yl=new WeakMap,_l=[],bl=0,xl=null,Sl=0,Al=[],Ml=0,wl=null,El=1,Cl="",Tl=d(null),Rl=d(null),Il=d(null),Pl=d(null),Bl=null,Ll=null,Dl=!1,Fl=null,Nl=!1,Ul=Error(r(519)),Ol=d(null),kl=null,zl=null,Hl=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Gl=aa.unstable_scheduleCallback,Vl=aa.unstable_NormalPriority,Wl={$$typeof:pa,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},jl=null,Xl=null,Jl=!1,Yl=!1,Kl=!1,ql=0,Ql=null,Zl=0,$l=0,ec=null,tc=wa.S;wa.S=function(e,t){Mu=al(),"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===Ql){var n=Ql=[];Zl=0,$l=ge(),ec={status:"pending",value:void 0,then:function(e){n.push(e)}}}Zl++,t.then(ve,ve)}(0,t),null!==tc&&tc(e,t)};var nc=d(null),rc=Error(r(460)),ic=Error(r(474)),ac=Error(r(542)),sc={then:function(){}},oc=null,lc=null,cc=0,uc=Ie(!0),dc=Ie(!1),hc=[],fc=0,pc=0,mc=!1,gc=!1,vc=d(null),yc=d(0),_c=d(null),bc=null,xc=d(0),Sc=0,Ac=null,Mc=null,wc=null,Ec=!1,Cc=!1,Tc=!1,Rc=0,Ic=0,Pc=null,Bc=0,Lc={readContext:re,use:pt,useCallback:nt,useContext:nt,useEffect:nt,useImperativeHandle:nt,useLayoutEffect:nt,useInsertionEffect:nt,useMemo:nt,useReducer:nt,useRef:nt,useState:nt,useDebugValue:nt,useDeferredValue:nt,useTransition:nt,useSyncExternalStore:nt,useId:nt,useHostTransitionStatus:nt,useFormState:nt,useActionState:nt,useOptimistic:nt,useMemoCache:nt,useCacheRefresh:nt};Lc.useEffectEvent=nt;var Dc={readContext:re,use:pt,useCallback:function(e,t){return dt().memoizedState=[e,void 0===t?null:t],e},useContext:re,useEffect:Wt,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,Gt(4194308,4,Kt.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gt(4194308,4,e,t)},useInsertionEffect:function(e,t){Gt(4,2,e,t)},useMemo:function(e,t){var n=dt();t=void 0===t?null:t;var r=e();if(Tc){C(!0);try{e()}finally{C(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=dt();if(void 0!==n){var i=n(t);if(Tc){C(!0);try{n(t)}finally{C(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=cn.bind(null,Ac,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},dt().memoizedState=e},useState:function(e){var t=(e=Et(e)).queue,n=un.bind(null,Ac,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Qt,useDeferredValue:function(e,t){return en(dt(),e,t)},useTransition:function(){var e=Et(!1);return e=nn.bind(null,Ac,e.queue,!0,!1),dt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var i=Ac,a=dt();if(Dl){if(void 0===n)throw Error(r(407));n=n()}else{if(n=t(),null===au)throw Error(r(349));127&ou||xt(i,t,n)}a.memoizedState=n;var s={value:n,getSnapshot:t};return a.queue=s,Wt(At.bind(null,i,s,e),[e]),i.flags|=2048,zt(9,{destroy:void 0},St.bind(null,i,s,n,t),null),n},useId:function(){var e=dt(),t=au.identifierPrefix;if(Dl){var n=Cl;t="_"+t+"R_"+(n=(El&~(1<<32-Ko(El)-1)).toString(32)+n),0<(n=Rc++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=Bc++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:an,useFormState:Ft,useActionState:Ft,useOptimistic:function(e){var t=dt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=hn.bind(null,Ac,!0,n),n.dispatch=t,[e,t]},useMemoCache:mt,useCacheRefresh:function(){return dt().memoizedState=ln.bind(null,Ac)},useEffectEvent:function(e){var t=dt(),n={impl:e};return t.memoizedState=n,function(){if(2&iu)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},Fc={readContext:re,use:pt,useCallback:Zt,useContext:re,useEffect:jt,useImperativeHandle:qt,useInsertionEffect:Jt,useLayoutEffect:Yt,useMemo:$t,useReducer:vt,useRef:Ht,useState:function(){return vt(gt)},useDebugValue:Qt,useDeferredValue:function(e,t){return tn(ht(),Mc.memoizedState,e,t)},useTransition:function(){var e=vt(gt)[0],t=ht().memoizedState;return["boolean"==typeof e?e:ft(e),t]},useSyncExternalStore:bt,useId:sn,useHostTransitionStatus:an,useFormState:Nt,useActionState:Nt,useOptimistic:function(e,t){return Ct(ht(),0,e,t)},useMemoCache:mt,useCacheRefresh:on};Fc.useEffectEvent=Xt;var Nc={readContext:re,use:pt,useCallback:Zt,useContext:re,useEffect:jt,useImperativeHandle:qt,useInsertionEffect:Jt,useLayoutEffect:Yt,useMemo:$t,useReducer:_t,useRef:Ht,useState:function(){return _t(gt)},useDebugValue:Qt,useDeferredValue:function(e,t){var n=ht();return null===Mc?en(n,e,t):tn(n,Mc.memoizedState,e,t)},useTransition:function(){var e=_t(gt)[0],t=ht().memoizedState;return["boolean"==typeof e?e:ft(e),t]},useSyncExternalStore:bt,useId:sn,useHostTransitionStatus:an,useFormState:kt,useActionState:kt,useOptimistic:function(e,t){var n=ht();return null!==Mc?Ct(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:mt,useCacheRefresh:on};Nc.useEffectEvent=Xt;var Uc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ii(),i=ke(r);i.payload=t,null!=n&&(i.callback=n),null!==(t=ze(e,i,r))&&(si(t,0,r),He(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ii(),i=ke(r);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=ze(e,i,r))&&(si(t,0,r),He(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ii(),r=ke(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=ze(e,r,n))&&(si(t,0,n),He(t,e,n))}},Oc=Error(r(461)),kc=!1,zc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},Hc=!1,Gc=!1,Vc=!1,Wc="function"==typeof WeakSet?WeakSet:Set,jc=null,Xc=null,Jc=!1,Yc=null,Kc=8192,qc={getCacheForType:function(e){var t=re(Wl),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return re(Wl).controller.signal}},Qc=0,Zc=1,$c=2,eu=3,tu=4;if("function"==typeof Symbol&&Symbol.for){var nu=Symbol.for;Qc=nu("selector.component"),Zc=nu("selector.has_pseudo_class"),$c=nu("selector.role"),eu=nu("selector.test_id"),tu=nu("selector.text")}var ru="function"==typeof WeakMap?WeakMap:Map,iu=0,au=null,su=null,ou=0,lu=0,cu=null,uu=!1,du=!1,hu=!1,fu=0,pu=0,mu=0,gu=0,vu=0,yu=0,_u=0,bu=null,xu=null,Su=!1,Au=0,Mu=0,wu=1/0,Eu=null,Cu=null,Tu=0,Ru=null,Iu=null,Pu=0,Bu=0,Lu=null,Du=null,Fu=0,Nu=null;return ra.attemptContinuousHydration=function(e){if(13===e.tag||31===e.tag){var t=De(e,67108864);null!==t&&si(t,0,67108864),na(e,67108864)}},ra.attemptHydrationAtCurrentPriority=function(e){if(13===e.tag||31===e.tag){var t=ii(),n=De(e,t=w(t));null!==n&&si(n,0,t),na(e,t)}},ra.attemptSynchronousHydration=function(e){switch(e.tag){case 3:if((e=e.stateNode).current.memoizedState.isDehydrated){var t=m(e.pendingLanes);if(0!==t){for(e.pendingLanes|=2,e.entangledLanes|=2;t;){var n=1<<31-Ko(t);e.entanglements[1]|=n,t&=~n}ce(e),!(6&iu)&&(wu=al()+500,ue(0))}}break;case 31:case 13:null!==(t=De(e,2))&&si(t,0,2),di(),na(e,2)}},ra.batchedUpdates=function(e,t){return e(t)},ra.createComponentSelector=function(e){return{$$typeof:Qc,value:e}},ra.createContainer=function(e,t,n,r,i,a,s,o,l,c){return Qi(e,t,!1,null,0,r,a,null,s,o,l,c)},ra.createHasPseudoClassSelector=function(e){return{$$typeof:Zc,value:e}},ra.createHydrationContainer=function(e,t,n,r,i,a,s,o,l,c,u,d,h,f){var p;return(e=Qi(n,r,!0,e,0,a,o,f,l,c,u,d)).context=Zi(null),n=e.current,(i=ke(r=w(r=ii()))).callback=null!=(p=t)?p:null,ze(n,i,r),t=r,e.current.lanes=t,x(e,t),ce(e),e},ra.createPortal=function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ca,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}},ra.createRoleSelector=function(e){return{$$typeof:$c,value:e}},ra.createTestNameSelector=function(e){return{$$typeof:eu,value:e}},ra.createTextSelector=function(e){return{$$typeof:tu,value:e}},ra.defaultOnCaughtError=function(e){console.error(e)},ra.defaultOnRecoverableError=function(e){ml(e)},ra.defaultOnUncaughtError=function(e){ml(e)}
26,ra.deferredUpdates=function(e){var t=wa.T,n=Ka();try{return Ya(32),wa.T=null,e()}finally{Ya(n),wa.T=t}},ra.discreteUpdates=function(e,t,n,r,i){var a=wa.T,s=Ka();try{return Ya(2),wa.T=null,e(t,n,r,i)}finally{Ya(s),wa.T=a,0===iu&&(wu=al()+500)}},ra.findAllNodes=ri,ra.findBoundingRects=function(e,t){if(!ds)throw Error(r(363));t=ri(e,t),e=[];for(var n=0;n<t.length;n++)e.push(fs(t[n]));for(t=e.length-1;0<t;t--)for(var i=(n=e[t]).x,a=i+n.width,s=n.y,o=s+n.height,l=t-1;0<=l;l--)if(t!==l){var c=e[l],u=c.x,d=u+c.width,h=c.y,f=h+c.height;if(i>=u&&s>=h&&a<=d&&o<=f){e.splice(t,1);break}if(!(i!==u||n.width!==c.width||f<s||h>o)){h>s&&(c.height+=h-s,c.y=s),f<o&&(c.height=o-h),e.splice(t,1);break}if(!(s!==h||n.height!==c.height||d<i||u>a)){u>i&&(c.width+=u-i,c.x=i),d<a&&(c.width=a-u),e.splice(t,1);break}}return e},ra.findHostInstance=$i,ra.findHostInstanceWithNoPortals=function(e){return null===(e=null!==(e=s(e))?l(e):null)?null:Ra(e.stateNode)},ra.findHostInstanceWithWarning=function(e){return $i(e)},ra.flushPassiveEffects=Bi,ra.flushSyncFromReconciler=function(e){var t=iu;iu|=1;var n=wa.T,r=Ka();try{if(Ya(2),wa.T=null,e)return e()}finally{Ya(r),wa.T=n,!(6&(iu=t))&&ue(0)}},ra.flushSyncWork=di,ra.focusWithin=function(e,t){if(!ds)throw Error(r(363));for(t=ni(e=$r(e),t),t=Array.from(t),e=0;e<t.length;){var n=t[e++],i=n.tag;if(!ms(n)){if((5===i||26===i||27===i)&&vs(n.stateNode))return!0;for(n=n.child;null!==n;)t.push(n),n=n.sibling}}return!1},ra.getFindAllNodesFailureDescription=function(e,t){if(!ds)throw Error(r(363));var n=0,i=[];e=[$r(e),0];for(var a=0;a<e.length;){var s=e[a++],o=s.tag,l=e[a++],c=t[l];if((5!==o&&26!==o&&27!==o||!ms(s))&&(ei(s,c)&&(i.push(ti(c)),++l>n&&(n=l)),l<t.length))for(s=s.child;null!==s;)e.push(s,l),s=s.sibling}if(n<t.length){for(e=[];n<t.length;n++)e.push(ti(t[n]));return"findAllNodes was able to match part of the selector:\n  "+i.join(" > ")+"\n\nNo matching component was found for:\n  "+e.join(" > ")}return null},ra.getPublicRootInstance=function(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 27:case 5:return Ra(e.child.stateNode);default:return e.child.stateNode}},ra.injectIntoDevTools=function(){var e={bundleType:0,version:Ea,rendererPackageName:Ca,currentDispatcherRef:wa,reconcilerVersion:"19.2.0"};if(null!==Ta&&(e.rendererConfig=Ta),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)e=!0;else{try{hl=t.inject(e),fl=t}catch{}e=!!t.checkDCE}}return e},ra.isAlreadyRendering=function(){return!!(6&iu)},ra.observeVisibleRects=function(e,t,n,i){if(!ds)throw Error(r(363));e=ri(e,t);var a=ys(e,n,i).disconnect;return{disconnect:function(){a()}}},ra.shouldError=function(){return null},ra.shouldSuspend=function(){return!1},ra.startHostTransition=function(e,t,i,a){if(5!==e.tag)throw Error(r(476));var s=rn(e).queue;nn(e,s,t,ss,null===i?n:function(){var t=rn(e);return null===t.next&&(t=e.alternate.memoizedState),dn(e,t.next.queue,{},ii()),i(a)})},ra.updateContainer=function(e,t,n,r){var i=t.current,a=ii();return ea(i,a,e,t,n,r),a},ra.updateContainerSync=function(e,t,n,r){return ea(t.current,2,e,t,n,r),2},ra},e.exports.default=e.exports,Object.defineProperty(e.exports,"__esModule",{value:!0})),hI.exports;var e}()),dI.exports);const pI=(mI=fI)&&mI.__esModule&&Object.prototype.hasOwnProperty.call(mI,"default")?mI.default:mI;var mI;function gI(e){const t=pI(e);return t.injectIntoDevTools(),t}const vI={},yI=/^three(?=[A-Z])/,_I=e=>`${e[0].toUpperCase()}${e.slice(1)}`;let bI=0;function xI(e){if("function"==typeof e){const t=""+bI++;return vI[t]=e,t}Object.assign(vI,e)}function SI(e,t){const n=_I(e),r=vI[n];if("primitive"!==e&&!r)throw new Error(`R3F: ${n} 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("primitive"===e&&!t.object)throw new Error("R3F: Primitives without 'object' are invalid!");if(void 0!==t.args&&!Array.isArray(t.args))throw new Error("R3F: The args prop must be an array!")}function AI(e){var t;e.isHidden&&(e.props.attach&&null!=(t=e.parent)&&t.object?GR(e.parent,e):ZR(e.object)&&!1!==e.props.visible&&(e.object.visible=!0),e.isHidden=!1,qR(e))}
26function MI(e,t,n){const r=t.root.getState();if(e.parent||e.object===r.scene){if(!t.object){var i,a;const e=vI[_I(t.type)];t.object=null!=(i=t.props.object)?i:new e(...null!=(a=t.props.args)?a:[]),t.object.__r3f=t}if(KR(t.object,t.props),t.props.attach)GR(e,t);else if(ZR(t.object)&&ZR(e.object)){const r=e.object.children.indexOf(null==n?void 0:n.object);if(n&&-1!==r){const n=e.object.children.indexOf(t.object);if(-1!==n){e.object.children.splice(n,1);const i=n<r?r-1:r;e.object.children.splice(i,0,t.object)}else t.object.parent=e.object,e.object.children.splice(r,0,t.object),t.object.dispatchEvent({type:"added"}),e.object.dispatchEvent({type:"childadded",child:t.object})}else e.object.add(t.object)}for(const e of t.children)MI(t,e);qR(t)}}function wI(e,t){t&&(t.parent=e,e.children.push(t),MI(e,t))}function EI(e,t,n){if(!t||!n)return;t.parent=e;const r=e.children.indexOf(n);-1!==r?e.children.splice(r,0,t):e.children.push(t),MI(e,t,n)}function CI(e){if("function"==typeof e.dispose){const t=()=>{try{e.dispose()}catch{}};"undefined"!=typeof IS_REACT_ACT_ENVIRONMENT?t():f.unstable_scheduleCallback(f.unstable_IdlePriority,t)}}function TI(e,t,n){if(!t)return;t.parent=null;const r=e.children.indexOf(t);-1!==r&&e.children.splice(r,1),t.props.attach?VR(e,t):ZR(t.object)&&ZR(e.object)&&(e.object.remove(t.object),function(e,t){const{internal:n}=e.getState();n.interaction=n.interaction.filter(e=>e!==t),n.initialHits=n.initialHits.filter(e=>e!==t),n.hovered.forEach((e,r)=>{e.eventObject!==t&&e.object!==t||n.hovered.delete(r)}),n.capturedMap.forEach((e,r)=>{eI(n.capturedMap,t,e,r)})}(CR(t),t.object));const i=null!==t.props.dispose&&!1!==n;for(let a=t.children.length-1;a>=0;a--)TI(t,t.children[a],i);t.children.length=0,delete t.object.__r3f,i&&"primitive"!==t.type&&"Scene"!==t.object.type&&CI(t.object),void 0===n&&qR(t)}function RI(e,t){for(const n of[e,e.alternate])if(null!==n)if("function"==typeof n.ref){null==n.refCleanup||n.refCleanup();const e=n.ref(t);"function"==typeof e&&(n.refCleanup=e)}else n.ref&&(n.ref.current=t)}const II=[],PI=()=>{},BI={};let LI=0;const DI=gI({isPrimaryRenderer:!1,warnsIfNotActing:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,createInstance:function(e,t,n){var r;return SI(e=_I(e)in vI?e:e.replace(yI,""),t),"primitive"===e&&null!=(r=t.object)&&r.__r3f&&delete t.object.__r3f,kR(t.object,n,e,t)},removeChild:TI,appendChild:wI,appendInitialChild:wI,insertBefore:EI,appendChildToContainer(e,t){const n=e.getState().scene.__r3f;t&&n&&wI(n,t)},removeChildFromContainer(e,t){const n=e.getState().scene.__r3f;t&&n&&TI(n,t)},insertInContainerBefore(e,t,n){const r=e.getState().scene.__r3f;t&&n&&r&&EI(r,t,n)},getRootHostContext:()=>BI,getChildHostContext:()=>BI,commitUpdate(e,t,n,r,i){var a,s,o;SI(t,r);let l=!1;if(("primitive"===e.type&&n.object!==r.object||(null==(a=r.args)?void 0:a.length)!==(null==(s=n.args)?void 0:s.length)||null!=(o=r.args)&&o.some((e,t)=>{var r;return e!==(null==(r=n.args)?void 0:r[t])}))&&(l=!0),l)II.push([e,{...r},i]);else{const t=function(e,t){const n={};for(const r in t)if(!WR.includes(r)&&!NR.equ(t[r],e.props[r])){n[r]=t[r];for(const e in t)e.startsWith(`${r}-`)&&(n[e]=t[e])}for(const r in e.props){if(WR.includes(r)||t.hasOwnProperty(r))continue;const{root:i,key:a}=zR(e.object,r);if(i.constructor&&0===i.constructor.length){const e=XR(i);NR.und(e)||(n[a]=e[a])}else n[a]=0}return n}(e,r);Object.keys(t).length&&(Object.assign(e.props,t),KR(e.object,t))}(null===i.sibling||!(4&i.flags))&&function(){for(const[n]of II){const e=n.parent;if(e){n.props.attach?VR(e,n):ZR(n.object)&&ZR(e.object)&&e.object.remove(n.object);for(const e of n.children)e.props.attach?VR(n,e):ZR(e.object)&&ZR(n.object)&&n.object.remove(e.object)}n.isHidden&&AI(n),n.object.__r3f&&delete n.object.__r3f,"primitive"!==n.type&&CI(n.object)}for(const[n,r,i]of II){n.props=r;const a=n.parent;if(a){var e,t;const r=vI[_I(n.type)];n.object=null!=(e=n.props.object)?e:new r(...null!=(t=n.props.args)?t:[]),n.object.__r3f=n,RI(i,n.object),KR(n.object,n.props),n.props.attach?GR(a,n):ZR(n.object)&&ZR(a.object)&&a.object.add(n.object);for(const e of n.children)e.props.attach?GR(n,e):ZR(e.object)&&ZR(n.object)&&n.object.add(e.object);qR(n)}}II.length=0}()},finalizeInitialChildren:()=>!1,commitMount(){},getPublicInstance:e=>null==e?void 0:e.object,prepareForCommit:()=>null,preparePortalMount:e=>kR(e.getState().scene,e,"",{}),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance:function(e){var t;e.isHidden||(e.props.attach&&null!=(t=e.parent)&&t.object?VR(e.parent,e):ZR(e.object)&&(e.object.visible=!1),e.isHidden=!0,qR(e))},unhideInstance:AI,createTextInstance:PI,hideTextInstance:PI,unhideTextInstance:PI,scheduleTimeout:"function"==typeof setTimeout?setTimeout:void 0,cancelTimeout:"function"==typeof clearTimeout?clearTimeout:void 0,noTimeout:-1,getInstanceFromNode:()=>null,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){}
26,prepareScopeUpdate(){},getInstanceFromScope:()=>null,shouldAttemptEagerTransition:()=>!1,trackSchedulerEvent:()=>{},resolveEventType:()=>null,resolveEventTimeStamp:()=>-1.1,requestPostPaintCallback(){},maySuspendCommit:()=>!1,preloadInstance:()=>!0,suspendInstance(){},waitForCommitToBeReady:()=>null,NotPendingTransition:null,HostTransitionContext:q.createContext(null),setCurrentUpdatePriority(e){LI=e},getCurrentUpdatePriority:()=>LI,resolveUpdatePriority(){var e;if(0!==LI)return LI;switch("undefined"!=typeof window&&(null==(e=window.event)?void 0:e.type)){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return 2;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return 8;default:return 32}},resetFormInstance(){},rendererPackageName:"@react-three/fiber",rendererVersion:"9.5.0",applyViewTransitionName(e,t,n){},restoreViewTransitionName(e,t){},cancelViewTransitionName(e,t,n){},cancelRootViewTransitionName(e){},restoreRootViewTransitionName(e){},InstanceMeasurement:null,measureInstance:e=>null,wasInstanceInViewport:e=>!0,hasInstanceChanged:(e,t)=>!1,hasInstanceAffectedParent:(e,t)=>!1,suspendOnActiveViewTransition(e,t){},startGestureTransition:()=>null,startViewTransition:()=>null,stopViewTransition(e){},createViewTransitionInstance:e=>null,getCurrentGestureOffset(e){throw new Error("startGestureTransition is not yet supported in react-three-fiber.")},cloneMutableInstance:(e,t)=>e,cloneMutableTextInstance:e=>e,cloneRootViewTransitionContainer(e){throw new Error("Not implemented.")},removeRootViewTransitionClone(e,t){throw new Error("Not implemented.")},createFragmentInstance:e=>null,updateFragmentInstanceFiber(e,t){},commitNewChildToFragmentInstance(e,t){},deleteChildFromFragmentInstance(e,t){},measureClonedInstance:e=>null,maySuspendCommitOnUpdate:(e,t,n)=>!1,maySuspendCommitInSyncRender:(e,t)=>!1,startSuspendingCommit:()=>null,getSuspendedCommitReason:(e,t)=>null}),FI=new Map,NI={objects:"shallow",strict:!1};function UI({store:e,children:t,onCreated:n,rootElement:r}){return IR(()=>{const t=e.getState();t.set(e=>({internal:{...e.internal,active:!0}})),n&&n(t),e.getState().events.connected||null==t.events.connect||t.events.connect(r)},[]),l.jsx(nI.Provider,{value:e,children:t})}function OI(e,t){const n=FI.get(e),r=null==n?void 0:n.fiber;if(r){const t=null==n?void 0:n.store.getState();t&&(t.internal.active=!1),DI.updateContainer(null,r,null,()=>{t&&setTimeout(()=>{try{var n,r,i,a;null==t.events.disconnect||t.events.disconnect(),null==(n=t.gl)||null==(r=n.renderLists)||null==r.dispose||r.dispose(),null==(i=t.gl)||null==i.forceContextLoss||i.forceContextLoss(),null!=(a=t.gl)&&a.xr&&t.xr.disconnect(),function(e){"Scene"!==e.type&&(null==e.dispose||e.dispose());for(const t in e){const n=e[t];"Scene"!==(null==n?void 0:n.type)&&(null==n||null==n.dispose||n.dispose())}}(t.scene),FI.delete(e)}catch(s){}},500)})}}function kI({state:e={},children:t,container:n}){const{events:r,size:i,...a}=e,s=rI(),[o]=q.useState(()=>new Iw),[c]=q.useState(()=>new wv),u=PR((e,t)=>{let a;if(t.camera&&i){const n=t.camera;a=e.viewport.getCurrentViewport(n,new Cv,i),n!==e.camera&&QR(n,i)}return{...e,...t,scene:n,raycaster:o,pointer:c,mouse:c,previousRoot:s,events:{...e.events,...t.events,...r},size:{...e.size,...i},viewport:{...e.viewport,...a},setEvents:e=>t.set(t=>({...t,events:{...t.events,...e}}))}}),d=q.useMemo(()=>{const e=gR((e,t)=>({...a,set:e,get:t})),t=t=>e.setState(e=>u.current(t,e));return t(s.getState()),s.subscribe(t),e},[s,n]);return l.jsx(l.Fragment,{children:DI.createPortal(l.jsx(nI.Provider,{value:d,children:t}),d,null)})}const zI=new Set,HI=new Set,GI=new Set;function VI(e,t){if(e.size)for(const{callback:n}of e.values())n(t)}function WI(e,t){switch(e){case"before":return VI(zI,t);case"after":return VI(HI,t);case"tail":return VI(GI,t)}}let jI,XI;function JI(e,t,n){let r=t.clock.getDelta();"never"===t.frameloop&&"number"==typeof e&&(r=e-t.clock.elapsedTime,t.clock.oldTime=t.clock.elapsedTime,t.clock.elapsedTime=e),jI=t.internal.subscribers;for(let i=0;i<jI.length;i++)XI=jI[i],XI.ref.current(XI.store.getState(),r,n);return!t.internal.priority&&t.gl.render&&t.gl.render(t.scene,t.camera),t.internal.frames=Math.max(0,t.internal.frames-1),"always"===t.frameloop?1:t.internal.frames}
26let YI,KI,qI,QI=!1,ZI=!1;function $I(e){KI=requestAnimationFrame($I),QI=!0,YI=0,WI("before",e),ZI=!0;for(const n of FI.values()){var t;qI=n.store.getState(),!qI.internal.active||!("always"===qI.frameloop||qI.internal.frames>0)||null!=(t=qI.gl.xr)&&t.isPresenting||(YI+=JI(e,qI))}if(ZI=!1,WI("after",e),0===YI)return WI("tail",e),QI=!1,cancelAnimationFrame(KI)}function eP(e,t=1){var n;if(!e)return FI.forEach(e=>eP(e.store.getState(),t));null!=(n=e.gl.xr)&&n.isPresenting||!e.internal.active||"never"===e.frameloop||(e.internal.frames=t>1?Math.min(60,e.internal.frames+t):ZI?2:1,QI||(QI=!0,requestAnimationFrame($I)))}function tP(e,t=!0,n,r){if(t&&WI("before",e),n)JI(e,n,r);else for(const i of FI.values())JI(e,i.store.getState());t&&WI("after",e)}const nP={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 rP(e){const{handlePointer:t}=function(e){function t(e){return e.filter(e=>["Move","Over","Enter","Out","Leave"].some(t=>{var n;return null==(n=e.__r3f)?void 0:n.handlers["onPointer"+t]}))}function n(t){const{internal:n}=e.getState();for(const e of n.hovered.values())if(!t.length||!t.find(t=>t.object===e.object&&t.index===e.index&&t.instanceId===e.instanceId)){const r=e.eventObject.__r3f;if(n.hovered.delete($R(e)),null!=r&&r.eventCount){const n=r.handlers,i={...e,intersections:t};null==n.onPointerOut||n.onPointerOut(i),null==n.onPointerLeave||n.onPointerLeave(i)}}}function r(e,t){for(let n=0;n<t.length;n++){const r=t[n].__r3f;null==r||null==r.handlers.onPointerMissed||r.handlers.onPointerMissed(e)}}return{handlePointer:function(i){switch(i){case"onPointerLeave":case"onPointerCancel":return()=>n([]);case"onLostPointerCapture":return t=>{const{internal:r}=e.getState();"pointerId"in t&&r.capturedMap.has(t.pointerId)&&requestAnimationFrame(()=>{r.capturedMap.has(t.pointerId)&&(r.capturedMap.delete(t.pointerId),n([]))})}}return function(a){const{onPointerMissed:s,internal:o}=e.getState();o.lastEvent.current=a;const l="onPointerMove"===i,c="onClick"===i||"onContextMenu"===i||"onDoubleClick"===i,u=function(t,n){const r=e.getState(),i=new Set,a=[],s=n?n(r.internal.interaction):r.internal.interaction;for(let e=0;e<s.length;e++){const t=FR(s[e]);t&&(t.raycaster.camera=void 0)}r.previousRoot||null==r.events.compute||r.events.compute(t,r);let o=s.flatMap(function(e){const n=FR(e);return n&&n.events.enabled&&null!==n.raycaster.camera?(void 0===n.raycaster.camera&&(null==n.events.compute||n.events.compute(t,n,null==(r=n.previousRoot)?void 0:r.getState()),void 0===n.raycaster.camera&&(n.raycaster.camera=null)),n.raycaster.camera?n.raycaster.intersectObject(e,!0):[]):[];var r}).sort((e,t)=>{const n=FR(e.object),r=FR(t.object);return n&&r&&r.events.priority-n.events.priority||e.distance-t.distance}).filter(e=>{const t=$R(e);return!i.has(t)&&(i.add(t),!0)});r.events.filter&&(o=r.events.filter(o,r));for(const e of o){let t=e.object;for(;t;){var l;null!=(l=t.__r3f)&&l.eventCount&&a.push({...e,eventObject:t}),t=t.parent}}if("pointerId"in t&&r.internal.capturedMap.has(t.pointerId))for(let e of r.internal.capturedMap.get(t.pointerId).values())i.has($R(e.intersection))||a.push(e.intersection);return a}(a,l?t:void 0),d=c?function(t){const{internal:n}=e.getState(),r=t.offsetX-n.initialClick[0],i=t.offsetY-n.initialClick[1];return Math.round(Math.sqrt(r*r+i*i))}(a):0;"onPointerDown"===i&&(o.initialClick=[a.offsetX,a.offsetY],o.initialHits=u.map(e=>e.eventObject)),c&&!u.length&&d<=2&&(r(a,o.interaction),s&&s(a)),l&&n(u),function(e,t,r,i){if(e.length){const a={stopped:!1};for(const s of e){let o=FR(s.object);if(o||s.object.traverseAncestors(e=>{const t=FR(e);if(t)return o=t,!1}),o){const{raycaster:l,pointer:c,camera:u,internal:d}
26=o,h=new Cv(c.x,c.y,0).unproject(u),f=e=>{var t,n;return null!=(t=null==(n=d.capturedMap.get(e))?void 0:n.has(s.eventObject))&&t},p=e=>{const n={intersection:s,target:t.target};d.capturedMap.has(e)?d.capturedMap.get(e).set(s.eventObject,n):d.capturedMap.set(e,new Map([[s.eventObject,n]])),t.target.setPointerCapture(e)},m=e=>{const t=d.capturedMap.get(e);t&&eI(d.capturedMap,s.eventObject,t,e)};let g={};for(let e in t){let n=t[e];"function"!=typeof n&&(g[e]=n)}let v={...s,...g,pointer:c,intersections:e,stopped:a.stopped,delta:r,unprojectedPoint:h,ray:l.ray,camera:u,stopPropagation(){const r="pointerId"in t&&d.capturedMap.get(t.pointerId);(!r||r.has(s.eventObject))&&(v.stopped=a.stopped=!0,d.hovered.size&&Array.from(d.hovered.values()).find(e=>e.eventObject===s.eventObject))&&n([...e.slice(0,e.indexOf(s)),s])},target:{hasPointerCapture:f,setPointerCapture:p,releasePointerCapture:m},currentTarget:{hasPointerCapture:f,setPointerCapture:p,releasePointerCapture:m},nativeEvent:t};if(i(v),!0===a.stopped)break}}}}(u,a,d,function(e){const t=e.eventObject,n=t.__r3f;if(null==n||!n.eventCount)return;const s=n.handlers;if(l){if(s.onPointerOver||s.onPointerEnter||s.onPointerOut||s.onPointerLeave){const t=$R(e),n=o.hovered.get(t);n?n.stopped&&e.stopPropagation():(o.hovered.set(t,e),null==s.onPointerOver||s.onPointerOver(e),null==s.onPointerEnter||s.onPointerEnter(e))}null==s.onPointerMove||s.onPointerMove(e)}else{const n=s[i];n?c&&!o.initialHits.includes(t)||(r(a,o.interaction.filter(e=>!o.initialHits.includes(e))),n(e)):c&&o.initialHits.includes(t)&&r(a,o.interaction.filter(e=>!o.initialHits.includes(e)))}})}}}}(e);return{priority:1,enabled:!0,compute(e,t,n){t.pointer.set(e.offsetX/t.size.width*2-1,-e.offsetY/t.size.height*2+1),t.raycaster.setFromCamera(t.pointer,t.camera)},connected:void 0,handlers:Object.keys(nP).reduce((e,n)=>({...e,[n]:t(n)}),{}),update:()=>{var t;const{events:n,internal:r}=e.getState();null!=(t=r.lastEvent)&&t.current&&n.handlers&&n.handlers.onPointerMove(r.lastEvent.current)},connect:t=>{const{set:n,events:r}=e.getState();if(null==r.disconnect||r.disconnect(),n(e=>({events:{...e.events,connected:t}})),r.handlers)for(const e in r.handlers){const n=r.handlers[e],[i,a]=nP[e];t.addEventListener(i,n,{passive:a})}},disconnect:()=>{const{set:t,events:n}=e.getState();if(n.connected){if(n.handlers)for(const e in n.handlers){const t=n.handlers[e],[r]=nP[e];n.connected.removeEventListener(r,t)}t(e=>({events:{...e.events,connected:void 0}}))}}}}function iP(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function aP({debounce:e,scroll:t,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){const i=n||("undefined"==typeof window?class{}:window.ResizeObserver);if(!i)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[a,s]=q.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),o=q.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a,orientationHandler:null}),l=e?"number"==typeof e?e:e.scroll:null,c=e?"number"==typeof e?e:e.resize:null,u=q.useRef(!1);q.useEffect(()=>(u.current=!0,()=>{u.current=!1}));const[d,h,f]=q.useMemo(()=>{const e=()=>{if(!o.current.element)return;const{left:e,top:t,width:n,height:i,bottom:a,right:l,x:c,y:d}=o.current.element.getBoundingClientRect(),h={left:e,top:t,width:n,height:i,bottom:a,right:l,x:c,y:d};o.current.element instanceof HTMLElement&&r&&(h.height=o.current.element.offsetHeight,h.width=o.current.element.offsetWidth),Object.freeze(h),u.current&&!lP(o.current.lastBounds,h)&&s(o.current.lastBounds=h)};return[e,c?iP(e,c):e,l?iP(e,l):e]},[s,r,l,c]);function p(){o.current.scrollContainers&&(o.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",f,!0)),o.current.scrollContainers=null),o.current.resizeObserver&&(o.current.resizeObserver.disconnect(),o.current.resizeObserver=null),o.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",o.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",o.current.orientationHandler))}function m(){o.current.element&&(o.current.resizeObserver=new i(f),o.current.resizeObserver.observe(o.current.element),t&&o.current.scrollC
26ontainers&&o.current.scrollContainers.forEach(e=>e.addEventListener("scroll",f,{capture:!0,passive:!0})),o.current.orientationHandler=()=>{f()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",o.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",o.current.orientationHandler))}return function(e,t){q.useEffect(()=>{if(t){const t=e;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",t,!0)}}},[e,t])}(f,!!t),function(e){q.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e])}(h),q.useEffect(()=>{p(),m()},[t,f,h]),q.useEffect(()=>p,[]),[e=>{!e||e===o.current.element||(p(),o.current.element=e,o.current.scrollContainers=sP(e),m())},a,d]}function sP(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(e);return[n,r,i].some(e=>"auto"===e||"scroll"===e)&&t.push(e),[...t,...sP(e.parentElement)]}const oP=["x","y","top","bottom","left","right","width","height"],lP=(e,t)=>oP.every(n=>e[n]===t[n]);function cP({ref:e,children:t,fallback:n,resize:r,style:i,gl:a,events:s=rP,eventSource:o,eventPrefix:c,shadows:u,linear:d,flat:h,legacy:f,orthographic:p,frameloop:m,dpr:g,performance:v,raycaster:y,camera:_,scene:b,onPointerMissed:x,onCreated:S,...A}){q.useMemo(()=>xI(eR),[]);const M=function(){const e=MR(),t=function(){const e=function(){const e=MR(),[t]=q.useState(()=>new Map);t.clear();let n=e;for(;n;){const e=n.type;ER(e)&&e!==SR&&!t.has(e)&&t.set(e,q.use(xR(e))),n=n.return}return t}();return q.useMemo(()=>Array.from(e.keys()).reduce((t,n)=>r=>q.createElement(t,null,q.createElement(n.Provider,{...r,value:e.get(n)})),e=>q.createElement(AR,{...e})),[e])}();return q.useMemo(()=>({children:n})=>{const r=bR(e,!0,e=>e.type===q.StrictMode)?q.StrictMode:q.Fragment;return l.jsx(r,{children:l.jsx(t,{children:n})})},[e,t])}(),[w,E]=aP({scroll:!0,debounce:{scroll:50,resize:0},...r}),C=q.useRef(null),T=q.useRef(null);q.useImperativeHandle(e,()=>C.current);const R=PR(x),[I,P]=q.useState(!1),[B,L]=q.useState(!1);if(I)throw I;if(B)throw B;const D=q.useRef(null);IR(()=>{const e=C.current;if(E.width>0&&E.height>0&&e){async function n(){await D.current.configure({gl:a,scene:b,events:s,shadows:u,linear:d,flat:h,legacy:f,orthographic:p,frameloop:m,dpr:g,performance:v,raycaster:y,camera:_,size:E,onPointerMissed:(...e)=>null==R.current?void 0:R.current(...e),onCreated:e=>{var t;null==e.events.connect||e.events.connect(o?(t=o)&&t.hasOwnProperty("current")?o.current:o:T.current),c&&e.setEvents({compute:(e,t)=>{const n=e[c+"X"],r=e[c+"Y"];t.pointer.set(n/t.size.width*2-1,-r/t.size.height*2+1),t.raycaster.setFromCamera(t.pointer,t.camera)}}),null==S||S(e)}}),D.current.render(l.jsx(M,{children:l.jsx(LR,{set:L,children:l.jsx(q.Suspense,{fallback:l.jsx(BR,{set:P}),children:null!=t?t:null})})}))}D.current||(D.current=function(e){const t=FI.get(e),n=null==t?void 0:t.fiber,r=null==t?void 0:t.store;t&&console.warn("R3F.createRoot should only be called once!");const i="function"==typeof reportError?reportError:console.error,a=r||((e,t)=>{const n=gR((n,r)=>{const i=new Cv,a=new Cv,s=new Cv;function o(e=r().camera,t=a,n=r().size){const{width:o,height:l,top:c,left:u}=n,d=o/l;t.isVector3?s.copy(t):s.set(...t);const h=e.getWorldPosition(i).distanceTo(s);if(TR(e))return{width:o/e.zoom,height:l/e.zoom,top:c,left:u,factor:1,distance:h,aspect:d};{const t=e.fov*Math.PI/180,n=2*Math.tan(t/2)*h,r=n*(o/l);return{width:r,height:n,top:c,left:u,factor:o/r,distance:h,aspect:d}}}let l;const c=e=>n(t=>({performance:{...t.performance,current:e}})),u=new wv,d={set:n,get:r,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},scene:null,xr:null,invalidate:(t=1)=>e(r(),t),advance:(e,n)=>t(e,n,r()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new sw,pointer:u,mouse:u,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const e=r();l&&clearTimeout(l),e.performance.current!==e.performance.min&&c(e.performance.min),l=setTimeout(()=>c(r().performance.max),e.performance.debounce)}}
26,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:o},setEvents:e=>n(t=>({...t,events:{...t.events,...e}})),setSize:(e,t,i=0,s=0)=>{const l=r().camera,c={width:e,height:t,top:i,left:s};n(e=>({size:c,viewport:{...e.viewport,...o(l,a,c)}}))},setDpr:e=>n(t=>{const n=DR(e);return{viewport:{...t.viewport,dpr:n,initialDpr:t.viewport.initialDpr||n}}}),setFrameloop:(e="always")=>{const t=r().clock;t.stop(),t.elapsedTime=0,"never"!==e&&(t.start(),t.elapsedTime=0),n(()=>({frameloop:e}))},previousRoot:void 0,internal:{interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,lastEvent:q.createRef(),active:!1,frames:0,priority:0,subscribe:(e,t,n)=>{const i=r().internal;return i.priority=i.priority+(t>0?1:0),i.subscribers.push({ref:e,priority:t,store:n}),i.subscribers=i.subscribers.sort((e,t)=>e.priority-t.priority),()=>{const n=r().internal;null!=n&&n.subscribers&&(n.priority=n.priority-(t>0?1:0),n.subscribers=n.subscribers.filter(t=>t.ref!==e))}}}};return d}),r=n.getState();let i=r.size,a=r.viewport.dpr,s=r.camera;return n.subscribe(()=>{const{camera:e,size:t,viewport:r,gl:o,set:l}
26=n.getState();if(t.width!==i.width||t.height!==i.height||r.dpr!==a){i=t,a=r.dpr,QR(e,t),r.dpr>0&&o.setPixelRatio(r.dpr);const n="undefined"!=typeof HTMLCanvasElement&&o.domElement instanceof HTMLCanvasElement;o.setSize(t.width,t.height,n)}e!==s&&(s=e,l(t=>({viewport:{...t.viewport,...t.viewport.getCurrentViewport(e)}})))}),n.subscribe(t=>e(t)),n})(eP,tP),s=n||DI.createContainer(a,1,null,!1,null,"",i,i,i,null);let o,c;t||FI.set(e,{fiber:s,store:a});let u=!1,d=null;return{async configure(t={}){let n;d=new Promise(e=>n=e);let{gl:r,size:i,scene:s,events:l,onCreated:h,shadows:f=!1,linear:p=!1,flat:m=!1,legacy:g=!1,orthographic:v=!1,frameloop:y="always",dpr:_=[1,2],performance:b,raycaster:x,camera:S,onPointerMissed:A}=t,M=a.getState(),w=M.gl;if(!M.gl){const t={canvas:e,powerPreference:"high-performance",antialias:!0,alpha:!0},n="function"==typeof r?await r(t):r;w=tI(n)?n:new $T({...t,...r}),M.set({gl:w})}let E=M.raycaster;E||M.set({raycaster:E=new Iw});const{params:C,...T}=x||{};if(NR.equ(T,E,NI)||KR(E,{...T}),NR.equ(C,E.params,NI)||KR(E,{params:{...E.params,...C}}),!M.camera||M.camera===c&&!NR.equ(c,S,NI)){c=S;const e=null==S?void 0:S.isCamera,t=e?S:v?new OM(0,0,0,0,.1,1e3):new ub(75,0,.1,1e3);e||(t.position.z=5,S&&(KR(t,S),t.manual||("aspect"in S||"left"in S||"right"in S||"bottom"in S||"top"in S)&&(t.manual=!0,t.updateProjectionMatrix())),M.camera||null!=S&&S.rotation||t.lookAt(0,0,0)),M.set({camera:t}),E.camera=t}if(!M.scene){let e;null!=s&&s.isScene?(e=s,kR(e,a,"",{})):(e=new bb,kR(e,a,"",{}),s&&KR(e,s)),M.set({scene:e})}l&&!M.events.handlers&&M.set({events:l(a)});const R=function(e,t){if(!t&&"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement&&e.parentElement){const{width:t,height:n,top:r,left:i}=e.parentElement.getBoundingClientRect();return{width:t,height:n,top:r,left:i}}return!t&&"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas?{width:e.width,height:e.height,top:0,left:0}:{width:0,height:0,top:0,left:0,...t}}(e,i);if(NR.equ(R,M.size,NI)||M.setSize(R.width,R.height,R.top,R.left),_&&M.viewport.dpr!==DR(_)&&M.setDpr(_),M.frameloop!==y&&M.setFrameloop(y),M.onPointerMissed||M.set({onPointerMissed:A}),b&&!NR.equ(b,M.performance,NI)&&M.set(e=>({performance:{...e.performance,...b}})),!M.xr){var I;const e=(e,t)=>{const n=a.getState();"never"!==n.frameloop&&tP(e,!0,n,t)},t=()=>{const t=a.getState();t.gl.xr.enabled=t.gl.xr.isPresenting,t.gl.xr.setAnimationLoop(t.gl.xr.isPresenting?e:null),t.gl.xr.isPresenting||eP(t)},n={connect(){const e=a.getState().gl;e.xr.addEventListener("sessionstart",t),e.xr.addEventListener("sessionend",t)},disconnect(){const e=a.getState().gl;e.xr.removeEventListener("sessionstart",t),e.xr.removeEventListener("sessionend",t)}};"function"==typeof(null==(I=w.xr)?void 0:I.addEventListener)&&n.connect(),M.set({xr:n})}if(w.shadowMap){const e=w.shadowMap.enabled,t=w.shadowMap.type;if(w.shadowMap.enabled=!!f,NR.boo(f))w.shadowMap.type=2;else if(NR.str(f)){var P;const e={basic:0,percentage:1,soft:2,variance:3};w.shadowMap.type=null!=(P=e[f])?P:2}else NR.obj(f)&&Object.assign(w.shadowMap,f);e===w.shadowMap.enabled&&t===w.shadowMap.type||(w.shadowMap.needsUpdate=!0)}return Fv.enabled=!g,u||(w.outputColorSpace=p?kg:Og,w.toneMapping=m?0:4),M.legacy!==g&&M.set(()=>({legacy:g})),M.linear!==p&&M.set(()=>({linear:p})),M.flat!==m&&M.set(()=>({flat:m})),!r||NR.fun(r)||tI(r)||NR.equ(r,w,NI)||KR(w,r),o=h,u=!0,n(),this},render(t){return u||d||this.configure(),d.then(()=>{DI.updateContainer(l.jsx(UI,{store:a,children:t,onCreated:o,rootElement:e}),s,null,()=>{})}),a},unmount(){OI(e)}}}(e)),n()}}),q.useEffect(()=>{const e=C.current;if(e)return()=>OI(e)},[]);const F=o?"none":"auto";return l.jsx("div",{ref:T,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:F,...i},...A,children:l.jsx("div",{ref:w,style:{width:"100%",height:"100%"},children:l.jsx("canvas",{ref:C,style:{display:"block"},children:n})})})}function uP(e){return l.jsx(AR,{children:l.jsx(cP,{...e})})}function dP(){return dP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dP.apply(null,arguments)}const hP=new Cv,fP=new Cv,pP=new Cv,mP=new wv;function gP(e,t,n){const r=hP.setFromMatrixPosition(e.matrixWorld);r.project(t);const i=n.width/2,a=n.height/2;return[r.x*i+i,-r.y*a+a]}const vP=e=>Math.abs(e)<1e-10?0:e;function yP(e,t,n=""){let r="matrix3d(";for(let i=0;16!==i;i++)r+=vP(t[i]*e.elements[i])+(15!==i?",":")");return n+r}const _P=(bP=[1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1],e=>yP(e,bP));var bP;const xP=q.forwardRef(({children:e,eps:t=.001,style:n,className:r,prepe
26nd:i,center:a,fullscreen:s,portal:o,distanceFactor:l,sprite:c=!1,transform:u=!1,occlude:d,onOcclude:h,castShadow:f,receiveShadow:p,material:m,geometry:g,zIndexRange:v=[16777271,0],calculatePosition:y=gP,as:_="div",wrapperClass:b,pointerEvents:x="auto",...S},A)=>{const{gl:M,camera:w,scene:E,size:C,raycaster:T,events:R,viewport:I}=iI(),[P]=q.useState(()=>document.createElement(_)),B=q.useRef(null),L=q.useRef(null),D=q.useRef(0),F=q.useRef([0,0]),N=q.useRef(null),U=q.useRef(null),O=(null==o?void 0:o.current)||R.connected||M.domElement.parentNode,k=q.useRef(null),z=q.useRef(!1),H=q.useMemo(()=>d&&"blending"!==d||Array.isArray(d)&&d.length&&function(e){return e&&"object"==typeof e&&"current"in e}(d[0]),[d]);q.useLayoutEffect(()=>{const e=M.domElement;d&&"blending"===d?(e.style.zIndex=`${Math.floor(v[0]/2)}`,e.style.position="absolute",e.style.pointerEvents="none"):(e.style.zIndex=null,e.style.position=null,e.style.pointerEvents=null)},[d]),q.useLayoutEffect(()=>{if(L.current){const e=B.current=rp.createRoot(P);if(E.updateMatrixWorld(),u)P.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const e=y(L.current,w,C);P.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${e[0]}px,${e[1]}px,0);transform-origin:0 0;`}return O&&(i?O.prepend(P):O.appendChild(P)),()=>{O&&O.removeChild(P),e.unmount()}}},[O,u]),q.useLayoutEffect(()=>{b&&(P.className=b)},[b]);const G=q.useMemo(()=>u?{position:"absolute",top:0,left:0,width:C.width,height:C.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:a?"translate3d(-50%,-50%,0)":"none",...s&&{top:-C.height/2,left:-C.width/2,width:C.width,height:C.height},...n},[n,a,s,C,u]),V=q.useMemo(()=>({position:"absolute",pointerEvents:x}),[x]);q.useLayoutEffect(()=>{var t,i;z.current=!1,u?null==(t=B.current)||t.render(q.createElement("div",{ref:N,style:G},q.createElement("div",{ref:U,style:V},q.createElement("div",{ref:A,className:r,style:n,children:e})))):null==(i=B.current)||i.render(q.createElement("div",{ref:A,style:G,className:r,children:e}))});const W=q.useRef(!0);aI(e=>{if(L.current){w.updateMatrixWorld(),L.current.updateWorldMatrix(!0,!1);const e=u?F.current:y(L.current,w,C);if(u||Math.abs(D.current-w.zoom)>t||Math.abs(F.current[0]-e[0])>t||Math.abs(F.current[1]-e[1])>t){const t=function(e,t){const n=hP.setFromMatrixPosition(e.matrixWorld),r=fP.setFromMatrixPosition(t.matrixWorld),i=n.sub(r),a=t.getWorldDirection(pP);return i.angleTo(a)>Math.PI/2}(L.current,w);let n=!1;H&&(Array.isArray(d)?n=d.map(e=>e.current):"blending"!==d&&(n=[E]));const r=W.current;if(n){const e=function(e,t,n,r){const i=hP.setFromMatrixPosition(e.matrixWorld),a=i.clone();a.project(t),mP.set(a.x,a.y),n.setFromCamera(mP,t);const s=n.intersectObjects(r,!0);if(s.length){const e=s[0].distance;return i.distanceTo(n.ray.origin)<e}return!0}(L.current,w,T,n);W.current=e&&!t}else W.current=!t;r!==W.current&&(h?h(!W.current):P.style.display=W.current?"block":"none");const i=Math.floor(v[0]/2),a=d?H?[v[0],i]:[i-1,0]:v;if(P.style.zIndex=`${function(e,t,n){if(t instanceof ub||t instanceof OM){const r=hP.setFromMatrixPosition(e.matrixWorld),i=fP.setFromMatrixPosition(t.matrixWorld),a=r.distanceTo(i),s=(n[1]-n[0])/(t.far-t.near),o=n[1]-s*t.far;return Math.round(s*a+o)}}(L.current,w,a)}`,u){const[e,t]=[C.width/2,C.height/2],n=w.projectionMatrix.elements[5]*t,{isOrthographicCamera:r,top:i,left:a,bottom:s,right:o}=w,u=_P(w.matrixWorldInverse),d=r?`scale(${n})translate(${vP(-(o+a)/2)}px,${vP((i+s)/2)}px)`:`translateZ(${n}px)`;let h=L.current.matrixWorld;c&&(h=w.matrixWorldInverse.clone().transpose().copyPosition(h).scale(L.current.scale),h.elements[3]=h.elements[7]=h.elements[11]=0,h.elements[15]=1),P.style.width=C.width+"px",P.style.height=C.height+"px",P.style.perspective=r?"":`${n}px`,N.current&&U.current&&(N.current.style.transform=`${d}${u}translate(${e}px,${t}px)`,U.current.style.transform=((e,t)=>{return yP(e,[1/(n=t),1/n,1/n,1,-1/n,-1/n,-1/n,-1,1/n,1/n,1/n,1,1,1,1,1],"translate(-50%,-50%)");var n})(h,1/((l||10)/400)))}else{const t=void 0===l?1:function(e,t){if(t instanceof OM)return t.zoom;if(t instanceof ub){const n=hP.setFromMatrixPosition(e.matrixWorld),r=fP.setFromMatrixPosition(t.matrixWorld),i=t.fov*Math.PI/180,a=n.distanceTo(r);return 1/(2*Math.tan(i/2)*a)}return 1}(L.current,w)*l;P.style.transform=`translate3d(${e[0]}px,${e[1]}px,0) scale(${t})`}F.current=e,D.current=w.zoom}}if(!H&&k.current&&!z.current)if(u){if(N.current){const e=N.current.children[0];if(null!=e&&e.clientWidth&&null!=e&&e.clientHeight){const{isOrthographicCamera:t}=w;if(t||g)S.scale&&(Array.isArray(S.scale)?S.scale instanceof Cv?k.current.scale.copy(S.scale.clone().divideScalar(1)):k.current.scale.set(1/S.scale[0],1/S.scale[1],1/S.scale[2]):k.current.scale.setScalar(1/S.scale));else{const t=(l||10)/400,n=e.clientWidth*t,r=e.clientHeight*t;k.current.scale.set(n,r,1)}z.current=!0}}}else{const t=P.children[0];if(null!=t&&t.clientWidth&&null!=t&&t.clientHeight){const e=1/I.factor,n=t.clientWidth*e,r=t.clientHeight*e;k.current.scale.set(n,r,1),z.current=!0}k.current.lookAt(e.camera.position)}});const j=q.useMemo(()=>({vertexShader:u?void 0:'\n          /*\n            This shader is from the THREE\'s SpriteMaterial.\n            We need to turn the backing plane into a Sprite\n            (make it always face the camera) if "transfrom"\n            is false.\n          */\n          #include <common>\n\n          void main() {\n            vec2 center = vec2(0., 1.);\n            float rotation = 0.0;\n\n            // This is somewhat arbitrary, but it seems to work well\n            // Need to figure out how to derive this dynamically if it even matters\n            float size = 0.03;\n\n            vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n            vec2 scale;\n            scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n            scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\n            bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n            if ( isPerspective ) scale *= - mvPosition.z;\n\n            vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size;\n            vec2 rotatedPosition;\n            rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n            rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n            mvPosition.xy += rotatedPosition;\n\n            gl_Position = projectionMatrix * mvPosition;\n          }\n      ',fragmentShader:"\n        void main() {\n          gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n        }\n      "}),[u]);return q.createElement("group",dP({},S,{ref:L}
26),d&&!H&&q.createElement("mesh",{castShadow:f,receiveShadow:p,ref:k},g||q.createElement("planeGeometry",null),m||q.createElement("shaderMaterial",{side:2,vertexShader:j.vertexShader,fragmentShader:j.fragmentShader})))}),SP=(()=>parseInt(vp.replace(/\D+/g,"")))();function AP(e,t){if(0===t)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(2===t||1===t){let n=e.getIndex();if(null===n){const t=[],r=e.getAttribute("position");if(void 0===r)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(let e=0;e<r.count;e++)t.push(e);e.setIndex(t),n=e.getIndex()}const r=n.count-2,i=[];if(n)if(2===t)for(let e=1;e<=r;e++)i.push(n.getX(0)),i.push(n.getX(e)),i.push(n.getX(e+1));else for(let e=0;e<r;e++)e%2==0?(i.push(n.getX(e)),i.push(n.getX(e+1)),i.push(n.getX(e+2))):(i.push(n.getX(e+2)),i.push(n.getX(e+1)),i.push(n.getX(e)));i.length/3!==r&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const a=e.clone();return a.setIndex(i),a.clearGroups(),a}return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),e}var MP=Uint8Array,wP=Uint16Array,EP=Uint32Array,CP=new MP([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]),TP=new MP([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]),RP=new MP([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),IP=function(e,t){for(var n=new wP(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new EP(n[30]);for(r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)i[a]=a-n[r]<<5|r;return[n,i]},PP=IP(CP,2),BP=PP[0],LP=PP[1];BP[28]=258,LP[258]=28;for(var DP=IP(TP,0)[0],FP=new wP(32768),NP=0;NP<32768;++NP){var UP=(43690&NP)>>>1|(21845&NP)<<1;UP=(61680&(UP=(52428&UP)>>>2|(13107&UP)<<2))>>>4|(3855&UP)<<4,FP[NP]=((65280&UP)>>>8|(255&UP)<<8)>>>1}var OP=function(e,t,n){for(var r=e.length,i=0,a=new wP(t);i<r;++i)++a[e[i]-1];var s,o=new wP(t);for(i=0;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;if(n){s=new wP(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var c=i<<4|e[i],u=t-e[i],d=o[e[i]-1]++<<u,h=d|(1<<u)-1;d<=h;++d)s[FP[d]>>>l]=c}else for(s=new wP(r),i=0;i<r;++i)e[i]&&(s[i]=FP[o[e[i]-1]++]>>>15-e[i]);return s},kP=new MP(288);for(NP=0;NP<144;++NP)kP[NP]=8;for(NP=144;NP<256;++NP)kP[NP]=9;for(NP=256;NP<280;++NP)kP[NP]=7;for(NP=280;NP<288;++NP)kP[NP]=8;var zP=new MP(32);for(NP=0;NP<32;++NP)zP[NP]=5;var HP=OP(kP,9,1),GP=OP(zP,5,1),VP=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},WP=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},jP=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},XP=function(e){return(e/8|0)+(7&e&&1)},JP=new MP(0);function YP(e,t){return function(e,t,n){var r=e.length;if(!r||n&&!n.l&&r<5)return t||new MP(0);var i=!t||n,a=!n||n.i;n||(n={}),t||(t=new MP(3*r));var s=function(e){var n=t.length;if(e>n){var r=new MP(Math.max(2*n,e));r.set(t),t=r}},o=n.f||0,l=n.p||0,c=n.b||0,u=n.l,d=n.d,h=n.m,f=n.n,p=8*r;do{if(!u){n.f=o=WP(e,l,1);var m=WP(e,l+1,3);if(l+=3,!m){var g=e[(C=XP(l)+4)-4]|e[C-3]<<8,v=C+g;if(v>r){if(a)throw"unexpected EOF";break}i&&s(c+g),t.set(e.subarray(C,v),c),n.b=c+=g,n.p=l=8*v;continue}if(1==m)u=HP,d=GP,h=9,f=5;else{if(2!=m)throw"invalid block type";var y=WP(e,l,31)+257,_=WP(e,l+10,15)+4,b=y+WP(e,l+5,31)+1;l+=14;for(var x=new MP(b),S=new MP(19),A=0;A<_;++A)S[RP[A]]=WP(e,l+3*A,7);l+=3*_;var M=VP(S),w=(1<<M)-1,E=OP(S,M,1);for(A=0;A<b;){var C,T=E[WP(e,l,w)];if(l+=15&T,(C=T>>>4)<16)x[A++]=C;else{var R=0,I=0;for(16==C?(I=3+WP(e,l,3),l+=2,R=x[A-1]):17==C?(I=3+WP(e,l,7),l+=3):18==C&&(I=11+WP(e,l,127),l+=7);I--;)x[A++]=R}}var P=x.subarray(0,y),B=x.subarray(y);h=VP(P),f=VP(B),u=OP(P,h,1),d=OP(B,f,1)}if(l>p){if(a)throw"unexpected EOF";break}}i&&s(c+131072);for(var L=(1<<h)-1,D=(1<<f)-1,F=l;;F=l){var N=(R=u[jP(e,l)&L])>>>4;if((l+=15&R)>p){if(a)throw"unexpected EOF";break}if(!R)throw"invalid length/literal";if(N<256)t[c++]=N;else{if(256==N){F=l,u=null;break}var U=N-254;if(N>264){var O=CP[A=N-257];U=WP(e,l,(1<<O)-1)+BP[A],l+=O}var k=d[jP(e,l)&D],z=k>>>4;if(!k)throw"invalid distance";if(l+=15&k,B=DP[z],z>3&&(O=TP[z],B+=jP(e,l)&(1<<O)-1,l+=O),l>p){if(a)throw"unexpected EOF";break}i&&s(c+131072);for(var H=c+U;c<H;c+=4)t[c]=t[c-B],t[c+1]=t[c+1-B],t[c+2]=t[c+2-B],t[c+3]=t[c+3-B];c=H}}n.l=u,n.p=F,n.b=c,u&&(o=1,n.m=h,n.d=d,n.n=f)}while(!o);return c==t.length?t:function(e,t,n){(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof wP?wP:e instanceof EP?EP:MP)(n-0);return r.set(e.subarray(0,n)),r}(t,0,c)}((function(e){if(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(32&e[1])throw"invalid zlib data: preset dictionaries not supported"}(e),e.subarray(2,-4)),t)}var KP="undefined"!=typeof TextDecoder&&new TextDecoder;try{KP.decode(JP,{stream:!0})}catch(WL){}class qP extends Z_{constructor(e,t){var n,r;const i=(a=e)&&a.isCubeTexture;var a;const s=(null!=(r=i?null==(n=e.image[0])?void 0:n.width:e.image.width)?r:1024)/4,o=Math.floor(Math.log2(s)),l=Math.pow(2,o),c=[i?"#define ENVMAP_TYPE_CUBE":"","#define CUBEUV_TEXEL_WIDTH "+1/(3*Math.max(l,112)),"#define CUBEUV_TEXEL_HEIGHT "+1/(4*l),`#define CUBEUV_MAX_MIP ${o}.0`].join("\n")+`\n        #define ENVMAP_TYPE_CUBE_UV\n        varying vec3 vWorldPosition;\n        uniform float radius;\n        uniform float height;\n        uniform float angle;\n        #ifdef ENVMAP_TYPE_CUBE\n            uniform samplerCube map;\n        #else\n            uniform sampler2D map;\n        #endif\n        // From: https://www.shadertoy.com/view/4tsBD7\n        float diskIntersectWithBackFaceCulling( vec3 ro, vec3 rd, vec3 c, vec3 n, float r ) \n        {\n            float d = dot ( rd, n );\n            \n            if( d > 0.0 ) { return 1e6; }\n            \n            vec3  o = ro - c;\n            float t = - dot( n, o ) / d;\n            vec3  q = o + rd * t;\n            \n            return ( dot( q, q ) < r * r ) ? t : 1e6;\n        }\n        // From: https://www.iquilezles.org/www/articles/intersectors/intersectors.htm\n        float sphereIntersect( vec3 ro, vec3 rd, vec3 ce, float ra ) \n        {\n            vec3 oc = ro - ce;\n            float b = dot( oc, rd );\n            float c = dot( oc, oc ) - ra * ra;\n            float h = b * b - c;\n            \n            if( h < 0.0 ) { return -1.0; }\n            \n            h = sqrt( h );\n            \n            return - b + h;\n        }\n        vec3 project() \n        {\n            vec3 p = normalize( vWorldPosition );\n            vec3 camPos = cameraPosition;\n            camPos.y -= height;\n            float intersection = sphereIntersect( camPos, p, vec3( 0.0 ), radius );\n            if( intersection > 0.0 ) {\n                \n                vec3 h = vec3( 0.0, - height, 0.0 );\n                float intersection2 = diskIntersectWithBackFaceCulling( camPos, p, h, vec3( 0.0, 1.0, 0.0 ), radius );\n                p = ( camPos + min( intersection, intersection2 ) * p ) / radius;\n            } else {\n                p = vec3( 0.0, 1.0, 0.0 );\n            }\n            return p;\n        }\n        #include <common>\n        #include <cube_uv_reflection_fragment>\n        void main() \n        {\n            vec3 projectedWorldPosition = project();\n            \n            #ifdef ENVMAP_TYPE_CUBE\n                vec3 outcolor = textureCube( map, projectedWorldPosition ).rgb;\n            #else\n                vec3 direction = normalize( projectedWorldPosition );\n                vec2 uv = equirectUv( direction );\n                vec3 outcolor = texture2D( map, uv ).rgb;\n            #endif\n            gl_FragColor = vec4( outcolor, 1.0 );\n            #include <tonemapping_fragment>\n            #include <${SP>=154?"colorspace_fragment":"encodings_fragment"}>\n        }\n        `,u={map:{value:e},height:{value:(null==t?void 0:t.height)||15},radius:{value:(null==t?void 0:t.radius)||100}};super(new EA(1,16),new ab({uniforms:u,fragmentShader:c,vertexShader:"\n        varying vec3 vWorldPosition;\n        void main() \n        {\n            vec4 worldPosition = ( modelMatrix * vec4( position, 1.0 ) );\n            vWorldPosition = worldPosition.xyz;\n            \n            gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n        }\n        ",side:2}))}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}}var QP=Object.defineProperty;class ZP{constructor(){var e;((e,t,n)=>{t in e?QP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(this,"_listeners"+"",e)}addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,r=n.length;t<r;t++)n[t].call(this,e);e.target=null}}}var $P=Object.defineProperty,eB=(e,t,n)=>(((e,t,n)=>{t in e?$P(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const tB=new Ay,nB=new gx,rB=Math.cos(Math.PI/180*70),iB=(e,t)=>(e%t+t)%t;let aB=class extends ZP{constructor(e,t){super(),eB(this,"object"),eB(this,"domElement"),eB(this,"enabled",!0),eB(this,"target",new Cv),eB(this,"minDistance",0),eB(this,"maxDistance",1/0),eB(this,"minZoom",0),eB(this,"maxZoom",1/0),eB(this,"minPolarAngle",0),eB(this,"maxPolarAngle",Math.PI),eB(this,"minAzimuthAngle",-1/0),eB(this,"maxAzimuthAngle",1/0),eB(this,"enableDamping",!1),eB(this,"dampingFactor",.05),eB(this,"enableZoom",!0),eB(this,"zoomSpeed",1),eB(this,"enableRotate",!0),eB(this,"rotateSpeed",1),eB(this,"enablePan",!0),eB(this,"panSpeed",1),eB(this,"screenSpacePanning",!0),eB(this,"keyPanSpeed",7),eB(this,"zoomToCursor",!1),eB(this,"autoRotate",!1),eB(this,"autoRotateSpeed",2),eB(this,"reverseOrbit",!1),eB(this,"reverseHorizontalOrbit",!1),eB(this,"reverseVerticalOrbit",!1),eB(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),eB(this,"mouseButtons",{LEFT:yp.ROTATE,MIDDLE:yp.DOLLY,RIGHT:yp.PAN}),eB(this,"touches",{ONE:_p.ROTATE,TWO:_p.DOLLY_PAN}),eB(this,"target0"),eB(this,"position0"),eB(this,"zoom0"),eB(this,"_domElementKeyEvents",null),eB(this,"getPolarAngle"),eB(this,"getAzimuthalAngle"),eB(this,"setPolarAngle"),eB(this,"setAzimuthalAngle"),eB(this,"getDistance"),eB(this,"getZoomScale"),eB(this,"listenToKeyEvents"),eB(this,"stopListenToKeyEvents"),eB(this,"saveState"),eB(this,"reset"),eB(this,"update"),eB(this,"connect"),eB(this,"dispose"),eB(this,"dollyIn"),eB(this,"dollyOut"),eB(this,"getScale"),eB(this,"setScale"),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>c.phi,this.getAzimuthalAngle=()=>c.theta,this.setPolarAngle=e=>{let t=iB(e,2*Math.PI),r=c.phi;r<0&&(r+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-r);2*Math.PI-i<i&&(t<r?t+=2*Math.PI:r+=2*Math.PI),u.phi=t-r,n.update()},this.setAzimuthalAngle=e=>{let t=iB(e,2*Math.PI),r=c.theta;r<0&&(r+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-r);2*Math.PI-i<i&&(t<r?t+=2*Math.PI:r+=2*Math.PI),u.theta=t-r,n.update()},this.getDistance=()=>n.object.position.distanceTo(n.target),this.listenToKeyEvents=e=>{e.addEventListener("keydown",q),this._domElementKeyEvents=e},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",q),this._domElementKeyEvents=null},this.saveState=()=>{n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=()=>{n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(r),n.update(),o=s.NONE},this.update=(()=>{const t=new Cv,i=new Cv(0,1,0),a=(new Ev).setFromUnitVectors(e.up,i),f=a.clone().invert(),p=new Cv,m=ne
26w Ev,g=2*Math.PI;return function(){const v=n.object.position;a.setFromUnitVectors(e.up,i),f.copy(a).invert(),t.copy(v).sub(n.target),t.applyQuaternion(a),c.setFromVector3(t),n.autoRotate&&o===s.NONE&&T(2*Math.PI/60/60*n.autoRotateSpeed),n.enableDamping?(c.theta+=u.theta*n.dampingFactor,c.phi+=u.phi*n.dampingFactor):(c.theta+=u.theta,c.phi+=u.phi);let y=n.minAzimuthAngle,_=n.maxAzimuthAngle;isFinite(y)&&isFinite(_)&&(y<-Math.PI?y+=g:y>Math.PI&&(y-=g),_<-Math.PI?_+=g:_>Math.PI&&(_-=g),c.theta=y<=_?Math.max(y,Math.min(_,c.theta)):c.theta>(y+_)/2?Math.max(y,c.theta):Math.min(_,c.theta)),c.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,c.phi)),c.makeSafe(),!0===n.enableDamping?n.target.addScaledVector(h,n.dampingFactor):n.target.add(h),n.zoomToCursor&&M||n.object.isOrthographicCamera?c.radius=U(c.radius):c.radius=U(c.radius*d),t.setFromSpherical(c),t.applyQuaternion(f),v.copy(n.target).add(t),n.object.matrixAutoUpdate||n.object.updateMatrix(),n.object.lookAt(n.target),!0===n.enableDamping?(u.theta*=1-n.dampingFactor,u.phi*=1-n.dampingFactor,h.multiplyScalar(1-n.dampingFactor)):(u.set(0,0,0),h.set(0,0,0));let b=!1;if(n.zoomToCursor&&M){let r=null;if(n.object instanceof ub&&n.object.isPerspectiveCamera){const e=t.length();r=U(e*d);const i=e-r;n.object.position.addScaledVector(S,i),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){const e=new Cv(A.x,A.y,0);e.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/d)),n.object.updateProjectionMatrix(),b=!0;const i=new Cv(A.x,A.y,0);i.unproject(n.object),n.object.position.sub(i).add(e),n.object.updateMatrixWorld(),r=t.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),n.zoomToCursor=!1;null!==r&&(n.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(r).add(n.object.position):(tB.origin.copy(n.object.position),tB.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(tB.direction))<rB?e.lookAt(n.target):(nB.setFromNormalAndCoplanarPoint(n.object.up,n.target),tB.intersectPlane(nB,n.target))))}else n.object instanceof OM&&n.object.isOrthographicCamera&&(b=1!==d,b&&(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/d)),n.object.updateProjectionMatrix()));return d=1,M=!1,!!(b||p.distanceToSquared(n.object.position)>l||8*(1-m.dot(n.object.quaternion))>l)&&(n.dispatchEvent(r),p.copy(n.object.position),m.copy(n.object.quaternion),b=!1,!0)}})(),this.connect=e=>{n.domElement=e,n.domElement.style.touchAction="none",n.domElement.addEventListener("contextmenu",Q),n.domElement.addEventListener("pointerdown",X),n.domElement.addEventListener("pointercancel",Y),n.domElement.addEventListener("wheel",K)},this.dispose=()=>{var e,t,r,i,a,s;n.domElement&&(n.domElement.style.touchAction="auto"),null==(e=n.domElement)||e.removeEventListener("contextmenu",Q),null==(t=n.domElement)||t.removeEventListener("pointerdown",X),null==(r=n.domElement)||r.removeEventListener("pointercancel",Y),null==(i=n.domElement)||i.removeEventListener("wheel",K),null==(a=n.domElement)||a.ownerDocument.removeEventListener("pointermove",J),null==(s=n.domElement)||s.ownerDocument.removeEventListener("pointerup",Y),null!==n._domElementKeyEvents&&n._domElementKeyEvents.removeEventListener("keydown",q)};const n=this,r={type:"change"},i={type:"start"},a={type:"end"},s={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let o=s.NONE;const l=1e-6,c=new Dw,u=new Dw;let d=1;const h=new Cv,f=new wv,p=new wv,m=new wv,g=new wv,v=new wv,y=new wv,_=new wv,b=new wv,x=new wv,S=new Cv,A=new wv;let M=!1;const w=[],E={};function C(){return Math.pow(.95,n.zoomSpeed)}function T(e){n.reverseOrbit||n.reverseHorizontalOrbit?u.theta+=e:u.theta-=e}function R(e){n.reverseOrbit||n.reverseVerticalOrbit?u.phi+=e:u.phi-=e}const I=(()=>{const e=new Cv;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),h.add(e)}})(),P=(()=>{const e=new Cv;return function(t,r){!0===n.screenSpacePanning?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),h.add(e)}})(),B=(()=>{const e=new Cv;return function(t,r){const i=n.domElement;if(i&&n.object instanceof ub&&n.object.isPerspectiveCamera){const a=n.object.position;e.copy(a).sub(n.target);let s=e.length();s*=Math.tan(n.object.fov/2*Math.PI/180),I(2*t*s/i.clientHeight,n.object.matrix),P(2*r*s/i.clientHeight,n.object.matrix)}else i&&n.object instanceof OM&&n.object.isOrthographicCamera?(I(t*(n.object.right-n.object.left)/n.object.zoom/i.clientWidth,n.object.matrix),P(r*(n.object.top-n.object.bottom)/n.object.zoom/i.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}})();function L(e){n.object instanceof ub&&n.object.isPerspectiveCamera||n.object instanceof OM&&n.object.isOrthographicCamera?d=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function D(e){L(d/e)}function F(e){L(d*e)}function N(e){if(!n.zoomToCursor||!n.domElement)return;M=!0;const t=n.domElement.getBoundingClientRect(),r=e.clientX-t.left,i=e.clientY-t.top,a=t.width,s=t.height;A.x=r/a*2-1,A.y=-i/s*2+1,S.set(A.x,A.y,1).unproject(n.object).sub(n.object.position).normalize()}function U(e){return Math.max(n.minDistance,Math.min(n.maxDistance,e))}function O(e){f.set(e.clientX,e.clientY)}function k(e){g.set(e.clientX,e.clientY)}function z(){if(1==w.length)f.set(w[0].pageX,w[0].pageY);else{const e=.5*(w[0].pageX+w[1].pageX),t=.5*(w[0].pageY+w[1].pageY);f.set(e,t)}}function H(){if(1==w.length)g.set(w[0].pageX,w[0].pageY);else{const e=.5*(w[0].pageX+w[1].pageX),t=.5*(w[0].pageY+w[1].pageY);g.set(e,t)}}function G(){const e=w[0].pageX-w[1].pageX,t=w[0].pageY-w[1].pageY,n=Math.sqrt(e*e+t*t);
26_.set(0,n)}function V(e){if(1==w.length)p.set(e.pageX,e.pageY);else{const t=$(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);p.set(n,r)}m.subVectors(p,f).multiplyScalar(n.rotateSpeed);const t=n.domElement;t&&(T(2*Math.PI*m.x/t.clientHeight),R(2*Math.PI*m.y/t.clientHeight)),f.copy(p)}function W(e){if(1==w.length)v.set(e.pageX,e.pageY);else{const t=$(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);v.set(n,r)}y.subVectors(v,g).multiplyScalar(n.panSpeed),B(y.x,y.y),g.copy(v)}function j(e){const t=$(e),r=e.pageX-t.x,i=e.pageY-t.y,a=Math.sqrt(r*r+i*i);b.set(0,a),x.set(0,Math.pow(b.y/_.y,n.zoomSpeed)),D(x.y),_.copy(b)}function X(e){var t,r;!1!==n.enabled&&(0===w.length&&(null==(t=n.domElement)||t.ownerDocument.addEventListener("pointermove",J),null==(r=n.domElement)||r.ownerDocument.addEventListener("pointerup",Y)),function(e){w.push(e)}(e),"touch"===e.pointerType?function(e){switch(Z(e),w.length){case 1:switch(n.touches.ONE){case _p.ROTATE:if(!1===n.enableRotate)return;z(),o=s.TOUCH_ROTATE;break;case _p.PAN:if(!1===n.enablePan)return;H(),o=s.TOUCH_PAN;break;default:o=s.NONE}break;case 2:switch(n.touches.TWO){case _p.DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;n.enableZoom&&G(),n.enablePan&&H(),o=s.TOUCH_DOLLY_PAN;break;case _p.DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;n.enableZoom&&G(),n.enableRotate&&z(),o=s.TOUCH_DOLLY_ROTATE;break;default:o=s.NONE}break;default:o=s.NONE}o!==s.NONE&&n.dispatchEvent(i)}(e):function(e){let t;switch(e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case yp.DOLLY:if(!1===n.enableZoom)return;!function(e){N(e),_.set(e.clientX,e.clientY)}(e),o=s.DOLLY;break;case yp.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enablePan)return;k(e),o=s.PAN}else{if(!1===n.enableRotate)return;O(e),o=s.ROTATE}break;case yp.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enableRotate)return;O(e),o=s.ROTATE}else{if(!1===n.enablePan)return;k(e),o=s.PAN}break;default:o=s.NONE}o!==s.NONE&&n.dispatchEvent(i)}(e))}function J(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(Z(e),o){case s.TOUCH_ROTATE:if(!1===n.enableRotate)return;V(e),n.update();break;case s.TOUCH_PAN:if(!1===n.enablePan)return;W(e),n.update();break;case s.TOUCH_DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;!function(e){n.enableZoom&&j(e),n.enablePan&&W(e)}(e),n.update();break;case s.TOUCH_DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;!function(e){n.enableZoom&&j(e),n.enableRotate&&V(e)}(e),n.update();break;default:o=s.NONE}}(e):function(e){if(!1!==n.enabled)switch(o){case s.ROTATE:if(!1===n.enableRotate)return;!function(e){p.set(e.clientX,e.clientY),m.subVectors(p,f).multiplyScalar(n.rotateSpeed);const t=n.domElement;t&&(T(2*Math.PI*m.x/t.clientHeight),R(2*Math.PI*m.y/t.clientHeight)),f.copy(p),n.update()}(e);break;case s.DOLLY:if(!1===n.enableZoom)return;!function(e){b.set(e.clientX,e.clientY),x.subVectors(b,_),x.y>0?D(C()):x.y<0&&F(C()),_.copy(b),n.update()}(e);break;case s.PAN:if(!1===n.enablePan)return;!function(e){v.set(e.clientX,e.clientY),y.subVectors(v,g).multiplyScalar(n.panSpeed),B(y.x,y.y),g.copy(v),n.update()}(e)}}(e))}function Y(e){var t,r,i;!function(e){delete E[e.pointerId];for(let t=0;t<w.length;t++)if(w[t].pointerId==e.pointerId)return void w.splice(t,1)}(e),0===w.length&&(null==(t=n.domElement)||t.releasePointerCapture(e.pointerId),null==(r=n.domElement)||r.ownerDocument.removeEventListener("pointermove",J),null==(i=n.domElement)||i.ownerDocument.removeEventListener("pointerup",Y)),n.dispatchEvent(a),o=s.NONE}function K(e){!1===n.enabled||!1===n.enableZoom||o!==s.NONE&&o!==s.ROTATE||(e.preventDefault(),n.dispatchEvent(i),function(e){N(e),e.deltaY<0?F(C()):e.deltaY>0&&D(C()),n.update()}(e),n.dispatchEvent(a))}function q(e){!1!==n.enabled&&!1!==n.enablePan&&function(e){let t=!1;switch(e.code){case n.keys.UP:B(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:B(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:B(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:B(-n.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),n.update())}(e)}function Q(e){!1!==n.enabled&&e.preventDefault()}function Z(e){let t=E[e.pointerId];void 0===t&&(t=new wv,E[e.pointerId]=t),t.set(e.pageX,e.pageY)}function $(e){const t=e.pointerId===w[0].pointerId?w[1]:w[0];return E[t.pointerId]}this.dollyIn=(e=C())=>{F(e),n.update()},this.dollyOut=(e=C())=>{D(e),n.update()}
vendor: 16,406 bytes, line 26
26,this.getScale=()=>d,this.setScale=e=>{L(e),n.update()},this.getZoomScale=()=>C(),void 0!==t&&this.connect(t),this.update()}};function sB(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let n=0,r=e.length;n<r;n++)t+=String.fromCharCode(e[n]);try{return decodeURIComponent(escape(t))}catch(WL){return t}}const oB="srgb",lB="srgb-linear";class cB extends _M{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new mB(e)}),this.register(function(e){return new gB(e)}),this.register(function(e){return new wB(e)}),this.register(function(e){return new EB(e)}),this.register(function(e){return new CB(e)}),this.register(function(e){return new yB(e)}),this.register(function(e){return new _B(e)}),this.register(function(e){return new bB(e)}),this.register(function(e){return new xB(e)}),this.register(function(e){return new pB(e)}),this.register(function(e){return new SB(e)}),this.register(function(e){return new vB(e)}),this.register(function(e){return new MB(e)}),this.register(function(e){return new AB(e)}),this.register(function(e){return new hB(e)}),this.register(function(e){return new TB(e)}),this.register(function(e){return new RB(e)})}load(e,t,n,r){const i=this;let a;if(""!==this.resourcePath)a=this.resourcePath;else if(""!==this.path){const t=XM.extractUrlBase(e);a=XM.resolveURL(t,this.path)}else a=XM.extractUrlBase(e);this.manager.itemStart(e);const s=function(t){r?r(t):console.error(t),i.manager.itemError(e),i.manager.itemEnd(e)},o=new SM(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(n){try{i.parse(n,a,function(n){t(n),i.manager.itemEnd(e)},s)}catch(WL){s(WL)}},n,s)}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-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this}unregister(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,r){let i;const a={},s={};if("string"==typeof e)i=JSON.parse(e);else if(e instanceof ArrayBuffer)if(sB(new Uint8Array(e.slice(0,4)))===IB){try{a[dB.KHR_BINARY_GLTF]=new PB(e)}catch(dv){return void(r&&r(dv))}i=JSON.parse(a[dB.KHR_BINARY_GLTF].content)}else i=JSON.parse(sB(new Uint8Array(e)));else i=e;if(void 0===i.asset||i.asset.version[0]<2)return void(r&&r(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.")));const o=new eL(i,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});o.fileLoader.setRequestHeader(this.requestHeader);for(let l=0;l<this.pluginCallbacks.length;l++){const e=this.pluginCallbacks[l](o);e.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),s[e.name]=e,a[e.name]=!0}if(i.extensionsUsed)for(let l=0;l<i.extensionsUsed.length;++l){const e=i.extensionsUsed[l],t=i.extensionsRequired||[];switch(e){case dB.KHR_MATERIALS_UNLIT:a[e]=new fB;break;case dB.KHR_DRACO_MESH_COMPRESSION:a[e]=new BB(i,this.dracoLoader);break;case dB.KHR_TEXTURE_TRANSFORM:a[e]=new LB;break;case dB.KHR_MESH_QUANTIZATION:a[e]=new DB;break;default:t.indexOf(e)>=0&&void 0===s[e]&&console.warn('THREE.GLTFLoader: Unknown extension "'+e+'".')}}o.setExtensions(a),o.setPlugins(s),o.parse(n,r)}parseAsync(e,t){const n=this;return new Promise(function(r,i){n.parse(e,t,r,i)})}}function uB(){let e={};return{get:function(t){return e[t]},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},removeAll:function(){e={}}}}const dB={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 hB{constructor(e){this.parser=e,this.name=dB.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,r=t.length;n<r;n++){const r=t[n];r.extensions&&r.extensions[this.name]&&void 0!==r.extensions[this.name].light&&e._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(e){const t=this.parser,n="light:"+e;let r=t.cache.get(n);if(r)return r;const i=t.json,a=((i.extensions&&i.extensions[this.name]||{}).lights||[])[e];let s;const o=new g_(16777215);void 0!==a.color&&o.setRGB(a.color[0],a.color[1],a.color[2],lB);const l=void 0!==a.range?a.range:0;switch(a.type){case"directional":s=new zM(o),s.target.position.set(0,0,-1),s.add(s.target);break;case"point":s=new UM(o),s.distance=l;break;case"spot":s=new FM(o),s.distance=l,a.spot=a.spot||{},a.spot.innerConeAngle=void 0!==a.spot.innerConeAngle?a.spot.innerConeAngle:0,a.spot.outerConeAngle=void 0!==a.spot.outerConeAngle?a.spot.outerConeAngle:Math.PI/4,s.angle=a.spot.outerConeAngle,s.penumbra=1-a.spot.innerConeAngle/a.spot.outerConeAngle,s.target.position.set(0,0,-1),s.add(s.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+a.type)}return s.position.set(0,0,0),s.decay=2,YB(s,a),void 0!==a.intensity&&(s.intensity=a.intensity),s.name=t.createUniqueName(a.name||"light_"+e),r=Promise.resolve(s),t.cache.add(n,r),r}getDependency(e,t){if("light"===e)return this._loadLight(t)}createNodeAttachment(e){const t=this,n=this.parser,r=n.json.nodes[e],i=(r.extensions&&r.extensions[this.name]||{}).light;return void 0===i?null:this._loadLight(i).then(function(e){return n._getNodeRef(t.cache,i,e)})}}class fB{constructor(){this.name=dB.KHR_MATERIALS_UNLIT}getMaterialType(){return b_}extendParams(e,t,n){const r=[];e.color=new g_(1,1,1),e.opacity=1;const i=t.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){const t=i.baseColorFactor;e.color.setRGB(t[0],t[1],t[2],lB),e.opacity=t[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(e,"map",i.baseColorTexture,oB))}return Promise.all(r)}}class pB{constructor(e){this.parser=e,this.name=dB.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=n.extensions[this.name].emissiveStrength;return void 0!==r&&(t.emissiveIntensity=r),Promise.resolve()}}class mB{constructor(e){this.parser=e,this.name=dB.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?VA:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],a=r.extensions[this.name];if(void 0!==a.clearcoatFactor&&(t.clearcoat=a.clearcoatFactor),void 0!==a.clearcoatTexture&&i.push(n.assignTexture(t,"clearcoatMap",a.clearcoatTexture)),void 0!==a.clearcoatRoughnessFactor&&(t.clearcoatRoughness=a.clearcoatRoughnessFactor),void 0!==a.clearcoatRoughnessTexture&&i.push(n.assignTexture(t,"clearcoatRoughnessMap",a.clearcoatRoughnessTexture)),void 0!==a.clearcoatNormalTexture&&(i.push(n.assignTexture(t,"clearcoatNormalMap",a.clearcoatNormalTexture)),void 0!==a.clearcoatNormalTexture.scale)){const e=a.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new wv(e,e)}return Promise.all(i)}}class gB{constructor(e){this.parser=e,this.name=dB.KHR_MATERIALS_DISPERSION}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?VA:null}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=n.extensions[this.name];return t.dispersion=void 0!==r.dispersion?r.dispersion:0,Promise.resolve()}}class vB{constructor(e){this.parser=e,this.name=dB.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?VA:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],a=r.extensions[this.name];return void 0!==a.iridescenceFactor&&(t.iridescence=a.iridescenceFactor),void 0!==a.iridescenceTexture&&i.push(n.assignTexture(t,"iridescenceMap",a.iridescenceTexture)),void 0!==a.iridescenceIor&&(t.iridescenceIOR=a.iridescenceIor),void 0===t.iridescenceThicknessRange&&(t.iridescenceThicknessRange=[100,400]),void 0!==a.iridescenceThicknessMinimum&&(t.iridescenceThicknessRange[0]=a.iridescenceThicknessMinimum),void 0!==a.iridescenceThicknessMaximum&&(t.iridescenceThicknessRange[1]=a.iridescenceThicknessMaximum),void 0!==a.iridescenceThicknessTexture&&i.push(n.assignTexture(t,"iridescenceThicknessMap",a.iridescenceThicknessTexture)),Promise.all(i)}}class yB{constructor(e){this.parser=e,this.name=dB.KHR_MATERIALS_SHEEN}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?VA:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[];t.sheenColor=new g_(0,0,0),t.sheenRoughness=0,t.sheen=1;const a=r.extensions[this.name];if(void 0!==a.sheenColorFactor){const e=a.sheenColorFactor;t.sheenColor.setRGB(e[0],e[1],e[2],lB)}return void 0!==a.sheenRoughnessFactor&&(t.sheenRoughness=a.sheenRoughnessFactor),void 0!==a.sheenColorTexture&&i.push(n.assignTexture(t,"sheenColorMap",a.sheenColorTexture,oB)),void 0!==a.sheenRoughnessTexture&&i.push(n.assignTexture(t,"sheenRoughnessMap",a.sheenRoughnessTexture)),Promise.all(i)}}class _B{constructor(e){this.parser=e,this.name=dB.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?VA:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],a=r.extensions[this.name];return void 0!==a.transmissionFactor&&(t.transmission=a.transmissionFactor),void 0!==a.transmissionTexture&&i.push(n.assignTexture(t,"transmissionMap",a.transmissionTexture)),Promise.all(i)}}class bB{constructor(e){this.parser=e,this.name=dB.KHR_MATERIALS_VOLUME}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?VA:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],a=r.extensions[this.name];t.thickness=void 0!==a.thicknessFactor?a.thicknessFactor:0,void 0!==a.thicknessTexture&&i.push(n.assignTexture(t,"thicknessMap",a.thicknessTexture)),t.attenuationDistance=a.attenuationDistance||1/0;const s=a.attenuationColor||[1,1,1];return t.attenuationColor=(new g_).setRGB(s[0],s[1],s[2],lB),Promise.all(i)}}class xB{constructor(e){this.parser=e,this.name=dB.KHR_MATERIALS_IOR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?VA:null}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=n.extensions[this.name];return t.ior=void 0!==r.ior?r.ior:1.5,Promise.resolve()}}class SB{constructor(e){this.parser=e,this.name=dB.KHR_MATERIALS_SPECULAR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?VA:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],a=r.extensions[this.name];t.specularIntensity=void 0!==a.specularFactor?a.specularFactor:1,void 0!==a.specularTexture&&i.push(n.assignTexture(t,"specularIntensityMap",a.specularTexture));const s=a.specularColorFactor||[1,1,1];return t.specularColor=(new g_).setRGB(s[0],s[1],s[2],lB),void 0!==a.specularColorTexture&&i.push(n.assignTexture(t,"specularColorMap",a.specularColorTexture,oB)),Promise.all(i)}}class AB{constructor(e){this.parser=e,this.name=dB.EXT_MATERIALS_BUMP}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?VA:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],a=r.extensions[this.name];return t.bumpScale=void 0!==a.bumpFactor?a.bumpFactor:1,void 0!==a.bumpTexture&&i.push(n.assignTexture(t,"bumpMap",a.bumpTexture)),Promise.all(i)}}class MB{constructor(e){this.parser=e,this.name=dB.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?VA:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],a=r.extensions[this.name];return void 0!==a.anisotropyStrength&&(t.anisotropy=a.anisotropyStrength),void 0!==a.anisotropyRotation&&(t.anisotropyRotation=a.anisotropyRotation),void 0!==a.anisotropyTexture&&i.push(n.assignTexture(t,"anisotropyMap",a.anisotropyTexture)),Promise.all(i)}}class wB{constructor(e){this.parser=e,this.name=dB.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,n=t.json,r=n.textures[e];if(!r.extensions||!r.extensions[this.name])return null;const i=r.extensions[this.name],a=t.options.ktx2Loader;if(!a){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,i.source,a)}}class EB{constructor(e){this.parser=e,this.name=dB.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;const a=i.extensions[t],s=r.images[a.source];let o=n.textureLoader;if(s.uri){const e=n.options.manager.getHandler(s.uri);null!==e&&(o=e)}return this.detectSupport().then(function(i){if(i)return n.loadTextureImage(e,a.source,o);if(r.extensionsRequired&&r.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(1===t.height)}})),this.isSupported}}class CB{constructor(e){this.parser=e,this.name=dB.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;const a=i.extensions[t],s=r.images[a.source];let o=n.textureLoader;if(s.uri){const e=n.options.manager.getHandler(s.uri);null!==e&&(o=e)}return this.detectSupport().then(function(i){if(i)return n.loadTextureImage(e,a.source,o);if(r.extensionsRequired&&r.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
26FDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(1===t.height)}})),this.isSupported}}class TB{constructor(e){this.name=dB.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 e=n.extensions[this.name],r=this.parser.getDependency("buffer",e.buffer),i=this.parser.options.meshoptDecoder;if(!i||!i.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 r.then(function(t){const n=e.byteOffset||0,r=e.byteLength||0,a=e.count,s=e.byteStride,o=new Uint8Array(t,n,r);return i.decodeGltfBufferAsync?i.decodeGltfBufferAsync(a,s,o,e.mode,e.filter).then(function(e){return e.buffer}):i.ready.then(function(){const t=new ArrayBuffer(a*s);return i.decodeGltfBuffer(new Uint8Array(t),a,s,o,e.mode,e.filter),t})})}return null}}class RB{constructor(e){this.name=dB.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]||void 0===n.mesh)return null;const r=t.meshes[n.mesh];for(const o of r.primitives)if(o.mode!==OB.TRIANGLES&&o.mode!==OB.TRIANGLE_STRIP&&o.mode!==OB.TRIANGLE_FAN&&void 0!==o.mode)return null;const i=n.extensions[this.name].attributes,a=[],s={};for(const o in i)a.push(this.parser.getDependency("accessor",i[o]).then(e=>(s[o]=e,s[o])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(e=>{const t=e.pop(),n=t.isGroup?t.children:[t],r=e[0].count,i=[];for(const a of n){const e=new My,t=new Cv,n=new Ev,o=new Cv(1,1,1),l=new hx(a.geometry,a.material,r);for(let i=0;i<r;i++)s.TRANSLATION&&t.fromBufferAttribute(s.TRANSLATION,i),s.ROTATION&&n.fromBufferAttribute(s.ROTATION,i),s.SCALE&&o.fromBufferAttribute(s.SCALE,i),l.setMatrixAt(i,e.compose(t,n,o));for(const r in s)if("_COLOR_0"===r){const e=s[r];l.instanceColor=new ix(e.array,e.itemSize,e.normalized)}else"TRANSLATION"!==r&&"ROTATION"!==r&&"SCALE"!==r&&a.geometry.setAttribute(r,s[r]);Qy.prototype.copy.call(l,a),this.parser.assignFinalMaterial(l),i.push(l)}return t.isGroup?(t.clear(),t.add(...i),t):i[0]}))}}const IB="glTF";class PB{constructor(e){this.name=dB.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,12);if(this.header={magic:sB(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==IB)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-12,r=new DataView(e,12);let i=0;for(;i<n;){const t=r.getUint32(i,!0);i+=4;const n=r.getUint32(i,!0);if(i+=4,1313821514===n){const n=new Uint8Array(e,12+i,t);this.content=sB(n)}else if(5130562===n){const n=12+i;this.body=e.slice(n,n+t)}i+=t}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class BB{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=dB.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const n=this.json,r=this.dracoLoader,i=e.extensions[this.name].bufferView,a=e.extensions[this.name].attributes,s={},o={},l={};for(const c in a){const e=VB[c]||c.toLowerCase();s[e]=a[c]}for(const c in e.attributes){const t=VB[c]||c.toLowerCase();if(void 0!==a[c]){const r=n.accessors[e.attributes[c]],i=kB[r.componentType];l[t]=i.name,o[t]=!0===r.normalized}}return t.getDependency("bufferView",i).then(function(e){return new Promise(function(t,n){r.decodeDracoFile(e,function(e){for(const t in e.attributes){const n=e.attributes[t],r=o[t];void 0!==r&&(n.normalized=r)}t(e)},s,l,lB,n)})})}}class LB{constructor(){this.name=dB.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return void 0!==t.texCoord&&t.texCoord!==e.channel||void 0!==t.offset||void 0!==t.rotation||void 0!==t.scale?(e=e.clone(),void 0!==t.texCoord&&(e.channel=t.texCoord),void 0!==t.offset&&e.offset.fromArray(t.offset),void 0!==t.rotation&&(e.rotation=t.rotation),void 0!==t.scale&&e.repeat.fromArray(t.scale),e.needsUpdate=!0,e):e}}
vendor: 24,133 bytes, line 26
26class DB{constructor(){this.name=dB.KHR_MESH_QUANTIZATION}}class FB extends nM{constructor(e,t,n,r){super(e,t,n,r)}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r*3+r;for(let a=0;a!==r;a++)t[a]=n[i+a];return t}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=2*s,l=3*s,c=r-t,u=(n-t)/c,d=u*u,h=d*u,f=e*l,p=f-l,m=-2*h+3*d,g=h-d,v=1-m,y=g-d+u;for(let _=0;_!==s;_++){const e=a[p+_+s],t=a[p+_+o]*c,n=a[f+_+s],r=a[f+_]*c;i[_]=v*e+y*t+m*n+g*r}return i}}const NB=new Ev;class UB extends FB{interpolate_(e,t,n,r){const i=super.interpolate_(e,t,n,r);return NB.fromArray(i).normalize().toArray(i),i}}const OB={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},kB={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},zB={9728:ym,9729:xm,9984:_m,9985:Sm,9986:bm,9987:Am},HB={33071:gm,33648:vm,10497:mm},GB={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},VB={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",...SP>=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"},WB={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},jB={CUBICSPLINE:void 0,LINEAR:Pg,STEP:Ig};function XB(e){return void 0===e.DefaultMaterial&&(e.DefaultMaterial=new GA({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:0})),e.DefaultMaterial}function JB(e,t,n){for(const r in n.extensions)void 0===e[r]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=n.extensions[r])}function YB(e,t){void 0!==t.extras&&("object"==typeof t.extras?Object.assign(e.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function KB(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(let n=0,r=t.weights.length;n<r;n++)e.morphTargetInfluences[n]=t.weights[n];if(t.extras&&Array.isArray(t.extras.targetNames)){const n=t.extras.targetNames;if(e.morphTargetInfluences.length===n.length){e.morphTargetDictionary={};for(let t=0,r=n.length;t<r;t++)e.morphTargetDictionary[n[t]]=t}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function qB(e){let t;const n=e.extensions&&e.extensions[dB.KHR_DRACO_MESH_COMPRESSION];if(t=n?"draco:"+n.bufferView+":"+n.indices+":"+QB(n.attributes):e.indices+":"+QB(e.attributes)+":"+e.mode,void 0!==e.targets)for(let r=0,i=e.targets.length;r<i;r++)t+=":"+QB(e.targets[r]);return t}function QB(e){let t="";const n=Object.keys(e).sort();for(let r=0,i=n.length;r<i;r++)t+=n[r]+":"+e[n[r]]+";";return t}function ZB(e){switch(e){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.")}}const $B=new My;class eL{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new uB,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,r=!1,i=-1;"undefined"!=typeof navigator&&void 0!==navigator.userAgent&&(n=!0===/^((?!chrome|android).)*safari/i.test(navigator.userAgent),r=navigator.userAgent.indexOf("Firefox")>-1,i=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),"undefined"==typeof createImageBitmap||n||r&&i<98?this.textureLoader=new CM(this.options.manager):this.textureLoader=new $M(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new SM(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,r=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(e){return e._markDefs&&e._markDefs()}),Promise.all(this._invokeAll(function(e){return e.beforeRoot&&e.beforeRoot()})).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])}).then(function(t){const a={scene:t[0][r.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:r.asset,parser:n,userData:{}};return JB(i,a,r),YB(a,r),Promise.all(n._invokeAll(function(e){return e.afterRoot&&e.afterRoot(a)})).then(function(){for(const e of a.scenes)e.updateMatrixWorld();e(a)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let r=0,i=t.length;r<i;r++){const n=t[r].joints;for(let t=0,r=n.length;t<r;t++)e[n[t]].isBone=!0}for(let r=0,i=e.length;r<i;r++){const t=e[r];void 0!==t.mesh&&(this._addNodeRef(this.meshCache,t.mesh),void 0!==t.skin&&(n[t.mesh].isSkinnedMesh=!0)),void 0!==t.camera&&this._addNodeRef(this.cameraCache,t.camera)}}_addNodeRef(e,t){void 0!==t&&(void 0===e.refs[t]&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;const r=n.clone(),i=(e,t)=>{const n=this.associations.get(e);null!=n&&this.associations.set(t,n);for(const[r,a]of e.children.entries())i(a,t.children[r])};return i(n,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){const r=e(t[n]);if(r)return r}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const n=[];for(let r=0;r<t.length;r++){const i=e(t[r]);i&&n.push(i)}return n}getDependency(e,t){const n=e+":"+t;let r=this.cache.get(n);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this._invokeOne(function(e){return e.loadNode&&e.loadNode(t)});break;case"mesh":r=this._invokeOne(function(e){return e.loadMesh&&e.loadMesh(t)});break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this._invokeOne(function(e){return e.loadBufferView&&e.loadBufferView(t)});break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this._invokeOne(function(e){return e.loadMaterial&&e.loadMaterial(t)});break;case"texture":r=this._invokeOne(function(e){return e.loadTexture&&e.loadTexture(t)});break;case"skin":r=this.loadSkin(t);break;case"animation":r=this._invokeOne(function(e){return e.loadAnimation&&e.loadAnimation(t)});break;case"camera":r=this.loadCamera(t);break;default:if(r=this._invokeOne(function(n){return n!=this&&n.getDependency&&n.getDependency(e,t)}),!r)throw new Error("Unknown type: "+e)}this.cache.add(n,r)}return r}getDependencies(e){let t=this.cache.get(e);if(!t){const n=this,r=this.json[e+("mesh"===e?"es":"s")]||[];t=Promise.all(r.map(function(t,r){return n.getDependency(e,r)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],n=this.fileLoader;if(t.type&&"arraybuffer"!==t.type)throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(void 0===t.uri&&0===e)return Promise.resolve(this.extensions[dB.KHR_BINARY_GLTF].body);const r=this.options;return new Promise(function(e,i){n.load(XM.resolveURL(t.uri,r.path),e,void 0,function(){i(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(e){const n=t.byteLength||0,r=t.byteOffset||0;return e.slice(r,r+n)})}loadAccessor(e){const t=this,n=this.json,r=this.json.accessors[e];if(void 0===r.bufferView&&void 0===r.sparse){const e=GB[r.type],t=kB[r.componentType],n=!0===r.normalized,i=new t(r.count*e);return Promise.resolve(new R_(i,e,n))}const i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then(function(e){const i=e[0],a=GB[r.type],s=kB[r.componentType],o=s.BYTES_PER_ELEMENT,l=o*a,c=r.byteOffset||0,u=void 0!==r.bufferView?n.bufferViews[r.bufferView].byteStride:void 0,d=!0===r.normalized;let h,f;if(u&&u!==l){const e=Math.floor(c/u),n="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+e+":"+r.count;let l=t.cache.get(n);l||(h=new s(i,e*u,r.count*u/o),l=new xb(h,u/o),t.cache.add(n,l)),f=new Ab(l,a,c%u/o,d)}else h=null===i?new s(r.count*a):new s(i,c,r.count*a),f=new R_(h,a,d);if(void 0!==r.sparse){const t=GB.SCALAR,n=kB[r.sparse.indices.componentType],o=r.sparse.indices.byteOffset||0,l=r.sparse.values.byteOffset||0,c=new n(e[1],o,r.sparse.count*t),u=new s(e[2],l,r.sparse.count*a);null!==i&&(f=new R_(f.array.slice(),f.itemSize,f.normalized));for(let e=0,r=c.length;e<r;e++){const t=c[e];if(f.setX(t,u[e*a]),a>=2&&f.setY(t,u[e*a+1]),a>=3&&f.setZ(t,u[e*a+2]),a>=4&&f.setW(t,u[e*a+3]),a>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return f})}loadTexture(e){const t=this.json,n=this.options,r=t.textures[e].source,i=t.images[r];let a=this.textureLoader;if(i.uri){const e=n.manager.getHandler(i.uri);null!==e&&(a=e)}return this.loadTextureImage(e,r,a)}loadTextureImage(e,t,n){const r=this,i=this.json,a=i.textures[e],s=i.images[t],o=(s.uri||s.bufferView)+":"+a.sampler;if(this.textureCache[o])return this.textureCache[o];const l=this.loadImageSource(t,n).then(function(t){t.flipY=!1,t.name=a.name||s.name||"",""===t.name&&"string"==typeof s.uri&&!1===s.uri.startsWith("data:image/")&&(t.name=s.uri);const n=(i.samplers||{})[a.sampler]||{};return t.magFilter=zB[n.magFilter]||xm,t.minFilter=zB[n.minFilter]||Am,t.wrapS=HB[n.wrapS]||mm,t.wrapT=HB[n.wrapT]||mm,r.associations.set(t,{textures:e}),t}).catch(function(){return null});return this.textureCache[o]=l,l}loadImageSource(e,t){const n=this.json,r=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then(e=>e.clone());const i=n.images[e],a=self.URL||self.webkitURL;let s=i.uri||"",o=!1;if(void 0!==i.bufferView)s=this.getDependency("bufferView",i.bufferView).then(function(e){o=!0;const t=new Blob([e],{type:i.mimeType});return s=a.createObjectURL(t),s});else if(void 0===i.uri)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const l=Promise.resolve(s).then(function(e){return new Promise(function(n,i){let a=n;!0===t.isImageBitmapLoader&&(a=function(e){const t=new jv(e);t.needsUpdate=!0,n(t)}),t.load(XM.resolveURL(e,r.path),a,void 0,i)})}).then(function(e){var t;return!0===o&&a.revokeObjectURL(s),YB(e,i),e.userData.mimeType=i.mimeType||((t=i.uri).search(/\.jpe?g($|\?)/i)>0||0===t.search(/^data\:image\/jpeg/)?"image/jpeg":t.search(/\.webp($|\?)/i)>0||0===t.search(/^data\:image\/webp/)?"image/webp":"image/png"),e}).catch(function(e){throw console.error("THREE.GLTFLoader: Couldn't load texture",s),e});return this.sourceCache[e]=l,l}assignTexture(e,t,n,r){const i=this;return this.getDependency("texture",n.index).then(function(a){if(!a)return null;if(void 0!==n.texCoord&&n.texCoord>0&&((a=a.clone()).channel=n.texCoord),i.extensions[dB.KHR_TEXTURE_TRANSFORM]){const e=void 0!==n.extensions?n.extensions[dB.KHR_TEXTURE_TRANSFORM]:void 0;if(e){const t=i.associations.get(a);a=i.extensions[dB.KHR_TEXTURE_TRANSFORM].extendTexture(a,e),i.associations.set(a,t)}}return void 0!==r&&("number"==typeof r&&(r=3001===r?oB:lB),"colorSpace"in a?a.colorSpace=r:a.encoding=r===oB?3001:3e3),e[t]=a,a})}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const r=void 0===t.attributes.tangent,i=void 0!==t.attributes.color,a=void 0===t.attributes.normal;if(e.isPoints){const e="PointsMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new rS,__.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,t.sizeAttenuation=!1,this.cache.add(e,t)),n=t}else if(e.isLine){const e="LineBasicMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new Vx,__.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,this.cache.add(e,t)),n=t}if(r||i||a){let e="ClonedMaterial:"+n.uuid+":";r&&(e+="derivative-tangents:"),i&&(e+="vertex-colors:"),a&&(e+="flat-shading:");let t=this.cache.get(e);t||(t=n.clone(),i&&(t.vertexColors=!0),a&&(t.flatShading=!0),r&&(t.normalScale&&(t.normalScale.y*=-1),t.clearcoatNormalScale&&(t.clearcoatNormalScale.y*=-1)),this.cache.add(e,t),this.associations.set(t,this.associations.get(n))),n=t}e.material=n}getMaterialType(){return GA}loadMaterial(e){const t=this,n=this.json,r=this.extensions,i=n.materials[e];let a;const s={},o=[];if((i.extensions||{})[dB.KHR_MATERIALS_UNLIT]){const e=r[dB.KHR_MATERIALS_UNLIT];a=e.getMaterialType(),o.push(e.extendParams(s,i,t))}else{const n=i.pbrMetallicRoughness||{};if(s.color=new g_(1,1,1),s.opacity=1,Array.isArray(n.baseColorFactor)){const e=n.baseColorFactor;s.color.setRGB(e[0],e[1],e[2],lB),s.opacity=e[3]}void 0!==n.baseColorTexture&&o.push(t.assignTexture(s,"map",n.baseColorTexture,oB)),s.metalness=void 0!==n.metallicFactor?n.metallicFactor:1,s.roughness=void 0!==n.roughnessFactor?n.roughnessFactor:1,void 0!==n.metallicRoughnessTexture&&(o.push(t.assignTexture(s,"metalnessMap",n.metallicRoughnessTexture)),o.push(t.assignTexture(s,"roughnessMap",n.metallicRoughnessTexture))),a=this._invokeOne(function(t){return t.getMaterialType&&t.getMaterialType(e)}),o.push(Promise.all(this._invokeAll(function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,s)})))}!0===i.doubleSided&&(s.side=2);const l=i.alphaMode||"OPAQUE";if("BLEND"===l?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,"MASK"===l&&(s.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&a!==b_&&(o.push(t.assignTexture(s,"normalMap",i.normalTexture)),s.normalScale=new wv(1,1),void 0!==i.normalTexture.scale)){const e=i.normalTexture.scale;s.normalScale.set(e,e)}if(void 0!==i.occlusionTexture&&a!==b_&&(o.push(t.assignTexture(s,"aoMap",i.occlusionTexture)),void 0!==i.occlusionTexture.strength&&(s.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&a!==b_){const e=i.emissiveFactor;s.emissive=(new g_).setRGB(e[0],e[1],e[2],lB)}return void 0!==i.emissiveTexture&&a!==b_&&o.push(t.assignTexture(s,"emissiveMap",i.emissiveTexture,oB)),Promise.all(o).then(function(){const n=new a(s);return i.name&&(n.name=i.name),YB(n,i),t.associations.set(n,{materials:e}),i.extensions&&JB(r,n,i),n})}createUniqueName(e){const t=Mw.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,n=this.extensions,r=this.primitiveCache;function i(e){return n[dB.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then(function(n){return tL(n,e,t)})}const a=[];for(let s=0,o=e.length;s<o;s++){const n=e[s],o=qB(n),l=r[o];if(l)a.push(l.promise);else{let e;e=n.extensions&&n.extensions[dB.KHR_DRACO_MESH_COMPRESSION]?i(n):tL(new z_,n,t),r[o]={primitive:n,promise:e},a.push(e)}}return Promise.all(a)}loadMesh(e){const t=this,n=this.json,r=this.extensions,i=n.meshes[e],a=i.primitives,s=[];for(let o=0,l=a.length;o<l;o++){const e=void 0===a[o].material?XB(this.cache):this.getDependency("material",a[o].material);s.push(e)}return s.push(t.loadGeometries(a)),Promise.all(s).then(function(n){const s=n.slice(0,n.length-1),o=n[n.length-1],l=[];for(let u=0,d=o.length;u<d;u++){const n=o[u],c=a[u];let d;const h=s[u];if(c.mode===OB.TRIANGLES||c.mode===OB.TRIANGLE_STRIP||c.mode===OB.TRIANGLE_FAN||void 0===c.mode)d=!0===i.isSkinnedMesh?new Zb(n,h):new Z_(n,h),!0===d.isSkinnedMesh&&d.normalizeSkinWeights(),c.mode===OB.TRIANGLE_STRIP?d.geometry=AP(d.geometry,1):c.mode===OB.TRIANGLE_FAN&&(d.geometry=AP(d.geometry,2));else if(c.mode===OB.LINES)d=new tS(n,h);else if(c.mode===OB.LINE_STRIP)d=new Qx(n,h);else if(c.mode===OB.LINE_LOOP)d=new nS(n,h);else{if(c.mode!==OB.POINTS)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+c.mode);d=new lS(n,h)}Object.keys(d.geometry.morphAttributes).length>0&&KB(d,i),d.name=t.createUniqueName(i.name||"mesh_"+e),YB(d,i),c.extensions&&JB(r,d,c),t.assignFinalMaterial(d),l.push(d)}for(let r=0,i=l.length;r<i;r++)t.associations.set(l[r],{meshes:e,primitives:r});if(1===l.length)return i.extensions&&JB(r,l[0],i),l[0];const c=new mb;i.extensions&&JB(r,c,i),t.associations.set(c,{meshes:e});for(let e=0,t=l.length;e<t;e++)c.add(l[e]);return c})}loadCamera(e){let t;const n=this.json.cameras[e],r=n[n.type];if(r)return"perspective"===n.type?t=new ub(Mv.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(t=new OM(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),YB(t,n),Promise.resolve(t);console.warn("THREE.GLTFLoader: Missing camera parameters.")}loadSkin(e){const t=this.json.skins[e],n=[];for(let r=0,i=t.joints.length;r<i;r++)n.push(this._loadNodeShallow(t.joints[r]));return void 0!==t.inverseBindMatrices?n.push(this.getDependency("accessor",t.inverseBindMatrices)):n.push(null),Promise.all(n).then(function(e){const n=e.pop(),r=e,i=[],a=[];for(let s=0,o=r.length;s<o;s++){const e=r[s];if(e){i.push(e);const t=new My;null!==n&&t.fromArray(n.array,16*s),a.push(t)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[s])}return new rx(i,a)})}loadAnimation(e){const t=this.json,n=this,r=t.animations[e],i=r.name?r.name:"animation_"+e,a=[],s=[],o=[],l=[],c=[];for(let u=0,d=r.channels.length;u<d;u++){const e=r.channels[u],t=r.samplers[e.sampler],n=e.target,i=n.node,d=void 0!==r.parameters?r.parameters[t.input]:t.input,h=void 0!==r.parameters?r.parameters[t.output]:t.output;void 0!==n.node&&(a.push(this.getDependency("node",i)),s.push(this.getDependency("accessor",d)),o.push(this.getDependency("accessor",h)),l.push(t),c.push(n))}return Promise.all([Promise.all(a),Promise.all(s),Promise.all(o),Promise.all(l),Promise.all(c)]).then(function(e){const t=e[0],r=e[1],a=e[2],s=e[3],o=e[4],l=[];for(let i=0,c=t.length;i<c;i++){const e=t[i],c=r[i],u=a[i],d=s[i],h=o[i];if(void 0===e)continue;e.updateMatrix&&e.updateMatrix();const f=n._createAnimationTracks(e,c,u,d,h);if(f)for(let t=0;t<f.length;t++)l.push(f[t])}return new pM(i,void 0,l)})}createNodeMesh(e){const t=this.json,n=this,r=t.nodes[e];return void 0===r.mesh?null:n.getDependency("mesh",r.mesh).then(function(e){const t=n._getNodeRef(n.meshCache,r.mesh,e);return void 0!==r.weights&&t.traverse(function(e){if(e.isMesh)for(let t=0,n=r.weights.length;t<n;t++)e.morphTargetInfluences[t]=r.weights[t]}),t})}loadNode(e){const t=this,n=this.json.nodes[e],r=t._loadNodeShallow(e),i=[],a=n.children||[];for(let o=0,l=a.length;o<l;o++)i.push(t.getDependency("node",a[o]));const s=void 0===n.skin?Promise.resolve(null):t.getDependency("skin",n.skin);return Promise.all([r,Promise.all(i),s]).then(function(e){const t=e[0],n=e[1],r=e[2];null!==r&&t.traverse(function(e){e.isSkinnedMesh&&e.bind(r,$B)});for(let i=0,a=n.length;i<a;i++)t.add(n[i]);return t})}_loadNodeShallow(e){const t=this.json,n=this.extensions,r=this;if(void 0!==this.nodeCache[e])return this.nodeCache[e];const i=t.nodes[e],a=i.name?r.createUniqueName(i.name):"",s=[],o=r._invokeOne(function(t){return t.createNodeMesh&&t.createNodeMesh(e)});return o&&s.push(o),void 0!==i.camera&&s.push(r.getDependency("camera",i.camera).then(function(e){return r._getNodeRef(r.cameraCache,i.camera,e)})),r._invokeAll(function(t){return t.createNodeAttachment&&t.createNodeAttachment(e)}).forEach(function(e){s.push(e)}),this.nodeCache[e]=Promise.all(s).then(function(t){let s;if(s=!0===i.isBone?new $b:t.length>1?new mb:1===t.length?t[0]:new Qy,s!==t[0])for(let e=0,n=t.length;e<n;e++)s.add(t[e]);if(i.name&&(s.userData.name=i.name,s.name=a),YB(s,i),i.extensions&&JB(n,s,i),void 0!==i.matrix){const e=new My;e.fromArray(i.matrix),s.applyMatrix4(e)}else void 0!==i.translation&&s.position.fromArray(i.translation),void 0!==i.rotation&&s.quaternion.fromArray(i.rotation),void 0!==i.scale&&s.scale.fromArray(i.scale);return r.associations.has(s)||r.associations.set(s,{}),r.associations.get(s).nodes=e,s}),this.nodeCache[e]}loadScene(e){const t=this.extensions,n=this.json.scenes[e],r=this,i=new mb;n.name&&(i.name=r.createUniqueName(n.name)),YB(i,n),n.extensions&&JB(t,i,n);const a=n.nodes||[],s=[];for(let o=0,l=a.length;o<l;o++)s.push(r.getDependency("node",a[o]));return Promise.all(s).then(function(e){for(let t=0,n=e.length;t<n;t++)i.add(e[t]);return r.associations=(e=>{const t=new Map;for(const[n,i]of r.associations)(n instanceof __||n instanceof jv)&&t.set(n,i);return e.traverse(e=>{const n=r.associations.get(e);null!=n&&t.set(e,n)}),t})(i),i})}_createAnimationTracks(e,t,n,r,i){const a=[],s=e.name?e.name:e.uuid,o=[];let l;switch(WB[i.path]===WB.weights?e.traverse(function(e){e.morphTargetInfluences&&o.push(e.name?e.name:e.uuid)}):o.push(s),WB[i.path]){case WB.weights:l=cM;break;case WB.rotation:l=dM;break;case WB.position:case WB.scale:l=fM;break;default:l=1===n.itemSize?cM:fM}const c=void 0!==r.interpolation?jB[r.interpolation]:Pg,u=this._getArrayFromAccessor(n);for(let d=0,h=o.length;d<h;d++){const e=new l(o[d]+"."+WB[i.path],t.array,u,c);"CUBICSPLINE"===r.interpolation&&this._createCubicSplineTrackInterpolant(e),a.push(e)}return a}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const e=ZB(t.constructor),n=new Float32Array(t.length);for(let r=0,i=t.length;r<i;r++)n[r]=t[r]*e;t=n}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(e){return new(this instanceof dM?UB:FB)(this.times,this.values,this.getValueSize()/3,e)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function tL(e,t,n){const r=t.attributes,i=[];function a(t,r){return n.getDependency("accessor",t).then(function(t){e.setAttribute(r,t)})}for(const s in r){const t=VB[s]||s.toLowerCase();t in e.attributes||i.push(a(r[s],t))}if(void 0!==t.indices&&!e.index){const r=n.getDependency("accessor",t.indices).then(function(t){e.setIndex(t)});i.push(r)}return YB(e,t),function(e,t,n){const r=t.attributes,i=new Qv;if(void 0===r.POSITION)return;{const e=n.json.accessors[r.POSITION],t=e.min,a=e.max;if(void 0===t||void 0===a)return void console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(i.set(new Cv(t[0],t[1],t[2]),new Cv(a[0],a[1],a[2])),e.normalized){const t=ZB(kB[e.componentType]);i.min.multiplyScalar(t),i.max.multiplyScalar(t)}}const a=t.targets;if(void 0!==a){const e=new Cv,t=new Cv;for(let r=0,i=a.length;r<i;r++){const i=a[r];if(void 0!==i.POSITION){const r=n.json.accessors[i.POSITION],a=r.min,s=r.max;if(void 0!==a&&void 0!==s){if(t.setX(Math.max(Math.abs(a[0]),Math.abs(s[0]))),t.setY(Math.max(Math.abs(a[1]),Math.abs(s[1]))),t.setZ(Math.max(Math.abs(a[2]),Math.abs(s[2]))),r.normalized){const e=ZB(kB[r.componentType]);t.multiplyScalar(e)}e.max(t)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}i.expandByVector(e)}e.boundingBox=i;const s=new my;i.getCenter(s.center),s.radius=i.min.distanceTo(i.max)/2,e.boundingSphere=s}(e,t,n),Promise.all(i).then(function(){return void 0!==t.targets?function(e,t,n){let r=!1,i=!1,a=!1;for(let c=0,u=t.length;c<u;c++){const e=t[c];if(void 0!==e.POSITION&&(r=!0),void 0!==e.NORMAL&&(i=!0),void 0!==e.COLOR_0&&(a=!0),r&&i&&a)break}if(!r&&!i&&!a)return Promise.resolve(e);const s=[],o=[],l=[];for(let c=0,u=t.length;c<u;c++){const u=t[c];if(r){const t=void 0!==u.POSITION?n.getDependency("accessor",u.POSITION):e.attributes.position;s.push(t)}if(i){const t=void 0!==u.NORMAL?n.getDependency("accessor",u.NORMAL):e.attributes.normal;o.push(t)}if(a){const t=void 0!==u.COLOR_0?n.getDependency("accessor",u.COLOR_0):e.attributes.color;l.push(t)}}return Promise.all([Promise.all(s),Promise.all(o),Promise.all(l)]).then(function(t){const n=t[0],s=t[1],o=t[2];return r&&(e.morphAttributes.position=n),i&&(e.morphAttributes.normal=s),a&&(e.morphAttributes.color=o),e.morphTargetsRelative=!0,e})}(e,t.targets,n):e})}
vendor: 3,421 bytes, line 26
26class nL extends EM{constructor(e){super(e),this.type=Bm}parse(e){const t=function(e,t){switch(e){case 1:throw new Error("THREE.RGBELoader: Read Error: "+(t||""));case 2:throw new Error("THREE.RGBELoader: Write Error: "+(t||""));case 3:throw new Error("THREE.RGBELoader: Bad File Format: "+(t||""));default:throw new Error("THREE.RGBELoader: Memory Error: "+(t||""))}},n=function(e,t,n){t=t||1024;let r=e.pos,i=-1,a=0,s="",o=String.fromCharCode.apply(null,new Uint16Array(e.subarray(r,r+128)));for(;0>(i=o.indexOf("\n"))&&a<t&&r<e.byteLength;)s+=o,a+=o.length,r+=128,o+=String.fromCharCode.apply(null,new Uint16Array(e.subarray(r,r+128)));return-1<i&&(e.pos+=a+i+1,s+o.slice(0,i))},r=function(e,t,n,r){const i=e[t+3],a=Math.pow(2,i-128)/255;n[r+0]=e[t+0]*a,n[r+1]=e[t+1]*a,n[r+2]=e[t+2]*a,n[r+3]=1},i=function(e,t,n,r){const i=e[t+3],a=Math.pow(2,i-128)/255;n[r+0]=w_.toHalfFloat(Math.min(e[t+0]*a,65504)),n[r+1]=w_.toHalfFloat(Math.min(e[t+1]*a,65504)),n[r+2]=w_.toHalfFloat(Math.min(e[t+2]*a,65504)),n[r+3]=w_.toHalfFloat(1)},a=new Uint8Array(e);a.pos=0;const s=function(e){const r=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,i=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,a=/^\s*FORMAT=(\S+)\s*$/,s=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,o={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let l,c;for((e.pos>=e.byteLength||!(l=n(e)))&&t(1,"no header found"),(c=l.match(/^#\?(\S+)/))||t(3,"bad initial token"),o.valid|=1,o.programtype=c[1],o.string+=l+"\n";l=n(e),!1!==l;)if(o.string+=l+"\n","#"!==l.charAt(0)){if((c=l.match(r))&&(o.gamma=parseFloat(c[1])),(c=l.match(i))&&(o.exposure=parseFloat(c[1])),(c=l.match(a))&&(o.valid|=2,o.format=c[1]),(c=l.match(s))&&(o.valid|=4,o.height=parseInt(c[1],10),o.width=parseInt(c[2],10)),2&o.valid&&4&o.valid)break}else o.comments+=l+"\n";return 2&o.valid||t(3,"missing format specifier"),4&o.valid||t(3,"missing image size specifier"),o}(a),o=s.width,l=s.height,c=function(e,n,r){const i=n;if(i<8||i>32767||2!==e[0]||2!==e[1]||128&e[2])return new Uint8Array(e);i!==(e[2]<<8|e[3])&&t(3,"wrong scanline width");const a=new Uint8Array(4*n*r);a.length||t(4,"unable to allocate buffer space");let s=0,o=0;const l=4*i,c=new Uint8Array(4),u=new Uint8Array(l);let d=r;for(;d>0&&o<e.byteLength;){o+4>e.byteLength&&t(1),c[0]=e[o++],c[1]=e[o++],c[2]=e[o++],c[3]=e[o++],2==c[0]&&2==c[1]&&(c[2]<<8|c[3])==i||t(3,"bad rgbe scanline format");let n,r=0;for(;r<l&&o<e.byteLength;){n=e[o++];const i=n>128;if(i&&(n-=128),(0===n||r+n>l)&&t(3,"bad scanline data"),i){const t=e[o++];for(let e=0;e<n;e++)u[r++]=t}else u.set(e.subarray(o,o+n),r),r+=n,o+=n}const h=i;for(let e=0;e<h;e++){let t=0;a[s]=u[e+t],t+=i,a[s+1]=u[e+t],t+=i,a[s+2]=u[e+t],t+=i,a[s+3]=u[e+t],s+=4}d--}return a}(a.subarray(a.pos),o,l);let u,d,h;switch(this.type){case Pm:h=c.length/4;const e=new Float32Array(4*h);for(let n=0;n<h;n++)r(c,4*n,e,4*n);u=e,d=Pm;break;case Bm:h=c.length/4;const t=new Uint16Array(4*h);for(let n=0;n<h;n++)i(c,4*n,t,4*n);u=t,d=Bm;break;default:throw new Error("THREE.RGBELoader: Unsupported type: "+this.type)}return{width:o,height:l,data:u,header:s.string,gamma:s.gamma,exposure:s.exposure,type:d}}setDataType(e){return this.type=e,this}load(e,t,n,r){return super.load(e,function(e,n){switch(e.type){case Pm:case Bm:"colorSpace"in e?e.colorSpace="srgb-linear":e.encoding=3e3,e.minFilter=xm,e.magFilter=xm,e.generateMipmaps=!1,e.flipY=!0}t&&t(e,n)},n,r)}}const rL=SP>=152;
26class iL extends EM{constructor(e){super(e),this.type=Bm}parse(e){const t=65536,n=14,r=65537,i=Math.pow(2.7182818,2.2),a={l:0,c:0,lc:0};function s(e,t,n,r,i){for(;n<e;)t=t<<8|k(r,i),n+=8;n-=e,a.l=t>>n&(1<<e)-1,a.c=t,a.lc=n}const o=new Array(59);function l(e){return 63&e}function c(e){return e>>6}const u={c:0,lc:0};function d(e,t,n,r){e=e<<8|k(n,r),t+=8,u.c=e,u.lc=t}const h={c:0,lc:0};function f(e,t,n,r,i,a,s,o,l,c){if(e==t){r<8&&(d(n,r,i,s),n=u.c,r=u.lc);var f=n>>(r-=8);if(f=new Uint8Array([f])[0],l.value+f>c)return!1;for(var p=o[l.value-1];f-- >0;)o[l.value++]=p}else{if(!(l.value<c))return!1;o[l.value++]=e}h.c=n,h.lc=r}function p(e){return 65535&e}function m(e){var t=p(e);return t>32767?t-65536:t}const g={a:0,b:0};function v(e,t){var n=m(e),r=m(t),i=n+(1&r)+(r>>1),a=i,s=i-r;g.a=a,g.b=s}function y(e,t){var n=p(e),r=p(t),i=n-(r>>1)&65535,a=r+i-32768&65535;g.a=a,g.b=i}function _(e,t,n,r,i,a,s){for(var o,l=s<16384,c=n>i?i:n,u=1;u<=c;)u<<=1;for(o=u>>=1,u>>=1;u>=1;){for(var d,h,f,p,m=0,_=m+a*(i-o),b=a*u,x=a*o,S=r*u,A=r*o;m<=_;m+=x){for(var M=m,w=m+r*(n-o);M<=w;M+=A){var E=M+S,C=(T=M+b)+S;l?(v(e[M+t],e[T+t]),d=g.a,f=g.b,v(e[E+t],e[C+t]),h=g.a,p=g.b,v(d,h),e[M+t]=g.a,e[E+t]=g.b,v(f,p),e[T+t]=g.a,e[C+t]=g.b):(y(e[M+t],e[T+t]),d=g.a,f=g.b,y(e[E+t],e[C+t]),h=g.a,p=g.b,y(d,h),e[M+t]=g.a,e[E+t]=g.b,y(f,p),e[T+t]=g.a,e[C+t]=g.b)}if(n&u){var T=M+b;l?v(e[M+t],e[T+t]):y(e[M+t],e[T+t]),d=g.a,e[T+t]=g.b,e[M+t]=d}}if(i&u)for(M=m,w=m+r*(n-o);M<=w;M+=A)E=M+S,l?v(e[M+t],e[E+t]):y(e[M+t],e[E+t]),d=g.a,e[E+t]=g.b,e[M+t]=d;o=u,u>>=1}return m}function b(e,t,i,p,m,g){var v=i.value,y=O(t,i),_=O(t,i);i.value+=4;var b=O(t,i);if(i.value+=4,y<0||y>=r||_<0||_>=r)throw"Something wrong with HUF_ENCSIZE";var x=new Array(r),S=new Array(16384);if(function(e){for(var t=0;t<16384;t++)e[t]={},e[t].len=0,e[t].lit=0,e[t].p=null}(S),function(e,t,n,i,l,c,u){for(var d=n,h=0,f=0;l<=c;l++){if(d.value-n.value>i)return!1;s(6,h,f,e,d);var p=a.l;if(h=a.c,f=a.lc,u[l]=p,63==p){if(d.value-n.value>i)throw"Something wrong with hufUnpackEncTable";s(8,h,f,e,d);var m=a.l+6;if(h=a.c,f=a.lc,l+m>c+1)throw"Something wrong with hufUnpackEncTable";for(;m--;)u[l++]=0;l--}else if(p>=59){if(l+(m=p-59+2)>c+1)throw"Something wrong with hufUnpackEncTable";for(;m--;)u[l++]=0;l--}}!function(e){for(var t=0;t<=58;++t)o[t]=0;for(t=0;t<r;++t)o[e[t]]+=1;var n=0;for(t=58;t>0;--t){var i=n+o[t]>>1;o[t]=n,n=i}for(t=0;t<r;++t){var a=e[t];a>0&&(e[t]=a|o[a]++<<6)}}(u)}(e,0,i,p-(i.value-v),y,_,x),b>8*(p-(i.value-v)))throw"Something wrong with hufUncompress";!function(e,t,r,i){for(;t<=r;t++){var a=c(e[t]),s=l(e[t]);if(a>>s)throw"Invalid table entry";if(s>n){if((h=i[a>>s-n]).len)throw"Invalid table entry";if(h.lit++,h.p){var o=h.p;h.p=new Array(h.lit);for(var u=0;u<h.lit-1;++u)h.p[u]=o[u]}else h.p=new Array(1);h.p[h.lit-1]=t}else if(s){var d=0;for(u=1<<n-s;u>0;u--){var h;if((h=i[(a<<n-s)+d]).len||h.p)throw"Invalid table entry";h.len=s,h.lit=t,d++}}}}(x,y,_,S),function(e,t,r,i,a,s,o,p,m,g){for(var v=0,y=0,_=p,b=Math.trunc(a.value+(s+7)/8);a.value<b;)for(d(v,y,r,a),v=u.c,y=u.lc;y>=n;)if((M=t[v>>y-n&16383]).len)y-=M.len,f(M.lit,o,v,y,r,0,a,m,g,_),v=h.c,y=h.lc;else{if(!M.p)throw"hufDecode issues";var x;for(x=0;x<M.lit;x++){for(var S=l(e[M.p[x]]);y<S&&a.value<b;)d(v,y,r,a),v=u.c,y=u.lc;if(y>=S&&c(e[M.p[x]])==(v>>y-S&(1<<S)-1)){y-=S,f(M.p[x],o,v,y,r,0,a,m,g,_),v=h.c,y=h.lc;break}}if(x==M.lit)throw"hufDecode issues"}var A=8-s&7;for(v>>=A,y-=A;y>0;){var M;if(!(M=t[v<<n-y&16383]).len)throw"hufDecode issues";y-=M.len,f(M.lit,o,v,y,r,0,a,m,g,_),v=h.c,y=h.lc}}(x,S,e,0,i,b,_,g,m,{value:0})}function x(e){for(var t=1;t<e.length;t++){var n=e[t-1]+e[t]-128;e[t]=n}}function S(e,t){for(var n=0,r=Math.floor((e.length+1)/2),i=0,a=e.length-1;!(i>a||(t[i++]=e[n++],i>a));)t[i++]=e[r++]}function A(e){for(var t=e.byteLength,n=new Array,r=0,i=new DataView(e);t>0;){var a=i.getInt8(r++);if(a<0){t-=1+(o=-a);for(var s=0;s<o;s++)n.push(i.getUint8(r++))}else{var o=a;t-=2;var l=i.getUint8(r++);for(s=0;s<o+1;s++)n.push(l)}}return n}function M(e,t,n){for(var r,i=1;i<64;)65280==(r=t[e.value])?i=64:r>>8==255?i+=255&r:(n[i]=r,i++),e.value++}function w(e,t){t[0]=W(e[0]),t[1]=W(e[1]),t[2]=W(e[5]),t[3]=W(e[6]),t[4]=W(e[14]),t[5]=W(e[15]),t[6]=W(e[27]),t[7]=W(e[28]),t[8]=W(e[2]),t[9]=W(e[4]),t[10]=W(e[7]),t[11]=W(e[13]),t[12]=W(e[16]),t[13]=W(e[26]),t[14]=W(e[29]),t[15]=W(e[42]),t[16]=W(e[3]),t[17]=W(e[8]),t[18]=W(e[12]),t[19]=W(e[17]),t[20]=W(e[25]),t[21]=W(e[30]),t[22]=W(e[41]),t[23]=W(e[43]),t[24]=W(e[9]),t[25]=W(e[11]),t[26]=W(e[18]),t[27]=W(e[24]),t[28]=W(e[31]),t[29]=W(e[40]),t[30]=W(e[44]),t[31]=W(e[53]),t[32]=W(e[10]),t[33]=W(e[19]),t[34]=W(e[23]),t[35]=W(e[32]),t[36]=W(e[39]),t[37]=W(e[45]),t[38]=W(e[52]),t[39]=W(e[54]),t[40]=W(e[20]),t[41]=W(e[22]),t[42]=W(e[33]),t[43]=W(e[38]),t[44]=W(e[46]),t[45]=W(e[51]),t[46]=W(e[55]),t[47]=W(e[60]),t[48]=W(e[21]),t[49]=W(e[34]),t[50]=W(e[37]),t[51]=W(e[47]),t[52]=W(e[50]),t[53]=W(e[56]),t[54]=W(e[59]),t[55]=W(e[61]),t[56]=W(e[35]),t[57]=W(e[36]),t[58]=W(e[48]),t[59]=W(e[49]),t[60]=W(e[57]),t[61]=W(e[58]),t[62]=W(e[62]),t[63]=W(e[63])}
26function E(e){const t=.5*Math.cos(.7853975),n=.5*Math.cos(3.14159/16),r=.5*Math.cos(3.14159/8),i=.5*Math.cos(3*3.14159/16),a=.5*Math.cos(.981746875),s=.5*Math.cos(3*3.14159/8),o=.5*Math.cos(1.374445625);for(var l=new Array(4),c=new Array(4),u=new Array(4),d=new Array(4),h=0;h<8;++h){var f=8*h;l[0]=r*e[f+2],l[1]=s*e[f+2],l[2]=r*e[f+6],l[3]=s*e[f+6],c[0]=n*e[f+1]+i*e[f+3]+a*e[f+5]+o*e[f+7],c[1]=i*e[f+1]-o*e[f+3]-n*e[f+5]-a*e[f+7],c[2]=a*e[f+1]-n*e[f+3]+o*e[f+5]+i*e[f+7],c[3]=o*e[f+1]-a*e[f+3]+i*e[f+5]-n*e[f+7],u[0]=t*(e[f+0]+e[f+4]),u[3]=t*(e[f+0]-e[f+4]),u[1]=l[0]+l[3],u[2]=l[1]-l[2],d[0]=u[0]+u[1],d[1]=u[3]+u[2],d[2]=u[3]-u[2],d[3]=u[0]-u[1],e[f+0]=d[0]+c[0],e[f+1]=d[1]+c[1],e[f+2]=d[2]+c[2],e[f+3]=d[3]+c[3],e[f+4]=d[3]-c[3],e[f+5]=d[2]-c[2],e[f+6]=d[1]-c[1],e[f+7]=d[0]-c[0]}for(var p=0;p<8;++p)l[0]=r*e[16+p],l[1]=s*e[16+p],l[2]=r*e[48+p],l[3]=s*e[48+p],c[0]=n*e[8+p]+i*e[24+p]+a*e[40+p]+o*e[56+p],c[1]=i*e[8+p]-o*e[24+p]-n*e[40+p]-a*e[56+p],c[2]=a*e[8+p]-n*e[24+p]+o*e[40+p]+i*e[56+p],c[3]=o*e[8+p]-a*e[24+p]+i*e[40+p]-n*e[56+p],u[0]=t*(e[p]+e[32+p]),u[3]=t*(e[p]-e[32+p]),u[1]=l[0]+l[3],u[2]=l[1]-l[2],d[0]=u[0]+u[1],d[1]=u[3]+u[2],d[2]=u[3]-u[2],d[3]=u[0]-u[1],e[0+p]=d[0]+c[0],e[8+p]=d[1]+c[1],e[16+p]=d[2]+c[2],e[24+p]=d[3]+c[3],e[32+p]=d[3]-c[3],e[40+p]=d[2]-c[2],e[48+p]=d[1]-c[1],e[56+p]=d[0]-c[0]}function C(e){for(var t=0;t<64;++t){var n=e[0][t],r=e[1][t],i=e[2][t];e[0][t]=n+1.5747*i,e[1][t]=n-.1873*r-.4682*i,e[2][t]=n+1.8556*r}}function T(e,t,n){for(var r=0;r<64;++r)t[n+r]=w_.toHalfFloat(R(e[r]))}function R(e){return e<=1?Math.sign(e)*Math.pow(Math.abs(e),2.2):Math.sign(e)*Math.pow(i,Math.abs(e)-1)}function I(e){return new DataView(e.array.buffer,e.offset.value,e.size)}function P(e){var t=e.viewer.buffer.slice(e.offset.value,e.offset.value+e.size),n=new Uint8Array(A(t)),r=new Uint8Array(n.length);return x(n),S(n,r),new DataView(r.buffer)}function B(e){var t=YP(e.array.slice(e.offset.value,e.offset.value+e.size)),n=new Uint8Array(t.length);return x(t),S(t,n),new DataView(n.buffer)}function L(e){for(var n=e.viewer,r={value:e.offset.value},i=new Uint16Array(e.width*e.scanlineBlockSize*(e.channels*e.type)),a=new Uint8Array(8192),s=0,o=new Array(e.channels),l=0;l<e.channels;l++)o[l]={},o[l].start=s,o[l].end=o[l].start,o[l].nx=e.width,o[l].ny=e.lines,o[l].size=e.type,s+=o[l].nx*o[l].ny*o[l].size;var c=j(n,r),u=j(n,r);if(u>=8192)throw"Something is wrong with PIZ_COMPRESSION BITMAP_SIZE";if(c<=u)for(l=0;l<u-c+1;l++)a[l+c]=z(n,r);var d=new Uint16Array(t),h=function(e,n){for(var r=0,i=0;i<t;++i)(0==i||e[i>>3]&1<<(7&i))&&(n[r++]=i);for(var a=r-1;r<t;)n[r++]=0;return a}(a,d),f=O(n,r);for(b(e.array,n,r,f,i,s),l=0;l<e.channels;++l)for(var p=o[l],m=0;m<o[l].size;++m)_(i,p.start+m,p.nx,p.size,p.ny,p.nx*p.size,h);!function(e,t,n){for(var r=0;r<n;++r)t[r]=e[t[r]]}(d,i,s);for(var g=0,v=new Uint8Array(i.buffer.byteLength),y=0;y<e.lines;y++)for(var x=0;x<e.channels;x++){var S=(p=o[x]).nx*p.size,A=new Uint8Array(i.buffer,2*p.end,2*S);v.set(A,g),g+=2*S,p.end+=S}return new DataView(v.buffer)}function D(e){var t=YP(e.array.slice(e.offset.value,e.offset.value+e.size));const n=e.lines*e.channels*e.width,r=1==e.type?new Uint16Array(n):new Uint32Array(n);let i=0,a=0;const s=new Array(4);for(let o=0;o<e.lines;o++)for(let n=0;n<e.channels;n++){let n=0;switch(e.type){case 1:s[0]=i,s[1]=s[0]+e.width,i=s[1]+e.width;for(let i=0;i<e.width;++i)n+=t[s[0]++]<<8|t[s[1]++],r[a]=n,a++;break;case 2:s[0]=i,s[1]=s[0]+e.width,s[2]=s[1]+e.width,i=s[2]+e.width;for(let i=0;i<e.width;++i)n+=t[s[0]++]<<24|t[s[1]++]<<16|t[s[2]++]<<8,r[a]=n,a++}}return new DataView(r.buffer)}function F(e){var t=e.viewer,n={value:e.offset.value},r=new Uint8Array(e.width*e.lines*(e.channels*e.type*2)),i={version:H(t,n),unknownUncompressedSize:H(t,n),unknownCompressedSize:H(t,n),acCompressedSize:H(t,n),dcCompressedSize:H(t,n),rleCompressedSize:H(t,n),rleUncompressedSize:H(t,n),rleRawSize:H(t,n),totalAcUncompressedCount:H(t,n),totalDcUncompressedCount:H(t,n),acCompression:H(t,n)};if(i.version<2)throw"EXRLoader.parse: "+Q.compression+" version "+i.version+" is unsupported";for(var a=new Array,s=j(t,n)-2;s>0;){var o=N(t.buffer,n),l=z(t,n),c=l>>2&3,u=new Int8Array([(l>>4)-1])[0],d=z(t,n);a.push({name:o,index:u,type:d,compression:c}),s-=o.length+3}for(var h=Q.channels,f=new Array(e.channels),p=0;p<e.channels;++p){var m=f[p]={},g=h[p];m.name=g.name,m.compression=0,m.decoded=!1,m.type=g.pixelType,m.pLinear=g.pLinear,m.width=e.width,m.height=e.lines}for(var v={idx:new Array(3)},y=0;y<e.channels;++y)for(m=f[y],p=0;p<a.length;++p){var _=a[p];m.name==_.name&&(m.compression=_.compression,_.index>=0&&(v.idx[_.index]=y),m.offset=y)}if(i.acCompressedSize>0)switch(i.acCompression){case 0:var x=new Uint16Array(i.totalAcUncompressedCount);b(e.array,t,n,i.acCompressedSize,x,i.totalAcUncompressedCount);break;
26case 1:var S=YP(e.array.slice(n.value,n.value+i.totalAcUncompressedCount));x=new Uint16Array(S.buffer),n.value+=i.totalAcUncompressedCount}if(i.dcCompressedSize>0){var R={array:e.array,offset:n,size:i.dcCompressedSize},I=new Uint16Array(B(R).buffer);n.value+=i.dcCompressedSize}if(i.rleRawSize>0){var P=A((S=YP(e.array.slice(n.value,n.value+i.rleCompressedSize))).buffer);n.value+=i.rleCompressedSize}var L=0,D=new Array(f.length);for(p=0;p<D.length;++p)D[p]=new Array;for(var F=0;F<e.lines;++F)for(var U=0;U<f.length;++U)D[U].push(L),L+=f[U].width*e.type*2;for(function(e,t,n,r,i,a){var s=new DataView(a.buffer),o=n[e.idx[0]].width,l=n[e.idx[0]].height,c=Math.floor(o/8),u=Math.ceil(o/8),d=Math.ceil(l/8),h=o-8*(u-1),f=l-8*(d-1),p={value:0},m=new Array(3),g=new Array(3),v=new Array(3),y=new Array(3),_=new Array(3);for(let M=0;M<3;++M)_[M]=t[e.idx[M]],m[M]=M<1?0:m[M-1]+u*d,g[M]=new Float32Array(64),v[M]=new Uint16Array(64),y[M]=new Uint16Array(64*u);for(let B=0;B<d;++B){var b=8;B==d-1&&(b=f);var x=8;for(let e=0;e<u;++e){e==u-1&&(x=h);for(let e=0;e<3;++e)v[e].fill(0),v[e][0]=i[m[e]++],M(p,r,v[e]),w(v[e],g[e]),E(g[e]);C(g);for(let t=0;t<3;++t)T(g[t],y[t],64*e)}let t=0;for(let r=0;r<3;++r){const i=n[e.idx[r]].type;for(let e=8*B;e<8*B+b;++e){t=_[r][e];for(let n=0;n<c;++n){const a=64*n+8*(7&e);s.setUint16(t+0*i,y[r][a+0],!0),s.setUint16(t+2*i,y[r][a+1],!0),s.setUint16(t+4*i,y[r][a+2],!0),s.setUint16(t+6*i,y[r][a+3],!0),s.setUint16(t+8*i,y[r][a+4],!0),s.setUint16(t+10*i,y[r][a+5],!0),s.setUint16(t+12*i,y[r][a+6],!0),s.setUint16(t+14*i,y[r][a+7],!0),t+=16*i}}if(c!=u)for(let e=8*B;e<8*B+b;++e){const t=_[r][e]+8*c*2*i,n=64*c+8*(7&e);for(let e=0;e<x;++e)s.setUint16(t+2*e*i,y[r][n+e],!0)}}}for(var S=new Uint16Array(o),A=(s=new DataView(a.buffer),0);A<3;++A){n[e.idx[A]].decoded=!0;var R=n[e.idx[A]].type;if(2==n[A].type)for(var I=0;I<l;++I){const e=_[A][I];for(var P=0;P<o;++P)S[P]=s.getUint16(e+2*P*R,!0);for(P=0;P<o;++P)s.setFloat32(e+2*P*R,W(S[P]),!0)}}}(v,D,f,x,I,r),p=0;p<f.length;++p)if(!(m=f[p]).decoded){if(2!==m.compression)throw"EXRLoader.parse: unsupported channel compression";var O=0,k=0;for(F=0;F<e.lines;++F){for(var G=D[p][O],V=0;V<m.width;++V){for(var X=0;X<2*m.type;++X)r[G++]=P[k+X*m.width*m.height];k++}O++}}return new DataView(r.buffer)}function N(e,t){for(var n=new Uint8Array(e),r=0;0!=n[t.value+r];)r+=1;var i=(new TextDecoder).decode(n.slice(t.value,t.value+r));return t.value=t.value+r+1,i}function U(e,t){var n=e.getInt32(t.value,!0);return t.value=t.value+4,n}function O(e,t){var n=e.getUint32(t.value,!0);return t.value=t.value+4,n}function k(e,t){var n=e[t.value];return t.value=t.value+1,n}function z(e,t){var n=e.getUint8(t.value);return t.value=t.value+1,n}const H=function(e,t){let n;return n="getBigInt64"in DataView.prototype?Number(e.getBigInt64(t.value,!0)):e.getUint32(t.value+4,!0)+Number(e.getUint32(t.value,!0)<<32),t.value+=8,n};function G(e,t){var n=e.getFloat32(t.value,!0);return t.value+=4,n}function V(e,t){return w_.toHalfFloat(G(e,t))}function W(e){var t=(31744&e)>>10,n=1023&e;return(e>>15?-1:1)*(t?31===t?n?NaN:1/0:Math.pow(2,t-15)*(1+n/1024):n/1024*6103515625e-14)}function j(e,t){var n=e.getUint16(t.value,!0);return t.value+=2,n}function X(e,t){return W(j(e,t))}function J(e,t,n,r,i){return"string"===r||"stringvector"===r||"iccProfile"===r?function(e,t,n){var r=(new TextDecoder).decode(new Uint8Array(e).slice(t.value,t.value+n));return t.value=t.value+n,r}(t,n,i):"chlist"===r?function(e,t,n,r){for(var i=n.value,a=[];n.value<i+r-1;){var s=N(t,n),o=U(e,n),l=z(e,n);n.value+=3;var c=U(e,n),u=U(e,n);a.push({name:s,pixelType:o,pLinear:l,xSampling:c,ySampling:u})}return n.value+=1,a}(e,t,n,i):"chromaticities"===r?function(e,t){return{redX:G(e,t),redY:G(e,t),greenX:G(e,t),greenY:G(e,t),blueX:G(e,t),blueY:G(e,t),whiteX:G(e,t),whiteY:G(e,t)}}(e,n):"compression"===r?function(e,t){return["NO_COMPRESSION","RLE_COMPRESSION","ZIPS_COMPRESSION","ZIP_COMPRESSION","PIZ_COMPRESSION","PXR24_COMPRESSION","B44_COMPRESSION","B44A_COMPRESSION","DWAA_COMPRESSION","DWAB_COMPRESSION"][z(e,t)]}(e,n):"box2i"===r?function(e,t){return{xMin:O(e,t),yMin:O(e,t),xMax:O(e,t),yMax:O(e,t)}}
26(e,n):"lineOrder"===r?function(e,t){return["INCREASING_Y"][z(e,t)]}(e,n):"float"===r?G(e,n):"v2f"===r?function(e,t){return[G(e,t),G(e,t)]}(e,n):"v3f"===r?function(e,t){return[G(e,t),G(e,t),G(e,t)]}(e,n):"int"===r?U(e,n):"rational"===r?function(e,t){return[U(e,t),O(e,t)]}(e,n):"timecode"===r?function(e,t){return[O(e,t),O(e,t)]}(e,n):"preview"===r?(n.value+=i,"skipped"):void(n.value+=i)}const Y=new DataView(e),K=new Uint8Array(e),q={value:0},Q=function(e,t,n){const r={};if(20000630!=e.getUint32(0,!0))throw"THREE.EXRLoader: provided file doesn't appear to be in OpenEXR format.";r.version=e.getUint8(4);const i=e.getUint8(5);r.spec={singleTile:!!(2&i),longName:!!(4&i),deepFormat:!!(8&i),multiPart:!!(16&i)},n.value=8;for(var a=!0;a;){var s=N(t,n);if(0==s)a=!1;else{var o=N(t,n),l=J(e,t,n,o,O(e,n));void 0===l?console.warn(`EXRLoader.parse: skipped unknown header attribute type '${o}'.`):r[s]=l}}if(-5&i)throw console.error("EXRHeader:",r),"THREE.EXRLoader: provided file is currently unsupported.";return r}(Y,e,q),Z=function(e,t,n,r,i){const a={size:0,viewer:t,array:n,offset:r,width:e.dataWindow.xMax-e.dataWindow.xMin+1,height:e.dataWindow.yMax-e.dataWindow.yMin+1,channels:e.channels.length,bytesPerLine:null,lines:null,inputSize:null,type:e.channels[0].pixelType,uncompress:null,getter:null,format:null,[rL?"colorSpace":"encoding"]:null};switch(e.compression){case"NO_COMPRESSION":a.lines=1,a.uncompress=I;break;case"RLE_COMPRESSION":a.lines=1,a.uncompress=P;break;case"ZIPS_COMPRESSION":a.lines=1,a.uncompress=B;break;case"ZIP_COMPRESSION":a.lines=16,a.uncompress=B;break;case"PIZ_COMPRESSION":a.lines=32,a.uncompress=L;break;case"PXR24_COMPRESSION":a.lines=16,a.uncompress=D;break;case"DWAA_COMPRESSION":a.lines=32,a.uncompress=F;break;case"DWAB_COMPRESSION":a.lines=256,a.uncompress=F;break;default:throw"EXRLoader.parse: "+e.compression+" is unsupported"}if(a.scanlineBlockSize=a.lines,1==a.type)switch(i){case Pm:a.getter=X,a.inputSize=2;break;case Bm:a.getter=j,a.inputSize=2}else{if(2!=a.type)throw"EXRLoader.parse: unsupported pixelType "+a.type+" for "+e.compression+".";switch(i){case Pm:a.getter=G,a.inputSize=4;break;case Bm:a.getter=V,a.inputSize=4}}a.blockCount=(e.dataWindow.yMax+1)/a.scanlineBlockSize;for(var s=0;s<a.blockCount;s++)H(t,r);a.outputChannels=3==a.channels?4:a.channels;const o=a.width*a.height*a.outputChannels;switch(i){case Pm:a.byteArray=new Float32Array(o),a.channels<a.outputChannels&&a.byteArray.fill(1,0,o);break;case Bm:a.byteArray=new Uint16Array(o),a.channels<a.outputChannels&&a.byteArray.fill(15360,0,o);break;default:console.error("THREE.EXRLoader: unsupported type: ",i)}return a.bytesPerLine=a.width*a.inputSize*a.channels,4==a.outputChannels?a.format=zm:a.format=Vm,rL?a.colorSpace="srgb-linear":a.encoding=3e3,a}(Q,Y,K,q,this.type),$={value:0},ee={R:0,G:1,B:2,A:3,Y:0};for(let te=0;te<Z.height/Z.scanlineBlockSize;te++){const e=O(Y,q);Z.size=O(Y,q),Z.lines=e+Z.scanlineBlockSize>Z.height?Z.height-e:Z.scanlineBlockSize;const t=Z.size<Z.lines*Z.bytesPerLine?Z.uncompress(Z):I(Z);q.value+=Z.size;for(let n=0;n<Z.scanlineBlockSize;n++){const e=n+te*Z.scanlineBlockSize;if(e>=Z.height)break;for(let r=0;r<Z.channels;r++){const i=ee[Q.channels[r].name];for(let a=0;a<Z.width;a++){$.value=(n*(Z.channels*Z.width)+r*Z.width+a)*Z.inputSize;const s=(Z.height-1-e)*(Z.width*Z.outputChannels)+a*Z.outputChannels+i;Z.byteArray[s]=Z.getter(t,$)}}}}return{header:Q,width:Z.width,height:Z.height,data:Z.byteArray,format:Z.format,[rL?"colorSpace":"encoding"]:Z[rL?"colorSpace":"encoding"],type:this.t
vendor: 6,148 bytes, line 26
26ype}}setDataType(e){return this.type=e,this}load(e,t,n,r){return super.load(e,function(e,n){rL?e.colorSpace=n.colorSpace:e.encoding=n.encoding,e.minFilter=xm,e.magFilter=xm,e.generateMipmaps=!1,e.flipY=!1,t&&t(e,n)},n,r)}}const aL=new WeakMap;class sL extends _M{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,r){const i=new SM(this.manager);i.setPath(this.path),i.setResponseType("arraybuffer"),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,e=>{const n={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(e,n).then(t).catch(r)},n,r)}decodeDracoFile(e,t,n,r){const i={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!n};this.decodeGeometry(e,i).then(t)}decodeGeometry(e,t){for(const o in t.attributeTypes){const e=t.attributeTypes[o];void 0!==e.BYTES_PER_ELEMENT&&(t.attributeTypes[o]=e.name)}const n=JSON.stringify(t);if(aL.has(e)){const t=aL.get(e);if(t.key===n)return t.promise;if(0===e.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r;const i=this.workerNextTaskID++,a=e.byteLength,s=this._getWorker(i,a).then(n=>(r=n,new Promise((n,a)=>{r._callbacks[i]={resolve:n,reject:a},r.postMessage({type:"decode",id:i,taskConfig:t,buffer:e},[e])}))).then(e=>this._createGeometry(e.geometry));return s.catch(()=>!0).then(()=>{r&&i&&this._releaseTask(r,i)}),aL.set(e,{key:n,promise:s}),s}_createGeometry(e){const t=new z_;e.index&&t.setIndex(new R_(e.index.array,1));for(let n=0;n<e.attributes.length;n++){const r=e.attributes[n],i=r.name,a=r.array,s=r.itemSize;t.setAttribute(i,new R_(a,s))}return t}_loadLibrary(e,t){const n=new SM(this.manager);return n.setPath(this.decoderPath),n.setResponseType(t),n.setWithCredentials(this.withCredentials),new Promise((t,r)=>{n.load(e,t,void 0,r)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,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(t=>{const n=t[0];e||(this.decoderConfig.wasmBinary=t[1]);const r=oL.toString(),i=["/* draco decoder */",n,"","/* worker */",r.substring(r.indexOf("{")+1,r.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([i]))}),this.decoderPending}_getWorker(e,t){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const e=new Worker(this.workerSourceURL);e._callbacks={},e._taskCosts={},e._taskLoad=0,e.postMessage({type:"init",decoderConfig:this.decoderConfig}),e.onmessage=function(t){const n=t.data;switch(n.type){case"decode":e._callbacks[n.id].resolve(n);break;case"error":e._callbacks[n.id].reject(n);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+n.type+'"')}},this.workerPool.push(e)}else this.workerPool.sort(function(e,t){return e._taskLoad>t._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 oL(){let e,t;function n(e,t,n,r,i,a){const s=a.num_components(),o=n.num_points()*s,l=o*i.BYTES_PER_ELEMENT,c=function(e,t){switch(t){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32}}(e,i),u=e._malloc(l);t.GetAttributeDataArrayForAllPoints(n,a,c,l,u);const d=new i(e.HEAPF32.buffer,u,o).slice();return e._free(u),{name:r,array:d,itemSize:s}}onmessage=function(r){const i=r.data;switch(i.type){case"init":e=i.decoderConfig,t=new Promise(function(t){e.onModuleLoaded=function(e){t({draco:e})},DracoDecoderModule(e)});break;case"decode":const r=i.buffer,a=i.taskConfig;t.then(e=>{const t=e.draco,s=new t.Decoder,o=new t.DecoderBuffer;o.Init(new Int8Array(r),r.byteLength);try{const e=function(e,t,r,i){const a=i.attributeIDs,s=i.attributeTypes;let o,l;const c=t.GetEncodedGeometryType(r);if(c===e.TRIANGULAR_MESH)o=new e.Mesh,l=t.DecodeBufferToMesh(r,o);else{if(c!==e.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");o=new e.PointCloud,l=t.DecodeBufferToPointCloud(r,o)}if(!l.ok()||0===o.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+l.error_msg());const u={index:null,attributes:[]};for(const d in a){const r=self[s[d]];let l,c;if(i.useUniqueIDs)c=a[d],l=t.GetAttributeByUniqueId(o,c);else{if(c=t.GetAttributeId(o,e[a[d]]),-1===c)continue;l=t.GetAttribute(o,c)}u.attributes.push(n(e,t,o,d,r,l))}return c===e.TRIANGULAR_MESH&&(u.index=function(e,t,n){const r=3*n.num_faces(),i=4*r,a=e._malloc(i);t.GetTrianglesUInt32Array(n,i,a);const s=new Uint32Array(e.HEAPF32.buffer,a,r).slice();return e._free(a),{array:s,itemSize:1}}(e,t,o)),e.destroy(o),u}(t,s,o,a),r=e.attributes.map(e=>e.array.buffer);e.index&&r.push(e.index.array.buffer),self.postMessage({type:"decode",id:i.id,geometry:e},r)}catch(dv){console.error(dv),self.postMessage({type:"error",id:i.id,error:dv.message})}finally{t.destroy(o),t.destroy(s)}})}}}let lL;
26let cL=null,uL="https://www.gstatic.com/draco/versioned/decoders/1.5.5/";function dL(e=!0,t=!0,n){return r=>{n&&n(r),e&&(cL||(cL=new sL),cL.setDecoderPath("string"==typeof e?e:uL),r.setDRACOLoader(cL)),t&&r.setMeshoptDecoder((()=>{if(lL)return lL;const e=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]),t=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("object"!=typeof WebAssembly)return{supported:!1};let n,r="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXG
26XAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/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";WebAssembly.validate(e)&&(r="B9h9z9tFBBBFiI9gBB9gLaaaaaFa9gEaaaB9gFaFaEMcBBFBFFGGGEILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBOn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBNI9z9iqlBVc+N9IcIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMk8lLbaE97F9+FaL978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMC
26FWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAeDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAeDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMGXAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBReCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBH8ZCFD9tA8ZAPD9OD9hD9RH8ZDQBTFtGmEYIPLdKeOnHpAIAQJDBIBHyCFD9tAyAPD9OD9hD9RHyAIASJDBIBH8cCFD9tA8cAPD9OD9hD9RH8cDQBTFtGmEYIPLdKeOnH8dDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAeD9uHeDyBjGBAEAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeApA8dDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNiV8ZcpMyS8cQ8df8eb8fHdAyA8cDQNiV8ZcpMyS8cQ8df8eb8fH8ZDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9
26LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+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");const i=WebAssembly.instantiate(function(e){const n=new Uint8Array(e.length);for(let t=0;t<e.length;++t){const r=e.charCodeAt(t);n[t]=r>96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}let r=0;for(let i=0;i<e.length;++i)n[r++]=n[i]<60?t[n[i]]:64*(n[i]-60)+n[++i];return n.buffer.slice(0,r)}(r),{}).then(e=>{n=e.instance,n.exports.__wasm_call_ctors()});function a(e,t,r,i,a,s){const o=n.exports.sbrk,l=r+3&-4,c=o(l*i),u=o(a.length),d=new Uint8Array(n.exports.memory.buffer);d.set(a,u);const h=e(c,r,i,u,a.length);if(0===h&&s&&s(c,l,i),t.set(d.subarray(c,c+r*i)),o(c-o(0)),0!==h)throw new Error(`Malformed buffer data: ${h}`)}const s={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},o={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return lL={ready:i,supported:!0,decodeVertexBuffer(e,t,r,i,o){a(n.exports.meshopt_decodeVertexBuffer,e,t,r,i,n.exports[s[o]])}
26,decodeIndexBuffer(e,t,r,i){a(n.exports.meshopt_decodeIndexBuffer,e,t,r,i)},decodeIndexSequence(e,t,r,i){a(n.exports.meshopt_decodeIndexSequence,e,t,r,i)},decodeGltfBuffer(e,t,r,i,l,c){a(n.exports[o[l]],e,t,r,i,n.exports[s[c]])}},lL})())}}const hL=(e,t,n,r)=>lI(cB,e,dL(t,n,r));hL.preload=(e,t,n,r)=>lI.preload(cB,e,dL(t,n,r)),hL.clear=e=>lI.clear(cB,e),hL.setDecoderPath=e=>{uL=e};const fL=q.forwardRef(({makeDefault:e,camera:t,regress:n,domElement:r,enableDamping:i=!0,keyEvents:a=!1,onChange:s,onStart:o,onEnd:l,...c},u)=>{const d=iI(e=>e.invalidate),h=iI(e=>e.camera),f=iI(e=>e.gl),p=iI(e=>e.events),m=iI(e=>e.setEvents),g=iI(e=>e.set),v=iI(e=>e.get),y=iI(e=>e.performance),_=t||h,b=r||p.connected||f.domElement,x=q.useMemo(()=>new aB(_),[_]);return aI(()=>{x.enabled&&x.update()},-1),q.useEffect(()=>(a&&x.connect(!0===a?b:a),x.connect(b),()=>{x.dispose()}),[a,b,n,x,d]),q.useEffect(()=>{const e=e=>{d(),n&&y.regress(),s&&s(e)},t=e=>{o&&o(e)},r=e=>{l&&l(e)};return x.addEventListener("change",e),x.addEventListener("start",t),x.addEventListener("end",r),()=>{x.removeEventListener("start",t),x.removeEventListener("end",r),x.removeEventListener("change",e)}},[s,o,l,x,d,m]),q.useEffect(()=>{if(e){const e=v().controls;return g({controls:x}),()=>g({controls:e})}},[e,x]),q.createElement("primitive",dP({ref:u,object:x,enableDamping:i},c))}),pL=q.forwardRef(function({children:e,object:t,disable:n,disableX:r,disableY:i,disableZ:a,left:s,right:o,top:l,bottom:c,front:u,back:d,onCentered:h,precise:f=!0,cacheKey:p=0,...m},g){const v=q.useRef(null),y=q.useRef(null),_=q.useRef(null),[b]=q.useState(()=>new Qv),[x]=q.useState(()=>new Cv),[S]=q.useState(()=>new my);return q.useLayoutEffect(()=>{y.current.matrixWorld.identity(),b.setFromObject(null!=t?t:_.current,f);const e=b.max.x-b.min.x,p=b.max.y-b.min.y,m=b.max.z-b.min.z;b.getCenter(x),b.getBoundingSphere(S);const g=l?p/2:c?-p/2:0,A=s?-e/2:o?e/2:0,M=u?m/2:d?-m/2:0;y.current.position.set(n||r?0:-x.x+A,n||i?0:-x.y+g,n||a?0:-x.z+M),null==h||h({parent:v.current.parent,container:v.current,width:e,height:p,depth:m,boundingBox:b,boundingSphere:S,center:x,verticalAlignment:g,horizontalAlignment:A,depthAlignment:M})},[p,h,l,s,u,n,r,i,a,t,f,o,c,d,b,x,S]),q.useImperativeHandle(g,()=>v.current,[]),q.createElement("group",dP({ref:v},m),q.createElement("group",{ref:y},q.createElement("group",{ref:_},e)))}),mL=(e,t,n)=>{let r;switch(e){case wm:r=new Uint8ClampedArray(t*n*4);break;case Bm:r=new Uint16Array(t*n*4);break;case Im:r=new Uint32Array(t*n*4);break;case Em:r=new Int8Array(t*n*4);break;case Cm:r=new Int16Array(t*n*4);break;case Rm:r=new Int32Array(t*n*4);break;case Pm:r=new Float32Array(t*n*4);break;default:throw new Error("Unsupported data type")}return r};let gL;class vL{_renderer;_rendererIsDisposable=!1;_material;_scene;_camera;_quad;_renderTarget;_width;_height;_type;_colorSpace;_supportsReadPixels=!0;constructor(e){this._width=e.width,this._height=e.height,this._type=e.type,this._colorSpace
vendor: 8,637 bytes, line 26
26=e.colorSpace;const t={format:zm,depthBuffer:!1,stencilBuffer:!1,type:this._type,colorSpace:this._colorSpace,anisotropy:void 0!==e.renderTargetOptions?.anisotropy?e.renderTargetOptions?.anisotropy:1,generateMipmaps:void 0!==e.renderTargetOptions?.generateMipmaps&&e.renderTargetOptions?.generateMipmaps,magFilter:void 0!==e.renderTargetOptions?.magFilter?e.renderTargetOptions?.magFilter:xm,minFilter:void 0!==e.renderTargetOptions?.minFilter?e.renderTargetOptions?.minFilter:xm,samples:void 0!==e.renderTargetOptions?.samples?e.renderTargetOptions?.samples:void 0,wrapS:void 0!==e.renderTargetOptions?.wrapS?e.renderTargetOptions?.wrapS:gm,wrapT:void 0!==e.renderTargetOptions?.wrapT?e.renderTargetOptions?.wrapT:gm};if(this._material=e.material,e.renderer?this._renderer=e.renderer:(this._renderer=vL.instantiateRenderer(),this._rendererIsDisposable=!0),this._scene=new bb,this._camera=new OM,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(),!((e,t,n,r)=>{if(void 0!==gL)return gL;const i=new Yv(1,1,r);t.setRenderTarget(i);const a=new Z_(new RA,new b_({color:16777215}));t.render(a,n),t.setRenderTarget(null);const s=mL(e,i.width,i.height);return t.readRenderTargetPixels(i,0,0,i.width,i.height,s),i.dispose(),a.geometry.dispose(),a.material.dispose(),gL=0!==s[0],gL})(this._type,this._renderer,this._camera,t)){let e;this._type===Bm&&(e=this._renderer.extensions.has("EXT_color_buffer_float")?Pm:void 0),void 0!==e?(console.warn(`This browser does not support reading pixels from ${this._type} RenderTargets, switching to 1015`),this._type=e):(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 Z_(new RA,this._material),this._quad.geometry.computeBoundingBox(),this._scene.add(this._quad),this._renderTarget=new Yv(this.width,this.height,t),this._renderTarget.texture.mapping=void 0!==e.renderTargetOptions?.mapping?e.renderTargetOptions?.mapping:cm}static instantiateRenderer(){const e=new $T;return e.setSize(128,128),e}render=()=>{this._renderer.setRenderTarget(this._renderTarget);try{this._renderer.render(this._scene,this._camera)}catch(WL){throw this._renderer.setRenderTarget(null),WL}this._renderer.setRenderTarget(null)};toArray(){if(!this._supportsReadPixels)throw new Error("Can't read pixels in this browser");const e=mL(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 ex(this.toArray(),this.width,this.height,zm,this._type,e?.mapping||cm,e?.wrapS||gm,e?.wrapT||gm,e?.magFilter||xm,e?.minFilter||xm,e?.anisotropy||1,kg);return t.generateMipmaps=void 0!==e?.generateMipmaps&&e?.generateMipmaps,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 ab&&Object.values(this.material.uniforms).forEach(e=>{e.value instanceof jv&&e.value.dispose()}),Object.values(this.material).forEach(e=>{e instanceof jv&&e.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 yL extends Error{}class _L extends Error{}const bL=(e,t,n)=>{const r=new RegExp(`${t}="([^"]*)"`,"i").exec(e);if(r)return r[1];const i=new RegExp(`<${t}[^>]*>([\\s\\S]*?)</${t}>`,"i").exec(e);if(i){const e=i[1].match(/<rdf:li>([^<]*)<\/rdf:li>/g);return e&&3===e.length?e.map(e=>e.replace(/<\/?rdf:li>/g,"")):i[1].trim()}if(void 0!==n)return n;throw new Error(`Can't find ${t} in gainmap metadata`)};class xL{options;constructor(e){this.options={debug:!(!e||void 0===e.debug)&&e.debug,extractFII:!e||void 0===e.extractFII||e.extractFII,extractNonFII:!e||void 0===e.extractNonFII||e.extractNonFII}}extract(e){return new Promise((t,n)=>{const r=this.options.debug,i=new DataView(e.buffer);if(65496!==i.getUint16(0))return void n(new Error("Not a valid jpeg"));const a=i.byteLength;let s,o=2,l=0;for(;o<a;){if(++l>250)return void n(new Error(`Found no marker after ${l} loops 😵`));if(255!==i.getUint8(o))return void n(new Error(`Not a valid marker at offset 0x${o.toString(16)}, found: 0x${i.getUint8(o).toString(16)}`));if(s=i.getUint8(o+1),r&&console.log(`Marker: ${s.toString(16)}`),226===s){r&&console.log("Found APP2 marker (0xffe2)");const e=o+4;if(1297106432===i.getUint32(e)){const r=e+4;let a;if(18761===i.getUint16(r))a=!1;else{if(19789!==i.getUint16(r))return void n(new Error("No valid endianness marker found in TIFF header"));a=!0}if(42!==i.getUint16(r+2,!a))return void n(new Error("Not valid TIFF data! (no 0x002A marker)"));const s=i.getUint32(r+4,!a);if(s<8)return void n(new Error("Not valid TIFF data! (First offset less than 8)"));const o=r+s,l=i.getUint16(o,!a),c=o+2;let u=0;for(let e=c;e<c+12*l;e+=12)45057===i.getUint16(e,!a)&&(u=i.getUint32(e+8,!a));const d=o+2+12*l+4,h=[];for(let e=d;e<d+16*u;e+=16){const t={MPType:i.getUint32(e,!a),size:i.getUint32(e+4,!a),dataOffset:i.getUint32(e+8,!a),dependantImages:i.getUint32(e+12,!a),start:-1,end:-1,isFII:!1};t.dataOffset?(t.start=r+t.dataOffset,t.isFII=!1):(t.start=0,t.isFII=!0),t.end=t.start+t.size,h.push(t)}if(this.options.extractNonFII&&h.length){const e=new Blob([i]),n=[];for(const t of h){if(t.isFII&&!this.options.extractFII)continue;const r=e.slice(t.start,t.end+1,"image/jpeg");n.push(r)}t(n)}}}o+=2+i.getUint16(o+2)}})}}const SL=e=>new Promise((t,n)=>{const r=document.createElement("img");r.onload=()=>{t(r)},r.onerror=e=>{n(e)},r.src=URL.createObjectURL(e)});class AL extends _M{_renderer;_renderTargetOptions;_internalLoadingManager;_config;constructor(e,t){super(t),this._config=e,e.renderer&&(this._renderer=e.renderer),this._internalLoadingManager=new vM}setRenderer(e){return this._renderer=e,this}setRenderTargetOptions(e){return this._renderTargetOptions=e,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 e=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 jv,sdr:new jv});return this._config.createQuadRenderer({width:16,height:16,type:Bm,colorSpace:kg,material:e,renderer:this._renderer,renderTargetOptions:this._renderTargetOptions})}async processImages(e,t,n){const r=t?new Blob([t],{type:"image/jpeg"}):void 0,i=new Blob([e],{type:"image/jpeg"});let a,s,o=!1;if("undefined"==typeof createImageBitmap){const e=await Promise.all([r?SL(r):Promise.resolve(void 0),SL(i)]);s=e[0],a=e[1],o="flipY"===n}else{const e=await Promise.all([r?createImageBitmap(r,{imageOrientation:n||"flipY"}):Promise.resolve(void 0),createImageBitmap(i,{imageOrientation:n||"flipY"})]);s=e[0],a=e[1]}return{sdrImage:a,gainMapImage:s,needsFlip:o}}createTextures(e,t,n){const r=new jv(t||new ImageData(2,2),cm,gm,gm,xm,Mm,zm,wm,1,kg);r.flipY=n,r.needsUpdate=!0;const i=new jv(e,cm,gm,gm,xm,Mm,zm,wm,1,Og);return i.flipY=n,i.needsUpdate=!0,{gainMap:r,sdr:i}}updateQuadRenderer(e,t,n,r,i){e.width=t.width,e.height=t.height,e.material.gainMap=n,e.material.sdr=r,e.material.gainMapMin=i.gainMapMin,e.material.gainMapMax=i.gainMapMax,e.material.offsetHdr=i.offsetHdr,e.material.offsetSdr=i.offsetSdr,e.material.gamma=i.gamma,e.material.hdrCapacityMin=i.hdrCapacityMin,e.material.hdrCapacityMax=i.hdrCapacityMax,e.material.maxDisplayBoost=Math.pow(2,i.hdrCapacityMax),e.material.needsUpdate=!0}}class ML extends ab{_maxDisplayBoost;_hdrCapacityMin;_hdrCapacityMax;constructor({gamma:e,offsetHdr:t,offsetSdr:n,gainMapMin:r,gainMapMax:i,maxDisplayBoost:a,hdrCapacityMin:s,hdrCapacityMax:o,sdr:l,gainMap:c}){super({name:"GainMapDecoderMaterial",vertexShader:"\nvarying vec2 vUv;\n\nvoid main() {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0
26);\n}\n",fragmentShader:"\n// min half float value\n#define HALF_FLOAT_MIN vec3( -65504, -65504, -65504 )\n// max half float value\n#define HALF_FLOAT_MAX vec3( 65504, 65504, 65504 )\n\nuniform sampler2D sdr;\nuniform sampler2D gainMap;\nuniform vec3 gamma;\nuniform vec3 offsetHdr;\nuniform vec3 offsetSdr;\nuniform vec3 gainMapMin;\nuniform vec3 gainMapMax;\nuniform float weightFactor;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vec3 rgb = texture2D( sdr, vUv ).rgb;\n  vec3 recovery = texture2D( gainMap, vUv ).rgb;\n  vec3 logRecovery = pow( recovery, gamma );\n  vec3 logBoost = gainMapMin * ( 1.0 - logRecovery ) + gainMapMax * logRecovery;\n  vec3 hdrColor = (rgb + offsetSdr) * exp2( logBoost * weightFactor ) - offsetHdr;\n  vec3 clampedHdrColor = max( HALF_FLOAT_MIN, min( HALF_FLOAT_MAX, hdrColor ));\n  gl_FragColor = vec4( clampedHdrColor , 1.0 );\n}\n",uniforms:{sdr:{value:l},gainMap:{value:c},gamma:{value:new Cv(1/e[0],1/e[1],1/e[2])},offsetHdr:{value:(new Cv).fromArray(t)},offsetSdr:{value:(new Cv).fromArray(n)},gainMapMin:{value:(new Cv).fromArray(r)},gainMapMax:{value:(new Cv).fromArray(i)},weightFactor:{value:(Math.log2(a)-s)/(o-s)}},blending:0,depthTest:!1,depthWrite:!1}),this._maxDisplayBoost=a,this._hdrCapacityMin=s,this._hdrCapacityMax=o,this.needsUpdate=!0,this.uniformsNeedUpdate=!0}get sdr(){return this.uniforms.sdr.value}set sdr(e){this.uniforms.sdr.value=e}get gainMap(){return this.uniforms.gainMap.value}set gainMap(e){this.uniforms.gainMap.value=e}get offsetHdr(){return this.uniforms.offsetHdr.value.toArray()}set offsetHdr(e){this.uniforms.offsetHdr.value.fromArray(e)}get offsetSdr(){return this.uniforms.offsetSdr.value.toArray()}set offsetSdr(e){this.uniforms.offsetSdr.value.fromArray(e)}get gainMapMin(){return this.uniforms.gainMapMin.value.toArray()}set gainMapMin(e){this.uniforms.gainMapMin.value.fromArray(e)}get gainMapMax(){return this.uniforms.gainMapMax.value.toArray()}set gainMapMax(e){this.uniforms.gainMapMax.value.fromArray(e)}get gamma(){const e=this.uniforms.gamma.value;return[1/e.x,1/e.y,1/e.z]}set gamma(e){const t=this.uniforms.gamma.value;t.x=1/e[0],t.y=1/e[1],t.z=1/e[2]}get hdrCapacityMin(){return this._hdrCapacityMin}set hdrCapacityMin(e){this._hdrCapacityMin=e,this.calculateWeight()}get hdrCapacityMax(){return this._hdrCapacityMax}set hdrCapacityMax(e){this._hdrCapacityMax=e,this.calculateWeight()}get maxDisplayBoost(){return this._maxDisplayBoost}set maxDisplayBoost(e){this._maxDisplayBoost=Math.max(1,Math.min(65504,e)),this.calculateWeight()}calculateWeight(){const e=(Math.log2(this._maxDisplayBoost)-this._hdrCapacityMin)/(this._hdrCapacityMax-this._hdrCapacityMin);this.uniforms.weightFactor.value=Math.max(0,Math.min(1,e))}}class wL extends AL{constructor(e,t){super({renderer:e,createMaterial:e=>new ML(e),createQuadRenderer:e=>new vL(e)},t)}async render(e,t,n,r){const{sdrImage:i,gainMapImage:a,needsFlip:s}=await this.processImages(n,r,"flipY"),{gainMap:o,sdr:l}=this.createTextures(i,a,s);this.updateQuadRenderer(e,i,o,l,t),e.render()}}class EL extends wL{load([e,t,n],r,i,a){const s=this.prepareQuadRenderer();let o,l,c;const u=async()=>{if(o&&l&&c){try{await this.render(s,c,o,l)}catch(dv){return this.manager.itemError(e),this.manager.itemError(t),this.manager.itemError(n),"function"==typeof a&&a(dv),void s.disposeOnDemandRenderer()}"function"==typeof r&&r(s),this.manager.itemEnd(e),this.manager.itemEnd(t),this.manager.itemEnd(n),s.disposeOnDemandRenderer()}};let d=!0,h=0,f=0,p=!0,m=0,g=0,v=!0,y=0,_=0;const b=()=>{"function"==typeof i&&i(new ProgressEvent("progress",{lengthComputable:d&&p&&v,loaded:f+g+_,total:h+m+y}))};this.manager.itemStart(e),this.manager.itemStart(t),this.manager.itemStart(n);const x=new SM(this._internalLoadingManager);x.setResponseType("arraybuffer"),x.setRequestHeader(this.requestHeader),x.setPath(this.path),x.setWithCredentials(this.withCredentials),x.load(e,async e=>{if("string"==typeof e)throw new Error("Invalid sdr buffer");o=e,await u()},e=>{d=e.lengthComputable,f=e.loaded,h=e.total,b()},t=>{this.manager.itemError(e),"function"==typeof a&&a(t)});const S=new SM(this._internalLoadingManager);S.setResponseType("arraybuffer"),S.setRequestHeader(this.requestHeader),S.setPath(this.path),S.setWithCredentials(this.withCredentials),S.load(t,async e=>{if("string"==typeof e)throw new Error("Invalid gainmap buffer");l=e,await u()},e=>{p=e.lengthComputable,g=e.loaded,m=e.total,b()},e=>{this.manager.itemError(t),"function"==typeof a&&a(e)});const A=new SM(this._internalLoadingManager);
26return A.setRequestHeader(this.requestHeader),A.setPath(this.path),A.setWithCredentials(this.withCredentials),A.load(n,async e=>{if("string"!=typeof e)throw new Error("Invalid metadata string");c=JSON.parse(e),await u()},e=>{v=e.lengthComputable,_=e.loaded,y=e.total,b()},e=>{this.manager.itemError(n),"function"==typeof a&&a(e)}),s}}class CL extends wL{load(e,t,n,r){const i=this.prepareQuadRenderer(),a=new SM(this._internalLoadingManager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(this.withCredentials),this.manager.itemStart(e),a.load(e,async n=>{if("string"==typeof n)throw new Error("Invalid buffer, received [string], was expecting [ArrayBuffer]");const a=new Uint8Array(n);let s,o,l;try{const e=await(async e=>{const t=(e=>{let t;t="undefined"!=typeof TextDecoder?(new TextDecoder).decode(e):e.toString();let n=t.indexOf("<x:xmpmeta");for(;-1!==n;){const e=t.indexOf("x:xmpmeta>",n),r=t.slice(n,e+10);try{const e=bL(r,"hdrgm:GainMapMin","0"),t=bL(r,"hdrgm:GainMapMax"),n=bL(r,"hdrgm:Gamma","1"),i=bL(r,"hdrgm:OffsetSDR","0.015625"),a=bL(r,"hdrgm:OffsetHDR","0.015625"),s=/hdrgm:HDRCapacityMin="([^"]*)"/.exec(r),o=s?s[1]:"0",l=/hdrgm:HDRCapacityMax="([^"]*)"/.exec(r);if(!l)throw new Error("Incomplete gainmap metadata");const c=l[1];return{gainMapMin:Array.isArray(e)?e.map(e=>parseFloat(e)):[parseFloat(e),parseFloat(e),parseFloat(e)],gainMapMax:Array.isArray(t)?t.map(e=>parseFloat(e)):[parseFloat(t),parseFloat(t),parseFloat(t)],gamma:Array.isArray(n)?n.map(e=>parseFloat(e)):[parseFloat(n),parseFloat(n),parseFloat(n)],offsetSdr:Array.isArray(i)?i.map(e=>parseFloat(e)):[parseFloat(i),parseFloat(i),parseFloat(i)],offsetHdr:Array.isArray(a)?a.map(e=>parseFloat(e)):[parseFloat(a),parseFloat(a),parseFloat(a)],hdrCapacityMin:parseFloat(o),hdrCapacityMax:parseFloat(c)}}catch(WL){}n=t.indexOf("<x:xmpmeta",e)}})(e);if(!t)throw new _L("Gain map XMP metadata not found");const n=new xL({extractFII:!0,extractNonFII:!0}),r=await n.extract(e);if(2!==r.length)throw new yL("Gain map recovery image not found");return{sdr:new Uint8Array(await r[0].arrayBuffer()),gainMap:new Uint8Array(await r[1].arrayBuffer()),metadata:t}})(a);s=e.sdr,o=e.gainMap,l=e.metadata}catch(WL){if(!(WL instanceof _L||WL instanceof yL))throw WL;console.warn(`Failure to reconstruct an HDR image from ${e}: Gain map metadata not found in the file, HDRJPGLoader will render the SDR jpeg`),l={gainMapMin:[0,0,0],gainMapMax:[1,1,1],gamma:[1,1,1],hdrCapacityMin:0,hdrCapacityMax:1,offsetHdr:[0,0,0],offsetSdr:[0,0,0]},s=a}try{await this.render(i,l,s.buffer,o?.buffer)}catch(dv){return this.manager.itemError(e),"function"==typeof r&&r(dv),void i.disposeOnDemandRenderer()}"function"==typeof t&&t(i),this.manager.itemEnd(e),i.disposeOnDemandRenderer()},n,t=>{this.manager.itemError(e),"function"==typeof r&&r(t)}),i}}const TL={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"},RL="https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/",IL=e=>Array.isArray(e),PL=["/px.png","/nx.png","/py.png","/ny.png","/pz.png","/nz.png"];function BL({files:e=PL,path:t="",preset:n,colorSpace:r,extensions:i}={}){n&&(FL(n),e=TL[n],t=RL);const a=IL(e),{extension:s,isCubemap:o}=NL(e),l=UL(s);if(!l)throw new Error("useEnvironment: Unrecognized file extension: "+e);const c=iI(e=>e.gl);q.useLayoutEffect(()=>{"webp"!==s&&"jpg"!==s&&"jpeg"!==s||c.domElement.addEventListener("webglcontextlost",function(){lI.clear(l,a?[e]:e)},{once:!0})},[e,c.domElement]);const u=lI(l,a?[e]:e,e=>{"webp"!==s&&"jpg"!==s&&"jpeg"!==s||e.setRenderer(c),null==e.setPath||e.setPath(t),i&&i(e)});let d=a?u[0]:u;var h;return"jpg"!==s&&"jpeg"!==s&&"webp"!==s||(d=null==(h=d.renderTarget)?void 0:h.texture),d.mapping=o?um:hm,d.colorSpace=null!=r?r:o?"srgb":"srgb-linear",d}const LL={files:PL,path:"",preset:void 0,extensions:void 0};BL.preload=e=>{const t={...LL,...e};let{files:n,path:r=""}=t;
26const{preset:i,extensions:a}=t;i&&(FL(i),n=TL[i],r=RL);const{extension:s}=NL(n);if("webp"===s||"jpg"===s||"jpeg"===s)throw new Error("useEnvironment: Preloading gainmaps is not supported");const o=UL(s);if(!o)throw new Error("useEnvironment: Unrecognized file extension: "+n);lI.preload(o,IL(n)?[n]:n,e=>{null==e.setPath||e.setPath(r),a&&a(e)})};const DL={files:PL,preset:void 0};function FL(e){if(!(e in TL))throw new Error("Preset must be one of: "+Object.keys(TL).join(", "))}function NL(e){var t;const n=IL(e)&&6===e.length,r=IL(e)&&3===e.length&&e.some(e=>e.endsWith("json")),i=IL(e)?e[0]:e;return{extension:n?"cube":r?"webp":i.startsWith("data:application/exr")?"exr":i.startsWith("data:application/hdr")?"hdr":i.startsWith("data:image/jpeg")?"jpg":null==(t=i.split(".").pop())||null==(t=t.split("?"))||null==(t=t.shift())?void 0:t.toLowerCase(),isCubemap:n,isGainmap:r}}function UL(e){return"cube"===e?wM:"hdr"===e?nL:"exr"===e?iL:"jpg"===e||"jpeg"===e?CL:"webp"===e?EL:null}function OL(e,t,n,r,i={}){var a,s,o,l;i={backgroundBlurriness:0,backgroundIntensity:1,backgroundRotation:[0,0,0],environmentIntensity:1,environmentRotation:[0,0,0],...i};const c=(e=>{return(t=e).current&&t.current.isScene?e.current:e;var t})(t||n),u=c.background,d=c.environment,h={backgroundBlurriness:c.backgroundBlurriness,backgroundIntensity:c.backgroundIntensity,backgroundRotation:null!==(a=null==(s=c.backgroundRotation)||null==s.clone?void 0:s.clone())&&void 0!==a?a:[0,0,0],environmentIntensity:c.environmentIntensity,environmentRotation:null!==(o=null==(l=c.environmentRotation)||null==l.clone?void 0:l.clone())&&void 0!==o?o:[0,0,0]};return"only"!==e&&(c.environment=r),e&&(c.background=r),KR(c,i),()=>{"only"!==e&&(c.environment=d),e&&(c.background=u),KR(c,h)}}function kL({scene:e,background:t=!1,map:n,...r}){const i=iI(e=>e.scene);return q.useLayoutEffect(()=>{if(n)return OL(t,e,i,n,r)}),null}function zL({background:e=!1,scene:t,blur:n,backgroundBlurriness:r,backgroundIntensity:i,backgroundRotation:a,environmentIntensity:s,environmentRotation:o,...l}){const c=BL(l),u=iI(e=>e.scene);return q.useLayoutEffect(()=>OL(e,t,u,c,{backgroundBlurriness:null!=n?n:r,backgroundIntensity:i,backgroundRotation:a,environmentIntensity:s,environmentRotation:o})),q.useEffect(()=>()=>{c.dispose()},[c]),null}function HL({children:e,near:t=.1,far:n=1e3,resolution:r=256,frames:i=1,map:a,background:s=!1,blur:o,backgroundBlurriness:c,backgroundIntensity:u,backgroundRotation:d,environmentIntensity:h,environmentRotation:f,scene:p,files:m,path:g,preset:v,extensions:y}){const _=iI(e=>e.gl),b=iI(e=>e.scene),x=q.useRef(null),[S]=q.useState(()=>new bb),A=q.useMemo(()=>{const e=new pb(r);return e.texture.type=Bm,e},[r]);q.useEffect(()=>()=>{A.dispose()},[A]),q.useLayoutEffect(()=>{if(1===i){const e=_.autoClear;_.autoClear=!0,x.current.update(_,S),_.autoClear=e}return OL(s,p,b,A.texture,{backgroundBlurriness:null!=o?o:c,backgroundIntensity:u,backgroundRotation:d,environmentIntensity:h,environmentRotation:f})},[e,S,A.texture,p,b,s,i,_]);let M=1;return aI(()=>{if(i===1/0||M<i){const e=_.autoClear;_.autoClear=!0,x.current.update(_,S),_.autoClear=e,M++}}),q.createElement(q.Fragment,null,function(e,t){return l.jsx(kI,{children:e,container:t,state:void 0})}(q.createElement(q.Fragment,null,e,q.createElement("cubeCamera",{ref:x,args:[t,n,A]}),m||v?q.createElement(zL,{background:!0,files:m,preset:v,path:g,extensions:y}):a?q.createElement(kL,{background:!0,map:a,extensions:y}):null),S))}function GL(e){var t,n,r,i;const a=BL(e),s=e.map||a;q.useMemo(()=>xI({GroundProjectedEnvImpl:qP}),[]),q.useEffect(()=>()=>{a.dispose()},[a]);const o=q.useMemo(()=>[s],[s]),l=null==(t=e.ground)?void 0:t.height,c=null==(n=e.ground)?void 0:n.radius,u=null!==(r=null==(i=e.ground)?void 0:i.scale)&&void 0!==r?r:1e3;return q.createElement(q.Fragment,null,q.createElement(kL,dP({},e,{map:s})),q.createElement("groundProjectedEnvImpl",{args:o,scale:u,height:l,radius:c}))}function VL(e){return e.ground?q.createElement(GL,e):e.map?q.createElement(kL,e):e.children?q.createElement(HL,e):q.createElement(zL,e)}BL.clear=e=>{const t={...DL,...e};let{files:n}=t;
26const{preset:r}=t;r&&(FL(r),n=TL[r]);const{extension:i}=NL(n),a=UL(i);if(!a)throw new Error("useEnvironment: Unrecognized file extension: "+n);lI.clear(a,IL(n)?[n]:n)};export{uP as C,VL as E,xP as H,yp as M,fL as O,Q as R,gp as _,oe as a,n as b,rp as c,e as d,pL as e,iI as f,t as g,l as j,q as r,pp as s,hL 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.