vendor: 6,124 bytes, lines 1-9
1var ng=t=>{throw TypeError(t)};var vf=(t,e,n)=>e.has(t)||ng("Cannot "+n);var ve=(t,e,n)=>(vf(t,e,"read from private field"),n?n.call(t):e.get(t)),ut=(t,e,n)=>e.has(t)?ng("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Ke=(t,e,n,i)=>(vf(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),$t=(t,e,n)=>(vf(t,e,"access private method"),n);var Gl=(t,e,n,i)=>({set _(r){Ke(t,e,r,n)},get _(){return ve(t,e,i)}});function jw(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(i,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();function iy(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ry={exports:{}},ku={},sy={exports:{}},tt={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var Nl=Symbol.for("react.element"),Yw=Symbol.for("react.portal"),qw=Symbol.for("react.fragment"),$w=Symbol.for("react.strict_mode"),Zw=Symbol.for("react.profiler"),Kw=Symbol.for("react.provider"),Qw=Symbol.for("react.context"),Jw=Symbol.for("react.forward_ref"),eE=Symbol.for("react.suspense"),tE=Symbol.for("react.memo"),nE=Symbol.for("react.lazy"),ig=Symbol.iterator;function iE(t){return t===null||typeof t!="object"?null:(t=ig&&t[ig]||t["@@iterator"],typeof t=="function"?t:null)}var oy={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ay=Object.assign,ly={};function ia(t,e,n){this.props=t,this.context=e,this.refs=ly,this.updater=n||oy}ia.prototype.isReactComponent={};ia.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};ia.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function cy(){}cy.prototype=ia.prototype;function Ap(t,e,n){this.props=t,this.context=e,this.refs=ly,this.updater=n||oy}var Cp=Ap.prototype=new cy;Cp.constructor=Ap;ay(Cp,ia.prototype);Cp.isPureReactComponent=!0;var rg=Array.isArray,uy=Object.prototype.hasOwnProperty,Rp={current:null},fy={key:!0,ref:!0,__self:!0,__source:!0};function dy(t,e,n){var i,r={},s=null,o=null;if(e!=null)for(i in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)uy.call(e,i)&&!fy.hasOwnProperty(i)&&(r[i]=e[i]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];r.children=l}if(t&&t.defaultProps)for(i in a=t.defaultProps,a)r[i]===void 0&&(r[i]=a[i]);return{$$typeof:Nl,type:t,key:s,ref:o,props:r,_owner:Rp.current}}function rE(t,e){return{$$typeof:Nl,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Pp(t){return typeof t=="object"&&t!==null&&t.$$typeof===Nl}function sE(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var sg=/\/+/g;function yf(t,e){return typeof t=="object"&&t!==null&&t.key!=null?sE(""+t.key):e.toString(36)}function Fc(t,e,n,i,r){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Nl:case Yw:o=!0}}if(o)return o=t,r=r(o),t=i===""?"."+yf(o,0):i,rg(r)?(n="",t!=null&&(n=t.replace(sg,"$&/")+"/"),Fc(r,e,n,"",function(c){return c})):r!=null&&(Pp(r)&&(r=rE(r,n+(!r.key||o&&o.key===r.key?"":(""+r.key).replace(sg,"$&/")+"/")+t)),e.push(r)),1;if(o=0,i=i===""?".":i+":",rg(t))for(var a=0;a<t.length;a++){s=t[a];var l=i+yf(s,a);o+=Fc(s,e,n,l,r)}else if(l=iE(t),typeof l=="function")for(t=l.call(t),a=0;!(s=t.next()).done;)s=s.value,l=i+yf(s,a++),o+=Fc(s,e,n,l,r);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function Wl(t,e,n){if(t==null)return t;var i=[],r=0;return Fc(t,i,"","",function(s){return e.call(n,s,r++)}),i}function oE(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var fn={current:null},kc={transition:null},aE={ReactCurrentDispatcher:fn,ReactCurrentBatchConfig:kc,ReactCurrentOwner:Rp};function hy(){throw Error("act(...) is not supported in production builds of React.")}tt.Children={map:Wl,forEach:function(t,e,n){Wl(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Wl(t,function(){e++}),e},toArray:function(t){return Wl(t,function(e){return e})||[]},only:function(t){if(!Pp(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};tt.Component=ia;tt.Fragment=qw;tt.Profiler=Zw;tt.PureComponent=Ap;tt.StrictMode=$w;tt.Suspense=eE;
vendor: 9,081 bytes, lines 9-33
9tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=aE;tt.act=hy;tt.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var i=ay({},t.props),r=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=Rp.current),e.key!==void 0&&(r=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)uy.call(e,l)&&!fy.hasOwnProperty(l)&&(i[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];i.children=a}return{$$typeof:Nl,type:t.type,key:r,ref:s,props:i,_owner:o}};tt.createContext=function(t){return t={$$typeof:Qw,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:Kw,_context:t},t.Consumer=t};tt.createElement=dy;tt.createFactory=function(t){var e=dy.bind(null,t);return e.type=t,e};tt.createRef=function(){return{current:null}};tt.forwardRef=function(t){return{$$typeof:Jw,render:t}};tt.isValidElement=Pp;tt.lazy=function(t){return{$$typeof:nE,_payload:{_status:-1,_result:t},_init:oE}};tt.memo=function(t,e){return{$$typeof:tE,type:t,compare:e===void 0?null:e}};tt.startTransition=function(t){var e=kc.transition;kc.transition={};try{t()}finally{kc.transition=e}};tt.unstable_act=hy;tt.useCallback=function(t,e){return fn.current.useCallback(t,e)};tt.useContext=function(t){return fn.current.useContext(t)};tt.useDebugValue=function(){};tt.useDeferredValue=function(t){return fn.current.useDeferredValue(t)};tt.useEffect=function(t,e){return fn.current.useEffect(t,e)};tt.useId=function(){return fn.current.useId()};tt.useImperativeHandle=function(t,e,n){return fn.current.useImperativeHandle(t,e,n)};tt.useInsertionEffect=function(t,e){return fn.current.useInsertionEffect(t,e)};tt.useLayoutEffect=function(t,e){return fn.current.useLayoutEffect(t,e)};tt.useMemo=function(t,e){return fn.current.useMemo(t,e)};tt.useReducer=function(t,e,n){return fn.current.useReducer(t,e,n)};tt.useRef=function(t){return fn.current.useRef(t)};tt.useState=function(t){return fn.current.useState(t)};tt.useSyncExternalStore=function(t,e,n){return fn.current.useSyncExternalStore(t,e,n)};tt.useTransition=function(){return fn.current.useTransition()};tt.version="18.3.1";sy.exports=tt;var B=sy.exports;const ji=iy(B),lE=jw({__proto__:null,default:ji},[B]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var cE=B,uE=Symbol.for("react.element"),fE=Symbol.for("react.fragment"),dE=Object.prototype.hasOwnProperty,hE=cE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,pE={key:!0,ref:!0,__self:!0,__source:!0};function py(t,e,n){var i,r={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(i in e)dE.call(e,i)&&!pE.hasOwnProperty(i)&&(r[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps,e)r[i]===void 0&&(r[i]=e[i]);return{$$typeof:uE,type:t,key:s,ref:o,props:r,_owner:hE.current}}ku.Fragment=fE;ku.jsx=py;ku.jsxs=py;ry.exports=ku;var te=ry.exports,my={exports:{}},In={},gy={exports:{}},vy={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(t){function e(N,K){var se=N.length;N.push(K);e:for(;0<se;){var me=se-1>>>1,Ae=N[me];if(0<r(Ae,K))N[me]=K,N[se]=Ae,se=me;else break e}}function n(N){return N.length===0?null:N[0]}function i(N){if(N.length===0)return null;var K=N[0],se=N.pop();if(se!==K){N[0]=se;e:for(var me=0,Ae=N.length,He=Ae>>>1;me<He;){var k=2*(me+1)-1,O=N[k],D=k+1,C=N[D];if(0>r(O,se))D<Ae&&0>r(C,O)?(N[me]=C,N[D]=se,me=D):(N[me]=O,N[k]=se,me=k);else if(D<Ae&&0>r(C,se))N[me]=C,N[D]=se,me=D;else break e}}return K}function r(N,K){var se=N.sortIndex-K.sortIndex;return se!==0?se:N.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,f=null,h=3,p=!1,v=!1,y=!1,m=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(N){for(var K=n(c);K!==null;){if(K.callback===null)i(c);else if(K.startTime<=N)i(c),K.sortIndex=K.expirationTime,e(l,K);else break;K=n(c)}}function x(N){if(y=!1,g(N),!v)if(n(l)!==null)v=!0,j(b);else{var K=n(c);K!==null&&W(x,K.startTime-N)}}function b(N,K){v=!1,y&&(y=!1,d(R),R=-1),p=!0;var se=h;try{for(g(K),f=n(l);f!==null&&(!(f.expirationTime>K)||N&&!U());){var me=f.callback;if(typeof me=="function"){f.callback=null,h=f.priorityLevel;var Ae=me(f.expirationTime<=K);K=t.unstable_now(),typeof Ae=="function"?f.callback=Ae:f===n(l)&&i(l),g(K)}else i(l);f=n(l)}if(f!==null)var He=!0;else{var k=n(c);k!==null&&W(x,k.startTime-K),He=!1}return He}finally{f=null,h=se,p=!1}}var A=!1,M=null,R=-1,T=5,S=-1;function U(){return!(t.unstable_now()-S<T)}function z(){if(M!==null){var N=t.unstable_now();S=N;var K=!0;try{K=M(!0,N)}finally{K?V():(A=!1,M=null)}}else A=!1}var V;if(typeof _=="function")V=function(){_(z)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,Q=H.port2;H.port1.onmessage=z,V=function(){Q.postMessage(null)}}else V=function(){m(z,0)};function j(N){M=N,A||(A=!0,V())}function W(N,K){R=m(function(){N(t.unstable_now())},K)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(N){N.callback=null},t.unstable_continueExecution=function(){v||p||(v=!0,j(b))},t.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<N?Math.floor(1e3/N):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(N){switch(h){case 1:case 2:case 3:var K=3;break;default:K=h}var se=h;h=K;try{return N()}finally{h=se}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(N,K){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var se=h;h=N;try{return K()}finally{h=se}},t.unstable_scheduleCallback=function(N,K,se){var me=t.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?me+se:me):se=me,N){case 1:var Ae=-1;break;case 2:Ae=250;break;case 5:Ae=1073741823;break;case 4:Ae=1e4;break;default:Ae=5e3}return Ae=se+Ae,N={id:u++,callback:K,priorityLevel:N,startTime:se,expirationTime:Ae,sortIndex:-1},se>me?(N.sortIndex=se,e(c,N),n(l)===null&&N===n(c)&&(y?(d(R),R=-1):y=!0,W(x,se-me))):(N.sortIndex=Ae,e(l,N),v||p||(v=!0,j(b))),N},t.unstable_shouldYield=U,t.unstable_wrapCallback=function(N){var K=h;return function(){var se=h;h=K;try{return N.apply(this,arguments)}finally{h=se}}}})(vy);gy.exports=vy;var mE=gy.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var gE=B,Dn=mE;function we(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var yy=new Set,nl={};function ks(t,e){Bo(t,e),Bo(t+"Capture",e)}function Bo(t,e){for(nl[t]=e,t=0;t<e.length;t++)yy.add(e[t])}var tr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Id=Object.prototype.hasOwnProperty,vE=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,og={},ag={};function yE(t){return Id.call(ag,t)?!0:Id.call(og,t)?!1:vE.test(t)?ag[t]=!0:(og[t]=!0,!1)}function xE(t,e,n,i){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function _E(t,e,n,i){if(e===null||typeof e>"u"||xE(t,e,n,i))return!0;
vendor: 5,200 bytes, lines 33-34
33if(i)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function dn(t,e,n,i,r,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Yt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Yt[t]=new dn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Yt[e]=new dn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Yt[t]=new dn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Yt[t]=new dn(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Yt[t]=new dn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Yt[t]=new dn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Yt[t]=new dn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Yt[t]=new dn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Yt[t]=new dn(t,5,!1,t.toLowerCase(),null,!1,!1)});var Lp=/[\-:]([a-z])/g;function Np(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Lp,Np);Yt[e]=new dn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Lp,Np);Yt[e]=new dn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Lp,Np);Yt[e]=new dn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Yt[t]=new dn(t,1,!1,t.toLowerCase(),null,!1,!1)});Yt.xlinkHref=new dn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Yt[t]=new dn(t,1,!1,t.toLowerCase(),null,!0,!0)});function Dp(t,e,n,i){var r=Yt.hasOwnProperty(e)?Yt[e]:null;(r!==null?r.type!==0:i||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(_E(e,n,r,i)&&(n=null),i||r===null?yE(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):r.mustUseProperty?t[r.propertyName]=n===null?r.type===3?!1:"":n:(e=r.attributeName,i=r.attributeNamespace,n===null?t.removeAttribute(e):(r=r.type,n=r===3||r===4&&n===!0?"":""+n,i?t.setAttributeNS(i,e,n):t.setAttribute(e,n))))}var ar=gE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Xl=Symbol.for("react.element"),ro=Symbol.for("react.portal"),so=Symbol.for("react.fragment"),Ip=Symbol.for("react.strict_mode"),Ud=Symbol.for("react.profiler"),xy=Symbol.for("react.provider"),_y=Symbol.for("react.context"),Up=Symbol.for("react.forward_ref"),Od=Symbol.for("react.suspense"),Fd=Symbol.for("react.suspense_list"),Op=Symbol.for("react.memo"),_r=Symbol.for("react.lazy"),Sy=Symbol.for("react.offscreen"),lg=Symbol.iterator;function ga(t){return t===null||typeof t!="object"?null:(t=lg&&t[lg]||t["@@iterator"],typeof t=="function"?t:null)}var Tt=Object.assign,xf;function Ia(t){if(xf===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);xf=e&&e[1]||""}return` 34`+xf+t}var _f=!1;function Sf(t,e){if(!t||_f)return"";_f=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var i=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){i=c}t.call(e.prototype)}else{try{throw Error()}catch(c){i=c}t()}}
vendor: 18,193 bytes, lines 34-37
34catch(c){if(c&&i&&typeof c.stack=="string"){for(var r=c.stack.split(` 35`),s=i.stack.split(` 36`),o=r.length-1,a=s.length-1;1<=o&&0<=a&&r[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(r[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||r[o]!==s[a]){var l=` 37`+r[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{_f=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Ia(t):""}function SE(t){switch(t.tag){case 5:return Ia(t.type);case 16:return Ia("Lazy");case 13:return Ia("Suspense");case 19:return Ia("SuspenseList");case 0:case 2:case 15:return t=Sf(t.type,!1),t;case 11:return t=Sf(t.type.render,!1),t;case 1:return t=Sf(t.type,!0),t;default:return""}}function kd(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case so:return"Fragment";case ro:return"Portal";case Ud:return"Profiler";case Ip:return"StrictMode";case Od:return"Suspense";case Fd:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case _y:return(t.displayName||"Context")+".Consumer";case xy:return(t._context.displayName||"Context")+".Provider";case Up:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Op:return e=t.displayName||null,e!==null?e:kd(t.type)||"Memo";case _r:e=t._payload,t=t._init;try{return kd(t(e))}catch{}}return null}function wE(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return kd(e);case 8:return e===Ip?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Gr(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function wy(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function EE(t){var e=wy(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),i=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return r.call(this)},set:function(o){i=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function jl(t){t._valueTracker||(t._valueTracker=EE(t))}function Ey(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),i="";return t&&(i=wy(t)?t.checked?"true":"false":t.value),t=i,t!==n?(e.setValue(t),!0):!1}function su(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function zd(t,e){var n=e.checked;return Tt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function cg(t,e){var n=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;n=Gr(e.value!=null?e.value:n),t._wrapperState={initialChecked:i,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function My(t,e){e=e.checked,e!=null&&Dp(t,"checked",e,!1)}function Bd(t,e){My(t,e);var n=Gr(e.value),i=e.type;if(n!=null)i==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(i==="submit"||i==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Hd(t,e.type,n):e.hasOwnProperty("defaultValue")&&Hd(t,e.type,Gr(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function ug(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function Hd(t,e,n){(e!=="number"||su(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Ua=Array.isArray;function xo(t,e,n,i){if(t=t.options,e){e={};for(var r=0;r<n.length;r++)e["$"+n[r]]=!0;for(n=0;n<t.length;n++)r=e.hasOwnProperty("$"+t[n].value),t[n].selected!==r&&(t[n].selected=r),r&&i&&(t[n].defaultSelected=!0)}else{for(n=""+Gr(n),e=null,r=0;r<t.length;r++){if(t[r].value===n){t[r].selected=!0,i&&(t[r].defaultSelected=!0);return}e!==null||t[r].disabled||(e=t[r])}e!==null&&(e.selected=!0)}}function Vd(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(we(91));return Tt({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function fg(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(we(92));if(Ua(n)){if(1<n.length)throw Error(we(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Gr(n)}}function Ty(t,e){var n=Gr(e.value),i=Gr(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),i!=null&&(t.defaultValue=""+i)}function dg(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function by(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Gd(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?by(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Yl,Ay=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,i,r){MSApp.execUnsafeLocalFunction(function(){return t(e,n,i,r)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Yl=Yl||document.createElement("div"),Yl.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Yl.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function il(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Ga={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ME=["Webkit","ms","Moz","O"];Object.keys(Ga).forEach(function(t){ME.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Ga[e]=Ga[t]})});function Cy(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Ga.hasOwnProperty(t)&&Ga[t]?(""+e).trim():e+"px"}function Ry(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var i=n.indexOf("--")===0,r=Cy(n,e[n],i);n==="float"&&(n="cssFloat"),i?t.setProperty(n,r):t[n]=r}}var TE=Tt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Wd(t,e){if(e){if(TE[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(we(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(we(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(we(61))}if(e.style!=null&&typeof e.style!="object")throw Error(we(62))}}function Xd(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 jd=null;function Fp(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Yd=null,_o=null,So=null;function hg(t){if(t=Ul(t)){if(typeof Yd!="function")throw Error(we(280));var e=t.stateNode;e&&(e=Gu(e),Yd(t.stateNode,t.type,e))}}function Py(t){_o?So?So.push(t):So=[t]:_o=t}function Ly(){if(_o){var t=_o,e=So;if(So=_o=null,hg(t),e)for(t=0;t<e.length;t++)hg(e[t])}}function Ny(t,e){return t(e)}function Dy(){}var wf=!1;function Iy(t,e,n){if(wf)return t(e,n);wf=!0;try{return Ny(t,e,n)}finally{wf=!1,(_o!==null||So!==null)&&(Dy(),Ly())}}function rl(t,e){var n=t.stateNode;if(n===null)return null;var i=Gu(n);if(i===null)return null;n=i[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(t=t.type,i=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!i;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(we(231,e,typeof n));return n}var qd=!1;if(tr)try{var va={};Object.defineProperty(va,"passive",{get:function(){qd=!0}}),window.addEventListener("test",va,va),window.removeEventListener("test",va,va)}catch{qd=!1}function bE(t,e,n,i,r,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(u){this.onError(u)}}var Wa=!1,ou=null,au=!1,$d=null,AE={onError:function(t){Wa=!0,ou=t}};function CE(t,e,n,i,r,s,o,a,l){Wa=!1,ou=null,bE.apply(AE,arguments)}function RE(t,e,n,i,r,s,o,a,l){if(CE.apply(this,arguments),Wa){if(Wa){var c=ou;Wa=!1,ou=null}else throw Error(we(198));au||(au=!0,$d=c)}}function zs(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function Uy(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function pg(t){if(zs(t)!==t)throw Error(we(188))}function PE(t){var e=t.alternate;if(!e){if(e=zs(t),e===null)throw Error(we(188));return e!==t?null:t}for(var n=t,i=e;;){var r=n.return;if(r===null)break;var s=r.alternate;if(s===null){if(i=r.return,i!==null){n=i;continue}break}if(r.child===s.child){for(s=r.child;s;){if(s===n)return pg(r),t;if(s===i)return pg(r),e;s=s.sibling}throw Error(we(188))}if(n.return!==i.return)n=r,i=s;else{for(var o=!1,a=r.child;a;){if(a===n){o=!0,n=r,i=s;break}if(a===i){o=!0,i=r,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,i=r;break}if(a===i){o=!0,i=s,n=r;break}a=a.sibling}if(!o)throw Error(we(189))}}if(n.alternate!==i)throw Error(we(190))}if(n.tag!==3)throw Error(we(188));return n.stateNode.current===n?t:e}function Oy(t){return t=PE(t),t!==null?Fy(t):null}function Fy(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Fy(t);if(e!==null)return e;t=t.sibling}return null}var ky=Dn.unstable_scheduleCallback,mg=Dn.unstable_cancelCallback,LE=Dn.unstable_shouldYield,NE=Dn.unstable_requestPaint,Pt=Dn.unstable_now,DE=Dn.unstable_getCurrentPriorityLevel,kp=Dn.unstable_ImmediatePriority,zy=Dn.unstable_UserBlockingPriority,lu=Dn.unstable_NormalPriority,IE=Dn.unstable_LowPriority,By=Dn.unstable_IdlePriority,zu=null,bi=null;function UE(t){if(bi&&typeof bi.onCommitFiberRoot=="function")try{bi.onCommitFiberRoot(zu,t,void 0,(t.current.flags&128)===128)}catch{}}var ai=Math.clz32?Math.clz32:kE,OE=Math.log,FE=Math.LN2;function kE(t){return t>>>=0,t===0?32:31-(OE(t)/FE|0)|0}var ql=64,$l=4194304;function Oa(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function cu(t,e){var n=t.pendingLanes;if(n===0)return 0;var i=0,r=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~r;a!==0?i=Oa(a):(s&=o,s!==0&&(i=Oa(s)))}else o=n&~r,o!==0?i=Oa(o):s!==0&&(i=Oa(s));if(i===0)return 0;if(e!==0&&e!==i&&!(e&r)&&(r=i&-i,s=e&-e,r>=s||r===16&&(s&4194240)!==0))return e;if(i&4&&(i|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=i;0<e;)n=31-ai(e),r=1<<n,i|=t[n],e&=~r;return i}function zE(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function BE(t,e){for(var n=t.suspendedLanes,i=t.pingedLanes,r=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-ai(s),a=1<<o,l=r[o];l===-1?(!(a&n)||a&i)&&(r[o]=zE(a,e)):l<=e&&(t.expiredLanes|=a),s&=~a}}function Zd(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Hy(){var t=ql;return ql<<=1,!(ql&4194240)&&(ql=64),t}function Ef(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Dl(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ai(e),t[e]=n}function HE(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var i=t.eventTimes;for(t=t.expirationTimes;0<n;){var r=31-ai(n),s=1<<r;e[r]=0,i[r]=-1,t[r]=-1,n&=~s}}function zp(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var i=31-ai(n),r=1<<i;r&e|t[i]&e&&(t[i]|=e),n&=~r}}var ft=0;function Vy(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Gy,Bp,Wy,Xy,jy,Kd=!1,Zl=[],Dr=null,Ir=null,Ur=null,sl=new Map,ol=new Map,wr=[],VE="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 submit".split(" ");function gg(t,e){switch(t){case"focusin":case"focusout":Dr=null;break;case"dragenter":case"dragleave":Ir=null;break;case"mouseover":case"mouseout":Ur=null;break;case"pointerover":case"pointerout":sl.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":ol.delete(e.pointerId)}}function ya(t,e,n,i,r,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:i,nativeEvent:s,targetContainers:[r]},e!==null&&(e=Ul(e),e!==null&&Bp(e)),t):(t.eventSystemFlags|=i,e=t.targetContainers,r!==null&&e.indexOf(r)===-1&&e.push(r),t)}function GE(t,e,n,i,r){switch(e){case"focusin":return Dr=ya(Dr,t,e,n,i,r),!0;case"dragenter":return Ir=ya(Ir,t,e,n,i,r),!0;case"mouseover":return Ur=ya(Ur,t,e,n,i,r),!0;case"pointerover":var s=r.pointerId;return sl.set(s,ya(sl.get(s)||null,t,e,n,i,r)),!0;case"gotpointercapture":return s=r.pointerId,ol.set(s,ya(ol.get(s)||null,t,e,n,i,r)),!0}return!1}function Yy(t){var e=vs(t.target);if(e!==null){var n=zs(e);if(n!==null){if(e=n.tag,e===13){if(e=Uy(n),e!==null){t.blockedOn=e,jy(t.priority,function(){Wy(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function zc(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Qd(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var i=new n.constructor(n.type,n);jd=i,n.target.dispatchEvent(i),jd=null}else return e=Ul(n),e!==null&&Bp(e),t.blockedOn=n,!1;e.shift()}return!0}function vg(t,e,n){zc(t)&&n.delete(e)}function WE(){Kd=!1,Dr!==null&&zc(Dr)&&(Dr=null),Ir!==null&&zc(Ir)&&(Ir=null),Ur!==null&&zc(Ur)&&(Ur=null),sl.forEach(vg),ol.forEach(vg)}function xa(t,e){t.blockedOn===e&&(t.blockedOn=null,Kd||(Kd=!0,Dn.unstable_scheduleCallback(Dn.unstable_NormalPriority,WE)))}function al(t){function e(r){return xa(r,t)}if(0<Zl.length){xa(Zl[0],t);for(var n=1;n<Zl.length;n++){var i=Zl[n];i.blockedOn===t&&(i.blockedOn=null)}}for(Dr!==null&&xa(Dr,t),Ir!==null&&xa(Ir,t),Ur!==null&&xa(Ur,t),sl.forEach(e),ol.forEach(e),n=0;n<wr.length;n++)i=wr[n],i.blockedOn===t&&(i.blockedOn=null);for(;0<wr.length&&(n=wr[0],n.blockedOn===null);)Yy(n),n.blockedOn===null&&wr.shift()}var wo=ar.ReactCurrentBatchConfig,uu=!0;function XE(t,e,n,i){var r=ft,s=wo.transition;wo.transition=null;try{ft=1,Hp(t,e,n,i)}finally{ft=r,wo.transition=s}}function jE(t,e,n,i){var r=ft,s=wo.transition;wo.transition=null;try{ft=4,Hp(t,e,n,i)}finally{ft=r,wo.transition=s}}function Hp(t,e,n,i){if(uu){var r=Qd(t,e,n,i);if(r===null)Df(t,e,i,fu,n),gg(t,i);else if(GE(r,t,e,n,i))i.stopPropagation();else if(gg(t,i),e&4&&-1<VE.indexOf(t)){for(;r!==null;){var s=Ul(r);if(s!==null&&Gy(s),s=Qd(t,e,n,i),s===null&&Df(t,e,i,fu,n),s===r)break;r=s}r!==null&&i.stopPropagation()}else Df(t,e,i,null,n)}}var fu=null;function Qd(t,e,n,i){if(fu=null,t=Fp(i),t=vs(t),t!==null)if(e=zs(t),e===null)t=null;else if(n=e.tag,n===13){if(t=Uy(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return fu=t,null}
vendor: 10,401 bytes, line 37
37function qy(t){switch(t){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(DE()){case kp:return 1;case zy:return 4;case lu:case IE:return 16;case By:return 536870912;default:return 16}default:return 16}}var Pr=null,Vp=null,Bc=null;function $y(){if(Bc)return Bc;var t,e=Vp,n=e.length,i,r="value"in Pr?Pr.value:Pr.textContent,s=r.length;for(t=0;t<n&&e[t]===r[t];t++);var o=n-t;for(i=1;i<=o&&e[n-i]===r[s-i];i++);return Bc=r.slice(t,1<i?1-i:void 0)}function Hc(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Kl(){return!0}function yg(){return!1}function Un(t){function e(n,i,r,s,o){this._reactName=n,this._targetInst=r,this.type=i,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Kl:yg,this.isPropagationStopped=yg,this}return Tt(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Kl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Kl)},persist:function(){},isPersistent:Kl}),e}var ra={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gp=Un(ra),Il=Tt({},ra,{view:0,detail:0}),YE=Un(Il),Mf,Tf,_a,Bu=Tt({},Il,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wp,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==_a&&(_a&&t.type==="mousemove"?(Mf=t.screenX-_a.screenX,Tf=t.screenY-_a.screenY):Tf=Mf=0,_a=t),Mf)},movementY:function(t){return"movementY"in t?t.movementY:Tf}}),xg=Un(Bu),qE=Tt({},Bu,{dataTransfer:0}),$E=Un(qE),ZE=Tt({},Il,{relatedTarget:0}),bf=Un(ZE),KE=Tt({},ra,{animationName:0,elapsedTime:0,pseudoElement:0}),QE=Un(KE),JE=Tt({},ra,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),eM=Un(JE),tM=Tt({},ra,{data:0}),_g=Un(tM),nM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},iM={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"},rM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sM(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=rM[t])?!!e[t]:!1}function Wp(){return sM}var oM=Tt({},Il,{key:function(t){if(t.key){var e=nM[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Hc(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?iM[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wp,charCode:function(t){return t.type==="keypress"?Hc(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Hc(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),aM=Un(oM),lM=Tt({},Bu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sg=Un(lM),cM=Tt({},Il,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wp}),uM=Un(cM),fM=Tt({},ra,{propertyName:0,elapsedTime:0,pseudoElement:0}),dM=Un(fM),hM=Tt({},Bu,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),pM=Un(hM),mM=[9,13,27,32],Xp=tr&&"CompositionEvent"in window,Xa=null;tr&&"documentMode"in document&&(Xa=document.documentMode);var gM=tr&&"TextEvent"in window&&!Xa,Zy=tr&&(!Xp||Xa&&8<Xa&&11>=Xa),wg=" ",Eg=!1;function Ky(t,e){switch(t){case"keyup":return mM.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qy(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var oo=!1;function vM(t,e){switch(t){case"compositionend":return Qy(e);case"keypress":return e.which!==32?null:(Eg=!0,wg);case"textInput":return t=e.data,t===wg&&Eg?null:t;default:return null}}function yM(t,e){if(oo)return t==="compositionend"||!Xp&&Ky(t,e)?(t=$y(),Bc=Vp=Pr=null,oo=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Zy&&e.locale!=="ko"?null:e.data;default:return null}}var xM={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 Mg(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!xM[t.type]:e==="textarea"}function Jy(t,e,n,i){Py(i),e=du(e,"onChange"),0<e.length&&(n=new Gp("onChange","change",null,n,i),t.push({event:n,listeners:e}))}var ja=null,ll=null;function _M(t){ux(t,0)}function Hu(t){var e=co(t);if(Ey(e))return t}function SM(t,e){if(t==="change")return e}var ex=!1;if(tr){var Af;if(tr){var Cf="oninput"in document;if(!Cf){var Tg=document.createElement("div");Tg.setAttribute("oninput","return;"),Cf=typeof Tg.oninput=="function"}Af=Cf}else Af=!1;ex=Af&&(!document.documentMode||9<document.documentMode)}function bg(){ja&&(ja.detachEvent("onpropertychange",tx),ll=ja=null)}function tx(t){if(t.propertyName==="value"&&Hu(ll)){var e=[];Jy(e,ll,t,Fp(t)),Iy(_M,e)}}function wM(t,e,n){t==="focusin"?(bg(),ja=e,ll=n,ja.attachEvent("onpropertychange",tx)):t==="focusout"&&bg()}function EM(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Hu(ll)}function MM(t,e){if(t==="click")return Hu(e)}function TM(t,e){if(t==="input"||t==="change")return Hu(e)}function bM(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ui=typeof Object.is=="function"?Object.is:bM;function cl(t,e){if(ui(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var r=n[i];if(!Id.call(e,r)||!ui(t[r],e[r]))return!1}return!0}function Ag(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Cg(t,e){var n=Ag(t);t=0;for(var i;n;){if(n.nodeType===3){if(i=t+n.textContent.length,t<=e&&i>=e)return{node:n,offset:e-t};t=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ag(n)}}function nx(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?nx(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function ix(){for(var t=window,e=su();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=su(t.document)}return e}function jp(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function AM(t){var e=ix(),n=t.focusedElem,i=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&nx(n.ownerDocument.documentElement,n)){if(i!==null&&jp(n)){if(e=i.start,t=i.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var r=n.textContent.length,s=Math.min(i.start,r);i=i.end===void 0?s:Math.min(i.end,r),!t.extend&&s>i&&(r=i,i=s,s=r),r=Cg(n,s);var o=Cg(n,i);r&&o&&(t.rangeCount!==1||t.anchorNode!==r.node||t.anchorOffset!==r.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),t.removeAllRanges(),s>i?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var CM=tr&&"documentMode"in document&&11>=document.documentMode,ao=null,Jd=null,Ya=null,eh=!1;function Rg(t,e,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;eh||ao==null||ao!==su(i)||(i=ao,"selectionStart"in i&&jp(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focu
vendor: 4,501 bytes, line 37
37sNode:i.focusNode,focusOffset:i.focusOffset}),Ya&&cl(Ya,i)||(Ya=i,i=du(Jd,"onSelect"),0<i.length&&(e=new Gp("onSelect","select",null,e,n),t.push({event:e,listeners:i}),e.target=ao)))}function Ql(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var lo={animationend:Ql("Animation","AnimationEnd"),animationiteration:Ql("Animation","AnimationIteration"),animationstart:Ql("Animation","AnimationStart"),transitionend:Ql("Transition","TransitionEnd")},Rf={},rx={};tr&&(rx=document.createElement("div").style,"AnimationEvent"in window||(delete lo.animationend.animation,delete lo.animationiteration.animation,delete lo.animationstart.animation),"TransitionEvent"in window||delete lo.transitionend.transition);function Vu(t){if(Rf[t])return Rf[t];if(!lo[t])return t;var e=lo[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in rx)return Rf[t]=e[n];return t}var sx=Vu("animationend"),ox=Vu("animationiteration"),ax=Vu("animationstart"),lx=Vu("transitionend"),cx=new Map,Pg="abort auxClick 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 Zr(t,e){cx.set(t,e),ks(e,[t])}for(var Pf=0;Pf<Pg.length;Pf++){var Lf=Pg[Pf],RM=Lf.toLowerCase(),PM=Lf[0].toUpperCase()+Lf.slice(1);Zr(RM,"on"+PM)}Zr(sx,"onAnimationEnd");Zr(ox,"onAnimationIteration");Zr(ax,"onAnimationStart");Zr("dblclick","onDoubleClick");Zr("focusin","onFocus");Zr("focusout","onBlur");Zr(lx,"onTransitionEnd");Bo("onMouseEnter",["mouseout","mouseover"]);Bo("onMouseLeave",["mouseout","mouseover"]);Bo("onPointerEnter",["pointerout","pointerover"]);Bo("onPointerLeave",["pointerout","pointerover"]);ks("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ks("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ks("onBeforeInput",["compositionend","keypress","textInput","paste"]);ks("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ks("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ks("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fa="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(" "),LM=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fa));function Lg(t,e,n){var i=t.type||"unknown-event";t.currentTarget=n,RE(i,e,void 0,t),t.currentTarget=null}function ux(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var i=t[n],r=i.event;i=i.listeners;e:{var s=void 0;if(e)for(var o=i.length-1;0<=o;o--){var a=i[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&r.isPropagationStopped())break e;Lg(r,a,c),s=l}else for(o=0;o<i.length;o++){if(a=i[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&r.isPropagationStopped())break e;Lg(r,a,c),s=l}}}if(au)throw t=$d,au=!1,$d=null,t}function vt(t,e){var n=e[sh];n===void 0&&(n=e[sh]=new Set);var i=t+"__bubble";n.has(i)||(fx(e,t,2,!1),n.add(i))}function Nf(t,e,n){var i=0;e&&(i|=4),fx(n,t,i,e)}var Jl="_reactListening"+Math.random().toString(36).slice(2);function ul(t){if(!t[Jl]){t[Jl]=!0,yy.forEach(function(n){n!=="selectionchange"&&(LM.has(n)||Nf(n,!1,t),Nf(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Jl]||(e[Jl]=!0,Nf("selectionchange",!1,e))}}function fx(t,e,n,i){switch(qy(e)){case 1:var r=XE;break;case 4:r=jE;break;default:r=Hp}n=r.bind(null,e,n,t),r=void 0,!qd||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(r=!0),i?r!==void 0?t.addEventListener(e,n,{capture:!0,passive:r}):t.addEventListener(e,n,!0):r!==void 0?t.addEventListener(e,n,{passive:r}):t.addEventListener(e,n,!1)}function Df(t,e,n,i,r){var s=i;if(!(e&1)&&!(e&2)&&i!==null)e:for(;;){if(i===null)return;var o=i.tag;if(o===3||o===4){var a=i.stateNode.containerInfo;
vendor: 5,317 bytes, lines 37-38
37if(a===r||a.nodeType===8&&a.parentNode===r)break;if(o===4)for(o=i.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===r||l.nodeType===8&&l.parentNode===r))return;o=o.return}for(;a!==null;){if(o=vs(a),o===null)return;if(l=o.tag,l===5||l===6){i=s=o;continue e}a=a.parentNode}}i=i.return}Iy(function(){var c=s,u=Fp(n),f=[];e:{var h=cx.get(t);if(h!==void 0){var p=Gp,v=t;switch(t){case"keypress":if(Hc(n)===0)break e;case"keydown":case"keyup":p=aM;break;case"focusin":v="focus",p=bf;break;case"focusout":v="blur",p=bf;break;case"beforeblur":case"afterblur":p=bf;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=xg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=$E;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=uM;break;case sx:case ox:case ax:p=QE;break;case lx:p=dM;break;case"scroll":p=YE;break;case"wheel":p=pM;break;case"copy":case"cut":case"paste":p=eM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Sg}var y=(e&4)!==0,m=!y&&t==="scroll",d=y?h!==null?h+"Capture":null:h;y=[];for(var _=c,g;_!==null;){g=_;var x=g.stateNode;if(g.tag===5&&x!==null&&(g=x,d!==null&&(x=rl(_,d),x!=null&&y.push(fl(_,x,g)))),m)break;_=_.return}0<y.length&&(h=new p(h,v,null,n,u),f.push({event:h,listeners:y}))}}if(!(e&7)){e:{if(h=t==="mouseover"||t==="pointerover",p=t==="mouseout"||t==="pointerout",h&&n!==jd&&(v=n.relatedTarget||n.fromElement)&&(vs(v)||v[nr]))break e;if((p||h)&&(h=u.window===u?u:(h=u.ownerDocument)?h.defaultView||h.parentWindow:window,p?(v=n.relatedTarget||n.toElement,p=c,v=v?vs(v):null,v!==null&&(m=zs(v),v!==m||v.tag!==5&&v.tag!==6)&&(v=null)):(p=null,v=c),p!==v)){if(y=xg,x="onMouseLeave",d="onMouseEnter",_="mouse",(t==="pointerout"||t==="pointerover")&&(y=Sg,x="onPointerLeave",d="onPointerEnter",_="pointer"),m=p==null?h:co(p),g=v==null?h:co(v),h=new y(x,_+"leave",p,n,u),h.target=m,h.relatedTarget=g,x=null,vs(u)===c&&(y=new y(d,_+"enter",v,n,u),y.target=g,y.relatedTarget=m,x=y),m=x,p&&v)t:{for(y=p,d=v,_=0,g=y;g;g=Vs(g))_++;for(g=0,x=d;x;x=Vs(x))g++;for(;0<_-g;)y=Vs(y),_--;for(;0<g-_;)d=Vs(d),g--;for(;_--;){if(y===d||d!==null&&y===d.alternate)break t;y=Vs(y),d=Vs(d)}y=null}else y=null;p!==null&&Ng(f,h,p,y,!1),v!==null&&m!==null&&Ng(f,m,v,y,!0)}}e:{if(h=c?co(c):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var b=SM;else if(Mg(h))if(ex)b=TM;else{b=EM;var A=wM}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(b=MM);if(b&&(b=b(t,c))){Jy(f,b,n,u);break e}A&&A(t,h,c),t==="focusout"&&(A=h._wrapperState)&&A.controlled&&h.type==="number"&&Hd(h,"number",h.value)}switch(A=c?co(c):window,t){case"focusin":(Mg(A)||A.contentEditable==="true")&&(ao=A,Jd=c,Ya=null);break;case"focusout":Ya=Jd=ao=null;break;case"mousedown":eh=!0;break;case"contextmenu":case"mouseup":case"dragend":eh=!1,Rg(f,n,u);break;case"selectionchange":if(CM)break;case"keydown":case"keyup":Rg(f,n,u)}var M;if(Xp)e:{switch(t){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else oo?Ky(t,n)&&(R="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(Zy&&n.locale!=="ko"&&(oo||R!=="onCompositionStart"?R==="onCompositionEnd"&&oo&&(M=$y()):(Pr=u,Vp="value"in Pr?Pr.value:Pr.textContent,oo=!0)),A=du(c,R),0<A.length&&(R=new _g(R,t,null,n,u),f.push({event:R,listeners:A}),M?R.data=M:(M=Qy(n),M!==null&&(R.data=M)))),(M=gM?vM(t,n):yM(t,n))&&(c=du(c,"onBeforeInput"),0<c.length&&(u=new _g("onBeforeInput","beforeinput",null,n,u),f.push({event:u,listeners:c}),u.data=M))}ux(f,e)})}function fl(t,e,n){return{instance:t,listener:e,currentTarget:n}}function du(t,e){for(var n=e+"Capture",i=[];t!==null;){var r=t,s=r.stateNode;r.tag===5&&s!==null&&(r=s,s=rl(t,n),s!=null&&i.unshift(fl(t,s,r)),s=rl(t,e),s!=null&&i.push(fl(t,s,r))),t=t.return}return i}function Vs(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Ng(t,e,n,i,r){for(var s=e._reactName,o=[];n!==null&&n!==i;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===i)break;a.tag===5&&c!==null&&(a=c,r?(l=rl(n,s),l!=null&&o.unshift(fl(n,l,a))):r||(l=rl(n,s),l!=null&&o.push(fl(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var NM=/\r\n?/g,DM=/\u0000|\uFFFD/g;function Dg(t){return(typeof t=="string"?t:""+t).replace(NM,` 38`).replace(DM,"")}function ec(t,e,n){if(e=Dg(e),Dg(t)!==e&&n)throw Error(we(425))}function hu(){}var th=null,nh=null;function ih(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var rh=typeof setTimeout=="function"?setTimeout:void 0,IM=typeof clearTimeout=="function"?clearTimeout:void 0,Ig=typeof Promise=="function"?Promise:void 0,UM=typeof queueMicrotask=="function"?queueMicrotask:typeof Ig<"u"?function(t){return Ig.resolve(null).then(t).cat
vendor: 3,136 bytes, line 38
38ch(OM)}:rh;function OM(t){setTimeout(function(){throw t})}function If(t,e){var n=e,i=0;do{var r=n.nextSibling;if(t.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(i===0){t.removeChild(r),al(e);return}i--}else n!=="$"&&n!=="$?"&&n!=="$!"||i++;n=r}while(n);al(e)}function Or(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function Ug(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var sa=Math.random().toString(36).slice(2),wi="__reactFiber$"+sa,dl="__reactProps$"+sa,nr="__reactContainer$"+sa,sh="__reactEvents$"+sa,FM="__reactListeners$"+sa,kM="__reactHandles$"+sa;function vs(t){var e=t[wi];if(e)return e;for(var n=t.parentNode;n;){if(e=n[nr]||n[wi]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=Ug(t);t!==null;){if(n=t[wi])return n;t=Ug(t)}return e}t=n,n=t.parentNode}return null}function Ul(t){return t=t[wi]||t[nr],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function co(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(we(33))}function Gu(t){return t[dl]||null}var oh=[],uo=-1;function Kr(t){return{current:t}}function yt(t){0>uo||(t.current=oh[uo],oh[uo]=null,uo--)}function mt(t,e){uo++,oh[uo]=t.current,t.current=e}var Wr={},rn=Kr(Wr),vn=Kr(!1),Cs=Wr;function Ho(t,e){var n=t.type.contextTypes;if(!n)return Wr;var i=t.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in n)r[s]=e[s];return i&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=r),r}function yn(t){return t=t.childContextTypes,t!=null}function pu(){yt(vn),yt(rn)}function Og(t,e,n){if(rn.current!==Wr)throw Error(we(168));mt(rn,e),mt(vn,n)}function dx(t,e,n){var i=t.stateNode;if(e=e.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var r in i)if(!(r in e))throw Error(we(108,wE(t)||"Unknown",r));return Tt({},n,i)}function mu(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Wr,Cs=rn.current,mt(rn,t),mt(vn,vn.current),!0}function Fg(t,e,n){var i=t.stateNode;if(!i)throw Error(we(169));n?(t=dx(t,e,Cs),i.__reactInternalMemoizedMergedChildContext=t,yt(vn),yt(rn),mt(rn,t)):yt(vn),mt(vn,n)}var qi=null,Wu=!1,Uf=!1;function hx(t){qi===null?qi=[t]:qi.push(t)}function zM(t){Wu=!0,hx(t)}function Qr(){if(!Uf&&qi!==null){Uf=!0;var t=0,e=ft;try{var n=qi;for(ft=1;t<n.length;t++){var i=n[t];do i=i(!0);while(i!==null)}qi=null,Wu=!1}catch(r){throw qi!==null&&(qi=qi.slice(t+1)),ky(kp,Qr),r}finally{ft=e,Uf=!1}}return null}var fo=[],ho=0,gu=null,vu=0,Hn=[],Vn=0,Rs=null,$i=1,Zi="";function fs(t,e){fo[ho++]=vu,fo[ho++]=gu,gu=t,vu=e}function px(t,e,n){Hn[Vn++]=$i,Hn[Vn++]=Zi,Hn[Vn++]=Rs,Rs=t;var i=$i;t=Zi;var r=32-ai(i)-1;i&=~(1<<r),n+=1;var s=32-ai(e)+r;if(30<s){var o=r-r%5;s=(i&(1<<o)-1).toString(32),i>>=o,r-=o,$i=1<<32-ai(e)+r|n<<r|i,Zi=s+t}else $i=1<<s|n<<r|i,Zi=t}
vendor: 14,262 bytes, line 38
38function Yp(t){t.return!==null&&(fs(t,1),px(t,1,0))}function qp(t){for(;t===gu;)gu=fo[--ho],fo[ho]=null,vu=fo[--ho],fo[ho]=null;for(;t===Rs;)Rs=Hn[--Vn],Hn[Vn]=null,Zi=Hn[--Vn],Hn[Vn]=null,$i=Hn[--Vn],Hn[Vn]=null}var Ln=null,Pn=null,_t=!1,ri=null;function mx(t,e){var n=Wn(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function kg(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Ln=t,Pn=Or(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Ln=t,Pn=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Rs!==null?{id:$i,overflow:Zi}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=Wn(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,Ln=t,Pn=null,!0):!1;default:return!1}}function ah(t){return(t.mode&1)!==0&&(t.flags&128)===0}function lh(t){if(_t){var e=Pn;if(e){var n=e;if(!kg(t,e)){if(ah(t))throw Error(we(418));e=Or(n.nextSibling);var i=Ln;e&&kg(t,e)?mx(i,n):(t.flags=t.flags&-4097|2,_t=!1,Ln=t)}}else{if(ah(t))throw Error(we(418));t.flags=t.flags&-4097|2,_t=!1,Ln=t}}}function zg(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Ln=t}function tc(t){if(t!==Ln)return!1;if(!_t)return zg(t),_t=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!ih(t.type,t.memoizedProps)),e&&(e=Pn)){if(ah(t))throw gx(),Error(we(418));for(;e;)mx(t,e),e=Or(e.nextSibling)}if(zg(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(we(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){Pn=Or(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}Pn=null}}else Pn=Ln?Or(t.stateNode.nextSibling):null;return!0}function gx(){for(var t=Pn;t;)t=Or(t.nextSibling)}function Vo(){Pn=Ln=null,_t=!1}function $p(t){ri===null?ri=[t]:ri.push(t)}var BM=ar.ReactCurrentBatchConfig;function Sa(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(we(309));var i=n.stateNode}if(!i)throw Error(we(147,t));var r=i,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var a=r.refs;o===null?delete a[s]:a[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(we(284));if(!n._owner)throw Error(we(290,t))}return t}function nc(t,e){throw t=Object.prototype.toString.call(e),Error(we(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Bg(t){var e=t._init;return e(t._payload)}function vx(t){function e(d,_){if(t){var g=d.deletions;g===null?(d.deletions=[_],d.flags|=16):g.push(_)}}function n(d,_){if(!t)return null;for(;_!==null;)e(d,_),_=_.sibling;return null}function i(d,_){for(d=new Map;_!==null;)_.key!==null?d.set(_.key,_):d.set(_.index,_),_=_.sibling;return d}function r(d,_){return d=Br(d,_),d.index=0,d.sibling=null,d}function s(d,_,g){return d.index=g,t?(g=d.alternate,g!==null?(g=g.index,g<_?(d.flags|=2,_):g):(d.flags|=2,_)):(d.flags|=1048576,_)}function o(d){return t&&d.alternate===null&&(d.flags|=2),d}function a(d,_,g,x){return _===null||_.tag!==6?(_=Vf(g,d.mode,x),_.return=d,_):(_=r(_,g),_.return=d,_)}function l(d,_,g,x){var b=g.type;return b===so?u(d,_,g.props.children,x,g.key):_!==null&&(_.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===_r&&Bg(b)===_.type)?(x=r(_,g.props),x.ref=Sa(d,_,g),x.return=d,x):(x=qc(g.type,g.key,g.props,null,d.mode,x),x.ref=Sa(d,_,g),x.return=d,x)}function c(d,_,g,x){return _===null||_.tag!==4||_.stateNode.containerInfo!==g.containerInfo||_.stateNode.implementation!==g.implementation?(_=Gf(g,d.mode,x),_.return=d,_):(_=r(_,g.children||[]),_.return=d,_)}function u(d,_,g,x,b){return _===null||_.tag!==7?(_=As(g,d.mode,x,b),_.return=d,_):(_=r(_,g),_.return=d,_)}function f(d,_,g){if(typeof _=="string"&&_!==""||typeof _=="number")return _=Vf(""+_,d.mode,g),_.return=d,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Xl:return g=qc(_.type,_.key,_.props,null,d.mode,g),g.ref=Sa(d,null,_),g.return=d,g;case ro:return _=Gf(_,d.mode,g),_.return=d,_;case _r:var x=_._init;return f(d,x(_._payload),g)}if(Ua(_)||ga(_))return _=As(_,d.mode,g,null),_.return=d,_;nc(d,_)}return null}function h(d,_,g,x){var b=_!==null?_.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return b!==null?null:a(d,_,""+g,x);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Xl:return g.key===b?l(d,_,g,x):null;case ro:return g.key===b?c(d,_,g,x):null;case _r:return b=g._init,h(d,_,b(g._payload),x)}if(Ua(g)||ga(g))return b!==null?null:u(d,_,g,x,null);nc(d,g)}return null}function p(d,_,g,x,b){if(typeof x=="string"&&x!==""||typeof x=="number")return d=d.get(g)||null,a(_,d,""+x,b);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Xl:return d=d.get(x.key===null?g:x.key)||null,l(_,d,x,b);case ro:return d=d.get(x.key===null?g:x.key)||null,c(_,d,x,b);case _r:var A=x._init;return p(d,_,g,A(x._payload),b)}if(Ua(x)||ga(x))return d=d.get(g)||null,u(_,d,x,b,null);nc(_,x)}return null}function v(d,_,g,x){for(var b=null,A=null,M=_,R=_=0,T=null;M!==null&&R<g.length;R++){M.index>R?(T=M,M=null):T=M.sibling;var S=h(d,M,g[R],x);if(S===null){M===null&&(M=T);break}t&&M&&S.alternate===null&&e(d,M),_=s(S,_,R),A===null?b=S:A.sibling=S,A=S,M=T}if(R===g.length)return n(d,M),_t&&fs(d,R),b;if(M===null){for(;R<g.length;R++)M=f(d,g[R],x),M!==null&&(_=s(M,_,R),A===null?b=M:A.sibling=M,A=M);return _t&&fs(d,R),b}for(M=i(d,M);R<g.length;R++)T=p(M,d,R,g[R],x),T!==null&&(t&&T.alternate!==null&&M.delete(T.key===null?R:T.key),_=s(T,_,R),A===null?b=T:A.sibling=T,A=T);return t&&M.forEach(function(U){return e(d,U)}),_t&&fs(d,R),b}function y(d,_,g,x){var b=ga(g);if(typeof b!="function")throw Error(we(150));if(g=b.call(g),g==null)throw Error(we(151));for(var A=b=null,M=_,R=_=0,T=null,S=g.next();M!==null&&!S.done;R++,S=g.next()){M.index>R?(T=M,M=null):T=M.sibling;var U=h(d,M,S.value,x);if(U===null){M===null&&(M=T);break}t&&M&&U.alternate===null&&e(d,M),_=s(U,_,R),A===null?b=U:A.sibling=U,A=U,M=T}if(S.done)return n(d,M),_t&&fs(d,R),b;if(M===null){for(;!S.done;R++,S=g.next())S=f(d,S.value,x),S!==null&&(_=s(S,_,R),A===null?b=S:A.sibling=S,A=S);return _t&&fs(d,R),b}for(M=i(d,M);!S.done;R++,S=g.next())S=p(M,d,R,S.value,x),S!==null&&(t&&S.alternate!==null&&M.delete(S.key===null?R:S.key),_=s(S,_,R),A===null?b=S:A.sibling=S,A=S);return t&&M.forEach(function(z){return e(d,z)}),_t&&fs(d,R),b}function m(d,_,g,x){if(typeof g=="object"&&g!==null&&g.type===so&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Xl:e:{for(var b=g.key,A=_;A!==null;){if(A.key===b){if(b=g.type,b===so){if(A.tag===7){n(d,A.sibling),_=r(A,g.props.children),_.return=d,d=_;break e}}else if(A.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===_r&&Bg(b)===A.type){n(d,A.sibling),_=r(A,g.props),_.ref=Sa(d,A,g),_.return=d,d=_;break e}n(d,A);break}else e(d,A);A=A.sibling}g.type===so?(_=As(g.props.children,d.mode,x,g.key),_.return=d,d=_):(x=qc(g.type,g.key,g.props,null,d.mode,x),x.ref=Sa(d,_,g),x.return=d,d=x)}return o(d);case ro:e:{for(A=g.key;_!==null;){if(_.key===A)if(_.tag===4&&_.stateNode.containerInfo===g.containerInfo&&_.stateNode.implementation===g.implementation){n(d,_.sibling),_=r(_,g.children||[]),_.return=d,d=_;break e}else{n(d,_);break}else e(d,_);_=_.sibling}_=Gf(g,d.mode,x),_.return=d,d=_}return o(d);case _r:return A=g._init,m(d,_,A(g._payload),x)}if(Ua(g))return v(d,_,g,x);if(ga(g))return y(d,_,g,x);nc(d,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,_!==null&&_.tag===6?(n(d,_.sibling),_=r(_,g),_.return=d,d=_):(n(d,_),_=Vf(g,d.mode,x),_.return=d,d=_),o(d)):n(d,_)}return m}var Go=vx(!0),yx=vx(!1),yu=Kr(null),xu=null,po=null,Zp=null;function Kp(){Zp=po=xu=null}function Qp(t){var e=yu.current;yt(yu),t._currentValue=e}function ch(t,e,n){for(;t!==null;){var i=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,i!==null&&(i.childLanes|=e)):i!==null&&(i.childLanes&e)!==e&&(i.childLanes|=e),t===n)break;t=t.return}}function Eo(t,e){xu=t,Zp=po=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(gn=!0),t.firstContext=null)}function Yn(t){var e=t._currentValue;if(Zp!==t)if(t={context:t,memoizedValue:e,next:null},po===null){if(xu===null)throw Error(we(308));po=t,xu.dependencies={lanes:0,firstContext:t}}else po=po.next=t;return e}var ys=null;function Jp(t){ys===null?ys=[t]:ys.push(t)}function xx(t,e,n,i){var r=e.interleaved;return r===null?(n.next=n,Jp(e)):(n.next=r.next,r.next=n),e.interleaved=n,ir(t,i)}function ir(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Sr=!1;function em(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _x(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Ji(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Fr(t,e,n){var i=t.updateQueue;if(i===null)return null;if(i=i.shared,it&2){var r=i.pending;return r===null?e.next=e:(e.next=r.next,r.next=e),i.pending=e,ir(t,n)}return r=i.interleaved,r===null?(e.next=e,Jp(i)):(e.next=r.next,r.next=e),i.interleaved=e,ir(t,n)}function Vc(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,zp(t,n)}}function Hg(t,e){var n=t.updateQueue,i=t.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var r=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?r=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?r=s=e:s=s.next=e}else r=s=e;n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:i.shared,effects:i.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function _u(t,e,n,i){var r=t.updateQueue;Sr=!1;var s=r.firstBaseUpdate,o=r.lastBaseUpdate,a=r.shared.pending;if(a!==null){r.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var f=r.baseState;o=0,u=c=l=null,a=s;do{var h=a.lane,p=a.eventTime;if((i&h)===h){u!==null&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=t,y=a;switch(h=e,p=n,y.tag){case 1:if(v=y.payload,typeof v=="function"){f=v.call(p,f,h);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=y.payload,h=typeof v=="function"?v.call(p,f,h):v,h==null)break e;f=Tt({},f,h);break e;case 2:Sr=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,h=r.effects,h===null?r.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=p,l=f):u=u.next=p,o|=h;if(a=a.next,a===null){if(a=r.shared.pending,a===null)break;h=a,a=h.next,h.next=null,r.lastBaseUpdate=h,r.shared.pending=null}}while(!0);if(u===null&&(l=f),r.baseState=l,r.firstBaseUpdate=c,r.lastBaseUpdate=u,e=r.shared.interleaved,e!==null){r=e;do o|=r.lane,r=r.next;while(r!==e)}else s===null&&(r.shared.lanes=0);Ls|=o,t.lanes=o,t.memoizedState=f}}function Vg(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var i=t[e],r=i.callback;if(r!==null){if(i.callback=null,i=n,typeof r!="function")throw Error(we(191,r));r.call(i)}}}var Ol={},Ai=Kr(Ol),hl=Kr(Ol),pl=Kr(Ol);function xs(t){if(t===Ol)throw Error(we(174));return t}function tm(t,e){switch(mt(pl,e),mt(hl,t),mt(Ai,Ol),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Gd(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Gd(e,t)}yt(Ai),mt(Ai,e)}function Wo(){yt(Ai),yt(hl),yt(pl)}function Sx(t){xs(pl.current);var e=xs(Ai.current),n=Gd(e,t.type);e!==n&&(mt(hl,t),mt(Ai,n))}function nm(t){hl.current===t&&(yt(Ai),yt(hl))}var St=Kr(0);function Su(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Of=[];function im(){for(var t=0;t<Of.length;t++)Of[t]._workInProgressVersionPrimary=null;Of.length=0}var Gc=ar.ReactCurrentDispatcher,Ff=ar.ReactCurrentBatchConfig,Ps=0,Et=null,Ut=null,Vt=null,wu=!1,qa=!1,ml=0,HM=0;function Zt(){throw Error(we(321))}function rm(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!ui(t[n],e[n]))return!1;return!0}function sm(t,e,n,i,r,s){if(Ps=s,Et=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Gc.current=t===null||t.memoizedState===null?XM:jM,t=n(i,r),qa){s=0;do{if(qa=!1,ml=0,25<=s)throw Error(we(301));s+=1,Vt=Ut=null,e.updateQueue=null,Gc.current=YM,t=n(i,r)}while(qa)}if(Gc.current=Eu,e=Ut!==null&&Ut.next!==null,Ps=0,Vt=Ut=Et=null,wu=!1,e)throw Error(we(300));return t}function om(){var t=ml!==0;return ml=0,t}function vi(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vt===null?Et.memoizedState=Vt=t:Vt=Vt.next=t,Vt}function qn(){if(Ut===null){var t=Et.alternate;t=t!==null?t.memoizedState:null}else t=Ut.next;var e=Vt===null?Et.memoizedState:Vt.next;if(e!==null)Vt=e,Ut=t;else{if(t===null)throw Error(we(310));Ut=t,t={memoizedState:Ut.memoizedState,baseState:Ut.baseState,baseQueue:Ut.baseQueue,queue:Ut.queue,next:null},Vt===null?Et.memoizedState=Vt=t:Vt=Vt.next=t}return Vt}function gl(t,e){return typeof e=="function"?e(t):e}function kf(t){var e=qn(),n=e.queue;if(n===null)throw Error(we(311));n.lastRenderedReducer=t;var i=Ut,r=i.baseQueue,s=n.pending;if(s!==null){if(r!==null){var o=r.next;
vendor: 4,577 bytes, line 38
38r.next=s.next,s.next=o}i.baseQueue=r=s,n.pending=null}if(r!==null){s=r.next,i=i.baseState;var a=o=null,l=null,c=s;do{var u=c.lane;if((Ps&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),i=c.hasEagerState?c.eagerState:t(i,c.action);else{var f={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,o=i):l=l.next=f,Et.lanes|=u,Ls|=u}c=c.next}while(c!==null&&c!==s);l===null?o=i:l.next=a,ui(i,e.memoizedState)||(gn=!0),e.memoizedState=i,e.baseState=o,e.baseQueue=l,n.lastRenderedState=i}if(t=n.interleaved,t!==null){r=t;do s=r.lane,Et.lanes|=s,Ls|=s,r=r.next;while(r!==t)}else r===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function zf(t){var e=qn(),n=e.queue;if(n===null)throw Error(we(311));n.lastRenderedReducer=t;var i=n.dispatch,r=n.pending,s=e.memoizedState;if(r!==null){n.pending=null;var o=r=r.next;do s=t(s,o.action),o=o.next;while(o!==r);ui(s,e.memoizedState)||(gn=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,i]}function wx(){}function Ex(t,e){var n=Et,i=qn(),r=e(),s=!ui(i.memoizedState,r);if(s&&(i.memoizedState=r,gn=!0),i=i.queue,am(bx.bind(null,n,i,t),[t]),i.getSnapshot!==e||s||Vt!==null&&Vt.memoizedState.tag&1){if(n.flags|=2048,vl(9,Tx.bind(null,n,i,r,e),void 0,null),Gt===null)throw Error(we(349));Ps&30||Mx(n,e,r)}return r}function Mx(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Et.updateQueue,e===null?(e={lastEffect:null,stores:null},Et.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function Tx(t,e,n,i){e.value=n,e.getSnapshot=i,Ax(e)&&Cx(t)}function bx(t,e,n){return n(function(){Ax(e)&&Cx(t)})}function Ax(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!ui(t,n)}catch{return!0}}function Cx(t){var e=ir(t,1);e!==null&&li(e,t,1,-1)}function Gg(t){var e=vi();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gl,lastRenderedState:t},e.queue=t,t=t.dispatch=WM.bind(null,Et,t),[e.memoizedState,t]}function vl(t,e,n,i){return t={tag:t,create:e,destroy:n,deps:i,next:null},e=Et.updateQueue,e===null?(e={lastEffect:null,stores:null},Et.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(i=n.next,n.next=t,t.next=i,e.lastEffect=t)),t}function Rx(){return qn().memoizedState}function Wc(t,e,n,i){var r=vi();Et.flags|=t,r.memoizedState=vl(1|e,n,void 0,i===void 0?null:i)}function Xu(t,e,n,i){var r=qn();i=i===void 0?null:i;var s=void 0;if(Ut!==null){var o=Ut.memoizedState;if(s=o.destroy,i!==null&&rm(i,o.deps)){r.memoizedState=vl(e,n,s,i);return}}Et.flags|=t,r.memoizedState=vl(1|e,n,s,i)}function Wg(t,e){return Wc(8390656,8,t,e)}function am(t,e){return Xu(2048,8,t,e)}function Px(t,e){return Xu(4,2,t,e)}function Lx(t,e){return Xu(4,4,t,e)}function Nx(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Dx(t,e,n){return n=n!=null?n.concat([t]):null,Xu(4,4,Nx.bind(null,e,t),n)}function lm(){}function Ix(t,e){var n=qn();e=e===void 0?null:e;var i=n.memoizedState;return i!==null&&e!==null&&rm(e,i[1])?i[0]:(n.memoizedState=[t,e],t)}function Ux(t,e){var n=qn();e=e===void 0?null:e;var i=n.memoizedState;return i!==null&&e!==null&&rm(e,i[1])?i[0]:(t=t(),n.memoizedState=[t,e],t)}function Ox(t,e,n){return Ps&21?(ui(n,e)||(n=Hy(),Et.lanes|=n,Ls|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,gn=!0),t.memoizedState=n)}function VM(t,e){var n=ft;ft=n!==0&&4>n?n:4,t(!0);var i=Ff.transition;Ff.transition={};try{t(!1),e()}finally{ft=n,Ff.transition=i}}function Fx(){return qn().memoizedState}function GM(t,e,n){var i=zr(t);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},kx(t))zx(e,n);else if(n=xx(t,e,n,i),n!==null){var r=un();li(n,t,i,r),Bx(n,e,i)}}function WM(t,e,n){var i=zr(t),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(kx(t))zx(e,r);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(r.hasEagerState=!0,r.eagerState=a,ui(a,o)){var l=e.interleaved;l===null?(r.next=r,Jp(e)):(r.next=l.next,l.next=r),e.interleaved=r;return}}catch{}finally{}n=xx(t,e,r,i),n!==null&&(r=un(),li(n,t,i,r),Bx(n,e,i))}}function kx(t){var e=t.alternate;return t===Et||e!==null&&e===Et}function zx(t,e){qa=wu=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Bx(t,e,n){if(n&4194240){var i=e.lanes;
vendor: 8,472 bytes, lines 38-40
38i&=t.pendingLanes,n|=i,e.lanes=n,zp(t,n)}}var Eu={readContext:Yn,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useInsertionEffect:Zt,useLayoutEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useMutableSource:Zt,useSyncExternalStore:Zt,useId:Zt,unstable_isNewReconciler:!1},XM={readContext:Yn,useCallback:function(t,e){return vi().memoizedState=[t,e===void 0?null:e],t},useContext:Yn,useEffect:Wg,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Wc(4194308,4,Nx.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Wc(4194308,4,t,e)},useInsertionEffect:function(t,e){return Wc(4,2,t,e)},useMemo:function(t,e){var n=vi();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var i=vi();return e=n!==void 0?n(e):e,i.memoizedState=i.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},i.queue=t,t=t.dispatch=GM.bind(null,Et,t),[i.memoizedState,t]},useRef:function(t){var e=vi();return t={current:t},e.memoizedState=t},useState:Gg,useDebugValue:lm,useDeferredValue:function(t){return vi().memoizedState=t},useTransition:function(){var t=Gg(!1),e=t[0];return t=VM.bind(null,t[1]),vi().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var i=Et,r=vi();if(_t){if(n===void 0)throw Error(we(407));n=n()}else{if(n=e(),Gt===null)throw Error(we(349));Ps&30||Mx(i,e,n)}r.memoizedState=n;var s={value:n,getSnapshot:e};return r.queue=s,Wg(bx.bind(null,i,s,t),[t]),i.flags|=2048,vl(9,Tx.bind(null,i,s,n,e),void 0,null),n},useId:function(){var t=vi(),e=Gt.identifierPrefix;if(_t){var n=Zi,i=$i;n=(i&~(1<<32-ai(i)-1)).toString(32)+n,e=":"+e+"R"+n,n=ml++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=HM++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},jM={readContext:Yn,useCallback:Ix,useContext:Yn,useEffect:am,useImperativeHandle:Dx,useInsertionEffect:Px,useLayoutEffect:Lx,useMemo:Ux,useReducer:kf,useRef:Rx,useState:function(){return kf(gl)},useDebugValue:lm,useDeferredValue:function(t){var e=qn();return Ox(e,Ut.memoizedState,t)},useTransition:function(){var t=kf(gl)[0],e=qn().memoizedState;return[t,e]},useMutableSource:wx,useSyncExternalStore:Ex,useId:Fx,unstable_isNewReconciler:!1},YM={readContext:Yn,useCallback:Ix,useContext:Yn,useEffect:am,useImperativeHandle:Dx,useInsertionEffect:Px,useLayoutEffect:Lx,useMemo:Ux,useReducer:zf,useRef:Rx,useState:function(){return zf(gl)},useDebugValue:lm,useDeferredValue:function(t){var e=qn();return Ut===null?e.memoizedState=t:Ox(e,Ut.memoizedState,t)},useTransition:function(){var t=zf(gl)[0],e=qn().memoizedState;return[t,e]},useMutableSource:wx,useSyncExternalStore:Ex,useId:Fx,unstable_isNewReconciler:!1};function ei(t,e){if(t&&t.defaultProps){e=Tt({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function uh(t,e,n,i){e=t.memoizedState,n=n(i,e),n=n==null?e:Tt({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var ju={isMounted:function(t){return(t=t._reactInternals)?zs(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var i=un(),r=zr(t),s=Ji(i,r);s.payload=e,n!=null&&(s.callback=n),e=Fr(t,s,r),e!==null&&(li(e,t,r,i),Vc(e,t,r))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var i=un(),r=zr(t),s=Ji(i,r);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=Fr(t,s,r),e!==null&&(li(e,t,r,i),Vc(e,t,r))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=un(),i=zr(t),r=Ji(n,i);r.tag=2,e!=null&&(r.callback=e),e=Fr(t,r,i),e!==null&&(li(e,t,i,n),Vc(e,t,i))}};function Xg(t,e,n,i,r,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(i,s,o):e.prototype&&e.prototype.isPureReactComponent?!cl(n,i)||!cl(r,s):!0}function Hx(t,e,n){var i=!1,r=Wr,s=e.contextType;return typeof s=="object"&&s!==null?s=Yn(s):(r=yn(e)?Cs:rn.current,i=e.contextTypes,s=(i=i!=null)?Ho(t,r):Wr),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=ju,t.stateNode=e,e._reactInternals=t,i&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=s),e}function jg(t,e,n,i){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,i),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,i),e.state!==t&&ju.enqueueReplaceState(e,e.state,null)}function fh(t,e,n,i){var r=t.stateNode;r.props=n,r.state=t.memoizedState,r.refs={},em(t);var s=e.contextType;typeof s=="object"&&s!==null?r.context=Yn(s):(s=yn(e)?Cs:rn.current,r.context=Ho(t,s)),r.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(uh(t,e,s,n),r.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(e=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),e!==r.state&&ju.enqueueReplaceState(r,r.state,null),_u(t,n,r,i),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308)}function Xo(t,e){try{var n="",i=e;do n+=SE(i),i=i.return;while(i);var r=n}catch(s){r=` 39Error generating stack: `+s.message+` 40`+s.stack}return{value:t,source:e,stack:r,digest:null}}function Bf(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function dh(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var qM=typeof WeakMap=="function"?WeakMap:Map;function Vx(t,e,n){n=Ji(-1,n),n.tag=3,n.payload={element:null};var i=e.value;return n.callback=function(){Tu||(Tu=!0,wh=i),dh(t,e)},n}function Gx(t,e,n){n=Ji(-1,n),n.tag=3;var i=t.type.getDerivedStateFromError;if(typeof i=="function"){var r=e.value;n.payload=function(){return i(r)},n.callback=function(){dh(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){dh(t,e),typeof i!="function"&&(kr===null?kr=new Set([this]):kr.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function Yg(t,e,n){var i=t.pingCache;if(i===null){i=t.pingCache=new qM;var r=new Set;i.set(e,r)}else r=i.get(e),r===void 0&&(r=new Set,i.set(e,r));r.has(n)||(r.add(n),t=l1.bind(null,t,e,n),e.then(t,t))}function qg(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function $g(t,e,n,i,r){return t.mode&1?(t.flags|=65536,t.lanes=r,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Ji(-1,1),e.tag=2,Fr(n,e,1))),n.lanes|=1),t)}var $M=ar.ReactCurrentOwner,gn=!1;function ln(t,e,n,i){e.child=t===null?yx(e,null,n,i):Go(e,t.child,n,i)}function Zg(t,e,n,i,r){n=n.render;var s=e.ref;return Eo(e,r),i=sm(t,e,n,i,s,r),n=om(),t!==null&&!gn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r,rr(t,e,r)):(_t&&n&&Yp(e),e.flags|=1,ln(t,e,i,r),e.child)}function Kg(t,e,n,i,r){if(t===null){var s=n.type;return typeof s=="function"&&!gm(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,Wx(t,e,s,i,r)):(t=qc(n.type,null,i,e,e.mode,r),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&r)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:cl,n(o,i)&&t.ref===e.ref)return rr(t,e,r)}return e.flags|=1,t=Br(s,i),t.ref=e.ref,t.return=e,e.child=t}function Wx(t,e,n,i,r){if(t!==null){var s=t.memoizedProps;if(cl(s,i)&&t.ref===e.ref)if(gn=!1,e.pendingProps=i=s,(t.lanes&r)!==0)t.flags&131072&&(gn=!0);else return e.lanes=t.lanes,rr(t,e,r)}return hh(t,e,n,i,r)}function Xx(t,e,n){var i=e.pendingProps,r=i.children,s=t!==null?t.memoizedState:null;if(i.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},mt(go,An),An|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,mt(go,An),An|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=s!==null?s.baseLanes:n,mt(go,An),An|=i}else s!==null?(i=s.baseLanes|n,e.memoizedState=null):i=n,mt(go,An),An|=i;return ln(t,e,r,n),e.child}function jx(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}
vendor: 5,244 bytes, line 40
40function hh(t,e,n,i,r){var s=yn(n)?Cs:rn.current;return s=Ho(e,s),Eo(e,r),n=sm(t,e,n,i,s,r),i=om(),t!==null&&!gn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r,rr(t,e,r)):(_t&&i&&Yp(e),e.flags|=1,ln(t,e,n,r),e.child)}function Qg(t,e,n,i,r){if(yn(n)){var s=!0;mu(e)}else s=!1;if(Eo(e,r),e.stateNode===null)Xc(t,e),Hx(e,n,i),fh(e,n,i,r),i=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Yn(c):(c=yn(n)?Cs:rn.current,c=Ho(e,c));var u=n.getDerivedStateFromProps,f=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==i||l!==c)&&jg(e,o,i,c),Sr=!1;var h=e.memoizedState;o.state=h,_u(e,i,o,r),l=e.memoizedState,a!==i||h!==l||vn.current||Sr?(typeof u=="function"&&(uh(e,n,u,i),l=e.memoizedState),(a=Sr||Xg(e,n,a,i,h,l,c))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=i,e.memoizedState=l),o.props=i,o.state=l,o.context=c,i=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),i=!1)}else{o=e.stateNode,_x(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:ei(e.type,a),o.props=c,f=e.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Yn(l):(l=yn(n)?Cs:rn.current,l=Ho(e,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||h!==l)&&jg(e,o,i,l),Sr=!1,h=e.memoizedState,o.state=h,_u(e,i,o,r);var v=e.memoizedState;a!==f||h!==v||vn.current||Sr?(typeof p=="function"&&(uh(e,n,p,i),v=e.memoizedState),(c=Sr||Xg(e,n,c,i,h,v,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(i,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(i,v,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=i,e.memoizedState=v),o.props=i,o.state=v,o.context=l,i=c):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),i=!1)}return ph(t,e,n,i,s,r)}function ph(t,e,n,i,r,s){jx(t,e);var o=(e.flags&128)!==0;if(!i&&!o)return r&&Fg(e,n,!1),rr(t,e,s);i=e.stateNode,$M.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:i.render();return e.flags|=1,t!==null&&o?(e.child=Go(e,t.child,null,s),e.child=Go(e,null,a,s)):ln(t,e,a,s),e.memoizedState=i.state,r&&Fg(e,n,!0),e.child}function Yx(t){var e=t.stateNode;e.pendingContext?Og(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Og(t,e.context,!1),tm(t,e.containerInfo)}function Jg(t,e,n,i,r){return Vo(),$p(r),e.flags|=256,ln(t,e,n,i),e.child}var mh={dehydrated:null,treeContext:null,retryLane:0};function gh(t){return{baseLanes:t,cachePool:null,transitions:null}}function qx(t,e,n){var i=e.pendingProps,r=St.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(r&2)!==0),a?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(r|=1),mt(St,r&1),t===null)return lh(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=i.children,t=i.fallback,s?(i=e.mode,s=e.child,o={mode:"hidden",children:o},!(i&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=$u(o,i,0,null),t=As(t,i,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=gh(n),e.memoizedState=mh,t):cm(e,o));if(r=t.memoizedState,r!==null&&(a=r.dehydrated,a!==null))return ZM(t,e,o,i,a,r,n);if(s){s=i.fallback,o=e.mode,r=t.child,a=r.sibling;var l={mode:"hidden",children:i.children};return!(o&1)&&e.child!==r?(i=e.child,i.childLanes=0,i.pendingProps=l,e.deletions=null):(i=Br(r,l),i.subtreeFlags=r.subtreeFlags&14680064),a!==null?s=Br(a,s):(s=As(s,o,n,null),s.flags|=2),s.return=e,i.return=e,i.sibling=s,e.child=i,i=s,s=e.child,o=t.child.memoizedState,o=o===null?gh(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=mh,i}return s=t.child,t=s.sibling,i=Br(s,{mode:"visible",children:i.children}),!(e.mode&1)&&(i.lanes=n),i.return=e,i.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=i,e.memoizedState=null,i}function cm(t,e){return e=$u({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function ic(t,e,n,i){return i!==null&&$p(i),Go(e,t.child,null,n),t=cm(e,e.pen
vendor: 4,865 bytes, line 40
40dingProps.children),t.flags|=2,e.memoizedState=null,t}function ZM(t,e,n,i,r,s,o){if(n)return e.flags&256?(e.flags&=-257,i=Bf(Error(we(422))),ic(t,e,o,i)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=i.fallback,r=e.mode,i=$u({mode:"visible",children:i.children},r,0,null),s=As(s,r,o,null),s.flags|=2,i.return=e,s.return=e,i.sibling=s,e.child=i,e.mode&1&&Go(e,t.child,null,o),e.child.memoizedState=gh(o),e.memoizedState=mh,s);if(!(e.mode&1))return ic(t,e,o,null);if(r.data==="$!"){if(i=r.nextSibling&&r.nextSibling.dataset,i)var a=i.dgst;return i=a,s=Error(we(419)),i=Bf(s,i,void 0),ic(t,e,o,i)}if(a=(o&t.childLanes)!==0,gn||a){if(i=Gt,i!==null){switch(o&-o){case 4:r=2;break;case 16:r=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(i.suspendedLanes|o)?0:r,r!==0&&r!==s.retryLane&&(s.retryLane=r,ir(t,r),li(i,t,r,-1))}return mm(),i=Bf(Error(we(421))),ic(t,e,o,i)}return r.data==="$?"?(e.flags|=128,e.child=t.child,e=c1.bind(null,t),r._reactRetry=e,null):(t=s.treeContext,Pn=Or(r.nextSibling),Ln=e,_t=!0,ri=null,t!==null&&(Hn[Vn++]=$i,Hn[Vn++]=Zi,Hn[Vn++]=Rs,$i=t.id,Zi=t.overflow,Rs=e),e=cm(e,i.children),e.flags|=4096,e)}function ev(t,e,n){t.lanes|=e;var i=t.alternate;i!==null&&(i.lanes|=e),ch(t.return,e,n)}function Hf(t,e,n,i,r){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:r}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=i,s.tail=n,s.tailMode=r)}function $x(t,e,n){var i=e.pendingProps,r=i.revealOrder,s=i.tail;if(ln(t,e,i.children,n),i=St.current,i&2)i=i&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&ev(t,n,e);else if(t.tag===19)ev(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}i&=1}if(mt(St,i),!(e.mode&1))e.memoizedState=null;else switch(r){case"forwards":for(n=e.child,r=null;n!==null;)t=n.alternate,t!==null&&Su(t)===null&&(r=n),n=n.sibling;n=r,n===null?(r=e.child,e.child=null):(r=n.sibling,n.sibling=null),Hf(e,!1,r,n,s);break;case"backwards":for(n=null,r=e.child,e.child=null;r!==null;){if(t=r.alternate,t!==null&&Su(t)===null){e.child=r;break}t=r.sibling,r.sibling=n,n=r,r=t}Hf(e,!0,n,null,s);break;case"together":Hf(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Xc(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function rr(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Ls|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(we(153));if(e.child!==null){for(t=e.child,n=Br(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Br(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function KM(t,e,n){switch(e.tag){case 3:Yx(e),Vo();break;case 5:Sx(e);break;case 1:yn(e.type)&&mu(e);break;case 4:tm(e,e.stateNode.containerInfo);break;case 10:var i=e.type._context,r=e.memoizedProps.value;mt(yu,i._currentValue),i._currentValue=r;break;case 13:if(i=e.memoizedState,i!==null)return i.dehydrated!==null?(mt(St,St.current&1),e.flags|=128,null):n&e.child.childLanes?qx(t,e,n):(mt(St,St.current&1),t=rr(t,e,n),t!==null?t.sibling:null);mt(St,St.current&1);break;case 19:if(i=(n&e.childLanes)!==0,t.flags&128){if(i)return $x(t,e,n);e.flags|=128}if(r=e.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),mt(St,St.current),i)break;return null;case 22:case 23:return e.lanes=0,Xx(t,e,n)}return rr(t,e,n)}var Zx,vh,Kx,Qx;Zx=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};vh=function(){};Kx=function(t,e,n,i){var r=t.memoizedProps;if(r!==i){t=e.stateNode,xs(Ai.current);var s=null;switch(n){case"input":r=zd(t,r),i=zd(t,i),s=[];break;case"select":r=Tt({},r,{value:void 0}),i=Tt({},i,{value:void 0}),s=[];break;case"textarea":r=Vd(t,r),i=Vd(t,i),s=[];break;default:typeof r.onClick!="function"&&typeof i.onClick=="function"&&(t.onclick=hu)}Wd(n,i);var o;n=null;for(c in r)if(!i.hasOwnProperty(c)&&r.hasOwnProperty(c)&&r[c]!=null)if(c==="style"){var a=r[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(nl.hasOwnProperty(c)?s||
vendor: 5,321 bytes, line 40
40(s=[]):(s=s||[]).push(c,null));for(c in i){var l=i[c];if(a=r!=null?r[c]:void 0,i.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(nl.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&vt("scroll",t),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(e.updateQueue=c)&&(e.flags|=4)}};Qx=function(t,e,n,i){n!==i&&(e.flags|=4)};function wa(t,e){if(!_t)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:i.sibling=null}}function Kt(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,i=0;if(e)for(var r=t.child;r!==null;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags&14680064,i|=r.flags&14680064,r.return=t,r=r.sibling;else for(r=t.child;r!==null;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=t,r=r.sibling;return t.subtreeFlags|=i,t.childLanes=n,e}function QM(t,e,n){var i=e.pendingProps;switch(qp(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kt(e),null;case 1:return yn(e.type)&&pu(),Kt(e),null;case 3:return i=e.stateNode,Wo(),yt(vn),yt(rn),im(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(tc(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,ri!==null&&(Th(ri),ri=null))),vh(t,e),Kt(e),null;case 5:nm(e);var r=xs(pl.current);if(n=e.type,t!==null&&e.stateNode!=null)Kx(t,e,n,i,r),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!i){if(e.stateNode===null)throw Error(we(166));return Kt(e),null}if(t=xs(Ai.current),tc(e)){i=e.stateNode,n=e.type;var s=e.memoizedProps;switch(i[wi]=e,i[dl]=s,t=(e.mode&1)!==0,n){case"dialog":vt("cancel",i),vt("close",i);break;case"iframe":case"object":case"embed":vt("load",i);break;case"video":case"audio":for(r=0;r<Fa.length;r++)vt(Fa[r],i);break;case"source":vt("error",i);break;case"img":case"image":case"link":vt("error",i),vt("load",i);break;case"details":vt("toggle",i);break;case"input":cg(i,s),vt("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!s.multiple},vt("invalid",i);break;case"textarea":fg(i,s),vt("invalid",i)}Wd(n,s),r=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?i.textContent!==a&&(s.suppressHydrationWarning!==!0&&ec(i.textContent,a,t),r=["children",a]):typeof a=="number"&&i.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&ec(i.textContent,a,t),r=["children",""+a]):nl.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&vt("scroll",i)}switch(n){case"input":jl(i),ug(i,s,!0);break;case"textarea":jl(i),dg(i);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(i.onclick=hu)}i=r,e.updateQueue=i,i!==null&&(e.flags|=4)}else{o=r.nodeType===9?r:r.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=by(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof i.is=="string"?t=o.createElement(n,{is:i.is}):(t=o.createElement(n),n==="select"&&(o=t,i.multiple?o.multiple=!0:i.size&&(o.size=i.size))):t=o.createElementNS(t,n),t[wi]=e,t[dl]=i,Zx(t,e,!1,!1),e.stateNode=t;e:{switch(o=Xd(n,i),n){case"dialog":vt("cancel",t),vt("close",t),r=i;break;case"iframe":case"object":case"embed":vt("load",t),r=i;break;case"video":case"audio":for(r=0;r<Fa.length;r++)vt(Fa[r],t);r=i;break;case"source":vt("error",t),r=i;break;case"img":case"image":case"link":vt("error",t),vt("load",t),r=i;break;case"details":vt("toggle",t),r=i;break;case"input":cg(t,i),r=zd(t,i),vt("invalid",t);break;case"option":r=i;break;case"select":t._wrapperState={wasMultiple:!!i.multiple},r=Tt({},i,{value:void 0}),vt("invalid",t);break;case"textarea":fg(t,i),r=Vd(t,i),vt("invalid",t);break;default:r=i}Wd(n,r),a=r;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?Ry(t,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Ay(t,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&il(t,l):typeof l=="number"&&il(t,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(nl.hasOwnProperty(s)?l!=null&&s==="onScroll"&&vt("scroll",t):l!=null&&Dp(t,s,l,o))}switch(n){case"input":jl(t),ug(t,i,!1);break;case"textarea":jl(t),dg(t);break;case"option":i.value!=null&&t.setAttribute("value",""+Gr(i.value));break;case"select":t.multiple=!!i.multiple,s=i.value,s!=null?xo(t,!!i.multiple,s,!1):i.defaultValue!=null&&xo(t,!!i.multiple,i.defaultValue,!0);break;default:typeof r.onClick=="function"&&(t.onclick=hu)}switch(n){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}
vendor: 29,290 bytes, line 40
40return Kt(e),null;case 6:if(t&&e.stateNode!=null)Qx(t,e,t.memoizedProps,i);else{if(typeof i!="string"&&e.stateNode===null)throw Error(we(166));if(n=xs(pl.current),xs(Ai.current),tc(e)){if(i=e.stateNode,n=e.memoizedProps,i[wi]=e,(s=i.nodeValue!==n)&&(t=Ln,t!==null))switch(t.tag){case 3:ec(i.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&ec(i.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[wi]=e,e.stateNode=i}return Kt(e),null;case 13:if(yt(St),i=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(_t&&Pn!==null&&e.mode&1&&!(e.flags&128))gx(),Vo(),e.flags|=98560,s=!1;else if(s=tc(e),i!==null&&i.dehydrated!==null){if(t===null){if(!s)throw Error(we(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(we(317));s[wi]=e}else Vo(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Kt(e),s=!1}else ri!==null&&(Th(ri),ri=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(i=i!==null,i!==(t!==null&&t.memoizedState!==null)&&i&&(e.child.flags|=8192,e.mode&1&&(t===null||St.current&1?Ft===0&&(Ft=3):mm())),e.updateQueue!==null&&(e.flags|=4),Kt(e),null);case 4:return Wo(),vh(t,e),t===null&&ul(e.stateNode.containerInfo),Kt(e),null;case 10:return Qp(e.type._context),Kt(e),null;case 17:return yn(e.type)&&pu(),Kt(e),null;case 19:if(yt(St),s=e.memoizedState,s===null)return Kt(e),null;if(i=(e.flags&128)!==0,o=s.rendering,o===null)if(i)wa(s,!1);else{if(Ft!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Su(t),o!==null){for(e.flags|=128,wa(s,!1),i=o.updateQueue,i!==null&&(e.updateQueue=i,e.flags|=4),e.subtreeFlags=0,i=n,n=e.child;n!==null;)s=n,t=i,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return mt(St,St.current&1|2),e.child}t=t.sibling}s.tail!==null&&Pt()>jo&&(e.flags|=128,i=!0,wa(s,!1),e.lanes=4194304)}else{if(!i)if(t=Su(o),t!==null){if(e.flags|=128,i=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),wa(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!_t)return Kt(e),null}else 2*Pt()-s.renderingStartTime>jo&&n!==1073741824&&(e.flags|=128,i=!0,wa(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Pt(),e.sibling=null,n=St.current,mt(St,i?n&1|2:n&1),e):(Kt(e),null);case 22:case 23:return pm(),i=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?An&1073741824&&(Kt(e),e.subtreeFlags&6&&(e.flags|=8192)):Kt(e),null;case 24:return null;case 25:return null}throw Error(we(156,e.tag))}function JM(t,e){switch(qp(e),e.tag){case 1:return yn(e.type)&&pu(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Wo(),yt(vn),yt(rn),im(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return nm(e),null;case 13:if(yt(St),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(we(340));Vo()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return yt(St),null;case 4:return Wo(),null;case 10:return Qp(e.type._context),null;case 22:case 23:return pm(),null;case 24:return null;default:return null}}var rc=!1,tn=!1,e1=typeof WeakSet=="function"?WeakSet:Set,Ue=null;function mo(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){Ct(t,e,i)}else n.current=null}function yh(t,e,n){try{n()}catch(i){Ct(t,e,i)}}var tv=!1;function t1(t,e){if(th=uu,t=ix(),jp(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var r=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,u=0,f=t,h=null;t:for(;;){for(var p;f!==n||r!==0&&f.nodeType!==3||(a=o+r),f!==s||i!==0&&f.nodeType!==3||(l=o+i),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===t)break t;if(h===n&&++c===r&&(a=o),h===s&&++u===i&&(l=o),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(nh={focusedElem:t,selectionRange:n},uu=!1,Ue=e;Ue!==null;)if(e=Ue,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Ue=t;else for(;Ue!==null;){e=Ue;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,m=v.memoizedState,d=e.stateNode,_=d.getSnapshotBeforeUpdate(e.elementType===e.type?y:ei(e.type,y),m);d.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var g=e.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(we(163))}}catch(x){Ct(e,e.return,x)}if(t=e.sibling,t!==null){t.return=e.return,Ue=t;break}Ue=e.return}return v=tv,tv=!1,v}function $a(t,e,n){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&t)===t){var s=r.destroy;r.destroy=void 0,s!==void 0&&yh(e,n,s)}r=r.next}while(r!==i)}}function Yu(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var i=n.create;n.destroy=i()}n=n.next}while(n!==e)}}function xh(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function Jx(t){var e=t.alternate;e!==null&&(t.alternate=null,Jx(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[wi],delete e[dl],delete e[sh],delete e[FM],delete e[kM])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function e_(t){return t.tag===5||t.tag===3||t.tag===4}function nv(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||e_(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function _h(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=hu));else if(i!==4&&(t=t.child,t!==null))for(_h(t,e,n),t=t.sibling;t!==null;)_h(t,e,n),t=t.sibling}function Sh(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(i!==4&&(t=t.child,t!==null))for(Sh(t,e,n),t=t.sibling;t!==null;)Sh(t,e,n),t=t.sibling}var Xt=null,ii=!1;function ur(t,e,n){for(n=n.child;n!==null;)t_(t,e,n),n=n.sibling}function t_(t,e,n){if(bi&&typeof bi.onCommitFiberUnmount=="function")try{bi.onCommitFiberUnmount(zu,n)}catch{}switch(n.tag){case 5:tn||mo(n,e);case 6:var i=Xt,r=ii;Xt=null,ur(t,e,n),Xt=i,ii=r,Xt!==null&&(ii?(t=Xt,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Xt.removeChild(n.stateNode));break;case 18:Xt!==null&&(ii?(t=Xt,n=n.stateNode,t.nodeType===8?If(t.parentNode,n):t.nodeType===1&&If(t,n),al(t)):If(Xt,n.stateNode));break;case 4:i=Xt,r=ii,Xt=n.stateNode.containerInfo,ii=!0,ur(t,e,n),Xt=i,ii=r;break;case 0:case 11:case 14:case 15:if(!tn&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var s=r,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&yh(n,e,o),r=r.next}while(r!==i)}ur(t,e,n);break;case 1:if(!tn&&(mo(n,e),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(a){Ct(n,e,a)}ur(t,e,n);break;case 21:ur(t,e,n);break;case 22:n.mode&1?(tn=(i=tn)||n.memoizedState!==null,ur(t,e,n),tn=i):ur(t,e,n);break;default:ur(t,e,n)}}function iv(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new e1),e.forEach(function(i){var r=u1.bind(null,t,i);n.has(i)||(n.add(i),i.then(r,r))})}}function Zn(t,e){var n=e.deletions;if(n!==null)for(var i=0;i<n.length;i++){var r=n[i];try{var s=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Xt=a.stateNode,ii=!1;break e;case 3:Xt=a.stateNode.containerInfo,ii=!0;break e;case 4:Xt=a.stateNode.containerInfo,ii=!0;break e}a=a.return}if(Xt===null)throw Error(we(160));t_(s,o,r),Xt=null,ii=!1;var l=r.alternate;l!==null&&(l.return=null),r.return=null}catch(c){Ct(r,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)n_(e,t),e=e.sibling}function n_(t,e){var n=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Zn(e,t),gi(t),i&4){try{$a(3,t,t.return),Yu(3,t)}catch(y){Ct(t,t.return,y)}try{$a(5,t,t.return)}catch(y){Ct(t,t.return,y)}}break;case 1:Zn(e,t),gi(t),i&512&&n!==null&&mo(n,n.return);break;case 5:if(Zn(e,t),gi(t),i&512&&n!==null&&mo(n,n.return),t.flags&32){var r=t.stateNode;try{il(r,"")}catch(y){Ct(t,t.return,y)}}if(i&4&&(r=t.stateNode,r!=null)){var s=t.memoizedProps,o=n!==null?n.memoizedProps:s,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&My(r,s),Xd(a,o);var c=Xd(a,s);for(o=0;o<l.length;o+=2){var u=l[o],f=l[o+1];u==="style"?Ry(r,f):u==="dangerouslySetInnerHTML"?Ay(r,f):u==="children"?il(r,f):Dp(r,u,f,c)}switch(a){case"input":Bd(r,s);break;case"textarea":Ty(r,s);break;case"select":var h=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?xo(r,!!s.multiple,p,!1):h!==!!s.multiple&&(s.defaultValue!=null?xo(r,!!s.multiple,s.defaultValue,!0):xo(r,!!s.multiple,s.multiple?[]:"",!1))}r[dl]=s}catch(y){Ct(t,t.return,y)}}break;case 6:if(Zn(e,t),gi(t),i&4){if(t.stateNode===null)throw Error(we(162));r=t.stateNode,s=t.memoizedProps;try{r.nodeValue=s}catch(y){Ct(t,t.return,y)}}break;case 3:if(Zn(e,t),gi(t),i&4&&n!==null&&n.memoizedState.isDehydrated)try{al(e.containerInfo)}catch(y){Ct(t,t.return,y)}break;case 4:Zn(e,t),gi(t);break;case 13:Zn(e,t),gi(t),r=t.child,r.flags&8192&&(s=r.memoizedState!==null,r.stateNode.isHidden=s,!s||r.alternate!==null&&r.alternate.memoizedState!==null||(dm=Pt())),i&4&&iv(t);break;case 22:if(u=n!==null&&n.memoizedState!==null,t.mode&1?(tn=(c=tn)||u,Zn(e,t),tn=c):Zn(e,t),gi(t),i&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(Ue=t,u=t.child;u!==null;){for(f=Ue=u;Ue!==null;){switch(h=Ue,p=h.child,h.tag){case 0:case 11:case 14:case 15:$a(4,h,h.return);break;case 1:mo(h,h.return);var v=h.stateNode;if(typeof v.componentWillUnmount=="function"){i=h,n=h.return;try{e=i,v.props=e.memoizedProps,v.state=e.memoizedState,v.componentWillUnmount()}catch(y){Ct(i,n,y)}}break;case 5:mo(h,h.return);break;case 22:if(h.memoizedState!==null){sv(f);continue}}p!==null?(p.return=h,Ue=p):sv(f)}u=u.sibling}e:for(u=null,f=t;;){if(f.tag===5){if(u===null){u=f;try{r=f.stateNode,c?(s=r.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Cy("display",o))}catch(y){Ct(t,t.return,y)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(y){Ct(t,t.return,y)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===t)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Zn(e,t),gi(t),i&4&&iv(t);break;case 21:break;default:Zn(e,t),gi(t)}}function gi(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(e_(n)){var i=n;break e}n=n.return}throw Error(we(160))}switch(i.tag){case 5:var r=i.stateNode;i.flags&32&&(il(r,""),i.flags&=-33);var s=nv(t);Sh(t,s,r);break;case 3:case 4:var o=i.stateNode.containerInfo,a=nv(t);_h(t,a,o);break;default:throw Error(we(161))}}catch(l){Ct(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function n1(t,e,n){Ue=t,i_(t)}function i_(t,e,n){for(var i=(t.mode&1)!==0;Ue!==null;){var r=Ue,s=r.child;if(r.tag===22&&i){var o=r.memoizedState!==null||rc;if(!o){var a=r.alternate,l=a!==null&&a.memoizedState!==null||tn;a=rc;var c=tn;if(rc=o,(tn=l)&&!c)for(Ue=r;Ue!==null;)o=Ue,l=o.child,o.tag===22&&o.memoizedState!==null?ov(r):l!==null?(l.return=o,Ue=l):ov(r);for(;s!==null;)Ue=s,i_(s),s=s.sibling;Ue=r,rc=a,tn=c}rv(t)}else r.subtreeFlags&8772&&s!==null?(s.return=r,Ue=s):rv(t)}}function rv(t){for(;Ue!==null;){var e=Ue;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:tn||Yu(5,e);break;case 1:var i=e.stateNode;if(e.flags&4&&!tn)if(n===null)i.componentDidMount();else{var r=e.elementType===e.type?n.memoizedProps:ei(e.type,n.memoizedProps);i.componentDidUpdate(r,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&Vg(e,s,i);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}Vg(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var f=u.dehydrated;f!==null&&al(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(we(163))}tn||e.flags&512&&xh(e)}catch(h){Ct(e,e.return,h)}}if(e===t){Ue=null;break}if(n=e.sibling,n!==null){n.return=e.return,Ue=n;break}Ue=e.return}}function sv(t){for(;Ue!==null;){var e=Ue;if(e===t){Ue=null;break}var n=e.sibling;if(n!==null){n.return=e.return,Ue=n;break}Ue=e.return}}function ov(t){for(;Ue!==null;){var e=Ue;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{Yu(4,e)}catch(l){Ct(e,n,l)}break;case 1:var i=e.stateNode;if(typeof i.componentDidMount=="function"){var r=e.return;try{i.componentDidMount()}catch(l){Ct(e,r,l)}}var s=e.return;try{xh(e)}catch(l){Ct(e,s,l)}break;case 5:var o=e.return;try{xh(e)}catch(l){Ct(e,o,l)}}}catch(l){Ct(e,e.return,l)}if(e===t){Ue=null;break}var a=e.sibling;if(a!==null){a.return=e.return,Ue=a;break}Ue=e.return}}var i1=Math.ceil,Mu=ar.ReactCurrentDispatcher,um=ar.ReactCurrentOwner,Xn=ar.ReactCurrentBatchConfig,it=0,Gt=null,Dt=null,jt=0,An=0,go=Kr(0),Ft=0,yl=null,Ls=0,qu=0,fm=0,Za=null,mn=null,dm=0,jo=1/0,Yi=null,Tu=!1,wh=null,kr=null,sc=!1,Lr=null,bu=0,Ka=0,Eh=null,jc=-1,Yc=0;function un(){return it&6?Pt():jc!==-1?jc:jc=Pt()}function zr(t){return t.mode&1?it&2&&jt!==0?jt&-jt:BM.transition!==null?(Yc===0&&(Yc=Hy()),Yc):(t=ft,t!==0||(t=window.event,t=t===void 0?16:qy(t.type)),t):1}function li(t,e,n,i){if(50<Ka)throw Ka=0,Eh=null,Error(we(185));Dl(t,n,i),(!(it&2)||t!==Gt)&&(t===Gt&&(!(it&2)&&(qu|=n),Ft===4&&Er(t,jt)),xn(t,i),n===1&&it===0&&!(e.mode&1)&&(jo=Pt()+500,Wu&&Qr()))}function xn(t,e){var n=t.callbackNode;BE(t,e);var i=cu(t,t===Gt?jt:0);if(i===0)n!==null&&mg(n),t.callbackNode=null,t.callbackPriority=0;else if(e=i&-i,t.callbackPriority!==e){if(n!=null&&mg(n),e===1)t.tag===0?zM(av.bind(null,t)):hx(av.bind(null,t)),UM(function(){!(it&6)&&Qr()}),n=null;else{switch(Vy(i)){case 1:n=kp;break;case 4:n=zy;break;case 16:n=lu;break;case 536870912:n=By;break;default:n=lu}n=f_(n,r_.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function r_(t,e){if(jc=-1,Yc=0,it&6)throw Error(we(327));var n=t.callbackNode;if(Mo()&&t.callbackNode!==n)return null;var i=cu(t,t===Gt?jt:0);if(i===0)return null;if(i&30||i&t.expiredLanes||e)e=Au(t,i);else{e=i;var r=it;it|=2;var s=o_();(Gt!==t||jt!==e)&&(Yi=null,jo=Pt()+500,bs(t,e));do try{o1();break}catch(a){s_(t,a)}while(!0);Kp(),Mu.current=s,it=r,Dt!==null?e=0:(Gt=null,jt=0,e=Ft)}if(e!==0){if(e===2&&(r=Zd(t),r!==0&&(i=r,e=Mh(t,r))),e===1)throw n=yl,bs(t,0),Er(t,i),xn(t,Pt()),n;if(e===6)Er(t,i);else{if(r=t.current.alternate,!(i&30)&&!r1(r)&&(e=Au(t,i),e===2&&(s=Zd(t),s!==0&&(i=s,e=Mh(t,s))),e===1))throw n=yl,bs(t,0),Er(t,i),xn(t,Pt()),n;switch(t.finishedWork=r,t.finishedLanes=i,e){case 0:case 1:throw Error(we(345));case 2:ds(t,mn,Yi);break;case 3:if(Er(t,i),(i&130023424)===i&&(e=dm+500-Pt(),10<e)){if(cu(t,0)!==0)break;if(r=t.suspendedLanes,(r&i)!==i){un(),t.pingedLanes|=t.suspendedLanes&r;break}t.timeoutHandle=rh(ds.bind(null,t,mn,Yi),e);break}ds(t,mn,Yi);break;case 4:if(Er(t,i),(i&4194240)===i)break;for(e=t.eventTimes,r=-1;0<i;){var o=31-ai(i);s=1<<o,o=e[o],o>r&&(r=o),i&=~s}if(i=r,i=Pt()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*i1(i/1960))-i,10<i){t.timeoutHandle=rh(ds.bind(null,t,mn,Yi),i);break}ds(t,mn,Yi);break;case 5:ds(t,mn,Yi);break;default:throw Error(we(329))}}}return xn(t,Pt()),t.callbackNode===n?r_.bind(null,t):null}function Mh(t,e){var n=Za;return t.current.memoizedState.isDehydrated&&(bs(t,e).flags|=256),t=Au(t,e),t!==2&&(e=mn,mn=n,e!==null&&Th(e)),t}function Th(t){mn===null?mn=t:mn.push.apply(mn,t)}function r1(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var i=0;i<n.length;i++){var r=n[i],s=r.getSnapshot;r=r.value;try{if(!ui(s(),r))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Er(t,e){for(e&=~fm,e&=~qu,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-ai(e),i=1<<n;t[n]=-1,e&=~i}}function av(t){if(it&6)throw Error(we(327));Mo();var e=cu(t,0);if(!(e&1))return xn(t,Pt()),null;var n=Au(t,e);if(t.tag!==0&&n===2){var i=Zd(t);i!==0&&(e=i,n=Mh(t,i))}if(n===1)throw n=yl,bs(t,0),Er(t,e),xn(t,Pt()),n;if(n===6)throw Error(we(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,ds(t,mn,Yi),xn(t,Pt()),null}function hm(t,e){var n=it;it|=1;try{return t(e)}finally{it=n,it===0&&(jo=Pt()+500,Wu&&Qr())}}function Ns(t){Lr!==null&&Lr.tag===0&&!(it&6)&&Mo();var e=it;it|=1;var n=Xn.transition,i=ft;try{if(Xn.transition=null,ft=1,t)return t()}finally{ft=i,Xn.transition=n,it=e,!(it&6)&&Qr()}}function pm(){An=go.current,yt(go)}function bs(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,IM(n)),Dt!==null)for(n=Dt.return;n!==null;){var i=n;switch(qp(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&pu();break;case 3:Wo(),yt(vn),yt(rn),im();break;case 5:nm(i);break;case 4:Wo();break;case 13:yt(St);break;case 19:yt(St);break;case 10:Qp(i.type._context);break;case 22:case 23:pm()}n=n.return}if(Gt=t,Dt=t=Br(t.current,null),jt=An=e,Ft=0,yl=null,fm=qu=Ls=0,mn=Za=null,ys!==null){for(e=0;e<ys.length;e++)if(n=ys[e],i=n.interleaved,i!==null){n.interleaved=null;var r=i.next,s=n.pending;if(s!==null){var o=s.next;s.next=r,i.next=o}n.pending=i}ys=null}return t}function s_(t,e){do{var n=Dt;try{if(Kp(),Gc.current=Eu,wu){for(var i=Et.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}wu=!1}if(Ps=0,Vt=Ut=Et=null,qa=!1,ml=0,um.current=null,n===null||n.return===null){Ft=1,yl=e,Dt=null;break}e:{var s=t,o=n.return,a=n,l=e;if(e=jt,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,f=u.tag;if(!(u.mode&1)&&(f===0||f===11||f===15)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=qg(o);if(p!==null){p.flags&=-257,$g(p,o,a,s,e),p.mode&1&&Yg(s,c,e),e=p,l=c;var v=e.updateQueue;if(v===null){var y=new Set;y.add(l),e.updateQueue=y}else v.add(l);break e}else{if(!(e&1)){Yg(s,c,e),mm();break e}l=Error(we(426))}}else if(_t&&a.mode&1){var m=qg(o);if(m!==null){!(m.flags&65536)&&(m.flags|=256),$g(m,o,a,s,e),$p(Xo(l,a));break e}}s=l=Xo(l,a),Ft!==4&&(Ft=2),Za===null?Za=[s]:Za.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var d=Vx(s,l,e);Hg(s,d);break e;case 1:a=l;var _=s.type,g=s.stateNode;if(!(s.flags&128)&&(typeof _.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(kr===null||!kr.has(g)))){s.flags|=65536,e&=-e,s.lanes|=e;var x=Gx(s,a,e);Hg(s,x);break e}}s=s.return}while(s!==null)}l_(n)}catch(b){e=b,Dt===n&&n!==null&&(Dt=n=n.return);continue}break}while(!0)}function o_(){var t=Mu.current;return Mu.current=Eu,t===null?Eu:t}function mm(){(Ft===0||Ft===3||Ft===2)&&(Ft=4),Gt===null||!(Ls&268435455)&&!(qu&268435455)||Er(Gt,jt)}function Au(t,e){var n=it;it|=2;var i=o_();(Gt!==t||jt!==e)&&(Yi=null,bs(t,e));do try{s1();break}catch(r){s_(t,r)}while(!0);if(Kp(),it=n,Mu.current=i,Dt!==null)throw Error(we(261));return Gt=null,jt=0,Ft}function s1(){for(;Dt!==null;)a_(Dt)}function o1(){for(;Dt!==null&&!LE();)a_(Dt)}function a_(t){var e=u_(t.alternate,t,An);t.memoizedProps=t.pendingProps,e===null?l_(t):Dt=e,um.current=null}function l_(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=JM(n,e),n!==null){n.flags&=32767,Dt=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Ft=6,Dt=null;return}}else if(n=QM(n,e,An),n!==null){Dt=n;return}if(e=e.sibling,e!==null){Dt=e;return}Dt=e=t}while(e!==null);Ft===0&&(Ft=5)}function ds(t,e,n){var i=ft,r=Xn.transition;try{Xn.transition=null,ft=1,a1(t,e,n,i)}finally{Xn.transition=r,ft=i}return null}function a1(t,e,n,i){do Mo();while(Lr!==null);if(it&6)throw Error(we(327));n=t.finishedWork;var r=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(we(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(HE(t,s),t===Gt&&(Dt=Gt=null,jt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||sc||(sc=!0,f_(lu,function(){return Mo(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Xn.transition,Xn.transition=null;var o=ft;ft=1;var a=it;it|=4,um.current=null,t1(t,n),n_(n,t),AM(nh),uu=!!th,nh=th=null,t.current=n,n1(n),NE(),it=a,ft=o,Xn.transition=s}else t.current=n;if(sc&&(sc=!1,Lr=t,bu=r),s=t.pendingLanes,s===0&&(kr=null),UE(n.stateNode),xn(t,Pt()),e!==null)for(i=t.onRecoverableError,n=0;n<e.length;n++)r=e[n],i(r.value,{componentStack:r.stack,digest:r.digest});if(Tu)throw Tu=!1,t=wh,wh=null,t;return bu&1&&t.tag!==0&&Mo(),s=t.pendingLanes,s&1?t===Eh?Ka++:(Ka=0,Eh=t):Ka=0,Qr(),null}function Mo(){if(Lr!==null){var t=Vy(bu),e=Xn.transition,n=ft;try{if(Xn.transition=null,ft=16>t?16:t,Lr===null)var i=!1;else{if(t=Lr,Lr=null,bu=0,it&6)throw Error(we(331));var r=it;for(it|=4,Ue=t.current;Ue!==null;){var s=Ue,o=s.child;if(Ue.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(Ue=c;Ue!==null;){var u=Ue;switch(u.tag){case 0:case 11:case 15:$a(8,u,s)}var f=u.child;if(f!==null)f.return=u,Ue=f;else for(;Ue!==null;){u=Ue;var h=u.sibling,p=u.return;if(Jx(u),u===c){Ue=null;break}if(h!==null){h.return=p,Ue=h;break}Ue=p}}}var v=s.alternate;if(v!==null){var y=v.child;if(y!==null){v.child=null;do{var m=y.sibling;y.sibling=null,y=m}while(y!==null)}}Ue=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,Ue=o;else e:for(;Ue!==null;){if(s=Ue,s.flags&2048)switch(s.tag){case 0:case 11:case 15:$a(9,s,s.return)}var d=s.sibling;if(d!==null){d.return=s.return,Ue=d;break e}Ue=s.return}}var _=t.current;for(Ue=_;Ue!==null;){o=Ue;var g=o.child;if(o.subtreeFlags&2064&&g!==null)g.return=o,Ue=g;else e:for(o=_;Ue!==null;){if(a=Ue,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Yu(9,a)}}catch(b){Ct(a,a.return,b)}if(a===o){Ue=null;break e}var x=a.sibling;if(x!==null){x.return=a.return,Ue=x;break e}Ue=a.return}}if(it=r,Qr(),bi&&typeof bi.onPostCommitFiberRoot=="function")try{bi.onPostCommitFiberRoot(zu,t)}catch{}i=!0}return i}finally{ft=n,Xn.transition=e}}return!1}function lv(t,e,n){e=Xo(n,e),e=Vx(t,e,1),t=Fr(t,e,1),e=un(),t!==null&&(Dl(t,1,e),xn(t,e))}function Ct(t,e,n){if(t.tag===3)lv(t,t,n);else for(;e!==null;){if(e.tag===3){lv(e,t,n);break}else if(e.tag===1){var i=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(kr===null||!kr.has(i))){t=Xo(n,t),t=Gx(e,t,1),e=Fr(e,t,1),t=un(),e!==null&&(Dl(e,1,t),xn(e,t));break}}e=e.return}}function l1(t,e,n){var i=t.pingCache;i!==null&&i.delete(e),e=un(),t.pingedLanes|=t.suspendedLanes&n,Gt===t&&(jt&n)===n&&(Ft===4||Ft===3&&(jt&130023424)===jt&&500>Pt()-dm?bs(t,0):fm|=n),xn(t,e)}function c_(t,e){e===0&&(t.mode&1?(e=$l,$l<<=1,!($l&130023424)&&($l=4194304)):e=1);var n=un();t=ir(t,e),t!==null&&(Dl(t,e,n),xn(t,n))}function c1(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),c_(t,n)}function u1(t,e){var n=0;switch(t.tag){case 13:var i=t.stateNode,r=t.memoizedState;r!==null&&(n=r.retryLane);break;case 19:i=t.stateNode;break;default:throw Error(we(314))}i!==null&&i.delete(e),c_(t,n)}var u_;u_=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||vn.current)gn=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return gn=!1,KM(t,e,n);gn=!!(t.flags&131072)}else gn=!1,_t&&e.flags&1048576&&px(e,vu,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;Xc(t,e),t=e.pendingProps;var r=Ho(e,rn.current);Eo(e,n),r=sm(null,e,i,t,r,n);var s=om();return e.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,yn(i)?(s=!0,mu(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,em(e),r.updater=ju,e.stateNode=r,r._reactInternals=e,fh(e,i,t,n),e=ph(null,e,i,!0,s,n)):(e.tag=0,_t&&s&&Yp(e),ln(null,e,r,n),e=e.child),e;case 16:i=e.elementType;e:{switch(Xc(t,e),t=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=d1(i),t=ei(i,t),r){case 0:e=hh(null,e,i,t,n);break e;case 1:e=Qg(null,e,i,t,n);break e;case 11:e=Zg(null,e,i,t,n);break e;case 14:e=Kg(null,e,i,ei(i.type,t),n);break e}throw Error(we(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:ei(i,r),hh(t,e,i,r,n);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:ei(i,r),Qg(t,e,i,r,n);case 3:e:{if(Yx(e),t===null)throw Error(we(387));i=e.pendingProps,s=e.memoizedState,r=s.element,_x(t,e),_u(e,i,null,n);var o=e.memoizedState;if(i=o.element,s.isDehydrated)if(s={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){r=Xo(Error(we(423)),e),e=Jg(t,e,i,n,r);break e}else if(i!==r){r=Xo(Error(we(424)),e),e=Jg(t,e,i,n,r);break e}else for(Pn=Or(e.stateNode.containerInfo.firstChild),Ln=e,_t=!0,ri=null,n=yx(e,null,i,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vo(),i===r){e=rr(t,e,n);break e}ln(t,e,i,n)}e=e.child}return e;case 5:return Sx(e),t===null&&lh(e),i=e.type,r=e.pendingProps,s=t!==null?t.memoizedProps:null,o=r.children,ih(i,r)?o=null:s!==null&&ih(i,s)&&(e.flags|=32),jx(t,e),ln(t,e,o,n),e.child;case 6:return t===null&&lh(e),null;case 13:return qx(t,e,n);case 4:return tm(e,e.stateNode.containerInfo),i=e.pendingProps,t===null?e.child=Go(e,null,i,n):ln(t,e,i,n),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:ei(i,r),Zg(t,e,i,r,n);case 7:return ln(t,e,e.pendingProps,n),e.child;case 8:return ln(t,e,e.pendingProps.children,n),e.child;case 12:return ln(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(i=e.type._context,r=e.pendingProps,s=e.memoizedProps,o=r.value,mt(yu,i._currentValue),i._currentValue=o,s!==null)if(ui(s.value,o)){if(s.children===r.children&&!vn.current){e=rr(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===i){if(s.tag===1){l=Ji(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),ch(s.return,n,e),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(we(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),ch(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}ln(t,e,r.children,n),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,Eo(e,n),r=Yn(r),i=i(r),e.flags|=1,ln(t,e,i,n),e.child;case 14:return i=e.type,r=ei(i,e.pendingProps),r=ei(i.type,r),Kg(t,e,i,r,n);case 15:return Wx(t,e,e.type,e.pendingProps,n);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:ei(i,r),Xc(t,e),e.tag=1,yn(i)?(t=!0,mu(e)):t=!1,Eo(e,n),Hx(e,i,r),fh(e,i,r,n),ph(null,e,i,!0,t,n);case 19:return $x(t,e,n);case 22:return Xx(t,e,n)}throw Error(we(156,e.tag))};function f_(t,e){return ky(t,e)}function f1(t,e,n,i){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 7,020 bytes, line 40
40ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wn(t,e,n,i){return new f1(t,e,n,i)}function gm(t){return t=t.prototype,!(!t||!t.isReactComponent)}function d1(t){if(typeof t=="function")return gm(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Up)return 11;if(t===Op)return 14}return 2}function Br(t,e){var n=t.alternate;return n===null?(n=Wn(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function qc(t,e,n,i,r,s){var o=2;if(i=t,typeof t=="function")gm(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case so:return As(n.children,r,s,e);case Ip:o=8,r|=8;break;case Ud:return t=Wn(12,n,e,r|2),t.elementType=Ud,t.lanes=s,t;case Od:return t=Wn(13,n,e,r),t.elementType=Od,t.lanes=s,t;case Fd:return t=Wn(19,n,e,r),t.elementType=Fd,t.lanes=s,t;case Sy:return $u(n,r,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case xy:o=10;break e;case _y:o=9;break e;case Up:o=11;break e;case Op:o=14;break e;case _r:o=16,i=null;break e}throw Error(we(130,t==null?t:typeof t,""))}return e=Wn(o,n,e,r),e.elementType=t,e.type=i,e.lanes=s,e}function As(t,e,n,i){return t=Wn(7,t,i,e),t.lanes=n,t}function $u(t,e,n,i){return t=Wn(22,t,i,e),t.elementType=Sy,t.lanes=n,t.stateNode={isHidden:!1},t}function Vf(t,e,n){return t=Wn(6,t,null,e),t.lanes=n,t}function Gf(t,e,n){return e=Wn(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function h1(t,e,n,i,r){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ef(0),this.expirationTimes=Ef(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ef(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function vm(t,e,n,i,r,s,o,a,l){return t=new h1(t,e,n,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Wn(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},em(s),t}function p1(t,e,n){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ro,key:i==null?null:""+i,children:t,containerInfo:e,implementation:n}}function d_(t){if(!t)return Wr;t=t._reactInternals;e:{if(zs(t)!==t||t.tag!==1)throw Error(we(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(yn(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(we(171))}if(t.tag===1){var n=t.type;if(yn(n))return dx(t,n,e)}return e}function h_(t,e,n,i,r,s,o,a,l){return t=vm(n,i,!0,t,r,s,o,a,l),t.context=d_(null),n=t.current,i=un(),r=zr(n),s=Ji(i,r),s.callback=e??null,Fr(n,s,r),t.current.lanes=r,Dl(t,r,i),xn(t,i),t}function Zu(t,e,n,i){var r=e.current,s=un(),o=zr(r);return n=d_(n),e.context===null?e.context=n:e.pendingContext=n,e=Ji(s,o),e.payload={element:t},i=i===void 0?null:i,i!==null&&(e.callback=i),t=Fr(r,e,o),t!==null&&(li(t,r,o,s),Vc(t,r,o)),o}function Cu(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function cv(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function ym(t,e){cv(t,e),(t=t.alternate)&&cv(t,e)}function m1(){return null}var p_=typeof reportError=="function"?reportError:function(t){console.error(t)};function xm(t){this._internalRoot=t}Ku.prototype.render=xm.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(we(409));Zu(t,e,null,null)};Ku.prototype.unmount=xm.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Ns(function(){Zu(null,t,null,null)}),e[nr]=null}};function Ku(t){this._internalRoot=t}Ku.prototype.unstable_scheduleHydration=function(t){if(t){var e=Xy();t={blockedOn:null,target:t,priority:e};for(var n=0;n<wr.length&&e!==0&&e<wr[n].priority;n++);wr.splice(n,0,t),n===0&&Yy(t)}};function _m(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Qu(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function uv(){}function g1(t,e,n,i,r){if(r){if(typeof i=="function"){var s=i;i=function(){var c=Cu(o);s.call(c)}}var o=h_(e,i,t,0,null,!1,!1,"",uv);return t._reactRootContainer=o,t[nr]=o.current,ul(t.nodeType===8?t.parentNode:t),Ns(),o}for(;r=t.lastChild;)t.removeChild(r);if(typeof i=="function"){var a=i;i=function(){var c=Cu(l);a.call(c)}}var l=vm(t,0,!1,null,null,!1,!1,"",uv);return t._reactRootContainer=l,t[nr]=l.current,ul(t.nodeType===8?t.parentNode:t),Ns(function(){Zu(e,l,n,i)}),l}function Ju(t,e,n,i,r){var s=n._reactRootContainer;if(s){var o=s;if(typeof r=="function"){var a=r;r=function(){var l=Cu(o);a.call(l)}}Zu(e,o,t,r)}else o=g1(n,e,t,r,i);return Cu(o)}Gy=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Oa(e.pendingLanes);n!==0&&(zp(e,n|1),xn(e,Pt()),!(it&6)&&(jo=Pt()+500,Qr()))}break;case 13:Ns(function(){var i=ir(t,1);if(i!==null){var r=un();li(i,t,1,r)}}),ym(t,1)}};Bp=function(t){if(t.tag===13){var e=ir(t,134217728);if(e!==null){var n=un();li(e,t,134217728,n)}ym(t,134217728)}};Wy=function(t){if(t.tag===13){var e=zr(t),n=ir(t,e);if(n!==null){var i=un();li(n,t,e,i)}ym(t,e)}};Xy=function(){return ft};jy=function(t,e){var n=ft;try{return ft=t,e()}finally{ft=n}};Yd=function(t,e,n){switch(e){case"input":if(Bd(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var i=n[e];if(i!==t&&i.form===t.form){var r=Gu(i);if(!r)throw Error(we(90));Ey(i),Bd(i,r)}}}break;case"textarea":Ty(t,n);break;case"select":e=n.value,e!=null&&xo(t,!!n.multiple,e,!1)}};Ny=hm;Dy=Ns;var v1={usingClientEntryPoint:!1,Events:[Ul,co,Gu,Py,Ly,hm]},Ea={findFiberByHostInstance:vs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},y1={bundleType:Ea.bundleType,version:Ea.version,rendererPackageName:Ea.rendererPackageName,rendererConfig:Ea.rendererConfig,overrideHookState:null,overri
40deHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ar.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Oy(t),t===null?null:t.stateNode},findFiberByHostInstance:Ea.findFiberByHostInstance||m1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var oc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oc.isDisabled&&oc.supportsFiber)try{zu=oc.inject(y1),bi=oc}catch{}}In.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=v1;In.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_m(e))throw Error(we(200));return p1(t,e,null,n)};In.createRoot=function(t,e){if(!_m(t))throw Error(we(299));var n=!1,i="",r=p_;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(i=e.identifierPrefix),e.onRecoverableError!==void 0&&(r=e.onRecoverableError)),e=vm(t,1,!1,null,null,n,!1,i,r),t[nr]=e.current,ul(t.nodeType===8?t.parentNode:t),new xm(e)};In.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(we(188)):(t=Object.keys(t).join(","),Error(we(268,t)));return t=Oy(e),t=t===null?null:t.stateNode,t};In.flushSync=function(t){return Ns(t)};In.hydrate=function(t,e,n){if(!Qu(e))throw Error(we(200));return Ju(null,t,e,!0,n)};In.hydrateRoot=function(t,e,n){if(!_m(t))throw Error(we(405));var i=n!=null&&n.hydratedSources||null,r=!1,s="",o=p_;if(n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=h_(e,null,t,1,n??null,r,!1,s,o),t[nr]=e.current,ul(t),i)for(t=0;t<i.length;t++)n=i[t],r=n._getVersion,r=r(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,r]:e.mutableSourceEagerHydrationData.push(n,r);return new Ku(e)};In.render=function(t,e,n){if(!Qu(e))throw Error(we(200));return Ju(null,t,e,!1,n)};In.unmountComponentAtNode=function(t){if(!Qu(t))throw Error(we(40));return t._reactRootContainer?(Ns(function(){Ju(null,null,t,!1,function(){t._reactRootContainer=null,t[nr]=null})}),!0):!1};In.unstable_batchedUpdates=hm;In.unstable_renderSubtreeIntoContainer=function(t,e,n,i){if(!Qu(n))throw Error(we(200));if(t==null||t._reactInternals===void 0)throw Error(we(38));return Ju(t,e,n,!1,i)};In.version="18.3.1-next-f1338f8080-20240426";function m_(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(m_)}catch(t){console.error(t)}}m_(),my.exports=In;var Fl=my.exports;const x1=iy(Fl);var g_,fv=Fl;g_=fv.createRoot,fv.hydrateRoot;function _1(t,e){if(t instanceof RegExp)return{keys:!1,pattern:t};var n,i,r,s,o=[],a="",l=t.split("/");for(l[0]||l.shift();r=l.shift();)n=r[0],n==="*"?(o.push(n),a+=r[1]==="?"?"(?:/(.*))?":"/(.*)"):n===":"?(i=r.indexOf("?",1),s=r.indexOf(".",1),o.push(r.substring(1,~i?i:~s?s:r.length)),a+=~i&&!~s?"(?:/([^/]+?))?":"/([^/]+?)",~s&&(a+=(~i?"?":"")+"\\"+r.substring(s))):a+="/"+r;return{keys:o,pattern:new RegExp("^"+a+(e?"(?=$|/)":"/?$"),"i")}}var v_={exports:{}},y_={};/** 41 * @license React 42 * use-sync-external-store-shim.production.min.js 43 * 44 * Copyright (c) Facebook, Inc. and its affiliates. 45 * 46 * This source code is licensed under the MIT license found in the 47 * LICENSE file in the root directory of this source tree. 48 */var Yo=B;function S1(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var w1=typeof Object.is=="function"?Object.is:S1,E1=Yo.useState,M1=Yo.useEffect,T1=Yo.useLayoutEffect,b1=Yo.useDebugValue;function A1(t,e){var n=e(),i=E1({inst:{value:n,getSnapshot:e}}),r=i[0].inst,s=i[1];return T1(function(){r.value=n,r.getSnapshot=e,Wf(r)&&s({inst:r})},[t,n,e]),M1(function(){return Wf(r)&&s({inst:r}),t(function(){Wf(r)&&s({inst:r})})},[t]),b1(n),n}function Wf(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!w1(t,n)}catch{return!0}}function C1(t,e){return e()}var R1=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?C1:A1;y_.useSyncExternalStore=Yo.useSyncExternalStore!==void 0?Yo.useSyncExternalStore:R1;v_.exports=y_;var P1=v_.exports;const L1=lE.useInsertionEffect,N1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",D1=N1?B.useLayoutEffect:B.useEffect,I1=L1||D1,x_=t=>{const e=B.useRef([t,(...n)=>e[0](...n)]).current;return I1(()=>{e[0]=t}),e[1]},U1="popstate",Sm="pushState",wm="replaceState",O1="hashchange",dv=[U1,Sm,wm,O1],F1=t=>{for(const e of dv)addEventListener(e,t);return()=>{for(const e of dv)removeEventListener(e,t)}},__=(t,e)=>P1.useSyncExternalStore(F1,t,e),k1=()=>location.search,z1=({ssrSearch:t=""}={})=>__(k1,()=>t),hv=()=>location.pathname,B1=({ssrPath:t}={})=>__(hv,t?()=>t:hv),H1=(t,{replace:e=!1,state:n=null}={})=>history[e?wm:Sm](n,"",t),V1=(t={})=>[B1(t),H1],pv=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[pv]>"u"){for(const t of[Sm,wm]){const e=history[t];history[t]=function(){const n=e.apply(this,arguments),i=new Event(t);return i.arguments=arguments,dispatchEvent(i),n}}Object.defineProperty(window,pv,{value:!0})}const G1=(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())?"~"+e:e.slice(t.length)||"/",S_=(t="")=>t==="/"?"":t,W1=(t,e)=>t[0]==="~"?t.slice(1):S_(e)+t,X1=(t="",e)=>G1(mv(S_(t)),mv(e)),mv=t=>{try{return decodeURI(t)}catch{return t}},w_={hook:V1,searchHook:z1,parser:_1,base:"",ssrPath:void 0,ssrSearch:void 0,hrefs:t=>t},E_=B.createContext(w_),ef=()=>B.useContext(E_),M_={},T_=B.createContext(M_),b_=()=>B.useContext(T_),Em=t=>{const[e,n]=t.hook(t);
48return[X1(t.base,e),x_((i,r)=>n(W1(i,t.base),r))]},A_=(t,e,n,i)=>{const{pattern:r,keys:s}=e instanceof RegExp?{keys:!1,pattern:e}:t(e||"*",i),o=r.exec(n)||[],[a,...l]=o;return a!==void 0?[!0,(()=>{const c=s!==!1?Object.fromEntries(s.map((f,h)=>[f,l[h]])):o.groups;let u={...l};return c&&Object.assign(u,c),u})(),...i?[a]:[]]:[!1,null]},j1=({children:t,...e})=>{var u,f;const n=ef(),i=e.hook?w_:n;let r=i;const[s,o]=((u=e.ssrPath)==null?void 0:u.split("?"))??[];o&&(e.ssrSearch=o,e.ssrPath=s),e.hrefs=e.hrefs??((f=e.hook)==null?void 0:f.hrefs);let a=B.useRef({}),l=a.current,c=l;for(let h in i){const p=h==="base"?i[h]+(e[h]||""):e[h]||i[h];l===c&&p!==c[h]&&(a.current=c={...c}),c[h]=p,p!==i[h]&&(r=c)}return B.createElement(E_.Provider,{value:r,children:t})},gv=({children:t,component:e},n)=>e?B.createElement(e,{params:n}):typeof t=="function"?t(n):t,Y1=t=>{let e=B.useRef(M_),n=e.current;for(const i in t)t[i]!==n[i]&&(n=t);return Object.keys(t).length===0&&(n=t),e.current=n},Ma=({path:t,nest:e,match:n,...i})=>{const r=ef(),[s]=Em(r),[o,a,l]=n??A_(r.parser,t,s,e),c=Y1({...b_(),...a});if(!o)return null;const u=l?B.createElement(j1,{base:l},gv(i,c)):gv(i,c);return B.createElement(T_.Provider,{value:c,children:u})},qo=B.forwardRef((t,e)=>{const n=ef(),[i,r]=Em(n),{to:s="",href:o=s,onClick:a,asChild:l,children:c,className:u,replace:f,state:h,...p}=t,v=x_(m=>{m.ctrlKey||m.metaKey||m.altKey||m.shiftKey||m.button!==0||(a==null||a(m),m.defaultPrevented||(m.preventDefault(),r(o,t)))}),y=n.hrefs(o[0]==="~"?o.slice(1):n.base+o,n);return l&&B.isValidElement(c)?B.cloneElement(c,{onClick:v,href:y}):B.createElement("a",{...p,onClick:v,href:y,className:u!=null&&u.call?u(i===o):u,children:c,ref:e})}),C_=t=>Array.isArray(t)?t.flatMap(e=>C_(e&&e.type===B.Fragment?e.props.children:e)):[t],q1=({children:t,location:e})=>{const n=ef(),[i]=Em(n);for(const r of C_(t)){let s=0;if(B.isValidElement(r)&&(s=A_(n.parser,r.props.path,e||i,r.props.nest))[0])return B.cloneElement(r,{match:s})}return null};var tf=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},nf=typeof window>"u"||"Deno"in globalThis;function ti(){}function $1(t,e){return typeof t=="function"?t(e):t}function Z1(t){return typeof t=="number"&&t>=0&&t!==1/0}function K1(t,e){return Math.max(t+(e||0)-Date.now(),0)}function vv(t,e){return typeof t=="function"?t(e):t}function Q1(t,e){return typeof t=="function"?t(e):t}function yv(t,e){const{type:n="all",exact:i,fetchStatus:r,predicate:s,queryKey:o,stale:a}=t;if(o){if(i){if(e.queryHash!==Mm(o,e.options))return!1}else if(!_l(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||r&&r!==e.state.fetchStatus||s&&!s(e))}function xv(t,e){const{exact:n,status:i,predicate:r,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(xl(e.options.mutationKey)!==xl(s))return!1}else if(!_l(e.options.mutationKey,s))return!1}return!(i&&e.state.status!==i||r&&!r(e))}function Mm(t,e){return((e==null?void 0:e.queryKeyHashFn)||xl)(t)}function xl(t){return JSON.stringify(t,(e,n)=>bh(n)?Object.keys(n).sort().reduce((i,r)=>(i[r]=n[r],i),{}):n)}function _l(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!_l(t[n],e[n])):!1}function R_(t,e){if(t===e)return t;const n=_v(t)&&_v(e);if(n||bh(t)&&bh(e)){const i=n?t:Object.keys(t),r=i.length,s=n?e:Object.keys(e),o=s.length,a=n?[]:{};let l=0;for(let c=0;c<o;c++){const u=n?c:s[c];(!n&&i.includes(u)||n)&&t[u]===void 0&&e[u]===void 0?(a[u]=void 0,l++):(a[u]=R_(t[u],e[u]),a[u]===t[u]&&t[u]!==void 0&&l++)}return r===o&&l===r?t:a}return e}function _v(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function bh(t){if(!Sv(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!Sv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Sv(t){return Object.prototype.toString.call(t)==="[object Object]"}function J1(t){return new Promise(e=>{setTimeout(e,t)})}function eT(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?R_(t,e):e}function tT(t,e,n=0){const i=[...t,e];return n&&i.length>n?i.slice(1):i}function nT(t,e,n=0){const i=[e,...t];return n&&i.length>n?i.slice(0,-1):i}var Tm=Symbol();function P_(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Tm?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var ws,Tr,Lo,$0,iT=($0=class extends tf{constructor(){super();ut(this,ws);ut(this,Tr);ut(this,Lo);Ke(this,Lo,e=>{if(!nf&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){ve(this,Tr)||this.setEventListener(ve(this,Lo))}onUnsubscribe(){var e;this.hasListeners()||((e=ve(this,Tr))==null||e.call(this),Ke(this,Tr,void 0))}setEventListener(e){var n;Ke(this,Lo,e),(n=ve(this,Tr))==null||n.call(this),Ke(this,Tr,e(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(e){ve(this,ws)!==e&&(Ke(this,ws,e),this.onFocus())}onFocus(){const e=this.isFocused();
vendor: 18,473 bytes, line 48
48this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof ve(this,ws)=="boolean"?ve(this,ws):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},ws=new WeakMap,Tr=new WeakMap,Lo=new WeakMap,$0),L_=new iT,No,br,Do,Z0,rT=(Z0=class extends tf{constructor(){super();ut(this,No,!0);ut(this,br);ut(this,Do);Ke(this,Do,e=>{if(!nf&&window.addEventListener){const n=()=>e(!0),i=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",i)}}})}onSubscribe(){ve(this,br)||this.setEventListener(ve(this,Do))}onUnsubscribe(){var e;this.hasListeners()||((e=ve(this,br))==null||e.call(this),Ke(this,br,void 0))}setEventListener(e){var n;Ke(this,Do,e),(n=ve(this,br))==null||n.call(this),Ke(this,br,e(this.setOnline.bind(this)))}setOnline(e){ve(this,No)!==e&&(Ke(this,No,e),this.listeners.forEach(i=>{i(e)}))}isOnline(){return ve(this,No)}},No=new WeakMap,br=new WeakMap,Do=new WeakMap,Z0),Ru=new rT;function sT(){let t,e;const n=new Promise((r,s)=>{t=r,e=s});n.status="pending",n.catch(()=>{});function i(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{i({status:"fulfilled",value:r}),t(r)},n.reject=r=>{i({status:"rejected",reason:r}),e(r)},n}function oT(t){return Math.min(1e3*2**t,3e4)}function N_(t){return(t??"online")==="online"?Ru.isOnline():!0}var D_=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Xf(t){return t instanceof D_}function I_(t){let e=!1,n=0,i=!1,r;const s=sT(),o=y=>{var m;i||(h(new D_(y)),(m=t.abort)==null||m.call(t))},a=()=>{e=!0},l=()=>{e=!1},c=()=>L_.isFocused()&&(t.networkMode==="always"||Ru.isOnline())&&t.canRun(),u=()=>N_(t.networkMode)&&t.canRun(),f=y=>{var m;i||(i=!0,(m=t.onSuccess)==null||m.call(t,y),r==null||r(),s.resolve(y))},h=y=>{var m;i||(i=!0,(m=t.onError)==null||m.call(t,y),r==null||r(),s.reject(y))},p=()=>new Promise(y=>{var m;r=d=>{(i||c())&&y(d)},(m=t.onPause)==null||m.call(t)}).then(()=>{var y;r=void 0,i||(y=t.onContinue)==null||y.call(t)}),v=()=>{if(i)return;let y;const m=n===0?t.initialPromise:void 0;try{y=m??t.fn()}catch(d){y=Promise.reject(d)}Promise.resolve(y).then(f).catch(d=>{var A;if(i)return;const _=t.retry??(nf?0:3),g=t.retryDelay??oT,x=typeof g=="function"?g(n,d):g,b=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,d);if(e||!b){h(d);return}n++,(A=t.onFail)==null||A.call(t,n,d),J1(x).then(()=>c()?void 0:p()).then(()=>{e?h(d):v()})})};return{promise:s,cancel:o,continue:()=>(r==null||r(),s),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?v():p().then(v),s)}}function aT(){let t=[],e=0,n=a=>{a()},i=a=>{a()},r=a=>setTimeout(a,0);const s=a=>{e?t.push(a):r(()=>{n(a)})},o=()=>{const a=t;t=[],a.length&&r(()=>{i(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{i=a},setScheduler:a=>{r=a}}}var cn=aT(),Es,K0,U_=(K0=class{constructor(){ut(this,Es)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Z1(this.gcTime)&&Ke(this,Es,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(nf?1/0:5*60*1e3))}clearGcTimeout(){ve(this,Es)&&(clearTimeout(ve(this,Es)),Ke(this,Es,void 0))}},Es=new WeakMap,K0),Io,Uo,Bn,en,Pl,Ms,ni,Wi,Q0,lT=(Q0=class extends U_{constructor(e){super();ut(this,ni);ut(this,Io);ut(this,Uo);ut(this,Bn);ut(this,en);ut(this,Pl);ut(this,Ms);Ke(this,Ms,!1),Ke(this,Pl,e.defaultOptions),this.setOptions(e.options),this.observers=[],Ke(this,Bn,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Ke(this,Io,uT(this.options)),this.state=e.state??ve(this,Io),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=ve(this,en))==null?void 0:e.promise}setOptions(e){this.options={...ve(this,Pl),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ve(this,Bn).remove(this)}setData(e,n){const i=eT(this.state.data,e,this.options);return $t(this,ni,Wi).call(this,{data:i,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),i}setState(e,n){$t(this,ni,Wi).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var i,r;const n=(i=ve(this,en))==null?void 0:i.promise;return(r=ve(this,en))==null||r.cancel(e),n?n.then(ti).catch(ti):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(ve(this,Io))}isActive(){return this.observers.some(e=>Q1(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Tm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!K1(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(i=>i.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=ve(this,en))==null||n.continue()}onOnline(){var n;const e=this.observers.find(i=>i.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=ve(this,en))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),ve(this,Bn).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(ve(this,en)&&(ve(this,Ms)?ve(this,en).cancel({revert:!0}):ve(this,en).cancelRetry()),this.scheduleGc()),ve(this,Bn).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||$t(this,ni,Wi).call(this,{type:"invalidate"})}fetch(e,n){var l,c,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(ve(this,en))return ve(this,en).continueRetry(),ve(this,en).promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const i=new AbortController,r=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(Ke(this,Ms,!0),i.signal)})},s=()=>{const f=P_(this.options,n),h={queryKey:this.queryKey,meta:this.meta};return r(h),Ke(this,Ms,!1),this.options.persister?this.options.persister(f,h,this):f(h)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};r(o),(l=this.options.behavior)==null||l.onFetch(o,this),Ke(this,Uo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&$t(this,ni,Wi).call(this,{type:"fetch",meta:(u=o.fetchOptions)==null?void 0:u.meta});const a=f=>{var h,p,v,y;Xf(f)&&f.silent||$t(this,ni,Wi).call(this,{type:"error",error:f}),Xf(f)||((p=(h=ve(this,Bn).config).onError)==null||p.call(h,f,this),(y=(v=ve(this,Bn).config).onSettled)==null||y.call(v,this.state.data,f,this)),this.scheduleGc()};return Ke(this,en,I_({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:i.abort.bind(i),onSuccess:f=>{var h,p,v,y;if(f===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(m){a(m);return}(p=(h=ve(this,Bn).config).onSuccess)==null||p.call(h,f,this),(y=(v=ve(this,Bn).config).onSettled)==null||y.call(v,f,this.state.error,this),this.scheduleGc()},onError:a,onFail:(f,h)=>{$t(this,ni,Wi).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{$t(this,ni,Wi).call(this,{type:"pause"})},onContinue:()=>{$t(this,ni,Wi).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),ve(this,en).start()}},Io=new WeakMap,Uo=new WeakMap,Bn=new WeakMap,en=new WeakMap,Pl=new WeakMap,Ms=new WeakMap,ni=new WeakSet,Wi=function(e){const n=i=>{switch(e.type){case"failed":return{...i,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...cT(i.data,this.options),fetchMeta:e.meta??null};case"success":return{...i,data:e.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return Xf(r)&&r.revert&&ve(this,Uo)?{...ve(this,Uo),fetchStatus:"idle"}:{...i,error:r,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...e.state}}};this.state=n(this.state),cn.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),ve(this,Bn).notify({query:this,type:"updated",action:e})})},Q0);function cT(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:N_(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function uT(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,i=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var yi,J0,fT=(J0=class extends tf{constructor(e={}){super();ut(this,yi);this.config=e,Ke(this,yi,new Map)}build(e,n,i){const r=n.queryKey,s=n.queryHash??Mm(r,n);let o=this.get(s);return o||(o=new lT({cache:this,queryKey:r,queryHash:s,options:e.defaultQueryOptions(n),state:i,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){ve(this,yi).has(e.queryHash)||(ve(this,yi).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=ve(this,yi).get(e.queryHash);n&&(e.destroy(),n===e&&ve(this,yi).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){cn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return ve(this,yi).get(e)}getAll(){return[...ve(this,yi).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(i=>yv(n,i))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(i=>yv(e,i)):n}notify(e){cn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){cn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){cn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},yi=new WeakMap,J0),xi,an,Ts,_i,xr,ey,dT=(ey=class extends U_{constructor(e){super();ut(this,_i);ut(this,xi);ut(this,an);ut(this,Ts);this.mutationId=e.mutationId,Ke(this,an,e.mutationCache),Ke(this,xi,[]),this.state=e.state||hT(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){ve(this,xi).includes(e)||(ve(this,xi).push(e),this.clearGcTimeout(),ve(this,an).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Ke(this,xi,ve(this,xi).filter(n=>n!==e)),this.scheduleGc(),ve(this,an).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){ve(this,xi).length||(this.state.status==="pending"?this.scheduleGc():ve(this,an).remove(this))}continue(){var e;return((e=ve(this,Ts))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var r,s,o,a,l,c,u,f,h,p,v,y,m,d,_,g,x,b,A,M;Ke(this,Ts,I_({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(R,T)=>{$t(this,_i,xr).call(this,{type:"failed",failureCount:R,error:T})},onPause:()=>{$t(this,_i,xr).call(this,{type:"pause"})},onContinue:()=>{$t(this,_i,xr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ve(this,an).canRun(this)}));const n=this.state.status==="pending",i=!ve(this,Ts).canStart();try{if(!n){$t(this,_i,xr).call(this,{type:"pending",variables:e,isPaused:i}),await((s=(r=ve(this,an).config).onMutate)==null?void 0:s.call(r,e,this));const T=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,e));T!==this.state.context&&$t(this,_i,xr).call(this,{type:"pending",context:T,variables:e,isPaused:i})}const R=await ve(this,Ts).start();return await((c=(l=ve(this,an).config).onSuccess)==null?void 0:c.call(l,R,e,this.state.context,this)),await((f=(u=this.options).onSuccess)==null?void 0:f.call(u,R,e,this.state.context)),await((p=(h=ve(this,an).config).onSettled)==null?void 0:p.call(h,R,null,this.state.variables,this.state.context,this)),await((y=(v=this.options).onSettled)==null?void 0:y.call(v,R,null,e,this.state.context)),$t(this,_i,xr).call(this,{type:"success",data:R}),R}catch(R){try{throw await((d=(m=ve(this,an).config).onError)==null?void 0:d.call(m,R,e,this.state.context,this)),await((g=(_=this.options).onError)==null?void 0:g.call(_,R,e,this.state.context)),await((b=(x=ve(this,an).config).onSettled)==null?void 0:b.call(x,void 0,R,this.state.variables,this.state.context,this)),await((M=(A=this.options).onSettled)==null?void 0:M.call(A,void 0,R,e,this.state.context)),R}finally{$t(this,_i,xr).call(this,{type:"error",error:R})}}finally{ve(this,an).runNext(this)}}},xi=new WeakMap,an=new WeakMap,Ts=new WeakMap,_i=new WeakSet,xr=function(e){const n=i=>{switch(e.type){case"failed":return{...i,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...i,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:e.error,failureCount:i.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),cn.batch(()=>{ve(this,xi).forEach(i=>{i.onMutationUpdate(e)}),ve(this,an).notify({mutation:this,type:"updated",action:e})})},ey);function hT(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var bn,Ll,ty,pT=(ty=class extends tf{constructor(e={}){super();ut(this,bn);ut(this,Ll);this.config=e,Ke(this,bn,new Map),Ke(this,Ll,Date.now())}build(e,n,i){const r=new dT({mutationCache:this,mutationId:++Gl(this,Ll)._,options:e.defaultMutationOptions(n),state:i});return this.add(r),r}add(e){const n=ac(e),i=ve(this,bn).get(n)??[];i.push(e),ve(this,bn).set(n,i),this.notify({type:"added",mutation:e})}remove(e){var i;const n=ac(e);if(ve(this,bn).has(n)){const r=(i=ve(this,bn).get(n))==null?void 0:i.filter(s=>s!==e);r&&(r.length===0?ve(this,bn).delete(n):ve(this,bn).set(n,r))}this.notify({type:"removed",mutation:e})}canRun(e){var i;const n=(i=ve(this,bn).get(ac(e)))==null?void 0:i.find(r=>r.state.status==="pending");return!n||n===e}runNext(e){var i;const n=(i=ve(this,bn).get(ac(e)))==null?void 0:i.find(r=>r!==e&&r.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){cn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...ve(this,bn).values()].flat()}find(e){const n={exact:!0,...e};return this.getAll().find(i=>xv(n,i))}findAll(e={}){return this.getAll().filter(n=>xv(e,n))}notify(e){cn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return cn.batch(()=>Promise.all(e.map(n=>n.continue().catch(ti))))}},bn=new WeakMap,Ll=new WeakMap,ty);function ac(t){var e;return((e=t.options.scope)==null?void 0:e.id)??String(t.mutationId)}function wv(t){return{onFetch:(e,n)=>{var u,f,h,p,v;const i=e.options,r=(h=(f=(u=e.fetchOptions)==null?void 0:u.meta)==null?void 0:f.fetchMore)==null?void 0:h.direction,s=((p=e.state.data)==null?void 0:p.pages)||[],o=((v=e.state.data)==null?void 0:v.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let y=!1;const m=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(e.signal.aborted?y=!0:e.signal.addEventListener("abort",()=>{y=!0}),e.signal)})},d=P_(e.options,e.fetchOptions),_=async(g,x,b)=>{if(y)return Promise.reject();if(x==null&&g.pages.length)return Promise.resolve(g);const A={queryKey:e.queryKey,pageParam:x,direction:b?"backward":"forward",meta:e.options.meta};m(A);const M=await d(A),{maxPages:R}=e.options,T=b?nT:tT;return{pages:T(g.pages,M,R),pageParams:T(g.pageParams,x,R)}};if(r&&s.length){const g=r==="backward",x=g?mT:Ev,b={pages:s,pageParams:o},A=x(i,b);a=await _(b,A,g)}else{const g=t??s.length;do{const x=l===0?o[0]??i.initialPageParam:Ev(i,a);if(l>0&&x==null)break;a=await _(a,x),l++}while(l<g)}return a};e.options.persister?e.fetchFn=()=>{var y,m;return(m=(y=e.options).persister)==null?void 0:m.call(y,c,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=c}}}function Ev(t,{pages:e,pageParams:n}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,n[i],n):void 0}function mT(t,{pages:e,pageParams:n}){var i;return e.length>0?(i=t.getPreviousPageParam)==null?void 0:i.call(t,e[0],e,n[0],n):void 0}var At,Ar,Cr,Oo,Fo,Rr,ko,zo,ny,gT=(ny=class{constructor(t={}){ut(this,At);ut(this,Ar);ut(this,Cr);ut(this,Oo);ut(this,Fo);ut(this,Rr);ut(this,ko);ut(this,zo);Ke(this,At,t.queryCache||new fT),Ke(this,Ar,t.mutationCache||new pT),Ke(this,Cr,t.defaultOptions||{}),Ke(this,Oo,new Map),Ke(this,Fo,new Map),Ke(this,Rr,0)}mount(){Gl(this,Rr)._++,ve(this,Rr)===1&&(Ke(this,ko,L_.subscribe(async t=>{t&&(await this.resumePausedMutations(),ve(this,At).onFocus())})),Ke(this,zo,Ru.subscribe(async t=>{t&&(await this.resumePausedMutations(),ve(this,At).onOnline())})))}unmount(){var t,e;Gl(this,Rr)._--,ve(this,Rr)===0&&((t=ve(this,ko))==null||t.call(this),Ke(this,ko,void 0),(e=ve(this,zo))==null||e.call(this),Ke(this,zo,void 0))}isFetching(t){return ve(this,At).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return ve(this,Ar).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});
48return(n=ve(this,At).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.getQueryData(t.queryKey);if(e===void 0)return this.fetchQuery(t);{const n=this.defaultQueryOptions(t),i=ve(this,At).build(this,n);return t.revalidateIfStale&&i.isStaleByTime(vv(n.staleTime,i))&&this.prefetchQuery(n),Promise.resolve(e)}}getQueriesData(t){return ve(this,At).findAll(t).map(({queryKey:e,state:n})=>{const i=n.data;return[e,i]})}setQueryData(t,e,n){const i=this.defaultQueryOptions({queryKey:t}),r=ve(this,At).get(i.queryHash),s=r==null?void 0:r.state.data,o=$1(e,s);if(o!==void 0)return ve(this,At).build(this,i).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return cn.batch(()=>ve(this,At).findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=ve(this,At).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=ve(this,At);cn.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=ve(this,At),i={type:"active",...t};return cn.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries(i,e)))}cancelQueries(t={},e={}){const n={revert:!0,...e},i=cn.batch(()=>ve(this,At).findAll(t).map(r=>r.cancel(n)));return Promise.all(i).then(ti).catch(ti)}invalidateQueries(t={},e={}){return cn.batch(()=>{if(ve(this,At).findAll(t).forEach(i=>{i.invalidate()}),t.refetchType==="none")return Promise.resolve();const n={...t,type:t.refetchType??t.type??"active"};return this.refetchQueries(n,e)})}refetchQueries(t={},e){const n={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},i=cn.batch(()=>ve(this,At).findAll(t).filter(r=>!r.isDisabled()).map(r=>{let s=r.fetch(void 0,n);return n.throwOnError||(s=s.catch(ti)),r.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(i).then(ti)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=ve(this,At).build(this,e);return n.isStaleByTime(vv(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(ti).catch(ti)}fetchInfiniteQuery(t){return t.behavior=wv(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(ti).catch(ti)}ensureInfiniteQueryData(t){return t.behavior=wv(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Ru.isOnline()?ve(this,Ar).resumePausedMutations():Promise.resolve()}getQueryCache(){return ve(this,At)}getMutationCache(){return ve(this,Ar)}getDefaultOptions(){return ve(this,Cr)}setDefaultOptions(t){Ke(this,Cr,t)}setQueryDefaults(t,e){ve(this,Oo).set(xl(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...ve(this,Oo).values()];let n={};return e.forEach(i=>{_l(t,i.queryKey)&&(n={...n,...i.defaultOptions})}),n}setMutationDefaults(t,e){ve(this,Fo).set(xl(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...ve(this,Fo).values()];let n={};return e.forEach(i=>{_l(t,i.mutationKey)&&(n={...n,...i.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...ve(this,Cr).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Mm(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===Tm&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...ve(this,Cr).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){ve(this,At).clear(),ve(this,Ar).clear()}},At=new WeakMap,Ar=new WeakMap,Cr=new WeakMap,Oo=new WeakMap,Fo=new WeakMap,Rr=new WeakMap,ko=new WeakMap,zo=new WeakMap,ny),vT=B.createContext(void 0),yT=({client:t,children:e})=>(B.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),te.jsx(vT.Provider,{value:t,children:e}));async function xT(t){if(!t.ok){const e=await t.text()||t.statusText;throw new Error(`${t.status}: ${e}`)}}const _T=({on401:t})=>async({queryKey:e})=>{const n=await fetch(e[0],{credentials:"include"});return t==="returnNull"&&n.status===401?null:(await xT(n),await n.json())},ST=new gT({defaultOptions:{queries:{queryFn:_T({on401:"throw"}),refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:1/0,retry:!1},mutations:{retry:!1}}}),wT=1,ET=1e6;let jf=0;function MT(){return jf=(jf+1)%Number.MAX_SAFE_INTEGER,jf.toString()}const Yf=new Map,Mv=t=>{if(Yf.has(t))return;const e=setTimeout(()=>{Yf.delete(t),Qa({type:"REMOVE_TOAST",toastId:t})},ET);Yf.set(t,e)},TT=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,wT)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;
48return n?Mv(n):t.toasts.forEach(i=>{Mv(i.id)}),{...t,toasts:t.toasts.map(i=>i.id===n||n===void 0?{...i,open:!1}:i)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},$c=[];let Zc={toasts:[]};function Qa(t){Zc=TT(Zc,t),$c.forEach(e=>{e(Zc)})}function bT({...t}){const e=MT(),n=r=>Qa({type:"UPDATE_TOAST",toast:{...r,id:e}}),i=()=>Qa({type:"DISMISS_TOAST",toastId:e});return Qa({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:r=>{r||i()}}}),{id:e,dismiss:i,update:n}}function AT(){const[t,e]=B.useState(Zc);return B.useEffect(()=>($c.push(e),()=>{const n=$c.indexOf(e);n>-1&&$c.splice(n,1)}),[t]),{...t,toast:bT,dismiss:n=>Qa({type:"DISMISS_TOAST",toastId:n})}}function Ot(t,e,{checkForDefaultPrevented:n=!0}={}){return function(r){if(t==null||t(r),n===!1||!r.defaultPrevented)return e==null?void 0:e(r)}}function Tv(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function O_(...t){return e=>{let n=!1;const i=t.map(r=>{const s=Tv(r,e);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<i.length;r++){const s=i[r];typeof s=="function"?s():Tv(t[r],null)}}}}function fi(...t){return B.useCallback(O_(...t),t)}function rf(t,e=[]){let n=[];function i(s,o){const a=B.createContext(o),l=n.length;n=[...n,o];const c=f=>{var d;const{scope:h,children:p,...v}=f,y=((d=h==null?void 0:h[t])==null?void 0:d[l])||a,m=B.useMemo(()=>v,Object.values(v));return te.jsx(y.Provider,{value:m,children:p})};c.displayName=s+"Provider";function u(f,h){var y;const p=((y=h==null?void 0:h[t])==null?void 0:y[l])||a,v=B.useContext(p);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,u]}const r=()=>{const s=n.map(o=>B.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return B.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return r.scopeName=t,[i,CT(r,...e)]}function CT(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const i=t.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const o=i.reduce((a,{useScope:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return B.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}function Ah(t){const e=RT(t),n=B.forwardRef((i,r)=>{const{children:s,...o}=i,a=B.Children.toArray(s),l=a.find(LT);if(l){const c=l.props.children,u=a.map(f=>f===l?B.Children.count(c)>1?B.Children.only(null):B.isValidElement(c)?c.props.children:null:f);return te.jsx(e,{...o,ref:r,children:B.isValidElement(c)?B.cloneElement(c,void 0,u):null})}return te.jsx(e,{...o,ref:r,children:s})});return n.displayName=`${t}.Slot`,n}function RT(t){const e=B.forwardRef((n,i)=>{const{children:r,...s}=n;if(B.isValidElement(r)){const o=DT(r),a=NT(s,r.props);return r.type!==B.Fragment&&(a.ref=i?O_(i,o):o),B.cloneElement(r,a)}return B.Children.count(r)>1?B.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var F_=Symbol("radix.slottable");function PT(t){const e=({children:n})=>te.jsx(te.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=F_,e}function LT(t){return B.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===F_}function NT(t,e){const n={...e};for(const i in e){const r=t[i],s=e[i];/^on[A-Z]/.test(i)?r&&s?n[i]=(...a)=>{s(...a),r(...a)}:r&&(n[i]=r):i==="style"?n[i]={...r,...s}:i==="className"&&(n[i]=[r,s].filter(Boolean).join(" "))}return{...t,...n}}function DT(t){var i,r;let e=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function IT(t){const e=t+"CollectionProvider",[n,i]=rf(e),[r,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=y=>{const{scope:m,children:d}=y,_=ji.useRef(null),g=ji.useRef(new Map).current;return te.jsx(r,{scope:m,itemMap:g,collectionRef:_,children:d})};o.displayName=e;const a=t+"CollectionSlot",l=Ah(a),c=ji.forwardRef((y,m)=>{const{scope:d,children:_}=y,g=s(a,d),x=fi(m,g.collectionRef);
vendor: 6,195 bytes, line 48
48return te.jsx(l,{ref:x,children:_})});c.displayName=a;const u=t+"CollectionItemSlot",f="data-radix-collection-item",h=Ah(u),p=ji.forwardRef((y,m)=>{const{scope:d,children:_,...g}=y,x=ji.useRef(null),b=fi(m,x),A=s(u,d);return ji.useEffect(()=>(A.itemMap.set(x,{ref:x,...g}),()=>void A.itemMap.delete(x))),te.jsx(h,{[f]:"",ref:b,children:_})});p.displayName=u;function v(y){const m=s(t+"CollectionConsumer",y);return ji.useCallback(()=>{const _=m.collectionRef.current;if(!_)return[];const g=Array.from(_.querySelectorAll(`[${f}]`));return Array.from(m.itemMap.values()).sort((A,M)=>g.indexOf(A.ref.current)-g.indexOf(M.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:o,Slot:c,ItemSlot:p},v,i]}var UT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],wn=UT.reduce((t,e)=>{const n=Ah(`Primitive.${e}`),i=B.forwardRef((r,s)=>{const{asChild:o,...a}=r,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),te.jsx(l,{...a,ref:s})});return i.displayName=`Primitive.${e}`,{...t,[e]:i}},{});function k_(t,e){t&&Fl.flushSync(()=>t.dispatchEvent(e))}function Pi(t){const e=B.useRef(t);return B.useEffect(()=>{e.current=t}),B.useMemo(()=>(...n)=>{var i;return(i=e.current)==null?void 0:i.call(e,...n)},[])}function OT(t,e=globalThis==null?void 0:globalThis.document){const n=Pi(t);B.useEffect(()=>{const i=r=>{r.key==="Escape"&&n(r)};return e.addEventListener("keydown",i,{capture:!0}),()=>e.removeEventListener("keydown",i,{capture:!0})},[n,e])}var FT="DismissableLayer",Ch="dismissableLayer.update",kT="dismissableLayer.pointerDownOutside",zT="dismissableLayer.focusOutside",bv,z_=B.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bm=B.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...l}=t,c=B.useContext(z_),[u,f]=B.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=B.useState({}),v=fi(e,M=>f(M)),y=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),d=y.indexOf(m),_=u?y.indexOf(u):-1,g=c.layersWithOutsidePointerEventsDisabled.size>0,x=_>=d,b=HT(M=>{const R=M.target,T=[...c.branches].some(S=>S.contains(R));!x||T||(r==null||r(M),o==null||o(M),M.defaultPrevented||a==null||a())},h),A=VT(M=>{const R=M.target;[...c.branches].some(S=>S.contains(R))||(s==null||s(M),o==null||o(M),M.defaultPrevented||a==null||a())},h);return OT(M=>{_===c.layers.size-1&&(i==null||i(M),!M.defaultPrevented&&a&&(M.preventDefault(),a()))},h),B.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(bv=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Av(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=bv)}},[u,h,n,c]),B.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Av())},[u,c]),B.useEffect(()=>{const M=()=>p({});return document.addEventListener(Ch,M),()=>document.removeEventListener(Ch,M)},[]),te.jsx(wn.div,{...l,ref:v,style:{pointerEvents:g?x?"auto":"none":void 0,...t.style},onFocusCapture:Ot(t.onFocusCapture,A.onFocusCapture),onBlurCapture:Ot(t.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Ot(t.onPointerDownCapture,b.onPointerDownCapture)})});bm.displayName=FT;var BT="DismissableLayerBranch",B_=B.forwardRef((t,e)=>{const n=B.useContext(z_),i=B.useRef(null),r=fi(e,i);return B.useEffect(()=>{const s=i.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),te.jsx(wn.div,{...t,ref:r})});B_.displayName=BT;function HT(t,e=globalThis==null?void 0:globalThis.document){const n=Pi(t),i=B.useRef(!1),r=B.useRef(()=>{});return B.useEffect(()=>{const s=a=>{if(a.target&&!i.current){let l=function(){H_(kT,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",r.current),r.current=l,e.addEventListener("click",r.current,{once:!0})):l()}else e.removeEventListener("click",r.current);i.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",r.current)}},[e,n]),{onPointerDownCapture:()=>i.current=!0}}function VT(t,e=globalThis==null?void 0:globalThis.document){const n=Pi(t),i=B.useRef(!1);return B.useEffect(()=>{const r=s=>{s.target&&!i.current&&H_(zT,n,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Av(){const t=new CustomEvent(Ch);document.dispatchEvent(t)}function H_(t,e,n,{discrete:i}){const r=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),i?k_(r,s):r.dispatchEvent(s)}var GT=bm,WT=B_,Ds=globalThis!=null&&globalThis.document?B.useLayoutEffect:()=>{},XT="Portal",V_=B.forwardRef((t,e)=>{var a;const{container:n,...i}=t,[r,s]=B.useState(!1);Ds(()=>s(!0),[]);const o=n||r&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?x1.createPortal(te.jsx(wn.div,{...i,ref:e}),o):null});V_.displayName=XT;function jT(t,e){return B.useReducer((n,i)=>e[n][i]??n,t)}var Am=t=>{const{present:e,children:n}=t,i=YT(e),r=typeof n=="function"?n({present:i.isPresent}):B.Children.only(n),s=fi(i.ref,qT(r));return typeof n=="function"||i.isPresent?B.cloneElement(r,{ref:s}):null};Am.displayName="Presence";function YT(t){const[e,n]=B.useState(),i=B.useRef({}),r=B.useRef(t),s=B.useRef("none"),o=t?"mounted":"unmounted",[a,l]=jT(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return B.useEffect(()=>{const c=lc(i.current);s.current=a==="mounted"?c:"none"},[a]),Ds(()=>{const c=i.current,u=r.current;if(u!==t){const h=s.current,p=lc(c);t?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&h!==p?"ANIMATION_OUT":"UNMOUNT"),r.current=t}},[t,l]),Ds(()=>
48{if(e){let c;const u=e.ownerDocument.defaultView??window,f=p=>{const y=lc(i.current).includes(p.animationName);if(p.target===e&&y&&(l("ANIMATION_END"),!r.current)){const m=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=m)})}},h=p=>{p.target===e&&(s.current=lc(i.current))};return e.addEventListener("animationstart",h),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",h),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:B.useCallback(c=>{c&&(i.current=getComputedStyle(c)),n(c)},[])}}function lc(t){return(t==null?void 0:t.animationName)||"none"}function qT(t){var i,r;let e=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function $T({prop:t,defaultProp:e,onChange:n=()=>{}}){const[i,r]=ZT({defaultProp:e,onChange:n}),s=t!==void 0,o=s?t:i,a=Pi(n),l=B.useCallback(c=>{if(s){const f=typeof c=="function"?c(t):c;f!==t&&a(f)}else r(c)},[s,t,r,a]);return[o,l]}function ZT({defaultProp:t,onChange:e}){const n=B.useState(t),[i]=n,r=B.useRef(i),s=Pi(e);return B.useEffect(()=>{r.current!==i&&(s(i),r.current=i)},[i,r,s]),n}var KT="VisuallyHidden",sf=B.forwardRef((t,e)=>te.jsx(wn.span,{...t,ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}));sf.displayName=KT;var QT=sf,Cm="ToastProvider",[Rm,JT,eb]=IT("Toast"),[G_,J3]=rf("Toast",[eb]),[tb,of]=G_(Cm),W_=t=>{const{__scopeToast:e,label:n="Notification",duration:i=5e3,swipeDirection:r="right",swipeThreshold:s=50,children:o}=t,[a,l]=B.useState(null),[c,u]=B.useState(0),f=B.useRef(!1),h=B.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Cm}\`. Expected non-empty \`string\`.`),te.jsx(Rm.Provider,{scope:e,children:te.jsx(tb,{scope:e,label:n,duration:i,swipeDirection:r,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:B.useCallback(()=>u(p=>p+1),[]),onToastRemove:B.useCallback(()=>u(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:o})})};W_.displayName=Cm;var X_="ToastViewport",nb=["F8"],Rh="toast.viewportPause",Ph="toast.viewportResume",j_=B.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:i=nb,label:r="Notifications ({hotkey})",...s}=t,o=of(X_,n),a=JT(n),l=B.useRef(null),c=B.useRef(null),u=B.useRef(null),f=B.useRef(null),h=fi(e,f,o.onViewportChange),p=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=o.toastCount>0;B.useEffect(()=>{const m=d=>{var g;i.length!==0&&i.every(x=>d[x]||d.code===x)&&((g=f.current)==null||g.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[i]),B.useEffect(()=>{const m=l.current,d=f.current;if(v&&m&&d){const _=()=>{if(!o.isClosePausedRef.current){const A=new CustomEvent(Rh);d.dispatchEvent(A),o.isClosePausedRef.current=!0}},g=()=>{if(o.isClosePausedRef.current){const A=new CustomEvent(Ph);d.dispatchEvent(A),o.isClosePausedRef.current=!1}},x=A=>{!m.contains(A.relatedTarget)&&g()},b=()=>{m.contains(document.activeElement)||g()};return m.addEventListener("focusin",_),m.addEventListener("focusout",x),m.addEventListener("pointermove",_),m.addEventListener("pointerleave",b),window.addEventListener("blur",_),window.addEventListener("focus",g),()=>{m.removeEventListener("focusin",_),m.removeEventListener("focusout",x),m.removeEventListener("pointermove",_),m.removeEventListener("pointerleave",b),window.removeEventListener("blur",_),window.removeEventListener("focus",g)}}},[v,o.isClosePausedRef]);const y=B.useCallback(({tabbingDirection:m})=>{const _=a().map(g=>{const x=g.ref.current,b=[x,...mb(x)];return m==="forwards"?b:b.reverse()});return(m==="forwards"?_.reverse():_).flat()},[a]);return B.useEffect(()=>{const m=f.current;if(m){const d=_=>{var b,A,M;const g=_.altKey||_.ctrlKey||_.metaKey;if(_.key==="Tab"&&!g){const R=document.activeElement,T=_.shiftKey;
48if(_.target===m&&T){(b=c.current)==null||b.focus();return}const z=y({tabbingDirection:T?"backwards":"forwards"}),V=z.findIndex(H=>H===R);qf(z.slice(V+1))?_.preventDefault():T?(A=c.current)==null||A.focus():(M=u.current)==null||M.focus()}};return m.addEventListener("keydown",d),()=>m.removeEventListener("keydown",d)}},[a,y]),te.jsxs(WT,{ref:l,role:"region","aria-label":r.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&te.jsx(Lh,{ref:c,onFocusFromOutsideViewport:()=>{const m=y({tabbingDirection:"forwards"});qf(m)}}),te.jsx(Rm.Slot,{scope:n,children:te.jsx(wn.ol,{tabIndex:-1,...s,ref:h})}),v&&te.jsx(Lh,{ref:u,onFocusFromOutsideViewport:()=>{const m=y({tabbingDirection:"backwards"});qf(m)}})]})});j_.displayName=X_;var Y_="ToastFocusProxy",Lh=B.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:i,...r}=t,s=of(Y_,n);return te.jsx(sf,{"aria-hidden":!0,tabIndex:0,...r,ref:e,style:{position:"fixed"},onFocus:o=>{var c;const a=o.relatedTarget;!((c=s.viewport)!=null&&c.contains(a))&&i()}})});Lh.displayName=Y_;var af="Toast",ib="toast.swipeStart",rb="toast.swipeMove",sb="toast.swipeCancel",ob="toast.swipeEnd",q_=B.forwardRef((t,e)=>{const{forceMount:n,open:i,defaultOpen:r,onOpenChange:s,...o}=t,[a=!0,l]=$T({prop:i,defaultProp:r,onChange:s});return te.jsx(Am,{present:n||a,children:te.jsx(cb,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:Pi(t.onPause),onResume:Pi(t.onResume),onSwipeStart:Ot(t.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ot(t.onSwipeMove,c=>{const{x:u,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:Ot(t.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ot(t.onSwipeEnd,c=>{const{x:u,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});q_.displayName=af;var[ab,lb]=G_(af,{onClose(){}}),cb=B.forwardRef((t,e)=>{const{__scopeToast:n,type:i="foreground",duration:r,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:p,...v}=t,y=of(af,n),[m,d]=B.useState(null),_=fi(e,H=>d(H)),g=B.useRef(null),x=B.useRef(null),b=r||y.duration,A=B.useRef(0),M=B.useRef(b),R=B.useRef(0),{onToastAdd:T,onToastRemove:S}=y,U=Pi(()=>{var Q;(m==null?void 0:m.contains(document.activeElement))&&((Q=y.viewport)==null||Q.focus()),o()}),z=B.useCallback(H=>{!H||H===1/0||(window.clearTimeout(R.current),A.current=new Date().getTime(),R.current=window.setTimeout(U,H))},[U]);B.useEffect(()=>{const H=y.viewport;if(H){const Q=()=>{z(M.current),c==null||c()},j=()=>{const W=new Date().getTime()-A.current;M.current=M.current-W,window.clearTimeout(R.current),l==null||l()};return H.addEventListener(Rh,j),H.addEventListener(Ph,Q),()=>{H.removeEventListener(Rh,j),H.removeEventListener(Ph,Q)}}},[y.viewport,b,l,c,z]),B.useEffect(()=>{s&&!y.isClosePausedRef.current&&z(b)},[s,b,y.isClosePausedRef,z]),B.useEffect(()=>(T(),()=>S()),[T,S]);const V=B.useMemo(()=>m?tS(m):null,[m]);return y.viewport?te.jsxs(te.Fragment,{children:[V&&te.jsx(ub,{__scopeToast:n,role:"status","aria-live":i==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),te.jsx(ab,{scope:n,onClose:U,children:Fl.createPortal(te.jsx(Rm.ItemSlot,{scope:n,children:te.jsx(GT,{asChild:!0,onEscapeKeyDown:Ot(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||U(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:te.jsx(wn.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":y.swipeDirection,...v,ref:_,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Ot(t.onKeyDown,H=>{H.key==="Escape"&&(a==null||a(H.nativeEvent),H.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,U()))}),onPointerDown:Ot(t.onPointerDown,H=>{H.button===0&&(g.current={x:H.clientX,y:H.clientY})}),onPointerMove:Ot(t.onPointerMove,H=>{if(!g.current)return;const Q=H.clientX-g.current.x,j=H.clientY-g.current.y,W=!!x.current,N=["left","right"].includes(y.swipeDirection),K=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,se=N?K(0,Q):0,me=N?0:K(0,j),Ae=H.pointerType==="touch"?10:2,He={x:se,y:me},k={originalEvent:H,delta:He};W?(x.current=He,cc(rb,f,k,{discrete:!1})):Cv(He,y.swipeDirection,Ae)?(x.current=He,cc(ib,u,k,{discrete:!1}),H.target.setPointerCapture(H.pointerId)):(Math.abs(Q)>Ae||Math.abs(j)>Ae)&&(g.current=null)}),onPointerUp:Ot(t.onPointerUp,H=>{const Q=x.current,j=H.target;if(j.hasPointerCapture(H.pointerId)&&j.releasePointerCapture(H.pointerId),x.current=null,g.current=null,Q){const W=H.currentTarget,N={originalEvent:H,delta:Q};Cv(Q,y.swipeDirection,y.swipeThreshold)?cc(ob,p,N,{discrete:!0}):cc(sb,h,N,{discrete:!0}),W.addEventListener("click",K=>K.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),ub=t=>{const{__scopeToast:e,children:n,...i}=t,r=of(af,e),[s,o]=B.useState(!1),[a,l]=B.useState(!1);return hb(()=>o(!0)),B.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:te.jsx(V_,{asChild:!0,children:te.jsx(sf,{...i,children:s&&te.jsxs(te.Fragment,{children:[r.label," ",n]})})})},fb="ToastTitle",$_=B.forwardRef((t,e)=>{const{__scopeToast:n,...i}=t;
48return te.jsx(wn.div,{...i,ref:e})});$_.displayName=fb;var db="ToastDescription",Z_=B.forwardRef((t,e)=>{const{__scopeToast:n,...i}=t;return te.jsx(wn.div,{...i,ref:e})});Z_.displayName=db;var K_="ToastAction",Q_=B.forwardRef((t,e)=>{const{altText:n,...i}=t;return n.trim()?te.jsx(eS,{altText:n,asChild:!0,children:te.jsx(Pm,{...i,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${K_}\`. Expected non-empty \`string\`.`),null)});Q_.displayName=K_;var J_="ToastClose",Pm=B.forwardRef((t,e)=>{const{__scopeToast:n,...i}=t,r=lb(J_,n);return te.jsx(eS,{asChild:!0,children:te.jsx(wn.button,{type:"button",...i,ref:e,onClick:Ot(t.onClick,r.onClose)})})});Pm.displayName=J_;var eS=B.forwardRef((t,e)=>{const{__scopeToast:n,altText:i,...r}=t;return te.jsx(wn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0,...r,ref:e})});function tS(t){const e=[];return Array.from(t.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&e.push(i.textContent),pb(i)){const r=i.ariaHidden||i.hidden||i.style.display==="none",s=i.dataset.radixToastAnnounceExclude==="";if(!r)if(s){const o=i.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...tS(i))}}),e}function cc(t,e,n,{discrete:i}){const r=n.originalEvent.currentTarget,s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),i?k_(r,s):r.dispatchEvent(s)}var Cv=(t,e,n=0)=>{const i=Math.abs(t.x),r=Math.abs(t.y),s=i>r;return e==="left"||e==="right"?s&&i>n:!s&&r>n};function hb(t=()=>{}){const e=Pi(t);Ds(()=>{let n=0,i=0;return n=window.requestAnimationFrame(()=>i=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(i)}},[e])}function pb(t){return t.nodeType===t.ELEMENT_NODE}function mb(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function qf(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var gb=W_,nS=j_,iS=q_,rS=$_,sS=Z_,oS=Q_,aS=Pm;function lS(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(n=lS(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function cS(){for(var t,e,n=0,i="",r=arguments.length;n<r;n++)(t=arguments[n])&&(e=lS(t))&&(i&&(i+=" "),i+=e);return i}const Rv=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Pv=cS,vb=(t,e)=>n=>{var i;if((e==null?void 0:e.variants)==null)return Pv(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:s}=e,o=Object.keys(r).map(c=>{const u=n==null?void 0:n[c],f=s==null?void 0:s[c];if(u===null)return null;const h=Rv(u)||Rv(f);return r[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,h]=u;return h===void 0||(c[f]=h),c},{}),l=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((c,u)=>{let{class:f,className:h,...p}=u;return Object.entries(p).every(v=>{let[y,m]=v;return Array.isArray(m)?m.includes({...s,...a}[y]):{...s,...a}[y]===m})?[...c,f,h]:c},[]);return Pv(t,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/** 49 * @license lucide-react v0.453.0 - ISC 50 * 51 * This source code is licensed under the ISC license. 52 * See the LICENSE file in the root directory of this source tree. 53 */const yb=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),uS=(...t)=>t.filter((e,n,i)=>!!e&&i.indexOf(e)===n).join(" ");/** 54 * @license lucide-react v0.453.0 - ISC 55 * 56 * This source code is licensed under the ISC license. 57 * See the LICENSE file in the root directory of this source tree. 58 */var xb={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 59 * @license lucide-react v0.453.0 - ISC 60 * 61 * This source code is licensed under the ISC license. 62 * See the LICENSE file in the root directory of this source tree. 63 */const _b=B.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:r="",children:s,iconNode:o,...a},l)=>B.createElement("svg",{ref:l,...xb,width:e,height:e,stroke:t,strokeWidth:i?Number(n)*24/Number(e):n,className:uS("lucide",r),...a},[...o.map(([c,u])=>B.createElement(c,u)),...Array.isArray(s)?s:[s]]));/** 64 * @license lucide-react v0.453.0 - ISC 65 * 66 * This source code is licensed under the ISC license. 67 * See the LICENSE file in the root directory of this source tree. 68 */const fS=(t,e)=>{const n=B.forwardRef(({className:i,...r},s)=>B.createElement(_b,{ref:s,iconNode:e,className:uS(`lucide-${yb(t)}`,i),...r}));return n.displayName=`${t}`,n};/** 69 * @license lucide-react v0.453.0 - ISC 70 * 71 * This source code is licensed under the ISC license. 72 * See the LICENSE file in the root directory of this source tree. 73 */const Sb=fS("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** 74 * @license lucide-react v0.453.0 - ISC 75 * 76 * This source code is licensed under the ISC license. 77 * See the LICENSE file in the root directory of this source tree. 78 */const wb=fS("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 5,916 bytes, line 78
78],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Lm="-",Eb=t=>{const e=Tb(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:o=>{const a=o.split(Lm);return a[0]===""&&a.length!==1&&a.shift(),dS(a,e)||Mb(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&i[o]?[...l,...i[o]]:l}}},dS=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],i=e.nextPart.get(n),r=i?dS(t.slice(1),i):void 0;if(r)return r;if(e.validators.length===0)return;const s=t.join(Lm);return(o=e.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},Lv=/^\[(.+)\]$/,Mb=t=>{if(Lv.test(t)){const e=Lv.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},Tb=t=>{const{theme:e,prefix:n}=t,i={nextPart:new Map,validators:[]};return Ab(Object.entries(t.classGroups),n).forEach(([s,o])=>{Nh(o,i,s,e)}),i},Nh=(t,e,n,i)=>{t.forEach(r=>{if(typeof r=="string"){const s=r===""?e:Nv(e,r);s.classGroupId=n;return}if(typeof r=="function"){if(bb(r)){Nh(r(i),e,n,i);return}e.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([s,o])=>{Nh(o,Nv(e,s),n,i)})})},Nv=(t,e)=>{let n=t;return e.split(Lm).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},bb=t=>t.isThemeGetter,Ab=(t,e)=>e?t.map(([n,i])=>{const r=i.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[e+o,a])):s);return[n,r]}):t,Cb=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,i=new Map;const r=(s,o)=>{n.set(s,o),e++,e>t&&(e=0,i=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=i.get(s))!==void 0)return r(s,o),o},set(s,o){n.has(s)?n.set(s,o):r(s,o)}}},hS="!",Rb=t=>{const{separator:e,experimentalParseClassName:n}=t,i=e.length===1,r=e[0],s=e.length,o=a=>{const l=[];let c=0,u=0,f;for(let m=0;m<a.length;m++){let d=a[m];if(c===0){if(d===r&&(i||a.slice(m,m+s)===e)){l.push(a.slice(u,m)),u=m+s;continue}if(d==="/"){f=m;continue}}d==="["?c++:d==="]"&&c--}const h=l.length===0?a:a.substring(u),p=h.startsWith(hS),v=p?h.substring(1):h,y=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:y}};return n?a=>n({className:a,parseClassName:o}):o},Pb=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(i=>{i[0]==="["?(e.push(...n.sort(),i),n=[]):n.push(i)}),e.push(...n.sort()),e},Lb=t=>({cache:Cb(t.cacheSize),parseClassName:Rb(t),...Eb(t)}),Nb=/\s+/,Db=(t,e)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:r}=e,s=[],o=t.trim().split(Nb);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=n(c);let v=!!p,y=i(v?h.substring(0,p):h);if(!y){if(!v){a=c+(a.length>0?" "+a:a);continue}if(y=i(h),!y){a=c+(a.length>0?" "+a:a);continue}v=!1}const m=Pb(u).join(":"),d=f?m+hS:m,_=d+y;if(s.includes(_))continue;s.push(_);const g=r(y,v);for(let x=0;x<g.length;++x){const b=g[x];s.push(d+b)}a=c+(a.length>0?" "+a:a)}return a};function Ib(){let t=0,e,n,i="";for(;t<arguments.length;)(e=arguments[t++])&&(n=pS(e))&&(i&&(i+=" "),i+=n);return i}const pS=t=>{if(typeof t=="string")return t;let e,n="";for(let i=0;i<t.length;i++)t[i]&&(e=pS(t[i]))&&(n&&(n+=" "),n+=e);return n};function Ub(t,...e){let n,i,r,s=o;function o(l){const c=e.reduce((u,f)=>f(u),t());return n=Lb(c),i=n.cache.get,r=n.cache.set,s=a,a(l)}function a(l){const c=i(l);if(c)return c;const u=Db(l,n);return r(l,u),u}return function(){return s(Ib.apply(null,arguments))}}const gt=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},mS=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ob=/^\d+\/\d+$/,Fb=new Set(["px","full","screen"]),kb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Bb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Hb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Fi=t=>To(t)||Fb.has(t)||Ob.test(t),fr=t=>oa(t,"length",Zb),To=t=>!!t&&!Number.isNaN(Number(t)),$f=t=>oa(t,"number",To),Ta=t=>!!t&&Number.isInteger(Number(t)),Gb=t=>t.endsWith("%")&&To(t.slice(0,-1)),Ze=t=>mS.test(t),dr=t=>kb.test(t),Wb=new Set(["length","size","percentage"]),Xb=t=>oa(t,Wb,gS),jb=t=>oa(t,"position",gS),Yb=new Set(["image","url"]),qb=t=>oa(t,Yb,Qb),$b=t=>oa(t,"",Kb),ba=()=>!0,oa=(t,e,n)=>{const i=mS.exec(t);return i?i[1]?typeof e=="string"?i[1]===e:e.has(i[1]):n(i[2]):!1},Zb=t=>zb.test(t)&&!Bb.test(t),gS=()=>!1,Kb=t=>Hb.test(t),Qb=t=>Vb.test(t),Jb=()=>{const t=gt("colors"),e=gt("spacing"),n=gt("blur"),i=gt("brightness"),r=gt("borderColor"),s=gt("borderRadius"),o=gt("borderSpacing"),a=gt("borderWidth"),l=gt("contrast"),c=gt("grayscale"),u=gt("hueRotate"),f=gt("invert"),h=gt("gap"),p=gt("gradientColorStops"),v=gt("gradientColorStopPositions"),y=gt("inset"),m=gt("margin"),d=gt("opacity"),_=gt("padding"),g=gt("saturate"),x=gt("scale"),b=gt("sepia"),A=gt("skew"),M=gt("space"),R=gt("translate"),T=()=>["auto","contain","none"],S=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",Ze,e],z=()=>[Ze,e],V=()=>["",Fi,fr],H=()=>["auto",To,Ze],Q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],j=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",Ze],se=()=>["auto","avoid","all","avoid-page","page","left","right","column"],me=()=>[To,Ze];return{cacheSize:500,separator:":",theme:{colors:[ba],spacing:[Fi,fr],blur:["none","",dr,Ze],brightness:me(),borderColor:[t],borderRadius:["n
78one","","full",dr,Ze],borderSpacing:z(),borderWidth:V(),contrast:me(),grayscale:K(),hueRotate:me(),invert:K(),gap:z(),gradientColorStops:[t],gradientColorStopPositions:[Gb,fr],inset:U(),margin:U(),opacity:me(),padding:z(),saturate:me(),scale:me(),sepia:K(),skew:me(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",Ze]}],container:["container"],columns:[{columns:[dr]}],"break-after":[{"break-after":se()}],"break-before":[{"break-before":se()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Q(),Ze]}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ta,Ze]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ze]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",Ta,Ze]}],"grid-cols":[{"grid-cols":[ba]}],"col-start-end":[{col:["auto",{span:["full",Ta,Ze]},Ze]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[ba]}],"row-start-end":[{row:["auto",{span:[Ta,Ze]},Ze]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ze]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ze]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ze,e]}],"min-w":[{"min-w":[Ze,e,"min","max","fit"]}],"max-w":[{"max-w":[Ze,e,"none","full","min","max","fit","prose",{screen:[dr]},dr]}],h:[{h:[Ze,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ze,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ze,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ze,e,"auto","min","max","fit"]}],"font-size":[{text:["base",dr,fr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",$f]}],"font-family":[{font:[ba]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ze]}],"line-clamp":[{"line-clamp":["none",To,$f]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Fi,Ze]}],"list-image":[{"list-image":["none",Ze]}],"list-style-type":[{list:["none","disc","decimal",Ze]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[d]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[d]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Fi,fr]}],"underline-offset":[{"underline-offset":["auto",Fi,Ze]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ze]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ze]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[d]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Q(),jb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Xb]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},qb]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[v]}
vendor: 5,182 bytes, line 78
78],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[d]}],"border-style":[{border:[...j(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[d]}],"divide-style":[{divide:j()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...j()]}],"outline-offset":[{"outline-offset":[Fi,Ze]}],"outline-w":[{outline:[Fi,fr]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[d]}],"ring-offset-w":[{"ring-offset":[Fi,fr]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",dr,$b]}],"shadow-color":[{shadow:[ba]}],opacity:[{opacity:[d]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",dr,Ze]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[g]}],sepia:[{sepia:[b]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[d]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[b]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ze]}],duration:[{duration:me()}],ease:[{ease:["linear","in","out","in-out",Ze]}],delay:[{delay:me()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ze]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Ta,Ze]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ze]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ze]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,651 bytes, line 78
78],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ze]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Fi,fr,$f]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},eA=Ub(Jb);function On(...t){return eA(cS(t))}const tA=gb,vS=B.forwardRef(({className:t,...e},n)=>te.jsx(nS,{ref:n,className:On("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));vS.displayName=nS.displayName;const nA=vb("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),yS=B.forwardRef(({className:t,variant:e,...n},i)=>te.jsx(iS,{ref:i,className:On(nA({variant:e}),t),...n}));yS.displayName=iS.displayName;const iA=B.forwardRef(({className:t,...e},n)=>te.jsx(oS,{ref:n,className:On("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...e}));iA.displayName=oS.displayName;const xS=B.forwardRef(({className:t,...e},n)=>te.jsx(aS,{ref:n,className:On("absolute right-2 top-2 rounded-md p-1 text-foreground
vendor: 4,663 bytes, line 78
78/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:te.jsx(wb,{className:"h-4 w-4"})}));xS.displayName=aS.displayName;const _S=B.forwardRef(({className:t,...e},n)=>te.jsx(rS,{ref:n,className:On("text-sm font-semibold",t),...e}));_S.displayName=rS.displayName;const SS=B.forwardRef(({className:t,...e},n)=>te.jsx(sS,{ref:n,className:On("text-sm opacity-90",t),...e}));SS.displayName=sS.displayName;function rA(){const{toasts:t}=AT();return te.jsxs(tA,{children:[t.map(function({id:e,title:n,description:i,action:r,...s}){return te.jsxs(yS,{...s,children:[te.jsxs("div",{className:"grid gap-1",children:[n&&te.jsx(_S,{children:n}),i&&te.jsx(SS,{children:i})]}),r,te.jsx(xS,{})]},e)}),te.jsx(vS,{})]})}const sA=["top","right","bottom","left"],Xr=Math.min,Rn=Math.max,Pu=Math.round,uc=Math.floor,Ci=t=>({x:t,y:t}),oA={left:"right",right:"left",bottom:"top",top:"bottom"},aA={start:"end",end:"start"};function Dh(t,e,n){return Rn(t,Xr(e,n))}function sr(t,e){return typeof t=="function"?t(e):t}function or(t){return t.split("-")[0]}function aa(t){return t.split("-")[1]}function Nm(t){return t==="x"?"y":"x"}function Dm(t){return t==="y"?"height":"width"}function jr(t){return["top","bottom"].includes(or(t))?"y":"x"}function Im(t){return Nm(jr(t))}function lA(t,e,n){n===void 0&&(n=!1);const i=aa(t),r=Im(t),s=Dm(r);let o=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Lu(o)),[o,Lu(o)]}function cA(t){const e=Lu(t);return[Ih(t),e,Ih(e)]}function Ih(t){return t.replace(/start|end/g,e=>aA[e])}function uA(t,e,n){const i=["left","right"],r=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?r:i:e?i:r;case"left":case"right":return e?s:o;default:return[]}}function fA(t,e,n,i){const r=aa(t);let s=uA(or(t),n==="start",i);return r&&(s=s.map(o=>o+"-"+r),e&&(s=s.concat(s.map(Ih)))),s}function Lu(t){return t.replace(/left|right|bottom|top/g,e=>oA[e])}function dA(t){return{top:0,right:0,bottom:0,left:0,...t}}function wS(t){return typeof t!="number"?dA(t):{top:t,right:t,bottom:t,left:t}}function Nu(t){const{x:e,y:n,width:i,height:r}=t;return{width:i,height:r,top:n,left:e,right:e+i,bottom:n+r,x:e,y:n}}function Dv(t,e,n){let{reference:i,floating:r}=t;const s=jr(e),o=Im(e),a=Dm(o),l=or(e),c=s==="y",u=i.x+i.width/2-r.width/2,f=i.y+i.height/2-r.height/2,h=i[a]/2-r[a]/2;let p;switch(l){case"top":p={x:u,y:i.y-r.height};break;case"bottom":p={x:u,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:f};break;case"left":p={x:i.x-r.width,y:f};break;default:p={x:i.x,y:i.y}}switch(aa(e)){case"start":p[o]-=h*(n&&c?-1:1);break;case"end":p[o]+=h*(n&&c?-1:1);break}return p}const hA=async(t,e,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:f}=Dv(c,i,l),h=i,p={},v=0;for(let y=0;y<a.length;y++){const{name:m,fn:d}=a[y],{x:_,y:g,data:x,reset:b}=await d({x:u,y:f,initialPlacement:i,placement:h,strategy:r,middlewareData:p,rects:c,platform:o,elements:{reference:t,floating:e}});u=_??u,f=g??f,p={...p,[m]:{...p[m],...x}},b&&v<=50&&(v++,typeof b=="object"&&(b.placement&&(h=b.placement),b.rects&&(c=b.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:r}):b.rects),{x:u,y:f}=Dv(c,h,l)),y=-1)}return{x:u,y:f,placement:h,strategy:r,middlewareData:p}};async function Sl(t,e){var n;e===void 0&&(e={});const{x:i,y:r,platform:s,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=sr(e,t),v=wS(p),m=a[h?f==="floating"?"reference":"floating":f],d=Nu(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(m)))==null||n?m:m.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),_=f==="floating"?{x:i,y:r,width:o.floating.width,height:o.floating.height}:o.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),x=await(s.isElement==null?void 0:s.isElement(g))?await(s.getScale==null?void 0:s.getScale(g))||{x:1,y:1}:{x:1,y:1},b=Nu(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:_,offsetParent:g,strategy:l}):_);
vendor: 7,430 bytes, line 78
78return{top:(d.top-b.top+v.top)/x.y,bottom:(b.bottom-d.bottom+v.bottom)/x.y,left:(d.left-b.left+v.left)/x.x,right:(b.right-d.right+v.right)/x.x}}const pA=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:r,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=sr(t,e)||{};if(c==null)return{};const f=wS(u),h={x:n,y:i},p=Im(r),v=Dm(p),y=await o.getDimensions(c),m=p==="y",d=m?"top":"left",_=m?"bottom":"right",g=m?"clientHeight":"clientWidth",x=s.reference[v]+s.reference[p]-h[p]-s.floating[v],b=h[p]-s.reference[p],A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let M=A?A[g]:0;(!M||!await(o.isElement==null?void 0:o.isElement(A)))&&(M=a.floating[g]||s.floating[v]);const R=x/2-b/2,T=M/2-y[v]/2-1,S=Xr(f[d],T),U=Xr(f[_],T),z=S,V=M-y[v]-U,H=M/2-y[v]/2+R,Q=Dh(z,H,V),j=!l.arrow&&aa(r)!=null&&H!==Q&&s.reference[v]/2-(H<z?S:U)-y[v]/2<0,W=j?H<z?H-z:H-V:0;return{[p]:h[p]+W,data:{[p]:Q,centerOffset:H-Q-W,...j&&{alignmentOffset:W}},reset:j}}}),mA=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:r,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,...m}=sr(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const d=or(r),_=jr(a),g=or(a)===a,x=await(l.isRTL==null?void 0:l.isRTL(c.floating)),b=h||(g||!y?[Lu(a)]:cA(a)),A=v!=="none";!h&&A&&b.push(...fA(a,y,v,x));const M=[a,...b],R=await Sl(e,m),T=[];let S=((i=s.flip)==null?void 0:i.overflows)||[];if(u&&T.push(R[d]),f){const H=lA(r,o,x);T.push(R[H[0]],R[H[1]])}if(S=[...S,{placement:r,overflows:T}],!T.every(H=>H<=0)){var U,z;const H=(((U=s.flip)==null?void 0:U.index)||0)+1,Q=M[H];if(Q)return{data:{index:H,overflows:S},reset:{placement:Q}};let j=(z=S.filter(W=>W.overflows[0]<=0).sort((W,N)=>W.overflows[1]-N.overflows[1])[0])==null?void 0:z.placement;if(!j)switch(p){case"bestFit":{var V;const W=(V=S.filter(N=>{if(A){const K=jr(N.placement);return K===_||K==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(K=>K>0).reduce((K,se)=>K+se,0)]).sort((N,K)=>N[1]-K[1])[0])==null?void 0:V[0];W&&(j=W);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function Iv(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Uv(t){return sA.some(e=>t[e]>=0)}const gA=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:i="referenceHidden",...r}=sr(t,e);switch(i){case"referenceHidden":{const s=await Sl(e,{...r,elementContext:"reference"}),o=Iv(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Uv(o)}}}case"escaped":{const s=await Sl(e,{...r,altBoundary:!0}),o=Iv(s,n.floating);return{data:{escapedOffsets:o,escaped:Uv(o)}}}default:return{}}}}};async function vA(t,e){const{placement:n,platform:i,elements:r}=t,s=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=or(n),a=aa(n),l=jr(n)==="y",c=["left","top"].includes(o)?-1:1,u=s&&l?-1:1,f=sr(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof v=="number"&&(p=a==="end"?v*-1:v),l?{x:p*u,y:h*c}:{x:h*c,y:p*u}}const yA=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:r,y:s,placement:o,middlewareData:a}=e,l=await vA(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:o}}}}},xA=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:r}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:m=>{let{x:d,y:_}=m;return{x:d,y:_}}},...l}=sr(t,e),c={x:n,y:i},u=await Sl(e,l),f=jr(or(r)),h=Nm(f);let p=c[h],v=c[f];if(s){const m=h==="y"?"top":"left",d=h==="y"?"bottom":"right",_=p+u[m],g=p-u[d];p=Dh(_,p,g)}if(o){const m=f==="y"?"top":"left",d=f==="y"?"bottom":"right",_=v+u[m],g=v-u[d];v=Dh(_,v,g)}const y=a.fn({...e,[h]:p,[f]:v});return{...y,data:{x:y.x-n,y:y.y-i,enabled:{[h]:s,[f]:o}}}}}},_A=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:i,placement:r,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=sr(t,e),u={x:n,y:i},f=jr(r),h=Nm(f);let p=u[h],v=u[f];const y=sr(a,e),m=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const g=h==="y"?"height":"width",x=s.reference[h]-s.floating[g]+m.mainAxis,b=s.reference[h]+s.reference[g]-m.mainAxis;p<x?p=x:p>b&&(p=b)}if(c){var d,_;const g=h==="y"?"width":"height",x=["top","left"].includes(or(r)),b=s.reference[f]-s.floating[g]+(x&&((d=o.offset)==null?void 0:d[f])||0)+(x?0:m.crossAxis),A=s.reference[f]+s.reference[g]+(x?0:((_=o.offset)==null?void 0:_[f])||0)-(x?m.crossAxis:0);v<b?v=b:v>A&&(v=A)}return{[h]:p,[f]:v}}}},SA=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;const{placement:r,rects:s,platform:o,elements:a}=e,{apply:l=()=>{},...c}=sr(t,e),u=await Sl(e,c),f=or(r),h=aa(r),p=jr(r)==="y",{width:v,height:y}=s.floating;let m,d;f==="top"||f==="bottom"?(m=f,d=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(d=f,m=h==="end"?"top":"bottom");const _=y-u.top-u.bottom,g=v-u.left-u.right,x=Xr(y-u[m],_),b=Xr(v-u[d],g),A=!e.middlewareData.shift;let M=x,R=b;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(R=g),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(M=_),A&&!h){const S=Rn(u.left,0),U=Rn(u.right,0),z=Rn(u.top,0),V=Rn(u.bottom,0);p?R=v-2*(S!==0||U!==0?S+U:Rn(u.left,u.right)):M=y-2*(z!==0||V!==0?z+V:Rn(u.top,u.bottom))}await l({...e,availableWidth:R,availableHeight:M});const T=await o.getDimensions(a.floating);return v!==T.width||y!==T.height?{reset:{rects:!0}}:{}}}};function lf(){return typeof window<"u"}function la(t){return ES(t)?(t.nodeName||"").toLowerCase():"#document"}function Nn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ii(t){var e;return(e=(ES(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ES(t){return lf()?t instanceof Node||t instanceof Nn(t).Node:!1}function di(t){return lf()?t instanceof Element||t instanceof Nn(t).Element:!1}function Li(t){return lf()?t instanceof HTMLElement||t instanceof Nn(t).HTMLElement:!1}function Ov(t){return!lf()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Nn(t).ShadowRoot}function kl(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=hi(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(r)}function wA(t){return["table","td","th"].includes(la(t))}function cf(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Um(t){const e=Om(),n=di(t)?hi(t):t;return["transform","translate","scale","rotate","perspective"].some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function EA(t){let e=Yr(t);for(;Li(e)&&!$o(e);){if(Um(e))return e;if(cf(e))return null;e=Yr(e)}return null}
vendor: 1,450 bytes, line 78
78function Om(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function $o(t){return["html","body","#document"].includes(la(t))}function hi(t){return Nn(t).getComputedStyle(t)}function uf(t){return di(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Yr(t){if(la(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ov(t)&&t.host||Ii(t);return Ov(e)?e.host:e}function MS(t){const e=Yr(t);return $o(e)?t.ownerDocument?t.ownerDocument.body:t.body:Li(e)&&kl(e)?e:MS(e)}function wl(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=MS(t),s=r===((i=t.ownerDocument)==null?void 0:i.body),o=Nn(r);if(s){const a=Uh(o);return e.concat(o,o.visualViewport||[],kl(r)?r:[],a&&n?wl(a):[])}return e.concat(r,wl(r,[],n))}function Uh(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function TS(t){const e=hi(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=Li(t),s=r?t.offsetWidth:n,o=r?t.offsetHeight:i,a=Pu(n)!==s||Pu(i)!==o;return a&&(n=s,i=o),{width:n,height:i,$:a}}function Fm(t){return di(t)?t:t.contextElement}function bo(t){const e=Fm(t);if(!Li(e))return Ci(1);const n=e.getBoundingClientRect(),{width:i,height:r,$:s}=TS(e);let o=(s?Pu(n.width):n.width)/i,a=(s?Pu(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const MA=Ci(0);function bS(t){const e=Nn(t);
vendor: 6,604 bytes, line 78
78return!Om()||!e.visualViewport?MA:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function TA(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Nn(t)?!1:e}function Is(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=Fm(t);let o=Ci(1);e&&(i?di(i)&&(o=bo(i)):o=bo(t));const a=TA(s,n,i)?bS(s):Ci(0);let l=(r.left+a.x)/o.x,c=(r.top+a.y)/o.y,u=r.width/o.x,f=r.height/o.y;if(s){const h=Nn(s),p=i&&di(i)?Nn(i):i;let v=h,y=Uh(v);for(;y&&i&&p!==v;){const m=bo(y),d=y.getBoundingClientRect(),_=hi(y),g=d.left+(y.clientLeft+parseFloat(_.paddingLeft))*m.x,x=d.top+(y.clientTop+parseFloat(_.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,f*=m.y,l+=g,c+=x,v=Nn(y),y=Uh(v)}}return Nu({width:u,height:f,x:l,y:c})}function km(t,e){const n=uf(t).scrollLeft;return e?e.left+n:Is(Ii(t)).left+n}function AS(t,e,n){n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=i.left+e.scrollLeft-(n?0:km(t,i)),s=i.top+e.scrollTop;return{x:r,y:s}}function bA(t){let{elements:e,rect:n,offsetParent:i,strategy:r}=t;const s=r==="fixed",o=Ii(i),a=e?cf(e.floating):!1;if(i===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Ci(1);const u=Ci(0),f=Li(i);if((f||!f&&!s)&&((la(i)!=="body"||kl(o))&&(l=uf(i)),Li(i))){const p=Is(i);c=bo(i),u.x=p.x+i.clientLeft,u.y=p.y+i.clientTop}const h=o&&!f&&!s?AS(o,l,!0):Ci(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function AA(t){return Array.from(t.getClientRects())}function CA(t){const e=Ii(t),n=uf(t),i=t.ownerDocument.body,r=Rn(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=Rn(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+km(t);const a=-n.scrollTop;return hi(i).direction==="rtl"&&(o+=Rn(e.clientWidth,i.clientWidth)-r),{width:r,height:s,x:o,y:a}}function RA(t,e){const n=Nn(t),i=Ii(t),r=n.visualViewport;let s=i.clientWidth,o=i.clientHeight,a=0,l=0;if(r){s=r.width,o=r.height;const c=Om();(!c||c&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:s,height:o,x:a,y:l}}function PA(t,e){const n=Is(t,!0,e==="fixed"),i=n.top+t.clientTop,r=n.left+t.clientLeft,s=Li(t)?bo(t):Ci(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=r*s.x,c=i*s.y;return{width:o,height:a,x:l,y:c}}function Fv(t,e,n){let i;if(e==="viewport")i=RA(t,n);else if(e==="document")i=CA(Ii(t));else if(di(e))i=PA(e,n);else{const r=bS(t);i={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return Nu(i)}function CS(t,e){const n=Yr(t);return n===e||!di(n)||$o(n)?!1:hi(n).position==="fixed"||CS(n,e)}function LA(t,e){const n=e.get(t);if(n)return n;let i=wl(t,[],!1).filter(a=>di(a)&&la(a)!=="body"),r=null;const s=hi(t).position==="fixed";let o=s?Yr(t):t;for(;di(o)&&!$o(o);){const a=hi(o),l=Um(o);!l&&a.position==="fixed"&&(r=null),(s?!l&&!r:!l&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||kl(o)&&!l&&CS(t,o))?i=i.filter(u=>u!==o):r=a,o=Yr(o)}return e.set(t,i),i}function NA(t){let{element:e,boundary:n,rootBoundary:i,strategy:r}=t;const o=[...n==="clippingAncestors"?cf(e)?[]:LA(e,this._c):[].concat(n),i],a=o[0],l=o.reduce((c,u)=>{const f=Fv(e,u,r);return c.top=Rn(f.top,c.top),c.right=Xr(f.right,c.right),c.bottom=Xr(f.bottom,c.bottom),c.left=Rn(f.left,c.left),c},Fv(e,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function DA(t){const{width:e,height:n}=TS(t);return{width:e,height:n}}function IA(t,e,n){const i=Li(e),r=Ii(e),s=n==="fixed",o=Is(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=Ci(0);if(i||!i&&!s)if((la(e)!=="body"||kl(r))&&(a=uf(e)),i){const h=Is(e,!0,s,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else r&&(l.x=km(r));const c=r&&!i&&!s?AS(r,a):Ci(0),u=o.left+a.scrollLeft-l.x-c.x,f=o.top+a.scrollTop-l.y-c.y;return{x:u,y:f,width:o.width,height:o.height}}function Zf(t){return hi(t).position==="static"}function kv(t,e){if(!Li(t)||hi(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Ii(t)===n&&(n=n.ownerDocument.body),n}function RS(t,e){const n=Nn(t);if(cf(t))return n;if(!Li(t)){let r=Yr(t);for(;r&&!$o(r);){if(di(r)&&!Zf(r))return r;r=Yr(r)}return n}let i=kv(t,e);for(;i&&wA(i)&&Zf(i);)i=kv(i,e);return i&&$o(i)&&Zf(i)&&!Um(i)?n:i||EA(t)||n}const UA=async function(t){const e=this.getOffsetParent||RS,n=this.getDimensions,i=await n(t.floating);return{reference:IA(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function OA(t){return hi(t).direction==="rtl"}const FA={convertOffsetParentRelativeRectToViewportRelativeRect:bA,getDocumentElement:Ii,getClippingRect:NA,getOffsetParent:RS,getElementRects:UA,getClientRects:AA,getDimensions:DA,getScale:bo,isElement:di,isRTL:OA};function PS(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function kA(t,e){let n=null,i;const r=Ii(t);function s(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=t.getBoundingClientRect(),{left:u,top:f,width:h,height:p}=c;if(a||e(),!h||!p)return;const v=uc(f),y=uc(r.clientWidth-(u+h)),m=uc(r.clientHeight-(f+p)),d=uc(u),g={rootMargin:-v+"px "+-y+"px "+-m+"px "+-d+"px",threshold:Rn(0,Xr(1,l))||1};let x=!0;function b(A){const M=A[0].intersectionRatio;if(M!==l){if(!x)return o();M?o(!1,M):i=setTimeout(()=>{o(!1,1e-7)},1e3)}M===1&&!PS(c,t.getBoundingClientRect())&&o(),x=!1}try{n=new IntersectionObserver(b,{...g,root:r.ownerDocument})}catch{n=new IntersectionObserver(b,g)}n.observe(t)}return o(!0),s}function zA(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=Fm(t),u=r||s?[...c?wl(c):[],...wl(e)]:[];u.forEach(d=>{r&&d.addEventListener("scroll",n,{passive:!0}),s&&d.addEventListener("resize",n)});const f=c&&a?kA(c,n):null;let h=-1,p=null;o&&(p=new ResizeObserver(d=>{let[_]=d;_&&_.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var g;(g=p)==null||g.observe(e)})),n()}),c&&!l&&p.observe(c),p.observe(e));let v,y=l?Is(t):null;l&&m();function m(){const d=Is(t);y&&!PS(y,d)&&n(),y=d,v=requestAnimationFrame(m)}return n(),()=>{var d;u.forEach(_=>{r&&_.removeEventListener("scroll",n),s&&_.removeEventListener("resize",n)}),f==null||f(),(d=p)==null||d.disconnect(),p=null,l&&cancelAnimationFrame(v)}}const BA=yA,HA=xA,VA=mA,GA=SA,WA=gA,zv=pA,XA=_A,jA=(t,e,n)=>{const i=new Map,r={platform:FA,...n},s={...r.platform,_c:i};return hA(t,e,{...r,platform:s})};var Kc=typeof document<"u"?B.useLayoutEffect:B.useEffect;function Du(t,e){if(t===e)return!0;
vendor: 3,242 bytes, line 78
78if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,i,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(i=n;i--!==0;)if(!Du(t[i],e[i]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(e,r[i]))return!1;for(i=n;i--!==0;){const s=r[i];if(!(s==="_owner"&&t.$$typeof)&&!Du(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function LS(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Bv(t,e){const n=LS(t);return Math.round(e*n)/n}function Kf(t){const e=B.useRef(t);return Kc(()=>{e.current=t}),e}function YA(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:i=[],platform:r,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,f]=B.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,p]=B.useState(i);Du(h,i)||p(i);const[v,y]=B.useState(null),[m,d]=B.useState(null),_=B.useCallback(N=>{N!==A.current&&(A.current=N,y(N))},[]),g=B.useCallback(N=>{N!==M.current&&(M.current=N,d(N))},[]),x=s||v,b=o||m,A=B.useRef(null),M=B.useRef(null),R=B.useRef(u),T=l!=null,S=Kf(l),U=Kf(r),z=Kf(c),V=B.useCallback(()=>{if(!A.current||!M.current)return;const N={placement:e,strategy:n,middleware:h};U.current&&(N.platform=U.current),jA(A.current,M.current,N).then(K=>{const se={...K,isPositioned:z.current!==!1};H.current&&!Du(R.current,se)&&(R.current=se,Fl.flushSync(()=>{f(se)}))})},[h,e,n,U,z]);Kc(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(N=>({...N,isPositioned:!1})))},[c]);const H=B.useRef(!1);Kc(()=>(H.current=!0,()=>{H.current=!1}),[]),Kc(()=>{if(x&&(A.current=x),b&&(M.current=b),x&&b){if(S.current)return S.current(x,b,V);V()}},[x,b,V,S,T]);const Q=B.useMemo(()=>({reference:A,floating:M,setReference:_,setFloating:g}),[_,g]),j=B.useMemo(()=>({reference:x,floating:b}),[x,b]),W=B.useMemo(()=>{const N={position:n,left:0,top:0};if(!j.floating)return N;const K=Bv(j.floating,u.x),se=Bv(j.floating,u.y);return a?{...N,transform:"translate("+K+"px, "+se+"px)",...LS(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:se}},[n,a,j.floating,u.x,u.y]);return B.useMemo(()=>({...u,update:V,refs:Q,elements:j,floatingStyles:W}),[u,V,Q,j,W])}const qA=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:i,padding:r}=typeof t=="function"?t(n):t;return i&&e(i)?i.current!=null?zv({element:i.current,padding:r}).fn(n):{}:i?zv({element:i,padding:r}).fn(n):{}}}},$A=(t,e)=>({...BA(t),options:[t,e]}),ZA=(t,e)=>({...HA(t),options:[t,e]}),KA=(t,e)=>({...XA(t),options:[t,e]}),QA=(t,e)=>({...VA(t),options:[t,e]}),JA=(t,e)=>({...GA(t),options:[t,e]}),eC=(t,e)=>({...WA(t),options:[t,e]}),tC=(t,e)=>({...qA(t),options:[t,e]});var nC="Arrow",NS=B.forwardRef((t,e)=>{const{children:n,width:i=10,height:r=5,...s}=t;return te.jsx(wn.svg,{...s,ref:e,width:i,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:te.jsx("polygon",{points:"0,0 30,0 15,10"})})});NS.displayName=nC;var iC=NS;function rC(t){const[e,n]=B.useState(void 0);return Ds(()=>
vendor: 4,602 bytes, line 78
78{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const i=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;n({width:o,height:a})});return i.observe(t,{box:"border-box"}),()=>i.unobserve(t)}else n(void 0)},[t]),e}var DS="Popper",[IS,US]=rf(DS),[eI,OS]=IS(DS),FS="PopperAnchor",kS=B.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:i,...r}=t,s=OS(FS,n),o=B.useRef(null),a=fi(e,o);return B.useEffect(()=>{s.onAnchorChange((i==null?void 0:i.current)||o.current)}),i?null:te.jsx(wn.div,{...r,ref:a})});kS.displayName=FS;var zm="PopperContent",[sC,oC]=IS(zm),zS=B.forwardRef((t,e)=>{var C,ne,de,Y,_e,ye;const{__scopePopper:n,side:i="bottom",sideOffset:r=0,align:s="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:v,...y}=t,m=OS(zm,n),[d,_]=B.useState(null),g=fi(e,pe=>_(pe)),[x,b]=B.useState(null),A=rC(x),M=(A==null?void 0:A.width)??0,R=(A==null?void 0:A.height)??0,T=i+(s!=="center"?"-"+s:""),S=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},U=Array.isArray(c)?c:[c],z=U.length>0,V={padding:S,boundary:U.filter(lC),altBoundary:z},{refs:H,floatingStyles:Q,placement:j,isPositioned:W,middlewareData:N}=YA({strategy:"fixed",placement:T,whileElementsMounted:(...pe)=>zA(...pe,{animationFrame:p==="always"}),elements:{reference:m.anchor},middleware:[$A({mainAxis:r+R,alignmentAxis:o}),l&&ZA({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?KA():void 0,...V}),l&&QA({...V}),JA({...V,apply:({elements:pe,rects:w,availableWidth:J,availableHeight:ee})=>{const{width:re,height:F}=w.reference,I=pe.floating.style;I.setProperty("--radix-popper-available-width",`${J}px`),I.setProperty("--radix-popper-available-height",`${ee}px`),I.setProperty("--radix-popper-anchor-width",`${re}px`),I.setProperty("--radix-popper-anchor-height",`${F}px`)}}),x&&tC({element:x,padding:a}),cC({arrowWidth:M,arrowHeight:R}),h&&eC({strategy:"referenceHidden",...V})]}),[K,se]=VS(j),me=Pi(v);Ds(()=>{W&&(me==null||me())},[W,me]);const Ae=(C=N.arrow)==null?void 0:C.x,He=(ne=N.arrow)==null?void 0:ne.y,k=((de=N.arrow)==null?void 0:de.centerOffset)!==0,[O,D]=B.useState();return Ds(()=>{d&&D(window.getComputedStyle(d).zIndex)},[d]),te.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:W?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:O,"--radix-popper-transform-origin":[(Y=N.transformOrigin)==null?void 0:Y.x,(_e=N.transformOrigin)==null?void 0:_e.y].join(" "),...((ye=N.hide)==null?void 0:ye.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:te.jsx(sC,{scope:n,placedSide:K,onArrowChange:b,arrowX:Ae,arrowY:He,shouldHideArrow:k,children:te.jsx(wn.div,{"data-side":K,"data-align":se,...y,ref:g,style:{...y.style,animation:W?void 0:"none"}})})})});zS.displayName=zm;var BS="PopperArrow",aC={top:"bottom",right:"left",bottom:"top",left:"right"},HS=B.forwardRef(function(e,n){const{__scopePopper:i,...r}=e,s=oC(BS,i),o=aC[s.placedSide];return te.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:te.jsx(iC,{...r,ref:n,style:{...r.style,display:"block"}})})});HS.displayName=BS;function lC(t){return t!==null}var cC=t=>({name:"transformOrigin",options:t,fn(e){var m,d,_;const{placement:n,rects:i,middlewareData:r}=e,o=((m=r.arrow)==null?void 0:m.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,u]=VS(n),f={start:"0%",center:"50%",end:"100%"}[u],h=(((d=r.arrow)==null?void 0:d.x)??0)+a/2,p=(((_=r.arrow)==null?void 0:_.y)??0)+l/2;let v="",y="";return c==="bottom"?(v=o?f:`${h}px`,y=`${-l}px`):c==="top"?(v=o?f:`${h}px`,y=`${i.floating.height+l}px`):c==="right"?(v=`${-l}px`,y=o?f:`${p}px`):c==="left"&&(v=`${i.floating.width+l}px`,y=o?f:`${p}px`),{data:{x:v,y}}}});function VS(t){const[e,n="center"]=t.split("-");return[e,n]}var uC=kS,fC=zS,dC=HS,[ff,tI]=rf("Tooltip",[US]),Bm=US(),GS="TooltipProvider",hC=700,Hv="tooltip.open",[pC,WS]=ff(GS),XS=t=>{const{__scopeTooltip:e,delayDuration:n=hC,skipDelayDuration:i=300,disableHoverableContent:r=!1,
vendor: 6,206 bytes, line 78
78children:s}=t,o=B.useRef(!0),a=B.useRef(!1),l=B.useRef(0);return B.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),te.jsx(pC,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:B.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:B.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,i)},[i]),isPointerInTransitRef:a,onPointerInTransitChange:B.useCallback(c=>{a.current=c},[]),disableHoverableContent:r,children:s})};XS.displayName=GS;var jS="Tooltip",[nI,df]=ff(jS),Oh="TooltipTrigger",mC=B.forwardRef((t,e)=>{const{__scopeTooltip:n,...i}=t,r=df(Oh,n),s=WS(Oh,n),o=Bm(n),a=B.useRef(null),l=fi(e,a,r.onTriggerChange),c=B.useRef(!1),u=B.useRef(!1),f=B.useCallback(()=>c.current=!1,[]);return B.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),te.jsx(uC,{asChild:!0,...o,children:te.jsx(wn.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...i,ref:l,onPointerMove:Ot(t.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:Ot(t.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:Ot(t.onPointerDown,()=>{r.open&&r.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ot(t.onFocus,()=>{c.current||r.onOpen()}),onBlur:Ot(t.onBlur,r.onClose),onClick:Ot(t.onClick,r.onClose)})})});mC.displayName=Oh;var gC="TooltipPortal",[iI,vC]=ff(gC,{forceMount:void 0}),Zo="TooltipContent",YS=B.forwardRef((t,e)=>{const n=vC(Zo,t.__scopeTooltip),{forceMount:i=n.forceMount,side:r="top",...s}=t,o=df(Zo,t.__scopeTooltip);return te.jsx(Am,{present:i||o.open,children:o.disableHoverableContent?te.jsx(qS,{side:r,...s,ref:e}):te.jsx(yC,{side:r,...s,ref:e})})}),yC=B.forwardRef((t,e)=>{const n=df(Zo,t.__scopeTooltip),i=WS(Zo,t.__scopeTooltip),r=B.useRef(null),s=fi(e,r),[o,a]=B.useState(null),{trigger:l,onClose:c}=n,u=r.current,{onPointerInTransitChange:f}=i,h=B.useCallback(()=>{a(null),f(!1)},[f]),p=B.useCallback((v,y)=>{const m=v.currentTarget,d={x:v.clientX,y:v.clientY},_=EC(d,m.getBoundingClientRect()),g=MC(d,_),x=TC(y.getBoundingClientRect()),b=AC([...g,...x]);a(b),f(!0)},[f]);return B.useEffect(()=>()=>h(),[h]),B.useEffect(()=>{if(l&&u){const v=m=>p(m,u),y=m=>p(m,l);return l.addEventListener("pointerleave",v),u.addEventListener("pointerleave",y),()=>{l.removeEventListener("pointerleave",v),u.removeEventListener("pointerleave",y)}}},[l,u,p,h]),B.useEffect(()=>{if(o){const v=y=>{const m=y.target,d={x:y.clientX,y:y.clientY},_=(l==null?void 0:l.contains(m))||(u==null?void 0:u.contains(m)),g=!bC(d,o);_?h():g&&(h(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,u,o,c,h]),te.jsx(qS,{...t,ref:s})}),[xC,_C]=ff(jS,{isInside:!1}),SC=PT("TooltipContent"),qS=B.forwardRef((t,e)=>{const{__scopeTooltip:n,children:i,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:o,...a}=t,l=df(Zo,n),c=Bm(n),{onClose:u}=l;return B.useEffect(()=>(document.addEventListener(Hv,u),()=>document.removeEventListener(Hv,u)),[u]),B.useEffect(()=>{if(l.trigger){const f=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,u]),te.jsx(bm,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:te.jsxs(fC,{"data-state":l.stateAttribute,...c,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[te.jsx(SC,{children:i}),te.jsx(xC,{scope:n,isInside:!0,children:te.jsx(QT,{id:l.contentId,role:"tooltip",children:r||i})})]})})});YS.displayName=Zo;var $S="TooltipArrow",wC=B.forwardRef((t,e)=>{const{__scopeTooltip:n,...i}=t,r=Bm(n);return _C($S,n).isInside?null:te.jsx(dC,{...r,...i,ref:e})});wC.displayName=$S;function EC(t,e){const n=Math.abs(e.top-t.y),i=Math.abs(e.bottom-t.y),r=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(n,i,r,s)){case s:return"left";case r:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function MC(t,e,n=5){const i=[];switch(e){case"top":i.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":i.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":i.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":i.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return i}function TC(t){const{top:e,right:n,bottom:i,left:r}=t;return[{x:r,y:e},{x:n,y:e},{x:n,y:i},{x:r,y:i}]}function bC(t,e){const{x:n,y:i}=t;let r=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const a=e[s].x,l=e[s].y,c=e[o].x,u=e[o].y;l>i!=u>i&&n<(c-a)*(i-l)/(u-l)+a&&(r=!r)}return r}function AC(t){const e=t.slice();return e.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),CC(e)}function CC(t){if(t.length<=1)return t.slice();const e=[];for(let i=0;i<t.length;i++){const r=t[i];for(;e.length>=2;){const s=e[e.length-1],o=e[e.length-2];if((s.x-o.x)*(r.y-o.y)>=(s.y-o.y)*(r.x-o.x))e.pop();else break}e.push(r)}e.pop();const n=[];for(let i=t.length-1;i>=0;i--){const r=t[i];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(r.y-o.y)>=(s.y-o.y)*(r.x-o.x))n.pop();else break}n.push(r)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var RC=XS,ZS=YS;const PC=RC,LC=B.forwardRef(({className:t,sideOffset:e=4,...n},i)=>te.jsx(ZS,{ref:i,sideOffset:e,className:On("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
78de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",t),...n}));LC.displayName=ZS.displayName;const KS=B.forwardRef(({className:t,...e},n)=>te.jsx("div",{ref:n,className:On("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));KS.displayName="Card";const NC=B.forwardRef(({className:t,...e},n)=>te.jsx("div",{ref:n,className:On("flex flex-col space-y-1.5 p-6",t),...e}));NC.displayName="CardHeader";const DC=B.forwardRef(({className:t,...e},n)=>te.jsx("div",{ref:n,className:On("text-2xl font-semibold leading-none tracking-tight",t),...e}));DC.displayName="CardTitle";const IC=B.forwardRef(({className:t,...e},n)=>te.jsx("div",{ref:n,className:On("text-sm text-muted-foreground",t),...e}));IC.displayName="CardDescription";const QS=B.forwardRef(({className:t,...e},n)=>te.jsx("div",{ref:n,className:On("p-6 pt-0",t),...e}));QS.displayName="CardContent";const UC=B.forwardRef(({className:t,...e},n)=>te.jsx("div",{ref:n,className:On("flex items-center p-6 pt-0",t),...e}));UC.displayName="CardFooter";function OC(){return te.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-gray-50",children:te.jsx(KS,{className:"w-full max-w-md mx-4",children:te.jsxs(QS,{className:"pt-6",children:[te.jsxs("div",{className:"flex mb-4 gap-2",children:[te.jsx(Sb,{className:"h-8 w-8 text-red-500"}),te.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"404 Page Not Found"})]}),te.jsx("p",{className:"mt-4 text-sm text-gray-600",children:"Did you forget to add the page to the router?"})]})})})}const FC="#f7f8fa",ka="IBM Plex Mono",Gs=`"${ka}", ui-monospace, monospace`,Aa="The Zeal Company",Vv=["Miami, USA","","[email protected]"],kC=[{text:"More Info â",href:"/more-info.html"},{text:"Talent â",href:"/talent.html"}],zC=2e3,BC=1e3,HC=4500,VC=2.2,Gv=820,GC=1020,WC=.3,XC=["I have had my full share, and if it is necessary for me to leave my bones in South America, I am quite ready to do so.","All happy companies are different: each one earns a monopoly by solving a unique problem. All failed companies are the same: they failed to escape competition.","Above-average returns are often simply competed away.","Optimism is true moral courage.","Don't aim at success. The more you aim at it and make it a target, the more you are going to miss it.","There really are only two key things that matter in the actual term sheet negotiation: economics and control.","Knowing what you don't know is more useful than being brilliant.","Being first to market with an idea does not actually matter.","Don't settle for respectable mediocrity; seek to exploit every ounce of potential you are entrusted with.","If you're really good at what you do, you have the freedom to be who you really are.","For success, like happiness, cannot be pursued; it must ensue.","Simple, clear purpose and principles give rise to complex and intelligent behavior. Complex rules and regulations give rise to simple and stupid behavior.","If you really want to be great at something, you have to truly care about it.","Capital allocation is a CEO's most important job.","The future is as full of promise as it is fraught with uncertainty.","Never in the field of human conflict was so much owed by so many to so few.","Well done is better than well said.","Power, the potential to realize persistent differential returns, is the key to value creation.","Revolution doesn't have to do with smashing something; it has to do with bringing something forth.","Wealthier societies are more stable, offer better living standards, and ensure greater autonomy, greater fulfillment, and more sources of fun.","Prosperity is a process, not an event, one that requires a continuous commitment to innovation.","We are all haunted by failure, and we should only give up when we are dead.","Good intentions don't work. Mechanisms do.","The four pillars of modern civilization: cement, steel, plastics, and ammonia.","In the end, there are two things that matter: products and people. What you build and who you build it with."],fc=XC.join(" | ")+" | ",Wv="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789(){}[]<>/\\|=+*&^%$#@!?.,;:~";function jC(t){return()=>{t|=0,t=t+1831565813|0;let e=Math.imul(t^t>>>15,1|t);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296}}const za=new Uint8Array(512),Ba=new Float32Array(256);(()=>{const t=jC(2654435769),e=[...Array(256).keys()];for(let n=255;n>0;n--){const i=t()*(n+1)|0;[e[n],e[i]]=[e[i],e[n]]}for(let n=0;n<512;n++)za[n]=e[n&255];for(let n=0;n<256;n++)Ba[n]=t()})();const Xv=t=>t*t*t*(t*(t*6-15)+10),Ao=(t,e,n)=>t+(e-t)*n;function YC(t,e){const n=Math.floor(t)&255,i=Math.floor(e)&255,r=t-Math.floor(t),s=e-Math.floor(e),o=Xv(r),a=Xv(s),l=Ba[za[n]+i&255],c=Ba[za[n+1]+i&255],u=Ba[za[n]+i+1&25
785],f=Ba[za[n+1]+i+1&255];return Ao(Ao(l,c,o),Ao(u,f,o),a)}function Ca(t,e){let n=0,i=.5,r=1;for(let s=0;s<3;s++)n+=i*YC(t*r,e*r),r*=2,i*=.5;return n}function qC(t,e,n){const i=Ca(t,e+.18*n),r=Ca(t+5.2,e+1.3-.15*n),s=Ca(t+4*i+.3*n,e+4*r+1.7),o=Ca(t+4*i+8.3,e+4*r+.24*n+2.8);return Ca(t+4*s,e+4*o)}const Qf=(t,e,n)=>{const i=Math.min(1,Math.max(0,(n-t)/(e-t)));return i*i*(3-2*i)},$C=(t,e)=>{const n=Math.sin(t*91.7+e*47.13)*27183.7;return n-Math.floor(n)};let dc=null;function ZC(){if(typeof window>"u")return Promise.resolve();if(dc)return dc;const t=new FontFace(ka,"url(/fonts/IBMPlexMono-Light.woff2)",{weight:"300"}),e=new FontFace(ka,"url(/fonts/IBMPlexMono-Regular.woff2)",{weight:"400"}),n=new FontFace(ka,"url(/fonts/IBMPlexMono-Medium.woff2)",{weight:"500"}),i=new FontFace(ka,"url(/fonts/IBMPlexMono-Bold.woff2)",{weight:"700"});return dc=Promise.all([t.load(),e.load(),n.load(),i.load()]).then(r=>r.forEach(s=>document.fonts.add(s))).catch(()=>{}),dc}function KC({onMoreInfo:t,onIntroDone:e}){const n=B.useRef(null),i=B.useRef(null),[r,s]=B.useState(!1),[o,a]=B.useState(null),[l,c]=B.useState(!1),u=B.useRef(t),f=B.useRef(e);return u.current=t,f.current=e,B.useEffect(()=>{if(!n.current)return;const h=n.current,p=h.getContext("2d",{alpha:!1});let v=0,y=0,m=1,d=0,_=0,g=9,x=16,b=13.5,A,M,R=0,T=0,S=0,U=0,z=[],V=[],H=0,Q=0,j=0,W=0;const N=()=>new Date().toLocaleTimeString("en-GB",{timeZone:"America/New_York",hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})+" ET";function K(){var De;if(window.matchMedia("(max-width: 820px)").matches){const Pe=Math.max(window.innerHeight,((De=window.screen)==null?void 0:De.height)||0);document.documentElement.style.setProperty("--app-h",Pe+"px")}else document.documentElement.style.removeProperty("--app-h")}function se(){var Re;m=Math.min(window.devicePixelRatio||1,2);const fe=h.getBoundingClientRect();v=Math.round(fe.width)||window.innerWidth,y=Math.round(fe.height)||window.innerHeight,h.width=v*m,h.height=y*m,p.setTransform(m,0,0,m,0,0),p.textBaseline="top",b=v<560?12:13.5,p.font=`500 ${b}px ${Gs}`,g=p.measureText("MMMMMMMMMM").width/10,x=b*1.12,d=Math.ceil(v/g),_=Math.ceil(y/x),R=Math.ceil(v/2),T=Math.ceil(y/2),A=document.createElement("canvas"),A.width=R,A.height=T,M=A.getContext("2d"),S=Math.round((window.innerHeight/2-fe.top)/x),U=Math.max(0,Math.round((window.innerWidth/2-fe.left)/g-Aa.length/2));const De=Math.floor((window.innerWidth-fe.left)/g)-2,Pe=Math.floor((window.innerHeight-fe.top)/x)-2;z=Vv.map((be,Xe)=>({text:be,row:Pe-(Vv.length-1-Xe),col0:Math.max(0,De-be.length)})),H=fe.top,Q=fe.left;const $e=(Re=i.current)==null?void 0:Re.getBoundingClientRect(),G=$e?$e.bottom:fe.top+118,Te=$e?$e.left+$e.width*.152:fe.left+40,ue=Math.round((G-fe.top)/x)-1,ge=Math.max(0,Math.round((Te-fe.left)/g)-1);V=kC.map((be,Xe)=>({text:be.text,href:be.href,row:ue+Xe*2,col0:ge})),W=ge,j=Pe}const me=(fe,De)=>fe===S&&De>=U&&De<U+Aa.length,Ae=(fe,De)=>z.some(Pe=>fe===Pe.row&&De>=Pe.col0&&De<Pe.col0+Pe.text.length),He=(fe,De)=>V.some(Pe=>fe===Pe.row&&De>=Pe.col0&&De<Pe.col0+Pe.text.length),k=(fe,De)=>fe===j&&De>=W&&De<W+11,O=(fe,De)=>{for(const Pe of V){const $e=Pe.col0*g+Q-g*.3,G=(Pe.col0+Pe.text.length)*g+Q+g*.3,Te=Pe.row*x+H-x*.2,ue=(Pe.row+1)*x+H+x*.2;if(fe>=$e&&fe<=G&&De>=Te&&De<=ue)return Pe}return null};let D=0,C=!1,ne=0,de=0,Y=!1,_e=!1,ye=!1,pe=null,w=!1,J=!1,ee=0,re=null;const F=(fe,De)=>{J||(J=!0,re=De,a(fe),window.setTimeout(()=>c(!0),Gv+20))},I=fe=>{fe.data==="tzco:back"&&(c(!1),window.setTimeout(()=>{a(null),J=!1,ee=0,re=null,pe=null},GC+80))};window.addEventListener("message",I);let ie=0,P=0,E=0;function X(fe){var rt;if(P||(P=fe),fe-E<33){ie=requestAnimationFrame(X);return}E=fe;const De=fe-P,Pe=De/1e3*WC,$e=Math.min(1,Math.max(0,(De-zC)/HC)),G=$e>=1?1:Math.pow($e,VC),Te=De>=BC;!ye&&Te&&(ye=!0,s(!0)),!_e&&$e>=1&&(_e=!0,(rt=f.current)==null||rt.call(f)),J&&ee===0&&(ee=fe);const ue=ee?1-Math.min(1,(fe-ee)/Gv):1;p.fillStyle=FC,p.fillRect(0,0,v,y),M.clearRect(0,0,R,T),p.font=`300 ${b}px ${Gs}`,M.font=`300 ${b/2}px ${Gs}`,M.textBaseline="top";const ge=Pe*.4+Math.sin(Pe*.17)*.7,Re=Pe*.28+Math.cos(Pe*.14)*.7,be=Pe*.35,Xe=D/g;p.globalAlpha=ue;for(let Je=0;Je<_;Je++){const It=Je*x;for(let ht=0;ht<d;ht++){if(me(Je,ht)||Ae(Je,ht)||He(Je,ht)||k(Je,ht)||$e<1&&$C(ht,Je)>=G)continue;const pi=ht*g,qt=ht-Xe,cr=Je*d+Math.round(qt);let Jr=qC(qt*.05+ge,Je*.13+Re,be);Jr=Math.min(1,Math.max(0,(Jr-.2)*1.95));const Bs=Qf(.66,.86,Jr);let mi,es,Oi,ts,ns;if(Bs>.5){if(mi=fc[(cr%fc.length+fc.length)%fc.length],mi===" ")continue;es=.1+Qf(.5,.92,Bs)*.86;const pa=Qf(.74,1,Jr);Oi=Ao(192,152,pa)|0,ts=Ao(194,156,pa)|0,ns=Ao(200,166,pa)|0}else{const ha=Math.sin(Math.round(qt)*12.9898+Je*78.233)*43758.5453;
78mi=Wv[Math.floor((ha-Math.floor(ha))*Wv.length)],es=.085,Oi=120,ts=124,ns=138}p.fillStyle=`rgba(${Oi},${ts},${ns},${es.toFixed(3)})`,p.fillText(mi,pi,It),Bs>.62&&(M.fillStyle=`rgba(${Oi},${ts},${ns},${(es*.7).toFixed(3)})`,M.fillText(mi,pi/2,It/2))}}p.save(),p.globalCompositeOperation="multiply",p.filter="blur(5px)",p.globalAlpha=.32*ue,p.drawImage(A,0,0,v,y),p.restore(),p.filter="none";const pt=p.createRadialGradient(v/2,y/2,Math.min(v,y)*.2,v/2,y/2,Math.max(v,y)*.78);pt.addColorStop(0,"rgba(30,36,56,0)"),pt.addColorStop(1,"rgba(30,36,56,0.07)"),p.fillStyle=pt,p.fillRect(0,0,v,y),p.globalAlpha=1,p.font=`700 ${b}px ${Gs}`;const Bt=S*x;p.fillStyle=Y?"rgba(96,140,255,0.98)":"rgba(35,71,214,0.96)";for(let Je=0;Je<Aa.length;Je++){const It=Aa[Je];It!==" "&&p.fillText(It,(U+Je)*g,Bt)}if(Te){p.globalAlpha=ue,p.font=`700 ${b}px ${Gs}`,p.fillStyle="rgba(70,74,90,0.9)";for(const ht of z){const pi=ht.row*x;for(let qt=0;qt<ht.text.length;qt++){const cr=ht.text[qt];cr!==" "&&p.fillText(cr,(ht.col0+qt)*g,pi)}}const Je=N(),It=j*x;for(let ht=0;ht<Je.length;ht++)p.fillText(Je[ht],(W+ht)*g,It)}if(w=Te,w){p.font=`700 ${b}px ${Gs}`;for(const Je of V){p.globalAlpha=Je===re?1:ue,p.fillStyle=pe===Je?"rgba(96,140,255,0.98)":"rgba(35,71,214,0.96)";const It=Je.row*x;for(let ht=0;ht<Je.text.length;ht++){const pi=Je.text[ht];pi!==" "&&p.fillText(pi,(Je.col0+ht)*g,It)}}}p.globalAlpha=1,ie=requestAnimationFrame(X)}let oe=!1;ZC().then(()=>{oe=!0,se()}),K(),se(),ie=requestAnimationFrame(X);const he=()=>{cancelAnimationFrame(ie),K(),se(),E=0,ie=requestAnimationFrame(X)};window.addEventListener("resize",he),window.addEventListener("orientationchange",he),h.style.cursor="grab",h.style.touchAction="pan-y";let ce=0,Ie=0,Me=!1,Fe=null;const ze=(fe,De)=>{const Pe=U*g-g,$e=(U+Aa.length)*g+g,G=S*x-x*.6,Te=S*x+x*1.6;return fe>=Pe&&fe<=$e&&De>=G&&De<=Te},Se=fe=>{var De;ce=fe.clientX,Ie=fe.clientY,Me=ze(fe.clientX,fe.clientY),Fe=w?O(fe.clientX,fe.clientY):null,!Me&&!Fe&&(C=!0,ne=fe.clientX,de=D,h.style.cursor="grabbing"),(De=h.setPointerCapture)==null||De.call(h,fe.pointerId)},Le=fe=>{if(Y=ze(fe.clientX,fe.clientY),pe=w?O(fe.clientX,fe.clientY):null,!C){h.style.cursor=Y||pe?"pointer":"grab";return}D=de+(fe.clientX-ne)},Be=fe=>{var Pe;Math.abs(fe.clientX-ce)+Math.abs(fe.clientY-Ie)<8&&(Fe?F(Fe.href,Fe):Me&&((Pe=u.current)==null||Pe.call(u))),C=!1,Me=!1,Fe=null,h.style.cursor=ze(fe.clientX,fe.clientY)||w&&O(fe.clientX,fe.clientY)?"pointer":"grab"};h.addEventListener("pointerdown",Se),window.addEventListener("pointermove",Le),window.addEventListener("pointerup",Be),window.addEventListener("pointercancel",Be);const We=setInterval(()=>{oe&&(se(),clearInterval(We))},100);return()=>{cancelAnimationFrame(ie),window.removeEventListener("resize",he),window.removeEventListener("orientationchange",he),h.removeEventListener("pointerdown",Se),window.removeEventListener("pointermove",Le),window.removeEventListener("pointerup",Be),window.removeEventListener("pointercancel",Be),window.removeEventListener("message",I),clearInterval(We)}},[]),te.jsxs("div",{className:"fluid-field",children:[te.jsx("canvas",{ref:n,style:o?{pointerEvents:"none"}:void 0}),te.jsx("img",{ref:i,className:"fluid-corner-logo",src:"/tzco-logo-dark.svg",alt:"TZCO",style:{opacity:r?1:0}}),o&&te.jsx("iframe",{className:"fluid-tab"+(l?" up":""),src:o,title:"TZCO"})]})}function QC(){return te.jsx(KC,{onMoreInfo:()=>window.location.href="/more-info.html"})}/** 79 * @license 80 * Copyright 2010-2025 Three.js Authors 81 * SPDX-License-Identifier: MIT 82 */const Hm="176",JC=0,jv=1,eR=2,JS=1,ew=2,Xi=3,qr=0,_n=1,Ei=2,Hr=0,Co=1,Yv=2,qv=3,$v=4,tR=5,ms=100,nR=101,iR=102,rR=103,sR=104,oR=200,aR=201,lR=202,cR=203,Fh=204,kh=205,uR=206,fR=207,dR=208,hR=209,pR=210,mR=211,gR=212,vR=213,yR=214,zh=0,Bh=1,Hh=2,Ko=3,Vh=4,Gh=5,Wh=6,Xh=7,tw=0,xR=1,_R=2,Vr=0,SR=1,wR=2,ER=3,MR=4,TR=5,bR=6,AR=7,nw=300,Qo=301,Jo=302,jh=303,Yh=304,hf=306,qh=1e3,_s=1001,$h=1002,ci=1003,CR=1004,hc=1005,Mi=1006,Jf=1007,Ss=1008,Ni=1009,iw=1010,rw=1011,El=1012,Vm=1013,Us=1014,Ki=1015,zl=1016,Gm=1017,Wm=1018,Ml=1020,sw=35902,ow=1021,aw=1022,oi=1023,Tl=1026,bl=1027,lw=1028,Xm=1029,cw=1030,jm=1031,Ym=1033,Qc=33776,Jc=33777,eu=33778,tu=33779,Zh=35840,Kh=35841,Qh=35842,Jh=35843,ep=36196,tp=37492,np=37496,ip=37808,rp=37809,sp=37810,op=37811,ap=37812,lp=37813,cp=37814,up=37815,fp=37816,dp=37817,hp=37818,pp=37819,mp=37820,gp=37821,nu=36492,vp=36494,yp=36495,uw=36283,xp=36284,_p=36285,Sp=36286,RR=3200,PR=3201,fw=0,LR=1,Mr="",Cn="srgb",ea="srgb-linear",Iu="linear",dt="srgb",Ws=7680,Zv=519,NR=512,DR=513,IR=
vendor: 4,105 bytes, line 82
82514,dw=515,UR=516,OR=517,FR=518,kR=519,Kv=35044,Qv="300 es",Qi=2e3,Uu=2001;class ca{addEventListener(e,n){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(n)===-1&&i[e].push(n)}hasEventListener(e,n){const i=this._listeners;return i===void 0?!1:i[e]!==void 0&&i[e].indexOf(n)!==-1}removeEventListener(e,n){const i=this._listeners;if(i===void 0)return;const r=i[e];if(r!==void 0){const s=r.indexOf(n);s!==-1&&r.splice(s,1)}}dispatchEvent(e){const n=this._listeners;if(n===void 0)return;const i=n[e.type];if(i!==void 0){e.target=this;const r=i.slice(0);for(let s=0,o=r.length;s<o;s++)r[s].call(this,e);e.target=null}}}const Qt=["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","55","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"],ed=Math.PI/180,wp=180/Math.PI;function ua(){const t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(Qt[t&255]+Qt[t>>8&255]+Qt[t>>16&255]+Qt[t>>24&255]+"-"+Qt[e&255]+Qt[e>>8&255]+"-"+Qt[e>>16&15|64]+Qt[e>>24&255]+"-"+Qt[n&63|128]+Qt[n>>8&255]+"-"+Qt[n>>16&255]+Qt[n>>24&255]+Qt[i&255]+Qt[i>>8&255]+Qt[i>>16&255]+Qt[i>>24&255]).toLowerCase()}function et(t,e,n){return Math.max(e,Math.min(n,t))}function zR(t,e){return(t%e+e)%e}function td(t,e,n){return(1-n)*t+n*e}function Ra(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function pn(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}class xe{constructor(e=0,n=0){xe.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,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,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;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,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}
vendor: 7,575 bytes, line 82
82sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.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 n=this.x,i=this.y,r=e.elements;return this.x=r[0]*n+r[3]*i+r[6],this.y=r[1]*n+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=et(this.x,e.x,n.x),this.y=et(this.y,e.y,n.y),this}clampScalar(e,n){return this.x=et(this.x,e,n),this.y=et(this.y,e,n),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(et(i,e,n))}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 n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(e)/n;return Math.acos(et(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,i=this.y-e.y;return n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const i=Math.cos(n),r=Math.sin(n),s=this.x-e.x,o=this.y-e.y;return this.x=s*i-o*r+e.x,this.y=s*r+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class je{constructor(e,n,i,r,s,o,a,l,c){je.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,i,r,s,o,a,l,c)}set(e,n,i,r,s,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=r,u[2]=a,u[3]=n,u[4]=s,u[5]=l,u[6]=i,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,i=e.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],this}extractBasis(e,n,i){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const i=e.elements,r=n.elements,s=this.elements,o=i[0],a=i[3],l=i[6],c=i[1],u=i[4],f=i[7],h=i[2],p=i[5],v=i[8],y=r[0],m=r[3],d=r[6],_=r[1],g=r[4],x=r[7],b=r[2],A=r[5],M=r[8];return s[0]=o*y+a*_+l*b,s[3]=o*m+a*g+l*A,s[6]=o*d+a*x+l*M,s[1]=c*y+u*_+f*b,s[4]=c*m+u*g+f*A,s[7]=c*d+u*x+f*M,s[2]=h*y+p*_+v*b,s[5]=h*m+p*g+v*A,s[8]=h*d+p*x+v*M,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return n*o*u-n*a*c-i*s*u+i*a*l+r*s*c-r*o*l}invert(){const e=this.elements,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=u*o-a*c,h=a*l-u*s,p=c*s-o*l,v=n*f+i*h+r*p;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);const y=1/v;return e[0]=f*y,e[1]=(r*c-u*i)*y,e[2]=(a*i-r*o)*y,e[3]=h*y,e[4]=(u*n-r*l)*y,e[5]=(r*s-a*n)*y,e[6]=p*y,e[7]=(i*l-c*n)*y,e[8]=(o*n-i*s)*y,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,i,r,s,o,a){const l=Math.cos(s),c=Math.sin(s);return this.set(i*l,i*c,-i*(l*o+c*a)+o+e,-r*c,r*l,-r*(-c*o+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(nd.makeScale(e,n)),this}rotate(e){return this.premultiply(nd.makeRotation(-e)),this}translate(e,n){return this.premultiply(nd.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,-i,0,i,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,i=e.elements;for(let r=0;r<9;r++)if(n[r]!==i[r])return!1;return!0}fromArray(e,n=0){for(let i=0;i<9;i++)this.elements[i]=e[i+n];return this}toArray(e=[],n=0){const i=this.elements;return e[n]=i[0],e[n+1]=i[1],e[n+2]=i[2],e[n+3]=i[3],e[n+4]=i[4],e[n+5]=i[5],e[n+6]=i[6],e[n+7]=i[7],e[n+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const nd=new je;function hw(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}function Ou(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function BR(){const t=Ou("canvas");return t.style.display="block",t}const Jv={};function iu(t){t in Jv||(Jv[t]=!0,console.warn(t))}function HR(t,e,n){return new Promise(function(i,r){function s(){switch(t.clientWaitSync(e,t.SYNC_FLUSH_COMMANDS_BIT,0)){case t.WAIT_FAILED:r();break;case t.TIMEOUT_EXPIRED:setTimeout(s,n);break;default:i()}}setTimeout(s,n)})}function VR(t){const e=t.elements;e[2]=.5*e[2]+.5*e[3],e[6]=.5*e[6]+.5*e[7],e[10]=.5*e[10]+.5*e[11],e[14]=.5*e[14]+.5*e[15]}function GR(t){const e=t.elements;e[11]===-1?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=-e[14]+1)}const e0=new je().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),t0=new je().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function WR(){const t={enabled:!0,workingColorSpace:ea,spaces:{},convert:function(r,s,o){return this.enabled===!1||s===o||!s||!o||(this.spaces[s].transfer===dt&&(r.r=er(r.r),r.g=er(r.g),r.b=er(r.b)),this.spaces[s].primaries!==this.spaces[o].primaries&&(r.applyMatrix3(this.spaces[s].toXYZ),r.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===dt&&(r.r=Ro(r.r),r.g=Ro(r.g),r.b=Ro(r.b))),r},fromWorkingColorSpace:function(r,s){return this.convert(r,this.workingColorSpace,s)},toWorkingColorSpace:function(r,s){return this.convert(r,s,this.workingColorSpace)},getPrimaries:function(r){return this.spaces[r].primaries},getTransfer:function(r){return r===Mr?Iu:this.spaces[r].transfer},getLuminanceCoefficients:function(r,s=this.workingColorSpace){return r.fromArray(this.spaces[s].luminanceCoefficients)},define:function(r){Object.assign(this.spaces,r)},_getMatrix:function(r,s,o){return r.copy(this.spaces[s].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(r){return this.space
vendor: 4,571 bytes, line 82
82s[r].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace}},e=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],i=[.3127,.329];return t.define({[ea]:{primaries:e,whitePoint:i,transfer:Iu,toXYZ:e0,fromXYZ:t0,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:Cn},outputColorSpaceConfig:{drawingBufferColorSpace:Cn}},[Cn]:{primaries:e,whitePoint:i,transfer:dt,toXYZ:e0,fromXYZ:t0,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:Cn}}}),t}const ot=WR();function er(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function Ro(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let Xs;class XR{static getDataURL(e,n="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let i;if(e instanceof HTMLCanvasElement)i=e;else{Xs===void 0&&(Xs=Ou("canvas")),Xs.width=e.width,Xs.height=e.height;const r=Xs.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),i=Xs}return i.toDataURL(n)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=Ou("canvas");n.width=e.width,n.height=e.height;const i=n.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),s=r.data;for(let o=0;o<s.length;o++)s[o]=er(s[o]/255)*255;return i.putImageData(r,0,0),n}else if(e.data){const n=e.data.slice(0);for(let i=0;i<n.length;i++)n instanceof Uint8Array||n instanceof Uint8ClampedArray?n[i]=Math.floor(er(n[i]/255)*255):n[i]=er(n[i]);return{data:n,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let jR=0;class qm{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:jR++}),this.uuid=ua(),this.data=e,this.dataReady=!0,this.version=0}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const n=e===void 0||typeof e=="string";if(!n&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const i={uuid:this.uuid,url:""},r=this.data;if(r!==null){let s;if(Array.isArray(r)){s=[];for(let o=0,a=r.length;o<a;o++)r[o].isDataTexture?s.push(id(r[o].image)):s.push(id(r[o]))}else s=id(r);i.url=s}return n||(e.images[this.uuid]=i),i}}function id(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap?XR.getDataURL(t):t.data?{data:Array.from(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let YR=0;class Sn extends ca{constructor(e=Sn.DEFAULT_IMAGE,n=Sn.DEFAULT_MAPPING,i=_s,r=_s,s=Mi,o=Ss,a=oi,l=Ni,c=Sn.DEFAULT_ANISOTROPY,u=Mr){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:YR++}),this.uuid=ua(),this.name="",this.source=new qm(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=i,this.wrapT=r,this.magFilter=s,this.minFilter=o,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new je,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isTextureArray=!1,this.pmremVersion=0}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)}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,659 bytes, line 82
82=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isTextureArray=e.isTextureArray,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const n=e===void 0||typeof e=="string";if(!n&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const i={metadata:{version:4.6,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&&(i.userData=this.userData),n||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==nw)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case qh:e.x=e.x-Math.floor(e.x);break;case _s:e.x=e.x<0?0:1;break;case $h:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case qh:e.y=e.y-Math.floor(e.y);break;case _s:e.y=e.y<0?0:1;break;case $h:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Sn.DEFAULT_IMAGE=null;Sn.DEFAULT_MAPPING=nw;Sn.DEFAULT_ANISOTROPY=1;class Rt{constructor(e=0,n=0,i=0,r=1){Rt.prototype.isVector4=!0,this.x=e,this.y=n,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,i,r){return this.x=e,this.y=n,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,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,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.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 n=this.x,i=this.y,r=this.z,s=this.w,o=e.elements;return this.x=o[0]*n+o[4]*i+o[8]*r+o[12]*s,this.y=o[1]*n+o[5]*i+o[9]*r+o[13]*s,this.z=o[2]*n+o[6]*i+o[10]*r+o[14]*s,this.w=o[3]*n+o[7]*i+o[11]*r+o[15]*s,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 n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,i,r,s;const l=e.elements,c=l[0],u=l[4],f=l[8],h=l[1],p=l[5],v=l[9],y=l[2],m=l[6],d=l[10];if(Math.abs(u-h)<.01&&Math.abs(f-y)<.01&&Math.abs(v-m)<.01){if(Math.abs(u+h)<.1&&Math.abs(f+y)<.1&&Math.abs(v+m)<.1&&Math.abs(c+p+d-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const g=(c+1)/2,x=(p+1)/2,b=(d+1)/2,A=(u+h)/4,M=(f+y)/4,R=(v+m)/4;return g>x&&g>b?g<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(g),r=A/i,s=M/i):x>b?x<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(x),i=A/r,s=R/r):b<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(b),i=M/s,r=R/s),this.set(i,r,s,n),this}let _=Math.sqrt((m-v)*(m-v)+(f-y)*(f-y)+(h-u)*(h-u));return Math.abs(_)<.001&&(_=1),this.x=(m-v)/_,this.y=(f-y)/_,this.z=(h-u)/_,this.w=Math.acos((c+p+d-1)/2),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this.w=n[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,n){return this.x=et(this.x,e.x,n.x),this.y=et(this.y,e.y,n.y),this.z=et(this.z,e.z,n.z),this.w=et(this.w,e.w,n.w),this}clampScalar(e,n){return this.x=et(this.x,e,n),this.y=et(this.y,e,n),this.z=et(this.z,e,n),this.w=et(this.w,e,n),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(et(i,e,n))}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: 7,244 bytes, line 82
82round(){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,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this.z=e.z+(n.z-e.z)*i,this.w=e.w+(n.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),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 qR extends ca{constructor(e=1,n=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=i.depth?i.depth:1,this.scissor=new Rt(0,0,e,n),this.scissorTest=!1,this.viewport=new Rt(0,0,e,n);const r={width:e,height:n,depth:this.depth};i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Mi,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,multiview:!1},i);const s=new Sn(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace);s.flipY=!1,s.generateMipmaps=i.generateMipmaps,s.internalFormat=i.internalFormat,this.textures=[];const o=i.count;for(let a=0;a<o;a++)this.textures[a]=s.clone(),this.textures[a].isRenderTargetTexture=!0,this.textures[a].renderTarget=this;this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.resolveDepthBuffer=i.resolveDepthBuffer,this.resolveStencilBuffer=i.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=i.depthTexture,this.samples=i.samples,this.multiview=i.multiview}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,n,i=1){if(this.width!==e||this.height!==n||this.depth!==i){this.width=e,this.height=n,this.depth=i;for(let r=0,s=this.textures.length;r<s;r++)this.textures[r].image.width=e,this.textures[r].image.height=n,this.textures[r].image.depth=i;this.dispose()}this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}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 n=0,i=e.textures.length;n<i;n++){this.textures[n]=e.textures[n].clone(),this.textures[n].isRenderTargetTexture=!0,this.textures[n].renderTarget=this;const r=Object.assign({},e.textures[n].image);this.textures[n].source=new qm(r)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Os extends qR{constructor(e=1,n=1,i={}){super(e,n,i),this.isWebGLRenderTarget=!0}}class pw extends Sn{constructor(e=null,n=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:i,depth:r},this.magFilter=ci,this.minFilter=ci,this.wrapR=_s,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class $R extends Sn{constructor(e=null,n=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:i,depth:r},this.magFilter=ci,this.minFilter=ci,this.wrapR=_s,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Bl{constructor(e=0,n=0,i=0,r=1){this.isQuaternion=!0,this._x=e,this._y=n,this._z=i,this._w=r}static slerpFlat(e,n,i,r,s,o,a){let l=i[r+0],c=i[r+1],u=i[r+2],f=i[r+3];const h=s[o+0],p=s[o+1],v=s[o+2],y=s[o+3];if(a===0){e[n+0]=l,e[n+1]=c,e[n+2]=u,e[n+3]=f;return}if(a===1){e[n+0]=h,e[n+1]=p,e[n+2]=v,e[n+3]=y;return}if(f!==y||l!==h||c!==p||u!==v){let m=1-a;const d=l*h+c*p+u*v+f*y,_=d>=0?1:-1,g=1-d*d;if(g>Number.EPSILON){const b=Math.sqrt(g),A=Math.atan2(b,d*_);m=Math.sin(m*A)/b,a=Math.sin(a*A)/b}const x=a*_;if(l=l*m+h*x,c=c*m+p*x,u=u*m+v*x,f=f*m+y*x,m===1-a){const b=1/Math.sqrt(l*l+c*c+u*u+f*f);l*=b,c*=b,u*=b,f*=b}}e[n]=l,e[n+1]=c,e[n+2]=u,e[n+3]=f}static multiplyQuaternionsFlat(e,n,i,r,s,o){const a=i[r],l=i[r+1],c=i[r+2],u=i[r+3],f=s[o],h=s[o+1],p=s[o+2],v=s[o+3];return e[n]=a*v+u*f+l*p-c*h,e[n+1]=l*v+u*h+c*f-a*p,e[n+2]=c*v+u*p+a*h-l*f,e[n+3]=u*v-a*f-l*h-c*p,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,n,i,r){return this._x=e,this._y=n,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n=!0){const i=e._x,r=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(i/2),u=a(r/2),f=a(s/2),h=l(i/2),p=l(r/2),v=l(s/2);switch(o){case"XYZ":this._x=h*u*f+c*p*v,this._y=c*p*f-h*u*v,this._z=c*u*v+h*p*f,this._w=c*u*f-h*p*v;break;case"YXZ":this._x=h*u*f+c*p*v,this._y=c*p*f-h*u*v,this._z=c*u*v-h*p*f,this._w=c*u*f+h*p*v;break;case"ZXY":this._x=h*u*f-c*p*v,this._y=c*p*f+h*u*v,this._z=c*u*v+h*p*f,this._w=c*u*f-h*p*v;break;case"ZYX":this._x=h*u*f-c*p*v,this._y=c*p*f+h*u*v,this._z=c*u*v-h*p*f,this._w=c*u*f+h*p*v;break;case"YZX":this._x=h*u*f+c*p*v,this._y=c*p*f+h*u*v,this._z=c*u*v-h*p*f,this._w=c*u*f-h*p*v;break;case"XZY":this._x=h*u*f-c*p*v,this._y=c*p*f-h*u*v,this._z=c*u*v+h*p*f,this._w=c*u*f+h*p*v;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return n===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const i=n/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,i=n[0],r=n[4],s=n[8],o=n[1],a=n[5],l=n[9],c=n[2],u=n[6],f=n[10],h=i+a+f;if(h>0){const p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(u-l)*p,this._y=(s-c)*p,this._z=(o-r)*p}else if(i>
vendor: 4,177 bytes, line 82
82a&&i>f){const p=2*Math.sqrt(1+i-a-f);this._w=(u-l)/p,this._x=.25*p,this._y=(r+o)/p,this._z=(s+c)/p}else if(a>f){const p=2*Math.sqrt(1+a-i-f);this._w=(s-c)/p,this._x=(r+o)/p,this._y=.25*p,this._z=(l+u)/p}else{const p=2*Math.sqrt(1+f-i-a);this._w=(o-r)/p,this._x=(s+c)/p,this._y=(l+u)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let i=e.dot(n)+1;return i<Number.EPSILON?(i=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(et(this.dot(e),-1,1)))}rotateTowards(e,n){const i=this.angleTo(e);if(i===0)return this;const r=Math.min(1,n/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const i=e._x,r=e._y,s=e._z,o=e._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=i*u+o*a+r*c-s*l,this._y=r*u+o*l+s*a-i*c,this._z=s*u+o*c+i*l-r*a,this._w=o*u-i*a-r*l-s*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const i=this._x,r=this._y,s=this._z,o=this._w;let a=o*e._w+i*e._x+r*e._y+s*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=r,this._z=s,this;const l=1-a*a;if(l<=Number.EPSILON){const p=1-n;return this._w=p*o+n*this._w,this._x=p*i+n*this._x,this._y=p*r+n*this._y,this._z=p*s+n*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),f=Math.sin((1-n)*u)/c,h=Math.sin(n*u)/c;return this._w=o*f+this._w*h,this._x=i*f+this._x*h,this._y=r*f+this._y*h,this._z=s*f+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,n,i){return this.copy(e).slerp(n,i)}random(){const e=2*Math.PI*Math.random(),n=2*Math.PI*Math.random(),i=Math.random(),r=Math.sqrt(1-i),s=Math.sqrt(i);return this.set(r*Math.sin(e),r*Math.cos(e),s*Math.sin(n),s*Math.cos(n))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),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 Z{constructor(e=0,n=0,i=0){Z.prototype.isVector3=!0,this.x=e,this.y=n,this.z=i}set(e,n,i){return i===void 0&&(i=this.z),this.x=e,this.y=n,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;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,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}
vendor: 8,730 bytes, line 82
82sub(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,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.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,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(n0.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(n0.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*n+s[3]*i+s[6]*r,this.y=s[1]*n+s[4]*i+s[7]*r,this.z=s[2]*n+s[5]*i+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,i=this.y,r=this.z,s=e.elements,o=1/(s[3]*n+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*n+s[4]*i+s[8]*r+s[12])*o,this.y=(s[1]*n+s[5]*i+s[9]*r+s[13])*o,this.z=(s[2]*n+s[6]*i+s[10]*r+s[14])*o,this}applyQuaternion(e){const n=this.x,i=this.y,r=this.z,s=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*r-a*i),u=2*(a*n-s*r),f=2*(s*i-o*n);return this.x=n+l*c+o*f-a*u,this.y=i+l*u+a*c-s*f,this.z=r+l*f+s*u-o*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*n+s[4]*i+s[8]*r,this.y=s[1]*n+s[5]*i+s[9]*r,this.z=s[2]*n+s[6]*i+s[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=et(this.x,e.x,n.x),this.y=et(this.y,e.y,n.y),this.z=et(this.z,e.z,n.z),this}clampScalar(e,n){return this.x=et(this.x,e,n),this.y=et(this.y,e,n),this.z=et(this.z,e,n),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(et(i,e,n))}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,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this.z=e.z+(n.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const i=e.x,r=e.y,s=e.z,o=n.x,a=n.y,l=n.z;return this.x=r*l-s*a,this.y=s*o-i*l,this.z=i*a-r*o,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const i=e.dot(this)/n;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return rd.copy(this).projectOnVector(e),this.sub(rd)}reflect(e){return this.sub(rd.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(e)/n;return Math.acos(et(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return n*n+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,i){const r=Math.sin(n)*e;return this.x=r*Math.sin(i),this.y=Math.cos(n)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,i){return this.x=e*Math.sin(n),this.y=i,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=i,this.z=r,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,n=Math.random()*2-1,i=Math.sqrt(1-n*n);return this.x=i*Math.cos(e),this.y=n,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const rd=new Z,n0=new Bl;class fa{constructor(e=new Z(1/0,1/0,1/0),n=new Z(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,i=e.length;n<i;n+=3)this.expandByPoint(Kn.fromArray(e,n));return this}setFromBufferAttribute(e){this.makeEmpty();for(let n=0,i=e.count;n<i;n++)this.expandByPoint(Kn.fromBufferAttribute(e,n));return this}setFromPoints(e){this.makeEmpty();for(let n=0,i=e.length;n<i;n++)this.expandByPoint(e[n]);return this}setFromCenterAndSize(e,n){const i=Kn.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}setFromObject(e,n=!1){return this.makeEmpty(),this.expandByObject(e,n)}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,n=!1){e.updateWorldMatrix(!1,!1);const i=e.geometry;if(i!==void 0){const s=i.getAttribute("position");if(n===!0&&s!==void 0&&e.isInstancedMesh!==!0)for(let o=0,a=s.count;o<a;o++)e.isMesh===!0?e.getVertexPosition(o,Kn):Kn.fromBufferAttribute(s,o),Kn.applyMatrix4(e.matrixWorld),this.expandByPoint(Kn);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),pc.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),pc.copy(i.boundingBox)),pc.applyMatrix4(e.matrixWorld),this.union(pc)}const r=e.children;for(let s=0,o=r.length;s<o;s++)this.expandByObject(r[s],n);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,n){return n.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,Kn),Kn.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,i;return e.normal.x>0?(n=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),n<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Pa),mc.subVectors(this.max,Pa),js.subVectors(e.a,Pa),Ys.subVectors(e.b,Pa),qs.subVectors(e.c,Pa),hr.subVectors(Ys,js),pr.
vendor: 19,230 bytes, line 82
82subVectors(qs,Ys),rs.subVectors(js,qs);let n=[0,-hr.z,hr.y,0,-pr.z,pr.y,0,-rs.z,rs.y,hr.z,0,-hr.x,pr.z,0,-pr.x,rs.z,0,-rs.x,-hr.y,hr.x,0,-pr.y,pr.x,0,-rs.y,rs.x,0];return!sd(n,js,Ys,qs,mc)||(n=[1,0,0,0,1,0,0,0,1],!sd(n,js,Ys,qs,mc))?!1:(gc.crossVectors(hr,pr),n=[gc.x,gc.y,gc.z],sd(n,js,Ys,qs,mc))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Kn).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Kn).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(ki[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ki[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ki[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ki[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ki[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ki[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ki[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ki[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ki),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const ki=[new Z,new Z,new Z,new Z,new Z,new Z,new Z,new Z],Kn=new Z,pc=new fa,js=new Z,Ys=new Z,qs=new Z,hr=new Z,pr=new Z,rs=new Z,Pa=new Z,mc=new Z,gc=new Z,ss=new Z;function sd(t,e,n,i,r){for(let s=0,o=t.length-3;s<=o;s+=3){ss.fromArray(t,s);const a=r.x*Math.abs(ss.x)+r.y*Math.abs(ss.y)+r.z*Math.abs(ss.z),l=e.dot(ss),c=n.dot(ss),u=i.dot(ss);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const ZR=new fa,La=new Z,od=new Z;class $m{constructor(e=new Z,n=-1){this.isSphere=!0,this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const i=this.center;n!==void 0?i.copy(n):ZR.setFromPoints(e).getCenter(i);let r=0;for(let s=0,o=e.length;s<o;s++)r=Math.max(r,i.distanceToSquared(e[s]));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 n=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=n*n}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,n){const i=this.center.distanceToSquared(e);return n.copy(e),i>this.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;La.subVectors(e,this.center);const n=La.lengthSq();if(n>this.radius*this.radius){const i=Math.sqrt(n),r=(i-this.radius)*.5;this.center.addScaledVector(La,r/i),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(od.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(La.copy(e.center).add(od)),this.expandByPoint(La.copy(e.center).sub(od))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const zi=new Z,ad=new Z,vc=new Z,mr=new Z,ld=new Z,yc=new Z,cd=new Z;class KR{constructor(e=new Z,n=new Z(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.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,zi)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const i=n.dot(this.direction);return i<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=zi.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(zi.copy(this.origin).addScaledVector(this.direction,n),zi.distanceToSquared(e))}distanceSqToSegment(e,n,i,r){ad.copy(e).add(n).multiplyScalar(.5),vc.copy(n).sub(e).normalize(),mr.copy(this.origin).sub(ad);const s=e.distanceTo(n)*.5,o=-this.direction.dot(vc),a=mr.dot(this.direction),l=-mr.dot(vc),c=mr.lengthSq(),u=Math.abs(1-o*o);let f,h,p,v;if(u>0)if(f=o*l-a,h=o*a-l,v=s*u,f>=0)if(h>=-v)if(h<=v){const y=1/u;f*=y,h*=y,p=f*(f+o*h+2*a)+h*(o*f+h+2*l)+c}else h=s,f=Math.max(0,-(o*h+a)),p=-f*f+h*(h+2*l)+c;else h=-s,f=Math.max(0,-(o*h+a)),p=-f*f+h*(h+2*l)+c;else h<=-v?(f=Math.max(0,-(-o*s+a)),h=f>0?-s:Math.min(Math.max(-s,-l),s),p=-f*f+h*(h+2*l)+c):h<=v?(f=0,h=Math.min(Math.max(-s,-l),s),p=h*(h+2*l)+c):(f=Math.max(0,-(o*s+a)),h=f>0?s:Math.min(Math.max(-s,-l),s),p=-f*f+h*(h+2*l)+c);else h=o>0?-s:s,f=Math.max(0,-(o*h+a)),p=-f*f+h*(h+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,f),r&&r.copy(ad).addScaledVector(vc,h),p}intersectSphere(e,n){zi.subVectors(e.center,this.origin);const i=zi.dot(this.direction),r=zi.dot(zi)-i*i,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/n;return i>=0?i:null}intersectPlane(e,n){const i=this.distanceToPlane(e);return i===null?null:this.at(i,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let i,r,s,o,a,l;const c=1/this.direction.x,u=1/this.direction.y,f=1/this.direction.z,h=this.origin;return c>=0?(i=(e.min.x-h.x)*c,r=(e.max.x-h.x)*c):(i=(e.max.x-h.x)*c,r=(e.min.x-h.x)*c),u>=0?(s=(e.min.y-h.y)*u,o=(e.max.y-h.y)*u):(s=(e.max.y-h.y)*u,o=(e.min.y-h.y)*u),i>o||s>r||((s>i||isNaN(i))&&(i=s),(o<r||isNaN(r))&&(r=o),f>=0?(a=(e.min.z-h.z)*f,l=(e.max.z-h.z)*f):(a=(e.max.z-h.z)*f,l=(e.min.z-h.z)*f),i>l||a>r)||((a>i||i!==i)&&(i=a),(l<r||r!==r)&&(r=l),r<0)?null:this.at(i>=0?i:r,n)}intersectsBox(e){return this.intersectBox(e,zi)!==null}intersectTriangle(e,n,i,r,s){ld.subVectors(n,e),yc.subVectors(i,e),cd.crossVectors(ld,yc);let o=this.direction.dot(cd),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;mr.subVectors(this.origin,e);const l=a*this.direction.dot(yc.crossVectors(mr,yc));if(l<0)return null;const c=a*this.direction.dot(ld.cross(mr));if(c<0||l+c>o)return null;const u=-a*mr.dot(cd);return u<0?null:this.at(u/o,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Mt{constructor(e,n,i,r,s,o,a,l,c,u,f,h,p,v,y,m){Mt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,n,i,r,s,o,a,l,c,u,f,h,p,v,y,m)}set(e,n,i,r,s,o,a,l,c,u,f,h,p,v,y,m){const d=this.elements;return d[0]=e,d[4]=n,d[8]=i,d[12]=r,d[1]=s,d[5]=o,d[9]=a,d[13]=l,d[2]=c,d[6]=u,d[10]=f,d[14]=h,d[3]=p,d[7]=v,d[11]=y,d[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 Mt().fromArray(this.elements)}copy(e){const n=this.elements,i=e.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],n[9]=i[9],n[10]=i[10],n[11]=i[11],n[12]=i[12],n[13]=i[13],n[14]=i[14],n[15]=i[15],this}copyPosition(e){const n=this.elements,i=e.elements;return n[12]=i[12],n[13]=i[13],n[14]=i[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,i){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,n,i){return this.set(e.x,n.x,i.x,0,e.y,n.y,i.y,0,e.z,n.z,i.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,i=e.elements,r=1/$s.setFromMatrixColumn(e,0).length(),s=1/$s.setFromMatrixColumn(e,1).length(),o=1/$s.setFromMatrixColumn(e,2).length();return n[0]=i[0]*r,n[1]=i[1]*r,n[2]=i[2]*r,n[3]=0,n[4]=i[4]*s,n[5]=i[5]*s,n[6]=i[6]*s,n[7]=0,n[8]=i[8]*o,n[9]=i[9]*o,n[10]=i[10]*o,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,i=e.x,r=e.y,s=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(r),c=Math.sin(r),u=Math.cos(s),f=Math.sin(s);if(e.order==="XYZ"){const h=o*u,p=o*f,v=a*u,y=a*f;n[0]=l*u,n[4]=-l*f,n[8]=c,n[1]=p+v*c,n[5]=h-y*c,n[9]=-a*l,n[2]=y-h*c,n[6]=v+p*c,n[10]=o*l}else if(e.order==="YXZ"){const h=l*u,p=l*f,v=c*u,y=c*f;n[0]=h+y*a,n[4]=v*a-p,n[8]=o*c,n[1]=o*f,n[5]=o*u,n[9]=-a,n[2]=p*a-v,n[6]=y+h*a,n[10]=o*l}else if(e.order==="ZXY"){const h=l*u,p=l*f,v=c*u,y=c*f;n[0]=h-y*a,n[4]=-o*f,n[8]=v+p*a,n[1]=p+v*a,n[5]=o*u,n[9]=y-h*a,n[2]=-o*c,n[6]=a,n[10]=o*l}else if(e.order==="ZYX"){const h=o*u,p=o*f,v=a*u,y=a*f;n[0]=l*u,n[4]=v*c-p,n[8]=h*c+y,n[1]=l*f,n[5]=y*c+h,n[9]=p*c-v,n[2]=-c,n[6]=a*l,n[10]=o*l}else if(e.order==="YZX"){const h=o*l,p=o*c,v=a*l,y=a*c;n[0]=l*u,n[4]=y-h*f,n[8]=v*f+p,n[1]=f,n[5]=o*u,n[9]=-a*u,n[2]=-c*u,n[6]=p*f+v,n[10]=h-y*f}else if(e.order==="XZY"){const h=o*l,p=o*c,v=a*l,y=a*c;n[0]=l*u,n[4]=-f,n[8]=c*u,n[1]=h*f+y,n[5]=o*u,n[9]=p*f-v,n[2]=v*f-p,n[6]=a*u,n[10]=y*f+h}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(QR,e,JR)}lookAt(e,n,i){const r=this.elements;return Mn.subVectors(e,n),Mn.lengthSq()===0&&(Mn.z=1),Mn.normalize(),gr.crossVectors(i,Mn),gr.lengthSq()===0&&(Math.abs(i.z)===1?Mn.x+=1e-4:Mn.z+=1e-4,Mn.normalize(),gr.crossVectors(i,Mn)),gr.normalize(),xc.crossVectors(Mn,gr),r[0]=gr.x,r[4]=xc.x,r[8]=Mn.x,r[1]=gr.y,r[5]=xc.y,r[9]=Mn.y,r[2]=gr.z,r[6]=xc.z,r[10]=Mn.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const i=e.elements,r=n.elements,s=this.elements,o=i[0],a=i[4],l=i[8],c=i[12],u=i[1],f=i[5],h=i[9],p=i[13],v=i[2],y=i[6],m=i[10],d=i[14],_=i[3],g=i[7],x=i[11],b=i[15],A=r[0],M=r[4],R=r[8],T=r[12],S=r[1],U=r[5],z=r[9],V=r[13],H=r[2],Q=r[6],j=r[10],W=r[14],N=r[3],K=r[7],se=r[11],me=r[15];return s[0]=o*A+a*S+l*H+c*N,s[4]=o*M+a*U+l*Q+c*K,s[8]=o*R+a*z+l*j+c*se,s[12]=o*T+a*V+l*W+c*me,s[1]=u*A+f*S+h*H+p*N,s[5]=u*M+f*U+h*Q+p*K,s[9]=u*R+f*z+h*j+p*se,s[13]=u*T+f*V+h*W+p*me,s[2]=v*A+y*S+m*H+d*N,s[6]=v*M+y*U+m*Q+d*K,s[10]=v*R+y*z+m*j+d*se,s[14]=v*T+y*V+m*W+d*me,s[3]=_*A+g*S+x*H+b*N,s[7]=_*M+g*U+x*Q+b*K,s[11]=_*R+g*z+x*j+b*se,s[15]=_*T+g*V+x*W+b*me,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],i=e[4],r=e[8],s=e[12],o=e[1],a=e[5],l=e[9],c=e[13],u=e[2],f=e[6],h=e[10],p=e[14],v=e[3],y=e[7],m=e[11],d=e[15];return v*(+s*l*f-r*c*f-s*a*h+i*c*h+r*a*p-i*l*p)+y*(+n*l*p-n*c*h+s*o*h-r*o*p+r*c*u-s*l*u)+m*(+n*c*f-n*a*p-s*o*f+i*o*p+s*a*u-i*c*u)+d*(-r*a*u-n*l*f+n*a*h+r*o*f-i*o*h+i*l*u)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,i){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=n,r[14]=i),this}invert(){const e=this.elements,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],p=e[11],v=e[12],y=e[13],m=e[14],d=e[15],_=f*m*c-y*h*c+y*l*p-a*m*p-f*l*d+a*h*d,g=v*h*c-u*m*c-v*l*p+o*m*p+u*l*d-o*h*d,x=u*y*c-v*f*c+v*a*p-o*y*p-u*a*d+o*f*d,b=v*f*l-u*y*l-v*a*h+o*y*h+u*a*m-o*f*m,A=n*_+i*g+r*x+s*b;if(A===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const M=1/A;return e[0]=_*M,e[1]=(y*h*s-f*m*s-y*r*p+i*m*p+f*r*d-i*h*d)*M,e[2]=(a*m*s-y*l*s+y*r*c-i*m*c-a*r*d+i*l*d)*M,e[3]=(f*l*s-a*h*s-f*r*c+i*h*c+a*r*p-i*l*p)*M,e[4]=g*M,e[5]=(u*m*s-v*h*s+v*r*p-n*m*p-u*r*d+n*h*d)*M,e[6]=(v*l*s-o*m*s-v*r*c+n*m*c+o*r*d-n*l*d)*M,e[7]=(o*h*s-u*l*s+u*r*c-n*h*c-o*r*p+n*l*p)*M,e[8]=x*M,e[9]=(v*f*s-u*y*s-v*i*p+n*y*p+u*i*d-n*f*d)*M,e[10]=(o*y*s-v*a*s+v*i*c-n*y*c-o*i*d+n*a*d)*M,e[11]=(u*a*s-o*f*s-u*i*c+n*f*c+o*i*p-n*a*p)*M,e[12]=b*M,e[13]=(u*y*r-v*f*r+v*i*h-n*y*h-u*i*m+n*f*m)*M,e[14]=(v*a*r-o*y*r-v*i*l+n*y*l+o*i*m-n*a*m)*M,e[15]=(o*f*r-u*a*r+u*i*l-n*f*l-o*i*h+n*a*h)*M,this}scale(e){const n=this.elements,i=e.x,r=e.y,s=e.z;return n[0]*=i,n[4]*=r,n[8]*=s,n[1]*=i,n[5]*=r,n[9]*=s,n[2]*=i,n[6]*=r,n[10]*=s,n[3]*=i,n[7]*=r,n[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,i,r))}makeTranslation(e,n,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,i,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,n,-i,0,0,i,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,0,i,0,0,1,0,0,-i,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,-i,0,0,i,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const i=Math.cos(n),r=Math.sin(n),s=1-i,o=e.x,a=e.y,l=e.z,c=s*o,u=s*a;return this.set(c*o+i,c*a-r*l,c*l+r*a,0,c*a+r*l,u*a+i,u*l-r*o,0,c*l-r*a,u*l+r*o,s*l*l+i,0,0,0,0,1),this}makeScale(e,n,i){return this.set(e,0,0,0,0,n,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,n,i,r,s,o){return this.set(1,i,s,0,e,1,o,0,n,r,1,0,0,0,0,1),this}compose(e,n,i){const r=this.elements,s=n._x,o=n._y,a=n._z,l=n._w,c=s+s,u=o+o,f=a+a,h=s*c,p=s*u,v=s*f,y=o*u,m=o*f,d=a*f,_=l*c,g=l*u,x=l*f,b=i.x,A=i.y,M=i.z;return r[0]=(1-(y+d))*b,r[1]=(p+x)*b,r[2]=(v-g)*b,r[3]=0,r[4]=(p-x)*A,r[5]=(1-(h+d))*A,r[6]=(m+_)*A,r[7]=0,r[8]=(v+g)*M,r[9]=(m-_)*M,r[10]=(1-(h+y))*M,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,n,i){const r=this.elements;let s=$s.set(r[0],r[1],r[2]).length();const o=$s.set(r[4],r[5],r[6]).length(),a=$s.set(r[8],r[9],r[10]).length();this.determinant()<0&&(s=-s),e.x=r[12],e.y=r[13],e.z=r[14],Qn.copy(this);const c=1/s,u=1/o,f=1/a;return Qn.elements[0]*=c,Qn.elements[1]*=c,Qn.elements[2]*=c,Qn.elements[4]*=u,Qn.elements[5]*=u,Qn.elements[6]*=u,Qn.elements[8]*=f,Qn.elements[9]*=f,Qn.elements[10]*=f,n.setFromRotationMatrix(Qn),i.x=s,i.y=o,i.z=a,this}makePerspective(e,n,i,r,s,o,a=Qi){const l=this.elements,c=2*s/(n-e),u=2*s/(i-r),f=(n+e)/(n-e),h=(i+r)/(i-r);let p,v;if(a===Qi)p=-(o+s)/(o-s),v=-2*o*s/(o-s);else if(a===Uu)p=-o/(o-s),v=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=f,l[12]=0,l[1]=0,l[5]=u,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=p,l[14]=v,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,i,r,s,o,a=Qi){const l=this.elements,c=1/(n-e),u=1/(i-r),f=1/(o-s),h=(n+e)*c,p=(i+r)*u;let v,y;if(a===Qi)v=(o+s)*f,y=-2*f;else if(a===Uu)v=s*f,y=-1*f;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-p,l[2]=0,l[6]=0,l[10]=y,l[14]=-v,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const n=this.elements,i=e.elements;for(let r=0;r<16;r++)if(n[r]!==i[r])return!1;return!0}fromArray(e,n=0){for(let i=0;i<16;i++)this.elements[i]=e[i+n];return this}toArray(e=[],n=0){const i=this.elements;return e[n]=i[0],e[n+1]=i[1],e[n+2]=i[2],e[n+3]=i[3],e[n+4]=i[4],e[n+5]=i[5],e[n+6]=i[6],e[n+7]=i[7],e[n+8]=i[8],e[n+9]=i[9],e[n+10]=i[10],e[n+11]=i[11],e[n+12]=i[12],e[n+13]=i[13],e[n+14]=i[14],e[n+15]=i[15],e}}const $s=new Z,Qn=new Mt,QR=new Z(0,0,0),JR=new Z(1,1,1),gr=new Z,xc=new Z,Mn=new Z,i0=new Mt,r0=new Bl;class Di{constructor(e=0,n=0,i=0,r=Di.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=i,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,i,r=this._order){return this._x=e,this._y=n,this._z=i,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,i=!0){const r=e.elements,s=r[0],o=r[4],a=r[8],l=r[1],c=r[5],u=r[9],f=r[2],h=r[6],p=r[10];switch(n){case"XYZ":this._y=Math.asin(et(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-et(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,p),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(et(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,p),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-et(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(et(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(a,p));break;case"XZY":this._z=Math.asin(-et(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-u,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,i){return i0.makeRotationFromQuaternion(e),this.setFromRotationMatrix(i0,n,i)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return r0.setFromEuler(this),this.setFromQuaternion(r0,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+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}}Di.DEFAULT_ORDER="XYZ";class mw{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}
vendor: 5,642 bytes, line 82
82isEnabled(e){return(this.mask&(1<<e|0))!==0}}let eP=0;const s0=new Z,Zs=new Bl,Bi=new Mt,_c=new Z,Na=new Z,tP=new Z,nP=new Bl,o0=new Z(1,0,0),a0=new Z(0,1,0),l0=new Z(0,0,1),c0={type:"added"},iP={type:"removed"},Ks={type:"childadded",child:null},ud={type:"childremoved",child:null};class nn extends ca{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:eP++}),this.uuid=ua(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=nn.DEFAULT_UP.clone();const e=new Z,n=new Di,i=new Bl,r=new Z(1,1,1);function s(){i.setFromEuler(n,!1)}function o(){n.setFromQuaternion(i,void 0,!1)}n._onChange(s),i._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new Mt},normalMatrix:{value:new je}}),this.matrix=new Mt,this.matrixWorld=new Mt,this.matrixAutoUpdate=nn.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=nn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new mw,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,n){this.quaternion.setFromAxisAngle(e,n)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,n){return Zs.setFromAxisAngle(e,n),this.quaternion.multiply(Zs),this}rotateOnWorldAxis(e,n){return Zs.setFromAxisAngle(e,n),this.quaternion.premultiply(Zs),this}rotateX(e){return this.rotateOnAxis(o0,e)}rotateY(e){return this.rotateOnAxis(a0,e)}rotateZ(e){return this.rotateOnAxis(l0,e)}translateOnAxis(e,n){return s0.copy(e).applyQuaternion(this.quaternion),this.position.add(s0.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(o0,e)}translateY(e){return this.translateOnAxis(a0,e)}translateZ(e){return this.translateOnAxis(l0,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(Bi.copy(this.matrixWorld).invert())}lookAt(e,n,i){e.isVector3?_c.copy(e):_c.set(e,n,i);const r=this.parent;this.updateWorldMatrix(!0,!1),Na.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Bi.lookAt(Na,_c,this.up):Bi.lookAt(_c,Na,this.up),this.quaternion.setFromRotationMatrix(Bi),r&&(Bi.extractRotation(r.matrixWorld),Zs.setFromRotationMatrix(Bi),this.quaternion.premultiply(Zs.invert()))}add(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return e===this?(console.error("THREE.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(c0),Ks.child=e,this.dispatchEvent(Ks),Ks.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const n=this.children.indexOf(e);return n!==-1&&(e.parent=null,this.children.splice(n,1),e.dispatchEvent(iP),ud.child=e,this.dispatchEvent(ud),ud.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),Bi.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),Bi.multiply(e.parent.matrixWorld)),e.applyMatrix4(Bi),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(c0),Ks.child=e,this.dispatchEvent(Ks),Ks.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,n){if(this[e]===n)return this;for(let i=0,r=this.children.length;i<r;i++){const o=this.children[i].getObjectByProperty(e,n);if(o!==void 0)return o}}getObjectsByProperty(e,n,i=[]){this[e]===n&&i.push(this);const r=this.children;for(let s=0,o=r.length;s<o;s++)r[s].getObjectsByProperty(e,n,i);return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Na,e,tP),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Na,nP,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const n=this.matrixWorld.elements;return e.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(e){e(this);const n=this.children;for(let i=0,r=n.length;i<r;i++)n[i].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const n=this.children;for(let i=0,r=n.length;i<r;i++)n[i].traverseVisible(e)}traverseAncestors(e){const n=this.parent;n!==null&&(e(n),n.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix
vendor: 6,017 bytes, line 82
82):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const n=this.children;for(let i=0,r=n.length;i<r;i++)n[i].updateMatrixWorld(e)}updateWorldMatrix(e,n){const i=this.parent;if(e===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),n===!0){const r=this.children;for(let s=0,o=r.length;s<o;s++)r[s].updateWorldMatrix(!1,!0)}}toJSON(e){const n=e===void 0||typeof e=="string",i={};n&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});const r={};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.castShadow===!0&&(r.castShadow=!0),this.receiveShadow===!0&&(r.receiveShadow=!0),this.visible===!1&&(r.visible=!1),this.frustumCulled===!1&&(r.frustumCulled=!1),this.renderOrder!==0&&(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(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.geometryInfo=this._geometryInfo.map(a=>({...a,boundingBox:a.boundingBox?{min:a.boundingBox.min.toArray(),max:a.boundingBox.max.toArray()}:void 0,boundingSphere:a.boundingSphere?{radius:a.boundingSphere.radius,center:a.boundingSphere.center.toArray()}:void 0})),r.instanceInfo=this._instanceInfo.map(a=>({...a})),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),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(r.boundingSphere={center:this.boundingSphere.center.toArray(),radius:this.boundingSphere.radius}),this.boundingBox!==null&&(r.boundingBox={min:this.boundingBox.min.toArray(),max:this.boundingBox.max.toArray()}));function s(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=s(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c<u;c++){const f=l[c];s(e.shapes,f)}else s(e.shapes,l)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const a=[];for(let l=0,c=this.material.length;l<c;l++)a.push(s(e.materials,this.material[l]));r.material=a}else r.material=s(e.materials,this.material);if(this.children.length>0){r.children=[];for(let a=0;a<this.children.length;a++)r.children.push(this.children[a].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let a=0;a<this.animations.length;a++){const l=this.animations[a];r.animations.push(s(e.animations,l))}}if(n){const a=o(e.geometries),l=o(e.materials),c=o(e.textures),u=o(e.images),f=o(e.shapes),h=o(e.skeletons),p=o(e.animations),v=o(e.nodes);a.length>0&&(i.geometries=a),l.length>0&&(i.materials=l),c.length>0&&(i.textures=c),u.length>0&&(i.images=u),f.length>0&&(i.shapes=f),h.length>0&&(i.skeletons=h),p.length>0&&(i.animations=p),v.length>0&&(i.nodes=v)}return i.object=r,i;function o(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!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)),n===!0)for(let i=0;i<e.children.length;i++){const r=e.children[i];this.add(r.clone())}return this}}nn.DEFAULT_UP=new Z(0,1,0);nn.DEFAULT_MATRIX_AUTO_UPDATE=!0;nn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Jn=new Z,Hi=new Z,fd=new Z,Vi=new Z,Qs=new Z,Js=new Z,u0=new Z,dd=new Z,hd=new Z,pd=new Z,md=new Rt,gd=new Rt,vd=new Rt;class si{constructor(e=new Z,n=new Z,i=new Z){this.a=e,this.b=n,this.c=i}static getNormal(e,n,i,r){r.subVectors(i,n),Jn.subVectors(e,n),r.cross(Jn);const s=r.lengthSq();return s>0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,n,i,r,s){Jn.subVectors(r,n),Hi.subVectors(i,n),fd.subVectors(e,n);const o=Jn.dot(Jn),a=Jn.dot(Hi),l=Jn.dot(fd),c=Hi.dot(Hi),u=Hi.dot(fd),f=
vendor: 12,331 bytes, line 82
82o*c-a*a;if(f===0)return s.set(0,0,0),null;const h=1/f,p=(c*l-a*u)*h,v=(o*u-a*l)*h;return s.set(1-p-v,v,p)}static containsPoint(e,n,i,r){return this.getBarycoord(e,n,i,r,Vi)===null?!1:Vi.x>=0&&Vi.y>=0&&Vi.x+Vi.y<=1}static getInterpolation(e,n,i,r,s,o,a,l){return this.getBarycoord(e,n,i,r,Vi)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,Vi.x),l.addScaledVector(o,Vi.y),l.addScaledVector(a,Vi.z),l)}static getInterpolatedAttribute(e,n,i,r,s,o){return md.setScalar(0),gd.setScalar(0),vd.setScalar(0),md.fromBufferAttribute(e,n),gd.fromBufferAttribute(e,i),vd.fromBufferAttribute(e,r),o.setScalar(0),o.addScaledVector(md,s.x),o.addScaledVector(gd,s.y),o.addScaledVector(vd,s.z),o}static isFrontFacing(e,n,i,r){return Jn.subVectors(i,n),Hi.subVectors(e,n),Jn.cross(Hi).dot(r)<0}set(e,n,i){return this.a.copy(e),this.b.copy(n),this.c.copy(i),this}setFromPointsAndIndices(e,n,i,r){return this.a.copy(e[n]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,n,i,r){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Jn.subVectors(this.c,this.b),Hi.subVectors(this.a,this.b),Jn.cross(Hi).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return si.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return si.getBarycoord(e,this.a,this.b,this.c,n)}getInterpolation(e,n,i,r,s){return si.getInterpolation(e,this.a,this.b,this.c,n,i,r,s)}containsPoint(e){return si.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return si.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const i=this.a,r=this.b,s=this.c;let o,a;Qs.subVectors(r,i),Js.subVectors(s,i),dd.subVectors(e,i);const l=Qs.dot(dd),c=Js.dot(dd);if(l<=0&&c<=0)return n.copy(i);hd.subVectors(e,r);const u=Qs.dot(hd),f=Js.dot(hd);if(u>=0&&f<=u)return n.copy(r);const h=l*f-u*c;if(h<=0&&l>=0&&u<=0)return o=l/(l-u),n.copy(i).addScaledVector(Qs,o);pd.subVectors(e,s);const p=Qs.dot(pd),v=Js.dot(pd);if(v>=0&&p<=v)return n.copy(s);const y=p*c-l*v;if(y<=0&&c>=0&&v<=0)return a=c/(c-v),n.copy(i).addScaledVector(Js,a);const m=u*v-p*f;if(m<=0&&f-u>=0&&p-v>=0)return u0.subVectors(s,r),a=(f-u)/(f-u+(p-v)),n.copy(r).addScaledVector(u0,a);const d=1/(m+y+h);return o=y*d,a=h*d,n.copy(i).addScaledVector(Qs,o).addScaledVector(Js,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const gw={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},vr={h:0,s:0,l:0},Sc={h:0,s:0,l:0};function yd(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}class at{constructor(e,n,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,i)}set(e,n,i){if(n===void 0&&i===void 0){const r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,n,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=Cn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,ot.toWorkingColorSpace(this,n),this}setRGB(e,n,i,r=ot.workingColorSpace){return this.r=e,this.g=n,this.b=i,ot.toWorkingColorSpace(this,r),this}setHSL(e,n,i,r=ot.workingColorSpace){if(e=zR(e,1),n=et(n,0,1),i=et(i,0,1),n===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+n):i+n-i*n,o=2*i-s;this.r=yd(o,s,e+1/3),this.g=yd(o,s,e),this.b=yd(o,s,e-1/3)}return ot.toWorkingColorSpace(this,r),this}setStyle(e,n=Cn){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=r[1],a=r[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,n);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,n);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=r[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,n);if(o===6)return this.setHex(parseInt(s,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=Cn){const i=gw[e.toLowerCase()];return i!==void 0?this.setHex(i,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=er(e.r),this.g=er(e.g),this.b=er(e.b),this}copyLinearToSRGB(e){return this.r=Ro(e.r),this.g=Ro(e.g),this.b=Ro(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Cn){return ot.fromWorkingColorSpace(Jt.copy(this),e),Math.round(et(Jt.r*255,0,255))*65536+Math.round(et(Jt.g*255,0,255))*256+Math.round(et(Jt.b*255,0,255))}getHexString(e=Cn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=ot.workingColorSpace){ot.fromWorkingColorSpace(Jt.copy(this),n);const i=Jt.r,r=Jt.g,s=Jt.b,o=Math.max(i,r,s),a=Math.min(i,r,s);let l,c;const u=(a+o)/2;if(a===o)l=0,c=0;else{const f=o-a;switch(c=u<=.5?f/(o+a):f/(2-o-a),o){case i:l=(r-s)/f+(r<s?6:0);break;case r:l=(s-i)/f+2;break;case s:l=(i-r)/f+4;break}l/=6}return e.h=l,e.s=c,e.l=u,e}getRGB(e,n=ot.workingColorSpace){return ot.fromWorkingColorSpace(Jt.copy(this),n),e.r=Jt.r,e.g=Jt.g,e.b=Jt.b,e}getStyle(e=Cn){ot.fromWorkingColorSpace(Jt.copy(this),e);const n=Jt.r,i=Jt.g,r=Jt.b;return e!==Cn?`color(${e} ${n.toFixed(3)} ${i.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(n*255)},${Math.round(i*255)},${Math.round(r*255)})`}offsetHSL(e,n,i){return this.getHSL(vr),this.setHSL(vr.h+e,vr.s+n,vr.l+i)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,n){return this.r=e.r+n.r,this.g=e.g+n.g,this.b=e.b+n.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,n){return this.r+=(e.r-this.r)*n,this.g+=(e.g-this.g)*n,this.b+=(e.b-this.b)*n,this}lerpColors(e,n,i){return this.r=e.r+(n.r-e.r)*i,this.g=e.g+(n.g-e.g)*i,this.b=e.b+(n.b-e.b)*i,this}lerpHSL(e,n){this.getHSL(vr),e.getHSL(Sc);const i=td(vr.h,Sc.h,n),r=td(vr.s,Sc.s,n),s=td(vr.l,Sc.l,n);return this.setHSL(i,r,s),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const n=this.r,i=this.g,r=this.b,s=e.elements;return this.r=s[0]*n+s[3]*i+s[6]*r,this.g=s[1]*n+s[4]*i+s[7]*r,this.b=s[2]*n+s[5]*i+s[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,n=0){return this.r=e[n],this.g=e[n+1],this.b=e[n+2],this}toArray(e=[],n=0){return e[n]=this.r,e[n+1]=this.g,e[n+2]=this.b,e}fromBufferAttribute(e,n){return this.r=e.getX(n),this.g=e.getY(n),this.b=e.getZ(n),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Jt=new at;at.NAMES=gw;let rP=0;class Hl extends ca{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:rP++}),this.uuid=ua(),this.name="",this.type="Material",this.blending=Co,this.side=qr,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Fh,this.blendDst=kh,this.blendEquation=ms,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new at(0,0,0),this.blendAlpha=0,this.depthFunc=Ko,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Zv,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Ws,this.stencilZFail=Ws,this.stencilZPass=Ws,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const i=e[n];if(i===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const r=this[n];if(r===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[n]=i}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};
vendor: 13,748 bytes, line 82
82i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Co&&(i.blending=this.blending),this.side!==qr&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==Fh&&(i.blendSrc=this.blendSrc),this.blendDst!==kh&&(i.blendDst=this.blendDst),this.blendEquation!==ms&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==Ko&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Zv&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Ws&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Ws&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Ws&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(n){const s=r(e.textures),o=r(e.images);s.length>0&&(i.textures=s),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let i=null;if(n!==null){const r=n.length;i=new Array(r);for(let s=0;s!==r;++s)i[s]=n[s].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class vw extends Hl{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new at(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 Di,this.combine=tw,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 Nt=new Z,wc=new xe;let sP=0;class Ri{constructor(e,n,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:sP++}),this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=i,this.usage=Kv,this.updateRanges=[],this.gpuType=Ki,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}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,n,i){e*=this.itemSize,i*=n.itemSize;for(let r=0,s=this.itemSize;r<s;r++)this.array[e+r]=n.array[i+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let n=0,i=this.count;n<i;n++)wc.fromBufferAttribute(this,n),wc.applyMatrix3(e),this.setXY(n,wc.x,wc.y);else if(this.itemSize===3)for(let n=0,i=this.count;n<i;n++)Nt.fromBufferAttribute(this,n),Nt.applyMatrix3(e),this.setXYZ(n,Nt.x,Nt.y,Nt.z);return this}applyMatrix4(e){for(let n=0,i=this.count;n<i;n++)Nt.fromBufferAttribute(this,n),Nt.applyMatrix4(e),this.setXYZ(n,Nt.x,Nt.y,Nt.z);return this}applyNormalMatrix(e){for(let n=0,i=this.count;n<i;n++)Nt.fromBufferAttribute(this,n),Nt.applyNormalMatrix(e),this.setXYZ(n,Nt.x,Nt.y,Nt.z);return this}transformDirection(e){for(let n=0,i=this.count;n<i;n++)Nt.fromBufferAttribute(this,n),Nt.transformDirection(e),this.setXYZ(n,Nt.x,Nt.y,Nt.z);return this}set(e,n=0){return this.array.set(e,n),this}getComponent(e,n){let i=this.array[e*this.itemSize+n];return this.normalized&&(i=Ra(i,this.array)),i}setComponent(e,n,i){return this.normalized&&(i=pn(i,this.array)),this.array[e*this.itemSize+n]=i,this}getX(e){let n=this.array[e*this.itemSize];return this.normalized&&(n=Ra(n,this.array)),n}setX(e,n){return this.normalized&&(n=pn(n,this.array)),this.array[e*this.itemSize]=n,this}getY(e){let n=this.array[e*this.itemSize+1];return this.normalized&&(n=Ra(n,this.array)),n}setY(e,n){return this.normalized&&(n=pn(n,this.array)),this.array[e*this.itemSize+1]=n,this}getZ(e){let n=this.array[e*this.itemSize+2];return this.normalized&&(n=Ra(n,this.array)),n}setZ(e,n){return this.normalized&&(n=pn(n,this.array)),this.array[e*this.itemSize+2]=n,this}getW(e){let n=this.array[e*this.itemSize+3];return this.normalized&&(n=Ra(n,this.array)),n}setW(e,n){return this.normalized&&(n=pn(n,this.array)),this.array[e*this.itemSize+3]=n,this}setXY(e,n,i){return e*=this.itemSize,this.normalized&&(n=pn(n,this.array),i=pn(i,this.array)),this.array[e+0]=n,this.array[e+1]=i,this}setXYZ(e,n,i,r){return e*=this.itemSize,this.normalized&&(n=pn(n,this.array),i=pn(i,this.array),r=pn(r,this.array)),this.array[e+0]=n,this.array[e+1]=i,this.array[e+2]=r,this}setXYZW(e,n,i,r,s){return e*=this.itemSize,this.normalized&&(n=pn(n,this.array),i=pn(i,this.array),r=pn(r,this.array),s=pn(s,this.array)),this.array[e+0]=n,this.array[e+1]=i,this.array[e+2]=r,this.array[e+3]=s,this}
vendor: 4,829 bytes, line 82
82onUpload(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!==Kv&&(e.usage=this.usage),e}}class yw extends Ri{constructor(e,n,i){super(new Uint16Array(e),n,i)}}class xw extends Ri{constructor(e,n,i){super(new Uint32Array(e),n,i)}}class jn extends Ri{constructor(e,n,i){super(new Float32Array(e),n,i)}}let oP=0;const zn=new Mt,xd=new nn,eo=new Z,Tn=new fa,Da=new fa,Ht=new Z;class lr extends ca{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:oP++}),this.uuid=ua(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,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(hw(e)?xw:yw)(e,1):this.index=e,this}setIndirect(e){return this.indirect=e,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,n){return this.attributes[e]=n,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,n,i=0){this.groups.push({start:e,count:n,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,n){this.drawRange.start=e,this.drawRange.count=n}applyMatrix4(e){const n=this.attributes.position;n!==void 0&&(n.applyMatrix4(e),n.needsUpdate=!0);const i=this.attributes.normal;if(i!==void 0){const s=new je().getNormalMatrix(e);i.applyNormalMatrix(s),i.needsUpdate=!0}const r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return zn.makeRotationFromQuaternion(e),this.applyMatrix4(zn),this}rotateX(e){return zn.makeRotationX(e),this.applyMatrix4(zn),this}rotateY(e){return zn.makeRotationY(e),this.applyMatrix4(zn),this}rotateZ(e){return zn.makeRotationZ(e),this.applyMatrix4(zn),this}translate(e,n,i){return zn.makeTranslation(e,n,i),this.applyMatrix4(zn),this}scale(e,n,i){return zn.makeScale(e,n,i),this.applyMatrix4(zn),this}lookAt(e){return xd.lookAt(e),xd.updateMatrix(),this.applyMatrix4(xd.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(eo).negate(),this.translate(eo.x,eo.y,eo.z),this}setFromPoints(e){const n=this.getAttribute("position");if(n===void 0){const i=[];for(let r=0,s=e.length;r<s;r++){const o=e[r];i.push(o.x,o.y,o.z||0)}this.setAttribute("position",new jn(i,3))}else{const i=Math.min(e.length,n.count);for(let r=0;r<i;r++){const s=e[r];n.setXYZ(r,s.x,s.y,s.z||0)}e.length>n.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),n.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new fa);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new Z(-1/0,-1/0,-1/0),new Z(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),n)for(let i=0,r=n.length;i<r;i++){const s=n[i];Tn.setFromBufferAttribute(s),this.morphTargetsRelative?(Ht.addVectors(this.boundingBox.min,Tn.min),this.boundingBox.expandByPoint(Ht),Ht.addVectors(this.boundingBox.max,Tn.max),this.boundingBox.expandByPoint(Ht)):(this.boundingBox.expandByPoint(Tn.min),this.boundingBox.expandByPoint(Tn.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new $m);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new Z,1/0);return}if(e){const i=this.boundingSphere.center;if(Tn.setFromBufferAttribute(e),n)for(let s=0,o=n.length;s<o;s++){const a=n[s];Da.setFromBufferAttribute(a),this.morphTargetsRelative?(Ht.addVectors(Tn.min,Da.min),Tn.expandByPoint(Ht),Ht.addVectors(Tn.max,Da.max),Tn.expandByPoint(Ht)):(Tn.expandByPoint(Da.min),Tn.expandByPoint(Da.max))}Tn.getCenter(i);let r=0;for(let s=0,o=e.count;s<o;
vendor: 4,205 bytes, line 82
82s++)Ht.fromBufferAttribute(e,s),r=Math.max(r,i.distanceToSquared(Ht));if(n)for(let s=0,o=n.length;s<o;s++){const a=n[s],l=this.morphTargetsRelative;for(let c=0,u=a.count;c<u;c++)Ht.fromBufferAttribute(a,c),l&&(eo.fromBufferAttribute(e,c),Ht.add(eo)),r=Math.max(r,i.distanceToSquared(Ht))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,n=this.attributes;if(e===null||n.position===void 0||n.normal===void 0||n.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const i=n.position,r=n.normal,s=n.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Ri(new Float32Array(4*i.count),4));const o=this.getAttribute("tangent"),a=[],l=[];for(let R=0;R<i.count;R++)a[R]=new Z,l[R]=new Z;const c=new Z,u=new Z,f=new Z,h=new xe,p=new xe,v=new xe,y=new Z,m=new Z;function d(R,T,S){c.fromBufferAttribute(i,R),u.fromBufferAttribute(i,T),f.fromBufferAttribute(i,S),h.fromBufferAttribute(s,R),p.fromBufferAttribute(s,T),v.fromBufferAttribute(s,S),u.sub(c),f.sub(c),p.sub(h),v.sub(h);const U=1/(p.x*v.y-v.x*p.y);isFinite(U)&&(y.copy(u).multiplyScalar(v.y).addScaledVector(f,-p.y).multiplyScalar(U),m.copy(f).multiplyScalar(p.x).addScaledVector(u,-v.x).multiplyScalar(U),a[R].add(y),a[T].add(y),a[S].add(y),l[R].add(m),l[T].add(m),l[S].add(m))}let _=this.groups;_.length===0&&(_=[{start:0,count:e.count}]);for(let R=0,T=_.length;R<T;++R){const S=_[R],U=S.start,z=S.count;for(let V=U,H=U+z;V<H;V+=3)d(e.getX(V+0),e.getX(V+1),e.getX(V+2))}const g=new Z,x=new Z,b=new Z,A=new Z;function M(R){b.fromBufferAttribute(r,R),A.copy(b);const T=a[R];g.copy(T),g.sub(b.multiplyScalar(b.dot(T))).normalize(),x.crossVectors(A,T);const U=x.dot(l[R])<0?-1:1;o.setXYZW(R,g.x,g.y,g.z,U)}for(let R=0,T=_.length;R<T;++R){const S=_[R],U=S.start,z=S.count;for(let V=U,H=U+z;V<H;V+=3)M(e.getX(V+0)),M(e.getX(V+1)),M(e.getX(V+2))}}computeVertexNormals(){const e=this.index,n=this.getAttribute("position");if(n!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new Ri(new Float32Array(n.count*3),3),this.setAttribute("normal",i);else for(let h=0,p=i.count;h<p;h++)i.setXYZ(h,0,0,0);const r=new Z,s=new Z,o=new Z,a=new Z,l=new Z,c=new Z,u=new Z,f=new Z;if(e)for(let h=0,p=e.count;h<p;h+=3){const v=e.getX(h+0),y=e.getX(h+1),m=e.getX(h+2);r.fromBufferAttribute(n,v),s.fromBufferAttribute(n,y),o.fromBufferAttribute(n,m),u.subVectors(o,s),f.subVectors(r,s),u.cross(f),a.fromBufferAttribute(i,v),l.fromBufferAttribute(i,y),c.fromBufferAttribute(i,m),a.add(u),l.add(u),c.add(u),i.setXYZ(v,a.x,a.y,a.z),i.setXYZ(y,l.x,l.y,l.z),i.setXYZ(m,c.x,c.y,c.z)}else for(let h=0,p=n.count;h<p;h+=3)r.fromBufferAttribute(n,h+0),s.fromBufferAttribute(n,h+1),o.fromBufferAttribute(n,h+2),u.subVectors(o,s),f.subVectors(r,s),u.cross(f),i.setXYZ(h+0,u.x,u.y,u.z),i.setXYZ(h+1,u.x,u.y,u.z),i.setXYZ(h+2,u.x,u.y,u.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let n=0,i=e.count;n<i;n++)Ht.fromBufferAttribute(e,n),Ht.normalize(),e.setXYZ(n,Ht.x,Ht.y,Ht.z)}toNonIndexed(){function e(a,l){const c=a.array,u=a.itemSize,f=a.normalized,h=new c.constructor(l.length*u);let p=0,v=0;for(let y=0,m=l.length;y<m;y++){a.isInterleavedBufferAttribute?p=l[y]*a.data.stride+a.offset:p=l[y]*u;for(let d=0;d<u;d++)h[v++]=c[p++]}return new Ri(h,u,f)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const n=new lr,i=this.index.array,r=this.attributes;for(const a in r){const l=r[a],c=e(l,i);n.setAttribute(a,c)}const s=this.morphAttributes;for(const a in s){const l=[],c=s[a];for(let u=0,f=c.length;u<f;u++){const h=c[u],p=e(h,i);l.push(p)}n.morphAttributes[a]=l}n.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let a=0,l=o.length;a<l;a++){const c=o[a];n.addGroup(c.start,c.count,c.materialIndex)}return n}toJSON(){const e={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};
vendor: 4,948 bytes, line 82
82if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const i=this.attributes;for(const l in i){const c=i[l];e.data.attributes[l]=c.toJSON(e.data)}const r={};let s=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let f=0,h=c.length;f<h;f++){const p=c[f];u.push(p.toJSON(e.data))}u.length>0&&(r[l]=u,s=!0)}s&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone());const r=e.attributes;for(const c in r){const u=r[c];this.setAttribute(c,u.clone(n))}const s=e.morphAttributes;for(const c in s){const u=[],f=s[c];for(let h=0,p=f.length;h<p;h++)u.push(f[h].clone(n));this.morphAttributes[c]=u}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let c=0,u=o.length;c<u;c++){const f=o[c];this.addGroup(f.start,f.count,f.materialIndex)}const a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());const l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const f0=new Mt,os=new KR,Ec=new $m,d0=new Z,Mc=new Z,Tc=new Z,bc=new Z,_d=new Z,Ac=new Z,h0=new Z,Cc=new Z;class Ti extends nn{constructor(e=new lr,n=new vw){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=n,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,n){return super.copy(e,n),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const n=this.geometry.morphAttributes,i=Object.keys(n);if(i.length>0){const r=n[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s<o;s++){const a=r[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}getVertexPosition(e,n){const i=this.geometry,r=i.attributes.position,s=i.morphAttributes.position,o=i.morphTargetsRelative;n.fromBufferAttribute(r,e);const a=this.morphTargetInfluences;if(s&&a){Ac.set(0,0,0);for(let l=0,c=s.length;l<c;l++){const u=a[l],f=s[l];u!==0&&(_d.fromBufferAttribute(f,e),o?Ac.addScaledVector(_d,u):Ac.addScaledVector(_d.sub(n),u))}n.add(Ac)}return n}raycast(e,n){const i=this.geometry,r=this.material,s=this.matrixWorld;r!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),Ec.copy(i.boundingSphere),Ec.applyMatrix4(s),os.copy(e.ray).recast(e.near),!(Ec.containsPoint(os.origin)===!1&&(os.intersectSphere(Ec,d0)===null||os.origin.distanceToSquared(d0)>(e.far-e.near)**2))&&(f0.copy(s).invert(),os.copy(e.ray).applyMatrix4(f0),!(i.boundingBox!==null&&os.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,n,os)))}_computeIntersections(e,n,i){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,u=s.attributes.uv1,f=s.attributes.normal,h=s.groups,p=s.drawRange;if(a!==null)if(Array.isArray(o))for(let v=0,y=h.length;v<y;v++){const m=h[v],d=o[m.materialIndex],_=Math.max(m.start,p.start),g=Math.min(a.count,Math.min(m.start+m.count,p.start+p.count));for(let x=_,b=g;x<b;x+=3){const A=a.getX(x),M=a.getX(x+1),R=a.getX(x+2);r=Rc(this,d,e,i,c,u,f,A,M,R),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=m.materialIndex,n.push(r))}}else{const v=Math.max(0,p.start),y=Math.min(a.count,p.start+p.count);for(let m=v,d=y;m<d;m+=3){const _=a.getX(m),g=a.getX(m+1),x=a.getX(m+2);r=Rc(this,o,e,i,c,u,f,_,g,x),r&&(r.faceIndex=Math.floor(m/3),n.push(r))}}else if(l!==void 0)if(Array.isArray(o))for(let v=0,y=h.length;v<y;v++){const m=h[v],d=o[m.materialIndex],_=Math.max(m.start,p.start),g=Math.min(l.count,Math.min(m.start+m.count,p.start+p.count));for(let x=_,b=g;x<b;x+=3){const A=x,M=x+1,R=x+2;r=Rc(this,d,e,i,c,u,f,A,M,R),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=m.materialIndex,n.push(r))}}else{const v=Math.max(0,p.start),y=Math.min(l.count,p.start+p.count);for(let m=v,d=y;m<d;m+=3){const _=m,g=m+1,x=m+2;
vendor: 6,533 bytes, lines 82-86
82r=Rc(this,o,e,i,c,u,f,_,g,x),r&&(r.faceIndex=Math.floor(m/3),n.push(r))}}}}function aP(t,e,n,i,r,s,o,a){let l;if(e.side===_n?l=i.intersectTriangle(o,s,r,!0,a):l=i.intersectTriangle(r,s,o,e.side===qr,a),l===null)return null;Cc.copy(a),Cc.applyMatrix4(t.matrixWorld);const c=n.ray.origin.distanceTo(Cc);return c<n.near||c>n.far?null:{distance:c,point:Cc.clone(),object:t}}function Rc(t,e,n,i,r,s,o,a,l,c){t.getVertexPosition(a,Mc),t.getVertexPosition(l,Tc),t.getVertexPosition(c,bc);const u=aP(t,e,n,i,Mc,Tc,bc,h0);if(u){const f=new Z;si.getBarycoord(h0,Mc,Tc,bc,f),r&&(u.uv=si.getInterpolatedAttribute(r,a,l,c,f,new xe)),s&&(u.uv1=si.getInterpolatedAttribute(s,a,l,c,f,new xe)),o&&(u.normal=si.getInterpolatedAttribute(o,a,l,c,f,new Z),u.normal.dot(i.direction)>0&&u.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new Z,materialIndex:0};si.getNormal(Mc,Tc,bc,h.normal),u.face=h,u.barycoord=f}return u}class Vl extends lr{constructor(e=1,n=1,i=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:i,widthSegments:r,heightSegments:s,depthSegments:o};const a=this;r=Math.floor(r),s=Math.floor(s),o=Math.floor(o);const l=[],c=[],u=[],f=[];let h=0,p=0;v("z","y","x",-1,-1,i,n,e,o,s,0),v("z","y","x",1,-1,i,n,-e,o,s,1),v("x","z","y",1,1,e,i,n,r,o,2),v("x","z","y",1,-1,e,i,-n,r,o,3),v("x","y","z",1,-1,e,n,i,r,s,4),v("x","y","z",-1,-1,e,n,-i,r,s,5),this.setIndex(l),this.setAttribute("position",new jn(c,3)),this.setAttribute("normal",new jn(u,3)),this.setAttribute("uv",new jn(f,2));function v(y,m,d,_,g,x,b,A,M,R,T){const S=x/M,U=b/R,z=x/2,V=b/2,H=A/2,Q=M+1,j=R+1;let W=0,N=0;const K=new Z;for(let se=0;se<j;se++){const me=se*U-V;for(let Ae=0;Ae<Q;Ae++){const He=Ae*S-z;K[y]=He*_,K[m]=me*g,K[d]=H,c.push(K.x,K.y,K.z),K[y]=0,K[m]=0,K[d]=A>0?1:-1,u.push(K.x,K.y,K.z),f.push(Ae/M),f.push(1-se/R),W+=1}}for(let se=0;se<R;se++)for(let me=0;me<M;me++){const Ae=h+me+Q*se,He=h+me+Q*(se+1),k=h+(me+1)+Q*(se+1),O=h+(me+1)+Q*se;l.push(Ae,He,O),l.push(He,k,O),N+=6}a.addGroup(p,N,T),p+=N,h+=W}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Vl(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function ta(t){const e={};for(const n in t){e[n]={};for(const i in t[n]){const r=t[n][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[n][i]=null):e[n][i]=r.clone():Array.isArray(r)?e[n][i]=r.slice():e[n][i]=r}}return e}function on(t){const e={};for(let n=0;n<t.length;n++){const i=ta(t[n]);for(const r in i)e[r]=i[r]}return e}function lP(t){const e=[];for(let n=0;n<t.length;n++)e.push(t[n].clone());return e}function _w(t){const e=t.getRenderTarget();return e===null?t.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:ot.workingColorSpace}const cP={clone:ta,merge:on};var uP=`void main() { 83 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 84}`,fP=`void main() { 85 gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 ); 86}`;class $r extends Hl{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=uP,this.fragmentShader=fP,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=ta(e.uniforms),this.uniformsGroups=lP(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const n=super.toJSON(e);n.glslVersion=this.glslVersion,n.uniforms={};for(const r in this.uniforms){const o=this.uniforms[r].value;o&&o.isTexture?n.uniforms[r]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?n.uniforms[r]={type:"c",value:o.getHex()}:o&&o.isVector2?n.uniforms[r]={type:"v2",value:o.toArray()}:o&&o.isVector3?n.uniforms[r]={type:"v3",value:o.toArray()}:o&&o.isVector4?n.uniforms[r]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?n.uniforms[r]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?n.uniforms[r]={type:"m4",value:o.toArray()}:n.uniforms[r]={value:o}}Object.keys(this.defines).length>0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const i={};for(const r in this.extensions)this.extensions[r]===!0&&(i[r]=!0);return Object.keys(i).length>0&&(n.extensions=i),n}}class Sw extends nn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Mt,this.projectionMatrix=new Mt,this.projectionMatrixInverse=new Mt,this.coordinateSystem=Qi}copy(e,n){return super.copy(e,n),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,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const yr=new Z,p0=new xe,m0=new xe;class Gn extends Sw{constructor(e=50,n=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=r,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=wp*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(ed*.5*this.fov);return .5*this.getFilmHeight()/e}
vendor: 4,357 bytes, line 86
86getEffectiveFOV(){return wp*2*Math.atan(Math.tan(ed*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,n,i){yr.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(yr.x,yr.y).multiplyScalar(-e/yr.z),yr.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(yr.x,yr.y).multiplyScalar(-e/yr.z)}getViewSize(e,n){return this.getViewBounds(e,p0,m0),n.subVectors(m0,p0)}setViewOffset(e,n,i,r,s,o){this.aspect=e/n,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(ed*.5*this.fov)/this.zoom,i=2*n,r=this.aspect*i,s=-.5*r;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;s+=o.offsetX*r/l,n-=o.offsetY*i/c,r*=o.width/l,i*=o.height/c}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,n,n-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const to=-90,no=1;class dP extends nn{constructor(e,n,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new Gn(to,no,e,n);r.layers=this.layers,this.add(r);const s=new Gn(to,no,e,n);s.layers=this.layers,this.add(s);const o=new Gn(to,no,e,n);o.layers=this.layers,this.add(o);const a=new Gn(to,no,e,n);a.layers=this.layers,this.add(a);const l=new Gn(to,no,e,n);l.layers=this.layers,this.add(l);const c=new Gn(to,no,e,n);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[i,r,s,o,a,l]=n;for(const c of n)this.remove(c);if(e===Qi)i.up.set(0,1,0),i.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),s.up.set(0,0,-1),s.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===Uu)i.up.set(0,-1,0),i.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),s.up.set(0,0,1),s.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of n)this.add(c),c.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,o,a,l,c,u]=this.children,f=e.getRenderTarget(),h=e.getActiveCubeFace(),p=e.getActiveMipmapLevel(),v=e.xr.enabled;e.xr.enabled=!1;const y=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,r),e.render(n,s),e.setRenderTarget(i,1,r),e.render(n,o),e.setRenderTarget(i,2,r),e.render(n,a),e.setRenderTarget(i,3,r),e.render(n,l),e.setRenderTarget(i,4,r),e.render(n,c),i.texture.generateMipmaps=y,e.setRenderTarget(i,5,r),e.render(n,u),e.setRenderTarget(f,h,p),e.xr.enabled=v,i.texture.needsPMREMUpdate=!0}}class ww extends Sn{constructor(e=[],n=Qo,i,r,s,o,a,l,c,u){super(e,n,i,r,s,o,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class hP extends Os{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];this.texture=new ww(r,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:Mi}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace
vendor: 7,219 bytes, lines 86-121
86=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:` 87 88 varying vec3 vWorldDirection; 89 90 vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 91 92 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 93 94 } 95 96 void main() { 97 98 vWorldDirection = transformDirection( position, modelMatrix ); 99 100 #include <begin_vertex> 101 #include <project_vertex> 102 103 } 104 `,fragmentShader:` 105 106 uniform sampler2D tEquirect; 107 108 varying vec3 vWorldDirection; 109 110 #include <common> 111 112 void main() { 113 114 vec3 direction = normalize( vWorldDirection ); 115 116 vec2 sampleUV = equirectUv( direction ); 117 118 gl_FragColor = texture2D( tEquirect, sampleUV ); 119 120 } 121 `},r=new Vl(5,5,5),s=new $r({name:"CubemapFromEquirect",uniforms:ta(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:_n,blending:Hr});s.uniforms.tEquirect.value=n;const o=new Ti(r,s),a=n.minFilter;return n.minFilter===Ss&&(n.minFilter=Mi),new dP(1,10,this).update(e,o),n.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,n=!0,i=!0,r=!0){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(n,i,r);e.setRenderTarget(s)}}class vo extends nn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const pP={type:"move"};class Sd{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new vo,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new vo,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Z,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Z),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new vo,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Z,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Z),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const n=this._hand;if(n)for(const i of e.hand.values())this._getHandJoint(n,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,n,i){let r=null,s=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const y of e.hand.values()){const m=n.getJointPose(y,i),d=this._getHandJoint(c,y);m!==null&&(d.matrix.fromArray(m.transform.matrix),d.matrix.decompose(d.position,d.rotation,d.scale),d.matrixWorldNeedsUpdate=!0,d.jointRadius=m.radius),d.visible=m!==null}const u=c.joints["index-finger-tip"],f=c.joints["thumb-tip"],h=u.position.distanceTo(f.position),p=.02,v=.005;c.inputState.pinching&&h>p+v?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=p-v&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=n.getPose(e.gripSpace,i),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(r=n.getPose(e.targetRaySpace,i),r===null&&s!==null&&(r=s),r!==null&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(pP)))}return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=s!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const i=new vo;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[n.jointName]=i,e.add(i)}return e.joints[n.jointName]}}class mP extends nn{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 Di,this.environmentIntensity=1,this.environmentRotation=new Di,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(n.object.environmentIntensity=this.environmentIntensity),n.object.environmentRotation=this.environmentRotation.toArray(),n}}const wd=new Z,gP=new Z,vP=new je;class hs{constructor(e=new Z(1,0,0),n=0){this.isPlane=!0,this.normal=e,this.constant=n}set(e,n){return this.normal.copy(e),this.constant=n,this}setComponents(e,n,i,r){return this.normal.set(e,n,i),this.constant=r,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,i){const r=wd.subVectors(i,n).cross(gP.subVectors(e,n)).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,n){return n.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,n){const i=e.delta(wd),r=this.normal.dot(i);if(r===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;
vendor: 5,807 bytes, line 121
121const s=-(e.start.dot(this.normal)+this.constant)/r;return s<0||s>1?null:n.copy(e.start).addScaledVector(i,s)}intersectsLine(e){const n=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return n<0&&i>0||i<0&&n>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,n){const i=n||vP.getNormalMatrix(e),r=this.coplanarPoint(wd).applyMatrix4(e),s=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(s),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const as=new $m,Pc=new Z;class Zm{constructor(e=new hs,n=new hs,i=new hs,r=new hs,s=new hs,o=new hs){this.planes=[e,n,i,r,s,o]}set(e,n,i,r,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(i),a[3].copy(r),a[4].copy(s),a[5].copy(o),this}copy(e){const n=this.planes;for(let i=0;i<6;i++)n[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,n=Qi){const i=this.planes,r=e.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],u=r[5],f=r[6],h=r[7],p=r[8],v=r[9],y=r[10],m=r[11],d=r[12],_=r[13],g=r[14],x=r[15];if(i[0].setComponents(l-s,h-c,m-p,x-d).normalize(),i[1].setComponents(l+s,h+c,m+p,x+d).normalize(),i[2].setComponents(l+o,h+u,m+v,x+_).normalize(),i[3].setComponents(l-o,h-u,m-v,x-_).normalize(),i[4].setComponents(l-a,h-f,m-y,x-g).normalize(),n===Qi)i[5].setComponents(l+a,h+f,m+y,x+g).normalize();else if(n===Uu)i[5].setComponents(a,f,y,g).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),as.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),as.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(as)}intersectsSprite(e){return as.center.set(0,0,0),as.radius=.7071067811865476,as.applyMatrix4(e.matrixWorld),this.intersectsSphere(as)}intersectsSphere(e){const n=this.planes,i=e.center,r=-e.radius;for(let s=0;s<6;s++)if(n[s].distanceToPoint(i)<r)return!1;return!0}intersectsBox(e){const n=this.planes;for(let i=0;i<6;i++){const r=n[i];if(Pc.x=r.normal.x>0?e.max.x:e.min.x,Pc.y=r.normal.y>0?e.max.y:e.min.y,Pc.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Pc)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let i=0;i<6;i++)if(n[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}class Ew extends Sn{constructor(e,n,i=Us,r,s,o,a=ci,l=ci,c,u=Tl){if(u!==Tl&&u!==bl)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");super(null,r,s,o,a,l,u,i,c),this.isDepthTexture=!0,this.image={width:e,height:n},this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new qm(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const n=super.toJSON(e);return this.compareFunction!==null&&(n.compareFunction=this.compareFunction),n}}class Ui{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){console.warn("THREE.Curve: .getPoint() not implemented.")}getPointAt(e,n){const i=this.getUtoTmapping(e);return this.getPoint(i,n)}getPoints(e=5){const n=[];for(let i=0;i<=e;i++)n.push(this.getPoint(i/e));return n}getSpacedPoints(e=5){const n=[];for(let i=0;i<=e;i++)n.push(this.getPointAt(i/e));return n}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 n=[];let i,r=this.getPoint(0),s=0;n.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),s+=i.distanceTo(r),n.push(s),r=i;return this.cacheArcLengths=n,n}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,n=null){const i=this.getLengths();let r=0;const s=i.length;let o;n?o=n:o=e*i[s-1];let a=0,l=s-1,c;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),c=i[r]-o,c<0)a=r+1;else if(c>0)l=r-1;else{l=r;break}if(r=l,i[r]===o)return r/(s-1);const u=i[r],h=i[r+1]-u,p=(o-u)/h;return(r+p)/(s-1)}getTangent(e,n){let r=e-1e-4,s=e+1e-4;r<0&&(r=0),s>1&&(s=1);const o=this.getPoint(r),a=this.getPoint(s),l=n||(o.isVector2?new xe:new Z);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,n){const i=this.getUtoTmapping(e);return this.getTangent(i,n)}computeFrenetFrames(e,n=!1){const i=new Z,r=[],s=[],o=[],a=new Z,l=new Mt;for(let p=0;p<=e;p++){const v=p/e;r[p]=this.getTangentAt(v,new Z)}s[0]=new Z,o[0]=new Z;let c=Number.MAX_VALUE;const u=Math.abs(r[0].x),f=Math.abs(r[0].y),h=Math.abs(r[0].z);u<=c&&(c=u,i.set(1,0,0)),f<=c&&(c=f,i.set(0,1,0)),h<=c&&i.set(0,0,1),a.crossVectors(r[0],i).normalize(),s[0].crossVectors(r[0],a),o[0].crossVectors(r[0],s[0]);for(let p=1;p<=e;p++){if(s[p]=s[p-1].clone(),o[p]=o[p-1].clone(),a.crossVectors(r[p-1],r[p]),a.length()>Number.EPSILON){a.normalize();const v=Math.acos(et(r[p-1].dot(r[p]),-1,1));s[p].applyMatrix4(l.makeRotationAxis(a,v))}o[p].crossVectors(r[p],s[p])}if(n===!0){let p=Math.acos(et(s[0].dot(s[e]),-1,1));p/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(p=-p);for(let v=1;v<=e;v++)s[v].applyMatrix4(l.makeRotationAxis(r[v],p*v)),o[v].crossVectors(r[v],s[v])}return{tangents:r,normals:s,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.t
vendor: 4,282 bytes, line 121
121ype,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Km extends Ui{constructor(e=0,n=0,i=1,r=1,s=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=n,this.xRadius=i,this.yRadius=r,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,n=new xe){const i=n,r=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)<Number.EPSILON;for(;s<0;)s+=r;for(;s>r;)s-=r;s<Number.EPSILON&&(o?s=0:s=r),this.aClockwise===!0&&!o&&(s===r?s=-r:s=s-r);const a=this.aStartAngle+e*s;let l=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(this.aRotation!==0){const u=Math.cos(this.aRotation),f=Math.sin(this.aRotation),h=l-this.aX,p=c-this.aY;l=h*u-p*f+this.aX,c=h*f+p*u+this.aY}return i.set(l,c)}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 yP extends Km{constructor(e,n,i,r,s,o){super(e,n,i,i,r,s,o),this.isArcCurve=!0,this.type="ArcCurve"}}function Qm(){let t=0,e=0,n=0,i=0;function r(s,o,a,l){t=s,e=a,n=-3*s+3*o-2*a-l,i=2*s-2*o+a+l}return{initCatmullRom:function(s,o,a,l,c){r(o,a,c*(a-s),c*(l-o))},initNonuniformCatmullRom:function(s,o,a,l,c,u,f){let h=(o-s)/c-(a-s)/(c+u)+(a-o)/u,p=(a-o)/u-(l-o)/(u+f)+(l-a)/f;h*=u,p*=u,r(o,a,h,p)},calc:function(s){const o=s*s,a=o*s;return t+e*s+n*o+i*a}}}const Lc=new Z,Ed=new Qm,Md=new Qm,Td=new Qm;class xP extends Ui{constructor(e=[],n=!1,i="centripetal",r=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=n,this.curveType=i,this.tension=r}getPoint(e,n=new Z){const i=n,r=this.points,s=r.length,o=(s-(this.closed?0:1))*e;let a=Math.floor(o),l=o-a;this.closed?a+=a>0?0:(Math.floor(Math.abs(a)/s)+1)*s:l===0&&a===s-1&&(a=s-2,l=1);let c,u;this.closed||a>0?c=r[(a-1)%s]:(Lc.subVectors(r[0],r[1]).add(r[0]),c=Lc);const f=r[a%s],h=r[(a+1)%s];if(this.closed||a+2<s?u=r[(a+2)%s]:(Lc.subVectors(r[s-1],r[s-2]).add(r[s-1]),u=Lc),this.curveType==="centripetal"||this.curveType==="chordal"){const p=this.curveType==="chordal"?.5:.25;let v=Math.pow(c.distanceToSquared(f),p),y=Math.pow(f.distanceToSquared(h),p),m=Math.pow(h.distanceToSquared(u),p);y<1e-4&&(y=1),v<1e-4&&(v=y),m<1e-4&&(m=y),Ed.initNonuniformCatmullRom(c.x,f.x,h.x,u.x,v,y,m),Md.initNonuniformCatmullRom(c.y,f.y,h.y,u.y,v,y,m),Td.initNonuniformCatmullRom(c.z,f.z,h.z,u.z,v,y,m)}else this.curveType==="catmullrom"&&(Ed.initCatmullRom(c.x,f.x,h.x,u.x,this.tension),Md.initCatmullRom(c.y,f.y,h.y,u.y,this.tension),Td.initCatmullRom(c.z,f.z,h.z,u.z,this.tension));return i.set(Ed.calc(l),Md.calc(l),Td.calc(l)),i}copy(e){super.copy(e),this.points=[];for(let n=0,i=e.points.length;n<i;n++){const r=e.points[n];this.points.push(r.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let n=0,i=this.points.length;n<i;n++){const r=this.points[n];e.points.push(r.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let n=0,i=e.points.length;n<i;n++){const r=e.points[n];this.points.push(new Z().fromArray(r))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function g0(t,e,n,i,r){const s=(i-e)*.5,o=(r-n)*.5,a=t*t,l=t*a;return(2*n-2*i+s+o)*l+(-3*n+3*i-2*s-o)*a+s*t+n}function _P(t,e){const n=1-t;return n*n*e}function SP(t,e){return 2*(1-t)*t*e}function wP(t,e){return t*t*e}function Ja(t,e,n,i){return _P(t,e)+SP(t,n)+wP(t,i)}function EP(t,e){const n=1-t;return n*n*n*e}function MP(t,e){const n=1-t;return 3*n*n*t*e}function TP(t,e){return 3*(1-t)*t*t*e}function bP(t,e){return t*t*t*e}
vendor: 15,698 bytes, line 121
121function el(t,e,n,i,r){return EP(t,e)+MP(t,n)+TP(t,i)+bP(t,r)}class Mw extends Ui{constructor(e=new xe,n=new xe,i=new xe,r=new xe){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=n,this.v2=i,this.v3=r}getPoint(e,n=new xe){const i=n,r=this.v0,s=this.v1,o=this.v2,a=this.v3;return i.set(el(e,r.x,s.x,o.x,a.x),el(e,r.y,s.y,o.y,a.y)),i}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 AP extends Ui{constructor(e=new Z,n=new Z,i=new Z,r=new Z){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=n,this.v2=i,this.v3=r}getPoint(e,n=new Z){const i=n,r=this.v0,s=this.v1,o=this.v2,a=this.v3;return i.set(el(e,r.x,s.x,o.x,a.x),el(e,r.y,s.y,o.y,a.y),el(e,r.z,s.z,o.z,a.z)),i}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 Tw extends Ui{constructor(e=new xe,n=new xe){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=n}getPoint(e,n=new xe){const i=n;return e===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(e).add(this.v1)),i}getPointAt(e,n){return this.getPoint(e,n)}getTangent(e,n=new xe){return n.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,n){return this.getTangent(e,n)}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 CP extends Ui{constructor(e=new Z,n=new Z){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=n}getPoint(e,n=new Z){const i=n;return e===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(e).add(this.v1)),i}getPointAt(e,n){return this.getPoint(e,n)}getTangent(e,n=new Z){return n.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,n){return this.getTangent(e,n)}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 bw extends Ui{constructor(e=new xe,n=new xe,i=new xe){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=n,this.v2=i}getPoint(e,n=new xe){const i=n,r=this.v0,s=this.v1,o=this.v2;return i.set(Ja(e,r.x,s.x,o.x),Ja(e,r.y,s.y,o.y)),i}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 RP extends Ui{constructor(e=new Z,n=new Z,i=new Z){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=n,this.v2=i}getPoint(e,n=new Z){const i=n,r=this.v0,s=this.v1,o=this.v2;return i.set(Ja(e,r.x,s.x,o.x),Ja(e,r.y,s.y,o.y),Ja(e,r.z,s.z,o.z)),i}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 Aw extends Ui{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,n=new xe){const i=n,r=this.points,s=(r.length-1)*e,o=Math.floor(s),a=s-o,l=r[o===0?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],f=r[o>r.length-3?r.length-1:o+2];return i.set(g0(a,l.x,c.x,u.x,f.x),g0(a,l.y,c.y,u.y,f.y)),i}copy(e){super.copy(e),this.points=[];for(let n=0,i=e.points.length;n<i;n++){const r=e.points[n];this.points.push(r.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let n=0,i=this.points.length;n<i;n++){const r=this.points[n];e.points.push(r.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let n=0,i=e.points.length;n<i;n++){const r=e.points[n];this.points.push(new xe().fromArray(r))}return this}}var Ep=Object.freeze({__proto__:null,ArcCurve:yP,CatmullRomCurve3:xP,CubicBezierCurve:Mw,CubicBezierCurve3:AP,EllipseCurve:Km,LineCurve:Tw,LineCurve3:CP,QuadraticBezierCurve:bw,QuadraticBezierCurve3:RP,SplineCurve:Aw});class PP extends Ui{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),n=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(n)){const i=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new Ep[i](n,e))}return this}getPoint(e,n){const i=e*this.getLength(),r=this.getCurveLengths();let s=0;for(;s<r.length;){if(r[s]>=i){const o=r[s]-i,a=this.curves[s],l=a.getLength(),c=l===0?0:1-o/l;return a.getPointAt(c,n)}s++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let n=0;for(let i=0,r=this.curves.length;i<r;i++)n+=this.curves[i].getLength(),e.push(n);return this.cacheLengths=e,e}getSpacedPoints(e=40){const n=[];for(let i=0;i<=e;i++)n.push(this.getPoint(i/e));return this.autoClose&&n.push(n[0]),n}getPoints(e=12){const n=[];let i;for(let r=0,s=this.curves;r<s.length;r++){const o=s[r],a=o.isEllipseCurve?e*2:o.isLineCurve||o.isLineCurve3?1:o.isSplineCurve?e*o.points.length:e,l=o.getPoints(a);for(let c=0;c<l.length;c++){const u=l[c];i&&i.equals(u)||(n.push(u),i=u)}}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let n=0,i=e.curves.length;n<i;n++){const r=e.curves[n];this.curves.push(r.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let n=0,i=this.curves.length;n<i;n++){const r=this.curves[n];e.curves.push(r.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let n=0,i=e.curves.length;n<i;n++){const r=e.curves[n];this.curves.push(new Ep[r.type]().fromJSON(r))}return this}}class Po extends PP{constructor(e){super(),this.type="Path",this.currentPoint=new xe,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let n=1,i=e.length;n<i;n++)this.lineTo(e[n].x,e[n].y);return this}moveTo(e,n){return this.currentPoint.set(e,n),this}lineTo(e,n){const i=new Tw(this.currentPoint.clone(),new xe(e,n));return this.curves.push(i),this.currentPoint.set(e,n),this}quadraticCurveTo(e,n,i,r){const s=new bw(this.currentPoint.clone(),new xe(e,n),new xe(i,r));return this.curves.push(s),this.currentPoint.set(i,r),this}bezierCurveTo(e,n,i,r,s,o){const a=new Mw(this.currentPoint.clone(),new xe(e,n),new xe(i,r),new xe(s,o));return this.curves.push(a),this.currentPoint.set(s,o),this}splineThru(e){const n=[this.currentPoint.clone()].concat(e),i=new Aw(n);return this.curves.push(i),this.currentPoint.copy(e[e.length-1]),this}arc(e,n,i,r,s,o){const a=this.currentPoint.x,l=this.currentPoint.y;return this.absarc(e+a,n+l,i,r,s,o),this}absarc(e,n,i,r,s,o){return this.absellipse(e,n,i,i,r,s,o),this}ellipse(e,n,i,r,s,o,a,l){const c=this.currentPoint.x,u=this.currentPoint.y;return this.absellipse(e+c,n+u,i,r,s,o,a,l),this}absellipse(e,n,i,r,s,o,a,l){const c=new Km(e,n,i,r,s,o,a,l);if(this.curves.length>0){const f=c.getPoint(0);f.equals(this.currentPoint)||this.lineTo(f.x,f.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class tl extends Po{constructor(e){super(e),this.uuid=ua(),this.type="Shape",this.holes=[]}getPointsHoles(e){const n=[];for(let i=0,r=this.holes.length;i<r;i++)n[i]=this.holes[i].getPoints(e);return n}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let n=0,i=e.holes.length;n<i;n++){const r=e.holes[n];this.holes.push(r.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let n=0,i=this.holes.length;n<i;n++){const r=this.holes[n];e.holes.push(r.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let n=0,i=e.holes.length;n<i;n++){const r=e.holes[n];this.holes.push(new Po().fromJSON(r))}return this}}function LP(t,e,n=2){const i=e&&e.length,r=i?e[0]*n:t.length;let s=Cw(t,0,r,n,!0);const o=[];if(!s||s.next===s.prev)return o;let a,l,c;if(i&&(s=OP(t,e,s,n)),t.length>80*n){a=1/0,l=1/0;let u=-1/0,f=-1/0;for(let h=n;h<r;h+=n){const p=t[h],v=t[h+1];p<a&&(a=p),v<l&&(l=v),p>u&&(u=p),v>f&&(f=v)}c=Math.max(u-a,f-l),c=c!==0?32767/c:0}return Al(s,o,n,a,l,c,0),o}function Cw(t,e,n,i,r){let s;if(r===YP(t,e,n,i)>0)for(let o=e;o<n;o+=i)s=v0(o/i|0,t[o],t[o+1],s);else for(let o=n-i;o>=e;o-=i)s=v0(o/i|0,t[o],t[o+1],s);return s&&na(s,s.next)&&(Rl(s),s=s.next),s}function Fs(t,e){if(!t)return t;e||(e=t);let n=t,i;do if(i=!1,!n.steiner&&(na(n,n.next)||wt(n.prev,n,n.next)===0)){if(Rl(n),n=e=n.prev,n===n.next)break;i=!0}else n=n.next;while(i||n!==e);return e}function Al(t,e,n,i,r,s,o){if(!t)return;!o&&s&&HP(t,i,r,s);let a=t;for(;t.prev!==t.next;){const l=t.prev,c=t.next;if(s?DP(t,i,r,s):NP(t)){e.push(l.i,t.i,c.i),Rl(t),t=c.next,a=c.next;continue}if(t=c,t===a){o?o===1?(t=IP(Fs(t),e),Al(t,e,n,i,r,s,2)):o===2&&UP(t,e,n,i,r,s):Al(Fs(t),e,n,i,r,s,1);break}}}function NP(t){const e=t.prev,n=t,i=t.next;if(wt(e,n,i)>=0)return!1;const r=e.x,s=n.x,o=i.x,a=e.y,l=n.y,c=i.y,u=Math.min(r,s,o),f=Math.min(a,l,c),h=Math.max(r,s,o),p=Math.max(a,l,c);let v=i.next;for(;v!==e;){if(v.x>=u&&v.x<=h&&v.y>=f&&v.y<=p&&Ha(r,a,s,l,o,c,v.x,v.y)&&wt(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function DP(t,e,n,i){const r=t.prev,s=t,o=t.next;if(wt(r,s,o)>=0)return!1;const a=r.x,l=s.x,c=o.x,u=r.y,f=s.y,h=o.y,p=Math.min(a,l,c),v=Math.min(u,f,h),y=Math.max(a,l,c),m=Math.max(u,f,h),d=Mp(p,v,e,n,i),_=Mp(y,m,e,n,i);let g=t.prevZ,x=t.nextZ;for(;g&&g.z>=d&&x&&x.z<=_;){if(g.x>=p&&g.x<=y&&g.y>=v&&g.y<=m&&g!==r&&g!==o&&Ha(a,u,l,f,c,h,g.x,g.y)&&wt(g.prev,g,g.next)>=0||(g=g.prevZ,x.x>=p&&x.x<=y&&x.y>=v&&x.y<=m&&x!==r&&x!==o&&Ha(a,u,l,f,c,h,x.x,x.y)&&wt(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;g&&g.z>=d;){if(g.x>=p&&g.x<=y&&g.y>=v&&g.y<=m&&g!==r&&g!==o&&Ha(a,u,l,f,c,h,g.x,g.y)&&wt(g.prev,g,g.next)>=0)return!1;g=g.prevZ}for(;x&&x.z<=_;){if(x.x>=p&&x.x<=y&&x.y>=v&&x.y<=m&&x!==r&&x!==o&&Ha(a,u,l,f,c,h,x.x,x.y)&&wt(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function IP(t,e){let n=t;do{const i=n.prev,r=n.next.next;!na(i,r)&&Pw(i,n,n.next,r)&&Cl(i,r)&&Cl(r,i)&&(e.push(i.i,n.i,r.i),Rl(n),Rl(n.next),n=t=r),n=n.next}while(n!==t);return Fs(n)}function UP(t,e,n,i,r,s){let o=t;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&WP(o,a)){let l=Lw(o,a);o=Fs(o,o.next),l=Fs(l,l.next),Al(o,e,n,i,r,s,0),Al(l,e,n,i,r,s,0);return}a=a.next}o=o.next}while(o!==t)}function OP(t,e,n,i){const r=[];for(let s=0,o=e.length;s<o;s++){const a=e[s]*i,l=s<o-1?e[s+1]*i:t.length,c=Cw(t,a,l,i,!1);c===c.next&&(c.steiner=!0),r.push(GP(c))}r.sort(FP);for(let s=0;s<r.length;s++)n=kP(r[s],n);return n}function FP(t,e){let n=t.x-e.x;if(n===0&&(n=t.y-e.y,n===0)){const i=(t.next.y-t.y)/(t.next.x-t.x),r=(e.next.y-e.y)/(e.next.x-e.x);n=i-r}return n}function kP(t,e){const n=zP(t,e);if(!n)return e;const i=Lw(n,t);return Fs(i,i.next),Fs(n,n.next)}function zP(t,e){let n=e;const i=t.x,r=t.y;let s=-1/0,o;if(na(t,n))return n;do{if(na(t,n.next))return n.next;if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){const f=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(f<=i&&f>s&&(s=f,o=n.x<n.next.x?n:n.next,f===i))return o}n=n.next}while(n!==e);if(!o)return null;const a=o,l=o.x,c=o.y;let u=1/0;n=o;do{if(i>=n.x&&n.x>=l&&i!==n.x&&Rw(r<c?i:s,r,l,c,r<c?s:i,r,n.x,n.y)){const f=Math.abs(r-n.y)/(i-n.x);Cl(n,t)&&(f<u||f===u&&(n.x>o.x||n.x===o.x&&BP(o,n)))&&(o=n,u=f)}n=n.next}while(n!==a);return o}function BP(t,e){return wt(t.prev,t,e.prev)<0&&wt(e.next,t,t.next)<0}function HP(t,e,n,i){let r=t;do r.z===0&&(r.z=Mp(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,VP(r)}function VP(t){let e,n=1;do{let i=t,r;t=null;let s=null;for(e=0;i;){e++;let o=i,a=0;for(let c=0;c<n&&(a++,o=o.nextZ,!!o);c++);let l=n;for(;a>0||l>0&&o;)a!==0&&(l===0||!o||i.z<=o.z)?(r=i,i=i.nextZ,a--):(r=o,o=o.nextZ,l--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;i=o}s.nextZ=null,n*=2}while(e>1);return t}function Mp(t,e,n,i,r){return t=(t-n)*r|0,e=(e-i)*r|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function GP(t){let e=t,n=t;do(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next;while(e!==t);return n}function Rw(t,e,n,i,r,s,o,a){return(r-o)*(e-a)>=(t-o)*(s-a)&&(t-o)*(i-a)>=(n-o)*(e-a)&&(n-o)*(s-a)>=(r-o)*(i-a)}function Ha(t,e,n,i,r,s,o,a){return!(t===o&&e===a)&&Rw(t,e,n,i,r,s,o,a)}function WP(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!XP(t,e)&&(Cl(t,e)&&Cl(e,t)&&jP(t,e)&&(wt(t.prev,t,e.prev)||wt(t,e.prev,e))||na(t,e)&&wt(t.prev,t,t.next)>0&&wt(e.prev,e,e.next)>0)}function wt(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function na(t,e){return t.x===e.x&&t.y===e.y}function Pw(t,e,n,i){const r=Dc(wt(t,e,n)),s=Dc(wt(t,e,i)),o=Dc(wt(n,i,t)),a=Dc(wt(n,i,e));return!!(r!==s&&o!==a||r===0&&Nc(t,n,e)||s===0&&Nc(t,i,e)||o===0&&Nc(n,t,i)||a===0&&Nc(n,e,i))}function Nc(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function Dc(t){return t>0?1:t<0?-1:0}function XP(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&Pw(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function Cl(t,e){return wt(t.prev,t,t.next)<0?wt(t,e,t.next)>=0&&wt(t,t.prev,e)>=0:wt(t,e,t.prev)<0||wt(t,t.next,e)<0}function jP(t,e){let n=t,i=!1;const r=(t.x+e.x)/2,s=(t.y+e.y)/2;do n.y>s!=n.next.y>s&&n.next.y!==n.y&&r<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next;while(n!==t);return i}function Lw(t,e){const n=Tp(t.i,t.x,t.y),i=Tp(e.i,e.x,e.y),r=t.next,s=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,s.next=i,i.prev=s,i}function v0(t,e,n,i){const r=Tp(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Rl(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Tp(t,e,n){return{i:t,x:e,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function YP(t,e,n,i){let r=0;for(let s=e,o=n-i;s<n;s+=i)r+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return r}class qP{static triangulate(e,n,i=2){return LP(e,n,i)}}class Nr{static area(e){const n=e.length;let i=0;for(let r=n-1,s=0;s<n;r=s++)i+=e[r].x*e[s].y-e[s].x*e[r].y;return i*.5}static isClockWise(e){return Nr.area(e)<0}
vendor: 11,780 bytes, line 121
121static triangulateShape(e,n){const i=[],r=[],s=[];y0(e),x0(i,e);let o=e.length;n.forEach(y0);for(let l=0;l<n.length;l++)r.push(o),o+=n[l].length,x0(i,n[l]);const a=qP.triangulate(i,r);for(let l=0;l<a.length;l+=3)s.push(a.slice(l,l+3));return s}}function y0(t){const e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function x0(t,e){for(let n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}class Jm extends lr{constructor(e=new tl([new xe(.5,.5),new xe(-.5,.5),new xe(-.5,-.5),new xe(.5,-.5)]),n={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:n},e=Array.isArray(e)?e:[e];const i=this,r=[],s=[];for(let a=0,l=e.length;a<l;a++){const c=e[a];o(c)}this.setAttribute("position",new jn(r,3)),this.setAttribute("uv",new jn(s,2)),this.computeVertexNormals();function o(a){const l=[],c=n.curveSegments!==void 0?n.curveSegments:12,u=n.steps!==void 0?n.steps:1,f=n.depth!==void 0?n.depth:1;let h=n.bevelEnabled!==void 0?n.bevelEnabled:!0,p=n.bevelThickness!==void 0?n.bevelThickness:.2,v=n.bevelSize!==void 0?n.bevelSize:p-.1,y=n.bevelOffset!==void 0?n.bevelOffset:0,m=n.bevelSegments!==void 0?n.bevelSegments:3;const d=n.extrudePath,_=n.UVGenerator!==void 0?n.UVGenerator:$P;let g,x=!1,b,A,M,R;d&&(g=d.getSpacedPoints(u),x=!0,h=!1,b=d.computeFrenetFrames(u,!1),A=new Z,M=new Z,R=new Z),h||(m=0,p=0,v=0,y=0);const T=a.extractPoints(c);let S=T.shape;const U=T.holes;if(!Nr.isClockWise(S)){S=S.reverse();for(let w=0,J=U.length;w<J;w++){const ee=U[w];Nr.isClockWise(ee)&&(U[w]=ee.reverse())}}function V(w){const ee=10000000000000001e-36;let re=w[0];for(let F=1;F<=w.length;F++){const I=F%w.length,ie=w[I],P=ie.x-re.x,E=ie.y-re.y,X=P*P+E*E,oe=Math.max(Math.abs(ie.x),Math.abs(ie.y),Math.abs(re.x),Math.abs(re.y)),he=ee*oe*oe;if(X<=he){w.splice(I,1),F--;continue}re=ie}}V(S),U.forEach(V);const H=U.length,Q=S;for(let w=0;w<H;w++){const J=U[w];S=S.concat(J)}function j(w,J,ee){return J||console.error("THREE.ExtrudeGeometry: vec does not exist"),w.clone().addScaledVector(J,ee)}const W=S.length;function N(w,J,ee){let re,F,I;const ie=w.x-J.x,P=w.y-J.y,E=ee.x-w.x,X=ee.y-w.y,oe=ie*ie+P*P,he=ie*X-P*E;if(Math.abs(he)>Number.EPSILON){const ce=Math.sqrt(oe),Ie=Math.sqrt(E*E+X*X),Me=J.x-P/ce,Fe=J.y+ie/ce,ze=ee.x-X/Ie,Se=ee.y+E/Ie,Le=((ze-Me)*X-(Se-Fe)*E)/(ie*X-P*E);re=Me+ie*Le-w.x,F=Fe+P*Le-w.y;const Be=re*re+F*F;if(Be<=2)return new xe(re,F);I=Math.sqrt(Be/2)}else{let ce=!1;ie>Number.EPSILON?E>Number.EPSILON&&(ce=!0):ie<-Number.EPSILON?E<-Number.EPSILON&&(ce=!0):Math.sign(P)===Math.sign(X)&&(ce=!0),ce?(re=-P,F=ie,I=Math.sqrt(oe)):(re=ie,F=P,I=Math.sqrt(oe/2))}return new xe(re/I,F/I)}const K=[];for(let w=0,J=Q.length,ee=J-1,re=w+1;w<J;w++,ee++,re++)ee===J&&(ee=0),re===J&&(re=0),K[w]=N(Q[w],Q[ee],Q[re]);const se=[];let me,Ae=K.concat();for(let w=0,J=H;w<J;w++){const ee=U[w];me=[];for(let re=0,F=ee.length,I=F-1,ie=re+1;re<F;re++,I++,ie++)I===F&&(I=0),ie===F&&(ie=0),me[re]=N(ee[re],ee[I],ee[ie]);se.push(me),Ae=Ae.concat(me)}let He;if(m===0)He=Nr.triangulateShape(Q,U);else{const w=[],J=[];for(let ee=0;ee<m;ee++){const re=ee/m,F=p*Math.cos(re*Math.PI/2),I=v*Math.sin(re*Math.PI/2)+y;for(let ie=0,P=Q.length;ie<P;ie++){const E=j(Q[ie],K[ie],I);de(E.x,E.y,-F),re===0&&w.push(E)}for(let ie=0,P=H;ie<P;ie++){const E=U[ie];me=se[ie];const X=[];for(let oe=0,he=E.length;oe<he;oe++){const ce=j(E[oe],me[oe],I);de(ce.x,ce.y,-F),re===0&&X.push(ce)}re===0&&J.push(X)}}He=Nr.triangulateShape(w,J)}const k=He.length,O=v+y;for(let w=0;w<W;w++){const J=h?j(S[w],Ae[w],O):S[w];x?(M.copy(b.normals[0]).multiplyScalar(J.x),A.copy(b.binormals[0]).multiplyScalar(J.y),R.copy(g[0]).add(M).add(A),de(R.x,R.y,R.z)):de(J.x,J.y,0)}for(let w=1;w<=u;w++)for(let J=0;J<W;J++){const ee=h?j(S[J],Ae[J],O):S[J];x?(M.copy(b.normals[w]).multiplyScalar(ee.x),A.copy(b.binormals[w]).multiplyScalar(ee.y),R.copy(g[w]).add(M).add(A),de(R.x,R.y,R.z)):de(ee.x,ee.y,f/u*w)}for(let w=m-1;w>=0;w--){const J=w/m,ee=p*Math.cos(J*Math.PI/2),re=v*Math.sin(J*Math.PI/2)+y;for(let F=0,I=Q.length;F<I;F++){const ie=j(Q[F],K[F],re);de(ie.x,ie.y,f+ee)}for(let F=0,I=U.length;F<I;F++){const ie=U[F];me=se[F];for(let P=0,E=ie.length;P<E;P++){const X=j(ie[P],me[P],re);x?de(X.x,X.y+g[u-1].y,g[u-1].x+ee):de(X.x,X.y,f+ee)}}}D(),C();function D(){const w=r.length/3;if(h){let J=0,ee=W*J;for(let re=0;re<k;re++){const F=He[re];Y(F[2]+ee,F[1]+ee,F[0]+ee)}J=u+m*2,ee=W*J;for(let re=0;re<k;re++){const F=He[re];Y(F[0]+ee,F[1]+ee,F[2]+ee)}}else{for(let J=0;J<k;J++){const ee=He[J];Y(ee[2],ee[1],ee[0])}for(let J=0;J<k;J++){const ee=He[J];Y(ee[0]+W*u,ee[1]+W*u,ee[2]+W*u)}}i.addGroup(w,r.length/3-w,0)}function C(){const w=r.length/3;let J=0;ne(Q,J),J+=Q.length;for(let ee=0,re=U.length;ee<re;ee++){const F=U[ee];ne(F,J),J+=F.length}i.addGroup(w,r.length/3-w,1)}function ne(w,J){let ee=w.length;for(;--ee>=0;){const re=ee;let F=ee-1;F<0&&(F=w.length-1);for(let I=0,ie=u+m*2;I<ie;I++){const P=W*I,E=W*(I+1),X=J+re+P,oe=J+F+P,he=J+F+E,ce=J+re+E;_e(X,oe,he,ce)}}}function de(w,J,ee){l.push(w),l.push(J),l.push(ee)}function Y(w,J,ee){ye(w),ye(J),ye(ee);const re=r.length/3,F=_.generateTopUV(i,r,re-3,re-2,re-1);pe(F[0]),pe(F[1]),pe(F[2])}function _e(w,J,ee,re){ye(w),ye(J),ye(re),ye(J),ye(ee),ye(re);const F=r.length/3,I=_.generateSideWallUV(i,r,F-6,F-3,F-2,F-1);pe(I[0]),pe(I[1]),pe(I[3]),pe(I[1]),pe(I[2]),pe(I[3])}function ye(w){r.push(l[w*3+0]),r.push(l[w*3+1]),r.push(l[w*3+2])}function pe(w){s.push(w.x),s.push(w.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),n=this.parameters.shapes,i=this.parameters.options;return ZP(n,i,e)}static fromJSON(e,n){const i=[];for(let s=0,o=e.shapes.length;s<o;s++){const a=n[e.shapes[s]];i.push(a)}const r=e.options.extrudePath;return r!==void 0&&(e.options.extrudePath=new Ep[r.type]().fromJSON(r)),new Jm(i,e.options)}}const $P={generateTopUV:function(t,e,n,i,r){const s=e[n*3],o=e[n*3+1],a=e[i*3],l=e[i*3+1],c=e[r*3],u=e[r*3+1];return[new xe(s,o),new xe(a,l),new xe(c,u)]},generateSideWallUV:function(t,e,n,i,r,s){const o=e[n*3],a=e[n*3+1],l=e[n*3+2],c=e[i*3],u=e[i*3+1],f=e[i*3+2],h=e[r*3],p=e[r*3+1],v=e[r*3+2],y=e[s*3],m=e[s*3+1],d=e[s*3+2];return Math.abs(a-u)<Math.abs(o-c)?[new xe(o,1-l),new xe(c,1-f),new xe(h,1-v),new xe(y,1-d)]:[new xe(a,1-l),new xe(u,1-f),new xe(p,1-v),new xe(m,1-d)]}};function ZP(t,e,n){if(n.shapes=[],Array.isArray(t))for(let i=0,r=t.length;i<r;i++){const s=t[i];n.shapes.push(s.uuid)}else n.shapes.push(t.uuid);return n.options=Object.assign({},e),e.extrudePath!==void 0&&(n.options.extrudePath=e.extrudePath.toJSON()),n}class pf extends lr{constructor(e=1,n=1,i=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:n,widthSegments:i,heightSegments:r};const s=e/2,o=n/2,a=Math.floor(i),l=Math.floor(r),c=a+1,u=l+1,f=e/a,h=n/l,p=[],v=[],y=[],m=[];for(let d=0;d<u;d++){const _=d*h-o;for(let g=0;g<c;g++){const x=g*f-s;v.push(x,-_,0),y.push(0,0,1),m.push(g/a),m.push(1-d/l)}}for(let d=0;d<l;d++)for(let _=0;_<a;_++){const g=_+c*d,x=_+c*(d+1),b=_+1+c*(d+1),A=_+1+c*d;p.push(g,x,A),p.push(x,b,A)}this.setIndex(p),this.setAttribute("position",new jn(v,3)),this.setAttribute("normal",new jn(y,3)),this.setAttribute("uv",new jn(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new pf(e.width,e.height,e.widthSegments,e.heightSegments)}}class KP extends Hl{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new at(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 at(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=fw,this.normalScale=new xe(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 Di,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 QP extends Hl{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=RR,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 JP extends Hl{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const _0={enabled:!1,files:{},add:function(t,e){this.enabled!==!1&&(this.files[t]=e)},get:function(t){if(this.enabled!==!1)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};class e2{constructor(e,n,i){const r=this;let s=!1,o=0,a=0,l;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=n,this.onError=i,this.itemStart=function(u){a++,s===!1&&r.onStart!==void 0&&r.onStart(u,o,a),s=!0},this.itemEnd=function(u){o++,r.onProgress!==void 0&&r.onProgress(u,o,a),o===a&&(s=!1,r.onLoad!==void 0&&r.onLoad())},this.itemError=function(u){r.onError!==void 0&&r.onError(u)},this.resolveURL=function(u){return l?l(u):u},this.setURLModifier=function(u){return l=u,this},this.addHandler=function(u,f){return c.push(u,f),this},this.removeHandler=function(u){const f=c.indexOf(u);return f!==-1&&c.splice(f,2),this},this.getHandler=function(u){for(let f=0,h=c.length;f<h;f+=2){const p=c[f],v=c[f+1];if(p.global&&(p.lastIndex=0),p.test(u))return v}return null}}}const t2=new e2;class eg{constructor(e){this.manager=e!==void 0?e:t2,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,n){const i=this;return new Promise(function(r,s){i.load(e,r,n,s)})}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}}eg.DEFAULT_MATERIAL_NAME="__DEFAULT";const Gi={};
vendor: 4,172 bytes, line 121
121class n2 extends Error{constructor(e,n){super(e),this.response=n}}class i2 extends eg{constructor(e){super(e),this.mimeType="",this.responseType=""}load(e,n,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=_0.get(e);if(s!==void 0)return this.manager.itemStart(e),setTimeout(()=>{n&&n(s),this.manager.itemEnd(e)},0),s;if(Gi[e]!==void 0){Gi[e].push({onLoad:n,onProgress:i,onError:r});return}Gi[e]=[],Gi[e].push({onLoad:n,onProgress:i,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=Gi[e],f=c.body.getReader(),h=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),p=h?parseInt(h):0,v=p!==0;let y=0;const m=new ReadableStream({start(d){_();function _(){f.read().then(({done:g,value:x})=>{if(g)d.close();else{y+=x.byteLength;const b=new ProgressEvent("progress",{lengthComputable:v,loaded:y,total:p});for(let A=0,M=u.length;A<M;A++){const R=u[A];R.onProgress&&R.onProgress(b)}d.enqueue(x),_()}},g=>{d.error(g)})}}});return new Response(m)}else throw new n2(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a==="")return c.text();{const f=/charset="?([^;"\s]*)"?/i.exec(a),h=f&&f[1]?f[1].toLowerCase():void 0,p=new TextDecoder(h);return c.arrayBuffer().then(v=>p.decode(v))}}}).then(c=>{_0.add(e,c);const u=Gi[e];delete Gi[e];for(let f=0,h=u.length;f<h;f++){const p=u[f];p.onLoad&&p.onLoad(c)}}).catch(c=>{const u=Gi[e];if(u===void 0)throw this.manager.itemError(e),c;delete Gi[e];for(let f=0,h=u.length;f<h;f++){const p=u[f];p.onError&&p.onError(c)}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}}class Nw extends nn{constructor(e,n=1){super(),this.isLight=!0,this.type="Light",this.color=new at(e),this.intensity=n}dispose(){}copy(e,n){return super.copy(e,n),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const n=super.toJSON(e);return n.object.color=this.color.getHex(),n.object.intensity=this.intensity,this.groundColor!==void 0&&(n.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(n.object.distance=this.distance),this.angle!==void 0&&(n.object.angle=this.angle),this.decay!==void 0&&(n.object.decay=this.decay),this.penumbra!==void 0&&(n.object.penumbra=this.penumbra),this.shadow!==void 0&&(n.object.shadow=this.shadow.toJSON()),this.target!==void 0&&(n.object.target=this.target.uuid),n}}const bd=new Mt,S0=new Z,w0=new Z;class r2{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.mapType=Ni,this.map=null,this.mapPass=null,this.matrix=new Mt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Zm,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new Rt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const n=this.camera,i=this.matrix;S0.setFromMatrixPosition(e.matrixWorld),n.position.copy(S0),w0.setFromMatrixPosition(e.target.matrixWorld),n.lookAt(w0),n.updateMatrixWorld(),bd.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(bd),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(bd)}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.n
vendor: 5,488 bytes, line 121
121ormalBias,this.blurSamples=e.blurSamples,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.intensity!==1&&(e.intensity=this.intensity),this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class Dw extends Sw{constructor(e=-1,n=1,i=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=i,this.bottom=r,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,n,i,r,s,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=i-e,o=i+e,a=r+n,l=r-n;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}class s2 extends r2{constructor(){super(new Dw(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class Ad extends Nw{constructor(e,n){super(e,n),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(nn.DEFAULT_UP),this.updateMatrix(),this.target=new nn,this.shadow=new s2}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class o2 extends Nw{constructor(e,n){super(e,n),this.isAmbientLight=!0,this.type="AmbientLight"}}class a2 extends Gn{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}const E0=new xe;class l2{constructor(e=new xe(1/0,1/0),n=new xe(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromPoints(e){this.makeEmpty();for(let n=0,i=e.length;n<i;n++)this.expandByPoint(e[n]);return this}setFromCenterAndSize(e,n){const i=E0.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),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,n){return n.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,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,E0).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)}}class ls{constructor(){this.type="ShapePath",this.color=new at,this.subPaths=[],this.currentPath=null}moveTo(e,n){return this.currentPath=new Po,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,n),this}lineTo(e,n){return this.currentPath.lineTo(e,n),this}quadraticCurveTo(e,n,i,r){return this.currentPath.quadraticCurveTo(e,n,i,r),this}bezierCurveTo(e,n,i,r,s,o){return this.currentPath.bezierCurveTo(e,n,i,r,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function n(d){const _=[];for(let g=0,x=d.length;g<x;g++){const b=d[g],A=new tl;A.curves=b.curves,_.push(A)}return _}function i(d,_){const g=_.length;let x=!1;for(let b=g-1,A=0;A<g;b=A++){let M=_[b],R=_[A],T=R.x-M.x,S=R.y-M.y;if(Math.abs(S)>Number.EPSILON){if(S<0&&(M=_[A],T=-T,R=_[b],S=-S),d.y<M.y||d.y>R.y)continue;
vendor: 4,984 bytes, lines 121-125
121if(d.y===M.y){if(d.x===M.x)return!0}else{const U=S*(d.x-M.x)-T*(d.y-M.y);if(U===0)return!0;if(U<0)continue;x=!x}}else{if(d.y!==M.y)continue;if(R.x<=d.x&&d.x<=M.x||M.x<=d.x&&d.x<=R.x)return!0}}return x}const r=Nr.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const c=[];if(s.length===1)return a=s[0],l=new tl,l.curves=a.curves,c.push(l),c;let u=!r(s[0].getPoints());u=e?!u:u;const f=[],h=[];let p=[],v=0,y;h[v]=void 0,p[v]=[];for(let d=0,_=s.length;d<_;d++)a=s[d],y=a.getPoints(),o=r(y),o=e?!o:o,o?(!u&&h[v]&&v++,h[v]={s:new tl,p:y},h[v].s.curves=a.curves,u&&v++,p[v]=[]):p[v].push({h:a,p:y[0]});if(!h[0])return n(s);if(h.length>1){let d=!1,_=0;for(let g=0,x=h.length;g<x;g++)f[g]=[];for(let g=0,x=h.length;g<x;g++){const b=p[g];for(let A=0;A<b.length;A++){const M=b[A];let R=!0;for(let T=0;T<h.length;T++)i(M.p,h[T].p)&&(g!==T&&_++,R?(R=!1,f[T].push(M)):d=!0);R&&f[g].push(M)}}_>0&&d===!1&&(p=f)}let m;for(let d=0,_=h.length;d<_;d++){l=h[d].s,c.push(l),m=p[d];for(let g=0,x=m.length;g<x;g++)l.holes.push(m[g].h)}return c}}function M0(t,e,n,i){const r=c2(i);switch(n){case ow:return t*e;case lw:return t*e/r.components*r.byteLength;case Xm:return t*e/r.components*r.byteLength;case cw:return t*e*2/r.components*r.byteLength;case jm:return t*e*2/r.components*r.byteLength;case aw:return t*e*3/r.components*r.byteLength;case oi:return t*e*4/r.components*r.byteLength;case Ym:return t*e*4/r.components*r.byteLength;case Qc:case Jc:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case eu:case tu:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case Kh:case Jh:return Math.max(t,16)*Math.max(e,8)/4;case Zh:case Qh:return Math.max(t,8)*Math.max(e,8)/2;case ep:case tp:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case np:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case ip:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case rp:return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16;case sp:return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16;case op:return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16;case ap:return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16;case lp:return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16;case cp:return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16;case up:return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16;case fp:return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16;case dp:return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16;case hp:return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16;case pp:return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16;case mp:return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16;case gp:return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16;case nu:case vp:case yp:return Math.ceil(t/4)*Math.ceil(e/4)*16;case uw:case xp:return Math.ceil(t/4)*Math.ceil(e/4)*8;case _p:case Sp:return Math.ceil(t/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${n} format.`)}function c2(t){switch(t){case Ni:case iw:return{byteLength:1,components:1};case El:case rw:case zl:return{byteLength:2,components:1};case Gm:case Wm:return{byteLength:2,components:4};case Us:case Vm:case Ki:return{byteLength:4,components:1};case sw:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${t}.`)}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Hm}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Hm);/** 122 * @license 123 * Copyright 2010-2025 Three.js Authors 124 * SPDX-License-Identifier: MIT 125 */function Iw(){let t=null,e=!1,n=null,i=null;function r(s,o){n(s,o),i=t.requestAnimationFrame(r)}return{start:function(){e!==!0&&n!==null&&(i=t.requestAnimationFrame(r),e=!0)},stop:function(){t.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(s){n=s},setContext:function(s){t=s}}}function u2(t){const e=new WeakMap;function n(a,l){const c=a.array,u=a.usage,f=c.byteLength,h=t.createBuffer();t.bindBuffer(l,h),t.bufferData(l,c,u),a.onUploadCallback();let p;if(c instanceof Float32Array)p=t.FLOAT;else if(c instanceof Uint16Array)a.isFloat16BufferAttribute?p=t.HALF_FLOAT:p=t.UNSIGNED_SHORT;else if(c instanceof Int16Array)p=t.SHORT;else if(c instanceof Uint32Array)p=t.UNSIGNED_INT;else if(c instanceof Int32Array)p=t.INT;else if(c instanceof Int8Array)p=t.BYTE;else if(c instanceof Uint8Array)p=t.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)p=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);return{buffer:h,type:p,bytesPerElement:c.BYTES_PER_ELEMENT,version:a.version,size:f}}function i(a,l,c){const u=l.array,f=l.updateRanges;if(t.bindBuffer(c,a),f.length===0)t.bufferSubData(c,0,u);else{f.sort((p,v)=>p.start-v.start);let h=0;for(let p=1;p<f.length;p++){const v=f[h],y=f[p];y.start<=v.start+v.count+1?v.count=Math.max(v.count,y.start+y.count-v.start):(++h,f[h]=y)}f.length=h+1;for(let p=0,v=f.length;p<v;p++){const y=f[p];t.bufferSubData(c,y.start*u.BYTES_PER_ELEMENT,u,y.start,y.count)}
vendor: 4,949 bytes, lines 125-238
125l.clearUpdateRanges()}l.onUploadCallback()}function r(a){return a.isInterleavedBufferAttribute&&(a=a.data),e.get(a)}function s(a){a.isInterleavedBufferAttribute&&(a=a.data);const l=e.get(a);l&&(t.deleteBuffer(l.buffer),e.delete(a))}function o(a,l){if(a.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const u=e.get(a);(!u||u.version<a.version)&&e.set(a,{buffer:a.buffer,type:a.type,bytesPerElement:a.elementSize,version:a.version});return}const c=e.get(a);if(c===void 0)e.set(a,n(a,l));else if(c.version<a.version){if(c.size!==a.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.");i(c.buffer,a,l),c.version=a.version}}return{get:r,remove:s,update:o}}var f2=`#ifdef USE_ALPHAHASH 126 if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard; 127#endif`,d2=`#ifdef USE_ALPHAHASH 128 const float ALPHA_HASH_SCALE = 0.05; 129 float hash2D( vec2 value ) { 130 return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) ); 131 } 132 float hash3D( vec3 value ) { 133 return hash2D( vec2( hash2D( value.xy ), value.z ) ); 134 } 135 float getAlphaHashThreshold( vec3 position ) { 136 float maxDeriv = max( 137 length( dFdx( position.xyz ) ), 138 length( dFdy( position.xyz ) ) 139 ); 140 float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv ); 141 vec2 pixScales = vec2( 142 exp2( floor( log2( pixScale ) ) ), 143 exp2( ceil( log2( pixScale ) ) ) 144 ); 145 vec2 alpha = vec2( 146 hash3D( floor( pixScales.x * position.xyz ) ), 147 hash3D( floor( pixScales.y * position.xyz ) ) 148 ); 149 float lerpFactor = fract( log2( pixScale ) ); 150 float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y; 151 float a = min( lerpFactor, 1.0 - lerpFactor ); 152 vec3 cases = vec3( 153 x * x / ( 2.0 * a * ( 1.0 - a ) ), 154 ( x - 0.5 * a ) / ( 1.0 - a ), 155 1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) ) 156 ); 157 float threshold = ( x < ( 1.0 - a ) ) 158 ? ( ( x < a ) ? cases.x : cases.y ) 159 : cases.z; 160 return clamp( threshold , 1.0e-6, 1.0 ); 161 } 162#endif`,h2=`#ifdef USE_ALPHAMAP 163 diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g; 164#endif`,p2=`#ifdef USE_ALPHAMAP 165 uniform sampler2D alphaMap; 166#endif`,m2=`#ifdef USE_ALPHATEST 167 #ifdef ALPHA_TO_COVERAGE 168 diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a ); 169 if ( diffuseColor.a == 0.0 ) discard; 170 #else 171 if ( diffuseColor.a < alphaTest ) discard; 172 #endif 173#endif`,g2=`#ifdef USE_ALPHATEST 174 uniform float alphaTest; 175#endif`,v2=`#ifdef USE_AOMAP 176 float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0; 177 reflectedLight.indirectDiffuse *= ambientOcclusion; 178 #if defined( USE_CLEARCOAT ) 179 clearcoatSpecularIndirect *= ambientOcclusion; 180 #endif 181 #if defined( USE_SHEEN ) 182 sheenSpecularIndirect *= ambientOcclusion; 183 #endif 184 #if defined( USE_ENVMAP ) && defined( STANDARD ) 185 float dotNV = saturate( dot( geometryNormal, geometryViewDir ) ); 186 reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness ); 187 #endif 188#endif`,y2=`#ifdef USE_AOMAP 189 uniform sampler2D aoMap; 190 uniform float aoMapIntensity; 191#endif`,x2=`#ifdef USE_BATCHING 192 #if ! defined( GL_ANGLE_multi_draw ) 193 #define gl_DrawID _gl_DrawID 194 uniform int _gl_DrawID; 195 #endif 196 uniform highp sampler2D batchingTexture; 197 uniform highp usampler2D batchingIdTexture; 198 mat4 getBatchingMatrix( const in float i ) { 199 int size = textureSize( batchingTexture, 0 ).x; 200 int j = int( i ) * 4; 201 int x = j % size; 202 int y = j / size; 203 vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 ); 204 vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 ); 205 vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 ); 206 vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 ); 207 return mat4( v1, v2, v3, v4 ); 208 } 209 float getIndirectIndex( const in int i ) { 210 int size = textureSize( batchingIdTexture, 0 ).x; 211 int x = i % size; 212 int y = i / size; 213 return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r ); 214 } 215#endif 216#ifdef USE_BATCHING_COLOR 217 uniform sampler2D batchingColorTexture; 218 vec3 getBatchingColor( const in float i ) { 219 int size = textureSize( batchingColorTexture, 0 ).x; 220 int j = int( i ); 221 int x = j % size; 222 int y = j / size; 223 return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb; 224 } 225#endif`,_2=`#ifdef USE_BATCHING 226 mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) ); 227#endif`,S2=`vec3 transformed = vec3( position ); 228#ifdef USE_ALPHAHASH 229 vPosition = vec3( position ); 230#endif`,w2=`vec3 objectNormal = vec3( normal ); 231#ifdef USE_TANGENT 232 vec3 objectTangent = vec3( tangent.xyz ); 233#endif`,E2=`float G_BlinnPhong_Implicit( ) { 234 return 0.25; 235} 236float D_BlinnPhong( const in float shininess, const in float dotNH ) { 237 return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); 238}
239vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) { 240 vec3 halfDir = normalize( lightDir + viewDir ); 241 float dotNH = saturate( dot( normal, halfDir ) ); 242 float dotVH = saturate( dot( viewDir, halfDir ) ); 243 vec3 F = F_Schlick( specularColor, 1.0, dotVH ); 244 float G = G_BlinnPhong_Implicit( ); 245 float D = D_BlinnPhong( shininess, dotNH ); 246 return F * ( G * D ); 247} // validated`,M2=`#ifdef USE_IRIDESCENCE 248 const mat3 XYZ_TO_REC709 = mat3( 249 3.2404542, -0.9692660, 0.0556434, 250 -1.5371385, 1.8760108, -0.2040259, 251 -0.4985314, 0.0415560, 1.0572252 252 ); 253 vec3 Fresnel0ToIor( vec3 fresnel0 ) { 254 vec3 sqrtF0 = sqrt( fresnel0 ); 255 return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 ); 256 } 257 vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) { 258 return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) ); 259 } 260 float IorToFresnel0( float transmittedIor, float incidentIor ) { 261 return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor )); 262 } 263 vec3 evalSensitivity( float OPD, vec3 shift ) { 264 float phase = 2.0 * PI * OPD * 1.0e-9; 265 vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 ); 266 vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 ); 267 vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 ); 268 vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var ); 269 xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) ); 270 xyz /= 1.0685e-7; 271 vec3 rgb = XYZ_TO_REC709 * xyz; 272 return rgb; 273 } 274 vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) { 275 vec3 I; 276 float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) ); 277 float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) ); 278 float cosTheta2Sq = 1.0 - sinTheta2Sq; 279 if ( cosTheta2Sq < 0.0 ) { 280 return vec3( 1.0 ); 281 } 282 float cosTheta2 = sqrt( cosTheta2Sq ); 283 float R0 = IorToFresnel0( iridescenceIOR, outsideIOR ); 284 float R12 = F_Schlick( R0, 1.0, cosTheta1 );
285 float T121 = 1.0 - R12; 286 float phi12 = 0.0; 287 if ( iridescenceIOR < outsideIOR ) phi12 = PI; 288 float phi21 = PI - phi12; 289 vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR ); 290 vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 ); 291 vec3 phi23 = vec3( 0.0 ); 292 if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI; 293 if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI; 294 if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI; 295 float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2; 296 vec3 phi = vec3( phi21 ) + phi23; 297 vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 ); 298 vec3 r123 = sqrt( R123 ); 299 vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 ); 300 vec3 C0 = R12 + Rs; 301 I = C0; 302 vec3 Cm = Rs - T121; 303 for ( int m = 1; m <= 2; ++ m ) { 304 Cm *= r123; 305 vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi ); 306 I += Cm * Sm; 307 } 308 return max( I, vec3( 0.0 ) ); 309 } 310#endif`,T2=`#ifdef USE_BUMPMAP 311 uniform sampler2D bumpMap; 312 uniform float bumpScale; 313 vec2 dHdxy_fwd() { 314 vec2 dSTdx = dFdx( vBumpMapUv ); 315 vec2 dSTdy = dFdy( vBumpMapUv ); 316 float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x; 317 float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll; 318 float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll; 319 return vec2( dBx, dBy ); 320 } 321 vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { 322 vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) ); 323 vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) ); 324 vec3 vN = surf_norm; 325 vec3 R1 = cross( vSigmaY, vN ); 326 vec3 R2 = cross( vN, vSigmaX ); 327 float fDet = dot( vSigmaX, R1 ) * faceDirection; 328 vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); 329 return normalize( abs( fDet ) * surf_norm - vGrad ); 330 } 331#endif`,b2=`#if NUM_CLIPPING_PLANES > 0 332 vec4 plane; 333 #ifdef ALPHA_TO_COVERAGE 334 float distanceToPlane, distanceGradient; 335 float clipOpacity = 1.0; 336 #pragma unroll_loop_start 337 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 338 plane = clippingPlanes[ i ]; 339 distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; 340 distanceGradient = fwidth( distanceToPlane ) / 2.0; 341 clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); 342 if ( clipOpacity == 0.0 ) discard; 343 } 344 #pragma unroll_loop_end 345 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 346 float unionClipOpacity = 1.0; 347 #pragma unroll_loop_start 348 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 349 plane = clippingPlanes[ i ]; 350 distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; 351 distanceGradient = fwidth( distanceToPlane ) / 2.0; 352 unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); 353 } 354 #pragma unroll_loop_end 355 clipOpacity *= 1.0 - unionClipOpacity; 356 #endif 357 diffuseColor.a *= clipOpacity; 358 if ( diffuseColor.a == 0.0 ) discard; 359 #else 360 #pragma unroll_loop_start 361 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 362 plane = clippingPlanes[ i ]; 363 if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; 364 } 365 #pragma unroll_loop_end 366 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 367 bool clipped = true; 368 #pragma unroll_loop_start 369 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 370 plane = clippingPlanes[ i ]; 371 clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; 372 } 373 #pragma unroll_loop_end 374 if ( clipped ) discard; 375 #endif 376 #endif 377#endif`,A2=`#if NUM_CLIPPING_PLANES > 0 378 varying vec3 vClipPosition; 379 uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; 380#endif`,C2=`#if NUM_CLIPPING_PLANES > 0 381 varying vec3 vClipPosition; 382#endif`,R2=`#if NUM_CLIPPING_PLANES > 0 383 vClipPosition = - mvPosition.xyz; 384#endif`,P2=`#if defined( USE_COLOR_ALPHA ) 385 diffuseColor *= vColor; 386#elif defined( USE_COLOR ) 387 diffuseColor.rgb *= vColor; 388#endif`,L2=`#if defined( USE_COLOR_ALPHA ) 389 varying vec4 vColor; 390#elif defined( USE_COLOR ) 391 varying vec3 vColor; 392#endif`,N2=`#if defined( USE_COLOR_ALPHA ) 393 varying vec4 vColor; 394#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) 395 varying vec3 vColor; 396#endif`,D2=`#if defined( USE_COLOR_ALPHA ) 397 vColor = vec4( 1.0 ); 398#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) 399 vColor = vec3( 1.0 ); 400#endif 401#ifdef USE_COLOR 402 vColor *= color; 403#endif 404#ifdef USE_INSTANCING_COLOR 405 vColor.xyz *= instanceColor.xyz; 406#endif 407#ifdef USE_BATCHING_COLOR 408 vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) ); 409 vColor.xyz *= batchingColor.xyz; 410#endif`,I2=`#define PI 3.141592653589793 411#define PI2 6.283185307179586 412#define PI_HALF 1.5707963267948966 413#define RECIPROCAL_PI 0.3183098861837907 414#define RECIPROCAL_PI2 0.15915494309189535 415#define EPSILON 1e-6 416#ifndef saturate 417#define saturate( a ) clamp( a, 0.0, 1.0 ) 418#endif 419#define whiteComplement( a ) ( 1.0 - saturate( a ) ) 420float pow2( const in float x ) { return x*x; } 421vec3 pow2( const in vec3 x ) { return x*x; } 422float pow3( const in float x ) { return x*x*x; } 423float pow4( const in float x ) { float x2 = x*x; return x2*x2; } 424float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } 425float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } 426highp float rand( const in vec2 uv ) { 427 const highp float a = 12.9898, b = 78.233, c = 43758.5453; 428 highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); 429 return fract( sin( sn ) * c ); 430} 431#ifdef HIGH_PRECISION 432 float precisionSafeLength( vec3 v ) { return length( v ); } 433#else 434 float precisionSafeLength( vec3 v ) { 435 float maxComponent = max3( abs( v ) ); 436 return length( v / maxComponent ) * maxComponent; 437 } 438#endif 439struct IncidentLight { 440 vec3 color; 441 vec3 direction; 442 bool visible; 443}; 444struct ReflectedLight { 445 vec3 directDiffuse; 446 vec3 directSpecular; 447 vec3 indirectDiffuse; 448 vec3 indirectSpecular; 449}; 450#ifdef USE_ALPHAHASH 451 varying vec3 vPosition; 452#endif 453vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 454 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 455} 456vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { 457 return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); 458} 459mat3 transposeMat3( const in mat3 m ) { 460 mat3 tmp; 461 tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); 462 tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); 463 tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); 464 return tmp; 465} 466bool isPerspectiveMatrix( mat4 m ) { 467 return m[ 2 ][ 3 ] == - 1.0; 468} 469vec2 equirectUv( in vec3 dir ) { 470 float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; 471 float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; 472 return vec2( u, v ); 473}
474vec3 BRDF_Lambert( const in vec3 diffuseColor ) { 475 return RECIPROCAL_PI * diffuseColor; 476} 477vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { 478 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 479 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 480} 481float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { 482 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 483 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 484} // validated`,U2=`#ifdef ENVMAP_TYPE_CUBE_UV 485 #define cubeUV_minMipLevel 4.0 486 #define cubeUV_minTileSize 16.0 487 float getFace( vec3 direction ) { 488 vec3 absDirection = abs( direction ); 489 float face = - 1.0; 490 if ( absDirection.x > absDirection.z ) { 491 if ( absDirection.x > absDirection.y ) 492 face = direction.x > 0.0 ? 0.0 : 3.0; 493 else 494 face = direction.y > 0.0 ? 1.0 : 4.0; 495 } else { 496 if ( absDirection.z > absDirection.y ) 497 face = direction.z > 0.0 ? 2.0 : 5.0; 498 else 499 face = direction.y > 0.0 ? 1.0 : 4.0; 500 } 501 return face; 502 } 503 vec2 getUV( vec3 direction, float face ) { 504 vec2 uv; 505 if ( face == 0.0 ) { 506 uv = vec2( direction.z, direction.y ) / abs( direction.x ); 507 } else if ( face == 1.0 ) { 508 uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); 509 } else if ( face == 2.0 ) { 510 uv = vec2( - direction.x, direction.y ) / abs( direction.z ); 511 } else if ( face == 3.0 ) { 512 uv = vec2( - direction.z, direction.y ) / abs( direction.x ); 513 } else if ( face == 4.0 ) { 514 uv = vec2( - direction.x, direction.z ) / abs( direction.y ); 515 } else { 516 uv = vec2( direction.x, direction.y ) / abs( direction.z ); 517 } 518 return 0.5 * ( uv + 1.0 ); 519 } 520 vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { 521 float face = getFace( direction ); 522 float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); 523 mipInt = max( mipInt, cubeUV_minMipLevel ); 524 float faceSize = exp2( mipInt ); 525 highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; 526 if ( face > 2.0 ) { 527 uv.y += faceSize; 528 face -= 3.0; 529 } 530 uv.x += face * faceSize; 531 uv.x += filterInt * 3.0 * cubeUV_minTileSize; 532 uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); 533 uv.x *= CUBEUV_TEXEL_WIDTH; 534 uv.y *= CUBEUV_TEXEL_HEIGHT; 535 #ifdef texture2DGradEXT 536 return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; 537 #else 538 return texture2D( envMap, uv ).rgb; 539 #endif 540 } 541 #define cubeUV_r0 1.0 542 #define cubeUV_m0 - 2.0 543 #define cubeUV_r1 0.8 544 #define cubeUV_m1 - 1.0 545 #define cubeUV_r4 0.4 546 #define cubeUV_m4 2.0 547 #define cubeUV_r5 0.305 548 #define cubeUV_m5 3.0 549 #define cubeUV_r6 0.21 550 #define cubeUV_m6 4.0 551 float roughnessToMip( float roughness ) { 552 float mip = 0.0; 553 if ( roughness >= cubeUV_r1 ) { 554 mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; 555 } else if ( roughness >= cubeUV_r4 ) { 556 mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; 557 } else if ( roughness >= cubeUV_r5 ) { 558 mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; 559 } else if ( roughness >= cubeUV_r6 ) { 560 mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; 561 } else { 562 mip = - 2.0 * log2( 1.16 * roughness ); } 563 return mip; 564 } 565 vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { 566 float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); 567 float mipF = fract( mip ); 568 float mipInt = floor( mip ); 569 vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); 570 if ( mipF == 0.0 ) { 571 return vec4( color0, 1.0 ); 572 } else { 573 vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); 574 return vec4( mix( color0, color1, mipF ), 1.0 ); 575 } 576 } 577#endif`,O2=`vec3 transformedNormal = objectNormal; 578#ifdef USE_TANGENT 579 vec3 transformedTangent = objectTangent; 580#endif 581#ifdef USE_BATCHING 582 mat3 bm = mat3( batchingMatrix ); 583 transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); 584 transformedNormal = bm * transformedNormal; 585 #ifdef USE_TANGENT 586 transformedTangent = bm * transformedTangent; 587 #endif 588#endif 589#ifdef USE_INSTANCING 590 mat3 im = mat3( instanceMatrix ); 591 transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); 592 transformedNormal = im * transformedNormal; 593 #ifdef USE_TANGENT 594 transformedTangent = im * transformedTangent; 595 #endif 596#endif 597transformedNormal = normalMatrix * transformedNormal; 598#ifdef FLIP_SIDED 599 transformedNormal = - transformedNormal; 600#endif 601#ifdef USE_TANGENT 602 transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; 603 #ifdef FLIP_SIDED 604 transformedTangent = - transformedTangent; 605 #endif 606#endif`,F2=`#ifdef USE_DISPLACEMENTMAP 607 uniform sampler2D displacementMap; 608 uniform float displacementScale; 609 uniform float displacementBias; 610#endif`,k2=`#ifdef USE_DISPLACEMENTMAP 611 transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + dis
611placementBias ); 612#endif`,z2=`#ifdef USE_EMISSIVEMAP 613 vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); 614 #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE 615 emissiveColor = sRGBTransferEOTF( emissiveColor ); 616 #endif 617 totalEmissiveRadiance *= emissiveColor.rgb; 618#endif`,B2=`#ifdef USE_EMISSIVEMAP 619 uniform sampler2D emissiveMap; 620#endif`,H2="gl_FragColor = linearToOutputTexel( gl_FragColor );",V2=`vec4 LinearTransferOETF( in vec4 value ) { 621 return value; 622} 623vec4 sRGBTransferEOTF( in vec4 value ) { 624 return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a ); 625} 626vec4 sRGBTransferOETF( in vec4 value ) { 627 return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); 628}`,G2=`#ifdef USE_ENVMAP 629 #ifdef ENV_WORLDPOS 630 vec3 cameraToFrag; 631 if ( isOrthographic ) { 632 cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 633 } else { 634 cameraToFrag = normalize( vWorldPosition - cameraPosition ); 635 } 636 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 637 #ifdef ENVMAP_MODE_REFLECTION 638 vec3 reflectVec = reflect( cameraToFrag, worldNormal ); 639 #else 640 vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); 641 #endif 642 #else 643 vec3 reflectVec = vReflect; 644 #endif 645 #ifdef ENVMAP_TYPE_CUBE 646 vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); 647 #else 648 vec4 envColor = vec4( 0.0 ); 649 #endif 650 #ifdef ENVMAP_BLENDING_MULTIPLY 651 outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); 652 #elif defined( ENVMAP_BLENDING_MIX ) 653 outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); 654 #elif defined( ENVMAP_BLENDING_ADD ) 655 outgoingLight += envColor.xyz * specularStrength * reflectivity; 656 #endif 657#endif`,W2=`#ifdef USE_ENVMAP 658 uniform float envMapIntensity; 659 uniform float flipEnvMap; 660 uniform mat3 envMapRotation; 661 #ifdef ENVMAP_TYPE_CUBE 662 uniform samplerCube envMap; 663 #else 664 uniform sampler2D envMap; 665 #endif 666 667#endif`,X2=`#ifdef USE_ENVMAP 668 uniform float reflectivity; 669 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 670 #define ENV_WORLDPOS 671 #endif 672 #ifdef ENV_WORLDPOS 673 varying vec3 vWorldPosition; 674 uniform float refractionRatio; 675 #else 676 varying vec3 vReflect; 677 #endif 678#endif`,j2=`#ifdef USE_ENVMAP 679 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 680 #define ENV_WORLDPOS 681 #endif 682 #ifdef ENV_WORLDPOS 683 684 varying vec3 vWorldPosition; 685 #else 686 varying vec3 vReflect; 687 uniform float refractionRatio; 688 #endif 689#endif`,Y2=`#ifdef USE_ENVMAP 690 #ifdef ENV_WORLDPOS 691 vWorldPosition = worldPosition.xyz; 692 #else 693 vec3 cameraToVertex; 694 if ( isOrthographic ) { 695 cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 696 } else {
697 cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); 698 } 699 vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 700 #ifdef ENVMAP_MODE_REFLECTION 701 vReflect = reflect( cameraToVertex, worldNormal ); 702 #else 703 vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); 704 #endif 705 #endif 706#endif`,q2=`#ifdef USE_FOG 707 vFogDepth = - mvPosition.z; 708#endif`,$2=`#ifdef USE_FOG 709 varying float vFogDepth; 710#endif`,Z2=`#ifdef USE_FOG 711 #ifdef FOG_EXP2 712 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); 713 #else 714 float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); 715 #endif 716 gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); 717#endif`,K2=`#ifdef USE_FOG 718 uniform vec3 fogColor; 719 varying float vFogDepth; 720 #ifdef FOG_EXP2 721 uniform float fogDensity; 722 #else 723 uniform float fogNear; 724 uniform float fogFar; 725 #endif 726#endif`,Q2=`#ifdef USE_GRADIENTMAP 727 uniform sampler2D gradientMap; 728#endif 729vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { 730 float dotNL = dot( normal, lightDirection ); 731 vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); 732 #ifdef USE_GRADIENTMAP 733 return vec3( texture2D( gradientMap, coord ).r ); 734 #else 735 vec2 fw = fwidth( coord ) * 0.5; 736 return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); 737 #endif 738}`,J2=`#ifdef USE_LIGHTMAP 739 uniform sampler2D lightMap; 740 uniform float lightMapIntensity; 741#endif`,eL=`LambertMaterial material; 742material.diffuseColor = diffuseColor.rgb; 743material.specularStrength = specularStrength;`,tL=`varying vec3 vViewPosition; 744struct LambertMaterial { 745 vec3 diffuseColor; 746 float specularStrength; 747}; 748void 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 ) { 749 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 750 vec3 irradiance = dotNL * directLight.color; 751 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 752} 753void 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 ) { 754 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 755} 756#define RE_Direct RE_Direct_Lambert 757#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,nL=`uniform bool receiveShadow; 758uniform vec3 ambientLightColor; 759#if defined( USE_LIGHT_PROBES ) 760 uniform vec3 lightProbe[ 9 ]; 761#endif 762vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { 763 float x = normal.x, y = normal.y, z = normal.z; 764 vec3 result = shCoefficients[ 0 ] * 0.886227; 765 result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; 766 result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; 767 result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; 768 result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; 769 result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; 770 result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); 771 result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; 772 result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); 773 return result; 774} 775vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { 776 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 777 vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); 778 return irradiance; 779} 780vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { 781 vec3 irradiance = ambientLightColor; 782 return irradiance; 783} 784float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { 785 float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); 786 if ( cutoffDistance > 0.0 ) { 787 distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); 788 } 789 return distanceFalloff; 790} 791float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { 792 return smoothstep( coneCosine, penumbraCosine, angleCosine ); 793} 794#if NUM_DIR_LIGHTS > 0 795 struct DirectionalLight { 796 vec3 direction; 797 vec3 color; 798 }; 799 uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; 800 void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { 801 light.color = directionalLight.color; 802 light.direction = directionalLight.direction; 803 light.visible = true; 804 } 805#endif 806#if NUM_POINT_LIGHTS > 0 807 struct PointLight { 808 vec3 position; 809 vec3 color; 810 float distance; 811 float decay; 812 }; 813 uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; 814 void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { 815 vec3 lVector = pointLight.position - geometryPosition; 816 light.direction = normalize( lVector ); 817 float lightDistance = length( lVector ); 818 light.color = pointLight.color; 819 light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); 820 light.visible = ( light.color != vec3( 0.0 ) ); 821 } 822#endif
823#if NUM_SPOT_LIGHTS > 0 824 struct SpotLight { 825 vec3 position; 826 vec3 direction; 827 vec3 color; 828 float distance; 829 float decay; 830 float coneCos; 831 float penumbraCos; 832 }; 833 uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; 834 void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { 835 vec3 lVector = spotLight.position - geometryPosition; 836 light.direction = normalize( lVector ); 837 float angleCos = dot( light.direction, spotLight.direction ); 838 float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); 839 if ( spotAttenuation > 0.0 ) { 840 float lightDistance = length( lVector ); 841 light.color = spotLight.color * spotAttenuation; 842 light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); 843 light.visible = ( light.color != vec3( 0.0 ) ); 844 } else { 845 light.color = vec3( 0.0 ); 846 light.visible = false; 847 } 848 } 849#endif 850#if NUM_RECT_AREA_LIGHTS > 0 851 struct RectAreaLight { 852 vec3 color; 853 vec3 position; 854 vec3 halfWidth; 855 vec3 halfHeight; 856 }; 857 uniform sampler2D ltc_1; uniform sampler2D ltc_2; 858 uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; 859#endif 860#if NUM_HEMI_LIGHTS > 0 861 struct HemisphereLight { 862 vec3 direction; 863 vec3 skyColor; 864 vec3 groundColor; 865 }; 866 uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; 867 vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { 868 float dotNL = dot( normal, hemiLight.direction ); 869 float hemiDiffuseWeight = 0.5 * dotNL + 0.5; 870 vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); 871 return irradiance; 872 } 873#endif`,iL=`#ifdef USE_ENVMAP 874 vec3 getIBLIrradiance( const in vec3 normal ) { 875 #ifdef ENVMAP_TYPE_CUBE_UV 876 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 877 vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); 878 return PI * envMapColor.rgb * envMapIntensity; 879 #else 880 return vec3( 0.0 ); 881 #endif 882 } 883 vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { 884 #ifdef ENVMAP_TYPE_CUBE_UV 885 vec3 reflectVec = reflect( - viewDir, normal ); 886 reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); 887 reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); 888 vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); 889 return envMapColor.rgb * envMapIntensity; 890 #else 891 return vec3( 0.0 ); 892 #endif 893 } 894 #ifdef USE_ANISOTROPY 895 vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { 896 #ifdef ENVMAP_TYPE_CUBE_UV 897 vec3 bentNormal = cross( bitangent, viewDir ); 898 bentNormal = normalize( cross( bentNormal, bitangent ) ); 899 bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); 900 return getIBLRadiance( viewDir, bentNormal, roughness ); 901 #else 902 return vec3( 0.0 ); 903 #endif 904 } 905 #endif 906#endif`,rL=`ToonMaterial material; 907material.diffuseColor = diffuseColor.rgb;`,sL=`varying vec3 vViewPosition; 908struct ToonMaterial { 909 vec3 diffuseColor; 910}; 911void 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 ) { 912 vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; 913 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 914} 915void 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 ) { 916 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 917} 918#define RE_Direct RE_Direct_Toon 919#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,oL=`BlinnPhongMaterial material; 920material.diffuseColor = diffuseColor.rgb; 921material.specularColor = specular; 922material.specularShininess = shininess; 923material.specularStrength = specularStrength;`,aL=`varying vec3 vViewPosition; 924struct BlinnPhongMaterial { 925 vec3 diffuseColor; 926 vec3 specularColor; 927 float specularShininess; 928 float specularStrength; 929}; 930void 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 ) {
931 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 932 vec3 irradiance = dotNL * directLight.color; 933 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 934 reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; 935} 936void 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 ) { 937 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 938} 939#define RE_Direct RE_Direct_BlinnPhong 940#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,lL=`PhysicalMaterial material; 941material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); 942vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); 943float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); 944material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; 945material.roughness = min( material.roughness, 1.0 ); 946#ifdef IOR 947 material.ior = ior; 948 #ifdef USE_SPECULAR 949 float specularIntensityFactor = specularIntensity; 950 vec3 specularColorFactor = specularColor; 951 #ifdef USE_SPECULAR_COLORMAP 952 specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; 953 #endif 954 #ifdef USE_SPECULAR_INTENSITYMAP 955 specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; 956 #endif 957 material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); 958 #else 959 float specularIntensityFactor = 1.0; 960 vec3 specularColorFactor = vec3( 1.0 ); 961 material.specularF90 = 1.0; 962 #endif 963 material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); 964#else 965 material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); 966 material.specularF90 = 1.0; 967#endif 968#ifdef USE_CLEARCOAT 969 material.clearcoat = clearcoat; 970 material.clearcoatRoughness = clearcoatRoughness; 971 material.clearcoatF0 = vec3( 0.04 ); 972 material.clearcoatF90 = 1.0; 973 #ifdef USE_CLEARCOATMAP 974 material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; 975 #endif 976 #ifdef USE_CLEARCOAT_ROUGHNESSMAP 977 material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; 978 #endif 979 material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); 980 material.clearcoatRoughness += geometryRoughness; 981 material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); 982#endif 983#ifdef USE_DISPERSION 984 material.dispersion = dispersion; 985#endif 986#ifdef USE_IRIDESCENCE 987 material.iridescence = iridescence; 988 material.iridescenceIOR = iridescenceIOR; 989 #ifdef USE_IRIDESCENCEMAP 990 material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; 991 #endif 992 #ifdef USE_IRIDESCENCE_THICKNESSMAP 993 material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; 994 #else 995 material.iridescenceThickness = iridescenceThicknessMaximum; 996 #endif 997#endif 998#ifdef USE_SHEEN 999 material.sheenColor = sheenColor; 1000 #ifdef USE_SHEEN_COLORMAP 1001 material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; 1002 #endif 1003 material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); 1004 #ifdef USE_SHEEN_ROUGHNESSMAP 1005 material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; 1006 #endif 1007#endif 1008#ifdef USE_ANISOTROPY 1009 #ifdef USE_ANISOTROPYMAP 1010 mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); 1011 vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; 1012 vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; 1013 #else 1014 vec2 anisotropyV = anisotropyVector; 1015 #endif 1016 material.anisotropy = length( anisotropyV ); 1017 if( material.anisotropy == 0.0 ) { 1018 anisotropyV = vec2( 1.0, 0.0 ); 1019 } else { 1020 anisotropyV /= material.anisotropy; 1021 material.anisotropy = saturate( material.anisotropy ); 1022 } 1023 material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
1024 material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; 1025 material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; 1026#endif`,cL
vendor: 14,687 bytes, lines 1026-1327
1026=`struct PhysicalMaterial { 1027 vec3 diffuseColor; 1028 float roughness; 1029 vec3 specularColor; 1030 float specularF90; 1031 float dispersion; 1032 #ifdef USE_CLEARCOAT 1033 float clearcoat; 1034 float clearcoatRoughness; 1035 vec3 clearcoatF0; 1036 float clearcoatF90; 1037 #endif 1038 #ifdef USE_IRIDESCENCE 1039 float iridescence; 1040 float iridescenceIOR; 1041 float iridescenceThickness; 1042 vec3 iridescenceFresnel; 1043 vec3 iridescenceF0; 1044 #endif 1045 #ifdef USE_SHEEN 1046 vec3 sheenColor; 1047 float sheenRoughness; 1048 #endif 1049 #ifdef IOR 1050 float ior; 1051 #endif 1052 #ifdef USE_TRANSMISSION 1053 float transmission; 1054 float transmissionAlpha; 1055 float thickness; 1056 float attenuationDistance; 1057 vec3 attenuationColor; 1058 #endif 1059 #ifdef USE_ANISOTROPY 1060 float anisotropy; 1061 float alphaT; 1062 vec3 anisotropyT; 1063 vec3 anisotropyB; 1064 #endif 1065}; 1066vec3 clearcoatSpecularDirect = vec3( 0.0 ); 1067vec3 clearcoatSpecularIndirect = vec3( 0.0 ); 1068vec3 sheenSpecularDirect = vec3( 0.0 ); 1069vec3 sheenSpecularIndirect = vec3(0.0 ); 1070vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { 1071 float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); 1072 float x2 = x * x; 1073 float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); 1074 return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); 1075} 1076float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { 1077 float a2 = pow2( alpha ); 1078 float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); 1079 float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); 1080 return 0.5 / max( gv + gl, EPSILON ); 1081} 1082float D_GGX( const in float alpha, const in float dotNH ) { 1083 float a2 = pow2( alpha ); 1084 float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; 1085 return RECIPROCAL_PI * a2 / pow2( denom ); 1086} 1087#ifdef USE_ANISOTROPY 1088 float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) { 1089 float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); 1090 float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); 1091 float v = 0.5 / ( gv + gl ); 1092 return saturate(v); 1093 } 1094 float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { 1095 float a2 = alphaT * alphaB; 1096 highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); 1097 highp float v2 = dot( v, v ); 1098 float w2 = a2 / v2; 1099 return RECIPROCAL_PI * a2 * pow2 ( w2 ); 1100 } 1101#endif 1102#ifdef USE_CLEARCOAT 1103 vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { 1104 vec3 f0 = material.clearcoatF0; 1105 float f90 = material.clearcoatF90; 1106 float roughness = material.clearcoatRoughness; 1107 float alpha = pow2( roughness ); 1108 vec3 halfDir = normalize( lightDir + viewDir ); 1109 float dotNL = saturate( dot( normal, lightDir ) ); 1110 float dotNV = saturate( dot( normal, viewDir ) ); 1111 float dotNH = saturate( dot( normal, halfDir ) ); 1112 float dotVH = saturate( dot( viewDir, halfDir ) ); 1113 vec3 F = F_Schlick( f0, f90, dotVH ); 1114 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 1115 float D = D_GGX( alpha, dotNH ); 1116 return F * ( V * D ); 1117 } 1118#endif 1119vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { 1120 vec3 f0 = material.specularColor; 1121 float f90 = material.specularF90; 1122 float roughness = material.roughness; 1123 float alpha = pow2( roughness ); 1124 vec3 halfDir = normalize( lightDir + viewDir ); 1125 float dotNL = saturate( dot( normal, lightDir ) ); 1126 float dotNV = saturate( dot( normal, viewDir ) ); 1127 float dotNH = saturate( dot( normal, halfDir ) ); 1128 float dotVH = saturate( dot( viewDir, halfDir ) ); 1129 vec3 F = F_Schlick( f0, f90, dotVH ); 1130 #ifdef USE_IRIDESCENCE 1131 F = mix( F, material.iridescenceFresnel, material.iridescence ); 1132 #endif 1133 #ifdef USE_ANISOTROPY 1134 float dotTL = dot( material.anisotropyT, lightDir ); 1135 float dotTV = dot( material.anisotropyT, viewDir ); 1136 float dotTH = dot( material.anisotropyT, halfDir ); 1137 float dotBL = dot( material.anisotropyB, lightDir ); 1138 float dotBV = dot( material.anisotropyB, viewDir ); 1139 float dotBH = dot( material.anisotropyB, halfDir ); 1140 float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); 1141 float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); 1142 #else 1143 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 1144 float D = D_GGX( alpha, dotNH ); 1145 #endif 1146 return F * ( V * D ); 1147} 1148vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { 1149 const float LUT_SIZE = 64.0; 1150 const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; 1151 const float LUT_BIAS = 0.5 / LUT_SIZE; 1152 float dotNV = saturate( dot( N, V ) ); 1153 vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); 1154 uv = uv * LUT_SCALE + LUT_BIAS; 1155 return uv; 1156} 1157float LTC_ClippedSphereFormFactor( const in vec3 f ) { 1158 float l = length( f ); 1159 return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); 1160} 1161vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { 1162 float x = dot( v1, v2 ); 1163 float y = abs( x ); 1164 float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; 1165 float b = 3.4175940 + ( 4.1616724 + y ) * y; 1166 float v = a / b; 1167 float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; 1168 return cross( v1, v2 ) * theta_sintheta; 1169} 1170vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { 1171 vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; 1172 vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; 1173 vec3 lightNormal = cross( v1, v2 ); 1174 if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); 1175 vec3 T1, T2; 1176 T1 = normalize( V - N * dot( V, N ) ); 1177 T2 = - cross( N, T1 ); 1178 mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); 1179 vec3 coords[ 4 ]; 1180 coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); 1181 coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); 1182 coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); 1183 coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); 1184 coords[ 0 ] = normalize( coords[ 0 ] ); 1185 coords[ 1 ] = normalize( coords[ 1 ] ); 1186 coords[ 2 ] = normalize( coords[ 2 ] ); 1187 coords[ 3 ] = normalize( coords[ 3 ] ); 1188 vec3 vectorFormFactor = vec3( 0.0 ); 1189 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); 1190 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); 1191 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); 1192 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); 1193 float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); 1194 return vec3( result ); 1195} 1196#if defined( USE_SHEEN ) 1197float D_Charlie( float roughness, float dotNH ) { 1198 float alpha = pow2( roughness ); 1199 float invAlpha = 1.0 / alpha; 1200 float cos2h = dotNH * dotNH; 1201 float sin2h = max( 1.0 - cos2h, 0.0078125 ); 1202 return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); 1203} 1204float V_Neubelt( float dotNV, float dotNL ) { 1205 return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); 1206} 1207vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { 1208 vec3 halfDir = normalize( lightDir + viewDir ); 1209 float dotNL = saturate( dot( normal, lightDir ) ); 1210 float dotNV = saturate( dot( normal, viewDir ) ); 1211 float dotNH = saturate( dot( normal, halfDir ) ); 1212 float D = D_Charlie( sheenRoughness, dotNH ); 1213 float V = V_Neubelt( dotNV, dotNL ); 1214 return sheenColor * ( D * V ); 1215} 1216#endif 1217float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { 1218 float dotNV = saturate( dot( normal, viewDir ) ); 1219 float r2 = roughness * roughness; 1220 float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; 1221 float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; 1222 float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); 1223 return saturate( DG * RECIPROCAL_PI ); 1224} 1225vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { 1226 float dotNV = saturate( dot( normal, viewDir ) ); 1227 const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); 1228 const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); 1229 vec4 r = roughness * c0 + c1; 1230 float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; 1231 vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; 1232 return fab; 1233} 1234vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { 1235 vec2 fab = DFGApprox( normal, viewDir, roughness ); 1236 return specularColor * fab.x + specularF90 * fab.y; 1237} 1238#ifdef USE_IRIDESCENCE 1239void 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 ) { 1240#else 1241void 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 ) { 1242#endif 1243 vec2 fab = DFGApprox( normal, viewDir, roughness ); 1244 #ifdef USE_IRIDESCENCE 1245 vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); 1246 #else 1247 vec3 Fr = specularColor; 1248 #endif 1249 vec3 FssEss = Fr * fab.x + specularF90 * fab.y; 1250 float Ess = fab.x + fab.y; 1251 float Ems = 1.0 - Ess; 1252 vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); 1253 singleScatter += FssEss; 1254 multiScatter += Fms * Ems; 1255} 1256#if NUM_RECT_AREA_LIGHTS > 0 1257 void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { 1258 vec3 normal = geometryNormal; 1259 vec3 viewDir = geometryViewDir; 1260 vec3 position = geometryPosition; 1261 vec3 lightPos = rectAreaLight.position; 1262 vec3 halfWidth = rectAreaLight.halfWidth; 1263 vec3 halfHeight = rectAreaLight.halfHeight; 1264 vec3 lightColor = rectAreaLight.color; 1265 float roughness = material.roughness; 1266 vec3 rectCoords[ 4 ]; 1267 rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; 1268 rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; 1269 rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; 1270 vec2 uv = LTC_Uv( normal, viewDir, roughness ); 1271 vec4 t1 = texture2D( ltc_1, uv ); 1272 vec4 t2 = texture2D( ltc_2, uv ); 1273 mat3 mInv = mat3( 1274 vec3( t1.x, 0, t1.y ), 1275 vec3( 0, 1, 0 ), 1276 vec3( t1.z, 0, t1.w ) 1277 ); 1278 vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); 1279 reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); 1280 reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); 1281 } 1282#endif 1283void 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 ) { 1284 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 1285 vec3 irradiance = dotNL * directLight.color; 1286 #ifdef USE_CLEARCOAT 1287 float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); 1288 vec3 ccIrradiance = dotNLcc * directLight.color; 1289 clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); 1290 #endif 1291 #ifdef USE_SHEEN 1292 sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); 1293 #endif 1294 reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material ); 1295 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1296} 1297void 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 ) { 1298 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1299} 1300void 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) { 1301 #ifdef USE_CLEARCOAT 1302 clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); 1303 #endif 1304 #ifdef USE_SHEEN 1305 sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1306 #endif 1307 vec3 singleScattering = vec3( 0.0 ); 1308 vec3 multiScattering = vec3( 0.0 ); 1309 vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; 1310 #ifdef USE_IRIDESCENCE 1311 computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); 1312 #else 1313 computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); 1314 #endif 1315 vec3 totalScattering = singleScattering + multiScattering; 1316 vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); 1317 reflectedLight.indirectSpecular += radiance * singleScattering; 1318 reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; 1319 reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; 1320} 1321#define RE_Direct RE_Direct_Physical 1322#define RE_Direct_RectArea RE_Direct_RectArea_Physical 1323#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical 1324#define RE_IndirectSpecular RE_IndirectSpecular_Physical 1325float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { 1326 return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); 1327}`,
1327uL=` 1328vec3 geometryPosition = - vViewPosition; 1329vec3 geometryNormal = normal; 1330vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); 1331vec3 geometryClearcoatNormal = vec3( 0.0 ); 1332#ifdef USE_CLEARCOAT 1333 geometryClearcoatNormal = clearcoatNormal; 1334#endif 1335#ifdef USE_IRIDESCENCE 1336 float dotNVi = saturate( dot( normal, geometryViewDir ) ); 1337 if ( material.iridescenceThickness == 0.0 ) { 1338 material.iridescence = 0.0; 1339 } else { 1340 material.iridescence = saturate( material.iridescence ); 1341 } 1342 if ( material.iridescence > 0.0 ) { 1343 material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); 1344 material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); 1345 } 1346#endif 1347IncidentLight directLight; 1348#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) 1349 PointLight pointLight; 1350 #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 1351 PointLightShadow pointLightShadow; 1352 #endif 1353 #pragma unroll_loop_start 1354 for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { 1355 pointLight = pointLights[ i ]; 1356 getPointLightInfo( pointLight, geometryPosition, directLight ); 1357 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) 1358 pointLightShadow = pointLightShadows[ i ]; 1359 directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; 1360 #endif 1361 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1362 } 1363 #pragma unroll_loop_end 1364#endif 1365#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) 1366 SpotLight spotLight; 1367 vec4 spotColor; 1368 vec3 spotLightCoord; 1369 bool inSpotLightMap; 1370 #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 1371 SpotLightShadow spotLightShadow; 1372 #endif 1373 #pragma unroll_loop_start 1374 for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { 1375 spotLight = spotLights[ i ]; 1376 getSpotLightInfo( spotLight, geometryPosition, directLight ); 1377 #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1378 #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX 1379 #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1380 #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS 1381 #else 1382 #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1383 #endif 1384 #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) 1385 spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; 1386 inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); 1387 spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); 1388 directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; 1389 #endif 1390 #undef SPOT_LIGHT_MAP_INDEX 1391 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1392 spotLightShadow = spotLightShadows[ i ]; 1393 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 1394 #endif 1395 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1396 } 1397 #pragma unroll_loop_end 1398#endif 1399#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) 1400 DirectionalLight directionalLight; 1401 #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 1402 DirectionalLightShadow directionalLightShadow; 1403 #endif 1404 #pragma unroll_loop_start 1405 for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { 1406 directionalLight = directionalLights[ i ]; 1407 getDirectionalLightInfo( directionalLight, directLight ); 1408 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) 1409 directionalLightShadow = directionalLightShadows[ i ]; 1410 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 1411 #endif 1412 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1413 } 1414 #pragma unroll_loop_end 1415#endif 1416#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) 1417 RectAreaLight rectAreaLight; 1418 #pragma unroll_loop_start 1419 for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { 1420 rectAreaLight = rectAreaLights[ i ]; 1421 RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1422 } 1423 #pragma unroll_loop_end 1424#endif 1425#if defined( RE_IndirectDiffuse ) 1426 vec3 iblIrradiance = vec3( 0.0 ); 1427 vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); 1428 #if defined( USE_LIGHT_PROBES ) 1429 irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); 1430 #endif 1431 #if ( NUM_HEMI_LIGHTS > 0 ) 1432 #pragma unroll_loop_start 1433 for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { 1434 irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); 1435 } 1436 #pragma unroll_loop_end 1437 #endif 1438#endif 1439#if defined( RE_IndirectSpecular ) 1440 vec3 radiance = vec3( 0.0 ); 1441 vec3 clearcoatRadiance = vec3( 0.0 ); 1442#endif`,fL=`#if defined( RE_IndirectDiffuse ) 1443 #ifdef USE_LIGHTMAP 1444 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 1445 vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; 1446 irradiance += lightMapIrradiance; 1447 #endif 1448 #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) 1449 iblIrradiance += getIBLIrradiance( geometryNormal ); 1450 #endif 1451#endif 1452#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) 1453 #ifdef USE_ANISOTROPY 1454 radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); 1455 #else 1456 radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); 1457 #endif 1458 #ifdef USE_CLEARCOAT 1459 clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); 1460 #endif 1461#endif`,dL=`#if defined( RE_IndirectDiffuse ) 1462 RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1463#endif 1464#if defined( RE_IndirectSpecular ) 1465 RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1466#endif`,hL=`#if defined( USE_LOGDEPTHBUF ) 1467 gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; 1468#endif`,pL=`#if defined( USE_LOGDEPTHBUF ) 1469 uniform float logDepthBufFC; 1470 varying float vFragDepth; 1471 varying float vIsPerspective; 1472#endif`,mL=`#ifdef USE_LOGDEPTHBUF 1473 varying float vFragDepth; 1474 varying float vIsPerspective; 1475#endif`,gL=`#ifdef USE_LOGDEPTHBUF 1476 vFragDepth = 1.0 + gl_Position.w; 1477 vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); 1478#endif`,vL=`#ifdef USE_MAP 1479 vec4 sampledDiffuseColor = texture2D( map, vMapUv ); 1480 #ifdef DECODE_VIDEO_TEXTURE 1481 sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor ); 1482 #endif 1483 diffuseColor *= sampledDiffuseColor; 1484#endif`,yL=`#ifdef USE_MAP 1485 uniform sampler2D map; 1486#endif`,xL=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1487 #if defined( USE_POINTS_UV ) 1488 vec2 uv = vUv; 1489 #else 1490 vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; 1491 #endif 1492#endif 1493#ifdef USE_MAP 1494 diffuseColor *= texture2D( map, uv ); 1495#endif 1496#ifdef USE_ALPHAMAP 1497 diffuseColor.a *= texture2D( alphaMap, uv ).g; 1498#endif`,_L=`#if defined( USE_POINTS_UV ) 1499 varying vec2 vUv; 1500#else 1501 #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1502 uniform mat3 uvTransform; 1503 #endif 1504#endif 1505#ifdef USE_MAP 1506 uniform sampler2D map; 1507#endif 1508#ifdef USE_ALPHAMAP 1509 uniform sampler2D alphaMap; 1510#endif`,SL=`float metalnessFactor = metalness; 1511#ifdef USE_METALNESSMAP 1512 vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); 1513 metalnessFactor *= texelMetalness.b; 1514#endif`,wL=`#ifdef USE_METALNESSMAP 1515 uniform sampler2D metalnessMap; 1516#endif`,EL=`#ifdef USE_INSTANCING_MORPH 1517 float morphTargetInfluences[ MORPHTARGETS_COUNT ]; 1518 float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; 1519 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1520 morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; 1521 } 1522#endif`,ML=`#if defined( USE_MORPHCOLORS ) 1523 vColor *= morphTargetBaseInfluence; 1524 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1525 #if defined( USE_COLOR_ALPHA ) 1526 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; 1527 #elif defined( USE_COLOR ) 1528 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; 1529 #endif 1530 } 1531#endif`,TL=`#ifdef USE_MORPHNORMALS 1532 objectNormal *= morphTargetBaseInfluence; 1533 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1534 if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; 1535 } 1536#endif`,bL=`#ifdef USE_MORPHTARGETS 1537 #ifndef USE_INSTANCING_MORPH 1538 uniform float morphTargetBaseInfluence; 1539 uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; 1540 #endif 1541 uniform sampler2DArray morphTargetsTexture; 1542 uniform ivec2 morphTargetsTextureSize; 1543 vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { 1544 int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; 1545 int y = texelIndex / morphTargetsTextureSize.x; 1546 int x = texelIndex - y * morphTargetsTextureSize.x; 1547 ivec3 morphUV = ivec3( x, y, morphTargetIndex ); 1548 return texelFetch( morphTargetsTexture, morphUV, 0 ); 1549 } 1550#endif`,AL=`#ifdef USE_MORPHTARGETS 1551 transformed *= morphTargetBaseInfluence; 1552 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1553 if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; 1554 } 1555#endif`,CL=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; 1556#ifdef FLAT_SHADED 1557 vec3 fdx = dFdx( vViewPosition ); 1558 vec3 fdy = dFdy( vViewPosition ); 1559 vec3 normal = normalize( cross( fdx, fdy ) ); 1560#else 1561 vec3 normal = normalize( vNormal ); 1562 #ifdef DOUBLE_SIDED 1563 normal *= faceDirection; 1564 #endif 1565#endif 1566#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) 1567 #ifdef USE_TANGENT 1568 mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 1569 #else 1570 mat3 tbn = getTangentFrame( - vViewPosition, normal, 1571 #if defined( USE_NORMALMAP ) 1572 vNormalMapUv 1573 #elif defined( USE_CLEARCOAT_NORMALMAP ) 1574 vClearcoatNormalMapUv 1575 #else 1576 vUv 1577 #endif 1578 ); 1579 #endif 1580 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 1581 tbn[0] *= faceDirection; 1582 tbn[1] *= faceDirection; 1583 #endif 1584#endif 1585#ifdef USE_CLEARCOAT_NORMALMAP 1586 #ifdef USE_TANGENT 1587 mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 1588 #else 1589 mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); 1590 #endif 1591 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 1592 tbn2[0] *= faceDirection; 1593 tbn2[1] *= faceDirection; 1594 #endif 1595#endif 1596vec3 nonPerturbedNormal = normal;`,RL=`#ifdef USE_NORMALMAP_OBJECTSPACE 1597 normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 1598 #ifdef FLIP_SIDED 1599 normal = - normal; 1600 #endif 1601 #ifdef DOUBLE_SIDED 1602 normal = normal * faceDirection; 1603 #endif 1604 normal = normalize( normalMatrix * normal ); 1605#elif defined( USE_NORMALMAP_TANGENTSPACE ) 1606 vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 1607 mapN.xy *= normalScale; 1608 normal = normalize( tbn * mapN ); 1609#elif defined( USE_BUMPMAP )
1610 normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); 1611#endif`,PL=`#ifndef FLAT_SHADED 1612 varying vec3 vNormal; 1613 #ifdef USE_TANGENT 1614 varying vec3 vTangent; 1615 varying vec3 vBitangent; 1616 #endif 1617#endif`,LL=`#ifndef FLAT_SHADED 1618 varying vec3 vNormal; 1619 #ifdef USE_TANGENT 1620 varying vec3 vTangent; 1621 varying vec3 vBitangent; 1622 #endif 1623#endif`,NL=`#ifndef FLAT_SHADED 1624 vNormal = normalize( transformedNormal ); 1625 #ifdef USE_TANGENT 1626 vTangent = normalize( transformedTangent ); 1627 vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); 1628 #endif 1629#endif`,DL=`#ifdef USE_NORMALMAP 1630 uniform sampler2D normalMap; 1631 uniform vec2 normalScale; 1632#endif 1633#ifdef USE_NORMALMAP_OBJECTSPACE 1634 uniform mat3 normalMatrix; 1635#endif 1636#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) 1637 mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { 1638 vec3 q0 = dFdx( eye_pos.xyz ); 1639 vec3 q1 = dFdy( eye_pos.xyz ); 1640 vec2 st0 = dFdx( uv.st ); 1641 vec2 st1 = dFdy( uv.st ); 1642 vec3 N = surf_norm; 1643 vec3 q1perp = cross( q1, N ); 1644 vec3 q0perp = cross( N, q0 ); 1645 vec3 T = q1perp * st0.x + q0perp * st1.x; 1646 vec3 B = q1perp * st0.y + q0perp * st1.y; 1647 float det = max( dot( T, T ), dot( B, B ) ); 1648 float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); 1649 return mat3( T * scale, B * scale, N ); 1650 } 1651#endif`,IL=`#ifdef USE_CLEARCOAT 1652 vec3 clearcoatNormal = nonPerturbedNormal; 1653#endif`,UL=`#ifdef USE_CLEARCOAT_NORMALMAP 1654 vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; 1655 clearcoatMapN.xy *= clearcoatNormalScale; 1656 clearcoatNormal = normalize( tbn2 * clearcoatMapN ); 1657#endif`,OL=`#ifdef USE_CLEARCOATMAP 1658 uniform sampler2D clearcoatMap; 1659#endif 1660#ifdef USE_CLEARCOAT_NORMALMAP 1661 uniform sampler2D clearcoatNormalMap; 1662 uniform vec2 clearcoatNormalScale; 1663#endif 1664#ifdef USE_CLEARCOAT_ROUGHNESSMAP 1665 uniform sampler2D clearcoatRoughnessMap; 1666#endif`,FL=`#ifdef USE_IRIDESCENCEMAP 1667 uniform sampler2D iridescenceMap; 1668#endif 1669#ifdef USE_IRIDESCENCE_THICKNESSMAP 1670 uniform sampler2D iridescenceThicknessMap; 1671#endif`,kL=`#ifdef OPAQUE 1672diffuseColor.a = 1.0; 1673#endif 1674#ifdef USE_TRANSMISSION 1675diffuseColor.a *= material.transmissionAlpha; 1676#endif 1677gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,zL=`vec3 packNormalToRGB( const in vec3 normal ) { 1678 return normalize( normal ) * 0.5 + 0.5; 1679} 1680vec3 unpackRGBToNormal( const in vec3 rgb ) { 1681 return 2.0 * rgb.xyz - 1.0; 1682} 1683const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.; 1684const float Inv255 = 1. / 255.; 1685const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 ); 1686const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g ); 1687const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b ); 1688const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a ); 1689vec4 packDepthToRGBA( const in float v ) { 1690 if( v <= 0.0 ) 1691 return vec4( 0., 0., 0., 0. ); 1692 if( v >= 1.0 ) 1693 return vec4( 1., 1., 1., 1. ); 1694 float vuf; 1695 float af = modf( v * PackFactors.a, vuf ); 1696 float bf = modf( vuf * ShiftRight8, vuf ); 1697 float gf = modf( vuf * ShiftRight8, vuf ); 1698 return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af ); 1699} 1700vec3 packDepthToRGB( const in float v ) { 1701 if( v <= 0.0 ) 1702 return vec3( 0., 0., 0. ); 1703 if( v >= 1.0 ) 1704 return vec3( 1., 1., 1. ); 1705 float vuf; 1706 float bf = modf( v * PackFactors.b, vuf ); 1707 float gf = modf( vuf * ShiftRight8, vuf ); 1708 return vec3( vuf * Inv255, gf * PackUpscale, bf ); 1709} 1710vec2 packDepthToRG( const in float v ) { 1711 if( v <= 0.0 ) 1712 return vec2( 0., 0. ); 1713 if( v >= 1.0 ) 1714 return vec2( 1., 1. ); 1715 float vuf; 1716 float gf = modf( v * 256., vuf ); 1717 return vec2( vuf * Inv255, gf ); 1718} 1719float unpackRGBAToDepth( const in vec4 v ) { 1720 return dot( v, UnpackFactors4 ); 1721} 1722float unpackRGBToDepth( const in vec3 v ) { 1723 return dot( v, UnpackFactors3 ); 1724} 1725float unpackRGToDepth( const in vec2 v ) { 1726 return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g; 1727} 1728vec4 pack2HalfToRGBA( const in vec2 v ) {
1729 vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); 1730 return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); 1731} 1732vec2 unpackRGBATo2Half( const in vec4 v ) { 1733 return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); 1734} 1735float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { 1736 return ( viewZ + near ) / ( near - far ); 1737} 1738float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { 1739 return depth * ( near - far ) - near; 1740} 1741float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { 1742 return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); 1743} 1744float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { 1745 return ( near * far ) / ( ( far - near ) * depth - far ); 1746}`,BL=`#ifdef PREMULTIPLIED_ALPHA 1747 gl_FragColor.rgb *= gl_FragColor.a; 1748#endif`,HL=`vec4 mvPosition = vec4( transformed, 1.0 ); 1749#ifdef USE_BATCHING 1750 mvPosition = batchingMatrix * mvPosition; 1751#endif 1752#ifdef USE_INSTANCING 1753 mvPosition = instanceMatrix * mvPosition; 1754#endif 1755mvPosition = modelViewMatrix * mvPosition; 1756gl_Position = projectionMatrix * mvPosition;`,VL=`#ifdef DITHERING 1757 gl_FragColor.rgb = dithering( gl_FragColor.rgb ); 1758#endif`,GL=`#ifdef DITHERING 1759 vec3 dithering( vec3 color ) { 1760 float grid_position = rand( gl_FragCoord.xy ); 1761 vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); 1762 dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); 1763 return color + dither_shift_RGB; 1764 } 1765#endif`,WL=`float roughnessFactor = roughness; 1766#ifdef USE_ROUGHNESSMAP 1767 vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); 1768 roughnessFactor *= texelRoughness.g; 1769#endif`,XL=`#ifdef USE_ROUGHNESSMAP 1770 uniform sampler2D roughnessMap; 1771#endif`,jL=
vendor: 8,887 bytes, lines 1771-1957
1771`#if NUM_SPOT_LIGHT_COORDS > 0 1772 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 1773#endif 1774#if NUM_SPOT_LIGHT_MAPS > 0 1775 uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; 1776#endif 1777#ifdef USE_SHADOWMAP 1778 #if NUM_DIR_LIGHT_SHADOWS > 0 1779 uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; 1780 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 1781 struct DirectionalLightShadow { 1782 float shadowIntensity; 1783 float shadowBias; 1784 float shadowNormalBias; 1785 float shadowRadius; 1786 vec2 shadowMapSize; 1787 }; 1788 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 1789 #endif 1790 #if NUM_SPOT_LIGHT_SHADOWS > 0 1791 uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; 1792 struct SpotLightShadow { 1793 float shadowIntensity; 1794 float shadowBias; 1795 float shadowNormalBias; 1796 float shadowRadius; 1797 vec2 shadowMapSize; 1798 }; 1799 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 1800 #endif 1801 #if NUM_POINT_LIGHT_SHADOWS > 0 1802 uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; 1803 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 1804 struct PointLightShadow { 1805 float shadowIntensity; 1806 float shadowBias; 1807 float shadowNormalBias; 1808 float shadowRadius; 1809 vec2 shadowMapSize; 1810 float shadowCameraNear; 1811 float shadowCameraFar; 1812 }; 1813 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 1814 #endif 1815 float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { 1816 return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); 1817 } 1818 vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { 1819 return unpackRGBATo2Half( texture2D( shadow, uv ) ); 1820 } 1821 float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ 1822 float occlusion = 1.0; 1823 vec2 distribution = texture2DDistribution( shadow, uv ); 1824 float hard_shadow = step( compare , distribution.x ); 1825 if (hard_shadow != 1.0 ) { 1826 float distance = compare - distribution.x ; 1827 float variance = max( 0.00000, distribution.y * distribution.y ); 1828 float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); 1829 } 1830 return occlusion; 1831 } 1832 float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 1833 float shadow = 1.0; 1834 shadowCoord.xyz /= shadowCoord.w; 1835 shadowCoord.z += shadowBias; 1836 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 1837 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 1838 if ( frustumTest ) { 1839 #if defined( SHADOWMAP_TYPE_PCF ) 1840 vec2 texelSize = vec2( 1.0 ) / shadowMapSize; 1841 float dx0 = - texelSize.x * shadowRadius; 1842 float dy0 = - texelSize.y * shadowRadius; 1843 float dx1 = + texelSize.x * shadowRadius; 1844 float dy1 = + texelSize.y * shadowRadius; 1845 float dx2 = dx0 / 2.0; 1846 float dy2 = dy0 / 2.0; 1847 float dx3 = dx1 / 2.0; 1848 float dy3 = dy1 / 2.0; 1849 shadow = ( 1850 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + 1851 texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + 1852 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + 1853 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + 1854 texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + 1855 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + 1856 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + 1857 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + 1858 texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + 1859 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + 1860 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + 1861 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + 1862 texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + 1863 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + 1864 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + 1865 texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + 1866 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) 1867 ) * ( 1.0 / 17.0 ); 1868 #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) 1869 vec2 texelSize = vec2( 1.0 ) / shadowMapSize; 1870 float dx = texelSize.x; 1871 float dy = texelSize.y; 1872 vec2 uv = shadowCoord.xy; 1873 vec2 f = fract( uv * shadowMapSize + 0.5 ); 1874 uv -= f * texelSize; 1875 shadow = ( 1876 texture2DCompare( shadowMap, uv, shadowCoord.z ) + 1877 texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + 1878 texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + 1879 texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + 1880 mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), 1881 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), 1882 f.x ) + 1883 mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), 1884 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), 1885 f.x ) + 1886 mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), 1887 texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), 1888 f.y ) + 1889 mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), 1890 texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), 1891 f.y ) + 1892 mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), 1893 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), 1894 f.x ), 1895 mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), 1896 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), 1897 f.x ), 1898 f.y ) 1899 ) * ( 1.0 / 9.0 ); 1900 #elif defined( SHADOWMAP_TYPE_VSM ) 1901 shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); 1902 #else 1903 shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); 1904 #endif 1905 } 1906 return mix( 1.0, shadow, shadowIntensity ); 1907 } 1908 vec2 cubeToUV( vec3 v, float texelSizeY ) { 1909 vec3 absV = abs( v ); 1910 float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); 1911 absV *= scaleToCube; 1912 v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); 1913 vec2 planar = v.xy; 1914 float almostATexel = 1.5 * texelSizeY; 1915 float almostOne = 1.0 - almostATexel; 1916 if ( absV.z >= almostOne ) { 1917 if ( v.z > 0.0 ) 1918 planar.x = 4.0 - v.x; 1919 } else if ( absV.x >= almostOne ) { 1920 float signX = sign( v.x ); 1921 planar.x = v.z * signX + 2.0 * signX; 1922 } else if ( absV.y >= almostOne ) { 1923 float signY = sign( v.y ); 1924 planar.x = v.x + 2.0 * signY + 2.0; 1925 planar.y = v.z * signY - 2.0; 1926 } 1927 return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); 1928 } 1929 float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { 1930 float shadow = 1.0; 1931 vec3 lightToPosition = shadowCoord.xyz; 1932 1933 float lightToPositionLength = length( lightToPosition ); 1934 if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) { 1935 float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; 1936 vec3 bd3D = normalize( lightToPosition ); 1937 vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); 1938 #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) 1939 vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; 1940 shadow = ( 1941 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + 1942 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + 1943 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + 1944 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + 1945 texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + 1946 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + 1947 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + 1948 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + 1949 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) 1950 ) * ( 1.0 / 9.0 ); 1951 #else 1952 shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); 1953 #endif 1954 } 1955 return mix( 1.0, shadow, shadowIntensity ); 1956 } 1957#endif`,
1957YL=`#if NUM_SPOT_LIGHT_COORDS > 0 1958 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; 1959 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 1960#endif 1961#ifdef USE_SHADOWMAP 1962 #if NUM_DIR_LIGHT_SHADOWS > 0 1963 uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; 1964 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 1965 struct DirectionalLightShadow { 1966 float shadowIntensity; 1967 float shadowBias; 1968 float shadowNormalBias; 1969 float shadowRadius; 1970 vec2 shadowMapSize; 1971 }; 1972 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 1973 #endif 1974 #if NUM_SPOT_LIGHT_SHADOWS > 0 1975 struct SpotLightShadow { 1976 float shadowIntensity; 1977 float shadowBias; 1978 float shadowNormalBias; 1979 float shadowRadius; 1980 vec2 shadowMapSize; 1981 }; 1982 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 1983 #endif 1984 #if NUM_POINT_LIGHT_SHADOWS > 0 1985 uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; 1986 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 1987 struct PointLightShadow { 1988 float shadowIntensity; 1989 float shadowBias; 1990 float shadowNormalBias; 1991 float shadowRadius; 1992 vec2 shadowMapSize; 1993 float shadowCameraNear; 1994 float shadowCameraFar; 1995 }; 1996 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 1997 #endif 1998#endif`,qL=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) 1999 vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 2000 vec4 shadowWorldPosition; 2001#endif 2002#if defined( USE_SHADOWMAP ) 2003 #if NUM_DIR_LIGHT_SHADOWS > 0 2004 #pragma unroll_loop_start 2005 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 2006 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); 2007 vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; 2008 } 2009 #pragma unroll_loop_end 2010 #endif 2011 #if NUM_POINT_LIGHT_SHADOWS > 0 2012 #pragma unroll_loop_start 2013 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 2014 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); 2015 vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; 2016 } 2017 #pragma unroll_loop_end 2018 #endif 2019#endif 2020#if NUM_SPOT_LIGHT_COORDS > 0 2021 #pragma unroll_loop_start 2022 for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { 2023 shadowWorldPosition = worldPosition; 2024 #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 2025 shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; 2026 #endif 2027 vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; 2028 } 2029 #pragma unroll_loop_end 2030#endif`,$L=`float getShadowMask() { 2031 float shadow = 1.0; 2032 #ifdef USE_SHADOWMAP 2033 #if NUM_DIR_LIGHT_SHADOWS > 0 2034 DirectionalLightShadow directionalLight; 2035 #pragma unroll_loop_start 2036 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 2037 directionalLight = directionalLightShadows[ i ]; 2038 shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 2039 } 2040 #pragma unroll_loop_end 2041 #endif 2042 #if NUM_SPOT_LIGHT_SHADOWS > 0 2043 SpotLightShadow spotLight; 2044 #pragma unroll_loop_start 2045 for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { 2046 spotLight = spotLightShadows[ i ]; 2047 shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 2048 } 2049 #pragma unroll_loop_end 2050 #endif 2051 #if NUM_POINT_LIGHT_SHADOWS > 0 2052 PointLightShadow pointLight; 2053 #pragma unroll_loop_start 2054 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 2055 pointLight = pointLightShadows[ i ]; 2056 shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; 2057 } 2058 #pragma unroll_loop_end 2059 #endif 2060 #endif 2061 return shadow; 2062}`,ZL=`#ifdef USE_SKINNING 2063 mat4 boneMatX = getBoneMatrix( skinIndex.x ); 2064 mat4 boneMatY = getBoneMatrix( skinIndex.y ); 2065 mat4 boneMatZ = getBoneMatrix( skinIndex.z ); 2066 mat4 boneMatW = getBoneMatrix( skinIndex.w ); 2067#endif`,KL=`#ifdef USE_SKINNING 2068 uniform mat4 bindMatrix; 2069 uniform mat4 bindMatrixInverse; 2070 uniform highp sampler2D boneTexture; 2071 mat4 getBoneMatrix( const in float i ) { 2072 int size = textureSize( boneTexture, 0 ).x; 2073 int j = int( i ) * 4; 2074 int x = j % size; 2075 int y = j / size; 2076 vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); 2077 vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); 2078 vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); 2079 vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); 2080 return mat4( v1, v2, v3, v4 ); 2081 } 2082#endif`,QL=`#ifdef USE_SKINNING 2083 vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); 2084 vec4 skinned = vec4( 0.0 ); 2085 skinned += boneMatX * skinVertex * skinWeight.x; 2086 skinned += boneMatY * skinVertex * skinWeight.y; 2087 skinned += boneMatZ * skinVertex * skinWeight.z; 2088 skinned += boneMatW * skinVertex * skinWeight.w; 2089 transformed = ( bindMatrixInverse * skinned ).xyz; 2090#endif`,JL=`#ifdef USE_SKINNING 2091 mat4 skinMatrix = mat4( 0.0 ); 2092 skinMatrix += skinWeight.x * boneMatX; 2093 skinMatrix += skinWeight.y * boneMatY; 2094 skinMatrix += skinWeight.z * boneMatZ; 2095 skinMatrix += skinWeight.w * boneMatW; 2096 skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; 2097 objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; 2098 #ifdef USE_TANGENT 2099 objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; 2100 #endif 2101#endif`,eN=`float specularStrength; 2102#ifdef USE_SPECULARMAP 2103 vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); 2104 specularStrength = texelSpecular.r; 2105#else 2106 specularStrength = 1.0; 2107#endif`,tN=`#ifdef USE_SPECULARMAP 2108 uniform sampler2D specularMap; 2109#endif`,nN=`#if defined( TONE_MAPPING ) 2110 gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); 2111#endif`,iN=`#ifndef saturate 2112#define saturate( a ) clamp( a, 0.0, 1.0 ) 2113#endif 2114uniform float toneMappingExposure; 2115vec3 LinearToneMapping( vec3 color ) { 2116 return saturate( toneMappingExposure * color ); 2117} 2118vec3 ReinhardToneMapping( vec3 color ) { 2119 color *= toneMappingExposure; 2120 return saturate( color / ( vec3( 1.0 ) + color ) ); 2121} 2122vec3 CineonToneMapping( vec3 color ) { 2123 color *= toneMappingExposure; 2124 color = max( vec3( 0.0 ), color - 0.004 ); 2125 return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); 2126} 2127vec3 RRTAndODTFit( vec3 v ) { 2128 vec3 a = v * ( v + 0.0245786 ) - 0.000090537; 2129 vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; 2130 return a / b; 2131} 2132vec3 ACESFilmicToneMapping( vec3 color ) { 2133 const mat3 ACESInputMat = mat3( 2134 vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), 2135 vec3( 0.04823, 0.01566, 0.83777 ) 2136 ); 2137 const mat3 ACESOutputMat = mat3( 2138 vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), 2139 vec3( -0.07367, -0.00605, 1.07602 ) 2140 ); 2141 color *= toneMappingExposure / 0.6; 2142 color = ACESInputMat * color; 2143 color = RRTAndODTFit( color ); 2144 color = ACESOutputMat * color; 2145 return saturate( color ); 2146} 2147const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( 2148 vec3( 1.6605, - 0.1246, - 0.0182 ), 2149 vec3( - 0.5876, 1.1329, - 0.1006 ), 2150 vec3( - 0.0728, - 0.0083, 1.1187 ) 2151); 2152const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( 2153 vec3( 0.6274, 0.0691, 0.0164 ), 2154 vec3( 0.3293, 0.9195, 0.0880 ), 2155 vec3( 0.0433, 0.0113, 0.8956 ) 2156); 2157vec3 agxDefaultContrastApprox( vec3 x ) { 2158 vec3 x2 = x * x; 2159 vec3 x4 = x2 * x2; 2160 return + 15.5 * x4 * x2 2161 - 40.14 * x4 * x 2162 + 31.96 * x4 2163 - 6.868 * x2 * x 2164 + 0.4298 * x2 2165 + 0.1191 * x 2166 - 0.00232; 2167} 2168vec3 AgXToneMapping( vec3 color ) { 2169 const mat3 AgXInsetMatrix = mat3( 2170 vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), 2171 vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), 2172 vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) 2173 );
2174 const mat3 AgXOutsetMatrix = mat3( 2175 vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), 2176 vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), 2177 vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) 2178 ); 2179 const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; 2180 color *= toneMappingExposure; 2181 color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; 2182 color = AgXInsetMatrix * color; 2183 color = max( color, 1e-10 ); color = log2( color ); 2184 color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); 2185 color = clamp( color, 0.0, 1.0 ); 2186 color = agxDefaultContrastApprox( color ); 2187 color = AgXOutsetMatrix * color; 2188 color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); 2189 color = LINEAR_REC2020_TO_LINEAR_SRGB * color; 2190 color = clamp( color, 0.0, 1.0 ); 2191 return color; 2192} 2193vec3 NeutralToneMapping( vec3 color ) { 2194 const float StartCompression = 0.8 - 0.04; 2195 const float Desaturation = 0.15; 2196 color *= toneMappingExposure; 2197 float x = min( color.r, min( color.g, color.b ) ); 2198 float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; 2199 color -= offset; 2200 float peak = max( color.r, max( color.g, color.b ) ); 2201 if ( peak < StartCompression ) return color; 2202 float d = 1. - StartCompression; 2203 float newPeak = 1. - d * d / ( peak + d - StartCompression ); 2204 color *= newPeak / peak; 2205 float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); 2206 return mix( color, vec3( newPeak ), g ); 2207} 2208vec3 CustomToneMapping( vec3 color ) { return color; }`,rN=`#ifdef USE_TRANSMISSION 2209 material.transmission = transmission; 2210 material.transmissionAlpha = 1.0; 2211 material.thickness = thickness; 2212 material.attenuationDistance = attenuationDistance; 2213 material.attenuationColor = attenuationColor; 2214 #ifdef USE_TRANSMISSIONMAP 2215 material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; 2216 #endif 2217 #ifdef USE_THICKNESSMAP 2218 material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; 2219 #endif 2220 vec3 pos = vWorldPosition; 2221 vec3 v = normalize( cameraPosition - pos ); 2222 vec3 n = inverseTransformDirection( normal, viewMatrix ); 2223 vec4 transmitted = getIBLVolumeRefraction( 2224 n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, 2225 pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness, 2226 material.attenuationColor, material.attenuationDistance ); 2227 material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); 2228 totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); 2229#endif`,sN=`#ifdef USE_TRANSMISSION 2230 uniform float transmission; 2231 uniform float thickness; 2232 uniform float attenuationDistance; 2233 uniform vec3 attenuationColor; 2234 #ifdef USE_TRANSMISSIONMAP 2235 uniform sampler2D transmissionMap; 2236 #endif 2237 #ifdef USE_THICKNESSMAP 2238 uniform sampler2D thicknessMap; 2239 #endif 2240 uniform vec2 transmissionSamplerSize; 2241 uniform sampler2D transmissionSamplerMap; 2242 uniform mat4 modelMatrix; 2243 uniform mat4 projectionMatrix; 2244 varying vec3 vWorldPosition; 2245 float w0( float a ) { 2246 return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); 2247 } 2248 float w1( float a ) { 2249 return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); 2250 } 2251 float w2( float a ){ 2252 return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); 2253 } 2254 float w3( float a ) { 2255 return ( 1.0 / 6.0 ) * ( a * a * a ); 2256 } 2257 float g0( float a ) { 2258 return w0( a ) + w1( a ); 2259 } 2260 float g1( float a ) { 2261 return w2( a ) + w3( a ); 2262 } 2263 float h0( float a ) { 2264 return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); 2265 } 2266 float h1( float a ) { 2267 return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); 2268 } 2269 vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { 2270 uv = uv * texelSize.zw + 0.5; 2271 vec2 iuv = floor( uv ); 2272 vec2 fuv = fract( uv ); 2273 float g0x = g0( fuv.x ); 2274 float g1x = g1( fuv.x ); 2275 float h0x = h0( fuv.x ); 2276 float h1x = h1( fuv.x ); 2277 float h0y = h0( fuv.y ); 2278 float h1y = h1( fuv.y ); 2279 vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2280 vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2281 vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2282 vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2283 return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + 2284 g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); 2285 } 2286 vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { 2287 vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); 2288 vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); 2289 vec2 fLodSizeInv = 1.0 / fLodSize; 2290 vec2 cLodSizeInv = 1.0 / cLodSize; 2291 vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); 2292 vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); 2293 return mix( fSample, cSample, fract( lod ) ); 2294 } 2295 vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { 2296 vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); 2297 vec3 modelScale; 2298 modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); 2299 modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); 2300 modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); 2301 return normalize( refractionVector ) * thickness * modelScale; 2302 } 2303 float applyIorToRoughness( const in float roughness, const in float ior ) { 2304 return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); 2305 } 2306 vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { 2307 float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); 2308 return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); 2309 } 2310 vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { 2311 if ( isinf( attenuationDistance ) ) { 2312 return vec3( 1.0 ); 2313 } else { 2314 vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; 2315 vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; 2316 } 2317 } 2318 vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, 2319 const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, 2320 const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness, 2321 const in vec3 attenuationColor, const in float attenuationDistance ) { 2322 vec4 transmittedLight; 2323 vec3 transmittance; 2324 #ifdef USE_DISPERSION 2325 float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion; 2326 vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread ); 2327 for ( int i = 0; i < 3; i ++ ) { 2328 vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix ); 2329 vec3 refractedRayExit = position + transmissionRay; 2330 vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); 2331 vec2 refractionCoords = ndcPos.xy / ndcPos.w; 2332 refractionCoords += 1.0; 2333 refractionCoords /= 2.0; 2334 vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] ); 2335 transmittedLight[ i ] = transmissionSample[ i ]; 2336 transmittedLight.a += transmissionSample.a; 2337 transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ]; 2338 } 2339 transmittedLight.a /= 3.0; 2340 #else 2341 vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); 2342 vec3 refractedRayExit = position + transmissionRay; 2343 vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); 2344 vec2 refractionCoords = ndcPos.xy / ndcPos.w; 2345 refractionCoords += 1.0; 2346 refractionCoords /= 2.0; 2347 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); 2348 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); 2349 #endif 2350 vec3 attenuatedColor = transmittance * transmittedLight.rgb; 2351 vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); 2352 float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; 2353 return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); 2354 } 2355#endif`,oN=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2356 varying vec2 vUv; 2357#endif 2358#ifdef USE_MAP 2359 varying vec2 vMapUv; 2360#endif 2361#ifdef USE_ALPHAMAP
2362 varying vec2 vAlphaMapUv; 2363#endif 2364#ifdef USE_LIGHTMAP 2365 varying vec2 vLightMapUv; 2366#endif 2367#ifdef USE_AOMAP 2368 varying vec2 vAoMapUv; 2369#endif 2370#ifdef USE_BUMPMAP 2371 varying vec2 vBumpMapUv; 2372#endif 2373#ifdef USE_NORMALMAP 2374 varying vec2 vNormalMapUv; 2375#endif 2376#ifdef USE_EMISSIVEMAP 2377 varying vec2 vEmissiveMapUv; 2378#endif 2379#ifdef USE_METALNESSMAP 2380 varying vec2 vMetalnessMapUv; 2381#endif 2382#ifdef USE_ROUGHNESSMAP 2383 varying vec2 vRoughnessMapUv; 2384#endif 2385#ifdef USE_ANISOTROPYMAP 2386 varying vec2 vAnisotropyMapUv; 2387#endif 2388#ifdef USE_CLEARCOATMAP 2389 varying vec2 vClearcoatMapUv; 2390#endif 2391#ifdef USE_CLEARCOAT_NORMALMAP 2392 varying vec2 vClearcoatNormalMapUv; 2393#endif 2394#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2395 varying vec2 vClearcoatRoughnessMapUv; 2396#endif 2397#ifdef USE_IRIDESCENCEMAP 2398 varying vec2 vIridescenceMapUv; 2399#endif 2400#ifdef USE_IRIDESCENCE_THICKNESSMAP 2401 varying vec2 vIridescenceThicknessMapUv; 2402#endif 2403#ifdef USE_SHEEN_COLORMAP 2404 varying vec2 vSheenColorMapUv; 2405#endif 2406#ifdef USE_SHEEN_ROUGHNESSMAP 2407 varying vec2 vSheenRoughnessMapUv; 2408#endif 2409#ifdef USE_SPECULARMAP 2410 varying vec2 vSpecularMapUv; 2411#endif 2412#ifdef USE_SPECULAR_COLORMAP 2413 varying vec2 vSpecularColorMapUv; 2414#endif 2415#ifdef USE_SPECULAR_INTENSITYMAP 2416 varying vec2 vSpecularIntensityMapUv; 2417#endif 2418#ifdef USE_TRANSMISSIONMAP 2419 uniform mat3 transmissionMapTransform; 2420 varying vec2 vTransmissionMapUv; 2421#endif 2422#ifdef USE_THICKNESSMAP 2423 uniform mat3 thicknessMapTransform; 2424 varying vec2 vThicknessMapUv; 2425#endif`,aN=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2426 varying vec2 vUv; 2427#endif 2428#ifdef USE_MAP 2429 uniform mat3 mapTransform; 2430 varying vec2 vMapUv; 2431#endif 2432#ifdef USE_ALPHAMAP 2433 uniform mat3 alphaMapTransform; 2434 varying vec2 vAlphaMapUv; 2435#endif 2436#ifdef USE_LIGHTMAP 2437 uniform mat3 lightMapTransform; 2438 varying vec2 vLightMapUv; 2439#endif 2440#ifdef USE_AOMAP 2441 uniform mat3 aoMapTransform; 2442 varying vec2 vAoMapUv; 2443#endif 2444#ifdef USE_BUMPMAP 2445 uniform mat3 bumpMapTransform; 2446 varying vec2 vBumpMapUv; 2447#endif 2448#ifdef USE_NORMALMAP 2449 uniform mat3 normalMapTransform; 2450 varying vec2 vNormalMapUv; 2451#endif 2452#ifdef USE_DISPLACEMENTMAP 2453 uniform mat3 displacementMapTransform; 2454 varying vec2 vDisplacementMapUv; 2455#endif 2456#ifdef USE_EMISSIVEMAP 2457 uniform mat3 emissiveMapTransform; 2458 varying vec2 vEmissiveMapUv; 2459#endif 2460#ifdef USE_METALNESSMAP 2461 uniform mat3 metalnessMapTransform; 2462 varying vec2 vMetalnessMapUv; 2463#endif 2464#ifdef USE_ROUGHNESSMAP 2465 uniform mat3 roughnessMapTransform; 2466 varying vec2 vRoughnessMapUv; 2467#endif 2468#ifdef USE_ANISOTROPYMAP 2469 uniform mat3 anisotropyMapTransform; 2470 varying vec2 vAnisotropyMapUv; 2471#endif 2472#ifdef USE_CLEARCOATMAP 2473 uniform mat3 clearcoatMapTransform; 2474 varying vec2 vClearcoatMapUv; 2475#endif 2476#ifdef USE_CLEARCOAT_NORMALMAP 2477 uniform mat3 clearcoatNormalMapTransform; 2478 varying vec2 vClearcoatNormalMapUv; 2479#endif 2480#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2481 uniform mat3 clearcoatRoughnessMapTransform; 2482 varying vec2 vClearcoatRoughnessMapUv; 2483#endif 2484#ifdef USE_SHEEN_COLORMAP 2485 uniform mat3 sheenColorMapTransform; 2486 varying vec2 vSheenColorMapUv; 2487#endif 2488#ifdef USE_SHEEN_ROUGHNESSMAP 2489 uniform mat3 sheenRoughnessMapTransform; 2490 varying vec2 vSheenRoughnessMapUv; 2491#endif 2492#ifdef USE_IRIDESCENCEMAP 2493 uniform mat3 iridescenceMapTransform; 2494 varying vec2 vIridescenceMapUv; 2495#endif 2496#ifdef USE_IRIDESCENCE_THICKNESSMAP 2497 uniform mat3 iridescenceThicknessMapTransform; 2498 varying vec2 vIridescenceThicknessMapUv; 2499#endif 2500#ifdef USE_SPECULARMAP 2501 uniform mat3 specularMapTransform; 2502 varying vec2 vSpecularMapUv; 2503#endif 2504#ifdef USE_SPECULAR_COLORMAP 2505 uniform mat3 specularColorMapTransform; 2506 varying vec2 vSpecularColorMapUv; 2507#endif 2508#ifdef USE_SPECULAR_INTENSITYMAP 2509 uniform mat3 specularIntensityMapTransform; 2510 varying vec2 vSpecularIntensityMapUv; 2511#endif 2512#ifdef USE_TRANSMISSIONMAP 2513 uniform mat3 transmissionMapTransform; 2514 varying vec2 vTransmissionMapUv; 2515#endif 2516#ifdef USE_THICKNESSMAP 2517 uniform mat3 thicknessMapTransform; 2518 varying vec2 vThicknessMapUv; 2519#endif`,lN=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2520 vUv = vec3( uv, 1 ).xy; 2521#endif 2522#ifdef USE_MAP 2523 vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; 2524#endif 2525#ifdef USE_ALPHAMAP 2526 vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; 2527#endif 2528#ifdef USE_LIGHTMAP 2529 vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; 2530#endif 2531#ifdef USE_AOMAP 2532 vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; 2533#endif 2534#ifdef USE_BUMPMAP 2535 vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; 2536#endif 2537#ifdef USE_NORMALMAP 2538 vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; 2539#endif 2540#ifdef USE_DISPLACEMENTMAP 2541 vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; 2542#endif 2543#ifdef USE_EMISSIVEMAP 2544 vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; 2545#endif 2546#ifdef USE_METALNESSMAP 2547 vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; 2548#endif 2549#ifdef USE_ROUGHNESSMAP 2550 vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; 2551#endif 2552#ifdef USE_ANISOTROPYMAP 2553 vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; 2554#endif 2555#ifdef USE_CLEARCOATMAP 2556 vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; 2557#endif 2558#ifdef USE_CLEARCOAT_NORMALMAP 2559 vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; 2560#endif 2561#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2562 vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; 2563#endif
2564#ifdef USE_IRIDESCENCEMAP 2565 vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; 2566#endif 2567#ifdef USE_IRIDESCENCE_THICKNESSMAP 2568 vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; 2569#endif 2570#ifdef USE_SHEEN_COLORMAP 2571 vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; 2572#endif 2573#ifdef USE_SHEEN_ROUGHNESSMAP 2574 vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; 2575#endif 2576#ifdef USE_SPECULARMAP 2577 vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; 2578#endif 2579#ifdef USE_SPECULAR_COLORMAP 2580 vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; 2581#endif 2582#ifdef USE_SPECULAR_INTENSITYMAP 2583 vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; 2584#endif 2585#ifdef USE_TRANSMISSIONMAP 2586 vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; 2587#endif 2588#ifdef USE_THICKNESSMAP 2589 vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; 2590#endif`,cN=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 2591 vec4 worldPosition = vec4( transformed, 1.0 ); 2592 #ifdef USE_BATCHING 2593 worldPosition = batchingMatrix * worldPosition; 2594 #endif 2595 #ifdef USE_INSTANCING 2596 worldPosition = instanceMatrix * worldPosition; 2597 #endif 2598 worldPosition = modelMatrix * worldPosition; 2599#endif`;const uN=`varying vec2 vUv; 2600uniform mat3 uvTransform; 2601void main() { 2602 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 2603 gl_Position = vec4( position.xy, 1.0, 1.0 ); 2604}`,fN=`uniform sampler2D t2D; 2605uniform float backgroundIntensity; 2606varying vec2 vUv; 2607void main() { 2608 vec4 texColor = texture2D( t2D, vUv ); 2609 #ifdef DECODE_VIDEO_TEXTURE 2610 texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); 2611 #endif 2612 texColor.rgb *= backgroundIntensity; 2613 gl_FragColor = texColor; 2614 #include <tonemapping_fragment> 2615 #include <colorspace_fragment> 2616}`,dN=`varying vec3 vWorldDirection; 2617#include <common> 2618void main() { 2619 vWorldDirection = transformDirection( position, modelMatrix ); 2620 #include <begin_vertex> 2621 #include <project_vertex> 2622 gl_Position.z = gl_Position.w; 2623}`,hN=`#ifdef ENVMAP_TYPE_CUBE 2624 uniform samplerCube envMap; 2625#elif defined( ENVMAP_TYPE_CUBE_UV ) 2626 uniform sampler2D envMap; 2627#endif 2628uniform float flipEnvMap; 2629uniform float backgroundBlurriness; 2630uniform float backgroundIntensity; 2631uniform mat3 backgroundRotation; 2632varying vec3 vWorldDirection; 2633#include <cube_uv_reflection_fragment> 2634void main() { 2635 #ifdef ENVMAP_TYPE_CUBE 2636 vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); 2637 #elif defined( ENVMAP_TYPE_CUBE_UV ) 2638 vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); 2639 #else 2640 vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 2641 #endif 2642 texColor.rgb *= backgroundIntensity; 2643 gl_FragColor = texColor; 2644 #include <tonemapping_fragment> 2645 #include <colorspace_fragment> 2646}`,pN=`varying vec3 vWorldDirection; 2647#include <common> 2648void main() { 2649 vWorldDirection = transformDirection( position, modelMatrix ); 2650 #include <begin_vertex> 2651 #include <project_vertex> 2652 gl_Position.z = gl_Position.w; 2653}`,mN=`uniform samplerCube tCube; 2654uniform float tFlip; 2655uniform float opacity; 2656varying vec3 vWorldDirection; 2657void main() { 2658 vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); 2659 gl_FragColor = texColor; 2660 gl_FragColor.a *= opacity; 2661 #include <tonemapping_fragment> 2662 #include <colorspace_fragment> 2663}`,gN=`#include <common> 2664#include <batching_pars_vertex> 2665#include <uv_pars_vertex> 2666#include <displacementmap_pars_vertex> 2667#include <morphtarget_pars_vertex> 2668#include <skinning_pars_vertex> 2669#include <logdepthbuf_pars_vertex> 2670#include <clipping_planes_pars_vertex> 2671varying vec2 vHighPrecisionZW; 2672void main() { 2673 #include <uv_vertex> 2674 #include <batching_vertex> 2675 #include <skinbase_vertex> 2676 #include <morphinstance_vertex> 2677 #ifdef USE_DISPLACEMENTMAP 2678 #include <beginnormal_vertex> 2679 #include <morphnormal_vertex> 2680 #include <skinnormal_vertex> 2681 #endif 2682 #include <begin_vertex> 2683 #include <morphtarget_vertex> 2684 #include <skinning_vertex> 2685 #include <displacementmap_vertex> 2686 #include <project_vertex> 2687 #include <logdepthbuf_vertex> 2688 #include <clipping_planes_vertex> 2689 vHighPrecisionZW = gl_Position.zw; 2690}`,vN=`#if DEPTH_PACKING == 3200 2691 uniform float opacity; 2692#endif 2693#include <common> 2694#include <packing> 2695#include <uv_pars_fragment> 2696#include <map_pars_fragment> 2697#include <alphamap_pars_fragment> 2698#include <alphatest_pars_fragment> 2699#include <alphahash_pars_fragment> 2700#include <logdepthbuf_pars_fragment> 2701#include <clipping_planes_pars_fragment> 2702varying vec2 vHighPrecisionZW; 2703void main() { 2704 vec4 diffuseColor = vec4( 1.0 ); 2705 #include <clipping_planes_fragment> 2706 #if DEPTH_PACKING == 3200 2707 diffuseColor.a = opacity; 2708 #endif 2709 #include <map_fragment> 2710 #include <alphamap_fragment> 2711 #include <alphatest_fragment> 2712 #include <alphahash_fragment> 2713 #include <logdepthbuf_fragment> 2714 float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; 2715 #if DEPTH_PACKING == 3200 2716 gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); 2717 #elif DEPTH_PACKING == 3201 2718 gl_FragColor = packDepthToRGBA( fragCoordZ ); 2719 #elif DEPTH_PACKING == 3202 2720 gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 ); 2721 #elif DEPTH_PACKING == 3203 2722 gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 ); 2723 #endif 2724}`,yN=`#define DISTANCE 2725varying vec3 vWorldPosition; 2726#include <common> 2727#include <batching_pars_vertex> 2728#include <uv_pars_vertex> 2729#include <displacementmap_pars_vertex> 2730#include <morphtarget_pars_vertex> 2731#include <skinning_pars_vertex> 2732#include <clipping_planes_pars_vertex> 2733void main() { 2734 #include <uv_vertex> 2735 #include <batching_vertex> 2736 #include <skinbase_vertex> 2737 #include <morphinstance_vertex> 2738 #ifdef USE_DISPLACEMENTMAP 2739 #include <beginnormal_vertex> 2740 #include <morphnormal_vertex> 2741 #include <skinnormal_vertex> 2742 #endif 2743 #include <begin_vertex> 2744 #include <morphtarget_vertex> 2745 #include <skinning_vertex> 2746 #include <displacementmap_vertex> 2747 #include <project_vertex> 2748 #include <worldpos_vertex> 2749 #include <clipping_planes_vertex> 2750 vWorldPosition = worldPosition.xyz; 2751}`,xN=`#define DISTANCE 2752uniform vec3 referencePosition; 2753uniform float nearDistance; 2754uniform float farDistance; 2755varying vec3 vWorldPosition; 2756#include <common> 2757#include <packing> 2758#include <uv_pars_fragment> 2759#include <map_pars_fragment> 2760#include <alphamap_pars_fragment> 2761#include <alphatest_pars_fragment> 2762#include <alphahash_pars_fragment> 2763#include <clipping_planes_pars_fragment> 2764void main () { 2765 vec4 diffuseColor = vec4( 1.0 ); 2766 #include <clipping_planes_fragment> 2767 #include <map_fragment> 2768 #include <alphamap_fragment> 2769 #include <alphatest_fragment> 2770 #include <alphahash_fragment> 2771 float dist = length( vWorldPosition - referencePosition ); 2772 dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); 2773 dist = saturate( dist ); 2774 gl_FragColor = packDepthToRGBA( dist ); 2775}`,_N=`varying vec3 vWorldDirection; 2776#include <common> 2777void main() { 2778 vWorldDirection = transformDirection( position, modelMatrix ); 2779 #include <begin_vertex> 2780 #include <project_vertex> 2781}`,SN=`uniform sampler2D tEquirect; 2782varying vec3 vWorldDirection; 2783#include <common> 2784void main() { 2785 vec3 direction = normalize( vWorldDirection ); 2786 vec2 sampleUV = equirectUv( direction ); 2787 gl_FragColor = texture2D( tEquirect, sampleUV ); 2788 #include <tonemapping_fragment> 2789 #include <colorspace_fragment> 2790}`,wN=`uniform float scale; 2791attribute float lineDistance; 2792varying float vLineDistance; 2793#include <common> 2794#include <uv_pars_vertex> 2795#include <color_pars_vertex> 2796#include <fog_pars_vertex> 2797#include <morphtarget_pars_vertex> 2798#include <logdepthbuf_pars_vertex> 2799#include <clipping_planes_pars_vertex> 2800void main() { 2801 vLineDistance = scale * lineDistance; 2802 #include <uv_vertex> 2803 #include <color_vertex> 2804 #include <morphinstance_vertex> 2805 #include <morphcolor_vertex> 2806 #include <begin_vertex> 2807 #include <morphtarget_vertex> 2808 #include <project_vertex> 2809 #include <logdepthbuf_vertex> 2810 #include <clipping_planes_vertex> 2811 #include <fog_vertex> 2812}`,EN=`uniform vec3 diffuse; 2813uniform float opacity; 2814uniform float dashSize; 2815uniform float totalSize; 2816varying float vLineDistance; 2817#include <common> 2818#include <color_pars_fragment> 2819#include <uv_pars_fragment> 2820#include <map_pars_fragment> 2821#include <fog_pars_fragment> 2822#include <logdepthbuf_pars_fragment> 2823#include <clipping_planes_pars_fragment> 2824void main() { 2825 vec4 diffuseColor = vec4( diffuse, opacity ); 2826 #include <clipping_planes_fragment> 2827 if ( mod( vLineDistance, totalSize ) > dashSize ) { 2828 discard; 2829 } 2830 vec3 outgoingLight = vec3( 0.0 ); 2831 #include <logdepthbuf_fragment> 2832 #include <map_fragment> 2833 #include <color_fragment> 2834 outgoingLight = diffuseColor.rgb; 2835 #include <opaque_fragment> 2836 #include <tonemapping_fragment> 2837 #include <colorspace_fragment> 2838 #include <fog_fragment> 2839 #include <premultiplied_alpha_fragment> 2840}`,MN=`#include <common> 2841#include <batching_pars_vertex> 2842#include <uv_pars_vertex> 2843#include <envmap_pars_vertex> 2844#include <color_pars_vertex> 2845#include <fog_pars_vertex> 2846#include <morphtarget_pars_vertex> 2847#include <skinning_pars_vertex> 2848#include <logdepthbuf_pars_vertex> 2849#include <clipping_planes_pars_vertex> 2850void main() { 2851 #include <uv_vertex> 2852 #include <color_vertex> 2853 #include <morphinstance_vertex> 2854 #include <morphcolor_vertex> 2855 #include <batching_vertex> 2856 #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) 2857 #include <beginnormal_vertex> 2858 #include <morphnormal_vertex> 2859 #include <skinbase_vertex> 2860 #include <skinnormal_vertex> 2861 #include <defaultnormal_vertex> 2862 #endif 2863 #include <begin_vertex> 2864 #include <morphtarget_vertex> 2865 #include <skinning_vertex> 2866 #include <project_vertex> 2867 #include <logdepthbuf_vertex> 2868 #include <clipping_planes_vertex> 2869 #include <worldpos_vertex> 2870 #include <envmap_vertex> 2871 #include <fog_vertex> 2872}`,TN=`uniform vec3 diffuse; 2873uniform float opacity; 2874#ifndef FLAT_SHADED 2875 varying vec3 vNormal; 2876#endif 2877#include <common> 2878#include <dithering_pars_fragment> 2879#include <color_pars_fragment> 2880#include <uv_pars_fragment> 2881#include <map_pars_fragment> 2882#include <alphamap_pars_fragment> 2883#include <alphatest_pars_fragment> 2884#include <alphahash_pars_fragment> 2885#include <aomap_pars_fragment> 2886#include <lightmap_pars_fragment> 2887#include <envmap_common_pars_fragment> 2888#include <envmap_pars_fragment> 2889#include <fog_pars_fragment> 2890#include <specularmap_pars_fragment> 2891#include <logdepthbuf_pars_fragment> 2892#include <clipping_planes_pars_fragment> 2893void main() { 2894 vec4 diffuseColor = vec4( diffuse, opacity ); 2895 #include <clipping_planes_fragment> 2896 #include <logdepthbuf_fragment> 2897 #include <map_fragment> 2898 #include <color_fragment> 2899 #include <alphamap_fragment> 2900 #include <alphatest_fragment> 2901 #include <alphahash_fragment> 2902 #include <specularmap_fragment> 2903 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 2904 #ifdef USE_LIGHTMAP 2905 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 2906 reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; 2907 #else 2908 reflectedLight.indirectDiffuse += vec3( 1.0 ); 2909 #endif 2910 #include <aomap_fragment> 2911 reflectedLight.indirectDiffuse *= diffuseColor.rgb; 2912 vec3 outgoingLight = reflectedLight.indirectDiffuse; 2913 #include <envmap_fragment> 2914 #include <opaque_fragment> 2915 #include <tonemapping_fragment> 2916 #include <colorspace_fragment> 2917 #include <fog_fragment> 2918 #include <premultiplied_alpha_fragment> 2919 #include <dithering_fragment> 2920}`,bN=`#define LAMBERT 2921varying vec3 vViewPosition; 2922#include <common> 2923#include <batching_pars_vertex> 2924#include <uv_pars_vertex> 2925#include <displacementmap_pars_vertex> 2926#include <envmap_pars_vertex> 2927#include <color_pars_vertex> 2928#include <fog_pars_vertex> 2929#include <normal_pars_vertex> 2930#include <morphtarget_pars_vertex> 2931#include <skinning_pars_vertex> 2932#include <shadowmap_pars_vertex> 2933#include <logdepthbuf_pars_vertex> 2934#include <clipping_planes_pars_vertex> 2935void main() { 2936 #include <uv_vertex> 2937 #include <color_vertex> 2938 #include <morphinstance_vertex> 2939 #include <morphcolor_vertex> 2940 #include <batching_vertex> 2941 #include <beginnormal_vertex> 2942 #include <morphnormal_vertex> 2943 #include <skinbase_vertex> 2944 #include <skinnormal_vertex> 2945 #include <defaultnormal_vertex> 2946 #include <normal_vertex> 2947 #include <begin_vertex> 2948 #include <morphtarget_vertex> 2949 #include <skinning_vertex> 2950 #include <displacementmap_vertex> 2951 #include <project_vertex> 2952 #include <logdepthbuf_vertex> 2953 #include <clipping_planes_vertex> 2954 vViewPosition = - mvPosition.xyz; 2955 #include <worldpos_vertex> 2956 #include <envmap_vertex> 2957 #include <shadowmap_vertex> 2958 #include <fog_vertex> 2959}`,AN=`#define LAMBERT 2960uniform vec3 diffuse; 2961uniform vec3 emissive; 2962uniform float opacity; 2963#include <common> 2964#include <packing> 2965#include <dithering_pars_fragment> 2966#include <color_pars_fragment> 2967#include <uv_pars_fragment> 2968#include <map_pars_fragment> 2969#include <alphamap_pars_fragment> 2970#include <alphatest_pars_fragment> 2971#include <alphahash_pars_fragment> 2972#include <aomap_pars_fragment> 2973#include <lightmap_pars_fragment> 2974#include <emissivemap_pars_fragment> 2975#include <envmap_common_pars_fragment> 2976#include <envmap_pars_fragment> 2977#include <fog_pars_fragment> 2978#include <bsdfs> 2979#include <lights_pars_begin> 2980#include <normal_pars_fragment> 2981#include <lights_lambert_pars_fragment> 2982#include <shadowmap_pars_fragment> 2983#include <bumpmap_pars_fragment> 2984#include <normalmap_pars_fragment> 2985#include <specularmap_pars_fragment> 2986#include <logdepthbuf_pars_fragment> 2987#include <clipping_planes_pars_fragment> 2988void main() { 2989 vec4 diffuseColor = vec4( diffuse, opacity ); 2990 #include <clipping_planes_fragment> 2991 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 2992 vec3 totalEmissiveRadiance = emissive; 2993 #include <logdepthbuf_fragment> 2994 #include <map_fragment> 2995 #include <color_fragment> 2996 #include <alphamap_fragment> 2997 #include <alphatest_fragment> 2998 #include <alphahash_fragment> 2999 #include <specularmap_fragment> 3000 #include <normal_fragment_begin> 3001 #include <normal_fragment_maps> 3002 #include <emissivemap_fragment> 3003 #include <lights_lambert_fragment> 3004 #include <lights_fragment_begin> 3005 #include <lights_fragment_maps> 3006 #include <lights_fragment_end> 3007 #include <aomap_fragment> 3008 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 3009 #include <envmap_fragment> 3010 #include <opaque_fragment> 3011 #include <tonemapping_fragment> 3012 #include <colorspace_fragment> 3013 #include <fog_fragment> 3014 #include <premultiplied_alpha_fragment> 3015 #include <dithering_fragment> 3016}`,CN=`#define MATCAP 3017varying vec3 vViewPosition; 3018#include <common> 3019#include <batching_pars_vertex> 3020#include <uv_pars_vertex> 3021#include <color_pars_vertex> 3022#include <displacementmap_pars_vertex> 3023#include <fog_pars_vertex> 3024#include <normal_pars_vertex> 3025#include <morphtarget_pars_vertex> 3026#include <skinning_pars_vertex> 3027#include <logdepthbuf_pars_vertex> 3028#include <clipping_planes_pars_vertex> 3029void main() { 3030 #include <uv_vertex> 3031 #include <color_vertex> 3032 #include <morphinstance_vertex> 3033 #include <morphcolor_vertex> 3034 #include <batching_vertex> 3035 #include <beginnormal_vertex> 3036 #include <morphnormal_vertex> 3037 #include <skinbase_vertex> 3038 #include <skinnormal_vertex> 3039 #include <defaultnormal_vertex> 3040 #include <normal_vertex> 3041 #include <begin_vertex> 3042 #include <morphtarget_vertex> 3043 #include <skinning_vertex> 3044 #include <displacementmap_vertex> 3045 #include <project_vertex> 3046 #include <logdepthbuf_vertex> 3047 #include <clipping_planes_vertex> 3048 #include <fog_vertex> 3049 vViewPosition = - mvPosition.xyz; 3050}`,RN=`#define MATCAP 3051uniform vec3 diffuse; 3052uniform float opacity; 3053uniform sampler2D matcap; 3054varying vec3 vViewPosition; 3055#include <common> 3056#include <dithering_pars_fragment> 3057#include <color_pars_fragment> 3058#include <uv_pars_fragment> 3059#include <map_pars_fragment> 3060#include <alphamap_pars_fragment> 3061#include <alphatest_pars_fragment> 3062#include <alphahash_pars_fragment> 3063#include <fog_pars_fragment> 3064#include <normal_pars_fragment> 3065#include <bumpmap_pars_fragment> 3066#include <normalmap_pars_fragment> 3067#include <logdepthbuf_pars_fragment> 3068#include <clipping_planes_pars_fragment> 3069void main() { 3070 ve
3070c4 diffuseColor = vec4( diffuse, opacity ); 3071 #include <clipping_planes_fragment> 3072 #include <logdepthbuf_fragment> 3073 #include <map_fragment> 3074 #include <color_fragment> 3075 #include <alphamap_fragment> 3076 #include <alphatest_fragment> 3077 #include <alphahash_fragment> 3078 #include <normal_fragment_begin> 3079 #include <normal_fragment_maps> 3080 vec3 viewDir = normalize( vViewPosition ); 3081 vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); 3082 vec3 y = cross( viewDir, x ); 3083 vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; 3084 #ifdef USE_MATCAP 3085 vec4 matcapColor = texture2D( matcap, uv ); 3086 #else 3087 vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); 3088 #endif 3089 vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; 3090 #include <opaque_fragment> 3091 #include <tonemapping_fragment> 3092 #include <colorspace_fragment> 3093 #include <fog_fragment> 3094 #include <premultiplied_alpha_fragment> 3095 #include <dithering_fragment> 3096}`,PN=`#define NORMAL 3097#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3098 varying vec3 vViewPosition; 3099#endif 3100#include <common> 3101#include <batching_pars_vertex> 3102#include <uv_pars_vertex> 3103#include <displacementmap_pars_vertex> 3104#include <normal_pars_vertex> 3105#include <morphtarget_pars_vertex> 3106#include <skinning_pars_vertex> 3107#include <logdepthbuf_pars_vertex> 3108#include <clipping_planes_pars_vertex> 3109void main() { 3110 #include <uv_vertex> 3111 #include <batching_vertex> 3112 #include <beginnormal_vertex> 3113 #include <morphinstance_vertex> 3114 #include <morphnormal_vertex> 3115 #include <skinbase_vertex> 3116 #include <skinnormal_vertex> 3117 #include <defaultnormal_vertex> 3118 #include <normal_vertex> 3119 #include <begin_vertex> 3120 #include <morphtarget_vertex> 3121 #include <skinning_vertex> 3122 #include <displacementmap_vertex> 3123 #include <project_vertex> 3124 #include <logdepthbuf_vertex> 3125 #include <clipping_planes_vertex> 3126#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3127 vViewPosition = - mvPosition.xyz; 3128#endif 3129}`,LN=`#define NORMAL 3130uniform float opacity; 3131#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3132 varying vec3 vViewPosition; 3133#endif 3134#include <packing> 3135#include <uv_pars_fragment> 3136#include <normal_pars_fragment> 3137#include <bumpmap_pars_fragment> 3138#include <normalmap_pars_fragment> 3139#include <logdepthbuf_pars_fragment> 3140#include <clipping_planes_pars_fragment> 3141void main() { 3142 vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); 3143 #include <clipping_planes_fragment> 3144 #include <logdepthbuf_fragment> 3145 #include <normal_fragment_begin> 3146 #include <normal_fragment_maps> 3147 gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a ); 3148 #ifdef OPAQUE 3149 gl_FragColor.a = 1.0; 3150 #endif 3151}`,NN=`#define PHONG 3152varying vec3 vViewPosition; 3153#include <common> 3154#include <batching_pars_vertex> 3155#include <uv_pars_vertex> 3156#include <displacementmap_pars_vertex> 3157#include <envmap_pars_vertex> 3158#include <color_pars_vertex> 3159#include <fog_pars_vertex> 3160#include <normal_pars_vertex> 3161#include <morphtarget_pars_vertex> 3162#include <skinning_pars_vertex> 3163#include <shadowmap_pars_vertex> 3164#include <logdepthbuf_pars_vertex> 3165#include <clipping_planes_pars_vertex> 3166void main() { 3167 #include <uv_vertex> 3168 #include <color_vertex> 3169 #include <morphcolor_vertex> 3170 #include <batching_vertex> 3171 #include <beginnormal_vertex> 3172 #include <morphinstance_vertex> 3173 #include <morphnormal_vertex> 3174 #include <skinbase_vertex> 3175 #include <skinnormal_vertex> 3176 #include <defaultnormal_vertex> 3177 #include <normal_vertex> 3178 #include <begin_vertex> 3179 #include <morphtarget_vertex> 3180 #include <skinning_vertex> 3181 #include <displacementmap_vertex> 3182 #include <project_vertex> 3183 #include <logdepthbuf_vertex> 3184 #include <clipping_planes_vertex> 3185 vViewPosition = - mvPosition.xyz; 3186 #include <worldpos_vertex> 3187 #include <envmap_vertex> 3188 #include <shadowmap_vertex> 3189 #include <fog_vertex> 3190}`,DN=`#define PHONG 3191uniform vec3 diffuse; 3192uniform vec3 emissive; 3193uniform vec3 specular; 3194uniform float shininess; 3195uniform float opacity; 3196#include <common> 3197#include <packing> 3198#include <dithering_pars_fragment> 3199#include <color_pars_fragment> 3200#include <uv_pars_fragment> 3201#include <map_pars_fragment> 3202#include <alphamap_pars_fragment> 3203#include <alphatest_pars_fragment> 3204#include <alphahash_pars_fragment> 3205#include <aomap_pars_fragment> 3206#include <lightmap_pars_fragment> 3207#include <emissivemap_pars_fragment> 3208#include <envmap_common_pars_fragment> 3209#include <envmap_pars_fragment> 3210#include <fog_pars_fragment> 3211#include <bsdfs> 3212#include <lights_pars_begin> 3213#include <normal_pars_fragment> 3214#include <lights_phong_pars_fragment> 3215#include <shadowmap_pars_fragment> 3216#include <bumpmap_pars_fragment> 3217#include <normalmap_pars_fragment> 3218#include <specularmap_pars_fragment> 3219#include <logdepthbuf_pars_fragment> 3220#include <clipping_planes_pars_fragment> 3221void main() { 3222 vec4 diffuseColor = vec4( diffuse, opacity ); 3223 #include <clipping_planes_fragment> 3224 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3225 vec3 totalEmissiveRadiance = emissive; 3226 #include <logdepthbuf_fragment> 3227 #include <map_fragment> 3228 #include <color_fragment> 3229 #include <alphamap_fragment> 3230 #include <alphatest_fragment> 3231 #include <alphahash_fragment> 3232 #include <specularmap_fragment> 3233 #include <normal_fragment_begin> 3234 #include <normal_fragment_maps> 3235 #include <emissivemap_fragment> 3236 #include <lights_phong_fragment> 3237 #include <lights_fragment_begin> 3238 #include <lights_fragment_maps> 3239 #include <lights_fragment_end> 3240 #include <aomap_fragment> 3241 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; 3242 #include <envmap_fragment> 3243 #include <opaque_fragment> 3244 #include <tonemapping_fragment> 3245 #include <colorspace_fragment> 3246 #include <fog_fragment> 3247 #include <premultiplied_alpha_fragment> 3248 #include <dithering_fragment> 3249}`,IN=`#define STANDARD 3250varying vec3 vViewPosition; 3251#ifdef USE_TRANSMISSION 3252 varying vec3 vWorldPosition; 3253#endif 3254#include <common> 3255#include <batching_pars_vertex> 3256#include <uv_pars_vertex> 3257#include <displacementmap_pars_vertex> 3258#include <color_pars_vertex> 3259#include <fog_pars_vertex> 3260#include <normal_pars_vertex> 3261#include <morphtarget_pars_vertex> 3262#include <skinning_pars_vertex> 3263#include <shadowmap_pars_vertex> 3264#include <logdepthbuf_pars_vertex> 3265#include <clipping_planes_pars_vertex> 3266void main() { 3267 #include <uv_vertex> 3268 #include <color_vertex> 3269 #include <morphinstance_vertex> 3270 #include <morphcolor_vertex> 3271 #include <batching_vertex> 3272 #include <beginnormal_vertex> 3273 #include <morphnormal_vertex> 3274 #include <skinbase_vertex> 3275 #include <skinnormal_vertex> 3276 #include <defaultnormal_vertex> 3277 #include <normal_vertex> 3278 #include <begin_vertex> 3279 #include <morphtarget_vertex> 3280 #include <skinning_vertex> 3281 #include <displacementmap_vertex> 3282 #include <project_vertex> 3283 #include <logdepthbuf_vertex> 3284 #include <clipping_planes_vertex> 3285 vViewPosition = - mvPosition.xyz; 3286 #include <worldpos_vertex> 3287 #include <shadowmap_vertex> 3288 #include <fog_vertex> 3289#ifdef USE_TRANSMISSION 3290 vWorldPosition = worldPosition.xyz; 3291#endif 3292}`,UN=`#define STANDARD 3293#ifdef PHYSICAL 3294 #define IOR 3295 #define USE_SPECULAR 3296#endif 3297uniform vec3 diffuse; 3298uniform vec3 emissive; 3299uniform float roughness; 3300uniform float metalness; 3301uniform float opacity; 3302#ifdef IOR 3303 uniform float ior; 3304#endif 3305#ifdef USE_SPECULAR 3306 uniform float specularIntensity; 3307 uniform vec3 specularColor; 3308 #ifdef USE_SPECULAR_COLORMAP 3309 uniform sampler2D specularColorMap; 3310 #endif 3311 #ifdef USE_SPECULAR_INTENSITYMAP 3312 uniform sampler2D specularIntensityMap; 3313 #endif 3314#endif 3315#ifdef USE_CLEARCOAT 3316 uniform float clearcoat; 3317 uniform float clearcoatRoughness; 3318#endif 3319#ifdef USE_DISPERSION 3320 uniform float dispersion; 3321#endif
3322#ifdef USE_IRIDESCENCE 3323 uniform float iridescence; 3324 uniform float iridescenceIOR; 3325 uniform float iridescenceThicknessMinimum; 3326 uniform float iridescenceThicknessMaximum; 3327#endif 3328#ifdef USE_SHEEN 3329 uniform vec3 sheenColor; 3330 uniform float sheenRoughness; 3331 #ifdef USE_SHEEN_COLORMAP 3332 uniform sampler2D sheenColorMap; 3333 #endif 3334 #ifdef USE_SHEEN_ROUGHNESSMAP 3335 uniform sampler2D sheenRoughnessMap; 3336 #endif 3337#endif 3338#ifdef USE_ANISOTROPY 3339 uniform vec2 anisotropyVector; 3340 #ifdef USE_ANISOTROPYMAP 3341 uniform sampler2D anisotropyMap; 3342 #endif 3343#endif 3344varying vec3 vViewPosition; 3345#include <common> 3346#include <packing> 3347#include <dithering_pars_fragment> 3348#include <color_pars_fragment> 3349#include <uv_pars_fragment> 3350#include <map_pars_fragment> 3351#include <alphamap_pars_fragment> 3352#include <alphatest_pars_fragment> 3353#include <alphahash_pars_fragment> 3354#include <aomap_pars_fragment> 3355#include <lightmap_pars_fragment> 3356#include <emissivemap_pars_fragment> 3357#include <iridescence_fragment> 3358#include <cube_uv_reflection_fragment> 3359#include <envmap_common_pars_fragment> 3360#include <envmap_physical_pars_fragment> 3361#include <fog_pars_fragment> 3362#include <lights_pars_begin> 3363#include <normal_pars_fragment> 3364#include <lights_physical_pars_fragment> 3365#include <transmission_pars_fragment> 3366#include <shadowmap_pars_fragment> 3367#include <bumpmap_pars_fragment> 3368#include <normalmap_pars_fragment> 3369#include <clearcoat_pars_fragment> 3370#include <iridescence_pars_fragment> 3371#include <roughnessmap_pars_fragment> 3372#include <metalnessmap_pars_fragment> 3373#include <logdepthbuf_pars_fragment> 3374#include <clipping_planes_pars_fragment> 3375void main() { 3376 vec4 diffuseColor = vec4( diffuse, opacity ); 3377 #include <clipping_planes_fragment> 3378 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3379 vec3 totalEmissiveRadiance = emissive; 3380 #include <logdepthbuf_fragment> 3381 #include <map_fragment> 3382 #include <color_fragment> 3383 #include <alphamap_fragment> 3384 #include <alphatest_fragment> 3385 #include <alphahash_fragment> 3386 #include <roughnessmap_fragment> 3387 #include <metalnessmap_fragment> 3388 #include <normal_fragment_begin> 3389 #include <normal_fragment_maps> 3390 #include <clearcoat_normal_fragment_begin> 3391 #include <clearcoat_normal_fragment_maps> 3392 #include <emissivemap_fragment> 3393 #include <lights_physical_fragment> 3394 #include <lights_fragment_begin> 3395 #include <lights_fragment_maps> 3396 #include <lights_fragment_end> 3397 #include <aomap_fragment> 3398 vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; 3399 vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; 3400 #include <transmission_fragment> 3401 vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; 3402 #ifdef USE_SHEEN 3403 float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); 3404 outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect; 3405 #endif 3406 #ifdef USE_CLEARCOAT 3407 float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); 3408 vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); 3409 outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; 3410 #endif 3411 #include <opaque_fragment> 3412 #include <tonemapping_fragment> 3413 #include <colorspace_fragment> 3414 #include <fog_fragment> 3415 #include <premultiplied_alpha_fragment> 3416 #include <dithering_fragment> 3417}`,ON=`#define TOON 3418varying vec3 vViewPosition; 3419#include <common> 3420#include <batching_pars_vertex> 3421#include <uv_pars_vertex> 3422#include <displacementmap_pars_vertex> 3423#include <color_pars_vertex> 3424#include <fog_pars_vertex> 3425#include <normal_pars_vertex> 3426#include <morphtarget_pars_vertex> 3427#include <skinning_pars_vertex> 3428#include <shadowmap_pars_vertex> 3429#include <logdepthbuf_pars_vertex> 3430#include <clipping_planes_pars_vertex> 3431void main() { 3432 #include <uv_vertex> 3433 #include <color_vertex> 3434 #include <morphinstance_vertex> 3435 #include <morphcolor_vertex> 3436 #include <batching_vertex> 3437 #include <beginnormal_vertex> 3438 #include <morphnormal_vertex> 3439 #include <skinbase_vertex> 3440 #include <skinnormal_vertex> 3441 #include <defaultnormal_vertex> 3442 #include <normal_vertex> 3443 #include <begin_vertex> 3444 #include <morphtarget_vertex> 3445 #include <skinning_vertex> 3446 #include <displacementmap_vertex> 3447 #include <project_vertex> 3448 #include <logdepthbuf_vertex> 3449 #include <clipping_planes_vertex> 3450 vViewPosition = - mvPosition.xyz; 3451 #include <worldpos_vertex> 3452 #include <shadowmap_vertex> 3453 #include <fog_vertex> 3454}`,FN=`#define TOON 3455uniform vec3 diffuse; 3456uniform vec3 emissive; 3457uniform float opacity; 3458#include <common> 3459#include <packing> 3460#include <dithering_pars_fragment> 3461#include <color_pars_fragment> 3462#include <uv_pars_fragment> 3463#include <map_pars_fragment> 3464#include <alphamap_pars_fragment> 3465#include <alphatest_pars_fragment> 3466#include <alphahash_pars_fragment> 3467#include <aomap_pars_fragment> 3468#include <lightmap_pars_fragment> 3469#include <emissivemap_pars_fragment> 3470#include <gradientmap_pars_fragment> 3471#include <fog_pars_fragment> 3472#include <bsdfs> 3473#include <lights_pars_begin> 3474#include <normal_pars_fragment> 3475#include <lights_toon_pars_fragment> 3476#include <shadowmap_pars_fragment> 3477#include <bumpmap_pars_fragment> 3478#include <normalmap_pars_fragment> 3479#include <logdepthbuf_pars_fragment> 3480#include <clipping_planes_pars_fragment> 3481void main() { 3482 vec4 diffuseColor = vec4( diffuse, opacity ); 3483 #include <clipping_planes_fragment> 3484 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3485 vec3 totalEmissiveRadiance = emissive; 3486 #include <logdepthbuf_fragment> 3487 #include <map_fragment> 3488 #include <color_fragment> 3489 #include <alphamap_fragment> 3490 #include <alphatest_fragment> 3491 #include <alphahash_fragment> 3492 #include <normal_fragment_begin> 3493 #include <normal_fragment_maps> 3494 #include <emissivemap_fragment> 3495 #include <lights_toon_fragment> 3496 #include <lights_fragment_begin> 3497 #include <lights_fragment_maps> 3498 #include <lights_fragment_end> 3499 #include <aomap_fragment> 3500 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 3501 #include <opaque_fragment> 3502 #include <tonemapping_fragment> 3503 #include <colorspace_fragment> 3504 #include <fog_fragment> 3505 #include <premultiplied_alpha_fragment> 3506 #include <dithering_fragment> 3507}`,kN=`uniform float size; 3508uniform float scale; 3509#include <common> 3510#include <color_pars_vertex> 3511#include <fog_pars_vertex> 3512#include <morphtarget_pars_vertex> 3513#include <logdepthbuf_pars_vertex> 3514#include <clipping_planes_pars_vertex> 3515#ifdef USE_POINTS_UV 3516 varying vec2 vUv; 3517 uniform mat3 uvTransform; 3518#endif 3519void main() { 3520 #ifdef USE_POINTS_UV 3521 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 3522 #endif 3523 #include <color_vertex> 3524 #include <morphinstance_vertex> 3525 #include <morphcolor_vertex> 3526 #include <begin_vertex> 3527 #include <morphtarget_vertex> 3528 #include <project_vertex> 3529 gl_PointSize = size; 3530 #ifdef USE_SIZEATTENUATION 3531 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 3532 if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); 3533 #endif 3534 #include <logdepthbuf_vertex> 3535 #include <clipping_planes_vertex> 3536 #include <worldpos_vertex> 3537 #include <fog_vertex> 3538}`,zN=`uniform vec3 diffuse; 3539uniform float opacity; 3540#include <common> 3541#include <color_pars_fragment> 3542#include <map_particle_pars_fragment> 3543#include <alphatest_pars_fragment> 3544#include <alphahash_pars_fragment> 3545#include <fog_pars_fragment> 3546#include <logdepthbuf_pars_fragment> 3547#include <clipping_planes_pars_fragment> 3548void main() { 3549 vec4 diffuseColor = vec4( diffuse, opacity ); 3550 #include <clipping_planes_fragment> 3551 vec3 outgoingLight = vec3( 0.0 ); 3552 #include <logdepthbuf_fragment> 3553 #include <map_particle_fragment> 3554 #include <color_fragment> 3555 #include <alphatest_fragment> 3556 #include <alphahash_fragment> 3557 outgoingLight = diffuseColor.rgb; 3558 #include <opaque_fragment> 3559 #include <tonemapping_fragment> 3560 #include <colorspace_fragment> 3561 #include <fog_fragment> 3562 #include <premultiplied_alpha_fragment> 3563}`,BN=`#include <common> 3564#include <batching_pars_vertex> 3565#include <fog_pars_vertex> 3566#include <morphtarget_pars_vertex> 3567#include <skinning_pars_vertex> 3568#include <logdepthbuf_pars_vertex> 3569#include <shadowmap_pars_vertex> 3570void main() { 3571 #include <batching_vertex> 3572 #include <beginnormal_vertex> 3573 #include <morphinstance_vertex> 3574 #include <morphnormal_vertex> 3575 #include <skinbase_vertex> 3576 #include <skinnormal_vertex> 3577 #include <defaultnormal_vertex> 3578 #include <begin_vertex> 3579 #include <morphtarget_vertex> 3580 #include <skinning_vertex> 3581 #include <project_vertex> 3582 #include <logdepthbuf_vertex> 3583 #include <worldpos_vertex> 3584 #include <shadowmap_vertex> 3585 #include <fog_vertex> 3586}`,HN=`uniform vec3 color; 3587uniform float opacity; 3588#include <common> 3589#include <packing> 3590#include <fog_pars_fragment> 3591#include <bsdfs> 3592#include <lights_pars_begin> 3593#include <logdepthbuf_pars_fragment> 3594#include <shadowmap_pars_fragment> 3595#include <shadowmask_pars_fragment> 3596void main() { 3597 #include <logdepthbuf_fragment> 3598 gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); 3599 #include <tonemapping_fragment> 3600 #include <colorspace_fragment> 3601 #include <fog_fragment> 3602}`,VN=`uniform float rotation; 3603uniform vec2 center; 3604#include <common> 3605#include <uv_pars_vertex> 3606#include <fog_pars_vertex> 3607#include <logdepthbuf_pars_vertex> 3608#include <clipping_planes_pars_vertex> 3609void main() { 3610 #include <uv_vertex> 3611 vec4 mvPosition = modelViewMatrix[ 3 ]; 3612 vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) ); 3613 #ifndef USE_SIZEATTENUATION 3614 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 3615 if ( isPerspective ) scale *= - mvPosition.z; 3616 #endif 3617 vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; 3618 vec2 rotatedPosition; 3619 rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; 3620 rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; 3621 mvPosition.xy += rotatedPosition; 3622 gl_Position = projectionMatrix * mvPosition; 3623 #include <logdepthbuf_vertex> 3624 #include <clipping_planes_vertex> 3625 #include <fog_vertex> 3626}`,GN=`uniform vec3 diffuse; 3627uniform float opacity; 3628#include <common> 3629#include <uv_pars_fragment> 3630#include <map_pars_fragment> 3631#include <alphamap_pars_fragment> 3632#include <alphatest_pars_fragment> 3633#include <alphahash_pars_fragment> 3634#include <fog_pars_fragment> 3635#include <logdepthbuf_pars_fragment> 3636#include <clipping_planes_pars_fragment> 3637void main() { 3638 vec4 diffuseColor = vec4( diffuse, opacity ); 3639 #include <clipping_planes_fragment> 3640 vec3 outgoingLight = vec3( 0.0 ); 3641 #include <logdepthbuf_fragment> 3642 #include <map_fragment> 3643 #include <alphamap_fragment> 3644 #include <alphatest_fragment> 3645 #include <alphahash_fragment> 3646 outgoingLight = diffuseColor.rgb; 3647 #include <opaque_fragment> 3648 #include <tonemapping_fragment> 3649 #include <colorspace_fragment> 3650 #include <fog_fragment> 3651}`,Qe={alphahash_fragment:f2,alphahash_pars_fragment:d2,alphamap_fragment:h2,alphamap_pars_fragment:p2,alphatest_fragment:m2,alphatest_pars_fragment:g2,aomap_fragment:v2,aomap_pars_fragment:y2,batching_pars_vertex:x2,batching_vertex:_2,begin_vertex:S2,beginnormal_vertex:w2,bsdfs:E2,iridescence_fragment:M2,bumpmap_pars_fragment:T2,clipping_planes_fragment:b2,clipping_planes_pars_fragment:A2,clipping_planes_pars_vertex:C2,clipping_planes_vertex:R2,color_fragment:P2,color_pars_fragment:L2,color_pars_vertex:N2,color_vertex:D2,common:I2,cube_uv_reflection_fragment:U2,defaultnormal_vertex:O2,displacementmap_pars_vertex:F2,displacementmap_vertex:k2,emissivemap_fragment:z2,emissivemap_pars_fragment:B2,colorspace_fragment:H2,colorspace_pars_fragment:V2,envmap_fragment:G2,envmap_common_pars_fragment:W2,envmap_pars_fragment:X2,envmap_pars_vertex:j2,envmap_physical_pars_fragment:iL,envmap_vertex:Y2,fog_vertex:q2,fog_pars_vertex:$2,fog_fragment:Z2,fog_pars_fragment:K2,gradientmap_pars_fragment:Q2,lightmap_pars_fragment:J2,lights_lambert_fragment:eL,lights_lambert_pars_fragment:tL,lights_pars_begin:nL,lights_toon_fragment:rL,lights_toon_pars_fragment:sL,lights_phong_fragment:oL,lights_phong_pars_fragment:aL,lights_physical_fragment:lL,lights_physical_pars_fragment:cL,lights_fragment_begin:uL,lights_fragment_maps:fL,lights_fragment_end:dL,logdepthbuf_fragment:hL,logdepthbuf_pars_fragment:pL,logdepthbuf_pars_vertex:mL,logdepthbuf_vertex:gL,map_fragment:vL,map_pars_fragment:yL,map_particle_fragment:xL,map_particle_pars_fragment:_L,metalnessmap_fragment:SL,metalnessmap_pars_fragment:wL,morphinstance_vertex:EL,morphcolor_vertex:ML,morphnormal_vertex:TL,morphtarget_pars_vertex:bL,morphtarget_vertex:AL,normal_fragment_begin:CL,normal_fragment_maps:RL,normal_pars_fragment:PL,normal_pars_vertex:LL,normal_vertex:NL,normalmap_pars_fragment:DL,clearcoat_normal_fragment_begin:IL,clearcoat_normal_fragment_maps:UL,clearcoat_pars_fragment:OL,iridescence_pars_fragment:FL,opaque_fragment:kL,packing:zL,premultiplied_alpha_fragment:BL,project_vertex:HL,dithering_fragment:VL,dithering_pars_fragment:GL,roughnessmap_fragment:WL,roughnessmap_pars_fragment:XL,shadowmap_pars_fragment:jL,shadowmap_pars_vertex:YL,shadowmap_vertex:qL,shadowmask_pars_fragment:$L,skinbase_vertex:ZL,skinning_pars_vertex:KL,skinning_vertex:QL,skinnormal_vertex:JL,specularmap_fragment:eN,specularmap_pars_fragment:tN,tonemapping_fragment:nN,tonemapping_pars_fragment:iN,transmission_fragment:rN,transmission_pars_fragment:sN,uv_pars_fragment:oN,uv_pars_vertex:aN,uv_vertex:lN,worldpos_vertex:cN,background_vert:uN,background_frag:fN,backgroundCube_vert:dN,backgroundCube_frag:hN,cube_vert:pN,cube_frag:mN,depth_vert:gN,depth_frag:vN,distanceRGBA_vert:yN,distanceRGBA_frag:xN,equirect_vert:_N,equirect_frag:SN,linedashed_vert:wN,linedashed_frag:EN,meshbasic_vert:MN,meshbasic_frag:TN,meshlambert_vert:bN,meshlambert_frag:AN,meshmatcap_vert:CN,meshmatcap_frag:RN,meshnormal_vert:PN,meshnormal_frag:LN,meshphong_vert:NN,meshphong_frag:DN,meshphysical_vert:IN,meshphysical_frag:UN,meshtoon_vert:ON,meshtoon_frag:FN,points_vert:kN,points_frag:zN,shadow_vert:BN,shadow_frag:HN,sprite_vert:VN,sprite_frag:GN},Ce={common:{diffuse:{value:new at(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new je},alphaMap:{value:null},alphaMapTransform:{value:new je},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new je}},envmap:{envMap:{value:null},envMapRotation:{value:new je},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new je}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new je}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new je},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new je},normalScale:{value:new xe(1,1)}}
vendor: 4,814 bytes, line 3651
3651,displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new je},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new je}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new je}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new je}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new at(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 at(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new je},alphaTest:{value:0},uvTransform:{value:new je}},sprite:{diffuse:{value:new at(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new je},alphaMap:{value:null},alphaMapTransform:{value:new je},alphaTest:{value:0}}},Si={basic:{uniforms:on([Ce.common,Ce.specularmap,Ce.envmap,Ce.aomap,Ce.lightmap,Ce.fog]),vertexShader:Qe.meshbasic_vert,fragmentShader:Qe.meshbasic_frag},lambert:{uniforms:on([Ce.common,Ce.specularmap,Ce.envmap,Ce.aomap,Ce.lightmap,Ce.emissivemap,Ce.bumpmap,Ce.normalmap,Ce.displacementmap,Ce.fog,Ce.lights,{emissive:{value:new at(0)}}]),vertexShader:Qe.meshlambert_vert,fragmentShader:Qe.meshlambert_frag},phong:{uniforms:on([Ce.common,Ce.specularmap,Ce.envmap,Ce.aomap,Ce.lightmap,Ce.emissivemap,Ce.bumpmap,Ce.normalmap,Ce.displacementmap,Ce.fog,Ce.lights,{emissive:{value:new at(0)},specular:{value:new at(1118481)},shininess:{value:30}}]),vertexShader:Qe.meshphong_vert,fragmentShader:Qe.meshphong_frag},standard:{uniforms:on([Ce.common,Ce.envmap,Ce.aomap,Ce.lightmap,Ce.emissivemap,Ce.bumpmap,Ce.normalmap,Ce.displacementmap,Ce.roughnessmap,Ce.metalnessmap,Ce.fog,Ce.lights,{emissive:{value:new at(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Qe.meshphysical_vert,fragmentShader:Qe.meshphysical_frag},toon:{uniforms:on([Ce.common,Ce.aomap,Ce.lightmap,Ce.emissivemap,Ce.bumpmap,Ce.normalmap,Ce.displacementmap,Ce.gradientmap,Ce.fog,Ce.lights,{emissive:{value:new at(0)}}]),vertexShader:Qe.meshtoon_vert,fragmentShader:Qe.meshtoon_frag},matcap:{uniforms:on([Ce.common,Ce.bumpmap,Ce.normalmap,Ce.displacementmap,Ce.fog,{matcap:{value:null}}]),vertexShader:Qe.meshmatcap_vert,fragmentShader:Qe.meshmatcap_frag},points:{uniforms:on([Ce.points,Ce.fog]),vertexShader:Qe.points_vert,fragmentShader:Qe.points_frag},dashed:{uniforms:on([Ce.common,Ce.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Qe.linedashed_vert,fragmentShader:Qe.linedashed_frag},depth:{uniforms:on([Ce.common,Ce.displacementmap]),vertexShader:Qe.depth_vert,fragmentShader:Qe.depth_frag},normal:{uniforms:on([Ce.common,Ce.bumpmap,Ce.normalmap,Ce.displacementmap,{opacity:{value:1}}]),vertexShader:Qe.meshnormal_vert,fragmentShader:Qe.meshnormal_frag},sprite:{uniforms:on([Ce.sprite,Ce.fog]),vertexShader:Qe.sprite_vert,fragmentShader:Qe.sprite_frag},background:{uniforms:{uvTransform:{value:new je},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Qe.background_vert,fragmentShader:Qe.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new je}},vertexShader:Qe.backgroundCube_vert,fragmentShader:Qe.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Qe.cube_vert,fragmentShader:Qe.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Qe.equirect_vert,fragmentShader:Qe.equirect_frag}
vendor: 4,526 bytes, line 3651
3651,distanceRGBA:{uniforms:on([Ce.common,Ce.displacementmap,{referencePosition:{value:new Z},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Qe.distanceRGBA_vert,fragmentShader:Qe.distanceRGBA_frag},shadow:{uniforms:on([Ce.lights,Ce.fog,{color:{value:new at(0)},opacity:{value:1}}]),vertexShader:Qe.shadow_vert,fragmentShader:Qe.shadow_frag}};Si.physical={uniforms:on([Si.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new je},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new je},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new je},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new je},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new je},sheen:{value:0},sheenColor:{value:new at(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new je},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new je},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new je},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new je},attenuationDistance:{value:0},attenuationColor:{value:new at(0)},specularColor:{value:new at(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new je},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new je},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new je}}]),vertexShader:Qe.meshphysical_vert,fragmentShader:Qe.meshphysical_frag};const Ic={r:0,b:0,g:0},cs=new Di,WN=new Mt;function XN(t,e,n,i,r,s,o){const a=new at(0);let l=s===!0?0:1,c,u,f=null,h=0,p=null;function v(g){let x=g.isScene===!0?g.background:null;return x&&x.isTexture&&(x=(g.backgroundBlurriness>0?n:e).get(x)),x}function y(g){let x=!1;const b=v(g);b===null?d(a,l):b&&b.isColor&&(d(b,1),x=!0);const A=t.xr.getEnvironmentBlendMode();A==="additive"?i.buffers.color.setClear(0,0,0,1,o):A==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(t.autoClear||x)&&(i.buffers.depth.setTest(!0),i.buffers.depth.setMask(!0),i.buffers.color.setMask(!0),t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil))}function m(g,x){const b=v(x);b&&(b.isCubeTexture||b.mapping===hf)?(u===void 0&&(u=new Ti(new Vl(1,1,1),new $r({name:"BackgroundCubeMaterial",uniforms:ta(Si.backgroundCube.uniforms),vertexShader:Si.backgroundCube.vertexShader,fragmentShader:Si.backgroundCube.fragmentShader,side:_n,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(A,M,R){this.matrixWorld.copyPosition(R.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(u)),cs.copy(x.backgroundRotation),cs.x*=-1,cs.y*=-1,cs.z*=-1,b.isCubeTexture&&b.isRenderTargetTexture===!1&&(cs.y*=-1,cs.z*=-1),u.material.uniforms.envMap.value=b,u.material.uniforms.flipEnvMap.value=b.isCubeTexture&&b.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(WN.makeRotationFromEuler(cs)),u.material.toneMapped=ot.getTransfer(b.colorSpace)!==dt,(f!==b||h!==b.version||p!==t.toneMapping)&&(u.material.needsUpdate=!0,f=b,h=b.version,p=t.toneMapping),u.layers.enableAll(),g.unshift(u,u.geometry,u.material,0,0,null)):b&&b.isTexture&&(c===void 0&&(c=new Ti(new pf(2,2),new $r({name:"BackgroundMaterial",uniforms:ta(Si.background.uniforms),vertexShader:Si.background.vertexShader,fragmentShader:Si.background.fragmentShader,side:qr,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(c)),c.material.uniforms.t2D.value=b,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=ot.getTransfer(b.colorSpace)!==dt,b.matrixAutoUpdate===!0&&b.updateMatrix(),c.material.uniforms.uvTransform.value.copy(b.matrix),(f!==b||h!==b.ver
vendor: 5,492 bytes, line 3651
3651sion||p!==t.toneMapping)&&(c.material.needsUpdate=!0,f=b,h=b.version,p=t.toneMapping),c.layers.enableAll(),g.unshift(c,c.geometry,c.material,0,0,null))}function d(g,x){g.getRGB(Ic,_w(t)),i.buffers.color.setClear(Ic.r,Ic.g,Ic.b,x,o)}function _(){u!==void 0&&(u.geometry.dispose(),u.material.dispose(),u=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return a},setClearColor:function(g,x=1){a.set(g),l=x,d(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(g){l=g,d(a,l)},render:y,addToRenderList:m,dispose:_}}function jN(t,e){const n=t.getParameter(t.MAX_VERTEX_ATTRIBS),i={},r=h(null);let s=r,o=!1;function a(S,U,z,V,H){let Q=!1;const j=f(V,z,U);s!==j&&(s=j,c(s.object)),Q=p(S,V,z,H),Q&&v(S,V,z,H),H!==null&&e.update(H,t.ELEMENT_ARRAY_BUFFER),(Q||o)&&(o=!1,x(S,U,z,V),H!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e.get(H).buffer))}function l(){return t.createVertexArray()}function c(S){return t.bindVertexArray(S)}function u(S){return t.deleteVertexArray(S)}function f(S,U,z){const V=z.wireframe===!0;let H=i[S.id];H===void 0&&(H={},i[S.id]=H);let Q=H[U.id];Q===void 0&&(Q={},H[U.id]=Q);let j=Q[V];return j===void 0&&(j=h(l()),Q[V]=j),j}function h(S){const U=[],z=[],V=[];for(let H=0;H<n;H++)U[H]=0,z[H]=0,V[H]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:U,enabledAttributes:z,attributeDivisors:V,object:S,attributes:{},index:null}}function p(S,U,z,V){const H=s.attributes,Q=U.attributes;let j=0;const W=z.getAttributes();for(const N in W)if(W[N].location>=0){const se=H[N];let me=Q[N];if(me===void 0&&(N==="instanceMatrix"&&S.instanceMatrix&&(me=S.instanceMatrix),N==="instanceColor"&&S.instanceColor&&(me=S.instanceColor)),se===void 0||se.attribute!==me||me&&se.data!==me.data)return!0;j++}return s.attributesNum!==j||s.index!==V}function v(S,U,z,V){const H={},Q=U.attributes;let j=0;const W=z.getAttributes();for(const N in W)if(W[N].location>=0){let se=Q[N];se===void 0&&(N==="instanceMatrix"&&S.instanceMatrix&&(se=S.instanceMatrix),N==="instanceColor"&&S.instanceColor&&(se=S.instanceColor));const me={};me.attribute=se,se&&se.data&&(me.data=se.data),H[N]=me,j++}s.attributes=H,s.attributesNum=j,s.index=V}function y(){const S=s.newAttributes;for(let U=0,z=S.length;U<z;U++)S[U]=0}function m(S){d(S,0)}function d(S,U){const z=s.newAttributes,V=s.enabledAttributes,H=s.attributeDivisors;z[S]=1,V[S]===0&&(t.enableVertexAttribArray(S),V[S]=1),H[S]!==U&&(t.vertexAttribDivisor(S,U),H[S]=U)}function _(){const S=s.newAttributes,U=s.enabledAttributes;for(let z=0,V=U.length;z<V;z++)U[z]!==S[z]&&(t.disableVertexAttribArray(z),U[z]=0)}function g(S,U,z,V,H,Q,j){j===!0?t.vertexAttribIPointer(S,U,z,H,Q):t.vertexAttribPointer(S,U,z,V,H,Q)}function x(S,U,z,V){y();const H=V.attributes,Q=z.getAttributes(),j=U.defaultAttributeValues;for(const W in Q){const N=Q[W];if(N.location>=0){let K=H[W];if(K===void 0&&(W==="instanceMatrix"&&S.instanceMatrix&&(K=S.instanceMatrix),W==="instanceColor"&&S.instanceColor&&(K=S.instanceColor)),K!==void 0){const se=K.normalized,me=K.itemSize,Ae=e.get(K);if(Ae===void 0)continue;const He=Ae.buffer,k=Ae.type,O=Ae.bytesPerElement,D=k===t.INT||k===t.UNSIGNED_INT||K.gpuType===Vm;if(K.isInterleavedBufferAttribute){const C=K.data,ne=C.stride,de=K.offset;if(C.isInstancedInterleavedBuffer){for(let Y=0;Y<N.locationSize;Y++)d(N.location+Y,C.meshPerAttribute);S.isInstancedMesh!==!0&&V._maxInstanceCount===void 0&&(V._maxInstanceCount=C.meshPerAttribute*C.count)}else for(let Y=0;Y<N.locationSize;Y++)m(N.location+Y);t.bindBuffer(t.ARRAY_BUFFER,He);for(let Y=0;Y<N.locationSize;Y++)g(N.location+Y,me/N.locationSize,k,se,ne*O,(de+me/N.locationSize*Y)*O,D)}else{if(K.isInstancedBufferAttribute){for(let C=0;C<N.locationSize;C++)d(N.location+C,K.meshPerAttribute);S.isInstancedMesh!==!0&&V._maxInstanceCount===void 0&&(V._maxInstanceCount=K.meshPerAttribute*K.count)}else for(let C=0;C<N.locationSize;C++)m(N.location+C);t.bindBuffer(t.ARRAY_BUFFER,He);for(let C=0;C<N.locationSize;C++)g(N.location+C,me/N.locationSize,k,se,me*O,me/N.locationSize*C*O,D)}}else if(j!==void 0){const se=j[W];if(se!==void 0)switch(se.length){case 2:t.vertexAttrib2fv(N.location,se);break;case 3:t.vertexAttrib3fv(N.location,se);break;case 4:t.vertexAttrib4fv(N.location,se);break;default:t.vertexAttrib1fv(N.location,se)}}}}_()}function b(){R();for(const S in i){const U=i[S];for(const z in U){const V=U[z];for(const H in V)u(V[H].object),delete V[H];delete U[z]}delete i[S]}}function A(S){if(i[S.id]===void 0)return;const U=i[S.id];for(const z in U){const V=U[z];for(const H in V)u(V[H].object),delete V[H];delete U[z]}delete i[S.id]}function M(S){for(const U in i){const z=i[U];if(z[S.id]===void 0)continue;const V=z[S.id];for(const H in V)u(V[H].object),delete V[H];delete z[S.id]}}function R(){T(),o=!0,s!==r&&(s=r,c(s.object))}function T(){r.geometry=null,r.program=null,r.wireframe=!1}return{setup:a,reset:R,resetDefaultState:T,dispose:b,releaseStatesOfGeometry:A,releaseStatesOfProgram:M,initAttributes:y,enableAttribute:m,disableUnusedAttributes:_}}function YN(t,e,n){let i;function r(c){i=c}function s(c,u){t.drawArrays(i,c,u),n.update(u,i,1)}function o(c,u,f){f!==0&&(t.drawArraysInstanced(i,c,u,f),n.update(u,i,f))}function a(c,u,f){if(f===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(i,c,0,u,0,f);let p=0;for(let v=0;v<f;v++)p+=u[v];n.update(p,i,1)}function l(c,u,f,h){if(f===0)return;const p=e.get("WEBGL_multi_draw");if(p===null)for(let v=0;v<c.length;v++)o(c[v],u[v],h[v]);
vendor: 3,863 bytes, line 3651
3651else{p.multiDrawArraysInstancedWEBGL(i,c,0,u,0,h,0,f);let v=0;for(let y=0;y<f;y++)v+=u[y]*h[y];n.update(v,i,1)}}this.setMode=r,this.render=s,this.renderInstances=o,this.renderMultiDraw=a,this.renderMultiDrawInstances=l}function qN(t,e,n,i){let r;function s(){if(r!==void 0)return r;if(e.has("EXT_texture_filter_anisotropic")===!0){const M=e.get("EXT_texture_filter_anisotropic");r=t.getParameter(M.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r}function o(M){return!(M!==oi&&i.convert(M)!==t.getParameter(t.IMPLEMENTATION_COLOR_READ_FORMAT))}function a(M){const R=M===zl&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(M!==Ni&&i.convert(M)!==t.getParameter(t.IMPLEMENTATION_COLOR_READ_TYPE)&&M!==Ki&&!R)}function l(M){if(M==="highp"){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";M="mediump"}return M==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=n.precision!==void 0?n.precision:"highp";const u=l(c);u!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",u,"instead."),c=u);const f=n.logarithmicDepthBuffer===!0,h=n.reverseDepthBuffer===!0&&e.has("EXT_clip_control"),p=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),v=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),y=t.getParameter(t.MAX_TEXTURE_SIZE),m=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),d=t.getParameter(t.MAX_VERTEX_ATTRIBS),_=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),g=t.getParameter(t.MAX_VARYING_VECTORS),x=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),b=v>0,A=t.getParameter(t.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:f,reverseDepthBuffer:h,maxTextures:p,maxVertexTextures:v,maxTextureSize:y,maxCubemapSize:m,maxAttributes:d,maxVertexUniforms:_,maxVaryings:g,maxFragmentUniforms:x,vertexTextures:b,maxSamples:A}}function $N(t){const e=this;let n=null,i=0,r=!1,s=!1;const o=new hs,a=new je,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(f,h){const p=f.length!==0||h||i!==0||r;return r=h,i=f.length,p},this.beginShadows=function(){s=!0,u(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(f,h){n=u(f,h,0)},this.setState=function(f,h,p){const v=f.clippingPlanes,y=f.clipIntersection,m=f.clipShadows,d=t.get(f);if(!r||v===null||v.length===0||s&&!m)s?u(null):c();else{const _=s?0:i,g=_*4;let x=d.clippingState||null;l.value=x,x=u(v,h,g,p);for(let b=0;b!==g;++b)x[b]=n[b];d.clippingState=x,this.numIntersection=y?this.numPlanes:0,this.numPlanes+=_}};function c(){l.value!==n&&(l.value=n,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function u(f,h,p,v){const y=f!==null?f.length:0;let m=null;if(y!==0){if(m=l.value,v!==!0||m===null){const d=p+y*4,_=h.matrixWorldInverse;a.getNormalMatrix(_),(m===null||m.length<d)&&(m=new Float32Array(d));for(let g=0,x=p;g!==y;++g,x+=4)o.copy(f[g]).applyMatrix4(_,a),o.normal.toArray(m,x),m[x+3]=o.constant}l.value=m,l.needsUpdate=!0}return e.numPlanes=y,e.numIntersection=0,m}}function ZN(t){let e=new WeakMap;function n(o,a){return a===jh?o.mapping=Qo:a===Yh&&(o.mapping=Jo),o}function i(o){if(o&&o.isTexture){const a=o.mapping;if(a===jh||a===Yh)if(e.has(o)){const l=e.get(o).texture;return n(l,o.mapping)}else{const l=o.image;if(l&&l.height>0){const c=new hP(l.height);return c.fromEquirectangularTexture(t,o),e.set(o,c),o.addEventListener("dispose",r),n(c.texture,o.mapping)}else return null}}return o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:i,dispose:s}}
vendor: 8,704 bytes, lines 3651-3726
3651const yo=4,T0=[.125,.215,.35,.446,.526,.582],gs=20,Cd=new Dw,b0=new at;let Rd=null,Pd=0,Ld=0,Nd=!1;const ps=(1+Math.sqrt(5))/2,io=1/ps,A0=[new Z(-ps,io,0),new Z(ps,io,0),new Z(-io,0,ps),new Z(io,0,ps),new Z(0,ps,-io),new Z(0,ps,io),new Z(-1,1,-1),new Z(1,1,-1),new Z(-1,1,1),new Z(1,1,1)],KN=new Z;class C0{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,i=.1,r=100,s={}){const{size:o=256,position:a=KN}=s;Rd=this._renderer.getRenderTarget(),Pd=this._renderer.getActiveCubeFace(),Ld=this._renderer.getActiveMipmapLevel(),Nd=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(o);const l=this._allocateTargets();return l.depthBuffer=!0,this._sceneToCubeUV(e,i,r,l,a),n>0&&this._blur(l,0,0,n),this._applyPMREM(l),this._cleanup(l),l}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=L0(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=P0(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(Rd,Pd,Ld),this._renderer.xr.enabled=Nd,e.scissorTest=!1,Uc(e,0,0,e.width,e.height)}_fromTexture(e,n){e.mapping===Qo||e.mapping===Jo?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),Rd=this._renderer.getRenderTarget(),Pd=this._renderer.getActiveCubeFace(),Ld=this._renderer.getActiveMipmapLevel(),Nd=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const i=n||this._allocateTargets();return this._textureToCubeUV(e,i),this._applyPMREM(i),this._cleanup(i),i}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),n=4*this._cubeSize,i={magFilter:Mi,minFilter:Mi,generateMipmaps:!1,type:zl,format:oi,colorSpace:ea,depthBuffer:!1},r=R0(e,n,i);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==n){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=R0(e,n,i);const{_lodMax:s}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=QN(s)),this._blurMaterial=JN(s,e,n)}return r}_compileMaterial(e){const n=new Ti(this._lodPlanes[0],e);this._renderer.compile(n,Cd)}_sceneToCubeUV(e,n,i,r,s){const l=new Gn(90,1,n,i),c=[1,-1,1,1,1,1],u=[1,1,1,-1,-1,-1],f=this._renderer,h=f.autoClear,p=f.toneMapping;f.getClearColor(b0),f.toneMapping=Vr,f.autoClear=!1;const v=new vw({name:"PMREM.Background",side:_n,depthWrite:!1,depthTest:!1}),y=new Ti(new Vl,v);let m=!1;const d=e.background;d?d.isColor&&(v.color.copy(d),e.background=null,m=!0):(v.color.copy(b0),m=!0);for(let _=0;_<6;_++){const g=_%3;g===0?(l.up.set(0,c[_],0),l.position.set(s.x,s.y,s.z),l.lookAt(s.x+u[_],s.y,s.z)):g===1?(l.up.set(0,0,c[_]),l.position.set(s.x,s.y,s.z),l.lookAt(s.x,s.y+u[_],s.z)):(l.up.set(0,c[_],0),l.position.set(s.x,s.y,s.z),l.lookAt(s.x,s.y,s.z+u[_]));const x=this._cubeSize;Uc(r,g*x,_>2?x:0,x,x),f.setRenderTarget(r),m&&f.render(y,l),f.render(e,l)}y.geometry.dispose(),y.material.dispose(),f.toneMapping=p,f.autoClear=h,e.background=d}_textureToCubeUV(e,n){const i=this._renderer,r=e.mapping===Qo||e.mapping===Jo;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=L0()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=P0());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Ti(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;Uc(n,0,0,3*l,2*l),i.setRenderTarget(n),i.render(o,Cd)}_applyPMREM(e){const n=this._renderer,i=n.autoClear;n.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s<r;s++){const o=Math.sqrt(this._sigmas[s]*this._sigmas[s]-this._sigmas[s-1]*this._sigmas[s-1]),a=A0[(r-s-1)%A0.length];this._blur(e,s-1,s,o,a)}n.autoClear=i}_blur(e,n,i,r,s){const o=this._pingPongRenderTarget;this._halfBlur(e,o,n,i,r,"latitudinal",s),this._halfBlur(o,e,i,i,r,"longitudinal",s)}_halfBlur(e,n,i,r,s,o,a){const l=this._renderer,c=this._blurMaterial;o!=="latitudinal"&&o!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const u=3,f=new Ti(this._lodPlanes[r],c),h=c.uniforms,p=this._sizeLods[i]-1,v=isFinite(s)?Math.PI/(2*p):2*Math.PI/(2*gs-1),y=s/v,m=isFinite(s)?1+Math.floor(u*y):gs;m>gs&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${gs}`);const d=[];let _=0;for(let M=0;M<gs;++M){const R=M/y,T=Math.exp(-R*R/2);d.push(T),M===0?_+=T:M<m&&(_+=2*T)}for(let M=0;M<d.length;M++)d[M]=d[M]/_;h.envMap.value=e.texture,h.samples.value=m,h.weights.value=d,h.latitudinal.value=o==="latitudinal",a&&(h.poleAxis.value=a);const{_lodMax:g}=this;h.dTheta.value=v,h.mipInt.value=g-i;const x=this._sizeLods[r],b=3*x*(r>g-yo?r-g+yo:0),A=4*(this._cubeSize-x);Uc(n,b,A,3*x,2*x),l.setRenderTarget(n),l.render(f,Cd)}}function QN(t){const e=[],n=[],i=[];let r=t;const s=t-yo+1+T0.length;for(let o=0;o<s;o++){const a=Math.pow(2,r);n.push(a);let l=1/a;o>t-yo?l=T0[o-t+yo-1]:o===0&&(l=0),i.push(l);const c=1/(a-2),u=-c,f=1+c,h=[u,u,f,u,f,f,u,u,f,f,u,f],p=6,v=6,y=3,m=2,d=1,_=new Float32Array(y*v*p),g=new Float32Array(m*v*p),x=new Float32Array(d*v*p);for(let A=0;A<p;A++){const M=A%3*2/3-1,R=A>2?0:-1,T=[M,R,0,M+2/3,R,0,M+2/3,R+1,0,M,R,0,M+2/3,R+1,0,M,R+1,0];_.set(T,y*v*A),g.set(h,m*v*A);const S=[A,A,A,A,A,A];x.set(S,d*v*A)}const b=new lr;b.setAttribute("position",new Ri(_,y)),b.setAttribute("uv",new Ri(g,m)),b.setAttribute("faceIndex",new Ri(x,d)),e.push(b),r>yo&&r--}return{lodPlanes:e,sizeLods:n,sigmas:i}}function R0(t,e,n){const i=new Os(t,e,n);return i.texture.mapping=hf,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function Uc(t,e,n,i,r){t.viewport.set(e,n,i,r),t.scissor.set(e,n,i,r)}function JN(t,e,n){const i=new Float32Array(gs),r=new Z(0,1,0);return new $r({name:"SphericalGaussianBlur",defines:{n:gs,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:tg(),fragmentShader:` 3652 3653 precision mediump float; 3654 precision mediump int; 3655 3656 varying vec3 vOutputDirection; 3657 3658 uniform sampler2D envMap; 3659 uniform int samples; 3660 uniform float weights[ n ]; 3661 uniform bool latitudinal; 3662 uniform float dTheta; 3663 uniform float mipInt; 3664 uniform vec3 poleAxis; 3665 3666 #define ENVMAP_TYPE_CUBE_UV 3667 #include <cube_uv_reflection_fragment> 3668 3669 vec3 getSample( float theta, vec3 axis ) { 3670 3671 float cosTheta = cos( theta ); 3672 // Rodrigues' axis-angle rotation 3673 vec3 sampleDirection = vOutputDirection * cosTheta 3674 + cross( axis, vOutputDirection ) * sin( theta ) 3675 + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); 3676 3677 return bilinearCubeUV( envMap, sampleDirection, mipInt ); 3678 3679 } 3680 3681 void main() { 3682 3683 vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); 3684 3685 if ( all( equal( axis, vec3( 0.0 ) ) ) ) { 3686 3687 axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); 3688 3689 } 3690 3691 axis = normalize( axis ); 3692 3693 gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 3694 gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); 3695 3696 for ( int i = 1; i < n; i++ ) { 3697 3698 if ( i >= samples ) { 3699 3700 break; 3701 3702 } 3703 3704 float theta = dTheta * float( i ); 3705 gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); 3706 gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); 3707 3708 } 3709 3710 } 3711 `,blending:Hr,depthTest:!1,depthWrite:!1})}function P0(){return new $r({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:tg(),fragmentShader:` 3712 3713 precision mediump float; 3714 precision mediump int; 3715 3716 varying vec3 vOutputDirection; 3717 3718 uniform sampler2D envMap; 3719 3720 #include <common> 3721 3722 void main() { 3723 3724 vec3 outputDirection = normalize( vOutputDirection ); 3725 vec2 uv = equirectUv( outputDirection ); 3726
3727 gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); 3728 3729 } 3730 `,blending:Hr,depthTest:!1,depthWrite:!1})}function L0(){return new $r({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:tg(),fragmentShader:` 3731 3732 precision mediump float; 3733 precision mediump int; 3734 3735 uniform float flipEnvMap; 3736 3737 varying vec3 vOutputDirection; 3738 3739 uniform samplerCube envMap; 3740 3741 void main() { 3742 3743 gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); 3744 3745 } 3746 `,blending:Hr,depthTest:!1,depthWrite:!1})}function tg(){return` 3747 3748 precision mediump float; 3749 precision mediump int; 3750 3751 attribute float faceIndex; 3752 3753 varying vec3 vOutputDirection; 3754 3755 // RH coordinate system; PMREM face-indexing convention 3756 vec3 getDirection( vec2 uv, float face ) { 3757 3758 uv = 2.0 * uv - 1.0; 3759 3760 vec3 direction = vec3( uv, 1.0 ); 3761 3762 if ( face == 0.0 ) { 3763 3764 direction = direction.zyx; // ( 1, v, u ) pos x 3765 3766 } else if ( face == 1.0 ) { 3767 3768 direction = direction.xzy; 3769 direction.xz *= -1.0; // ( -u, 1, -v ) pos y 3770 3771 } else if ( face == 2.0 ) { 3772 3773 direction.x *= -1.0; // ( -u, v, 1 ) pos z 3774 3775 } else if ( face == 3.0 ) { 3776 3777 direction = direction.zyx; 3778 direction.xz *= -1.0; // ( -1, v, -u ) neg x 3779 3780 } else if ( face == 4.0 ) { 3781 3782 direction = direction.xzy; 3783 direction.xy *= -1.0; // ( -u, -1, v ) neg y 3784 3785 } else if ( face == 5.0 ) { 3786 3787 direction.z *= -1.0; // ( u, v, -1 ) neg z 3788 3789 } 3790 3791 return direction; 3792 3793 } 3794 3795 void main() { 3796 3797 vOutputDirection = getDirection( uv, faceIndex ); 3798 gl_Position = vec4( position, 1.0 ); 3799 3800 } 3801 `}function eD(t){let e=new WeakMap,n=null;function i(a){if(a&&a.isTexture){const l=a.mapping,c=l===jh||l===Yh,u=l===Qo||l===Jo;if(c||u){let f=e.get(a);const h=f!==void 0?f.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==h)return n===null&&(n=new C0(t)),f=c?n.fromEquirectangular(a,f):n.fromCubemap(a,f),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),f.texture;if(f!==void 0)return f.texture;{const p=a.image;return c&&p&&p.height>0||u&&p&&r(p)?(n===null&&(n=new C0(t)),f=c?n.fromEquirectangular(a):n.fromCubemap(a),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),a.addEventListener("dispose",s),f.texture):null}}}return a}function r(a){let l=0;const c=6;for(let u=0;u<c;u++)a[u]!==void 0&&l++;return l===c}function s(a){const l=a.target;l.removeEventListener("dispose",s);const c=e.get(l);c!==void 0&&(e.delete(l),c.dispose())}function o(){e=new WeakMap,n!==null&&(n.dispose(),n=null)}return{get:i,dispose:o}}function tD(t){const e={};function n(i){if(e[i]!==void 0)return e[i];let r;switch(i){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(i)}return e[i]=r,r}return{has:function(i){return n(i)!==null},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(i){const r=n(i);return r===null&&iu("THREE.WebGLRenderer: "+i+" extension not supported."),r}}}function nD(t,e,n,i){const r={},s=new WeakMap;function o(f){const h=f.target;h.index!==null&&e.remove(h.index);for(const v in h.attributes)e.remove(h.attributes[v]);h.removeEventListener("dispose",o),delete r[h.id];const p=s.get(h);p&&(e.remove(p),s.delete(h)),i.releaseStatesOfGeometry(h),h.isInstancedBufferGeometry===!0&&delete h._maxInstanceCount,n.memory.geometries--}function a(f,h){return r[h.id]===!0||(h.addEventListener("dispose",o),r[h.id]=!0,n.memory.geometries++),h}function l(f){const h=f.attributes;for(const p in h)e.update(h[p],t.ARRAY_BUFFER)}function c(f){const h=[],p=f.index,v=f.attributes.position;let y=0;if(p!==null){const _=p.array;y=p.version;for(let g=0,x=_.length;g<x;g+=3){const b=_[g+0],A=_[g+1],M=_[g+2];h.push(b,A,A,M,M,b)}}else if(v!==void 0){const _=v.array;y=v.version;for(let g=0,x=_.length/3-1;g<x;g+=3){const b=g+0,A=g+1,M=g+2;h.push(b,A,A,M,M,b)}}else return;const m=new(hw(h)?xw:yw)(h,1);m.version=y;const d=s.get(f);d&&e.remove(d),s.set(f,m)}function u(f){const h=s.get(f);if(h){const p=f.index;p!==null&&h.version<p.version&&c(f)}else c(f);return s.get(f)}return{get:a,update:l,getWireframeAttribute:u}}function iD(t,e,n){let i;function r(h){i=h}let s,o;function a(h){s=h.type,o=h.bytesPerElement}function l(h,p){t.drawElements(i,p,s,h*o),n.update(p,i,1)}function c(h,p,v){v!==0&&(t.drawElementsInstanced(i,p,s,h*o,v),n.update(p,i,v))}function u(h,p,v){if(v===0)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(i,p,0,s,h,0,v);let m=0;for(let d=0;d<v;d++)m+=p[d];n.update(m,i,1)}function f(h,p,v,y){if(v===0)return;const m=e.get("WEBGL_multi_draw");if(m===null)for(let d=0;d<h.length;d++)c(h[d]/o,p[d],y[d]);
vendor: 17,423 bytes, lines 3801-3836
3801else{m.multiDrawElementsInstancedWEBGL(i,p,0,s,h,0,y,0,v);let d=0;for(let _=0;_<v;_++)d+=p[_]*y[_];n.update(d,i,1)}}this.setMode=r,this.setIndex=a,this.render=l,this.renderInstances=c,this.renderMultiDraw=u,this.renderMultiDrawInstances=f}function rD(t){const e={geometries:0,textures:0},n={frame:0,calls:0,triangles:0,points:0,lines:0};function i(s,o,a){switch(n.calls++,o){case t.TRIANGLES:n.triangles+=a*(s/3);break;case t.LINES:n.lines+=a*(s/2);break;case t.LINE_STRIP:n.lines+=a*(s-1);break;case t.LINE_LOOP:n.lines+=a*s;break;case t.POINTS:n.points+=a*s;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",o);break}}function r(){n.calls=0,n.triangles=0,n.points=0,n.lines=0}return{memory:e,render:n,programs:null,autoReset:!0,reset:r,update:i}}function sD(t,e,n){const i=new WeakMap,r=new Rt;function s(o,a,l){const c=o.morphTargetInfluences,u=a.morphAttributes.position||a.morphAttributes.normal||a.morphAttributes.color,f=u!==void 0?u.length:0;let h=i.get(a);if(h===void 0||h.count!==f){let S=function(){R.dispose(),i.delete(a),a.removeEventListener("dispose",S)};var p=S;h!==void 0&&h.texture.dispose();const v=a.morphAttributes.position!==void 0,y=a.morphAttributes.normal!==void 0,m=a.morphAttributes.color!==void 0,d=a.morphAttributes.position||[],_=a.morphAttributes.normal||[],g=a.morphAttributes.color||[];let x=0;v===!0&&(x=1),y===!0&&(x=2),m===!0&&(x=3);let b=a.attributes.position.count*x,A=1;b>e.maxTextureSize&&(A=Math.ceil(b/e.maxTextureSize),b=e.maxTextureSize);const M=new Float32Array(b*A*4*f),R=new pw(M,b,A,f);R.type=Ki,R.needsUpdate=!0;const T=x*4;for(let U=0;U<f;U++){const z=d[U],V=_[U],H=g[U],Q=b*A*4*U;for(let j=0;j<z.count;j++){const W=j*T;v===!0&&(r.fromBufferAttribute(z,j),M[Q+W+0]=r.x,M[Q+W+1]=r.y,M[Q+W+2]=r.z,M[Q+W+3]=0),y===!0&&(r.fromBufferAttribute(V,j),M[Q+W+4]=r.x,M[Q+W+5]=r.y,M[Q+W+6]=r.z,M[Q+W+7]=0),m===!0&&(r.fromBufferAttribute(H,j),M[Q+W+8]=r.x,M[Q+W+9]=r.y,M[Q+W+10]=r.z,M[Q+W+11]=H.itemSize===4?r.w:1)}}h={count:f,texture:R,size:new xe(b,A)},i.set(a,h),a.addEventListener("dispose",S)}if(o.isInstancedMesh===!0&&o.morphTexture!==null)l.getUniforms().setValue(t,"morphTexture",o.morphTexture,n);else{let v=0;for(let m=0;m<c.length;m++)v+=c[m];const y=a.morphTargetsRelative?1:1-v;l.getUniforms().setValue(t,"morphTargetBaseInfluence",y),l.getUniforms().setValue(t,"morphTargetInfluences",c)}l.getUniforms().setValue(t,"morphTargetsTexture",h.texture,n),l.getUniforms().setValue(t,"morphTargetsTextureSize",h.size)}return{update:s}}function oD(t,e,n,i){let r=new WeakMap;function s(l){const c=i.render.frame,u=l.geometry,f=e.get(l,u);if(r.get(f)!==c&&(e.update(f),r.set(f,c)),l.isInstancedMesh&&(l.hasEventListener("dispose",a)===!1&&l.addEventListener("dispose",a),r.get(l)!==c&&(n.update(l.instanceMatrix,t.ARRAY_BUFFER),l.instanceColor!==null&&n.update(l.instanceColor,t.ARRAY_BUFFER),r.set(l,c))),l.isSkinnedMesh){const h=l.skeleton;r.get(h)!==c&&(h.update(),r.set(h,c))}return f}function o(){r=new WeakMap}function a(l){const c=l.target;c.removeEventListener("dispose",a),n.remove(c.instanceMatrix),c.instanceColor!==null&&n.remove(c.instanceColor)}return{update:s,dispose:o}}const Uw=new Sn,N0=new Ew(1,1),Ow=new pw,Fw=new $R,kw=new ww,D0=[],I0=[],U0=new Float32Array(16),O0=new Float32Array(9),F0=new Float32Array(4);function da(t,e,n){const i=t[0];if(i<=0||i>0)return t;const r=e*n;let s=D0[r];if(s===void 0&&(s=new Float32Array(r),D0[r]=s),e!==0){i.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=n,t[o].toArray(s,a)}return s}function kt(t,e){if(t.length!==e.length)return!1;for(let n=0,i=t.length;n<i;n++)if(t[n]!==e[n])return!1;return!0}function zt(t,e){for(let n=0,i=e.length;n<i;n++)t[n]=e[n]}function mf(t,e){let n=I0[e];n===void 0&&(n=new Int32Array(e),I0[e]=n);for(let i=0;i!==e;++i)n[i]=t.allocateTextureUnit();return n}function aD(t,e){const n=this.cache;n[0]!==e&&(t.uniform1f(this.addr,e),n[0]=e)}function lD(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2f(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(kt(n,e))return;t.uniform2fv(this.addr,e),zt(n,e)}}function cD(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3f(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else if(e.r!==void 0)(n[0]!==e.r||n[1]!==e.g||n[2]!==e.b)&&(t.uniform3f(this.addr,e.r,e.g,e.b),n[0]=e.r,n[1]=e.g,n[2]=e.b);else{if(kt(n,e))return;t.uniform3fv(this.addr,e),zt(n,e)}}function uD(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(kt(n,e))return;t.uniform4fv(this.addr,e),zt(n,e)}}function fD(t,e){const n=this.cache,i=e.elements;if(i===void 0){if(kt(n,e))return;t.uniformMatrix2fv(this.addr,!1,e),zt(n,e)}else{if(kt(n,i))return;F0.set(i),t.uniformMatrix2fv(this.addr,!1,F0),zt(n,i)}}function dD(t,e){const n=this.cache,i=e.elements;if(i===void 0){if(kt(n,e))return;t.uniformMatrix3fv(this.addr,!1,e),zt(n,e)}else{if(kt(n,i))return;O0.set(i),t.uniformMatrix3fv(this.addr,!1,O0),zt(n,i)}}function hD(t,e){const n=this.cache,i=e.elements;if(i===void 0){if(kt(n,e))return;t.uniformMatrix4fv(this.addr,!1,e),zt(n,e)}else{if(kt(n,i))return;U0.set(i),t.uniformMatrix4fv(this.addr,!1,U0),zt(n,i)}}function pD(t,e){const n=this.cache;n[0]!==e&&(t.uniform1i(this.addr,e),n[0]=e)}function mD(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2i(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(kt(n,e))return;t.uniform2iv(this.addr,e),zt(n,e)}}function gD(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3i(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(kt(n,e))return;t.uniform3iv(this.addr,e),zt(n,e)}}function vD(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4i(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(kt(n,e))return;t.uniform4iv(this.addr,e),zt(n,e)}}function yD(t,e){const n=this.cache;n[0]!==e&&(t.uniform1ui(this.addr,e),n[0]=e)}function xD(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2ui(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(kt(n,e))return;t.uniform2uiv(this.addr,e),zt(n,e)}}function _D(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3ui(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(kt(n,e))return;t.uniform3uiv(this.addr,e),zt(n,e)}}function SD(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4ui(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(kt(n,e))return;t.uniform4uiv(this.addr,e),zt(n,e)}}function wD(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r);let s;this.type===t.SAMPLER_2D_SHADOW?(N0.compareFunction=dw,s=N0):s=Uw,n.setTexture2D(e||s,r)}function ED(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture3D(e||Fw,r)}function MD(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTextureCube(e||kw,r)}function TD(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture2DArray(e||Ow,r)}function bD(t){switch(t){case 5126:return aD;case 35664:return lD;case 35665:return cD;case 35666:return uD;case 35674:return fD;case 35675:return dD;case 35676:return hD;case 5124:case 35670:return pD;case 35667:case 35671:return mD;case 35668:case 35672:return gD;case 35669:case 35673:return vD;case 5125:return yD;case 36294:return xD;case 36295:return _D;case 36296:return SD;case 35678:case 36198:case 36298:case 36306:case 35682:return wD;case 35679:case 36299:case 36307:return ED;case 35680:case 36300:case 36308:case 36293:return MD;case 36289:case 36303:case 36311:case 36292:return TD}}function AD(t,e){t.uniform1fv(this.addr,e)}function CD(t,e){const n=da(e,this.size,2);t.uniform2fv(this.addr,n)}function RD(t,e){const n=da(e,this.size,3);t.uniform3fv(this.addr,n)}function PD(t,e){const n=da(e,this.size,4);t.uniform4fv(this.addr,n)}function LD(t,e){const n=da(e,this.size,4);t.uniformMatrix2fv(this.addr,!1,n)}function ND(t,e){const n=da(e,this.size,9);t.uniformMatrix3fv(this.addr,!1,n)}function DD(t,e){const n=da(e,this.size,16);t.uniformMatrix4fv(this.addr,!1,n)}function ID(t,e){t.uniform1iv(this.addr,e)}function UD(t,e){t.uniform2iv(this.addr,e)}function OD(t,e){t.uniform3iv(this.addr,e)}function FD(t,e){t.uniform4iv(this.addr,e)}function kD(t,e){t.uniform1uiv(this.addr,e)}function zD(t,e){t.uniform2uiv(this.addr,e)}function BD(t,e){t.uniform3uiv(this.addr,e)}function HD(t,e){t.uniform4uiv(this.addr,e)}function VD(t,e,n){const i=this.cache,r=e.length,s=mf(n,r);kt(i,s)||(t.uniform1iv(this.addr,s),zt(i,s));for(let o=0;o!==r;++o)n.setTexture2D(e[o]||Uw,s[o])}function GD(t,e,n){const i=this.cache,r=e.length,s=mf(n,r);kt(i,s)||(t.uniform1iv(this.addr,s),zt(i,s));for(let o=0;o!==r;++o)n.setTexture3D(e[o]||Fw,s[o])}function WD(t,e,n){const i=this.cache,r=e.length,s=mf(n,r);kt(i,s)||(t.uniform1iv(this.addr,s),zt(i,s));for(let o=0;o!==r;++o)n.setTextureCube(e[o]||kw,s[o])}function XD(t,e,n){const i=this.cache,r=e.length,s=mf(n,r);kt(i,s)||(t.uniform1iv(this.addr,s),zt(i,s));for(let o=0;o!==r;++o)n.setTexture2DArray(e[o]||Ow,s[o])}function jD(t){switch(t){case 5126:return AD;case 35664:return CD;case 35665:return RD;case 35666:return PD;case 35674:return LD;case 35675:return ND;case 35676:return DD;case 5124:case 35670:return ID;case 35667:case 35671:return UD;case 35668:case 35672:return OD;case 35669:case 35673:return FD;case 5125:return kD;case 36294:return zD;case 36295:return BD;case 36296:return HD;case 35678:case 36198:case 36298:case 36306:case 35682:return VD;case 35679:case 36299:case 36307:return GD;case 35680:case 36300:case 36308:case 36293:return WD;case 36289:case 36303:case 36311:case 36292:return XD}}class YD{constructor(e,n,i){this.id=e,this.addr=i,this.cache=[],this.type=n.type,this.setValue=bD(n.type)}}class qD{constructor(e,n,i){this.id=e,this.addr=i,this.cache=[],this.type=n.type,this.size=n.size,this.setValue=jD(n.type)}}class $D{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,n,i){const r=this.seq;for(let s=0,o=r.length;s!==o;++s){const a=r[s];a.setValue(e,n[a.id],i)}}}const Dd=/(\w+)(\])?(\[|\.)?/g;function k0(t,e){t.seq.push(e),t.map[e.id]=e}function ZD(t,e,n){const i=t.name,r=i.length;for(Dd.lastIndex=0;;){const s=Dd.exec(i),o=Dd.lastIndex;let a=s[1];const l=s[2]==="]",c=s[3];if(l&&(a=a|0),c===void 0||c==="["&&o+2===r){k0(n,c===void 0?new YD(a,t,e):new qD(a,t,e));break}else{let f=n.map[a];f===void 0&&(f=new $D(a),k0(n,f)),n=f}}}class ru{constructor(e,n){this.seq=[],this.map={};const i=e.getProgramParameter(n,e.ACTIVE_UNIFORMS);for(let r=0;r<i;++r){const s=e.getActiveUniform(n,r),o=e.getUniformLocation(n,s.name);ZD(s,o,this)}}setValue(e,n,i,r){const s=this.map[n];s!==void 0&&s.setValue(e,i,r)}setOptional(e,n,i){const r=n[i];r!==void 0&&this.setValue(e,i,r)}static upload(e,n,i,r){for(let s=0,o=n.length;s!==o;++s){const a=n[s],l=i[a.id];l.needsUpdate!==!1&&a.setValue(e,l.value,r)}}static seqWithValue(e,n){const i=[];for(let r=0,s=e.length;r!==s;++r){const o=e[r];o.id in n&&i.push(o)}return i}}function z0(t,e,n){const i=t.createShader(e);return t.shaderSource(i,n),t.compileShader(i),i}const KD=37297;let QD=0;function JD(t,e){const n=t.split(` 3802`),i=[],r=Math.max(e-6,0),s=Math.min(e+6,n.length);for(let o=r;o<s;o++){const a=o+1;i.push(`${a===e?">":" "} ${a}: ${n[o]}`)}return i.join(` 3803`)}const B0=new je;function e3(t){ot._getMatrix(B0,ot.workingColorSpace,t);const e=`mat3( ${B0.elements.map(n=>n.toFixed(4))} )`;switch(ot.getTransfer(t)){case Iu:return[e,"LinearTransferOETF"];case dt:return[e,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",t),[e,"LinearTransferOETF"]}}function H0(t,e,n){const i=t.getShaderParameter(e,t.COMPILE_STATUS),r=t.getShaderInfoLog(e).trim();if(i&&r==="")return"";const s=/ERROR: 0:(\d+)/.exec(r);if(s){const o=parseInt(s[1]);return n.toUpperCase()+` 3804 3805`+r+` 3806 3807`+JD(t.getShaderSource(e),o)}else return r}function t3(t,e){const n=e3(e);return[`vec4 ${t}( vec4 value ) {`,` return ${n[1]}( vec4( value.rgb * ${n[0]}, value.a ) );`,"}"].join(` 3808`)}function n3(t,e){let n;switch(e){case SR:n="Linear";break;case wR:n="Reinhard";break;case ER:n="Cineon";break;case MR:n="ACESFilmic";break;case bR:n="AgX";break;case AR:n="Neutral";break;case TR:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}const Oc=new Z;function i3(){ot.getLuminanceCoefficients(Oc);const t=Oc.x.toFixed(4),e=Oc.y.toFixed(4),n=Oc.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${t}, ${e}, ${n} );`," return dot( weights, rgb );","}"].join(` 3809`)}function r3(t){return[t.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",t.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Va).join(` 3810`)}function s3(t){const e=[];for(const n in t){const i=t[n];i!==!1&&e.push("#define "+n+" "+i)}return e.join(` 3811`)}function o3(t,e){const n={},i=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let r=0;r<i;r++){const s=t.getActiveAttrib(e,r),o=s.name;let a=1;s.type===t.FLOAT_MAT2&&(a=2),s.type===t.FLOAT_MAT3&&(a=3),s.type===t.FLOAT_MAT4&&(a=4),n[o]={type:s.type,location:t.getAttribLocation(e,o),locationSize:a}}return n}function Va(t){return t!==""}function V0(t,e){const n=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function G0(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const a3=/^[ \t]*#include +<([\w\d./]+)>/gm;function bp(t){return t.replace(a3,c3)}const l3=new Map;function c3(t,e){let n=Qe[e];if(n===void 0){const i=l3.get(e);if(i!==void 0)n=Qe[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return bp(n)}const u3=/#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 W0(t){return t.replace(u3,f3)}function f3(t,e,n,i){let r="";for(let s=parseInt(e);s<parseInt(n);s++)r+=i.replace(/\[\s*i\s*\]/g,"[ "+s+" ]").replace(/UNROLLED_LOOP_INDEX/g,s);return r}function X0(t){let e=`precision ${t.precision} float; 3812 precision ${t.precision} int; 3813 precision ${t.precision} sampler2D; 3814 precision ${t.precision} samplerCube; 3815 precision ${t.precision} sampler3D; 3816 precision ${t.precision} sampler2DArray; 3817 precision ${t.precision} sampler2DShadow; 3818 precision ${t.precision} samplerCubeShadow; 3819 precision ${t.precision} sampler2DArrayShadow; 3820 precision ${t.precision} isampler2D; 3821 precision ${t.precision} isampler3D; 3822 precision ${t.precision} isamplerCube; 3823 precision ${t.precision} isampler2DArray; 3824 precision ${t.precision} usampler2D; 3825 precision ${t.precision} usampler3D; 3826 precision ${t.precision} usamplerCube; 3827 precision ${t.precision} usampler2DArray; 3828 `;return t.precision==="highp"?e+=` 3829#define HIGH_PRECISION`:t.precision==="mediump"?e+=` 3830#define MEDIUM_PRECISION`:t.precision==="lowp"&&(e+=` 3831#define LOW_PRECISION`),e}function d3(t){let e="SHADOWMAP_TYPE_BASIC";return t.shadowMapType===JS?e="SHADOWMAP_TYPE_PCF":t.shadowMapType===ew?e="SHADOWMAP_TYPE_PCF_SOFT":t.shadowMapType===Xi&&(e="SHADOWMAP_TYPE_VSM"),e}function h3(t){let e="ENVMAP_TYPE_CUBE";if(t.envMap)switch(t.envMapMode){case Qo:case Jo:e="ENVMAP_TYPE_CUBE";break;case hf:e="ENVMAP_TYPE_CUBE_UV";break}return e}function p3(t){let e="ENVMAP_MODE_REFLECTION";if(t.envMap)switch(t.envMapMode){case Jo:e="ENVMAP_MODE_REFRACTION";break}return e}function m3(t){let e="ENVMAP_BLENDING_NONE";if(t.envMap)switch(t.combine){case tw:e="ENVMAP_BLENDING_MULTIPLY";break;case xR:e="ENVMAP_BLENDING_MIX";break;case _R:e="ENVMAP_BLENDING_ADD";break}return e}function g3(t){const e=t.envMapCubeUVHeight;if(e===null)return null;const n=Math.log2(e)-2,i=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,n),7*16)),texelHeight:i,maxMip:n}}function v3(t,e,n,i){const r=t.getContext(),s=n.defines;let o=n.vertexShader,a=n.fragmentShader;const l=d3(n),c=h3(n),u=p3(n),f=m3(n),h=g3(n),p=r3(n),v=s3(s),y=r.createProgram();let m,d,_=n.glslVersion?"#version "+n.glslVersion+` 3832`:"";n.isRawShaderMaterial?(m=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v].filter(Va).join(` 3833`),m.length>0&&(m+=` 3834`),d=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v].filter(Va).join(` 3835`),d.length>0&&(d+=` 3836`)):(m=[X0(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,n.extensionCl
vendor: 5,425 bytes, lines 3836-3838
3836ipCullDistance?"#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&&n.flatShading===!1?"#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&&n.flatShading===!1?"#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_LOGDEPTHBUF":"",n.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` 3837`].filter(Va).join(` 3838`),d=[X0(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alph
vendor: 27,905 bytes, lines 3838-3880
3838aToCoverage?"#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 "+f:"",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&&n.flatShading===!1?"#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_LOGDEPTHBUF":"",n.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==Vr?"#define TONE_MAPPING":"",n.toneMapping!==Vr?Qe.tonemapping_pars_fragment:"",n.toneMapping!==Vr?n3("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Qe.colorspace_pars_fragment,t3("linearToOutputTexel",n.outputColorSpace),i3(),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` 3839`].filter(Va).join(` 3840`)),o=bp(o),o=V0(o,n),o=G0(o,n),a=bp(a),a=V0(a,n),a=G0(a,n),o=W0(o),a=W0(a),n.isRawShaderMaterial!==!0&&(_=`#version 300 es 3841`,m=[p,"#define attribute in","#define varying out","#define texture2D texture"].join(` 3842`)+` 3843`+m,d=["#define varying in",n.glslVersion===Qv?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===Qv?"":"#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(` 3844`)+` 3845`+d);const g=_+m+o,x=_+d+a,b=z0(r,r.VERTEX_SHADER,g),A=z0(r,r.FRAGMENT_SHADER,x);r.attachShader(y,b),r.attachShader(y,A),n.index0AttributeName!==void 0?r.bindAttribLocation(y,0,n.index0AttributeName):n.morphTargets===!0&&r.bindAttribLocation(y,0,"position"),r.linkProgram(y);function M(U){if(t.debug.checkShaderErrors){const z=r.getProgramInfoLog(y).trim(),V=r.getShaderInfoLog(b).trim(),H=r.getShaderInfoLog(A).trim();let Q=!0,j=!0;if(r.getProgramParameter(y,r.LINK_STATUS)===!1)if(Q=!1,typeof t.debug.onShaderError=="function")t.debug.onShaderError(r,y,b,A);else{const W=H0(r,b,"vertex"),N=H0(r,A,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(y,r.VALIDATE_STATUS)+` 3846 3847Material Name: `+U.name+` 3848Material Type: `+U.type+` 3849 3850Program Info Log: `+z+` 3851`+W+` 3852`+N)}else z!==""?console.warn("THREE.WebGLProgram: Program Info Log:",z):(V===""||H==="")&&(j=!1);j&&(U.diagnostics={runnable:Q,programLog:z,vertexShader:{log:V,prefix:m},fragmentShader:{log:H,prefix:d}})}r.deleteShader(b),r.deleteShader(A),R=new ru(r,y),T=o3(r,y)}let R;this.getUniforms=function(){return R===void 0&&M(this),R};let T;this.getAttributes=function(){return T===void 0&&M(this),T};let S=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return S===!1&&(S=r.getProgramParameter(y,KD)),S},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(y),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=QD++,this.cacheKey=e,this.usedTimes=1,this.program=y,this.vertexShader=b,this.fragmentShader=A,this}let y3=0;class x3{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,i=e.fragmentShader,r=this._getShaderStage(n),s=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(r)===!1&&(o.add(r),r.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const i of n)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let i=n.get(e);return i===void 0&&(i=new Set,n.set(e,i)),i}_getShaderStage(e){const n=this.shaderCache;let i=n.get(e);return i===void 0&&(i=new _3(e),n.set(e,i)),i}}class _3{constructor(e){this.id=y3++,this.code=e,this.usedTimes=0}}function S3(t,e,n,i,r,s,o){const a=new mw,l=new x3,c=new Set,u=[],f=r.logarithmicDepthBuffer,h=r.vertexTextures;let p=r.precision;const v={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function y(T){return c.add(T),T===0?"uv":`uv${T}`}function m(T,S,U,z,V){const H=z.fog,Q=V.geometry,j=T.isMeshStandardMaterial?z.environment:null,W=(T.isMeshStandardMaterial?n:e).get(T.envMap||j),N=W&&W.mapping===hf?W.image.height:null,K=v[T.type];T.precision!==null&&(p=r.getMaxPrecision(T.precision),p!==T.precision&&console.warn("THREE.WebGLProgram.getParameters:",T.precision,"not supported, using",p,"instead."));const se=Q.morphAttributes.position||Q.morphAttributes.normal||Q.morphAttributes.color,me=se!==void 0?se.length:0;let Ae=0;Q.morphAttributes.position!==void 0&&(Ae=1),Q.morphAttributes.normal!==void 0&&(Ae=2),Q.morphAttributes.color!==void 0&&(Ae=3);let He,k,O,D;if(K){const rt=Si[K];He=rt.vertexShader,k=rt.fragmentShader}else He=T.vertexShader,k=T.fragmentShader,l.update(T),O=l.getVertexShaderID(T),D=l.getFragmentShaderID(T);const C=t.getRenderTarget(),ne=t.state.buffers.depth.getReversed(),de=V.isInstancedMesh===!0,Y=V.isBatchedMesh===!0,_e=!!T.map,ye=!!T.matcap,pe=!!W,w=!!T.aoMap,J=!!T.lightMap,ee=!!T.bumpMap,re=!!T.normalMap,F=!!T.displacementMap,I=!!T.emissiveMap,ie=!!T.metalnessMap,P=!!T.roughnessMap,E=T.anisotropy>0,X=T.clearcoat>0,oe=T.dispersion>0,he=T.iridescence>0,ce=T.sheen>0,Ie=T.transmission>0,Me=E&&!!T.anisotropyMap,Fe=X&&!!T.clearcoatMap,ze=X&&!!T.clearcoatNormalMap,Se=X&&!!T.clearcoatRoughnessMap,Le=he&&!!T.iridescenceMap,Be=he&&!!T.iridescenceThicknessMap,We=ce&&!!T.sheenColorMap,fe=ce&&!!T.sheenRoughnessMap,De=!!T.specularMap,Pe=!!T.specularColorMap,$e=!!T.specularIntensityMap,G=Ie&&!!T.transmissionMap,Te=Ie&&!!T.thicknessMap,ue=!!T.gradientMap,ge=!!T.alphaMap,Re=T.alphaTest>0,be=!!T.alphaHash,Xe=!!T.extensions;let pt=Vr;T.toneMapped&&(C===null||C.isXRRenderTarget===!0)&&(pt=t.toneMapping);const Bt={shaderID:K,shaderType:T.type,shaderName:T.name,vertexShader:He,fragmentShader:k,defines:T.defines,customVertexShaderID:O,customFragmentShaderID:D,isRawShaderMaterial:T.isRawShaderMaterial===!0,glslVersion:T.glslVersion,precision:p,batching:Y,batchingColor:Y&&V._colorsTexture!==null,instancing:de,instancingColor:de&&V.instanceColor!==null,instancingMorph:de&&V.morphTexture!==null,supportsVertexTextures:h,outputColorSpace:C===null?t.outputColorSpace:C.isXRRenderTarget===!0?C.texture.colorSpace:ea,alphaToCoverage:!!T.alphaToCoverage,map:_e,matcap:ye,envMap:pe,envMapMode:pe&&W.mapping,envMapCubeUVHeight:N,aoMap:w,lightMap:J,bumpMap:ee,normalMap:re,displacementMap:h&&F,emissiveMap:I,normalMapObjectSpace:re&&T.normalMapType===LR,normalMapTangentSpace:re&&T.normalMapType===fw,metalnessMap:ie,roughnessMap:P,anisotropy:E,anisotropyMap:Me,clearcoat:X,clearcoatMap:Fe,clearcoatNormalMap:ze,clearcoatRoughnessMap:Se,dispersion:oe,iridescence:he,iridescenceMap:Le,iridescenceThicknessMap:Be,sheen:ce,sheenColorMap:We,sheenRoughnessMap:fe,specularMap:De,specularColorMap:Pe,specularIntensityMap:$e,transmission:Ie,transmissionMap:G,thicknessMap:Te,gradientMap:ue,opaque:T.transparent===!1&&T.blending===Co&&T.alphaToCoverage===!1,alphaMap:ge,alphaTest:Re,alphaHash:be,combine:T.combine,mapUv:_e&&y(T.map.channel),aoMapUv:w&&y(T.aoMap.channel),lightMapUv:J&&y(T.lightMap.channel),bumpMapUv:ee&&y(T.bumpMap.channel),normalMapUv:re&&y(T.normalMap.channel),displacementMapUv:F&&y(T.displacementMap.channel),emissiveMapUv:I&&y(T.emissiveMap.channel),metalnessMapUv:ie&&y(T.metalnessMap.channel),roughnessMapUv:P&&y(T.roughnessMap.channel),anisotropyMapUv:Me&&y(T.anisotropyMap.channel),clearcoatMapUv:Fe&&y(T.clearcoatMap.channel),clearcoatNormalMapUv:ze&&y(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Se&&y(T.clearcoatRoughnessMap.channel),iridescenceMapUv:Le&&y(T.iridescenceMap.channel),iridescenceThicknessMapUv:Be&&y(T.iridescenceThicknessMap.channel),sheenColorMapUv:We&&y(T.sheenColorMap.channel),sheenRoughnessMapUv:fe&&y(T.sheenRoughnessMap.channel),specularMapUv:De&&y(T.specularMap.channel),specularColorMapUv:Pe&&y(T.specularColorMap.channel),specularIntensityMapUv:$e&&y(T.specularIntensityMap.channel),transmissionMapUv:G&&y(T.transmissionMap.channel),thicknessMapUv:Te&&y(T.thicknessMap.channel),alphaMapUv:ge&&y(T.alphaMap.channel),vertexTangents:!!Q.attributes.tangent&&(re||E),vertexColors:T.vertexColors,vertexAlphas:T.vertexColors===!0&&!!Q.attributes.color&&Q.attributes.color.itemSize===4,pointsUvs:V.isPoints===!0&&!!Q.attributes.uv&&(_e||ge),fog:!!H,useFog:T.fog===!0,fogExp2:!!H&&H.isFogExp2,flatShading:T.flatShading===!0,sizeAttenuation:T.sizeAttenuation===!0,logarithmicDepthBuffer:f,reverseDepthBuffer:ne,skinning:V.isSkinnedMesh===!0,morphTargets:Q.morphAttributes.position!==void 0,morphNormals:Q.morphAttributes.normal!==void 0,morphColors:Q.morphAttributes.color!==void 0,morphTargetsCount:me,morphTextureStride:Ae,numDirLights:S.directional.length,numPointLights:S.point.length,numSpotLights:S.spot.length,numSpotLightMaps:S.spotLightMap.length,numRectAreaLights:S.rectArea.length,numHemiLights:S.hemi.length,numDirLightShadows:S.directionalShadowMap.length,numPointLightShadows:S.pointShadowMap.length,numSpotLightShadows:S.spotShadowMap.length,numSpotLightShadowsWithMaps:S.numSpotLightShadowsWithMaps,numLightProbes:S.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:t.shadowMap.enabled&&U.length>0,shadowMapType:t.shadowMap.type,toneMapping:pt,decodeVideoTexture:_e&&T.map.isVideoTexture===!0&&ot.getTransfer(T.map.colorSpace)===dt,decodeVideoTextureEmissive:I&&T.emissiveMap.isVideoTexture===!0&&ot.getTransfer(T.emissiveMap.colorSpace)===dt,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Ei,flipSided:T.side===_n,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:Xe&&T.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(Xe&&T.extensions.multiDraw===!0||Y)&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return Bt.vertexUv1s=c.has(1),Bt.vertexUv2s=c.has(2),Bt.vertexUv3s=c.has(3),c.clear(),Bt}function d(T){const S=[];if(T.shaderID?S.push(T.shaderID):(S.push(T.customVertexShaderID),S.push(T.customFragmentShaderID)),T.defines!==void 0)for(const U in T.defines)S.push(U),S.push(T.defines[U]);return T.isRawShaderMaterial===!1&&(_(S,T),g(S,T),S.push(t.outputColorSpace)),S.push(T.customProgramCacheKey),S.join()}function _(T,S){T.push(S.precision),T.push(S.outputColorSpace),T.push(S.envMapMode),T.push(S.envMapCubeUVHeight),T.push(S.mapUv),T.push(S.alphaMapUv),T.push(S.lightMapUv),T.push(S.aoMapUv),T.push(S.bumpMapUv),T.push(S.normalMapUv),T.push(S.displacementMapUv),T.push(S.emissiveMapUv),T.push(S.metalnessMapUv),T.push(S.roughnessMapUv),T.push(S.anisotropyMapUv),T.push(S.clearcoatMapUv),T.push(S.clearcoatNormalMapUv),T.push(S.clearcoatRoughnessMapUv),T.push(S.iridescenceMapUv),T.push(S.iridescenceThicknessMapUv),T.push(S.sheenColorMapUv),T.push(S.sheenRoughnessMapUv),T.push(S.specularMapUv),T.push(S.specularColorMapUv),T.push(S.specularIntensityMapUv),T.push(S.transmissionMapUv),T.push(S.thicknessMapUv),T.push(S.combine),T.push(S.fogExp2),T.push(S.sizeAttenuation),T.push(S.morphTargetsCount),T.push(S.morphAttributeCount),T.push(S.numDirLights),T.push(S.numPointLights),T.push(S.numSpotLights),T.push(S.numSpotLightMaps),T.push(S.numHemiLights),T.push(S.numRectAreaLights),T.push(S.numDirLightShadows),T.push(S.numPointLightShadows),T.push(S.numSpotLightShadows),T.push(S.numSpotLightShadowsWithMaps),T.push(S.numLightProbes),T.push(S.shadowMapType),T.push(S.toneMapping),T.push(S.numClippingPlanes),T.push(S.numClipIntersection),T.push(S.depthPacking)}function g(T,S){a.disableAll(),S.supportsVertexTextures&&a.enable(0),S.instancing&&a.enable(1),S.instancingColor&&a.enable(2),S.instancingMorph&&a.enable(3),S.matcap&&a.enable(4),S.envMap&&a.enable(5),S.normalMapObjectSpace&&a.enable(6),S.normalMapTangentSpace&&a.enable(7),S.clearcoat&&a.enable(8),S.iridescence&&a.enable(9),S.alphaTest&&a.enable(10),S.vertexColors&&a.enable(11),S.vertexAlphas&&a.enable(12),S.vertexUv1s&&a.enable(13),S.vertexUv2s&&a.enable(14),S.vertexUv3s&&a.enable(15),S.vertexTangents&&a.enable(16),S.anisotropy&&a.enable(17),S.alphaHash&&a.enable(18),S.batching&&a.enable(19),S.dispersion&&a.enable(20),S.batchingColor&&a.enable(21),T.push(a.mask),a.disableAll(),S.fog&&a.enable(0),S.useFog&&a.enable(1),S.flatShading&&a.enable(2),S.logarithmicDepthBuffer&&a.enable(3),S.reverseDepthBuffer&&a.enable(4),S.skinning&&a.enable(5),S.morphTargets&&a.enable(6),S.morphNormals&&a.enable(7),S.morphColors&&a.enable(8),S.premultipliedAlpha&&a.enable(9),S.shadowMapEnabled&&a.enable(10),S.doubleSided&&a.enable(11),S.flipSided&&a.enable(12),S.useDepthPacking&&a.enable(13),S.dithering&&a.enable(14),S.transmission&&a.enable(15),S.sheen&&a.enable(16),S.opaque&&a.enable(17),S.pointsUvs&&a.enable(18),S.decodeVideoTexture&&a.enable(19),S.decodeVideoTextureEmissive&&a.enable(20),S.alphaToCoverage&&a.enable(21),T.push(a.mask)}function x(T){const S=v[T.type];let U;if(S){const z=Si[S];U=cP.clone(z.uniforms)}else U=T.uniforms;return U}function b(T,S){let U;for(let z=0,V=u.length;z<V;z++){const H=u[z];if(H.cacheKey===S){U=H,++U.usedTimes;break}}return U===void 0&&(U=new v3(t,S,T,s),u.push(U)),U}function A(T){if(--T.usedTimes===0){const S=u.indexOf(T);u[S]=u[u.length-1],u.pop(),T.destroy()}}function M(T){l.remove(T)}function R(){l.dispose()}return{getParameters:m,getProgramCacheKey:d,getUniforms:x,acquireProgram:b,releaseProgram:A,releaseShaderCache:M,programs:u,dispose:R}}function w3(){let t=new WeakMap;function e(o){return t.has(o)}function n(o){let a=t.get(o);return a===void 0&&(a={},t.set(o,a)),a}function i(o){t.delete(o)}function r(o,a,l){t.get(o)[a]=l}function s(){t=new WeakMap}return{has:e,get:n,remove:i,update:r,dispose:s}}function E3(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function j0(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function Y0(){const t=[];let e=0;const n=[],i=[],r=[];function s(){e=0,n.length=0,i.length=0,r.length=0}function o(f,h,p,v,y,m){let d=t[e];return d===void 0?(d={id:f.id,object:f,geometry:h,material:p,groupOrder:v,renderOrder:f.renderOrder,z:y,group:m},t[e]=d):(d.id=f.id,d.object=f,d.geometry=h,d.material=p,d.groupOrder=v,d.renderOrder=f.renderOrder,d.z=y,d.group=m),e++,d}function a(f,h,p,v,y,m){const d=o(f,h,p,v,y,m);p.transmission>0?i.push(d):p.transparent===!0?r.push(d):n.push(d)}function l(f,h,p,v,y,m){const d=o(f,h,p,v,y,m);p.transmission>0?i.unshift(d):p.transparent===!0?r.unshift(d):n.unshift(d)}function c(f,h){n.length>1&&n.sort(f||E3),i.length>1&&i.sort(h||j0),r.length>1&&r.sort(h||j0)}function u(){for(let f=e,h=t.length;f<h;f++){const p=t[f];if(p.id===null)break;p.id=null,p.object=null,p.geometry=null,p.material=null,p.group=null}}return{opaque:n,transmissive:i,transparent:r,init:s,push:a,unshift:l,finish:u,sort:c}}function M3(){let t=new WeakMap;function e(i,r){const s=t.get(i);let o;return s===void 0?(o=new Y0,t.set(i,[o])):r>=s.length?(o=new Y0,s.push(o)):o=s[r],o}function n(){t=new WeakMap}return{get:e,dispose:n}}function T3(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new Z,color:new at};break;case"SpotLight":n={position:new Z,direction:new Z,color:new at,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new Z,color:new at,distance:0,decay:0};break;case"HemisphereLight":n={direction:new Z,skyColor:new at,groundColor:new at};break;case"RectAreaLight":n={color:new at,position:new Z,halfWidth:new Z,halfHeight:new Z};break}return t[e.id]=n,n}}}function b3(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"SpotLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let A3=0;function C3(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function R3(t){const e=new T3,n=b3(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)i.probe.push(new Z);const r=new Z,s=new Mt,o=new Mt;function a(c){let u=0,f=0,h=0;for(let T=0;T<9;T++)i.probe[T].set(0,0,0);let p=0,v=0,y=0,m=0,d=0,_=0,g=0,x=0,b=0,A=0,M=0;c.sort(C3);for(let T=0,S=c.length;T<S;T++){const U=c[T],z=U.color,V=U.intensity,H=U.distance,Q=U.shadow&&U.shadow.map?U.shadow.map.texture:null;if(U.isAmbientLight)u+=z.r*V,f+=z.g*V,h+=z.b*V;else if(U.isLightProbe){for(let j=0;j<9;j++)i.probe[j].addScaledVector(U.sh.coefficients[j],V);M++}else if(U.isDirectionalLight){const j=e.get(U);if(j.color.copy(U.color).multiplyScalar(U.intensity),U.castShadow){const W=U.shadow,N=n.get(U);N.shadowIntensity=W.intensity,N.shadowBias=W.bias,N.shadowNormalBias=W.normalBias,N.shadowRadius=W.radius,N.shadowMapSize=W.mapSize,i.directionalShadow[p]=N,i.directionalShadowMap[p]=Q,i.directionalShadowMatrix[p]=U.shadow.matrix,_++}i.directional[p]=j,p++}else if(U.isSpotLight){const j=e.get(U);j.position.setFromMatrixPosition(U.matrixWorld),j.color.copy(z).multiplyScalar(V),j.distance=H,j.coneCos=Math.cos(U.angle),j.penumbraCos=Math.cos(U.angle*(1-U.penumbra)),j.decay=U.decay,i.spot[y]=j;const W=U.shadow;if(U.map&&(i.spotLightMap[b]=U.map,b++,W.updateMatrices(U),U.castShadow&&A++),i.spotLightMatrix[y]=W.matrix,U.castShadow){const N=n.get(U);N.shadowIntensity=W.intensity,N.shadowBias=W.bias,N.shadowNormalBias=W.normalBias,N.shadowRadius=W.radius,N.shadowMapSize=W.mapSize,i.spotShadow[y]=N,i.spotShadowMap[y]=Q,x++}y++}else if(U.isRectAreaLight){const j=e.get(U);j.color.copy(z).multiplyScalar(V),j.halfWidth.set(U.width*.5,0,0),j.halfHeight.set(0,U.height*.5,0),i.rectArea[m]=j,m++}else if(U.isPointLight){const j=e.get(U);if(j.color.copy(U.color).multiplyScalar(U.intensity),j.distance=U.distance,j.decay=U.decay,U.castShadow){const W=U.shadow,N=n.get(U);N.shadowIntensity=W.intensity,N.shadowBias=W.bias,N.shadowNormalBias=W.normalBias,N.shadowRadius=W.radius,N.shadowMapSize=W.mapSize,N.shadowCameraNear=W.camera.near,N.shadowCameraFar=W.camera.far,i.pointShadow[v]=N,i.pointShadowMap[v]=Q,i.pointShadowMatrix[v]=U.shadow.matrix,g++}i.point[v]=j,v++}else if(U.isHemisphereLight){const j=e.get(U);j.skyColor.copy(U.color).multiplyScalar(V),j.groundColor.copy(U.groundColor).multiplyScalar(V),i.hemi[d]=j,d++}}m>0&&(t.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=Ce.LTC_FLOAT_1,i.rectAreaLTC2=Ce.LTC_FLOAT_2):(i.rectAreaLTC1=Ce.LTC_HALF_1,i.rectAreaLTC2=Ce.LTC_HALF_2)),i.ambient[0]=u,i.ambient[1]=f,i.ambient[2]=h;const R=i.hash;(R.directionalLength!==p||R.pointLength!==v||R.spotLength!==y||R.rectAreaLength!==m||R.hemiLength!==d||R.numDirectionalShadows!==_||R.numPointShadows!==g||R.numSpotShadows!==x||R.numSpotMaps!==b||R.numLightProbes!==M)&&(i.directional.length=p,i.spot.length=y,i.rectArea.length=m,i.point.length=v,i.hemi.length=d,i.directionalShadow.length=_,i.directionalShadowMap.length=_,i.pointShadow.length=g,i.pointShadowMap.length=g,i.spotShadow.length=x,i.spotShadowMap.length=x,i.directionalShadowMatrix.length=_,i.pointShadowMatrix.length=g,i.spotLightMatrix.length=x+b-A,i.spotLightMap.length=b,i.numSpotLightShadowsWithMaps=A,i.numLightProbes=M,R.directionalLength=p,R.pointLength=v,R.spotLength=y,R.rectAreaLength=m,R.hemiLength=d,R.numDirectionalShadows=_,R.numPointShadows=g,R.numSpotShadows=x,R.numSpotMaps=b,R.numLightProbes=M,i.version=A3++)}function l(c,u){let f=0,h=0,p=0,v=0,y=0;const m=u.matrixWorldInverse;for(let d=0,_=c.length;d<_;d++){const g=c[d];if(g.isDirectionalLight){const x=i.directional[f];x.direction.setFromMatrixPosition(g.matrixWorld),r.setFromMatrixPosition(g.target.matrixWorld),x.direction.sub(r),x.direction.transformDirection(m),f++}else if(g.isSpotLight){const x=i.spot[p];x.position.setFromMatrixPosition(g.matrixWorld),x.position.applyMatrix4(m),x.direction.setFromMatrixPosition(g.matrixWorld),r.setFromMatrixPosition(g.target.matrixWorld),x.direction.sub(r),x.direction.transformDirection(m),p++}else if(g.isRectAreaLight){const x=i.rectArea[v];x.position.setFromMatrixPosition(g.matrixWorld),x.position.applyMatrix4(m),o.identity(),s.copy(g.matrixWorld),s.premultiply(m),o.extractRotation(s),x.halfWidth.set(g.width*.5,0,0),x.halfHeight.set(0,g.height*.5,0),x.halfWidth.applyMatrix4(o),x.halfHeight.applyMatrix4(o),v++}else if(g.isPointLight){const x=i.point[h];x.position.setFromMatrixPosition(g.matrixWorld),x.position.applyMatrix4(m),h++}else if(g.isHemisphereLight){const x=i.hemi[y];x.direction.setFromMatrixPosition(g.matrixWorld),x.direction.transformDirection(m),y++}}}return{setup:a,setupView:l,state:i}}function q0(t){const e=new R3(t),n=[],i=[];function r(u){c.camera=u,n.length=0,i.length=0}function s(u){n.push(u)}function o(u){i.push(u)}function a(){e.setup(n)}function l(u){e.setupView(n,u)}const c={lightsArray:n,shadowsArray:i,camera:null,lights:e,transmissionRenderTarget:{}};return{init:r,state:c,setupLights:a,setupLightsView:l,pushLight:s,pushShadow:o}}function P3(t){let e=new WeakMap;function n(r,s=0){const o=e.get(r);let a;return o===void 0?(a=new q0(t),e.set(r,[a])):s>=o.length?(a=new q0(t),o.push(a)):a=o[s],a}function i(){e=new WeakMap}return{get:n,dispose:i}}const L3=`void main() { 3853 gl_Position = vec4( position, 1.0 ); 3854}`,N3=`uniform sampler2D shadow_pass; 3855uniform vec2 resolution; 3856uniform float radius; 3857#include <packing> 3858void main() { 3859 const float samples = float( VSM_SAMPLES ); 3860 float mean = 0.0; 3861 float squared_mean = 0.0; 3862 float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); 3863 float uvStart = samples <= 1.0 ? 0.0 : - 1.0; 3864 for ( float i = 0.0; i < samples; i ++ ) { 3865 float uvOffset = uvStart + i * uvStride; 3866 #ifdef HORIZONTAL_PASS 3867 vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); 3868 mean += distribution.x; 3869 squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; 3870 #else 3871 float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); 3872 mean += depth; 3873 squared_mean += depth * depth; 3874 #endif 3875 } 3876 mean = mean / samples; 3877 squared_mean = squared_mean / samples; 3878 float std_dev = sqrt( squared_mean - mean * mean ); 3879 gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); 3880}`;function D3(t,e,n){let i=new Zm;const r=new xe,s=new xe,o=new Rt,a=new QP({depthPacking:PR}),l=new JP,c={},u=n.maxTextureSize,f={[qr]:_n,[_n]:qr,[Ei]:Ei},h=new $r({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:L3,fragmentShader:N3}),p=h.clone();p.defines.HORIZONTAL_PASS=1;const v=new lr;v.setAttribute("position",new Ri(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const y=new Ti(v,h),m=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=JS;let d=this.type;this.render=function(A,M,R){if(m.enabled===!1||m.autoUpdate===!1&&m.needsUpdate===!1||A.length===0)return;const T=t.getRenderTarget(),S=t.getActiveCubeFace(),U=t.getActiveMipmapLevel(),z=t.state;z.setBlending(Hr),z.buffers.color.setClear(1,1,1,1),z.buffers.depth.setTest(!0),z.setScissorTest(!1);const V=d!==Xi&&this.type===Xi,H=d===Xi&&this.type!==Xi;for(let Q=0,j=A.length;Q<j;Q++){const W=A[Q],N=W.shadow;if(N===void 0){console.warn("THREE.WebGLShadowMap:",W,"has no shadow.");continue}if(N.autoUpdate===!1&&N.needsUpdate===!1)continue;r.copy(N.mapSize);const K=N.getFrameExtents();if(r.multiply(K),s.copy(N.mapSize),(r.x>u||r.y>u)&&(r.x>u&&(s.x=Math.floor(u/K.x),r.x=s.x*K.x,N.mapSize.x=s.x),r.y>u&&(s.y=Math.floor(u/K.y),r.y=s.y*K.y,N.mapSize.y=s.y)),N.map===null||V===!0||H===!0){const me=this.type!==Xi?{minFilter:ci,magFilter:ci}:{};N.map!==null&&N.map.dispose(),N.map=new Os(r.x,r.y,me),N.map.texture.name=W.name+".shadowMap",N.camera.updateProjectionMatrix()}
vendor: 8,731 bytes, line 3880
3880t.setRenderTarget(N.map),t.clear();const se=N.getViewportCount();for(let me=0;me<se;me++){const Ae=N.getViewport(me);o.set(s.x*Ae.x,s.y*Ae.y,s.x*Ae.z,s.y*Ae.w),z.viewport(o),N.updateMatrices(W,me),i=N.getFrustum(),x(M,R,N.camera,W,this.type)}N.isPointLightShadow!==!0&&this.type===Xi&&_(N,R),N.needsUpdate=!1}d=this.type,m.needsUpdate=!1,t.setRenderTarget(T,S,U)};function _(A,M){const R=e.update(y);h.defines.VSM_SAMPLES!==A.blurSamples&&(h.defines.VSM_SAMPLES=A.blurSamples,p.defines.VSM_SAMPLES=A.blurSamples,h.needsUpdate=!0,p.needsUpdate=!0),A.mapPass===null&&(A.mapPass=new Os(r.x,r.y)),h.uniforms.shadow_pass.value=A.map.texture,h.uniforms.resolution.value=A.mapSize,h.uniforms.radius.value=A.radius,t.setRenderTarget(A.mapPass),t.clear(),t.renderBufferDirect(M,null,R,h,y,null),p.uniforms.shadow_pass.value=A.mapPass.texture,p.uniforms.resolution.value=A.mapSize,p.uniforms.radius.value=A.radius,t.setRenderTarget(A.map),t.clear(),t.renderBufferDirect(M,null,R,p,y,null)}function g(A,M,R,T){let S=null;const U=R.isPointLight===!0?A.customDistanceMaterial:A.customDepthMaterial;if(U!==void 0)S=U;else if(S=R.isPointLight===!0?l:a,t.localClippingEnabled&&M.clipShadows===!0&&Array.isArray(M.clippingPlanes)&&M.clippingPlanes.length!==0||M.displacementMap&&M.displacementScale!==0||M.alphaMap&&M.alphaTest>0||M.map&&M.alphaTest>0||M.alphaToCoverage===!0){const z=S.uuid,V=M.uuid;let H=c[z];H===void 0&&(H={},c[z]=H);let Q=H[V];Q===void 0&&(Q=S.clone(),H[V]=Q,M.addEventListener("dispose",b)),S=Q}if(S.visible=M.visible,S.wireframe=M.wireframe,T===Xi?S.side=M.shadowSide!==null?M.shadowSide:M.side:S.side=M.shadowSide!==null?M.shadowSide:f[M.side],S.alphaMap=M.alphaMap,S.alphaTest=M.alphaToCoverage===!0?.5:M.alphaTest,S.map=M.map,S.clipShadows=M.clipShadows,S.clippingPlanes=M.clippingPlanes,S.clipIntersection=M.clipIntersection,S.displacementMap=M.displacementMap,S.displacementScale=M.displacementScale,S.displacementBias=M.displacementBias,S.wireframeLinewidth=M.wireframeLinewidth,S.linewidth=M.linewidth,R.isPointLight===!0&&S.isMeshDistanceMaterial===!0){const z=t.properties.get(S);z.light=R}return S}function x(A,M,R,T,S){if(A.visible===!1)return;if(A.layers.test(M.layers)&&(A.isMesh||A.isLine||A.isPoints)&&(A.castShadow||A.receiveShadow&&S===Xi)&&(!A.frustumCulled||i.intersectsObject(A))){A.modelViewMatrix.multiplyMatrices(R.matrixWorldInverse,A.matrixWorld);const V=e.update(A),H=A.material;if(Array.isArray(H)){const Q=V.groups;for(let j=0,W=Q.length;j<W;j++){const N=Q[j],K=H[N.materialIndex];if(K&&K.visible){const se=g(A,K,T,S);A.onBeforeShadow(t,A,M,R,V,se,N),t.renderBufferDirect(R,null,V,se,A,N),A.onAfterShadow(t,A,M,R,V,se,N)}}}else if(H.visible){const Q=g(A,H,T,S);A.onBeforeShadow(t,A,M,R,V,Q,null),t.renderBufferDirect(R,null,V,Q,A,null),A.onAfterShadow(t,A,M,R,V,Q,null)}}const z=A.children;for(let V=0,H=z.length;V<H;V++)x(z[V],M,R,T,S)}function b(A){A.target.removeEventListener("dispose",b);for(const R in c){const T=c[R],S=A.target.uuid;S in T&&(T[S].dispose(),delete T[S])}}}const I3={[zh]:Bh,[Hh]:Wh,[Vh]:Xh,[Ko]:Gh,[Bh]:zh,[Wh]:Hh,[Xh]:Vh,[Gh]:Ko};function U3(t,e){function n(){let G=!1;const Te=new Rt;let ue=null;const ge=new Rt(0,0,0,0);return{setMask:function(Re){ue!==Re&&!G&&(t.colorMask(Re,Re,Re,Re),ue=Re)},setLocked:function(Re){G=Re},setClear:function(Re,be,Xe,pt,Bt){Bt===!0&&(Re*=pt,be*=pt,Xe*=pt),Te.set(Re,be,Xe,pt),ge.equals(Te)===!1&&(t.clearColor(Re,be,Xe,pt),ge.copy(Te))},reset:function(){G=!1,ue=null,ge.set(-1,0,0,0)}}}function i(){let G=!1,Te=!1,ue=null,ge=null,Re=null;return{setReversed:function(be){if(Te!==be){const Xe=e.get("EXT_clip_control");be?Xe.clipControlEXT(Xe.LOWER_LEFT_EXT,Xe.ZERO_TO_ONE_EXT):Xe.clipControlEXT(Xe.LOWER_LEFT_EXT,Xe.NEGATIVE_ONE_TO_ONE_EXT),Te=be;const pt=Re;Re=null,this.setClear(pt)}},getReversed:function(){return Te},setTest:function(be){be?C(t.DEPTH_TEST):ne(t.DEPTH_TEST)},setMask:function(be){ue!==be&&!G&&(t.depthMask(be),ue=be)},setFunc:function(be){if(Te&&(be=I3[be]),ge!==be){switch(be){case zh:t.depthFunc(t.NEVER);break;case Bh:t.depthFunc(t.ALWAYS);break;case Hh:t.depthFunc(t.LESS);break;case Ko:t.depthFunc(t.LEQUAL);break;case Vh:t.depthFunc(t.EQUAL);break;case Gh:t.depthFunc(t.GEQUAL);break;case Wh:t.depthFunc(t.GREATER);break;case Xh:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}ge=be}},setLocked:function(be){G=be},setClear:function(be){Re!==be&&(Te&&(be=1-be),t.clearDepth(be),Re=be)},reset:function(){G=!1,ue=null,ge=null,Re=null,Te=!1}}}function r(){let G=!1,Te=null,ue=null,ge=null,Re=null,be=null,Xe=null,pt=null,Bt=null;return{setTest:function(rt){G||(rt?C(t.STENCIL_TEST):ne(t.STENCIL_TEST))},setMask:function(rt){Te!==rt&&!G&&(t.stencilMask(rt),Te=rt)},setFunc:function(rt,Je,It){(ue!==rt||ge!==Je||Re!==It)&&(t.stencilFunc(rt,Je,It),ue=rt,ge=Je,Re=It)},setOp:function(rt,Je,It){(be!==rt||Xe!==Je||pt!==It)&&(t.stencilOp(rt,Je,It),be=rt,Xe=Je,pt=It)},setLocked:function(rt){G=rt},setClear:function(rt){Bt!==rt&&(t.clearStencil(rt),Bt=rt)},reset:function(){G=!1,Te=null,ue=null,ge=null,Re=null,be=null,Xe=null,pt=null,Bt=null}}}const s=new n,o=new i,a=new r,l=new WeakMap,c=new WeakMap;let u={},f={},h=new WeakMap,p=[],v=null,y=!1,m=null,d=null,_=null,g=null,x=null,b=null,A=null,M=new at(0,0,0),R=0,T=!1,S=null,U=null,z=null,V=null,H=null;const Q=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let j=!1,W=0;const N=t.getParameter(t.VERSION);N.indexOf("WebGL")!==-1?(W=parseFloat(/^WebGL (\d)/.exec(N)[1]),j=W>=1):N.indexOf("OpenGL ES")!==-1&&(W=parseFloat(/^OpenGL ES (\d)/.exec(N)[1]),j=W>=2);let K=null,se={};const me=t.getParameter(t.SCISSOR_BOX),Ae=t.getParameter(t.VIEWPORT),He=new Rt().fromArray(me),k=new Rt().fromArray(Ae);function O(G,Te,ue,ge){const Re=new Uint8Array(4),be=t.createTexture();t.bindTexture(G,be),t.texParameteri(G,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(G,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let Xe=0;Xe<ue;Xe++)G===t.TEXTURE_3D||G===t.TEXTURE_2D_ARRAY?t.texImage3D(Te,0,t.RGBA,1,1,ge,0,t.RGBA,t.UNSIGNED_BYTE,Re):t.texImage2D(Te+Xe,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,Re);return be}const D={};D[t.TEXTURE_2D]=O(t.TEXTURE_2D,t.TEXTURE_2D,1),D[t.TEXTURE_CUBE_MAP]=O(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),D[t.TEXTURE_2D_ARRAY]=O(t.TEXTURE_2D_ARRAY,t.TEXTURE_2D_ARRAY,1,1),D[t.TEXTURE_3D]=O(t.TEXTURE_3D,t.TEXTURE_3D,1,1),s.setClear(0,0,0,1),o.setClear(1),a.setClear(0),C(t.DEPTH_TEST),o.setFunc(Ko),ee(!1),re(jv),C(t.CULL_FACE),w(Hr);function C(G){u[G]!==!0&&(t.enable(G),u[G]=!0)}function ne(G){u[G]!==!1&&(t.disable(G),u[G]=!1)}function de(G,Te){return f[G]!==Te?(t.bindFramebuffer(G,Te),f[G]=Te,G===t.DRAW_FRAMEBUFFER&&(f[t.FRAMEBUFFER]=Te),G===t.FRAMEBUFFER&&(f[t.DRAW_FRAMEBUFFER]=Te),!0):!1}function Y(G,Te){let ue=p,ge=!1;if(G){ue=h.get(Te),ue===void 0&&(ue=[],h.set(Te,ue));const Re=G.textures;if(ue.length!==Re.length||ue[0]!==t.COLOR_ATTACHMENT0){for(let be=0,Xe=Re.length;be<Xe;be++)ue[be]=t.COLOR_ATTACHMENT0+be;ue.length=Re.length,ge=!0}}else ue[0]!==t.BACK&&(ue[0]=t.BACK,ge=!0);ge&&t.drawBuffers(ue)}function _e(G){return v!==G?(t.useProgram(G),v=G,!0):!1}const ye={[ms]:t.FUNC_ADD,[nR]:t.FUNC_SUBTRACT,[iR]:t.FUNC_REVERSE_SUBTRACT};ye[rR]=t.MIN,ye[sR]=t.MAX;const pe={[oR]:t.ZERO,[aR]:t.ONE,[lR]:t.SRC_COLOR,[Fh]:t.SRC_ALPHA,[pR]:t.SRC_ALPHA_SATURATE,[dR]:t.DST_COLOR,[uR]:t.DST_ALPHA,[cR]:t.ONE_MINUS_SRC_COLOR,[kh]:t.ONE_MINUS_SRC_ALPHA,[hR]:t.ONE_MINUS_DST_COLOR,[fR]:t.ONE_MINUS_DST_ALPHA,[mR]:t.CONSTANT_COLOR,[gR]:t.ONE_MINUS_CONSTANT_COLOR,[vR]:t.CONSTANT_ALPHA,[yR]:t.ONE_MINUS_CONSTANT_ALPHA};function w(G,Te,ue,ge,Re,be,Xe,pt,Bt,rt){if(G===Hr){y===!0&&(ne(t.BLEND),y=!1);return}if(y===!1&&(C(t.BLEND),y=!0),G!==tR){if(G!==m||rt!==T){if((d!==ms||x!==ms)&&(t.blendEquation(t.FUNC_ADD),d=ms,x=ms),rt)switch(G){case Co:t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case Yv:t.blendFunc(t.ONE,t.ONE);break;case qv:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case $v:t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",G);break}else switch(G){case Co:t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case Yv:t.blendFunc(t.SRC_ALPHA,t.ONE);break;case qv:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case $v:t.blendFunc(t.ZERO,t.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",G);break}_=null,g=null,b=null,A=null,M.set(0,0,0),R=0,m=G,T=rt}return}Re=Re||Te,be=be||ue,Xe=Xe||ge,(Te!==d||Re!==x)&&(t.blendEquationSeparate(ye[Te],ye[Re]),d=Te,x=Re),(ue!==_||ge!==g||be!==b||Xe!==A)&&(t.blendFuncSeparate(pe[ue],pe[ge],pe[be],pe[Xe]),_=ue,g=ge,b=be,A=Xe),(pt.equals(M)===!1||Bt!==R)&&(t.blendColor
vendor: 6,034 bytes, line 3880
3880(pt.r,pt.g,pt.b,Bt),M.copy(pt),R=Bt),m=G,T=!1}function J(G,Te){G.side===Ei?ne(t.CULL_FACE):C(t.CULL_FACE);let ue=G.side===_n;Te&&(ue=!ue),ee(ue),G.blending===Co&&G.transparent===!1?w(Hr):w(G.blending,G.blendEquation,G.blendSrc,G.blendDst,G.blendEquationAlpha,G.blendSrcAlpha,G.blendDstAlpha,G.blendColor,G.blendAlpha,G.premultipliedAlpha),o.setFunc(G.depthFunc),o.setTest(G.depthTest),o.setMask(G.depthWrite),s.setMask(G.colorWrite);const ge=G.stencilWrite;a.setTest(ge),ge&&(a.setMask(G.stencilWriteMask),a.setFunc(G.stencilFunc,G.stencilRef,G.stencilFuncMask),a.setOp(G.stencilFail,G.stencilZFail,G.stencilZPass)),I(G.polygonOffset,G.polygonOffsetFactor,G.polygonOffsetUnits),G.alphaToCoverage===!0?C(t.SAMPLE_ALPHA_TO_COVERAGE):ne(t.SAMPLE_ALPHA_TO_COVERAGE)}function ee(G){S!==G&&(G?t.frontFace(t.CW):t.frontFace(t.CCW),S=G)}function re(G){G!==JC?(C(t.CULL_FACE),G!==U&&(G===jv?t.cullFace(t.BACK):G===eR?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):ne(t.CULL_FACE),U=G}function F(G){G!==z&&(j&&t.lineWidth(G),z=G)}function I(G,Te,ue){G?(C(t.POLYGON_OFFSET_FILL),(V!==Te||H!==ue)&&(t.polygonOffset(Te,ue),V=Te,H=ue)):ne(t.POLYGON_OFFSET_FILL)}function ie(G){G?C(t.SCISSOR_TEST):ne(t.SCISSOR_TEST)}function P(G){G===void 0&&(G=t.TEXTURE0+Q-1),K!==G&&(t.activeTexture(G),K=G)}function E(G,Te,ue){ue===void 0&&(K===null?ue=t.TEXTURE0+Q-1:ue=K);let ge=se[ue];ge===void 0&&(ge={type:void 0,texture:void 0},se[ue]=ge),(ge.type!==G||ge.texture!==Te)&&(K!==ue&&(t.activeTexture(ue),K=ue),t.bindTexture(G,Te||D[G]),ge.type=G,ge.texture=Te)}function X(){const G=se[K];G!==void 0&&G.type!==void 0&&(t.bindTexture(G.type,null),G.type=void 0,G.texture=void 0)}function oe(){try{t.compressedTexImage2D(...arguments)}catch(G){console.error("THREE.WebGLState:",G)}}function he(){try{t.compressedTexImage3D(...arguments)}catch(G){console.error("THREE.WebGLState:",G)}}function ce(){try{t.texSubImage2D(...arguments)}catch(G){console.error("THREE.WebGLState:",G)}}function Ie(){try{t.texSubImage3D(...arguments)}catch(G){console.error("THREE.WebGLState:",G)}}function Me(){try{t.compressedTexSubImage2D(...arguments)}catch(G){console.error("THREE.WebGLState:",G)}}function Fe(){try{t.compressedTexSubImage3D(...arguments)}catch(G){console.error("THREE.WebGLState:",G)}}function ze(){try{t.texStorage2D(...arguments)}catch(G){console.error("THREE.WebGLState:",G)}}function Se(){try{t.texStorage3D(...arguments)}catch(G){console.error("THREE.WebGLState:",G)}}function Le(){try{t.texImage2D(...arguments)}catch(G){console.error("THREE.WebGLState:",G)}}function Be(){try{t.texImage3D(...arguments)}catch(G){console.error("THREE.WebGLState:",G)}}function We(G){He.equals(G)===!1&&(t.scissor(G.x,G.y,G.z,G.w),He.copy(G))}function fe(G){k.equals(G)===!1&&(t.viewport(G.x,G.y,G.z,G.w),k.copy(G))}function De(G,Te){let ue=c.get(Te);ue===void 0&&(ue=new WeakMap,c.set(Te,ue));let ge=ue.get(G);ge===void 0&&(ge=t.getUniformBlockIndex(Te,G.name),ue.set(G,ge))}function Pe(G,Te){const ge=c.get(Te).get(G);l.get(Te)!==ge&&(t.uniformBlockBinding(Te,ge,G.__bindingPointIndex),l.set(Te,ge))}function $e(){t.disable(t.BLEND),t.disable(t.CULL_FACE),t.disable(t.DEPTH_TEST),t.disable(t.POLYGON_OFFSET_FILL),t.disable(t.SCISSOR_TEST),t.disable(t.STENCIL_TEST),t.disable(t.SAMPLE_ALPHA_TO_COVERAGE),t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ZERO),t.blendFuncSeparate(t.ONE,t.ZERO,t.ONE,t.ZERO),t.blendColor(0,0,0,0),t.colorMask(!0,!0,!0,!0),t.clearColor(0,0,0,0),t.depthMask(!0),t.depthFunc(t.LESS),o.setReversed(!1),t.clearDepth(1),t.stencilMask(4294967295),t.stencilFunc(t.ALWAYS,0,4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP),t.clearStencil(0),t.cullFace(t.BACK),t.frontFace(t.CCW),t.polygonOffset(0,0),t.activeTexture(t.TEXTURE0),t.bindFramebuffer(t.FRAMEBUFFER,null),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),t.bindFramebuffer(t.READ_FRAMEBUFFER,null),t.useProgram(null),t.lineWidth(1),t.scissor(0,0,t.canvas.width,t.canvas.height),t.viewport(0,0,t.canvas.width,t.canvas.height),u={},K=null,se={},f={},h=new WeakMap,p=[],v=null,y=!1,m=null,d=null,_=null,g=null,x=null,b=null,A=null,M=new at(0,0,0),R=0,T=!1,S=null,U=null,z=null,V=null,H=null,He.set(0,0,t.canvas.width,t.canvas.height),k.set(0,0,t.canvas.width,t.canvas.height),s.reset(),o.reset(),a.reset()}return{buffers:{color:s,depth:o,stencil:a},enable:C,disable:ne,bindFramebuffer:de,drawBuffers:Y,useProgram:_e,setBlending:w,setMaterial:J,setFlipSided:ee,setCullFace:re,setLineWidth:F,setPolygonOffset:I,setScissorTest:ie,activeTexture:P,bindTexture:E,unbindTexture:X,compressedTexImage2D:oe,compressedTexImage3D:he,texImage2D:Le,texImage3D:Be,updateUBOMapping:De,uniformBlockBinding:Pe,texStorage2D:ze,texStorage3D:Se,texSubImage2D:ce,texSubImage3D:Ie,compressedTexSubImage2D:Me,compressedTexSubImage3D:Fe,scissor:We,viewport:fe,reset:$e}}function O3(t,e,n,i,r,s,o){const a=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,l=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new xe,u=new WeakMap;let f;const h=new WeakMap;let p=!1;try{p=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function v(P,E){return p?new OffscreenCanvas(P,E):Ou("canvas")}function y(P,E,X){let oe=1;const he=ie(P);if((he.width>X||he.height>X)&&(oe=X/Math.max(he.width,he.height)),oe<1)if(typeof HTMLImageElement<"u"&&P instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&P instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&P instanceof ImageBitmap||typeof VideoFrame<"u"&&P instanceof VideoFrame){const ce=Math.floor(oe*he.width),Ie=Math.floor(oe*he.height);f===void 0&&(f=v(ce,Ie));const Me=E?v(ce,Ie):f;return Me.width=ce,Me.height=Ie,Me.getContext("2d").drawImage(P,0,0,ce,Ie),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+he.width+"x"+he.height+") to ("+ce+"x"+Ie+")."),Me}else return"data"in P&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+he.width+"x"+he.height+")."),P;return P}function m(P){return P.generateMipmaps}function d(P){t.generateMipmap(P)}
vendor: 30,025 bytes, line 3880
3880function _(P){return P.isWebGLCubeRenderTarget?t.TEXTURE_CUBE_MAP:P.isWebGL3DRenderTarget?t.TEXTURE_3D:P.isWebGLArrayRenderTarget||P.isCompressedArrayTexture?t.TEXTURE_2D_ARRAY:t.TEXTURE_2D}function g(P,E,X,oe,he=!1){if(P!==null){if(t[P]!==void 0)return t[P];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+P+"'")}let ce=E;if(E===t.RED&&(X===t.FLOAT&&(ce=t.R32F),X===t.HALF_FLOAT&&(ce=t.R16F),X===t.UNSIGNED_BYTE&&(ce=t.R8)),E===t.RED_INTEGER&&(X===t.UNSIGNED_BYTE&&(ce=t.R8UI),X===t.UNSIGNED_SHORT&&(ce=t.R16UI),X===t.UNSIGNED_INT&&(ce=t.R32UI),X===t.BYTE&&(ce=t.R8I),X===t.SHORT&&(ce=t.R16I),X===t.INT&&(ce=t.R32I)),E===t.RG&&(X===t.FLOAT&&(ce=t.RG32F),X===t.HALF_FLOAT&&(ce=t.RG16F),X===t.UNSIGNED_BYTE&&(ce=t.RG8)),E===t.RG_INTEGER&&(X===t.UNSIGNED_BYTE&&(ce=t.RG8UI),X===t.UNSIGNED_SHORT&&(ce=t.RG16UI),X===t.UNSIGNED_INT&&(ce=t.RG32UI),X===t.BYTE&&(ce=t.RG8I),X===t.SHORT&&(ce=t.RG16I),X===t.INT&&(ce=t.RG32I)),E===t.RGB_INTEGER&&(X===t.UNSIGNED_BYTE&&(ce=t.RGB8UI),X===t.UNSIGNED_SHORT&&(ce=t.RGB16UI),X===t.UNSIGNED_INT&&(ce=t.RGB32UI),X===t.BYTE&&(ce=t.RGB8I),X===t.SHORT&&(ce=t.RGB16I),X===t.INT&&(ce=t.RGB32I)),E===t.RGBA_INTEGER&&(X===t.UNSIGNED_BYTE&&(ce=t.RGBA8UI),X===t.UNSIGNED_SHORT&&(ce=t.RGBA16UI),X===t.UNSIGNED_INT&&(ce=t.RGBA32UI),X===t.BYTE&&(ce=t.RGBA8I),X===t.SHORT&&(ce=t.RGBA16I),X===t.INT&&(ce=t.RGBA32I)),E===t.RGB&&X===t.UNSIGNED_INT_5_9_9_9_REV&&(ce=t.RGB9_E5),E===t.RGBA){const Ie=he?Iu:ot.getTransfer(oe);X===t.FLOAT&&(ce=t.RGBA32F),X===t.HALF_FLOAT&&(ce=t.RGBA16F),X===t.UNSIGNED_BYTE&&(ce=Ie===dt?t.SRGB8_ALPHA8:t.RGBA8),X===t.UNSIGNED_SHORT_4_4_4_4&&(ce=t.RGBA4),X===t.UNSIGNED_SHORT_5_5_5_1&&(ce=t.RGB5_A1)}return(ce===t.R16F||ce===t.R32F||ce===t.RG16F||ce===t.RG32F||ce===t.RGBA16F||ce===t.RGBA32F)&&e.get("EXT_color_buffer_float"),ce}function x(P,E){let X;return P?E===null||E===Us||E===Ml?X=t.DEPTH24_STENCIL8:E===Ki?X=t.DEPTH32F_STENCIL8:E===El&&(X=t.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):E===null||E===Us||E===Ml?X=t.DEPTH_COMPONENT24:E===Ki?X=t.DEPTH_COMPONENT32F:E===El&&(X=t.DEPTH_COMPONENT16),X}function b(P,E){return m(P)===!0||P.isFramebufferTexture&&P.minFilter!==ci&&P.minFilter!==Mi?Math.log2(Math.max(E.width,E.height))+1:P.mipmaps!==void 0&&P.mipmaps.length>0?P.mipmaps.length:P.isCompressedTexture&&Array.isArray(P.image)?E.mipmaps.length:1}function A(P){const E=P.target;E.removeEventListener("dispose",A),R(E),E.isVideoTexture&&u.delete(E)}function M(P){const E=P.target;E.removeEventListener("dispose",M),S(E)}function R(P){const E=i.get(P);if(E.__webglInit===void 0)return;const X=P.source,oe=h.get(X);if(oe){const he=oe[E.__cacheKey];he.usedTimes--,he.usedTimes===0&&T(P),Object.keys(oe).length===0&&h.delete(X)}i.remove(P)}function T(P){const E=i.get(P);t.deleteTexture(E.__webglTexture);const X=P.source,oe=h.get(X);delete oe[E.__cacheKey],o.memory.textures--}function S(P){const E=i.get(P);if(P.depthTexture&&(P.depthTexture.dispose(),i.remove(P.depthTexture)),P.isWebGLCubeRenderTarget)for(let oe=0;oe<6;oe++){if(Array.isArray(E.__webglFramebuffer[oe]))for(let he=0;he<E.__webglFramebuffer[oe].length;he++)t.deleteFramebuffer(E.__webglFramebuffer[oe][he]);else t.deleteFramebuffer(E.__webglFramebuffer[oe]);E.__webglDepthbuffer&&t.deleteRenderbuffer(E.__webglDepthbuffer[oe])}else{if(Array.isArray(E.__webglFramebuffer))for(let oe=0;oe<E.__webglFramebuffer.length;oe++)t.deleteFramebuffer(E.__webglFramebuffer[oe]);else t.deleteFramebuffer(E.__webglFramebuffer);if(E.__webglDepthbuffer&&t.deleteRenderbuffer(E.__webglDepthbuffer),E.__webglMultisampledFramebuffer&&t.deleteFramebuffer(E.__webglMultisampledFramebuffer),E.__webglColorRenderbuffer)for(let oe=0;oe<E.__webglColorRenderbuffer.length;oe++)E.__webglColorRenderbuffer[oe]&&t.deleteRenderbuffer(E.__webglColorRenderbuffer[oe]);E.__webglDepthRenderbuffer&&t.deleteRenderbuffer(E.__webglDepthRenderbuffer)}const X=P.textures;for(let oe=0,he=X.length;oe<he;oe++){const ce=i.get(X[oe]);ce.__webglTexture&&(t.deleteTexture(ce.__webglTexture),o.memory.textures--),i.remove(X[oe])}i.remove(P)}let U=0;function z(){U=0}function V(){const P=U;return P>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+P+" texture units while this GPU supports only "+r.maxTextures),U+=1,P}function H(P){const E=[];return E.push(P.wrapS),E.push(P.wrapT),E.push(P.wrapR||0),E.push(P.magFilter),E.push(P.minFilter),E.push(P.anisotropy),E.push(P.internalFormat),E.push(P.format),E.push(P.type),E.push(P.generateMipmaps),E.push(P.premultiplyAlpha),E.push(P.flipY),E.push(P.unpackAlignment),E.push(P.colorSpace),E.join()}function Q(P,E){const X=i.get(P);if(P.isVideoTexture&&F(P),P.isRenderTargetTexture===!1&&P.version>0&&X.__version!==P.version){const oe=P.image;if(oe===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(oe.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{k(X,P,E);return}}n.bindTexture(t.TEXTURE_2D,X.__webglTexture,t.TEXTURE0+E)}function j(P,E){const X=i.get(P);if(P.version>0&&X.__version!==P.version){k(X,P,E);return}n.bindTexture(t.TEXTURE_2D_ARRAY,X.__webglTexture,t.TEXTURE0+E)}function W(P,E){const X=i.get(P);if(P.version>0&&X.__version!==P.version){k(X,P,E);return}n.bindTexture(t.TEXTURE_3D,X.__webglTexture,t.TEXTURE0+E)}function N(P,E){const X=i.get(P);if(P.version>0&&X.__version!==P.version){O(X,P,E);return}n.bindTexture(t.TEXTURE_CUBE_MAP,X.__webglTexture,t.TEXTURE0+E)}const K={[qh]:t.REPEAT,[_s]:t.CLAMP_TO_EDGE,[$h]:t.MIRRORED_REPEAT},se={[ci]:t.NEAREST,[CR]:t.NEAREST_MIPMAP_NEAREST,[hc]:t.NEAREST_MIPMAP_LINEAR,[Mi]:t.LINEAR,[Jf]:t.LINEAR_MIPMAP_NEAREST,[Ss]:t.LINEAR_MIPMAP_LINEAR},me={[NR]:t.NEVER,[kR]:t.ALWAYS,[DR]:t.LESS,[dw]:t.LEQUAL,[IR]:t.EQUAL,[FR]:t.GEQUAL,[UR]:t.GREATER,[OR]:t.NOTEQUAL};function Ae(P,E){if(E.type===Ki&&e.has("OES_texture_float_linear")===!1&&(E.magFilter===Mi||E.magFilter===Jf||E.magFilter===hc||E.magFilter===Ss||E.minFilter===Mi||E.minFilter===Jf||E.minFilter===hc||E.minFilter===Ss)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),t.texParameteri(P,t.TEXTURE_WRAP_S,K[E.wrapS]),t.texParameteri(P,t.TEXTURE_WRAP_T,K[E.wrapT]),(P===t.TEXTURE_3D||P===t.TEXTURE_2D_ARRAY)&&t.texParameteri(P,t.TEXTURE_WRAP_R,K[E.wrapR]),t.texParameteri(P,t.TEXTURE_MAG_FILTER,se[E.magFilter]),t.texParameteri(P,t.TEXTURE_MIN_FILTER,se[E.minFilter]),E.compareFunction&&(t.texParameteri(P,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(P,t.TEXTURE_COMPARE_FUNC,me[E.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(E.magFilter===ci||E.minFilter!==hc&&E.minFilter!==Ss||E.type===Ki&&e.has("OES_texture_float_linear")===!1)return;if(E.anisotropy>1||i.get(E).__currentAnisotropy){const X=e.get("EXT_texture_filter_anisotropic");t.texParameterf(P,X.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(E.anisotropy,r.getMaxAnisotropy())),i.get(E).__currentAnisotropy=E.anisotropy}}}function He(P,E){let X=!1;P.__webglInit===void 0&&(P.__webglInit=!0,E.addEventListener("dispose",A));const oe=E.source;let he=h.get(oe);he===void 0&&(he={},h.set(oe,he));const ce=H(E);if(ce!==P.__cacheKey){he[ce]===void 0&&(he[ce]={texture:t.createTexture(),usedTimes:0},o.memory.textures++,X=!0),he[ce].usedTimes++;const Ie=he[P.__cacheKey];Ie!==void 0&&(he[P.__cacheKey].usedTimes--,Ie.usedTimes===0&&T(E)),P.__cacheKey=ce,P.__webglTexture=he[ce].texture}return X}function k(P,E,X){let oe=t.TEXTURE_2D;(E.isDataArrayTexture||E.isCompressedArrayTexture)&&(oe=t.TEXTURE_2D_ARRAY),E.isData3DTexture&&(oe=t.TEXTURE_3D);const he=He(P,E),ce=E.source;n.bindTexture(oe,P.__webglTexture,t.TEXTURE0+X);const Ie=i.get(ce);if(ce.version!==Ie.__version||he===!0){n.activeTexture(t.TEXTURE0+X);const Me=ot.getPrimaries(ot.workingColorSpace),Fe=E.colorSpace===Mr?null:ot.getPrimaries(E.colorSpace),ze=E.colorSpace===Mr||Me===Fe?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,E.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,E.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,E.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,ze);let Se=y(E.image,!1,r.maxTextureSize);Se=I(E,Se);const Le=s.convert(E.format,E.colorSpace),Be=s.convert(E.type);let We=g(E.internalFormat,Le,Be,E.colorSpace,E.isVideoTexture);Ae(oe,E);let fe;const De=E.mipmaps,Pe=E.isVideoTexture!==!0,$e=Ie.__version===void 0||he===!0,G=ce.dataReady,Te=b(E,Se);if(E.isDepthTexture)We=x(E.format===bl,E.type),$e&&(Pe?n.texStorage2D(t.TEXTURE_2D,1,We,Se.width,Se.height):n.texImage2D(t.TEXTURE_2D,0,We,Se.width,Se.height,0,Le,Be,null));else if(E.isDataTexture)if(De.length>0){Pe&&$e&&n.texStorage2D(t.TEXTURE_2D,Te,We,De[0].width,De[0].height);for(let ue=0,ge=De.length;ue<ge;ue++)fe=De[ue],Pe?G&&n.texSubImage2D(t.TEXTURE_2D,ue,0,0,fe.width,fe.height,Le,Be,fe.data):n.texImage2D(t.TEXTURE_2D,ue,We,fe.width,fe.height,0,Le,Be,fe.data);E.generateMipmaps=!1}else Pe?($e&&n.texStorage2D(t.TEXTURE_2D,Te,We,Se.width,Se.height),G&&n.texSubImage2D(t.TEXTURE_2D,0,0,0,Se.width,Se.height,Le,Be,Se.data)):n.texImage2D(t.TEXTURE_2D,0,We,Se.width,Se.height,0,Le,Be,Se.data);else if(E.isCompressedTexture)if(E.isCompressedArrayTexture){Pe&&$e&&n.texStorage3D(t.TEXTURE_2D_ARRAY,Te,We,De[0].width,De[0].height,Se.depth);for(let ue=0,ge=De.length;ue<ge;ue++)if(fe=De[ue],E.format!==oi)if(Le!==null)if(Pe){if(G)if(E.layerUpdates.size>0){const Re=M0(fe.width,fe.height,E.format,E.type);for(const be of E.layerUpdates){const Xe=fe.data.subarray(be*Re/fe.data.BYTES_PER_ELEMENT,(be+1)*Re/fe.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,ue,0,0,be,fe.width,fe.height,1,Le,Xe)}E.clearLayerUpdates()}else n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,ue,0,0,0,fe.width,fe.height,Se.depth,Le,fe.data)}else n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,ue,We,fe.width,fe.height,Se.depth,0,fe.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Pe?G&&n.texSubImage3D(t.TEXTURE_2D_ARRAY,ue,0,0,0,fe.width,fe.height,Se.depth,Le,Be,fe.data):n.texImage3D(t.TEXTURE_2D_ARRAY,ue,We,fe.width,fe.height,Se.depth,0,Le,Be,fe.data)}else{Pe&&$e&&n.texStorage2D(t.TEXTURE_2D,Te,We,De[0].width,De[0].height);for(let ue=0,ge=De.length;ue<ge;ue++)fe=De[ue],E.format!==oi?Le!==null?Pe?G&&n.compressedTexSubImage2D(t.TEXTURE_2D,ue,0,0,fe.width,fe.height,Le,fe.data):n.compressedTexImage2D(t.TEXTURE_2D,ue,We,fe.width,fe.height,0,fe.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Pe?G&&n.texSubImage2D(t.TEXTURE_2D,ue,0,0,fe.width,fe.height,Le,Be,fe.data):n.texImage2D(t.TEXTURE_2D,ue,We,fe.width,fe.height,0,Le,Be,fe.data)}else if(E.isDataArrayTexture)if(Pe){if($e&&n.texStorage3D(t.TEXTURE_2D_ARRAY,Te,We,Se.width,Se.height,Se.depth),G)if(E.layerUpdates.size>0){const ue=M0(Se.width,Se.height,E.format,E.type);for(const ge of E.layerUpdates){const Re=Se.data.subarray(ge*ue/Se.data.BYTES_PER_ELEMENT,(ge+1)*ue/Se.data.BYTES_PER_ELEMENT);n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,ge,Se.width,Se.height,1,Le,Be,Re)}E.clearLayerUpdates()}else n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,Se.width,Se.height,Se.depth,Le,Be,Se.data)}else n.texImage3D(t.TEXTURE_2D_ARRAY,0,We,Se.width,Se.height,Se.depth,0,Le,Be,Se.data);else if(E.isData3DTexture)Pe?($e&&n.texStorage3D(t.TEXTURE_3D,Te,We,Se.width,Se.height,Se.depth),G&&n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,Se.width,Se.height,Se.depth,Le,Be,Se.data)):n.texImage3D(t.TEXTURE_3D,0,We,Se.width,Se.height,Se.depth,0,Le,Be,Se.data);else if(E.isFramebufferTexture){if($e)if(Pe)n.texStorage2D(t.TEXTURE_2D,Te,We,Se.width,Se.height);else{let ue=Se.width,ge=Se.height;for(let Re=0;Re<Te;Re++)n.texImage2D(t.TEXTURE_2D,Re,We,ue,ge,0,Le,Be,null),ue>>=1,ge>>=1}}else if(De.length>0){if(Pe&&$e){const ue=ie(De[0]);n.texStorage2D(t.TEXTURE_2D,Te,We,ue.width,ue.height)}for(let ue=0,ge=De.length;ue<ge;ue++)fe=De[ue],Pe?G&&n.texSubImage2D(t.TEXTURE_2D,ue,0,0,Le,Be,fe):n.texImage2D(t.TEXTURE_2D,ue,We,Le,Be,fe);E.generateMipmaps=!1}else if(Pe){if($e){const ue=ie(Se);n.texStorage2D(t.TEXTURE_2D,Te,We,ue.width,ue.height)}G&&n.texSubImage2D(t.TEXTURE_2D,0,0,0,Le,Be,Se)}else n.texImage2D(t.TEXTURE_2D,0,We,Le,Be,Se);m(E)&&d(oe),Ie.__version=ce.version,E.onUpdate&&E.onUpdate(E)}P.__version=E.version}function O(P,E,X){if(E.image.length!==6)return;const oe=He(P,E),he=E.source;n.bindTexture(t.TEXTURE_CUBE_MAP,P.__webglTexture,t.TEXTURE0+X);const ce=i.get(he);if(he.version!==ce.__version||oe===!0){n.activeTexture(t.TEXTURE0+X);const Ie=ot.getPrimaries(ot.workingColorSpace),Me=E.colorSpace===Mr?null:ot.getPrimaries(E.colorSpace),Fe=E.colorSpace===Mr||Ie===Me?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,E.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,E.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,E.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,Fe);const ze=E.isCompressedTexture||E.image[0].isCompressedTexture,Se=E.image[0]&&E.image[0].isDataTexture,Le=[];for(let ge=0;ge<6;ge++)!ze&&!Se?Le[ge]=y(E.image[ge],!0,r.maxCubemapSize):Le[ge]=Se?E.image[ge].image:E.image[ge],Le[ge]=I(E,Le[ge]);const Be=Le[0],We=s.convert(E.format,E.colorSpace),fe=s.convert(E.type),De=g(E.internalFormat,We,fe,E.colorSpace),Pe=E.isVideoTexture!==!0,$e=ce.__version===void 0||oe===!0,G=he.dataReady;let Te=b(E,Be);Ae(t.TEXTURE_CUBE_MAP,E);let ue;if(ze){Pe&&$e&&n.texStorage2D(t.TEXTURE_CUBE_MAP,Te,De,Be.width,Be.height);for(let ge=0;ge<6;ge++){ue=Le[ge].mipmaps;for(let Re=0;Re<ue.length;Re++){const be=ue[Re];E.format!==oi?We!==null?Pe?G&&n.compressedTexSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ge,Re,0,0,be.width,be.height,We,be.data):n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ge,Re,De,be.width,be.height,0,be.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):Pe?G&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ge,Re,0,0,be.width,be.height,We,fe,be.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ge,Re,De,be.width,be.height,0,We,fe,be.data)}}}else{if(ue=E.mipmaps,Pe&&$e){ue.length>0&&Te++;const ge=ie(Le[0]);n.texStorage2D(t.TEXTURE_CUBE_MAP,Te,De,ge.width,ge.height)}for(let ge=0;ge<6;ge++)if(Se){Pe?G&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ge,0,0,0,Le[ge].width,Le[ge].height,We,fe,Le[ge].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ge,0,De,Le[ge].width,Le[ge].height,0,We,fe,Le[ge].data);for(let Re=0;Re<ue.length;Re++){const Xe=ue[Re].image[ge].image;Pe?G&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ge,Re+1,0,0,Xe.width,Xe.height,We,fe,Xe.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ge,Re+1,De,Xe.width,Xe.height,0,We,fe,Xe.data)}}else{Pe?G&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ge,0,0,0,We,fe,Le[ge]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ge,0,De,We,fe,Le[ge]);for(let Re=0;Re<ue.length;Re++){const be=ue[Re];Pe?G&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ge,Re+1,0,0,We,fe,be.image[ge]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ge,Re+1,De,We,fe,be.image[ge])}}}m(E)&&d(t.TEXTURE_CUBE_MAP),ce.__version=he.version,E.onUpdate&&E.onUpdate(E)}P.__version=E.version}function D(P,E,X,oe,he,ce){const Ie=s.convert(X.format,X.colorSpace),Me=s.convert(X.type),Fe=g(X.internalFormat,Ie,Me,X.colorSpace),ze=i.get(E),Se=i.get(X);if(Se.__renderTarget=E,!ze.__hasExternalTextures){const Le=Math.max(1,E.width>>ce),Be=Math.max(1,E.height>>ce);he===t.TEXTURE_3D||he===t.TEXTURE_2D_ARRAY?n.texImage3D(he,ce,Fe,Le,Be,E.depth,0,Ie,Me,null):n.texImage2D(he,ce,Fe,Le,Be,0,Ie,Me,null)}n.bindFramebuffer(t.FRAMEBUFFER,P),re(E)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,oe,he,Se.__webglTexture,0,ee(E)):(he===t.TEXTURE_2D||he>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&he<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,oe,he,Se.__webglTexture,ce),n.bindFramebuffer(t.FRAMEBUFFER,null)}function C(P,E,X){if(t.bindRenderbuffer(t.RENDERBUFFER,P),E.depthBuffer){const oe=E.depthTexture,he=oe&&oe.isDepthTexture?oe.type:null,ce=x(E.stencilBuffer,he),Ie=E.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Me=ee(E);re(E)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,Me,ce,E.width,E.height):X?t.renderbufferStorageMultisample(t.RENDERBUFFER,Me,ce,E.width,E.height):t.renderbufferStorage(t.RENDERBUFFER,ce,E.width,E.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,Ie,t.RENDERBUFFER,P)}else{const oe=E.textures;for(let he=0;he<oe.length;he++){const ce=oe[he],Ie=s.convert(ce.format,ce.colorSpace),Me=s.convert(ce.type),Fe=g(ce.internalFormat,Ie,Me,ce.colorSpace),ze=ee(E);X&&re(E)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,ze,Fe,E.width,E.height):re(E)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,ze,Fe,E.width,E.height):t.renderbufferStorage(t.RENDERBUFFER,Fe,E.width,E.height)}}t.bindRenderbuffer(t.RENDERBUFFER,null)}function ne(P,E){if(E&&E.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(t.FRAMEBUFFER,P),!(E.depthTexture&&E.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const oe=i.get(E.depthTexture);oe.__renderTarget=E,(!oe.__webglTexture||E.depthTexture.image.width!==E.width||E.depthTexture.image.height!==E.height)&&(E.depthTexture.image.width=E.width,E.depthTexture.image.height=E.height,E.depthTexture.needsUpdate=!0),Q(E.depthTexture,0);const he=oe.__webglTexture,ce=ee(E);if(E.depthTexture.format===Tl)re(E)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,he,0,ce):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,he,0);else if(E.depthTexture.format===bl)re(E)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,he,0,ce):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,he,0);else throw new Error("Unknown depthTexture format")}function de(P){const E=i.get(P),X=P.isWebGLCubeRenderTarget===!0;if(E.__boundDepthTexture!==P.depthTexture){const oe=P.depthTexture;if(E.__depthDisposeCallback&&E.__depthDisposeCallback(),oe){const he=()=>{delete E.__boundDepthTexture,delete E.__depthDisposeCallback,oe.removeEventListener("dispose",he)};oe.addEventListener("dispose",he),E.__depthDisposeCallback=he}E.__boundDepthTexture=oe}if(P.depthTexture&&!E.__autoAllocateDepthBuffer){if(X)throw new Error("target.depthTexture not supported in Cube render targets");const oe=P.texture.mipmaps;oe&&oe.length>0?ne(E.__webglFramebuffer[0],P):ne(E.__webglFramebuffer,P)}else if(X){E.__webglDepthbuffer=[];for(let oe=0;oe<6;oe++)if(n.bindFramebuffer(t.FRAMEBUFFER,E.__webglFramebuffer[oe]),E.__webglDepthbuffer[oe]===void 0)E.__webglDepthbuffer[oe]=t.createRenderbuffer(),C(E.__webglDepthbuffer[oe],P,!1);else{const he=P.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,ce=E.__webglDepthbuffer[oe];t.bindRenderbuffer(t.RENDERBUFFER,ce),t.framebufferRenderbuffer(t.FRAMEBUFFER,he,t.RENDERBUFFER,ce)}}else{const oe=P.texture.mipmaps;if(oe&&oe.length>0?n.bindFramebuffer(t.FRAMEBUFFER,E.__webglFramebuffer[0]):n.bindFramebuffer(t.FRAMEBUFFER,E.__webglFramebuffer),E.__webglDepthbuffer===void 0)E.__webglDepthbuffer=t.createRenderbuffer(),C(E.__webglDepthbuffer,P,!1);else{const he=P.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,ce=E.__webglDepthbuffer;t.bindRenderbuffer(t.RENDERBUFFER,ce),t.framebufferRenderbuffer(t.FRAMEBUFFER,he,t.RENDERBUFFER,ce)}}n.bindFramebuffer(t.FRAMEBUFFER,null)}function Y(P,E,X){const oe=i.get(P);E!==void 0&&D(oe.__webglFramebuffer,P,P.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,0),X!==void 0&&de(P)}function _e(P){const E=P.texture,X=i.get(P),oe=i.get(E);P.addEventListener("dispose",M);const he=P.textures,ce=P.isWebGLCubeRenderTarget===!0,Ie=he.length>1;if(Ie||(oe.__webglTexture===void 0&&(oe.__webglTexture=t.createTexture()),oe.__version=E.version,o.memory.textures++),ce){X.__webglFramebuffer=[];for(let Me=0;Me<6;Me++)if(E.mipmaps&&E.mipmaps.length>0){X.__webglFramebuffer[Me]=[];for(let Fe=0;Fe<E.mipmaps.length;Fe++)X.__webglFramebuffer[Me][Fe]=t.createFramebuffer()}else X.__webglFramebuffer[Me]=t.createFramebuffer()}else{if(E.mipmaps&&E.mipmaps.length>0){X.__webglFramebuffer=[];for(let Me=0;Me<E.mipmaps.length;Me++)X.__webglFramebuffer[Me]=t.createFramebuffer()}else X.__webglFramebuffer=t.createFramebuffer();if(Ie)for(let Me=0,Fe=he.length;Me<Fe;Me++){const ze=i.get(he[Me]);ze.__webglTexture===void 0&&(ze.__webglTexture=t.createTexture(),o.memory.textures++)}if(P.samples>0&&re(P)===!1){X.__webglMultisampledFramebuffer=t.createFramebuffer(),X.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,X.__webglMultisampledFramebuffer);for(let Me=0;Me<he.length;Me++){const Fe=he[Me];X.__webglColorRenderbuffer[Me]=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,X.__webglColorRenderbuffer[Me]);const ze=s.convert(Fe.format,Fe.colorSpace),Se=s.convert(Fe.type),Le=g(Fe.internalFormat,ze,Se,Fe.colorSpace,P.isXRRenderTarget===!0),Be=ee(P);t.renderbufferStorageMultisample(t.RENDERBUFFER,Be,Le,P.width,P.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+Me,t.RENDERBUFFER,X.__webglColorRenderbuffer[Me])}t.bindRenderbuffer(t.RENDERBUFFER,null),P.depthBuffer&&(X.__webglDepthRenderbuffer=t.createRenderbuffer(),C(X.__webglDepthRenderbuffer,P,!0)),n.bindFramebuffer(t.FRAMEBUFFER,null)}}if(ce){n.bindTexture(t.TEXTURE_CUBE_MAP,oe.__webglTexture),Ae(t.TEXTURE_CUBE_MAP,E);for(let Me=0;Me<6;Me++)if(E.mipmaps&&E.mipmaps.length>0)for(let Fe=0;Fe<E.mipmaps.length;Fe++)D(X.__webglFramebuffer[Me][Fe],P,E,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+Me,Fe);else D(X.__webglFramebuffer[Me],P,E,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+Me,0);m(E)&&d(t.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(Ie){for(let Me=0,Fe=he.length;Me<Fe;Me++){const ze=he[Me],Se=i.get(ze);n.bindTexture(t.TEXTURE_2D,Se.__webglTexture),Ae(t.TEXTURE_2D,ze),D(X.__webglFramebuffer,P,ze,t.COLOR_ATTACHMENT0+Me,t.TEXTURE_2D,0),m(ze)&&d(t.TEXTURE_2D)}n.unbindTexture()}else{let Me=t.TEXTURE_2D;if((P.isWebGL3DRenderTarget||P.isWebGLArrayRenderTarget)&&(Me=P.isWebGL3DRenderTarget?t.TEXTURE_3D:t.TEXTURE_2D_ARRAY),n.bindTexture(Me,oe.__webglTexture),Ae(Me,E),E.mipmaps&&E.mipmaps.length>0)for(let Fe=0;Fe<E.mipmaps.length;Fe++)D(X.__webglFramebuffer[Fe],P,E,t.COLOR_ATTACHMENT0,Me,Fe);else D(X.__webglFramebuffer,P,E,t.COLOR_ATTACHMENT0,Me,0);m(E)&&d(Me),n.unbindTexture()}P.depthBuffer&&de(P)}function ye(P){const E=P.textures;for(let X=0,oe=E.length;X<oe;X++){const he=E[X];if(m(he)){const ce=_(P),Ie=i.get(he).__webglTexture;n.bindTexture(ce,Ie),d(ce),n.unbindTexture()}}}const pe=[],w=[];function J(P){if(P.samples>0){if(re(P)===!1){const E=P.textures,X=P.width,oe=P.height;let he=t.COLOR_BUFFER_BIT;const ce=P.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Ie=i.get(P),Me=E.length>1;if(Me)for(let ze=0;ze<E.length;ze++)n.bindFramebuffer(t.FRAMEBUFFER,Ie.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+ze,t.RENDERBUFFER,null),n.bindFramebuffer(t.FRAMEBUFFER,Ie.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+ze,t.TEXTURE_2D,null,0);n.bindFramebuffer(t.READ_FRAMEBUFFER,Ie.__webglMultisampledFramebuffer);const Fe=P.texture.mipmaps;Fe&&Fe.length>0?n.bindFramebuffer(t.DRAW_FRAMEBUFFER,Ie.__webglFramebuffer[0]):n.bindFramebuffer(t.DRAW_FRAMEBUFFER,Ie.__webglFramebuffer);for(let ze=0;ze<E.length;ze++){if(P.resolveDepthBuffer&&(P.depthBuffer&&(he|=t.DEPTH_BUFFER_BIT),P.stencilBuffer&&P.resolveStencilBuffer&&(he|=t.STENCIL_BUFFER_BIT)),Me){t.framebufferRenderbuffer(t.READ_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,Ie.__webglColorRenderbuffer[ze]);const Se=i.get(E[ze]).__webglTexture;t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,Se,0)}t.blitFramebuffer(0,0,X,oe,0,0,X,oe,he,t.NEAREST),l===!0&&(pe.length=0,w.length=0,pe.push(t.COLOR_ATTACHMENT0+ze),P.depthBuffer&&P.resolveDepthBuffer===!1&&(pe.push(ce),w.push(ce),t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,w)),t.invalidateFramebuffer(t.READ_FRAMEBUFFER,pe))}if(n.bindFramebuffer(t.READ_FRAMEBUFFER,null),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),Me)for(let ze=0;ze<E.length;ze++){n.bindFramebuffer(t.FRAMEBUFFER,Ie.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+ze,t.RENDERBUFFER,Ie.__webglColorRenderbuffer[ze]);const Se=i.get(E[ze]).__webglTexture;n.bindFramebuffer(t.FRAMEBUFFER,Ie.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+ze,t.TEXTURE_2D,Se,0)}n.bindFramebuffer(t.DRAW_FRAMEBUFFER,Ie.__webglMultisampledFramebuffer)}else if(P.depthBuffer&&P.resolveDepthBuffer===!1&&l){const E=P.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT;t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,[E])}}}function ee(P){return Math.min(r.maxSamples,P.samples)}function re(P){const E=i.get(P);return P.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&E.__useRenderToTexture!==!1}function F(P){const E=o.render.frame;u.get(P)!==E&&(u.set(P,E),P.update())}function I(P,E){const X=P.colorSpace,oe=P.format,he=P.type;return P.isCompressedTexture===!0||P.isVideoTexture===!0||X!==ea&&X!==Mr&&(ot.getTransfer(X)===dt?(oe!==oi||he!==Ni)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",X)),E}function ie(P){return typeof HTMLImageElement<"u"&&P instanceof HTMLImageElement?(c.width=P.naturalWidth||P.width,c.height=P.naturalHeight||P.height):typeof VideoFrame<"u"&&P instanceof VideoFrame?(c.width=P.displayWidth,c.height=P.displayHeight):(c.width=P.width,c.height=P.height),c}this.allocateTextureUnit=V,this.resetTextureUnits=z,this.setTexture2D=Q,this.setTexture2DArray=j,this.setTexture3D=W,this.setTextureCube=N,this.rebindTextures=Y,this.setupRenderTarget=_e,this.updateRenderTargetMipmap=ye,this.updateMultisampleRenderTarget=J,this.setupDepthRenderbuffer=de,this.setupFrameBufferTexture=D,this.useMultisampledRTT=re}function F3(t,e){function n(i,r=Mr){let s;const o=ot.getTransfer(r);if(i===Ni)return t.UNSIGNED_BYTE;if(i===Gm)return t.UNSIGNED_SHORT_4_4_4_4;if(i===Wm)return t.UNSIGNED_SHORT_5_5_5_1;if(i===sw)return t.UNSIGNED_INT_5_9_9_9_REV;if(i===iw)return t.BYTE;if(i===rw)return t.SHORT;if(i===El)return t.UNSIGNED_SHORT;if(i===Vm)return t.INT;if(i===Us)return t.UNSIGNED_INT;if(i===Ki)return t.FLOAT;if(i===zl)return t.HALF_FLOAT;if(i===ow)return t.ALPHA;if(i===aw)return t.RGB;if(i===oi)return t.RGBA;if(i===Tl)return t.DEPTH_COMPONENT;if(i===bl)return t.DEPTH_STENCIL;if(i===lw)return t.RED;if(i===Xm)return t.RED_INTEGER;if(i===cw)return t.RG;if(i===jm)return t.RG_INTEGER;if(i===Ym)return t.RGBA_INTEGER;if(i===Qc||i===Jc||i===eu||i===tu)if(o===dt)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(i===Qc)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===Jc)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===eu)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===tu)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(i===Qc)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===Jc)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===eu)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===tu)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===Zh||i===Kh||i===Qh||i===Jh)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(i===Zh)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===Kh)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===Qh)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===Jh)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===ep||i===tp||i===np)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(i===ep||i===tp)return o===dt?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(i===np)return o===dt?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(i===ip||i===rp||i===sp||i===op||i===ap||i===lp||i===cp||i===up||i===fp||i===dp||i===hp||i===pp||i===mp||i===gp)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(i===ip)return o===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===rp)return o===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===sp)return o===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===op)return o===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===ap)return o===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===lp)return o===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===cp)return o===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===up)return o===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===fp)return o===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===dp)return o===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===hp)return o===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===pp)return o===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===mp)return o===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===gp)return o===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===nu||i===vp||i===yp)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(i===nu)return o===dt?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===vp)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===yp)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===uw||i===xp||i===_p||i===Sp)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(i===nu)return s.COMPRESSED_RED_RGT
vendor: 9,905 bytes, lines 3880-3904
3880C1_EXT;if(i===xp)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===_p)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===Sp)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===Ml?t.UNSIGNED_INT_24_8:t[i]!==void 0?t[i]:null}return{convert:n}}const k3=` 3881void main() { 3882 3883 gl_Position = vec4( position, 1.0 ); 3884 3885}`,z3=` 3886uniform sampler2DArray depthColor; 3887uniform float depthWidth; 3888uniform float depthHeight; 3889 3890void main() { 3891 3892 vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); 3893 3894 if ( coord.x >= 1.0 ) { 3895 3896 gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; 3897 3898 } else { 3899 3900 gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; 3901 3902 } 3903 3904}`;class B3{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,n,i){if(this.texture===null){const r=new Sn,s=e.properties.get(r);s.__webglTexture=n.texture,(n.depthNear!==i.depthNear||n.depthFar!==i.depthFar)&&(this.depthNear=n.depthNear,this.depthFar=n.depthFar),this.texture=r}}getMesh(e){if(this.texture!==null&&this.mesh===null){const n=e.cameras[0].viewport,i=new $r({vertexShader:k3,fragmentShader:z3,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new Ti(new pf(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class H3 extends ca{constructor(e,n){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,u=null,f=null,h=null,p=null,v=null;const y=new B3,m=n.getContextAttributes();let d=null,_=null;const g=[],x=[],b=new xe;let A=null;const M=new Gn;M.viewport=new Rt;const R=new Gn;R.viewport=new Rt;const T=[M,R],S=new a2;let U=null,z=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(k){let O=g[k];return O===void 0&&(O=new Sd,g[k]=O),O.getTargetRaySpace()},this.getControllerGrip=function(k){let O=g[k];return O===void 0&&(O=new Sd,g[k]=O),O.getGripSpace()},this.getHand=function(k){let O=g[k];return O===void 0&&(O=new Sd,g[k]=O),O.getHandSpace()};function V(k){const O=x.indexOf(k.inputSource);if(O===-1)return;const D=g[O];D!==void 0&&(D.update(k.inputSource,k.frame,c||o),D.dispatchEvent({type:k.type,data:k.inputSource}))}function H(){r.removeEventListener("select",V),r.removeEventListener("selectstart",V),r.removeEventListener("selectend",V),r.removeEventListener("squeeze",V),r.removeEventListener("squeezestart",V),r.removeEventListener("squeezeend",V),r.removeEventListener("end",H),r.removeEventListener("inputsourceschange",Q);for(let k=0;k<g.length;k++){const O=x[k];O!==null&&(x[k]=null,g[k].disconnect(O))}U=null,z=null,y.reset(),e.setRenderTarget(d),p=null,h=null,f=null,r=null,_=null,He.stop(),i.isPresenting=!1,e.setPixelRatio(A),e.setSize(b.width,b.height,!1),i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(k){s=k,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(k){a=k,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(k){c=k},this.getBaseLayer=function(){return h!==null?h:p},this.getBinding=function(){return f},this.getFrame=function(){return v},this.getSession=function(){return r},this.setSession=async function(k){if(r=k,r!==null){if(d=e.getRenderTarget(),r.addEventListener("select",V),r.addEventListener("selectstart",V),r.addEventListener("selectend",V),r.addEventListener("squeeze",V),r.addEventListener("squeezestart",V),r.addEventListener("squeezeend",V),r.addEventListener("end",H),r.addEventListener("inputsourceschange",Q),m.xrCompatible!==!0&&await n.makeXRCompatible(),A=e.getPixelRatio(),e.getSize(b),typeof XRWebGLBinding<"u"&&"createProjectionLayer"in XRWebGLBinding.prototype){let D=null,C=null,ne=null;m.depth&&(ne=m.stencil?n.DEPTH24_STENCIL8:n.DEPTH_COMPONENT24,D=m.stencil?bl:Tl,C=m.stencil?Ml:Us);const de={colorFormat:n.RGBA8,depthFormat:ne,scaleFactor:s};f=new XRWebGLBinding(r,n),h=f.createProjectionLayer(de),r.updateRenderState({layers:[h]}),e.setPixelRatio(1),e.setSize(h.textureWidth,h.textureHeight,!1),_=new Os(h.textureWidth,h.textureHeight,{format:oi,type:Ni,depthTexture:new Ew(h.textureWidth,h.textureHeight,C,void 0,void 0,void 0,void 0,void 0,void 0,D),stencilBuffer:m.stencil,colorSpace:e.outputColorSpace,samples:m.antialias?4:0,resolveDepthBuffer:h.ignoreDepthValues===!1,resolveStencilBuffer:h.ignoreDepthValues===!1})}else{const D={antialias:m.antialias,alpha:!0,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:s};p=new XRWebGLLayer(r,n,D),r.updateRenderState({baseLayer:p}),e.setPixelRatio(1),e.setSize(p.framebufferWidth,p.framebufferHeight,!1),_=new Os(p.framebufferWidth,p.framebufferHeight,{format:oi,type:Ni,colorSpace:e.outputColorSpace,stencilBuffer:m.stencil,resolveDepthBuffer:p.ignoreDepthValues===!1,resolveStencilBuffer:p.ignoreDepthValues===!1})}_.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await r.requestReferenceSpace(a),He.setContext(r),He.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(r!==null)return r.environmentBlendMode},this.getDepthTexture=function(){return y.getDepthTexture()};function Q(k){for(let O=0;O<k.removed.length;O++){const D=k.removed[O],C=x.indexOf(D);C>=0&&(x[C]=null,g[C].disconnect(D))}for(let O=0;O<k.added.length;O++){const D=k.added[O];let C=x.indexOf(D);if(C===-1){for(let de=0;de<g.length;de++)if(de>=x.length){x.push(D),C=de;break}else if(x[de]===null){x[de]=D,C=de;break}if(C===-1)break}const ne=g[C];ne&&ne.connect(D)}}const j=new Z,W=new Z;function N(k,O,D){j.setFromMatrixPosition(O.matrixWorld),W.setFromMatrixPosition(D.matrixWorld);const C=j.distanceTo(W),ne=O.projectionMatrix.elements,de=D.projectionMatrix.elements,Y=ne[14]/(ne[10]-1),_e=ne[14]/(ne[10]+1),ye=(ne[9]+1)/ne[5],pe=(ne[9]-1)/ne[5],w=(ne[8]-1)/ne[0],J=(de[8]+1)/de[0],ee=Y*w,re=Y*J,F=C/(-w+J),I=F*-w;if(O.matrixWorld.decompose(k.position,k.quaternion,k.scale),k.translateX(I),k.translateZ(F),k.matrixWorld.compose(k.position,k.quaternion,k.scale),k.matrixWorldInverse.copy(k.matrixWorld).invert(),ne[10]===-1)k.projectionMatrix.copy(O.projectionMatrix),k.projectionMatrixInverse.copy(O.projectionMatrixInverse);else{const ie=Y+F,P=_e+F,E=ee-I,X=re+(C-I),oe=ye*_e/P*ie,he=pe*_e/P*ie;k.projectionMatrix.makePerspective(E,X,oe,he,ie,P),k.projectionMatrixInverse.copy(k.projectionMatrix).invert()}}function K(k,O){O===null?k.matrixWorld.copy(k.matrix):k.matrixWorld.multiplyMatrices(O.matrixWorld,k.matrix),k.matrixWorldInverse.copy(k.matrixWorld).invert()}this.updateCamera=function(k){if(r===null)return;let O=k.near,D=k.far;y.texture!==null&&(y.depthNear>0&&(O=y.depthNear),y.depthFar>0&&(D=y.depthFar)),S.near=R.near=M.near=O,S.far=R.far=M.far=D,(U!==S.near||z!==S.far)&&(r.updateRenderState({depthNear:S.near,depthFar:S.far}),U=S.near,z=S.far),M.layers.mask=k.layers.mask|2,R.layers.mask=k.layers.mask|4,S.layers.mask=M.layers.mask|R.layers.mask;const C=k.parent,ne=S.cameras;K(S,C);for(let de=0;de<ne.length;de++)K(ne[de],C);ne.length===2?N(S,M,R):S.projectionMatrix.copy(M.projectionMatrix),se(k,S,C)};function se(k,O,D){D===null?k.matrix.copy(O.matrixWorld):(k.matrix.copy(D.matrixWorld),k.matrix.invert(),k.matrix.multiply(O.matrixWorld)),k.matrix.decompose(k.position,k.quaternion,k.scale),k.updateMatrixWorld(!0),k.projectionMatrix.copy(O.projectionMatrix),k.projectionMatrixInverse.copy(O.projectionMatrixInverse),k.isPerspectiveCamera&&(k.fov=wp*2*Math.atan(1/k.projectionMatrix.elements[5]),k.zoom=1)}this.getCamera=function(){return S},this.getFoveation=function(){if(!(h===null&&p===null))return l},this.setFoveation=function(k){l=k,h!==null&&(h.fixedFoveation=k),p!==null&&p.fixedFoveation!==void 0&&(p.fixedFoveation=k)},this.hasDepthSensing=function(){return y.texture!==null},this.getDepthSensingMesh=function(){return y.getMesh(S)};let me=null;function Ae(k,O){if(u=O.getViewerPose(c||o),v=O,u!==null){const D=u.views;p!==null&&(e.setRenderTargetFramebuffer(_,p.framebuffer),e.setRenderTarget(_));let C=!1;D.length!==S.cameras.length&&(S.cameras.length=0,C=!0);for(let Y=0;Y<D.length;Y++){const _e=D[Y];let ye=null;if(p!==null)ye=p.getViewport(_e);else{const w=f.getViewSubImage(h,_e);ye=w.viewport,Y===0&&(e.setRenderTargetTextures(_,w.colorTexture,w.depthStencilTexture),e.setRenderTarget(_))}let pe=T[Y];pe===void 0&&(pe=new Gn,pe.layers.enable(Y),pe.viewport=new Rt,T[Y]=pe),pe.matrix.fromArray(_e.transform.matrix),pe.matrix.decompose(pe.position,pe.quaternion,pe.scale),pe.projectionMatrix.fromArray(_e.projectionMatrix),pe.projectionMatrixInverse.copy(pe.projectionMatrix).invert(),pe.viewport.set(ye.x,ye.y,ye.width,ye.height),Y===0&&(S.matrix.copy(pe.matrix),S.matrix.decompose(S.position,S.quaternion,S.scale)),C===!0&&S.cameras.push(pe)}const ne=r.enabledFeatures;if(ne&&ne.includes("depth-sensing")&&r.depthUsage=="gpu-optimized"&&f){const Y=f.getDepthInformation(D[0]);Y&&Y.isValid&&Y.texture&&y.init(e,Y,r.renderState)}}for(let D=0;D<g.length;D++){const C=x[D],ne=g[D];C!==null&&ne!==void 0&&ne.update(C,O,c||o)}me&&me(k,O),O.detectedPlanes&&i.dispatchEvent({type:"planesdetected",data:O}),v=null}const He=new Iw;He.setAnimationLoop(Ae),this.setAnimationLoop=function(k){me=k},this.dispose=function(){}}}const us=new Di,V3=new Mt;function G3(t,e){function n(m,d){m.matrixAutoUpdate===!0&&m.updateMatrix(),d.value.copy(m.matrix)}function i(m,d){d.color.getRGB(m.fogColor.value,_w(t)),d.isFog?(m.fogNear.value=d.near,m.fogFar.value=d.far):d.isFogExp2&&(m.fogDensity.value=d.density)}function r(m,d,_,g,x){d.isMeshBasicMaterial||d.isMeshLambertMaterial?s(m,d):d.isMeshToonMaterial?(s(m,d),f(m,d)):d.isMeshPhongMaterial?(s(m,d),u(m,d)):d.isMeshStandardMaterial?(s(m,d),h(m,d),d.isMeshPhysicalMaterial&&p(m,d,x)):d.isMeshMat
vendor: 13,208 bytes, line 3904
3904capMaterial?(s(m,d),v(m,d)):d.isMeshDepthMaterial?s(m,d):d.isMeshDistanceMaterial?(s(m,d),y(m,d)):d.isMeshNormalMaterial?s(m,d):d.isLineBasicMaterial?(o(m,d),d.isLineDashedMaterial&&a(m,d)):d.isPointsMaterial?l(m,d,_,g):d.isSpriteMaterial?c(m,d):d.isShadowMaterial?(m.color.value.copy(d.color),m.opacity.value=d.opacity):d.isShaderMaterial&&(d.uniformsNeedUpdate=!1)}function s(m,d){m.opacity.value=d.opacity,d.color&&m.diffuse.value.copy(d.color),d.emissive&&m.emissive.value.copy(d.emissive).multiplyScalar(d.emissiveIntensity),d.map&&(m.map.value=d.map,n(d.map,m.mapTransform)),d.alphaMap&&(m.alphaMap.value=d.alphaMap,n(d.alphaMap,m.alphaMapTransform)),d.bumpMap&&(m.bumpMap.value=d.bumpMap,n(d.bumpMap,m.bumpMapTransform),m.bumpScale.value=d.bumpScale,d.side===_n&&(m.bumpScale.value*=-1)),d.normalMap&&(m.normalMap.value=d.normalMap,n(d.normalMap,m.normalMapTransform),m.normalScale.value.copy(d.normalScale),d.side===_n&&m.normalScale.value.negate()),d.displacementMap&&(m.displacementMap.value=d.displacementMap,n(d.displacementMap,m.displacementMapTransform),m.displacementScale.value=d.displacementScale,m.displacementBias.value=d.displacementBias),d.emissiveMap&&(m.emissiveMap.value=d.emissiveMap,n(d.emissiveMap,m.emissiveMapTransform)),d.specularMap&&(m.specularMap.value=d.specularMap,n(d.specularMap,m.specularMapTransform)),d.alphaTest>0&&(m.alphaTest.value=d.alphaTest);const _=e.get(d),g=_.envMap,x=_.envMapRotation;g&&(m.envMap.value=g,us.copy(x),us.x*=-1,us.y*=-1,us.z*=-1,g.isCubeTexture&&g.isRenderTargetTexture===!1&&(us.y*=-1,us.z*=-1),m.envMapRotation.value.setFromMatrix4(V3.makeRotationFromEuler(us)),m.flipEnvMap.value=g.isCubeTexture&&g.isRenderTargetTexture===!1?-1:1,m.reflectivity.value=d.reflectivity,m.ior.value=d.ior,m.refractionRatio.value=d.refractionRatio),d.lightMap&&(m.lightMap.value=d.lightMap,m.lightMapIntensity.value=d.lightMapIntensity,n(d.lightMap,m.lightMapTransform)),d.aoMap&&(m.aoMap.value=d.aoMap,m.aoMapIntensity.value=d.aoMapIntensity,n(d.aoMap,m.aoMapTransform))}function o(m,d){m.diffuse.value.copy(d.color),m.opacity.value=d.opacity,d.map&&(m.map.value=d.map,n(d.map,m.mapTransform))}function a(m,d){m.dashSize.value=d.dashSize,m.totalSize.value=d.dashSize+d.gapSize,m.scale.value=d.scale}function l(m,d,_,g){m.diffuse.value.copy(d.color),m.opacity.value=d.opacity,m.size.value=d.size*_,m.scale.value=g*.5,d.map&&(m.map.value=d.map,n(d.map,m.uvTransform)),d.alphaMap&&(m.alphaMap.value=d.alphaMap,n(d.alphaMap,m.alphaMapTransform)),d.alphaTest>0&&(m.alphaTest.value=d.alphaTest)}function c(m,d){m.diffuse.value.copy(d.color),m.opacity.value=d.opacity,m.rotation.value=d.rotation,d.map&&(m.map.value=d.map,n(d.map,m.mapTransform)),d.alphaMap&&(m.alphaMap.value=d.alphaMap,n(d.alphaMap,m.alphaMapTransform)),d.alphaTest>0&&(m.alphaTest.value=d.alphaTest)}function u(m,d){m.specular.value.copy(d.specular),m.shininess.value=Math.max(d.shininess,1e-4)}function f(m,d){d.gradientMap&&(m.gradientMap.value=d.gradientMap)}function h(m,d){m.metalness.value=d.metalness,d.metalnessMap&&(m.metalnessMap.value=d.metalnessMap,n(d.metalnessMap,m.metalnessMapTransform)),m.roughness.value=d.roughness,d.roughnessMap&&(m.roughnessMap.value=d.roughnessMap,n(d.roughnessMap,m.roughnessMapTransform)),d.envMap&&(m.envMapIntensity.value=d.envMapIntensity)}function p(m,d,_){m.ior.value=d.ior,d.sheen>0&&(m.sheenColor.value.copy(d.sheenColor).multiplyScalar(d.sheen),m.sheenRoughness.value=d.sheenRoughness,d.sheenColorMap&&(m.sheenColorMap.value=d.sheenColorMap,n(d.sheenColorMap,m.sheenColorMapTransform)),d.sheenRoughnessMap&&(m.sheenRoughnessMap.value=d.sheenRoughnessMap,n(d.sheenRoughnessMap,m.sheenRoughnessMapTransform))),d.clearcoat>0&&(m.clearcoat.value=d.clearcoat,m.clearcoatRoughness.value=d.clearcoatRoughness,d.clearcoatMap&&(m.clearcoatMap.value=d.clearcoatMap,n(d.clearcoatMap,m.clearcoatMapTransform)),d.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=d.clearcoatRoughnessMap,n(d.clearcoatRoughnessMap,m.clearcoatRoughnessMapTransform)),d.clearcoatNormalMap&&(m.clearcoatNormalMap.value=d.clearcoatNormalMap,n(d.clearcoatNormalMap,m.clearcoatNormalMapTransform),m.clearcoatNormalScale.value.copy(d.clearcoatNormalScale),d.side===_n&&m.clearcoatNormalScale.value.negate())),d.dispersion>0&&(m.dispersion.value=d.dispersion),d.iridescence>0&&(m.iridescence.value=d.iridescence,m.iridescenceIOR.value=d.iridescenceIOR,m.iridescenceThicknessMinimum.value=d.iridescenceThicknessRange[0],m.iridescenceThicknessMaximum.value=d.iridescenceThicknessRange[1],d.iridescenceMap&&(m.iridescenceMap.value=d.iridescenceMap,n(d.iridescenceMap,m.iridescenceMapTransform)),d.iridescenceThicknessMap&&(m.iridescenceThicknessMap.value=d.iridescenceThicknessMap,n(d.iridescenceThicknessMap,m.iridescenceThicknessMapTransform))),d.transmission>0&&(m.transmission.value=d.transmission,m.transmissionSamplerMap.value=_.texture,m.transmissionSamplerSize.value.set(_.width,_.height),d.transmissionMap&&(m.transmissionMap.value=d.transmissionMap,n(d.transmissionMap,m.transmissionMapTransform)),m.thickness.value=d.thickness,d.thicknessMap&&(m.thicknessMap.value=d.thicknessMap,n(d.thicknessMap,m.thicknessMapTransform)),m.attenuationDistance.value=d.attenuationDistance,m.attenuationColor.value.copy(d.attenuationColor)),d.anisotropy>0&&(m.anisotropyVector.value.set(d.anisotropy*Math.cos(d.anisotropyRotation),d.anisotropy*Math.sin(d.anisotropyRotation)),d.anisotropyMap&&(m.anisotropyMap.value=d.anisotropyMap,n(d.anisotropyMap,m.anisotropyMapTransform))),m.specularIntensity.value=d.specularIntensity,m.specularColor.value.copy(d.specularColor),d.specularColorMap&&(m.specularColorMap.value=d.specularColorMap,n(d.specularColorMap,m.specularColorMapTransform)),d.specularIntensityMap&&(m.specularIntensityMap.value=d.specularIntensityMap,n(d.specularIntensityMap,m.specularIntensityMapTransform))}function v(m,d){d.matcap&&(m.matcap.value=d.matcap)}function y(m,d){const _=e.get(d).light;m.referencePosition.value.setFromMatrixPosition(_.matrixWorld),m.nearDistance.value=_.shadow.camera.near,m.farDistance.value=_.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function W3(t,e,n,i){let r={},s={},o=[];const a=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS);function l(_,g){const x=g.program;i.uniformBlockBinding(_,x)}function c(_,g){let x=r[_.id];x===void 0&&(v(_),x=u(_),r[_.id]=x,_.addEventListener("dispose",m));const b=g.program;i.updateUBOMapping(_,b);const A=e.render.frame;s[_.id]!==A&&(h(_),s[_.id]=A)}function u(_){const g=f();_.__bindingPointIndex=g;const x=t.createBuffer(),b=_.__size,A=_.usage;return t.bindBuffer(t.UNIFORM_BUFFER,x),t.bufferData(t.UNIFORM_BUFFER,b,A),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,g,x),x}function f(){for(let _=0;_<a;_++)if(o.indexOf(_)===-1)return o.push(_),_;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function h(_){const g=r[_.id],x=_.uniforms,b=_.__cache;t.bindBuffer(t.UNIFORM_BUFFER,g);for(let A=0,M=x.length;A<M;A++){const R=Array.isArray(x[A])?x[A]:[x[A]];for(let T=0,S=R.length;T<S;T++){const U=R[T];if(p(U,A,T,b)===!0){const z=U.__offset,V=Array.isArray(U.value)?U.value:[U.value];let H=0;for(let Q=0;Q<V.length;Q++){const j=V[Q],W=y(j);typeof j=="number"||typeof j=="boolean"?(U.__data[0]=j,t.bufferSubData(t.UNIFORM_BUFFER,z+H,U.__data)):j.isMatrix3?(U.__data[0]=j.elements[0],U.__data[1]=j.elements[1],U.__data[2]=j.elements[2],U.__data[3]=0,U.__data[4]=j.elements[3],U.__data[5]=j.elements[4],U.__data[6]=j.elements[5],U.__data[7]=0,U.__data[8]=j.elements[6],U.__data[9]=j.elements[7],U.__data[10]=j.elements[8],U.__data[11]=0):(j.toArray(U.__data,H),H+=W.storage/Float32Array.BYTES_PER_ELEMENT)}t.bufferSubData(t.UNIFORM_BUFFER,z,U.__data)}}}t.bindBuffer(t.UNIFORM_BUFFER,null)}function p(_,g,x,b){const A=_.value,M=g+"_"+x;if(b[M]===void 0)return typeof A=="number"||typeof A=="boolean"?b[M]=A:b[M]=A.clone(),!0;{const R=b[M];if(typeof A=="number"||typeof A=="boolean"){if(R!==A)return b[M]=A,!0}else if(R.equals(A)===!1)return R.copy(A),!0}return!1}function v(_){const g=_.uniforms;let x=0;const b=16;for(let M=0,R=g.length;M<R;M++){const T=Array.isArray(g[M])?g[M]:[g[M]];for(let S=0,U=T.length;S<U;S++){const z=T[S],V=Array.isArray(z.value)?z.value:[z.value];for(let H=0,Q=V.length;H<Q;H++){const j=V[H],W=y(j),N=x%b,K=N%W.boundary,se=N+K;x+=K,se!==0&&b-se<W.storage&&(x+=b-se),z.__data=new Float32Array(W.storage/Float32Array.BYTES_PER_ELEMENT),z.__offset=x,x+=W.storage}}}const A=x%b;return A>0&&(x+=b-A),_.__size=x,_.__cache={},this}function y(_){const g={boundary:0,storage:0};return typeof _=="number"||typeof _=="boolean"?(g.boundary=4,g.storage=4):_.isVector2?(g.boundary=8,g.storage=8):_.isVector3||_.isColor?(g.boundary=16,g.storage=12):_.isVector4?(g.boundary=16,g.storage=16):_.isMatrix3?(g.boundary=48,g.storage=48):_.isMatrix4?(g.boundary=64,g.storage=64):_.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",_),g}function m(_){const g=_.target;g.removeEventListener("dispose",m);const x=o.indexOf(g.__bindingPointIndex);o.splice(x,1),t.deleteBuffer(r[g.id]),delete r[g.id],delete s[g.id]}function d(){for(const _ in r)t.deleteBuffer(r[_]);o=[],r={},s={}}return{bind:l,update:c,dispose:d}}class X3{constructor(e={}){const{canvas:n=BR(),context:i=null,depth:r=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:f=!1,reverseDepthBuffer:h=!1}=e;this.isWebGLRenderer=!0;let p;if(i!==null){if(typeof WebGLRenderingContext<"u"&&i instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");p=i.getContextAttributes().alpha}else p=o;const v=new Uint32Array(4),y=new Int32Array(4);let m=null,d=null;const _=[],g=[];this.domElement=n,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=Vr,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const x=this;let b=!1;this._outputColorSpace=Cn;let A=0,M=0,R=null,T=-1,S=null;const U=new Rt,z=new Rt;let V=null;const H=new at(0);let Q=0,j=n.width,W=n.height,N=1,K=null,se=null;const me=new Rt(0,0,j,W),Ae=new Rt(0,0,j,W);let He=!1;const k=new Zm;let O=!1,D=!1;const C=new Mt,ne=new Mt,de=new Z,Y=new Rt,_e={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let ye=!1;function pe(){return R===null?N:1}let w=i;function J(L,q){return n.getContext(L,q)}try{const L={alpha:!0,depth:r,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:f};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${Hm}`),n.addEventListener("webglcontextlost",ge,!1),n.addEventListener("webglcontextrestored",Re,!1),n.addEventListener("webglcontextcreationerror",be,!1),w===null){const q="webgl2";if(w=J(q,L),w===null)throw J(q)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(L){throw console.error("THREE.WebGLRenderer: "+L.message),L}let ee,re,F,I,ie,P,E,X,oe,he,ce,Ie,Me,Fe,ze,Se,Le,Be,We,fe,De,Pe,$e,G;function Te(){ee=new tD(w),ee.init(),Pe=new F3(w,ee),re=new qN(w,ee,e,Pe),F=new U3(w,ee),re.reverseDepthBuffer&&h&&F.buffers.depth.setReversed(!0),I=new rD(w),ie=new w3,P=new O3(w,ee,F,ie,re,Pe,I),E=new ZN(x),X=new eD(x),oe=new u2(w),$e=new jN(w,oe),he=new nD(w,oe,I,$e),ce=new oD(w,he,oe,I),We=new sD(w,re,P),Se=new $N(ie),Ie=new S3(x,E,X,ee,re,$e,Se),Me=new G3(x,ie),Fe=new M3,ze=new P3(ee),Be=new XN(x,E,X,F,ce,p,l),Le=new D3(x,ce,re),G=new W3(w,I,re,F),fe=new YN(w,ee,I),De=new iD(w,ee,I),I.programs=Ie.programs,x.capabilities=re,x.extensions=ee,x.properties=ie,x.renderLists=Fe,x.shadowMap=Le,x.state=F,x.info=I}Te();const ue=new H3(x,w);this.xr=ue,this.getContext=function(){return w},this.getContextAttributes=function(){return w.getContextAttributes()},this.forceContextLoss=function(){const L=ee.get("WEBGL_lose_context");L&&L.loseContext()},this.forceContextRestore=function(){const L=ee.get("WEBGL_lose_context");L&&L.restoreContext()},this.getPixelRatio=function(){return N},this.setPixelRatio=function(L){L!==void 0&&(N=L,this.setSize(j,W,!1))},this.getSize=function(L){return L.set(j,W)},this.setSize=function(L,q,ae=!0){if(ue.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}j=L,W=q,n.width=Math.floor(L*N),n.height=Math.floor(q*N),ae===!0&&(n.style.width=L+"px",n.style.height=q+"px"),this.setViewport(0,0,L,q)},this.getDrawingBufferSize=function(L){return L.set(j*N,W*N).floor()},this.setDrawingBufferSize=function(L,q,ae){j=L,W=q,N=ae,n.width=Math.floor(L*ae),n.height=Math.floor(q*ae),this.setViewport(0,0,L,q)},this.getCurrentViewport=function(L){return L.copy(U)},this.getViewport=function(L){return L.copy(me)},this.setViewport=function(L,q,ae,le){L.isVector4?me.set(L.x,L.y,L.z,L.w):me.set(L,q,ae,le),F.viewport(U.copy(me).multiplyScalar(N).roun
vendor: 10,155 bytes, line 3904
3904d())},this.getScissor=function(L){return L.copy(Ae)},this.setScissor=function(L,q,ae,le){L.isVector4?Ae.set(L.x,L.y,L.z,L.w):Ae.set(L,q,ae,le),F.scissor(z.copy(Ae).multiplyScalar(N).round())},this.getScissorTest=function(){return He},this.setScissorTest=function(L){F.setScissorTest(He=L)},this.setOpaqueSort=function(L){K=L},this.setTransparentSort=function(L){se=L},this.getClearColor=function(L){return L.copy(Be.getClearColor())},this.setClearColor=function(){Be.setClearColor(...arguments)},this.getClearAlpha=function(){return Be.getClearAlpha()},this.setClearAlpha=function(){Be.setClearAlpha(...arguments)},this.clear=function(L=!0,q=!0,ae=!0){let le=0;if(L){let $=!1;if(R!==null){const Ee=R.texture.format;$=Ee===Ym||Ee===jm||Ee===Xm}if($){const Ee=R.texture.type,Ne=Ee===Ni||Ee===Us||Ee===El||Ee===Ml||Ee===Gm||Ee===Wm,Oe=Be.getClearColor(),ke=Be.getClearAlpha(),qe=Oe.r,Ye=Oe.g,Ve=Oe.b;Ne?(v[0]=qe,v[1]=Ye,v[2]=Ve,v[3]=ke,w.clearBufferuiv(w.COLOR,0,v)):(y[0]=qe,y[1]=Ye,y[2]=Ve,y[3]=ke,w.clearBufferiv(w.COLOR,0,y))}else le|=w.COLOR_BUFFER_BIT}q&&(le|=w.DEPTH_BUFFER_BIT),ae&&(le|=w.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),w.clear(le)},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(){n.removeEventListener("webglcontextlost",ge,!1),n.removeEventListener("webglcontextrestored",Re,!1),n.removeEventListener("webglcontextcreationerror",be,!1),Be.dispose(),Fe.dispose(),ze.dispose(),ie.dispose(),E.dispose(),X.dispose(),ce.dispose(),$e.dispose(),G.dispose(),Ie.dispose(),ue.dispose(),ue.removeEventListener("sessionstart",ht),ue.removeEventListener("sessionend",pi),qt.stop()};function ge(L){L.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),b=!0}function Re(){console.log("THREE.WebGLRenderer: Context Restored."),b=!1;const L=I.autoReset,q=Le.enabled,ae=Le.autoUpdate,le=Le.needsUpdate,$=Le.type;Te(),I.autoReset=L,Le.enabled=q,Le.autoUpdate=ae,Le.needsUpdate=le,Le.type=$}function be(L){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",L.statusMessage)}function Xe(L){const q=L.target;q.removeEventListener("dispose",Xe),pt(q)}function pt(L){Bt(L),ie.remove(L)}function Bt(L){const q=ie.get(L).programs;q!==void 0&&(q.forEach(function(ae){Ie.releaseProgram(ae)}),L.isShaderMaterial&&Ie.releaseShaderCache(L))}this.renderBufferDirect=function(L,q,ae,le,$,Ee){q===null&&(q=_e);const Ne=$.isMesh&&$.matrixWorld.determinant()<0,Oe=ha(L,q,ae,le,$);F.setMaterial(le,Ne);let ke=ae.index,qe=1;if(le.wireframe===!0){if(ke=he.getWireframeAttribute(ae),ke===void 0)return;qe=2}const Ye=ae.drawRange,Ve=ae.attributes.position;let nt=Ye.start*qe,lt=(Ye.start+Ye.count)*qe;Ee!==null&&(nt=Math.max(nt,Ee.start*qe),lt=Math.min(lt,(Ee.start+Ee.count)*qe)),ke!==null?(nt=Math.max(nt,0),lt=Math.min(lt,ke.count)):Ve!=null&&(nt=Math.max(nt,0),lt=Math.min(lt,Ve.count));const Lt=lt-nt;if(Lt<0||Lt===1/0)return;$e.setup($,le,Oe,ae,ke);let bt,st=fe;if(ke!==null&&(bt=oe.get(ke),st=De,st.setIndex(bt)),$.isMesh)le.wireframe===!0?(F.setLineWidth(le.wireframeLinewidth*pe()),st.setMode(w.LINES)):st.setMode(w.TRIANGLES);else if($.isLine){let Ge=le.linewidth;Ge===void 0&&(Ge=1),F.setLineWidth(Ge*pe()),$.isLineSegments?st.setMode(w.LINES):$.isLineLoop?st.setMode(w.LINE_LOOP):st.setMode(w.LINE_STRIP)}else $.isPoints?st.setMode(w.POINTS):$.isSprite&&st.setMode(w.TRIANGLES);if($.isBatchedMesh)if($._multiDrawInstances!==null)iu("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),st.renderMultiDrawInstances($._multiDrawStarts,$._multiDrawCounts,$._multiDrawCount,$._multiDrawInstances);else if(ee.get("WEBGL_multi_draw"))st.renderMultiDraw($._multiDrawStarts,$._multiDrawCounts,$._multiDrawCount);else{const Ge=$._multiDrawStarts,Wt=$._multiDrawCounts,ct=$._multiDrawCount,$n=ke?oe.get(ke).bytesPerElement:1,Hs=ie.get(le).currentProgram.getUniforms();for(let En=0;En<ct;En++)Hs.setValue(w,"_gl_DrawID",En),st.render(Ge[En]/$n,Wt[En])}else if($.isInstancedMesh)st.renderInstances(nt,Lt,$.count);else if(ae.isInstancedBufferGeometry){const Ge=ae._maxInstanceCount!==void 0?ae._maxInstanceCount:1/0,Wt=Math.min(ae.instanceCount,Ge);st.renderInstances(nt,Lt,Wt)}else st.render(nt,Lt)};function rt(L,q,ae){L.transparent===!0&&L.side===Ei&&L.forceSinglePass===!1?(L.side=_n,L.needsUpdate=!0,Oi(L,q,ae),L.side=qr,L.needsUpdate=!0,Oi(L,q,ae),L.side=Ei):Oi(L,q,ae)}this.compile=function(L,q,ae=null){ae===null&&(ae=L),d=ze.get(ae),d.init(q),g.push(d),ae.traverseVisible(function($){$.isLight&&$.layers.test(q.layers)&&(d.pushLight($),$.castShadow&&d.pushShadow($))}),L!==ae&&L.traverseVisible(function($){$.isLight&&$.layers.test(q.layers)&&(d.pushLight($),$.castShadow&&d.pushShadow($))}),d.setupLights();const le=new Set;return L.traverse(function($){if(!($.isMesh||$.isPoints||$.isLine||$.isSprite))return;const Ee=$.material;if(Ee)if(Array.isArray(Ee))for(let Ne=0;Ne<Ee.length;Ne++){const Oe=Ee[Ne];rt(Oe,ae,$),le.add(Oe)}else rt(Ee,ae,$),le.add(Ee)}),d=g.pop(),le},this.compileAsync=function(L,q,ae=null){const le=this.compile(L,q,ae);return new Promise($=>{function Ee(){if(le.forEach(function(Ne){ie.get(Ne).currentProgram.isReady()&&le.delete(Ne)}),le.size===0){$(L);return}setTimeout(Ee,10)}ee.get("KHR_parallel_shader_compile")!==null?Ee():setTimeout(Ee,10)})};let Je=null;function It(L){Je&&Je(L)}function ht(){qt.stop()}function pi(){qt.start()}const qt=new Iw;qt.setAnimationLoop(It),typeof self<"u"&&qt.setContext(self),this.setAnimationLoop=function(L){Je=L,ue.setAnimationLoop(L),L===null?qt.stop():qt.start()},ue.addEventListener("sessionstart",ht),ue.addEventListener("sessionend",pi),this.render=function(L,q){if(q!==void 0&&q.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(b===!0)return;if(L.matrixWorldAutoUpdate===!0&&L.updateMatrixWorld(),q.parent===null&&q.matrixWorldAutoUpdate===!0&&q.updateMatrixWorld(),ue.enabled===!0&&ue.isPresenting===!0&&(ue.cameraAutoUpdate===!0&&ue.updateCamera(q),q=ue.getCamera()),L.isScene===!0&&L.onBeforeRender(x,L,q,R),d=ze.get(L,g.length),d.init(q),g.push(d),ne.multiplyMatrices(q.projectionMatrix,q.matrixWorldInverse),k.setFromProjectionMatrix(ne),D=this.localClippingEnabled,O=Se.init(this.clippingPlanes,D),m=Fe.get(L,_.length),m.init(),_.push(m),ue.enabled===!0&&ue.isPresenting===!0){const Ee=x.xr.getDepthSensingMesh();Ee!==null&&cr(Ee,q,-1/0,x.sortObjects)}cr(L,q,0,x.sortObjects),m.finish(),x.sortObjects===!0&&m.sort(K,se),ye=ue.enabled===!1||ue.isPresenting===!1||ue.hasDepthSensing()===!1,ye&&Be.addToRenderList(m,L),this.info.render.frame++,O===!0&&Se.beginShadows();const ae=d.state.shadowsArray;Le.render(ae,L,q),O===!0&&Se.endShadows(),this.info.autoReset===!0&&this.info.reset();const le=m.opaque,$=m.transmissive;if(d.setupLights(),q.isArrayCamera){const Ee=q.cameras;if($.length>0)for(let Ne=0,Oe=Ee.length;Ne<Oe;Ne++){const ke=Ee[Ne];Bs(le,$,L,ke)}ye&&Be.render(L);for(let Ne=0,Oe=Ee.length;Ne<Oe;Ne++){const ke=Ee[Ne];Jr(m,L,ke,ke.viewport)}}else $.length>0&&Bs(le,$,L,q),ye&&Be.render(L),Jr(m,L,q);R!==null&&M===0&&(P.updateMultisampleRenderTarget(R),P.updateRenderTargetMipmap(R)),L.isScene===!0&&L.onAfterRender(x,L,q),$e.resetDefaultState(),T=-1,S=null,g.pop(),g.length>0?(d=g[g.length-1],O===!0&&Se.setGlobalState(x.clippingPlanes,d.state.camera)):d=null,_.pop(),_.length>0?m=_[_.length-1]:m=null};function cr(L,q,ae,le){if(L.visible===!1)return;if(L.layers.test(q.layers)){if(L.isGroup)ae=L.renderOrder;else if(L.isLOD)L.autoUpdate===!0&&L.update(q);else if(L.isLight)d.pushLight(L),L.castShadow&&d.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||k.intersectsSprite(L)){le&&Y.setFromMatrixPosition(L.matrixWorld).applyMatrix4(ne);const Ne=ce.update(L),Oe=L.material;Oe.visible&&m.push(L,Ne,Oe,ae,Y.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||k.intersectsObject(L))){const Ne=ce.update(L),Oe=L.material;if(le&&(L.boundingSphere!==void 0?(L.boundingSphere===null&&L.computeBoundingSphere(),Y.copy(L.boundingSphere.center)):(Ne.boundingSphere===null&&Ne.computeBoundingSphere(),Y.copy(Ne.boundingSphere.center)),Y.applyMatrix4(L.matrixWorld).applyMatrix4(ne)),Array.isArray(Oe)){const ke=Ne.groups;for(let qe=0,Ye=ke.length;qe<Ye;qe++){const Ve=ke[qe],nt=Oe[Ve.materialIndex];nt&&nt.visible&&m.push(L,Ne,nt,ae,Y.z,Ve)}}else Oe.visible&&m.push(L,Ne,Oe,ae,Y.z,null)}}const Ee=L.children;for(let Ne=0,Oe=Ee.length;Ne<Oe;Ne++)cr(Ee[Ne],q,ae,le)}function Jr(L,q,ae,le){const $=L.opaque,Ee=L.transmissive,Ne=L.transparent;d.setupLightsView(ae),O===!0&&Se.setGlobalState(x.clippingPlanes,ae),le&&F.viewport(U.copy(le)),$.length>0&&mi($,q,ae),Ee.length>0&&mi(Ee,q,ae),Ne.length>0&&mi(Ne,q,ae),F.buffers.depth.setTest(!0),F.buffers.depth.setMask(!0),F.buffers.color.setMask(!0),F.setPolygonOffset(!1)}function Bs(L,q,ae,le){if((ae.isScene===!0?ae.overrideMaterial:null)!==null)return;d.state.transmissionRenderTarget[le.id]===void 0&&(d.state.transmissionRenderTarget[le.id]=new Os(1,1,{generateMipmaps:!0,type:ee.has("EXT_color_buffer_half_float")||ee.has("EXT_color_buffer_float")?zl:Ni,minFilter:Ss,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:ot.workingColorSpace}));const Ee=d.state.transmissionRenderTarget[le.id],Ne=le.viewport||U;Ee.setSize(Ne.z*x.transmissionResolutionScale,Ne.w*x.transmissionResolutionScale);const Oe=x.getRenderTarget();x.setRenderTarget(Ee),x.getClearColor(H),Q=x.getClearAlpha(),Q<1&&x.setClearColor(16777215,.5),x.clear(),ye&&Be.render(ae);const ke=x.toneMapping;x.toneMapping=Vr;const qe=le.viewport;if(le.viewport!==void 0&&(le.viewport=void 0),d.setupLightsView(le),O===!0&&Se.setGlobalState(x.clippingPlanes,le),mi(L,ae,le),P.updateMultisampleRenderTarget(Ee),P.updateRenderTargetMipmap(Ee),ee.has("WEBGL_multisampled_render_to_texture")===!1){let Ye=!1;for(let Ve=0,nt=q.length;Ve<nt;Ve++){const lt=q[Ve],Lt=lt.object,bt=lt.geometry,st=lt.material,Ge=lt.group;if(st.side===Ei&&Lt.layers.test(le.layers)){const Wt=st.side;
vendor: 4,464 bytes, line 3904
3904st.side=_n,st.needsUpdate=!0,es(Lt,ae,le,bt,st,Ge),st.side=Wt,st.needsUpdate=!0,Ye=!0}}Ye===!0&&(P.updateMultisampleRenderTarget(Ee),P.updateRenderTargetMipmap(Ee))}x.setRenderTarget(Oe),x.setClearColor(H,Q),qe!==void 0&&(le.viewport=qe),x.toneMapping=ke}function mi(L,q,ae){const le=q.isScene===!0?q.overrideMaterial:null;for(let $=0,Ee=L.length;$<Ee;$++){const Ne=L[$],Oe=Ne.object,ke=Ne.geometry,qe=Ne.group;let Ye=Ne.material;Ye.allowOverride===!0&&le!==null&&(Ye=le),Oe.layers.test(ae.layers)&&es(Oe,q,ae,ke,Ye,qe)}}function es(L,q,ae,le,$,Ee){L.onBeforeRender(x,q,ae,le,$,Ee),L.modelViewMatrix.multiplyMatrices(ae.matrixWorldInverse,L.matrixWorld),L.normalMatrix.getNormalMatrix(L.modelViewMatrix),$.onBeforeRender(x,q,ae,le,L,Ee),$.transparent===!0&&$.side===Ei&&$.forceSinglePass===!1?($.side=_n,$.needsUpdate=!0,x.renderBufferDirect(ae,q,le,$,L,Ee),$.side=qr,$.needsUpdate=!0,x.renderBufferDirect(ae,q,le,$,L,Ee),$.side=Ei):x.renderBufferDirect(ae,q,le,$,L,Ee),L.onAfterRender(x,q,ae,le,$,Ee)}function Oi(L,q,ae){q.isScene!==!0&&(q=_e);const le=ie.get(L),$=d.state.lights,Ee=d.state.shadowsArray,Ne=$.state.version,Oe=Ie.getParameters(L,$.state,Ee,q,ae),ke=Ie.getProgramCacheKey(Oe);let qe=le.programs;le.environment=L.isMeshStandardMaterial?q.environment:null,le.fog=q.fog,le.envMap=(L.isMeshStandardMaterial?X:E).get(L.envMap||le.environment),le.envMapRotation=le.environment!==null&&L.envMap===null?q.environmentRotation:L.envMapRotation,qe===void 0&&(L.addEventListener("dispose",Xe),qe=new Map,le.programs=qe);let Ye=qe.get(ke);if(Ye!==void 0){if(le.currentProgram===Ye&&le.lightsStateVersion===Ne)return ns(L,Oe),Ye}else Oe.uniforms=Ie.getUniforms(L),L.onBeforeCompile(Oe,x),Ye=Ie.acquireProgram(Oe,ke),qe.set(ke,Ye),le.uniforms=Oe.uniforms;const Ve=le.uniforms;return(!L.isShaderMaterial&&!L.isRawShaderMaterial||L.clipping===!0)&&(Ve.clippingPlanes=Se.uniform),ns(L,Oe),le.needsLights=Vw(L),le.lightsStateVersion=Ne,le.needsLights&&(Ve.ambientLightColor.value=$.state.ambient,Ve.lightProbe.value=$.state.probe,Ve.directionalLights.value=$.state.directional,Ve.directionalLightShadows.value=$.state.directionalShadow,Ve.spotLights.value=$.state.spot,Ve.spotLightShadows.value=$.state.spotShadow,Ve.rectAreaLights.value=$.state.rectArea,Ve.ltc_1.value=$.state.rectAreaLTC1,Ve.ltc_2.value=$.state.rectAreaLTC2,Ve.pointLights.value=$.state.point,Ve.pointLightShadows.value=$.state.pointShadow,Ve.hemisphereLights.value=$.state.hemi,Ve.directionalShadowMap.value=$.state.directionalShadowMap,Ve.directionalShadowMatrix.value=$.state.directionalShadowMatrix,Ve.spotShadowMap.value=$.state.spotShadowMap,Ve.spotLightMatrix.value=$.state.spotLightMatrix,Ve.spotLightMap.value=$.state.spotLightMap,Ve.pointShadowMap.value=$.state.pointShadowMap,Ve.pointShadowMatrix.value=$.state.pointShadowMatrix),le.currentProgram=Ye,le.uniformsList=null,Ye}function ts(L){if(L.uniformsList===null){const q=L.currentProgram.getUniforms();L.uniformsList=ru.seqWithValue(q.seq,L.uniforms)}return L.uniformsList}function ns(L,q){const ae=ie.get(L);ae.outputColorSpace=q.outputColorSpace,ae.batching=q.batching,ae.batchingColor=q.batchingColor,ae.instancing=q.instancing,ae.instancingColor=q.instancingColor,ae.instancingMorph=q.instancingMorph,ae.skinning=q.skinning,ae.morphTargets=q.morphTargets,ae.morphNormals=q.morphNormals,ae.morphColors=q.morphColors,ae.morphTargetsCount=q.morphTargetsCount,ae.numClippingPlanes=q.numClippingPlanes,ae.numIntersection=q.numClipIntersection,ae.vertexAlphas=q.vertexAlphas,ae.vertexTangents=q.vertexTangents,ae.toneMapping=q.toneMapping}function ha(L,q,ae,le,$){q.isScene!==!0&&(q=_e),P.resetTextureUnits();const Ee=q.fog,Ne=le.isMeshStandardMaterial?q.environment:null,Oe=R===null?x.outputColorSpace:R.isXRRenderTarget===!0?R.texture.colorSpace:ea,ke=(le.isMeshStandardMaterial?X:E).get(le.envMap||Ne),qe=le.vertexColors===!0&&!!ae.attributes.color&&ae.attributes.color.itemSize===4,Ye=!!ae.attributes.tangent&&(!!le.normalMap||le.anisotropy>0),Ve=!!ae.morphAttributes.position,nt=!!ae.morphAttributes.normal,lt=!!ae.morphAttributes.color;let Lt=Vr;le.toneMapped&&(R===null||R.isXRRenderTarget===!0)&&(Lt=x.toneMapping);const bt=ae.morphAttributes.position||ae.morphAttributes.normal||ae.morphAttributes.color,st=bt!==void 0?bt.length:0,Ge=ie.get(le),Wt=d.state.lights;if(O===!0&&(D===!0||L!==S)){const sn=L===S&&le.id===T;Se.setState(le,L,sn)}let ct=!1;le.version===Ge.__version?(Ge.needsLights&&Ge.lightsStateVersion!==Wt.state.ver
vendor: 13,522 bytes, line 3904
3904sion||Ge.outputColorSpace!==Oe||$.isBatchedMesh&&Ge.batching===!1||!$.isBatchedMesh&&Ge.batching===!0||$.isBatchedMesh&&Ge.batchingColor===!0&&$.colorTexture===null||$.isBatchedMesh&&Ge.batchingColor===!1&&$.colorTexture!==null||$.isInstancedMesh&&Ge.instancing===!1||!$.isInstancedMesh&&Ge.instancing===!0||$.isSkinnedMesh&&Ge.skinning===!1||!$.isSkinnedMesh&&Ge.skinning===!0||$.isInstancedMesh&&Ge.instancingColor===!0&&$.instanceColor===null||$.isInstancedMesh&&Ge.instancingColor===!1&&$.instanceColor!==null||$.isInstancedMesh&&Ge.instancingMorph===!0&&$.morphTexture===null||$.isInstancedMesh&&Ge.instancingMorph===!1&&$.morphTexture!==null||Ge.envMap!==ke||le.fog===!0&&Ge.fog!==Ee||Ge.numClippingPlanes!==void 0&&(Ge.numClippingPlanes!==Se.numPlanes||Ge.numIntersection!==Se.numIntersection)||Ge.vertexAlphas!==qe||Ge.vertexTangents!==Ye||Ge.morphTargets!==Ve||Ge.morphNormals!==nt||Ge.morphColors!==lt||Ge.toneMapping!==Lt||Ge.morphTargetsCount!==st)&&(ct=!0):(ct=!0,Ge.__version=le.version);let $n=Ge.currentProgram;ct===!0&&($n=Oi(le,q,$));let Hs=!1,En=!1,ma=!1;const xt=$n.getUniforms(),Fn=Ge.uniforms;if(F.useProgram($n.program)&&(Hs=!0,En=!0,ma=!0),le.id!==T&&(T=le.id,En=!0),Hs||S!==L){F.buffers.depth.getReversed()?(C.copy(L.projectionMatrix),VR(C),GR(C),xt.setValue(w,"projectionMatrix",C)):xt.setValue(w,"projectionMatrix",L.projectionMatrix),xt.setValue(w,"viewMatrix",L.matrixWorldInverse);const hn=xt.map.cameraPosition;hn!==void 0&&hn.setValue(w,de.setFromMatrixPosition(L.matrixWorld)),re.logarithmicDepthBuffer&&xt.setValue(w,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(le.isMeshPhongMaterial||le.isMeshToonMaterial||le.isMeshLambertMaterial||le.isMeshBasicMaterial||le.isMeshStandardMaterial||le.isShaderMaterial)&&xt.setValue(w,"isOrthographic",L.isOrthographicCamera===!0),S!==L&&(S=L,En=!0,ma=!0)}if($.isSkinnedMesh){xt.setOptional(w,$,"bindMatrix"),xt.setOptional(w,$,"bindMatrixInverse");const sn=$.skeleton;sn&&(sn.boneTexture===null&&sn.computeBoneTexture(),xt.setValue(w,"boneTexture",sn.boneTexture,P))}$.isBatchedMesh&&(xt.setOptional(w,$,"batchingTexture"),xt.setValue(w,"batchingTexture",$._matricesTexture,P),xt.setOptional(w,$,"batchingIdTexture"),xt.setValue(w,"batchingIdTexture",$._indirectTexture,P),xt.setOptional(w,$,"batchingColorTexture"),$._colorsTexture!==null&&xt.setValue(w,"batchingColorTexture",$._colorsTexture,P));const kn=ae.morphAttributes;if((kn.position!==void 0||kn.normal!==void 0||kn.color!==void 0)&&We.update($,ae,$n),(En||Ge.receiveShadow!==$.receiveShadow)&&(Ge.receiveShadow=$.receiveShadow,xt.setValue(w,"receiveShadow",$.receiveShadow)),le.isMeshGouraudMaterial&&le.envMap!==null&&(Fn.envMap.value=ke,Fn.flipEnvMap.value=ke.isCubeTexture&&ke.isRenderTargetTexture===!1?-1:1),le.isMeshStandardMaterial&&le.envMap===null&&q.environment!==null&&(Fn.envMapIntensity.value=q.environmentIntensity),En&&(xt.setValue(w,"toneMappingExposure",x.toneMappingExposure),Ge.needsLights&&pa(Fn,ma),Ee&&le.fog===!0&&Me.refreshFogUniforms(Fn,Ee),Me.refreshMaterialUniforms(Fn,le,N,W,d.state.transmissionRenderTarget[L.id]),ru.upload(w,ts(Ge),Fn,P)),le.isShaderMaterial&&le.uniformsNeedUpdate===!0&&(ru.upload(w,ts(Ge),Fn,P),le.uniformsNeedUpdate=!1),le.isSpriteMaterial&&xt.setValue(w,"center",$.center),xt.setValue(w,"modelViewMatrix",$.modelViewMatrix),xt.setValue(w,"normalMatrix",$.normalMatrix),xt.setValue(w,"modelMatrix",$.matrixWorld),le.isShaderMaterial||le.isRawShaderMaterial){const sn=le.uniformsGroups;for(let hn=0,gf=sn.length;hn<gf;hn++){const is=sn[hn];G.update(is,$n),G.bind(is,$n)}}return $n}function pa(L,q){L.ambientLightColor.needsUpdate=q,L.lightProbe.needsUpdate=q,L.directionalLights.needsUpdate=q,L.directionalLightShadows.needsUpdate=q,L.pointLights.needsUpdate=q,L.pointLightShadows.needsUpdate=q,L.spotLights.needsUpdate=q,L.spotLightShadows.needsUpdate=q,L.rectAreaLights.needsUpdate=q,L.hemisphereLights.needsUpdate=q}function Vw(L){return L.isMeshLambertMaterial||L.isMeshToonMaterial||L.isMeshPhongMaterial||L.isMeshStandardMaterial||L.isShadowMaterial||L.isShaderMaterial&&L.lights===!0}this.getActiveCubeFace=function(){return A},this.getActiveMipmapLevel=function(){return M},this.getRenderTarget=function(){return R},this.setRenderTargetTextures=function(L,q,ae){const le=ie.get(L);le.__autoAllocateDepthBuffer=L.resolveDepthBuffer===!1,le.__autoAllocateDepthBuffer===!1&&(le.__useRenderToTexture=!1),ie.get(L.texture).__webglTexture=q,ie.get(L.depthTexture).__webglTexture=le.__autoAllocateDepthBuffer?void 0:ae,le.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(L,q){const ae=ie.get(L);ae.__webglFramebuffer=q,ae.__useDefaultFramebuffer=q===void 0};const Gw=w.createFramebuffer();this.setRenderTarget=function(L,q=0,ae=0){R=L,A=q,M=ae;let le=!0,$=null,Ee=!1,Ne=!1;if(L){const ke=ie.get(L);if(ke.__useDefaultFramebuffer!==void 0)F.bindFramebuffer(w.FRAMEBUFFER,null),le=!1;else if(ke.__webglFramebuffer===void 0)P.setupRenderTarget(L);else if(ke.__hasExternalTextures)P.rebindTextures(L,ie.get(L.texture).__webglTexture,ie.get(L.depthTexture).__webglTexture);else if(L.depthBuffer){const Ve=L.depthTexture;if(ke.__boundDepthTexture!==Ve){if(Ve!==null&&ie.has(Ve)&&(L.width!==Ve.image.width||L.height!==Ve.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");P.setupDepthRenderbuffer(L)}}const qe=L.texture;(qe.isData3DTexture||qe.isDataArrayTexture||qe.isCompressedArrayTexture)&&(Ne=!0);const Ye=ie.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(Array.isArray(Ye[q])?$=Ye[q][ae]:$=Ye[q],Ee=!0):L.samples>0&&P.useMultisampledRTT(L)===!1?$=ie.get(L).__webglMultisampledFramebuffer:Array.isArray(Ye)?$=Ye[ae]:$=Ye,U.copy(L.viewport),z.copy(L.scissor),V=L.scissorTest}else U.copy(me).multiplyScalar(N).floor(),z.copy(Ae).multiplyScalar(N).floor(),V=He;if(ae!==0&&($=Gw),F.bindFramebuffer(w.FRAMEBUFFER,$)&&le&&F.drawBuffers(L,$),F.viewport(U),F.scissor(z),F.setScissorTest(V),Ee){const ke=ie.get(L.texture);w.framebufferTexture2D(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,w.TEXTURE_CUBE_MAP_POSITIVE_X+q,ke.__webglTexture,ae)}else if(Ne){const ke=ie.get(L.texture),qe=q;w.framebufferTextureLayer(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,ke.__webglTexture,ae,qe)}else if(L!==null&&ae!==0){const ke=ie.get(L.texture);w.framebufferTexture2D(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,w.TEXTURE_2D,ke.__webglTexture,ae)}T=-1},this.readRenderTargetPixels=function(L,q,ae,le,$,Ee,Ne){if(!(L&&L.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Oe=ie.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&Ne!==void 0&&(Oe=Oe[Ne]),Oe){F.bindFramebuffer(w.FRAMEBUFFER,Oe);try{const ke=L.texture,qe=ke.format,Ye=ke.type;if(!re.textureFormatReadable(qe)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!re.textureTypeReadable(Ye)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}q>=0&&q<=L.width-le&&ae>=0&&ae<=L.height-$&&w.readPixels(q,ae,le,$,Pe.convert(qe),Pe.convert(Ye),Ee)}finally{const ke=R!==null?ie.get(R).__webglFramebuffer:null;F.bindFramebuffer(w.FRAMEBUFFER,ke)}}},this.readRenderTargetPixelsAsync=async function(L,q,ae,le,$,Ee,Ne){if(!(L&&L.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Oe=ie.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&Ne!==void 0&&(Oe=Oe[Ne]),Oe)if(q>=0&&q<=L.width-le&&ae>=0&&ae<=L.height-$){F.bindFramebuffer(w.FRAMEBUFFER,Oe);const ke=L.texture,qe=ke.format,Ye=ke.type;if(!re.textureFormatReadable(qe))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!re.textureTypeReadable(Ye))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const Ve=w.createBuffer();w.bindBuffer(w.PIXEL_PACK_BUFFER,Ve),w.bufferData(w.PIXEL_PACK_BUFFER,Ee.byteLength,w.STREAM_READ),w.readPixels(q,ae,le,$,Pe.convert(qe),Pe.convert(Ye),0);const nt=R!==null?ie.get(R).__webglFramebuffer:null;F.bindFramebuffer(w.FRAMEBUFFER,nt);const lt=w.fenceSync(w.SYNC_GPU_COMMANDS_COMPLETE,0);return w.flush(),await HR(w,lt,4),w.bindBuffer(w.PIXEL_PACK_BUFFER,Ve),w.getBufferSubData(w.PIXEL_PACK_BUFFER,0,Ee),w.deleteBuffer(Ve),w.deleteSync(lt),Ee}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(L,q=null,ae=0){const le=Math.pow(2,-ae),$=Math.floor(L.image.width*le),Ee=Math.floor(L.image.height*le),Ne=q!==null?q.x:0,Oe=q!==null?q.y:0;P.setTexture2D(L,0),w.copyTexSubImage2D(w.TEXTURE_2D,ae,0,0,Ne,Oe,$,Ee),F.unbindTexture()};const Ww=w.createFramebuffer(),Xw=w.createFramebuffer();this.copyTextureToTexture=function(L,q,ae=null,le=null,$=0,Ee=null){Ee===null&&($!==0?(iu("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),Ee=$,$=0):Ee=0);let Ne,Oe,ke,qe,Ye,Ve,nt,lt,Lt;const bt=L.isCompressedTexture?L.mipmaps[Ee]:L.image;if(ae!==null)Ne=ae.max.x-ae.min.x,Oe=ae.max.y-ae.min.y,ke=ae.isBox3?ae.max.z-ae.min.z:1,qe=ae.min.x,Ye=ae.min.y,Ve=ae.isBox3?ae.min.z:0;else{const kn=Math.pow(2,-$);Ne=Math.floor(bt.width*kn),Oe=Math.floor(bt.height*kn),L.isDataArrayTexture?ke=bt.depth:L.isData3DTexture?ke=Math.floor(bt.depth*kn):ke=1,qe=0,Ye=0,Ve=0}le!==null?(nt=le.x,lt=le.y,Lt=le.z):(nt=0,lt=0,Lt=0);const st=Pe.convert(q.format),Ge=Pe.convert(q.type);let Wt;q.isData3DTexture?(P.setTexture3D(q,0),Wt=w.TEXTURE_3D):q.isDataArrayTexture||q.isCompressedArrayTexture?(P.setTexture2DArray(q,0),Wt=w.TEXTURE_2D_ARRAY):(P.setTexture2D(q,0),Wt=w.TEXTURE_2D),w.pixelStorei(w.UNPACK_FLIP_Y_WEBGL,q.flipY),w.pixelStorei(w.UNPACK_PREMULTIPLY_ALPHA_WEBGL,q.premultiplyAlpha),w.pixelStorei(w.UNPACK_ALIGNMENT,q.unpackAlignment);const ct=w.getParameter(w.UNPACK_ROW_LENGTH),$n=w.getParameter(w.UNPACK_IMAGE_HEIGHT),Hs=w.getParameter(w.UNPACK_SKIP_PIXELS),En=w.getParameter(w.UNPACK_SKIP_ROWS),ma=w.getParameter(w.UNPACK_SKIP_IMAGES);w.pixelStorei(w.UNPACK_ROW_LENGTH,bt.width),w.pixelStorei(w.UNPACK_IMAGE_HEIGHT,bt.height),w.pixelStorei(w.UNPACK_SKIP_PIXELS,qe),w.pixelStorei(w.UNPACK_SKIP_ROWS,Ye),w.pixelStorei(w.UNPACK_SKIP_IMAGES,Ve);const xt=L.isDataArrayTexture||L.isData3DTexture,Fn=q.isDataArrayTexture||q.isData3DTexture;if(L.isDepthTexture){const kn=ie.get(L),sn=ie.get(q),hn=ie.get(kn.__renderTarget),gf=ie.get(sn.__renderTarget);F.bindFramebuffer(w.READ_FRAMEBUFFER,hn.__webglFramebuffer),F.bindFramebuffer(w.DRAW_FRAMEBUFFER,gf.__webglFramebuffer);for(let is=0;is<ke;is++)xt&&(w.framebufferTextureLayer(w.READ_FRAMEBUFFER,w.COLOR_ATTACHMENT0,ie.get(L).__webglTexture,$,Ve+is),w.framebufferTextureLayer(w.DRAW_FRAMEBUFFER,w.COLOR_ATTACHMENT0,ie.get(q).__webglTexture,Ee,Lt+is)),w.blitFramebuffer(qe,Ye,Ne,Oe,nt,lt,Ne,Oe,w.DEPTH_BUFFER_BIT,w.NEAREST);F.bindFramebuffer(w.READ_FRAMEBUFFER,null),F.bindFramebuffer(w.DRAW_FRAMEBUFFER,null)}else if($!==0||L.isRenderTargetTexture||ie.has(L)){const kn=ie.get(L),sn=ie.get(q);F.bindFramebuffer(w.READ_FRAMEBUFFER,Ww),F.bindFramebuffer(w.DRAW_FRAMEBUFFER,Xw);for(let hn=0;hn<ke;hn++)xt?w.framebufferTextureLayer(w.READ_FRAMEBUFFER,w.COLOR_ATTACHMENT0,kn.__webglTexture,$,Ve+hn):w.framebufferTexture2D(w.READ_FRAMEBUFFER,w.COLOR_ATTACHMENT0,w.TEXTURE_2D,kn.__webglTexture,$),Fn?w.framebufferTextureLayer(w.DRAW_FRAMEBUFFER,w.COLOR_ATTACHMENT0,sn.__webglTexture,Ee,Lt+hn):w.framebufferTexture2D(w.DRAW_FRAMEBUFFER,w.COLOR_ATTACHMENT0,w.TEXTURE_2D,sn.__webglTexture,Ee),$!==0?w.blitFramebuffer(qe,Ye,Ne,Oe,nt,lt,Ne,Oe,w.COLOR_BUFFER_BIT,w.NEAREST):Fn?w.copyTexSubImage3D(Wt,Ee,nt,lt,Lt+hn,qe,Ye,Ne,Oe):w.copyTexSubImage2D(Wt,Ee,nt,lt,qe,Ye,Ne,Oe);F.bindFramebuffer(w.READ_FRAMEBUFFER,null),F.bindFramebuffer(w.DRAW_FRAMEBUFFER,null)}else Fn?L.isDataTexture||L.isData3DTexture?w.texSubImage3D(Wt,Ee,nt,lt,Lt,Ne,Oe,ke,st,Ge,bt.data):q.isCompressedArrayTexture?w.compressedTexSubImage3D(Wt,Ee,nt,lt,Lt,Ne,Oe,ke,st,bt.data):w.texSubImage3D(Wt,Ee,nt,lt,Lt,Ne,Oe,ke,st,Ge,bt):L.isDataTexture?w.texSubImage2D(w.TEXTURE_2D,Ee,nt,lt,Ne,Oe,st,Ge,bt.data):L.isCompressedTexture?w.compressedTexSubImage2D(w.TEXTURE_2D,Ee,nt,lt,bt.width,bt.height,st,bt.data):w.texSubImage2D(w.TEXTURE_2D,Ee,nt,lt,Ne,Oe,st,Ge,bt);w.pixelStorei(w.UNPACK_ROW_LENGTH,ct),w.pixelStorei(w.UNPACK_IMAGE_HEIGHT,$n),w.pixelStorei(w.UNPACK_SKIP_PIXELS,Hs),w.pixelStorei(w.UNPACK_SKIP_ROWS,En),w.pixelStorei(w.UNPACK_SKIP_IMAGES,ma),Ee===0&&q.generateMipmaps&&w.generateMipmap(Wt),F.unbindTexture()},this.copyTextureToTexture3D=function(L,q,ae=null,le=null,$=0){return iu('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(L,q,ae,le,$)},this.initRenderTarget=function(L){ie.get(L).__webglFramebuffer===void 0&&P.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?P.setTextureCube(L,0):L.isData3DTexture?P.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?P.setTexture2DArray(L,0):P.setTexture2D(L,0),F.unbindTexture()},this.resetState=function(){A=0,M=0,R=null,F.reset(),$e.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Qi}get outputColorSpace(){return this._outputColorSpace}
3904set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=ot._getDrawingBufferColorSpace(e),n.unpackColorSpace=ot._getUnpackColorSpace()}}const j3=Cn;class Fu extends eg{constructor(e){super(e),this.defaultDPI=90,this.defaultUnit="px"}load(e,n,i,r){const s=this,o=new i2(s.manager);o.setPath(s.path),o.setRequestHeader(s.requestHeader),o.setWithCredentials(s.withCredentials),o.load(e,function(a){try{n(s.parse(a))}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}parse(e){const n=this;function i(k,O){if(k.nodeType!==1)return;const D=x(k);let C=!1,ne=null;switch(k.nodeName){case"svg":O=v(k,O);break;case"style":s(k);break;case"g":O=v(k,O);break;case"path":O=v(k,O),k.hasAttribute("d")&&(ne=r(k));break;case"rect":O=v(k,O),ne=l(k);break;case"polygon":O=v(k,O),ne=c(k);break;case"polyline":O=v(k,O),ne=u(k);break;case"circle":O=v(k,O),ne=f(k);break;case"ellipse":O=v(k,O),ne=h(k);break;case"line":O=v(k,O),ne=p(k);break;case"defs":C=!0;break;case"use":O=v(k,O);const _e=(k.getAttributeNS("http://www.w3.org/1999/xlink","href")||"").substring(1),ye=k.viewportElement.getElementById(_e);ye?i(ye,O):console.warn("SVGLoader: 'use node' references non-existent node id: "+_e);break}ne&&(O.fill!==void 0&&O.fill!=="none"&&ne.color.setStyle(O.fill,j3),A(ne,me),z.push(ne),ne.userData={node:k,style:O});const de=k.childNodes;for(let Y=0;Y<de.length;Y++){const _e=de[Y];C&&_e.nodeName!=="style"&&_e.nodeName!=="defs"||i(_e,O)}D&&(H.pop(),H.length>0?me.copy(H[H.length-1]):me.identity())}function r(k){const O=new ls,D=new xe,C=new xe,ne=new xe;let de=!0,Y=!1;const _e=k.getAttribute("d");if(_e===""||_e==="none")return null;const ye=_e.match(/[a-df-z][^a-df-z]*/ig);for(let pe=0,w=ye.length;pe<w;pe++){const J=ye[pe],ee=J.charAt(0),re=J.slice(1).trim();de===!0&&(Y=!0,de=!1);let F;switch(ee){case"M":F=m(re);for(let I=0,ie=F.length;I<ie;I+=2)D.x=F[I+0],D.y=F[I+1],C.x=D.x,C.y=D.y,I===0?O.moveTo(D.x,D.y):O.lineTo(D.x,D.y),I===0&&ne.copy(D);break;case"H":F=m(re);for(let I=0,ie=F.length;I<ie;I++)D.x=F[I],C.x=D.x,C.y=D.y,O.lineTo(D.x,D.y),I===0&&Y===!0&&ne.copy(D);break;case"V":F=m(re);for(let I=0,ie=F.length;I<ie;I++)D.y=F[I],C.x=D.x,C.y=D.y,O.lineTo(D.x,D.y),I===0&&Y===!0&&ne.copy(D);break;case"L":F=m(re);for(let I=0,ie=F.length;I<ie;I+=2)D.x=F[I+0],D.y=F[I+1],C.x=D.x,C.y=D.y,O.lineTo(D.x,D.y),I===0&&Y===!0&&ne.copy(D);break;case"C":F=m(re);for(let I=0,ie=F.length;I<ie;I+=6)O.bezierCurveTo(F[I+0],F[I+1],F[I+2],F[I+3],F[I+4],F[I+5]),C.x=F[I+2],C.y=F[I+3],D.x=F[I+4],D.y=F[I+5],I===0&&Y===!0&&ne.copy(D);break;case"S":F=m(re);for(let I=0,ie=F.length;I<ie;I+=4)O.bezierCurveTo(y(D.x,C.x),y(D.y,C.y),F[I+0],F[I+1],F[I+2],F[I+3]),C.x=F[I+0],C.y=F[I+1],D.x=F[I+2],D.y=F[I+3],I===0&&Y===!0&&ne.copy(D);break;case"Q":F=m(re);for(let I=0,ie=F.length;I<ie;I+=4)O.quadraticCurveTo(F[I+0],F[I+1],F[I+2],F[I+3]),C.x=F[I+0],C.y=F[I+1],D.x=F[I+2],D.y=F[I+3],I===0&&Y===!0&&ne.copy(D);break;case"T":F=m(re);for(let I=0,ie=F.length;I<ie;I+=2){const P=y(D.x,C.x),E=y(D.y,C.y);O.quadraticCurveTo(P,E,F[I+0],F[I+1]),C.x=P,C.y=E,D.x=F[I+0],D.y=F[I+1],I===0&&Y===!0&&ne.copy(D)}break;case"A":F=m(re,[3,4],7);for(let I=0,ie=F.length;I<ie;I+=7){if(F[I+5]==D.x&&F[I+6]==D.y)continue;const P=D.clone();D.x=F[I+5],D.y=F[I+6],C.x=D.x,C.y=D.y,o(O,F[I],F[I+1],F[I+2],F[I+3],F[I+4],P,D),I===0&&Y===!0&&ne.copy(D)}break;case"m":F=m(re);for(let I=0,ie=F.length;I<ie;I+=2)D.x+=F[I+0],D.y+=F[I+1],C.x=D.x,C.y=D.y,I===0?O.moveTo(D.x,D.y):O.lineTo(D.x,D.y),I===0&&ne.copy(D);break;case"h":F=m(re);for(let I=0,ie=F.length;I<ie;I++)D.x+=F[I],C.x=D.x,C.y=D.y,O.lineTo(D.x,D.y),I===0&&Y===!0&&ne.copy(D);break;case"v":F=m(re);for(let I=0,ie=F.length;I<ie;I++)D.y+=F[I],C.x=D.x,C.y=D.y,O.lineTo(D.x,D.y),I===0&&Y===!0&&ne.copy(D);break;case"l":F=m(re);for(let I=0,ie=F.length;I<ie;I+=2)D.x+=F[I+0],D.y+=F[I+1],C.x=D.x,C.y=D.y,O.lineTo(D.x,D.y),I===0&&Y===!0&&ne.copy(D);break;case"c":F=m(re);for(let I=0,ie=F.length;I<ie;I+=6)O.bezierCurveTo(D.x+F[I+0],D.y+F[I+1],D.x+F[I+2],D.y+F[I+3],D.x+F[I+4],D.y+F[I+5]),C.x=D.x+F[I+2],C.y=D.y+F[I+3],D.x+=F[I+4],D.y+=F[I+5],I===0&&Y===!0&&ne.copy(D);break;case"s":F=m(re);for(let I=0,ie=F.length;I<ie;I+=4)O.bezierCurveTo(y(D.x,C.x),y(D.y,C.y),D.x+F[I+0],D.y+F[I+1],D.x+F[I+2],D.y+F[I+3]),C.x=D.x+F[I+0],C.y=D.y+F[I+1],D.x+=F[I+2],D.y+=F[I+3],I===0&&Y===!0&&ne.copy(D);break;case"q":F=m(re);for(let I=0,ie=F.length;I<ie;I+=4)O.quadraticCurveTo(D.x+F[I+0],D.y+F[I+1],D.x+F[I+2],D.y+F[I+3]),C.x=D.x+F[I+0],C.y=D.y+F[I+1],D.x+=F[I+2],D.y+=F[I+3],I===0&&Y===!0&&ne.copy(D);break;case"t":F=m(re);for(let I=0,ie=F.length;I<ie;I+=2){const P=y(D.x,C.x),E=y(D.y,C.y);O.quadraticCurveTo(P,E,D.x+F[I+0],D.y+F[I+1]),C.x=P,C.y=E,D.x=D.x+F[I+0],D.y=D.y+F[I+1],I===0&&Y===!0&&ne.copy(D)}break;case"a":F=m(re,[3,4],7);for(let I=0,ie=F.length;I<ie;I+=7){if(F[I+5]==0&&F[I+6]==0)continue;const P=D.clone();D.x+=F[I+5],D.y+=F[I+6],C.x=D.x,C.y=D.y,o(O,F[I],F[I+1],F[I+2],F[I+3],F[I+4],P,D),I===0&&Y===!0&&ne.copy(D)}break;case"Z":case"z":O.currentPath.autoClose=!0,O.currentPath.curves.length>0&&(D.copy(ne),O.currentPath.currentPoint.copy(D),de=!0);break;default:console.warn(J)}Y=!1}return O}function s(k){if(!(!k.sheet||!k.sheet.cssRules||!k.sheet.cssRules.length))for(let O=0;O<k.sheet.cssRules.length;O++){const D=k.sheet.cssRules[O];if(D.type!==1)continue;
3904const C=D.selectorText.split(/,/gm).filter(Boolean).map(ne=>ne.trim());for(let ne=0;ne<C.length;ne++){const de=Object.fromEntries(Object.entries(D.style).filter(([,Y])=>Y!==""));V[C[ne]]=Object.assign(V[C[ne]]||{},de)}}}function o(k,O,D,C,ne,de,Y,_e){if(O==0||D==0){k.lineTo(_e.x,_e.y);return}C=C*Math.PI/180,O=Math.abs(O),D=Math.abs(D);const ye=(Y.x-_e.x)/2,pe=(Y.y-_e.y)/2,w=Math.cos(C)*ye+Math.sin(C)*pe,J=-Math.sin(C)*ye+Math.cos(C)*pe;let ee=O*O,re=D*D;const F=w*w,I=J*J,ie=F/ee+I/re;if(ie>1){const ze=Math.sqrt(ie);O=ze*O,D=ze*D,ee=O*O,re=D*D}const P=ee*I+re*F,E=(ee*re-P)/P;let X=Math.sqrt(Math.max(0,E));ne===de&&(X=-X);const oe=X*O*J/D,he=-X*D*w/O,ce=Math.cos(C)*oe-Math.sin(C)*he+(Y.x+_e.x)/2,Ie=Math.sin(C)*oe+Math.cos(C)*he+(Y.y+_e.y)/2,Me=a(1,0,(w-oe)/O,(J-he)/D),Fe=a((w-oe)/O,(J-he)/D,(-w-oe)/O,(-J-he)/D)%(Math.PI*2);k.currentPath.absellipse(ce,Ie,O,D,Me,Me+Fe,de===0,C)}function a(k,O,D,C){const ne=k*D+O*C,de=Math.sqrt(k*k+O*O)*Math.sqrt(D*D+C*C);let Y=Math.acos(Math.max(-1,Math.min(1,ne/de)));return k*C-O*D<0&&(Y=-Y),Y}function l(k){const O=g(k.getAttribute("x")||0),D=g(k.getAttribute("y")||0),C=g(k.getAttribute("rx")||k.getAttribute("ry")||0),ne=g(k.getAttribute("ry")||k.getAttribute("rx")||0),de=g(k.getAttribute("width")),Y=g(k.getAttribute("height")),_e=1-.551915024494,ye=new ls;return ye.moveTo(O+C,D),ye.lineTo(O+de-C,D),(C!==0||ne!==0)&&ye.bezierCurveTo(O+de-C*_e,D,O+de,D+ne*_e,O+de,D+ne),ye.lineTo(O+de,D+Y-ne),(C!==0||ne!==0)&&ye.bezierCurveTo(O+de,D+Y-ne*_e,O+de-C*_e,D+Y,O+de-C,D+Y),ye.lineTo(O+C,D+Y),(C!==0||ne!==0)&&ye.bezierCurveTo(O+C*_e,D+Y,O,D+Y-ne*_e,O,D+Y-ne),ye.lineTo(O,D+ne),(C!==0||ne!==0)&&ye.bezierCurveTo(O,D+ne*_e,O+C*_e,D,O+C,D),ye}function c(k){function O(de,Y,_e){const ye=g(Y),pe=g(_e);ne===0?C.moveTo(ye,pe):C.lineTo(ye,pe),ne++}const D=/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,C=new ls;let ne=0;return k.getAttribute("points").replace(D,O),C.currentPath.autoClose=!0,C}function u(k){function O(de,Y,_e){const ye=g(Y),pe=g(_e);ne===0?C.moveTo(ye,pe):C.lineTo(ye,pe),ne++}const D=/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,C=new ls;let ne=0;return k.getAttribute("points").replace(D,O),C.currentPath.autoClose=!1,C}function f(k){const O=g(k.getAttribute("cx")||0),D=g(k.getAttribute("cy")||0),C=g(k.getAttribute("r")||0),ne=new Po;ne.absarc(O,D,C,0,Math.PI*2);const de=new ls;return de.subPaths.push(ne),de}function h(k){const O=g(k.getAttribute("cx")||0),D=g(k.getAttribute("cy")||0),C=g(k.getAttribute("rx")||0),ne=g(k.getAttribute("ry")||0),de=new Po;de.absellipse(O,D,C,ne,0,Math.PI*2);const Y=new ls;return Y.subPaths.push(de),Y}function p(k){const O=g(k.getAttribute("x1")||0),D=g(k.getAttribute("y1")||0),C=g(k.getAttribute("x2")||0),ne=g(k.getAttribute("y2")||0),de=new ls;return de.moveTo(O,D),de.lineTo(C,ne),de.currentPath.autoClose=!1,de}function v(k,O){O=Object.assign({},O);let D={};if(k.hasAttribute("class")){const Y=k.getAttribute("class").split(/\s/).filter(Boolean).map(_e=>_e.trim());for(let _e=0;_e<Y.length;_e++)D=Object.assign(D,V["."+Y[_e]])}k.hasAttribute("id")&&(D=Object.assign(D,V["#"+k.getAttribute("id")]));function C(Y,_e,ye){ye===void 0&&(ye=function(w){return w.startsWith("url")&&console.warn("SVGLoader: url access in attributes is not implemented."),w}),k.hasAttribute(Y)&&(O[_e]=ye(k.getAttribute(Y))),D[Y]&&(O[_e]=ye(D[Y])),k.style&&k.style[Y]!==""&&(O[_e]=ye(k.style[Y]))}function ne(Y){return Math.max(0,Math.min(1,g(Y)))}function de(Y){return Math.max(0,g(Y))}return C("fill","fill"),C("fill-opacity","fillOpacity",ne),C("fill-rule","fillRule"),C("opacity","opacity",ne),C("stroke","stroke"),C("stroke-opacity","strokeOpacity",ne),C("stroke-width","strokeWidth",de),C("stroke-linejoin","strokeLineJoin"),C("stroke-linecap","strokeLineCap"),C("stroke-miterlimit","strokeMiterLimit",de),C("visibility","visibility"),O}function y(k,O){return k-(O-k)}function m(k,O,D){if(typeof k!="string")throw new TypeError("Invalid input: "+typeof k);const C={SEPARATOR:/[ \t\r\n\,.\-+]/,WHITESPACE:/[ \t\r\n]/,DIGIT:/[\d]/,SIGN:/[-+]/,POINT:/\./,COMMA:/,/,EXP:/e/i,FLAGS:/[01]/},ne=0,de=1,Y=2,_e=3;let ye=ne,pe=!0,w="",J="";const ee=[];function re(P,E,X){const oe=new SyntaxError('Unexpected character "'+P+'" at index '+E+".");throw oe.partial=X,oe}function F(){w!==""&&(J===""?ee.push(Number(w)):ee.push(Number(w)*Math.pow(10,Number(J)))),w="",J=""}let I;const ie=k.length;for(let P=0;P<ie;P++){if(I=k[P],Array.isArray(O)&&O.includes(ee.length%D)&&C.FLAGS.test(I
3904)){ye=de,w=I,F();continue}if(ye===ne){if(C.WHITESPACE.test(I))continue;if(C.DIGIT.test(I)||C.SIGN.test(I)){ye=de,w=I;continue}if(C.POINT.test(I)){ye=Y,w=I;continue}C.COMMA.test(I)&&(pe&&re(I,P,ee),pe=!0)}if(ye===de){if(C.DIGIT.test(I)){w+=I;continue}if(C.POINT.test(I)){w+=I,ye=Y;continue}if(C.EXP.test(I)){ye=_e;continue}C.SIGN.test(I)&&w.length===1&&C.SIGN.test(w[0])&&re(I,P,ee)}if(ye===Y){if(C.DIGIT.test(I)){w+=I;continue}if(C.EXP.test(I)){ye=_e;continue}C.POINT.test(I)&&w[w.length-1]==="."&&re(I,P,ee)}if(ye===_e){if(C.DIGIT.test(I)){J+=I;continue}if(C.SIGN.test(I)){if(J===""){J+=I;continue}J.length===1&&C.SIGN.test(J)&&re(I,P,ee)}}C.WHITESPACE.test(I)?(F(),ye=ne,pe=!1):C.COMMA.test(I)?(F(),ye=ne,pe=!0):C.SIGN.test(I)?(F(),ye=de,w=I):C.POINT.test(I)?(F(),ye=Y,w=I):re(I,P,ee)}return F(),ee}const d=["mm","cm","in","pt","pc","px"],_={mm:{mm:1,cm:.1,in:1/25.4,pt:72/25.4,pc:6/25.4,px:-1},cm:{mm:10,cm:1,in:1/2.54,pt:72/2.54,pc:6/2.54,px:-1},in:{mm:25.4,cm:2.54,in:1,pt:72,pc:6,px:-1},pt:{mm:25.4/72,cm:2.54/72,in:1/72,pt:1,pc:6/72,px:-1},pc:{mm:25.4/6,cm:2.54/6,in:1/6,pt:72/6,pc:1,px:-1},px:{px:1}};function g(k){let O="px";if(typeof k=="string"||k instanceof String)for(let C=0,ne=d.length;C<ne;C++){const de=d[C];if(k.endsWith(de)){O=de,k=k.substring(0,k.length-de.length);break}}let D;return O==="px"&&n.defaultUnit!=="px"?D=_.in[n.defaultUnit]/n.defaultDPI:(D=_[O][n.defaultUnit],D<0&&(D=_[O].in*n.defaultDPI)),D*parseFloat(k)}function x(k){if(!(k.hasAttribute("transform")||k.nodeName==="use"&&(k.hasAttribute("x")||k.hasAttribute("y"))))return null;const O=b(k);return H.length>0&&O.premultiply(H[H.length-1]),me.copy(O),H.push(O),O}function b(k){const O=new je,D=Q;if(k.nodeName==="use"&&(k.hasAttribute("x")||k.hasAttribute("y"))){const C=g(k.getAttribute("x")),ne=g(k.getAttribute("y"));O.translate(C,ne)}if(k.hasAttribute("transform")){const C=k.getAttribute("transform").split(")");for(let ne=C.length-1;ne>=0;ne--){const de=C[ne].trim();if(de==="")continue;const Y=de.indexOf("("),_e=de.length;if(Y>0&&Y<_e){const ye=de.slice(0,Y),pe=m(de.slice(Y+1));switch(D.identity(),ye){case"translate":if(pe.length>=1){const w=pe[0];let J=0;pe.length>=2&&(J=pe[1]),D.translate(w,J)}break;case"rotate":if(pe.length>=1){let w=0,J=0,ee=0;w=pe[0]*Math.PI/180,pe.length>=3&&(J=pe[1],ee=pe[2]),j.makeTranslation(-J,-ee),W.makeRotation(w),N.multiplyMatrices(W,j),j.makeTranslation(J,ee),D.multiplyMatrices(j,N)}break;case"scale":if(pe.length>=1){const w=pe[0];let J=w;pe.length>=2&&(J=pe[1]),D.scale(w,J)}break;case"skewX":pe.length===1&&D.set(1,Math.tan(pe[0]*Math.PI/180),0,0,1,0,0,0,1);break;case"skewY":pe.length===1&&D.set(1,0,0,Math.tan(pe[0]*Math.PI/180),1,0,0,0,1);break;case"matrix":pe.length===6&&D.set(pe[0],pe[2],pe[4],pe[1],pe[3],pe[5],0,0,1);break}}O.premultiply(D)}}return O}function A(k,O){function D(Y){se.set(Y.x,Y.y,1).applyMatrix3(O),Y.set(se.x,se.y)}function C(Y){const _e=Y.xRadius,ye=Y.yRadius,pe=Math.cos(Y.aRotation),w=Math.sin(Y.aRotation),J=new Z(_e*pe,_e*w,0),ee=new Z(-ye*w,ye*pe,0),re=J.applyMatrix3(O),F=ee.applyMatrix3(O),I=Q.set(re.x,F.x,0,re.y,F.y,0,0,0,1),ie=j.copy(I).invert(),X=W.copy(ie).transpose().multiply(ie).elements,oe=U(X[0],X[1],X[4]),he=Math.sqrt(oe.rt1),ce=Math.sqrt(oe.rt2);if(Y.xRadius=1/he,Y.yRadius=1/ce,Y.aRotation=Math.atan2(oe.sn,oe.cs),!((Y.aEndAngle-Y.aStartAngle)%(2*Math.PI)<Number.EPSILON)){const Me=j.set(he,0,0,0,ce,0,0,0,1),Fe=W.set(oe.cs,oe.sn,0,-oe.sn,oe.cs,0,0,0,1),ze=Me.multiply(Fe).multiply(I),Se=Le=>{const{x:Be,y:We}=new Z(Math.cos(Le),Math.sin(Le),0).applyMatrix3(ze);return Math.atan2(We,Be)};Y.aStartAngle=Se(Y.aStartAngle),Y.aEndAngle=Se(Y.aEndAngle),M(O)&&(Y.aClockwise=!Y.aClockwise)}}function ne(Y){const _e=T(O),ye=S(O);Y.xRadius*=_e,Y.yRadius*=ye;const pe=_e>Number.EPSILON?Math.atan2(O.elements[1],O.elements[0]):Math.atan2(-O.elements[3],O.elements[4]);Y.aRotation+=pe,M(O)&&(Y.aStartAngle*=-1,Y.aEndAngle*=-1,Y.aClockwise=!Y.aClockwise)}const de=k.subPaths;for(let Y=0,_e=de.length;Y<_e;Y++){const pe=de[Y].curves;for(let w=0;w<pe.length;w++){const J=pe[w];J.isLineCurve?(D(J.v1),D(J.v2)):J.isCubicBezierCurve?(D(J.v0),D(J.v1),D(J.v2),D(J.v3)):J.isQuadraticBezierCurve?(D(J.v0),D(J.v1),D(J.v2)):J.isEllipseCurve&&(K.set(J.aX,J.aY),D(K),J.aX=K.x,J.aY=K.y,R(O)?C(J):ne(J))}}}function M(k){const O=k.elements;return O[0]*O[4]-O[1]*O[3]<0}function R(k){const O=k.elements,D=O[0]*O[3]+O[1]*O[4];if(D===0)return!1;const C=T(k),ne=S(k);return Math.abs(D/(C*ne))>Number.EPSILON}function T(k){const O=k.elements;return Math.sqrt(O[0]*O[0]+O[1]*O[1])}function S(k){const O=k.elements;return Math.sqrt(O[3]*O[3]+O[4]*O[4])}function U(k,O,D){let C,ne,de,Y,_e;const ye=k+D,pe=k-D,w=Math.sqrt(pe*pe+4*O*O);return ye>0?(C=.5*(ye+w),_e=1/C,ne=k*_e*D-O*_e*O):ye<0?ne=.5*(ye-w):(C=.5*w,ne=-.5*w),pe>0?de=pe+w:de=pe-w,Math.abs(de)>2*Math.abs(O)?(_e=-2*O/de,Y=1/Math.sqrt(1+_e*_e),de=_e*Y):Math.abs(O)===0?(de=1,Y=0):(_e=-.5*de/O,de=1/Math.sqrt(1+_e*_e),Y=_e*de),pe>0&&(_e=de,de=-Y,Y=_e),{rt1:C,rt2:ne,cs:de,sn:Y}}const z=[],V={},H=[],Q=new je,j=new je,W=new je,N=new je,K=new xe,se=new Z,me=new je,Ae=new DOMParser().parseFromString(e,"image/svg+xml");return i(Ae.documentElement,{fill:"#000",fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeLineJoin:"miter",strokeLineCap:"butt",strokeMiterLimit:4}),{paths:z,xml:Ae.documentElement}}static createShapes(e){const i={ORIGIN:0,DESTINATION:1,BETWEEN:2,LEFT:3,RIGHT:4,BEHIND:5,BEYOND:6},r={loc:i.ORIGIN,t:0};function s(y,m,d,_){const g=y.x,x=m.x,b=d.x,A=_.x,M=y.y,R=m.y,T=d.y,S=_.y,U=(A-b)*(M-T)-(S-T)*(g-b),z=(x-g)*(M-T)-(R-M)*(g-b),V=(S-T)*(x-g)-(A-b)*(R-M),H=U/V,Q=z/V;if(V===0&&U!==0||H<=0||H>=1||Q<0||Q>1)return null;if(U===0&&V===0){for(let j=0;j<2;j++)if(o(j===0?d:_,y,m),r.loc==i.ORIGIN){const W=j===0?d:_;return{x:W.x,y:W.y,t:r.t}}else if(r.loc==i.BETWEEN){const W=+(g+r.t*(x-g)).toPrecision(10),N=+(M+r.t*(R-M)).toPrecision(10);return{x:W,y:N,t:r.t}}return null}else{for(let N=0;N<2;N++)if(o(N===0?d:_,y,m),r.loc==i.ORIGIN){const K=N===0?d:_;return{x:K.x,y:K.y,t:r.t}}const j=+(g+H*(x-g)).toPrecision(10),W=+(M+H*(R-M)).toPrecision(10);return{x:j,y:W,t:H}}}function o(y,m,d){const _=d.x-m.x,g=d.y-m.y,x=y.x-m.x,b=y.y-m.y,A=_*b-x*g;if(y.x===m.x&&y.y===m.y){r.loc=i.ORIGIN,r.t=0;return}if(y.x===d.x&&y.y===d.y){r.loc=i.DESTINATION,r.t=1;return}if(A<-Number.EPSILON){r.loc=i.LEFT;return}if(A>Number.EPSILON){r.loc=i.RIGHT;return}if(_*x<0||g*b<0){r.loc=i.BEHIND;return}if(Math.sqrt(_*_+g*g)<Math.sqrt(x*x+b*b)){r.loc=i.BEYOND;return}let M;_!==0?M=x/_:M=b/g,r.loc=i.BETWEEN,r.t=M}function a(y,m){const d=[],_=[];for(let g=1;g<y.length;g++){const x=y[g-1],b=y[g];for(let A=1;A<m.length;A++){const M=m[A-1],R=m[A],T=s(x,b,M,R);T!==null&&d.find(S=>S.t<=T.t+Number.EPSILON&&S.t>=T.t-Number.EPSILON)===void 0&&(d.push(T),_.push(new xe(T.x,T.y)))}}return _}function l(y,m,d){const _=new xe;m.getCenter(_);const g=[];return d.forEach(x=>
3904{x.boundingBox.containsPoint(_)&&a(y,x.points).forEach(A=>{g.push({identifier:x.identifier,isCW:x.isCW,point:A})})}),g.sort((x,b)=>x.point.x-b.point.x),g}function c(y,m,d,_,g){(g==null||g==="")&&(g="nonzero");const x=new xe;y.boundingBox.getCenter(x);const b=[new xe(d,x.y),new xe(_,x.y)],A=l(b,y.boundingBox,m);A.sort((z,V)=>z.point.x-V.point.x);const M=[],R=[];A.forEach(z=>{z.identifier===y.identifier?M.push(z):R.push(z)});const T=M[0].point.x,S=[];let U=0;for(;U<R.length&&R[U].point.x<T;)S.length>0&&S[S.length-1]===R[U].identifier?S.pop():S.push(R[U].identifier),U++;if(S.push(y.identifier),g==="evenodd"){const z=S.length%2===0,V=S[S.length-2];return{identifier:y.identifier,isHole:z,for:V}}else if(g==="nonzero"){let z=!0,V=null,H=null;for(let Q=0;Q<S.length;Q++){const j=S[Q];z?(H=m[j].isCW,z=!1,V=j):H!==m[j].isCW&&(H=m[j].isCW,z=!0)}return{identifier:y.identifier,isHole:z,for:V}}else console.warn('fill-rule: "'+g+'" is currently not implemented.')}let u=999999999,f=-999999999,h=e.subPaths.map(y=>{const m=y.getPoints();let d=-999999999,_=999999999,g=-999999999,x=999999999;for(let b=0;b<m.length;b++){const A=m[b];A.y>d&&(d=A.y),A.y<_&&(_=A.y),A.x>g&&(g=A.x),A.x<x&&(x=A.x)}return f<=g&&(f=g+1),u>=x&&(u=x-1),{curves:y.curves,points:m,isCW:Nr.isClockWise(m),identifier:-1,boundingBox:new l2(new xe(x,_),new xe(g,d))}});h=h.filter(y=>y.points.length>1);for(let y=0;y<h.length;y++)h[y].identifier=y;const p=h.map(y=>c(y,h,u,f,e.userData?e.userData.style.fillRule:void 0)),v=[];return h.forEach(y=>{if(!p[y.identifier].isHole){const d=new tl;d.curves=y.curves,p.filter(g=>g.isHole&&g.for===y.identifier).forEach(g=>{const x=h[g.identifier],b=new Po;b.curves=x.curves,d.holes.push(b)}),v.push(d)}}),v}static getStrokeStyle(e,n,i,r,s){return e=e!==void 0?e:1,n=n!==void 0?n:"#000",i=i!==void 0?i:"miter",r=r!==void 0?r:"butt",s=s!==void 0?s:4,{strokeColor:n,strokeWidth:e,strokeLineJoin:i,strokeLineCap:r,strokeMiterLimit:s}}static pointsToStroke(e,n,i,r){const s=[],o=[],a=[];if(Fu.pointsToStrokeWithBuffers(e,n,i,r,s,o,a)===0)return null;const l=new lr;return l.setAttribute("position",new jn(s,3)),l.setAttribute("normal",new jn(o,3)),l.setAttribute("uv",new jn(a,2)),l}static pointsToStrokeWithBuffers(e,n,i,r,s,o,a,l){const c=new xe,u=new xe,f=new xe,h=new xe,p=new xe,v=new xe,y=new xe,m=new xe,d=new xe,_=new xe,g=new xe,x=new xe,b=new xe,A=new xe,M=new xe,R=new xe,T=new xe;i=i!==void 0?i:12,r=r!==void 0?r:.001,l=l!==void 0?l:0,e=pe(e);const S=e.length;if(S<2)return 0;const U=e[0].equals(e[S-1]);let z,V=e[0],H;const Q=n.strokeWidth/2,j=1/(S-1);let W=0,N,K,se,me,Ae=!1,He=0,k=l*3,O=l*2;D(e[0],e[1],c).multiplyScalar(Q),m.copy(e[0]).sub(c),d.copy(e[0]).add(c),_.copy(m),g.copy(d);for(let w=1;w<S;w++){z=e[w],w===S-1?U?H=e[1]:H=void 0:H=e[w+1];const J=c;if(D(V,z,J),f.copy(J).multiplyScalar(Q),x.copy(z).sub(f),b.copy(z).add(f),N=W+j,K=!1,H!==void 0){D(z,H,u),f.copy(u).multiplyScalar(Q),A.copy(z).sub(f),M.copy(z).add(f),se=!0,f.subVectors(H,V),J.dot(f)<0&&(se=!1),w===1&&(Ae=se),f.subVectors(H,z),f.normalize();const ee=Math.abs(J.dot(f));if(ee>Number.EPSILON){const re=Q/ee;f.multiplyScalar(-re),h.subVectors(z,V),p.copy(h).setLength(re).add(f),R.copy(p).negate();const F=p.length(),I=h.length();h.divideScalar(I),v.subVectors(H,z);const ie=v.length();switch(v.divideScalar(ie),h.dot(R)<I&&v.dot(R)<ie&&(K=!0),T.copy(p).add(z),R.add(z),me=!1,K?se?(M.copy(R),b.copy(R)):(A.copy(R),x.copy(R)):de(),n.strokeLineJoin){case"bevel":Y(se,K,N);break;case"round":_e(se,K),se?ne(z,x,A,N,0):ne(z,M,b,N,1);break;case"miter":case"miter-clip":default:const P=Q*n.strokeMiterLimit/F;if(P<1)if(n.strokeLineJoin!=="miter-clip"){Y(se,K,N);break}else _e(se,K),se?(v.subVectors(T,x).multiplyScalar(P).add(x),y.subVectors(T,A).multiplyScalar(P).add(A),C(x,N,0),C(v,N,0),C(z,N,.5),C(z,N,.5),C(v,N,0),C(y,N,0),C(z,N,.5),C(y,N,0),C(A,N,0)):(v.subVectors(T,b).multiplyScalar(P).add(b),y.subVectors(T,M).multiplyScalar(P).add(M),C(b,N,1),C(v,N,1),C(z,N,.5),C(z,N,.5),C(v,N,1),C(y,N,1),C(z,N,.5),C(y,N,1),C(M,N,1));else K?(se?(C(d,W,1),C(m,W,0),C(T,N,0),C(d,W,1),C(T,N,0),C(R,N,1)):(C(d,W,1),C(m,W,0),C(T,N,1),C(m,W,0),C(R,N,0),C(T,N,1)),se?A.copy(T):M.copy(T)):se?(C(x,N,0),C(T,N,0),C(z,N,.5),C(z,N,.5),C(T,N,0),C(A,N,0)):(C(b,N,1),C(T,N,1),C(z,N,.5),C(z,N,.5),C(T,N,1),C(M,N,1)),me=!0;break}}else de()}else de();!U&&w===S-1&&ye(e[0],_,g,se,!0,W),W=N,V=z,m.copy(A),d.copy(M)}if(!U)ye(z,x,b,se,!1,N);else if(K&&s){let w=T,J=R;Ae!==se&&(w=R,J=T),se?(me||Ae)&&(J.toArray(s,0*3),J.toArray(s,3*3),me&&w.toArray(s,1*3)):(me||!Ae)&&(J.toArray(s,1*3),J.toArray(s,3*3),me&&w.toArray(s,0*3))}return He;function D(w,J,ee){return ee.subVectors(J,w),ee.set(-ee.y,ee.x).normalize()}function C(w,J,ee){s&&(s[k]=w.x,s[k+1]=w.y,s[k+2]=0,o&&(o[k]=0,o[k+1]=0,o[k+2]=1),k+=3,a&&(a[O]=J,a[O+1
3904]=ee,O+=2)),He+=3}function ne(w,J,ee,re,F){c.copy(J).sub(w).normalize(),u.copy(ee).sub(w).normalize();let I=Math.PI;const ie=c.dot(u);Math.abs(ie)<1&&(I=Math.abs(Math.acos(ie))),I/=i,f.copy(J);for(let P=0,E=i-1;P<E;P++)h.copy(f).rotateAround(w,I),C(f,re,F),C(h,re,F),C(w,re,.5),f.copy(h);C(h,re,F),C(ee,re,F),C(w,re,.5)}function de(){C(d,W,1),C(m,W,0),C(x,N,0),C(d,W,1),C(x,N,0),C(b,N,1)}function Y(w,J,ee){J?w?(C(d,W,1),C(m,W,0),C(x,N,0),C(d,W,1),C(x,N,0),C(R,N,1),C(x,ee,0),C(A,ee,0),C(R,ee,.5)):(C(d,W,1),C(m,W,0),C(b,N,1),C(m,W,0),C(R,N,0),C(b,N,1),C(b,ee,1),C(R,ee,0),C(M,ee,1)):w?(C(x,ee,0),C(A,ee,0),C(z,ee,.5)):(C(b,ee,1),C(M,ee,0),C(z,ee,.5))}function _e(w,J){J&&(w?(C(d,W,1),C(m,W,0),C(x,N,0),C(d,W,1),C(x,N,0),C(R,N,1),C(x,W,0),C(z,N,.5),C(R,N,1),C(z,N,.5),C(A,W,0),C(R,N,1)):(C(d,W,1),C(m,W,0),C(b,N,1),C(m,W,0),C(R,N,0),C(b,N,1),C(b,W,1),C(R,N,0),C(z,N,.5),C(z,N,.5),C(R,N,0),C(M,W,1)))}function ye(w,J,ee,re,F,I){switch(n.strokeLineCap){case"round":F?ne(w,ee,J,I,.5):ne(w,J,ee,I,.5);break;case"square":if(F)c.subVectors(J,w),u.set(c.y,-c.x),f.addVectors(c,u).add(w),h.subVectors(u,c).add(w),re?(f.toArray(s,1*3),h.toArray(s,0*3),h.toArray(s,3*3)):(f.toArray(s,1*3),a[3*2+1]===1?h.toArray(s,3*3):f.toArray(s,3*3),h.toArray(s,0*3));else{c.subVectors(ee,w),u.set(c.y,-c.x),f.addVectors(c,u).add(w),h.subVectors(u,c).add(w);const ie=s.length;re?(f.toArray(s,ie-1*3),h.toArray(s,ie-2*3),h.toArray(s,ie-4*3)):(h.toArray(s,ie-2*3),f.toArray(s,ie-1*3),h.toArray(s,ie-4*3))}break}}function pe(w){let J=!1;for(let re=1,F=w.length-1;re<F;re++)if(w[re].distanceTo(w[re+1])<r){J=!0;break}if(!J)return w;const ee=[];ee.push(w[0]);for(let re=1,F=w.length-1;re<F;re++)w[re].distanceTo(w[re+1])>=r&&ee.push(w[re]);return ee.push(w[w.length-1]),ee}}}function zw(){const t=B.useRef(null),e=B.useRef(null),n=B.useRef(null),[i,r]=B.useState(!0);return B.useEffect(()=>{if(!t.current)return;const s=t.current,o=s.clientWidth,a=s.clientHeight,l=new mP,c=new Gn(50,o/a,.1,2e3);c.position.set(0,0,600),c.lookAt(0,0,0);let u;try{u=new X3({antialias:!0,alpha:!0})}catch{r(!1);return}if(!u.getContext()){r(!1);return}u.setSize(o,a),u.setPixelRatio(Math.min(window.devicePixelRatio,2)),u.shadowMap.enabled=!0,u.shadowMap.type=ew,s.appendChild(u.domElement),e.current=u;const f=new o2(16777215,.5);l.add(f);const h=new Ad(16777215,1);h.position.set(200,300,400),h.castShadow=!0,l.add(h);const p=new Ad(8947967,.4);p.position.set(-200,100,-200),l.add(p);const v=new Ad(16764040,.3);v.position.set(0,-200,-300),l.add(v);const _=new Fu().parse(` 3905 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> 3906 <g transform="translate(0,1024) scale(0.1,-0.1)" fill="#000000"> 3907 <path d="M5613 6450 c-300 -38 -559 -173 -781 -405 -331 -346 -451 -843 -317 3908 -1310 34 -121 130 -311 209 -416 126 -166 307 -319 481 -403 340 -167 706 3909 -169 1040 -6 229 111 442 322 567 562 l35 66 47 -82 c140 -241 382 -457 635 3910 -567 223 -96 478 -122 729 -74 502 96 913 512 1027 1040 8 39 18 129 21 200 3911 33 667 -420 1245 -1081 1381 -126 26 -377 26 -495 0 -255 -55 -498 -186 -681 3912 -366 -169 -166 -214 -240 -619 -1010 -178 -339 -267 -470 -372 -548 -117 -87 3913 -214 -117 -363 -109 -123 6 -200 31 -301 99 -177 119 -289 308 -316 537 -30 3914 258 92 540 298 687 297 212 691 146 935 -157 l46 -57 44 61 c23 34 107 149 3915 186 256 l144 194 -48 49 c-163 167 -435 310 -689 363 -96 20 -283 27 -381 15z 3916 m2601 -635 c230 -80 423 -306 472 -555 64 -323 -93 -642 -390 -792 -181 -91 3917 -441 -91 -622 0 -198 100 -333 271 -385 487 -17 74 -20 109 -16 200 16 339 3918 237 607 561 681 99 22 282 12 380 -21z"/> 3919 <path d="M865 6427 c-3 -7 -4 -138 -3 -292 l3 -280 387 -3 388 -2 2 -993 3 3920 -992 1583 -3 c870 -1 1582 0 1582 3 0 2 -49 69 -108 148 -113 150 -192 265 3921 -258 379 l-39 67 -493 3 -494 3 114 175 c63 96 226 346 363 555 136 209 347 3922 538 468 730 121 193 242 382 268 422 27 40 49 77 49 83 0 16 -3809 14 -3815 3923 -3z m2575 -581 c0 -3 -53 -94 -118 -203 -66 -109 -183 -306 -262 -438 -79 3924 -132 -216 -355 -305 -495 -89 -140 -214 -343 -279 -450 -65 -107 -120 -197 3925 -122 -199 -2 -2 -4 399 -4 892 l0 897 545 0 c300 0 545 -2 545 -4z"/> 3926 </g> 3927 </svg>`).paths,g=new vo,x=new vo,b={depth:25,bevelEnabled:!0,bevelThickness:4,bevelSize:3,bevelOffset:0,bevelSegments:8,curveSegments:24},A=new KP({color:1710618,metalness:.7,roughness:.3,side:Ei});_.forEach(H=>
3927{Fu.createShapes(H).forEach(j=>{const W=new Jm(j,b),N=new Ti(W,A);N.castShadow=!0,N.receiveShadow=!0,g.add(N)})});const M=new fa().setFromObject(g),R=M.getCenter(new Z),T=M.getSize(new Z);g.position.set(-R.x,-R.y,-R.z),x.add(g);const U=288/Math.max(T.x,T.y);x.scale.set(U,-U,U),x.position.set(0,0,0),l.add(x);function z(){n.current=requestAnimationFrame(z),x.rotation.y+=.008,u.render(l,c)}const V=()=>{if(!t.current)return;const H=t.current.clientWidth,Q=t.current.clientHeight;c.aspect=H/Q,c.updateProjectionMatrix(),u.setSize(H,Q)};return window.addEventListener("resize",V),z(),()=>{window.removeEventListener("resize",V),n.current&&cancelAnimationFrame(n.current),e.current&&t.current&&(t.current.removeChild(e.current.domElement),e.current.dispose())}},[]),i?te.jsx("div",{ref:t,className:"w-full h-full","data-testid":"logo-3d"}):te.jsx("div",{className:"w-full h-full flex items-center justify-center","data-testid":"logo-3d-fallback",children:te.jsx("span",{className:"font-mono text-2xl font-bold text-black",children:"TZCO"})})}function Y3(){return te.jsxs("div",{className:"relative w-full min-h-screen bg-white text-black overflow-auto",children:[te.jsx("div",{className:"absolute top-[4vh] sm:top-[5vh] md:top-8 left-4 sm:left-5 md:left-8 z-10",children:te.jsx(qo,{href:"/",children:te.jsx("span",{className:"text-black font-mono hover:text-gray-600 transition-colors cursor-pointer text-sm sm:text-sm md:text-base",children:"â Back to Home"})})}),te.jsx("div",{className:"absolute bottom-[calc(env(safe-area-inset-bottom)+15.6vh-7px+10mm)] sm:bottom-[calc(5vh-52px)] md:bottom-[calc(32px-52px)] left-[-31px] sm:left-[-40px] md:left-[-28px] w-[154px] h-[154px] sm:w-[240px] sm:h-[240px] md:w-[288px] md:h-[288px] z-50",children:te.jsx(zw,{})}),te.jsxs("div",{className:"pt-[12vh] sm:pt-[14vh] md:pt-32 pb-16 px-4 sm:px-5 md:px-8 max-w-lg",children:[te.jsxs("div",{className:"space-y-4 sm:space-y-5",children:[te.jsx("p",{className:"text-sm md:text-base font-mono leading-relaxed text-black",children:"What defines TZCO is a pursuit to build alongside creative and technical doers. Our model allows each individual to apply their unique talents and achieve their full potential."}),te.jsx("p",{className:"text-sm md:text-base font-mono leading-relaxed text-black",children:"Flexibility and a lack of orthodoxy matter to us: they represent the freedom to build in novel ways. This matched with excellence, learning, and purpose lead to greatness."}),te.jsx("p",{className:"text-sm md:text-base font-mono leading-relaxed text-black",children:"TZCO is built on the belief that through AI we can create and build better companies. This requires the capabilities to develop, apply and sell AI systems, and is what our substrate is based on."}),te.jsx("p",{className:"text-sm md:text-base font-mono leading-relaxed text-black",children:"We build and acquire companies that have AI embodied across every aspect."})]}),te.jsx(qo,{href:"/open-roles",children:te.jsx("span",{className:"block mt-8 py-2 text-sm md:text-base font-mono text-black hover:text-gray-600 transition-colors cursor-pointer",children:"Talent â"})})]})]})}const Bw=[{slug:"talent-engineer",title:"Talent Engineer",location:"Miami and New York",sections:[{heading:"About The Zeal Company",content:['The Zeal Company (TZCO) is a technology holdings company that creates, acquires, operates and invests in businesses built for the long term. We provide capital, technology and operational support. Our approach is hands on, highly technical, geared towards building with outlier talent with "forever timeline". TZCO is built by founders and quality shareholders.',"Our team is small, highly motivated and focused on operational excellence. This organization is for individuals who appreciate challenging themselves and thrive on curiosity in unstructured environments. We operate with a flat organizational structure. All team members are expected to be hands on and to contribute directly to the company's mission. Leadership is given to those who show initiative and consistently deliver excellence. Work ethic and strong prioritization skills are important. All team members are expected to have strong communication skills.","All team members become owners and are expected to behave as such and share the upside created. Incentive design is important."]},{heading:"About the Team",content:["Talent Engineering is a new team focused on recruiting with an engineering mindset. This is a small, elite unit reporting directly to our founder. The team works closely with portfolio companies and operating partners to create novel approaches for rapidly scaling the hiring of exceptional people across the TZCO ecosystem."]},{heading:"Who You Are",content:["You love speed.","You are a lifelong learner.","You believe assembling high performance teams is an engineering problem.","You love being around exceptional people and they love being around you.",'You are a nerdy engineer at heart, but your friends believe you are a "people person."',"You've built cool products yourself, even as a kid, perhaps personal projects, open source contributions or hacks that demonstrate your technical creativity.","You've worked at organizations with incredible talent density. And you referred in great people and helped with recruiting.",`You might not be hands on coding every day, but you're comfortable with "vibe coding" and can quickly grasp technical concepts to evaluate candidates.`]},{heading:"About the Role",content:['For any hiring need across TZCO and its portfolio, start by asking: "Who are the absolute best people in the world for this role?" Your focus will be on developing systems to effectively identify, engage and attract those individuals.',"Once you develop the system you are also expected to execute and own hiring end to end yourself.",'We recognize that identifying the "best people" rarely happens solely on LinkedIn. Instead, it occurs through referrals, networking at events, hosting competitions, leveraging specific online communities and other creative channels.',"You are expected to exercise strong judgment and an intuitive understanding of what excellence looks like across various technical and n
3927on technical domains.","All interviews will be conducted in person when applicable."]}],salary:"$120,000 to $240,000 USD",benefits:"Base salary is just one part of our total rewards package at TZCO, which also includes equity and comprehensive medical.",applyEmail:"[email protected]"},{slug:"applied-ai-engineer",title:"Applied AI Engineer",location:"Miami and New York",sections:[{heading:"About The Zeal Company",content:['The Zeal Company (TZCO) is a technology holdings company that creates, acquires, operates and invests in businesses built for the long term. We provide capital, technology and operational support. Our approach is hands on, highly technical, geared towards building with outlier talent with "forever timeline". TZCO is built by founders and quality shareholders.',"Our team is small, highly motivated and focused on operational excellence. This organization is for individuals who appreciate challenging themselves and thrive on curiosity in unstructured environments. We operate with a flat organizational structure. All team members are expected to be hands on and to contribute directly to the company's mission. Leadership is given to those who show initiative and consistently deliver excellence. Work ethic and strong prioritization skills are important. All team members are expected to have strong communication skills.","All team members become owners and are expected to behave as such and share the upside created. Incentive design is important."]},{heading:"About the Role",content:["Applied AI at TZCO means deploying agent systems in production to deliver outcomes. This is not a research position. You will build, ship and maintain AI systems that solve real problems for real customers across our portfolio.","You will work directly with customers to understand their problems, then design and deploy agent systems that address them. You own the full cycle: scoping the problem, architecting the solution, building it, putting it in production and making sure it works.","The work is highly technical. You should be deep in the stack, comfortable with LLMs, agent frameworks, tool use, retrieval systems and the infrastructure required to run all of it reliably. You should also be someone who genuinely enjoys being close to the customer and the problem."]},{heading:"Who You Are",content:["You have built and deployed AI systems that people actually use.","You are technical and hands on. You write code every day with CLIs or IDEs and your output and code quality have both improved over the last 12 months.","You are comfortable working directly with customers. You listen well and translate messy problems into working systems.","You move fast and ship. You have a bias for getting things into production rather than perfecting them in isolation.","You have strong opinions about how agent systems should be built, grounded in experience.","You thrive in unstructured environments. You don't wait to be told what to do.","You care about outcomes. The point is to solve the problem."]}],salary:"$150,000 to $280,000 USD",benefits:"Base salary is just one part of our total rewards package at TZCO, which also includes equity and comprehensive medical.",applyEmail:"[email protected]"},{slug:"deployment-specialist",title:"Deployment Specialist",location:"Miami and New York",sections:[{heading:"About The Zeal Company",content:['The Zeal Company (TZCO) is a technology holdings company that creates, acquires, operates and invests in businesses built for the long term. We provide capital, technology and operational support. Our approach is hands on, highly technical, geared towards building with outlier talent with "forever timeline". TZCO is built by founders and quality shareholders.',"Our team is small, highly motivated and focused on operational excellence. This organization is for individuals who appreciate challenging themselves and thrive on curiosity in unstructured environments. We operate with a flat organizational structure. All team members are expected to be hands on and to contribute directly to the company's mission. Leadership is given to those who show initiative and consistently deliver excellence. Work ethic and strong prioritization skills are important. All team members are expected to have strong communication skills.","All team members become owners and are expected to behave as such and share the upside created. Incentive design is important."]},{heading:"About the Role",content:["You sit between the technology and the business problem. Your job is to take what our engineering teams build and put it to work inside real companies. You make sure AI systems actually get adopted, configured correctly and deliver results.","You don't need to be an engineer. But you are fluent in CLIs like Claude Code and comfortable working in a terminal. You can read code, follow a deployment process and troubleshoot when something isn't working as expected.","What sets you apart is your ability to understand business problems and apply clarity to complexity. You walk into a company, understand how it operates, identify where our tools fit and make the deployment happen. You are the last mile between what we build and the value it creates."]},{heading:"Who You Are",content:["You love understanding how businesses actually work. The real workflows, the bottlenecks, the things people complain about on a daily basis.","You bring clarity to complex problems. When others are confused about where to start, you break it down and create a path forward.","You are comfortable in a terminal. You use CLIs daily and you pick up new tools fast.","You are not afraid of technical environments even if you are not writing production code yourself. You can hold your own in a room full of engineers.","You are an excellent communicator. You translate between technical teams and business stakeholders.","You are persistent. Deployments don't always go smoothly. You stay with it until it works.","You take ownership. Once a deployment is yours, the outcome is yours."]}],salary:"$110,000 to $220,000 USD",benefits:"Base salary is just one part of our total rewards package at TZCO, which also includes equity and comprehensive medical.",applyEmail:"[email protected]"},{slug:"ai-operations",title:"AI Operations",location:"Miami and New York",sections:[{heading:"About The Zeal Company",content:['The Zeal Company (TZCO) is a technology holdings company that creates, acquires, operates and invests in businesses built for the long term. We provide capital, technology and operational support. Our approach is hands on, highly technical, geared towards building with outlier talent with "forever timeline". TZCO is built by founders and quality shareholders.',"Our team is small, highly motivated and focused on operational excellence. This organization is for individuals who appreciate challenging themselves and thrive on curiosity in unstructured environments. We operate with a flat organizational structure. All team members are expected to be hands on and to contribute directly to the company's mission. Leadership is given to those who show initiative and consistently deliver excellence. Work ethic and strong prioritization skills are important. All team members are expected to have strong communication skills.","All team members become owners and are expected to behave as such and share the upside created. Incentive design is important."]},{heading:"About the Role",content:["You believe every back office function of a company can be reinvented. Finance, legal, HR, compliance, procurement, reporting. All of it. There is no function that cannot be redesigned or automated. You will do this across TZCO and the companies we work with.","Your job is to look at how work gets done today, identify what can be rebuilt with AI and then actually rebuild it. You orchestrate agents to do work that used to require manual effort, repetitive processes and layers of coordination.","You will own operational workflows end to end. You scope the problem, design the new process, deploy the agents and make sure the system runs. When something breaks you fix it. When something can be better you make it better."]},{heading:"Who You Are",content:["You look at any operational process and immediately see how it should work instead of how it currently works.","You love orchestrating agents to do work for you. You find it deeply satisfying to replace manual processes with systems that run themselves.","You understand business operations. You have spent time in or around finance, legal, HR or other back office functions and you know
3927where the real pain is.","You are technical enough to build and deploy agent workflows yourself. You don't need an engineering team to get things done.","You are relentless about eliminating unnecessary work. If a human is doing something an agent could do, that bothers you.","You thrive in ambiguity. You can walk into a company, map out how it operates and start rebuilding within days."]}],salary:"$120,000 to $240,000 USD",benefits:"Base salary is just one part of our total rewards package at TZCO, which also includes equity and comprehensive medical.",applyEmail:"[email protected]"},{slug:"forward-deployed-entrepreneur",title:"Forward Deployed Entrepreneur",location:"Miami and New York",sections:[{heading:"About The Zeal Company",content:['The Zeal Company (TZCO) is a technology holdings company that creates, acquires, operates and invests in businesses built for the long term. We provide capital, technology and operational support. Our approach is hands on, highly technical, geared towards building with outlier talent with "forever timeline". TZCO is built by founders and quality shareholders.',"Our team is small, highly motivated and focused on operational excellence. This organization is for individuals who appreciate challenging themselves and thrive on curiosity in unstructured environments. We operate with a flat organizational structure. All team members are expected to be hands on and to contribute directly to the company's mission. Leadership is given to those who show initiative and consistently deliver excellence. Work ethic and strong prioritization skills are important. All team members are expected to have strong communication skills.","All team members become owners and are expected to behave as such and share the upside created. Incentive design is important."]},{heading:"About the Role",content:["You will be embedded inside companies that TZCO works with. You go where the problem is. You show up, understand the business, find the highest leverage opportunities and build solutions on the ground.","This is not a consulting role. You operate as if it were your own company. You make decisions, ship products, close gaps and drive outcomes. You stay until the job is done.","The problems will vary. One month you might be standing up an AI workflow inside a portfolio company. The next you might be rebuilding a sales process or launching a new product line. What stays constant is that you are the person in the room making things happen."]},{heading:"Who You Are",content:["You have started or run something yourself. A company, a product, a team. You know what it feels like to be fully responsible for an outcome.","You are technical enough to build and resourceful enough to figure out everything else.","You are comfortable being dropped into unfamiliar environments. New industries, new teams, new problems. You orient fast.","You earn trust quickly. People want to work with you after spending ten minutes in a room with you.","You bias toward action. You ship today instead of planning for next quarter.","You are comfortable with pressure. When something needs to work by Friday you find a way to make it work by Friday.","You think like an owner because you have been one."]}],salary:"$140,000 to $260,000 USD",benefits:"Base salary is just one part of our total rewards package at TZCO, which also includes equity and comprehensive medical.",applyEmail:"[email protected]"},{slug:"builder-in-residence",title:"Builder in Residence",location:"Miami and New York",sections:[{heading:"About The Zeal Company",content:['The Zeal Company (TZCO) is a technology holdings company that creates, acquires, operates and invests in businesses built for the long term. We provide capital, technology and operational support. Our approach is hands on, highly technical, geared towards building with outlier talent with "forever timeline". TZCO is built by founders and quality shareholders.',"Our team is small, highly motivated and focused on operational excellence. This organization is for individuals who appreciate challenging themselves and thrive on curiosity in unstructured environments. We operate with a flat organizational structure. All team members are expected to be hands on and to contribute directly to the company's mission. Leadership is given to those who show initiative and consistently deliver excellence. Work ethic and strong prioritization skills are important. All team members are expected to have strong communication skills.","All team members become owners and are expected to behave as such and share the upside created. Incentive design is important."]},{heading:"About the Role",content:["You believe in having a partner that works next to you to derisk a company and to build things with the right genetics from the start. TZCO is that partner. You will join us to build something new from scratch with our capital, infrastru
3927cture and support behind you.","You are comfortable validating deeply and selling before building. This is not an incubator program. There is no demo day. You are here to build a real company. You will have access to the TZCO ecosystem, our technology, our talent pipeline and our operating partners. What you build with it is up to you.","We expect you to move fast, validate quickly and either scale what works or kill what doesn't. The timeline is yours to own but the bar is high. We back builders who ship."]},{heading:"Who You Are",content:["You have built things before. Products, companies, systems. You have a track record of creating something from nothing.","You have a strong point of view about what should exist in the world and you are ready to go build it.","You are technical. You can build the first version yourself without waiting for a team.","You are honest about what is working and what is not. You care more about the problem than your solution to it.","You are self directed. You don't need structure or permission. You need resources and time.","You have high standards. The things you build reflect the care you put into them.","You want to be an owner. You want the upside and the accountability that comes with it."]}],salary:"$150,000 to $280,000 USD",benefits:"Base salary is just one part of our total rewards package at TZCO, which also includes equity and comprehensive medical.",applyEmail:"[email protected]"},{slug:"founder-path",title:"Founder Path",location:"Miami and New York",sections:[{heading:"About The Zeal Company",content:['The Zeal Company (TZCO) is a technology holdings company that creates, acquires, operates and invests in businesses built for the long term. We provide capital, technology and operational support. Our approach is hands on, highly technical, geared towards building with outlier talent with "forever timeline". TZCO is built by founders and quality shareholders.',"Our team is small, highly motivated and focused on operational excellence. This organization is for individuals who appreciate challenging themselves and thrive on curiosity in unstructured environments. We operate with a flat organizational structure. All team members are expected to be hands on and to contribute directly to the company's mission. Leadership is given to those who show initiative and consistently deliver excellence. Work ethic and strong prioritization skills are important. All team members are expected to have strong communication skills.","All team members become owners and are expected to behave as such and share the upside created. Incentive design is important."]},{heading:"About the Role",content:["We build with people who have founder instincts. This role is designed for individuals who are not just looking for a job but are working toward building something of their own.","While you are deployed across TZCO's portfolio, you are encouraged to develop and pressure-test your own ideas. We create space and time for that. If you have a thesis you want to explore or an early concept you want to stress-test in the real world, we want to know about it. You will have access to operators, investors and builders across our network who can help you sharpen your thinking.","As we build trust with each other over time, TZCO aims to be a natural partner for what comes next, whatever that looks like for you. No commitments on either side, but a unique relationship built on aligned incentives."]},{heading:"Who You Are",content:["You are building toward something. You may not have the full picture yet, but the direction is clear to you.","You are hands on. You can build, sell, operate. You do not wait for a team to start.","You have high standards for your own work. You hold yourself accountable before anyone else does.","You are honest about what you know and what you do not. You seek out the people who can fill the gaps.","You move with urgency. You understand that speed matters and you act accordingly.","You want a partner, not an employer. You are looking for aligned incentives and shared commitment."]}],salary:"$120,000 to $200,000 USD",benefits:"Base salary is just one part of our total rewards package at TZCO, which also includes equity and comprehensive medical.",applyEmail:"[email protected]"},{slug:"intelligence-and-research",title:"Intelligence & Research",location:"Miami and New York",sections:[{heading:"About The Zeal Company",content:['The Zeal Company (TZCO) is a technology holdings company that creates, acquires, operates and invests in businesses built for the long term. We provide capital, technology and operational support. Our approach is hands on, highly technical, geared towards building with outlier talent with "forever timeline". TZCO is built by founders and quality shareholders.',"Our team is small, highly motivated and focused on operational excellence. This organization is for individuals who appreciate challenging themselves and thrive on curiosity in unstructured environments. We operate with a flat organizational structure. All team members are expected to be hands on and to contribute directly to the company's mission. Leadership is given to those who show initiative and consistently deliver excellence. Work ethic and strong prioritization skills are important. All team members are expected to have strong communication skills.","All team members become owners and are expected to behave as such and share the upside created. Incentive design is important."]},{heading:"About the Role",content:["You are the person we go to when we need to understand something deeply and quickly. A market, a technology, a regulatory landscape, a competitor, an acquisition target. Whatever the question, you find the answer.","You are not expected to code. But you live in your terminal. Claude Code is your operating system. You use it to research, synthesize, organize and produce work that would take most people weeks in a fraction of the time.","You will work across TZCO and our portfolio companies, supporting decision making with thorough, well structured intelligence. Your output directly informs where we invest, what we build and how we operate."]},{heading:"Who You Are",content:["You know how to learn. You can pick up almost any topic in weeks, regardless of how complex it is. You have done this repeatedly throughout your life.","You love to learn. Your browser history and bookshelf reflect this.","You are an exceptional writer. Your thinking is clear because your writing is clear.","You are rigorous. You care about getting it right. You check sources, question assumptions and distinguish between what is known and what is assumed.","You use AI tools aggressively to multiply your output. You are not waiting for permission to adopt new w
3927orkflows.","You are comfortable with ambiguity. Someone gives you a vague question and you come back with a structured answer.","You have strong judgment about what matters. You know which information changes decisions."]}],salary:"$100,000 to $200,000 USD",benefits:"Base salary is just one part of our total rewards package at TZCO, which also includes equity and comprehensive medical.",applyEmail:"[email protected]"}],q3=()=>te.jsxs("div",{className:"relative w-full min-h-screen bg-white text-black overflow-auto",children:[te.jsx("div",{className:"absolute top-[4vh] sm:top-[5vh] md:top-8 left-4 sm:left-5 md:left-8 z-10",children:te.jsx(qo,{href:"/",children:te.jsx("span",{className:"text-black font-mono hover:text-gray-600 transition-colors cursor-pointer text-sm sm:text-sm md:text-base",children:"â Back to Home"})})}),te.jsx("div",{className:"absolute bottom-[calc(env(safe-area-inset-bottom)+15.6vh-7px+10mm)] sm:bottom-[calc(5vh-52px)] md:bottom-[calc(32px-52px)] left-[-31px] sm:left-[-40px] md:left-[-28px] w-[154px] h-[154px] sm:w-[240px] sm:h-[240px] md:w-[288px] md:h-[288px] z-50",children:te.jsx(zw,{})}),te.jsx("div",{className:"pt-[12vh] sm:pt-[14vh] md:pt-32 pb-16 px-4 sm:px-5 md:px-8 max-w-lg",children:Bw.map(t=>te.jsx(qo,{href:`/open-roles/${t.slug}`,children:te.jsx("span",{className:"block py-2 text-sm md:text-base font-mono text-black hover:text-gray-600 transition-colors cursor-pointer",children:t.title})},t.slug))})]}),$3=()=>{B.useEffect(()=>(document.body.style.overflow="auto",document.body.style.height="auto",()=>{document.body.style.overflow="hidden",document.body.style.height="100vh"}),[]);const{slug:t}=b_(),e=Bw.find(n=>n.slug===t);return e?te.jsxs("div",{className:"bg-white text-black min-h-screen relative",children:[te.jsx("div",{className:"absolute top-[4vh] sm:top-[5vh] md:top-8 left-4 sm:left-5 md:left-8 z-50",children:te.jsx(qo,{href:"/open-roles",children:te.jsx("span",{className:"text-black font-mono hover:text-gray-500 transition-colors cursor-pointer text-sm",children:"â Back to Open Roles"})})}),te.jsx("div",{className:"min-h-screen pt-[14vh] sm:pt-[16vh] pb-16 px-4 sm:px-5 md:px-8 md:flex md:justify-center",children:te.jsxs("div",{className:"w-full max-w-[calc(36rem+2cm)] md:mr-[12cm]",children:[te.jsx("h1",{className:"text-2xl sm:text-3xl font-mono font-bold tracking-tight",children:e.title}),e.location&&te.jsx("p",{className:"mt-2 text-sm font-mono text-gray-500",children:e.location}),e.sections.map((n,i)=>te.jsxs("div",{className:"mt-10",children:[te.jsx("h2",{className:"text-base font-mono font-bold mb-4",children:n.heading}),n.content.map((r,s)=>te.jsx("p",{className:"text-sm font-mono leading-relaxed text-justify mt-4 first:mt-0",children:r},s))]},i)),e.salary&&te.jsxs("div",{className:"mt-10",children:[te.jsx("h2",{className:"text-base font-mono font-bold mb-4",children:"Compensation"}),te.jsx("p",{className:"text-sm font-mono leading-relaxed",children:"Annual Salary Range"}),te.jsx("p",{className:"text-sm font-mono leading-relaxed mt-1",children:e.salary})]}),e.benefits&&te.jsxs("div",{className:"mt-10",children:[te.jsx("h2",{className:"text-base font-mono font-bold mb-4",children:"Benefits"}),te.jsx("p",{className:"text-sm font-mono leading-relaxed text-justify",children:e.benefits})]}),te.jsxs("div",{className:"mt-10",children:[te.jsx("span",{className:"text-sm font-mono text-black",children:"Apply here: "}),te.jsx("a",{href:`mailto:${e.applyEmail}?subject=${encodeURIComponent(e.title)}`,className:"text-sm font-mono text-black underline hover:text-gray-500 transition-colors",children:e.applyEmail})]})]})})]}):te.jsxs("div",{className:"relative w-full h-screen bg-white text-black overflow-hidden",children:[te.jsx("div",{className:"absolute top-[4vh] sm:top-[5vh] md:top-8 left-4 sm:left-5 md:left-8 z-50",children:te.jsx(qo,{href:"/open-roles",children:te.jsx("span",{className:"text-black font-mono hover:text-gray-500 transition-colors cursor-pointer text-sm",children:"â Back to Open Roles"})})}),te.jsx("div",{className:"flex items-start justify-center min-h-screen pt-[14vh] sm:pt-[16vh] px-6",children:te.jsx("p",{className:"text-sm font-mono text-black",children:"Position not found."})})]})};
3927function Z3(){return te.jsxs(q1,{children:[te.jsx(Ma,{path:"/",component:QC}),te.jsx(Ma,{path:"/more-info",component:Y3}),te.jsx(Ma,{path:"/open-roles",component:q3}),te.jsx(Ma,{path:"/open-roles/:slug",component:$3}),te.jsx(Ma,{component:OC})]})}function K3(){return te.jsx(yT,{client:ST,children:te.jsxs(PC,{children:[te.jsx(rA,{}),te.jsx(Z3,{})]})})}const Hw=document.createElement("style");Hw.innerHTML=` 3928 @import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&display=swap'); 3929 3930 body { 3931 font-family: 'Courier Prime', monospace; 3932 background-color: #000000; 3933 color: #F8F6F0; 3934 overflow: hidden; 3935 height: 100vh; 3936 margin: 0; 3937 padding: 0; 3938 box-sizing: border-box; 3939 } 3940`;document.head.appendChild(Hw);g_(document.getElementById("root")).render(te.jsx(ji.StrictMode,{children:te.jsx(K3,{})}));
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.