vendor: 2,112 bytes, lines 1-5
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./LUeVLFIC.js","./CbzV7KH3.js","./HeNhjMI6.js","./LineByLine.tEqs61R0.css","./BUuZjhqo.js","./Chx3igEn.js","./about.BaVvEYEH.css","./DmxYNxTc.js","./BSnKHEL8.js","./ShowreelCanvas.DENdqGZ9.css","./DkkuzaFX.js","./index.DKO9USo3.css","./DsJAgZzG.js","./MOgB9R2V.js","./ShuffleButton.MwwdxoDd.css","./uCmhvQh3.js","./B1QDJ5b3.js","./contact.CAMatoVT.css","./BA04B6nb.js","./vh7mFEmW.js","./set-life.BA11YKIl.css","./6CNNkpyH.js","./QreC5D3m.js","./BdmSeYdY.js","./BpG0IlsN.js","./Footer.Dy0_6g28.css","./interview.Bgct-9As.css","./BWJls0H1.js","./MImn2Oc5.js","./FilterBar.CNlyMZHL.css","./BtT3Mur_.js","./CCkUW_u0.js","./ArchivesList.sSZbeP-P.css","./DNZsKzZC.js","./index.Dtc5XXfy.css","./CMAY3SCi.js","./D-SWfl7h.js","./ProjectsList.D47Lu97E.css","./index.D3D3Kbi4.css","./0pOL3q3B.js","./index.CvwyMbbG.css","./fHq7_ZZT.js","./_slug_.CnABcUwk.css","./D7YucW3v.js","./_slug_.B5McA2j8.css","./WOcU2LN-.js","./UtbS8P_R.js","./Parallax.B5rFIlnF.css","./43MhPlkg.js","./Cursor.BAOAopUr.css","./ixFWTuTj.js","./Header.BPESOL7f.css","./tTgWynEK.js","./Menu.D2yPO_St.css","./956Vw6he.js","./Legals.D6gck3D5.css","./rguC49Rx.js","./Modal.DeddREr2.css","./Cjhmziyd.js","./Loader.C3V6ojVd.css","./BQoFA9LS.js","./default.B0NMNEpu.css"])))=>i.map(i=>d[i]); 2(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 t(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=t(r);fetch(r.href,s)}})();/** 3* @vue/shared v3.5.22 4* (c) 2018-present Yuxi (Evan) You and Vue contributors 5* @license MIT
vendor: 2,984 bytes, lines 6-9
6**/function Xh(n){const e=Object.create(null);for(const t of n.split(","))e[t]=1;return t=>t in e}const rt={},ho=[],Ai=()=>{},q_=()=>!1,tl=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&(n.charCodeAt(2)>122||n.charCodeAt(2)<97),jh=n=>n.startsWith("onUpdate:"),Xt=Object.assign,qh=(n,e)=>{const t=n.indexOf(e);t>-1&&n.splice(t,1)},MS=Object.prototype.hasOwnProperty,Ze=(n,e)=>MS.call(n,e),Ce=Array.isArray,po=n=>nl(n)==="[object Map]",$_=n=>nl(n)==="[object Set]",TS=n=>nl(n)==="[object RegExp]",Re=n=>typeof n=="function",mt=n=>typeof n=="string",lr=n=>typeof n=="symbol",at=n=>n!==null&&typeof n=="object",$h=n=>(at(n)||Re(n))&&Re(n.then)&&Re(n.catch),K_=Object.prototype.toString,nl=n=>K_.call(n),ES=n=>nl(n).slice(8,-1),Y_=n=>nl(n)==="[object Object]",Kh=n=>mt(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n,mo=Xh(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Xc=n=>{const e=Object.create(null);return(t=>e[t]||(e[t]=n(t)))},bS=/-\w/g,ei=Xc(n=>n.replace(bS,e=>e.slice(1).toUpperCase())),AS=/\B([A-Z])/g,Os=Xc(n=>n.replace(AS,"-$1").toLowerCase()),jc=Xc(n=>n.charAt(0).toUpperCase()+n.slice(1)),yu=Xc(n=>n?`on${jc(n)}`:""),Nr=(n,e)=>!Object.is(n,e),Ea=(n,...e)=>{for(let t=0;t<n.length;t++)n[t](...e)},Z_=(n,e,t,i=!1)=>{Object.defineProperty(n,e,{configurable:!0,enumerable:!1,writable:i,value:t})},wS=n=>{const e=parseFloat(n);return isNaN(e)?n:e},J_=n=>{const e=mt(n)?Number(n):NaN;return isNaN(e)?n:e};let fp;const qc=()=>fp||(fp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function $c(n){if(Ce(n)){const e={};for(let t=0;t<n.length;t++){const i=n[t],r=mt(i)?LS(i):$c(i);if(r)for(const s in r)e[s]=r[s]}return e}else if(mt(n)||at(n))return n}const RS=/;(?![^(]*\))/g,CS=/:([^]+)/,PS=/\/\*[^]*?\*\//g;function LS(n){const e={};return n.replace(PS,"").split(RS).forEach(t=>{if(t){const i=t.split(CS);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function Us(n){let e="";if(mt(n))e=n;else if(Ce(n))for(let t=0;t<n.length;t++){const i=Us(n[t]);i&&(e+=i+" ")}else if(at(n))for(const t in n)n[t]&&(e+=t+" ");return e.trim()}function L2(n){if(!n)return null;let{class:e,style:t}=n;return e&&!mt(e)&&(n.class=Us(e)),t&&(n.style=$c(t)),n}const IS="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",DS=Xh(IS);function Q_(n){return!!n||n===""}const e0=n=>!!(n&&n.__v_isRef===!0),t0=n=>mt(n)?n:n==null?"":Ce(n)||at(n)&&(n.toString===K_||!Re(n.toString))?e0(n)?t0(n.value):JSON.stringify(n,n0,2):String(n),n0=(n,e)=>e0(e)?n0(n,e.value):po(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[i,r],s)=>(t[xu(i,s)+" =>"]=r,t),{})}:$_(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>xu(t))}:lr(e)?xu(e):at(e)&&!Ce(e)&&!Y_(e)?String(e):e,xu=(n,e="")=>{var t;return lr(n)?`Symbol(${(t=n.description)!=null?t:e})`:n};/** 7* @vue/reactivity v3.5.22 8* (c) 2018-present Yuxi (Evan) You and Vue contributors 9* @license MIT
vendor: 16,605 bytes, lines 10-13
10**/let rn;class i0{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=rn,!e&&rn&&(this.index=(rn.scopes||(rn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){const t=rn;try{return rn=this,e()}finally{rn=t}}}on(){++this._on===1&&(this.prevScope=rn,rn=this)}off(){this._on>0&&--this._on===0&&(rn=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let t,i;for(t=0,i=this.effects.length;t<i;t++)this.effects[t].stop();for(this.effects.length=0,t=0,i=this.cleanups.length;t<i;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,i=this.scopes.length;t<i;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function NS(n){return new i0(n)}function r0(){return rn}function I2(n,e=!1){rn&&rn.cleanups.push(n)}let ct;const Su=new WeakSet;class s0{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,rn&&rn.active&&rn.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Su.has(this)&&(Su.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||a0(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,hp(this),l0(this);const e=ct,t=ci;ct=this,ci=!0;try{return this.fn()}finally{c0(this),ct=e,ci=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Jh(e);this.deps=this.depsTail=void 0,hp(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Su.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){kf(this)&&this.run()}get dirty(){return kf(this)}}let o0=0,ba,Aa;function a0(n,e=!1){if(n.flags|=8,e){n.next=Aa,Aa=n;return}n.next=ba,ba=n}function Yh(){o0++}function Zh(){if(--o0>0)return;if(Aa){let e=Aa;for(Aa=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let n;for(;ba;){let e=ba;for(ba=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){n||(n=i)}e=t}}if(n)throw n}function l0(n){for(let e=n.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function c0(n){let e,t=n.depsTail,i=t;for(;i;){const r=i.prevDep;i.version===-1?(i===t&&(t=r),Jh(i),OS(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=r}n.deps=e,n.depsTail=t}function kf(n){for(let e=n.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(u0(e.dep.computed)||e.dep.version!==e.version))return!0;return!!n._dirty}function u0(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===ka)||(n.globalVersion=ka,!n.isSSR&&n.flags&128&&(!n.deps&&!n._dirty||!kf(n))))return;n.flags|=2;const e=n.dep,t=ct,i=ci;ct=n,ci=!0;try{l0(n);const r=n.fn(n._value);(e.version===0||Nr(r,n._value))&&(n.flags|=128,n._value=r,e.version++)}catch(r){throw e.version++,r}finally{ct=t,ci=i,c0(n),n.flags&=-3}}function Jh(n,e=!1){const{dep:t,prevSub:i,nextSub:r}=n;if(i&&(i.nextSub=r,n.prevSub=void 0),r&&(r.prevSub=i,n.nextSub=void 0),t.subs===n&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let s=t.computed.deps;s;s=s.nextDep)Jh(s,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function OS(n){const{prevDep:e,nextDep:t}=n;e&&(e.nextDep=t,n.prevDep=void 0),t&&(t.prevDep=e,n.nextDep=void 0)}let ci=!0;const f0=[];function tr(){f0.push(ci),ci=!1}function nr(){const n=f0.pop();ci=n===void 0?!0:n}function hp(n){const{cleanup:e}=n;if(n.cleanup=void 0,e){const t=ct;ct=void 0;try{e()}finally{ct=t}}}let ka=0;class US{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Qh{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!ct||!ci||ct===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==ct)t=this.activeLink=new US(ct,this),ct.deps?(t.prevDep=ct.depsTail,ct.depsTail.nextDep=t,ct.depsTail=t):ct.deps=ct.depsTail=t,h0(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const i=t.nextDep;i.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=i),t.prevDep=ct.depsTail,t.nextDep=void 0,ct.depsTail.nextDep=t,ct.depsTail=t,ct.deps===t&&(ct.deps=i)}return t}trigger(e){this.version++,ka++,this.notify(e)}notify(e){Yh();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{Zh()}}}function h0(n){if(n.dep.sc++,n.sub.flags&4){const e=n.dep.computed;if(e&&!n.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)h0(i)}const t=n.dep.subs;t!==n&&(n.prevSub=t,t&&(t.nextSub=n)),n.dep.subs=n}}const fc=new WeakMap,xs=Symbol(""),Bf=Symbol(""),Ba=Symbol("");function on(n,e,t){if(ci&&ct){let i=fc.get(n);i||fc.set(n,i=new Map);let r=i.get(t);r||(i.set(t,r=new Qh),r.map=i,r.key=t),r.track()}}function Ki(n,e,t,i,r,s){const o=fc.get(n);if(!o){ka++;return}const a=l=>{l&&l.trigger()};if(Yh(),e==="clear")o.forEach(a);else{const l=Ce(n),c=l&&Kh(t);if(l&&t==="length"){const u=Number(i);o.forEach((f,h)=>{(h==="length"||h===Ba||!lr(h)&&h>=u)&&a(f)})}else switch((t!==void 0||o.has(void 0))&&a(o.get(t)),c&&a(o.get(Ba)),e){case"add":l?c&&a(o.get("length")):(a(o.get(xs)),po(n)&&a(o.get(Bf)));break;case"delete":l||(a(o.get(xs)),po(n)&&a(o.get(Bf)));break;case"set":po(n)&&a(o.get(xs));break}}Zh()}function FS(n,e){const t=fc.get(n);return t&&t.get(e)}function Bs(n){const e=Ke(n);return e===n?e:(on(e,"iterate",Ba),Qn(n)?e:e.map($t))}function Kc(n){return on(n=Ke(n),"iterate",Ba),n}const kS={__proto__:null,[Symbol.iterator](){return Mu(this,Symbol.iterator,$t)},concat(...n){return Bs(this).concat(...n.map(e=>Ce(e)?Bs(e):e))},entries(){return Mu(this,"entries",n=>(n[1]=$t(n[1]),n))},every(n,e){return Ni(this,"every",n,e,void 0,arguments)},filter(n,e){return Ni(this,"filter",n,e,t=>t.map($t),arguments)},find(n,e){return Ni(this,"find",n,e,$t,arguments)},findIndex(n,e){return Ni(this,"findIndex",n,e,void 0,arguments)},findLast(n,e){return Ni(this,"findLast",n,e,$t,arguments)},findLastIndex(n,e){return Ni(this,"findLastIndex",n,e,void 0,arguments)},forEach(n,e){return Ni(this,"forEach",n,e,void 0,arguments)},includes(...n){return Tu(this,"includes",n)},indexOf(...n){return Tu(this,"indexOf",n)},join(n){return Bs(this).join(n)},lastIndexOf(...n){return Tu(this,"lastIndexOf",n)},map(n,e){return Ni(this,"map",n,e,void 0,arguments)},pop(){return ra(this,"pop")},push(...n){return ra(this,"push",n)},reduce(n,...e){return dp(this,"reduce",n,e)},reduceRight(n,...e){return dp(this,"reduceRight",n,e)},shift(){return ra(this,"shift")},some(n,e){return Ni(this,"some",n,e,void 0,arguments)},splice(...n){return ra(this,"splice",n)},toReversed(){return Bs(this).toReversed()},toSorted(n){return Bs(this).toSorted(n)},toSpliced(...n){return Bs(this).toSpliced(...n)},unshift(...n){return ra(this,"unshift",n)},values(){return Mu(this,"values",$t)}};function Mu(n,e,t){const i=Kc(n),r=i[e]();return i!==n&&!Qn(n)&&(r._next=r.next,r.next=()=>{const s=r._next();return s.done||(s.value=t(s.value)),s}),r}const BS=Array.prototype;function Ni(n,e,t,i,r,s){const o=Kc(n),a=o!==n&&!Qn(n),l=o[e];if(l!==BS[e]){const f=l.apply(n,s);return a?$t(f):f}let c=t;o!==n&&(a?c=function(f,h){return t.call(this,$t(f),h,n)}:t.length>2&&(c=function(f,h){return t.call(this,f,h,n)}));const u=l.call(o,c,i);return a&&r?r(u):u}function dp(n,e,t,i){const r=Kc(n);let s=t;return r!==n&&(Qn(n)?t.length>3&&(s=function(o,a,l){return t.call(this,o,a,l,n)}):s=function(o,a,l){return t.call(this,o,$t(a),l,n)}),r[e](s,...i)}function Tu(n,e,t){const i=Ke(n);on(i,"iterate",Ba);const r=i[e](...t);return(r===-1||r===!1)&&nd(t[0])?(t[0]=Ke(t[0]),i[e](...t)):r}function ra(n,e,t=[]){tr(),Yh();const i=Ke(n)[e].apply(n,t);return Zh(),nr(),i}const HS=Xh("__proto__,__v_isRef,__isVue"),d0=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(lr));function zS(n){lr(n)||(n=String(n));const e=Ke(this);return on(e,"has",n),e.hasOwnProperty(n)}class p0{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){if(t==="__v_skip")return e.__v_skip;const r=this._isReadonly,s=this._isShallow;if(t==="__v_isReactive")return!r;if(t==="__v_isReadonly")return r;if(t==="__v_isShallow")return s;if(t==="__v_raw")return i===(r?s?ZS:v0:s?_0:g0).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=Ce(e);if(!r){let l;if(o&&(l=kS[t]))return l;if(t==="hasOwnProperty")return zS}const a=Reflect.get(e,t,It(e)?e:i);if((lr(t)?d0.has(t):HS(t))||(r||on(e,"get",t),s))return a;if(It(a)){const l=o&&Kh(t)?a:a.value;return r&&at(l)?zf(l):l}return at(a)?r?zf(a):ti(a):a}}class m0 extends p0{constructor(e=!1){super(!1,e)}set(e,t,i,r){let s=e[t];if(!this._isShallow){const l=ir(s);if(!Qn(i)&&!ir(i)&&(s=Ke(s),i=Ke(i)),!Ce(e)&&It(s)&&!It(i))return l||(s.value=i),!0}const o=Ce(e)&&Kh(t)?Number(t)<e.length:Ze(e,t),a=Reflect.set(e,t,i,It(e)?e:r);return e===Ke(r)&&(o?Nr(i,s)&&Ki(e,"set",t,i):Ki(e,"add",t,i)),a}deleteProperty(e,t){const i=Ze(e,t);e[t];const r=Reflect.deleteProperty(e,t);return r&&i&&Ki(e,"delete",t,void 0),r}has(e,t){const i=Reflect.has(e,t);return(!lr(t)||!d0.has(t))&&on(e,"has",t),i}ownKeys(e){return on(e,"iterate",Ce(e)?"length":xs),Reflect.ownKeys(e)}}class VS extends p0{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const GS=new m0,WS=new VS,XS=new m0(!0);const Hf=n=>n,_l=n=>Reflect.getPrototypeOf(n);function jS(n,e,t){return function(...i){const r=this.__v_raw,s=Ke(r),o=po(s),a=n==="entries"||n===Symbol.iterator&&o,l=n==="keys"&&o,c=r[n](...i),u=t?Hf:e?hc:$t;return!e&&on(s,"iterate",l?Bf:xs),{next(){const{value:f,done:h}=c.next();return h?{value:f,done:h}:{value:a?[u(f[0]),u(f[1])]:u(f),done:h}},[Symbol.iterator](){return this}}}}function vl(n){return function(...e){return n==="delete"?!1:n==="clear"?void 0:this}}function qS(n,e){const t={get(r){const s=this.__v_raw,o=Ke(s),a=Ke(r);n||(Nr(r,a)&&on(o,"get",r),on(o,"get",a));const{has:l}=_l(o),c=e?Hf:n?hc:$t;if(l.call(o,r))return c(s.get(r));if(l.call(o,a))return c(s.get(a));s!==o&&s.get(r)},get size(){const r=this.__v_raw;return!n&&on(Ke(r),"iterate",xs),r.size},has(r){const s=this.__v_raw,o=Ke(s),a=Ke(r);return n||(Nr(r,a)&&on(o,"has",r),on(o,"has",a)),r===a?s.has(r):s.has(r)||s.has(a)},forEach(r,s){const o=this,a=o.__v_raw,l=Ke(a),c=e?Hf:n?hc:$t;return!n&&on(l,"iterate",xs),a.forEach((u,f)=>r.call(s,c(u),c(f),o))}};return Xt(t,n?{add:vl("add"),set:vl("set"),delete:vl("delete"),clear:vl("clear")}:{add(r){!e&&!Qn(r)&&!ir(r)&&(r=Ke(r));const s=Ke(this);return _l(s).has.call(s,r)||(s.add(r),Ki(s,"add",r,r)),this},set(r,s){!e&&!Qn(s)&&!ir(s)&&(s=Ke(s));const o=Ke(this),{has:a,get:l}=_l(o);let c=a.call(o,r);c||(r=Ke(r),c=a.call(o,r));const u=l.call(o,r);return o.set(r,s),c?Nr(s,u)&&Ki(o,"set",r,s):Ki(o,"add",r,s),this},delete(r){const s=Ke(this),{has:o,get:a}=_l(s);let l=o.call(s,r);l||(r=Ke(r),l=o.call(s,r)),a&&a.call(s,r);const c=s.delete(r);return l&&Ki(s,"delete",r,void 0),c},clear(){const r=Ke(this),s=r.size!==0,o=r.clear();return s&&Ki(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{t[r]=jS(r,n,e)}),t}function ed(n,e){const t=qS(n,e);return(i,r,s)=>r==="__v_isReactive"?!n:r==="__v_isReadonly"?n:r==="__v_raw"?i:Reflect.get(Ze(t,r)&&r in i?t:i,r,s)}const $S={get:ed(!1,!1)},KS={get:ed(!1,!0)},YS={get:ed(!0,!1)};const g0=new WeakMap,_0=new WeakMap,v0=new WeakMap,ZS=new WeakMap;function JS(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function QS(n){return n.__v_skip||!Object.isExtensible(n)?0:JS(ES(n))}function ti(n){return ir(n)?n:td(n,!1,GS,$S,g0)}function Ti(n){return td(n,!1,XS,KS,_0)}function zf(n){return td(n,!0,WS,YS,v0)}function td(n,e,t,i,r){if(!at(n)||n.__v_raw&&!(e&&n.__v_isReactive))return n;const s=QS(n);if(s===0)return n;const o=r.get(n);if(o)return o;const a=new Proxy(n,s===2?i:t);return r.set(n,a),a}function Ss(n){return ir(n)?Ss(n.__v_raw):!!(n&&n.__v_isReactive)}function ir(n){return!!(n&&n.__v_isReadonly)}function Qn(n){return!!(n&&n.__v_isShallow)}function nd(n){return n?!!n.__v_raw:!1}function Ke(n){const e=n&&n.__v_raw;return e?Ke(e):n}function eM(n){return!Ze(n,"__v_skip")&&Object.isExtensible(n)&&Z_(n,"__v_skip",!0),n}const $t=n=>at(n)?ti(n):n,hc=n=>at(n)?zf(n):n;function It(n){return n?n.__v_isRef===!0:!1}function zn(n){return y0(n,!1)}function Cs(n){return y0(n,!0)}function y0(n,e){return It(n)?n:new tM(n,e)}class tM{constructor(e,t){this.dep=new Qh,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Ke(e),this._value=t?e:$t(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,i=this.__v_isShallow||Qn(e)||ir(e);e=i?e:Ke(e),Nr(e,t)&&(this._rawValue=e,this._value=i?e:$t(e),this.dep.trigger())}}function bt(n){return It(n)?n.value:n}function x0(n){return Re(n)?n():bt(n)}const nM={get:(n,e,t)=>e==="__v_raw"?n:bt(Reflect.get(n,e,t)),set:(n,e,t,i)=>{const r=n[e];return It(r)&&!It(t)?(r.value=t,!0):Reflect.set(n,e,t,i)}};function S0(n){return Ss(n)?n:new Proxy(n,nM)}class iM{constructor(e,t,i){this._object=e,this._key=t,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return FS(Ke(this._object),this._key)}}class rM{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function M0(n,e,t){return It(n)?n:Re(n)?new rM(n):at(n)&&arguments.length>1?sM(n,e,t):zn(n)}function sM(n,e,t){const i=n[e];return It(i)?i:new iM(n,e,t)}class oM{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Qh(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ka-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&ct!==this)return a0(this,!0),!0}get value(){const e=this.dep.track();return u0(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function aM(n,e,t=!1){let i,r;return Re(n)?i=n:(i=n.get,r=n.set),new oM(i,r,t)}const yl={},dc=new WeakMap;let us;function lM(n,e=!1,t=us){if(t){let i=dc.get(t);i||dc.set(t,i=[]),i.push(n)}}function cM(n,e,t=rt){const{immediate:i,deep:r,once:s,scheduler:o,augmentJob:a,call:l}=t,c=y=>r?y:Qn(y)||r===!1||r===0?Yi(y,1):Yi(y);let u,f,h,d,_=!1,m=!1;if(It(n)?(f=()=>n.value,_=Qn(n)):Ss(n)?(f=()=>c(n),_=!0):Ce(n)?(m=!0,_=n.some(y=>Ss(y)||Qn(y)),f=()=>n.map(y=>{if(It(y))return y.value;if(Ss(y))return c(y);if(Re(y))return l?l(y,2):y()})):Re(n)?e?f=l?()=>l(n,2):n:f=()=>{if(h){tr();try{h()}finally{nr()}}const y=us;us=u;try{return l?l(n,3,[d]):n(d)}finally{us=y}}:f=Ai,e&&r){const y=f,T=r===!0?1/0:r;f=()=>Yi(y(),T)}const p=r0(),g=()=>{u.stop(),p&&p.active&&qh(p.effects,u)};if(s&&e){const y=e;e=(...T)=>{y(...T),g()}}let x=m?new Array(n.length).fill(yl):yl;const v=y=>{if(!(!(u.flags&1)||!u.dirty&&!y))if(e){const T=u.run();if(r||_||(m?T.some((b,A)=>Nr(b,x[A])):Nr(T,x))){h&&h();const b=us;us=u;try{const A=[T,x===yl?void 0:m&&x[0]===yl?[]:x,d];x=T,l?l(e,3,A):e(...A)}finally{us=b}}}else u.run()};return a&&a(v),u=new s0(f),u.scheduler=o?()=>o(v,!1):v,d=y=>lM(y,!1,u),h=u.onStop=()=>{const y=dc.get(u);if(y){if(l)l(y,4);else for(const T of y)T();dc.delete(u)}},e?i?v(!0):x=u.run():o?o(v.bind(null,!0),!0):u.run(),g.pause=u.pause.bind(u),g.resume=u.resume.bind(u),g.stop=g,g}function Yi(n,e=1/0,t){if(e<=0||!at(n)||n.__v_skip||(t=t||new Map,(t.get(n)||0)>=e))return n;if(t.set(n,e),e--,It(n))Yi(n.value,e,t);else if(Ce(n))for(let i=0;i<n.length;i++)Yi(n[i],e,t);else if($_(n)||po(n))n.forEach(i=>{Yi(i,e,t)});else if(Y_(n)){for(const i in n)Yi(n[i],e,t);for(const i of Object.getOwnPropertySymbols(n))Object.prototype.propertyIsEnumerable.call(n,i)&&Yi(n[i],e,t)}return n}/** 11* @vue/runtime-core v3.5.22 12* (c) 2018-present Yuxi (Evan) You and Vue contributors 13* @license MIT
14**/function il(n,e,t,i){try{return i?n(...i):n()}catch(r){Yo(r,e,t)}}function hi(n,e,t,i){if(Re(n)){const r=il(n,e,t,i);return r&&$h(r)&&r.catch(s=>{Yo(s,e,t)}),r}if(Ce(n)){const r=[];for(let s=0;s<n.length;s++)r.push(hi(n[s],e,t,i));return r}}function Yo(n,e,t,i=!0){const r=e?e.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:o}=e&&e.appContext.config||rt;if(e){let a=e.parent;const l=e.proxy,c=`https://vuejs.org/error-reference/#runtime-${t}`;for(;a;){const u=a.ec;if(u){for(let f=0;f<u.length;f++)if(u[f](n,l,c)===!1)return}a=a.parent}if(s){tr(),il(s,null,10,[n,l,c]),nr();return}}uM(n,t,r,i,o)}function uM(n,e,t,i=!0,r=!1){if(r)throw n;console.error(n)}const mn=[];let gi=-1;const go=[];let Mr=null,oo=0;const T0=Promise.resolve();let pc=null;function Ro(n){const e=pc||T0;return n?e.then(this?n.bind(this):n):e}function fM(n){let e=gi+1,t=mn.length;for(;e<t;){const i=e+t>>>1,r=mn[i],s=Ha(r);s<n||s===n&&r.flags&2?e=i+1:t=i}return e}function id(n){if(!(n.flags&1)){const e=Ha(n),t=mn[mn.length-1];!t||!(n.flags&2)&&e>=Ha(t)?mn.push(n):mn.splice(fM(e),0,n),n.flags|=1,E0()}}function E0(){pc||(pc=T0.then(b0))}function Vf(n){Ce(n)?go.push(...n):Mr&&n.id===-1?Mr.splice(oo+1,0,n):n.flags&1||(go.push(n),n.flags|=1),E0()}function pp(n,e,t=gi+1){for(;t<mn.length;t++){const i=mn[t];if(i&&i.flags&2){if(n&&i.id!==n.uid)continue;mn.splice(t,1),t--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function mc(n){if(go.length){const e=[...new Set(go)].sort((t,i)=>Ha(t)-Ha(i));if(go.length=0,Mr){Mr.push(...e);return}for(Mr=e,oo=0;oo<Mr.length;oo++){const t=Mr[oo];t.flags&4&&(t.flags&=-2),t.flags&8||t(),t.flags&=-2}Mr=null,oo=0}}const Ha=n=>n.id==null?n.flags&2?-1:1/0:n.id;function b0(n){try{for(gi=0;gi<mn.length;gi++){const e=mn[gi];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),il(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;gi<mn.length;gi++){const e=mn[gi];e&&(e.flags&=-2)}gi=-1,mn.length=0,mc(),pc=null,(mn.length||go.length)&&b0()}}let Yt=null,A0=null;function gc(n){const e=Yt;return Yt=n,A0=n&&n.type.__scopeId||null,e}function rl(n,e=Yt,t){if(!e||n._n)return n;const i=(...r)=>{i._d&&Sc(-1);const s=gc(e);let o;try{o=n(...r)}finally{gc(s),i._d&&Sc(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function D2(n,e){if(Yt===null)return n;const t=eu(Yt),i=n.dirs||(n.dirs=[]);for(let r=0;r<e.length;r++){let[s,o,a,l=rt]=e[r];s&&(Re(s)&&(s={mounted:s,updated:s}),s.deep&&Yi(o),i.push({dir:s,instance:t,value:o,oldValue:void 0,arg:a,modifiers:l}))}return n}function _i(n,e,t,i){const r=n.dirs,s=e&&e.dirs;for(let o=0;o<r.length;o++){const a=r[o];s&&(a.oldValue=s[o].value);let l=a.dir[i];l&&(tr(),hi(l,t,8,[n.el,a,n,e]),nr())}}const hM=Symbol("_vte"),w0=n=>n.__isTeleport,ji=Symbol("_leaveCb"),xl=Symbol("_enterCb");function dM(){const n={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Zo(()=>{n.isMounted=!0}),Fs(()=>{n.isUnmounting=!0}),n}const jn=[Function,Array],R0={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:jn,onEnter:jn,onAfterEnter:jn,onEnterCancelled:jn,onBeforeLeave:jn,onLeave:jn,onAfterLeave:jn,onLeaveCancelled:jn,onBeforeAppear:jn,onAppear:jn,onAfterAppear:jn,onAppearCancelled:jn},C0=n=>{const e=n.subTree;return e.component?C0(e.component):e},pM={name:"BaseTransition",props:R0,setup(n,{slots:e}){const t=jr(),i=dM();return()=>{const r=e.default&&I0(e.default(),!0);if(!r||!r.length)return;const s=P0(r),o=Ke(n),{mode:a}=o;if(i.isLeaving)return Eu(s);const l=mp(s);if(!l)return Eu(s);let c=Gf(l,o,i,t,f=>c=f);l.type!==Lt&&Co(l,c);let u=t.subTree&&mp(t.subTree);if(u&&u.type!==Lt&&!oi(u,l)&&C0(t).type!==Lt){let f=Gf(u,o,i,t);if(Co(u,f),a==="out-in"&&l.type!==Lt)return i.isLeaving=!0,f.afterLeave=()=>{i.isLeaving=!1,t.job.flags&8||t.update(),delete f.afterLeave,u=void 0},Eu(s);a==="in-out"&&l.type!==Lt?f.delayLeave=(h,d,_)=>{const m=L0(i,u);m[String(u.key)]=u,h[ji]=()=>{d(),h[ji]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{_(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return s}}};function P0(n){let e=n[0];if(n.length>1){for(const t of n)if(t.type!==Lt){e=t;break}}return e}const mM=pM;
vendor: 21,172 bytes, lines 14-15
14function L0(n,e){const{leavingVNodes:t}=n;let i=t.get(e.type);return i||(i=Object.create(null),t.set(e.type,i)),i}function Gf(n,e,t,i,r){const{appear:s,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:h,onLeave:d,onAfterLeave:_,onLeaveCancelled:m,onBeforeAppear:p,onAppear:g,onAfterAppear:x,onAppearCancelled:v}=e,y=String(n.key),T=L0(t,n),b=(S,M)=>{S&&hi(S,i,9,M)},A=(S,M)=>{const O=M[1];b(S,M),Ce(S)?S.every(I=>I.length<=1)&&O():S.length<=1&&O()},P={mode:o,persisted:a,beforeEnter(S){let M=l;if(!t.isMounted)if(s)M=p||l;else return;S[ji]&&S[ji](!0);const O=T[y];O&&oi(n,O)&&O.el[ji]&&O.el[ji](),b(M,[S])},enter(S){let M=c,O=u,I=f;if(!t.isMounted)if(s)M=g||c,O=x||u,I=v||f;else return;let L=!1;const V=S[xl]=$=>{L||(L=!0,$?b(I,[S]):b(O,[S]),P.delayedLeave&&P.delayedLeave(),S[xl]=void 0)};M?A(M,[S,V]):V()},leave(S,M){const O=String(n.key);if(S[xl]&&S[xl](!0),t.isUnmounting)return M();b(h,[S]);let I=!1;const L=S[ji]=V=>{I||(I=!0,M(),V?b(m,[S]):b(_,[S]),S[ji]=void 0,T[O]===n&&delete T[O])};T[O]=n,d?A(d,[S,L]):L()},clone(S){const M=Gf(S,e,t,i,r);return r&&r(M),M}};return P}function Eu(n){if(sl(n))return n=rr(n),n.children=null,n}function mp(n){if(!sl(n))return w0(n.type)&&n.children?P0(n.children):n;if(n.component)return n.component.subTree;const{shapeFlag:e,children:t}=n;if(t){if(e&16)return t[0];if(e&32&&Re(t.default))return t.default()}}function Co(n,e){n.shapeFlag&6&&n.component?(n.transition=e,Co(n.component.subTree,e)):n.shapeFlag&128?(n.ssContent.transition=e.clone(n.ssContent),n.ssFallback.transition=e.clone(n.ssFallback)):n.transition=e}function I0(n,e=!1,t){let i=[],r=0;for(let s=0;s<n.length;s++){let o=n[s];const a=t==null?o.key:String(t)+String(o.key!=null?o.key:s);o.type===Ut?(o.patchFlag&128&&r++,i=i.concat(I0(o.children,e,a))):(e||o.type!==Lt)&&i.push(a!=null?rr(o,{key:a}):o)}if(r>1)for(let s=0;s<i.length;s++)i[s].patchFlag=-2;return i}function cr(n,e){return Re(n)?Xt({name:n.name},e,{setup:n}):n}function rd(n){n.ids=[n.ids[0]+n.ids[2]+++"-",0,0]}const _c=new WeakMap;function _o(n,e,t,i,r=!1){if(Ce(n)){n.forEach((_,m)=>_o(_,e&&(Ce(e)?e[m]:e),t,i,r));return}if(Or(i)&&!r){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&_o(n,e,t,i.component.subTree);return}const s=i.shapeFlag&4?eu(i.component):i.el,o=r?null:s,{i:a,r:l}=n,c=e&&e.r,u=a.refs===rt?a.refs={}:a.refs,f=a.setupState,h=Ke(f),d=f===rt?q_:_=>Ze(h,_);if(c!=null&&c!==l){if(gp(e),mt(c))u[c]=null,d(c)&&(f[c]=null);else if(It(c)){c.value=null;const _=e;_.k&&(u[_.k]=null)}}if(Re(l))il(l,a,12,[o,u]);else{const _=mt(l),m=It(l);if(_||m){const p=()=>{if(n.f){const g=_?d(l)?f[l]:u[l]:l.value;if(r)Ce(g)&&qh(g,s);else if(Ce(g))g.includes(s)||g.push(s);else if(_)u[l]=[s],d(l)&&(f[l]=u[l]);else{const x=[s];l.value=x,n.k&&(u[n.k]=x)}}else _?(u[l]=o,d(l)&&(f[l]=o)):m&&(l.value=o,n.k&&(u[n.k]=o))};if(o){const g=()=>{p(),_c.delete(n)};g.id=-1,_c.set(n,g),qt(g,t)}else gp(n),p()}}}function gp(n){const e=_c.get(n);e&&(e.flags|=8,_c.delete(n))}let _p=!1;const Hs=()=>{_p||(console.error("Hydration completed but contains mismatches."),_p=!0)},gM=n=>n.namespaceURI.includes("svg")&&n.tagName!=="foreignObject",_M=n=>n.namespaceURI.includes("MathML"),Sl=n=>{if(n.nodeType===1){if(gM(n))return"svg";if(_M(n))return"mathml"}},lo=n=>n.nodeType===8;function vM(n){const{mt:e,p:t,o:{patchProp:i,createText:r,nextSibling:s,parentNode:o,remove:a,insert:l,createComment:c}}=n,u=(v,y)=>{if(!y.hasChildNodes()){t(null,v,y),mc(),y._vnode=v;return}f(y.firstChild,v,null,null,null),mc(),y._vnode=v},f=(v,y,T,b,A,P=!1)=>{P=P||!!y.dynamicChildren;const S=lo(v)&&v.data==="[",M=()=>m(v,y,T,b,A,S),{type:O,ref:I,shapeFlag:L,patchFlag:V}=y;let $=v.nodeType;y.el=v,V===-2&&(P=!1,y.dynamicChildren=null);let G=null;switch(O){case Ts:$!==3?y.children===""?(l(y.el=r(""),o(v),v),G=v):G=M():(v.data!==y.children&&(Hs(),v.data=y.children),G=s(v));break;case Lt:x(v)?(G=s(v),g(y.el=v.content.firstChild,v,T)):$!==8||S?G=M():G=s(v);break;case Ra:if(S&&(v=s(v),$=v.nodeType),$===1||$===3){G=v;const J=!y.children.length;for(let U=0;U<y.staticCount;U++)J&&(y.children+=G.nodeType===1?G.outerHTML:G.data),U===y.staticCount-1&&(y.anchor=G),G=s(G);return S?s(G):G}else M();break;case Ut:S?G=_(v,y,T,b,A,P):G=M();break;default:if(L&1)($!==1||y.type.toLowerCase()!==v.tagName.toLowerCase())&&!x(v)?G=M():G=h(v,y,T,b,A,P);else if(L&6){y.slotScopeIds=A;const J=o(v);if(S?G=p(v):lo(v)&&v.data==="teleport start"?G=p(v,v.data,"teleport end"):G=s(v),e(y,J,null,T,b,Sl(J),P),Or(y)&&!y.type.__asyncResolved){let U;S?(U=ot(Ut),U.anchor=G?G.previousSibling:J.lastChild):U=v.nodeType===3?ud(""):ot("div"),U.el=v,y.component.subTree=U}}else L&64?$!==8?G=M():G=y.type.hydrate(v,y,T,b,A,P,n,d):L&128&&(G=y.type.hydrate(v,y,T,b,Sl(o(v)),A,P,n,f))}return I!=null&&_o(I,null,b,y),G},h=(v,y,T,b,A,P)=>{P=P||!!y.dynamicChildren;const{type:S,props:M,patchFlag:O,shapeFlag:I,dirs:L,transition:V}=y,$=S==="input"||S==="option";if($||O!==-1){L&&_i(y,null,T,"created");let G=!1;if(x(v)){G=ev(null,V)&&T&&T.vnode.props&&T.vnode.props.appear;const U=v.content.firstChild;if(G){const ne=U.getAttribute("class");ne&&(U.$cls=ne),V.beforeEnter(U)}g(U,v,T),y.el=v=U}if(I&16&&!(M&&(M.innerHTML||M.textContent))){let U=d(v.firstChild,y,v,T,b,A,P);for(;U;){Ml(v,1)||Hs();const ne=U;U=U.nextSibling,a(ne)}}else if(I&8){let U=y.children;U[0]===` 15`&&(v.tagName==="PRE"||v.tagName==="TEXTAREA")&&(U=U.slice(1)),v.textContent!==U&&(Ml(v,0)||Hs(),v.textContent=y.children)}if(M){if($||!P||O&48){const U=v.tagName.includes("-");for(const ne in M)($&&(ne.endsWith("value")||ne==="indeterminate")||tl(ne)&&!mo(ne)||ne[0]==="."||U)&&i(v,ne,null,M[ne],void 0,T)}else if(M.onClick)i(v,"onClick",null,M.onClick,void 0,T);else if(O&4&&Ss(M.style))for(const U in M.style)M.style[U]}let J;(J=M&&M.onVnodeBeforeMount)&&Tn(J,T,y),L&&_i(y,null,T,"beforeMount"),((J=M&&M.onVnodeMounted)||L||G)&&av(()=>{J&&Tn(J,T,y),G&&V.enter(v),L&&_i(y,null,T,"mounted")},b)}return v.nextSibling},d=(v,y,T,b,A,P,S)=>{S=S||!!y.dynamicChildren;const M=y.children,O=M.length;for(let I=0;I<O;I++){const L=S?M[I]:M[I]=Un(M[I]),V=L.type===Ts;v?(V&&!S&&I+1<O&&Un(M[I+1]).type===Ts&&(l(r(v.data.slice(L.children.length)),T,s(v)),v.data=L.children),v=f(v,L,b,A,P,S)):V&&!L.children?l(L.el=r(""),T):(Ml(T,1)||Hs(),t(null,L,T,null,b,A,Sl(T),P))}return v},_=(v,y,T,b,A,P)=>{const{slotScopeIds:S}=y;S&&(A=A?A.concat(S):S);const M=o(v),O=d(s(v),y,M,T,b,A,P);return O&&lo(O)&&O.data==="]"?s(y.anchor=O):(Hs(),l(y.anchor=c("]"),M,O),O)},m=(v,y,T,b,A,P)=>{if(Ml(v.parentElement,1)||Hs(),y.el=null,P){const O=p(v);for(;;){const I=s(v);if(I&&I!==O)a(I);else break}}const S=s(v),M=o(v);return a(v),t(null,y,M,S,T,b,Sl(M),A),T&&(T.vnode.el=y.el,Qc(T,y.el)),S},p=(v,y="[",T="]")=>{let b=0;for(;v;)if(v=s(v),v&&lo(v)&&(v.data===y&&b++,v.data===T)){if(b===0)return s(v);b--}return v},g=(v,y,T)=>{const b=y.parentNode;b&&b.replaceChild(v,y);let A=T;for(;A;)A.vnode.el===y&&(A.vnode.el=A.subTree.el=v),A=A.parent},x=v=>v.nodeType===1&&v.tagName==="TEMPLATE";return[u,f]}const vp="data-allow-mismatch",yM={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Ml(n,e){if(e===0||e===1)for(;n&&!n.hasAttribute(vp);)n=n.parentElement;const t=n&&n.getAttribute(vp);if(t==null)return!1;if(t==="")return!0;{const i=t.split(",");return e===0&&i.includes("children")?!0:i.includes(yM[e])}}qc().requestIdleCallback;qc().cancelIdleCallback;function xM(n,e){if(lo(n)&&n.data==="["){let t=1,i=n.nextSibling;for(;i;){if(i.nodeType===1){if(e(i)===!1)break}else if(lo(i))if(i.data==="]"){if(--t===0)break}else i.data==="["&&t++;i=i.nextSibling}}else e(n)}const Or=n=>!!n.type.__asyncLoader;function Ht(n){Re(n)&&(n={loader:n});const{loader:e,loadingComponent:t,errorComponent:i,delay:r=200,hydrate:s,timeout:o,suspensible:a=!0,onError:l}=n;let c=null,u,f=0;const h=()=>(f++,c=null,d()),d=()=>{let _;return c||(_=c=e().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),l)return new Promise((p,g)=>{l(m,()=>p(h()),()=>g(m),f+1)});throw m}).then(m=>_!==c&&c?c:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),u=m,m)))};return cr({name:"AsyncComponentWrapper",__asyncLoader:d,__asyncHydrate(_,m,p){let g=!1;(m.bu||(m.bu=[])).push(()=>g=!0);const x=()=>{g||p()},v=s?()=>{const y=s(x,T=>xM(_,T));y&&(m.bum||(m.bum=[])).push(y)}:x;u?v():d().then(()=>!m.isUnmounted&&v())},get __asyncResolved(){return u},setup(){const _=Kt;if(rd(_),u)return()=>bu(u,_);const m=v=>{c=null,Yo(v,_,13,!i)};if(a&&_.suspense||Lo)return d().then(v=>()=>bu(v,_)).catch(v=>(m(v),()=>i?ot(i,{error:v}):null));const p=zn(!1),g=zn(),x=zn(!!r);return r&&setTimeout(()=>{x.value=!1},r),o!=null&&setTimeout(()=>{if(!p.value&&!g.value){const v=new Error(`Async component timed out after ${o}ms.`);m(v),g.value=v}},o),d().then(()=>{p.value=!0,_.parent&&sl(_.parent.vnode)&&_.parent.update()}).catch(v=>{m(v),g.value=v}),()=>{if(p.value&&u)return bu(u,_);if(g.value&&i)return ot(i,{error:g.value});if(t&&!x.value)return ot(t)}}})}function bu(n,e){const{ref:t,props:i,children:r,ce:s}=e.vnode,o=ot(n,i,r);return o.ref=t,o.ce=s,delete e.vnode.ce,o}const sl=n=>n.type.__isKeepAlive,SM={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(n,{slots:e}){const t=jr(),i=t.ctx;if(!i.renderer)return()=>{const x=e.default&&e.default();return x&&x.length===1?x[0]:x};const r=new Map,s=new Set;let o=null;const a=t.suspense,{renderer:{p:l,m:c,um:u,o:{createElement:f}}}=i,h=f("div");i.activate=(x,v,y,T,b)=>{const A=x.component;c(x,v,y,0,a),l(A.vnode,x,v,y,A,a,T,x.slotScopeIds,b),qt(()=>{A.isDeactivated=!1,A.a&&Ea(A.a);const P=x.props&&x.props.onVnodeMounted;P&&Tn(P,A.parent,x)},a)},i.deactivate=x=>{const v=x.component;yc(v.m),yc(v.a),c(x,h,null,1,a),qt(()=>{v.da&&Ea(v.da);const y=x.props&&x.props.onVnodeUnmounted;y&&Tn(y,v.parent,x),v.isDeactivated=!0},a)};function d(x){Au(x),u(x,t,a,!0)}function _(x){r.forEach((v,y)=>{const T=Jf(v.type);T&&!x(T)&&m(y)})}function m(x){const v=r.get(x);v&&(!o||!oi(v,o))?d(v):o&&Au(o),r.delete(x),s.delete(x)}vo(()=>[n.include,n.exclude],([x,v])=>{x&&_(y=>va(x,y)),v&&_(y=>!va(v,y))},{flush:"post",deep:!0});let p=null;const g=()=>{p!=null&&(xc(t.subTree.type)?qt(()=>{r.set(p,Tl(t.subTree))},t.subTree.suspense):r.set(p,Tl(t.subTree)))};return Zo(g),U0(g),Fs(()=>{r.forEach(x=>{const{subTree:v,suspense:y}=t,T=Tl(v);if(x.type===T.type&&x.key===T.key){Au(T);const b=T.component.da;b&&qt(b,y);return}d(x)})}),()=>{if(p=null,!e.default)return o=null;const x=e.default(),v=x[0];if(x.length>1)return o=null,x;if(!Ps(v)||!(v.shapeFlag&4)&&!(v.shapeFlag&128))return o=null,v;let y=Tl(v);if(y.type===Lt)return o=null,y;const T=y.type,b=Jf(Or(y)?y.type.__asyncResolved||{}:T),{include:A,exclude:P,max:S}=n;if(A&&(!b||!va(A,b))||P&&b&&va(P,b))return y.shapeFlag&=-257,o=y,v;const M=y.key==null?T:y.key,O=r.get(M);return y.el&&(y=rr(y),v.shapeFlag&128&&(v.ssContent=y)),p=M,O?(y.el=O.el,y.component=O.component,y.transition&&Co(y,y.transition),y.shapeFlag|=512,s.delete(M),s.add(M)):(s.add(M),S&&s.size>parseInt(S,10)&&m(s.values().next().value)),y.shapeFlag|=256,o=y,xc(v.type)?v:y}}},MM=SM;function va(n,e){return Ce(n)?n.some(t=>va(t,e)):mt(n)?n.split(",").includes(e):TS(n)?(n.lastIndex=0,n.test(e)):!1}function D0(n,e){O0(n,"a",e)}function N0(n,e){O0(n,"da",e)}function O0(n,e,t=Kt){const i=n.__wdc||(n.__wdc=()=>{let r=t;for(;r;){if(r.isDeactivated)return;r=r.parent}return n()});if(Yc(e,i,t),t){let r=t.parent;for(;r&&r.parent;)sl(r.parent.vnode)&&TM(i,e,t,r),r=r.parent}}function TM(n,e,t,i){const r=Yc(e,n,i,!0);sd(()=>{qh(i[e],r)},t)}function Au(n){n.shapeFlag&=-257,n.shapeFlag&=-513}function Tl(n){return n.shapeFlag&128?n.ssContent:n}function Yc(n,e,t=Kt,i=!1){if(t){const r=t[n]||(t[n]=[]),s=e.__weh||(e.__weh=(...o)=>{tr();const a=Ls(t),l=hi(e,t,n,o);return a(),nr(),l});return i?r.unshift(s):r.push(s),s}}const ur=n=>(e,t=Kt)=>{(!Lo||n==="sp")&&Yc(n,(...i)=>e(...i),t)},EM=ur("bm"),Zo=ur("m"),bM=ur("bu"),U0=ur("u"),Fs=ur("bum"),sd=ur("um"),AM=ur("sp"),wM=ur("rtg"),RM=ur("rtc");function F0(n,e=Kt){Yc("ec",n,e)}const k0="components";function yp(n,e){return H0(k0,n,!0,e)||n}const B0=Symbol.for("v-ndc");function CM(n){return mt(n)?H0(k0,n,!1)||n:n||B0}function H0(n,e,t=!0,i=!1){const r=Yt||Kt;if(r){const s=r.type;{const a=Jf(s,!1);if(a&&(a===e||a===ei(e)||a===jc(ei(e))))return s}const o=xp(r[n]||s[n],e)||xp(r.appContext[n],e);return!o&&i?s:o}}function xp(n,e){return n&&(n[e]||n[ei(e)]||n[jc(ei(e))])}function wu(n,e,t,i){let r;const s=t,o=Ce(n);if(o||mt(n)){const a=o&&Ss(n);let l=!1,c=!1;a&&(l=!Qn(n),c=ir(n),n=Kc(n)),r=new Array(n.length);for(let u=0,f=n.length;u<f;u++)r[u]=e(l?c?hc($t(n[u])):$t(n[u]):n[u],u,void 0,s)}else if(typeof n=="number"){r=new Array(n);for(let a=0;a<n;a++)r[a]=e(a+1,a,void 0,s)}else if(at(n))if(n[Symbol.iterator])r=Array.from(n,(a,l)=>e(a,l,void 0,s));else{const a=Object.keys(n);r=new Array(a.length);for(let l=0,c=a.length;l<c;l++){const u=a[l];r[l]=e(n[u],u,l,s)}}else r=[];return r}function N2(n,e,t={},i,r){if(Yt.ce||Yt.parent&&Or(Yt.parent)&&Yt.parent.ce){const c=Object.keys(t).length>0;return Ft(),Zi(Ut,null,[ot("slot",t,i)],c?-2:64)}let s=n[e];s&&s._c&&(s._d=!1),Ft();const o=s&&z0(s(t)),a=t.key||o&&o.key,l=Zi(Ut,{key:(a&&!lr(a)?a:`_${e}`)+(!o&&i?"_fb":"")},o||[],o&&n._===1?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l}function z0(n){return n.some(e=>Ps(e)?!(e.type===Lt||e.type===Ut&&!z0(e.children)):!0)?n:null}const Wf=n=>n?hv(n)?eu(n):Wf(n.parent):null,wa=Xt(Object.create(null),{$:n=>n,$el:n=>n.vnode.el,$data:n=>n.data,$props:n=>n.props,$attrs:n=>n.attrs,$slots:n=>n.slots,$refs:n=>n.refs,$parent:n=>Wf(n.parent),$root:n=>Wf(n.root),$host:n=>n.ce,$emit:n=>n.emit,$options:n=>G0(n),$forceUpdate:n=>n.f||(n.f=()=>{id(n.update)}),$nextTick:n=>n.n||(n.n=Ro.bind(n.proxy)),$watch:n=>YM.bind(n)}),Ru=(n,e)=>n!==rt&&!n.__isScriptSetup&&Ze(n,e),PM={get({_:n},e){if(e==="__v_skip")return!0;const{ctx:t,setupState:i,data:r,props:s,accessCache:o,type:a,appContext:l}=n;let c;if(e[0]!=="$"){const d=o[e];if(d!==void 0)switch(d){case 1:return i[e];case 2:return r[e];case 4:return t[e];case 3:return s[e]}else{if(Ru(i,e))return o[e]=1,i[e];if(r!==rt&&Ze(r,e))return o[e]=2,r[e];if((c=n.propsOptions[0])&&Ze(c,e))return o[e]=3,s[e];if(t!==rt&&Ze(t,e))return o[e]=4,t[e];Xf&&(o[e]=0)}}const u=wa[e];let f,h;if(u)return e==="$attrs"&&on(n.attrs,"get",""),u(n);if((f=a.__cssModules)&&(f=f[e]))return f;if(t!==rt&&Ze(t,e))return o[e]=4,t[e];if(h=l.config.globalProperties,Ze(h,e))return h[e]},set({_:n},e,t){const{data:i,setupState:r,ctx:s}=n;return Ru(r,e)?(r[e]=t,!0):i!==rt&&Ze(i,e)?(i[e]=t,!0):Ze(n.props,e)||e[0]==="$"&&e.slice(1)in n?!1:(s[e]=t,!0)},has({_:{data:n,setupState:e,accessCache:t,ctx:i,appContext:r,propsOptions:s,type:o}},a){let l,c;return!!(t[a]||n!==rt&&a[0]!=="$"&&Ze(n,a)||Ru(e,a)||(l=s[0])&&Ze(l,a)||Ze(i,a)||Ze(wa,a)||Ze(r.config.globalProperties,a)||(c=o.__cssModules)&&c[a])},defineProperty(n,e,t){return t.get!=null?n._.accessCache[e]=0:Ze(t,"value")&&this.set(n,e,t.value,null),Reflect.defineProperty(n,e,t)}};function O2(){return LM().attrs}function LM(n){const e=jr();return e.setupContext||(e.setupContext=pv(e))}function Sp(n){return Ce(n)?n.reduce((e,t)=>(e[t]=null,e),{}):n}function U2(n){const e=jr();let t=n();return Yf(),$h(t)&&(t=t.catch(i=>{throw Ls(e),i})),[t,()=>Ls(e)]}let Xf=!0;function IM(n){const e=G0(n),t=n.proxy,i=n.ctx;Xf=!1,e.beforeCreate&&Mp(e.beforeCreate,n,"bc");const{data:r,computed:s,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:f,mounted:h,beforeUpdate:d,updated:_,activated:m,deactivated:p,beforeDestroy:g,beforeUnmount:x,destroyed:v,unmounted:y,render:T,renderTracked:b,renderTriggered:A,errorCaptured:P,serverPrefetch:S,expose:M,inheritAttrs:O,components:I,directives:L,filters:V}=e;if(c&&DM(c,i,null),o)for(const J in o){const U=o[J];Re(U)&&(i[J]=U.bind(t))}if(r){const J=r.call(t,t);at(J)&&(n.data=ti(J))}if(Xf=!0,s)for(const J in s){const U=s[J],ne=Re(U)?U.bind(t,t):Re(U.get)?U.get.bind(t,t):Ai,ae=!Re(U)&&Re(U.set)?U.set.bind(t):Ai,me=xt({get:ne,set:ae});Object.defineProperty(i,J,{enumerable:!0,configurable:!0,get:()=>me.value,set:Ee=>me.value=Ee})}if(a)for(const J in a)V0(a[J],i,t,J);if(l){const J=Re(l)?l.call(t):l;Reflect.ownKeys(J).forEach(U=>{Ur(U,J[U])})}u&&Mp(u,n,"c");function G(J,U){Ce(U)?U.forEach(ne=>J(ne.bind(t))):U&&J(U.bind(t))}if(G(EM,f),G(Zo,h),G(bM,d),G(U0,_),G(D0,m),G(N0,p),G(F0,P),G(RM,b),G(wM,A),G(Fs,x),G(sd,y),G(AM,S),Ce(M))if(M.length){const J=n.exposed||(n.exposed={});M.forEach(U=>{Object.defineProperty(J,U,{get:()=>t[U],set:ne=>t[U]=ne,enumerable:!0})})}else n.exposed||(n.exposed={});T&&n.render===Ai&&(n.render=T),O!=null&&(n.inheritAttrs=O),I&&(n.components=I),L&&(n.directives=L),S&&rd(n)}function DM(n,e,t=Ai){Ce(n)&&(n=jf(n));for(const i in n){const r=n[i];let s;at(r)?"default"in r?s=Wt(r.from||i,r.default,!0):s=Wt(r.from||i):s=Wt(r),It(s)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):e[i]=s}}function Mp(n,e,t){hi(Ce(n)?n.map(i=>i.bind(e.proxy)):n.bind(e.proxy),e,t)}function V0(n,e,t,i){let r=i.includes(".")?rv(t,i):()=>t[i];if(mt(n)){const s=e[n];Re(s)&&vo(r,s)}else if(Re(n))vo(r,n.bind(t));else if(at(n))if(Ce(n))n.forEach(s=>V0(s,e,t,i));else{const s=Re(n.handler)?n.handler.bind(t):e[n.handler];Re(s)&&vo(r,s,n)}}function G0(n){const e=n.type,{mixins:t,extends:i}=e,{mixins:r,optionsCache:s,config:{optionMergeStrategies:o}}=n.appContext,a=s.get(e);let l;return a?l=a:!r.length&&!t&&!i?l=e:(l={},r.length&&r.forEach(c=>vc(l,c,o,!0)),vc(l,e,o)),at(e)&&s.set(e,l),l}function vc(n,e,t,i=!1){const{mixins:r,extends:s}=e;s&&vc(n,s,t,!0),r&&r.forEach(o=>vc(n,o,t,!0));for(const o in e)if(!(i&&o==="expose")){const a=NM[o]||t&&t[o];n[o]=a?a(n[o],e[o]):e[o]}return n}const NM={data:Tp,props:Ep,emits:Ep,methods:ya,computed:ya,beforeCreate:fn,created:fn,beforeMount:fn,mounted:fn,beforeUpdate:fn,updated:fn,beforeDestroy:fn,beforeUnmount:fn,destroyed:fn,unmounted:fn,activated:fn,deactivated:fn,errorCaptured:fn,serverPrefetch:fn,components:ya,directives:ya,watch:UM,provide:Tp,inject:OM};function Tp(n,e){return e?n?function(){return Xt(Re(n)?n.call(this,this):n,Re(e)?e.call(this,this):e)}:e:n}function OM(n,e){return ya(jf(n),jf(e))}function jf(n){if(Ce(n)){const e={};for(let t=0;t<n.length;t++)e[n[t]]=n[t];return e}return n}function fn(n,e){return n?[...new Set([].concat(n,e))]:e}function ya(n,e){return n?Xt(Object.create(null),n,e):e}function Ep(n,e){return n?Ce(n)&&Ce(e)?[...new Set([...n,...e])]:Xt(Object.create(null),Sp(n),Sp(e??{})):e}function UM(n,e){if(!n)return e;if(!e)return n;const t=Xt(Object.create(null),n);for(const i in e)t[i]=fn(n[i],e[i]);return t}function W0(){return{app:null,config:{isNativeTag:q_,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let FM=0;function kM(n,e){return function(i,r=null){Re(i)||(i=Xt({},i)),r!=null&&!at(r)&&(r=null);const s=W0(),o=new WeakSet,a=[];let l=!1;const c=s.app={_uid:FM++,_component:i,_props:r,_container:null,_context:s,_instance:null,version:yT,get config(){return s.config},set config(u){},use(u,...f){return o.has(u)||(u&&Re(u.install)?(o.add(u),u.install(c,...f)):Re(u)&&(o.add(u),u(c,...f))),c},mixin(u){return s.mixins.includes(u)||s.mixins.push(u),c},component(u,f){return f?(s.components[u]=f,c):s.components[u]},directive(u,f){return f?(s.directives[u]=f,c):s.directives[u]},mount(u,f,h){if(!l){const d=c._ceVNode||ot(i,r);return d.appContext=s,h===!0?h="svg":h===!1&&(h=void 0),f&&e?e(d,u):n(d,u,h),l=!0,c._container=u,u.__vue_app__=c,eu(d.component)}},onUnmount(u){a.push(u)},unmount(){l&&(hi(a,c._instance,16),n(null,c._container),delete c._container.__vue_app__)},provide(u,f){return s.provides[u]=f,c},runWithContext(u){const f=Ms;Ms=c;try{return u()}finally{Ms=f}}};return c}}let Ms=null;function Ur(n,e){if(Kt){let t=Kt.provides;const i=Kt.parent&&Kt.parent.provides;i===t&&(t=Kt.provides=Object.create(i)),t[n]=e}}function Wt(n,e,t=!1){const i=jr();if(i||Ms){let r=Ms?Ms._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(r&&n in r)return r[n];if(arguments.length>1)return t&&Re(e)?e.call(i&&i.proxy):e}}function Zc(){return!!(jr()||Ms)}const X0={},j0=()=>Object.create(X0),q0=n=>Object.getPrototypeOf(n)===X0;function BM(n,e,t,i=!1){const r={},s=j0();n.propsDefaults=Object.create(null),$0(n,e,r,s);for(const o in n.propsOptions[0])o in r||(r[o]=void 0);t?n.props=i?r:Ti(r):n.type.props?n.props=r:n.props=s,n.attrs=s}function HM(n,e,t,i){const{props:r,attrs:s,vnode:{patchFlag:o}}=n,a=Ke(r),[l]=n.propsOptions;let c=!1;if((i||o>0)&&!(o&16)){if(o&8){const u=n.vnode.dynamicProps;for(let f=0;f<u.length;f++){let h=u[f];if(Jc(n.emitsOptions,h))continue;const d=e[h];if(l)if(Ze(s,h))d!==s[h]&&(s[h]=d,c=!0);else{const _=ei(h);r[_]=qf(l,a,_,d,n,!1)}else d!==s[h]&&(s[h]=d,c=!0)}}}else{$0(n,e,r,s)&&(c=!0);let u;for(const f in a)(!e||!Ze(e,f)&&((u=Os(f))===f||!Ze(e,u)))&&(l?t&&(t[f]!==void 0||t[u]!==void 0)&&(r[f]=qf(l,a,f,void 0,n,!0)):delete r[f]);
vendor: 5,552 bytes, line 15
15if(s!==a)for(const f in s)(!e||!Ze(e,f))&&(delete s[f],c=!0)}c&&Ki(n.attrs,"set","")}function $0(n,e,t,i){const[r,s]=n.propsOptions;let o=!1,a;if(e)for(let l in e){if(mo(l))continue;const c=e[l];let u;r&&Ze(r,u=ei(l))?!s||!s.includes(u)?t[u]=c:(a||(a={}))[u]=c:Jc(n.emitsOptions,l)||(!(l in i)||c!==i[l])&&(i[l]=c,o=!0)}if(s){const l=Ke(t),c=a||rt;for(let u=0;u<s.length;u++){const f=s[u];t[f]=qf(r,l,f,c[f],n,!Ze(c,f))}}return o}function qf(n,e,t,i,r,s){const o=n[t];if(o!=null){const a=Ze(o,"default");if(a&&i===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&Re(l)){const{propsDefaults:c}=r;if(t in c)i=c[t];else{const u=Ls(r);i=c[t]=l.call(null,e),u()}}else i=l;r.ce&&r.ce._setProp(t,i)}o[0]&&(s&&!a?i=!1:o[1]&&(i===""||i===Os(t))&&(i=!0))}return i}const zM=new WeakMap;function K0(n,e,t=!1){const i=t?zM:e.propsCache,r=i.get(n);if(r)return r;const s=n.props,o={},a=[];let l=!1;if(!Re(n)){const u=f=>{l=!0;const[h,d]=K0(f,e,!0);Xt(o,h),d&&a.push(...d)};!t&&e.mixins.length&&e.mixins.forEach(u),n.extends&&u(n.extends),n.mixins&&n.mixins.forEach(u)}if(!s&&!l)return at(n)&&i.set(n,ho),ho;if(Ce(s))for(let u=0;u<s.length;u++){const f=ei(s[u]);bp(f)&&(o[f]=rt)}else if(s)for(const u in s){const f=ei(u);if(bp(f)){const h=s[u],d=o[f]=Ce(h)||Re(h)?{type:h}:Xt({},h),_=d.type;let m=!1,p=!0;if(Ce(_))for(let g=0;g<_.length;++g){const x=_[g],v=Re(x)&&x.name;if(v==="Boolean"){m=!0;break}else v==="String"&&(p=!1)}else m=Re(_)&&_.name==="Boolean";d[0]=m,d[1]=p,(m||Ze(d,"default"))&&a.push(f)}}const c=[o,a];return at(n)&&i.set(n,c),c}function bp(n){return n[0]!=="$"&&!mo(n)}const od=n=>n==="_"||n==="_ctx"||n==="$stable",ad=n=>Ce(n)?n.map(Un):[Un(n)],VM=(n,e,t)=>{if(e._n)return e;const i=rl((...r)=>ad(e(...r)),t);return i._c=!1,i},Y0=(n,e,t)=>{const i=n._ctx;for(const r in n){if(od(r))continue;const s=n[r];if(Re(s))e[r]=VM(r,s,i);else if(s!=null){const o=ad(s);e[r]=()=>o}}},Z0=(n,e)=>{const t=ad(e);n.slots.default=()=>t},J0=(n,e,t)=>{for(const i in e)(t||!od(i))&&(n[i]=e[i])},GM=(n,e,t)=>{const i=n.slots=j0();if(n.vnode.shapeFlag&32){const r=e._;r?(J0(i,e,t),t&&Z_(i,"_",r,!0)):Y0(e,i)}else e&&Z0(n,e)},WM=(n,e,t)=>{const{vnode:i,slots:r}=n;let s=!0,o=rt;if(i.shapeFlag&32){const a=e._;a?t&&a===1?s=!1:J0(r,e,t):(s=!e.$stable,Y0(e,r)),o=e}else e&&(Z0(n,e),o={default:1});if(s)for(const a in r)!od(a)&&o[a]==null&&delete r[a]},qt=av;function XM(n){return Q0(n)}function jM(n){return Q0(n,vM)}function Q0(n,e){const t=qc();t.__VUE__=!0;const{insert:i,remove:r,patchProp:s,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:f,nextSibling:h,setScopeId:d=Ai,insertStaticContent:_}=n,m=(R,D,k,te=null,w=null,E=null,F=void 0,z=null,j=!!D.dynamicChildren)=>{if(R===D)return;R&&!oi(R,D)&&(te=W(R),Ee(R,w,E,!0),R=null),D.patchFlag===-2&&(j=!1,D.dynamicChildren=null);const{type:B,ref:ce,shapeFlag:K}=D;switch(B){case Ts:p(R,D,k,te);break;case Lt:g(R,D,k,te);break;case Ra:R==null&&x(D,k,te,F);break;case Ut:I(R,D,k,te,w,E,F,z,j);break;default:K&1?T(R,D,k,te,w,E,F,z,j):K&6?L(R,D,k,te,w,E,F,z,j):(K&64||K&128)&&B.process(R,D,k,te,w,E,F,z,j,he)}ce!=null&&w?_o(ce,R&&R.ref,E,D||R,!D):ce==null&&R&&R.ref!=null&&_o(R.ref,null,E,R,!0)},p=(R,D,k,te)=>{if(R==null)i(D.el=a(D.children),k,te);else{const w=D.el=R.el;D.children!==R.children&&c(w,D.children)}},g=(R,D,k,te)=>{R==null?i(D.el=l(D.children||""),k,te):D.el=R.el},x=(R,D,k,te)=>{[R.el,R.anchor]=_(R.children,D,k,te,R.el,R.anchor)},v=({el:R,anchor:D},k,te)=>{let w;for(;R&&R!==D;)w=h(R),i(R,k,te),R=w;i(D,k,te)},y=({el:R,anchor:D})=>{let k;for(;R&&R!==D;)k=h(R),r(R),R=k;r(D)},T=(R,D,k,te,w,E,F,z,j)=>{D.type==="svg"?F="svg":D.type==="math"&&(F="mathml"),R==null?b(D,k,te,w,E,F,z,j):S(R,D,w,E,F,z,j)},b=(R,D,k,te,w,E,F,z)=>{let j,B;const{props:ce,shapeFlag:K,transition:se,dirs:ue}=R;if(j=R.el=o(R.type,E,ce&&ce.is,ce),K&8?u(j,R.children):K&16&&P(R.children,j,null,te,w,Cu(R,E),F,z),ue&&_i(R,null,te,"created"),A(j,R,R.scopeId,F,te),ce){for(const fe in ce)fe!=="value"&&!mo(fe)&&s(j,fe,null,ce[fe],E,te);"value"in ce&&s(j,"value",null,ce.value,E),(B=ce.onVnodeBeforeMount)&&Tn(B,te,R)}ue&&_i(R,null,te,"beforeMount");const re=ev(w,se);re&&se.beforeEnter(j),i(j,D,k),((B=ce&&ce.onVnodeMounted)||re||ue)&&qt(()=>{B&&Tn(B,te,R),re&&se.enter(j),ue&&_i(R,null,te,"mounted")},w)},A=(R,D,k,te,w)=>{if(k&&d(R,k),te)for(let E=0;E<te.length;E++)d(R,te[E]);if(w){let E=w.subTree;if(D===E||xc(E.type)&&(E.ssContent===D||E.ssFallback===D)){const F=w.vnode;A(R,F,F.scopeId,F.slotScopeIds,w.parent)}}},P=(R,D,k,te,w,E,F,z,j=0)=>{for(let B=j;B<R.length;B++){const ce=R[B]=z?Tr(R[B]):Un(R[B]);m(null,ce,D,k,te,w,E,F,z)}},S=(R,D,k,te,w,E,F)=>{const z=D.el=R.el;let{patchFlag:j,dynamicChildren:B,dirs:ce}=D;j|=R.patchFlag&16;const K=R.props||rt,se=D.props||rt;let ue;if(k&&Zr(k,!1),(ue=se.onVnodeBeforeUpdate)&&Tn(ue,k,D,R),ce&&_i(D,R,k,"beforeUpdate"),k&&Zr(k,!0),(K.innerHTML&&se.innerHTML==null||K.textContent&&se.textContent==null)&&u(z,""),B?M(R.dynamicChildren,B,z,k,te,Cu(D,w),E):F||U(R,D,z,null,k,te,Cu(D,w),E,!1),j>0){if(j&16)O(z,K,se,k,w);else if(j&2&&K.class!==se.class&&s(z,"class",null,se.class,w),j&4&&s(z,"style",K.style,se.style,w),j&8){const re=D.dynamicProps;for(let fe=0;fe<re.length;fe++){const ye=re[fe],xe=K[ye],_e=se[ye];(_e!==xe||ye==="value")&&s(z,ye,xe,_e,w,k)}}j&1&&R.children!==D.children&&u(z,D.children)}else!F&&B==null&&O(z,K,se,k,w);((ue=se.onVnodeUpdated)||ce)&&qt(()=>{ue&&Tn(ue,k,D,R),ce&&_i(D,R,k,"updated")},te)},M=(R,D,k,te,w,E,F)=>{for(let z=0;z<D.length;z++){const j=R[z],B=D[z],ce=j.el&&(j.type===Ut||!oi(j,B)||j.shapeFlag&198)?f(j.el):k;
vendor: 21,193 bytes, line 15
15m(j,B,ce,null,te,w,E,F,!0)}},O=(R,D,k,te,w)=>{if(D!==k){if(D!==rt)for(const E in D)!mo(E)&&!(E in k)&&s(R,E,D[E],null,w,te);for(const E in k){if(mo(E))continue;const F=k[E],z=D[E];F!==z&&E!=="value"&&s(R,E,z,F,w,te)}"value"in k&&s(R,"value",D.value,k.value,w)}},I=(R,D,k,te,w,E,F,z,j)=>{const B=D.el=R?R.el:a(""),ce=D.anchor=R?R.anchor:a("");let{patchFlag:K,dynamicChildren:se,slotScopeIds:ue}=D;ue&&(z=z?z.concat(ue):ue),R==null?(i(B,k,te),i(ce,k,te),P(D.children||[],k,ce,w,E,F,z,j)):K>0&&K&64&&se&&R.dynamicChildren?(M(R.dynamicChildren,se,k,w,E,F,z),(D.key!=null||w&&D===w.subTree)&&tv(R,D,!0)):U(R,D,k,ce,w,E,F,z,j)},L=(R,D,k,te,w,E,F,z,j)=>{D.slotScopeIds=z,R==null?D.shapeFlag&512?w.ctx.activate(D,k,te,F,j):V(D,k,te,w,E,F,j):$(R,D,j)},V=(R,D,k,te,w,E,F)=>{const z=R.component=pT(R,te,w);if(sl(R)&&(z.ctx.renderer=he),mT(z,!1,F),z.asyncDep){if(w&&w.registerDep(z,G,F),!R.el){const j=z.subTree=ot(Lt);g(null,j,D,k),R.placeholder=j.el}}else G(z,R,D,k,w,E,F)},$=(R,D,k)=>{const te=D.component=R.component;if(iT(R,D,k))if(te.asyncDep&&!te.asyncResolved){J(te,D,k);return}else te.next=D,te.update();else D.el=R.el,te.vnode=D},G=(R,D,k,te,w,E,F)=>{const z=()=>{if(R.isMounted){let{next:K,bu:se,u:ue,parent:re,vnode:fe}=R;{const Le=nv(R);if(Le){K&&(K.el=fe.el,J(R,K,F)),Le.asyncDep.then(()=>{R.isUnmounted||z()});return}}let ye=K,xe;Zr(R,!1),K?(K.el=fe.el,J(R,K,F)):K=fe,se&&Ea(se),(xe=K.props&&K.props.onVnodeBeforeUpdate)&&Tn(xe,re,K,fe),Zr(R,!0);const _e=Pu(R),Ie=R.subTree;R.subTree=_e,m(Ie,_e,f(Ie.el),W(Ie),R,w,E),K.el=_e.el,ye===null&&Qc(R,_e.el),ue&&qt(ue,w),(xe=K.props&&K.props.onVnodeUpdated)&&qt(()=>Tn(xe,re,K,fe),w)}else{let K;const{el:se,props:ue}=D,{bm:re,m:fe,parent:ye,root:xe,type:_e}=R,Ie=Or(D);if(Zr(R,!1),re&&Ea(re),!Ie&&(K=ue&&ue.onVnodeBeforeMount)&&Tn(K,ye,D),Zr(R,!0),se&&Te){const Le=()=>{R.subTree=Pu(R),Te(se,R.subTree,R,w,null)};Ie&&_e.__asyncHydrate?_e.__asyncHydrate(se,R,Le):Le()}else{xe.ce&&xe.ce._def.shadowRoot!==!1&&xe.ce._injectChildStyle(_e);const Le=R.subTree=Pu(R);m(null,Le,k,te,R,w,E),D.el=Le.el}if(fe&&qt(fe,w),!Ie&&(K=ue&&ue.onVnodeMounted)){const Le=D;qt(()=>Tn(K,ye,Le),w)}(D.shapeFlag&256||ye&&Or(ye.vnode)&&ye.vnode.shapeFlag&256)&&R.a&&qt(R.a,w),R.isMounted=!0,D=k=te=null}};R.scope.on();const j=R.effect=new s0(z);R.scope.off();const B=R.update=j.run.bind(j),ce=R.job=j.runIfDirty.bind(j);ce.i=R,ce.id=R.uid,j.scheduler=()=>id(ce),Zr(R,!0),B()},J=(R,D,k)=>{D.component=R;const te=R.vnode.props;R.vnode=D,R.next=null,HM(R,D.props,te,k),WM(R,D.children,k),tr(),pp(R),nr()},U=(R,D,k,te,w,E,F,z,j=!1)=>{const B=R&&R.children,ce=R?R.shapeFlag:0,K=D.children,{patchFlag:se,shapeFlag:ue}=D;if(se>0){if(se&128){ae(B,K,k,te,w,E,F,z,j);return}else if(se&256){ne(B,K,k,te,w,E,F,z,j);return}}ue&8?(ce&16&&ve(B,w,E),K!==B&&u(k,K)):ce&16?ue&16?ae(B,K,k,te,w,E,F,z,j):ve(B,w,E,!0):(ce&8&&u(k,""),ue&16&&P(K,k,te,w,E,F,z,j))},ne=(R,D,k,te,w,E,F,z,j)=>{R=R||ho,D=D||ho;const B=R.length,ce=D.length,K=Math.min(B,ce);let se;for(se=0;se<K;se++){const ue=D[se]=j?Tr(D[se]):Un(D[se]);m(R[se],ue,k,null,w,E,F,z,j)}B>ce?ve(R,w,E,!0,!1,K):P(D,k,te,w,E,F,z,j,K)},ae=(R,D,k,te,w,E,F,z,j)=>{let B=0;const ce=D.length;let K=R.length-1,se=ce-1;for(;B<=K&&B<=se;){const ue=R[B],re=D[B]=j?Tr(D[B]):Un(D[B]);if(oi(ue,re))m(ue,re,k,null,w,E,F,z,j);else break;B++}for(;B<=K&&B<=se;){const ue=R[K],re=D[se]=j?Tr(D[se]):Un(D[se]);if(oi(ue,re))m(ue,re,k,null,w,E,F,z,j);else break;K--,se--}if(B>K){if(B<=se){const ue=se+1,re=ue<ce?D[ue].el:te;for(;B<=se;)m(null,D[B]=j?Tr(D[B]):Un(D[B]),k,re,w,E,F,z,j),B++}}else if(B>se)for(;B<=K;)Ee(R[B],w,E,!0),B++;else{const ue=B,re=B,fe=new Map;for(B=re;B<=se;B++){const We=D[B]=j?Tr(D[B]):Un(D[B]);We.key!=null&&fe.set(We.key,B)}let ye,xe=0;const _e=se-re+1;let Ie=!1,Le=0;const je=new Array(_e);for(B=0;B<_e;B++)je[B]=0;for(B=ue;B<=K;B++){const We=R[B];if(xe>=_e){Ee(We,w,E,!0);continue}let Me;if(We.key!=null)Me=fe.get(We.key);else for(ye=re;ye<=se;ye++)if(je[ye-re]===0&&oi(We,D[ye])){Me=ye;break}Me===void 0?Ee(We,w,E,!0):(je[Me-re]=B+1,Me>=Le?Le=Me:Ie=!0,m(We,D[Me],k,null,w,E,F,z,j),xe++)}const $e=Ie?qM(je):ho;for(ye=$e.length-1,B=_e-1;B>=0;B--){const We=re+B,Me=D[We],N=D[We+1],de=We+1<ce?N.el||N.placeholder:te;je[B]===0?m(null,Me,k,de,w,E,F,z,j):Ie&&(ye<0||B!==$e[ye]?me(Me,k,de,2):ye--)}}},me=(R,D,k,te,w=null)=>{const{el:E,type:F,transition:z,children:j,shapeFlag:B}=R;if(B&6){me(R.component.subTree,D,k,te);return}if(B&128){R.suspense.move(D,k,te);return}if(B&64){F.move(R,D,k,he);return}if(F===Ut){i(E,D,k);for(let K=0;K<j.length;K++)me(j[K],D,k,te);i(R.anchor,D,k);return}if(F===Ra){v(R,D,k);return}if(te!==2&&B&1&&z)if(te===0)z.beforeEnter(E),i(E,D,k),qt(()=>z.enter(E),w);else{const{leave:K,delayLeave:se,afterLeave:ue}=z,re=()=>{R.ctx.isUnmounted?r(E):i(E,D,k)},fe=()=>{E._isLeaving&&E[ji](!0),K(E,()=>{re(),ue&&ue()})};se?se(E,re,fe):fe()}else i(E,D,k)},Ee=(R,D,k,te=!1,w=!1)=>{const{type:E,props:F,ref:z,children:j,dynamicChildren:B,shapeFlag:ce,patchFlag:K,dirs:se,cacheIndex:ue}=R;if(K===-2&&(w=!1),z!=null&&(tr(),_o(z,null,k,R,!0),nr()),ue!=null&&(D.renderCache[ue]=void 0),ce&256){D.ctx.deactivate(R);return}const re=ce&1&&se,fe=!Or(R);let ye;if(fe&&(ye=F&&F.onVnodeBeforeUnmount)&&Tn(ye,D,R),ce&6)le(R.component,k,te);else{if(ce&128){R.suspense.unmount(k,te);return}re&&_i(R,null,D,"beforeUnmount"),ce&64?R.type.remove(R,D,k,he,te):B&&!B.hasOnce&&(E!==Ut||K>0&&K&64)?ve(B,D,k,!1,!0):(E===Ut&&K&384||!w&&ce&16)&&ve(j,D,k),te&&Ue(R)}(fe&&(ye=F&&F.onVnodeUnmounted)||re)&&qt(()=>{ye&&Tn(ye,D,R),re&&_i(R,null,D,"unmounted")},k)},Ue=R=>{const{type:D,el:k,anchor:te,transition:w}=R;if(D===Ut){Q(k,te);return}if(D===Ra){y(R);return}const E=()=>{r(k),w&&!w.persisted&&w.afterLeave&&w.afterLeave()};if(R.shapeFlag&1&&w&&!w.persisted){const{leave:F,delayLeave:z}=w,j=()=>F(k,E);z?z(R.el,E,j):j()}else E()},Q=(R,D)=>{let k;for(;R!==D;)k=h(R),r(R),R=k;r(D)},le=(R,D,k)=>{const{bum:te,scope:w,job:E,subTree:F,um:z,m:j,a:B}=R;yc(j),yc(B),te&&Ea(te),w.stop(),E&&(E.flags|=8,Ee(F,R,D,k)),z&&qt(z,D),qt(()=>{R.isUnmounted=!0},D)},ve=(R,D,k,te=!1,w=!1,E=0)=>{for(let F=E;F<R.length;F++)Ee(R[F],D,k,te,w)},W=R=>{if(R.shapeFlag&6)return W(R.component.subTree);if(R.shapeFlag&128)return R.suspense.next();const D=h(R.anchor||R.el),k=D&&D[hM];return k?h(k):D};let oe=!1;const ie=(R,D,k)=>{R==null?D._vnode&&Ee(D._vnode,null,null,!0):m(D._vnode||null,R,D,null,null,null,k),D._vnode=R,oe||(oe=!0,pp(),mc(),oe=!1)},he={p:m,um:Ee,m:me,r:Ue,mt:V,mc:P,pc:U,pbc:M,n:W,o:n};let H,Te;return e&&([H,Te]=e(he)),{render:ie,hydrate:H,createApp:kM(ie,H)}}function Cu({type:n,props:e},t){return t==="svg"&&n==="foreignObject"||t==="mathml"&&n==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:t}function Zr({effect:n,job:e},t){t?(n.flags|=32,e.flags|=4):(n.flags&=-33,e.flags&=-5)}function ev(n,e){return(!n||n&&!n.pendingBranch)&&e&&!e.persisted}function tv(n,e,t=!1){const i=n.children,r=e.children;if(Ce(i)&&Ce(r))for(let s=0;s<i.length;s++){const o=i[s];let a=r[s];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=r[s]=Tr(r[s]),a.el=o.el),!t&&a.patchFlag!==-2&&tv(o,a)),a.type===Ts&&a.patchFlag!==-1&&(a.el=o.el),a.type===Lt&&!a.el&&(a.el=o.el)}}function qM(n){const e=n.slice(),t=[0];let i,r,s,o,a;const l=n.length;for(i=0;i<l;i++){const c=n[i];if(c!==0){if(r=t[t.length-1],n[r]<c){e[i]=r,t.push(i);continue}for(s=0,o=t.length-1;s<o;)a=s+o>>1,n[t[a]]<c?s=a+1:o=a;c<n[t[s]]&&(s>0&&(e[i]=t[s-1]),t[s]=i)}}for(s=t.length,o=t[s-1];s-- >0;)t[s]=o,o=e[o];return t}function nv(n){const e=n.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:nv(e)}function yc(n){if(n)for(let e=0;e<n.length;e++)n[e].flags|=8}const $M=Symbol.for("v-scx"),KM=()=>Wt($M);function iv(n,e){return ld(n,null,e)}function vo(n,e,t){return ld(n,e,t)}function ld(n,e,t=rt){const{immediate:i,deep:r,flush:s,once:o}=t,a=Xt({},t),l=e&&i||!e&&s!=="post";let c;if(Lo){if(s==="sync"){const d=KM();c=d.__watcherHandles||(d.__watcherHandles=[])}else if(!l){const d=()=>{};return d.stop=Ai,d.resume=Ai,d.pause=Ai,d}}const u=Kt;a.call=(d,_,m)=>hi(d,u,_,m);let f=!1;s==="post"?a.scheduler=d=>{qt(d,u&&u.suspense)}:s!=="sync"&&(f=!0,a.scheduler=(d,_)=>{_?d():id(d)}),a.augmentJob=d=>{e&&(d.flags|=4),f&&(d.flags|=2,u&&(d.id=u.uid,d.i=u))};const h=cM(n,e,a);return Lo&&(c?c.push(h):l&&h()),h}function YM(n,e,t){const i=this.proxy,r=mt(n)?n.includes(".")?rv(i,n):()=>i[n]:n.bind(i,i);let s;Re(e)?s=e:(s=e.handler,t=e);const o=Ls(this),a=ld(r,s.bind(i),t);return o(),a}function rv(n,e){const t=e.split(".");return()=>{let i=n;for(let r=0;r<t.length&&i;r++)i=i[t[r]];return i}}const ZM=(n,e)=>e==="modelValue"||e==="model-value"?n.modelModifiers:n[`${e}Modifiers`]||n[`${ei(e)}Modifiers`]||n[`${Os(e)}Modifiers`];function JM(n,e,...t){if(n.isUnmounted)return;const i=n.vnode.props||rt;let r=t;const s=e.startsWith("update:"),o=s&&ZM(i,e.slice(7));o&&(o.trim&&(r=t.map(u=>mt(u)?u.trim():u)),o.number&&(r=t.map(wS)));let a,l=i[a=yu(e)]||i[a=yu(ei(e))];!l&&s&&(l=i[a=yu(Os(e))]),l&&hi(l,n,6,r);const c=i[a+"Once"];if(c){if(!n.emitted)n.emitted={};else if(n.emitted[a])return;n.emitted[a]=!0,hi(c,n,6,r)}}const QM=new WeakMap;function sv(n,e,t=!1){const i=t?QM:e.emitsCache,r=i.get(n);if(r!==void 0)return r;const s=n.emits;let o={},a=!1;if(!Re(n)){const l=c=>{const u=sv(c,e,!0);u&&(a=!0,Xt(o,u))};!t&&e.mixins.length&&e.mixins.forEach(l),n.extends&&l(n.extends),n.mixins&&n.mixins.forEach(l)}return!s&&!a?(at(n)&&i.set(n,null),null):(Ce(s)?s.forEach(l=>o[l]=null):Xt(o,s),at(n)&&i.set(n,o),o)}function Jc(n,e){return!n||!tl(e)?!1:(e=e.slice(2).replace(/Once$/,""),Ze(n,e[0].toLowerCase()+e.slice(1))||Ze(n,Os(e))||Ze(n,e))}function Pu(n){const{type:e,vnode:t,proxy:i,withProxy:r,propsOptions:[s],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:f,data:h,setupState:d,ctx:_,inheritAttrs:m}=n,p=gc(n);let g,x;try{if(t.shapeFlag&4){const y=r||i,T=y;g=Un(c.call(T,y,u,f,d,h,_)),x=a}else{const y=e;g=Un(y.length>1?y(f,{attrs:a,slots:o,emit:l}):y(f,null)),x=e.props?a:tT(a)}}catch(y){Ca.length=0,Yo(y,n,1),g=ot(Lt)}let v=g;if(x&&m!==!1){const y=Object.keys(x),{shapeFlag:T}=v;y.length&&T&7&&(s&&y.some(jh)&&(x=nT(x,s)),v=rr(v,x,!1,!0))}return t.dirs&&(v=rr(v,null,!1,!0),v.dirs=v.dirs?v.dirs.concat(t.dirs):t.dirs),t.transition&&Co(v,t.transition),g=v,gc(p),g}function eT(n,e=!0){let t;for(let i=0;i<n.length;i++){const r=n[i];if(Ps(r)){if(r.type!==Lt||r.children==="v-if"){if(t)return;t=r}}else return}return t}const tT=n=>{let e;for(const t in n)(t==="class"||t==="style"||tl(t))&&((e||(e={}))[t]=n[t]);return e},nT=(n,e)=>{const t={};for(const i in n)(!jh(i)||!(i.slice(9)in e))&&(t[i]=n[i]);return t};function iT(n,e,t){const{props:i,children:r,component:s}=n,{props:o,children:a,patchFlag:l}=e,c=s.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&l>=0){if(l&1024)return!0;if(l&16)return i?Ap(i,o,c):!!o;if(l&8){const u=e.dynamicProps;for(let f=0;f<u.length;f++){const h=u[f];if(o[h]!==i[h]&&!Jc(c,h))return!0}}}else return(r||a)&&(!a||!a.$stable)?!0:i===o?!1:i?o?Ap(i,o,c):!0:!!o;return!1}function Ap(n,e,t){const i=Object.keys(e);if(i.length!==Object.keys(n).length)return!0;for(let r=0;r<i.length;r++){const s=i[r];if(e[s]!==n[s]&&!Jc(t,s))return!0}return!1}function Qc({vnode:n,parent:e},t){for(;e;){const i=e.subTree;if(i.suspense&&i.suspense.activeBranch===n&&(i.el=n.el),i===n)(n=e.vnode).el=t,e=e.parent;else break}}const xc=n=>n.__isSuspense;let $f=0;const rT={name:"Suspense",__isSuspense:!0,process(n,e,t,i,r,s,o,a,l,c){if(n==null)sT(e,t,i,r,s,o,a,l,c);else{if(s&&s.deps>0&&!n.suspense.isInFallback){e.suspense=n.suspense,e.suspense.vnode=e,e.el=n.el;return}oT(n,e,t,i,r,o,a,l,c)}},hydrate:aT,normalize:lT},cd=rT;function za(n,e){const t=n.props&&n.props[e];Re(t)&&t()}function sT(n,e,t,i,r,s,o,a,l){const{p:c,o:{createElement:u}}=l,f=u("div"),h=n.suspense=ov(n,r,i,e,f,t,s,o,a,l);c(null,h.pendingBranch=n.ssContent,f,null,i,h,s,o),h.deps>0?(za(n,"onPending"),za(n,"onFallback"),c(null,n.ssFallback,e,t,i,null,s,o),yo(h,n.ssFallback)):h.resolve(!1,!0)}function oT(n,e,t,i,r,s,o,a,{p:l,um:c,o:{createElement:u}}){const f=e.suspense=n.suspense;f.vnode=e,e.el=n.el;const h=e.ssContent,d=e.ssFallback,{activeBranch:_,pendingBranch:m,isInFallback:p,isHydrating:g}=f;if(m)f.pendingBranch=h,oi(m,h)?(l(m,h,f.hiddenContainer,null,r,f,s,o,a),f.deps<=0?f.resolve():p&&(g||(l(_,d,t,i,r,null,s,o,a),yo(f,d)))):(f.pendingId=$f++,g?(f.isHydrating=!1,f.activeBranch=m):c(m,r,f),f.deps=0,f.effects.length=0,f.hiddenContainer=u("div"),p?(l(null,h,f.hiddenContainer,null,r,f,s,o,a),f.deps<=0?f.resolve():(l(_,d,t,i,r,null,s,o,a),yo(f,d))):_&&oi(_,h)?(l(_,h,t,i,r,f,s,o,a),f.resolve(!0)):(l(null,h,f.hiddenContainer,null,r,f,s,o,a),f.deps<=0&&f.resolve()));else if(_&&oi(_,h))l(_,h,t,i,r,f,s,o,a),yo(f,h);else if(za(e,"onPending"),f.pendingBranch=h,h.shapeFlag&512?f.pendingId=h.component.suspenseId:f.pendingId=$f++,l(null,h,f.hiddenContainer,null,r,f,s,o,a),f.deps<=0)f.resolve();else{const{timeout:x,pendingId:v}=f;x>0?setTimeout(()=>{f.pendingId===v&&f.fallback(d)},x):x===0&&f.fallback(d)}}function ov(n,e,t,i,r,s,o,a,l,c,u=!1){const{p:f,m:h,um:d,n:_,o:{parentNode:m,remove:p}}=c;let g;const x=cT(n);x&&e&&e.pendingBranch&&(g=e.pendingId,e.deps++);const v=n.props?J_(n.props.timeout):void 0,y=s,T={vnode:n,parent:e,parentComponent:t,namespace:o,container:i,hiddenContainer:r,deps:0,pendingId:$f++,timeout:typeof v=="number"?v:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(b=!1,A=!1){const{vnode:P,activeBranch:S,pendingBranch:M,pendingId:O,effects:I,parentComponent:L,container:V}=T;let $=!1;T.isHydrating?T.isHydrating=!1:b||($=S&&M.transition&&M.transition.mode==="out-in",$&&(S.transition.afterLeave=()=>{O===T.pendingId&&(h(M,V,s===y?_(S):s,0),Vf(I))}),S&&(m(S.el)===V&&(s=_(S)),d(S,L,T,!0)),$||h(M,V,s,0)),yo(T,M),T.pendingBranch=null,T.isInFallback=!1;let G=T.parent,J=!1;for(;G;){if(G.pendingBranch){G.effects.push(...I),J=!0;break}G=G.parent}!J&&!$&&Vf(I),T.effects=[],x&&e&&e.pendingBranch&&g===e.pendingId&&(e.deps--,e.deps===0&&!A&&e.resolve()),za(P,"onResolve")},fallback(b){if(!T.pendingBranch)return;const{vnode:A,activeBranch:P,parentComponent:S,container:M,namespace:O}=T;za(A,"onFallback");const I=_(P),L=()=>{T.isInFallback&&(f(null,b,M,I,S,null,O,a,l),yo(T,b))},V=b.transition&&b.transition.mode==="out-in";V&&(P.transition.afterLeave=L),T.isInFallback=!0,d(P,S,null,!0),V||L()},move(b,A,P){T.activeBranch&&h(T.activeBranch,b,A,P),T.container=b},next(){return T.activeBranch&&_(T.activeBranch)},registerDep(b,A,P){const S=!!T.pendingBranch;S&&T.deps++;const M=b.vnode.el;b.asyncDep.catch(O=>{Yo(O,b,0)}).then(O=>{if(b.isUnmounted||T.isUnmounted||T.pendingId!==b.suspenseId)return;b.asyncResolved=!0;const{vnode:I}=b;Zf(b,O),M&&(I.el=M);const L=!M&&b.subTree.el;A(b,I,m(M||b.subTree.el),M?null:_(b.subTree),T,o,P),L&&p(L),Qc(b,I.el),S&&--T.deps===0&&T.resolve()})},unmount(b,A){T.isUnmounted=!0,T.activeBranch&&d(T.activeBranch,t,b,A),T.pendingBranch&&d(T.pendingBranch,t,b,A)}};return T}function aT(n,e,t,i,r,s,o,a,l){const c=e.suspense=ov(e,i,t,n.parentNode,document.createElement("div"),null,r,s,o,a,!0),u=l(n,c.pendingBranch=e.ssContent,t,c,s,o);return c.deps===0&&c.resolve(!1,!0),u}function lT(n){const{shapeFlag:e,children:t}=n,i=e&32;n.ssContent=wp(i?t.default:t),n.ssFallback=i?wp(t.fallback):ot(Lt)}function wp(n){let e;if(Re(n)){const t=Po&&n._c;t&&(n._d=!1,Ft()),n=n(),t&&(n._d=!0,e=En,lv())}return Ce(n)&&(n=eT(n)),n=Un(n),e&&!n.dynamicChildren&&(n.dynamicChildren=e.filter(t=>t!==n)),n}function av(n,e){e&&e.pendingBranch?Ce(n)?e.effects.push(...n):e.effects.push(n):Vf(n)}function yo(n,e){n.activeBranch=e;const{vnode:t,parentComponent:i}=n;let r=e.el;for(;!r&&e.component;)e=e.component.subTree,r=e.el;t.el=r,i&&i.subTree===t&&(i.vnode.el=r,Qc(i,r))}function cT(n){const e=n.props&&n.props.suspensible;return e!=null&&e!==!1}const Ut=Symbol.for("v-fgt"),Ts=Symbol.for("v-txt"),Lt=Symbol.for("v-cmt"),Ra=Symbol.for("v-stc"),Ca=[];let En=null;function Ft(n=!1){Ca.push(En=n?null:[])}function lv(){Ca.pop(),En=Ca[Ca.length-1]||null}let Po=1;function Sc(n,e=!1){Po+=n,n<0&&En&&e&&(En.hasOnce=!0)}function cv(n){return n.dynamicChildren=Po>0?En||ho:null,lv(),Po>0&&En&&En.push(n),n}function qi(n,e,t,i,r,s){return cv(Ot(n,e,t,i,r,s,!0))}function Zi(n,e,t,i,r){return cv(ot(n,e,t,i,r,!0))}function Ps(n){return n?n.__v_isVNode===!0:!1}function oi(n,e){return n.type===e.type&&n.key===e.key}const uv=({key:n})=>n??null,nc=({ref:n,ref_key:e,ref_for:t})=>(typeof n=="number"&&(n=""+n),n!=null?mt(n)||It(n)||Re(n)?{i:Yt,r:n,k:e,f:!!t}:n:null);function Ot(n,e=null,t=null,i=0,r=null,s=n===Ut?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:n,props:e,key:e&&uv(e),ref:e&&nc(e),scopeId:A0,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:i,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Yt};return a?(fd(l,t),s&128&&n.normalize(l)):t&&(l.shapeFlag|=mt(t)?8:16),Po>0&&!o&&En&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&En.push(l),l}const ot=uT;function uT(n,e=null,t=null,i=0,r=null,s=!1){if((!n||n===B0)&&(n=Lt),Ps(n)){const a=rr(n,e,!0);return t&&fd(a,t),Po>0&&!s&&En&&(a.shapeFlag&6?En[En.indexOf(n)]=a:En.push(a)),a.patchFlag=-2,a}if(vT(n)&&(n=n.__vccOpts),e){e=fT(e);let{class:a,style:l}=e;a&&!mt(a)&&(e.class=Us(a)),at(l)&&(nd(l)&&!Ce(l)&&(l=Xt({},l)),e.style=$c(l))}const o=mt(n)?1:xc(n)?128:w0(n)?64:at(n)?4:Re(n)?2:0;return Ot(n,e,t,i,r,o,s,!0)}function fT(n){return n?nd(n)||q0(n)?Xt({},n):n:null}function rr(n,e,t=!1,i=!1){const{props:r,ref:s,patchFlag:o,children:a,transition:l}=n,c=e?fv(r||{},e):r,u={__v_isVNode:!0,__v_skip:!0,type:n.type,props:c,key:c&&uv(c),ref:e&&e.ref?t&&s?Ce(s)?s.concat(nc(e)):[s,nc(e)]:nc(e):s,scopeId:n.scopeId,slotScopeIds:n.slotScopeIds,children:a,target:n.target,targetStart:n.targetStart,targetAnchor:n.targetAnchor,staticCount:n.staticCount,shapeFlag:n.shapeFlag,patchFlag:e&&n.type!==Ut?o===-1?16:o|16:o,dynamicProps:n.dynamicProps,dynamicChildren:n.dynamicChildren,appContext:n.appContext,dirs:n.dirs,transition:l,component:n.component,suspense:n.suspense,ssContent:n.ssContent&&rr(n.ssContent),ssFallback:n.ssFallback&&rr(n.ssFallback),placeholder:n.placeholder,el:n.el,anchor:n.anchor,ctx:n.ctx,ce:n.ce};return l&&i&&Co(u,l.clone(u)),u}function ud(n=" ",e=0){return ot(Ts,null,n,e)}function F2(n,e){const t=ot(Ra,null,n);return t.staticCount=e,t}function k2(n="",e=!1){return e?(Ft(),Zi(Lt,null,n)):ot(Lt,null,n)}function Un(n){return n==null||typeof n=="boolean"?ot(Lt):Ce(n)?ot(Ut,null,n.slice()):Ps(n)?Tr(n):ot(Ts,null,String(n))}function Tr(n){return n.el===null&&n.patchFlag!==-1||n.memo?n:rr(n)}function fd(n,e){let t=0;const{shapeFlag:i}=n;if(e==null)e=null;else if(Ce(e))t=16;else if(typeof e=="object")if(i&65){const r=e.default;r&&(r._c&&(r._d=!1),fd(n,r()),r._c&&(r._d=!0));return}else{t=32;const r=e._;!r&&!q0(e)?e._ctx=Yt:r===3&&Yt&&(Yt.slots._===1?e._=1:(e._=2,n.patchFlag|=1024))}else Re(e)?(e={default:e,_ctx:Yt},t=32):(e=String(e),i&64?(t=16,e=[ud(e)]):t=8);n.children=e,n.shapeFlag|=t}function fv(...n){const e={};for(let t=0;t<n.length;t++){const i=n[t];for(const r in i)if(r==="class")e.class!==i.class&&(e.class=Us([e.class,i.class]));else if(r==="style")e.style=$c([e.style,i.style]);else if(tl(r)){const s=e[r],o=i[r];o&&s!==o&&!(Ce(s)&&s.includes(o))&&(e[r]=s?[].concat(s,o):o)}else r!==""&&(e[r]=i[r])}return e}function Tn(n,e,t,i=null){hi(n,e,7,[t,i])}const hT=W0();let dT=0;function pT(n,e,t){const i=n.type,r=(e?e.appContext:n.appContext)||hT,s={uid:dT++,vnode:n,type:i,parent:e,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new i0(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(r.provides),ids:e?e.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:K0(i,r),emitsOptions:sv(i,r),emit:null,emitted:null,propsDefaults:rt,inheritAttrs:i.inheritAttrs,ctx:rt,data:rt,props:rt,attrs:rt,slots:rt,refs:rt,setupState:rt,setupContext:null,suspense:t,suspenseId:t?t.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return s.ctx={_:s},s.root=e?e.root:s,s.emit=JM.bind(null,s),n.ce&&n.ce(s),s}let Kt=null;const jr=()=>Kt||Yt;let Mc,Kf;{const n=qc(),e=(t,i)=>{let r;return(r=n[t])||(r=n[t]=[]),r.push(i),s=>{r.length>1?r.forEach(o=>o(s)):r[0](s)}};Mc=e("__VUE_INSTANCE_SETTERS__",t=>Kt=t),Kf=e("__VUE_SSR_SETTERS__",t=>Lo=t)}const Ls=n=>{const e=Kt;return Mc(n),n.scope.on(),()=>{n.scope.off(),Mc(e)}},Yf=()=>{Kt&&Kt.scope.off(),Mc(null)};function hv(n){return n.vnode.shapeFlag&4}let Lo=!1;function mT(n,e=!1,t=!1){e&&Kf(e);const{props:i,children:r}=n.vnode,s=hv(n);BM(n,i,s,e),GM(n,r,t||e);const o=s?gT(n,e):void 0;return e&&Kf(!1),o}function gT(n,e){const t=n.type;n.accessCache=Object.create(null),n.proxy=new Proxy(n.ctx,PM);const{setup:i}=t;if(i){tr();const r=n.setupContext=i.length>1?pv(n):null,s=Ls(n),o=il(i,n,0,[n.props,r]),a=$h(o);if(nr(),s(),(a||n.sp)&&!Or(n)&&rd(n),a){if(o.then(Yf,Yf),e)return o.then(l=>{Zf(n,l)}
vendor: 1,130 bytes, lines 15-18
15).catch(l=>{Yo(l,n,0)});n.asyncDep=o}else Zf(n,o)}else dv(n)}function Zf(n,e,t){Re(e)?n.type.__ssrInlineRender?n.ssrRender=e:n.render=e:at(e)&&(n.setupState=S0(e)),dv(n)}function dv(n,e,t){const i=n.type;n.render||(n.render=i.render||Ai);{const r=Ls(n);tr();try{IM(n)}finally{nr(),r()}}}const _T={get(n,e){return on(n,"get",""),n[e]}};function pv(n){const e=t=>{n.exposed=t||{}};return{attrs:new Proxy(n.attrs,_T),slots:n.slots,emit:n.emit,expose:e}}function eu(n){return n.exposed?n.exposeProxy||(n.exposeProxy=new Proxy(S0(eM(n.exposed)),{get(e,t){if(t in e)return e[t];if(t in wa)return wa[t](n)},has(e,t){return t in e||t in wa}})):n.proxy}function Jf(n,e=!0){return Re(n)?n.displayName||n.name:n.name||e&&n.__name}function vT(n){return Re(n)&&"__vccOpts"in n}const xt=(n,e)=>aM(n,e,Lo);function Gt(n,e,t){try{Sc(-1);const i=arguments.length;return i===2?at(e)&&!Ce(e)?Ps(e)?ot(n,null,[e]):ot(n,e):ot(n,null,e):(i>3?t=Array.prototype.slice.call(arguments,2):i===3&&Ps(t)&&(t=[t]),ot(n,e,t))}finally{Sc(1)}}const yT="3.5.22";/** 16* @vue/runtime-dom v3.5.22 17* (c) 2018-present Yuxi (Evan) You and Vue contributors 18* @license MIT
19**/let Qf;const Rp=typeof window<"u"&&window.trustedTypes;if(Rp)try{Qf=Rp.createPolicy("vue",{createHTML:n=>n})}catch{}const mv=Qf?n=>Qf.createHTML(n):n=>n,xT="http://www.w3.org/2000/svg",ST="http://www.w3.org/1998/Math/MathML",Wi=typeof document<"u"?document:null,Cp=Wi&&Wi.createElement("template"),MT={insert:(n,e,t)=>{e.insertBefore(n,t||null)},remove:n=>{const e=n.parentNode;e&&e.removeChild(n)},createElement:(n,e,t,i)=>{const r=e==="svg"?Wi.createElementNS(xT,n):e==="mathml"?Wi.createElementNS(ST,n):t?Wi.createElement(n,{is:t}):Wi.createElement(n);return n==="select"&&i&&i.multiple!=null&&r.setAttribute("multiple",i.multiple),r},createText:n=>Wi.createTextNode(n),createComment:n=>Wi.createComment(n),setText:(n,e)=>{n.nodeValue=e},setElementText:(n,e)=>{n.textContent=e},parentNode:n=>n.parentNode,nextSibling:n=>n.nextSibling,querySelector:n=>Wi.querySelector(n),setScopeId(n,e){n.setAttribute(e,"")},insertStaticContent(n,e,t,i,r,s){const o=t?t.previousSibling:e.lastChild;if(r&&(r===s||r.nextSibling))for(;e.insertBefore(r.cloneNode(!0),t),!(r===s||!(r=r.nextSibling)););else{Cp.innerHTML=mv(i==="svg"?`<svg>${n}</svg>`:i==="mathml"?`<math>${n}</math>`:n);const a=Cp.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,t)}return[o?o.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},dr="transition",sa="animation",Va=Symbol("_vtc"),gv={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},TT=Xt({},R0,gv),ET=n=>(n.displayName="Transition",n.props=TT,n),bT=ET((n,{slots:e})=>Gt(mM,AT(n),e)),Jr=(n,e=[])=>{Ce(n)?n.forEach(t=>t(...e)):n&&n(...e)},Pp=n=>n?Ce(n)?n.some(e=>e.length>1):n.length>1:!1;function AT(n){const e={};for(const I in n)I in gv||(e[I]=n[I]);if(n.css===!1)return e;const{name:t="v",type:i,duration:r,enterFromClass:s=`${t}-enter-from`,enterActiveClass:o=`${t}-enter-active`,enterToClass:a=`${t}-enter-to`,appearFromClass:l=s,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:f=`${t}-leave-from`,leaveActiveClass:h=`${t}-leave-active`,leaveToClass:d=`${t}-leave-to`}=n,_=wT(r),m=_&&_[0],p=_&&_[1],{onBeforeEnter:g,onEnter:x,onEnterCancelled:v,onLeave:y,onLeaveCancelled:T,onBeforeAppear:b=g,onAppear:A=x,onAppearCancelled:P=v}=e,S=(I,L,V,$)=>{I._enterCancelled=$,Qr(I,L?u:a),Qr(I,L?c:o),V&&V()},M=(I,L)=>{I._isLeaving=!1,Qr(I,f),Qr(I,d),Qr(I,h),L&&L()},O=I=>(L,V)=>{const $=I?A:x,G=()=>S(L,I,V);Jr($,[L,G]),Lp(()=>{Qr(L,I?l:s),Oi(L,I?u:a),Pp($)||Ip(L,i,m,G)})};return Xt(e,{onBeforeEnter(I){Jr(g,[I]),Oi(I,s),Oi(I,o)},onBeforeAppear(I){Jr(b,[I]),Oi(I,l),Oi(I,c)},onEnter:O(!1),onAppear:O(!0),onLeave(I,L){I._isLeaving=!0;const V=()=>M(I,L);Oi(I,f),I._enterCancelled?(Oi(I,h),Op(I)):(Op(I),Oi(I,h)),Lp(()=>{I._isLeaving&&(Qr(I,f),Oi(I,d),Pp(y)||Ip(I,i,p,V))}),Jr(y,[I,V])},onEnterCancelled(I){S(I,!1,void 0,!0),Jr(v,[I])},onAppearCancelled(I){S(I,!0,void 0,!0),Jr(P,[I])},onLeaveCancelled(I){M(I),Jr(T,[I])}})}function wT(n){if(n==null)return null;if(at(n))return[Lu(n.enter),Lu(n.leave)];{const e=Lu(n);return[e,e]}}function Lu(n){return J_(n)}function Oi(n,e){e.split(/\s+/).forEach(t=>t&&n.classList.add(t)),(n[Va]||(n[Va]=new Set)).add(e)}function Qr(n,e){e.split(/\s+/).forEach(i=>i&&n.classList.remove(i));const t=n[Va];t&&(t.delete(e),t.size||(n[Va]=void 0))}function Lp(n){requestAnimationFrame(()=>{requestAnimationFrame(n)})}let RT=0;function Ip(n,e,t,i){const r=n._endId=++RT,s=()=>{r===n._endId&&i()};if(t!=null)return setTimeout(s,t);const{type:o,timeout:a,propCount:l}=CT(n,e);if(!o)return i();const c=o+"end";let u=0;const f=()=>{n.removeEventListener(c,h),s()},h=d=>{d.target===n&&++u>=l&&f()};setTimeout(()=>{u<l&&f()},a+1),n.addEventListener(c,h)}function CT(n,e){const t=window.getComputedStyle(n),i=_=>(t[_]||"").split(", "),r=i(`${dr}Delay`),s=i(`${dr}Duration`),o=Dp(r,s),a=i(`${sa}Delay`),l=i(`${sa}Duration`),c=Dp(a,l);let u=null,f=0,h=0;e===dr?o>0&&(u=dr,f=o,h=s.length):e===sa?c>0&&(u=sa,f=c,h=l.length):(f=Math.max(o,c),u=f>0?o>c?dr:sa:null,h=u?u===dr?s.length:l.length:0);const d=u===dr&&/\b(?:transform|all)(?:,|$)/.test(i(`${dr}Property`).toString());return{type:u,timeout:f,propCount:h,hasTransform:d}}function Dp(n,e){for(;n.length<e.length;)n=n.concat(n);return Math.max(...e.map((t,i)=>Np(t)+Np(n[i])))}function Np(n){return n==="auto"?0:Number(n.slice(0,-1).replace(",","."))*1e3}function Op(n){return(n?n.ownerDocument:document).body.offsetHeight}function PT(n,e,t){const i=n[Va];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?n.removeAttribute("class"):t?n.setAttribute("class",e):n.className=e}const Tc=Symbol("_vod"),_v=Symbol("_vsh"),B2={name:"show",beforeMount(n,{value:e},{transition:t}){n[Tc]=n.style.display==="none"?"":n.style.display,t&&e?t.beforeEnter(n):oa(n,e)},mounted(n,{value:e},{transition:t}){t&&e&&t.enter(n)},updated(n,{value:e,oldValue:t},{transition:i}){!e!=!t&&(i?e?(i.beforeEnter(n),oa(n,!0),i.enter(n)):i.leave(n,()=>
vendor: 5,602 bytes, line 19
19{oa(n,!1)}):oa(n,e))},beforeUnmount(n,{value:e}){oa(n,e)}};function oa(n,e){n.style.display=e?n[Tc]:"none",n[_v]=!e}const LT=Symbol(""),IT=/(?:^|;)\s*display\s*:/;function DT(n,e,t){const i=n.style,r=mt(t);let s=!1;if(t&&!r){if(e)if(mt(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();t[a]==null&&ic(i,a,"")}else for(const o in e)t[o]==null&&ic(i,o,"");for(const o in t)o==="display"&&(s=!0),ic(i,o,t[o])}else if(r){if(e!==t){const o=i[LT];o&&(t+=";"+o),i.cssText=t,s=IT.test(t)}}else e&&n.removeAttribute("style");Tc in n&&(n[Tc]=s?i.display:"",n[_v]&&(i.display="none"))}const Up=/\s*!important$/;function ic(n,e,t){if(Ce(t))t.forEach(i=>ic(n,e,i));else if(t==null&&(t=""),e.startsWith("--"))n.setProperty(e,t);else{const i=NT(n,e);Up.test(t)?n.setProperty(Os(i),t.replace(Up,""),"important"):n[i]=t}}const Fp=["Webkit","Moz","ms"],Iu={};function NT(n,e){const t=Iu[e];if(t)return t;let i=ei(e);if(i!=="filter"&&i in n)return Iu[e]=i;i=jc(i);for(let r=0;r<Fp.length;r++){const s=Fp[r]+i;if(s in n)return Iu[e]=s}return e}const kp="http://www.w3.org/1999/xlink";function Bp(n,e,t,i,r,s=DS(e)){i&&e.startsWith("xlink:")?t==null?n.removeAttributeNS(kp,e.slice(6,e.length)):n.setAttributeNS(kp,e,t):t==null||s&&!Q_(t)?n.removeAttribute(e):n.setAttribute(e,s?"":lr(t)?String(t):t)}function Hp(n,e,t,i,r){if(e==="innerHTML"||e==="textContent"){t!=null&&(n[e]=e==="innerHTML"?mv(t):t);return}const s=n.tagName;if(e==="value"&&s!=="PROGRESS"&&!s.includes("-")){const a=s==="OPTION"?n.getAttribute("value")||"":n.value,l=t==null?n.type==="checkbox"?"on":"":String(t);(a!==l||!("_value"in n))&&(n.value=l),t==null&&n.removeAttribute(e),n._value=t;return}let o=!1;if(t===""||t==null){const a=typeof n[e];a==="boolean"?t=Q_(t):t==null&&a==="string"?(t="",o=!0):a==="number"&&(t=0,o=!0)}try{n[e]=t}catch{}o&&n.removeAttribute(r||e)}function OT(n,e,t,i){n.addEventListener(e,t,i)}function UT(n,e,t,i){n.removeEventListener(e,t,i)}const zp=Symbol("_vei");function FT(n,e,t,i,r=null){const s=n[zp]||(n[zp]={}),o=s[e];if(i&&o)o.value=i;else{const[a,l]=kT(e);if(i){const c=s[e]=zT(i,r);OT(n,a,c,l)}else o&&(UT(n,a,o,l),s[e]=void 0)}}const Vp=/(?:Once|Passive|Capture)$/;function kT(n){let e;if(Vp.test(n)){e={};let i;for(;i=n.match(Vp);)n=n.slice(0,n.length-i[0].length),e[i[0].toLowerCase()]=!0}return[n[2]===":"?n.slice(3):Os(n.slice(2)),e]}let Du=0;const BT=Promise.resolve(),HT=()=>Du||(BT.then(()=>Du=0),Du=Date.now());function zT(n,e){const t=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=t.attached)return;hi(VT(i,t.value),e,5,[i])};return t.value=n,t.attached=HT(),t}function VT(n,e){if(Ce(e)){const t=n.stopImmediatePropagation;return n.stopImmediatePropagation=()=>{t.call(n),n._stopped=!0},e.map(i=>r=>!r._stopped&&i&&i(r))}else return e}const Gp=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)>96&&n.charCodeAt(2)<123,GT=(n,e,t,i,r,s)=>{const o=r==="svg";e==="class"?PT(n,i,o):e==="style"?DT(n,t,i):tl(e)?jh(e)||FT(n,e,t,i,s):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):WT(n,e,i,o))?(Hp(n,e,i),!n.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&Bp(n,e,i,o,s,e!=="value")):n._isVueCE&&(/[A-Z]/.test(e)||!mt(i))?Hp(n,ei(e),i,s,e):(e==="true-value"?n._trueValue=i:e==="false-value"&&(n._falseValue=i),Bp(n,e,i,o))};function WT(n,e,t,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in n&&Gp(e)&&Re(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="form"||e==="list"&&n.tagName==="INPUT"||e==="type"&&n.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const r=n.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Gp(e)&&mt(t)?!1:e in n}const XT=["ctrl","shift","alt","meta"],jT={stop:n=>n.stopPropagation(),prevent:n=>n.preventDefault(),self:n=>n.target!==n.currentTarget,ctrl:n=>!n.ctrlKey,shift:n=>!n.shiftKey,alt:n=>!n.altKey,meta:n=>!n.metaKey,left:n=>"button"in n&&n.button!==0,middle:n=>"button"in n&&n.button!==1,right:n=>"button"in n&&n.button!==2,exact:(n,e)=>XT.some(t=>n[`${t}Key`]&&!e.includes(t))},H2=(n,e)=>{const t=n._withMods||(n._withMods={}),i=e.join(".");return t[i]||(t[i]=((r,...s)=>{for(let o=0;o<e.length;o++){const a=jT[e[o]];if(a&&a(r,e))return}return n(r,...s)}))},vv=Xt({patchProp:GT},MT);let Pa,Wp=!1;function qT(){return Pa||(Pa=XM(vv))}function $T(){return Pa=Wp?Pa:jM(vv),Wp=!0,Pa}const KT=((...n)=>{const e=qT().createApp(...n),{mount:t}=e;return e.mount=i=>{const r=xv(i);if(!r)return;const s=e._component;!Re(s)&&!s.render&&!s.template&&(s.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=t(r,!1,yv(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},e}),YT=((...n)=>{const e=$T().createApp(...n),{mount:t}=e;return e.mount=i=>{const r=xv(i);if(r)return t(r,!0,yv(r))},e});function yv(n){if(n instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&n instanceof MathMLElement)return"mathml"}function xv(n){return mt(n)?document.querySelector(n):n}const ZT=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,JT=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,QT=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function eE(n,e){if(n==="__proto__"||n==="constructor"&&e&&typeof e=="object"&&"prototype"in e){tE(n);return}return e}function tE(n){console.warn(`[destr] Dropping "${n}" key to prevent prototype pollution.`)}function Ec(n,e={}
19){if(typeof n!="string")return n;if(n[0]==='"'&&n[n.length-1]==='"'&&n.indexOf("\\")===-1)return n.slice(1,-1);const t=n.trim();if(t.length<=9)switch(t.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!QT.test(n)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return n}try{if(ZT.test(n)||JT.test(n)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(n,eE)}return JSON.parse(n)}catch(i){if(e.strict)throw i;return n}}const nE=/#/g,iE=/&/g,rE=/\//g,sE=/=/g,hd=/\+/g,oE=/%5e/gi,aE=/%60/gi,lE=/%7c/gi,cE=/%20/gi;function uE(n){return encodeURI(""+n).replace(lE,"|")}function eh(n){return uE(typeof n=="string"?n:JSON.stringify(n)).replace(hd,"%2B").replace(cE,"+").replace(nE,"%23").replace(iE,"%26").replace(aE,"`").replace(oE,"^").replace(rE,"%2F")}function Nu(n){return eh(n).replace(sE,"%3D")}function bc(n=""){try{return decodeURIComponent(""+n)}catch{return""+n}}function fE(n){return bc(n.replace(hd," "))}function hE(n){return bc(n.replace(hd," "))}function dd(n=""){const e=Object.create(null);n[0]==="?"&&(n=n.slice(1));for(const t of n.split("&")){const i=t.match(/([^=]+)=?(.*)/)||[];if(i.length<2)continue;const r=fE(i[1]);if(r==="__proto__"||r==="constructor")continue;const s=hE(i[2]||"");e[r]===void 0?e[r]=s:Array.isArray(e[r])?e[r].push(s):e[r]=[e[r],s]}return e}function dE(n,e){return(typeof e=="number"||typeof e=="boolean")&&(e=String(e)),e?Array.isArray(e)?e.map(t=>`${Nu(n)}=${eh(t)}`).join("&"):`${Nu(n)}=${eh(e)}`:Nu(n)}function pE(n){return Object.keys(n).filter(e=>n[e]!==void 0).map(e=>dE(e,n[e])).filter(Boolean).join("&")}const mE=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,Sv=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,gE=/^([/\\]\s*){2,}[^/\\]/,_E=/^[\s\0]*(blob|data|javascript|vbscript):$/i,vE=/\/$|\/\?|\/#/,yE=/^\.?\//;function Ci(n,e={}){return typeof e=="boolean"&&(e={acceptRelative:e}),e.strict?mE.test(n):Sv.test(n)||(e.acceptRelative?gE.test(n):!1)}function xE(n){return!!n&&_E.test(n)}function th(n="",e){return e?vE.test(n):n.endsWith("/")}function Io(n="",e){if(!e)return(th(n)?n.slice(0,-1):n)||"/";if(!th(n,!0))return n||"/";let t=n,i="";const r=n.indexOf("#");r!==-1&&(t=n.slice(0,r),i=n.slice(r));const[s,...o]=t.split("?");return((s.endsWith("/")?s.slice(0,-1):s)||"/")+(o.length>0?`?${o.join("?")}`:"")+i}function Mv(n="",e){if(!e)return n.endsWith("/")?n:n+"/";if(th(n,!0))return n||"/";let t=n,i="";const r=n.indexOf("#");if(r!==-1&&(t=n.slice(0,r),i=n.slice(r),!t))return i;const[s,...o]=t.split("?");return s+"/"+(o.length>0?`?${o.join("?")}`:"")+i}function SE(n=""){return n.startsWith("/")}function z2(n=""){return SE(n)?n:"/"+n}function ME(n,e){if(Ev(e)||Ci(n))return n;const t=Io(e);return n.startsWith(t)?n:tu(t,n)}function Xp(n,e){if(Ev(e))return n;const t=Io(e);if(!n.startsWith(t))return n;const i=n.slice(t.length);return i[0]==="/"?i:"/"+i}function Tv(n,e){const t=wv(n),i={...dd(t.search),...e};return t.search=pE(i),wE(t)}function Ev(n){return!n||n==="/"}function TE(n){return n&&n!=="/"}function tu(n,...e){let t=n||"";for(const i of e.filter(r=>TE(r)))if(t){const r=i.replace(yE,"");t=Mv(t)+r}else t=i;return t}function bv(...n){const e=/\/(?!\/)/,t=n.filter(Boolean),i=[];let r=0;for(const o of t)if(!(!o||o==="/")){for(const[a,l]of o.split(e).entries())if(!(!l||l===".")){if(l===".."){if(i.length===1&&Ci(i[0]))continue;i.pop(),r--;continue}if(a===1&&i[i.length-1]?.endsWith(":/")){i[i.length-1]+="/"+l;continue}i.push(l),r++}}let s=i.join("/");return r>=0?t[0]?.startsWith("/")&&!s.startsWith("/")?s="/"+s:t[0]?.startsWith("./")&&!s.startsWith("./")&&(s="./"+s):s="../".repeat(-1*r)+s,t[t.length-1]?.endsWith("/")&&!s.endsWith("/")&&(s+="/"),s}function EE(n){return bE(n,"https://")}function bE(n,e){let t=n.match(Sv);return t||(t=n.match(/^\/{2,}/)),t?e+n.slice(t[0].length):e+n}function AE(n,e){return bc(Io(n))===bc(Io(e))}const Av=Symbol.for("ufo:protocolRelative");function wv(n="",e){const t=n.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(t){const[,f,h=""]=t;return{protocol:f.toLowerCase(),pathname:h,href:f+h,auth:"",host:"",search:"",hash:""}}if(!Ci(n,{acceptRelative:!0}))return jp(n);const[,i="",r,s=""]=n.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,o="",a=""]=s.match(/([^#/?]*)(.*)?/)||[];i==="file:"&&(a=a.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:l,search:c,hash:u}=jp(a);return{protocol:i.toLowerCase(),auth:r?r.slice(0,Math.max(0,r.length-1)):"",host:o,pathname:l,search:c,hash:u,[Av]:!i}}function jp(n=""){const[e="",t="",i=""]=(n.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:e,search:t,hash:i}}function wE(n){const e=n.pathname||"",t=n.search?(n.search.startsWith("?")?""
19:"?")+n.search:"",i=n.hash||"",r=n.auth?n.auth+"@":"",s=n.host||"";return(n.protocol||n[Av]?(n.protocol||"")+"//":"")+r+s+e+t+i}class RE extends Error{constructor(e,t){super(e,t),this.name="FetchError",t?.cause&&!this.cause&&(this.cause=t.cause)}}function CE(n){const e=n.error?.message||n.error?.toString()||"",t=n.request?.method||n.options?.method||"GET",i=n.request?.url||String(n.request)||"/",r=`[${t}] ${JSON.stringify(i)}`,s=n.response?`${n.response.status} ${n.response.statusText}`:"<no response>",o=`${r}: ${s}${e?` ${e}`:""}`,a=new RE(o,n.error?{cause:n.error}:void 0);for(const l of["request","options","response"])Object.defineProperty(a,l,{get(){return n[l]}});for(const[l,c]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(a,l,{get(){return n.response&&n.response[c]}});return a}const PE=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function qp(n="GET"){return PE.has(n.toUpperCase())}function LE(n){if(n===void 0)return!1;const e=typeof n;return e==="string"||e==="number"||e==="boolean"||e===null?!0:e!=="object"?!1:Array.isArray(n)?!0:n.buffer||n instanceof FormData||n instanceof URLSearchParams?!1:n.constructor&&n.constructor.name==="Object"||typeof n.toJSON=="function"}const IE=new Set(["image/svg","application/xml","application/xhtml","application/html"]),DE=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function NE(n=""){if(!n)return"json";const e=n.split(";").shift()||"";return DE.test(e)?"json":e==="text/event-stream"?"stream":IE.has(e)||e.startsWith("text/")?"text":"blob"}function OE(n,e,t,i){const r=UE(e?.headers??n?.headers,t?.headers,i);let s;return(t?.query||t?.params||e?.params||e?.query)&&(s={...t?.params,...t?.query,...e?.params,...e?.query}),{...t,...e,query:s,params:s,headers:r}}function UE(n,e,t){if(!e)return new t(n);const i=new t(e);if(n)for(const[r,s]of Symbol.iterator in n||Array.isArray(n)?n:new t(n))i.set(r,s);return i}async function El(n,e){if(e)if(Array.isArray(e))for(const t of e)await t(n);else await e(n)}const FE=new Set([408,409,425,429,500,502,503,504]),kE=new Set([101,204,205,304]);function Rv(n={}){const{fetch:e=globalThis.fetch,Headers:t=globalThis.Headers,AbortController:i=globalThis.AbortController}=n;async function r(a){const l=a.error&&a.error.name==="AbortError"&&!a.options.timeout||!1;if(a.options.retry!==!1&&!l){let u;typeof a.options.retry=="number"?u=a.options.retry:u=qp(a.options.method)?0:1;const f=a.response&&a.response.status||500;if(u>0&&(Array.isArray(a.options.retryStatusCodes)?a.options.retryStatusCodes.includes(f):FE.has(f))){const h=typeof a.options.retryDelay=="function"?a.options.retryDelay(a):a.options.retryDelay||0;return h>0&&await new Promise(d=>setTimeout(d,h)),s(a.request,{...a.options,retry:u-1})}}const c=CE(a);throw Error.captureStackTrace&&Error.captureStackTrace(c,s),c}const s=async function(l,c={}){const u={request:l,options:OE(l,c,n.defaults,t),response:void 0,error:void 0};if(u.options.method&&(u.options.method=u.options.method.toUpperCase()),u.options.onRequest&&(await El(u,u.options.onRequest),u.options.headers instanceof t||(u.options.headers=new t(u.options.headers||{}))),typeof u.request=="string"&&(u.options.baseURL&&(u.request=ME(u.request,u.options.baseURL)),u.options.query&&(u.request=Tv(u.request,u.options.query),delete u.options.query),"query"in u.options&&delete u.options.query,"params"in u.options&&delete u.options.params),u.options.body&&qp(u.options.method))if(LE(u.options.body)){const d=u.options.headers.get("content-type");typeof u.options.body!="string"&&(u.options.body=d==="application/x-www-form-urlencoded"?new URLSearchParams(u.options.body).toString():JSON.stringify(u.options.body)),d||u.options.headers.set("content-type","application/json"),u.options.headers.has("accept")||u.options.headers.set("accept","application/json")}else("pipeTo"in u.options.body&&typeof u.options.body.pipeTo=="function"||typeof u.options.body.pipe=="function")&&("duplex"in u.options||(u.options.duplex="half"));let f;if(!u.options.signal&&u.options.timeout){const d=new i;f=setTimeout(()=>{const _=new Error("[TimeoutError]: The operation was aborted due to timeout");_.name="TimeoutError",_.code=23,d.abort(_)},u.options.timeout),u.options.signal=d.signal}try{u.response=await e(u.request,u.options)}catch(d){return u.error=d,u.options.onRequestError&&await El(u,u.options.onRequestError),await r(u)}finally{f&&clearTimeout(f)}if((u.response.body||u.response._bodyInit)&&!kE.has(u.response.status)&&u.options.method!=="HEAD"){const d=(u.options.parseResponse?"json":u.options.responseType)||NE(u.response.headers.get("content-type")||"");switch(d){case"json":{const _=await u.response.text(),m=u.options.parseResponse||Ec;u.response._data=m(_);break}case"stream":{u.response._data=u.response.body||u.response._bodyInit;break}default:u.response._data=await u.response[d]()}}return u.options.onResponse&&await El(u,u.options.onResponse),!u.options.ignoreResponseError&&u.response.status>=400&&u.response.status<600?(u.options.onResponseError&&await El(u,u.options.onResponseError),await r(u)):u.response},o=async function(l,c){return(await s(l,c))._data};return o.raw=s,o.native=(...a)=>e(...a),o.create=(a={},l={})=>Rv({...n,...l,defaults:{...n.defaults,...l.defaults,...a}}),o}const Ac=(function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")})(),BE=Ac.fetch?(...n)=>Ac.fetch(...n):()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!")),HE=Ac.Headers,zE=Ac.AbortController,VE=Rv({fetch:BE,Headers:HE,AbortController:zE}),GE=VE,WE=()=>window?.__NUXT__?.config||{},pd=()=>WE().app,XE=()=>pd().baseURL,jE=()=>pd().buildAssetsDir,md=(...n)=>bv(Cv(),jE(),...n),Cv=(...n)=>{const e=pd(),t=e.cdnURL||e.baseURL;return n.length?bv(t,...n):t};globalThis.__buildAssetsURL=md,globalThis.__publicAssetsURL=Cv;globalThis.$fetch||(globalThis.$fetch=GE.create({baseURL:XE()}));"global"in globalThis||(globalThis.global=globalThis);function nh(n,e={},t){for(const i in n){const r=n[i],s=t?`${t}:${i}`:i;typeof r=="object"&&r!==null?nh(r,e,s):typeof r=="function"&&(e[s]=r)}return e}const qE={run:n=>n()},$E=()=>qE,Pv=typeof console.createTask<"u"?console.createTask:$E;function KE(n,e){const t=e.shift(),i=Pv(t);return n.reduce((r,s)=>r.then(()=>i.run(()=>s(...e))),Promise.resolve())}function YE(n,e){const t=e.shift(),i=Pv(t);return Promise.all(n.map(r=>i.run(()=>r(...e))))}function Ou(n,e){for(const t of[...n])t(e)}class ZE{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(e,t,i={}){if(!e||typeof t!="function")return()=>{};const r=e;let s;for(;this._deprecatedHooks[e];)s=this._deprecatedHooks[e],e=s.to;if(s&&!i.allowDeprecated){let o=s.message;o||(o=`${r} hook has been deprecated`+(s.to?`, please use ${s.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(o)||
19(console.warn(o),this._deprecatedMessages.add(o))}if(!t.name)try{Object.defineProperty(t,"name",{get:()=>"_"+e.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(t),()=>{t&&(this.removeHook(e,t),t=void 0)}}hookOnce(e,t){let i,r=(...s)=>(typeof i=="function"&&i(),i=void 0,r=void 0,t(...s));return i=this.hook(e,r),i}removeHook(e,t){if(this._hooks[e]){const i=this._hooks[e].indexOf(t);i!==-1&&this._hooks[e].splice(i,1),this._hooks[e].length===0&&delete this._hooks[e]}}deprecateHook(e,t){this._deprecatedHooks[e]=typeof t=="string"?{to:t}:t;const i=this._hooks[e]||[];delete this._hooks[e];for(const r of i)this.hook(e,r)}deprecateHooks(e){Object.assign(this._deprecatedHooks,e);for(const t in e)this.deprecateHook(t,e[t])}addHooks(e){const t=nh(e),i=Object.keys(t).map(r=>this.hook(r,t[r]));return()=>{for(const r of i.splice(0,i.length))r()}}removeHooks(e){const t=nh(e);for(const i in t)this.removeHook(i,t[i])}removeAllHooks(){for(const e in this._hooks)delete this._hooks[e]}callHook(e,...t){return t.unshift(e),this.callHookWith(KE,e,...t)}callHookParallel(e,...t){return t.unshift(e),this.callHookWith(YE,e,...t)}callHookWith(e,t,...i){const r=this._before||this._after?{name:t,args:i,context:{}}:void 0;this._before&&Ou(this._before,r);const s=e(t in this._hooks?[...this._hooks[t]]:[],i);return s instanceof Promise?s.finally(()=>{this._after&&r&&Ou(this._after,r)}):(this._after&&r&&Ou(this._after,r),s)}beforeEach(e){return this._before=this._before||[],this._before.push(e),()=>{if(this._before!==void 0){const t=this._before.indexOf(e);t!==-1&&this._before.splice(t,1)}}}afterEach(e){return this._after=this._after||[],this._after.push(e),()=>{if(this._after!==void 0){const t=this._after.indexOf(e);t!==-1&&this._after.splice(t,1)}}}}function Lv(){return new ZE}function JE(n={}){let e,t=!1;const i=o=>{if(e&&e!==o)throw new Error("Context conflict")};let r;if(n.asyncContext){const o=n.AsyncLocalStorage||globalThis.AsyncLocalStorage;o?r=new o:console.warn("[unctx] `AsyncLocalStorage` is not provided.")}const s=()=>
19{if(r){const o=r.getStore();if(o!==void 0)return o}return e};return{use:()=>{const o=s();if(o===void 0)throw new Error("Context is not available");return o},tryUse:()=>s(),set:(o,a)=>{a||i(o),e=o,t=!0},unset:()=>{e=void 0,t=!1},call:(o,a)=>{i(o),e=o;try{return r?r.run(o,a):a()}finally{t||(e=void 0)}},async callAsync(o,a){e=o;const l=()=>{e=o},c=()=>e===o?l:void 0;ih.add(c);try{const u=r?r.run(o,a):a();return t||(e=void 0),await u}finally{ih.delete(c)}}}}function QE(n={}){const e={};return{get(t,i={}){return e[t]||(e[t]=JE({...n,...i})),e[t]}}}const wc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof global<"u"?global:typeof window<"u"?window:{},$p="__unctx__",eb=wc[$p]||(wc[$p]=QE()),tb=(n,e={})=>eb.get(n,e),Kp="__unctx_async_handlers__",ih=wc[Kp]||(wc[Kp]=new Set);function xo(n){const e=[];for(const r of ih){const s=r();s&&e.push(s)}const t=()=>{for(const r of e)r()};let i=n();return i&&typeof i=="object"&&"catch"in i&&(i=i.catch(r=>{throw t(),r})),[i,t]}const nb=!1,Yp=!1,ib=!1,rb={componentName:"NuxtLink",prefetch:!0,prefetchOn:{visibility:!0}},V2={value:null,errorValue:null,deep:!0},sb=null,ob="#__nuxt",Iv="nuxt-app",Zp=36e5,ab="vite:preloadError";function Dv(n=Iv){return tb(n,{asyncContext:!1})}const lb="__nuxt_plugin";function cb(n){let e=0;const t={_id:n.id||Iv||"nuxt-app",_scope:NS(),provide:void 0,globalName:"nuxt",versions:{get nuxt(){return"3.19.3"},get vue(){return t.vueApp.version}},payload:Ti({...n.ssrContext?.payload||{},data:Ti({}),state:ti({}),once:new Set,_errors:Ti({})}),static:{data:{}},runWithContext(r){return t._scope.active&&!r0()?t._scope.run(()=>Jp(t,r)):Jp(t,r)},isHydrating:!0,deferHydration(){if(!t.isHydrating)return()=>{};e++;let r=!1;return()=>{if(!r&&(r=!0,e--,e===0))return t.isHydrating=!1,t.callHook("app:suspense:resolve")}},_asyncDataPromises:{},_asyncData:Ti({}),_payloadRevivers:{},...n};{const r=window.__NUXT__;if(r)for(const s in r)switch(s){case"data":case"state":case"_errors":Object.assign(t.payload[s],r[s]);break;default:t.payload[s]=r[s]}}t.hooks=Lv(),t.hook=t.hooks.hook,t.callHook=t.hooks.callHook,t.provide=(r,s)=>{const o="$"+r;bl(t,o,s),bl(t.vueApp.config.globalProperties,o,s)},bl(t.vueApp,"$nuxt",t),bl(t.vueApp.config.globalProperties,"$nuxt",t);{window.addEventListener(ab,s=>{t.callHook("app:chunkError",{error:s.payload}),s.payload.message.includes("Unable to preload CSS")&&s.preventDefault()}),window.useNuxtApp||=gt;const r=t.hook("app:error",(...s)=>{console.error("[nuxt] error caught during app initialization",...s)});t.hook("app:mounted",r)}const i=t.payload.config;return t.provide("config",i),t}function ub(n,e){e.hooks&&n.hooks.addHooks(e.hooks)}async function fb(n,e){if(typeof e=="function"){const{provide:t}=await n.runWithContext(()=>e(n))||{};if(t&&typeof t=="object")for(const i in t)n.provide(i,t[i])}}async function hb(n,e){const t=new Set,i=[],r=[];let s,o=0;async function a(l){const c=l.dependsOn?.filter(u=>e.some(f=>f._name===u)&&!t.has(u))??[];if(c.length>0)i.push([new Set(c),l]);else{const u=fb(n,l).then(async()=>{l._name&&(t.add(l._name),await Promise.all(i.map(async([f,h])=>{f.has(l._name)&&(f.delete(l._name),f.size===0&&(o++,await a(h)))})))}).catch(f=>{if(!l.parallel&&!n.payload.error)throw f;s||=f});l.parallel?r.push(u):await u}}for(const l of e)ub(n,l);for(const l of e)await a(l);if(await Promise.all(r),o)for(let l=0;l<o;l++)await Promise.all(r);if(s)throw n.payload.error||s}function Ln(n){if(typeof n=="function")return n;const e=n._name||n.name;return delete n.name,Object.assign(n.setup||(()=>{}),n,{[lb]:!0,_name:e})}function Jp(n,e,t){const i=()=>e();return Dv(n._id).set(n),n.vueApp.runWithContext(i)}function Nv(n){let e;return Zc()&&(e=jr()?.appContext.app.$nuxt),e||=Dv(n).tryUse(),e||null}function gt(n){const e=Nv(n);if(!e)throw new Error("[nuxt] instance unavailable");return e}function ol(n){return gt().$config}function bl(n,e,t){Object.defineProperty(n,e,{get:()=>t})}function db(n,e){return{ctx:{table:n},matchAll:t=>Uv(t,n)}}function Ov(n){const e={};for(const t in n)e[t]=t==="dynamic"?new Map(Object.entries(n[t]).map(([i,r])=>[i,Ov(r)])):new Map(Object.entries(n[t]));return e}function pb(n){return db(Ov(n))}function Uv(n,e,t){n.endsWith("/")&&(n=n.slice(0,-1)||"/");const i=[];for(const[s,o]of Qp(e.wildcard))(n===s||n.startsWith(s+"/"))&&i.push(o);for(const[s,o]of Qp(e.dynamic))if(n.startsWith(s+"/")){const a="/"+n.slice(s.length).split("/").splice(2).join("/");i.push(...Uv(a,o))}const r=e.static.get(n);
19return r&&i.push(r),i.filter(Boolean)}function Qp(n){return[...n.entries()].sort((e,t)=>e[0].length-t[0].length)}function Uu(n){if(n===null||typeof n!="object")return!1;const e=Object.getPrototypeOf(n);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in n?!1:Symbol.toStringTag in n?Object.prototype.toString.call(n)==="[object Module]":!0}function rh(n,e,t=".",i){if(!Uu(e))return rh(n,{},t,i);const r=Object.assign({},e);for(const s in n){if(s==="__proto__"||s==="constructor")continue;const o=n[s];o!=null&&(i&&i(r,s,o,t)||(Array.isArray(o)&&Array.isArray(r[s])?r[s]=[...o,...r[s]]:Uu(o)&&Uu(r[s])?r[s]=rh(o,r[s],(t?`${t}.`:"")+s.toString(),i):r[s]=o))}return r}function mb(n){return(...e)=>e.reduce((t,i)=>rh(t,i,"",n),{})}const gd=mb();function gb(n,e){try{return e in n}catch{return!1}}class em extends Error{static __h3_error__=!0;statusCode=500;fatal=!1;unhandled=!1;statusMessage;data;cause;constructor(e,t={}){super(e,t),t.cause&&!this.cause&&(this.cause=t.cause)}toJSON(){const e={message:this.message,statusCode:sh(this.statusCode,500)};return this.statusMessage&&(e.statusMessage=Fv(this.statusMessage)),this.data!==void 0&&(e.data=this.data),e}}function _b(n){if(typeof n=="string")return new em(n);if(vb(n))return n;const e=new em(n.message??n.statusMessage??"",{cause:n.cause||n});if(gb(n,"stack"))try{Object.defineProperty(e,"stack",{get(){return n.stack}})}catch{try{e.stack=n.stack}catch{}}if(n.data&&(e.data=n.data),n.statusCode?e.statusCode=sh(n.statusCode,e.statusCode):n.status&&(e.statusCode=sh(n.status,e.statusCode)),n.statusMessage?e.statusMessage=n.statusMessage:n.statusText&&(e.statusMessage=n.statusText),e.statusMessage){const t=e.statusMessage;Fv(e.statusMessage)!==t&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return n.fatal!==void 0&&(e.fatal=n.fatal),n.unhandled!==void 0&&(e.unhandled=n.unhandled),e}function vb(n){return n?.constructor?.__h3_error__===!0}const yb=/[^\u0009\u0020-\u007E]/g;function Fv(n=""){return n.replace(yb,"")}function sh(n,e=200){return!n||(typeof n=="string"&&(n=Number.parseInt(n,10)),n<100||n>999)?e:n}const kv=Symbol("layout-meta"),Is=Symbol("route");import.meta.url.replace(/\/app\/.*$/,"/");const Mn=()=>gt()?.$router,al=()=>Zc()?Wt(Is,gt()._route):gt()._route;const xb=()=>{try{if(gt()._processingMiddleware)return!0}catch{return!1}return!1},Sb=(n,e)=>{n||="/";const t=typeof n=="string"?n:"path"in n?oh(n):Mn().resolve(n).href;if(e?.open){const{target:l="_blank",windowFeatures:c={}}=e.open,u=[];for(const[f,h]of Object.entries(c))h!==void 0&&u.push(`${f.toLowerCase()}=${h}`);return open(t,l,u.join(", ")),Promise.resolve()}const i=Ci(t,{acceptRelative:!0}),r=e?.external||i;if(r){if(!e?.external)throw new Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.");const{protocol:l}=new URL(t,window.location.href);if(l&&xE(l))throw new Error(`Cannot navigate to a URL with '${l}' protocol.`)}const s=xb();if(!r&&s){if(e?.replace){if(typeof n=="string"){const{pathname:l,search:c,hash:u}=wv(n);return{path:l,...c&&{query:dd(c)},...u&&{hash:u},replace:!0}}return{...n,replace:!0}}return n}const o=Mn(),a=gt();return r?(a._scope.stop(),e?.replace?location.replace(t):location.href=t,s?a.isHydrating?new Promise(()=>{}):!1:Promise.resolve()):e?.replace?o.replace(n):o.push(n)};function oh(n){return Tv(n.path||"",n.query||{})+(n.hash||"")}const Bv="__nuxt_error",ll=()=>M0(gt().payload,"error"),fs=n=>{const e=Es(n);try{const t=ll();gt().hooks.callHook("app:error",e),t.value||=e}catch{throw e}return e},Mb=async(n={})=>{const e=gt(),t=ll();e.callHook("app:error:cleared",n),n.redirect&&await Mn().replace(n.redirect),t.value=sb},Hv=n=>!!n&&typeof n=="object"&&Bv in n,Es=n=>{const e=_b(n);return Object.defineProperty(e,Bv,{value:!0,configurable:!1,writable:!1}),e};function Tb(n){const e=bb(n),t=new ArrayBuffer(e.length),i=new DataView(t);for(let r=0;r<t.byteLength;r++)i.setUint8(r,e.charCodeAt(r));return t}const Eb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
19+/";function bb(n){n.length%4===0&&(n=n.replace(/==?$/,""));let e="",t=0,i=0;for(let r=0;r<n.length;r++)t<<=6,t|=Eb.indexOf(n[r]),i+=6,i===24&&(e+=String.fromCharCode((t&16711680)>>16),e+=String.fromCharCode((t&65280)>>8),e+=String.fromCharCode(t&255),t=i=0);return i===12?(t>>=4,e+=String.fromCharCode(t)):i===18&&(t>>=2,e+=String.fromCharCode((t&65280)>>8),e+=String.fromCharCode(t&255)),e}const Ab=-1,wb=-2,Rb=-3,Cb=-4,Pb=-5,Lb=-6;function Ib(n,e){return Db(JSON.parse(n),e)}function Db(n,e){if(typeof n=="number")return r(n,!0);if(!Array.isArray(n)||n.length===0)throw new Error("Invalid input");const t=n,i=Array(t.length);function r(s,o=!1){if(s===Ab)return;if(s===Rb)return NaN;if(s===Cb)return 1/0;if(s===Pb)return-1/0;if(s===Lb)return-0;if(o||typeof s!="number")throw new Error("Invalid input");if(s in i)return i[s];const a=t[s];if(!a||typeof a!="object")i[s]=a;else if(Array.isArray(a))if(typeof a[0]=="string"){const l=a[0],c=e?.[l];if(c){let u=a[1];return typeof u!="number"&&(u=t.push(a[1])-1),i[s]=c(r(u))}switch(l){case"Date":i[s]=new Date(a[1]);break;case"Set":const u=new Set;i[s]=u;for(let d=1;d<a.length;d+=1)u.add(r(a[d]));break;case"Map":const f=new Map;i[s]=f;for(let d=1;d<a.length;d+=2)f.set(r(a[d]),r(a[d+1]));break;case"RegExp":i[s]=new RegExp(a[1],a[2]);break;case"Object":i[s]=Object(a[1]);break;case"BigInt":i[s]=BigInt(a[1]);break;case"null":const h=Object.create(null);i[s]=h;for(let d=1;d<a.length;d+=2)h[a[d]]=r(a[d+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const d=globalThis[l],_=new d(r(a[1]));i[s]=a[2]!==void 0?_.subarray(a[2],a[3]):_;break}case"ArrayBuffer":{const d=a[1],_=Tb(d);i[s]=_;break}case"Temporal.Duration":case"Temporal.Instant":case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.PlainMonthDay":case"Temporal.PlainYearMonth":case"Temporal.ZonedDateTime":{const d=l.slice(9);i[s]=Temporal[d].from(a[1]);break}case"URL":{const d=new URL(a[1]);i[s]=d;break}case"URLSearchParams":{const d=new URLSearchParams(a[1]);i[s]=d;break}default:throw new Error(`Unknown type ${l}`)}}else{const l=new Array(a.length);i[s]=l;for(let c=0;c<a.length;c+=1){const u=a[c];u!==wb&&(l[c]=r(u))}}else{const l={};i[s]=l;for(const c in a){if(c==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");const u=a[c];l[c]=r(u)}}return i[s]}return r(0)}const Nb=new Set(["link","style","script","noscript"]),Ob=new Set(["title","titleTemplate","script","style","noscript"]),tm=new Set(["base","meta","link","style","script","noscript"]),Ub=new Set(["title","base","htmlAttrs","bodyAttrs","meta","link","style","script","noscript"]),Fb=new Set(["base","title","titleTemplate","bodyAttrs","htmlAttrs","templateParams"]),kb=new Set(["key","tagPosition","tagPriority","tagDuplicateStrategy","innerHTML","textContent","processTemplateParams"]),Bb=new Set(["templateParams","htmlAttrs","bodyAttrs"]),_d=new Set(["theme-color","google-site-verification","og","article","book","profile","twitter","author"]),Ga={META:new Set(["twitter"]),OG:new Set(["og","book","article","profile","fb"]),MEDIA:new Set(["ogImage","ogVideo","ogAudio","twitterImage"]),HTTP_EQUIV:new Set(["contentType","defaultStyle","xUaCompatible"])},Hb={articleExpirationTime:"article:expiration_time",articleModifiedTime:"article:modified_time",articlePublishedTime:"article:published_time",bookReleaseDate:"book:release_date",fbAppId:"fb:app_id",ogAudioSecureUrl:"og:audio:secure_url",ogAudioUrl:"og:audio",ogImageSecureUrl:"og:image:secure_url",ogImageUrl:"og:image",ogSiteName:"og:site_name",ogVideoSecureUrl:"og:video:secure_url",ogVideoUrl:"og:video",profileFirstName:"profile:first_name",profileLastName:"profile:last_name",profileUsername:"profile:username",msapplicationConfig:"msapplication-Config",msapplicationTileColor:"msapplication-TileColor",msapplicationTileImage:"msapplication-TileImage"},zv={appleItunesApp:{unpack:{entrySeparator:", ",resolve:({key:n,value:e})=>`${Ji(n)}=${e}`}},refresh:{metaKey:"http-equiv",unpack:{entrySeparator:";",resolve:({key:n,value:e})=>n==="seconds"?`${e}`:void 0}},robots:{unpack:{entrySeparator:", ",resolve:({key:n,value:e})=>typeof e=="boolean"?Ji(n):`${Ji(n)}:${e}`}},contentSecurityPolicy:{metaKey:"http-equiv",unpack:{entrySeparator:"; ",resolve:({key:n,value:e})=>`${Ji(n)} ${e}`}},charset:{}};function Ji(n){const e=n.replace(/([A-Z])/g,"-$1").toLowerCase(),t=e.indexOf("-");return t===-1?e:Ga.META.has(e.slice(0,t))||Ga.OG.has(e.slice(0,t))?n.replace(/([A-Z])/g,":$1").toLowerCase():e}function Vv(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>String(t)!=="false"&&e))}function ah(n){return Array.isArray(n)?n.map(ah):!n||typeof n!="object"?n:Object.fromEntries(Object.entries(n).map(([e,t])=>[Ji(e),ah(t)]))}function Gv(n,e={}
19){const{entrySeparator:t="",keyValueSeparator:i="",wrapValue:r,resolve:s}=e;return Object.entries(n).map(([o,a])=>{if(s){const c=s({key:o,value:a});if(c!==void 0)return c}const l=typeof a=="object"?Gv(a,e):typeof a=="number"?a.toString():typeof a=="string"&&r?`${r}${a.replace(new RegExp(r,"g"),`\\${r}`)}${r}`:a;return`${o}${i}${l}`}).join(t)}function nm(n,e){const t=Vv(e),i=Ji(n),r=Wv(i);if(!_d.has(i))return[{[r]:i,...t}];const s=Object.fromEntries(Object.entries(t).map(([o,a])=>[`${n}${o==="url"?"":`${o[0].toUpperCase()}${o.slice(1)}`}`,a]));return Rc(s||{}).sort((o,a)=>(o[r]?.length||0)-(a[r]?.length||0))}function Wv(n){if(zv[n]?.metaKey==="http-equiv"||Ga.HTTP_EQUIV.has(n))return"http-equiv";const e=Ji(n),t=e.indexOf(":");return t===-1?"name":Ga.OG.has(e.slice(0,t))?"property":"name"}function zb(n){return Hb[n]||Ji(n)}function Vb(n,e){return e==="refresh"?`${n.seconds};url=${n.url}`:Gv(ah(n),{keyValueSeparator:"=",entrySeparator:", ",resolve:({value:t,key:i})=>t===null?"":typeof t=="boolean"?i:void 0,...zv[e]?.unpack})}function Rc(n){const e=[],t={};for(const[r,s]of Object.entries(n)){if(Array.isArray(s)){if(r==="themeColor"){s.forEach(o=>{typeof o=="object"&&o!==null&&e.push({name:"theme-color",...o})});continue}for(const o of s)if(typeof o=="object"&&o!==null){const a=[],l=[];for(const[c,u]of Object.entries(o)){const f=`${r}${c==="url"?"":`:${c}`}`,h=Rc({[f]:u});(c==="url"?a:l).push(...h)}e.push(...a,...l)}else e.push(...typeof o=="string"?Rc({[r]:o}):nm(r,o));continue}if(typeof s=="object"&&s)if(Ga.MEDIA.has(r)){const o=r.startsWith("twitter")?"twitter":"og",a=r.replace(/^(og|twitter)/,"").toLowerCase(),l=o==="twitter"?"name":"property";s.url&&e.push({[l]:`${o}:${a}`,content:s.url}),s.secureUrl&&e.push({[l]:`${o}:${a}:secure_url`,content:s.secureUrl});for(const[c,u]of Object.entries(s))c!=="url"&&c!=="secureUrl"&&e.push({[l]:`${o}:${a}:${c}`,content:u})}else _d.has(Ji(r))?e.push(...nm(r,s)):t[r]=Vv(s);else t[r]=s}const i=Object.entries(t).map(([r,s])=>{if(r==="charset")return{charset:s===null?"_null":s};const o=Wv(r),a=zb(r),l=s===null?"_null":typeof s=="object"?Vb(s,r):typeof s=="number"?s.toString():s;return o==="http-equiv"?{"http-equiv":a,content:l}:{[o]:a,content:l}});return[...e,...i].map(r=>"content"in r&&r.content==="_null"?{...r,content:null}:r)}const Gb={key:"flatMeta",hooks:{"entries:normalize":n=>{const e=[];n.tags=n.tags.map(t=>t.tag!=="_flatMeta"?t:(e.push(Rc(t.props).map(i=>({...t,tag:"meta",props:i}))),!1)).filter(Boolean).concat(...e)}}},Wb=["name","property","http-equiv"],Xb=new Set(["viewport","description","keywords","robots"]);function Xv(n){const e=n.split(":");return e.length?_d.has(e[1]):!1}function lh(n){const{props:e,tag:t}=n;if(Fb.has(t))return t;if(t==="link"&&e.rel==="canonical")return"canonical";if(e.charset)return"charset";if(n.tag==="meta"){for(const i of Wb)if(e[i]!==void 0){const r=e[i],s=r.includes(":"),o=Xb.has(r),l=!(s||o)&&n.key?`:key:${n.key}`:"";return`${t}:${r}${l}`}}if(n.key)return`${t}:key:${n.key}`;if(e.id)return`${t}:id:${e.id}`;if(Ob.has(t)){const i=n.textContent||n.innerHTML;if(i)return`${t}:content:${i}`}}function im(n){const e=n._h||n._d;if(e)return e;const t=n.textContent||n.innerHTML;return t||`${n.tag}:${Object.entries(n.props).map(([i,r])=>`${i}:${String(r)}`).join(",")}`}function Cc(n,e,t){typeof n==="function"&&(!t||t!=="titleTemplate"&&!(t[0]==="o"&&t[1]==="n"))&&(n=n());let r;if(e&&(r=e(t,n)),Array.isArray(r))return r.map(s=>Cc(s,e));if(r?.constructor===Object){const s={};for(const o of Object.keys(r))s[o]=Cc(r[o],e,o);return s}return r}function jb(n,e){const t=n==="style"?new Map:new Set;function i(r){const s=r.trim();if(s)if(n==="style"){const[o,...a]=s.split(":").map(l=>l.trim());o&&a.length&&t.set(o,a.join(":"))}else s.split(" ").filter(Boolean).forEach(o=>t.add(o))}return typeof e=="string"?n==="style"?e.split(";").forEach(i):i(e):Array.isArray(e)?e.forEach(r=>i(r)):e&&typeof e=="object"&&Object.entries(e).forEach(([r,s])=>{s&&s!=="false"&&(n==="style"?t.set(r.trim(),s):i(r))}),t}function jv(n,e){return n.props=n.props||{},e?n.tag==="templateParams"?(n.props=e,n):(Object.entries(e).forEach(([t,i])=>{if(i===null){n.props[t]=null;return}if(t==="class"||t==="style"){n.props[t]=jb(t,i);return}if(kb.has(t)){if(["textContent","innerHTML"].includes(t)&&typeof i=="object"){let o=e.type;if(e.type||(o="application/json"),!o?.endsWith("json")&&o!=="speculationrules")return;e.type=o,n.props.type=o,n[t]=JSON.stringify(i)}else n[t]=i;return}const r=String(i),s=t.startsWith("data-");r==="true"||r===""?n.props[t]=s?r:!0:!i&&s&&r==="false"?n.props[t]="false":i!==void 0&&(n.props[t]=i)}),n):n}function qb(n,e){const t=typeof e=="object"&&typeof e!="function"?e:{[n==="script"||n==="noscript"||n==="style"?"innerHTML":"textContent"]:e},i=jv({tag:n,props:{}},t);return i.key&&Nb.has(i.tag)&&(i.props["data-hid"]=i._h=i.key),i.tag==="script"&&typeof i.innerHTML=="object"&&(i.innerHTML=JSON.stringify(i.innerHTML),i.props.type=i.props.type||"application/json"),Array.isArray(i.props.content)?i.props.content.map(r=>({...i,props:{...i.props,content:r}})):i}function $b(n,e){if(!n)return[];typeof n=="function"&&(n=n());const t=(r,s)=>{for(let o=0;o<e.length;o++)s=e[o](r,s);return s};n=t(void 0,n);const i=[];return n=Cc(n,t),Object.entries(n||{}
19).forEach(([r,s])=>{if(s!==void 0)for(const o of Array.isArray(s)?s:[s])i.push(qb(r,o))}),i.flat()}const ch=(n,e)=>n._w===e._w?n._p-e._p:n._w-e._w,rm={base:-10,title:10},Kb={critical:-8,high:-1,low:2},sm={meta:{"content-security-policy":-30,charset:-20,viewport:-15},link:{preconnect:20,stylesheet:60,preload:70,modulepreload:70,prefetch:90,"dns-prefetch":90,prerender:90},script:{async:30,defer:80,sync:50},style:{imported:40,sync:60}},Yb=/@import/,aa=n=>n===""||n===!0;function Zb(n,e){if(typeof e.tagPriority=="number")return e.tagPriority;let t=100;const i=Kb[e.tagPriority]||0,r=n.resolvedOptions.disableCapoSorting?{link:{},script:{},style:{}}:sm;if(e.tag in rm)t=rm[e.tag];else if(e.tag==="meta"){const s=e.props["http-equiv"]==="content-security-policy"?"content-security-policy":e.props.charset?"charset":e.props.name==="viewport"?"viewport":null;s&&(t=sm.meta[s])}else e.tag==="link"&&e.props.rel?t=r.link[e.props.rel]:e.tag==="script"?aa(e.props.async)?t=r.script.async:e.props.src&&!aa(e.props.defer)&&!aa(e.props.async)&&e.props.type!=="module"&&!e.props.type?.endsWith("json")?t=r.script.sync:aa(e.props.defer)&&e.props.src&&!aa(e.props.async)&&(t=r.script.defer):e.tag==="style"&&(t=e.innerHTML&&Yb.test(e.innerHTML)?r.style.imported:r.style.sync);return(t||100)+i}function om(n,e){const t=typeof e=="function"?e(n):e,i=t.key||String(n.plugins.size+1);n.plugins.get(i)||(n.plugins.set(i,t),n.hooks.addHooks(t.hooks||{}))}function Jb(n={}){const e=Lv();e.addHooks(n.hooks||{});const t=!n.document,i=new Map,r=new Map,s=new Set,o={_entryCount:1,plugins:r,dirty:!1,resolvedOptions:n,hooks:e,ssr:t,entries:i,headEntries(){return[...i.values()]},use:a=>om(o,a),push(a,l){const c={...l||{}};delete c.head;const u=c._index??o._entryCount++,f={_i:u,input:a,options:c},h={_poll(d=!1){o.dirty=!0,!d&&s.add(u),e.callHook("entries:updated",o)},dispose(){i.delete(u)&&o.invalidate()},patch(d){(!c.mode||c.mode==="server"&&t||c.mode==="client"&&!t)&&(f.input=d,i.set(u,f),h._poll())}};return h.patch(a),h},async resolveTags(){const a={tagMap:new Map,tags:[],entries:[...o.entries.values()]};for(await e.callHook("entries:resolve",a);s.size;){const h=s.values().next().value;s.delete(h);const d=i.get(h);if(d){const _={tags:$b(d.input,n.propResolvers||[]).map(m=>Object.assign(m,d.options)),entry:d};await e.callHook("entries:normalize",_),d._tags=_.tags.map((m,p)=>(m._w=Zb(o,m),m._p=(d._i<<10)+p,m._d=lh(m),m))}}let l=!1;a.entries.flatMap(h=>(h._tags||[]).map(d=>({...d,props:{...d.props}}))).sort(ch).reduce((h,d)=>{const _=String(d._d||d._p);if(!h.has(_))return h.set(_,d);const m=h.get(_);if((d?.tagDuplicateStrategy||(Bb.has(d.tag)?"merge":null)||(d.key&&d.key===m.key?"merge":null))==="merge"){const g={...m.props};Object.entries(d.props).forEach(([x,v])=>g[x]=x==="style"?new Map([...m.props.style||new Map,...v]):x==="class"?new Set([...m.props.class||new Set,...v]):v),h.set(_,{...d,props:g})}else d._p>>10===m._p>>10&&d.tag==="meta"&&Xv(_)?(h.set(_,Object.assign([...Array.isArray(m)?m:[m],d],d)),l=!0):(d._w===m._w?d._p>m._p:d?._w<m?._w)&&h.set(_,d);return h},a.tagMap);const c=a.tagMap.get("title"),u=a.tagMap.get("titleTemplate");if(o._title=c?.textContent,u){const h=u?.textContent;if(o._titleTemplate=h,h){let d=typeof h=="function"?h(c?.textContent):h;typeof d=="string"&&!o.plugins.has("template-params")&&(d=d.replace("%s",c?.textContent||"")),c?d===null?a.tagMap.delete("title"):a.tagMap.set("title",{...c,textContent:d}):(u.tag="title",u.textContent=d)}}a.tags=Array.from(a.tagMap.values()),l&&(a.tags=a.tags.flat().sort(ch)),await e.callHook("tags:beforeResolve",a),await e.callHook("tags:resolve",a),await e.callHook("tags:afterResolve",a);const f=[];for(const h of a.tags){const{innerHTML:d,tag:_,props:m}=h;if(Ub.has(_)&&!(Object.keys(m).length===0&&!h.innerHTML&&!h.textContent)&&!(_==="meta"&&!m.content&&!m["http-equiv"]&&!m.charset)){if(_==="script"&&d){if(m.type?.endsWith("json")){const p=typeof d=="string"?d:JSON.stringify(d);h.innerHTML=p.replace(/</g,"\\u003C")}else typeof d=="string"&&(h.innerHTML=d.replace(new RegExp(`</${_}`,"g"),`<\\/${_}`));h._d=lh(h)}f.push(h)}}return f},invalidate(){for(const a of i.values())s.add(a._i);o.dirty=!0,e.callHook("entries:updated",o)}};
19return(n?.plugins||[]).forEach(a=>om(o,a)),o.hooks.callHook("init",o),n.init?.forEach(a=>a&&o.push(a)),o}const Fu="%separator";function Qb(n,e,t=!1){let i;if(e==="s"||e==="pageTitle")i=n.pageTitle;else if(e.includes(".")){const r=e.indexOf(".");i=n[e.substring(0,r)]?.[e.substring(r+1)]}else i=n[e];if(i!==void 0)return t?(i||"").replace(/\\/g,"\\\\").replace(/</g,"\\u003C").replace(/"/g,'\\"'):i||""}function Al(n,e,t,i=!1){if(typeof n!="string"||!n.includes("%"))return n;let r=n;try{r=decodeURI(n)}catch{}const s=r.match(/%\w+(?:\.\w+)?/g);if(!s)return n;const o=n.includes(Fu);return n=n.replace(/%\w+(?:\.\w+)?/g,a=>{if(a===Fu||!s.includes(a))return a;const l=Qb(e,a.slice(1),i);return l!==void 0?l:a}).trim(),o&&(n=n.split(Fu).map(a=>a.trim()).filter(a=>a!=="").join(t?` ${t} `:" ")),n}const am=n=>n.includes(":key")?n:n.split(":").join(":key:"),eA={key:"aliasSorting",hooks:{"tags:resolve":n=>{let e=!1;for(const t of n.tags){const i=t.tagPriority;if(!i)continue;const r=String(i);if(r.startsWith("before:")){const s=am(r.slice(7)),o=n.tagMap.get(s);o&&(typeof o.tagPriority=="number"&&(t.tagPriority=o.tagPriority),t._p=o._p-1,e=!0)}else if(r.startsWith("after:")){const s=am(r.slice(6)),o=n.tagMap.get(s);o&&(typeof o.tagPriority=="number"&&(t.tagPriority=o.tagPriority),t._p=o._p+1,e=!0)}}e&&(n.tags=n.tags.sort(ch))}}},tA={key:"deprecations",hooks:{"entries:normalize":({tags:n})=>{for(const e of n)e.props.children&&(e.innerHTML=e.props.children,delete e.props.children),e.props.hid&&(e.key=e.props.hid,delete e.props.hid),e.props.vmid&&(e.key=e.props.vmid,delete e.props.vmid),e.props.body&&(e.tagPosition="bodyClose",delete e.props.body)}}};async function uh(n){if(typeof n==="function")return n;if(n instanceof Promise)return await n;if(Array.isArray(n))return await Promise.all(n.map(t=>uh(t)));if(n?.constructor===Object){const t={};for(const i of Object.keys(n))t[i]=await uh(n[i]);return t}return n}const nA={key:"promises",hooks:{"entries:resolve":async n=>{const e=[];for(const t in n.entries)n.entries[t]._promisesProcessed||e.push(uh(n.entries[t].input).then(i=>{n.entries[t].input=i,n.entries[t]._promisesProcessed=!0}));await Promise.all(e)}}},iA={meta:"content",link:"href",htmlAttrs:"lang"},rA=["innerHTML","textContent"],qv=n=>({key:"template-params",hooks:{"entries:normalize":e=>{const t=e.tags.filter(i=>i.tag==="templateParams"&&i.mode==="server")?.[0]?.props||{};Object.keys(t).length&&(n._ssrPayload={templateParams:{...n._ssrPayload?.templateParams||{},...t}})},"tags:resolve":({tagMap:e,tags:t})=>{const i=e.get("templateParams")?.props||{},r=i.separator||"|";delete i.separator,i.pageTitle=Al(i.pageTitle||n._title||"",i,r);for(const s of t){if(s.processTemplateParams===!1)continue;const o=iA[s.tag];if(o&&typeof s.props[o]=="string")s.props[o]=Al(s.props[o],i,r);else if(s.processTemplateParams||s.tag==="titleTemplate"||s.tag==="title")for(const a of rA)typeof s[a]=="string"&&(s[a]=Al(s[a],i,r,s.tag==="script"&&s.props.type.endsWith("json")))}n._templateParams=i,n._separator=r},"tags:afterResolve":({tagMap:e})=>{const t=e.get("title");t?.textContent&&t.processTemplateParams!==!1&&(t.textContent=Al(t.textContent,n._templateParams,n._separator))}}});function sA(n={}){return e=>(e.push({meta:[{name:"twitter:card",content:n.twitterCard||"summary_large_image",tagPriority:"low"},{property:"og:title",tagPriority:"low","data-infer":""},{property:"og:description",tagPriority:"low","data-infer":""}]}),{key:"infer-seo-meta",hooks:{"tags:beforeResolve":({tagMap:t})=>{let i=e._titleTemplate||e._title;const r=t.get("meta:og:title");typeof r?.props["data-infer"]<"u"&&(typeof i=="function"&&(i=i(e._title)),r.props.content=n.ogTitle?n.ogTitle(i):i||"",r.processTemplateParams=!0);const s=t.get("meta:description")?.props?.content,o=t.get("meta:og:description");typeof o?.props["data-infer"]<"u"&&(o.props.content=n.ogDescription?n.ogDescription(s):s||"",o.processTemplateParams=!0)}}})}const oA=(n,e)=>It(e)?x0(e):e,vd="usehead";function aA(n){return{install(t){t.config.globalProperties.$unhead=n,t.config.globalProperties.$head=n,t.provide(vd,n)}}.install}function $v(){if(Zc()){const n=Wt(vd);if(!n)throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.");return n}throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.")}function Kv(n,e={}){const t=e.head||$v();return t.ssr?t.push(n||{},e):lA(t,n,e)}function lA(n,e,t={}){const i=zn(!1);let r;return iv(()=>{const o=i.value?{}:Cc(e,oA);r?r.patch(o):r=n.push(o,t)}),jr()&&(Fs(()=>
19{r.dispose()}),N0(()=>{i.value=!0}),D0(()=>{i.value=!1})),r}function cA(n={},e={}){(e.head||$v()).use(Gb);const{title:i,titleTemplate:r,...s}=n;return Kv({title:i,titleTemplate:r,_flatMeta:s},e)}function cl(n){const e=n||Nv();return e?.ssrContext?.head||e?.runWithContext(()=>{if(Zc())return Wt(vd)})}function uA(n,e={}){const t=cl(e.nuxt);if(t)return Kv(n,{head:t,...e})}function fA(n,e={}){const t=cl(e.nuxt);if(t)return cA(n,{head:t,...e})}const hA="modulepreload",dA=function(n,e){return new URL(n,e).href},lm={},tt=function(e,t,i){let r=Promise.resolve();if(t&&t.length>0){let c=function(u){return Promise.all(u.map(f=>Promise.resolve(f).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};const o=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),l=a?.nonce||a?.getAttribute("nonce");r=c(t.map(u=>{if(u=dA(u,i),u in lm)return;lm[u]=!0;const f=u.endsWith(".css"),h=f?'[rel="stylesheet"]':"";if(i)for(let _=o.length-1;_>=0;_--){const m=o[_];if(m.href===u&&(!f||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${h}`))return;const d=document.createElement("link");if(d.rel=f?"stylesheet":hA,f||(d.as="script"),d.crossOrigin="",d.href=u,l&&d.setAttribute("nonce",l),document.head.appendChild(d),f)return new Promise((_,m)=>{d.addEventListener("load",_),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return r.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})};let rc,sc;function pA(){return rc=$fetch(md(`builds/meta/${ol().app.buildId}.json`),{responseType:"json"}),rc.then(n=>{sc=pb(n.matcher)}).catch(n=>{console.error("[nuxt] Error fetching app manifest.",n)}),rc}function nu(){return rc||pA()}async function yd(n){const e=typeof n=="string"?n:n.path;if(await nu(),!sc)return console.error("[nuxt] Error creating app manifest matcher.",sc),{};try{return gd({},...sc.matchAll(e).reverse())}catch(t){return console.error("[nuxt] Error matching route rules.",t),{}}}async function cm(n,e={}){if(!await Zv(n))return null;const i=await gA(n,e);return await Yv(i)||null}const mA="_payload.json";async function gA(n,e={}){const t=new URL(n,"http://localhost");if(t.host!=="localhost"||Ci(t.pathname,{acceptRelative:!0}))throw new Error("Payload URL must not include hostname: "+n);const i=ol(),r=e.hash||(e.fresh?Date.now():i.app.buildId),s=i.app.cdnURL,o=s&&await Zv(n)?s:i.app.baseURL;return tu(o,t.pathname,mA+(r?`?${r}`:""))}async function Yv(n){const e=fetch(n,{cache:"force-cache"}).then(t=>t.text().then(Jv));try{return await e}catch(t){console.warn("[nuxt] Cannot load payload ",n,t)}return null}async function Zv(n=al().path){const e=gt();return n=n.replace(/\/$/,""),(await nu()).prerendered.includes(n)?!0:e.runWithContext(async()=>{const i=await yd({path:n});return!!i.prerender&&!i.redirect})}let es=null;async function _A(){if(es)return es;const n=document.getElementById("__NUXT_DATA__");if(!n)return{};const e=await Jv(n.textContent||""),t=n.dataset.src?await Yv(n.dataset.src):void 0;return es={...e,...t,...window.__NUXT__},es.config?.public&&(es.config.public=ti(es.config.public)),es}async function Jv(n){return await Ib(n,gt()._payloadRevivers)}function vA(n,e){gt()._payloadRevivers[n]=e}const yA=[["NuxtError",n=>Es(n)],["EmptyShallowRef",n=>Cs(n==="_"?void 0:n==="0n"?BigInt(0):Ec(n))],["EmptyRef",n=>zn(n==="_"?void 0:n==="0n"?BigInt(0):Ec(n))],["ShallowRef",n=>Cs(n)],["ShallowReactive",n=>Ti(n)],["Ref",n=>zn(n)],["Reactive",n=>ti(n)]],xA=Ln({name:"nuxt:revive-payload:client",order:-30,async setup(n){let e,t;for(const[i,r]of yA)vA(i,r);Object.assign(n.payload,([e,t]=xo(()=>n.runWithContext(_A)),e=await e,t(),e)),window.__NUXT__=n.payload}});/*! 20 * vue-router v4.6.3 21 * (c) 2025 Eduardo San Martin Morote 22 * @license MIT 23 */const ao=typeof document<"u";function Qv(n){return typeof n=="object"||"displayName"in n||"props"in n||"__vccOpts"in n}function SA(n){return n.__esModule||n[Symbol.toStringTag]==="Module"||n.default&&Qv(n.default)}const Ye=Object.assign;function ku(n,e){const t={};for(const i in e){const r=e[i];t[i]=di(r)?r.map(n):n(r)}return t}const La=()=>{},di=Array.isArray;function um(n,e){const t={};for(const i in n)t[i]=i in e?e[i]:n[i];return t}const ey=/#/g,MA=/&/g,TA=/\//g,EA=/=/g,bA=/\?/g,ty=/\+/g,AA=/%5B/g,wA=/%5D/g,ny=/%5E/g,RA=/%60/g,iy=/%7B/g,CA=/%7C/g,ry=/%7D/g,PA=/%20/g;function xd(n){return n==null?"":encodeURI(""+n).replace(CA,"|").replace(AA,"[").replace(wA,"]")}function LA(n){return xd(n).replace(iy,"{").replace(ry,"}").replace(ny,"^")}function fh(n){return xd(n).replace(ty,"%2B").replace(PA,"+").replace(ey,"%23").replace(MA,"%26").replace(RA,"`").replace(iy,"{").replace(ry,"}").replace(ny,"^")}function IA(n){return fh(n).replace(EA,"%3D")}function DA(n){return xd(n).replace(ey,"%23").replace(bA,"%3F")}function NA(n){return DA(n).replace(TA,"%2F")}function Wa(n){if(n==null)return null;try{return decodeURIComponent(""+n)}catch{}return""+n}const OA=/\/$/,UA=n=>n.replace(OA,"");function Bu(n,e,t="/"){let i,r={},s="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return l=a>=0&&l>a?-1:l,l>=0&&(i=e.slice(0,l),s=e.slice(l,a>0?a:e.length),r=n(s.slice(1))),a>=0&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=HA(i??e,t),{fullPath:i+s+o,path:i,query:r,hash:Wa(o)}}function FA(n,e){const t=e.query?n(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function fm(n,e){return!e||!n.toLowerCase().startsWith(e.toLowerCase())?n:n.slice(e.length)||"/"}function kA(n,e,t){const i=e.matched.length-1,r=t.matched.length-1;return i>-1&&i===r&&Do(e.matched[i],t.matched[r])&&sy(e.params,t.params)&&n(e.query)===n(t.query)&&e.hash===t.hash}function Do(n,e){return(n.aliasOf||n)===(e.aliasOf||e)}function sy(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(!BA(n[t],e[t]))return!1;return!0}function BA(n,e){return di(n)?hm(n,e):di(e)?hm(e,n):n===e}function hm(n,e){return di(e)?n.length===e.length&&n.every((t,i)=>t===e[i]):n.length===1&&n[0]===e}function HA(n,e){if(n.startsWith("/"))return n;if(!n)return e;const t=e.split("/"),i=n.split("/"),r=i[i.length-1];(r===".."||r===".")&&i.push("");let s=t.length-1,o,a;for(o=0;o<i.length;o++)if(a=i[o],a!==".")if(a==="..")s>1&&s--;else break;return t.slice(0,s).join("/")+"/"+i.slice(o).join("/")}const Yn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let hh=(function(n){return n.pop="pop",n.push="push",n})({}
vendor: 21,839 bytes, lines 23-27
23),Hu=(function(n){return n.back="back",n.forward="forward",n.unknown="",n})({});function zA(n){if(!n)if(ao){const e=document.querySelector("base");n=e&&e.getAttribute("href")||"/",n=n.replace(/^\w+:\/\/[^\/]+/,"")}else n="/";return n[0]!=="/"&&n[0]!=="#"&&(n="/"+n),UA(n)}const VA=/^[^#]+#/;function GA(n,e){return n.replace(VA,"#")+e}function WA(n,e){const t=document.documentElement.getBoundingClientRect(),i=n.getBoundingClientRect();return{behavior:e.behavior,left:i.left-t.left-(e.left||0),top:i.top-t.top-(e.top||0)}}const iu=()=>({left:window.scrollX,top:window.scrollY});function XA(n){let e;if("el"in n){const t=n.el,i=typeof t=="string"&&t.startsWith("#"),r=typeof t=="string"?i?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!r)return;e=WA(r,n)}else e=n;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function dm(n,e){return(history.state?history.state.position-e:-1)+n}const dh=new Map;function jA(n,e){dh.set(n,e)}function qA(n){const e=dh.get(n);return dh.delete(n),e}function $A(n){return typeof n=="string"||n&&typeof n=="object"}function oy(n){return typeof n=="string"||typeof n=="symbol"}let Et=(function(n){return n[n.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",n[n.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",n[n.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",n[n.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",n[n.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",n})({});const ay=Symbol("");Et.MATCHER_NOT_FOUND+"",Et.NAVIGATION_GUARD_REDIRECT+"",Et.NAVIGATION_ABORTED+"",Et.NAVIGATION_CANCELLED+"",Et.NAVIGATION_DUPLICATED+"";function No(n,e){return Ye(new Error,{type:n,[ay]:!0},e)}function Ui(n,e){return n instanceof Error&&ay in n&&(e==null||!!(n.type&e))}const KA=["params","query","hash"];function YA(n){if(typeof n=="string")return n;if(n.path!=null)return n.path;const e={};for(const t of KA)t in n&&(e[t]=n[t]);return JSON.stringify(e,null,2)}function ZA(n){const e={};if(n===""||n==="?")return e;const t=(n[0]==="?"?n.slice(1):n).split("&");for(let i=0;i<t.length;++i){const r=t[i].replace(ty," "),s=r.indexOf("="),o=Wa(s<0?r:r.slice(0,s)),a=s<0?null:Wa(r.slice(s+1));if(o in e){let l=e[o];di(l)||(l=e[o]=[l]),l.push(a)}else e[o]=a}return e}function pm(n){let e="";for(let t in n){const i=n[t];if(t=IA(t),i==null){i!==void 0&&(e+=(e.length?"&":"")+t);continue}(di(i)?i.map(r=>r&&fh(r)):[i&&fh(i)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+t,r!=null&&(e+="="+r))})}return e}function JA(n){const e={};for(const t in n){const i=n[t];i!==void 0&&(e[t]=di(i)?i.map(r=>r==null?null:""+r):i==null?i:""+i)}return e}const QA=Symbol(""),mm=Symbol(""),ru=Symbol(""),Sd=Symbol(""),ph=Symbol("");function la(){let n=[];function e(i){return n.push(i),()=>{const r=n.indexOf(i);r>-1&&n.splice(r,1)}}function t(){n=[]}return{add:e,list:()=>n.slice(),reset:t}}function Er(n,e,t,i,r,s=o=>o()){const o=i&&(i.enterCallbacks[r]=i.enterCallbacks[r]||[]);return()=>new Promise((a,l)=>{const c=h=>{h===!1?l(No(Et.NAVIGATION_ABORTED,{from:t,to:e})):h instanceof Error?l(h):$A(h)?l(No(Et.NAVIGATION_GUARD_REDIRECT,{from:e,to:h})):(o&&i.enterCallbacks[r]===o&&typeof h=="function"&&o.push(h),a())},u=s(()=>n.call(i&&i.instances[r],e,t,c));let f=Promise.resolve(u);n.length<3&&(f=f.then(c)),f.catch(h=>l(h))})}function zu(n,e,t,i,r=s=>s()){const s=[];for(const o of n)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(Qv(l)){const c=(l.__vccOpts||l)[e];c&&s.push(Er(c,t,i,o,a,r))}else{let c=l();s.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const f=SA(u)?u.default:u;o.mods[a]=u,o.components[a]=f;const h=(f.__vccOpts||f)[e];return h&&Er(h,t,i,o,a,r)()}))}}return s}function ew(n,e){const t=[],i=[],r=[],s=Math.max(e.matched.length,n.matched.length);for(let o=0;o<s;o++){const a=e.matched[o];a&&(n.matched.find(c=>Do(c,a))?i.push(a):t.push(a));const l=n.matched[o];l&&(e.matched.find(c=>Do(c,l))||r.push(l))}return[t,i,r]}/*! 24 * vue-router v4.6.3 25 * (c) 2025 Eduardo San Martin Morote 26 * @license MIT 27 */let tw=()=>location.protocol+"//"+location.host;function ly(n,e){const{pathname:t,search:i,hash:r}=e,s=n.indexOf("#");if(s>-1){let o=r.includes(n.slice(s))?n.slice(s).length:1,a=r.slice(o);return a[0]!=="/"&&(a="/"+a),fm(a,"")}return fm(t,n)+i+r}function nw(n,e,t,i){let r=[],s=[],o=null;const a=({state:h})=>{const d=ly(n,location),_=t.value,m=e.value;let p=0;if(h){if(t.value=d,e.value=h,o&&o===_){o=null;return}p=m?h.position-m.position:0}else i(d);r.forEach(g=>{g(t.value,_,{delta:p,type:hh.pop,direction:p?p>0?Hu.forward:Hu.back:Hu.unknown})})};function l(){o=t.value}function c(h){r.push(h);const d=()=>{const _=r.indexOf(h);_>-1&&r.splice(_,1)};return s.push(d),d}function u(){if(document.visibilityState==="hidden"){const{history:h}=window;if(!h.state)return;h.replaceState(Ye({},h.state,{scroll:iu()}),"")}}function f(){for(const h of s)h();s=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:l,listen:c,destroy:f}}function gm(n,e,t,i=!1,r=!1){return{back:n,current:e,forward:t,replaced:i,position:window.history.length,scroll:r?iu():null}}function iw(n){const{history:e,location:t}=window,i={value:ly(n,t)},r={value:e.state};r.value||s(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function s(l,c,u){const f=n.indexOf("#"),h=f>-1?(t.host&&document.querySelector("base")?n:n.slice(f))+l:tw()+n+l;try{e[u?"replaceState":"pushState"](c,"",h),r.value=c}catch(d){console.error(d),t[u?"replace":"assign"](h)}}function o(l,c){s(l,Ye({},e.state,gm(r.value.back,l,r.value.forward,!0),c,{position:r.value.position}),!0),i.value=l}function a(l,c){const u=Ye({},r.value,e.state,{forward:l,scroll:iu()});s(u.current,u,!0),s(l,Ye({},gm(i.value,l,null),{position:u.position+1},c),!1),i.value=l}return{location:i,state:r,push:a,replace:o}}function rw(n){n=zA(n);const e=iw(n),t=nw(n,e.state,e.location,e.replace);function i(s,o=!0){o||t.pauseListeners(),history.go(s)}const r=Ye({location:"",base:n,go:i,createHref:GA.bind(null,n)},e,t);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>e.state.value}),r}let _s=(function(n){return n[n.Static=0]="Static",n[n.Param=1]="Param",n[n.Group=2]="Group",n})({});var Nt=(function(n){return n[n.Static=0]="Static",n[n.Param=1]="Param",n[n.ParamRegExp=2]="ParamRegExp",n[n.ParamRegExpEnd=3]="ParamRegExpEnd",n[n.EscapeNext=4]="EscapeNext",n})(Nt||{});const sw={type:_s.Static,value:""},ow=/[a-zA-Z0-9_]/;function aw(n){if(!n)return[[]];if(n==="/")return[[sw]];if(!n.startsWith("/"))throw new Error(`Invalid path "${n}"`);function e(d){throw new Error(`ERR (${t})/"${c}": ${d}`)}let t=Nt.Static,i=t;const r=[];let s;function o(){s&&r.push(s),s=[]}let a=0,l,c="",u="";function f(){c&&(t===Nt.Static?s.push({type:_s.Static,value:c}):t===Nt.Param||t===Nt.ParamRegExp||t===Nt.ParamRegExpEnd?(s.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),s.push({type:_s.Param,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function h(){c+=l}for(;a<n.length;){if(l=n[a++],l==="\\"&&t!==Nt.ParamRegExp){i=t,t=Nt.EscapeNext;continue}switch(t){case Nt.Static:l==="/"?(c&&f(),o()):l===":"?(f(),t=Nt.Param):h();break;case Nt.EscapeNext:h(),t=i;break;case Nt.Param:l==="("?t=Nt.ParamRegExp:ow.test(l)?h():(f(),t=Nt.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case Nt.ParamRegExp:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:t=Nt.ParamRegExpEnd:u+=l;break;case Nt.ParamRegExpEnd:f(),t=Nt.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:e("Unknown state");break}}return t===Nt.ParamRegExp&&e(`Unfinished custom RegExp for param "${c}"`),f(),o(),r}const _m="[^/]+?",lw={sensitive:!1,strict:!1,start:!0,end:!0};var dn=(function(n){return n[n._multiplier=10]="_multiplier",n[n.Root=90]="Root",n[n.Segment=40]="Segment",n[n.SubSegment=30]="SubSegment",n[n.Static=40]="Static",n[n.Dynamic=20]="Dynamic",n[n.BonusCustomRegExp=10]="BonusCustomRegExp",n[n.BonusWildcard=-50]="BonusWildcard",n[n.BonusRepeatable=-20]="BonusRepeatable",n[n.BonusOptional=-8]="BonusOptional",n[n.BonusStrict=.7000000000000001]="BonusStrict",n[n.BonusCaseSensitive=.25]="BonusCaseSensitive",n})(dn||{});const cw=/[.+*?^${}()[\]/\\]/g;function uw(n,e){const t=Ye({},lw,e),i=[];let r=t.start?"^":"";const s=[];for(const c of n){const u=c.length?[]:[dn.Root];t.strict&&!c.length&&(r+="/");for(let f=0;f<c.length;f++){const h=c[f];let d=dn.Segment+(t.sensitive?dn.BonusCaseSensitive:0);if(h.type===_s.Static)f||(r+="/"),r+=h.value.replace(cw,"\\$&"),d+=dn.Static;else if(h.type===_s.Param){const{value:_,repeatable:m,optional:p,regexp:g}=h;s.push({name:_,repeatable:m,optional:p});const x=g||_m;if(x!==_m){d+=dn.BonusCustomRegExp;try{`${x}`}catch(y){throw new Error(`Invalid custom RegExp for param "${_}" (${x}): `+y.message)}}let v=m?`((?:${x})(?:/(?:${x}))*)`:`(${x})`;f||(v=p&&c.length<2?`(?:/${v})`:"/"+v),p&&(v+="?"),r+=v,d+=dn.Dynamic,p&&(d+=dn.BonusOptional),m&&(d+=dn.BonusRepeatable),x===".*"&&(d+=dn.BonusWildcard)}u.push(d)}i.push(u)}if(t.strict&&t.end){const c=i.length-1;i[c][i[c].length-1]+=dn.BonusStrict}t.strict||(r+="/?"),t.end?r+="$":t.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const o=new RegExp(r,t.sensitive?"":"i");function a(c){const u=c.match(o),f={};if(!u)return null;for(let h=1;h<u.length;h++){const d=u[h]||"",_=s[h-1];f[_.name]=d&&_.repeatable?d.split("/"):d}return f}function l(c){let u="",f=!1;for(const h of n){(!f||!u.endsWith("/"))&&(u+="/"),f=!1;for(const d of h)if(d.type===_s.Static)u+=d.value;else if(d.type===_s.Param){const{value:_,repeatable:m,optional:p}=d,g=_ in c?c[_]:"";if(di(g)&&!m)throw new Error(`Provided param "${_}" is an array but it is not repeatable (* or + modifiers)`);const x=di(g)?g.join("/"):g;if(!x)if(p)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):f=!0);else throw new Error(`Missing required param "${_}"`);u+=x}}return u||"/"}return{re:o,score:i,keys:s,parse:a,stringify:l}}function fw(n,e){let t=0;for(;t<n.length&&t<e.length;){const i=e[t]-n[t];if(i)return i;t++}return n.length<e.length?n.length===1&&n[0]===dn.Static+dn.Segment?-1:1:n.length>e.length?e.length===1&&e[0]===dn.Static+dn.Segment?1:-1:0}function cy(n,e){let t=0;const i=n.score,r=e.score;for(;t<i.length&&t<r.length;){const s=fw(i[t],r[t]);if(s)return s;t++}if(Math.abs(r.length-i.length)===1){if(vm(i))return 1;if(vm(r))return-1}return r.length-i.length}function vm(n){const e=n[n.length-1];return n.length>0&&e[e.length-1]<0}const hw={strict:!1,end:!0,sensitive:!1};function dw(n,e,t){const i=uw(aw(n.path),t),r=Ye(i,{record:n,parent:e,children:[],alias:[]});return e&&!r.record.aliasOf==!e.record.aliasOf&&e.children.push(r),r}function pw(n,e){const t=[],i=new Map;e=um(hw,e);function r(f){return i.get(f)}function s(f,h,d){const _=!d,m=xm(f);m.aliasOf=d&&d.record;const p=um(e,f),g=[m];if("alias"in f){const y=typeof f.alias=="string"?[f.alias]:f.alias;for(const T of y)g.push(xm(Ye({},m,{components:d?d.record.components:m.components,path:T,aliasOf:d?d.record:m})))}let x,v;for(const y of g){const{path:T}=y;if(h&&T[0]!=="/"){const b=h.record.path,A=b[b.length-1]==="/"?"":"/";y.path=h.record.path+(T&&A+T)}if(x=dw(y,h,p),d?d.alias.push(x):(v=v||x,v!==x&&v.alias.push(x),_&&f.name&&!Sm(x)&&o(f.name)),uy(x)&&l(x),m.children){const b=m.children;for(let A=0;A<b.length;A++)s(b[A],x,d&&d.children[A])}d=d||x}return v?()=>{o(v)}:La}function o(f){if(oy(f)){const h=i.get(f);h&&(i.delete(f),t.splice(t.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=t.indexOf(f);h>-1&&(t.splice(h,1),f.record.name&&i.delete(f.record.name),f.children.forEach(o),f.alias.forEach(o))}}function a(){return t}function l(f){const h=_w(f,t);t.splice(h,0,f),f.record.name&&!Sm(f)&&i.set(f.record.name,f)}function c(f,h){let d,_={},m,p;if("name"in f&&f.name){if(d=i.get(f.name),!d)throw No(Et.MATCHER_NOT_FOUND,{location:f});p=d.record.name,_=Ye(ym(h.params,d.keys.filter(v=>!v.optional).concat(d.parent?d.parent.keys.filter(v=>v.optional):[]).map(v=>v.name)),f.params&&ym(f.params,d.keys.map(v=>v.name))),m=d.stringify(_)}else if(f.path!=null)m=f.path,d=t.find(v=>v.re.test(m)),d&&(_=d.parse(m),p=d.record.name);else{if(d=h.name?i.get(h.name):t.find(v=>v.re.test(h.path)),!d)throw No(Et.MATCHER_NOT_FOUND,{location:f,currentLocation:h});p=d.record.name,_=Ye({},h.params,f.params),m=d.stringify(_)}const g=[];let x=d;for(;x;)g.unshift(x.record),x=x.parent;return{name:p,path:m,params:_,matched:g,meta:gw(g)}}n.forEach(f=>s(f));function u(){t.length=0,i.clear()}return{addRoute:s,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:r}}function ym(n,e){const t={};for(const i of e)i in n&&(t[i]=n[i]);return t}function xm(n){const e={path:n.path,redirect:n.redirect,name:n.name,meta:n.meta||{},aliasOf:n.aliasOf,beforeEnter:n.beforeEnter,props:mw(n),children:n.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in n?n.components||null:n.component&&{default:n.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function mw(n){const e={},t=n.props||!1;if("component"in n)e.default=t;else for(const i in n.components)e[i]=typeof t=="object"?t[i]:t;return e}function Sm(n){for(;n;){if(n.record.aliasOf)return!0;n=n.parent}return!1}function gw(n){return n.reduce((e,t)=>Ye(e,t.meta),{})}function _w(n,e){let t=0,i=e.length;for(;t!==i;){const s=t+i>>1;cy(n,e[s])<0?i=s:t=s+1}const r=vw(n);return r&&(i=e.lastIndexOf(r,i-1)),i}function vw(n){let e=n;for(;e=e.parent;)if(uy(e)&&cy(n,e)===0)return e}function uy({record:n}){return!!(n.name||n.components&&Object.keys(n.components).length||n.redirect)}function Mm(n){const e=Wt(ru),t=Wt(Sd),i=xt(()=>{const l=bt(n.to);return e.resolve(l)}),r=xt(()=>{const{matched:l}=i.value,{length:c}=l,u=l[c-1],f=t.matched;if(!u||!f.length)return-1;const h=f.findIndex(Do.bind(null,u));if(h>-1)return h;const d=Tm(l[c-2]);return c>1&&Tm(u)===d&&f[f.length-1].path!==d?f.findIndex(Do.bind(null,l[c-2])):h}),s=xt(()=>r.value>-1&&Tw(t.params,i.value.params)),o=xt(()=>r.value>-1&&r.value===t.matched.length-1&&sy(t.params,i.value.params));function a(l={}){if(Mw(l)){const c=e[bt(n.replace)?"replace":"push"](bt(n.to)).catch(La);return n.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:i,href:xt(()=>i.value.href),isActive:s,isExactActive:o,navigate:a}}function yw(n){return n.length===1?n[0]:n}const xw=cr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Mm,setup(n,{slots:e}){const t=ti(Mm(n)),{options:i}=Wt(ru),r=xt(()=>({[Em(n.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[Em(n.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const s=e.default&&yw(e.default(t));return n.custom?s:Gt("a",{"aria-current":t.isExactActive?n.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:r.value},s)}}}),Sw=xw;function Mw(n){if(!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)&&!n.defaultPrevented&&!(n.button!==void 0&&n.button!==0)){if(n.currentTarget&&n.currentTarget.getAttribute){const e=n.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return n.preventDefault&&n.preventDefault(),!0}}function Tw(n,e){for(const t in e){const i=e[t],r=n[t];if(typeof i=="string"){if(i!==r)return!1}else if(!di(r)||r.length!==i.length||i.some((s,o)=>s!==r[o]))return!1}return!0}function Tm(n){return n?n.aliasOf?n.aliasOf.path:n.path:""}const Em=(n,e,t)=>n??e??t,Ew=cr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(n,{attrs:e,slots:t}){const i=Wt(ph),r=xt(()=>n.route||i.value),s=Wt(mm,0),o=xt(()=>{let c=bt(s);const{matched:u}=r.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),a=xt(()=>r.value.matched[o.value]);Ur(mm,xt(()=>o.value+1)),Ur(QA,a),Ur(ph,r);const l=zn();return vo(()=>[l.value,a.value,n.name],([c,u,f],[h,d,_])=>{u&&(u.instances[f]=c,d&&d!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=d.leaveGuards),u.updateGuards.size||(u.updateGuards=d.updateGuards))),c&&u&&(!d||!Do(u,d)||!h)&&(u.enterCallbacks[f]||[]).forEach(m=>m(c))},{flush:"post"}),()=>{const c=r.value,u=n.name,f=a.value,h=f&&f.components[u];if(!h)return bm(t.default,{Component:h,route:c});const d=f.props[u],_=d?d===!0?c.params:typeof d=="function"?d(c):d:null,p=Gt(h,Ye({},_,e,{onVnodeUnmounted:g=>{g.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return bm(t.default,{Component:p,route:c})||p}}});function bm(n,e){if(!n)return null;const t=n(e);return t.length===1?t[0]:t}const fy=Ew;function bw(n){const e=pw(n.routes,n),t=n.parseQuery||ZA,i=n.stringifyQuery||pm,r=n.history,s=la(),o=la(),a=la(),l=Cs(Yn);let c=Yn;ao&&n.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=ku.bind(null,W=>""+W),f=ku.bind(null,NA),h=ku.bind(null,Wa);function d(W,oe){let ie,he;return oy(W)?(ie=e.getRecordMatcher(W),he=oe):he=W,e.addRoute(he,ie)}function _(W){const oe=e.getRecordMatcher(W);oe&&e.removeRoute(oe)}function m(){return e.getRoutes().map(W=>W.record)}function p(W){return!!e.getRecordMatcher(W)}function g(W,oe){if(oe=Ye({},oe||l.value),typeof W=="string"){const D=Bu(t,W,oe.path),k=e.resolve({path:D.path},oe),te=r.createHref(D.fullPath);return Ye(D,k,{params:h(k.params),hash:Wa(D.hash),redirectedFrom:void 0,href:te})}let ie;if(W.path!=null)ie=Ye({},W,{path:Bu(t,W.path,oe.path).path});else{const D=Ye({},W.params);for(const k in D)D[k]==null&&delete D[k];ie=Ye({},W,{params:f(D)}),oe.params=f(oe.params)}const he=e.resolve(ie,oe),H=W.hash||"";he.params=u(h(he.params));const Te=FA(i,Ye({},W,{hash:LA(H),path:he.path})),R=r.createHref(Te);return Ye({fullPath:Te,hash:H,query:i===pm?JA(W.query):W.query||{}},he,{redirectedFrom:void 0,href:R})}function x(W){return typeof W=="string"?Bu(t,W,l.value.path):Ye({},W)}function v(W,oe){if(c!==W)return No(Et.NAVIGATION_CANCELLED,{from:oe,to:W})}function y(W){return A(W)}function T(W){return y(Ye(x(W),{replace:!0}))}function b(W,oe){const ie=W.matched[W.matched.length-1];if(ie&&ie.redirect){const{redirect:he}=ie;let H=typeof he=="function"?he(W,oe):he;return typeof H=="string"&&(H=H.includes("?")||H.includes("#")?H=x(H):{path:H},H.params={}),Ye({query:W.query,hash:W.hash,params:H.path!=null?{}:W.params},H)}}function A(W,oe){const ie=c=g(W),he=l.value,H=W.state,Te=W.force,R=W.replace===!0,D=b(ie,he);if(D)return A(Ye(x(D),{state:typeof D=="object"?Ye({},H,D.state):H,force:Te,replace:R}),oe||ie);const k=ie;k.redirectedFrom=oe;let te;return!Te&&kA(i,he,ie)&&(te=No(Et.NAVIGATION_DUPLICATED,{to:k,from:he}),me(he,he,!0,!1)),(te?Promise.resolve(te):M(k,he)).catch(w=>Ui(w)?Ui(w,Et.NAVIGATION_GUARD_REDIRECT)?w:ae(w):U(w,k,he)).then(w=>{if(w){if(Ui(w,Et.NAVIGATION_GUARD_REDIRECT))return A(Ye({replace:R},x(w.to),{state:typeof w.to=="object"?Ye({},H,w.to.state):H,force:Te}),oe||k)}else w=I(k,he,!0,R,H);return O(k,he,w),w})}function P(W,oe){const ie=v(W,oe);return ie?Promise.reject(ie):Promise.resolve()}function S(W){const oe=Q.values().next().value;return oe&&typeof oe.runWithContext=="function"?oe.runWithContext(W):W()}function M(W,oe){let ie;const[he,H,Te]=ew(W,oe);ie=zu(he.reverse(),"beforeRouteLeave",W,oe);for(const D of he)D.leaveGuards.forEach(k=>{ie.push(Er(k,W,oe))});const R=P.bind(null,W,oe);return ie.push(R),ve(ie).then(()=>{ie=[];for(const D of s.list())ie.push(Er(D,W,oe));return ie.push(R),ve(ie)}).then(()=>{ie=zu(H,"beforeRouteUpdate",W,oe);for(const D of H)D.updateGuards.forEach(k=>{ie.push(Er(k,W,oe))});return ie.push(R),ve(ie)}).then(()=>{ie=[];for(const D of Te)if(D.beforeEnter)if(di(D.beforeEnter))for(const k of D.beforeEnter)ie.push(Er(k,W,oe));else ie.push(Er(D.beforeEnter,W,oe));return ie.push(R),ve(ie)}).then(()=>(W.matched.forEach(D=>D.enterCallbacks={}),ie=zu(Te,"beforeRouteEnter",W,oe,S),ie.push(R),ve(ie))).then(()=>{ie=[];for(const D of o.list())ie.push(Er(D,W,oe));return ie.push(R),ve(ie)}).catch(D=>Ui(D,Et.NAVIGATION_CANCELLED)?D:Promise.reject(D))}function O(W,oe,ie){a.list().forEach(he=>S(()=>he(W,oe,ie)))}function I(W,oe,ie,he,H){const Te=v(W,oe);if(Te)return Te;const R=oe===Yn,D=ao?history.state:{};ie&&(he||R?r.replace(W.fullPath,Ye({scroll:R&&D&&D.scroll},H)):r.push(W.fullPath,H)),l.value=W,me(W,oe,ie,R),ae()}let L;function V(){L||(L=r.listen((W,oe,ie)=>{if(!le.listening)return;const he=g(W),H=b(he,le.currentRoute.value);if(H){A(Ye(H,{replace:!0,force:!0}),he).catch(La);return}c=he;const Te=l.value;ao&&jA(dm(Te.fullPath,ie.delta),iu()),M(he,Te).catch(R=>Ui(R,Et.NAVIGATION_ABORTED|Et.NAVIGATION_CANCELLED)?R:Ui(R,Et.NAVIGATION_GUARD_REDIRECT)?(A(Ye(x(R.to),{force:!0}),he).then(D=>{Ui(D,Et.NAVIGATION_ABORTED|Et.NAVIGATION_DUPLICATED)&&!ie.delta&&ie.type===hh.pop&&r.go(-1,!1)}).catch(La),Promise.reject()):(ie.delta&&r.go(-ie.delta,!1),U(R,he,Te))).then(R=>{R=R||I(he,Te,!1),R&&(ie.delta&&!Ui(R,Et.NAVIGATION_CANCELLED)?r.go(-ie.delta,!1):ie.type===hh.pop&&Ui(R,Et.NAVIGATION_ABORTED|Et.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),O(he,Te,R)}).catch(La)}))}let $=la(),G=la(),J;function U(W,oe,ie){ae(W);const he=G.list();return he.length?he.forEach(H=>H(W,oe,ie)):console.error(W),Promise.reject(W)}function ne(){return J&&l.value!==Yn?Promise.resolve():new Promise((W,oe)=>{$.add([W,oe])})}
27function ae(W){return J||(J=!W,V(),$.list().forEach(([oe,ie])=>W?ie(W):oe()),$.reset()),W}function me(W,oe,ie,he){const{scrollBehavior:H}=n;if(!ao||!H)return Promise.resolve();const Te=!ie&&qA(dm(W.fullPath,0))||(he||!ie)&&history.state&&history.state.scroll||null;return Ro().then(()=>H(W,oe,Te)).then(R=>R&&XA(R)).catch(R=>U(R,W,oe))}const Ee=W=>r.go(W);let Ue;const Q=new Set,le={currentRoute:l,listening:!0,addRoute:d,removeRoute:_,clearRoutes:e.clearRoutes,hasRoute:p,getRoutes:m,resolve:g,options:n,push:y,replace:T,go:Ee,back:()=>Ee(-1),forward:()=>Ee(1),beforeEach:s.add,beforeResolve:o.add,afterEach:a.add,onError:G.add,isReady:ne,install(W){W.component("RouterLink",Sw),W.component("RouterView",fy),W.config.globalProperties.$router=le,Object.defineProperty(W.config.globalProperties,"$route",{enumerable:!0,get:()=>bt(l)}),ao&&!Ue&&l.value===Yn&&(Ue=!0,y(r.location).catch(he=>{}));const oe={};for(const he in Yn)Object.defineProperty(oe,he,{get:()=>l.value[he],enumerable:!0});W.provide(ru,le),W.provide(Sd,Ti(oe)),W.provide(ph,l);const ie=W.unmount;Q.add(W),W.unmount=function(){Q.delete(W),Q.size<1&&(c=Yn,L&&L(),L=null,l.value=Yn,Ue=!1,J=!1),ie()}}};function ve(W){return W.reduce((oe,ie)=>oe.then(()=>S(ie)),Promise.resolve())}return le}function G2(){return Wt(ru)}function Md(n){return Wt(Sd)}const hy=(n,e)=>({default:()=>n?Gt(bT,n===!0?{}:n,e):e.default?.()}),Aw=/(:\w+)\([^)]+\)/g,ww=/(:\w+)[?+*]/g,Rw=/:\w+/g;function Am(n){const e=n?.meta.key??n.path.replace(Aw,"$1").replace(ww,"$1").replace(Rw,t=>n.params[t.slice(1)]?.toString()||"");return typeof e=="function"?e(n):e}function Cw(n,e){return n===e||e===Yn?!1:Am(n)!==Am(e)?!0:!n.matched.every((i,r)=>i.components&&i.components.default===e.matched[r]?.components?.default)}const mh=globalThis.requestIdleCallback||(n=>{const e=Date.now(),t={didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-e))};return setTimeout(()=>{n(t)},1)}),Pw=globalThis.cancelIdleCallback||(n=>{clearTimeout(n)}),su=n=>{const e=gt();e.isHydrating?e.hooks.hookOnce("app:suspense:resolve",()=>{mh(()=>n())}):mh(()=>n())},Lw="$s";function dy(...n){const e=typeof n[n.length-1]=="string"?n.pop():void 0;typeof n[0]!="string"&&n.unshift(e);const[t,i]=n;if(!t||typeof t!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+t);if(i!==void 0&&typeof i!="function")throw new Error("[nuxt] [useState] init must be a function: "+i);const r=Lw+t,s=gt(),o=M0(s.payload.state,r);if(o.value===void 0&&i){const a=i();if(It(a))return s.payload.state[r]=a,a;o.value=a}return o}function Iw(n){if(n?.__asyncLoader&&!n.__asyncResolved)return n.__asyncLoader()}async function py(n,e=Mn()){const{path:t,matched:i}=e.resolve(n);if(!i.length||(e._routePreloaded||=new Set,e._routePreloaded.has(t)))return;const r=e._preloadPromises||=[];if(r.length>4)return Promise.all(r).then(()=>py(n,e));e._routePreloaded.add(t);for(const s of i){const o=s.components?.default;if(typeof o!="function")continue;const a=Promise.resolve(o()).catch(()=>{}).finally(()=>r.splice(r.indexOf(a)));r.push(a)}await Promise.all(r)}function Dw(n={}){const e=n.path||window.location.pathname;let t={};try{t=Ec(sessionStorage.getItem("nuxt:reload")||"{}")}catch{}if(n.force||t?.path!==e||t?.expires<Date.now()){try{sessionStorage.setItem("nuxt:reload",JSON.stringify({path:e,expires:Date.now()+(n.ttl??1e4)}))}catch{}if(n.persistState)try{sessionStorage.setItem("nuxt:reload:state",JSON.stringify({state:gt().payload.state}))}catch{}window.location.pathname!==e?window.location.href=e:window.location.reload()}}const Nw={scrollBehavior(n,e,t){const i=gt(),r=Mn().options?.scrollBehaviorType??"auto";if(n.path.replace(/\/$/,"")===e.path.replace(/\/$/,""))return e.hash&&!n.hash?{left:0,top:0}:n.hash?{el:n.hash,top:my(n.hash),behavior:r}:!1;if((typeof n.meta.scrollToTop=="function"?n.meta.scrollToTop(n,e):n.meta.scrollToTop)===!1)return!1;const o=i._runningTransition?"page:transition:finish":"page:loading:end";return new Promise(a=>{if(e===Yn){a(wm(n,e,t,r));return}i.hooks.hookOnce(o,()=>{requestAnimationFrame(()=>a(wm(n,e,t,r)))})})}};function my(n){try{const e=document.querySelector(n);if(e)return(Number.parseFloat(getComputedStyle(e).scrollMarginTop)||0)+(Number.parseFloat(getComputedStyle(document.documentElement).scrollPaddingTop)||0)}catch{}return 0}function wm(n,e,t,i){if(t)return t;const r=Cw(n,e);return n.hash?{el:n.hash,top:my(n.hash),behavior:r?i:"instant"}:{left:0,top:0}}const Ow={hashMode:!1,scrollBehaviorType:"auto"},pr={...Ow,...Nw},Uw=(...n)=>n.find(e=>e!==void 0);function Fw(n){const e=n.componentName||"NuxtLink";function t(s){return typeof s=="string"&&s.startsWith("#")}function i(s,o,a){const l=a??n.trailingSlash;if(!s||l!=="append"&&l!=="remove")return s;if(typeof s=="string")return wl(s,l);const c="path"in s&&s.path!==void 0?s.path:o(s).path;return{...s,name:void 0,path:wl(c,l)}}function r(s){const o=Mn(),a=ol(),l=xt(()=>!!s.target&&s.target!=="_self"),c=xt(()=>{const p=s.to||s.href||"";return typeof p=="string"&&Ci(p,{acceptRelative:!0})}),u=yp("RouterLink"),f=typeof u!="string"?u.useLink:void 0,h=xt(()=>{if(s.external)return!0;const p=s.to||s.href||"";return typeof p=="object"?!1:p===""||c.value}),d=xt(()=>{const p=s.to||s.href||"";return h.value?p:i(p,o.resolve,s.trailingSlash)}),_=h.value?void 0:f?.({...s,to:d}),m=xt(()=>{const p=s.trailingSlash??n.trailingSlash;if(!d.value||c.value||t(d.value))return d.value;if(h.value){const g=typeof d.value=="object"&&"path"in d.value?oh(d.value):d.value,x=typeof g=="object"?o.resolve(g).href:g;return wl(x,p)}return typeof d.value=="object"?o.resolve(d.value)?.href??null:wl(tu(a.app.baseURL,d.value),p)});return{to:d,hasTarget:l,isAbsoluteUrl:c,isExternal:h,href:m,isActive:_?.isActive??xt(()=>d.value===o.currentRoute.value.path),isExactActive:_?.isExactActive??xt(()=>d.value===o.currentRoute.value.path),route:_?.route??xt(()=>o.resolve(d.value)),async navigate(p){await Sb(m.value,{replace:s.replace,external:h.value||l.value})}}}return cr({name:e,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1},trailingSlash:{type:String,default:void 0,required:!1}},useLink:r,setup(s,{slots:o}){const a=Mn(),{to:l,href:c,navigate:u,isExternal:f,hasTarget:h,isAbsoluteUrl:d}=r(s),_=Cs(!1),m=zn(null),p=v=>{m.value=s.custom?v?.$el?.nextElementSibling:v?.$el};function g(v){return!_.value&&(typeof s.prefetchOn=="string"?s.prefetchOn===v:s.prefetchOn?.[v]??n.prefetchOn?.[v])&&(s.prefetch??n.prefetch)!==!1&&s.noPrefetch!==!0&&s.target!=="_blank"&&!Hw()}async function x(v=gt()){if(_.value)return;_.value=!0;const y=typeof l.value=="string"?l.value:f.value?oh(l.value):a.resolve(l.value).fullPath,T=f.value?new URL(y,window.location.href).href:y;await Promise.all([v.hooks.callHook("link:prefetch",T).catch(()=>{}),!f.value&&!h.value&&py(l.value,a).catch(()=>{})])}if(g("visibility")){const v=gt();let y,T=null;Zo(()=>{const b=kw();su(()=>{y=mh(()=>{m?.value?.tagName&&(T=b.observe(m.value,async()=>{T?.(),T=null,await x(v)}))})})}),Fs(()=>{y&&Pw(y),T?.(),T=null})}return()=>{if(!f.value&&!h.value&&!t(l.value)){const T={ref:p,to:l.value,activeClass:s.activeClass||n.activeClass,exactActiveClass:s.exactActiveClass||n.exactActiveClass,replace:s.replace,ariaCurrentValue:s.ariaCurrentValue,custom:s.custom};
27return s.custom||(g("interaction")&&(T.onPointerenter=x.bind(null,void 0),T.onFocus=x.bind(null,void 0)),_.value&&(T.class=s.prefetchedClass||n.prefetchedClass),T.rel=s.rel||void 0),Gt(yp("RouterLink"),T,o.default)}const v=s.target||null,y=Uw(s.noRel?"":s.rel,n.externalRelAttribute,d.value||h.value?"noopener noreferrer":"")||null;return s.custom?o.default?o.default({href:c.value,navigate:u,prefetch:x,get route(){if(!c.value)return;const T=new URL(c.value,window.location.href);return{path:T.pathname,fullPath:T.pathname,get query(){return dd(T.search)},hash:T.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:c.value}},rel:y,target:v,isExternal:f.value||h.value,isActive:!1,isExactActive:!1}):null:Gt("a",{ref:m,href:c.value||null,rel:y,target:v,onClick:T=>{if(!(f.value||h.value))return T.preventDefault(),s.replace?a.replace(c.value):a.push(c.value)}},o.default?.())}}})}const gy=Fw(rb);function wl(n,e){const t=e==="append"?Mv:Io;return Ci(n)&&!n.startsWith("http")?n:t(n,!0)}function kw(){const n=gt();if(n._observer)return n._observer;let e=null;const t=new Map,i=(s,o)=>(e||=new IntersectionObserver(a=>{for(const l of a){const c=t.get(l.target);(l.isIntersecting||l.intersectionRatio>0)&&c&&c()}}),t.set(s,o),e.observe(s),()=>{t.delete(s),e?.unobserve(s),t.size===0&&(e?.disconnect(),e=null)});return n._observer={observe:i}}const Bw=/2g/;function Hw(){const n=navigator.connection;return!!(n&&(n.saveData||Bw.test(n.effectiveType)))}function zw(n){typeof n.indexable<"u"&&(n.indexable=String(n.indexable)!=="false"),typeof n.trailingSlash<"u"&&!n.trailingSlash&&(n.trailingSlash=String(n.trailingSlash)!=="false"),n.url&&!Ci(String(n.url),{acceptRelative:!0,strict:!1})&&(n.url=EE(String(n.url)));const e=Object.keys(n).sort((i,r)=>i.localeCompare(r)),t={};for(const i of e)t[i]=n[i];return t}function Vw(n){const t=[];function i(s){if(!s||typeof s!="object"||Object.keys(s).length===0)return()=>{};s._context;const o={};for(const l in s){const c=s[l];typeof c<"u"&&c!==""&&(o[l]=c)}let a;return Object.keys(o).filter(l=>!l.startsWith("_")).length>0&&(a=t.push(o)),()=>{typeof a<"u"&&t.splice(a-1,1)}}function r(s){const o={};s?.debug&&(o._context={}),o._priority={};for(const a in t.sort((l,c)=>(l._priority||0)-(c._priority||0)))for(const l in t[a]){const c=l,u=s?.resolveRefs?x0(t[a][l]):t[a][l];!l.startsWith("_")&&typeof u<"u"&&u!==""&&(o[l]=u,typeof t[a]._priority<"u"&&t[a]._priority!==-1&&(o._priority[c]=t[a]._priority),s?.debug&&(o._context[c]=t[a]._context?.[c]||t[a]._context||"anonymous"))}return s?.skipNormalize?o:zw(o)}return{stack:t,push:i,get:r}}const Gw=Ln({name:"nuxt-site-config:init",enforce:"pre",async setup(n){const e=Vw(),t=dy("site-config");{const i=t.value||window.__NUXT_SITE_CONFIG__||{};for(const r in i)r[0]!=="_"&&e.push({[r]:i[r],_priority:i._priority?.[r]||-1})}return{provide:{nuxtSiteConfig:e}}}});async function Td(n,e={}){const t=e.document||n.resolvedOptions.document;if(!t||!n.dirty)return;const i={shouldRender:!0,tags:[]};if(await n.hooks.callHook("dom:beforeRender",i),!!i.shouldRender)return n._domUpdatePromise||(n._domUpdatePromise=new Promise(async r=>{const s=new Map,o=new Promise(d=>{n.resolveTags().then(_=>{d(_.map(m=>{const p=s.get(m._d)||0,g={tag:m,id:(p?`${m._d}:${p}`:m._d)||im(m),shouldRender:!0};return m._d&&Xv(m._d)&&s.set(m._d,p+1),g}))})});let a=n._dom;if(!a){a={title:t.title,elMap:new Map().set("htmlAttrs",t.documentElement).set("bodyAttrs",t.body)};for(const d of["body","head"]){const _=t[d]?.children;for(const m of _){const p=m.tagName.toLowerCase();if(!tm.has(p))continue;const g=jv({tag:p,props:{}},{innerHTML:m.innerHTML,...m.getAttributeNames().reduce((x,v)=>(x[v]=m.getAttribute(v),x),{})||{}});if(g.key=m.getAttribute("data-hid")||void 0,g._d=lh(g)||im(g),a.elMap.has(g._d)){let x=1,v=g._d;for(;a.elMap.has(v);)v=`${g._d}:${x++}`;a.elMap.set(v,m)}else a.elMap.set(g._d,m)}}}a.pendingSideEffects={...a.sideEffects},a.sideEffects={};function l(d,_,m){const p=`${d}:${_}`;a.sideEffects[p]=m,delete a.pendingSideEffects[p]}function c({id:d,$el:_,tag:m}){const p=m.tag.endsWith("Attrs");a.elMap.set(d,_),p||(m.textContent&&m.textContent!==_.textContent&&(_.textContent=m.textContent),m.innerHTML&&m.innerHTML!==_.innerHTML&&(_.innerHTML=m.innerHTML),l(d,"el",()=>
27{_?.remove(),a.elMap.delete(d)}));for(const g in m.props){if(!Object.prototype.hasOwnProperty.call(m.props,g))continue;const x=m.props[g];if(g.startsWith("on")&&typeof x=="function"){const y=_?.dataset;if(y&&y[`${g}fired`]){const T=g.slice(0,-5);x.call(_,new Event(T.substring(2)))}_.getAttribute(`data-${g}`)!==""&&((m.tag==="bodyAttrs"?t.defaultView:_).addEventListener(g.substring(2),x.bind(_)),_.setAttribute(`data-${g}`,""));continue}const v=`attr:${g}`;if(g==="class"){if(!x)continue;for(const y of x)p&&l(d,`${v}:${y}`,()=>_.classList.remove(y)),!_.classList.contains(y)&&_.classList.add(y)}else if(g==="style"){if(!x)continue;for(const[y,T]of x)l(d,`${v}:${y}`,()=>{_.style.removeProperty(y)}),_.style.setProperty(y,T)}else x!==!1&&x!==null&&(_.getAttribute(g)!==x&&_.setAttribute(g,x===!0?"":String(x)),p&&l(d,v,()=>_.removeAttribute(g)))}}const u=[],f={bodyClose:void 0,bodyOpen:void 0,head:void 0},h=await o;for(const d of h){const{tag:_,shouldRender:m,id:p}=d;if(m){if(_.tag==="title"){t.title=_.textContent,l("title","",()=>t.title=a.title);continue}d.$el=d.$el||a.elMap.get(p),d.$el?c(d):tm.has(_.tag)&&u.push(d)}}for(const d of u){const _=d.tag.tagPosition||"head";d.$el=t.createElement(d.tag.tag),c(d),f[_]=f[_]||t.createDocumentFragment(),f[_].appendChild(d.$el)}for(const d of h)await n.hooks.callHook("dom:renderTag",d,t,l);f.head&&t.head.appendChild(f.head),f.bodyOpen&&t.body.insertBefore(f.bodyOpen,t.body.firstChild),f.bodyClose&&t.body.appendChild(f.bodyClose);for(const d in a.pendingSideEffects)a.pendingSideEffects[d]();n._dom=a,await n.hooks.callHook("dom:rendered",{renders:h}),r()}).finally(()=>{n._domUpdatePromise=void 0,n.dirty=!1})),n._domUpdatePromise}function Ww(n={}){const e=n.domOptions?.render||Td;n.document=n.document||(typeof window<"u"?document:void 0);const t=n.document?.head.querySelector('script[id="unhead:payload"]')?.innerHTML||!1;return Jb({...n,plugins:[...n.plugins||[],{key:"client",hooks:{"entries:updated":e}}],init:[t?JSON.parse(t):!1,...n.init||[]]})}function Xw(n,e){let t=0;return()=>{const i=++t;e(()=>{t===i&&n()})}}function jw(n={}){const e=Ww({domOptions:{render:Xw(()=>Td(e),t=>setTimeout(t,0))},...n});return e.install=aA(e),e}const qw={disableDefaults:!0,disableCapoSorting:!1,plugins:[tA,nA,qv,eA]},$w=Ln({name:"nuxt:head",enforce:"pre",setup(n){const e=jw(qw);n.vueApp.use(e);{let t=!0;const i=async()=>{t=!1,await Td(e)};e.hooks.hook("dom:beforeRender",r=>{r.shouldRender=!t}),n.hooks.hook("page:start",()=>{t=!0}),n.hooks.hook("page:finish",()=>{n.isHydrating||i()}),n.hooks.hook("app:error",i),n.hooks.hook("app:suspense:resolve",i)}}}),Kw=/(:\w+)\([^)]+\)/g,Yw=/(:\w+)[?+*]/g,Zw=/:\w+/g,Jw=(n,e)=>e.path.replace(Kw,"$1").replace(Yw,"$1").replace(Zw,t=>n.params[t.slice(1)]?.toString()||""),gh=(n,e)=>{const t=n.route.matched.find(r=>r.components?.default===n.Component.type),i=e??t?.meta.key??(t&&Jw(n.route,t));return typeof i=="function"?i(n.route):i},Qw=(n,e)=>({default:()=>n?Gt(MM,n===!0?{}:n,e):e});function Ed(n){return Array.isArray(n)?n:[n]}const Vu=[{name:"about",path:"/about",component:()=>tt(()=>import("./LUeVLFIC.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)},{name:"index",path:"/",component:()=>tt(()=>import("./DmxYNxTc.js"),__vite__mapDeps([7,8,9,10,5,11]),import.meta.url)},{name:"contact",path:"/contact",component:()=>tt(()=>import("./DsJAgZzG.js"),__vite__mapDeps([12,13,10,14,15,4,5,16,17]),import.meta.url)},{name:"set-life",path:"/set-life",component:()=>tt(()=>import("./BA04B6nb.js"),__vite__mapDeps([18,13,10,14,19,16,4,5,20]),import.meta.url)},{name:"interview",path:"/interview",component:()=>tt(()=>import("./6CNNkpyH.js"),__vite__mapDeps([21,4,5,22,23,24,13,10,14,15,25,26]),import.meta.url)},{name:"films",path:"/films",component:()=>tt(()=>import("./BWJls0H1.js"),__vite__mapDeps([27,28,13,10,14,29,30,31,23,32,24,15,4,5,25,22,33,34]),import.meta.url)},{name:"music",path:"/music",component:()=>tt(()=>import("./CMAY3SCi.js"),__vite__mapDeps([35,36,31,4,5,37,28,13,10,14,29,30,23,32,24,15,25,22,33,38]),import.meta.url)},{name:"commercials",path:"/commercials",component:()=>tt(()=>import("./0pOL3q3B.js"),__vite__mapDeps([39,36,31,4,5,37,28,13,10,14,29,30,23,32,24,15,25,22,33,40]),import.meta.url)},{name:"music-artist-slug",path:"/music/artist/:slug()",component:()=>tt(()=>import("./fHq7_ZZT.js"),__vite__mapDeps([41,24,13,10,14,15,4,5,25,22,33,23,42]),import.meta.url)},{name:"commercials-brands-slug",path:"/commercials/brands/:slug()",component:()=>tt(()=>import("./D7YucW3v.js"),__vite__mapDeps([43,24,13,10,14,15,4,5,25,22,33,23,44]),import.meta.url)}],eR=async(n,e)=>{let t,i;if(!n.meta?.validate)return;const r=([t,i]=xo(()=>Promise.resolve(n.meta.validate(n))),t=await t,i(),t);
27if(r===!0)return;const s=Es({fatal:!0,statusCode:r&&r.statusCode||404,statusMessage:r&&r.statusMessage||`Page Not Found: ${n.fullPath}`,data:{path:n.fullPath}});return typeof window<"u"&&window.history.pushState({},"",e.fullPath),s},tR=async n=>{let e,t;const i=([e,t]=xo(()=>yd({path:n.path})),e=await e,t(),e);if(i.redirect)return Ci(i.redirect,{acceptRelative:!0})?(window.location.href=i.redirect,!1):i.redirect},nR=[eR,tR],_h={};function iR(n,e,t){const{pathname:i,search:r,hash:s}=e,o=n.indexOf("#");if(o>-1){const c=s.includes(n.slice(o))?n.slice(o).length:1;let u=s.slice(c);return u[0]!=="/"&&(u="/"+u),Xp(u,"")}const a=Xp(i,n),l=!t||AE(a,t)?a:t;return l+(l.includes("?")?"":r)+s}const rR=Ln({name:"nuxt:router",enforce:"pre",async setup(n){let e,t,i=ol().app.baseURL;const r=pr.history?.(i)??rw(i),s=pr.routes?([e,t]=xo(()=>pr.routes(Vu)),e=await e,t(),e??Vu):Vu;let o;const a=bw({...pr,scrollBehavior:(p,g,x)=>{if(g===Yn){o=x;return}if(pr.scrollBehavior){if(a.options.scrollBehavior=pr.scrollBehavior,"scrollRestoration"in window.history){const v=a.beforeEach(()=>{v(),window.history.scrollRestoration="manual"})}return pr.scrollBehavior(p,Yn,o||x)}},history:r,routes:s});"scrollRestoration"in window.history&&(window.history.scrollRestoration="auto"),n.vueApp.use(a);const l=Cs(a.currentRoute.value);a.afterEach((p,g)=>{l.value=g}),Object.defineProperty(n.vueApp.config.globalProperties,"previousRoute",{get:()=>l.value});const c=iR(i,window.location,n.payload.path),u=Cs(a.currentRoute.value),f=()=>{u.value=a.currentRoute.value};n.hook("page:finish",f),a.afterEach((p,g)=>{p.matched[p.matched.length-1]?.components?.default===g.matched[g.matched.length-1]?.components?.default&&f()});const h={};for(const p in u.value)Object.defineProperty(h,p,{get:()=>u.value[p],enumerable:!0});n._route=Ti(h),n._middleware||={global:[],named:{}};const d=ll();a.afterEach(async(p,g,x)=>{delete n._processingMiddleware,!n.isHydrating&&d.value&&await n.runWithContext(Mb),x&&await n.callHook("page:loading:end")});try{[e,t]=xo(()=>a.isReady()),await e,t()}catch(p){[e,t]=xo(()=>n.runWithContext(()=>fs(p))),await e,t()}const _=c!==a.currentRoute.value.fullPath?a.resolve(c):a.currentRoute.value;f();const m=n.payload.state._layout;return a.beforeEach(async(p,g)=>{await n.callHook("page:loading:start"),p.meta=ti(p.meta),n.isHydrating&&m&&!ir(p.meta.layout)&&(p.meta.layout=m),n._processingMiddleware=!0;{const x=new Set([...nR,...n._middleware.global]);for(const v of p.matched){const y=v.meta.middleware;if(y)for(const T of Ed(y))x.add(T)}{const v=await n.runWithContext(()=>yd({path:p.path}));if(v.appMiddleware)for(const y in v.appMiddleware)v.appMiddleware[y]?x.add(y):x.delete(y)}for(const v of x){const y=typeof v=="string"?n._middleware.named[v]||await _h[v]?.().then(T=>T.default||T):v;if(!y)throw new Error(`Unknown route middleware: '${v}'.`);try{const T=await n.runWithContext(()=>y(p,g));if(!n.payload.serverRendered&&n.isHydrating&&(T===!1||T instanceof Error)){const b=T||Es({statusCode:404,statusMessage:`Page Not Found: ${c}`});return await n.runWithContext(()=>fs(b)),!1}if(T===!0)continue;if(T===!1)return T;if(T)return Hv(T)&&T.fatal&&await n.runWithContext(()=>fs(T)),T}catch(T){const b=Es(T);return b.fatal&&await n.runWithContext(()=>fs(b)),b}}}}),a.onError(async()=>{delete n._processingMiddleware,await n.callHook("page:loading:end")}),a.afterEach(p=>{if(p.matched.length===0)return n.runWithContext(()=>fs(Es({statusCode:404,fatal:!1,statusMessage:`Page not found: ${p.fullPath}`,data:{path:p.fullPath}})))}),n.hooks.hookOnce("app:created",async()=>{try{"name"in _&&(_.name=void 0),await a.replace({..._,force:!0}),a.options.scrollBehavior=pr.scrollBehavior}catch(p){await n.runWithContext(()=>fs(p))}}),{provide:{router:a}}}}),sR=Ln({name:"nuxt:payload",setup(n){const e=new Set;Mn().beforeResolve(async(t,i)=>{if(t.path===i.path)return;const r=await cm(t.path);if(r){for(const s of e)delete n.static.data[s];for(const s in r.data)s in n.static.data||e.add(s),n.static.data[s]=r.data[s]}}),su(()=>{n.hooks.hook("link:prefetch",async t=>{const{hostname:i}=new URL(t,window.location.href);i===window.location.hostname&&await cm(t).catch(()=>{console.warn("[nuxt] Error preloading payload for",t)})}),navigator.connection?.effectiveType!=="slow-2g"&&setTimeout(nu,1e3)})}}),oR=Ln(()=>{const n=Mn();su(()=>
27{n.beforeResolve(async()=>{await new Promise(e=>{setTimeout(e,100),requestAnimationFrame(()=>{setTimeout(e,0)})})})})}),aR=Ln(n=>{let e;async function t(){let i;try{i=await nu()}catch(r){const s=r;if(!("status"in s&&(s.status===404||s.status===403)))throw s}e&&clearTimeout(e),e=setTimeout(t,Zp);try{const r=await $fetch(md("builds/latest.json")+`?${Date.now()}`);r.id!==i?.id&&(n.hooks.callHook("app:manifest:update",r),e&&clearTimeout(e))}catch{}}su(()=>{e=setTimeout(t,Zp)})}),lR=Ln({name:"nuxt:chunk-reload",setup(n){const e=Mn(),t=ol(),i=new Set;e.beforeEach(()=>{i.clear()}),n.hook("app:chunkError",({error:s})=>{i.add(s)});function r(s){const o=tu(t.app.baseURL,s.fullPath);Dw({path:o,persistState:!0})}n.hook("app:manifest:update",()=>{e.beforeResolve(r)}),e.onError((s,o)=>{i.has(s)&&r(o)})}});function cR(n){const e=ti({});return iv(()=>{const t=gt().$nuxtSiteConfig.get(gd({resolveRefs:!0},n));e&&t&&Object.assign(e,t)}),delete e._priority,e}const uR=Ln(()=>{const n=cl();if(!n)return;const e=cR(),t={meta:[],templateParams:{site:e,siteUrl:e.url,siteName:e.name}};e.separator&&(t.templateParams.separator=e.separator),e.titleSeparator&&(t.templateParams.titleSeparator=e.titleSeparator),e.description&&(t.templateParams.siteDescription=e.description,t.meta.push({name:"description",content:"%site.description",tagPriority:"low"})),n.push(t)}),fR=Ln(()=>{const n=cl();n&&(n.use(qv),n.use(sA()))}),hR=/\d/,dR=["-","_","/","."];function pR(n=""){if(!hR.test(n))return n!==n.toLowerCase()}function mR(n,e){const t=dR,i=[];if(!n||typeof n!="string")return i;let r="",s,o;for(const a of n){const l=t.includes(a);if(l===!0){i.push(r),r="",s=void 0;continue}const c=pR(a);if(o===!1){if(s===!1&&c===!0){i.push(r),r=a,s=c;continue}if(s===!0&&c===!1&&r.length>1){const u=r.at(-1);i.push(r.slice(0,Math.max(0,r.length-1))),r=u+a,s=c;continue}}r+=a,s=c,o=l}return i.push(r),i}function gR(n){return n?n[0].toUpperCase()+n.slice(1):""}const _R=/^(a|an|and|as|at|but|by|for|if|in|is|nor|of|on|or|the|to|with)$/i;function vR(n,e){return(Array.isArray(n)?n:mR(n)).filter(Boolean).map(t=>_R.test(t)?t.toLowerCase():gR(t)).join(" ")}const yR=Ln({name:"nuxt-seo:fallback-titles",env:{islands:!1},setup(){const n=al(),e=ll(),t=xt(()=>{if(e.value&&[404,500].includes(e.value?.statusCode))return`${e.value.statusCode} - ${e.value.message}`;if(typeof n.meta?.title=="string")return n.meta?.title;const s=Io(n.path||"/").split("/").pop();return s?vR(s):null});uA({title:()=>t.value},{tagPriority:101})}}),xR=Ht(()=>tt(()=>import("./CbzV7KH3.js"),__vite__mapDeps([1,2,3]),import.meta.url).then(n=>n.default||n.default||n)),SR=Ht(()=>tt(()=>import("./WOcU2LN-.js"),__vite__mapDeps([45,46,47]),import.meta.url).then(n=>n.default||n.default||n)),MR=Ht(()=>tt(()=>import("./MOgB9R2V.js"),__vite__mapDeps([13,10,14]),import.meta.url).then(n=>n.default||n.default||n)),TR=Ht(()=>tt(()=>import("./43MhPlkg.js"),__vite__mapDeps([48,2,49]),import.meta.url).then(n=>n.default||n.default||n)),ER=Ht(()=>tt(()=>import("./MImn2Oc5.js"),__vite__mapDeps([28,13,10,14,29]),import.meta.url).then(n=>n.default||n.default||n)),bR=Ht(()=>tt(()=>import("./BpG0IlsN.js"),__vite__mapDeps([24,13,10,14,15,4,5,25]),import.meta.url).then(n=>n.default||n.default||n)),AR=Ht(()=>tt(()=>import("./ixFWTuTj.js"),__vite__mapDeps([50,13,10,14,16,51]),import.meta.url).then(n=>n.default||n.default||n)),wR=Ht(()=>tt(()=>import("./tTgWynEK.js"),__vite__mapDeps([52,16,53]),import.meta.url).then(n=>n.default||n.default||n)),RR=Ht(()=>tt(()=>import("./CCkUW_u0.js"),[],import.meta.url).then(n=>n.default||n.default||n)),CR=Ht(()=>tt(()=>import("./956Vw6he.js"),__vite__mapDeps([54,15,4,5,55]),import.meta.url).then(n=>n.default||n.default||n)),PR=Ht(()=>tt(()=>Promise.resolve().then(()=>sC),void 0,import.meta.url).then(n=>n.default||n.default||n)),LR=Ht(()=>tt(()=>Promise.resolve().then(()=>sU),void 0,import.meta.url).then(n=>n.default||n.default||n)),IR=Ht(()=>tt(()=>import("./rguC49Rx.js"),__vite__mapDeps([56,23,57]),import.meta.url).then(n=>n.default||n.default||n)),DR=Ht(()=>tt(()=>import("./BSnKHEL8.js"),__vite__mapDeps([8,9]),import.meta.url).then(n=>n.default||n.default||n)),NR=Ht(()=>tt(()=>import("./BtT3Mur_.js"),__vite__mapDeps([30,31,23,32]),import.meta.url).then(n=>n.default||n.default||n)),OR=Ht(()=>tt(()=>import("./Cjhmziyd.js"),__vite__mapDeps([58,10,59]),import.meta.url).then(n=>n.default||n.default||n)),UR=Ht(()=>tt(()=>import("./D-SWfl7h.js"),__vite__mapDeps([36,31,4,5,37]),import.meta.url).then(n=>n.default||n.default||n)),FR=Ht(()=>tt(()=>import("./vh7mFEmW.js"),__vite__mapDeps([19,16]),import.meta.url).then(n=>n.default||n.default||n)),kR=[["LineByLine",xR],["Parallax",SR],["ShuffleButton",MR],["Curs
27or",TR],["FilterBar",ER],["Footer",bR],["Header",AR],["Menu",wR],["Image",RR],["Legals",CR],["Logo",PR],["Logo3D",LR],["Modal",IR],["ShowreelCanvas",DR],["ArchivesList",NR],["Loader",OR],["ProjectsList",UR],["SetLife",FR]],BR=Ln({name:"nuxt:global-components",setup(n){for(const[e,t]of kR)n.vueApp.component(e,t),n.vueApp.component("Lazy"+e,t)}}),wr={default:Ht(()=>tt(()=>import("./BQoFA9LS.js"),__vite__mapDeps([60,58,10,59,48,2,49,50,13,14,16,51,52,53,56,23,57,54,15,4,5,55,46,61]),import.meta.url).then(n=>n.default||n))},HR=Ln({name:"nuxt:prefetch",setup(n){const e=Mn();n.hooks.hook("app:mounted",()=>{e.beforeEach(async t=>{const i=t?.meta?.layout;i&&typeof wr[i]=="function"&&await wr[i]()})}),n.hooks.hook("link:prefetch",t=>{if(Ci(t))return;const i=e.resolve(t);if(!i)return;const r=i.meta.layout;let s=Ed(i.meta.middleware);s=s.filter(o=>typeof o=="string");for(const o of s)typeof _h[o]=="function"&&_h[o]();typeof r=="string"&&r in wr&&Iw(wr[r])})}}),zR=Ln({enforce:"post",async setup(){const n=cl(),e=dy("nuxt-seo-utils:routeRules",()=>null);if(e.value){const{head:t,seoMeta:i}=e.value;t&&n.push(t),i&&fA(i)}}}),VR=[xA,Gw,$w,rR,sR,oR,aR,lR,uR,fR,yR,BR,HR,zR],_y=(n="RouteProvider")=>cr({name:n,props:{route:{type:Object,required:!0},vnode:Object,vnodeRef:Object,renderKey:String,trackRootNodes:Boolean},setup(e){const t=e.renderKey,i=e.route,r={};for(const s in e.route)Object.defineProperty(r,s,{get:()=>t===e.renderKey?e.route[s]:i[s],enumerable:!0});return Ur(Is,Ti(r)),()=>e.vnode?Gt(e.vnode,{ref:e.vnodeRef}):e.vnode}}),GR=_y(),Rm=new WeakMap,WR=cr({name:"NuxtPage",inheritAttrs:!1,props:{name:{type:String},transition:{type:[Boolean,Object],default:void 0},keepalive:{type:[Boolean,Object],default:void 0},route:{type:Object},pageKey:{type:[Function,String],default:null}},setup(n,{attrs:e,slots:t,expose:i}){const r=gt(),s=zn(),o=Wt(Is,null);let a;i({pageRef:s});const l=Wt(kv,null);let c;const u=r.deferHydration();if(r.isHydrating){const h=r.hooks.hookOnce("app:error",u);Mn().beforeEach(h)}n.pageKey&&vo(()=>n.pageKey,(h,d)=>{h!==d&&r.callHook("page:loading:start")});let f=!1;{const h=Mn().beforeResolve(()=>{f=!1});Fs(()=>{h()})}return()=>Gt(fy,{name:n.name,route:n.route,...e},{default:h=>{const d=jR(o,h.route,h.Component),_=o&&o.matched.length===h.route.matched.length;if(!h.Component){if(c&&!_)return c;u();return}if(c&&l&&!l.isCurrent(h.route))return c;if(d&&o&&(!l||l?.isCurrent(o)))return _?c:null;const m=gh(h,n.pageKey),p=qR(o,h.route,h.Component);!r.isHydrating&&a===m&&!p&&Ro(()=>{f=!0,r.callHook("page:loading:end")}),a=m;const g=!!(n.transition??h.route.meta.pageTransition??Yp),x=g&&XR([n.transition,h.route.meta.pageTransition,Yp,{onAfterLeave(){delete r._runningTransition,r.callHook("page:transition:finish",h.Component)}}]),v=n.keepalive??h.route.meta.keepalive??ib;return c=hy(g&&x,Qw(v,Gt(cd,{suspensible:!0,onPending:()=>{g&&(r._runningTransition=!0),r.callHook("page:start",h.Component)}
27,onResolve:()=>{Ro(()=>r.callHook("page:finish",h.Component).then(()=>{if(delete r._runningTransition,!f&&!p)return f=!0,r.callHook("page:loading:end")}).finally(u))}},{default:()=>{const y={key:m||void 0,vnode:t.default?$R(t.default,h):h.Component,route:h.route,renderKey:m||void 0,trackRootNodes:g,vnodeRef:s};if(!v)return Gt(GR,y);const T=h.Component.type,b=T;let A=Rm.get(b);return A||(A=_y(T.name||T.__name),Rm.set(b,A)),Gt(A,y)}}))).default(),c}})}});function XR(n){const e=[];for(const t of n)t&&e.push({...t,onAfterLeave:t.onAfterLeave?Ed(t.onAfterLeave):void 0});return gd(...e)}function jR(n,e,t){if(!n)return!1;const i=e.matched.findIndex(r=>r.components?.default===t?.type);return!i||i===-1?!1:e.matched.slice(0,i).some((r,s)=>r.components?.default!==n.matched[s]?.components?.default)||t&&gh({route:e,Component:t})!==gh({route:n,Component:t})}function qR(n,e,t){return n?e.matched.findIndex(r=>r.components?.default===t?.type)<e.matched.length-1:!1}function $R(n,e){const t=n(e);return t.length===1?Gt(t[0]):Gt(Ut,void 0,t)}const KR=cr({name:"LayoutLoader",inheritAttrs:!1,props:{name:String,layoutProps:Object},setup(n,e){return()=>Gt(wr[n.name],n.layoutProps,e.slots)}}),YR={name:{type:[String,Boolean,Object],default:null},fallback:{type:[String,Object],default:null}},ZR=cr({name:"NuxtLayout",inheritAttrs:!1,props:YR,setup(n,e){const t=gt(),i=Wt(Is),s=!i||i===al()?Md():i,o=xt(()=>{let u=bt(n.name)??s?.meta.layout??"default";return u&&!(u in wr)&&n.fallback&&(u=bt(n.fallback)),u}),a=Cs();e.expose({layoutRef:a});const l=t.deferHydration();if(t.isHydrating){const u=t.hooks.hookOnce("app:error",l);Mn().beforeEach(u)}let c;return()=>{const u=o.value&&o.value in wr,f=s?.meta.layoutTransition??nb,h=c;return c=o.value,hy(u&&f,{default:()=>Gt(cd,{suspensible:!0,onResolve:()=>{Ro(l)}},{default:()=>Gt(JR,{layoutProps:fv(e.attrs,{ref:a}),key:o.value||void 0,name:o.value,shouldProvide:!n.name,isRenderingNewLayout:d=>d!==h&&d===o.value,hasTransition:!!f},e.slots)})}).default()}}}),JR=cr({name:"NuxtLayoutProvider",inheritAttrs:!1,props:{name:{type:[String,Boolean]},layoutProps:{type:Object},hasTransition:{type:Boolean},shouldProvide:{type:Boolean},isRenderingNewLayout:{type:Function,required:!0}},setup(n,e){const t=n.name;n.shouldProvide&&Ur(kv,{isCurrent:s=>t===(s.meta.layout??"default")});const i=Wt(Is);if(i&&i===al()){const s=Md(),o={};for(const a in s){const l=a;Object.defineProperty(o,l,{enumerable:!0,get:()=>n.isRenderingNewLayout(n.name)?s[l]:i[l]})}Ur(Is,Ti(o))}return()=>!t||typeof t=="string"&&!(t in wr)?e.slots.default?.():Gt(KR,{key:t,layoutProps:n.layoutProps,name:t},e.slots)}}),ou=(n,e)=>{const t=n.__vccOpts||n;for(const[i,r]of e)t[i]=r;return t},QR={};function eC(n,e){const t=WR,i=ZR;return Ft(),qi("div",null,[ot(i,null,{default:rl(()=>[ot(t)]),_:1})])}const tC=ou(QR,[["render",eC]]),vy=ti({finished:!1});function W2(n){vy.finished=n}const yy=ti({active:!0,state:"default"});function nC(n){yy.state=n}function Pc(n){yy.active=n}const iC=()=>{document.body.classList.add("cursor-active"),Pc(!0)},Cm=()=>{document.body.classList.remove("cursor-active"),Pc(!1)};function X2(){return Fs(()=>{nC("default"),Cm()}),{onCursorEnter:iC,onCursorLeave:Cm}}const rC={__name:"Logo",setup(n){const e=Md(),t=xt(()=>e.name),i=()=>{(t.value==="index"||t.value==="set-life")&&(document.body.classList.remove("cursor-active"),Pc(!1))},r=()=>{(t.value==="index"||t.value==="set-life")&&(document.body.classList.add("cursor-active"),Pc(!0))};return(s,o)=>{const a=gy;return Ft(),Zi(a,{to:"/",class:Us(["logo",{finished:bt(vy).finished}]),onMouseenter:i,onMouseleave:r},{default:rl(()=>[...o[0]||(o[0]=[Ot("span",{class:"word"},[Ot("span",{class:"letter"},"C"),Ot("span",{class:"letter"},"h"),Ot("span",{class:"letter"},"r"),Ot("span",{class:"letter"},"i"),Ot("span",{class:"letter"},"s")],-1),Ot("span",{class:"word"},[Ot("span",{class:"letter"},"M"),Ot("span",{class:"letter"},"a"),Ot("span",{class:"letter letter--c"},"c"),Ot("span",{class:"letter"},"a"),Ot("span",{class:"letter"},"r"),Ot("span",{class:"letter"},"i")],-1)])]),_:1},8,["class"])}}},xy=ou(rC,[["__scopeId","data-v-9748a4c9"]]),sC=Object.freeze(Object.defineProperty({__proto__:null,default:xy},Symbol.toStringTag,{value:"Module"}));/** 28 * @license 29 * Copyright 2010-2023 Three.js Authors 30 * SPDX-License-Identifier: MIT 31 */const bd="163",oC=0,Pm=1,aC=2,Sy=1,My=2,Gi=3,sr=0,bn=1,xi=2,Fr=0,So=1,Lm=2,Im=3,Dm=4,lC=5,ms=100,cC=101,uC=102,fC=103,hC=104,dC=200,pC=201,mC=202,gC=203,vh=204,yh=205,_C=206,vC=207,yC=208,xC=209,SC=210,MC=211,TC=212,EC=213,bC=214,AC=0,wC=1,RC=2,Lc=3,CC=4,PC=5,LC=6,IC=7,Ty=0,DC=1,NC=2,kr=0,OC=1,UC=2,FC=3,kC=4,BC=5,HC=6,zC=7,Nm="attached",VC="detached",Ey=300,Oo=301,Uo=302,xh=303,Sh=304,au=306,Fo=1e3,Rr=1001,Ic=1002,yn=1003,by=1004,xa=1005,_n=1006,oc=1007,Qi=1008,j2=1008,Br=1009,GC=1010,WC=1011,Ay=1012,wy=1013,ko=1014,Ei=1015,Dc=1016,Ry=1017,Cy=1018,ul=1020,XC=35902,jC=1021,qC=1022,li=1023,$C=1024,KC=1025,Mo=1026,Xa=1027,Py=1028,Ly=1029,YC=1030,Iy=1031,Dy=1033,Gu=33776,Wu=33777,Xu=33778,ju=33779,Om=35840,Um=35841,Fm=35842,km=35843,Ny=36196,Bm=37492,Hm=37496,zm=37808,Vm=37809,Gm=37810,Wm=37811,Xm=37812,jm=37813,qm=37814,$m=37815,Km=37816,Ym=37817,Zm=37818,Jm=37819,Qm=37820,eg=37821,qu=36492,tg=36494,ng=36495,ZC=36283,ig=36284,rg=36285,sg=36286,ja=2300,Bo=2301,$u=2302,og=2400,ag=2401,lg=2402,JC=2500,QC=0,Oy=1,Mh=2,e1=3200,t1=3201,Ad=0,n1=1,Ar="",pn="srgb",Jt="srgb-linear",wd="display-p3",lu="display-p3-linear",Nc="linear",ft="srgb",Oc="rec709",Uc="p3",zs=7680,cg=519,i1=512,r1=513,s1=514,Uy=515,o1=516,a1=517,l1=518,c1=519,Th=35044,ug="300 es",er=2e3,Fc=2001;class Jo{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const r=this._listeners[e];if(r!==void 0){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[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 tn=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","5
315","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let fg=1234567;const Ia=Math.PI/180,Ho=180/Math.PI;function ui(){const n=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(tn[n&255]+tn[n>>8&255]+tn[n>>16&255]+tn[n>>24&255]+"-"+tn[e&255]+tn[e>>8&255]+"-"+tn[e>>16&15|64]+tn[e>>24&255]+"-"+tn[t&63|128]+tn[t>>8&255]+"-"+tn[t>>16&255]+tn[t>>24&255]+tn[i&255]+tn[i>>8&255]+tn[i>>16&255]+tn[i>>24&255]).toLowerCase()}function an(n,e,t){return Math.max(e,Math.min(t,n))}function Rd(n,e){return(n%e+e)%e}function u1(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function f1(n,e,t){return n!==e?(t-n)/(e-n):0}function Da(n,e,t){return(1-t)*n+t*e}function h1(n,e,t,i){return Da(n,e,1-Math.exp(-t*i))}function d1(n,e=1){return e-Math.abs(Rd(n,e*2)-e)}function p1(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function m1(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function g1(n,e){return n+Math.floor(Math.random()*(e-n+1))}function _1(n,e){return n+Math.random()*(e-n)}function v1(n){return n*(.5-Math.random())}function y1(n){n!==void 0&&(fg=n);let e=fg+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function x1(n){return n*Ia}function S1(n){return n*Ho}function M1(n){return(n&n-1)===0&&n!==0}function T1(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function E1(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function b1(n,e,t,i,r){const s=Math.cos,o=Math.sin,a=s(t/2),l=o(t/2),c=s((e+i)/2),u=o((e+i)/2),f=s((e-i)/2),h=o((e-i)/2),d=s((i-e)/2),_=o((i-e)/2);switch(r){case"XYX":n.set(a*u,l*f,l*h,a*c);break;case"YZY":n.set(l*h,a*u,l*f,a*c);break;case"ZXZ":n.set(l*f,l*h,a*u,a*c);break;case"XZX":n.set(a*u,l*_,l*d,a*c);break;case"YXY":n.set(l*d,a*u,l*_,a*c);break;case"ZYZ":n.set(l*_,l*d,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function ai(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function Qe(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const Fy={DEG2RAD:Ia,RAD2DEG:Ho,generateUUID:ui,clamp:an,euclideanModulo:Rd,mapLinear:u1,inverseLerp:f1,lerp:Da,damp:h1,pingpong:d1,smoothstep:p1,smootherstep:m1,randInt:g1,randFloat:_1,randFloatSpread:v1,seededRandom:y1,degToRad:x1,radToDeg:S1,isPowerOfTwo:M1,ceilPowerOfTwo:T1,floorPowerOfTwo:E1,setQuaternionFromProperEuler:b1,normalize:Qe,denormalize:ai};class Ge{constructor(e=0,t=0){Ge.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}
vendor: 66,463 bytes, line 31
31sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+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,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(an(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),r=Math.sin(t),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 Ve{constructor(e,t,i,r,s,o,a,l,c){Ve.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,r,s,o,a,l,c)}set(e,t,i,r,s,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=r,u[2]=a,u[3]=t,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 t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.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],d=i[5],_=i[8],m=r[0],p=r[3],g=r[6],x=r[1],v=r[4],y=r[7],T=r[2],b=r[5],A=r[8];return s[0]=o*m+a*x+l*T,s[3]=o*p+a*v+l*b,s[6]=o*g+a*y+l*A,s[1]=c*m+u*x+f*T,s[4]=c*p+u*v+f*b,s[7]=c*g+u*y+f*A,s[2]=h*m+d*x+_*T,s[5]=h*p+d*v+_*b,s[8]=h*g+d*y+_*A,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return t*o*u-t*a*c-i*s*u+i*a*l+r*s*c-r*o*l}invert(){const e=this.elements,t=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,d=c*s-o*l,_=t*f+i*h+r*d;if(_===0)return this.set(0,0,0,0,0,0,0,0,0);const m=1/_;return e[0]=f*m,e[1]=(r*c-u*i)*m,e[2]=(a*i-r*o)*m,e[3]=h*m,e[4]=(u*t-r*l)*m,e[5]=(r*s-a*t)*m,e[6]=d*m,e[7]=(i*l-c*t)*m,e[8]=(o*t-i*s)*m,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,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+t,0,0,1),this}scale(e,t){return this.premultiply(Ku.makeScale(e,t)),this}rotate(e){return this.premultiply(Ku.makeRotation(-e)),this}translate(e,t){return this.premultiply(Ku.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<9;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Ku=new Ve;function ky(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}function qa(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function A1(){const n=qa("canvas");return n.style.display="block",n}const hg={};function By(n){n in hg||(hg[n]=!0,console.warn(n))}const dg=new Ve().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),pg=new Ve().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Rl={[Jt]:{transfer:Nc,primaries:Oc,toReference:n=>n,fromReference:n=>n},[pn]:{transfer:ft,primaries:Oc,toReference:n=>n.convertSRGBToLinear(),fromReference:n=>n.convertLinearToSRGB()},[lu]:{transfer:Nc,primaries:Uc,toReference:n=>n.applyMatrix3(pg),fromReference:n=>n.applyMatrix3(dg)},[wd]:{transfer:ft,primaries:Uc,toReference:n=>n.convertSRGBToLinear().applyMatrix3(pg),fromReference:n=>n.applyMatrix3(dg).convertLinearToSRGB()}},w1=new Set([Jt,lu]),Je={enabled:!0,_workingColorSpace:Jt,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(n){if(!w1.has(n))throw new Error(`Unsupported working color space, "${n}".`);this._workingColorSpace=n},convert:function(n,e,t){if(this.enabled===!1||e===t||!e||!t)return n;const i=Rl[e].toReference,r=Rl[t].fromReference;return r(i(n))},fromWorkingColorSpace:function(n,e){return this.convert(n,this._workingColorSpace,e)},toWorkingColorSpace:function(n,e){return this.convert(n,e,this._workingColorSpace)},getPrimaries:function(n){return Rl[n].primaries},getTransfer:function(n){return n===Ar?Nc:Rl[n].transfer}};function To(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Yu(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let Vs;class R1{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{Vs===void 0&&(Vs=qa("canvas")),Vs.width=e.width,Vs.height=e.height;const i=Vs.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=Vs}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=qa("canvas");t.width=e.width,t.height=e.height;const i=t.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]=To(s[o]/255)*255;return i.putImageData(r,0,0),t}else if(e.data){const t=e.data.slice(0);for(let i=0;i<t.length;i++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[i]=Math.floor(To(t[i]/255)*255):t[i]=To(t[i]);return{data:t,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let C1=0;class Hy{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:C1++}),this.uuid=ui(),this.data=e,this.dataReady=!0,this.version=0}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const 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(Zu(r[o].image)):s.push(Zu(r[o]))}else s=Zu(r);i.url=s}return t||(e.images[this.uuid]=i),i}}function Zu(n){return typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&n instanceof ImageBitmap?R1.getDataURL(n):n.data?{data:Array.from(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let P1=0;class Dt extends Jo{constructor(e=Dt.DEFAULT_IMAGE,t=Dt.DEFAULT_MAPPING,i=Rr,r=Rr,s=_n,o=Qi,a=li,l=Br,c=Dt.DEFAULT_ANISOTROPY,u=Ar){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:P1++}),this.uuid=ui(),this.name="",this.source=new Hy(e),this.mipmaps=[],this.mapping=t,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 Ge(0,0),this.repeat=new Ge(1,1),this.center=new Ge(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ve,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!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=e.colorSpace,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&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),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Ey)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Fo:e.x=e.x-Math.floor(e.x);break;case Rr:e.x=e.x<0?0:1;break;case Ic: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 Fo:e.y=e.y-Math.floor(e.y);break;case Rr:e.y=e.y<0?0:1;break;case Ic: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++}}Dt.DEFAULT_IMAGE=null;Dt.DEFAULT_MAPPING=Ey;Dt.DEFAULT_ANISOTROPY=1;class st{constructor(e=0,t=0,i=0,r=1){st.prototype.isVector4=!0,this.x=e,this.y=t,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,t,i,r){return this.x=e,this.y=t,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,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*r+o[12]*s,this.y=o[1]*t+o[5]*i+o[9]*r+o[13]*s,this.z=o[2]*t+o[6]*i+o[10]*r+o[14]*s,this.w=o[3]*t+o[7]*i+o[11]*r+o[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,r,s;const l=e.elements,c=l[0],u=l[4],f=l[8],h=l[1],d=l[5],_=l[9],m=l[2],p=l[6],g=l[10];if(Math.abs(u-h)<.01&&Math.abs(f-m)<.01&&Math.abs(_-p)<.01){if(Math.abs(u+h)<.1&&Math.abs(f+m)<.1&&Math.abs(_+p)<.1&&Math.abs(c+d+g-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const v=(c+1)/2,y=(d+1)/2,T=(g+1)/2,b=(u+h)/4,A=(f+m)/4,P=(_+p)/4;return v>y&&v>T?v<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(v),r=b/i,s=A/i):y>T?y<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(y),i=b/r,s=P/r):T<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(T),i=A/s,r=P/s),this.set(i,r,s,t),this}let x=Math.sqrt((p-_)*(p-_)+(f-m)*(f-m)+(h-u)*(h-u));return Math.abs(x)<.001&&(x=1),this.x=(p-_)/x,this.y=(f-m)/x,this.z=(h-u)/x,this.w=Math.acos((c+d+g-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class L1 extends Jo{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new st(0,0,e,t),this.scissorTest=!1,this.viewport=new st(0,0,e,t);const r={width:e,height:t,depth:1};i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:_n,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0,count:1},i);const s=new Dt(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.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.depthTexture=i.depthTexture,this.samples=i.samples}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}setSize(e,t,i=1){if(this.width!==e||this.height!==t||this.depth!==i){this.width=e,this.height=t,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=t,this.textures[r].image.depth=i;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let i=0,r=e.textures.length;i<r;i++)this.textures[i]=e.textures[i].clone(),this.textures[i].isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new Hy(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Ds extends L1{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}}class zy extends Dt{constructor(e=null,t=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=yn,this.minFilter=yn,this.wrapR=Rr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class I1 extends Dt{constructor(e=null,t=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=yn,this.minFilter=yn,this.wrapR=Rr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class qr{constructor(e=0,t=0,i=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=r}static slerpFlat(e,t,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],d=s[o+1],_=s[o+2],m=s[o+3];if(a===0){e[t+0]=l,e[t+1]=c,e[t+2]=u,e[t+3]=f;return}if(a===1){e[t+0]=h,e[t+1]=d,e[t+2]=_,e[t+3]=m;return}if(f!==m||l!==h||c!==d||u!==_){let p=1-a;const g=l*h+c*d+u*_+f*m,x=g>=0?1:-1,v=1-g*g;if(v>Number.EPSILON){const T=Math.sqrt(v),b=Math.atan2(T,g*x);p=Math.sin(p*b)/T,a=Math.sin(a*b)/T}const y=a*x;if(l=l*p+h*y,c=c*p+d*y,u=u*p+_*y,f=f*p+m*y,p===1-a){const T=1/Math.sqrt(l*l+c*c+u*u+f*f);l*=T,c*=T,u*=T,f*=T}}e[t]=l,e[t+1]=c,e[t+2]=u,e[t+3]=f}static multiplyQuaternionsFlat(e,t,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],d=s[o+2],_=s[o+3];return e[t]=a*_+u*f+l*d-c*h,e[t+1]=l*_+u*h+c*f-a*d,e[t+2]=c*_+u*d+a*h-l*f,e[t+3]=u*_-a*f-l*h-c*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,r){return this._x=e,this._y=t,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,t=!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),d=l(r/2),_=l(s/2);switch(o){case"XYZ":this._x=h*u*f+c*d*_,this._y=c*d*f-h*u*_,this._z=c*u*_+h*d*f,this._w=c*u*f-h*d*_;break;case"YXZ":this._x=h*u*f+c*d*_,this._y=c*d*f-h*u*_,this._z=c*u*_-h*d*f,this._w=c*u*f+h*d*_;break;case"ZXY":this._x=h*u*f-c*d*_,this._y=c*d*f+h*u*_,this._z=c*u*_+h*d*f,this._w=c*u*f-h*d*_;break;case"ZYX":this._x=h*u*f-c*d*_,this._y=c*d*f+h*u*_,this._z=c*u*_-h*d*f,this._w=c*u*f+h*d*_;break;case"YZX":this._x=h*u*f+c*d*_,this._y=c*d*f+h*u*_,this._z=c*u*_-h*d*f,this._w=c*u*f-h*d*_;break;case"XZY":this._x=h*u*f-c*d*_,this._y=c*d*f-h*u*_,this._z=c*u*_+h*d*f,this._w=c*u*f+h*d*_;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/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 t=e.elements,i=t[0],r=t[4],s=t[8],o=t[1],a=t[5],l=t[9],c=t[2],u=t[6],f=t[10],h=i+a+f;if(h>0){const d=.5/Math.sqrt(h+1);this._w=.25/d,this._x=(u-l)*d,this._y=(s-c)*d,this._z=(o-r)*d}else if(i>a&&i>f){const d=2*Math.sqrt(1+i-a-f);this._w=(u-l)/d,this._x=.25*d,this._y=(r+o)/d,this._z=(s+c)/d}else if(a>f){const d=2*Math.sqrt(1+a-i-f);this._w=(s-c)/d,this._x=(r+o)/d,this._y=.25*d,this._z=(l+u)/d}else{const d=2*Math.sqrt(1+f-i-a);this._w=(o-r)/d,this._x=(s+c)/d,this._y=(l+u)/d,this._z=.25*d}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+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*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(an(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const r=Math.min(1,t/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,t){const i=e._x,r=e._y,s=e._z,o=e._w,a=t._x,l=t._y,c=t._z,u=t._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,t){if(t===0)return this;if(t===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 d=1-t;return this._w=d*o+t*this._w,this._x=d*i+t*this._x,this._y=d*r+t*this._y,this._z=d*s+t*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),f=Math.sin((1-t)*u)/c,h=Math.sin(t*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,t,i){return this.copy(e).slerp(t,i)}random(){const e=2*Math.PI*Math.random(),t=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(t),s*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class X{constructor(e=0,t=0,i=0){X.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(mg.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(mg.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6]*r,this.y=s[1]*t+s[4]*i+s[7]*r,this.z=s[2]*t+s[5]*i+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=e.elements,o=1/(s[3]*t+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*t+s[4]*i+s[8]*r+s[12])*o,this.y=(s[1]*t+s[5]*i+s[9]*r+s[13])*o,this.z=(s[2]*t+s[6]*i+s[10]*r+s[14])*o,this}applyQuaternion(e){const t=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*t-s*r),f=2*(s*i-o*t);return this.x=t+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 t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*r,this.y=s[1]*t+s[5]*i+s[9]*r,this.z=s[2]*t+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,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,r=e.y,s=e.z,o=t.x,a=t.y,l=t.z;return this.x=r*l-s*a,this.y=s*o-i*l,this.z=i*a-r*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return Ju.copy(this).projectOnVector(e),this.sub(Ju)}reflect(e){return this.sub(Ju.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(an(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+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,t,i){const r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Ju=new X,mg=new qr;class Pi{constructor(e=new X(1/0,1/0,1/0),t=new X(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t+=3)this.expandByPoint(ii.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,i=e.count;t<i;t++)this.expandByPoint(ii.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const i=ii.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const i=e.geometry;if(i!==void 0){const s=i.getAttribute("position");if(t===!0&&s!==void 0&&e.isInstancedMesh!==!0)for(let o=0,a=s.count;o<a;o++)e.isMesh===!0?e.getVertexPosition(o,ii):ii.fromBufferAttribute(s,o),ii.applyMatrix4(e.matrixWorld),this.expandByPoint(ii);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Cl.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),Cl.copy(i.boundingBox)),Cl.applyMatrix4(e.matrixWorld),this.union(Cl)}const r=e.children;for(let s=0,o=r.length;s<o;s++)this.expandByObject(r[s],t);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,ii),ii.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(ca),Pl.subVectors(this.max,ca),Gs.subVectors(e.a,ca),Ws.subVectors(e.b,ca),Xs.subVectors(e.c,ca),mr.subVectors(Ws,Gs),gr.subVectors(Xs,Ws),ts.subVectors(Gs,Xs);let t=[0,-mr.z,mr.y,0,-gr.z,gr.y,0,-ts.z,ts.y,mr.z,0,-mr.x,gr.z,0,-gr.x,ts.z,0,-ts.x,-mr.y,mr.x,0,-gr.y,gr.x,0,-ts.y,ts.x,0];return!Qu(t,Gs,Ws,Xs,Pl)||(t=[1,0,0,0,1,0,0,0,1],!Qu(t,Gs,Ws,Xs,Pl))?!1:(Ll.crossVectors(mr,gr),t=[Ll.x,Ll.y,Ll.z],Qu(t,Gs,Ws,Xs,Pl))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,ii).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(ii).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:(Fi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Fi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Fi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Fi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Fi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Fi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Fi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Fi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Fi),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 Fi=[new X,new X,new X,new X,new X,new X,new X,new X],ii=new X,Cl=new Pi,Gs=new X,Ws=new X,Xs=new X,mr=new X,gr=new X,ts=new X,ca=new X,Pl=new X,Ll=new X,ns=new X;function Qu(n,e,t,i,r){for(let s=0,o=n.length-3;s<=o;s+=3){ns.fromArray(n,s);const a=r.x*Math.abs(ns.x)+r.y*Math.abs(ns.y)+r.z*Math.abs(ns.z),l=e.dot(ns),c=t.dot(ns),u=i.dot(ns);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const D1=new Pi,ua=new X,ef=new X;class Li{constructor(e=new X,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):D1.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 t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const i=this.center.distanceToSquared(e);return t.copy(e),i>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;ua.subVectors(e,this.center);const t=ua.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(ua,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):(ef.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(ua.copy(e.center).add(ef)),this.expandByPoint(ua.copy(e.center).sub(ef))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const ki=new X,tf=new X,Il=new X,_r=new X,nf=new X,Dl=new X,rf=new X;class fl{constructor(e=new X,t=new X(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ki)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=ki.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ki.copy(this.origin).addScaledVector(this.direction,t),ki.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){tf.copy(e).add(t).multiplyScalar(.5),Il.copy(t).sub(e).normalize(),_r.copy(this.origin).sub(tf);const s=e.distanceTo(t)*.5,o=-this.direction.dot(Il),a=_r.dot(this.direction),l=-_r.dot(Il),c=_r.lengthSq(),u=Math.abs(1-o*o);let f,h,d,_;if(u>0)if(f=o*l-a,h=o*a-l,_=s*u,f>=0)if(h>=-_)if(h<=_){const m=1/u;f*=m,h*=m,d=f*(f+o*h+2*a)+h*(o*f+h+2*l)+c}else h=s,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+c;else h=-s,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+c;else h<=-_?(f=Math.max(0,-(-o*s+a)),h=f>0?-s:Math.min(Math.max(-s,-l),s),d=-f*f+h*(h+2*l)+c):h<=_?(f=0,h=Math.min(Math.max(-s,-l),s),d=h*(h+2*l)+c):(f=Math.max(0,-(o*s+a)),h=f>0?s:Math.min(Math.max(-s,-l),s),d=-f*f+h*(h+2*l)+c);else h=o>0?-s:s,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,f),r&&r.copy(tf).addScaledVector(Il,h),d}intersectSphere(e,t){ki.subVectors(e.center,this.origin);const i=ki.dot(this.direction),r=ki.dot(ki)-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,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,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,t)}intersectsBox(e){return this.intersectBox(e,ki)!==null}intersectTriangle(e,t,i,r,s){nf.subVectors(t,e),Dl.subVectors(i,e),rf.crossVectors(nf,Dl);let o=this.direction.dot(rf),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;_r.subVectors(this.origin,e);const l=a*this.direction.dot(Dl.crossVectors(_r,Dl));if(l<0)return null;const c=a*this.direction.dot(nf.cross(_r));if(c<0||l+c>o)return null;const u=-a*_r.dot(rf);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 Be{constructor(e,t,i,r,s,o,a,l,c,u,f,h,d,_,m,p){Be.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,r,s,o,a,l,c,u,f,h,d,_,m,p)}set(e,t,i,r,s,o,a,l,c,u,f,h,d,_,m,p){const g=this.elements;return g[0]=e,g[4]=t,g[8]=i,g[12]=r,g[1]=s,g[5]=o,g[9]=a,g[13]=l,g[2]=c,g[6]=u,g[10]=f,g[14]=h,g[3]=d,g[7]=_,g[11]=m,g[15]=p,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 Be().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,r=1/js.setFromMatrixColumn(e,0).length(),s=1/js.setFromMatrixColumn(e,1).length(),o=1/js.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*s,t[5]=i[5]*s,t[6]=i[6]*s,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,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,d=o*f,_=a*u,m=a*f;t[0]=l*u,t[4]=-l*f,t[8]=c,t[1]=d+_*c,t[5]=h-m*c,t[9]=-a*l,t[2]=m-h*c,t[6]=_+d*c,t[10]=o*l}else if(e.order==="YXZ"){const h=l*u,d=l*f,_=c*u,m=c*f;t[0]=h+m*a,t[4]=_*a-d,t[8]=o*c,t[1]=o*f,t[5]=o*u,t[9]=-a,t[2]=d*a-_,t[6]=m+h*a,t[10]=o*l}else if(e.order==="ZXY"){const h=l*u,d=l*f,_=c*u,m=c*f;t[0]=h-m*a,t[4]=-o*f,t[8]=_+d*a,t[1]=d+_*a,t[5]=o*u,t[9]=m-h*a,t[2]=-o*c,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const h=o*u,d=o*f,_=a*u,m=a*f;t[0]=l*u,t[4]=_*c-d,t[8]=h*c+m,t[1]=l*f,t[5]=m*c+h,t[9]=d*c-_,t[2]=-c,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const h=o*l,d=o*c,_=a*l,m=a*c;t[0]=l*u,t[4]=m-h*f,t[8]=_*f+d,t[1]=f,t[5]=o*u,t[9]=-a*u,t[2]=-c*u,t[6]=d*f+_,t[10]=h-m*f}else if(e.order==="XZY"){const h=o*l,d=o*c,_=a*l,m=a*c;t[0]=l*u,t[4]=-f,t[8]=c*u,t[1]=h*f+m,t[5]=o*u,t[9]=d*f-_,t[2]=_*f-d,t[6]=a*u,t[10]=m*f+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(N1,e,O1)}lookAt(e,t,i){const r=this.elements;return Dn.subVectors(e,t),Dn.lengthSq()===0&&(Dn.z=1),Dn.normalize(),vr.crossVectors(i,Dn),vr.lengthSq()===0&&(Math.abs(i.z)===1?Dn.x+=1e-4:Dn.z+=1e-4,Dn.normalize(),vr.crossVectors(i,Dn)),vr.normalize(),Nl.crossVectors(Dn,vr),r[0]=vr.x,r[4]=Nl.x,r[8]=Dn.x,r[1]=vr.y,r[5]=Nl.y,r[9]=Dn.y,r[2]=vr.z,r[6]=Nl.z,r[10]=Dn.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.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],d=i[13],_=i[2],m=i[6],p=i[10],g=i[14],x=i[3],v=i[7],y=i[11],T=i[15],b=r[0],A=r[4],P=r[8],S=r[12],M=r[1],O=r[5],I=r[9],L=r[13],V=r[2],$=r[6],G=r[10],J=r[14],U=r[3],ne=r[7],ae=r[11],me=r[15];return s[0]=o*b+a*M+l*V+c*U,s[4]=o*A+a*O+l*$+c*ne,s[8]=o*P+a*I+l*G+c*ae,s[12]=o*S+a*L+l*J+c*me,s[1]=u*b+f*M+h*V+d*U,s[5]=u*A+f*O+h*$+d*ne,s[9]=u*P+f*I+h*G+d*ae,s[13]=u*S+f*L+h*J+d*me,s[2]=_*b+m*M+p*V+g*U,s[6]=_*A+m*O+p*$+g*ne,s[10]=_*P+m*I+p*G+g*ae,s[14]=_*S+m*L+p*J+g*me,s[3]=x*b+v*M+y*V+T*U,s[7]=x*A+v*O+y*$+T*ne,s[11]=x*P+v*I+y*G+T*ae,s[15]=x*S+v*L+y*J+T*me,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],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],d=e[14],_=e[3],m=e[7],p=e[11],g=e[15];return _*(+s*l*f-r*c*f-s*a*h+i*c*h+r*a*d-i*l*d)+m*(+t*l*d-t*c*h+s*o*h-r*o*d+r*c*u-s*l*u)+p*(+t*c*f-t*a*d-s*o*f+i*o*d+s*a*u-i*c*u)+g*(-r*a*u-t*l*f+t*a*h+r*o*f-i*o*h+i*l*u)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=i),this}invert(){const e=this.elements,t=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],d=e[11],_=e[12],m=e[13],p=e[14],g=e[15],x=f*p*c-m*h*c+m*l*d-a*p*d-f*l*g+a*h*g,v=_*h*c-u*p*c-_*l*d+o*p*d+u*l*g-o*h*g,y=u*m*c-_*f*c+_*a*d-o*m*d-u*a*g+o*f*g,T=_*f*l-u*m*l-_*a*h+o*m*h+u*a*p-o*f*p,b=t*x+i*v+r*y+s*T;if(b===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const A=1/b;return e[0]=x*A,e[1]=(m*h*s-f*p*s-m*r*d+i*p*d+f*r*g-i*h*g)*A,e[2]=(a*p*s-m*l*s+m*r*c-i*p*c-a*r*g+i*l*g)*A,e[3]=(f*l*s-a*h*s-f*r*c+i*h*c+a*r*d-i*l*d)*A,e[4]=v*A,e[5]=(u*p*s-_*h*s+_*r*d-t*p*d-u*r*g+t*h*g)*A,e[6]=(_*l*s-o*p*s-_*r*c+t*p*c+o*r*g-t*l*g)*A,e[7]=(o*h*s-u*l*s+u*r*c-t*h*c-o*r*d+t*l*d)*A,e[8]=y*A,e[9]=(_*f*s-u*m*s-_*i*d+t*m*d+u*i*g-t*f*g)*A,e[10]=(o*m*s-_*a*s+_*i*c-t*m*c-o*i*g+t*a*g)*A,e[11]=(u*a*s-o*f*s-u*i*c+t*f*c+o*i*d-t*a*d)*A,e[12]=T*A,e[13]=(u*m*r-_*f*r+_*i*h-t*m*h-u*i*p+t*f*p)*A,e[14]=(_*a*r-o*m*r-_*i*l+t*m*l+o*i*p-t*a*p)*A,e[15]=(o*f*r-u*a*r+u*i*l-t*f*l-o*i*h+t*a*h)*A,this}scale(e){const t=this.elements,i=e.x,r=e.y,s=e.z;return t[0]*=i,t[4]*=r,t[8]*=s,t[1]*=i,t[5]*=r,t[9]*=s,t[2]*=i,t[6]*=r,t[10]*=s,t[3]*=i,t[7]*=r,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,r))}makeTranslation(e,t,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,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),r=Math.sin(t),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,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,r,s,o){return this.set(1,i,s,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){const r=this.elements,s=t._x,o=t._y,a=t._z,l=t._w,c=s+s,u=o+o,f=a+a,h=s*c,d=s*u,_=s*f,m=o*u,p=o*f,g=a*f,x=l*c,v=l*u,y=l*f,T=i.x,b=i.y,A=i.z;return r[0]=(1-(m+g))*T,r[1]=(d+y)*T,r[2]=(_-v)*T,r[3]=0,r[4]=(d-y)*b,r[5]=(1-(h+g))*b,r[6]=(p+x)*b,r[7]=0,r[8]=(_+v)*A,r[9]=(p-x)*A,r[10]=(1-(h+m))*A,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){const r=this.elements;let s=js.set(r[0],r[1],r[2]).length();const o=js.set(r[4],r[5],r[6]).length(),a=js.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],ri.copy(this);const c=1/s,u=1/o,f=1/a;return ri.elements[0]*=c,ri.elements[1]*=c,ri.elements[2]*=c,ri.elements[4]*=u,ri.elements[5]*=u,ri.elements[6]*=u,ri.elements[8]*=f,ri.elements[9]*=f,ri.elements[10]*=f,t.setFromRotationMatrix(ri),i.x=s,i.y=o,i.z=a,this}makePerspective(e,t,i,r,s,o,a=er){const l=this.elements,c=2*s/(t-e),u=2*s/(i-r),f=(t+e)/(t-e),h=(i+r)/(i-r);let d,_;if(a===er)d=-(o+s)/(o-s),_=-2*o*s/(o-s);else if(a===Fc)d=-o/(o-s),_=-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]=d,l[14]=_,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,r,s,o,a=er){const l=this.elements,c=1/(t-e),u=1/(i-r),f=1/(o-s),h=(t+e)*c,d=(i+r)*u;let _,m;if(a===er)_=(o+s)*f,m=-2*f;else if(a===Fc)_=s*f,m=-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]=-d,l[2]=0,l[6]=0,l[10]=m,l[14]=-_,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<16;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const js=new X,ri=new Be,N1=new X(0,0,0),O1=new X(1,1,1),vr=new X,Nl=new X,Dn=new X,gg=new Be,_g=new qr;class wi{constructor(e=0,t=0,i=0,r=wi.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,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,t,i,r=this._order){return this._x=e,this._y=t,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,t=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],d=r[10];switch(t){case"XYZ":this._y=Math.asin(an(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,d),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-an(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(an(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,d),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-an(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,d),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(an(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,d));break;case"XZY":this._z=Math.asin(-an(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-u,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return gg.makeRotationFromQuaternion(e),this.setFromRotationMatrix(gg,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return _g.setFromEuler(this),this.setFromQuaternion(_g,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}wi.DEFAULT_ORDER="XYZ";class Cd{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let U1=0;const vg=new X,qs=new qr,Bi=new Be,Ol=new X,fa=new X,F1=new X,k1=new qr,yg=new X(1,0,0),xg=new X(0,1,0),Sg=new X(0,0,1),Mg={type:"added"},B1={type:"removed"},$s={type:"childadded",child:null},sf={type:"childremoved",child:null};class Tt extends Jo{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:U1++}),this.uuid=ui(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Tt.DEFAULT_UP.clone();const e=new X,t=new wi,i=new qr,r=new X(1,1,1);function s(){i.setFromEuler(t,!1)}function o(){t.setFromQuaternion(i,void 0,!1)}t._onChange(s),i._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new Be},normalMatrix:{value:new Ve}}),this.matrix=new Be,this.matrixWorld=new Be,this.matrixAutoUpdate=Tt.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Tt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Cd,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return qs.setFromAxisAngle(e,t),this.quaternion.multiply(qs),this}rotateOnWorldAxis(e,t){return qs.setFromAxisAngle(e,t),this.quaternion.premultiply(qs),this}rotateX(e){return this.rotateOnAxis(yg,e)}rotateY(e){return this.rotateOnAxis(xg,e)}rotateZ(e){return this.rotateOnAxis(Sg,e)}translateOnAxis(e,t){return vg.copy(e).applyQuaternion(this.quaternion),this.position.add(vg.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(yg,e)}translateY(e){return this.translateOnAxis(xg,e)}translateZ(e){return this.translateOnAxis(Sg,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,t,i){e.isVector3?Ol.copy(e):Ol.set(e,t,i);const r=this.parent;this.updateWorldMatrix(!0,!1),fa.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Bi.lookAt(fa,Ol,this.up):Bi.lookAt(Ol,fa,this.up),this.quaternion.setFromRotationMatrix(Bi),r&&(Bi.extractRotation(r.matrixWorld),qs.setFromRotationMatrix(Bi),this.quaternion.premultiply(qs.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);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(Mg),$s.child=e,this.dispatchEvent($s),$s.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 t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(B1),sf.child=e,this.dispatchEvent(sf),sf.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(Mg),$s.child=e,this.dispatchEvent($s),$s.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let i=0,r=this.children.length;i<r;i++){const o=this.children[i].getObjectByProperty(e,t);if(o!==void 0)return o}}getObjectsByProperty(e,t,i=[]){this[e]===t&&i.push(this);const r=this.children;for(let s=0,o=r.length;s<o;s++)r[s].getObjectsByProperty(e,t,i);return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(fa,e,F1),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(fa,k1,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let i=0,r=t.length;i<r;i++)t[i].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let i=0,r=t.length;i<r;i++)t[i].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let i=0,r=t.length;i<r;i++){const s=t[i];(s.matrixWorldAutoUpdate===!0||e===!0)&&s.updateMatrixWorld(e)}}updateWorldMatrix(e,t){const i=this.parent;if(e===!0&&i!==null&&i.matrixWorldAutoUpdate===!0&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),t===!0){const r=this.children;for(let s=0,o=r.length;s<o;s++){const a=r[s];a.matrixWorldAutoUpdate===!0&&a.updateWorldMatrix(!1,!0)}}}toJSON(e){const t=e===void 0||typeof e=="string",i={};t&&(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.visibility=this._visibility,r.active=this._active,r.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),r.maxGeometryCount=this._maxGeometryCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.geometryCount=this._geometryCount,r.matricesTexture=this._matricesTexture.toJSON(e),this.boundingSphere!==null&&(r.boundingSphere={center:r.boundingSphere.center.toArray(),radius:r.boundingSphere.radius}),this.boundingBox!==null&&(r.boundingBox={min:r.boundingBox.min.toArray(),max:r.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(t){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),d=o(e.animations),_=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),d.length>0&&(i.animations=d),_.length>0&&(i.nodes=_)}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,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i<e.children.length;i++){const r=e.children[i];this.add(r.clone())}return this}}Tt.DEFAULT_UP=new X(0,1,0);Tt.DEFAULT_MATRIX_AUTO_UPDATE=!0;Tt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const si=new X,Hi=new X,of=new X,zi=new X,Ks=new X,Ys=new X,Tg=new X,af=new X,lf=new X,cf=ne
vendor: 12,432 bytes, line 31
31w X;class Si{constructor(e=new X,t=new X,i=new X){this.a=e,this.b=t,this.c=i}static getNormal(e,t,i,r){r.subVectors(i,t),si.subVectors(e,t),r.cross(si);const s=r.lengthSq();return s>0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,t,i,r,s){si.subVectors(r,t),Hi.subVectors(i,t),of.subVectors(e,t);const o=si.dot(si),a=si.dot(Hi),l=si.dot(of),c=Hi.dot(Hi),u=Hi.dot(of),f=o*c-a*a;if(f===0)return s.set(0,0,0),null;const h=1/f,d=(c*l-a*u)*h,_=(o*u-a*l)*h;return s.set(1-d-_,_,d)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,zi)===null?!1:zi.x>=0&&zi.y>=0&&zi.x+zi.y<=1}static getInterpolation(e,t,i,r,s,o,a,l){return this.getBarycoord(e,t,i,r,zi)===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,zi.x),l.addScaledVector(o,zi.y),l.addScaledVector(a,zi.z),l)}static isFrontFacing(e,t,i,r){return si.subVectors(i,t),Hi.subVectors(e,t),si.cross(Hi).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),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 si.subVectors(this.c,this.b),Hi.subVectors(this.a,this.b),si.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,t){return Si.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,r,s){return Si.getInterpolation(e,this.a,this.b,this.c,t,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,t){const i=this.a,r=this.b,s=this.c;let o,a;Ks.subVectors(r,i),Ys.subVectors(s,i),af.subVectors(e,i);const l=Ks.dot(af),c=Ys.dot(af);if(l<=0&&c<=0)return t.copy(i);lf.subVectors(e,r);const u=Ks.dot(lf),f=Ys.dot(lf);if(u>=0&&f<=u)return t.copy(r);const h=l*f-u*c;if(h<=0&&l>=0&&u<=0)return o=l/(l-u),t.copy(i).addScaledVector(Ks,o);cf.subVectors(e,s);const d=Ks.dot(cf),_=Ys.dot(cf);if(_>=0&&d<=_)return t.copy(s);const m=d*c-l*_;if(m<=0&&c>=0&&_<=0)return a=c/(c-_),t.copy(i).addScaledVector(Ys,a);const p=u*_-d*f;if(p<=0&&f-u>=0&&d-_>=0)return Tg.subVectors(s,r),a=(f-u)/(f-u+(d-_)),t.copy(r).addScaledVector(Tg,a);const g=1/(p+m+h);return o=m*g,a=h*g,t.copy(i).addScaledVector(Ks,o).addScaledVector(Ys,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const Vy={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},yr={h:0,s:0,l:0},Ul={h:0,s:0,l:0};function uf(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class Ne{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===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,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=pn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Je.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=Je.workingColorSpace){return this.r=e,this.g=t,this.b=i,Je.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=Je.workingColorSpace){if(e=Rd(e,1),t=an(t,0,1),i=an(i,0,1),t===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+t):i+t-i*t,o=2*i-s;this.r=uf(o,s,e+1/3),this.g=uf(o,s,e),this.b=uf(o,s,e-1/3)}return Je.toWorkingColorSpace(this,r),this}setStyle(e,t=pn){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,t);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,t);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,t);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,t);if(o===6)return this.setHex(parseInt(s,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=pn){const i=Vy[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=To(e.r),this.g=To(e.g),this.b=To(e.b),this}copyLinearToSRGB(e){return this.r=Yu(e.r),this.g=Yu(e.g),this.b=Yu(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=pn){return Je.fromWorkingColorSpace(nn.copy(this),e),Math.round(an(nn.r*255,0,255))*65536+Math.round(an(nn.g*255,0,255))*256+Math.round(an(nn.b*255,0,255))}getHexString(e=pn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Je.workingColorSpace){Je.fromWorkingColorSpace(nn.copy(this),t);const i=nn.r,r=nn.g,s=nn.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,t=Je.workingColorSpace){return Je.fromWorkingColorSpace(nn.copy(this),t),e.r=nn.r,e.g=nn.g,e.b=nn.b,e}getStyle(e=pn){Je.fromWorkingColorSpace(nn.copy(this),e);const t=nn.r,i=nn.g,r=nn.b;return e!==pn?`color(${e} ${t.toFixed(3)} ${i.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(i*255)},${Math.round(r*255)})`}offsetHSL(e,t,i){return this.getHSL(yr),this.setHSL(yr.h+e,yr.s+t,yr.l+i)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,i){return this.r=e.r+(t.r-e.r)*i,this.g=e.g+(t.g-e.g)*i,this.b=e.b+(t.b-e.b)*i,this}lerpHSL(e,t){this.getHSL(yr),e.getHSL(Ul);const i=Da(yr.h,Ul.h,t),r=Da(yr.s,Ul.s,t),s=Da(yr.l,Ul.l,t);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 t=this.r,i=this.g,r=this.b,s=e.elements;return this.r=s[0]*t+s[3]*i+s[6]*r,this.g=s[1]*t+s[4]*i+s[7]*r,this.b=s[2]*t+s[5]*i+s[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const nn=new Ne;Ne.NAMES=Vy;let H1=0;class fi extends Jo{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:H1++}),this.uuid=ui(),this.name="",this.type="Material",this.blending=So,this.side=sr,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=vh,this.blendDst=yh,this.blendEquation=ms,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Ne(0,0,0),this.blendAlpha=0,this.depthFunc=Lc,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=cg,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=zs,this.stencilZFail=zs,this.stencilZPass=zs,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];if(r===void 0){console.warn(`THREE.Material: '${t}' 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[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};
vendor: 50,270 bytes, lines 31-165
31i.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.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!==So&&(i.blending=this.blending),this.side!==sr&&(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!==vh&&(i.blendSrc=this.blendSrc),this.blendDst!==yh&&(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!==Lc&&(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!==cg&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==zs&&(i.stencilFail=this.stencilFail),this.stencilZFail!==zs&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==zs&&(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(t){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 t=e.clippingPlanes;let i=null;if(t!==null){const r=t.length;i=new Array(r);for(let s=0;s!==r;++s)i[s]=t[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 vs extends fi{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Ne(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 wi,this.combine=Ty,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 Ct=new X,Fl=new Ge;class xn{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=Th,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ei,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return By("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let r=0,s=this.itemSize;r<s;r++)this.array[e+r]=t.array[i+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,i=this.count;t<i;t++)Fl.fromBufferAttribute(this,t),Fl.applyMatrix3(e),this.setXY(t,Fl.x,Fl.y);else if(this.itemSize===3)for(let t=0,i=this.count;t<i;t++)Ct.fromBufferAttribute(this,t),Ct.applyMatrix3(e),this.setXYZ(t,Ct.x,Ct.y,Ct.z);return this}applyMatrix4(e){for(let t=0,i=this.count;t<i;t++)Ct.fromBufferAttribute(this,t),Ct.applyMatrix4(e),this.setXYZ(t,Ct.x,Ct.y,Ct.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)Ct.fromBufferAttribute(this,t),Ct.applyNormalMatrix(e),this.setXYZ(t,Ct.x,Ct.y,Ct.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)Ct.fromBufferAttribute(this,t),Ct.transformDirection(e),this.setXYZ(t,Ct.x,Ct.y,Ct.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let i=this.array[e*this.itemSize+t];return this.normalized&&(i=ai(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=Qe(i,this.array)),this.array[e*this.itemSize+t]=i,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=ai(t,this.array)),t}setX(e,t){return this.normalized&&(t=Qe(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=ai(t,this.array)),t}setY(e,t){return this.normalized&&(t=Qe(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=ai(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Qe(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=ai(t,this.array)),t}setW(e,t){return this.normalized&&(t=Qe(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=Qe(t,this.array),i=Qe(i,this.array)),this.array[e+0]=t,this.array[e+1]=i,this}setXYZ(e,t,i,r){return e*=this.itemSize,this.normalized&&(t=Qe(t,this.array),i=Qe(i,this.array),r=Qe(r,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,this}setXYZW(e,t,i,r,s){return e*=this.itemSize,this.normalized&&(t=Qe(t,this.array),i=Qe(i,this.array),r=Qe(r,this.array),s=Qe(s,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,this.array[e+3]=s,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==Th&&(e.usage=this.usage),e}}class Gy extends xn{constructor(e,t,i){super(new Uint16Array(e),t,i)}}class Wy extends xn{constructor(e,t,i){super(new Uint32Array(e),t,i)}}class Sn extends xn{constructor(e,t,i){super(new Float32Array(e),t,i)}}let z1=0;const qn=new Be,ff=new Tt,Zs=new X,Nn=new Pi,ha=new Pi,Vt=new X;class ni extends Jo{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:z1++}),this.uuid=ui(),this.name="",this.type="BufferGeometry",this.index=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(ky(e)?Wy:Gy)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,i=0){this.groups.push({start:e,count:t,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const i=this.attributes.normal;if(i!==void 0){const s=new Ve().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 qn.makeRotationFromQuaternion(e),this.applyMatrix4(qn),this}rotateX(e){return qn.makeRotationX(e),this.applyMatrix4(qn),this}rotateY(e){return qn.makeRotationY(e),this.applyMatrix4(qn),this}rotateZ(e){return qn.makeRotationZ(e),this.applyMatrix4(qn),this}translate(e,t,i){return qn.makeTranslation(e,t,i),this.applyMatrix4(qn),this}scale(e,t,i){return qn.makeScale(e,t,i),this.applyMatrix4(qn),this}lookAt(e){return ff.lookAt(e),ff.updateMatrix(),this.applyMatrix4(ff.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Zs).negate(),this.translate(Zs.x,Zs.y,Zs.z),this}setFromPoints(e){const t=[];for(let i=0,r=e.length;i<r;i++){const s=e[i];t.push(s.x,s.y,s.z||0)}return this.setAttribute("position",new Sn(t,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Pi);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new X(-1/0,-1/0,-1/0),new X(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let i=0,r=t.length;i<r;i++){const s=t[i];Nn.setFromBufferAttribute(s),this.morphTargetsRelative?(Vt.addVectors(this.boundingBox.min,Nn.min),this.boundingBox.expandByPoint(Vt),Vt.addVectors(this.boundingBox.max,Nn.max),this.boundingBox.expandByPoint(Vt)):(this.boundingBox.expandByPoint(Nn.min),this.boundingBox.expandByPoint(Nn.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 Li);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new X,1/0);return}if(e){const i=this.boundingSphere.center;if(Nn.setFromBufferAttribute(e),t)for(let s=0,o=t.length;s<o;s++){const a=t[s];ha.setFromBufferAttribute(a),this.morphTargetsRelative?(Vt.addVectors(Nn.min,ha.min),Nn.expandByPoint(Vt),Vt.addVectors(Nn.max,ha.max),Nn.expandByPoint(Vt)):(Nn.expandByPoint(ha.min),Nn.expandByPoint(ha.max))}Nn.getCenter(i);let r=0;for(let s=0,o=e.count;s<o;s++)Vt.fromBufferAttribute(e,s),r=Math.max(r,i.distanceToSquared(Vt));if(t)for(let s=0,o=t.length;s<o;s++){const a=t[s],l=this.morphTargetsRelative;for(let c=0,u=a.count;c<u;c++)Vt.fromBufferAttribute(a,c),l&&(Zs.fromBufferAttribute(e,c),Vt.add(Zs)),r=Math.max(r,i.distanceToSquared(Vt))}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,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const i=t.position,r=t.normal,s=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new xn(new Float32Array(4*i.count),4));const o=this.getAttribute("tangent"),a=[],l=[];for(let P=0;P<i.count;P++)a[P]=new X,l[P]=new X;const c=new X,u=new X,f=new X,h=new Ge,d=new Ge,_=new Ge,m=new X,p=new X;function g(P,S,M){c.fromBufferAttribute(i,P),u.fromBufferAttribute(i,S),f.fromBufferAttribute(i,M),h.fromBufferAttribute(s,P),d.fromBufferAttribute(s,S),_.fromBufferAttribute(s,M),u.sub(c),f.sub(c),d.sub(h),_.sub(h);const O=1/(d.x*_.y-_.x*d.y);isFinite(O)&&(m.copy(u).multiplyScalar(_.y).addScaledVector(f,-d.y).multiplyScalar(O),p.copy(f).multiplyScalar(d.x).addScaledVector(u,-_.x).multiplyScalar(O),a[P].add(m),a[S].add(m),a[M].add(m),l[P].add(p),l[S].add(p),l[M].add(p))}let x=this.groups;x.length===0&&(x=[{start:0,count:e.count}]);for(let P=0,S=x.length;P<S;++P){const M=x[P],O=M.start,I=M.count;for(let L=O,V=O+I;L<V;L+=3)g(e.getX(L+0),e.getX(L+1),e.getX(L+2))}const v=new X,y=new X,T=new X,b=new X;function A(P){T.fromBufferAttribute(r,P),b.copy(T);const S=a[P];v.copy(S),v.sub(T.multiplyScalar(T.dot(S))).normalize(),y.crossVectors(b,S);const O=y.dot(l[P])<0?-1:1;o.setXYZW(P,v.x,v.y,v.z,O)}for(let P=0,S=x.length;P<S;++P){const M=x[P],O=M.start,I=M.count;for(let L=O,V=O+I;L<V;L+=3)A(e.getX(L+0)),A(e.getX(L+1)),A(e.getX(L+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new xn(new Float32Array(t.count*3),3),this.setAttribute("normal",i);else for(let h=0,d=i.count;h<d;h++)i.setXYZ(h,0,0,0);const r=new X,s=new X,o=new X,a=new X,l=new X,c=new X,u=new X,f=new X;if(e)for(let h=0,d=e.count;h<d;h+=3){const _=e.getX(h+0),m=e.getX(h+1),p=e.getX(h+2);r.fromBufferAttribute(t,_),s.fromBufferAttribute(t,m),o.fromBufferAttribute(t,p),u.subVectors(o,s),f.subVectors(r,s),u.cross(f),a.fromBufferAttribute(i,_),l.fromBufferAttribute(i,m),c.fromBufferAttribute(i,p),a.add(u),l.add(u),c.add(u),i.setXYZ(_,a.x,a.y,a.z),i.setXYZ(m,l.x,l.y,l.z),i.setXYZ(p,c.x,c.y,c.z)}else for(let h=0,d=t.count;h<d;h+=3)r.fromBufferAttribute(t,h+0),s.fromBufferAttribute(t,h+1),o.fromBufferAttribute(t,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 t=0,i=e.count;t<i;t++)Vt.fromBufferAttribute(e,t),Vt.normalize(),e.setXYZ(t,Vt.x,Vt.y,Vt.z)}toNonIndexed(){function e(a,l){const c=a.array,u=a.itemSize,f=a.normalized,h=new c.constructor(l.length*u);let d=0,_=0;for(let m=0,p=l.length;m<p;m++){a.isInterleavedBufferAttribute?d=l[m]*a.data.stride+a.offset:d=l[m]*u;for(let g=0;g<u;g++)h[_++]=c[d++]}return new xn(h,u,f)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new ni,i=this.index.array,r=this.attributes;for(const a in r){const l=r[a],c=e(l,i);t.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],d=e(h,i);l.push(d)}t.morphAttributes[a]=l}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let a=0,l=o.length;a<l;a++){const c=o[a];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){const e={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i){const c=i[l];e.data.attributes[l]=c.toJSON(e.data)}const 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 d=c[f];u.push(d.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 t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(t));const r=e.attributes;for(const c in r){const u=r[c];this.setAttribute(c,u.clone(t))}const s=e.morphAttributes;for(const c in s){const u=[],f=s[c];for(let h=0,d=f.length;h<d;h++)u.push(f[h].clone(t));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 Eg=new Be,is=new fl,kl=new Li,bg=new X,Js=new X,Qs=new X,eo=new X,hf=new X,Bl=new X,Hl=new Ge,zl=new Ge,Vl=new Ge,Ag=new X,wg=new X,Rg=new X,Gl=new X,Wl=new X;class kn extends Tt{constructor(e=new ni,t=new vs){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[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,t){const i=this.geometry,r=i.attributes.position,s=i.morphAttributes.position,o=i.morphTargetsRelative;t.fromBufferAttribute(r,e);const a=this.morphTargetInfluences;if(s&&a){Bl.set(0,0,0);for(let l=0,c=s.length;l<c;l++){const u=a[l],f=s[l];u!==0&&(hf.fromBufferAttribute(f,e),o?Bl.addScaledVector(hf,u):Bl.addScaledVector(hf.sub(t),u))}t.add(Bl)}return t}raycast(e,t){const i=this.geometry,r=this.material,s=this.matrixWorld;r!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),kl.copy(i.boundingSphere),kl.applyMatrix4(s),is.copy(e.ray).recast(e.near),!(kl.containsPoint(is.origin)===!1&&(is.intersectSphere(kl,bg)===null||is.origin.distanceToSquared(bg)>(e.far-e.near)**2))&&(Eg.copy(s).invert(),is.copy(e.ray).applyMatrix4(Eg),!(i.boundingBox!==null&&is.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,is)))}_computeIntersections(e,t,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,d=s.drawRange;if(a!==null)if(Array.isArray(o))for(let _=0,m=h.length;_<m;_++){const p=h[_],g=o[p.materialIndex],x=Math.max(p.start,d.start),v=Math.min(a.count,Math.min(p.start+p.count,d.start+d.count));for(let y=x,T=v;y<T;y+=3){const b=a.getX(y),A=a.getX(y+1),P=a.getX(y+2);r=Xl(this,g,e,i,c,u,f,b,A,P),r&&(r.faceIndex=Math.floor(y/3),r.face.materialIndex=p.materialIndex,t.push(r))}}else{const _=Math.max(0,d.start),m=Math.min(a.count,d.start+d.count);for(let p=_,g=m;p<g;p+=3){const x=a.getX(p),v=a.getX(p+1),y=a.getX(p+2);r=Xl(this,o,e,i,c,u,f,x,v,y),r&&(r.faceIndex=Math.floor(p/3),t.push(r))}}else if(l!==void 0)if(Array.isArray(o))for(let _=0,m=h.length;_<m;_++){const p=h[_],g=o[p.materialIndex],x=Math.max(p.start,d.start),v=Math.min(l.count,Math.min(p.start+p.count,d.start+d.count));for(let y=x,T=v;y<T;y+=3){const b=y,A=y+1,P=y+2;r=Xl(this,g,e,i,c,u,f,b,A,P),r&&(r.faceIndex=Math.floor(y/3),r.face.materialIndex=p.materialIndex,t.push(r))}}else{const _=Math.max(0,d.start),m=Math.min(l.count,d.start+d.count);for(let p=_,g=m;p<g;p+=3){const x=p,v=p+1,y=p+2;r=Xl(this,o,e,i,c,u,f,x,v,y),r&&(r.faceIndex=Math.floor(p/3),t.push(r))}}}}function V1(n,e,t,i,r,s,o,a){let l;if(e.side===bn?l=i.intersectTriangle(o,s,r,!0,a):l=i.intersectTriangle(r,s,o,e.side===sr,a),l===null)return null;Wl.copy(a),Wl.applyMatrix4(n.matrixWorld);const c=t.ray.origin.distanceTo(Wl);return c<t.near||c>t.far?null:{distance:c,point:Wl.clone(),object:n}}function Xl(n,e,t,i,r,s,o,a,l,c){n.getVertexPosition(a,Js),n.getVertexPosition(l,Qs),n.getVertexPosition(c,eo);const u=V1(n,e,t,i,Js,Qs,eo,Gl);if(u){r&&(Hl.fromBufferAttribute(r,a),zl.fromBufferAttribute(r,l),Vl.fromBufferAttribute(r,c),u.uv=Si.getInterpolation(Gl,Js,Qs,eo,Hl,zl,Vl,new Ge)),s&&(Hl.fromBufferAttribute(s,a),zl.fromBufferAttribute(s,l),Vl.fromBufferAttribute(s,c),u.uv1=Si.getInterpolation(Gl,Js,Qs,eo,Hl,zl,Vl,new Ge)),o&&(Ag.fromBufferAttribute(o,a),wg.fromBufferAttribute(o,l),Rg.fromBufferAttribute(o,c),u.normal=Si.getInterpolation(Gl,Js,Qs,eo,Ag,wg,Rg,new X),u.normal.dot(i.direction)>0&&u.normal.multiplyScalar(-1));const f={a,b:l,c,normal:new X,materialIndex:0};Si.getNormal(Js,Qs,eo,f.normal),u.face=f}return u}class hl extends ni{constructor(e=1,t=1,i=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,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,d=0;_("z","y","x",-1,-1,i,t,e,o,s,0),_("z","y","x",1,-1,i,t,-e,o,s,1),_("x","z","y",1,1,e,i,t,r,o,2),_("x","z","y",1,-1,e,i,-t,r,o,3),_("x","y","z",1,-1,e,t,i,r,s,4),_("x","y","z",-1,-1,e,t,-i,r,s,5),this.setIndex(l),this.setAttribute("position",new Sn(c,3)),this.setAttribute("normal",new Sn(u,3)),this.setAttribute("uv",new Sn(f,2));function _(m,p,g,x,v,y,T,b,A,P,S){const M=y/A,O=T/P,I=y/2,L=T/2,V=b/2,$=A+1,G=P+1;let J=0,U=0;const ne=new X;for(let ae=0;ae<G;ae++){const me=ae*O-L;for(let Ee=0;Ee<$;Ee++){const Ue=Ee*M-I;ne[m]=Ue*x,ne[p]=me*v,ne[g]=V,c.push(ne.x,ne.y,ne.z),ne[m]=0,ne[p]=0,ne[g]=b>0?1:-1,u.push(ne.x,ne.y,ne.z),f.push(Ee/A),f.push(1-ae/P),J+=1}}for(let ae=0;ae<P;ae++)for(let me=0;me<A;me++){const Ee=h+me+$*ae,Ue=h+me+$*(ae+1),Q=h+(me+1)+$*(ae+1),le=h+(me+1)+$*ae;l.push(Ee,Ue,le),l.push(Ue,Q,le),U+=6}a.addGroup(d,U,S),d+=U,h+=J}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new hl(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function zo(n){const e={};for(const t in n){e[t]={};for(const i in n[t]){const r=n[t][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[t][i]=null):e[t][i]=r.clone():Array.isArray(r)?e[t][i]=r.slice():e[t][i]=r}}return e}function hn(n){const e={};for(let t=0;t<n.length;t++){const i=zo(n[t]);for(const r in i)e[r]=i[r]}return e}function G1(n){const e=[];for(let t=0;t<n.length;t++)e.push(n[t].clone());return e}function Xy(n){const e=n.getRenderTarget();return e===null?n.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Je.workingColorSpace}const W1={clone:zo,merge:hn};var X1=`void main() { 32 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 33}`,j1=`void main() { 34 gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 ); 35}`;class Vr extends fi{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=X1,this.fragmentShader=j1,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=zo(e.uniforms),this.uniformsGroups=G1(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 t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const r in this.uniforms){const o=this.uniforms[r].value;o&&o.isTexture?t.uniforms[r]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?t.uniforms[r]={type:"c",value:o.getHex()}:o&&o.isVector2?t.uniforms[r]={type:"v2",value:o.toArray()}:o&&o.isVector3?t.uniforms[r]={type:"v3",value:o.toArray()}:o&&o.isVector4?t.uniforms[r]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?t.uniforms[r]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?t.uniforms[r]={type:"m4",value:o.toArray()}:t.uniforms[r]={value:o}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const i={};for(const r in this.extensions)this.extensions[r]===!0&&(i[r]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class jy extends Tt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Be,this.projectionMatrix=new Be,this.projectionMatrixInverse=new Be,this.coordinateSystem=er}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const xr=new X,Cg=new Ge,Pg=new Ge;class gn extends jy{constructor(e=50,t=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=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=Ho*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Ia*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Ho*2*Math.atan(Math.tan(Ia*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,i){xr.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(xr.x,xr.y).multiplyScalar(-e/xr.z),xr.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(xr.x,xr.y).multiplyScalar(-e/xr.z)}getViewSize(e,t){return this.getViewBounds(e,Cg,Pg),t.subVectors(Pg,Cg)}setViewOffset(e,t,i,r,s,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=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 t=e*Math.tan(Ia*.5*this.fov)/this.zoom,i=2*t,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,t-=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,t,t-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const to=-90,no=1;class q1 extends Tt{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new gn(to,no,e,t);r.layers=this.layers,this.add(r);const s=new gn(to,no,e,t);s.layers=this.layers,this.add(s);const o=new gn(to,no,e,t);o.layers=this.layers,this.add(o);const a=new gn(to,no,e,t);a.layers=this.layers,this.add(a);const l=new gn(to,no,e,t);l.layers=this.layers,this.add(l);const c=new gn(to,no,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,r,s,o,a,l]=t;for(const c of t)this.remove(c);if(e===er)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===Fc)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 t)this.add(c),c.updateMatrixWorld()}update(e,t){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(),d=e.getActiveMipmapLevel(),_=e.xr.enabled;e.xr.enabled=!1;const m=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,r),e.render(t,s),e.setRenderTarget(i,1,r),e.render(t,o),e.setRenderTarget(i,2,r),e.render(t,a),e.setRenderTarget(i,3,r),e.render(t,l),e.setRenderTarget(i,4,r),e.render(t,c),i.texture.generateMipmaps=m,e.setRenderTarget(i,5,r),e.render(t,u),e.setRenderTarget(f,h,d),e.xr.enabled=_,i.texture.needsPMREMUpdate=!0}}class qy extends Dt{constructor(e,t,i,r,s,o,a,l,c,u){e=e!==void 0?e:[],t=t!==void 0?t:Oo,super(e,t,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 $1 extends Ds{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];this.texture=new qy(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:_n}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:` 36 37 varying vec3 vWorldDirection; 38 39 vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 40 41 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 42 43 } 44 45 void main() { 46 47 vWorldDirection = transformDirection( position, modelMatrix ); 48 49 #include <begin_vertex> 50 #include <project_vertex> 51 52 } 53 `,fragmentShader:` 54 55 uniform sampler2D tEquirect; 56 57 varying vec3 vWorldDirection; 58 59 #include <common> 60 61 void main() { 62 63 vec3 direction = normalize( vWorldDirection ); 64 65 vec2 sampleUV = equirectUv( direction ); 66 67 gl_FragColor = texture2D( tEquirect, sampleUV ); 68 69 } 70 `},r=new hl(5,5,5),s=new Vr({name:"CubemapFromEquirect",uniforms:zo(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:bn,blending:Fr});s.uniforms.tEquirect.value=t;const o=new kn(r,s),a=t.minFilter;return t.minFilter===Qi&&(t.minFilter=_n),new q1(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,i,r){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,r);e.setRenderTarget(s)}}const df=new X,K1=new X,Y1=new Ve;class hs{constructor(e=new X(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,r){return this.normal.set(e,t,i),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const r=df.subVectors(i,t).cross(K1.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const i=e.delta(df),r=this.normal.dot(i);if(r===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/r;return s<0||s>1?null:t.copy(e.start).addScaledVector(i,s)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||Y1.getNormalMatrix(e),r=this.coplanarPoint(df).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 rs=new Li,jl=new X;class Pd{constructor(e=new hs,t=new hs,i=new hs,r=new hs,s=new hs,o=new hs){this.planes=[e,t,i,r,s,o]}set(e,t,i,r,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(r),a[4].copy(s),a[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=er){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],d=r[8],_=r[9],m=r[10],p=r[11],g=r[12],x=r[13],v=r[14],y=r[15];if(i[0].setComponents(l-s,h-c,p-d,y-g).normalize(),i[1].setComponents(l+s,h+c,p+d,y+g).normalize(),i[2].setComponents(l+o,h+u,p+_,y+x).normalize(),i[3].setComponents(l-o,h-u,p-_,y-x).normalize(),i[4].setComponents(l-a,h-f,p-m,y-v).normalize(),t===er)i[5].setComponents(l+a,h+f,p+m,y+v).normalize();else if(t===Fc)i[5].setComponents(a,f,m,v).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),rs.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),rs.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(rs)}intersectsSprite(e){return rs.center.set(0,0,0),rs.radius=.7071067811865476,rs.applyMatrix4(e.matrixWorld),this.intersectsSphere(rs)}intersectsSphere(e){const t=this.planes,i=e.center,r=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(i)<r)return!1;return!0}intersectsBox(e){const t=this.planes;for(let i=0;i<6;i++){const r=t[i];if(jl.x=r.normal.x>0?e.max.x:e.min.x,jl.y=r.normal.y>0?e.max.y:e.min.y,jl.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(jl)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function $y(){let n=null,e=!1,t=null,i=null;function r(s,o){t(s,o),i=n.requestAnimationFrame(r)}return{start:function(){e!==!0&&t!==null&&(i=n.requestAnimationFrame(r),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){n=s}}}function Z1(n){const e=new WeakMap;function t(a,l){const c=a.array,u=a.usage,f=c.byteLength,h=n.createBuffer();n.bindBuffer(l,h),n.bufferData(l,c,u),a.onUploadCallback();let d;if(c instanceof Float32Array)d=n.FLOAT;else if(c instanceof Uint16Array)a.isFloat16BufferAttribute?d=n.HALF_FLOAT:d=n.UNSIGNED_SHORT;else if(c instanceof Int16Array)d=n.SHORT;else if(c instanceof Uint32Array)d=n.UNSIGNED_INT;else if(c instanceof Int32Array)d=n.INT;else if(c instanceof Int8Array)d=n.BYTE;else if(c instanceof Uint8Array)d=n.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)d=n.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);return{buffer:h,type:d,bytesPerElement:c.BYTES_PER_ELEMENT,version:a.version,size:f}}function i(a,l,c){const u=l.array,f=l._updateRange,h=l.updateRanges;if(n.bindBuffer(c,a),f.count===-1&&h.length===0&&n.bufferSubData(c,0,u),h.length!==0){for(let d=0,_=h.length;d<_;d++){const m=h[d];n.bufferSubData(c,m.start*u.BYTES_PER_ELEMENT,u,m.start,m.count)}l.clearUpdateRanges()}f.count!==-1&&(n.bufferSubData(c,f.offset*u.BYTES_PER_ELEMENT,u,f.offset,f.count),f.count=-1),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&&(n.deleteBuffer(l.buffer),e.delete(a))}function o(a,l){if(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}a.isInterleavedBufferAttribute&&(a=a.data);const c=e.get(a);if(c===void 0)e.set(a,t(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}}class cu extends ni{constructor(e=1,t=1,i=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:i,heightSegments:r};const s=e/2,o=t/2,a=Math.floor(i),l=Math.floor(r),c=a+1,u=l+1,f=e/a,h=t/l,d=[],_=[],m=[],p=[];for(let g=0;g<u;g++){const x=g*h-o;for(let v=0;v<c;v++){const y=v*f-s;_.push(y,-x,0),m.push(0,0,1),p.push(v/a),p.push(1-g/l)}}for(let g=0;g<l;g++)for(let x=0;x<a;x++){const v=x+c*g,y=x+c*(g+1),T=x+1+c*(g+1),b=x+1+c*g;d.push(v,y,b),d.push(y,T,b)}this.setIndex(d),this.setAttribute("position",new Sn(_,3)),this.setAttribute("normal",new Sn(m,3)),this.setAttribute("uv",new Sn(p,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new cu(e.width,e.height,e.widthSegments,e.heightSegments)}}var J1=`#ifdef USE_ALPHAHASH 71 if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard; 72#endif`,Q1=`#ifdef USE_ALPHAHASH 73 const float ALPHA_HASH_SCALE = 0.05; 74 float hash2D( vec2 value ) { 75 return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) ); 76 } 77 float hash3D( vec3 value ) { 78 return hash2D( vec2( hash2D( value.xy ), value.z ) ); 79 } 80 float getAlphaHashThreshold( vec3 position ) { 81 float maxDeriv = max( 82 length( dFdx( position.xyz ) ), 83 length( dFdy( position.xyz ) ) 84 ); 85 float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv ); 86 vec2 pixScales = vec2( 87 exp2( floor( log2( pixScale ) ) ), 88 exp2( ceil( log2( pixScale ) ) ) 89 ); 90 vec2 alpha = vec2( 91 hash3D( floor( pixScales.x * position.xyz ) ), 92 hash3D( floor( pixScales.y * position.xyz ) ) 93 ); 94 float lerpFactor = fract( log2( pixScale ) ); 95 float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y; 96 float a = min( lerpFactor, 1.0 - lerpFactor ); 97 vec3 cases = vec3( 98 x * x / ( 2.0 * a * ( 1.0 - a ) ), 99 ( x - 0.5 * a ) / ( 1.0 - a ), 100 1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) ) 101 ); 102 float threshold = ( x < ( 1.0 - a ) ) 103 ? ( ( x < a ) ? cases.x : cases.y ) 104 : cases.z; 105 return clamp( threshold , 1.0e-6, 1.0 ); 106 } 107#endif`,eP=`#ifdef USE_ALPHAMAP 108 diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g; 109#endif`,tP=`#ifdef USE_ALPHAMAP 110 uniform sampler2D alphaMap; 111#endif`,nP=`#ifdef USE_ALPHATEST 112 #ifdef ALPHA_TO_COVERAGE 113 diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a ); 114 if ( diffuseColor.a == 0.0 ) discard; 115 #else 116 if ( diffuseColor.a < alphaTest ) discard; 117 #endif 118#endif`,iP=`#ifdef USE_ALPHATEST 119 uniform float alphaTest; 120#endif`,rP=`#ifdef USE_AOMAP 121 float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0; 122 reflectedLight.indirectDiffuse *= ambientOcclusion; 123 #if defined( USE_CLEARCOAT ) 124 clearcoatSpecularIndirect *= ambientOcclusion; 125 #endif 126 #if defined( USE_SHEEN ) 127 sheenSpecularIndirect *= ambientOcclusion; 128 #endif 129 #if defined( USE_ENVMAP ) && defined( STANDARD ) 130 float dotNV = saturate( dot( geometryNormal, geometryViewDir ) ); 131 reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness ); 132 #endif 133#endif`,sP=`#ifdef USE_AOMAP 134 uniform sampler2D aoMap; 135 uniform float aoMapIntensity; 136#endif`,oP=`#ifdef USE_BATCHING 137 attribute float batchId; 138 uniform highp sampler2D batchingTexture; 139 mat4 getBatchingMatrix( const in float i ) { 140 int size = textureSize( batchingTexture, 0 ).x; 141 int j = int( i ) * 4; 142 int x = j % size; 143 int y = j / size; 144 vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 ); 145 vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 ); 146 vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 ); 147 vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 ); 148 return mat4( v1, v2, v3, v4 ); 149 } 150#endif`,aP=`#ifdef USE_BATCHING 151 mat4 batchingMatrix = getBatchingMatrix( batchId ); 152#endif`,lP=`vec3 transformed = vec3( position ); 153#ifdef USE_ALPHAHASH 154 vPosition = vec3( position ); 155#endif`,cP=`vec3 objectNormal = vec3( normal ); 156#ifdef USE_TANGENT 157 vec3 objectTangent = vec3( tangent.xyz ); 158#endif`,uP=`float G_BlinnPhong_Implicit( ) { 159 return 0.25; 160} 161float D_BlinnPhong( const in float shininess, const in float dotNH ) { 162 return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); 163} 164vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) { 165 vec3 halfDir = normalize( lightDir + viewDir );
166 float dotNH = saturate( dot( normal, halfDir ) ); 167 float dotVH = saturate( dot( viewDir, halfDir ) ); 168 vec3 F = F_Schlick( specularColor, 1.0, dotVH ); 169 float G = G_BlinnPhong_Implicit( ); 170 float D = D_BlinnPhong( shininess, dotNH ); 171 return F * ( G * D ); 172} // validated`,fP=`#ifdef USE_IRIDESCENCE 173 const mat3 XYZ_TO_REC709 = mat3( 174 3.2404542, -0.9692660, 0.0556434, 175 -1.5371385, 1.8760108, -0.2040259, 176 -0.4985314, 0.0415560, 1.0572252 177 ); 178 vec3 Fresnel0ToIor( vec3 fresnel0 ) { 179 vec3 sqrtF0 = sqrt( fresnel0 ); 180 return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 ); 181 } 182 vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) { 183 return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) ); 184 } 185 float IorToFresnel0( float transmittedIor, float incidentIor ) { 186 return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor )); 187 } 188 vec3 evalSensitivity( float OPD, vec3 shift ) { 189 float phase = 2.0 * PI * OPD * 1.0e-9; 190 vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 ); 191 vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 ); 192 vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 ); 193 vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var ); 194 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 ) ); 195 xyz /= 1.0685e-7; 196 vec3 rgb = XYZ_TO_REC709 * xyz; 197 return rgb; 198 } 199 vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) { 200 vec3 I; 201 float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) ); 202 float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) ); 203 float cosTheta2Sq = 1.0 - sinTheta2Sq; 204 if ( cosTheta2Sq < 0.0 ) { 205 return vec3( 1.0 ); 206 } 207 float cosTheta2 = sqrt( cosTheta2Sq ); 208 float R0 = IorToFresnel0( iridescenceIOR, outsideIOR ); 209 float R12 = F_Schlick( R0, 1.0, cosTheta1 );
210 float T121 = 1.0 - R12; 211 float phi12 = 0.0; 212 if ( iridescenceIOR < outsideIOR ) phi12 = PI; 213 float phi21 = PI - phi12; 214 vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR ); 215 vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 ); 216 vec3 phi23 = vec3( 0.0 ); 217 if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI; 218 if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI; 219 if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI; 220 float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2; 221 vec3 phi = vec3( phi21 ) + phi23; 222 vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 ); 223 vec3 r123 = sqrt( R123 ); 224 vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 ); 225 vec3 C0 = R12 + Rs; 226 I = C0; 227 vec3 Cm = Rs - T121; 228 for ( int m = 1; m <= 2; ++ m ) { 229 Cm *= r123; 230 vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi ); 231 I += Cm * Sm; 232 } 233 return max( I, vec3( 0.0 ) ); 234 } 235#endif`,hP=`#ifdef USE_BUMPMAP 236 uniform sampler2D bumpMap; 237 uniform float bumpScale; 238 vec2 dHdxy_fwd() { 239 vec2 dSTdx = dFdx( vBumpMapUv ); 240 vec2 dSTdy = dFdy( vBumpMapUv ); 241 float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x; 242 float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll; 243 float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll; 244 return vec2( dBx, dBy ); 245 } 246 vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { 247 vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) ); 248 vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) ); 249 vec3 vN = surf_norm; 250 vec3 R1 = cross( vSigmaY, vN ); 251 vec3 R2 = cross( vN, vSigmaX ); 252 float fDet = dot( vSigmaX, R1 ) * faceDirection; 253 vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); 254 return normalize( abs( fDet ) * surf_norm - vGrad ); 255 } 256#endif`,dP=`#if NUM_CLIPPING_PLANES > 0 257 vec4 plane; 258 #ifdef ALPHA_TO_COVERAGE 259 float distanceToPlane, distanceGradient; 260 float clipOpacity = 1.0; 261 #pragma unroll_loop_start 262 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 263 plane = clippingPlanes[ i ]; 264 distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; 265 distanceGradient = fwidth( distanceToPlane ) / 2.0; 266 clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); 267 if ( clipOpacity == 0.0 ) discard; 268 } 269 #pragma unroll_loop_end 270 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 271 float unionClipOpacity = 1.0; 272 #pragma unroll_loop_start 273 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 274 plane = clippingPlanes[ i ]; 275 distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; 276 distanceGradient = fwidth( distanceToPlane ) / 2.0; 277 unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); 278 } 279 #pragma unroll_loop_end 280 clipOpacity *= 1.0 - unionClipOpacity; 281 #endif 282 diffuseColor.a *= clipOpacity; 283 if ( diffuseColor.a == 0.0 ) discard; 284 #else 285 #pragma unroll_loop_start 286 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 287 plane = clippingPlanes[ i ]; 288 if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; 289 } 290 #pragma unroll_loop_end 291 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 292 bool clipped = true; 293 #pragma unroll_loop_start 294 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 295 plane = clippingPlanes[ i ]; 296 clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; 297 } 298 #pragma unroll_loop_end 299 if ( clipped ) discard; 300 #endif 301 #endif 302#endif`,pP=`#if NUM_CLIPPING_PLANES > 0 303 varying vec3 vClipPosition; 304 uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; 305#endif`,mP=`#if NUM_CLIPPING_PLANES > 0 306 varying vec3 vClipPosition; 307#endif`,gP=`#if NUM_CLIPPING_PLANES > 0 308 vClipPosition = - mvPosition.xyz; 309#endif`,_P=`#if defined( USE_COLOR_ALPHA ) 310 diffuseColor *= vColor; 311#elif defined( USE_COLOR ) 312 diffuseColor.rgb *= vColor; 313#endif`,vP=`#if defined( USE_COLOR_ALPHA ) 314 varying vec4 vColor; 315#elif defined( USE_COLOR ) 316 varying vec3 vColor; 317#endif`,yP=`#if defined( USE_COLOR_ALPHA ) 318 varying vec4 vColor; 319#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) 320 varying vec3 vColor; 321#endif`,xP=`#if defined( USE_COLOR_ALPHA ) 322 vColor = vec4( 1.0 ); 323#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) 324 vColor = vec3( 1.0 ); 325#endif 326#ifdef USE_COLOR 327 vColor *= color; 328#endif 329#ifdef USE_INSTANCING_COLOR 330 vColor.xyz *= instanceColor.xyz; 331#endif`,SP=`#define PI 3.141592653589793 332#define PI2 6.283185307179586 333#define PI_HALF 1.5707963267948966 334#define RECIPROCAL_PI 0.3183098861837907 335#define RECIPROCAL_PI2 0.15915494309189535 336#define EPSILON 1e-6 337#ifndef saturate 338#define saturate( a ) clamp( a, 0.0, 1.0 ) 339#endif 340#define whiteComplement( a ) ( 1.0 - saturate( a ) ) 341float pow2( const in float x ) { return x*x; } 342vec3 pow2( const in vec3 x ) { return x*x; } 343float pow3( const in float x ) { return x*x*x; } 344float pow4( const in float x ) { float x2 = x*x; return x2*x2; } 345float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } 346float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } 347highp float rand( const in vec2 uv ) { 348 const highp float a = 12.9898, b = 78.233, c = 43758.5453; 349 highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); 350 return fract( sin( sn ) * c ); 351} 352#ifdef HIGH_PRECISION 353 float precisionSafeLength( vec3 v ) { return length( v ); } 354#else 355 float precisionSafeLength( vec3 v ) { 356 float maxComponent = max3( abs( v ) ); 357 return length( v / maxComponent ) * maxComponent; 358 } 359#endif 360struct IncidentLight { 361 vec3 color; 362 vec3 direction; 363 bool visible; 364}; 365struct ReflectedLight { 366 vec3 directDiffuse; 367 vec3 directSpecular; 368 vec3 indirectDiffuse; 369 vec3 indirectSpecular; 370}; 371#ifdef USE_ALPHAHASH 372 varying vec3 vPosition; 373#endif 374vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 375 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 376} 377vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { 378 return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); 379} 380mat3 transposeMat3( const in mat3 m ) { 381 mat3 tmp; 382 tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); 383 tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); 384 tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); 385 return tmp; 386} 387float luminance( const in vec3 rgb ) { 388 const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 ); 389 return dot( weights, rgb ); 390} 391bool isPerspectiveMatrix( mat4 m ) { 392 return m[ 2 ][ 3 ] == - 1.0; 393} 394vec2 equirectUv( in vec3 dir ) { 395 float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; 396 float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; 397 return vec2( u, v ); 398}
399vec3 BRDF_Lambert( const in vec3 diffuseColor ) { 400 return RECIPROCAL_PI * diffuseColor; 401} 402vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { 403 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 404 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 405} 406float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { 407 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 408 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 409} // validated`,MP=`#ifdef ENVMAP_TYPE_CUBE_UV 410 #define cubeUV_minMipLevel 4.0 411 #define cubeUV_minTileSize 16.0 412 float getFace( vec3 direction ) { 413 vec3 absDirection = abs( direction ); 414 float face = - 1.0; 415 if ( absDirection.x > absDirection.z ) { 416 if ( absDirection.x > absDirection.y ) 417 face = direction.x > 0.0 ? 0.0 : 3.0; 418 else 419 face = direction.y > 0.0 ? 1.0 : 4.0; 420 } else { 421 if ( absDirection.z > absDirection.y ) 422 face = direction.z > 0.0 ? 2.0 : 5.0; 423 else 424 face = direction.y > 0.0 ? 1.0 : 4.0; 425 } 426 return face; 427 } 428 vec2 getUV( vec3 direction, float face ) { 429 vec2 uv; 430 if ( face == 0.0 ) { 431 uv = vec2( direction.z, direction.y ) / abs( direction.x ); 432 } else if ( face == 1.0 ) { 433 uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); 434 } else if ( face == 2.0 ) { 435 uv = vec2( - direction.x, direction.y ) / abs( direction.z ); 436 } else if ( face == 3.0 ) { 437 uv = vec2( - direction.z, direction.y ) / abs( direction.x ); 438 } else if ( face == 4.0 ) { 439 uv = vec2( - direction.x, direction.z ) / abs( direction.y ); 440 } else { 441 uv = vec2( direction.x, direction.y ) / abs( direction.z ); 442 } 443 return 0.5 * ( uv + 1.0 ); 444 } 445 vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { 446 float face = getFace( direction ); 447 float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); 448 mipInt = max( mipInt, cubeUV_minMipLevel ); 449 float faceSize = exp2( mipInt ); 450 highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; 451 if ( face > 2.0 ) { 452 uv.y += faceSize; 453 face -= 3.0; 454 } 455 uv.x += face * faceSize; 456 uv.x += filterInt * 3.0 * cubeUV_minTileSize; 457 uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); 458 uv.x *= CUBEUV_TEXEL_WIDTH; 459 uv.y *= CUBEUV_TEXEL_HEIGHT; 460 #ifdef texture2DGradEXT 461 return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; 462 #else 463 return texture2D( envMap, uv ).rgb; 464 #endif 465 } 466 #define cubeUV_r0 1.0 467 #define cubeUV_m0 - 2.0 468 #define cubeUV_r1 0.8 469 #define cubeUV_m1 - 1.0 470 #define cubeUV_r4 0.4 471 #define cubeUV_m4 2.0 472 #define cubeUV_r5 0.305 473 #define cubeUV_m5 3.0 474 #define cubeUV_r6 0.21 475 #define cubeUV_m6 4.0 476 float roughnessToMip( float roughness ) { 477 float mip = 0.0; 478 if ( roughness >= cubeUV_r1 ) { 479 mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; 480 } else if ( roughness >= cubeUV_r4 ) { 481 mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; 482 } else if ( roughness >= cubeUV_r5 ) { 483 mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; 484 } else if ( roughness >= cubeUV_r6 ) { 485 mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; 486 } else { 487 mip = - 2.0 * log2( 1.16 * roughness ); } 488 return mip; 489 } 490 vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { 491 float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); 492 float mipF = fract( mip ); 493 float mipInt = floor( mip ); 494 vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); 495 if ( mipF == 0.0 ) { 496 return vec4( color0, 1.0 ); 497 } else { 498 vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); 499 return vec4( mix( color0, color1, mipF ), 1.0 ); 500 } 501 } 502#endif`,TP=`vec3 transformedNormal = objectNormal; 503#ifdef USE_TANGENT 504 vec3 transformedTangent = objectTangent; 505#endif 506#ifdef USE_BATCHING 507 mat3 bm = mat3( batchingMatrix ); 508 transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); 509 transformedNormal = bm * transformedNormal; 510 #ifdef USE_TANGENT 511 transformedTangent = bm * transformedTangent; 512 #endif 513#endif 514#ifdef USE_INSTANCING 515 mat3 im = mat3( instanceMatrix ); 516 transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); 517 transformedNormal = im * transformedNormal; 518 #ifdef USE_TANGENT 519 transformedTangent = im * transformedTangent; 520 #endif 521#endif 522transformedNormal = normalMatrix * transformedNormal; 523#ifdef FLIP_SIDED 524 transformedNormal = - transformedNormal; 525#endif 526#ifdef USE_TANGENT 527 transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; 528 #ifdef FLIP_SIDED 529 transformedTangent = - transformedTangent; 530 #endif 531#endif`,EP=`#ifdef USE_DISPLACEMENTMAP 532 uniform sampler2D displacementMap; 533 uniform float displacementScale; 534 uniform float displacementBias; 535#endif`,bP=`#ifdef USE_DISPLACEMENTMAP 536 transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + dis
536placementBias ); 537#endif`,AP=`#ifdef USE_EMISSIVEMAP 538 vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); 539 totalEmissiveRadiance *= emissiveColor.rgb; 540#endif`,wP=`#ifdef USE_EMISSIVEMAP 541 uniform sampler2D emissiveMap; 542#endif`,RP="gl_FragColor = linearToOutputTexel( gl_FragColor );",CP=` 543const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( 544 vec3( 0.8224621, 0.177538, 0.0 ), 545 vec3( 0.0331941, 0.9668058, 0.0 ), 546 vec3( 0.0170827, 0.0723974, 0.9105199 ) 547); 548const mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3( 549 vec3( 1.2249401, - 0.2249404, 0.0 ), 550 vec3( - 0.0420569, 1.0420571, 0.0 ), 551 vec3( - 0.0196376, - 0.0786361, 1.0982735 ) 552); 553vec4 LinearSRGBToLinearDisplayP3( in vec4 value ) { 554 return vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a ); 555} 556vec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) { 557 return vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a ); 558} 559vec4 LinearTransferOETF( in vec4 value ) { 560 return value; 561} 562vec4 sRGBTransferOETF( in vec4 value ) { 563 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 ); 564} 565vec4 LinearToLinear( in vec4 value ) { 566 return value; 567} 568vec4 LinearTosRGB( in vec4 value ) { 569 return sRGBTransferOETF( value ); 570}`,PP=`#ifdef USE_ENVMAP 571 #ifdef ENV_WORLDPOS 572 vec3 cameraToFrag; 573 if ( isOrthographic ) { 574 cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 575 } else { 576 cameraToFrag = normalize( vWorldPosition - cameraPosition ); 577 } 578 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 579 #ifdef ENVMAP_MODE_REFLECTION 580 vec3 reflectVec = reflect( cameraToFrag, worldNormal ); 581 #else 582 vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); 583 #endif 584 #else 585 vec3 reflectVec = vReflect; 586 #endif 587 #ifdef ENVMAP_TYPE_CUBE 588 vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); 589 #else 590 vec4 envColor = vec4( 0.0 ); 591 #endif 592 #ifdef ENVMAP_BLENDING_MULTIPLY 593 outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); 594 #elif defined( ENVMAP_BLENDING_MIX ) 595 outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); 596 #elif defined( ENVMAP_BLENDING_ADD ) 597 outgoingLight += envColor.xyz * specularStrength * reflectivity; 598 #endif 599#endif`,LP=`#ifdef USE_ENVMAP 600 uniform float envMapIntensity; 601 uniform float flipEnvMap; 602 uniform mat3 envMapRotation; 603 #ifdef ENVMAP_TYPE_CUBE 604 uniform samplerCube envMap; 605 #else 606 uniform sampler2D envMap; 607 #endif 608 609#endif`,IP=`#ifdef USE_ENVMAP 610 uniform float reflectivity; 611 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 612 #define ENV_WORLDPOS 613 #endif 614 #ifdef ENV_WORLDPOS 615 varying vec3 vWorldPosition; 616 uniform float refractionRatio; 617 #else 618 varying vec3 vReflect; 619 #endif 620#endif`,DP=`#ifdef USE_ENVMAP 621 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 622 #define ENV_WORLDPOS 623 #endif 624 #ifdef ENV_WORLDPOS 625 626 varying vec3 vWorldPosition; 627 #else 628 varying vec3 vReflect; 629 uniform float refractionRatio; 630 #endif 631#endif`,NP=`#ifdef USE_ENVMAP 632 #ifdef ENV_WORLDPOS 633 vWorldPosition = worldPosition.xyz; 634 #else 635 vec3 cameraToVertex; 636 if ( isOrthographic ) { 637 cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 638 } else {
639 cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); 640 } 641 vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 642 #ifdef ENVMAP_MODE_REFLECTION 643 vReflect = reflect( cameraToVertex, worldNormal ); 644 #else 645 vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); 646 #endif 647 #endif 648#endif`,OP=`#ifdef USE_FOG 649 vFogDepth = - mvPosition.z; 650#endif`,UP=`#ifdef USE_FOG 651 varying float vFogDepth; 652#endif`,FP=`#ifdef USE_FOG 653 #ifdef FOG_EXP2 654 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); 655 #else 656 float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); 657 #endif 658 gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); 659#endif`,kP=`#ifdef USE_FOG 660 uniform vec3 fogColor; 661 varying float vFogDepth; 662 #ifdef FOG_EXP2 663 uniform float fogDensity; 664 #else 665 uniform float fogNear; 666 uniform float fogFar; 667 #endif 668#endif`,BP=`#ifdef USE_GRADIENTMAP 669 uniform sampler2D gradientMap; 670#endif 671vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { 672 float dotNL = dot( normal, lightDirection ); 673 vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); 674 #ifdef USE_GRADIENTMAP 675 return vec3( texture2D( gradientMap, coord ).r ); 676 #else 677 vec2 fw = fwidth( coord ) * 0.5; 678 return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); 679 #endif 680}`,HP=`#ifdef USE_LIGHTMAP 681 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 682 vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; 683 reflectedLight.indirectDiffuse += lightMapIrradiance; 684#endif`,zP=`#ifdef USE_LIGHTMAP 685 uniform sampler2D lightMap; 686 uniform float lightMapIntensity; 687#endif`,VP=`LambertMaterial material; 688material.diffuseColor = diffuseColor.rgb; 689material.specularStrength = specularStrength;`,GP=`varying vec3 vViewPosition; 690struct LambertMaterial { 691 vec3 diffuseColor; 692 float specularStrength; 693}; 694void 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 ) { 695 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 696 vec3 irradiance = dotNL * directLight.color; 697 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 698} 699void 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 ) { 700 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 701} 702#define RE_Direct RE_Direct_Lambert 703#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,WP=`uniform bool receiveShadow; 704uniform vec3 ambientLightColor; 705#if defined( USE_LIGHT_PROBES ) 706 uniform vec3 lightProbe[ 9 ]; 707#endif 708vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { 709 float x = normal.x, y = normal.y, z = normal.z; 710 vec3 result = shCoefficients[ 0 ] * 0.886227; 711 result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; 712 result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; 713 result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; 714 result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; 715 result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; 716 result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); 717 result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; 718 result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); 719 return result; 720} 721vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { 722 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 723 vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); 724 return irradiance; 725} 726vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { 727 vec3 irradiance = ambientLightColor; 728 return irradiance; 729} 730float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { 731 #if defined ( LEGACY_LIGHTS ) 732 if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) { 733 return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent ); 734 } 735 return 1.0; 736 #else 737 float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); 738 if ( cutoffDistance > 0.0 ) { 739 distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); 740 } 741 return distanceFalloff; 742 #endif 743} 744float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { 745 return smoothstep( coneCosine, penumbraCosine, angleCosine ); 746} 747#if NUM_DIR_LIGHTS > 0 748 struct DirectionalLight { 749 vec3 direction; 750 vec3 color; 751 }; 752 uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; 753 void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { 754 light.color = directionalLight.color; 755 light.direction = directionalLight.direction; 756 light.visible = true; 757 } 758#endif 759#if NUM_POINT_LIGHTS > 0 760 struct PointLight { 761 vec3 position; 762 vec3 color; 763 float distance; 764 float decay; 765 }; 766 uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; 767 void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { 768 vec3 lVector = pointLight.position - geometryPosition; 769 light.direction = normalize( lVector ); 770 float lightDistance = length( lVector ); 771 light.color = pointLight.color; 772 light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); 773 light.visible = ( light.color != vec3( 0.0 ) ); 774 } 775#endif
776#if NUM_SPOT_LIGHTS > 0 777 struct SpotLight { 778 vec3 position; 779 vec3 direction; 780 vec3 color; 781 float distance; 782 float decay; 783 float coneCos; 784 float penumbraCos; 785 }; 786 uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; 787 void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { 788 vec3 lVector = spotLight.position - geometryPosition; 789 light.direction = normalize( lVector ); 790 float angleCos = dot( light.direction, spotLight.direction ); 791 float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); 792 if ( spotAttenuation > 0.0 ) { 793 float lightDistance = length( lVector ); 794 light.color = spotLight.color * spotAttenuation; 795 light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); 796 light.visible = ( light.color != vec3( 0.0 ) ); 797 } else { 798 light.color = vec3( 0.0 ); 799 light.visible = false; 800 } 801 } 802#endif 803#if NUM_RECT_AREA_LIGHTS > 0 804 struct RectAreaLight { 805 vec3 color; 806 vec3 position; 807 vec3 halfWidth; 808 vec3 halfHeight; 809 }; 810 uniform sampler2D ltc_1; uniform sampler2D ltc_2; 811 uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; 812#endif 813#if NUM_HEMI_LIGHTS > 0 814 struct HemisphereLight { 815 vec3 direction; 816 vec3 skyColor; 817 vec3 groundColor; 818 }; 819 uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; 820 vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { 821 float dotNL = dot( normal, hemiLight.direction ); 822 float hemiDiffuseWeight = 0.5 * dotNL + 0.5; 823 vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); 824 return irradiance; 825 } 826#endif`,XP=`#ifdef USE_ENVMAP 827 vec3 getIBLIrradiance( const in vec3 normal ) { 828 #ifdef ENVMAP_TYPE_CUBE_UV 829 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 830 vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); 831 return PI * envMapColor.rgb * envMapIntensity; 832 #else 833 return vec3( 0.0 ); 834 #endif 835 } 836 vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { 837 #ifdef ENVMAP_TYPE_CUBE_UV 838 vec3 reflectVec = reflect( - viewDir, normal ); 839 reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); 840 reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); 841 vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); 842 return envMapColor.rgb * envMapIntensity; 843 #else 844 return vec3( 0.0 ); 845 #endif 846 } 847 #ifdef USE_ANISOTROPY 848 vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { 849 #ifdef ENVMAP_TYPE_CUBE_UV 850 vec3 bentNormal = cross( bitangent, viewDir ); 851 bentNormal = normalize( cross( bentNormal, bitangent ) ); 852 bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); 853 return getIBLRadiance( viewDir, bentNormal, roughness ); 854 #else 855 return vec3( 0.0 ); 856 #endif 857 } 858 #endif 859#endif`,jP=`ToonMaterial material; 860material.diffuseColor = diffuseColor.rgb;`,qP=`varying vec3 vViewPosition; 861struct ToonMaterial { 862 vec3 diffuseColor; 863}; 864void 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 ) { 865 vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; 866 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 867} 868void 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 ) { 869 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 870} 871#define RE_Direct RE_Direct_Toon 872#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,$P=`BlinnPhongMaterial material; 873material.diffuseColor = diffuseColor.rgb; 874material.specularColor = specular; 875material.specularShininess = shininess; 876material.specularStrength = specularStrength;`,KP=`varying vec3 vViewPosition; 877struct BlinnPhongMaterial { 878 vec3 diffuseColor; 879 vec3 specularColor; 880 float specularShininess; 881 float specularStrength; 882}; 883void 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 ) {
884 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 885 vec3 irradiance = dotNL * directLight.color; 886 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 887 reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; 888} 889void 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 ) { 890 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 891} 892#define RE_Direct RE_Direct_BlinnPhong 893#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,YP=`PhysicalMaterial material; 894material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); 895vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); 896float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); 897material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; 898material.roughness = min( material.roughness, 1.0 ); 899#ifdef IOR 900 material.ior = ior; 901 #ifdef USE_SPECULAR 902 float specularIntensityFactor = specularIntensity; 903 vec3 specularColorFactor = specularColor; 904 #ifdef USE_SPECULAR_COLORMAP 905 specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; 906 #endif 907 #ifdef USE_SPECULAR_INTENSITYMAP 908 specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; 909 #endif 910 material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); 911 #else 912 float specularIntensityFactor = 1.0; 913 vec3 specularColorFactor = vec3( 1.0 ); 914 material.specularF90 = 1.0; 915 #endif 916 material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); 917#else 918 material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); 919 material.specularF90 = 1.0; 920#endif 921#ifdef USE_CLEARCOAT 922 material.clearcoat = clearcoat; 923 material.clearcoatRoughness = clearcoatRoughness; 924 material.clearcoatF0 = vec3( 0.04 ); 925 material.clearcoatF90 = 1.0; 926 #ifdef USE_CLEARCOATMAP 927 material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; 928 #endif 929 #ifdef USE_CLEARCOAT_ROUGHNESSMAP 930 material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; 931 #endif 932 material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); 933 material.clearcoatRoughness += geometryRoughness; 934 material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); 935#endif 936#ifdef USE_IRIDESCENCE 937 material.iridescence = iridescence; 938 material.iridescenceIOR = iridescenceIOR; 939 #ifdef USE_IRIDESCENCEMAP 940 material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; 941 #endif 942 #ifdef USE_IRIDESCENCE_THICKNESSMAP 943 material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; 944 #else 945 material.iridescenceThickness = iridescenceThicknessMaximum; 946 #endif 947#endif 948#ifdef USE_SHEEN 949 material.sheenColor = sheenColor; 950 #ifdef USE_SHEEN_COLORMAP 951 material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; 952 #endif 953 material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); 954 #ifdef USE_SHEEN_ROUGHNESSMAP 955 material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; 956 #endif 957#endif 958#ifdef USE_ANISOTROPY 959 #ifdef USE_ANISOTROPYMAP 960 mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); 961 vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; 962 vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; 963 #else 964 vec2 anisotropyV = anisotropyVector; 965 #endif 966 material.anisotropy = length( anisotropyV ); 967 if( material.anisotropy == 0.0 ) { 968 anisotropyV = vec2( 1.0, 0.0 ); 969 } else { 970 anisotropyV /= material.anisotropy; 971 material.anisotropy = saturate( material.anisotropy ); 972 } 973 material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
974 material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; 975 material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; 976#endif`,ZP=`struct PhysicalMaterial { 977 vec3 diffuseColor; 978 float roughness; 979 vec3 specularColor; 980 float specularF90
vendor: 14,563 bytes, lines 980-1276
980; 981 #ifdef USE_CLEARCOAT 982 float clearcoat; 983 float clearcoatRoughness; 984 vec3 clearcoatF0; 985 float clearcoatF90; 986 #endif 987 #ifdef USE_IRIDESCENCE 988 float iridescence; 989 float iridescenceIOR; 990 float iridescenceThickness; 991 vec3 iridescenceFresnel; 992 vec3 iridescenceF0; 993 #endif 994 #ifdef USE_SHEEN 995 vec3 sheenColor; 996 float sheenRoughness; 997 #endif 998 #ifdef IOR 999 float ior; 1000 #endif 1001 #ifdef USE_TRANSMISSION 1002 float transmission; 1003 float transmissionAlpha; 1004 float thickness; 1005 float attenuationDistance; 1006 vec3 attenuationColor; 1007 #endif 1008 #ifdef USE_ANISOTROPY 1009 float anisotropy; 1010 float alphaT; 1011 vec3 anisotropyT; 1012 vec3 anisotropyB; 1013 #endif 1014}; 1015vec3 clearcoatSpecularDirect = vec3( 0.0 ); 1016vec3 clearcoatSpecularIndirect = vec3( 0.0 ); 1017vec3 sheenSpecularDirect = vec3( 0.0 ); 1018vec3 sheenSpecularIndirect = vec3(0.0 ); 1019vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { 1020 float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); 1021 float x2 = x * x; 1022 float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); 1023 return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); 1024} 1025float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { 1026 float a2 = pow2( alpha ); 1027 float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); 1028 float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); 1029 return 0.5 / max( gv + gl, EPSILON ); 1030} 1031float D_GGX( const in float alpha, const in float dotNH ) { 1032 float a2 = pow2( alpha ); 1033 float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; 1034 return RECIPROCAL_PI * a2 / pow2( denom ); 1035} 1036#ifdef USE_ANISOTROPY 1037 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 ) { 1038 float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); 1039 float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); 1040 float v = 0.5 / ( gv + gl ); 1041 return saturate(v); 1042 } 1043 float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { 1044 float a2 = alphaT * alphaB; 1045 highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); 1046 highp float v2 = dot( v, v ); 1047 float w2 = a2 / v2; 1048 return RECIPROCAL_PI * a2 * pow2 ( w2 ); 1049 } 1050#endif 1051#ifdef USE_CLEARCOAT 1052 vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { 1053 vec3 f0 = material.clearcoatF0; 1054 float f90 = material.clearcoatF90; 1055 float roughness = material.clearcoatRoughness; 1056 float alpha = pow2( roughness ); 1057 vec3 halfDir = normalize( lightDir + viewDir ); 1058 float dotNL = saturate( dot( normal, lightDir ) ); 1059 float dotNV = saturate( dot( normal, viewDir ) ); 1060 float dotNH = saturate( dot( normal, halfDir ) ); 1061 float dotVH = saturate( dot( viewDir, halfDir ) ); 1062 vec3 F = F_Schlick( f0, f90, dotVH ); 1063 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 1064 float D = D_GGX( alpha, dotNH ); 1065 return F * ( V * D ); 1066 } 1067#endif 1068vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { 1069 vec3 f0 = material.specularColor; 1070 float f90 = material.specularF90; 1071 float roughness = material.roughness; 1072 float alpha = pow2( roughness ); 1073 vec3 halfDir = normalize( lightDir + viewDir ); 1074 float dotNL = saturate( dot( normal, lightDir ) ); 1075 float dotNV = saturate( dot( normal, viewDir ) ); 1076 float dotNH = saturate( dot( normal, halfDir ) ); 1077 float dotVH = saturate( dot( viewDir, halfDir ) ); 1078 vec3 F = F_Schlick( f0, f90, dotVH ); 1079 #ifdef USE_IRIDESCENCE 1080 F = mix( F, material.iridescenceFresnel, material.iridescence ); 1081 #endif 1082 #ifdef USE_ANISOTROPY 1083 float dotTL = dot( material.anisotropyT, lightDir ); 1084 float dotTV = dot( material.anisotropyT, viewDir ); 1085 float dotTH = dot( material.anisotropyT, halfDir ); 1086 float dotBL = dot( material.anisotropyB, lightDir ); 1087 float dotBV = dot( material.anisotropyB, viewDir ); 1088 float dotBH = dot( material.anisotropyB, halfDir ); 1089 float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); 1090 float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); 1091 #else 1092 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 1093 float D = D_GGX( alpha, dotNH ); 1094 #endif 1095 return F * ( V * D ); 1096} 1097vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { 1098 const float LUT_SIZE = 64.0; 1099 const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; 1100 const float LUT_BIAS = 0.5 / LUT_SIZE; 1101 float dotNV = saturate( dot( N, V ) ); 1102 vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); 1103 uv = uv * LUT_SCALE + LUT_BIAS; 1104 return uv; 1105} 1106float LTC_ClippedSphereFormFactor( const in vec3 f ) { 1107 float l = length( f ); 1108 return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); 1109} 1110vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { 1111 float x = dot( v1, v2 ); 1112 float y = abs( x ); 1113 float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; 1114 float b = 3.4175940 + ( 4.1616724 + y ) * y; 1115 float v = a / b; 1116 float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; 1117 return cross( v1, v2 ) * theta_sintheta; 1118} 1119vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { 1120 vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; 1121 vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; 1122 vec3 lightNormal = cross( v1, v2 ); 1123 if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); 1124 vec3 T1, T2; 1125 T1 = normalize( V - N * dot( V, N ) ); 1126 T2 = - cross( N, T1 ); 1127 mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); 1128 vec3 coords[ 4 ]; 1129 coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); 1130 coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); 1131 coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); 1132 coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); 1133 coords[ 0 ] = normalize( coords[ 0 ] ); 1134 coords[ 1 ] = normalize( coords[ 1 ] ); 1135 coords[ 2 ] = normalize( coords[ 2 ] ); 1136 coords[ 3 ] = normalize( coords[ 3 ] ); 1137 vec3 vectorFormFactor = vec3( 0.0 ); 1138 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); 1139 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); 1140 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); 1141 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); 1142 float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); 1143 return vec3( result ); 1144} 1145#if defined( USE_SHEEN ) 1146float D_Charlie( float roughness, float dotNH ) { 1147 float alpha = pow2( roughness ); 1148 float invAlpha = 1.0 / alpha; 1149 float cos2h = dotNH * dotNH; 1150 float sin2h = max( 1.0 - cos2h, 0.0078125 ); 1151 return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); 1152} 1153float V_Neubelt( float dotNV, float dotNL ) { 1154 return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); 1155} 1156vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { 1157 vec3 halfDir = normalize( lightDir + viewDir ); 1158 float dotNL = saturate( dot( normal, lightDir ) ); 1159 float dotNV = saturate( dot( normal, viewDir ) ); 1160 float dotNH = saturate( dot( normal, halfDir ) ); 1161 float D = D_Charlie( sheenRoughness, dotNH ); 1162 float V = V_Neubelt( dotNV, dotNL ); 1163 return sheenColor * ( D * V ); 1164} 1165#endif 1166float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { 1167 float dotNV = saturate( dot( normal, viewDir ) ); 1168 float r2 = roughness * roughness; 1169 float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; 1170 float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; 1171 float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); 1172 return saturate( DG * RECIPROCAL_PI ); 1173} 1174vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { 1175 float dotNV = saturate( dot( normal, viewDir ) ); 1176 const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); 1177 const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); 1178 vec4 r = roughness * c0 + c1; 1179 float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; 1180 vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; 1181 return fab; 1182} 1183vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { 1184 vec2 fab = DFGApprox( normal, viewDir, roughness ); 1185 return specularColor * fab.x + specularF90 * fab.y; 1186} 1187#ifdef USE_IRIDESCENCE 1188void 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 ) { 1189#else 1190void 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 ) { 1191#endif 1192 vec2 fab = DFGApprox( normal, viewDir, roughness ); 1193 #ifdef USE_IRIDESCENCE 1194 vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); 1195 #else 1196 vec3 Fr = specularColor; 1197 #endif 1198 vec3 FssEss = Fr * fab.x + specularF90 * fab.y; 1199 float Ess = fab.x + fab.y; 1200 float Ems = 1.0 - Ess; 1201 vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); 1202 singleScatter += FssEss; 1203 multiScatter += Fms * Ems; 1204} 1205#if NUM_RECT_AREA_LIGHTS > 0 1206 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 ) { 1207 vec3 normal = geometryNormal; 1208 vec3 viewDir = geometryViewDir; 1209 vec3 position = geometryPosition; 1210 vec3 lightPos = rectAreaLight.position; 1211 vec3 halfWidth = rectAreaLight.halfWidth; 1212 vec3 halfHeight = rectAreaLight.halfHeight; 1213 vec3 lightColor = rectAreaLight.color; 1214 float roughness = material.roughness; 1215 vec3 rectCoords[ 4 ]; 1216 rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; 1217 rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; 1218 rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; 1219 vec2 uv = LTC_Uv( normal, viewDir, roughness ); 1220 vec4 t1 = texture2D( ltc_1, uv ); 1221 vec4 t2 = texture2D( ltc_2, uv ); 1222 mat3 mInv = mat3( 1223 vec3( t1.x, 0, t1.y ), 1224 vec3( 0, 1, 0 ), 1225 vec3( t1.z, 0, t1.w ) 1226 ); 1227 vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); 1228 reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); 1229 reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); 1230 } 1231#endif 1232void 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 ) { 1233 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 1234 vec3 irradiance = dotNL * directLight.color; 1235 #ifdef USE_CLEARCOAT 1236 float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); 1237 vec3 ccIrradiance = dotNLcc * directLight.color; 1238 clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); 1239 #endif 1240 #ifdef USE_SHEEN 1241 sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); 1242 #endif 1243 reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material ); 1244 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1245} 1246void 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 ) { 1247 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1248} 1249void 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) { 1250 #ifdef USE_CLEARCOAT 1251 clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); 1252 #endif 1253 #ifdef USE_SHEEN 1254 sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1255 #endif 1256 vec3 singleScattering = vec3( 0.0 ); 1257 vec3 multiScattering = vec3( 0.0 ); 1258 vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; 1259 #ifdef USE_IRIDESCENCE 1260 computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); 1261 #else 1262 computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); 1263 #endif 1264 vec3 totalScattering = singleScattering + multiScattering; 1265 vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); 1266 reflectedLight.indirectSpecular += radiance * singleScattering; 1267 reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; 1268 reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; 1269} 1270#define RE_Direct RE_Direct_Physical 1271#define RE_Direct_RectArea RE_Direct_RectArea_Physical 1272#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical 1273#define RE_IndirectSpecular RE_IndirectSpecular_Physical 1274float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { 1275 return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); 1276}`,
1276JP=` 1277vec3 geometryPosition = - vViewPosition; 1278vec3 geometryNormal = normal; 1279vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); 1280vec3 geometryClearcoatNormal = vec3( 0.0 ); 1281#ifdef USE_CLEARCOAT 1282 geometryClearcoatNormal = clearcoatNormal; 1283#endif 1284#ifdef USE_IRIDESCENCE 1285 float dotNVi = saturate( dot( normal, geometryViewDir ) ); 1286 if ( material.iridescenceThickness == 0.0 ) { 1287 material.iridescence = 0.0; 1288 } else { 1289 material.iridescence = saturate( material.iridescence ); 1290 } 1291 if ( material.iridescence > 0.0 ) { 1292 material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); 1293 material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); 1294 } 1295#endif 1296IncidentLight directLight; 1297#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) 1298 PointLight pointLight; 1299 #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 1300 PointLightShadow pointLightShadow; 1301 #endif 1302 #pragma unroll_loop_start 1303 for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { 1304 pointLight = pointLights[ i ]; 1305 getPointLightInfo( pointLight, geometryPosition, directLight ); 1306 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) 1307 pointLightShadow = pointLightShadows[ i ]; 1308 directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; 1309 #endif 1310 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1311 } 1312 #pragma unroll_loop_end 1313#endif 1314#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) 1315 SpotLight spotLight; 1316 vec4 spotColor; 1317 vec3 spotLightCoord; 1318 bool inSpotLightMap; 1319 #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 1320 SpotLightShadow spotLightShadow; 1321 #endif 1322 #pragma unroll_loop_start 1323 for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { 1324 spotLight = spotLights[ i ]; 1325 getSpotLightInfo( spotLight, geometryPosition, directLight ); 1326 #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1327 #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX 1328 #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1329 #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS 1330 #else 1331 #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1332 #endif 1333 #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) 1334 spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; 1335 inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); 1336 spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); 1337 directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; 1338 #endif 1339 #undef SPOT_LIGHT_MAP_INDEX 1340 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1341 spotLightShadow = spotLightShadows[ i ]; 1342 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 1343 #endif 1344 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1345 } 1346 #pragma unroll_loop_end 1347#endif 1348#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) 1349 DirectionalLight directionalLight; 1350 #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 1351 DirectionalLightShadow directionalLightShadow; 1352 #endif 1353 #pragma unroll_loop_start 1354 for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { 1355 directionalLight = directionalLights[ i ]; 1356 getDirectionalLightInfo( directionalLight, directLight ); 1357 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) 1358 directionalLightShadow = directionalLightShadows[ i ]; 1359 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 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_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) 1366 RectAreaLight rectAreaLight; 1367 #pragma unroll_loop_start 1368 for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { 1369 rectAreaLight = rectAreaLights[ i ]; 1370 RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1371 } 1372 #pragma unroll_loop_end 1373#endif 1374#if defined( RE_IndirectDiffuse ) 1375 vec3 iblIrradiance = vec3( 0.0 ); 1376 vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); 1377 #if defined( USE_LIGHT_PROBES ) 1378 irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); 1379 #endif 1380 #if ( NUM_HEMI_LIGHTS > 0 ) 1381 #pragma unroll_loop_start 1382 for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { 1383 irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); 1384 } 1385 #pragma unroll_loop_end 1386 #endif 1387#endif 1388#if defined( RE_IndirectSpecular ) 1389 vec3 radiance = vec3( 0.0 ); 1390 vec3 clearcoatRadiance = vec3( 0.0 ); 1391#endif`,QP=`#if defined( RE_IndirectDiffuse ) 1392 #ifdef USE_LIGHTMAP 1393 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 1394 vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; 1395 irradiance += lightMapIrradiance; 1396 #endif 1397 #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) 1398 iblIrradiance += getIBLIrradiance( geometryNormal ); 1399 #endif 1400#endif 1401#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) 1402 #ifdef USE_ANISOTROPY 1403 radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); 1404 #else 1405 radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); 1406 #endif 1407 #ifdef USE_CLEARCOAT 1408 clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); 1409 #endif 1410#endif`,eL=`#if defined( RE_IndirectDiffuse ) 1411 RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1412#endif 1413#if defined( RE_IndirectSpecular ) 1414 RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1415#endif`,tL=`#if defined( USE_LOGDEPTHBUF ) 1416 gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; 1417#endif`,nL=`#if defined( USE_LOGDEPTHBUF ) 1418 uniform float logDepthBufFC; 1419 varying float vFragDepth; 1420 varying float vIsPerspective; 1421#endif`,iL=`#ifdef USE_LOGDEPTHBUF 1422 varying float vFragDepth; 1423 varying float vIsPerspective; 1424#endif`,rL=`#ifdef USE_LOGDEPTHBUF 1425 vFragDepth = 1.0 + gl_Position.w; 1426 vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); 1427#endif`,sL=`#ifdef USE_MAP 1428 vec4 sampledDiffuseColor = texture2D( map, vMapUv ); 1429 #ifdef DECODE_VIDEO_TEXTURE 1430 sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); 1431 1432 #endif 1433 diffuseColor *= sampledDiffuseColor; 1434#endif`,oL=`#ifdef USE_MAP 1435 uniform sampler2D map; 1436#endif`,aL=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1437 #if defined( USE_POINTS_UV ) 1438 vec2 uv = vUv; 1439 #else 1440 vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; 1441 #endif 1442#endif 1443#ifdef USE_MAP 1444 diffuseColor *= texture2D( map, uv ); 1445#endif 1446#ifdef USE_ALPHAMAP 1447 diffuseColor.a *= texture2D( alphaMap, uv ).g; 1448#endif`,lL=`#if defined( USE_POINTS_UV ) 1449 varying vec2 vUv; 1450#else 1451 #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1452 uniform mat3 uvTransform; 1453 #endif 1454#endif 1455#ifdef USE_MAP 1456 uniform sampler2D map; 1457#endif 1458#ifdef USE_ALPHAMAP 1459 uniform sampler2D alphaMap; 1460#endif`,cL=`float metalnessFactor = metalness; 1461#ifdef USE_METALNESSMAP 1462 vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); 1463 metalnessFactor *= texelMetalness.b; 1464#endif`,uL=`#ifdef USE_METALNESSMAP 1465 uniform sampler2D metalnessMap; 1466#endif`,fL=`#ifdef USE_INSTANCING_MORPH 1467 float morphTargetInfluences[MORPHTARGETS_COUNT]; 1468 float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; 1469 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1470 morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; 1471 } 1472#endif`,hL=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) 1473 vColor *= morphTargetBaseInfluence; 1474 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1475 #if defined( USE_COLOR_ALPHA ) 1476 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; 1477 #elif defined( USE_COLOR ) 1478 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; 1479 #endif 1480 } 1481#endif`,dL=`#ifdef USE_MORPHNORMALS 1482 objectNormal *= morphTargetBaseInfluence; 1483 #ifdef MORPHTARGETS_TEXTURE 1484 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1485 if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; 1486 } 1487 #else 1488 objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; 1489 objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; 1490 objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; 1491 objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; 1492 #endif 1493#endif`,pL=`#ifdef USE_MORPHTARGETS 1494 #ifndef USE_INSTANCING_MORPH 1495 uniform float morphTargetBaseInfluence; 1496 #endif 1497 #ifdef MORPHTARGETS_TEXTURE 1498 #ifndef USE_INSTANCING_MORPH 1499 uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; 1500 #endif 1501 uniform sampler2DArray morphTargetsTexture; 1502 uniform ivec2 morphTargetsTextureSize; 1503 vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { 1504 int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; 1505 int y = texelIndex / morphTargetsTextureSize.x; 1506 int x = texelIndex - y * morphTargetsTextureSize.x; 1507 ivec3 morphUV = ivec3( x, y, morphTargetIndex ); 1508 return texelFetch( morphTargetsTexture, morphUV, 0 ); 1509 } 1510 #else 1511 #ifndef USE_MORPHNORMALS 1512 uniform float morphTargetInfluences[ 8 ]; 1513 #else 1514 uniform float morphTargetInfluences[ 4 ]; 1515 #endif 1516 #endif 1517#endif`,mL=`#ifdef USE_MORPHTARGETS 1518 transformed *= morphTargetBaseInfluence; 1519 #ifdef MORPHTARGETS_TEXTURE 1520 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1521 if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; 1522 } 1523 #else 1524 transformed += morphTarget0 * morphTargetInfluences[ 0 ]; 1525 transformed += morphTarget1 * morphTargetInfluences[ 1 ]; 1526 transformed += morphTarget2 * morphTargetInfluences[ 2 ]; 1527 transformed += morphTarget3 * morphTargetInfluences[ 3 ]; 1528 #ifndef USE_MORPHNORMALS 1529 transformed += morphTarget4 * morphTargetInfluences[ 4 ]; 1530 transformed += morphTarget5 * morphTargetInfluences[ 5 ]; 1531 transformed += morphTarget6 * morphTargetInfluences[ 6 ]; 1532 transformed += morphTarget7 * morphTargetInfluences[ 7 ]; 1533 #endif 1534 #endif 1535#endif`,gL=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; 1536#ifdef FLAT_SHADED 1537 vec3 fdx = dFdx( vViewPosition ); 1538 vec3 fdy = dFdy( vViewPosition ); 1539 vec3 normal = normalize( cross( fdx, fdy ) ); 1540#else 1541 vec3 normal = normalize( vNormal ); 1542 #ifdef DOUBLE_SIDED 1543 normal *= faceDirection; 1544 #endif 1545#endif 1546#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) 1547 #ifdef USE_TANGENT 1548 mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 1549 #else 1550 mat3 tbn = getTangentFrame( - vViewPosition, normal, 1551 #if defined( USE_NORMALMAP ) 1552 vNormalMapUv 1553 #elif defined( USE_CLEARCOAT_NORMALMAP ) 1554 vClearcoatNormalMapUv 1555 #else 1556 vUv 1557 #endif 1558 ); 1559 #endif 1560 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 1561 tbn[0] *= faceDirection; 1562 tbn[1] *= faceDirection; 1563 #endif 1564#endif 1565#ifdef USE_CLEARCOAT_NORMALMAP 1566 #ifdef USE_TANGENT 1567 mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 1568 #else 1569 mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); 1570 #endif 1571 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 1572 tbn2[0] *= faceDirection; 1573 tbn2[1] *= faceDirection; 1574 #endif 1575#endif 1576vec3 nonPerturbedNormal = normal;`,_L=`#ifdef USE_NORMALMAP_OBJECTSPACE 1577 normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 1578 #ifdef FLIP_SIDED 1579 normal = - normal; 1580 #endif 1581 #ifdef DOUBLE_SIDED 1582 normal = normal * faceDirection; 1583 #endif 1584 normal = normalize( normalMatrix * normal ); 1585#elif defined( USE_NORMALMAP_TANGENTSPACE ) 1586 vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 1587 mapN.xy *= normalScale; 1588 normal = normalize( tbn * mapN ); 1589#elif defined( USE_BUMPMAP )
1590 normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); 1591#endif`,vL=`#ifndef FLAT_SHADED 1592 varying vec3 vNormal; 1593 #ifdef USE_TANGENT 1594 varying vec3 vTangent; 1595 varying vec3 vBitangent; 1596 #endif 1597#endif`,yL=`#ifndef FLAT_SHADED 1598 varying vec3 vNormal; 1599 #ifdef USE_TANGENT 1600 varying vec3 vTangent; 1601 varying vec3 vBitangent; 1602 #endif 1603#endif`,xL=`#ifndef FLAT_SHADED 1604 vNormal = normalize( transformedNormal ); 1605 #ifdef USE_TANGENT 1606 vTangent = normalize( transformedTangent ); 1607 vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); 1608 #endif 1609#endif`,SL=`#ifdef USE_NORMALMAP 1610 uniform sampler2D normalMap; 1611 uniform vec2 normalScale; 1612#endif 1613#ifdef USE_NORMALMAP_OBJECTSPACE 1614 uniform mat3 normalMatrix; 1615#endif 1616#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) 1617 mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { 1618 vec3 q0 = dFdx( eye_pos.xyz ); 1619 vec3 q1 = dFdy( eye_pos.xyz ); 1620 vec2 st0 = dFdx( uv.st ); 1621 vec2 st1 = dFdy( uv.st ); 1622 vec3 N = surf_norm; 1623 vec3 q1perp = cross( q1, N ); 1624 vec3 q0perp = cross( N, q0 ); 1625 vec3 T = q1perp * st0.x + q0perp * st1.x; 1626 vec3 B = q1perp * st0.y + q0perp * st1.y; 1627 float det = max( dot( T, T ), dot( B, B ) ); 1628 float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); 1629 return mat3( T * scale, B * scale, N ); 1630 } 1631#endif`,ML=`#ifdef USE_CLEARCOAT 1632 vec3 clearcoatNormal = nonPerturbedNormal; 1633#endif`,TL=`#ifdef USE_CLEARCOAT_NORMALMAP 1634 vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; 1635 clearcoatMapN.xy *= clearcoatNormalScale; 1636 clearcoatNormal = normalize( tbn2 * clearcoatMapN ); 1637#endif`,EL=`#ifdef USE_CLEARCOATMAP 1638 uniform sampler2D clearcoatMap; 1639#endif 1640#ifdef USE_CLEARCOAT_NORMALMAP 1641 uniform sampler2D clearcoatNormalMap; 1642 uniform vec2 clearcoatNormalScale; 1643#endif 1644#ifdef USE_CLEARCOAT_ROUGHNESSMAP 1645 uniform sampler2D clearcoatRoughnessMap; 1646#endif`,bL=`#ifdef USE_IRIDESCENCEMAP 1647 uniform sampler2D iridescenceMap; 1648#endif 1649#ifdef USE_IRIDESCENCE_THICKNESSMAP 1650 uniform sampler2D iridescenceThicknessMap; 1651#endif`,AL=`#ifdef OPAQUE 1652diffuseColor.a = 1.0; 1653#endif 1654#ifdef USE_TRANSMISSION 1655diffuseColor.a *= material.transmissionAlpha; 1656#endif 1657gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,wL=`vec3 packNormalToRGB( const in vec3 normal ) { 1658 return normalize( normal ) * 0.5 + 0.5; 1659} 1660vec3 unpackRGBToNormal( const in vec3 rgb ) { 1661 return 2.0 * rgb.xyz - 1.0; 1662} 1663const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; 1664const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); 1665const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); 1666const float ShiftRight8 = 1. / 256.; 1667vec4 packDepthToRGBA( const in float v ) { 1668 vec4 r = vec4( fract( v * PackFactors ), v ); 1669 r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; 1670} 1671float unpackRGBAToDepth( const in vec4 v ) { 1672 return dot( v, UnpackFactors ); 1673} 1674vec2 packDepthToRG( in highp float v ) { 1675 return packDepthToRGBA( v ).yx; 1676} 1677float unpackRGToDepth( const in highp vec2 v ) { 1678 return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) ); 1679} 1680vec4 pack2HalfToRGBA( vec2 v ) { 1681 vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); 1682 return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); 1683} 1684vec2 unpackRGBATo2Half( vec4 v ) { 1685 return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); 1686} 1687float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { 1688 return ( viewZ + near ) / ( near - far ); 1689} 1690float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { 1691 return depth * ( near - far ) - near; 1692} 1693float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { 1694 return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); 1695} 1696float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { 1697 return ( near * far ) / ( ( far - near ) * depth - far ); 1698}`,RL=`#ifdef PREMULTIPLIED_ALPHA 1699 gl_FragColor.rgb *= gl_FragColor.a; 1700#endif`,CL=`vec4 mvPosition = vec4( transformed, 1.0 ); 1701#ifdef USE_BATCHING 1702 mvPosition = batchingMatrix * mvPosition; 1703#endif 1704#ifdef USE_INSTANCING 1705 mvPosition = instanceMatrix * mvPosition; 1706#endif 1707mvPosition = modelViewMatrix * mvPosition; 1708gl_Position = projectionMatrix * mvPosition;`,PL=`#ifdef DITHERING 1709 gl_FragColor.rgb = dithering( gl_FragColor.rgb ); 1710#endif`,LL=`#ifdef DITHERING 1711 vec3 dithering( vec3 color ) { 1712 float grid_position = rand( gl_FragCoord.xy ); 1713 vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); 1714 dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); 1715 return color + dither_shift_RGB; 1716 } 1717#endif`,IL=`float roughnessFactor = roughness; 1718#ifdef USE_ROUGHNESSMAP 1719 vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); 1720 roughnessFactor *= texelRoughness.g; 1721#endif`,DL=`#ifdef USE_ROUGHNESSMAP 1722 uniform sampler2D roughnessMap; 1723#endif`,NL
vendor: 8,706 bytes, lines 1723-1906
1723=`#if NUM_SPOT_LIGHT_COORDS > 0 1724 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 1725#endif 1726#if NUM_SPOT_LIGHT_MAPS > 0 1727 uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; 1728#endif 1729#ifdef USE_SHADOWMAP 1730 #if NUM_DIR_LIGHT_SHADOWS > 0 1731 uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; 1732 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 1733 struct DirectionalLightShadow { 1734 float shadowBias; 1735 float shadowNormalBias; 1736 float shadowRadius; 1737 vec2 shadowMapSize; 1738 }; 1739 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 1740 #endif 1741 #if NUM_SPOT_LIGHT_SHADOWS > 0 1742 uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; 1743 struct SpotLightShadow { 1744 float shadowBias; 1745 float shadowNormalBias; 1746 float shadowRadius; 1747 vec2 shadowMapSize; 1748 }; 1749 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 1750 #endif 1751 #if NUM_POINT_LIGHT_SHADOWS > 0 1752 uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; 1753 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 1754 struct PointLightShadow { 1755 float shadowBias; 1756 float shadowNormalBias; 1757 float shadowRadius; 1758 vec2 shadowMapSize; 1759 float shadowCameraNear; 1760 float shadowCameraFar; 1761 }; 1762 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 1763 #endif 1764 float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { 1765 return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); 1766 } 1767 vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { 1768 return unpackRGBATo2Half( texture2D( shadow, uv ) ); 1769 } 1770 float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ 1771 float occlusion = 1.0; 1772 vec2 distribution = texture2DDistribution( shadow, uv ); 1773 float hard_shadow = step( compare , distribution.x ); 1774 if (hard_shadow != 1.0 ) { 1775 float distance = compare - distribution.x ; 1776 float variance = max( 0.00000, distribution.y * distribution.y ); 1777 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 ); 1778 } 1779 return occlusion; 1780 } 1781 float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 1782 float shadow = 1.0; 1783 shadowCoord.xyz /= shadowCoord.w; 1784 shadowCoord.z += shadowBias; 1785 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 1786 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 1787 if ( frustumTest ) { 1788 #if defined( SHADOWMAP_TYPE_PCF ) 1789 vec2 texelSize = vec2( 1.0 ) / shadowMapSize; 1790 float dx0 = - texelSize.x * shadowRadius; 1791 float dy0 = - texelSize.y * shadowRadius; 1792 float dx1 = + texelSize.x * shadowRadius; 1793 float dy1 = + texelSize.y * shadowRadius; 1794 float dx2 = dx0 / 2.0; 1795 float dy2 = dy0 / 2.0; 1796 float dx3 = dx1 / 2.0; 1797 float dy3 = dy1 / 2.0; 1798 shadow = ( 1799 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + 1800 texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + 1801 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + 1802 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + 1803 texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + 1804 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + 1805 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + 1806 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + 1807 texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + 1808 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + 1809 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + 1810 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + 1811 texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + 1812 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + 1813 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + 1814 texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + 1815 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) 1816 ) * ( 1.0 / 17.0 ); 1817 #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) 1818 vec2 texelSize = vec2( 1.0 ) / shadowMapSize; 1819 float dx = texelSize.x; 1820 float dy = texelSize.y; 1821 vec2 uv = shadowCoord.xy; 1822 vec2 f = fract( uv * shadowMapSize + 0.5 ); 1823 uv -= f * texelSize; 1824 shadow = ( 1825 texture2DCompare( shadowMap, uv, shadowCoord.z ) + 1826 texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + 1827 texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + 1828 texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + 1829 mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), 1830 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), 1831 f.x ) + 1832 mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), 1833 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), 1834 f.x ) + 1835 mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), 1836 texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), 1837 f.y ) + 1838 mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), 1839 texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), 1840 f.y ) + 1841 mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), 1842 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), 1843 f.x ), 1844 mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), 1845 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), 1846 f.x ), 1847 f.y ) 1848 ) * ( 1.0 / 9.0 ); 1849 #elif defined( SHADOWMAP_TYPE_VSM ) 1850 shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); 1851 #else 1852 shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); 1853 #endif 1854 } 1855 return shadow; 1856 } 1857 vec2 cubeToUV( vec3 v, float texelSizeY ) { 1858 vec3 absV = abs( v ); 1859 float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); 1860 absV *= scaleToCube; 1861 v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); 1862 vec2 planar = v.xy; 1863 float almostATexel = 1.5 * texelSizeY; 1864 float almostOne = 1.0 - almostATexel; 1865 if ( absV.z >= almostOne ) { 1866 if ( v.z > 0.0 ) 1867 planar.x = 4.0 - v.x; 1868 } else if ( absV.x >= almostOne ) { 1869 float signX = sign( v.x ); 1870 planar.x = v.z * signX + 2.0 * signX; 1871 } else if ( absV.y >= almostOne ) { 1872 float signY = sign( v.y ); 1873 planar.x = v.x + 2.0 * signY + 2.0; 1874 planar.y = v.z * signY - 2.0; 1875 } 1876 return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); 1877 } 1878 float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { 1879 float shadow = 1.0; 1880 vec3 lightToPosition = shadowCoord.xyz; 1881 1882 float lightToPositionLength = length( lightToPosition ); 1883 if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) { 1884 float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; 1885 vec3 bd3D = normalize( lightToPosition ); 1886 vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); 1887 #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) 1888 vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; 1889 shadow = ( 1890 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + 1891 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + 1892 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + 1893 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + 1894 texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + 1895 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + 1896 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + 1897 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + 1898 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) 1899 ) * ( 1.0 / 9.0 ); 1900 #else 1901 shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); 1902 #endif 1903 } 1904 return shadow; 1905 } 1906#endif`,
1906OL=`#if NUM_SPOT_LIGHT_COORDS > 0 1907 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; 1908 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 1909#endif 1910#ifdef USE_SHADOWMAP 1911 #if NUM_DIR_LIGHT_SHADOWS > 0 1912 uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; 1913 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 1914 struct DirectionalLightShadow { 1915 float shadowBias; 1916 float shadowNormalBias; 1917 float shadowRadius; 1918 vec2 shadowMapSize; 1919 }; 1920 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 1921 #endif 1922 #if NUM_SPOT_LIGHT_SHADOWS > 0 1923 struct SpotLightShadow { 1924 float shadowBias; 1925 float shadowNormalBias; 1926 float shadowRadius; 1927 vec2 shadowMapSize; 1928 }; 1929 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 1930 #endif 1931 #if NUM_POINT_LIGHT_SHADOWS > 0 1932 uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; 1933 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 1934 struct PointLightShadow { 1935 float shadowBias; 1936 float shadowNormalBias; 1937 float shadowRadius; 1938 vec2 shadowMapSize; 1939 float shadowCameraNear; 1940 float shadowCameraFar; 1941 }; 1942 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 1943 #endif 1944#endif`,UL=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) 1945 vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 1946 vec4 shadowWorldPosition; 1947#endif 1948#if defined( USE_SHADOWMAP ) 1949 #if NUM_DIR_LIGHT_SHADOWS > 0 1950 #pragma unroll_loop_start 1951 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 1952 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); 1953 vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; 1954 } 1955 #pragma unroll_loop_end 1956 #endif 1957 #if NUM_POINT_LIGHT_SHADOWS > 0 1958 #pragma unroll_loop_start 1959 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 1960 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); 1961 vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; 1962 } 1963 #pragma unroll_loop_end 1964 #endif 1965#endif 1966#if NUM_SPOT_LIGHT_COORDS > 0 1967 #pragma unroll_loop_start 1968 for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { 1969 shadowWorldPosition = worldPosition; 1970 #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1971 shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; 1972 #endif 1973 vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; 1974 } 1975 #pragma unroll_loop_end 1976#endif`,FL=`float getShadowMask() { 1977 float shadow = 1.0; 1978 #ifdef USE_SHADOWMAP 1979 #if NUM_DIR_LIGHT_SHADOWS > 0 1980 DirectionalLightShadow directionalLight; 1981 #pragma unroll_loop_start 1982 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 1983 directionalLight = directionalLightShadows[ i ]; 1984 shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 1985 } 1986 #pragma unroll_loop_end 1987 #endif 1988 #if NUM_SPOT_LIGHT_SHADOWS > 0 1989 SpotLightShadow spotLight; 1990 #pragma unroll_loop_start 1991 for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { 1992 spotLight = spotLightShadows[ i ]; 1993 shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 1994 } 1995 #pragma unroll_loop_end 1996 #endif 1997 #if NUM_POINT_LIGHT_SHADOWS > 0 1998 PointLightShadow pointLight; 1999 #pragma unroll_loop_start 2000 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 2001 pointLight = pointLightShadows[ i ]; 2002 shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; 2003 } 2004 #pragma unroll_loop_end 2005 #endif 2006 #endif 2007 return shadow; 2008}`,kL=`#ifdef USE_SKINNING 2009 mat4 boneMatX = getBoneMatrix( skinIndex.x ); 2010 mat4 boneMatY = getBoneMatrix( skinIndex.y ); 2011 mat4 boneMatZ = getBoneMatrix( skinIndex.z ); 2012 mat4 boneMatW = getBoneMatrix( skinIndex.w ); 2013#endif`,BL=`#ifdef USE_SKINNING 2014 uniform mat4 bindMatrix; 2015 uniform mat4 bindMatrixInverse; 2016 uniform highp sampler2D boneTexture; 2017 mat4 getBoneMatrix( const in float i ) { 2018 int size = textureSize( boneTexture, 0 ).x; 2019 int j = int( i ) * 4; 2020 int x = j % size; 2021 int y = j / size; 2022 vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); 2023 vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); 2024 vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); 2025 vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); 2026 return mat4( v1, v2, v3, v4 ); 2027 } 2028#endif`,HL=`#ifdef USE_SKINNING 2029 vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); 2030 vec4 skinned = vec4( 0.0 ); 2031 skinned += boneMatX * skinVertex * skinWeight.x; 2032 skinned += boneMatY * skinVertex * skinWeight.y; 2033 skinned += boneMatZ * skinVertex * skinWeight.z; 2034 skinned += boneMatW * skinVertex * skinWeight.w; 2035 transformed = ( bindMatrixInverse * skinned ).xyz; 2036#endif`,zL=`#ifdef USE_SKINNING 2037 mat4 skinMatrix = mat4( 0.0 ); 2038 skinMatrix += skinWeight.x * boneMatX; 2039 skinMatrix += skinWeight.y * boneMatY; 2040 skinMatrix += skinWeight.z * boneMatZ; 2041 skinMatrix += skinWeight.w * boneMatW; 2042 skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; 2043 objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; 2044 #ifdef USE_TANGENT 2045 objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; 2046 #endif 2047#endif`,VL=`float specularStrength; 2048#ifdef USE_SPECULARMAP 2049 vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); 2050 specularStrength = texelSpecular.r; 2051#else 2052 specularStrength = 1.0; 2053#endif`,GL=`#ifdef USE_SPECULARMAP 2054 uniform sampler2D specularMap;
2055#endif`,WL=`#if defined( TONE_MAPPING ) 2056 gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); 2057#endif`,XL=`#ifndef saturate 2058#define saturate( a ) clamp( a, 0.0, 1.0 ) 2059#endif 2060uniform float toneMappingExposure; 2061vec3 LinearToneMapping( vec3 color ) { 2062 return saturate( toneMappingExposure * color ); 2063} 2064vec3 ReinhardToneMapping( vec3 color ) { 2065 color *= toneMappingExposure; 2066 return saturate( color / ( vec3( 1.0 ) + color ) ); 2067} 2068vec3 OptimizedCineonToneMapping( vec3 color ) { 2069 color *= toneMappingExposure; 2070 color = max( vec3( 0.0 ), color - 0.004 ); 2071 return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); 2072} 2073vec3 RRTAndODTFit( vec3 v ) { 2074 vec3 a = v * ( v + 0.0245786 ) - 0.000090537; 2075 vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; 2076 return a / b; 2077} 2078vec3 ACESFilmicToneMapping( vec3 color ) { 2079 const mat3 ACESInputMat = mat3( 2080 vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), 2081 vec3( 0.04823, 0.01566, 0.83777 ) 2082 ); 2083 const mat3 ACESOutputMat = mat3( 2084 vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), 2085 vec3( -0.07367, -0.00605, 1.07602 ) 2086 ); 2087 color *= toneMappingExposure / 0.6; 2088 color = ACESInputMat * color; 2089 color = RRTAndODTFit( color ); 2090 color = ACESOutputMat * color; 2091 return saturate( color ); 2092} 2093const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( 2094 vec3( 1.6605, - 0.1246, - 0.0182 ), 2095 vec3( - 0.5876, 1.1329, - 0.1006 ), 2096 vec3( - 0.0728, - 0.0083, 1.1187 ) 2097); 2098const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( 2099 vec3( 0.6274, 0.0691, 0.0164 ), 2100 vec3( 0.3293, 0.9195, 0.0880 ), 2101 vec3( 0.0433, 0.0113, 0.8956 ) 2102); 2103vec3 agxDefaultContrastApprox( vec3 x ) { 2104 vec3 x2 = x * x; 2105 vec3 x4 = x2 * x2; 2106 return + 15.5 * x4 * x2 2107 - 40.14 * x4 * x 2108 + 31.96 * x4 2109 - 6.868 * x2 * x 2110 + 0.4298 * x2 2111 + 0.1191 * x 2112 - 0.00232; 2113} 2114vec3 AgXToneMapping( vec3 color ) { 2115 const mat3 AgXInsetMatrix = mat3( 2116 vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), 2117 vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), 2118 vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) 2119 );
2120 const mat3 AgXOutsetMatrix = mat3( 2121 vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), 2122 vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), 2123 vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) 2124 ); 2125 const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; 2126 color *= toneMappingExposure; 2127 color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; 2128 color = AgXInsetMatrix * color; 2129 color = max( color, 1e-10 ); color = log2( color ); 2130 color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); 2131 color = clamp( color, 0.0, 1.0 ); 2132 color = agxDefaultContrastApprox( color ); 2133 color = AgXOutsetMatrix * color; 2134 color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); 2135 color = LINEAR_REC2020_TO_LINEAR_SRGB * color; 2136 color = clamp( color, 0.0, 1.0 ); 2137 return color; 2138} 2139vec3 NeutralToneMapping( vec3 color ) { 2140 float startCompression = 0.8 - 0.04; 2141 float desaturation = 0.15; 2142 color *= toneMappingExposure; 2143 float x = min(color.r, min(color.g, color.b)); 2144 float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; 2145 color -= offset; 2146 float peak = max(color.r, max(color.g, color.b)); 2147 if (peak < startCompression) return color; 2148 float d = 1. - startCompression; 2149 float newPeak = 1. - d * d / (peak + d - startCompression); 2150 color *= newPeak / peak; 2151 float g = 1. - 1. / (desaturation * (peak - newPeak) + 1.); 2152 return mix(color, newPeak * vec3(1, 1, 1), g); 2153} 2154vec3 CustomToneMapping( vec3 color ) { return color; }`,jL=`#ifdef USE_TRANSMISSION 2155 material.transmission = transmission; 2156 material.transmissionAlpha = 1.0; 2157 material.thickness = thickness; 2158 material.attenuationDistance = attenuationDistance; 2159 material.attenuationColor = attenuationColor; 2160 #ifdef USE_TRANSMISSIONMAP 2161 material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; 2162 #endif 2163 #ifdef USE_THICKNESSMAP 2164 material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; 2165 #endif 2166 vec3 pos = vWorldPosition; 2167 vec3 v = normalize( cameraPosition - pos ); 2168 vec3 n = inverseTransformDirection( normal, viewMatrix ); 2169 vec4 transmitted = getIBLVolumeRefraction( 2170 n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, 2171 pos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness, 2172 material.attenuationColor, material.attenuationDistance ); 2173 material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); 2174 totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); 2175#endif`,qL=`#ifdef USE_TRANSMISSION 2176 uniform float transmission; 2177 uniform float thickness; 2178 uniform float attenuationDistance; 2179 uniform vec3 attenuationColor; 2180 #ifdef USE_TRANSMISSIONMAP 2181 uniform sampler2D transmissionMap; 2182 #endif 2183 #ifdef USE_THICKNESSMAP 2184 uniform sampler2D thicknessMap; 2185 #endif 2186 uniform vec2 transmissionSamplerSize; 2187 uniform sampler2D transmissionSamplerMap; 2188 uniform mat4 modelMatrix; 2189 uniform mat4 projectionMatrix; 2190 varying vec3 vWorldPosition; 2191 float w0( float a ) { 2192 return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); 2193 } 2194 float w1( float a ) { 2195 return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); 2196 } 2197 float w2( float a ){ 2198 return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); 2199 } 2200 float w3( float a ) { 2201 return ( 1.0 / 6.0 ) * ( a * a * a ); 2202 } 2203 float g0( float a ) { 2204 return w0( a ) + w1( a ); 2205 } 2206 float g1( float a ) { 2207 return w2( a ) + w3( a ); 2208 } 2209 float h0( float a ) { 2210 return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); 2211 } 2212 float h1( float a ) { 2213 return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); 2214 } 2215 vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { 2216 uv = uv * texelSize.zw + 0.5; 2217 vec2 iuv = floor( uv ); 2218 vec2 fuv = fract( uv ); 2219 float g0x = g0( fuv.x ); 2220 float g1x = g1( fuv.x ); 2221 float h0x = h0( fuv.x ); 2222 float h1x = h1( fuv.x ); 2223 float h0y = h0( fuv.y ); 2224 float h1y = h1( fuv.y ); 2225 vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2226 vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2227 vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2228 vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2229 return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + 2230 g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); 2231 } 2232 vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { 2233 vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); 2234 vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); 2235 vec2 fLodSizeInv = 1.0 / fLodSize; 2236 vec2 cLodSizeInv = 1.0 / cLodSize; 2237 vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); 2238 vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); 2239 return mix( fSample, cSample, fract( lod ) ); 2240 } 2241 vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { 2242 vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); 2243 vec3 modelScale; 2244 modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); 2245 modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); 2246 modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); 2247 return normalize( refractionVector ) * thickness * modelScale; 2248 } 2249 float applyIorToRoughness( const in float roughness, const in float ior ) { 2250 return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); 2251 } 2252 vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { 2253 float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); 2254 return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); 2255 } 2256 vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { 2257 if ( isinf( attenuationDistance ) ) { 2258 return vec3( 1.0 ); 2259 } else { 2260 vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; 2261 vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; 2262 } 2263 } 2264 vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, 2265 const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, 2266 const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness, 2267 const in vec3 attenuationColor, const in float attenuationDistance ) { 2268 vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); 2269 vec3 refractedRayExit = position + transmissionRay; 2270 vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); 2271 vec2 refractionCoords = ndcPos.xy / ndcPos.w; 2272 refractionCoords += 1.0; 2273 refractionCoords /= 2.0; 2274 vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); 2275 vec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); 2276 vec3 attenuatedColor = transmittance * transmittedLight.rgb; 2277 vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); 2278 float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; 2279 return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); 2280 } 2281#endif`,$L=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2282 varying vec2 vUv; 2283#endif 2284#ifdef USE_MAP 2285 varying vec2 vMapUv; 2286#endif 2287#ifdef USE_ALPHAMAP
2288 varying vec2 vAlphaMapUv; 2289#endif 2290#ifdef USE_LIGHTMAP 2291 varying vec2 vLightMapUv; 2292#endif 2293#ifdef USE_AOMAP 2294 varying vec2 vAoMapUv; 2295#endif 2296#ifdef USE_BUMPMAP 2297 varying vec2 vBumpMapUv; 2298#endif 2299#ifdef USE_NORMALMAP 2300 varying vec2 vNormalMapUv; 2301#endif 2302#ifdef USE_EMISSIVEMAP 2303 varying vec2 vEmissiveMapUv; 2304#endif 2305#ifdef USE_METALNESSMAP 2306 varying vec2 vMetalnessMapUv; 2307#endif 2308#ifdef USE_ROUGHNESSMAP 2309 varying vec2 vRoughnessMapUv; 2310#endif 2311#ifdef USE_ANISOTROPYMAP 2312 varying vec2 vAnisotropyMapUv; 2313#endif 2314#ifdef USE_CLEARCOATMAP 2315 varying vec2 vClearcoatMapUv; 2316#endif 2317#ifdef USE_CLEARCOAT_NORMALMAP 2318 varying vec2 vClearcoatNormalMapUv; 2319#endif 2320#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2321 varying vec2 vClearcoatRoughnessMapUv; 2322#endif 2323#ifdef USE_IRIDESCENCEMAP 2324 varying vec2 vIridescenceMapUv; 2325#endif 2326#ifdef USE_IRIDESCENCE_THICKNESSMAP 2327 varying vec2 vIridescenceThicknessMapUv; 2328#endif 2329#ifdef USE_SHEEN_COLORMAP 2330 varying vec2 vSheenColorMapUv; 2331#endif 2332#ifdef USE_SHEEN_ROUGHNESSMAP 2333 varying vec2 vSheenRoughnessMapUv; 2334#endif 2335#ifdef USE_SPECULARMAP 2336 varying vec2 vSpecularMapUv; 2337#endif 2338#ifdef USE_SPECULAR_COLORMAP 2339 varying vec2 vSpecularColorMapUv; 2340#endif 2341#ifdef USE_SPECULAR_INTENSITYMAP 2342 varying vec2 vSpecularIntensityMapUv; 2343#endif 2344#ifdef USE_TRANSMISSIONMAP 2345 uniform mat3 transmissionMapTransform; 2346 varying vec2 vTransmissionMapUv; 2347#endif 2348#ifdef USE_THICKNESSMAP 2349 uniform mat3 thicknessMapTransform; 2350 varying vec2 vThicknessMapUv; 2351#endif`,KL=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2352 varying vec2 vUv; 2353#endif 2354#ifdef USE_MAP 2355 uniform mat3 mapTransform; 2356 varying vec2 vMapUv; 2357#endif 2358#ifdef USE_ALPHAMAP 2359 uniform mat3 alphaMapTransform; 2360 varying vec2 vAlphaMapUv; 2361#endif 2362#ifdef USE_LIGHTMAP 2363 uniform mat3 lightMapTransform; 2364 varying vec2 vLightMapUv; 2365#endif 2366#ifdef USE_AOMAP 2367 uniform mat3 aoMapTransform; 2368 varying vec2 vAoMapUv; 2369#endif 2370#ifdef USE_BUMPMAP 2371 uniform mat3 bumpMapTransform; 2372 varying vec2 vBumpMapUv; 2373#endif 2374#ifdef USE_NORMALMAP 2375 uniform mat3 normalMapTransform; 2376 varying vec2 vNormalMapUv; 2377#endif 2378#ifdef USE_DISPLACEMENTMAP 2379 uniform mat3 displacementMapTransform; 2380 varying vec2 vDisplacementMapUv; 2381#endif 2382#ifdef USE_EMISSIVEMAP 2383 uniform mat3 emissiveMapTransform; 2384 varying vec2 vEmissiveMapUv; 2385#endif 2386#ifdef USE_METALNESSMAP 2387 uniform mat3 metalnessMapTransform; 2388 varying vec2 vMetalnessMapUv; 2389#endif 2390#ifdef USE_ROUGHNESSMAP 2391 uniform mat3 roughnessMapTransform; 2392 varying vec2 vRoughnessMapUv; 2393#endif 2394#ifdef USE_ANISOTROPYMAP 2395 uniform mat3 anisotropyMapTransform; 2396 varying vec2 vAnisotropyMapUv; 2397#endif 2398#ifdef USE_CLEARCOATMAP 2399 uniform mat3 clearcoatMapTransform; 2400 varying vec2 vClearcoatMapUv; 2401#endif 2402#ifdef USE_CLEARCOAT_NORMALMAP 2403 uniform mat3 clearcoatNormalMapTransform; 2404 varying vec2 vClearcoatNormalMapUv; 2405#endif 2406#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2407 uniform mat3 clearcoatRoughnessMapTransform; 2408 varying vec2 vClearcoatRoughnessMapUv; 2409#endif 2410#ifdef USE_SHEEN_COLORMAP 2411 uniform mat3 sheenColorMapTransform; 2412 varying vec2 vSheenColorMapUv; 2413#endif 2414#ifdef USE_SHEEN_ROUGHNESSMAP 2415 uniform mat3 sheenRoughnessMapTransform; 2416 varying vec2 vSheenRoughnessMapUv; 2417#endif 2418#ifdef USE_IRIDESCENCEMAP 2419 uniform mat3 iridescenceMapTransform; 2420 varying vec2 vIridescenceMapUv; 2421#endif 2422#ifdef USE_IRIDESCENCE_THICKNESSMAP 2423 uniform mat3 iridescenceThicknessMapTransform; 2424 varying vec2 vIridescenceThicknessMapUv; 2425#endif 2426#ifdef USE_SPECULARMAP 2427 uniform mat3 specularMapTransform; 2428 varying vec2 vSpecularMapUv; 2429#endif 2430#ifdef USE_SPECULAR_COLORMAP 2431 uniform mat3 specularColorMapTransform; 2432 varying vec2 vSpecularColorMapUv; 2433#endif 2434#ifdef USE_SPECULAR_INTENSITYMAP 2435 uniform mat3 specularIntensityMapTransform; 2436 varying vec2 vSpecularIntensityMapUv; 2437#endif 2438#ifdef USE_TRANSMISSIONMAP 2439 uniform mat3 transmissionMapTransform; 2440 varying vec2 vTransmissionMapUv; 2441#endif 2442#ifdef USE_THICKNESSMAP 2443 uniform mat3 thicknessMapTransform; 2444 varying vec2 vThicknessMapUv; 2445#endif`,YL=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2446 vUv = vec3( uv, 1 ).xy; 2447#endif 2448#ifdef USE_MAP 2449 vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; 2450#endif 2451#ifdef USE_ALPHAMAP 2452 vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; 2453#endif 2454#ifdef USE_LIGHTMAP 2455 vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; 2456#endif 2457#ifdef USE_AOMAP 2458 vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; 2459#endif 2460#ifdef USE_BUMPMAP 2461 vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; 2462#endif 2463#ifdef USE_NORMALMAP 2464 vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; 2465#endif 2466#ifdef USE_DISPLACEMENTMAP 2467 vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; 2468#endif 2469#ifdef USE_EMISSIVEMAP 2470 vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; 2471#endif 2472#ifdef USE_METALNESSMAP 2473 vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; 2474#endif 2475#ifdef USE_ROUGHNESSMAP 2476 vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; 2477#endif 2478#ifdef USE_ANISOTROPYMAP 2479 vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; 2480#endif 2481#ifdef USE_CLEARCOATMAP 2482 vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; 2483#endif 2484#ifdef USE_CLEARCOAT_NORMALMAP 2485 vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; 2486#endif 2487#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2488 vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; 2489#endif
2490#ifdef USE_IRIDESCENCEMAP 2491 vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; 2492#endif 2493#ifdef USE_IRIDESCENCE_THICKNESSMAP 2494 vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; 2495#endif 2496#ifdef USE_SHEEN_COLORMAP 2497 vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; 2498#endif 2499#ifdef USE_SHEEN_ROUGHNESSMAP 2500 vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; 2501#endif 2502#ifdef USE_SPECULARMAP 2503 vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; 2504#endif 2505#ifdef USE_SPECULAR_COLORMAP 2506 vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; 2507#endif 2508#ifdef USE_SPECULAR_INTENSITYMAP 2509 vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; 2510#endif 2511#ifdef USE_TRANSMISSIONMAP 2512 vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; 2513#endif 2514#ifdef USE_THICKNESSMAP 2515 vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; 2516#endif`,ZL=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 2517 vec4 worldPosition = vec4( transformed, 1.0 ); 2518 #ifdef USE_BATCHING 2519 worldPosition = batchingMatrix * worldPosition; 2520 #endif 2521 #ifdef USE_INSTANCING 2522 worldPosition = instanceMatrix * worldPosition; 2523 #endif 2524 worldPosition = modelMatrix * worldPosition; 2525#endif`;const JL=`varying vec2 vUv; 2526uniform mat3 uvTransform; 2527void main() { 2528 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 2529 gl_Position = vec4( position.xy, 1.0, 1.0 ); 2530}`,QL=`uniform sampler2D t2D; 2531uniform float backgroundIntensity; 2532varying vec2 vUv; 2533void main() { 2534 vec4 texColor = texture2D( t2D, vUv ); 2535 #ifdef DECODE_VIDEO_TEXTURE 2536 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 ); 2537 #endif 2538 texColor.rgb *= backgroundIntensity; 2539 gl_FragColor = texColor; 2540 #include <tonemapping_fragment> 2541 #include <colorspace_fragment> 2542}`,eI=`varying vec3 vWorldDirection; 2543#include <common> 2544void main() { 2545 vWorldDirection = transformDirection( position, modelMatrix ); 2546 #include <begin_vertex> 2547 #include <project_vertex> 2548 gl_Position.z = gl_Position.w; 2549}`,tI=`#ifdef ENVMAP_TYPE_CUBE 2550 uniform samplerCube envMap; 2551#elif defined( ENVMAP_TYPE_CUBE_UV ) 2552 uniform sampler2D envMap; 2553#endif 2554uniform float flipEnvMap; 2555uniform float backgroundBlurriness; 2556uniform float backgroundIntensity; 2557uniform mat3 backgroundRotation; 2558varying vec3 vWorldDirection; 2559#include <cube_uv_reflection_fragment> 2560void main() { 2561 #ifdef ENVMAP_TYPE_CUBE 2562 vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); 2563 #elif defined( ENVMAP_TYPE_CUBE_UV ) 2564 vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); 2565 #else 2566 vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 2567 #endif 2568 texColor.rgb *= backgroundIntensity; 2569 gl_FragColor = texColor; 2570 #include <tonemapping_fragment> 2571 #include <colorspace_fragment> 2572}`,nI=`varying vec3 vWorldDirection; 2573#include <common> 2574void main() { 2575 vWorldDirection = transformDirection( position, modelMatrix ); 2576 #include <begin_vertex> 2577 #include <project_vertex> 2578 gl_Position.z = gl_Position.w; 2579}`,iI=`uniform samplerCube tCube; 2580uniform float tFlip; 2581uniform float opacity; 2582varying vec3 vWorldDirection; 2583void main() { 2584 vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); 2585 gl_FragColor = texColor; 2586 gl_FragColor.a *= opacity; 2587 #include <tonemapping_fragment> 2588 #include <colorspace_fragment> 2589}`,rI=`#include <common> 2590#include <batching_pars_vertex> 2591#include <uv_pars_vertex> 2592#include <displacementmap_pars_vertex> 2593#include <morphtarget_pars_vertex> 2594#include <skinning_pars_vertex> 2595#include <logdepthbuf_pars_vertex> 2596#include <clipping_planes_pars_vertex> 2597varying vec2 vHighPrecisionZW; 2598void main() { 2599 #include <uv_vertex> 2600 #include <batching_vertex> 2601 #include <skinbase_vertex> 2602 #include <morphinstance_vertex> 2603 #ifdef USE_DISPLACEMENTMAP 2604 #include <beginnormal_vertex> 2605 #include <morphnormal_vertex> 2606 #include <skinnormal_vertex> 2607 #endif 2608 #include <begin_vertex> 2609 #include <morphtarget_vertex> 2610 #include <skinning_vertex> 2611 #include <displacementmap_vertex> 2612 #include <project_vertex> 2613 #include <logdepthbuf_vertex> 2614 #include <clipping_planes_vertex> 2615 vHighPrecisionZW = gl_Position.zw; 2616}`,sI=`#if DEPTH_PACKING == 3200 2617 uniform float opacity; 2618#endif 2619#include <common> 2620#include <packing> 2621#include <uv_pars_fragment> 2622#include <map_pars_fragment> 2623#include <alphamap_pars_fragment> 2624#include <alphatest_pars_fragment> 2625#include <alphahash_pars_fragment> 2626#include <logdepthbuf_pars_fragment> 2627#include <clipping_planes_pars_fragment> 2628varying vec2 vHighPrecisionZW; 2629void main() { 2630 vec4 diffuseColor = vec4( 1.0 ); 2631 #include <clipping_planes_fragment> 2632 #if DEPTH_PACKING == 3200 2633 diffuseColor.a = opacity; 2634 #endif 2635 #include <map_fragment> 2636 #include <alphamap_fragment> 2637 #include <alphatest_fragment> 2638 #include <alphahash_fragment> 2639 #include <logdepthbuf_fragment> 2640 float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; 2641 #if DEPTH_PACKING == 3200 2642 gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); 2643 #elif DEPTH_PACKING == 3201 2644 gl_FragColor = packDepthToRGBA( fragCoordZ ); 2645 #endif 2646}`,oI=`#define DISTANCE 2647varying vec3 vWorldPosition; 2648#include <common> 2649#include <batching_pars_vertex> 2650#include <uv_pars_vertex> 2651#include <displacementmap_pars_vertex> 2652#include <morphtarget_pars_vertex> 2653#include <skinning_pars_vertex> 2654#include <clipping_planes_pars_vertex> 2655void main() { 2656 #include <uv_vertex> 2657 #include <batching_vertex> 2658 #include <skinbase_vertex> 2659 #include <morphinstance_vertex> 2660 #ifdef USE_DISPLACEMENTMAP 2661 #include <beginnormal_vertex> 2662 #include <morphnormal_vertex> 2663 #include <skinnormal_vertex> 2664 #endif 2665 #include <begin_vertex> 2666 #include <morphtarget_vertex> 2667 #include <skinning_vertex> 2668 #include <displacementmap_vertex> 2669 #include <project_vertex> 2670 #include <worldpos_vertex> 2671 #include <clipping_planes_vertex> 2672 vWorldPosition = worldPosition.xyz; 2673}`,aI=`#define DISTANCE 2674uniform vec3 referencePosition; 2675uniform float nearDistance; 2676uniform float farDistance; 2677varying vec3 vWorldPosition; 2678#include <common> 2679#include <packing> 2680#include <uv_pars_fragment> 2681#include <map_pars_fragment> 2682#include <alphamap_pars_fragment> 2683#include <alphatest_pars_fragment> 2684#include <alphahash_pars_fragment> 2685#include <clipping_planes_pars_fragment> 2686void main () { 2687 vec4 diffuseColor = vec4( 1.0 ); 2688 #include <clipping_planes_fragment> 2689 #include <map_fragment> 2690 #include <alphamap_fragment> 2691 #include <alphatest_fragment> 2692 #include <alphahash_fragment> 2693 float dist = length( vWorldPosition - referencePosition ); 2694 dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); 2695 dist = saturate( dist ); 2696 gl_FragColor = packDepthToRGBA( dist ); 2697}`,lI=`varying vec3 vWorldDirection; 2698#include <common> 2699void main() { 2700 vWorldDirection = transformDirection( position, modelMatrix ); 2701 #include <begin_vertex> 2702 #include <project_vertex> 2703}`,cI=`uniform sampler2D tEquirect; 2704varying vec3 vWorldDirection; 2705#include <common> 2706void main() { 2707 vec3 direction = normalize( vWorldDirection ); 2708 vec2 sampleUV = equirectUv( direction ); 2709 gl_FragColor = texture2D( tEquirect, sampleUV ); 2710 #include <tonemapping_fragment> 2711 #include <colorspace_fragment> 2712}`,uI=`uniform float scale; 2713attribute float lineDistance; 2714varying float vLineDistance; 2715#include <common> 2716#include <uv_pars_vertex> 2717#include <color_pars_vertex> 2718#include <fog_pars_vertex> 2719#include <morphtarget_pars_vertex> 2720#include <logdepthbuf_pars_vertex> 2721#include <clipping_planes_pars_vertex> 2722void main() { 2723 vLineDistance = scale * lineDistance; 2724 #include <uv_vertex> 2725 #include <color_vertex> 2726 #include <morphinstance_vertex> 2727 #include <morphcolor_vertex> 2728 #include <begin_vertex> 2729 #include <morphtarget_vertex> 2730 #include <project_vertex> 2731 #include <logdepthbuf_vertex> 2732 #include <clipping_planes_vertex> 2733 #include <fog_vertex> 2734}`,fI=`uniform vec3 diffuse; 2735uniform float opacity; 2736uniform float dashSize; 2737uniform float totalSize; 2738varying float vLineDistance; 2739#include <common> 2740#include <color_pars_fragment> 2741#include <uv_pars_fragment> 2742#include <map_pars_fragment> 2743#include <fog_pars_fragment> 2744#include <logdepthbuf_pars_fragment> 2745#include <clipping_planes_pars_fragment> 2746void main() { 2747 vec4 diffuseColor = vec4( diffuse, opacity ); 2748 #include <clipping_planes_fragment> 2749 if ( mod( vLineDistance, totalSize ) > dashSize ) { 2750 discard; 2751 } 2752 vec3 outgoingLight = vec3( 0.0 ); 2753 #include <logdepthbuf_fragment> 2754 #include <map_fragment> 2755 #include <color_fragment> 2756 outgoingLight = diffuseColor.rgb; 2757 #include <opaque_fragment> 2758 #include <tonemapping_fragment> 2759 #include <colorspace_fragment> 2760 #include <fog_fragment> 2761 #include <premultiplied_alpha_fragment> 2762}`,hI=`#include <common> 2763#include <batching_pars_vertex> 2764#include <uv_pars_vertex> 2765#include <envmap_pars_vertex> 2766#include <color_pars_vertex> 2767#include <fog_pars_vertex> 2768#include <morphtarget_pars_vertex> 2769#include <skinning_pars_vertex> 2770#include <logdepthbuf_pars_vertex> 2771#include <clipping_planes_pars_vertex> 2772void main() { 2773 #include <uv_vertex> 2774 #include <color_vertex> 2775 #include <morphinstance_vertex> 2776 #include <morphcolor_vertex> 2777 #include <batching_vertex> 2778 #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) 2779 #include <beginnormal_vertex> 2780 #include <morphnormal_vertex> 2781 #include <skinbase_vertex> 2782 #include <skinnormal_vertex> 2783 #include <defaultnormal_vertex> 2784 #endif 2785 #include <begin_vertex> 2786 #include <morphtarget_vertex> 2787 #include <skinning_vertex> 2788 #include <project_vertex> 2789 #include <logdepthbuf_vertex> 2790 #include <clipping_planes_vertex> 2791 #include <worldpos_vertex> 2792 #include <envmap_vertex> 2793 #include <fog_vertex> 2794}`,dI=`uniform vec3 diffuse; 2795uniform float opacity; 2796#ifndef FLAT_SHADED 2797 varying vec3 vNormal; 2798#endif 2799#include <common> 2800#include <dithering_pars_fragment> 2801#include <color_pars_fragment> 2802#include <uv_pars_fragment> 2803#include <map_pars_fragment> 2804#include <alphamap_pars_fragment> 2805#include <alphatest_pars_fragment> 2806#include <alphahash_pars_fragment> 2807#include <aomap_pars_fragment> 2808#include <lightmap_pars_fragment> 2809#include <envmap_common_pars_fragment> 2810#include <envmap_pars_fragment> 2811#include <fog_pars_fragment> 2812#include <specularmap_pars_fragment> 2813#include <logdepthbuf_pars_fragment> 2814#include <clipping_planes_pars_fragment> 2815void main() { 2816 vec4 diffuseColor = vec4( diffuse, opacity ); 2817 #include <clipping_planes_fragment> 2818 #include <logdepthbuf_fragment> 2819 #include <map_fragment> 2820 #include <color_fragment> 2821 #include <alphamap_fragment> 2822 #include <alphatest_fragment> 2823 #include <alphahash_fragment> 2824 #include <specularmap_fragment> 2825 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 2826 #ifdef USE_LIGHTMAP 2827 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 2828 reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; 2829 #else 2830 reflectedLight.indirectDiffuse += vec3( 1.0 ); 2831 #endif 2832 #include <aomap_fragment> 2833 reflectedLight.indirectDiffuse *= diffuseColor.rgb; 2834 vec3 outgoingLight = reflectedLight.indirectDiffuse; 2835 #include <envmap_fragment> 2836 #include <opaque_fragment> 2837 #include <tonemapping_fragment> 2838 #include <colorspace_fragment> 2839 #include <fog_fragment> 2840 #include <premultiplied_alpha_fragment> 2841 #include <dithering_fragment> 2842}`,pI=`#define LAMBERT 2843varying vec3 vViewPosition; 2844#include <common> 2845#include <batching_pars_vertex> 2846#include <uv_pars_vertex> 2847#include <displacementmap_pars_vertex> 2848#include <envmap_pars_vertex> 2849#include <color_pars_vertex> 2850#include <fog_pars_vertex> 2851#include <normal_pars_vertex> 2852#include <morphtarget_pars_vertex> 2853#include <skinning_pars_vertex> 2854#include <shadowmap_pars_vertex> 2855#include <logdepthbuf_pars_vertex> 2856#include <clipping_planes_pars_vertex> 2857void main() { 2858 #include <uv_vertex> 2859 #include <color_vertex> 2860 #include <morphinstance_vertex> 2861 #include <morphcolor_vertex> 2862 #include <batching_vertex> 2863 #include <beginnormal_vertex> 2864 #include <morphnormal_vertex> 2865 #include <skinbase_vertex> 2866 #include <skinnormal_vertex> 2867 #include <defaultnormal_vertex> 2868 #include <normal_vertex> 2869 #include <begin_vertex> 2870 #include <morphtarget_vertex> 2871 #include <skinning_vertex> 2872 #include <displacementmap_vertex> 2873 #include <project_vertex> 2874 #include <logdepthbuf_vertex> 2875 #include <clipping_planes_vertex> 2876 vViewPosition = - mvPosition.xyz; 2877 #include <worldpos_vertex> 2878 #include <envmap_vertex> 2879 #include <shadowmap_vertex> 2880 #include <fog_vertex> 2881}`,mI=`#define LAMBERT 2882uniform vec3 diffuse; 2883uniform vec3 emissive; 2884uniform float opacity; 2885#include <common> 2886#include <packing> 2887#include <dithering_pars_fragment> 2888#include <color_pars_fragment> 2889#include <uv_pars_fragment> 2890#include <map_pars_fragment> 2891#include <alphamap_pars_fragment> 2892#include <alphatest_pars_fragment> 2893#include <alphahash_pars_fragment> 2894#include <aomap_pars_fragment> 2895#include <lightmap_pars_fragment> 2896#include <emissivemap_pars_fragment> 2897#include <envmap_common_pars_fragment> 2898#include <envmap_pars_fragment> 2899#include <fog_pars_fragment> 2900#include <bsdfs> 2901#include <lights_pars_begin> 2902#include <normal_pars_fragment> 2903#include <lights_lambert_pars_fragment> 2904#include <shadowmap_pars_fragment> 2905#include <bumpmap_pars_fragment> 2906#include <normalmap_pars_fragment> 2907#include <specularmap_pars_fragment> 2908#include <logdepthbuf_pars_fragment> 2909#include <clipping_planes_pars_fragment> 2910void main() { 2911 vec4 diffuseColor = vec4( diffuse, opacity ); 2912 #include <clipping_planes_fragment> 2913 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 2914 vec3 totalEmissiveRadiance = emissive; 2915 #include <logdepthbuf_fragment> 2916 #include <map_fragment> 2917 #include <color_fragment> 2918 #include <alphamap_fragment> 2919 #include <alphatest_fragment> 2920 #include <alphahash_fragment> 2921 #include <specularmap_fragment> 2922 #include <normal_fragment_begin> 2923 #include <normal_fragment_maps> 2924 #include <emissivemap_fragment> 2925 #include <lights_lambert_fragment> 2926 #include <lights_fragment_begin> 2927 #include <lights_fragment_maps> 2928 #include <lights_fragment_end> 2929 #include <aomap_fragment> 2930 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 2931 #include <envmap_fragment> 2932 #include <opaque_fragment> 2933 #include <tonemapping_fragment> 2934 #include <colorspace_fragment> 2935 #include <fog_fragment> 2936 #include <premultiplied_alpha_fragment> 2937 #include <dithering_fragment> 2938}`,gI=`#define MATCAP 2939varying vec3 vViewPosition; 2940#include <common> 2941#include <batching_pars_vertex> 2942#include <uv_pars_vertex> 2943#include <color_pars_vertex> 2944#include <displacementmap_pars_vertex> 2945#include <fog_pars_vertex> 2946#include <normal_pars_vertex> 2947#include <morphtarget_pars_vertex> 2948#include <skinning_pars_vertex> 2949#include <logdepthbuf_pars_vertex> 2950#include <clipping_planes_pars_vertex> 2951void main() { 2952 #include <uv_vertex> 2953 #include <color_vertex> 2954 #include <morphinstance_vertex> 2955 #include <morphcolor_vertex> 2956 #include <batching_vertex> 2957 #include <beginnormal_vertex> 2958 #include <morphnormal_vertex> 2959 #include <skinbase_vertex> 2960 #include <skinnormal_vertex> 2961 #include <defaultnormal_vertex> 2962 #include <normal_vertex> 2963 #include <begin_vertex> 2964 #include <morphtarget_vertex> 2965 #include <skinning_vertex> 2966 #include <displacementmap_vertex> 2967 #include <project_vertex> 2968 #include <logdepthbuf_vertex> 2969 #include <clipping_planes_vertex> 2970 #include <fog_vertex> 2971 vViewPosition = - mvPosition.xyz; 2972}`,_I=`#define MATCAP 2973uniform vec3 diffuse; 2974uniform float opacity; 2975uniform sampler2D matcap; 2976varying vec3 vViewPosition; 2977#include <common> 2978#include <dithering_pars_fragment> 2979#include <color_pars_fragment> 2980#include <uv_pars_fragment> 2981#include <map_pars_fragment> 2982#include <alphamap_pars_fragment> 2983#include <alphatest_pars_fragment> 2984#include <alphahash_pars_fragment> 2985#include <fog_pars_fragment> 2986#include <normal_pars_fragment> 2987#include <bumpmap_pars_fragment> 2988#include <normalmap_pars_fragment> 2989#include <logdepthbuf_pars_fragment> 2990#include <clipping_planes_pars_fragment> 2991void main() { 2992 vec4 diffuseColor = vec4( diffuse, opacity ); 2993 #include <clipping_planes_fragment> 2994 #include <logdepthbuf_fragment> 2995 #include <map_fragment> 2996 #include <color_fragment> 2997 #include <alpha
2997map_fragment> 2998 #include <alphatest_fragment> 2999 #include <alphahash_fragment> 3000 #include <normal_fragment_begin> 3001 #include <normal_fragment_maps> 3002 vec3 viewDir = normalize( vViewPosition ); 3003 vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); 3004 vec3 y = cross( viewDir, x ); 3005 vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; 3006 #ifdef USE_MATCAP 3007 vec4 matcapColor = texture2D( matcap, uv ); 3008 #else 3009 vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); 3010 #endif 3011 vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; 3012 #include <opaque_fragment> 3013 #include <tonemapping_fragment> 3014 #include <colorspace_fragment> 3015 #include <fog_fragment> 3016 #include <premultiplied_alpha_fragment> 3017 #include <dithering_fragment> 3018}`,vI=`#define NORMAL 3019#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3020 varying vec3 vViewPosition; 3021#endif 3022#include <common> 3023#include <batching_pars_vertex> 3024#include <uv_pars_vertex> 3025#include <displacementmap_pars_vertex> 3026#include <normal_pars_vertex> 3027#include <morphtarget_pars_vertex> 3028#include <skinning_pars_vertex> 3029#include <logdepthbuf_pars_vertex> 3030#include <clipping_planes_pars_vertex> 3031void main() { 3032 #include <uv_vertex> 3033 #include <batching_vertex> 3034 #include <beginnormal_vertex> 3035 #include <morphinstance_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#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3049 vViewPosition = - mvPosition.xyz; 3050#endif 3051}`,yI=`#define NORMAL 3052uniform float opacity; 3053#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3054 varying vec3 vViewPosition; 3055#endif 3056#include <packing> 3057#include <uv_pars_fragment> 3058#include <normal_pars_fragment> 3059#include <bumpmap_pars_fragment> 3060#include <normalmap_pars_fragment> 3061#include <logdepthbuf_pars_fragment> 3062#include <clipping_planes_pars_fragment> 3063void main() { 3064 vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); 3065 #include <clipping_planes_fragment> 3066 #include <logdepthbuf_fragment> 3067 #include <normal_fragment_begin> 3068 #include <normal_fragment_maps> 3069 gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a ); 3070 #ifdef OPAQUE 3071 gl_FragColor.a = 1.0; 3072 #endif 3073}`,xI=`#define PHONG 3074varying vec3 vViewPosition; 3075#include <common> 3076#include <batching_pars_vertex> 3077#include <uv_pars_vertex> 3078#include <displacementmap_pars_vertex> 3079#include <envmap_pars_vertex> 3080#include <color_pars_vertex> 3081#include <fog_pars_vertex> 3082#include <normal_pars_vertex> 3083#include <morphtarget_pars_vertex> 3084#include <skinning_pars_vertex> 3085#include <shadowmap_pars_vertex> 3086#include <logdepthbuf_pars_vertex> 3087#include <clipping_planes_pars_vertex> 3088void main() { 3089 #include <uv_vertex> 3090 #include <color_vertex> 3091 #include <morphcolor_vertex> 3092 #include <batching_vertex> 3093 #include <beginnormal_vertex> 3094 #include <morphinstance_vertex> 3095 #include <morphnormal_vertex> 3096 #include <skinbase_vertex> 3097 #include <skinnormal_vertex> 3098 #include <defaultnormal_vertex> 3099 #include <normal_vertex> 3100 #include <begin_vertex> 3101 #include <morphtarget_vertex> 3102 #include <skinning_vertex> 3103 #include <displacementmap_vertex> 3104 #include <project_vertex> 3105 #include <logdepthbuf_vertex> 3106 #include <clipping_planes_vertex> 3107 vViewPosition = - mvPosition.xyz; 3108 #include <worldpos_vertex> 3109 #include <envmap_vertex> 3110 #include <shadowmap_vertex> 3111 #include <fog_vertex> 3112}`,SI=`#define PHONG 3113uniform vec3 diffuse; 3114uniform vec3 emissive; 3115uniform vec3 specular; 3116uniform float shininess; 3117uniform float opacity; 3118#include <common> 3119#include <packing> 3120#include <dithering_pars_fragment> 3121#include <color_pars_fragment> 3122#include <uv_pars_fragment> 3123#include <map_pars_fragment> 3124#include <alphamap_pars_fragment> 3125#include <alphatest_pars_fragment> 3126#include <alphahash_pars_fragment> 3127#include <aomap_pars_fragment> 3128#include <lightmap_pars_fragment> 3129#include <emissivemap_pars_fragment> 3130#include <envmap_common_pars_fragment> 3131#include <envmap_pars_fragment> 3132#include <fog_pars_fragment> 3133#include <bsdfs> 3134#include <lights_pars_begin> 3135#include <normal_pars_fragment> 3136#include <lights_phong_pars_fragment> 3137#include <shadowmap_pars_fragment> 3138#include <bumpmap_pars_fragment> 3139#include <normalmap_pars_fragment> 3140#include <specularmap_pars_fragment> 3141#include <logdepthbuf_pars_fragment> 3142#include <clipping_planes_pars_fragment> 3143void main() { 3144 vec4 diffuseColor = vec4( diffuse, opacity ); 3145 #include <clipping_planes_fragment> 3146 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3147 vec3 totalEmissiveRadiance = emissive; 3148 #include <logdepthbuf_fragment> 3149 #include <map_fragment> 3150 #include <color_fragment> 3151 #include <alphamap_fragment> 3152 #include <alphatest_fragment> 3153 #include <alphahash_fragment> 3154 #include <specularmap_fragment> 3155 #include <normal_fragment_begin> 3156 #include <normal_fragment_maps> 3157 #include <emissivemap_fragment> 3158 #include <lights_phong_fragment> 3159 #include <lights_fragment_begin> 3160 #include <lights_fragment_maps> 3161 #include <lights_fragment_end> 3162 #include <aomap_fragment> 3163 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; 3164 #include <envmap_fragment> 3165 #include <opaque_fragment> 3166 #include <tonemapping_fragment> 3167 #include <colorspace_fragment> 3168 #include <fog_fragment> 3169 #include <premultiplied_alpha_fragment> 3170 #include <dithering_fragment> 3171}`,MI=`#define STANDARD 3172varying vec3 vViewPosition; 3173#ifdef USE_TRANSMISSION 3174 varying vec3 vWorldPosition; 3175#endif 3176#include <common> 3177#include <batching_pars_vertex> 3178#include <uv_pars_vertex> 3179#include <displacementmap_pars_vertex> 3180#include <color_pars_vertex> 3181#include <fog_pars_vertex> 3182#include <normal_pars_vertex> 3183#include <morphtarget_pars_vertex> 3184#include <skinning_pars_vertex> 3185#include <shadowmap_pars_vertex> 3186#include <logdepthbuf_pars_vertex> 3187#include <clipping_planes_pars_vertex> 3188void main() { 3189 #include <uv_vertex> 3190 #include <color_vertex> 3191 #include <morphinstance_vertex> 3192 #include <morphcolor_vertex> 3193 #include <batching_vertex> 3194 #include <beginnormal_vertex> 3195 #include <morphnormal_vertex> 3196 #include <skinbase_vertex> 3197 #include <skinnormal_vertex> 3198 #include <defaultnormal_vertex> 3199 #include <normal_vertex> 3200 #include <begin_vertex> 3201 #include <morphtarget_vertex> 3202 #include <skinning_vertex> 3203 #include <displacementmap_vertex> 3204 #include <project_vertex> 3205 #include <logdepthbuf_vertex> 3206 #include <clipping_planes_vertex> 3207 vViewPosition = - mvPosition.xyz; 3208 #include <worldpos_vertex> 3209 #include <shadowmap_vertex> 3210 #include <fog_vertex> 3211#ifdef USE_TRANSMISSION 3212 vWorldPosition = worldPosition.xyz; 3213#endif 3214}`,TI=`#define STANDARD 3215#ifdef PHYSICAL 3216 #define IOR 3217 #define USE_SPECULAR 3218#endif 3219uniform vec3 diffuse; 3220uniform vec3 emissive; 3221uniform float roughness; 3222uniform float metalness; 3223uniform float opacity; 3224#ifdef IOR 3225 uniform float ior; 3226#endif 3227#ifdef USE_SPECULAR 3228 uniform float specularIntensity; 3229 uniform vec3 specularColor; 3230 #ifdef USE_SPECULAR_COLORMAP 3231 uniform sampler2D specularColorMap; 3232 #endif 3233 #ifdef USE_SPECULAR_INTENSITYMAP 3234 uniform sampler2D specularIntensityMap; 3235 #endif 3236#endif 3237#ifdef USE_CLEARCOAT 3238 uniform float clearcoat; 3239 uniform float clearcoatRoughness; 3240#endif
3241#ifdef USE_IRIDESCENCE 3242 uniform float iridescence; 3243 uniform float iridescenceIOR; 3244 uniform float iridescenceThicknessMinimum; 3245 uniform float iridescenceThicknessMaximum; 3246#endif 3247#ifdef USE_SHEEN 3248 uniform vec3 sheenColor; 3249 uniform float sheenRoughness; 3250 #ifdef USE_SHEEN_COLORMAP 3251 uniform sampler2D sheenColorMap; 3252 #endif 3253 #ifdef USE_SHEEN_ROUGHNESSMAP 3254 uniform sampler2D sheenRoughnessMap; 3255 #endif 3256#endif 3257#ifdef USE_ANISOTROPY 3258 uniform vec2 anisotropyVector; 3259 #ifdef USE_ANISOTROPYMAP 3260 uniform sampler2D anisotropyMap; 3261 #endif 3262#endif 3263varying vec3 vViewPosition; 3264#include <common> 3265#include <packing> 3266#include <dithering_pars_fragment> 3267#include <color_pars_fragment> 3268#include <uv_pars_fragment> 3269#include <map_pars_fragment> 3270#include <alphamap_pars_fragment> 3271#include <alphatest_pars_fragment> 3272#include <alphahash_pars_fragment> 3273#include <aomap_pars_fragment> 3274#include <lightmap_pars_fragment> 3275#include <emissivemap_pars_fragment> 3276#include <iridescence_fragment> 3277#include <cube_uv_reflection_fragment> 3278#include <envmap_common_pars_fragment> 3279#include <envmap_physical_pars_fragment> 3280#include <fog_pars_fragment> 3281#include <lights_pars_begin> 3282#include <normal_pars_fragment> 3283#include <lights_physical_pars_fragment> 3284#include <transmission_pars_fragment> 3285#include <shadowmap_pars_fragment> 3286#include <bumpmap_pars_fragment> 3287#include <normalmap_pars_fragment> 3288#include <clearcoat_pars_fragment> 3289#include <iridescence_pars_fragment> 3290#include <roughnessmap_pars_fragment> 3291#include <metalnessmap_pars_fragment> 3292#include <logdepthbuf_pars_fragment> 3293#include <clipping_planes_pars_fragment> 3294void main() { 3295 vec4 diffuseColor = vec4( diffuse, opacity ); 3296 #include <clipping_planes_fragment> 3297 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3298 vec3 totalEmissiveRadiance = emissive; 3299 #include <logdepthbuf_fragment> 3300 #include <map_fragment> 3301 #include <color_fragment> 3302 #include <alphamap_fragment> 3303 #include <alphatest_fragment> 3304 #include <alphahash_fragment> 3305 #include <roughnessmap_fragment> 3306 #include <metalnessmap_fragment> 3307 #include <normal_fragment_begin> 3308 #include <normal_fragment_maps> 3309 #include <clearcoat_normal_fragment_begin> 3310 #include <clearcoat_normal_fragment_maps> 3311 #include <emissivemap_fragment> 3312 #include <lights_physical_fragment> 3313 #include <lights_fragment_begin> 3314 #include <lights_fragment_maps> 3315 #include <lights_fragment_end> 3316 #include <aomap_fragment> 3317 vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; 3318 vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; 3319 #include <transmission_fragment> 3320 vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; 3321 #ifdef USE_SHEEN 3322 float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); 3323 outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect; 3324 #endif 3325 #ifdef USE_CLEARCOAT 3326 float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); 3327 vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); 3328 outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; 3329 #endif 3330 #include <opaque_fragment> 3331 #include <tonemapping_fragment> 3332 #include <colorspace_fragment> 3333 #include <fog_fragment> 3334 #include <premultiplied_alpha_fragment> 3335 #include <dithering_fragment> 3336}`,EI=`#define TOON 3337varying vec3 vViewPosition; 3338#include <common> 3339#include <batching_pars_vertex> 3340#include <uv_pars_vertex> 3341#include <displacementmap_pars_vertex> 3342#include <color_pars_vertex> 3343#include <fog_pars_vertex> 3344#include <normal_pars_vertex> 3345#include <morphtarget_pars_vertex> 3346#include <skinning_pars_vertex> 3347#include <shadowmap_pars_vertex> 3348#include <logdepthbuf_pars_vertex> 3349#include <clipping_planes_pars_vertex> 3350void main() { 3351 #include <uv_vertex> 3352 #include <color_vertex> 3353 #include <morphinstance_vertex> 3354 #include <morphcolor_vertex> 3355 #include <batching_vertex> 3356 #include <beginnormal_vertex> 3357 #include <morphnormal_vertex> 3358 #include <skinbase_vertex> 3359 #include <skinnormal_vertex> 3360 #include <defaultnormal_vertex> 3361 #include <normal_vertex> 3362 #include <begin_vertex> 3363 #include <morphtarget_vertex> 3364 #include <skinning_vertex> 3365 #include <displacementmap_vertex> 3366 #include <project_vertex> 3367 #include <logdepthbuf_vertex> 3368 #include <clipping_planes_vertex> 3369 vViewPosition = - mvPosition.xyz; 3370 #include <worldpos_vertex> 3371 #include <shadowmap_vertex> 3372 #include <fog_vertex> 3373}`,bI=`#define TOON 3374uniform vec3 diffuse; 3375uniform vec3 emissive; 3376uniform float opacity; 3377#include <common> 3378#include <packing> 3379#include <dithering_pars_fragment> 3380#include <color_pars_fragment> 3381#include <uv_pars_fragment> 3382#include <map_pars_fragment> 3383#include <alphamap_pars_fragment> 3384#include <alphatest_pars_fragment> 3385#include <alphahash_pars_fragment> 3386#include <aomap_pars_fragment> 3387#include <lightmap_pars_fragment> 3388#include <emissivemap_pars_fragment> 3389#include <gradientmap_pars_fragment> 3390#include <fog_pars_fragment> 3391#include <bsdfs> 3392#include <lights_pars_begin> 3393#include <normal_pars_fragment> 3394#include <lights_toon_pars_fragment> 3395#include <shadowmap_pars_fragment> 3396#include <bumpmap_pars_fragment> 3397#include <normalmap_pars_fragment> 3398#include <logdepthbuf_pars_fragment> 3399#include <clipping_planes_pars_fragment> 3400void main() { 3401 vec4 diffuseColor = vec4( diffuse, opacity ); 3402 #include <clipping_planes_fragment> 3403 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3404 vec3 totalEmissiveRadiance = emissive; 3405 #include <logdepthbuf_fragment> 3406 #include <map_fragment> 3407 #include <color_fragment> 3408 #include <alphamap_fragment> 3409 #include <alphatest_fragment> 3410 #include <alphahash_fragment> 3411 #include <normal_fragment_begin> 3412 #include <normal_fragment_maps> 3413 #include <emissivemap_fragment> 3414 #include <lights_toon_fragment> 3415 #include <lights_fragment_begin> 3416 #include <lights_fragment_maps> 3417 #include <lights_fragment_end> 3418 #include <aomap_fragment> 3419 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 3420 #include <opaque_fragment> 3421 #include <tonemapping_fragment> 3422 #include <colorspace_fragment> 3423 #include <fog_fragment> 3424 #include <premultiplied_alpha_fragment> 3425 #include <dithering_fragment> 3426}`,AI=`uniform float size; 3427uniform float scale; 3428#include <common> 3429#include <color_pars_vertex> 3430#include <fog_pars_vertex> 3431#include <morphtarget_pars_vertex> 3432#include <logdepthbuf_pars_vertex> 3433#include <clipping_planes_pars_vertex> 3434#ifdef USE_POINTS_UV 3435 varying vec2 vUv; 3436 uniform mat3 uvTransform; 3437#endif 3438void main() { 3439 #ifdef USE_POINTS_UV 3440 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 3441 #endif 3442 #include <color_vertex> 3443 #include <morphinstance_vertex> 3444 #include <morphcolor_vertex> 3445 #include <begin_vertex> 3446 #include <morphtarget_vertex> 3447 #include <project_vertex> 3448 gl_PointSize = size; 3449 #ifdef USE_SIZEATTENUATION 3450 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 3451 if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); 3452 #endif 3453 #include <logdepthbuf_vertex> 3454 #include <clipping_planes_vertex> 3455 #include <worldpos_vertex> 3456 #include <fog_vertex> 3457}`,wI=`uniform vec3 diffuse; 3458uniform float opacity; 3459#include <common> 3460#include <color_pars_fragment> 3461#include <map_particle_pars_fragment> 3462#include <alphatest_pars_fragment> 3463#include <alphahash_pars_fragment> 3464#include <fog_pars_fragment> 3465#include <logdepthbuf_pars_fragment> 3466#include <clipping_planes_pars_fragment> 3467void main() { 3468 vec4 diffuseColor = vec4( diffuse, opacity ); 3469 #include <clipping_planes_fragment> 3470 vec3 outgoingLight = vec3( 0.0 ); 3471 #include <logdepthbuf_fragment> 3472 #include <map_particle_fragment> 3473 #include <color_fragment> 3474 #include <alphatest_fragment> 3475 #include <alphahash_fragment> 3476 outgoingLight = diffuseColor.rgb; 3477 #include <opaque_fragment> 3478 #include <tonemapping_fragment> 3479 #include <colorspace_fragment> 3480 #include <fog_fragment> 3481 #include <premultiplied_alpha_fragment> 3482}`,RI=`#include <common> 3483#include <batching_pars_vertex> 3484#include <fog_pars_vertex> 3485#include <morphtarget_pars_vertex> 3486#include <skinning_pars_vertex> 3487#include <logdepthbuf_pars_vertex> 3488#include <shadowmap_pars_vertex> 3489void main() { 3490 #include <batching_vertex> 3491 #include <beginnormal_vertex> 3492 #include <morphinstance_vertex> 3493 #include <morphnormal_vertex> 3494 #include <skinbase_vertex> 3495 #include <skinnormal_vertex> 3496 #include <defaultnormal_vertex> 3497 #include <begin_vertex> 3498 #include <morphtarget_vertex> 3499 #include <skinning_vertex> 3500 #include <project_vertex> 3501 #include <logdepthbuf_vertex> 3502 #include <worldpos_vertex> 3503 #include <shadowmap_vertex> 3504 #include <fog_vertex> 3505}`,CI=`uniform vec3 color; 3506uniform float opacity; 3507#include <common> 3508#include <packing> 3509#include <fog_pars_fragment> 3510#include <bsdfs> 3511#include <lights_pars_begin> 3512#include <logdepthbuf_pars_fragment> 3513#include <shadowmap_pars_fragment> 3514#include <shadowmask_pars_fragment> 3515void main() { 3516 #include <logdepthbuf_fragment> 3517 gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); 3518 #include <tonemapping_fragment> 3519 #include <colorspace_fragment> 3520 #include <fog_fragment> 3521}`,PI=`uniform float rotation; 3522uniform vec2 center; 3523#include <common> 3524#include <uv_pars_vertex> 3525#include <fog_pars_vertex> 3526#include <logdepthbuf_pars_vertex> 3527#include <clipping_planes_pars_vertex> 3528void main() { 3529 #include <uv_vertex> 3530 vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); 3531 vec2 scale; 3532 scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); 3533 scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); 3534 #ifndef USE_SIZEATTENUATION 3535 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 3536 if ( isPerspective ) scale *= - mvPosition.z; 3537 #endif 3538 vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; 3539 vec2 rotatedPosition; 3540 rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; 3541 rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; 3542 mvPosition.xy += rotatedPosition; 3543 gl_Position = projectionMatrix * mvPosition; 3544 #include <logdepthbuf_vertex> 3545 #include <clipping_planes_vertex> 3546 #include <fog_vertex> 3547}`,LI=`uniform vec3 diffuse; 3548uniform float opacity; 3549#include <common> 3550#include <uv_pars_fragment> 3551#include <map_pars_fragment> 3552#include <alphamap_pars_fragment> 3553#include <alphatest_pars_fragment> 3554#include <alphahash_pars_fragment> 3555#include <fog_pars_fragment> 3556#include <logdepthbuf_pars_fragment> 3557#include <clipping_planes_pars_fragment> 3558void main() { 3559 vec4 diffuseColor = vec4( diffuse, opacity ); 3560 #include <clipping_planes_fragment> 3561 vec3 outgoingLight = vec3( 0.0 ); 3562 #include <logdepthbuf_fragment> 3563 #include <map_fragment> 3564 #include <alphamap_fragment> 3565 #include <alphatest_fragment> 3566 #include <alphahash_fragment> 3567 outgoingLight = diffuseColor.rgb; 3568 #include <opaque_fragment> 3569 #include <tonemapping_fragment> 3570 #include <colorspace_fragment> 3571 #include <fog_fragment> 3572}`,ze={alphahash_fragment:J1,alphahash_pars_fragment:Q1,alphamap_fragment:eP,alphamap_pars_fragment:tP,alphatest_fragment:nP,alphatest_pars_fragment:iP,aomap_fragment:rP,aomap_pars_fragment:sP,batching_pars_vertex:oP,batching_vertex:aP,begin_vertex:lP,beginnormal_vertex:cP,bsdfs:uP,iridescence_fragment:fP,bumpmap_pars_fragment:hP,clipping_planes_fragment:dP,clipping_planes_pars_fragment:pP,clipping_planes_pars_vertex:mP,clipping_planes_vertex:gP,color_fragment:_P,color_pars_fragment:vP,color_pars_vertex:yP,color_vertex:xP,common:SP,cube_uv_reflection_fragment:MP,defaultnormal_vertex:TP,dis
vendor: 6,777 bytes, line 3572
3572placementmap_pars_vertex:EP,displacementmap_vertex:bP,emissivemap_fragment:AP,emissivemap_pars_fragment:wP,colorspace_fragment:RP,colorspace_pars_fragment:CP,envmap_fragment:PP,envmap_common_pars_fragment:LP,envmap_pars_fragment:IP,envmap_pars_vertex:DP,envmap_physical_pars_fragment:XP,envmap_vertex:NP,fog_vertex:OP,fog_pars_vertex:UP,fog_fragment:FP,fog_pars_fragment:kP,gradientmap_pars_fragment:BP,lightmap_fragment:HP,lightmap_pars_fragment:zP,lights_lambert_fragment:VP,lights_lambert_pars_fragment:GP,lights_pars_begin:WP,lights_toon_fragment:jP,lights_toon_pars_fragment:qP,lights_phong_fragment:$P,lights_phong_pars_fragment:KP,lights_physical_fragment:YP,lights_physical_pars_fragment:ZP,lights_fragment_begin:JP,lights_fragment_maps:QP,lights_fragment_end:eL,logdepthbuf_fragment:tL,logdepthbuf_pars_fragment:nL,logdepthbuf_pars_vertex:iL,logdepthbuf_vertex:rL,map_fragment:sL,map_pars_fragment:oL,map_particle_fragment:aL,map_particle_pars_fragment:lL,metalnessmap_fragment:cL,metalnessmap_pars_fragment:uL,morphinstance_vertex:fL,morphcolor_vertex:hL,morphnormal_vertex:dL,morphtarget_pars_vertex:pL,morphtarget_vertex:mL,normal_fragment_begin:gL,normal_fragment_maps:_L,normal_pars_fragment:vL,normal_pars_vertex:yL,normal_vertex:xL,normalmap_pars_fragment:SL,clearcoat_normal_fragment_begin:ML,clearcoat_normal_fragment_maps:TL,clearcoat_pars_fragment:EL,iridescence_pars_fragment:bL,opaque_fragment:AL,packing:wL,premultiplied_alpha_fragment:RL,project_vertex:CL,dithering_fragment:PL,dithering_pars_fragment:LL,roughnessmap_fragment:IL,roughnessmap_pars_fragment:DL,shadowmap_pars_fragment:NL,shadowmap_pars_vertex:OL,shadowmap_vertex:UL,shadowmask_pars_fragment:FL,skinbase_vertex:kL,skinning_pars_vertex:BL,skinning_vertex:HL,skinnormal_vertex:zL,specularmap_fragment:VL,specularmap_pars_fragment:GL,tonemapping_fragment:WL,tonemapping_pars_fragment:XL,transmission_fragment:jL,transmission_pars_fragment:qL,uv_pars_fragment:$L,uv_pars_vertex:KL,uv_vertex:YL,worldpos_vertex:ZL,background_vert:JL,background_frag:QL,backgroundCube_vert:eI,backgroundCube_frag:tI,cube_vert:nI,cube_frag:iI,depth_vert:rI,depth_frag:sI,distanceRGBA_vert:oI,distanceRGBA_frag:aI,equirect_vert:lI,equirect_frag:cI,linedashed_vert:uI,linedashed_frag:fI,meshbasic_vert:hI,meshbasic_frag:dI,meshlambert_vert:pI,meshlambert_frag:mI,meshmatcap_vert:gI,meshmatcap_frag:_I,meshnormal_vert:vI,meshnormal_frag:yI,meshphong_vert:xI,meshphong_frag:SI,meshphysical_vert:MI,meshphysical_frag:TI,meshtoon_vert:EI,meshtoon_frag:bI,points_vert:AI,points_frag:wI,shadow_vert:RI,shadow_frag:CI,sprite_vert:PI,sprite_frag:LI},ge={common:{diffuse:{value:new Ne(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ve},alphaMap:{value:null},alphaMapTransform:{value:new Ve},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ve}},envmap:{envMap:{value:null},envMapRotation:{value:new Ve},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ve}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ve}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ve},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ve},normalScale:{value:new Ge(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ve},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ve}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ve}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ve}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ne(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Ne(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Ve},alphaTest:{value:0},uvTransform:{value:new Ve}},sprite:{diffuse:{value:new Ne(16777215)},opacity:{value:1},center:{value:new Ge(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ve},alphaMap:{value:null},alphaMapTransform:{value:new Ve},alphaTest:{value:0}}},yi={basic:{uniforms:hn([ge.common,ge.specularmap,ge.envmap,ge.aomap,ge.lightmap,ge.fog]),vertexShader:ze.meshbasic_vert,fragmentShader:ze.meshbasic_frag},lambert:{uniforms:hn([ge.common,ge.specularmap,ge.envmap,ge.aomap,ge.lightmap,ge.emissivemap,ge.bumpmap,ge.normalmap,ge.displacementmap,ge.fog,ge.lights,{emissive:{value:new Ne(0)}}]),vertexShader:ze.meshlambert_vert,fragmentShader:ze.meshlambert_frag},phong:{uniforms:hn([ge.common,ge.specularmap,ge.envmap,ge.aomap,ge.lightmap,ge.emissivemap,ge.bumpmap,ge.normalmap,ge.displacementmap,ge.fog,ge.lights,{emissive:{value:new Ne(0)},specular:{value:new Ne(1118481)},shininess:{value:30}}]),vertexShader:ze.meshphong_vert,fragmentShader:ze.meshphong_frag},standard:{uniforms:hn([ge.common,ge.envmap,ge.aomap,ge.lightmap,ge.emissivemap,ge.bumpmap,ge.normalmap,ge.displacementmap,ge.roughnessmap,ge.metalnessmap,ge.fog,ge.lights,{emissive:{value:new Ne(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ze.meshphysical_vert,fragmentShader:ze.meshphysical_frag},toon:{uniforms:hn([ge.common,ge.aomap,ge.lightmap,ge.emissivemap,ge.bumpmap,ge.normalmap,ge.displacementmap,ge.gradientmap,ge.fog,ge.lights,{emissive:{value:new Ne(0)}}]),vertexShader:ze.meshtoon_vert,fragmentShader:ze.meshtoon_frag},matcap:{uniforms:hn([ge.common,ge.bumpmap,ge.normalmap,ge.displacementmap,ge.fog,{matc
vendor: 24,548 bytes, lines 3572-3647
3572ap:{value:null}}]),vertexShader:ze.meshmatcap_vert,fragmentShader:ze.meshmatcap_frag},points:{uniforms:hn([ge.points,ge.fog]),vertexShader:ze.points_vert,fragmentShader:ze.points_frag},dashed:{uniforms:hn([ge.common,ge.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ze.linedashed_vert,fragmentShader:ze.linedashed_frag},depth:{uniforms:hn([ge.common,ge.displacementmap]),vertexShader:ze.depth_vert,fragmentShader:ze.depth_frag},normal:{uniforms:hn([ge.common,ge.bumpmap,ge.normalmap,ge.displacementmap,{opacity:{value:1}}]),vertexShader:ze.meshnormal_vert,fragmentShader:ze.meshnormal_frag},sprite:{uniforms:hn([ge.sprite,ge.fog]),vertexShader:ze.sprite_vert,fragmentShader:ze.sprite_frag},background:{uniforms:{uvTransform:{value:new Ve},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ze.background_vert,fragmentShader:ze.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Ve}},vertexShader:ze.backgroundCube_vert,fragmentShader:ze.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ze.cube_vert,fragmentShader:ze.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ze.equirect_vert,fragmentShader:ze.equirect_frag},distanceRGBA:{uniforms:hn([ge.common,ge.displacementmap,{referencePosition:{value:new X},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ze.distanceRGBA_vert,fragmentShader:ze.distanceRGBA_frag},shadow:{uniforms:hn([ge.lights,ge.fog,{color:{value:new Ne(0)},opacity:{value:1}}]),vertexShader:ze.shadow_vert,fragmentShader:ze.shadow_frag}};yi.physical={uniforms:hn([yi.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ve},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ve},clearcoatNormalScale:{value:new Ge(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ve},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ve},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ve},sheen:{value:0},sheenColor:{value:new Ne(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ve},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ve},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ve},transmissionSamplerSize:{value:new Ge},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ve},attenuationDistance:{value:0},attenuationColor:{value:new Ne(0)},specularColor:{value:new Ne(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ve},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ve},anisotropyVector:{value:new Ge},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ve}}]),vertexShader:ze.meshphysical_vert,fragmentShader:ze.meshphysical_frag};const ql={r:0,b:0,g:0},ss=new wi,II=new Be;function DI(n,e,t,i,r,s,o){const a=new Ne(0);let l=s===!0?0:1,c,u,f=null,h=0,d=null;function _(p,g){let x=!1,v=g.isScene===!0?g.background:null;v&&v.isTexture&&(v=(g.backgroundBlurriness>0?t:e).get(v)),v===null?m(a,l):v&&v.isColor&&(m(v,1),x=!0);const y=n.xr.getEnvironmentBlendMode();y==="additive"?i.buffers.color.setClear(0,0,0,1,o):y==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||x)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),v&&(v.isCubeTexture||v.mapping===au)?(u===void 0&&(u=new kn(new hl(1,1,1),new Vr({name:"BackgroundCubeMaterial",uniforms:zo(yi.backgroundCube.uniforms),vertexShader:yi.backgroundCube.vertexShader,fragmentShader:yi.backgroundCube.fragmentShader,side:bn,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(T,b,A){this.matrixWorld.copyPosition(A.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(u)),ss.copy(g.backgroundRotation),ss.x*=-1,ss.y*=-1,ss.z*=-1,v.isCubeTexture&&v.isRenderTargetTexture===!1&&(ss.y*=-1,ss.z*=-1),u.material.uniforms.envMap.value=v,u.material.uniforms.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=g.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(II.makeRotationFromEuler(ss)),u.material.toneMapped=Je.getTransfer(v.colorSpace)!==ft,(f!==v||h!==v.version||d!==n.toneMapping)&&(u.material.needsUpdate=!0,f=v,h=v.version,d=n.toneMapping),u.layers.enableAll(),p.unshift(u,u.geometry,u.material,0,0,null)):v&&v.isTexture&&(c===void 0&&(c=new kn(new cu(2,2),new Vr({name:"BackgroundMaterial",uniforms:zo(yi.background.uniforms),vertexShader:yi.background.vertexShader,fragmentShader:yi.background.fragmentShader,side:sr,depthTest:!1,depthWrite:!1,fog:!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=v,c.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,c.material.toneMapped=Je.getTransfer(v.colorSpace)!==ft,v.matrixAutoUpdate===!0&&v.updateMatrix(),c.material.uniforms.uvTransform.value.copy(v.matrix),(f!==v||h!==v.version||d!==n.toneMapping)&&(c.material.needsUpdate=!0,f=v,h=v.version,d=n.toneMapping),c.layers.enableAll(),p.unshift(c,c.geometry,c.material,0,0,null))}function m(p,g){p.getRGB(ql,Xy(n)),i.buffers.color.setClear(ql.r,ql.g,ql.b,g,o)}return{getClearColor:function(){return a},setClearColor:function(p,g=1){a.set(p),l=g,m(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(p){l=p,m(a,l)},render:_}}function NI(n,e){const t=n.getParameter(n.MAX_VERTEX_ATTRIBS),i={},r=h(null);let s=r,o=!1;function a(M,O,I,L,V){let $=!1;const G=f(L,I,O);s!==G&&(s=G,c(s.object)),$=d(M,L,I,V),$&&_(M,L,I,V),V!==null&&e.update(V,n.ELEMENT_ARRAY_BUFFER),($||o)&&(o=!1,y(M,O,I,L),V!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,e.get(V).buffer))}function l(){return n.createVertexArray()}function c(M){return n.bindVertexArray(M)}function u(M){return n.deleteVertexArray(M)}function f(M,O,I){const L=I.wireframe===!0;let V=i[M.id];V===void 0&&(V={},i[M.id]=V);let $=V[O.id];$===void 0&&($={},V[O.id]=$);let G=$[L];return G===void 0&&(G=h(l()),$[L]=G),G}function h(M){const O=[],I=[],L=[];for(let V=0;V<t;V++)O[V]=0,I[V]=0,L[V]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:O,enabledAttributes:I,attributeDivisors:L,object:M,attributes:{},index:null}}function d(M,O,I,L){const V=s.attributes,$=O.attributes;let G=0;const J=I.getAttributes();for(const U in J)if(J[U].location>=0){const ae=V[U];let me=$[U];if(me===void 0&&(U==="instanceMatrix"&&M.instanceMatrix&&(me=M.instanceMatrix),U==="instanceColor"&&M.instanceColor&&(me=M.instanceColor)),ae===void 0||ae.attribute!==me||me&&ae.data!==me.data)return!0;G++}return s.attributesNum!==G||s.index!==L}function _(M,O,I,L){const V={},$=O.attributes;let G=0;const J=I.getAttributes();for(const U in J)if(J[U].location>=0){let ae=$[U];ae===void 0&&(U==="instanceMatrix"&&M.instanceMatrix&&(ae=M.instanceMatrix),U==="instanceColor"&&M.instanceColor&&(ae=M.instanceColor));const me={};me.attribute=ae,ae&&ae.data&&(me.data=ae.data),V[U]=me,G++}s.attributes=V,s.attributesNum=G,s.index=L}function m(){const M=s.newAttributes;for(let O=0,I=M.length;O<I;O++)M[O]=0}function p(M){g(M,0)}function g(M,O){const I=s.newAttributes,L=s.enabledAttributes,V=s.attributeDivisors;I[M]=1,L[M]===0&&(n.enableVertexAttribArray(M),L[M]=1),V[M]!==O&&(n.vertexAttribDivisor(M,O),V[M]=O)}function x(){const M=s.newAttributes,O=s.enabledAttributes;for(let I=0,L=O.length;I<L;I++)O[I]!==M[I]&&(n.disableVertexAttribArray(I),O[I]=0)}function v(M,O,I,L,V,$,G){G===!0?n.vertexAttribIPointer(M,O,I,V,$):n.vertexAttribPointer(M,O,I,L,V,$)}function y(M,O,I,L){m();const V=L.attributes,$=I.getAttributes(),G=O.defaultAttributeValues;for(const J in $){const U=$[J];if(U.location>=0){let ne=V[J];if(ne===void 0&&(J==="instanceMatrix"&&M.instanceMatrix&&(ne=M.instanceMatrix),J==="instanceColor"&&M.instanceColor&&(ne=M.instanceColor)),ne!==void 0){const ae=ne.normalized,me=ne.itemSize,Ee=e.get(ne);if(Ee===void 0)continue;const Ue=Ee.buffer,Q=Ee.type,le=Ee.bytesPerElement,ve=Q===n.INT||Q===n.UNSIGNED_INT||ne.gpuType===wy;if(ne.isInterleavedBufferAttribute){const W=ne.data,oe=W.stride,ie=ne.offset;if(W.isInstancedInterleavedBuffer){for(let he=0;he<U.locationSize;he++)g(U.location+he,W.meshPerAttribute);M.isInstancedMesh!==!0&&L._maxInstanceCount===void 0&&(L._maxInstanceCount=W.meshPerAttribute*W.count)}else for(let he=0;he<U.locationSize;he++)p(U.location+he);n.bindBuffer(n.ARRAY_BUFFER,Ue);for(let he=0;he<U.locationSize;he++)v(U.location+he,me/U.locationSize,Q,ae,oe*le,(ie+me/U.locationSize*he)*le,ve)}else{if(ne.isInstancedBufferAttribute){for(let W=0;W<U.locationSize;W++)g(U.location+W,ne.meshPerAttribute);M.isInstancedMesh!==!0&&L._maxInstanceCount===void 0&&(L._maxInstanceCount=ne.meshPerAttribute*ne.count)}else for(let W=0;W<U.locationSize;W++)p(U.location+W);n.bindBuffer(n.ARRAY_BUFFER,Ue);for(let W=0;W<U.locationSize;W++)v(U.location+W,me/U.locationSize,Q,ae,me*le,me/U.locationSize*W*le,ve)}}else if(G!==void 0){const ae=G[J];if(ae!==void 0)switch(ae.length){case 2:n.vertexAttrib2fv(U.location,ae);break;case 3:n.vertexAttrib3fv(U.location,ae);break;case 4:n.vertexAttrib4fv(U.location,ae);break;default:n.vertexAttrib1fv(U.location,ae)}}}}x()}function T(){P();for(const M in i){const O=i[M];for(const I in O){const L=O[I];for(const V in L)u(L[V].object),delete L[V];delete O[I]}delete i[M]}}function b(M){if(i[M.id]===void 0)return;const O=i[M.id];for(const I in O){const L=O[I];for(const V in L)u(L[V].object),delete L[V];delete O[I]}delete i[M.id]}function A(M){for(const O in i){const I=i[O];if(I[M.id]===void 0)continue;const L=I[M.id];for(const V in L)u(L[V].object),delete L[V];delete I[M.id]}}function P(){S(),o=!0,s!==r&&(s=r,c(s.object))}function S(){r.geometry=null,r.program=null,r.wireframe=!1}return{setup:a,reset:P,resetDefaultState:S,dispose:T,releaseStatesOfGeometry:b,releaseStatesOfProgram:A,initAttributes:m,enableAttribute:p,disableUnusedAttributes:x}}function OI(n,e,t){let i;function r(l){i=l}function s(l,c){n.drawArrays(i,l,c),t.update(c,i,1)}function o(l,c,u){u!==0&&(n.drawArraysInstanced(i,l,c,u),t.update(c,i,u))}function a(l,c,u){if(u===0)return;const f=e.get("WEBGL_multi_draw");if(f===null)for(let h=0;h<u;h++)this.render(l[h],c[h]);else{f.multiDrawArraysWEBGL(i,l,0,c,0,u);let h=0;for(let d=0;d<u;d++)h+=c[d];t.update(h,i,1)}}this.setMode=r,this.render=s,this.renderInstances=o,this.renderMultiDraw=a}function UI(n,e,t){let i;function r(){if(i!==void 0)return i;if(e.has("EXT_texture_filter_anisotropic")===!0){const v=e.get("EXT_texture_filter_anisotropic");i=n.getParameter(v.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function s(v){if(v==="highp"){if(n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";v="mediump"}return v==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let o=t.precision!==void 0?t.precision:"highp";const a=s(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);const l=t.logarithmicDepthBuffer===!0,c=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),u=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),f=n.getParameter(n.MAX_TEXTURE_SIZE),h=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),d=n.getParameter(n.MAX_VERTEX_ATTRIBS),_=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),m=n.getParameter(n.MAX_VARYING_VECTORS),p=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),g=u>0,x=n.getParameter(n.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:r,getMaxPrecision:s,precision:o,logarithmicDepthBuffer:l,maxTextures:c,maxVertexTextures:u,maxTextureSize:f,maxCubemapSize:h,maxAttributes:d,maxVertexUniforms:_,maxVaryings:m,maxFragmentUniforms:p,vertexTextures:g,maxSamples:x}}function FI(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new hs,a=new Ve,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(f,h){const d=f.length!==0||h||i!==0||r;return r=h,i=f.length,d},this.beginShadows=function(){s=!0,u(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(f,h){t=u(f,h,0)},this.setState=function(f,h,d){const _=f.clippingPlanes,m=f.clipIntersection,p=f.clipShadows,g=n.get(f);if(!r||_===null||_.length===0||s&&!p)s?u(null):c();else{const x=s?0:i,v=x*4;let y=g.clippingState||null;l.value=y,y=u(_,h,v,d);for(let T=0;T!==v;++T)y[T]=t[T];g.clippingState=y,this.numIntersection=m?this.numPlanes:0,this.numPlanes+=x}};function c(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function u(f,h,d,_){const m=f!==null?f.length:0;let p=null;if(m!==0){if(p=l.value,_!==!0||p===null){const g=d+m*4,x=h.matrixWorldInverse;a.getNormalMatrix(x),(p===null||p.length<g)&&(p=new Float32Array(g));for(let v=0,y=d;v!==m;++v,y+=4)o.copy(f[v]).applyMatrix4(x,a),o.normal.toArray(p,y),p[y+3]=o.constant}l.value=p,l.needsUpdate=!0}return e.numPlanes=m,e.numIntersection=0,p}}function kI(n){let e=new WeakMap;function t(o,a){return a===xh?o.mapping=Oo:a===Sh&&(o.mapping=Uo),o}function i(o){if(o&&o.isTexture){const a=o.mapping;if(a===xh||a===Sh)if(e.has(o)){const l=e.get(o).texture;return t(l,o.mapping)}else{const l=o.image;if(l&&l.height>0){const c=new $1(l.height);return c.fromEquirectangularTexture(n,o),e.set(o,c),o.addEventListener("dispose",r),t(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}}class Ld extends jy{constructor(e=-1,t=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=t,this.top=i,this.bottom=r,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,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=t,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),t=(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+t,l=r-t;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;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 t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const co=4,Lg=[.125,.215,.35,.446,.526,.582],gs=20,pf=new Ld,Ig=new Ne;let mf=null,gf=0,_f=0,vf=!1;const ds=(1+Math.sqrt(5))/2,io=1/ds,Dg=[new X(1,1,1),new X(-1,1,1),new X(1,1,-1),new X(-1,1,-1),new X(0,ds,io),new X(0,ds,-io),new X(io,0,ds),new X(-io,0,ds),new X(ds,io,0),new X(-ds,io,0)];class Ng{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,r=100){mf=this._renderer.getRenderTarget(),gf=this._renderer.getActiveCubeFace(),_f=this._renderer.getActiveMipmapLevel(),vf=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,i,r,s),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=Fg(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Ug(),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(mf,gf,_f),this._renderer.xr.enabled=vf,e.scissorTest=!1,$l(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===Oo||e.mapping===Uo?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),mf=this._renderer.getRenderTarget(),gf=this._renderer.getActiveCubeFace(),_f=this._renderer.getActiveMipmapLevel(),vf=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const i=t||this._allocateTargets();return this._textureToCubeUV(e,i),this._applyPMREM(i),this._cleanup(i),i}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,i={magFilter:_n,minFilter:_n,generateMipmaps:!1,type:Dc,format:li,colorSpace:Jt,depthBuffer:!1},r=Og(e,t,i);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=Og(e,t,i);const{_lodMax:s}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=BI(s)),this._blurMaterial=HI(s,e,t)}return r}_compileMaterial(e){const t=new kn(this._lodPlanes[0],e);this._renderer.compile(t,pf)}_sceneToCubeUV(e,t,i,r){const a=new gn(90,1,t,i),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],u=this._renderer,f=u.autoClear,h=u.toneMapping;u.getClearColor(Ig),u.toneMapping=kr,u.autoClear=!1;const d=new vs({name:"PMREM.Background",side:bn,depthWrite:!1,depthTest:!1}),_=new kn(new hl,d);let m=!1;const p=e.background;p?p.isColor&&(d.color.copy(p),e.background=null,m=!0):(d.color.copy(Ig),m=!0);for(let g=0;g<6;g++){const x=g%3;x===0?(a.up.set(0,l[g],0),a.lookAt(c[g],0,0)):x===1?(a.up.set(0,0,l[g]),a.lookAt(0,c[g],0)):(a.up.set(0,l[g],0),a.lookAt(0,0,c[g]));const v=this._cubeSize;$l(r,x*v,g>2?v:0,v,v),u.setRenderTarget(r),m&&u.render(_,a),u.render(e,a)}_.geometry.dispose(),_.material.dispose(),u.toneMapping=h,u.autoClear=f,e.background=p}_textureToCubeUV(e,t){const i=this._renderer,r=e.mapping===Oo||e.mapping===Uo;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=Fg()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Ug());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new kn(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;$l(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,pf)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let r=1;r<this._lodPlanes.length;r++){const s=Math.sqrt(this._sigmas[r]*this._sigmas[r]-this._sigmas[r-1]*this._sigmas[r-1]),o=Dg[(r-1)%Dg.length];this._blur(e,r-1,r,s,o)}t.autoClear=i}_blur(e,t,i,r,s){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,i,r,"latitudinal",s),this._halfBlur(o,e,i,i,r,"longitudinal",s)}_halfBlur(e,t,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 kn(this._lodPlanes[r],c),h=c.uniforms,d=this._sizeLods[i]-1,_=isFinite(s)?Math.PI/(2*d):2*Math.PI/(2*gs-1),m=s/_,p=isFinite(s)?1+Math.floor(u*m):gs;p>gs&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${p} samples when the maximum is set to ${gs}`);const g=[];let x=0;for(let A=0;A<gs;++A){const P=A/m,S=Math.exp(-P*P/2);g.push(S),A===0?x+=S:A<p&&(x+=2*S)}for(let A=0;A<g.length;A++)g[A]=g[A]/x;h.envMap.value=e.texture,h.samples.value=p,h.weights.value=g,h.latitudinal.value=o==="latitudinal",a&&(h.poleAxis.value=a);const{_lodMax:v}=this;h.dTheta.value=_,h.mipInt.value=v-i;const y=this._sizeLods[r],T=3*y*(r>v-co?r-v+co:0),b=4*(this._cubeSize-y);$l(t,T,b,3*y,2*y),l.setRenderTarget(t),l.render(f,pf)}}function BI(n){const e=[],t=[],i=[];let r=n;const s=n-co+1+Lg.length;for(let o=0;o<s;o++){const a=Math.pow(2,r);t.push(a);let l=1/a;o>n-co?l=Lg[o-n+co-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],d=6,_=6,m=3,p=2,g=1,x=new Float32Array(m*_*d),v=new Float32Array(p*_*d),y=new Float32Array(g*_*d);for(let b=0;b<d;b++){const A=b%3*2/3-1,P=b>2?0:-1,S=[A,P,0,A+2/3,P,0,A+2/3,P+1,0,A,P,0,A+2/3,P+1,0,A,P+1,0];x.set(S,m*_*b),v.set(h,p*_*b);const M=[b,b,b,b,b,b];y.set(M,g*_*b)}const T=new ni;T.setAttribute("position",new xn(x,m)),T.setAttribute("uv",new xn(v,p)),T.setAttribute("faceIndex",new xn(y,g)),e.push(T),r>co&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function Og(n,e,t){const i=new Ds(n,e,t);return i.texture.mapping=au,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function $l(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function HI(n,e,t){const i=new Float32Array(gs),r=new X(0,1,0);return new Vr({name:"SphericalGaussianBlur",defines:{n:gs,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:Id(),fragmentShader:` 3573 3574 precision mediump float; 3575 precision mediump int; 3576 3577 varying vec3 vOutputDirection; 3578 3579 uniform sampler2D envMap; 3580 uniform int samples; 3581 uniform float weights[ n ]; 3582 uniform bool latitudinal; 3583 uniform float dTheta; 3584 uniform float mipInt; 3585 uniform vec3 poleAxis; 3586 3587 #define ENVMAP_TYPE_CUBE_UV 3588 #include <cube_uv_reflection_fragment> 3589 3590 vec3 getSample( float theta, vec3 axis ) { 3591 3592 float cosTheta = cos( theta ); 3593 // Rodrigues' axis-angle rotation 3594 vec3 sampleDirection = vOutputDirection * cosTheta 3595 + cross( axis, vOutputDirection ) * sin( theta ) 3596 + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); 3597 3598 return bilinearCubeUV( envMap, sampleDirection, mipInt ); 3599 3600 } 3601 3602 void main() { 3603 3604 vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); 3605 3606 if ( all( equal( axis, vec3( 0.0 ) ) ) ) { 3607 3608 axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); 3609 3610 } 3611 3612 axis = normalize( axis ); 3613 3614 gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 3615 gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); 3616 3617 for ( int i = 1; i < n; i++ ) { 3618 3619 if ( i >= samples ) { 3620 3621 break; 3622 3623 } 3624 3625 float theta = dTheta * float( i ); 3626 gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); 3627 gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); 3628 3629 } 3630 3631 } 3632 `,blending:Fr,depthTest:!1,depthWrite:!1})}function Ug(){return new Vr({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Id(),fragmentShader:` 3633 3634 precision mediump float; 3635 precision mediump int; 3636 3637 varying vec3 vOutputDirection; 3638 3639 uniform sampler2D envMap; 3640 3641 #include <common> 3642 3643 void main() { 3644 3645 vec3 outputDirection = normalize( vOutputDirection ); 3646 vec2 uv = equirectUv( outputDirection ); 3647
3648 gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); 3649 3650 } 3651 `,blending:Fr,depthTest:!1,depthWrite:!1})}function Fg(){return new Vr({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Id(),fragmentShader:` 3652 3653 precision mediump float; 3654 precision mediump int; 3655 3656 uniform float flipEnvMap; 3657 3658 varying vec3 vOutputDirection; 3659 3660 uniform samplerCube envMap; 3661 3662 void main() { 3663 3664 gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); 3665 3666 } 3667 `,blending:Fr,depthTest:!1,depthWrite:!1})}function Id(){return` 3668 3669 precision mediump float; 3670 precision mediump int; 3671 3672 attribute float faceIndex; 3673 3674 varying vec3 vOutputDirection; 3675 3676 // RH coordinate system; PMREM face-indexing convention 3677 vec3 getDirection( vec2 uv, float face ) { 3678 3679 uv = 2.0 * uv - 1.0; 3680 3681 vec3 direction = vec3( uv, 1.0 ); 3682 3683 if ( face == 0.0 ) { 3684 3685 direction = direction.zyx; // ( 1, v, u ) pos x 3686 3687 } else if ( face == 1.0 ) { 3688 3689 direction = direction.xzy; 3690 direction.xz *= -1.0; // ( -u, 1, -v ) pos y 3691 3692 } else if ( face == 2.0 ) { 3693 3694 direction.x *= -1.0; // ( -u, v, 1 ) pos z 3695 3696 } else if ( face == 3.0 ) { 3697 3698 direction = direction.zyx; 3699 direction.xz *= -1.0; // ( -1, v, -u ) neg x 3700 3701 } else if ( face == 4.0 ) { 3702 3703 direction = direction.xzy; 3704 direction.xy *= -1.0; // ( -u, -1, v ) neg y 3705 3706 } else if ( face == 5.0 ) { 3707 3708 direction.z *= -1.0; // ( u, v, -1 ) neg z 3709 3710 } 3711 3712 return direction; 3713 3714 } 3715 3716 void main() { 3717 3718 vOutputDirection = getDirection( uv, faceIndex ); 3719 gl_Position = vec4( position, 1.0 ); 3720 3721 } 3722 `}function zI(n){let e=new WeakMap,t=null;function i(a){if(a&&a.isTexture){const l=a.mapping,c=l===xh||l===Sh,u=l===Oo||l===Uo;if(c||u){let f=e.get(a);const h=f!==void 0?f.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==h)return t===null&&(t=new Ng(n)),f=c?t.fromEquirectangular(a,f):t.fromCubemap(a,f),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),f.texture;if(f!==void 0)return f.texture;{const d=a.image;return c&&d&&d.height>0||u&&d&&r(d)?(t===null&&(t=new Ng(n)),f=c?t.fromEquirectangular(a):t.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,t!==null&&(t.dispose(),t=null)}return{get:i,dispose:o}}function VI(n){const e={};function t(i){if(e[i]!==void 0)return e[i];let r;switch(i){case"WEBGL_depth_texture":r=n.getExtension("WEBGL_depth_texture")||n.getExtension("MOZ_WEBGL_depth_texture")||n.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("MOZ_EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=n.getExtension("WEBGL_compressed_texture_s3tc")||n.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||n.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=n.getExtension("WEBGL_compressed_texture_pvrtc")||n.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=n.getExtension(i)}return e[i]=r,r}return{has:function(i){return t(i)!==null},init:function(){t("EXT_color_buffer_float"),t("WEBGL_clip_cull_distance"),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture"),t("WEBGL_render_shared_exponent")},get:function(i){const r=t(i);return r===null&&console.warn("THREE.WebGLRenderer: "+i+" extension not supported."),r}}}function GI(n,e,t,i){const r={},s=new WeakMap;function o(f){const h=f.target;h.index!==null&&e.remove(h.index);for(const _ in h.attributes)e.remove(h.attributes[_]);for(const _ in h.morphAttributes){const m=h.morphAttributes[_];for(let p=0,g=m.length;p<g;p++)e.remove(m[p])}h.removeEventListener("dispose",o),delete r[h.id];const d=s.get(h);d&&(e.remove(d),s.delete(h)),i.releaseStatesOfGeometry(h),h.isInstancedBufferGeometry===!0&&delete h._maxInstanceCount,t.memory.geometries--}function a(f,h){return r[h.id]===!0||(h.addEventListener("dispose",o),r[h.id]=!0,t.memory.geometries++),h}function l(f){const h=f.attributes;for(const _ in h)e.update(h[_],n.ARRAY_BUFFER);const d=f.morphAttributes;for(const _ in d){const m=d[_];for(let p=0,g=m.length;p<g;p++)e.update(m[p],n.ARRAY_BUFFER)}}function c(f){const h=[],d=f.index,_=f.attributes.position;let m=0;if(d!==null){const x=d.array;m=d.version;for(let v=0,y=x.length;v<y;v+=3){const T=x[v+0],b=x[v+1],A=x[v+2];h.push(T,b,b,A,A,T)}}else if(_!==void 0){const x=_.array;m=_.version;for(let v=0,y=x.length/3-1;v<y;v+=3){const T=v+0,b=v+1,A=v+2;h.push(T,b,b,A,A,T)}}else return;const p=new(ky(h)?Wy:Gy)(h,1);p.version=m;const g=s.get(f);g&&e.remove(g),s.set(f,p)}function u(f){const h=s.get(f);if(h){const d=f.index;d!==null&&h.version<d.version&&c(f)}else c(f);return s.get(f)}return{get:a,update:l,getWireframeAttribute:u}}function WI(n,e,t){let i;function r(f){i=f}let s,o;function a(f){s=f.type,o=f.bytesPerElement}function l(f,h){n.drawElements(i,h,s,f*o),t.update(h,i,1)}function c(f,h,d){d!==0&&(n.drawElementsInstanced(i,h,s,f*o,d),t.update(h,i,d))}function u(f,h,d){if(d===0)return;const _=e.get("WEBGL_multi_draw");if(_===null)for(let m=0;m<d;m++)this.render(f[m]/o,h[m]);else{_.multiDrawElementsWEBGL(i,h,0,s,f,0,d);let m=0;for(let p=0;p<d;p++)m+=h[p];t.update(m,i,1)}}this.setMode=r,this.setIndex=a,this.render=l,this.renderInstances=c,this.renderMultiDraw=u}function XI(n){const e={geometries:0,textures:0},t={frame:0,calls:0,triangles:0,points:0,lines:0};function i(s,o,a){switch(t.calls++,o){case n.TRIANGLES:t.triangles+=a*(s/3);break;case n.LINES:t.lines+=a*(s/2);break;case n.LINE_STRIP:t.lines+=a*(s-1);break;case n.LINE_LOOP:t.lines+=a*s;break;case n.POINTS:t.points+=a*s;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",o);break}}function r(){t.calls=0,t.triangles=0,t.points=0,t.lines=0}return{memory:e,render:t,programs:null,autoReset:!0,reset:r,update:i}}function jI(n,e,t){const i=new WeakMap,r=new st;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(){A.dispose(),i.delete(a),a.removeEventListener("dispose",S)};h!==void 0&&h.texture.dispose();const d=a.morphAttributes.position!==void 0,_=a.morphAttributes.normal!==void 0,m=a.morphAttributes.color!==void 0,p=a.morphAttributes.position||[],g=a.morphAttributes.normal||[],x=a.morphAttributes.color||[];let v=0;d===!0&&(v=1),_===!0&&(v=2),m===!0&&(v=3);let y=a.attributes.position.count*v,T=1;y>e.maxTextureSize&&(T=Math.ceil(y/e.maxTextureSize),y=e.maxTextureSize);const b=new Float32Array(y*T*4*f),A=new zy(b,y,T,f);A.type=Ei,A.needsUpdate=!0;const P=v*4;for(let M=0;M<f;M++){const O=p[M],I=g[M],L=x[M],V=y*T*4*M;for(let $=0;$<O.count;$++){const G=$*P;d===!0&&(r.fromBufferAttribute(O,$),b[V+G+0]=r.x,b[V+G+1]=r.y,b[V+G+2]=r.z,b[V+G+3]=0),_===!0&&(r.fromBufferAttribute(I,$),b[V+G+4]=r.x,b[V+G+5]=r.y,b[V+G+6]=r.z,b[V+G+7]=0),m===!0&&(r.fromBufferAttribute(L,$),b[V+G+8]=r.x,b[V+G+9]=r.y,b[V+G+10]=r.z,b[V+G+11]=L.itemSize===4?r.w:1)}}h={count:f,texture:A,size:new Ge(y,T)},i.set(a,h),a.addEventListener("dispose",S)}if(o.isInstancedMesh===!0&&o.morphTexture!==null)l.getUniforms().setValue(n,"morphTexture",o.morphTexture,t);else{let d=0;for(let m=0;m<c.length;m++)d+=c[m];const _=a.morphTargetsRelative?1:1-d;l.getUniforms().setValue(n,"morphTargetBaseInfluence",_),l.getUniforms().setValue(n,"morphTargetInfluences",c)}l.getUniforms().setValue(n,"morphTargetsTexture",h.texture,t),l.getUniforms().setValue(n,"morphTargetsTextureSize",h.size)}return{update:s}}function qI(n,e,t,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&&(t.update(l.instanceMatrix,n.ARRAY_BUFFER),l.instanceColor!==null&&t.update(l.instanceColor,n.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),t.remove(c.instanceMatrix),c.instanceColor!==null&&t.remove(c.instanceColor)}return{update:s,dispose:o}}class Ky extends Dt{constructor(e,t,i,r,s,o,a,l,c,u){if(u=u!==void 0?u:Mo,u!==Mo&&u!==Xa)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&u===Mo&&(i=ko),i===void 0&&u===Xa&&(i=ul),super(null,r,s,o,a,l,u,i,c),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=a!==void 0?a:yn,this.minFilter=l!==void 0?l:yn,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}const Yy=new Dt,Zy=new Ky(1,1);Zy.compareFunction=Uy;const Jy=new zy,Qy=new I1,ex=new qy,kg=[],Bg=[],Hg=new Float32Array(16),zg=new Float32Array(9),Vg=new Float32Array(4);function Qo(n,e,t){const i=n[0];if(i<=0||i>0)return n;const r=e*t;let s=kg[r];if(s===void 0&&(s=new Float32Array(r),kg[r]=s),e!==0){i.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(s,a)}return s}function kt(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t<i;t++)if(n[t]!==e[t])return!1;return!0}function Bt(n,e){for(let t=0,i=e.length;t<i;t++)n[t]=e[t]}function uu(n,e){let t=Bg[e];t===void 0&&(t=new Int32Array(e),Bg[e]=t);for(let i=0;i!==e;++i)t[i]=n.allocateTextureUnit();return t}function $I(n,e){const t=this.cache;t[0]!==e&&(n.uniform1f(this.addr,e),t[0]=e)}function KI(n,e){const t=this.cache;
vendor: 14,443 bytes, lines 3722-3755
3722if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(n.uniform2f(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(kt(t,e))return;n.uniform2fv(this.addr,e),Bt(t,e)}}function YI(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(n.uniform3f(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else if(e.r!==void 0)(t[0]!==e.r||t[1]!==e.g||t[2]!==e.b)&&(n.uniform3f(this.addr,e.r,e.g,e.b),t[0]=e.r,t[1]=e.g,t[2]=e.b);else{if(kt(t,e))return;n.uniform3fv(this.addr,e),Bt(t,e)}}function ZI(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(n.uniform4f(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(kt(t,e))return;n.uniform4fv(this.addr,e),Bt(t,e)}}function JI(n,e){const t=this.cache,i=e.elements;if(i===void 0){if(kt(t,e))return;n.uniformMatrix2fv(this.addr,!1,e),Bt(t,e)}else{if(kt(t,i))return;Vg.set(i),n.uniformMatrix2fv(this.addr,!1,Vg),Bt(t,i)}}function QI(n,e){const t=this.cache,i=e.elements;if(i===void 0){if(kt(t,e))return;n.uniformMatrix3fv(this.addr,!1,e),Bt(t,e)}else{if(kt(t,i))return;zg.set(i),n.uniformMatrix3fv(this.addr,!1,zg),Bt(t,i)}}function eD(n,e){const t=this.cache,i=e.elements;if(i===void 0){if(kt(t,e))return;n.uniformMatrix4fv(this.addr,!1,e),Bt(t,e)}else{if(kt(t,i))return;Hg.set(i),n.uniformMatrix4fv(this.addr,!1,Hg),Bt(t,i)}}function tD(n,e){const t=this.cache;t[0]!==e&&(n.uniform1i(this.addr,e),t[0]=e)}function nD(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(n.uniform2i(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(kt(t,e))return;n.uniform2iv(this.addr,e),Bt(t,e)}}function iD(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(n.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(kt(t,e))return;n.uniform3iv(this.addr,e),Bt(t,e)}}function rD(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(n.uniform4i(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(kt(t,e))return;n.uniform4iv(this.addr,e),Bt(t,e)}}function sD(n,e){const t=this.cache;t[0]!==e&&(n.uniform1ui(this.addr,e),t[0]=e)}function oD(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(n.uniform2ui(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(kt(t,e))return;n.uniform2uiv(this.addr,e),Bt(t,e)}}function aD(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(n.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(kt(t,e))return;n.uniform3uiv(this.addr,e),Bt(t,e)}}function lD(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(n.uniform4ui(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(kt(t,e))return;n.uniform4uiv(this.addr,e),Bt(t,e)}}function cD(n,e,t){const i=this.cache,r=t.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r);const s=this.type===n.SAMPLER_2D_SHADOW?Zy:Yy;t.setTexture2D(e||s,r)}function uD(n,e,t){const i=this.cache,r=t.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),t.setTexture3D(e||Qy,r)}function fD(n,e,t){const i=this.cache,r=t.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),t.setTextureCube(e||ex,r)}function hD(n,e,t){const i=this.cache,r=t.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),t.setTexture2DArray(e||Jy,r)}function dD(n){switch(n){case 5126:return $I;case 35664:return KI;case 35665:return YI;case 35666:return ZI;case 35674:return JI;case 35675:return QI;case 35676:return eD;case 5124:case 35670:return tD;case 35667:case 35671:return nD;case 35668:case 35672:return iD;case 35669:case 35673:return rD;case 5125:return sD;case 36294:return oD;case 36295:return aD;case 36296:return lD;case 35678:case 36198:case 36298:case 36306:case 35682:return cD;case 35679:case 36299:case 36307:return uD;case 35680:case 36300:case 36308:case 36293:return fD;case 36289:case 36303:case 36311:case 36292:return hD}}function pD(n,e){n.uniform1fv(this.addr,e)}function mD(n,e){const t=Qo(e,this.size,2);n.uniform2fv(this.addr,t)}function gD(n,e){const t=Qo(e,this.size,3);n.uniform3fv(this.addr,t)}function _D(n,e){const t=Qo(e,this.size,4);n.uniform4fv(this.addr,t)}function vD(n,e){const t=Qo(e,this.size,4);n.uniformMatrix2fv(this.addr,!1,t)}function yD(n,e){const t=Qo(e,this.size,9);n.uniformMatrix3fv(this.addr,!1,t)}function xD(n,e){const t=Qo(e,this.size,16);n.uniformMatrix4fv(this.addr,!1,t)}function SD(n,e){n.uniform1iv(this.addr,e)}function MD(n,e){n.uniform2iv(this.addr,e)}function TD(n,e){n.uniform3iv(this.addr,e)}function ED(n,e){n.uniform4iv(this.addr,e)}function bD(n,e){n.uniform1uiv(this.addr,e)}function AD(n,e){n.uniform2uiv(this.addr,e)}function wD(n,e){n.uniform3uiv(this.addr,e)}function RD(n,e){n.uniform4uiv(this.addr,e)}function CD(n,e,t){const i=this.cache,r=e.length,s=uu(t,r);kt(i,s)||(n.uniform1iv(this.addr,s),Bt(i,s));for(let o=0;o!==r;++o)t.setTexture2D(e[o]||Yy,s[o])}function PD(n,e,t){const i=this.cache,r=e.length,s=uu(t,r);kt(i,s)||(n.uniform1iv(this.addr,s),Bt(i,s));for(let o=0;o!==r;++o)t.setTexture3D(e[o]||Qy,s[o])}function LD(n,e,t){const i=this.cache,r=e.length,s=uu(t,r);kt(i,s)||(n.uniform1iv(this.addr,s),Bt(i,s));for(let o=0;o!==r;++o)t.setTextureCube(e[o]||ex,s[o])}function ID(n,e,t){const i=this.cache,r=e.length,s=uu(t,r);kt(i,s)||(n.uniform1iv(this.addr,s),Bt(i,s));for(let o=0;o!==r;++o)t.setTexture2DArray(e[o]||Jy,s[o])}function DD(n){switch(n){case 5126:return pD;case 35664:return mD;case 35665:return gD;case 35666:return _D;case 35674:return vD;case 35675:return yD;case 35676:return xD;case 5124:case 35670:return SD;case 35667:case 35671:return MD;case 35668:case 35672:return TD;case 35669:case 35673:return ED;case 5125:return bD;case 36294:return AD;case 36295:return wD;case 36296:return RD;case 35678:case 36198:case 36298:case 36306:case 35682:return CD;case 35679:case 36299:case 36307:return PD;case 35680:case 36300:case 36308:case 36293:return LD;case 36289:case 36303:case 36311:case 36292:return ID}}class ND{constructor(e,t,i){this.id=e,this.addr=i,this.cache=[],this.type=t.type,this.setValue=dD(t.type)}}class OD{constructor(e,t,i){this.id=e,this.addr=i,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=DD(t.type)}}class UD{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,i){const r=this.seq;for(let s=0,o=r.length;s!==o;++s){const a=r[s];a.setValue(e,t[a.id],i)}}}const yf=/(\w+)(\])?(\[|\.)?/g;function Gg(n,e){n.seq.push(e),n.map[e.id]=e}function FD(n,e,t){const i=n.name,r=i.length;for(yf.lastIndex=0;;){const s=yf.exec(i),o=yf.lastIndex;let a=s[1];const l=s[2]==="]",c=s[3];if(l&&(a=a|0),c===void 0||c==="["&&o+2===r){Gg(t,c===void 0?new ND(a,n,e):new OD(a,n,e));break}else{let f=t.map[a];f===void 0&&(f=new UD(a),Gg(t,f)),t=f}}}class ac{constructor(e,t){this.seq=[],this.map={};const i=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let r=0;r<i;++r){const s=e.getActiveUniform(t,r),o=e.getUniformLocation(t,s.name);FD(s,o,this)}}setValue(e,t,i,r){const s=this.map[t];s!==void 0&&s.setValue(e,i,r)}setOptional(e,t,i){const r=t[i];r!==void 0&&this.setValue(e,i,r)}static upload(e,t,i,r){for(let s=0,o=t.length;s!==o;++s){const a=t[s],l=i[a.id];l.needsUpdate!==!1&&a.setValue(e,l.value,r)}}static seqWithValue(e,t){const i=[];for(let r=0,s=e.length;r!==s;++r){const o=e[r];o.id in t&&i.push(o)}return i}}function Wg(n,e,t){const i=n.createShader(e);return n.shaderSource(i,t),n.compileShader(i),i}const kD=37297;let BD=0;function HD(n,e){const t=n.split(` 3723`),i=[],r=Math.max(e-6,0),s=Math.min(e+6,t.length);for(let o=r;o<s;o++){const a=o+1;i.push(`${a===e?">":" "} ${a}: ${t[o]}`)}return i.join(` 3724`)}function zD(n){const e=Je.getPrimaries(Je.workingColorSpace),t=Je.getPrimaries(n);let i;switch(e===t?i="":e===Uc&&t===Oc?i="LinearDisplayP3ToLinearSRGB":e===Oc&&t===Uc&&(i="LinearSRGBToLinearDisplayP3"),n){case Jt:case lu:return[i,"LinearTransferOETF"];case pn:case wd:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",n),[i,"LinearTransferOETF"]}}function Xg(n,e,t){const i=n.getShaderParameter(e,n.COMPILE_STATUS),r=n.getShaderInfoLog(e).trim();if(i&&r==="")return"";const s=/ERROR: 0:(\d+)/.exec(r);if(s){const o=parseInt(s[1]);return t.toUpperCase()+` 3725 3726`+r+` 3727 3728`+HD(n.getShaderSource(e),o)}else return r}function VD(n,e){const t=zD(e);return`vec4 ${n}( vec4 value ) { return ${t[0]}( ${t[1]}( value ) ); }`}function GD(n,e){let t;switch(e){case OC:t="Linear";break;case UC:t="Reinhard";break;case FC:t="OptimizedCineon";break;case kC:t="ACESFilmic";break;case HC:t="AgX";break;case zC:t="Neutral";break;case BC:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+n+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function WD(n){return[n.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",n.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Sa).join(` 3729`)}function XD(n){const e=[];for(const t in n){const i=n[t];i!==!1&&e.push("#define "+t+" "+i)}return e.join(` 3730`)}function jD(n,e){const t={},i=n.getProgramParameter(e,n.ACTIVE_ATTRIBUTES);for(let r=0;r<i;r++){const s=n.getActiveAttrib(e,r),o=s.name;let a=1;s.type===n.FLOAT_MAT2&&(a=2),s.type===n.FLOAT_MAT3&&(a=3),s.type===n.FLOAT_MAT4&&(a=4),t[o]={type:s.type,location:n.getAttribLocation(e,o),locationSize:a}}return t}function Sa(n){return n!==""}function jg(n,e){const t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return n.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,t).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function qg(n,e){return n.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const qD=/^[ \t]*#include +<([\w\d./]+)>/gm;function Eh(n){return n.replace(qD,KD)}const $D=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function KD(n,e){let t=ze[e];if(t===void 0){const i=$D.get(e);if(i!==void 0)t=ze[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 Eh(t)}const YD=/#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 $g(n){return n.replace(YD,ZD)}function ZD(n,e,t,i){let r="";for(let s=parseInt(e);s<parseInt(t);s++)r+=i.replace(/\[\s*i\s*\]/g,"[ "+s+" ]").replace(/UNROLLED_LOOP_INDEX/g,s);return r}function Kg(n){let e=`precision ${n.precision} float; 3731 precision ${n.precision} int; 3732 precision ${n.precision} sampler2D; 3733 precision ${n.precision} samplerCube; 3734 precision ${n.precision} sampler3D; 3735 precision ${n.precision} sampler2DArray; 3736 precision ${n.precision} sampler2DShadow; 3737 precision ${n.precision} samplerCubeShadow; 3738 precision ${n.precision} sampler2DArrayShadow; 3739 precision ${n.precision} isampler2D; 3740 precision ${n.precision} isampler3D; 3741 precision ${n.precision} isamplerCube; 3742 precision ${n.precision} isampler2DArray; 3743 precision ${n.precision} usampler2D; 3744 precision ${n.precision} usampler3D; 3745 precision ${n.precision} usamplerCube; 3746 precision ${n.precision} usampler2DArray; 3747 `;return n.precision==="highp"?e+=` 3748#define HIGH_PRECISION`:n.precision==="mediump"?e+=` 3749#define MEDIUM_PRECISION`:n.precision==="lowp"&&(e+=` 3750#define LOW_PRECISION`),e}function JD(n){let e="SHADOWMAP_TYPE_BASIC";return n.shadowMapType===Sy?e="SHADOWMAP_TYPE_PCF":n.shadowMapType===My?e="SHADOWMAP_TYPE_PCF_SOFT":n.shadowMapType===Gi&&(e="SHADOWMAP_TYPE_VSM"),e}function QD(n){let e="ENVMAP_TYPE_CUBE";if(n.envMap)switch(n.envMapMode){case Oo:case Uo:e="ENVMAP_TYPE_CUBE";break;case au:e="ENVMAP_TYPE_CUBE_UV";break}return e}function eN(n){let e="ENVMAP_MODE_REFLECTION";if(n.envMap)switch(n.envMapMode){case Uo:e="ENVMAP_MODE_REFRACTION";break}return e}function tN(n){let e="ENVMAP_BLENDING_NONE";if(n.envMap)switch(n.combine){case Ty:e="ENVMAP_BLENDING_MULTIPLY";break;case DC:e="ENVMAP_BLENDING_MIX";break;case NC:e="ENVMAP_BLENDING_ADD";break}return e}function nN(n){const e=n.envMapCubeUVHeight;if(e===null)return null;const t=Math.log2(e)-2,i=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),112)),texelHeight:i,maxMip:t}}function iN(n,e,t,i){const r=n.getContext(),s=t.defines;let o=t.vertexShader,a=t.fragmentShader;const l=JD(t),c=QD(t),u=eN(t),f=tN(t),h=nN(t),d=WD(t),_=XD(s),m=r.createProgram();let p,g,x=t.glslVersion?"#version "+t.glslVersion+` 3751`:"";t.isRawShaderMaterial?(p=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,_].filter(Sa).join(` 3752`),p.length>0&&(p+=` 3753`),g=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,_].filter(Sa).join(` 3754`),g.length>0&&(g+=` 3755`)):(p=[Kg(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,_,t.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.instancingMorph?"#define USE_INSTANCING_MORPH":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IR
3755IDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE":"",t.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","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","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` 3756`].filter(Sa).join(` 3757`),g=[Kg(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,_,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+c:"",t.envMap?"#define "+u:"",t.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":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IR
3757IDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==kr?"#define TONE_MAPPING":"",t.toneMapping!==kr?ze.tonemapping_pars_fragment:"",t.toneMapping!==kr?GD("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",ze.colorspace_pars_fragment,VD("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` 3758`].filter(Sa).join(` 3759`)),o=Eh(o),o=jg(o,t),o=qg(o,t),a=Eh(a),a=jg(a,t),a=qg(a,t),o=$g(o),a=$g(a),t.isRawShaderMaterial!==!0&&(x=`#version 300 es 3760`,p=[d,"#define attribute in","#define varying out","#define texture2D texture"].join(` 3761`)+` 3762`+p,g=["#define varying in",t.glslVersion===ug?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===ug?"":"#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(` 3763`)+` 3764`+g);const v=x+p+o,y=x+g+a,T=Wg(r,r.VERTEX_SHADER,v),b=Wg(r,r.FRAGMENT_SHADER,y);r.attachShader(m,T),r.attachShader(m,b),t.index0AttributeName!==void 0?r.bindAttribLocation(m,0,t.index0AttributeName):t.morphTargets===!0&&r.bindAttribLocation(m,0,"position"),r.linkProgram(m);function A(O){if(n.debug.checkShaderErrors){const I=r.getProgramInfoLog(m).trim(),L=r.getShaderInfoLog(T).trim(),V=r.getShaderInfoLog(b).trim();let $=!0,G=!0;if(r.getProgramParameter(m,r.LINK_STATUS)===!1)if($=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(r,m,T,b);else{const J=Xg(r,T,"vertex"),U=Xg(r,b,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(m,r.VALIDATE_STATUS)+` 3765 3766Material Name: `+O.name+` 3767Material Type: `+O.type+` 3768 3769Program Info Log: `+I+` 3770`+J+` 3771`+U)}else I!==""?console.warn("THREE.WebGLProgram: Program Info Log:",I):(L===""||V==="")&&(G=!1);G&&(O.diagnostics={runnable:$,programLog:I,vertexShader:{log:L,prefix:p},fragmentShader:{log:V,prefix:g}})}r.deleteShader(T),r.deleteShader(b),P=new ac(r,m),S=jD(r,m)}let P;this.getUniforms=function(){return P===void 0&&A(this),P};let S;this.getAttributes=function(){return S===void 0&&A(this),S};let M=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return M===!1&&(M=r.getProgramParameter(m,kD)),M},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(m),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=BD++,this.cacheKey=e,this.usedTimes=1,this.program=m,this.vertexShader=T,this.fragmentShader=b,this}let rN=0;class sN{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,r=this._getShaderStage(t),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 t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new oN(e),t.set(e,i)),i}}class oN{constructor(e){this.id=rN++,this.code=e,this.usedTimes=0}}function aN(n,e,t,i,r,s,o){const a=new Cd,l=new sN,c=new Set,u=[],f=r.logarithmicDepthBuffer,h=r.vertexTextures;let d=r.precision;const _={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 m(S){return c.add(S),S===0?"uv":`uv${S}`}function p(S,M,O,I,L){const V=I.fog,$=L.geometry,G=S.isMeshStandardMaterial?I.environment:null,J=(S.isMeshStandardMaterial?t:e).get(S.envMap||G),U=J&&J.mapping===au?J.image.height:null,ne=_[S.type];S.precision!==null&&(d=r.getMaxPrecision(S.precision),d!==S.precision&&console.warn("THREE.WebGLProgram.getParameters:",S.precision,"not supported, using",d,"instead."));const ae=$.morphAttributes.position||$.morphAttributes.normal||$.morphAttributes.color,me=ae!==void 0?ae.length:0;let Ee=0;$.morphAttributes.position!==void 0&&(Ee=1),$.morphAttributes.normal!==void 0&&(Ee=2),$.morphAttributes.color!==void 0&&(Ee=3);let Ue,Q,le,ve;if(ne){const Qt=yi[ne];Ue=Qt.vertexShader,Q=Qt.fragmentShader}else Ue=S.vertexShader,Q=S.fragmentShader,l.update(S),le=l.getVertexShaderID(S),ve=l.getFragmentShaderID(S);const W=n.getRenderTarget(),oe=L.isInstancedMesh===!0,ie=L.isBatchedMesh===!0,he=!!S.map,H=!!S.matcap,Te=!!J,R=!!S.aoMap,D=!!S.lightMap,k=!!S.bumpMap,te=!!S.normalMap,w=!!S.displacementMap,E=!!S.emissiveMap,F=!!S.metalnessMap,z=!!S.roughnessMap,j=S.anisotropy>0,B=S.clearcoat>0,ce=S.iridescence>0,K=S.sheen>0,se=S.transmission>0,ue=j&&!!S.anisotropyMap,re=B&&!!S.clearcoatMap,fe=B&&!!S.clearcoatNormalMap,ye=B&&!!S.clearcoatRoughnessMap,xe=ce&&!!S.iridescenceMap,_e=ce&&!!S.iridescenceThicknessMap,Ie=K&&!!S.sheenColorMap,Le=K&&!!S.sheenRoughnessMap,je=!!S.specularMap,$e=!!S.specularColorMap,We=!!S.specularIntensityMap,Me=se&&!!S.transmissionMap,N=se&&!!S.thicknessMap,de=!!S.gradientMap,pe=!!S.alphaMap,Ae=S.alphaTest>0,we=!!S.alphaHash,lt=!!S.extensions;let ht=kr;S.toneMapped&&(W===null||W.isXRRenderTarget===!0)&&(ht=n.toneMapping);const _t={shaderID:ne,shaderType:S.type,shaderName:S.name,vertexShader:Ue,fragmentShader:Q,defines:S.defines,customVertexShaderID:le,customFragmentShaderID:ve,isRawShaderMaterial:S.isRawShaderMaterial===!0,glslVersion:S.glslVersion,precision:d,batching:ie,instancing:oe,instancingColor:oe&&L.instanceColor!==null,instancingMorph:oe&&L.morphTexture!==null,supportsVertexTextures:h,outputColorSpace:W===null?n.outputColorSpace:W.isXRRenderTarget===!0?W.texture.colorSpace:Jt,alphaToCoverage:!!S.alphaToCoverage,map:he,matcap:H,envMap:Te,envMapMode:Te&&J.mapping,envMapCubeUVHeight:U,aoMap:R,lightMap:D,bumpMap:k,normalMap:te,displacementMap:h&&w,emissiveMap:E,normalMapObjectSpace:te&&S.normalMapType===n1,normalMapTangentSpace:te&&S.normalMapType===Ad,metalnessMap:F,roughnessMap:z,anisotropy:j,anisotropyMap:ue,clearcoat:B,clearcoatMap:re,clearcoatNormalMap:fe,clearcoatRoughnessMap:ye,iridescence:ce,iridescenceMap:xe,iridescenceThicknessMap:_e,sheen:K,sheenColorMap:Ie,sheenRoughnessMap:Le,specularMap:je,specularColorMap:$e,specularIntensityMap:We,transmission:se,transmissionMap:Me,thicknessMap:N,gradientMap:de,opaque:S.transparent===!1&&S.blending===So&&S.alphaToCoverage===!1,alphaMap:pe,alphaTest:Ae,alphaHash:we,combine:S.combine,mapUv:he&&m(S.map.channel),aoMapUv:R&&m(S.aoMap.channel),lightMapUv:D&&m(S.lightMap.channel),bumpMapUv:k&&m(S.bumpMap.channel),normalMapUv:te&&m(S.normalMap.channel),displacementMapUv:w&&m(S.displacementMap.channel),emissiveMapUv:E&&m(S.emissiveMap.channel),metalnessMapUv:F&&m(S.metalnessMap.channel),roughnessMapUv:z&&m(S.roughnessMap.channel),anisotropyMapUv:ue&&m(S.anisotropyMap.channel),clearcoatMapUv:re&&m(S.clearcoatMap.channel),clearcoatNormalMapUv:fe&&m(S.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ye&&m(S.clearcoatRoughnessMap.channel),iridescenceMapUv:xe&&m(S.iridescenceMap.channel),iridescenceThicknessMapUv:_e&&m(S.iridescenceThicknessMap.channel),sheenColorMapUv:Ie&&m(S.sheenColorMap.channel),sheenRoughnessMapUv:Le&&m(S.sheenRoughnessMap.channel),specularMapUv:je&&m(S.specularMap.channel),specularColorMapUv:$e&&m(S.specularColorMap.channel),specularIntensityMapUv:We&&m(S.specularIntensityMap.channel),transmissionMapUv:Me&&m(S.transmissionMap.channel),thicknessMapUv:N&&m(S.thicknessMap.channel),alphaMapUv:pe&&m(S.alphaMap.channel),vertexTangents:!!$.attributes.tangent&&(te||j),vertexColors:S.vertexColors,vertexAlphas:S.vertexColors===!0&&!!$.attributes.color&&$.attributes.color.itemSize===4,pointsUvs:L.isPoints===!0&&!!$.attributes.uv&&(he||pe),fog:!!V,useFog:S.fog===!0,fogExp2:!!V&&V.isFogExp2,flatShading:S.flatShading===!0,sizeAttenuation:S.sizeAttenuation===!0,logarithmicDepthBuffer:f,skinning:L.isSkinnedMesh===!0,morphTargets:$.morphAttributes.position!==void 0,morphNormals:$.morphAttributes.normal!==void 0,morphColors:$.morphAttributes.color!==void 0,morphTargetsCount:me,morphTextureStride:Ee,numDirLights:M.directional.length,numPointLights:M.point.length,numSpotLights:M.spot.length,numSpotLightMaps:M.spotLightMap.length,numRectAreaLights:M.rectArea.length,numHemiLights:M.hemi.length,numDirLightShadows:M.directionalShadowMap.length,numPointLightShadows:M.pointShadowMap.length,numSpotLightShadows:M.spotShadowMap.length,numSpotLightShadowsWithMaps:M.numSpotLightShadowsWithMaps,numLightProbes:M.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:S.dithering,shadowMapEnabled:n.shadowMap.enabled&&O.length>0,shadowMapType:n.shadowMap.type,toneMapping:ht,useLegacyLights:n._useLegacyLights,decodeVideoTexture:he&&S.map.isVideoTexture===!0&&Je.getTransfer(S.map.colorSpace)===ft,premultipliedAlpha:S.premultipliedAlpha,doubleSided:S.side===xi,flipSided:S.side===bn,useDepthPacking:S.depthPacking>=0,depthPacking:S.depthPacking||0,index0AttributeName:S.index0AttributeName,extensionCl
vendor: 165,676 bytes, lines 3771-3823
3771ipCullDistance:lt&&S.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:lt&&S.extensions.multiDraw===!0&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:S.customProgramCacheKey()};return _t.vertexUv1s=c.has(1),_t.vertexUv2s=c.has(2),_t.vertexUv3s=c.has(3),c.clear(),_t}function g(S){const M=[];if(S.shaderID?M.push(S.shaderID):(M.push(S.customVertexShaderID),M.push(S.customFragmentShaderID)),S.defines!==void 0)for(const O in S.defines)M.push(O),M.push(S.defines[O]);return S.isRawShaderMaterial===!1&&(x(M,S),v(M,S),M.push(n.outputColorSpace)),M.push(S.customProgramCacheKey),M.join()}function x(S,M){S.push(M.precision),S.push(M.outputColorSpace),S.push(M.envMapMode),S.push(M.envMapCubeUVHeight),S.push(M.mapUv),S.push(M.alphaMapUv),S.push(M.lightMapUv),S.push(M.aoMapUv),S.push(M.bumpMapUv),S.push(M.normalMapUv),S.push(M.displacementMapUv),S.push(M.emissiveMapUv),S.push(M.metalnessMapUv),S.push(M.roughnessMapUv),S.push(M.anisotropyMapUv),S.push(M.clearcoatMapUv),S.push(M.clearcoatNormalMapUv),S.push(M.clearcoatRoughnessMapUv),S.push(M.iridescenceMapUv),S.push(M.iridescenceThicknessMapUv),S.push(M.sheenColorMapUv),S.push(M.sheenRoughnessMapUv),S.push(M.specularMapUv),S.push(M.specularColorMapUv),S.push(M.specularIntensityMapUv),S.push(M.transmissionMapUv),S.push(M.thicknessMapUv),S.push(M.combine),S.push(M.fogExp2),S.push(M.sizeAttenuation),S.push(M.morphTargetsCount),S.push(M.morphAttributeCount),S.push(M.numDirLights),S.push(M.numPointLights),S.push(M.numSpotLights),S.push(M.numSpotLightMaps),S.push(M.numHemiLights),S.push(M.numRectAreaLights),S.push(M.numDirLightShadows),S.push(M.numPointLightShadows),S.push(M.numSpotLightShadows),S.push(M.numSpotLightShadowsWithMaps),S.push(M.numLightProbes),S.push(M.shadowMapType),S.push(M.toneMapping),S.push(M.numClippingPlanes),S.push(M.numClipIntersection),S.push(M.depthPacking)}function v(S,M){a.disableAll(),M.supportsVertexTextures&&a.enable(0),M.instancing&&a.enable(1),M.instancingColor&&a.enable(2),M.instancingMorph&&a.enable(3),M.matcap&&a.enable(4),M.envMap&&a.enable(5),M.normalMapObjectSpace&&a.enable(6),M.normalMapTangentSpace&&a.enable(7),M.clearcoat&&a.enable(8),M.iridescence&&a.enable(9),M.alphaTest&&a.enable(10),M.vertexColors&&a.enable(11),M.vertexAlphas&&a.enable(12),M.vertexUv1s&&a.enable(13),M.vertexUv2s&&a.enable(14),M.vertexUv3s&&a.enable(15),M.vertexTangents&&a.enable(16),M.anisotropy&&a.enable(17),M.alphaHash&&a.enable(18),M.batching&&a.enable(19),S.push(a.mask),a.disableAll(),M.fog&&a.enable(0),M.useFog&&a.enable(1),M.flatShading&&a.enable(2),M.logarithmicDepthBuffer&&a.enable(3),M.skinning&&a.enable(4),M.morphTargets&&a.enable(5),M.morphNormals&&a.enable(6),M.morphColors&&a.enable(7),M.premultipliedAlpha&&a.enable(8),M.shadowMapEnabled&&a.enable(9),M.useLegacyLights&&a.enable(10),M.doubleSided&&a.enable(11),M.flipSided&&a.enable(12),M.useDepthPacking&&a.enable(13),M.dithering&&a.enable(14),M.transmission&&a.enable(15),M.sheen&&a.enable(16),M.opaque&&a.enable(17),M.pointsUvs&&a.enable(18),M.decodeVideoTexture&&a.enable(19),M.alphaToCoverage&&a.enable(20),S.push(a.mask)}function y(S){const M=_[S.type];let O;if(M){const I=yi[M];O=W1.clone(I.uniforms)}else O=S.uniforms;return O}function T(S,M){let O;for(let I=0,L=u.length;I<L;I++){const V=u[I];if(V.cacheKey===M){O=V,++O.usedTimes;break}}return O===void 0&&(O=new iN(n,M,S,s),u.push(O)),O}function b(S){if(--S.usedTimes===0){const M=u.indexOf(S);u[M]=u[u.length-1],u.pop(),S.destroy()}}function A(S){l.remove(S)}function P(){l.dispose()}return{getParameters:p,getProgramCacheKey:g,getUniforms:y,acquireProgram:T,releaseProgram:b,releaseShaderCache:A,programs:u,dispose:P}}function lN(){let n=new WeakMap;function e(s){let o=n.get(s);return o===void 0&&(o={},n.set(s,o)),o}function t(s){n.delete(s)}function i(s,o,a){n.get(s)[o]=a}function r(){n=new WeakMap}return{get:e,remove:t,update:i,dispose:r}}function cN(n,e){return n.groupOrder!==e.groupOrder?n.groupOrder-e.groupOrder:n.renderOrder!==e.renderOrder?n.renderOrder-e.renderOrder:n.material.id!==e.material.id?n.material.id-e.material.id:n.z!==e.z?n.z-e.z:n.id-e.id}function Yg(n,e){return n.groupOrder!==e.groupOrder?n.groupOrder-e.groupOrder:n.renderOrder!==e.renderOrder?n.renderOrder-e.renderOrder:n.z!==e.z?e.z-n.z:n.id-e.id}function Zg(){const n=[];let e=0;const t=[],i=[],r=[];function s(){e=0,t.length=0,i.length=0,r.length=0}function o(f,h,d,_,m,p){let g=n[e];return g===void 0?(g={id:f.id,object:f,geometry:h,material:d,groupOrder:_,renderOrder:f.renderOrder,z:m,group:p},n[e]=g):(g.id=f.id,g.object=f,g.geometry=h,g.material=d,g.groupOrder=_,g.renderOrder=f.renderOrder,g.z=m,g.group=p),e++,g}function a(f,h,d,_,m,p){const g=o(f,h,d,_,m,p);d.transmission>0?i.push(g):d.transparent===!0?r.push(g):t.push(g)}function l(f,h,d,_,m,p){const g=o(f,h,d,_,m,p);d.transmission>0?i.unshift(g):d.transparent===!0?r.unshift(g):t.unshift(g)}function c(f,h){t.length>1&&t.sort(f||cN),i.length>1&&i.sort(h||Yg),r.length>1&&r.sort(h||Yg)}function u(){for(let f=e,h=n.length;f<h;f++){const d=n[f];if(d.id===null)break;d.id=null,d.object=null,d.geometry=null,d.material=null,d.group=null}}return{opaque:t,transmissive:i,transparent:r,init:s,push:a,unshift:l,finish:u,sort:c}}function uN(){let n=new WeakMap;function e(i,r){const s=n.get(i);let o;return s===void 0?(o=new Zg,n.set(i,[o])):r>=s.length?(o=new Zg,s.push(o)):o=s[r],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function fN(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new X,color:new Ne};break;case"SpotLight":t={position:new X,direction:new X,color:new Ne,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new X,color:new Ne,distance:0,decay:0};break;case"HemisphereLight":t={direction:new X,skyColor:new Ne,groundColor:new Ne};break;case"RectAreaLight":t={color:new Ne,position:new X,halfWidth:new X,halfHeight:new X};break}return n[e.id]=t,t}}}function hN(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ge};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ge};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ge,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let dN=0;function pN(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function mN(n){const e=new fN,t=hN(),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 X);const r=new X,s=new Be,o=new Be;function a(c,u){let f=0,h=0,d=0;for(let O=0;O<9;O++)i.probe[O].set(0,0,0);let _=0,m=0,p=0,g=0,x=0,v=0,y=0,T=0,b=0,A=0,P=0;c.sort(pN);const S=u===!0?Math.PI:1;for(let O=0,I=c.length;O<I;O++){const L=c[O],V=L.color,$=L.intensity,G=L.distance,J=L.shadow&&L.shadow.map?L.shadow.map.texture:null;if(L.isAmbientLight)f+=V.r*$*S,h+=V.g*$*S,d+=V.b*$*S;else if(L.isLightProbe){for(let U=0;U<9;U++)i.probe[U].addScaledVector(L.sh.coefficients[U],$);P++}else if(L.isDirectionalLight){const U=e.get(L);if(U.color.copy(L.color).multiplyScalar(L.intensity*S),L.castShadow){const ne=L.shadow,ae=t.get(L);ae.shadowBias=ne.bias,ae.shadowNormalBias=ne.normalBias,ae.shadowRadius=ne.radius,ae.shadowMapSize=ne.mapSize,i.directionalShadow[_]=ae,i.directionalShadowMap[_]=J,i.directionalShadowMatrix[_]=L.shadow.matrix,v++}i.directional[_]=U,_++}else if(L.isSpotLight){const U=e.get(L);U.position.setFromMatrixPosition(L.matrixWorld),U.color.copy(V).multiplyScalar($*S),U.distance=G,U.coneCos=Math.cos(L.angle),U.penumbraCos=Math.cos(L.angle*(1-L.penumbra)),U.decay=L.decay,i.spot[p]=U;const ne=L.shadow;if(L.map&&(i.spotLightMap[b]=L.map,b++,ne.updateMatrices(L),L.castShadow&&A++),i.spotLightMatrix[p]=ne.matrix,L.castShadow){const ae=t.get(L);ae.shadowBias=ne.bias,ae.shadowNormalBias=ne.normalBias,ae.shadowRadius=ne.radius,ae.shadowMapSize=ne.mapSize,i.spotShadow[p]=ae,i.spotShadowMap[p]=J,T++}p++}else if(L.isRectAreaLight){const U=e.get(L);U.color.copy(V).multiplyScalar($),U.halfWidth.set(L.width*.5,0,0),U.halfHeight.set(0,L.height*.5,0),i.rectArea[g]=U,g++}else if(L.isPointLight){const U=e.get(L);if(U.color.copy(L.color).multiplyScalar(L.intensity*S),U.distance=L.distance,U.decay=L.decay,L.castShadow){const ne=L.shadow,ae=t.get(L);ae.shadowBias=ne.bias,ae.shadowNormalBias=ne.normalBias,ae.shadowRadius=ne.radius,ae.shadowMapSize=ne.mapSize,ae.shadowCameraNear=ne.camera.near,ae.shadowCameraFar=ne.camera.far,i.pointShadow[m]=ae,i.pointShadowMap[m]=J,i.pointShadowMatrix[m]=L.shadow.matrix,y++}i.point[m]=U,m++}else if(L.isHemisphereLight){const U=e.get(L);U.skyColor.copy(L.color).multiplyScalar($*S),U.groundColor.copy(L.groundColor).multiplyScalar($*S),i.hemi[x]=U,x++}}g>0&&(n.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=ge.LTC_FLOAT_1,i.rectAreaLTC2=ge.LTC_FLOAT_2):(i.rectAreaLTC1=ge.LTC_HALF_1,i.rectAreaLTC2=ge.LTC_HALF_2)),i.ambient[0]=f,i.ambient[1]=h,i.ambient[2]=d;const M=i.hash;(M.directionalLength!==_||M.pointLength!==m||M.spotLength!==p||M.rectAreaLength!==g||M.hemiLength!==x||M.numDirectionalShadows!==v||M.numPointShadows!==y||M.numSpotShadows!==T||M.numSpotMaps!==b||M.numLightProbes!==P)&&(i.directional.length=_,i.spot.length=p,i.rectArea.length=g,i.point.length=m,i.hemi.length=x,i.directionalShadow.length=v,i.directionalShadowMap.length=v,i.pointShadow.length=y,i.pointShadowMap.length=y,i.spotShadow.length=T,i.spotShadowMap.length=T,i.directionalShadowMatrix.length=v,i.pointShadowMatrix.length=y,i.spotLightMatrix.length=T+b-A,i.spotLightMap.length=b,i.numSpotLightShadowsWithMaps=A,i.numLightProbes=P,M.directionalLength=_,M.pointLength=m,M.spotLength=p,M.rectAreaLength=g,M.hemiLength=x,M.numDirectionalShadows=v,M.numPointShadows=y,M.numSpotShadows=T,M.numSpotMaps=b,M.numLightProbes=P,i.version=dN++)}function l(c,u){let f=0,h=0,d=0,_=0,m=0;const p=u.matrixWorldInverse;for(let g=0,x=c.length;g<x;g++){const v=c[g];if(v.isDirectionalLight){const y=i.directional[f];y.direction.setFromMatrixPosition(v.matrixWorld),r.setFromMatrixPosition(v.target.matrixWorld),y.direction.sub(r),y.direction.transformDirection(p),f++}else if(v.isSpotLight){const y=i.spot[d];y.position.setFromMatrixPosition(v.matrixWorld),y.position.applyMatrix4(p),y.direction.setFromMatrixPosition(v.matrixWorld),r.setFromMatrixPosition(v.target.matrixWorld),y.direction.sub(r),y.direction.transformDirection(p),d++}else if(v.isRectAreaLight){const y=i.rectArea[_];y.position.setFromMatrixPosition(v.matrixWorld),y.position.applyMatrix4(p),o.identity(),s.copy(v.matrixWorld),s.premultiply(p),o.extractRotation(s),y.halfWidth.set(v.width*.5,0,0),y.halfHeight.set(0,v.height*.5,0),y.halfWidth.applyMatrix4(o),y.halfHeight.applyMatrix4(o),_++}else if(v.isPointLight){const y=i.point[h];y.position.setFromMatrixPosition(v.matrixWorld),y.position.applyMatrix4(p),h++}else if(v.isHemisphereLight){const y=i.hemi[m];y.direction.setFromMatrixPosition(v.matrixWorld),y.direction.transformDirection(p),m++}}}return{setup:a,setupView:l,state:i}}function Jg(n){const e=new mN(n),t=[],i=[];function r(){t.length=0,i.length=0}function s(u){t.push(u)}function o(u){i.push(u)}function a(u){e.setup(t,u)}function l(u){e.setupView(t,u)}return{init:r,state:{lightsArray:t,shadowsArray:i,lights:e,transmissionRenderTarget:null},setupLights:a,setupLightsView:l,pushLight:s,pushShadow:o}}function gN(n){let e=new WeakMap;function t(r,s=0){const o=e.get(r);let a;return o===void 0?(a=new Jg(n),e.set(r,[a])):s>=o.length?(a=new Jg(n),o.push(a)):a=o[s],a}function i(){e=new WeakMap}return{get:t,dispose:i}}class _N extends fi{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=e1,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 vN extends fi{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 yN=`void main() { 3772 gl_Position = vec4( position, 1.0 ); 3773}`,xN=`uniform sampler2D shadow_pass; 3774uniform vec2 resolution; 3775uniform float radius; 3776#include <packing> 3777void main() { 3778 const float samples = float( VSM_SAMPLES ); 3779 float mean = 0.0; 3780 float squared_mean = 0.0; 3781 float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); 3782 float uvStart = samples <= 1.0 ? 0.0 : - 1.0; 3783 for ( float i = 0.0; i < samples; i ++ ) { 3784 float uvOffset = uvStart + i * uvStride; 3785 #ifdef HORIZONTAL_PASS 3786 vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); 3787 mean += distribution.x; 3788 squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; 3789 #else 3790 float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); 3791 mean += depth; 3792 squared_mean += depth * depth; 3793 #endif 3794 } 3795 mean = mean / samples; 3796 squared_mean = squared_mean / samples; 3797 float std_dev = sqrt( squared_mean - mean * mean ); 3798 gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); 3799}`;function SN(n,e,t){let i=new Pd;const r=new Ge,s=new Ge,o=new st,a=new _N({depthPacking:t1}),l=new vN,c={},u=t.maxTextureSize,f={[sr]:bn,[bn]:sr,[xi]:xi},h=new Vr({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ge},radius:{value:4}},vertexShader:yN,fragmentShader:xN}),d=h.clone();d.defines.HORIZONTAL_PASS=1;const _=new ni;_.setAttribute("position",new xn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const m=new kn(_,h),p=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Sy;let g=this.type;this.render=function(b,A,P){if(p.enabled===!1||p.autoUpdate===!1&&p.needsUpdate===!1||b.length===0)return;const S=n.getRenderTarget(),M=n.getActiveCubeFace(),O=n.getActiveMipmapLevel(),I=n.state;I.setBlending(Fr),I.buffers.color.setClear(1,1,1,1),I.buffers.depth.setTest(!0),I.setScissorTest(!1);const L=g!==Gi&&this.type===Gi,V=g===Gi&&this.type!==Gi;for(let $=0,G=b.length;$<G;$++){const J=b[$],U=J.shadow;if(U===void 0){console.warn("THREE.WebGLShadowMap:",J,"has no shadow.");continue}if(U.autoUpdate===!1&&U.needsUpdate===!1)continue;r.copy(U.mapSize);const ne=U.getFrameExtents();if(r.multiply(ne),s.copy(U.mapSize),(r.x>u||r.y>u)&&(r.x>u&&(s.x=Math.floor(u/ne.x),r.x=s.x*ne.x,U.mapSize.x=s.x),r.y>u&&(s.y=Math.floor(u/ne.y),r.y=s.y*ne.y,U.mapSize.y=s.y)),U.map===null||L===!0||V===!0){const me=this.type!==Gi?{minFilter:yn,magFilter:yn}:{};U.map!==null&&U.map.dispose(),U.map=new Ds(r.x,r.y,me),U.map.texture.name=J.name+".shadowMap",U.camera.updateProjectionMatrix()}n.setRenderTarget(U.map),n.clear();const ae=U.getViewportCount();for(let me=0;me<ae;me++){const Ee=U.getViewport(me);o.set(s.x*Ee.x,s.y*Ee.y,s.x*Ee.z,s.y*Ee.w),I.viewport(o),U.updateMatrices(J,me),i=U.getFrustum(),y(A,P,U.camera,J,this.type)}U.isPointLightShadow!==!0&&this.type===Gi&&x(U,P),U.needsUpdate=!1}g=this.type,p.needsUpdate=!1,n.setRenderTarget(S,M,O)};function x(b,A){const P=e.update(m);h.defines.VSM_SAMPLES!==b.blurSamples&&(h.defines.VSM_SAMPLES=b.blurSamples,d.defines.VSM_SAMPLES=b.blurSamples,h.needsUpdate=!0,d.needsUpdate=!0),b.mapPass===null&&(b.mapPass=new Ds(r.x,r.y)),h.uniforms.shadow_pass.value=b.map.texture,h.uniforms.resolution.value=b.mapSize,h.uniforms.radius.value=b.radius,n.setRenderTarget(b.mapPass),n.clear(),n.renderBufferDirect(A,null,P,h,m,null),d.uniforms.shadow_pass.value=b.mapPass.texture,d.uniforms.resolution.value=b.mapSize,d.uniforms.radius.value=b.radius,n.setRenderTarget(b.map),n.clear(),n.renderBufferDirect(A,null,P,d,m,null)}function v(b,A,P,S){let M=null;const O=P.isPointLight===!0?b.customDistanceMaterial:b.customDepthMaterial;if(O!==void 0)M=O;else if(M=P.isPointLight===!0?l:a,n.localClippingEnabled&&A.clipShadows===!0&&Array.isArray(A.clippingPlanes)&&A.clippingPlanes.length!==0||A.displacementMap&&A.displacementScale!==0||A.alphaMap&&A.alphaTest>0||A.map&&A.alphaTest>0){const I=M.uuid,L=A.uuid;let V=c[I];V===void 0&&(V={},c[I]=V);let $=V[L];$===void 0&&($=M.clone(),V[L]=$,A.addEventListener("dispose",T)),M=$}if(M.visible=A.visible,M.wireframe=A.wireframe,S===Gi?M.side=A.shadowSide!==null?A.shadowSide:A.side:M.side=A.shadowSide!==null?A.shadowSide:f[A.side],M.alphaMap=A.alphaMap,M.alphaTest=A.alphaTest,M.map=A.map,M.clipShadows=A.clipShadows,M.clippingPlanes=A.clippingPlanes,M.clipIntersection=A.clipIntersection,M.displacementMap=A.displacementMap,M.displacementScale=A.displacementScale,M.displacementBias=A.displacementBias,M.wireframeLinewidth=A.wireframeLinewidth,M.linewidth=A.linewidth,P.isPointLight===!0&&M.isMeshDistanceMaterial===!0){const I=n.properties.get(M);I.light=P}return M}function y(b,A,P,S,M){if(b.visible===!1)return;if(b.layers.test(A.layers)&&(b.isMesh||b.isLine||b.isPoints)&&(b.castShadow||b.receiveShadow&&M===Gi)&&(!b.frustumCulled||i.intersectsObject(b))){b.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,b.matrixWorld);const L=e.update(b),V=b.material;if(Array.isArray(V)){const $=L.groups;for(let G=0,J=$.length;G<J;G++){const U=$[G],ne=V[U.materialIndex];if(ne&&ne.visible){const ae=v(b,ne,S,M);b.onBeforeShadow(n,b,A,P,L,ae,U),n.renderBufferDirect(P,null,L,ae,b,U),b.onAfterShadow(n,b,A,P,L,ae,U)}}}else if(V.visible){const $=v(b,V,S,M);b.onBeforeShadow(n,b,A,P,L,$,null),n.renderBufferDirect(P,null,L,$,b,null),b.onAfterShadow(n,b,A,P,L,$,null)}}const I=b.children;for(let L=0,V=I.length;L<V;L++)y(I[L],A,P,S,M)}function T(b){b.target.removeEventListener("dispose",T);for(const P in c){const S=c[P],M=b.target.uuid;M in S&&(S[M].dispose(),delete S[M])}}}function MN(n){function e(){let N=!1;const de=new st;let pe=null;const Ae=new st(0,0,0,0);return{setMask:function(we){pe!==we&&!N&&(n.colorMask(we,we,we,we),pe=we)},setLocked:function(we){N=we},setClear:function(we,lt,ht,_t,Qt){Qt===!0&&(we*=_t,lt*=_t,ht*=_t),de.set(we,lt,ht,_t),Ae.equals(de)===!1&&(n.clearColor(we,lt,ht,_t),Ae.copy(de))},reset:function(){N=!1,pe=null,Ae.set(-1,0,0,0)}}}function t(){let N=!1,de=null,pe=null,Ae=null;return{setTest:function(we){we?ve(n.DEPTH_TEST):W(n.DEPTH_TEST)},setMask:function(we){de!==we&&!N&&(n.depthMask(we),de=we)},setFunc:function(we){if(pe!==we){switch(we){case AC:n.depthFunc(n.NEVER);break;case wC:n.depthFunc(n.ALWAYS);break;case RC:n.depthFunc(n.LESS);break;case Lc:n.depthFunc(n.LEQUAL);break;case CC:n.depthFunc(n.EQUAL);break;case PC:n.depthFunc(n.GEQUAL);break;case LC:n.depthFunc(n.GREATER);break;case IC:n.depthFunc(n.NOTEQUAL);break;default:n.depthFunc(n.LEQUAL)}pe=we}},setLocked:function(we){N=we},setClear:function(we){Ae!==we&&(n.clearDepth(we),Ae=we)},reset:function(){N=!1,de=null,pe=null,Ae=null}}}function i(){let N=!1,de=null,pe=null,Ae=null,we=null,lt=null,ht=null,_t=null,Qt=null;return{setTest:function(ut){N||(ut?ve(n.STENCIL_TEST):W(n.STENCIL_TEST))},setMask:function(ut){de!==ut&&!N&&(n.stencilMask(ut),de=ut)},setFunc:function(ut,pi,mi){(pe!==ut||Ae!==pi||we!==mi)&&(n.stencilFunc(ut,pi,mi),pe=ut,Ae=pi,we=mi)},setOp:function(ut,pi,mi){(lt!==ut||ht!==pi||_t!==mi)&&(n.stencilOp(ut,pi,mi),lt=ut,ht=pi,_t=mi)},setLocked:function(ut){N=ut},setClear:function(ut){Qt!==ut&&(n.clearStencil(ut),Qt=ut)},reset:function(){N=!1,de=null,pe=null,Ae=null,we=null,lt=null,ht=null,_t=null,Qt=null}}}const r=new e,s=new t,o=new i,a=new WeakMap,l=new WeakMap;let c={},u={},f=new WeakMap,h=[],d=null,_=!1,m=null,p=null,g=null,x=null,v=null,y=null,T=null,b=new Ne(0,0,0),A=0,P=!1,S=null,M=null,O=null,I=null,L=null;const V=n.getParameter(n.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let $=!1,G=0;const J=n.getParameter(n.VERSION);J.indexOf("WebGL")!==-1?(G=parseFloat(/^WebGL (\d)/.exec(J)[1]),$=G>=1):J.indexOf("OpenGL ES")!==-1&&(G=parseFloat(/^OpenGL ES (\d)/.exec(J)[1]),$=G>=2);let U=null,ne={};const ae=n.getParameter(n.SCISSOR_BOX),me=n.getParameter(n.VIEWPORT),Ee=new st().fromArray(ae),Ue=new st().fromArray(me);function Q(N,de,pe,Ae){const we=new Uint8Array(4),lt=n.createTexture();n.bindTexture(N,lt),n.texParameteri(N,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(N,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let ht=0;ht<pe;ht++)N===n.TEXTURE_3D||N===n.TEXTURE_2D_ARRAY?n.texImage3D(de,0,n.RGBA,1,1,Ae,0,n.RGBA,n.UNSIGNED_BYTE,we):n.texImage2D(de+ht,0,n.RGBA,1,1,0,n.RGBA,n.UNSIGNED_BYTE,we);return lt}const le={};le[n.TEXTURE_2D]=Q(n.TEXTURE_2D,n.TEXTURE_2D,1),le[n.TEXTURE_CUBE_MAP]=Q(n.TEXTURE_CUBE_MAP,n.TEXTURE_CUBE_MAP_POSITIVE_X,6),le[n.TEXTURE_2D_ARRAY]=Q(n.TEXTURE_2D_ARRAY,n.TEXTURE_2D_ARRAY,1,1),le[n.TEXTURE_3D]=Q(n.TEXTURE_3D,n.TEXTURE_3D,1,1),r.setClear(0,0,0,1),s.setClear(1),o.setClear(0),ve(n.DEPTH_TEST),s.setFunc(Lc),k(!1),te(Pm),ve(n.CULL_FACE),R(Fr);function ve(N){c[N]!==!0&&(n.enable(N),c[N]=!0)}function W(N){c[N]!==!1&&(n.disable(N),c[N]=!1)}function oe(N,de){return u[N]!==de?(n.bindFramebuffer(N,de),u[N]=de,N===n.DRAW_FRAMEBUFFER&&(u[n.FRAMEBUFFER]=de),N===n.FRAMEBUFFER&&(u[n.DRAW_FRAMEBUFFER]=de),!0):!1}function ie(N,de){let pe=h,Ae=!1;if(N){pe=f.get(de),pe===void 0&&(pe=[],f.set(de,pe));const we=N.textures;if(pe.length!==we.length||pe[0]!==n.COLOR_ATTACHMENT0){for(let lt=0,ht=we.length;lt<ht;lt++)pe[lt]=n.COLOR_ATTACHMENT0+lt;pe.length=we.length,Ae=!0}}else pe[0]!==n.BACK&&(pe[0]=n.BACK,Ae=!0);Ae&&n.drawBuffers(pe)}function he(N){return d!==N?(n.useProgram(N),d=N,!0):!1}const H={[ms]:n.FUNC_ADD,[cC]:n.FUNC_SUBTRACT,[uC]:n.FUNC_REVERSE_SUBTRACT};H[fC]=n.MIN,H[hC]=n.MAX;const Te={[dC]:n.ZERO,[pC]:n.ONE,[mC]:n.SRC_COLOR,[vh]:n.SRC_ALPHA,[SC]:n.SRC_ALPHA_SATURATE,[yC]:n.DST_COLOR,[_C]:n.DST_ALPHA,[gC]:n.ONE_MINUS_SRC_COLOR,[yh]:n.ONE_MINUS_SRC_ALPHA,[xC]:n.ONE_MINUS_DST_COLOR,[vC]:n.ONE_MINUS_DST_ALPHA,[MC]:n.CONSTANT_COLOR,[TC]:n.ONE_MINUS_CONSTANT_COLOR,[EC]:n.CONSTANT_ALPHA,[bC]:n.ONE_MINUS_CONSTANT_ALPHA};function R(N,de,pe,Ae,we,lt,ht,_t,Qt,ut){if(N===Fr){_===!0&&(W(n.BLEND),_=!1);return}if(_===!1&&(ve(n.BLEND),_=!0),N!==lC){if(N!==m||ut!==P){if((p!==ms||v!==ms)&&(n.blendEquation(n.FUNC_ADD),p=ms,v=ms),ut)switch(N){case So:n.blendFuncSeparate(n.ONE,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA);break;case Lm:n.blendFunc(n.ONE,n.ONE);break;case Im:n.blendFuncSeparate(n.ZERO,n.ONE_MINUS_SRC_COLOR,n.ZERO,n.ONE);break;case Dm:n.blendFuncSeparate(n.ZERO,n.SRC_COLOR,n.ZERO,n.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",N);break}else switch(N){case So:n.blendFuncSeparate(n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA);break;case Lm:n.blendFunc(n.SRC_ALPHA,n.ONE);break;case Im:n.blendFuncSeparate(n.ZERO,n.ONE_MINUS_SRC_COLOR,n.ZERO,n.ONE);break;case Dm:n.blendFunc(n.ZERO,n.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",N);break}g=null,x=null,y=null,T=null,b.set(0,0,0),A=0,m=N,P=ut}return}we=we||de,lt=lt||pe,ht=ht||Ae,(de!==p||we!==v)&&(n.blendEquationSeparate(H[de],H[we]),p=de,v=we),(pe!==g||Ae!==x||lt!==y||ht!==T)&&(n.blendFuncSeparate(Te[pe],Te[Ae],Te[lt],Te[ht]),g=pe,x=Ae,y=lt,T=ht),(_t.equals(b)===!1||Qt!==A)&&(n.blendColor(_t.r,_t.g,_t.b,Qt),b.copy(_t),A=Qt),m=N,P=!1}function D(N,de){N.side===xi?W(n.CULL_FACE):ve(n.CULL_FACE);let pe=N.side===bn;de&&(pe=!pe),k(pe),N.blending===So&&N.transparent===!1?R(Fr):R(N.blending,N.blendEquation,N.blendSrc,N.blendDst,N.blendEquationAlpha,N.blendSrcAlpha,N.blendDstAlpha,N.blendColor,N.blendAlpha,N.premultipliedAlpha),s.setFunc(N.depthFunc),s.setTest(N.depthTest),s.setMask(N.depthWrite),r.setMask(N.colorWrite);const Ae=N.stencilWrite;o.setTest(Ae),Ae&&(o.setMask(N.stencilWriteMask),o.setFunc(N.stencilFunc,N.stencilRef,N.stencilFuncMask),o.setOp(N.stencilFail,N.stencilZFail,N.stencilZPass)),E(N.polygonOffset,N.polygonOffsetFactor,N.polygonOffsetUnits),N.alphaToCoverage===!0?ve(n.SAMPLE_ALPHA_TO_COVERAGE):W(n.SAMPLE_ALPHA_TO_COVERAGE)}function k(N){S!==N&&(N?n.frontFace(n.CW):n.frontFace(n.CCW),S=N)}function te(N){N!==oC?(ve(n.CULL_FACE),N!==M&&(N===Pm?n.cullFace(n.BACK):N===aC?n.cullFace(n.FRONT):n.cullFace(n.FRONT_AND_BACK))):W(n.CULL_FACE),M=N}function w(N){N!==O&&($&&n.lineWidth(N),O=N)}function E(N,de,pe){N?(ve(n.POLYGON_OFFSET_FILL),(I!==de||L!==pe)&&(n.polygonOffset(de,pe),I=de,L=pe)):W(n.POLYGON_OFFSET_FILL)}function F(N){N?ve(n.SCISSOR_TEST):W(n.SCISSOR_TEST)}function z(N){N===void 0&&(N=n.TEXTURE0+V-1),U!==N&&(n.activeTexture(N),U=N)}function j(N,de,pe){pe===void 0&&(U===null?pe=n.TEXTURE0+V-1:pe=U);let Ae=ne[pe];Ae===void 0&&(Ae={type:void 0,texture:void 0},ne[pe]=Ae),(Ae.type!==N||Ae.texture!==de)&&(U!==pe&&(n.activeTexture(pe),U=pe),n.bindTexture(N,de||le[N]),Ae.type=N,Ae.texture=de)}function B(){const N=ne[U];N!==void 0&&N.type!==void 0&&(n.bindTexture(N.type,null),N.type=void 0,N.texture=void 0)}function ce(){try{n.compressedTexImage2D.apply(n,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function K(){try{n.compressedTexImage3D.apply(n,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function se(){try{n.texSubImage2D.apply(n,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function ue(){try{n.texSubImage3D.apply(n,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function re(){try{n.compressedTexSubImage2D.apply(n,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function fe(){try{n.compressedTexSubImage3D.apply(n,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function ye(){try{n.texStorage2D.apply(n,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function xe(){try{n.texStorage3D.apply(n,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function _e(){try{n.texImage2D.apply(n,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function Ie(){try{n.texImage3D.apply(n,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function Le(N){Ee.equals(N)===!1&&(n.scissor(N.x,N.y,N.z,N.w),Ee.copy(N))}function je(N){Ue.equals(N)===!1&&(n.viewport(N.x,N.y,N.z,N.w),Ue.copy(N))}function $e(N,de){let pe=l.get(de);pe===void 0&&(pe=new WeakMap,l.set(de,pe));let Ae=pe.get(N);Ae===void 0&&(Ae=n.getUniformBlockIndex(de,N.name),pe.set(N,Ae))}function We(N,de){const Ae=l.get(de).get(N);a.get(de)!==Ae&&(n.uniformBlockBinding(de,Ae,N.__bindingPointIndex),a.set(de,Ae))}function Me(){n.disable(n.BLEND),n.disable(n.CULL_FACE),n.disable(n.DEPTH_TEST),n.disable(n.POLYGON_OFFSET_FILL),n.disable(n.SCISSOR_TEST),n.disable(n.STENCIL_TEST),n.disable(n.SAMPLE_ALPHA_TO_COVERAGE),n.blendEquation(n.FUNC_ADD),n.blendFunc(n.ONE,n.ZERO),n.blendFuncSeparate(n.ONE,n.ZERO,n.ONE,n.ZERO),n.blendColor(0,0,0,0),n.colorMask(!0,!0,!0,!0),n.clearColor(0,0,0,0),n.depthMask(!0),n.depthFunc(n.LESS),n.clearDepth(1),n.stencilMask(4294967295),n.stencilFunc(n.ALWAYS,0,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),n.clearStencil(0),n.cullFace(n.BACK),n.frontFace(n.CCW),n.polygonOffset(0,0),n.activeTexture(n.TEXTURE0),n.bindFramebuffer(n.FRAMEBUFFER,null),n.bindFramebuffer(n.DRAW_FRAMEBUFFER,null),n.bindFramebuffer(n.READ_FRAMEBUFFER,null),n.useProgram(null),n.lineWidth(1),n.scissor(0,0,n.canvas.width,n.canvas.height),n.viewport(0,0,n.canvas.width,n.canvas.height),c={},U=null,ne={},u={},f=new WeakMap,h=[],d=null,_=!1,m=null,p=null,g=null,x=null,v=null,y=null,T=null,b=new Ne(0,0,0),A=0,P=!1,S=null,M=null,O=null,I=null,L=null,Ee.set(0,0,n.canvas.width,n.canvas.height),Ue.set(0,0,n.canvas.width,n.canvas.height),r.reset(),s.reset(),o.reset()}return{buffers:{color:r,depth:s,stencil:o},enable:ve,disable:W,bindFramebuffer:oe,drawBuffers:ie,useProgram:he,setBlending:R,setMaterial:D,setFlipSided:k,setCullFace:te,setLineWidth:w,setPolygonOffset:E,setScissorTest:F,activeTexture:z,bindTexture:j,unbindTexture:B,compressedTexImage2D:ce,compressedTexImage3D:K,texImage2D:_e,texImage3D:Ie,updateUBOMapping:$e,uniformBlockBinding:We,texStorage2D:ye,texStorage3D:xe,texSubImage2D:se,texSubImage3D:ue,compressedTexSubImage2D:re,compressedTexSubImage3D:fe,scissor:Le,viewport:je,reset:Me}}function TN(n,e,t,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 Ge,u=new WeakMap;let f;const h=new WeakMap;let d=!1;try{d=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function _(w,E){return d?new OffscreenCanvas(w,E):qa("canvas")}function m(w,E,F){let z=1;const j=te(w);if((j.width>F||j.height>F)&&(z=F/Math.max(j.width,j.height)),z<1)if(typeof HTMLImageElement<"u"&&w instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&w instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&w instanceof ImageBitmap||typeof VideoFrame<"u"&&w instanceof VideoFrame){const B=Math.floor(z*j.width),ce=Math.floor(z*j.height);f===void 0&&(f=_(B,ce));const K=E?_(B,ce):f;return K.width=B,K.height=ce,K.getContext("2d").drawImage(w,0,0,B,ce),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+j.width+"x"+j.height+") to ("+B+"x"+ce+")."),K}else return"data"in w&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+j.width+"x"+j.height+")."),w;return w}function p(w){return w.generateMipmaps&&w.minFilter!==yn&&w.minFilter!==_n}function g(w){n.generateMipmap(w)}function x(w,E,F,z,j=!1){if(w!==null){if(n[w]!==void 0)return n[w];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+w+"'")}let B=E;if(E===n.RED&&(F===n.FLOAT&&(B=n.R32F),F===n.HALF_FLOAT&&(B=n.R16F),F===n.UNSIGNED_BYTE&&(B=n.R8)),E===n.RED_INTEGER&&(F===n.UNSIGNED_BYTE&&(B=n.R8UI),F===n.UNSIGNED_SHORT&&(B=n.R16UI),F===n.UNSIGNED_INT&&(B=n.R32UI),F===n.BYTE&&(B=n.R8I),F===n.SHORT&&(B=n.R16I),F===n.INT&&(B=n.R32I)),E===n.RG&&(F===n.FLOAT&&(B=n.RG32F),F===n.HALF_FLOAT&&(B=n.RG16F),F===n.UNSIGNED_BYTE&&(B=n.RG8)),E===n.RG_INTEGER&&(F===n.UNSIGNED_BYTE&&(B=n.RG8UI),F===n.UNSIGNED_SHORT&&(B=n.RG16UI),F===n.UNSIGNED_INT&&(B=n.RG32UI),F===n.BYTE&&(B=n.RG8I),F===n.SHORT&&(B=n.RG16I),F===n.INT&&(B=n.RG32I)),E===n.RGB&&F===n.UNSIGNED_INT_5_9_9_9_REV&&(B=n.RGB9_E5),E===n.RGBA){const ce=j?Nc:Je.getTransfer(z);F===n.FLOAT&&(B=n.RGBA32F),F===n.HALF_FLOAT&&(B=n.RGBA16F),F===n.UNSIGNED_BYTE&&(B=ce===ft?n.SRGB8_ALPHA8:n.RGBA8),F===n.UNSIGNED_SHORT_4_4_4_4&&(B=n.RGBA4),F===n.UNSIGNED_SHORT_5_5_5_1&&(B=n.RGB5_A1)}return(B===n.R16F||B===n.R32F||B===n.RG16F||B===n.RG32F||B===n.RGBA16F||B===n.RGBA32F)&&e.get("EXT_color_buffer_float"),B}function v(w,E){return p(w)===!0||w.isFramebufferTexture&&w.minFilter!==yn&&w.minFilter!==_n?Math.log2(Math.max(E.width,E.height))+1:w.mipmaps!==void 0&&w.mipmaps.length>0?w.mipmaps.length:w.isCompressedTexture&&Array.isArray(w.image)?E.mipmaps.length:1}function y(w){const E=w.target;E.removeEventListener("dispose",y),b(E),E.isVideoTexture&&u.delete(E)}function T(w){const E=w.target;E.removeEventListener("dispose",T),P(E)}function b(w){const E=i.get(w);if(E.__webglInit===void 0)return;const F=w.source,z=h.get(F);if(z){const j=z[E.__cacheKey];j.usedTimes--,j.usedTimes===0&&A(w),Object.keys(z).length===0&&h.delete(F)}i.remove(w)}function A(w){const E=i.get(w);n.deleteTexture(E.__webglTexture);const F=w.source,z=h.get(F);delete z[E.__cacheKey],o.memory.textures--}function P(w){const E=i.get(w);if(w.depthTexture&&w.depthTexture.dispose(),w.isWebGLCubeRenderTarget)for(let z=0;z<6;z++){if(Array.isArray(E.__webglFramebuffer[z]))for(let j=0;j<E.__webglFramebuffer[z].length;j++)n.deleteFramebuffer(E.__webglFramebuffer[z][j]);else n.deleteFramebuffer(E.__webglFramebuffer[z]);E.__webglDepthbuffer&&n.deleteRenderbuffer(E.__webglDepthbuffer[z])}else{if(Array.isArray(E.__webglFramebuffer))for(let z=0;z<E.__webglFramebuffer.length;z++)n.deleteFramebuffer(E.__webglFramebuffer[z]);else n.deleteFramebuffer(E.__webglFramebuffer);if(E.__webglDepthbuffer&&n.deleteRenderbuffer(E.__webglDepthbuffer),E.__webglMultisampledFramebuffer&&n.deleteFramebuffer(E.__webglMultisampledFramebuffer),E.__webglColorRenderbuffer)for(let z=0;z<E.__webglColorRenderbuffer.length;z++)E.__webglColorRenderbuffer[z]&&n.deleteRenderbuffer(E.__webglColorRenderbuffer[z]);E.__webglDepthRenderbuffer&&n.deleteRenderbuffer(E.__webglDepthRenderbuffer)}const F=w.textures;for(let z=0,j=F.length;z<j;z++){const B=i.get(F[z]);B.__webglTexture&&(n.deleteTexture(B.__webglTexture),o.memory.textures--),i.remove(F[z])}i.remove(w)}let S=0;function M(){S=0}function O(){const w=S;return w>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+w+" texture units while this GPU supports only "+r.maxTextures),S+=1,w}function I(w){const E=[];return E.push(w.wrapS),E.push(w.wrapT),E.push(w.wrapR||0),E.push(w.magFilter),E.push(w.minFilter),E.push(w.anisotropy),E.push(w.internalFormat),E.push(w.format),E.push(w.type),E.push(w.generateMipmaps),E.push(w.premultiplyAlpha),E.push(w.flipY),E.push(w.unpackAlignment),E.push(w.colorSpace),E.join()}function L(w,E){const F=i.get(w);if(w.isVideoTexture&&D(w),w.isRenderTargetTexture===!1&&w.version>0&&F.__version!==w.version){const z=w.image;if(z===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(z.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Ee(F,w,E);return}}t.bindTexture(n.TEXTURE_2D,F.__webglTexture,n.TEXTURE0+E)}function V(w,E){const F=i.get(w);if(w.version>0&&F.__version!==w.version){Ee(F,w,E);return}t.bindTexture(n.TEXTURE_2D_ARRAY,F.__webglTexture,n.TEXTURE0+E)}function $(w,E){const F=i.get(w);if(w.version>0&&F.__version!==w.version){Ee(F,w,E);return}t.bindTexture(n.TEXTURE_3D,F.__webglTexture,n.TEXTURE0+E)}function G(w,E){const F=i.get(w);if(w.version>0&&F.__version!==w.version){Ue(F,w,E);return}t.bindTexture(n.TEXTURE_CUBE_MAP,F.__webglTexture,n.TEXTURE0+E)}const J={[Fo]:n.REPEAT,[Rr]:n.CLAMP_TO_EDGE,[Ic]:n.MIRRORED_REPEAT},U={[yn]:n.NEAREST,[by]:n.NEAREST_MIPMAP_NEAREST,[xa]:n.NEAREST_MIPMAP_LINEAR,[_n]:n.LINEAR,[oc]:n.LINEAR_MIPMAP_NEAREST,[Qi]:n.LINEAR_MIPMAP_LINEAR},ne={[i1]:n.NEVER,[c1]:n.ALWAYS,[r1]:n.LESS,[Uy]:n.LEQUAL,[s1]:n.EQUAL,[l1]:n.GEQUAL,[o1]:n.GREATER,[a1]:n.NOTEQUAL};function ae(w,E){if(E.type===Ei&&e.has("OES_texture_float_linear")===!1&&(E.magFilter===_n||E.magFilter===oc||E.magFilter===xa||E.magFilter===Qi||E.minFilter===_n||E.minFilter===oc||E.minFilter===xa||E.minFilter===Qi)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),n.texParameteri(w,n.TEXTURE_WRAP_S,J[E.wrapS]),n.texParameteri(w,n.TEXTURE_WRAP_T,J[E.wrapT]),(w===n.TEXTURE_3D||w===n.TEXTURE_2D_ARRAY)&&n.texParameteri(w,n.TEXTURE_WRAP_R,J[E.wrapR]),n.texParameteri(w,n.TEXTURE_MAG_FILTER,U[E.magFilter]),n.texParameteri(w,n.TEXTURE_MIN_FILTER,U[E.minFilter]),E.compareFunction&&(n.texParameteri(w,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(w,n.TEXTURE_COMPARE_FUNC,ne[E.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(E.magFilter===yn||E.minFilter!==xa&&E.minFilter!==Qi||E.type===Ei&&e.has("OES_texture_float_linear")===!1)return;if(E.anisotropy>1||i.get(E).__currentAnisotropy){const F=e.get("EXT_texture_filter_anisotropic");n.texParameterf(w,F.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(E.anisotropy,r.getMaxAnisotropy())),i.get(E).__currentAnisotropy=E.anisotropy}}}function me(w,E){let F=!1;w.__webglInit===void 0&&(w.__webglInit=!0,E.addEventListener("dispose",y));const z=E.source;let j=h.get(z);j===void 0&&(j={},h.set(z,j));const B=I(E);if(B!==w.__cacheKey){j[B]===void 0&&(j[B]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,F=!0),j[B].usedTimes++;const ce=j[w.__cacheKey];ce!==void 0&&(j[w.__cacheKey].usedTimes--,ce.usedTimes===0&&A(E)),w.__cacheKey=B,w.__webglTexture=j[B].texture}return F}function Ee(w,E,F){let z=n.TEXTURE_2D;(E.isDataArrayTexture||E.isCompressedArrayTexture)&&(z=n.TEXTURE_2D_ARRAY),E.isData3DTexture&&(z=n.TEXTURE_3D);const j=me(w,E),B=E.source;t.bindTexture(z,w.__webglTexture,n.TEXTURE0+F);const ce=i.get(B);if(B.version!==ce.__version||j===!0){t.activeTexture(n.TEXTURE0+F);const K=Je.getPrimaries(Je.workingColorSpace),se=E.colorSpace===Ar?null:Je.getPrimaries(E.colorSpace),ue=E.colorSpace===Ar||K===se?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,E.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,E.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,E.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,ue);let re=m(E.image,!1,r.maxTextureSize);re=k(E,re);const fe=s.convert(E.format,E.colorSpace),ye=s.convert(E.type);let xe=x(E.internalFormat,fe,ye,E.colorSpace,E.isVideoTexture);ae(z,E);let _e;const Ie=E.mipmaps,Le=E.isVideoTexture!==!0&&xe!==Ny,je=ce.__version===void 0||j===!0,$e=B.dataReady,We=v(E,re);if(E.isDepthTexture)xe=n.DEPTH_COMPONENT16,E.type===Ei?xe=n.DEPTH_COMPONENT32F:E.type===ko?xe=n.DEPTH_COMPONENT24:E.type===ul&&(xe=n.DEPTH24_STENCIL8),je&&(Le?t.texStorage2D(n.TEXTURE_2D,1,xe,re.width,re.height):t.texImage2D(n.TEXTURE_2D,0,xe,re.width,re.height,0,fe,ye,null));else if(E.isDataTexture)if(Ie.length>0){Le&&je&&t.texStorage2D(n.TEXTURE_2D,We,xe,Ie[0].width,Ie[0].height);for(let Me=0,N=Ie.length;Me<N;Me++)_e=Ie[Me],Le?$e&&t.texSubImage2D(n.TEXTURE_2D,Me,0,0,_e.width,_e.height,fe,ye,_e.data):t.texImage2D(n.TEXTURE_2D,Me,xe,_e.width,_e.height,0,fe,ye,_e.data);E.generateMipmaps=!1}else Le?(je&&t.texStorage2D(n.TEXTURE_2D,We,xe,re.width,re.height),$e&&t.texSubImage2D(n.TEXTURE_2D,0,0,0,re.width,re.height,fe,ye,re.data)):t.texImage2D(n.TEXTURE_2D,0,xe,re.width,re.height,0,fe,ye,re.data);else if(E.isCompressedTexture)if(E.isCompressedArrayTexture){Le&&je&&t.texStorage3D(n.TEXTURE_2D_ARRAY,We,xe,Ie[0].width,Ie[0].height,re.depth);for(let Me=0,N=Ie.length;Me<N;Me++)_e=Ie[Me],E.format!==li?fe!==null?Le?$e&&t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,Me,0,0,0,_e.width,_e.height,re.depth,fe,_e.data,0,0):t.compressedTexImage3D(n.TEXTURE_2D_ARRAY,Me,xe,_e.width,_e.height,re.depth,0,_e.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Le?$e&&t.texSubImage3D(n.TEXTURE_2D_ARRAY,Me,0,0,0,_e.width,_e.height,re.depth,fe,ye,_e.data):t.texImage3D(n.TEXTURE_2D_ARRAY,Me,xe,_e.width,_e.height,re.depth,0,fe,ye,_e.data)}else{Le&&je&&t.texStorage2D(n.TEXTURE_2D,We,xe,Ie[0].width,Ie[0].height);for(let Me=0,N=Ie.length;Me<N;Me++)_e=Ie[Me],E.format!==li?fe!==null?Le?$e&&t.compressedTexSubImage2D(n.TEXTURE_2D,Me,0,0,_e.width,_e.height,fe,_e.data):t.compressedTexImage2D(n.TEXTURE_2D,Me,xe,_e.width,_e.height,0,_e.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Le?$e&&t.texSubImage2D(n.TEXTURE_2D,Me,0,0,_e.width,_e.height,fe,ye,_e.data):t.texImage2D(n.TEXTURE_2D,Me,xe,_e.width,_e.height,0,fe,ye,_e.data)}else if(E.isDataArrayTexture)Le?(je&&t.texStorage3D(n.TEXTURE_2D_ARRAY,We,xe,re.width,re.height,re.depth),$e&&t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,0,re.width,re.height,re.depth,fe,ye,re.data)):t.texImage3D(n.TEXTURE_2D_ARRAY,0,xe,re.width,re.height,re.depth,0,fe,ye,re.data);else if(E.isData3DTexture)Le?(je&&t.texStorage3D(n.TEXTURE_3D,We,xe,re.width,re.height,re.depth),$e&&t.texSubImage3D(n.TEXTURE_3D,0,0,0,0,re.width,re.height,re.depth,fe,ye,re.data)):t.texImage3D(n.TEXTURE_3D,0,xe,re.width,re.height,re.depth,0,fe,ye,re.data);else if(E.isFramebufferTexture){if(je)if(Le)t.texStorage2D(n.TEXTURE_2D,We,xe,re.width,re.height);else{let Me=re.width,N=re.height;for(let de=0;de<We;de++)t.texImage2D(n.TEXTURE_2D,de,xe,Me,N,0,fe,ye,null),Me>>=1,N>>=1}}else if(Ie.length>0){if(Le&&je){const Me=te(Ie[0]);t.texStorage2D(n.TEXTURE_2D,We,xe,Me.width,Me.height)}for(let Me=0,N=Ie.length;Me<N;Me++)_e=Ie[Me],Le?$e&&t.texSubImage2D(n.TEXTURE_2D,Me,0,0,fe,ye,_e):t.texImage2D(n.TEXTURE_2D,Me,xe,fe,ye,_e);E.generateMipmaps=!1}else if(Le){if(je){const Me=te(re);t.texStorage2D(n.TEXTURE_2D,We,xe,Me.width,Me.height)}$e&&t.texSubImage2D(n.TEXTURE_2D,0,0,0,fe,ye,re)}else t.texImage2D(n.TEXTURE_2D,0,xe,fe,ye,re);p(E)&&g(z),ce.__version=B.version,E.onUpdate&&E.onUpdate(E)}w.__version=E.version}function Ue(w,E,F){if(E.image.length!==6)return;const z=me(w,E),j=E.source;t.bindTexture(n.TEXTURE_CUBE_MAP,w.__webglTexture,n.TEXTURE0+F);const B=i.get(j);if(j.version!==B.__version||z===!0){t.activeTexture(n.TEXTURE0+F);const ce=Je.getPrimaries(Je.workingColorSpace),K=E.colorSpace===Ar?null:Je.getPrimaries(E.colorSpace),se=E.colorSpace===Ar||ce===K?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,E.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,E.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,E.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,se);const ue=E.isCompressedTexture||E.image[0].isCompressedTexture,re=E.image[0]&&E.image[0].isDataTexture,fe=[];for(let N=0;N<6;N++)!ue&&!re?fe[N]=m(E.image[N],!0,r.maxCubemapSize):fe[N]=re?E.image[N].image:E.image[N],fe[N]=k(E,fe[N]);const ye=fe[0],xe=s.convert(E.format,E.colorSpace),_e=s.convert(E.type),Ie=x(E.internalFormat,xe,_e,E.colorSpace),Le=E.isVideoTexture!==!0,je=B.__version===void 0||z===!0,$e=j.dataReady;let We=v(E,ye);ae(n.TEXTURE_CUBE_MAP,E);let Me;if(ue){Le&&je&&t.texStorage2D(n.TEXTURE_CUBE_MAP,We,Ie,ye.width,ye.height);for(let N=0;N<6;N++){Me=fe[N].mipmaps;for(let de=0;de<Me.length;de++){const pe=Me[de];E.format!==li?xe!==null?Le?$e&&t.compressedTexSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+N,de,0,0,pe.width,pe.height,xe,pe.data):t.compressedTexImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+N,de,Ie,pe.width,pe.height,0,pe.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):Le?$e&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+N,de,0,0,pe.width,pe.height,xe,_e,pe.data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+N,de,Ie,pe.width,pe.height,0,xe,_e,pe.data)}}}else{if(Me=E.mipmaps,Le&&je){Me.length>0&&We++;const N=te(fe[0]);t.texStorage2D(n.TEXTURE_CUBE_MAP,We,Ie,N.width,N.height)}for(let N=0;N<6;N++)if(re){Le?$e&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+N,0,0,0,fe[N].width,fe[N].height,xe,_e,fe[N].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+N,0,Ie,fe[N].width,fe[N].height,0,xe,_e,fe[N].data);for(let de=0;de<Me.length;de++){const Ae=Me[de].image[N].image;Le?$e&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+N,de+1,0,0,Ae.width,Ae.height,xe,_e,Ae.data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+N,de+1,Ie,Ae.width,Ae.height,0,xe,_e,Ae.data)}}else{Le?$e&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+N,0,0,0,xe,_e,fe[N]):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+N,0,Ie,xe,_e,fe[N]);for(let de=0;de<Me.length;de++){const pe=Me[de];Le?$e&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+N,de+1,0,0,xe,_e,pe.image[N]):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+N,de+1,Ie,xe,_e,pe.image[N])}}}p(E)&&g(n.TEXTURE_CUBE_MAP),B.__version=j.version,E.onUpdate&&E.onUpdate(E)}w.__version=E.version}function Q(w,E,F,z,j,B){const ce=s.convert(F.format,F.colorSpace),K=s.convert(F.type),se=x(F.internalFormat,ce,K,F.colorSpace);if(!i.get(E).__hasExternalTextures){const re=Math.max(1,E.width>>B),fe=Math.max(1,E.height>>B);j===n.TEXTURE_3D||j===n.TEXTURE_2D_ARRAY?t.texImage3D(j,B,se,re,fe,E.depth,0,ce,K,null):t.texImage2D(j,B,se,re,fe,0,ce,K,null)}t.bindFramebuffer(n.FRAMEBUFFER,w),R(E)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,z,j,i.get(F).__webglTexture,0,Te(E)):(j===n.TEXTURE_2D||j>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&j<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,z,j,i.get(F).__webglTexture,B),t.bindFramebuffer(n.FRAMEBUFFER,null)}function le(w,E,F){if(n.bindRenderbuffer(n.RENDERBUFFER,w),E.depthBuffer&&!E.stencilBuffer){let z=n.DEPTH_COMPONENT24;if(F||R(E)){const j=E.depthTexture;j&&j.isDepthTexture&&(j.type===Ei?z=n.DEPTH_COMPONENT32F:j.type===ko&&(z=n.DEPTH_COMPONENT24));const B=Te(E);R(E)?a.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,B,z,E.width,E.height):n.renderbufferStorageMultisample(n.RENDERBUFFER,B,z,E.width,E.height)}else n.renderbufferStorage(n.RENDERBUFFER,z,E.width,E.height);n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,w)}else if(E.depthBuffer&&E.stencilBuffer){const z=Te(E);F&&R(E)===!1?n.renderbufferStorageMultisample(n.RENDERBUFFER,z,n.DEPTH24_STENCIL8,E.width,E.height):R(E)?a.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,z,n.DEPTH24_STENCIL8,E.width,E.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,E.width,E.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,w)}else{const z=E.textures;for(let j=0;j<z.length;j++){const B=z[j],ce=s.convert(B.format,B.colorSpace),K=s.convert(B.type),se=x(B.internalFormat,ce,K,B.colorSpace),ue=Te(E);F&&R(E)===!1?n.renderbufferStorageMultisample(n.RENDERBUFFER,ue,se,E.width,E.height):R(E)?a.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,ue,se,E.width,E.height):n.renderbufferStorage(n.RENDERBUFFER,se,E.width,E.height)}}n.bindRenderbuffer(n.RENDERBUFFER,null)}function ve(w,E){if(E&&E.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(n.FRAMEBUFFER,w),!(E.depthTexture&&E.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!i.get(E.depthTexture).__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),L(E.depthTexture,0);const z=i.get(E.depthTexture).__webglTexture,j=Te(E);if(E.depthTexture.format===Mo)R(E)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,z,0,j):n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,z,0);else if(E.depthTexture.format===Xa)R(E)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.TEXTURE_2D,z,0,j):n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.TEXTURE_2D,z,0);else throw new Error("Unknown depthTexture format")}function W(w){const E=i.get(w),F=w.isWebGLCubeRenderTarget===!0;if(w.depthTexture&&!E.__autoAllocateDepthBuffer){if(F)throw new Error("target.depthTexture not supported in Cube render targets");ve(E.__webglFramebuffer,w)}else if(F){E.__webglDepthbuffer=[];for(let z=0;z<6;z++)t.bindFramebuffer(n.FRAMEBUFFER,E.__webglFramebuffer[z]),E.__webglDepthbuffer[z]=n.createRenderbuffer(),le(E.__webglDepthbuffer[z],w,!1)}else t.bindFramebuffer(n.FRAMEBUFFER,E.__webglFramebuffer),E.__webglDepthbuffer=n.createRenderbuffer(),le(E.__webglDepthbuffer,w,!1);t.bindFramebuffer(n.FRAMEBUFFER,null)}function oe(w,E,F){const z=i.get(w);E!==void 0&&Q(z.__webglFramebuffer,w,w.texture,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,0),F!==void 0&&W(w)}function ie(w){const E=w.texture,F=i.get(w),z=i.get(E);w.addEventListener("dispose",T);const j=w.textures,B=w.isWebGLCubeRenderTarget===!0,ce=j.length>1;if(ce||(z.__webglTexture===void 0&&(z.__webglTexture=n.createTexture()),z.__version=E.version,o.memory.textures++),B){F.__webglFramebuffer=[];for(let K=0;K<6;K++)if(E.mipmaps&&E.mipmaps.length>0){F.__webglFramebuffer[K]=[];for(let se=0;se<E.mipmaps.length;se++)F.__webglFramebuffer[K][se]=n.createFramebuffer()}else F.__webglFramebuffer[K]=n.createFramebuffer()}else{if(E.mipmaps&&E.mipmaps.length>0){F.__webglFramebuffer=[];for(let K=0;K<E.mipmaps.length;K++)F.__webglFramebuffer[K]=n.createFramebuffer()}else F.__webglFramebuffer=n.createFramebuffer();if(ce)for(let K=0,se=j.length;K<se;K++){const ue=i.get(j[K]);ue.__webglTexture===void 0&&(ue.__webglTexture=n.createTexture(),o.memory.textures++)}if(w.samples>0&&R(w)===!1){F.__webglMultisampledFramebuffer=n.createFramebuffer(),F.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,F.__webglMultisampledFramebuffer);for(let K=0;K<j.length;K++){const se=j[K];F.__webglColorRenderbuffer[K]=n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,F.__webglColorRenderbuffer[K]);const ue=s.convert(se.format,se.colorSpace),re=s.convert(se.type),fe=x(se.internalFormat,ue,re,se.colorSpace,w.isXRRenderTarget===!0),ye=Te(w);n.renderbufferStorageMultisample(n.RENDERBUFFER,ye,fe,w.width,w.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+K,n.RENDERBUFFER,F.__webglColorRenderbuffer[K])}n.bindRenderbuffer(n.RENDERBUFFER,null),w.depthBuffer&&(F.__webglDepthRenderbuffer=n.createRenderbuffer(),le(F.__webglDepthRenderbuffer,w,!0)),t.bindFramebuffer(n.FRAMEBUFFER,null)}}if(B){t.bindTexture(n.TEXTURE_CUBE_MAP,z.__webglTexture),ae(n.TEXTURE_CUBE_MAP,E);for(let K=0;K<6;K++)if(E.mipmaps&&E.mipmaps.length>0)for(let se=0;se<E.mipmaps.length;se++)Q(F.__webglFramebuffer[K][se],w,E,n.COLOR_ATTACHMENT0,n.TEXTURE_CUBE_MAP_POSITIVE_X+K,se);else Q(F.__webglFramebuffer[K],w,E,n.COLOR_ATTACHMENT0,n.TEXTURE_CUBE_MAP_POSITIVE_X+K,0);p(E)&&g(n.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(ce){for(let K=0,se=j.length;K<se;K++){const ue=j[K],re=i.get(ue);t.bindTexture(n.TEXTURE_2D,re.__webglTexture),ae(n.TEXTURE_2D,ue),Q(F.__webglFramebuffer,w,ue,n.COLOR_ATTACHMENT0+K,n.TEXTURE_2D,0),p(ue)&&g(n.TEXTURE_2D)}t.unbindTexture()}else{let K=n.TEXTURE_2D;if((w.isWebGL3DRenderTarget||w.isWebGLArrayRenderTarget)&&(K=w.isWebGL3DRenderTarget?n.TEXTURE_3D:n.TEXTURE_2D_ARRAY),t.bindTexture(K,z.__webglTexture),ae(K,E),E.mipmaps&&E.mipmaps.length>0)for(let se=0;se<E.mipmaps.length;se++)Q(F.__webglFramebuffer[se],w,E,n.COLOR_ATTACHMENT0,K,se);else Q(F.__webglFramebuffer,w,E,n.COLOR_ATTACHMENT0,K,0);p(E)&&g(K),t.unbindTexture()}w.depthBuffer&&W(w)}function he(w){const E=w.textures;for(let F=0,z=E.length;F<z;F++){const j=E[F];if(p(j)){const B=w.isWebGLCubeRenderTarget?n.TEXTURE_CUBE_MAP:n.TEXTURE_2D,ce=i.get(j).__webglTexture;t.bindTexture(B,ce),g(B),t.unbindTexture()}}}function H(w){if(w.samples>0&&R(w)===!1){const E=w.textures,F=w.width,z=w.height;let j=n.COLOR_BUFFER_BIT;const B=[],ce=w.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,K=i.get(w),se=E.length>1;if(se)for(let ue=0;ue<E.length;ue++)t.bindFramebuffer(n.FRAMEBUFFER,K.__webglMultisampledFramebuffer),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+ue,n.RENDERBUFFER,null),t.bindFramebuffer(n.FRAMEBUFFER,K.__webglFramebuffer),n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0+ue,n.TEXTURE_2D,null,0);t.bindFramebuffer(n.READ_FRAMEBUFFER,K.__webglMultisampledFramebuffer),t.bindFramebuffer(n.DRAW_FRAMEBUFFER,K.__webglFramebuffer);for(let ue=0;ue<E.length;ue++){B.push(n.COLOR_ATTACHMENT0+ue),w.depthBuffer&&B.push(ce);const re=K.__ignoreDepthValues!==void 0?K.__ignoreDepthValues:!1;if(re===!1&&(w.depthBuffer&&(j|=n.DEPTH_BUFFER_BIT),w.stencilBuffer&&K.__isTransmissionRenderTarget!==!0&&(j|=n.STENCIL_BUFFER_BIT)),se&&n.framebufferRenderbuffer(n.READ_FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,K.__webglColorRenderbuffer[ue]),re===!0&&(n.invalidateFramebuffer(n.READ_FRAMEBUFFER,[ce]),n.invalidateFramebuffer(n.DRAW_FRAMEBUFFER,[ce])),se){const fe=i.get(E[ue]).__webglTexture;n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,fe,0)}n.blitFramebuffer(0,0,F,z,0,0,F,z,j,n.NEAREST),l&&n.invalidateFramebuffer(n.READ_FRAMEBUFFER,B)}if(t.bindFramebuffer(n.READ_FRAMEBUFFER,null),t.bindFramebuffer(n.DRAW_FRAMEBUFFER,null),se)for(let ue=0;ue<E.length;ue++){t.bindFramebuffer(n.FRAMEBUFFER,K.__webglMultisampledFramebuffer),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+ue,n.RENDERBUFFER,K.__webglColorRenderbuffer[ue]);const re=i.get(E[ue]).__webglTexture;t.bindFramebuffer(n.FRAMEBUFFER,K.__webglFramebuffer),n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0+ue,n.TEXTURE_2D,re,0)}t.bindFramebuffer(n.DRAW_FRAMEBUFFER,K.__webglMultisampledFramebuffer)}}function Te(w){return Math.min(r.maxSamples,w.samples)}function R(w){const E=i.get(w);return w.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&E.__useRenderToTexture!==!1}function D(w){const E=o.render.frame;u.get(w)!==E&&(u.set(w,E),w.update())}function k(w,E){const F=w.colorSpace,z=w.format,j=w.type;return w.isCompressedTexture===!0||w.isVideoTexture===!0||F!==Jt&&F!==Ar&&(Je.getTransfer(F)===ft?(z!==li||j!==Br)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",F)),E}function te(w){return typeof HTMLImageElement<"u"&&w instanceof HTMLImageElement?(c.width=w.naturalWidth||w.width,c.height=w.naturalHeight||w.height):typeof VideoFrame<"u"&&w instanceof VideoFrame?(c.width=w.displayWidth,c.height=w.displayHeight):(c.width=w.width,c.height=w.height),c}this.allocateTextureUnit=O,this.resetTextureUnits=M,this.setTexture2D=L,this.setTexture2DArray=V,this.setTexture3D=$,this.setTextureCube=G,this.rebindTextures=oe,this.setupRenderTarget=ie,this.updateRenderTargetMipmap=he,this.updateMultisampleRenderTarget=H,this.setupDepthRenderbuffer=W,this.setupFrameBufferTexture=Q,this.useMultisampledRTT=R}function EN(n,e){function t(i,r=Ar){let s;const o=Je.getTransfer(r);if(i===Br)return n.UNSIGNED_BYTE;if(i===Ry)return n.UNSIGNED_SHORT_4_4_4_4;if(i===Cy)return n.UNSIGNED_SHORT_5_5_5_1;if(i===XC)return n.UNSIGNED_INT_5_9_9_9_REV;if(i===GC)return n.BYTE;if(i===WC)return n.SHORT;if(i===Ay)return n.UNSIGNED_SHORT;if(i===wy)return n.INT;if(i===ko)return n.UNSIGNED_INT;if(i===Ei)return n.FLOAT;if(i===Dc)return n.HALF_FLOAT;if(i===jC)return n.ALPHA;if(i===qC)return n.RGB;if(i===li)return n.RGBA;if(i===$C)return n.LUMINANCE;if(i===KC)return n.LUMINANCE_ALPHA;if(i===Mo)return n.DEPTH_COMPONENT;if(i===Xa)return n.DEPTH_STENCIL;if(i===Py)return n.RED;if(i===Ly)return n.RED_INTEGER;if(i===YC)return n.RG;if(i===Iy)return n.RG_INTEGER;if(i===Dy)return n.RGBA_INTEGER;if(i===Gu||i===Wu||i===Xu||i===ju)if(o===ft)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(i===Gu)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===Wu)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===Xu)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===ju)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(i===Gu)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===Wu)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===Xu)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===ju)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===Om||i===Um||i===Fm||i===km)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(i===Om)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===Um)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===Fm)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===km)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===Ny)return s=e.get("WEBGL_compressed_texture_etc1"),s!==null?s.COMPRESSED_RGB_ETC1_WEBGL:null;if(i===Bm||i===Hm)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(i===Bm)return o===ft?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(i===Hm)return o===ft?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(i===zm||i===Vm||i===Gm||i===Wm||i===Xm||i===jm||i===qm||i===$m||i===Km||i===Ym||i===Zm||i===Jm||i===Qm||i===eg)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(i===zm)return o===ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===Vm)return o===ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===Gm)return o===ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===Wm)return o===ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===Xm)return o===ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===jm)return o===ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===qm)return o===ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===$m)return o===ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===Km)return o===ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===Ym)return o===ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===Zm)return o===ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===Jm)return o===ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===Qm)return o===ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===eg)return o===ft?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===qu||i===tg||i===ng)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(i===qu)return o===ft?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===tg)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===ng)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===ZC||i===ig||i===rg||i===sg)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(i===qu)return s.COMPRESSED_RED_RGTC1_EXT;if(i===ig)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===rg)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===sg)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===ul?n.UNSIGNED_INT_24_8:n[i]!==void 0?n[i]:null}return{convert:t}}class bN extends gn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Cr extends Tt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const AN={type:"move"};class xf{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Cr,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 Cr,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new X,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new X),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Cr,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new X,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new X),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let r=null,s=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const m of e.hand.values()){const p=t.getJointPose(m,i),g=this._getHandJoint(c,m);p!==null&&(g.matrix.fromArray(p.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=p.radius),g.visible=p!==null}const u=c.joints["index-finger-tip"],f=c.joints["thumb-tip"],h=u.position.distanceTo(f.position),d=.02,_=.005;c.inputState.pinching&&h>d+_?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=d-_&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=t.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=t.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(AN)))}return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=s!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new Cr;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}const wN=` 3800void main() { 3801 3802 gl_Position = vec4( position, 1.0 ); 3803 3804}`,RN=` 3805uniform sampler2DArray depthColor; 3806uniform float depthWidth; 3807uniform float depthHeight; 3808 3809void main() { 3810 3811 vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); 3812 3813 if ( coord.x >= 1.0 ) { 3814 3815 gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; 3816 3817 } else { 3818 3819 gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; 3820 3821 } 3822 3823}`;class CN{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,i){if(this.texture===null){const r=new Dt,s=e.properties.get(r);s.__webglTexture=t.texture,(t.depthNear!=i.depthNear||t.depthFar!=i.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=r}}render(e,t){if(this.texture!==null){if(this.mesh===null){const i=t.cameras[0].viewport,r=new Vr({vertexShader:wN,fragmentShader:RN,uniforms:{depthColor:{value:this.texture},depthWidth:{value:i.z},depthHeight:{value:i.w}}});this.mesh=new kn(new cu(20,20),r)}e.render(this.mesh,t)}}reset(){this.texture=null,this.mesh=null}}class PN extends Jo{constructor(e,t){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,u=null,f=null,h=null,d=null,_=null;const m=new CN,p=t.getContextAttributes();let g=null,x=null;const v=[],y=[],T=new Ge;let b=null;const A=new gn;A.layers.enable(1),A.viewport=new st;const P=new gn;P.layers.enable(2),P.viewport=new st;const S=[A,P],M=new bN;M.layers.enable(1),M.layers.enable(2);let O=null,I=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(Q){let le=v[Q];return le===void 0&&(le=new xf,v[Q]=le),le.getTargetRaySpace()},this.getControllerGrip=function(Q){let le=v[Q];return le===void 0&&(le=new xf,v[Q]=le),le.getGripSpace()},this.getHand=function(Q){let le=v[Q];return le===void 0&&(le=new xf,v[Q]=le),le.getHandSpace()};function L(Q){const le=y.indexOf(Q.inputSource);if(le===-1)return;const ve=v[le];ve!==void 0&&(ve.update(Q.inputSource,Q.frame,c||o),ve.dispatchEvent({type:Q.type,data:Q.inputSource}))}function V(){r.removeEventListener("select",L),r.removeEventListener("selectstart",L),r.removeEventListener("selectend",L),r.removeEventListener("squeeze",L),r.removeEventListener("squeezestart",L),r.removeEventListener("squeezeend",L),r.removeEventListener("end",V),r.removeEventListener("inputsourceschange",$);for(let Q=0;Q<v.length;Q++){const le=y[Q];le!==null&&(y[Q]=null,v[Q].disconnect(le))}O=null,I=null,m.reset(),e.setRenderTarget(g),d=null,h=null,f=null,r=null,x=null,Ue.stop(),i.isPresenting=!1,e.setPixelRatio(b),e.setSize(T.width,T.height,!1),i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(Q){s=Q,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(Q){a=Q,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(Q){c=Q},this.getBaseLayer=function(){return h!==null?h:d},this.getBinding=function(){return f},this.getFrame=function(){return _},this.getSession=function(){return r},this.setSession=async function(Q){if(r=Q,r!==null){if(g=e.getRenderTarget(),r.addEventListener("select",L),r.addEventListener("selectstart",L),r.addEventListener("selectend",L),r.addEventListener("squeeze",L),r.addEventListener("squeezestart",L),r.addEventListener("squeezeend",L),r.addEventListener("end",V),r.addEventListener("inputsourceschange",$),p.xrCompatible!==!0&&await t.makeXRCompatible(),b=e.getPixelRatio(),e.getSize(T),r.renderState.layers===void 0){const le={antialias:p.antialias,alpha:!0,depth:p.depth,stencil:p.stencil,framebufferScaleFactor:s};d=new XRWebGLLayer(r,t,le),r.updateRenderState({baseLayer:d}),e.setPixelRatio(1),e.setSize(d.framebufferWidth,d.framebufferHeight,!1),x=new Ds(d.framebufferWidth,d.framebufferHeight,{format:li,type:Br,colorSpace:e.outputColorSpace,stencilBuffer:p.stencil})}else{let le=null,ve=null,W=null;p.depth&&(W=p.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,le=p.stencil?Xa:Mo,ve=p.stencil?ul:ko);const oe={colorFormat:t.RGBA8,depthFormat:W,scaleFactor:s};f=new XRWebGLBinding(r,t),h=f.createProjectionLayer(oe),r.updateRenderState({layers:[h]}),e.setPixelRatio(1),e.setSize(h.textureWidth,h.textureHeight,!1),x=new Ds(h.textureWidth,h.textureHeight,{format:li,type:Br,depthTexture:new Ky(h.textureWidth,h.textureHeight,ve,void 0,void 0,void 0,void 0,void 0,void 0,le),stencilBuffer:p.stencil,colorSpace:e.outputColorSpace,samples:p.antialias?4:0});const ie=e.properties.get(x);ie.__ignoreDepthValues=h.ignoreDepthValues}x.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await r.requestReferenceSpace(a),Ue.setContext(r),Ue.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(r!==null)return r.environmentBlendMode};function $(Q){for(let le=0;le<Q.removed.length;le++){const ve=Q.removed[le],W=y.indexOf(ve);W>=0&&(y[W]=null,v[W].disconnect(ve))}for(let le=0;le<Q.added.length;le++){const ve=Q.added[le];let W=y.indexOf(ve);if(W===-1){for(let ie=0;ie<v.length;ie++)if(ie>=y.length){y.push(ve),W=ie;break}else if(y[ie]===null){y[ie]=ve,W=ie;break}if(W===-1)break}const oe=v[W];oe&&oe.connect(ve)}}const G=new X,J=new X;function U(Q,le,ve){G.setFromMatrixPosition(le.matrixWorld),J.setFromMatrixPosition(ve.matrixWorld);const W=G.distanceTo(J),oe=le.projectionMatrix.elements,ie=ve.projectionMatrix.elements,he=oe[14]/(oe[10]-1),H=oe[14]/(oe[10]+1),Te=(oe[9]+1)/oe[5],R=(oe[9]-1)/oe[5],D=(oe[8]-1)/oe[0],k=(ie[8]+1)/ie[0],te=he*D,w=he*k,E=W/(-D+k),F=E*-D;le.matrixWorld.decompose(Q.position,Q.quaternion,Q.scale),Q.translateX(F),Q.translateZ(E),Q.matrixWorld.compose(Q.position,Q.quaternion,Q.scale),Q.matrixWorldInverse.copy(Q.matrixWorld).invert();const z=he+E,j=H+E,B=te-F,ce=w+(W-F),K=Te*H/j*z,se=R*H/j*z;Q.projectionMatrix.makePerspective(B,ce,K,se,z,j),Q.projectionMatrixInverse.copy(Q.projectionMatrix).invert()}function ne(Q,le){le===null?Q.matrixWorld.copy(Q.matrix):Q.matrixWorld.multiplyMatrices(le.matrixWorld,Q.matrix),Q.matrixWorldInverse.copy(Q.matrixWorld).invert()}this.updateCamera=function(Q){if(r===null)return;m.texture!==null&&(Q.near=m.depthNear,Q.far=m.depthFar),M.near=P.near=A.near=Q.near,M.far=P.far=A.far=Q.far,(O!==M.near||I!==M.far)&&(r.updateRenderState({depthNear:M.near,depthFar:M.far}),O=M.near,I=M.far,A.near=O,A.far=I,P.near=O,P.far=I,A.updateProjectionMatrix(),P.updateProjectionMatrix(),Q.updateProjectionMatrix());const le=Q.parent,ve=M.cameras;ne(M,le);for(let W=0;W<ve.length;W++)ne(ve[W],le);ve.length===2?U(M,A,P):M.projectionMatrix.copy(A.projectionMatrix),ae(Q,M,le)};function ae(Q,le,ve){ve===null?Q.matrix.copy(le.matrixWorld):(Q.matrix.copy(ve.matrixWorld),Q.matrix.invert(),Q.matrix.multiply(le.matrixWorld)),Q.matrix.decompose(Q.position,Q.quaternion,Q.scale),Q.updateMatrixWorld(!0),Q.projectionMatrix.copy(le.projectionMatrix),Q.projectionMatrixInverse.copy(le.projectionMatrixInverse),Q.isPerspectiveCamera&&(Q.fov=Ho*2*Math.atan(1/Q.projectionMatrix.elements[5]),Q.zoom=1)}this.getCamera=function(){return M},this.getFoveation=function(){if(!(h===null&&d===null))return l},this.setFoveation=function(Q){l=Q,h!==null&&(h.fixedFoveation=Q),d!==null&&d.fixedFoveation!==void 0&&(d.fixedFoveation=Q)},this.hasDepthSensing=function(){return m.texture!==null};let me=null;function Ee(Q,le){if(u=le.getViewerPose(c||o),_=le,u!==null){const ve=u.views;d!==null&&(e.setRenderTargetFramebuffer(x,d.framebuffer),e.setRenderTarget(x));let W=!1;ve.length!==M.cameras.length&&(M.cameras.length=0,W=!0);for(let ie=0;ie<ve.length;ie++){const he=ve[ie];let H=null;if(d!==null)H=d.getViewport(he);else{const R=f.getViewSubImage(h,he);H=R.viewport,ie===0&&(e.setRenderTargetTextures(x,R.colorTexture,h.ignoreDepthValues?void 0:R.depthStencilTexture),e.setRenderTarget(x))}let Te=S[ie];Te===void 0&&(Te=new gn,Te.layers.enable(ie),Te.viewport=new st,S[ie]=Te),Te.matrix.fromArray(he.transform.matrix),Te.matrix.decompose(Te.position,Te.quaternion,Te.scale),Te.projectionMatrix.fromArray(he.projectionMatrix),Te.projectionMatrixInverse.copy(Te.projectionMatrix).invert(),Te.viewport.set(H.x,H.y,H.width,H.height),ie===0&&(M.matrix.copy(Te.matrix),M.matrix.decompose(M.position,M.quaternion,M.scale)),W===!0&&M.cameras.push(Te)}const oe=r.enabledFeatures;if(oe&&oe.includes("depth-sensing")){const ie=f.getDepthInformation(ve[0]);ie&&ie.isValid&&ie.texture&&m.init(e,ie,r.renderState)}}for(let ve=0;ve<v.length;ve++){const W=y[ve],oe=v[ve];W!==null&&oe!==void 0&&oe.update(W,le,c||o)}m.render(e,M),me&&me(Q,le),le.detectedPlanes&&i.dispatchEvent({type:"planesdetected",data:le}),_=null}const Ue=new $y;Ue.setAnimationLoop(Ee),this.setAnimationLoop=function(Q){me=Q},this.dispose=function(){}}}const os=new wi,LN=new Be;function IN(n,e){function t(p,g){p.matrixAutoUpdate===!0&&p.updateMatrix(),g.value.copy(p.matrix)}function i(p,g){g.color.getRGB(p.fogColor.value,Xy(n)),g.isFog?(p.fogNear.value=g.near,p.fogFar.value=g.far):g.isFogExp2&&(p.fogDensity.value=g.density)}function r(p,g,x,v,y){g.isMeshBasicMaterial||g.isMeshLambertMaterial?s(p,g):g.isMeshToonMaterial?(s(p,g),f(p,g)):g.isMeshPhongMaterial?(s(p,g),u(p,g)):g.isMeshStandardMaterial?(s(p,g),h(p,g),g.isMeshPhysicalMaterial&&d(p,g,y)):g.isMeshMatcapMaterial?(s(p,g),_(p,g)):g.isMeshDepthMaterial?s(p,g):g.isMeshDistanceMaterial?(s(p,g),m(p,g)):g.isMeshNormalMaterial?s(p,g):g.isLineBasicMaterial?(o(p,g),g.isLineDashedMaterial&&a(p,g)):g.isPointsMaterial?l(p,g,x,v):g.isSpriteMaterial?c(p,g):g.isShadowMaterial?(p.color.value.copy(g.color),p.opacity.value=g.opacity):g.isShaderMaterial&&(g.uniformsNeedUpdate=!1)}function s(p,g){p.opacity.value=g.opacity,g.color&&p.diffuse.value.copy(g.color),g.emissive&&p.emissive.value.copy(g.emissive).multiplyScalar(g.emissiveIntensity),g.map&&(p.map.value=g.map,t(g.map,p.mapTransform)),g.alphaMap&&(p.alphaMap.value=g.alphaMap,t(g.alphaMap,p.alphaMapTransform)),g.bumpMap&&(p.bumpMap.value=g.bumpMap,t(g.bumpMap,p.bumpMapTransform),p.bumpScale.value=g.bumpScale,g.side===bn&&(p.bumpScale.value*=-1)),g.normalMap&&(p.normalMap.value=g.normalMap,t(g.normalMap,p.normalMapTransform),p.normalScale.value.copy(g.normalScale),g.side===bn&&p.normalScale.value.negate()),g.displacementMap&&(p.displacementMap.value=g.displacementMap,t(g.displacementMap,p.displacementMapTransform),p.displacementScale.value=g.displacementScale,p.displacementBias.value=g.displacementBias),g.emissiveMap&&(p.emissiveMap.value=g.emissiveMap,t(g.emissiveMap,p.emissiveMapTransform)),g.specularMap&&(p.specularMap.value=g.specularMap,t(g.specularMap,p.specularMapTransform)),g.alphaTest>0&&(p.alphaTest.value=g.alphaTest);const x=e.get(g),v=x.envMap,y=x.envMapRotation;if(v&&(p.envMap.value=v,os.copy(y),os.x*=-1,os.y*=-1,os.z*=-1,v.isCubeTexture&&v.isRenderTargetTexture===!1&&(os.y*=-1,os.z*=-1),p.envMapRotation.value.setFromMatrix4(LN.makeRotationFromEuler(os)),p.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,p.reflectivity.value=g.reflectivity,p.ior.value=g.ior,p.refractionRatio.value=g.refractionRatio),g.lightMap){p.lightMap.value=g.lightMap;const T=n._useLegacyLights===!0?Math.PI:1;p.lightMapIntensity.value=g.lightMapIntensity*T,t(g.lightMap,p.lightMapTransform)}g.aoMap&&(p.aoMap.value=g.aoMap,p.aoMapIntensity.value=g.aoMapIntensity,t(g.aoMap,p.aoMapTransform))}function o(p,g){p.diffuse.value.copy(g.color),p.opacity.value=g.opacity,g.map&&(p.map.value=g.map,t(g.map,p.mapTransform))}function a(p,g){p.dashSize.value=g.dashSize,p.totalSize.value=g.dashSize+g.gapSize,p.scale.value=g.scale}function l(p,g,x,v){p.diffuse.value.copy(g.color),p.opacity.value=g.opacity,p.size.value=g.size*x,p.scale.value=v*.5,g.map&&(p.map.value=g.map,t(g.map,p.uvTransform)),g.alphaMap&&(p.alphaMap.value=g.alphaMap,t(g.alphaMap,p.alphaMapTransform)),g.alphaTest>0&&(p.alphaTest.value=g.alphaTest)}function c(p,g){p.diffuse.value.copy(g.color),p.opacity.value=g.opacity,p.rotation.value=g.rotation,g.map&&(p.map.value=g.map,t(g.map,p.mapTransform)),g.alphaMap&&(p.alphaMap.value=g.alphaMap,t(g.alphaMap,p.alphaMapTransform)),g.alphaTest>0&&(p.alphaTest.value=g.alphaTest)}function u(p,g){p.specular.value.copy(g.specular),p.shininess.value=Math.max(g.shininess,1e-4)}function f(p,g){g.gradientMap&&(p.gradientMap.value=g.gradientMap)}function h(p,g){p.metalness.value=g.metalness,g.metalnessMap&&(p.metalnessMap.value=g.metalnessMap,t(g.metalnessMap,p.metalnessMapTransform)),p.roughness.value=g.roughness,g.roughnessMap&&(p.roughnessMap.value=g.roughnessMap,t(g.roughnessMap,p.roughnessMapTransform)),g.envMap&&(p.envMapIntensity.value=g.envMapIntensity)}function d(p,g,x){p.ior.value=g.ior,g.sheen>0&&(p.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),p.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(p.sheenColorMap.value=g.sheenColorMap,t(g.sheenColorMap,p.sheenColorMapTransform)),g.sheenRoughnessMap&&(p.sheenRoughnessMap.value=g.sheenRoughnessMap,t(g.sheenRoughnessMap,p.sheenRoughnessMapTransform))),g.clearcoat>0&&(p.clearcoat.value=g.clearcoat,p.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(p.clearcoatMap.value=g.clearcoatMap,t(g.clearcoatMap,p.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(p.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,t(g.clearcoatRoughnessMap,p.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(p.clearcoatNormalMap.value=g.clearcoatNormalMap,t(g.clearcoatNormalMap,p.clearcoatNormalMapTransform),p.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===bn&&p.clearcoatNormalScale.value.negate())),g.iridescence>0&&(p.iridescence.value=g.iridescence,p.iridescenceIOR.value=g.iridescenceIOR,p.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],p.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(p.iridescenceMap.value=g.iridescenceMap,t(g.iridescenceMap,p.iridescenceMapTransform)),g.iridescenceThicknessMap&&(p.iridescenceThicknessMap.value=g.iridescenceThicknessMap,t(g.iridescenceThicknessMap,p.iridescenceThicknessMapTransform))),g.transmission>0&&(p.transmission.value=g.transmission,p.transmissionSamplerMap.value=x.texture,p.transmissionSamplerSize.value.set(x.width,x.height),g.transmissionMap&&(p.transmissionMap.value=g.transmissionMap,t(g.transmissionMap,p.transmissionMapTransform)),p.thickness.value=g.thickness,g.thicknessMap&&(p.thicknessMap.value=g.thicknessMap,t(g.thicknessMap,p.thicknessMapTransform)),p.attenuationDistance.value=g.attenuationDistance,p.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(p.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(p.anisotropyMap.value=g.anisotropyMap,t(g.anisotropyMap,p.anisotropyMapTransform))),p.specularIntensity.value=g.specularIntensity,p.specularColor.value.copy(g.specularColor),g.specularColorMap&&(p.specularColorMap.value=g.specularColorMap,t(g.specularColorMap,p.specularColorMapTransform)),g.specularIntensityMap&&(p.specularIntensityMap.value=g.specularIntensityMap,t(g.specularIntensityMap,p.specularIntensityMapTransform))}function _(p,g){g.matcap&&(p.matcap.value=g.matcap)}function m(p,g){const x=e.get(g).light;p.referencePosition.value.setFromMatrixPosition(x.matrixWorld),p.nearDistance.value=x.shadow.camera.near,p.farDistance.value=x.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function DN(n,e,t,i){let r={},s={},o=[];const a=n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS);function l(x,v){const y=v.program;i.uniformBlockBinding(x,y)}function c(x,v){let y=r[x.id];y===void 0&&(_(x),y=u(x),r[x.id]=y,x.addEventListener("dispose",p));const T=v.program;i.updateUBOMapping(x,T);const b=e.render.frame;s[x.id]!==b&&(h(x),s[x.id]=b)}function u(x){const v=f();x.__bindingPointIndex=v;const y=n.createBuffer(),T=x.__size,b=x.usage;return n.bindBuffer(n.UNIFORM_BUFFER,y),n.bufferData(n.UNIFORM_BUFFER,T,b),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,v,y),y}function f(){for(let x=0;x<a;x++)if(o.indexOf(x)===-1)return o.push(x),x;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function h(x){const v=r[x.id],y=x.uniforms,T=x.__cache;n.bindBuffer(n.UNIFORM_BUFFER,v);for(let b=0,A=y.length;b<A;b++){const P=Array.isArray(y[b])?y[b]:[y[b]];for(let S=0,M=P.length;S<M;S++){const O=P[S];if(d(O,b,S,T)===!0){const I=O.__offset,L=Array.isArray(O.value)?O.value:[O.value];let V=0;for(let $=0;$<L.length;$++){const G=L[$],J=m(G);typeof G=="number"||typeof G=="boolean"?(O.__data[0]=G,n.bufferSubData(n.UNIFORM_BUFFER,I+V,O.__data)):G.isMatrix3?(O.__data[0]=G.elements[0],O.__data[1]=G.elements[1],O.__data[2]=G.elements[2],O.__data[3]=0,O.__data[4]=G.elements[3],O.__data[5]=G.elements[4],O.__data[6]=G.elements[5],O.__data[7]=0,O.__data[8]=G.elements[6],O.__data[9]=G.elements[7],O.__data[10]=G.elements[8],O.__data[11]=0):(G.toArray(O.__data,V),V+=J.storage/Float32Array.BYTES_PER_ELEMENT)}n.bufferSubData(n.UNIFORM_BUFFER,I,O.__data)}}}n.bindBuffer(n.UNIFORM_BUFFER,null)}function d(x,v,y,T){const b=x.value,A=v+"_"+y;if(T[A]===void 0)return typeof b=="number"||typeof b=="boolean"?T[A]=b:T[A]=b.clone(),!0;{const P=T[A];if(typeof b=="number"||typeof b=="boolean"){if(P!==b)return T[A]=b,!0}else if(P.equals(b)===!1)return P.copy(b),!0}return!1}function _(x){const v=x.uniforms;let y=0;const T=16;for(let A=0,P=v.length;A<P;A++){const S=Array.isArray(v[A])?v[A]:[v[A]];for(let M=0,O=S.length;M<O;M++){const I=S[M],L=Array.isArray(I.value)?I.value:[I.value];for(let V=0,$=L.length;V<$;V++){const G=L[V],J=m(G),U=y%T;U!==0&&T-U<J.boundary&&(y+=T-U),I.__data=new Float32Array(J.storage/Float32Array.BYTES_PER_ELEMENT),I.__offset=y,y+=J.storage}}}const b=y%T;return b>0&&(y+=T-b),x.__size=y,x.__cache={},this}function m(x){const v={boundary:0,storage:0};return typeof x=="number"||typeof x=="boolean"?(v.boundary=4,v.storage=4):x.isVector2?(v.boundary=8,v.storage=8):x.isVector3||x.isColor?(v.boundary=16,v.storage=12):x.isVector4?(v.boundary=16,v.storage=16):x.isMatrix3?(v.boundary=48,v.storage=48):x.isMatrix4?(v.boundary=64,v.storage=64):x.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",x),v}function p(x){const v=x.target;v.removeEventListener("dispose",p);const y=o.indexOf(v.__bindingPointIndex);o.splice(y,1),n.deleteBuffer(r[v.id]),delete r[v.id],delete s[v.id]}function g(){for(const x in r)n.deleteBuffer(r[x]);o=[],r={},s={}}return{bind:l,update:c,dispose:g}}class NN{constructor(e={}){const{canvas:t=A1(),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}=e;this.isWebGLRenderer=!0;let h;if(i!==null){if(typeof WebGLRenderingContext<"u"&&i instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");h=i.getContextAttributes().alpha}else h=o;const d=new Uint32Array(4),_=new Int32Array(4);let m=null,p=null;const g=[],x=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=pn,this._useLegacyLights=!1,this.toneMapping=kr,this.toneMappingExposure=1;const v=this;let y=!1,T=0,b=0,A=null,P=-1,S=null;const M=new st,O=new st;let I=null;const L=new Ne(0);let V=0,$=t.width,G=t.height,J=1,U=null,ne=null;const ae=new st(0,0,$,G),me=new st(0,0,$,G);let Ee=!1;const Ue=new Pd;let Q=!1,le=!1;const ve=new Be,W=new Ge,oe=new X,ie={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function he(){return A===null?J:1}let H=i;function Te(C,q){const Z=t.getContext(C,q);return Z!==null?Z:null}try{const C={alpha:!0,depth:r,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:f};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${bd}`),t.addEventListener("webglcontextlost",de,!1),t.addEventListener("webglcontextrestored",pe,!1),t.addEventListener("webglcontextcreationerror",Ae,!1),H===null){const q="webgl2";if(H=Te(q,C),H===null)throw Te(q)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(C){throw console.error("THREE.WebGLRenderer: "+C.message),C}let R,D,k,te,w,E,F,z,j,B,ce,K,se,ue,re,fe,ye,xe,_e,Ie,Le,je,$e,We;function Me(){R=new VI(H),R.init(),D=new UI(H,R,e),je=new EN(H,R),k=new MN(H),te=new XI(H),w=new lN,E=new TN(H,R,k,w,D,je,te),F=new kI(v),z=new zI(v),j=new Z1(H),$e=new NI(H,j),B=new GI(H,j,te,$e),ce=new qI(H,B,j,te),_e=new jI(H,D,E),fe=new FI(w),K=new aN(v,F,z,R,D,$e,fe),se=new IN(v,w),ue=new uN,re=new gN(R),xe=new DI(v,F,z,k,ce,h,l),ye=new SN(v,ce,D),We=new DN(H,te,D,k),Ie=new OI(H,R,te),Le=new WI(H,R,te),te.programs=K.programs,v.capabilities=D,v.extensions=R,v.properties=w,v.renderLists=ue,v.shadowMap=ye,v.state=k,v.info=te}Me();const N=new PN(v,H);this.xr=N,this.getContext=function(){return H},this.getContextAttributes=function(){return H.getContextAttributes()},this.forceContextLoss=function(){const C=R.get("WEBGL_lose_context");C&&C.loseContext()},this.forceContextRestore=function(){const C=R.get("WEBGL_lose_context");C&&C.restoreContext()},this.getPixelRatio=function(){return J},this.setPixelRatio=function(C){C!==void 0&&(J=C,this.setSize($,G,!1))},this.getSize=function(C){return C.set($,G)},this.setSize=function(C,q,Z=!0){if(N.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}$=C,G=q,t.width=Math.floor(C*J),t.height=Math.floor(q*J),Z===!0&&(t.style.width=C+"px",t.style.height=q+"px"),this.setViewport(0,0,C,q)},this.getDrawingBufferSize=function(C){return C.set($*J,G*J).floor()},this.setDrawingBufferSize=function(C,q,Z){$=C,G=q,J=Z,t.width=Math.floor(C*Z),t.height=Math.floor(q*Z),this.setViewport(0,0,C,q)},this.getCurrentViewport=function(C){return C.copy(M)},this.getViewport=function(C){return C.copy(ae)},this.setViewport=function(C,q,Z,ee){C.isVector4?ae.set(C.x,C.y,C.z,C.w):ae.set(C,q,Z,ee),k.viewport(M.copy(ae).multiplyScalar(J).round())},this.getScissor=function(C){return C.copy(me)},this.setScissor=function(C,q,Z,ee){C.isVector4?me.set(C.x,C.y,C.z,C.w):me.set(C,q,Z,ee),k.scissor(O.copy(me).multiplyScalar(J).round())},this.getScissorTest=function(){return Ee},this.setScissorTest=function(C){k.setScissorTest(Ee=C)},this.setOpaqueSort=function(C){U=C},this.setTransparentSort=function(C){ne=C},this.getClearColor=function(C){return C.copy(xe.getClearColor())},this.setClearColor=function(){xe.setClearColor.apply(xe,arguments)},this.getClearAlpha=function(){return xe.getClearAlpha()},this.setClearAlpha=function(){xe.setClearAlpha.apply(xe,arguments)},this.clear=function(C=!0,q=!0,Z=!0){let ee=0;if(C){let Y=!1;if(A!==null){const Se=A.texture.format;Y=Se===Dy||Se===Iy||Se===Ly}if(Y){const Se=A.texture.type,be=Se===Br||Se===ko||Se===Ay||Se===ul||Se===Ry||Se===Cy,Pe=xe.getClearColor(),De=xe.getClearAlpha(),Fe=Pe.r,Oe=Pe.g,ke=Pe.b;be?(d[0]=Fe,d[1]=Oe,d[2]=ke,d[3]=De,H.clearBufferuiv(H.COLOR,0,d)):(_[0]=Fe,_[1]=Oe,_[2]=ke,_[3]=De,H.clearBufferiv(H.COLOR,0,_))}else ee|=H.COLOR_BUFFER_BIT}q&&(ee|=H.DEPTH_BUFFER_BIT),Z&&(ee|=H.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),H.clear(ee)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",de,!1),t.removeEventListener("webglcontextrestored",pe,!1),t.removeEventListener("webglcontextcreationerror",Ae,!1),ue.dispose(),re.dispose(),w.dispose(),F.dispose(),z.dispose(),ce.dispose(),$e.dispose(),We.dispose(),K.dispose(),N.dispose(),N.removeEventListener("sessionstart",pi),N.removeEventListener("sessionend",mi),Kr.stop()};function de(C){C.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),y=!0}function pe(){console.log("THREE.WebGLRenderer: Context Restored."),y=!1;const C=te.autoReset,q=ye.enabled,Z=ye.autoUpdate,ee=ye.needsUpdate,Y=ye.type;Me(),te.autoReset=C,ye.enabled=q,ye.autoUpdate=Z,ye.needsUpdate=ee,ye.type=Y}function Ae(C){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",C.statusMessage)}function we(C){const q=C.target;q.removeEventListener("dispose",we),lt(q)}function lt(C){ht(C),w.remove(C)}function ht(C){const q=w.get(C).programs;q!==void 0&&(q.forEach(function(Z){K.releaseProgram(Z)}),C.isShaderMaterial&&K.releaseShaderCache(C))}this.renderBufferDirect=function(C,q,Z,ee,Y,Se){q===null&&(q=ie);const be=Y.isMesh&&Y.matrixWorld.determinant()<0,Pe=vS(C,q,Z,ee,Y);k.setMaterial(ee,be);let De=Z.index,Fe=1;if(ee.wireframe===!0){if(De=B.getWireframeAttribute(Z),De===void 0)return;Fe=2}const Oe=Z.drawRange,ke=Z.attributes.position;let wt=Oe.start*Fe,In=(Oe.start+Oe.count)*Fe;Se!==null&&(wt=Math.max(wt,Se.start*Fe),In=Math.min(In,(Se.start+Se.count)*Fe)),De!==null?(wt=Math.max(wt,0),In=Math.min(In,De.count)):ke!=null&&(wt=Math.max(wt,0),In=Math.min(In,ke.count));const zt=In-wt;if(zt<0||zt===1/0)return;$e.setup(Y,ee,Pe,Z,De);let Di,vt=Ie;if(De!==null&&(Di=j.get(De),vt=Le,vt.setIndex(Di)),Y.isMesh)ee.wireframe===!0?(k.setLineWidth(ee.wireframeLinewidth*he()),vt.setMode(H.LINES)):vt.setMode(H.TRIANGLES);else if(Y.isLine){let He=ee.linewidth;He===void 0&&(He=1),k.setLineWidth(He*he()),Y.isLineSegments?vt.setMode(H.LINES):Y.isLineLoop?vt.setMode(H.LINE_LOOP):vt.setMode(H.LINE_STRIP)}else Y.isPoints?vt.setMode(H.POINTS):Y.isSprite&&vt.setMode(H.TRIANGLES);if(Y.isBatchedMesh)vt.renderMultiDraw(Y._multiDrawStarts,Y._multiDrawCounts,Y._multiDrawCount);else if(Y.isInstancedMesh)vt.renderInstances(wt,zt,Y.count);else if(Z.isInstancedBufferGeometry){const He=Z._maxInstanceCount!==void 0?Z._maxInstanceCount:1/0,mu=Math.min(Z.instanceCount,He);vt.renderInstances(wt,zt,mu)}else vt.render(wt,zt)};function _t(C,q,Z){C.transparent===!0&&C.side===xi&&C.forceSinglePass===!1?(C.side=bn,C.needsUpdate=!0,gl(C,q,Z),C.side=sr,C.needsUpdate=!0,gl(C,q,Z),C.side=xi):gl(C,q,Z)}this.compile=function(C,q,Z=null){Z===null&&(Z=C),p=re.get(Z),p.init(),x.push(p),Z.traverseVisible(function(Y){Y.isLight&&Y.layers.test(q.layers)&&(p.pushLight(Y),Y.castShadow&&p.pushShadow(Y))}),C!==Z&&C.traverseVisible(function(Y){Y.isLight&&Y.layers.test(q.layers)&&(p.pushLight(Y),Y.castShadow&&p.pushShadow(Y))}),p.setupLights(v._useLegacyLights);const ee=new Set;return C.traverse(function(Y){const Se=Y.material;if(Se)if(Array.isArray(Se))for(let be=0;be<Se.length;be++){const Pe=Se[be];_t(Pe,Z,Y),ee.add(Pe)}else _t(Se,Z,Y),ee.add(Se)}),x.pop(),p=null,ee},this.compileAsync=function(C,q,Z=null){const ee=this.compile(C,q,Z);return new Promise(Y=>{function Se(){if(ee.forEach(function(be){w.get(be).currentProgram.isReady()&&ee.delete(be)}),ee.size===0){Y(C);return}setTimeout(Se,10)}R.get("KHR_parallel_shader_compile")!==null?Se():setTimeout(Se,10)})};let Qt=null;function ut(C){Qt&&Qt(C)}function pi(){Kr.stop()}function mi(){Kr.start()}const Kr=new $y;Kr.setAnimationLoop(ut),typeof self<"u"&&Kr.setContext(self),this.setAnimationLoop=function(C){Qt=C,N.setAnimationLoop(C),C===null?Kr.stop():Kr.start()},N.addEventListener("sessionstart",pi),N.addEventListener("sessionend",mi),this.render=function(C,q){if(q!==void 0&&q.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(y===!0)return;C.matrixWorldAutoUpdate===!0&&C.updateMatrixWorld(),q.parent===null&&q.matrixWorldAutoUpdate===!0&&q.updateMatrixWorld(),N.enabled===!0&&N.isPresenting===!0&&(N.cameraAutoUpdate===!0&&N.updateCamera(q),q=N.getCamera()),C.isScene===!0&&C.onBeforeRender(v,C,q,A),p=re.get(C,x.length),p.init(),x.push(p),ve.multiplyMatrices(q.projectionMatrix,q.matrixWorldInverse),Ue.setFromProjectionMatrix(ve),le=this.localClippingEnabled,Q=fe.init(this.clippingPlanes,le),m=ue.get(C,g.length),m.init(),g.push(m),rp(C,q,0,v.sortObjects),m.finish(),v.sortObjects===!0&&m.sort(U,ne),this.info.render.frame++,Q===!0&&fe.beginShadows();const Z=p.state.shadowsArray;if(ye.render(Z,C,q),Q===!0&&fe.endShadows(),this.info.autoReset===!0&&this.info.reset(),(N.enabled===!1||N.isPresenting===!1||N.hasDepthSensing()===!1)&&xe.render(m,C),p.setupLights(v._useLegacyLights),q.isArrayCamera){const ee=q.cameras;for(let Y=0,Se=ee.length;Y<Se;Y++){const be=ee[Y];sp(m,C,be,be.viewport)}}else sp(m,C,q);A!==null&&(E.updateMultisampleRenderTarget(A),E.updateRenderTargetMipmap(A)),C.isScene===!0&&C.onAfterRender(v,C,q),$e.resetDefaultState(),P=-1,S=null,x.pop(),x.length>0?p=x[x.length-1]:p=null,g.pop(),g.length>0?m=g[g.length-1]:m=null};function rp(C,q,Z,ee){if(C.visible===!1)return;if(C.layers.test(q.layers)){if(C.isGroup)Z=C.renderOrder;else if(C.isLOD)C.autoUpdate===!0&&C.update(q);else if(C.isLight)p.pushLight(C),C.castShadow&&p.pushShadow(C);else if(C.isSprite){if(!C.frustumCulled||Ue.intersectsSprite(C)){ee&&oe.setFromMatrixPosition(C.matrixWorld).applyMatrix4(ve);const be=ce.update(C),Pe=C.material;Pe.visible&&m.push(C,be,Pe,Z,oe.z,null)}}else if((C.isMesh||C.isLine||C.isPoints)&&(!C.frustumCulled||Ue.intersectsObject(C))){const be=ce.update(C),Pe=C.material;if(ee&&(C.boundingSphere!==void 0?(C.boundingSphere===null&&C.computeBoundingSphere(),oe.copy(C.boundingSphere.center)):(be.boundingSphere===null&&be.computeBoundingSphere(),oe.copy(be.boundingSphere.center)),oe.applyMatrix4(C.matrixWorld).applyMatrix4(ve)),Array.isArray(Pe)){const De=be.groups;for(let Fe=0,Oe=De.length;Fe<Oe;Fe++){const ke=De[Fe],wt=Pe[ke.materialIndex];wt&&wt.visible&&m.push(C,be,wt,Z,oe.z,ke)}}else Pe.visible&&m.push(C,be,Pe,Z,oe.z,null)}}const Se=C.children;for(let be=0,Pe=Se.length;be<Pe;be++)rp(Se[be],q,Z,ee)}function sp(C,q,Z,ee){const Y=C.opaque,Se=C.transmissive,be=C.transparent;p.setupLightsView(Z),Q===!0&&fe.setGlobalState(v.clippingPlanes,Z),Se.length>0&&_S(Y,Se,q,Z),ee&&k.viewport(M.copy(ee)),Y.length>0&&ml(Y,q,Z),Se.length>0&&ml(Se,q,Z),be.length>0&&ml(be,q,Z),k.buffers.depth.setTest(!0),k.buffers.depth.setMask(!0),k.buffers.color.setMask(!0),k.setPolygonOffset(!1)}function _S(C,q,Z,ee){if((Z.isScene===!0?Z.overrideMaterial:null)!==null)return;if(p.state.transmissionRenderTarget===null){p.state.transmissionRenderTarget=new Ds(1,1,{generateMipmaps:!0,type:R.has("EXT_color_buffer_half_float")||R.has("EXT_color_buffer_float")?Dc:Br,minFilter:Qi,samples:4,stencilBuffer:s});const Fe=w.get(p.state.transmissionRenderTarget);Fe.__isTransmissionRenderTarget=!0}const Se=p.state.transmissionRenderTarget;v.getDrawingBufferSize(W),Se.setSize(W.x,W.y);const be=v.getRenderTarget();v.setRenderTarget(Se),v.getClearColor(L),V=v.getClearAlpha(),V<1&&v.setClearColor(16777215,.5),v.clear();const Pe=v.toneMapping;v.toneMapping=kr,ml(C,Z,ee),E.updateMultisampleRenderTarget(Se),E.updateRenderTargetMipmap(Se);let De=!1;for(let Fe=0,Oe=q.length;Fe<Oe;Fe++){const ke=q[Fe],wt=ke.object,In=ke.geometry,zt=ke.material,Di=ke.group;if(zt.side===xi&&wt.layers.test(ee.layers)){const vt=zt.side;zt.side=bn,zt.needsUpdate=!0,op(wt,Z,ee,In,zt,Di),zt.side=vt,zt.needsUpdate=!0,De=!0}}De===!0&&(E.updateMultisampleRenderTarget(Se),E.updateRenderTargetMipmap(Se)),v.setRenderTarget(be),v.setClearColor(L,V),v.toneMapping=Pe}function ml(C,q,Z){const ee=q.isScene===!0?q.overrideMaterial:null;for(let Y=0,Se=C.length;Y<Se;Y++){const be=C[Y],Pe=be.object,De=be.geometry,Fe=ee===null?be.material:ee,Oe=be.group;Pe.layers.test(Z.layers)&&op(Pe,q,Z,De,Fe,Oe)}}function op(C,q,Z,ee,Y,Se){C.onBeforeRender(v,q,Z,ee,Y,Se),C.modelViewMatrix.multiplyMatrices(Z.matrixWorldInverse,C.matrixWorld),C.normalMatrix.getNormalMatrix(C.modelViewMatrix),Y.onBeforeRender(v,q,Z,ee,C,Se),Y.transparent===!0&&Y.side===xi&&Y.forceSinglePass===!1?(Y.side=bn,Y.needsUpdate=!0,v.renderBufferDirect(Z,q,ee,Y,C,Se),Y.side=sr,Y.needsUpdate=!0,v.renderBufferDirect(Z,q,ee,Y,C,Se),Y.side=xi):v.renderBufferDirect(Z,q,ee,Y,C,Se),C.onAfterRender(v,q,Z,ee,Y,Se)}function gl(C,q,Z){q.isScene!==!0&&(q=ie);const ee=w.get(C),Y=p.state.lights,Se=p.state.shadowsArray,be=Y.state.version,Pe=K.getParameters(C,Y.state,Se,q,Z),De=K.getProgramCacheKey(Pe);let Fe=ee.programs;ee.environment=C.isMeshStandardMaterial?q.environment:null,ee.fog=q.fog,ee.envMap=(C.isMeshStandardMaterial?z:F).get(C.envMap||ee.environment),ee.envMapRotation=ee.environment!==null&&C.envMap===null?q.environmentRotation:C.envMapRotation,Fe===void 0&&(C.addEventListener("dispose",we),Fe=new Map,ee.programs=Fe);let Oe=Fe.get(De);if(Oe!==void 0){if(ee.currentProgram===Oe&&ee.lightsStateVersion===be)return lp(C,Pe),Oe}else Pe.uniforms=K.getUniforms(C),C.onBuild(Z,Pe,v),C.onBeforeCompile(Pe,v),Oe=K.acquireProgram(Pe,De),Fe.set(De,Oe),ee.uniforms=Pe.uniforms;const ke=ee.uniforms;return(!C.isShaderMaterial&&!C.isRawShaderMaterial||C.clipping===!0)&&(ke.clippingPlanes=fe.uniform),lp(C,Pe),ee.needsLights=xS(C),ee.lightsStateVersion=be,ee.needsLights&&(ke.ambientLightColor.value=Y.state.ambient,ke.lightProbe.value=Y.state.probe,ke.directionalLights.value=Y.state.directional,ke.directionalLightShadows.value=Y.state.directionalShadow,ke.spotLights.value=Y.state.spot,ke.spotLightShadows.value=Y.state.spotShadow,ke.rectAreaLights.value=Y.state.rectArea,ke.ltc_1.value=Y.state.rectAreaLTC1,ke.ltc_2.value=Y.state.rectAreaLTC2,ke.pointLights.value=Y.state.point,ke.pointLightShadows.value=Y.state.pointShadow,ke.hemisphereLights.value=Y.state.hemi,ke.directionalShadowMap.value=Y.state.directionalShadowMap,ke.directionalShadowMatrix.value=Y.state.directionalShadowMatrix,ke.spotShadowMap.value=Y.state.spotShadowMap,ke.spotLightMatrix.value=Y.state.spotLightMatrix,ke.spotLightMap.value=Y.state.spotLightMap,ke.pointShadowMap.value=Y.state.pointShadowMap,ke.pointShadowMatrix.value=Y.state.pointShadowMatrix),ee.currentProgram=Oe,ee.uniformsList=null,Oe}function ap(C){if(C.uniformsList===null){const q=C.currentProgram.getUniforms();C.uniformsList=ac.seqWithValue(q.seq,C.uniforms)}return C.uniformsList}function lp(C,q){const Z=w.get(C);Z.outputColorSpace=q.outputColorSpace,Z.batching=q.batching,Z.instancing=q.instancing,Z.instancingColor=q.instancingColor,Z.instancingMorph=q.instancingMorph,Z.skinning=q.skinning,Z.morphTargets=q.morphTargets,Z.morphNormals=q.morphNormals,Z.morphColors=q.morphColors,Z.morphTargetsCount=q.morphTargetsCount,Z.numClippingPlanes=q.numClippingPlanes,Z.numIntersection=q.numClipIntersection,Z.vertexAlphas=q.vertexAlphas,Z.vertexTangents=q.vertexTangents,Z.toneMapping=q.toneMapping}function vS(C,q,Z,ee,Y){q.isScene!==!0&&(q=ie),E.resetTextureUnits();const Se=q.fog,be=ee.isMeshStandardMaterial?q.environment:null,Pe=A===null?v.outputColorSpace:A.isXRRenderTarget===!0?A.texture.colorSpace:Jt,De=(ee.isMeshStandardMaterial?z:F).get(ee.envMap||be),Fe=ee.vertexColors===!0&&!!Z.attributes.color&&Z.attributes.color.itemSize===4,Oe=!!Z.attributes.tangent&&(!!ee.normalMap||ee.anisotropy>0),ke=!!Z.morphAttributes.position,wt=!!Z.morphAttributes.normal,In=!!Z.morphAttributes.color;let zt=kr;ee.toneMapped&&(A===null||A.isXRRenderTarget===!0)&&(zt=v.toneMapping);const Di=Z.morphAttributes.position||Z.morphAttributes.normal||Z.morphAttributes.color,vt=Di!==void 0?Di.length:0,He=w.get(ee),mu=p.state.lights;if(Q===!0&&(le===!0||C!==S)){const Xn=C===S&&ee.id===P;fe.setState(ee,C,Xn)}let dt=!1;ee.version===He.__version?(He.needsLights&&He.lightsStateVersion!==mu.state.version||He.outputColorSpace!==Pe||Y.isBatchedMesh&&He.batching===!1||!Y.isBatchedMesh&&He.batching===!0||Y.isInstancedMesh&&He.instancing===!1||!Y.isInstancedMesh&&He.instancing===!0||Y.isSkinnedMesh&&He.skinning===!1||!Y.isSkinnedMesh&&He.skinning===!0||Y.isInstancedMesh&&He.instancingColor===!0&&Y.instanceColor===null||Y.isInstancedMesh&&He.instancingColor===!1&&Y.instanceColor!==null||Y.isInstancedMesh&&He.instancingMorph===!0&&Y.morphTexture===null||Y.isInstancedMesh&&He.instancingMorph===!1&&Y.morphTexture!==null||He.envMap!==De||ee.fog===!0&&He.fog!==Se||He.numClippingPlanes!==void 0&&(He.numClippingPlanes!==fe.numPlanes||He.numIntersection!==fe.numIntersection)||He.vertexAlphas!==Fe||He.vertexTangents!==Oe||He.morphTargets!==ke||He.morphNormals!==wt||He.morphColors!==In||He.toneMapping!==zt||He.morphTargetsCount!==vt)&&(dt=!0):(dt=!0,He.__version=ee.version);let Yr=He.currentProgram;dt===!0&&(Yr=gl(ee,q,Y));let cp=!1,ia=!1,gu=!1;const en=Yr.getUniforms(),hr=He.uniforms;if(k.useProgram(Yr.program)&&(cp=!0,ia=!0,gu=!0),ee.id!==P&&(P=ee.id,ia=!0),cp||S!==C){en.setValue(H,"projectionMatrix",C.projectionMatrix),en.setValue(H,"viewMatrix",C.matrixWorldInverse);const Xn=en.map.cameraPosition;Xn!==void 0&&Xn.setValue(H,oe.setFromMatrixPosition(C.matrixWorld)),D.logarithmicDepthBuffer&&en.setValue(H,"logDepthBufFC",2/(Math.log(C.far+1)/Math.LN2)),(ee.isMeshPhongMaterial||ee.isMeshToonMaterial||ee.isMeshLambertMaterial||ee.isMeshBasicMaterial||ee.isMeshStandardMaterial||ee.isShaderMaterial)&&en.setValue(H,"isOrthographic",C.isOrthographicCamera===!0),S!==C&&(S=C,ia=!0,gu=!0)}if(Y.isSkinnedMesh){en.setOptional(H,Y,"bindMatrix"),en.setOptional(H,Y,"bindMatrixInverse");const Xn=Y.skeleton;Xn&&(Xn.boneTexture===null&&Xn.computeBoneTexture(),en.setValue(H,"boneTexture",Xn.boneTexture,E))}Y.isBatchedMesh&&(en.setOptional(H,Y,"batchingTexture"),en.setValue(H,"batchingTexture",Y._matricesTexture,E));const _u=Z.morphAttributes;if((_u.position!==void 0||_u.normal!==void 0||_u.color!==void 0)&&_e.update(Y,Z,Yr),(ia||He.receiveShadow!==Y.receiveShadow)&&(He.receiveShadow=Y.receiveShadow,en.setValue(H,"receiveShadow",Y.receiveShadow)),ee.isMeshGouraudMaterial&&ee.envMap!==null&&(hr.envMap.value=De,hr.flipEnvMap.value=De.isCubeTexture&&De.isRenderTargetTexture===!1?-1:1),ee.isMeshStandardMaterial&&ee.envMap===null&&q.environment!==null&&(hr.envMapIntensity.value=q.environmentIntensity),ia&&(en.setValue(H,"toneMappingExposure",v.toneMappingExposure),He.needsLights&&yS(hr,gu),Se&&ee.fog===!0&&se.refreshFogUniforms(hr,Se),se.refreshMaterialUniforms(hr,ee,J,G,p.state.transmissionRenderTarget),ac.upload(H,ap(He),hr,E)),ee.isShaderMaterial&&ee.uniformsNeedUpdate===!0&&(ac.upload(H,ap(He),hr,E),ee.uniformsNeedUpdate=!1),ee.isSpriteMaterial&&en.setValue(H,"center",Y.center),en.setValue(H,"modelViewMatrix",Y.modelViewMatrix),en.setValue(H,"normalMatrix",Y.normalMatrix),en.setValue(H,"modelMatrix",Y.matrixWorld),ee.isShaderMaterial||ee.isRawShaderMaterial){const Xn=ee.uniformsGroups;for(let vu=0,SS=Xn.length;vu<SS;vu++){const up=Xn[vu];We.update(up,Yr),We.bind(up,Yr)}}return Yr}function yS(C,q){C.ambientLightColor.needsUpdate=q,C.lightProbe.needsUpdate=q,C.directionalLights.needsUpdate=q,C.directionalLightShadows.needsUpdate=q,C.pointLights.needsUpdate=q,C.pointLightShadows.needsUpdate=q,C.spotLights.needsUpdate=q,C.spotLightShadows.needsUpdate=q,C.rectAreaLights.needsUpdate=q,C.hemisphereLights.needsUpdate=q}function xS(C){return C.isMeshLambertMaterial||C.isMeshToonMaterial||C.isMeshPhongMaterial||C.isMeshStandardMaterial||C.isShadowMaterial||C.isShaderMaterial&&C.lights===!0}this.getActiveCubeFace=function(){return T},this.getActiveMipmapLevel=function(){return b},this.getRenderTarget=function(){return A},this.setRenderTargetTextures=function(C,q,Z){w.get(C.texture).__webglTexture=q,w.get(C.depthTexture).__webglTexture=Z;const ee=w.get(C);ee.__hasExternalTextures=!0,ee.__autoAllocateDepthBuffer=Z===void 0,ee.__autoAllocateDepthBuffer||R.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),ee.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(C,q){const Z=w.get(C);Z.__webglFramebuffer=q,Z.__useDefaultFramebuffer=q===void 0},this.setRenderTarget=function(C,q=0,Z=0){A=C,T=q,b=Z;let ee=!0,Y=null,Se=!1,be=!1;if(C){const De=w.get(C);De.__useDefaultFramebuffer!==void 0?(k.bindFramebuffer(H.FRAMEBUFFER,null),ee=!1):De.__webglFramebuffer===void 0?E.setupRenderTarget(C):De.__hasExternalTextures&&E.rebindTextures(C,w.get(C.texture).__webglTexture,w.get(C.depthTexture).__webglTexture);const Fe=C.texture;(Fe.isData3DTexture||Fe.isDataArrayTexture||Fe.isCompressedArrayTexture)&&(be=!0);const Oe=w.get(C).__webglFramebuffer;C.isWebGLCubeRenderTarget?(Array.isArray(Oe[q])?Y=Oe[q][Z]:Y=Oe[q],Se=!0):C.samples>0&&E.useMultisampledRTT(C)===!1?Y=w.get(C).__webglMultisampledFramebuffer:Array.isArray(Oe)?Y=Oe[Z]:Y=Oe,M.copy(C.viewport),O.copy(C.scissor),I=C.scissorTest}else M.copy(ae).multiplyScalar(J).floor(),O.copy(me).multiplyScalar(J).floor(),I=Ee;if(k.bindFramebuffer(H.FRAMEBUFFER,Y)&&ee&&k.drawBuffers(C,Y),k.viewport(M),k.scissor(O),k.setScissorTest(I),Se){const De=w.get(C.texture);H.framebufferTexture2D(H.FRAMEBUFFER,H.COLOR_ATTACHMENT0,H.TEXTURE_CUBE_MAP_POSITIVE_X+q,De.__webglTexture,Z)}else if(be){const De=w.get(C.texture),Fe=q||0;H.framebufferTextureLayer(H.FRAMEBUFFER,H.COLOR_ATTACHMENT0,De.__webglTexture,Z||0,Fe)}P=-1},this.readRenderTargetPixels=function(C,q,Z,ee,Y,Se,be){if(!(C&&C.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Pe=w.get(C).__webglFramebuffer;if(C.isWebGLCubeRenderTarget&&be!==void 0&&(Pe=Pe[be]),Pe){k.bindFramebuffer(H.FRAMEBUFFER,Pe);try{const De=C.texture,Fe=De.format,Oe=De.type;if(Fe!==li&&je.convert(Fe)!==H.getParameter(H.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const ke=Oe===Dc&&(R.has("EXT_color_buffer_half_float")||R.has("EXT_color_buffer_float"));if(Oe!==Br&&je.convert(Oe)!==H.getParameter(H.IMPLEMENTATION_COLOR_READ_TYPE)&&Oe!==Ei&&!ke){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}q>=0&&q<=C.width-ee&&Z>=0&&Z<=C.height-Y&&H.readPixels(q,Z,ee,Y,je.convert(Fe),je.convert(Oe),Se)}finally{const De=A!==null?w.get(A).__webglFramebuffer:null;k.bindFramebuffer(H.FRAMEBUFFER,De)}}},this.copyFramebufferToTexture=function(C,q,Z=0){const ee=Math.pow(2,-Z),Y=Math.floor(q.image.width*ee),Se=Math.floor(q.image.height*ee);E.setTexture2D(q,0),H.copyTexSubImage2D(H.TEXTURE_2D,Z,0,0,C.x,C.y,Y,Se),k.unbindTexture()},this.copyTextureToTexture=function(C,q,Z,ee=0){const Y=q.image.width,Se=q.image.height,be=je.convert(Z.format),Pe=je.convert(Z.type);E.setTexture2D(Z,0),H.pixelStorei(H.UNPACK_FLIP_Y_WEBGL,Z.flipY),H.pixelStorei(H.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Z.premultiplyAlpha),H.pixelStorei(H.UNPACK_ALIGNMENT,Z.unpackAlignment),q.isDataTexture?H.texSubImage2D(H.TEXTURE_2D,ee,C.x,C.y,Y,Se,be,Pe,q.image.data):q.isCompressedTexture?H.compressedTexSubImage2D(H.TEXTURE_2D,ee,C.x,C.y,q.mipmaps[0].width,q.mipmaps[0].height,be,q.mipmaps[0].data):H.texSubImage2D(H.TEXTURE_2D,ee,C.x,C.y,be,Pe,q.image),ee===0&&Z.generateMipmaps&&H.generateMipmap(H.TEXTURE_2D),k.unbindTexture()},this.copyTextureToTexture3D=function(C,q,Z,ee,Y=0){const Se=Math.round(C.max.x-C.min.x),be=Math.round(C.max.y-C.min.y),Pe=C.max.z-C.min.z+1,De=je.convert(ee.format),Fe=je.convert(ee.type);let Oe;if(ee.isData3DTexture)E.setTexture3D(ee,0),Oe=H.TEXTURE_3D;else if(ee.isDataArrayTexture||ee.isCompressedArrayTexture)E.setTexture2DArray(ee,0),Oe=H.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}H.pixelStorei(H.UNPACK_FLIP_Y_WEBGL,ee.flipY),H.pixelStorei(H.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ee.premultiplyAlpha),H.pixelStorei(H.UNPACK_ALIGNMENT,ee.unpackAlignment);const ke=H.getParameter(H.UNPACK_ROW_LENGTH),wt=H.getParameter(H.UNPACK_IMAGE_HEIGHT),In=H.getParameter(H.UNPACK_SKIP_PIXELS),zt=H.getParameter(H.UNPACK_SKIP_ROWS),Di=H.getParameter(H.UNPACK_SKIP_IMAGES),vt=Z.isCompressedTexture?Z.mipmaps[Y]:Z.image;H.pixelStorei(H.UNPACK_ROW_LENGTH,vt.width),H.pixelStorei(H.UNPACK_IMAGE_HEIGHT,vt.height),H.pixelStorei(H.UNPACK_SKIP_PIXELS,C.min.x),H.pixelStorei(H.UNPACK_SKIP_ROWS,C.min.y),H.pixelStorei(H.UNPACK_SKIP_IMAGES,C.min.z),Z.isDataTexture||Z.isData3DTexture?H.texSubImage3D(Oe,Y,q.x,q.y,q.z,Se,be,Pe,De,Fe,vt.data):ee.isCompressedArrayTexture?H.compressedTexSubImage3D(Oe,Y,q.x,q.y,q.z,Se,be,Pe,De,vt.data):H.texSubImage3D(Oe,Y,q.x,q.y,q.z,Se,be,Pe,De,Fe,vt),H.pixelStorei(H.UNPACK_ROW_LENGTH,ke),H.pixelStorei(H.UNPACK_IMAGE_HEIGHT,wt),H.pixelStorei(H.UNPACK_SKIP_PIXELS,In),H.pixelStorei(H.UNPACK_SKIP_ROWS,zt),H.pixelStorei(H.UNPACK_SKIP_IMAGES,Di),Y===0&&ee.generateMipmaps&&H.generateMipmap(Oe),k.unbindTexture()},this.initTexture=function(C){C.isCubeTexture?E.setTextureCube(C,0):C.isData3DTexture?E.setTexture3D(C,0):C.isDataArrayTexture||C.isCompressedArrayTexture?E.setTexture2DArray(C,0):E.setTexture2D(C,0),k.unbindTexture()},this.resetState=function(){T=0,b=0,A=null,k.reset(),$e.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return er}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===wd?"display-p3":"srgb",t.unpackColorSpace=Je.workingColorSpace===lu?"display-p3":"srgb"}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class ON extends Tt{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 wi,this.environmentIntensity=1,this.environmentRotation=new wi,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}class UN{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Th,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=ui()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return By("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let r=0,s=this.stride;r<s;r++)this.array[e+r]=t.array[i+r];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=ui()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),i=new this.constructor(t,this.stride);return i.setUsage(this.usage),i}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=ui()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const un=new X;class Dd{constructor(e,t,i,r=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=i,this.normalized=r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,i=this.data.count;t<i;t++)un.fromBufferAttribute(this,t),un.applyMatrix4(e),this.setXYZ(t,un.x,un.y,un.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)un.fromBufferAttribute(this,t),un.applyNormalMatrix(e),this.setXYZ(t,un.x,un.y,un.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)un.fromBufferAttribute(this,t),un.transformDirection(e),this.setXYZ(t,un.x,un.y,un.z);return this}getComponent(e,t){let i=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(i=ai(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=Qe(i,this.array)),this.data.array[e*this.data.stride+this.offset+t]=i,this}setX(e,t){return this.normalized&&(t=Qe(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=Qe(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=Qe(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=Qe(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=ai(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=ai(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=ai(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=ai(t,this.array)),t}setXY(e,t,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=Qe(t,this.array),i=Qe(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this}setXYZ(e,t,i,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=Qe(t,this.array),i=Qe(i,this.array),r=Qe(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this.data.array[e+2]=r,this}setXYZW(e,t,i,r,s){return e=e*this.data.stride+this.offset,this.normalized&&(t=Qe(t,this.array),i=Qe(i,this.array),r=Qe(r,this.array),s=Qe(s,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this.data.array[e+2]=r,this.data.array[e+3]=s,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let i=0;i<this.count;i++){const r=i*this.data.stride+this.offset;for(let s=0;s<this.itemSize;s++)t.push(this.data.array[r+s])}return new xn(new this.array.constructor(t),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new Dd(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let i=0;i<this.count;i++){const r=i*this.data.stride+this.offset;for(let s=0;s<this.itemSize;s++)t.push(this.data.array[r+s])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}const Qg=new X,e_=new st,t_=new st,FN=new X,n_=new Be,Kl=new X,Sf=new Li,i_=new Be,Mf=new fl;class kN extends kn{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=Nm,this.bindMatrix=new Be,this.bindMatrixInverse=new Be,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new Pi),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let i=0;i<t.count;i++)this.getVertexPosition(i,Kl),this.boundingBox.expandByPoint(Kl)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Li),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let i=0;i<t.count;i++)this.getVertexPosition(i,Kl),this.boundingSphere.expandByPoint(Kl)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const i=this.material,r=this.matrixWorld;i!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Sf.copy(this.boundingSphere),Sf.applyMatrix4(r),e.ray.intersectsSphere(Sf)!==!1&&(i_.copy(r).invert(),Mf.copy(e.ray).applyMatrix4(i_),!(this.boundingBox!==null&&Mf.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,Mf)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,t===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new st,t=this.geometry.attributes.skinWeight;for(let i=0,r=t.count;i<r;i++){e.fromBufferAttribute(t,i);const s=1/e.manhattanLength();s!==1/0?e.multiplyScalar(s):e.set(1,0,0,0),t.setXYZW(i,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===Nm?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===VC?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const i=this.skeleton,r=this.geometry;e_.fromBufferAttribute(r.attributes.skinIndex,e),t_.fromBufferAttribute(r.attributes.skinWeight,e),Qg.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let s=0;s<4;s++){const o=t_.getComponent(s);if(o!==0){const a=e_.getComponent(s);n_.multiplyMatrices(i.bones[a].matrixWorld,i.boneInverses[a]),t.addScaledVector(FN.copy(Qg).applyMatrix4(n_),o)}}return t.applyMatrix4(this.bindMatrixInverse)}}class tx extends Tt{constructor(){super(),this.isBone=!0,this.type="Bone"}}class nx extends Dt{constructor(e=null,t=1,i=1,r,s,o,a,l,c=yn,u=yn,f,h){super(null,o,a,l,c,u,r,s,f,h),this.isDataTexture=!0,this.image={data:e,width:t,height:i},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const r_=new Be,BN=new Be;class Nd{constructor(e=[],t=[]){this.uuid=ui(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),t.length===0)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let i=0,r=this.bones.length;i<r;i++)this.boneInverses.push(new Be)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const i=new Be;this.bones[e]&&i.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(i)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const i=this.bones[e];i&&i.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const i=this.bones[e];i&&(i.parent&&i.parent.isBone?(i.matrix.copy(i.parent.matrixWorld).invert(),i.matrix.multiply(i.matrixWorld)):i.matrix.copy(i.matrixWorld),i.matrix.decompose(i.position,i.quaternion,i.scale))}}update(){const e=this.bones,t=this.boneInverses,i=this.boneMatrices,r=this.boneTexture;for(let s=0,o=e.length;s<o;s++){const a=e[s]?e[s].matrixWorld:BN;r_.multiplyMatrices(a,t[s]),r_.toArray(i,s*16)}r!==null&&(r.needsUpdate=!0)}clone(){return new Nd(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const i=new nx(t,e,e,li,Ei);return i.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=i,this}getBoneByName(e){for(let t=0,i=this.bones.length;t<i;t++){const r=this.bones[t];if(r.name===e)return r}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let i=0,r=e.bones.length;i<r;i++){const s=e.bones[i];let o=t[s];o===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",s),o=new tx),this.bones.push(o),this.boneInverses.push(new Be().fromArray(e.boneInverses[i]))}return this.init(),this}toJSON(){const e={metadata:{version:4.6,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,i=this.boneInverses;for(let r=0,s=t.length;r<s;r++){const o=t[r];e.bones.push(o.uuid);const a=i[r];e.boneInverses.push(a.toArray())}return e}}class bh extends xn{constructor(e,t,i,r=1){super(e,t,i),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const ro=new Be,s_=new Be,Yl=[],o_=new Pi,HN=new Be,da=new kn,pa=new Li;class zN extends kn{constructor(e,t,i){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new bh(new Float32Array(i*16),16),this.instanceColor=null,this.morphTexture=null,this.count=i,this.boundingBox=null,this.boundingSphere=null;for(let r=0;r<i;r++)this.setMatrixAt(r,HN)}computeBoundingBox(){const e=this.geometry,t=this.count;this.boundingBox===null&&(this.boundingBox=new Pi),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let i=0;i<t;i++)this.getMatrixAt(i,ro),o_.copy(e.boundingBox).applyMatrix4(ro),this.boundingBox.union(o_)}computeBoundingSphere(){const e=this.geometry,t=this.count;this.boundingSphere===null&&(this.boundingSphere=new Li),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let i=0;i<t;i++)this.getMatrixAt(i,ro),pa.copy(e.boundingSphere).applyMatrix4(ro),this.boundingSphere.union(pa)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),e.morphTexture!==null&&(this.morphTexture=e.morphTexture.clone()),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){t.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,e*16)}getMorphAt(e,t){const i=t.morphTargetInfluences,r=this.morphTexture.source.data.data,s=i.length+1,o=e*s+1;for(let a=0;a<i.length;a++)i[a]=r[o+a]}raycast(e,t){const i=this.matrixWorld,r=this.count;if(da.geometry=this.geometry,da.material=this.material,da.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),pa.copy(this.boundingSphere),pa.applyMatrix4(i),e.ray.intersectsSphere(pa)!==!1))for(let s=0;s<r;s++){this.getMatrixAt(s,ro),s_.multiplyMatrices(i,ro),da.matrixWorld=s_,da.raycast(e,Yl);for(let o=0,a=Yl.length;o<a;o++){const l=Yl[o];l.instanceId=s,l.object=this,t.push(l)}Yl.length=0}}setColorAt(e,t){this.instanceColor===null&&(this.instanceColor=new bh(new Float32Array(this.instanceMatrix.count*3),3)),t.toArray(this.instanceColor.array,e*3)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,e*16)}setMorphAt(e,t){const i=t.morphTargetInfluences,r=i.length+1;this.morphTexture===null&&(this.morphTexture=new nx(new Float32Array(r*this.count),r,this.count,Py,Ei));const s=this.morphTexture.source.data.data;let o=0;for(let c=0;c<i.length;c++)o+=i[c];const a=this.geometry.morphTargetsRelative?1:1-o,l=r*e;s[l]=a,s.set(i,l+1)}updateMorphTargets(){}dispose(){return this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null),this}}class ix extends fi{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Ne(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const a_=new X,l_=new X,c_=new Be,Tf=new fl,Zl=new Li;class Od extends Tt{constructor(e=new ni,t=new ix){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,i=[0];for(let r=1,s=t.count;r<s;r++)a_.fromBufferAttribute(t,r-1),l_.fromBufferAttribute(t,r),i[r]=i[r-1],i[r]+=a_.distanceTo(l_);e.setAttribute("lineDistance",new Sn(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const i=this.geometry,r=this.matrixWorld,s=e.params.Line.threshold,o=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),Zl.copy(i.boundingSphere),Zl.applyMatrix4(r),Zl.radius+=s,e.ray.intersectsSphere(Zl)===!1)return;c_.copy(r).invert(),Tf.copy(e.ray).applyMatrix4(c_);const a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=new X,u=new X,f=new X,h=new X,d=this.isLineSegments?2:1,_=i.index,p=i.attributes.position;if(_!==null){const g=Math.max(0,o.start),x=Math.min(_.count,o.start+o.count);for(let v=g,y=x-1;v<y;v+=d){const T=_.getX(v),b=_.getX(v+1);if(c.fromBufferAttribute(p,T),u.fromBufferAttribute(p,b),Tf.distanceSqToSegment(c,u,h,f)>l)continue;h.applyMatrix4(this.matrixWorld);const P=e.ray.origin.distanceTo(h);P<e.near||P>e.far||t.push({distance:P,point:f.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}else{const g=Math.max(0,o.start),x=Math.min(p.count,o.start+o.count);for(let v=g,y=x-1;v<y;v+=d){if(c.fromBufferAttribute(p,v),u.fromBufferAttribute(p,v+1),Tf.distanceSqToSegment(c,u,h,f)>l)continue;h.applyMatrix4(this.matrixWorld);const b=e.ray.origin.distanceTo(h);b<e.near||b>e.far||t.push({distance:b,point:f.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[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}}}}}const u_=new X,f_=new X;class VN extends Od{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,i=[];for(let r=0,s=t.count;r<s;r+=2)u_.fromBufferAttribute(t,r),f_.fromBufferAttribute(t,r+1),i[r]=r===0?0:i[r-1],i[r+1]=i[r]+u_.distanceTo(f_);e.setAttribute("lineDistance",new Sn(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class GN extends Od{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class rx extends fi{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new Ne(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const h_=new Be,Ah=new fl,Jl=new Li,Ql=new X;class WN extends Tt{constructor(e=new ni,t=new rx){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){const i=this.geometry,r=this.matrixWorld,s=e.params.Points.threshold,o=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),Jl.copy(i.boundingSphere),Jl.applyMatrix4(r),Jl.radius+=s,e.ray.intersectsSphere(Jl)===!1)return;h_.copy(r).invert(),Ah.copy(e.ray).applyMatrix4(h_);const a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=i.index,f=i.attributes.position;if(c!==null){const h=Math.max(0,o.start),d=Math.min(c.count,o.start+o.count);for(let _=h,m=d;_<m;_++){const p=c.getX(_);Ql.fromBufferAttribute(f,p),d_(Ql,p,l,r,e,t,this)}}else{const h=Math.max(0,o.start),d=Math.min(f.count,o.start+o.count);for(let _=h,m=d;_<m;_++)Ql.fromBufferAttribute(f,_),d_(Ql,_,l,r,e,t,this)}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[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}}}}}function d_(n,e,t,i,r,s,o){const a=Ah.distanceSqToPoint(n);if(a<t){const l=new X;Ah.closestPointToPoint(n,l),l.applyMatrix4(i);const c=r.ray.origin.distanceTo(l);if(c<r.near||c>r.far)return;s.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class q2 extends Dt{constructor(e,t,i,r,s,o,a,l,c){super(e,t,i,r,s,o,a,l,c),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:_n,this.magFilter=s!==void 0?s:_n,this.generateMipmaps=!1;const u=this;function f(){u.needsUpdate=!0,e.requestVideoFrameCallback(f)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(f)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class $2 extends Dt{constructor(e,t,i,r,s,o,a,l,c){super(e,t,i,r,s,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class sx extends ni{constructor(e=1,t=1,i=1,r=32,s=1,o=!1,a=0,l=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:i,radialSegments:r,heightSegments:s,openEnded:o,thetaStart:a,thetaLength:l};const c=this;r=Math.floor(r),s=Math.floor(s);const u=[],f=[],h=[],d=[];let _=0;const m=[],p=i/2;let g=0;x(),o===!1&&(e>0&&v(!0),t>0&&v(!1)),this.setIndex(u),this.setAttribute("position",new Sn(f,3)),this.setAttribute("normal",new Sn(h,3)),this.setAttribute("uv",new Sn(d,2));function x(){const y=new X,T=new X;let b=0;const A=(t-e)/i;for(let P=0;P<=s;P++){const S=[],M=P/s,O=M*(t-e)+e;for(let I=0;I<=r;I++){const L=I/r,V=L*l+a,$=Math.sin(V),G=Math.cos(V);T.x=O*$,T.y=-M*i+p,T.z=O*G,f.push(T.x,T.y,T.z),y.set($,A,G).normalize(),h.push(y.x,y.y,y.z),d.push(L,1-M),S.push(_++)}m.push(S)}for(let P=0;P<r;P++)for(let S=0;S<s;S++){const M=m[S][P],O=m[S+1][P],I=m[S+1][P+1],L=m[S][P+1];u.push(M,O,L),u.push(O,I,L),b+=6}c.addGroup(g,b,0),g+=b}function v(y){const T=_,b=new Ge,A=new X;let P=0;const S=y===!0?e:t,M=y===!0?1:-1;for(let I=1;I<=r;I++)f.push(0,p*M,0),h.push(0,M,0),d.push(.5,.5),_++;const O=_;for(let I=0;I<=r;I++){const V=I/r*l+a,$=Math.cos(V),G=Math.sin(V);A.x=S*G,A.y=p*M,A.z=S*$,f.push(A.x,A.y,A.z),h.push(0,M,0),b.x=$*.5+.5,b.y=G*.5*M+.5,d.push(b.x,b.y),_++}for(let I=0;I<r;I++){const L=T+I,V=O+I;y===!0?u.push(V,V+1,L):u.push(V+1,V,L),P+=3}c.addGroup(g,P,y===!0?1:2),g+=P}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new sx(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class ox extends ni{constructor(e=1,t=32,i=16,r=0,s=Math.PI*2,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:i,phiStart:r,phiLength:s,thetaStart:o,thetaLength:a},t=Math.max(3,Math.floor(t)),i=Math.max(2,Math.floor(i));const l=Math.min(o+a,Math.PI);let c=0;const u=[],f=new X,h=new X,d=[],_=[],m=[],p=[];for(let g=0;g<=i;g++){const x=[],v=g/i;let y=0;g===0&&o===0?y=.5/t:g===i&&l===Math.PI&&(y=-.5/t);for(let T=0;T<=t;T++){const b=T/t;f.x=-e*Math.cos(r+b*s)*Math.sin(o+v*a),f.y=e*Math.cos(o+v*a),f.z=e*Math.sin(r+b*s)*Math.sin(o+v*a),_.push(f.x,f.y,f.z),h.copy(f).normalize(),m.push(h.x,h.y,h.z),p.push(b+y,1-v),x.push(c++)}u.push(x)}for(let g=0;g<i;g++)for(let x=0;x<t;x++){const v=u[g][x+1],y=u[g][x],T=u[g+1][x],b=u[g+1][x+1];(g!==0||o>0)&&d.push(v,y,b),(g!==i-1||l<Math.PI)&&d.push(y,T,b)}this.setIndex(d),this.setAttribute("position",new Sn(_,3)),this.setAttribute("normal",new Sn(m,3)),this.setAttribute("uv",new Sn(p,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ox(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class Ud extends fi{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Ne(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 Ne(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ad,this.normalScale=new Ge(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 wi,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 fr extends Ud{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Ge(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return an(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Ne(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Ne(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Ne(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class XN extends fi{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Ne(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ad,this.normalScale=new Ge(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}function ec(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function jN(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function qN(n){function e(r,s){return n[r]-n[s]}const t=n.length,i=new Array(t);for(let r=0;r!==t;++r)i[r]=r;return i.sort(e),i}function p_(n,e,t){const i=n.length,r=new n.constructor(i);for(let s=0,o=0;o!==i;++s){const a=t[s]*e;for(let l=0;l!==e;++l)r[o++]=n[a+l]}return r}function ax(n,e,t,i){let r=1,s=n[0];for(;s!==void 0&&s[i]===void 0;)s=n[r++];if(s===void 0)return;let o=s[i];if(o!==void 0)if(Array.isArray(o))do o=s[i],o!==void 0&&(e.push(s.time),t.push.apply(t,o)),s=n[r++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[i],o!==void 0&&(e.push(s.time),o.toArray(t,t.length)),s=n[r++];while(s!==void 0);else do o=s[i],o!==void 0&&(e.push(s.time),t.push(o)),s=n[r++];while(s!==void 0)}class dl{constructor(e,t,i,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=r!==void 0?r:new t.constructor(i),this.sampleValues=t,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let i=this._cachedIndex,r=t[i],s=t[i-1];n:{e:{let o;t:{i:if(!(e<r)){for(let a=i+2;;){if(r===void 0){if(e<s)break i;return i=t.length,this._cachedIndex=i,this.copySampleValue_(i-1)}if(i===a)break;if(s=r,r=t[++i],e<r)break e}o=t.length;break t}if(!(e>=s)){const a=t[1];e<a&&(i=2,s=a);for(let l=i-2;;){if(s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===l)break;if(r=s,s=t[--i-1],e>=s)break e}o=i,i=0;break t}break n}for(;i<o;){const a=i+o>>>1;e<t[a]?o=a:i=a+1}if(r=t[i],s=t[i-1],s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(r===void 0)return i=t.length,this._cachedIndex=i,this.copySampleValue_(i-1)}this._cachedIndex=i,this.intervalChanged_(i,s,r)}return this.interpolate_(i,s,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,i=this.sampleValues,r=this.valueSize,s=e*r;for(let o=0;o!==r;++o)t[o]=i[s+o];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class $N extends dl{constructor(e,t,i,r){super(e,t,i,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:og,endingEnd:og}}intervalChanged_(e,t,i){const r=this.parameterPositions;let s=e-2,o=e+1,a=r[s],l=r[o];if(a===void 0)switch(this.getSettings_().endingStart){case ag:s=e,a=2*t-i;break;case lg:s=r.length-2,a=t+r[s]-r[s+1];break;default:s=e,a=i}if(l===void 0)switch(this.getSettings_().endingEnd){case ag:o=e,l=2*i-t;break;case lg:o=1,l=i+r[1]-r[0];break;default:o=e-1,l=t}const c=(i-t)*.5,u=this.valueSize;this._weightPrev=c/(t-a),this._weightNext=c/(l-i),this._offsetPrev=s*u,this._offsetNext=o*u}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,u=this._offsetPrev,f=this._offsetNext,h=this._weightPrev,d=this._weightNext,_=(i-t)/(r-t),m=_*_,p=m*_,g=-h*p+2*h*m-h*_,x=(1+h)*p+(-1.5-2*h)*m+(-.5+h)*_+1,v=(-1-d)*p+(1.5+d)*m+.5*_,y=d*p-d*m;for(let T=0;T!==a;++T)s[T]=g*o[u+T]+x*o[c+T]+v*o[l+T]+y*o[f+T];return s}}class KN extends dl{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,u=(i-t)/(r-t),f=1-u;for(let h=0;h!==a;++h)s[h]=o[c+h]*f+o[l+h]*u;return s}}class YN extends dl{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class Ii{constructor(e,t,i,r){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(t===void 0||t.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=ec(t,this.TimeBufferType),this.values=ec(i,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let i;if(t.toJSON!==this.toJSON)i=t.toJSON(e);else{i={name:e.name,times:ec(e.times,Array),values:ec(e.values,Array)};const r=e.getInterpolation();r!==e.DefaultInterpolation&&(i.interpolation=r)}return i.type=e.ValueTypeName,i}InterpolantFactoryMethodDiscrete(e){return new YN(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new KN(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new $N(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case ja:t=this.InterpolantFactoryMethodDiscrete;break;case Bo:t=this.InterpolantFactoryMethodLinear;break;case $u:t=this.InterpolantFactoryMethodSmooth;break}if(t===void 0){const i="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(i);return console.warn("THREE.KeyframeTrack:",i),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return ja;case this.InterpolantFactoryMethodLinear:return Bo;case this.InterpolantFactoryMethodSmooth:return $u}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let i=0,r=t.length;i!==r;++i)t[i]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let i=0,r=t.length;i!==r;++i)t[i]*=e}return this}trim(e,t){const i=this.times,r=i.length;let s=0,o=r-1;for(;s!==r&&i[s]<e;)++s;for(;o!==-1&&i[o]>t;)--o;if(++o,s!==0||o!==r){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=i.slice(s,o),this.values=this.values.slice(s*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,r=this.values,s=i.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const l=i[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(r!==void 0&&jN(r))for(let a=0,l=r.length;a!==l;++a){const c=r[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),i=this.getValueSize(),r=this.getInterpolation()===$u,s=e.length-1;let o=1;for(let a=1;a<s;++a){let l=!1;const c=e[a],u=e[a+1];if(c!==u&&(a!==1||c!==e[0]))if(r)l=!0;else{const f=a*i,h=f-i,d=f+i;for(let _=0;_!==i;++_){const m=t[f+_];if(m!==t[h+_]||m!==t[d+_]){l=!0;break}}}if(l){if(a!==o){e[o]=e[a];const f=a*i,h=o*i;for(let d=0;d!==i;++d)t[h+d]=t[f+d]}++o}}if(s>0){e[o]=e[s];for(let a=s*i,l=o*i,c=0;c!==i;++c)t[l+c]=t[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*i)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),i=this.constructor,r=new i(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}Ii.prototype.TimeBufferType=Float32Array;Ii.prototype.ValueBufferType=Float32Array;Ii.prototype.DefaultInterpolation=Bo;class ea extends Ii{}ea.prototype.ValueTypeName="bool";ea.prototype.ValueBufferType=Array;ea.prototype.DefaultInterpolation=ja;ea.prototype.InterpolantFactoryMethodLinear=void 0;ea.prototype.InterpolantFactoryMethodSmooth=void 0;class lx extends Ii{}lx.prototype.ValueTypeName="color";class Vo extends Ii{}Vo.prototype.ValueTypeName="number";class ZN extends dl{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-t)/(r-t);let c=e*a;for(let u=c+a;c!==u;c+=4)qr.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Ns extends Ii{InterpolantFactoryMethodLinear(e){return new ZN(this.times,this.values,this.getValueSize(),e)}}Ns.prototype.ValueTypeName="quaternion";Ns.prototype.DefaultInterpolation=Bo;Ns.prototype.InterpolantFactoryMethodSmooth=void 0;class ta extends Ii{}ta.prototype.ValueTypeName="string";ta.prototype.ValueBufferType=Array;ta.prototype.DefaultInterpolation=ja;ta.prototype.InterpolantFactoryMethodLinear=void 0;ta.prototype.InterpolantFactoryMethodSmooth=void 0;class Go extends Ii{}Go.prototype.ValueTypeName="vector";class JN{constructor(e="",t=-1,i=[],r=JC){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=ui(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,r=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(eO(i[o]).scale(r));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const t=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=i.length;s!==o;++s)t.push(Ii.toJSON(i[s]));return r}static CreateFromMorphTargetSequence(e,t,i,r){const s=t.length,o=[];for(let a=0;a<s;a++){let l=[],c=[];l.push((a+s-1)%s,a,(a+1)%s),c.push(0,1,0);const u=qN(l);l=p_(l,1,u),c=p_(c,1,u),!r&&l[0]===0&&(l.push(s),c.push(c[0])),o.push(new Vo(".morphTargetInfluences["+t[a].name+"]",l,c).scale(1/i))}return new this(e,-1,o)}static findByName(e,t){let i=e;if(!Array.isArray(e)){const r=e;i=r.geometry&&r.geometry.animations||r.animations}for(let r=0;r<i.length;r++)if(i[r].name===t)return i[r];return null}static CreateClipsFromMorphTargetSequences(e,t,i){const r={},s=/^([\w-]*?)([\d]+)$/;for(let a=0,l=e.length;a<l;a++){const c=e[a],u=c.name.match(s);if(u&&u.length>1){const f=u[1];let h=r[f];h||(r[f]=h=[]),h.push(c)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,i));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(f,h,d,_,m){if(d.length!==0){const p=[],g=[];ax(d,p,g,_),p.length!==0&&m.push(new f(h,p,g))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let f=0;f<c.length;f++){const h=c[f].keys;if(!(!h||h.length===0))if(h[0].morphTargets){const d={};let _;for(_=0;_<h.length;_++)if(h[_].morphTargets)for(let m=0;m<h[_].morphTargets.length;m++)d[h[_].morphTargets[m]]=-1;for(const m in d){const p=[],g=[];for(let x=0;x!==h[_].morphTargets.length;++x){const v=h[_];p.push(v.time),g.push(v.morphTarget===m?1:0)}r.push(new Vo(".morphTargetInfluence["+m+"]",p,g))}l=d.length*o}else{const d=".bones["+t[f].name+"]";i(Go,d+".position",h,"pos",r),i(Ns,d+".quaternion",h,"rot",r),i(Go,d+".scale",h,"scl",r)}}return r.length===0?null:new this(s,l,r,a)}resetDuration(){const e=this.tracks;let t=0;for(let i=0,r=e.length;i!==r;++i){const s=this.tracks[i];t=Math.max(t,s.times[s.times.length-1])}return this.duration=t,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function QN(n){switch(n.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Vo;case"vector":case"vector2":case"vector3":case"vector4":return Go;case"color":return lx;case"quaternion":return Ns;case"bool":case"boolean":return ea;case"string":return ta}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+n)}function eO(n){if(n.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=QN(n.type);if(n.times===void 0){const t=[],i=[];ax(n.keys,t,i,"value"),n.times=t,n.values=i}return e.parse!==void 0?e.parse(n):new e(n.name,n.times,n.values,n.interpolation)}const Pr={enabled:!1,files:{},add:function(n,e){this.enabled!==!1&&(this.files[n]=e)},get:function(n){if(this.enabled!==!1)return this.files[n]},remove:function(n){delete this.files[n]},clear:function(){this.files={}}};class tO{constructor(e,t,i){const r=this;let s=!1,o=0,a=0,l;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,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 d=c[f],_=c[f+1];if(d.global&&(d.lastIndex=0),d.test(u))return _}return null}}}const nO=new tO;class na{constructor(e){this.manager=e!==void 0?e:nO,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const i=this;return new Promise(function(r,s){i.load(e,r,t,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}}na.DEFAULT_MATERIAL_NAME="__DEFAULT";const Vi={};class iO extends Error{constructor(e,t){super(e),this.response=t}}class cx extends na{constructor(e){super(e)}load(e,t,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=Pr.get(e);if(s!==void 0)return this.manager.itemStart(e),setTimeout(()=>{t&&t(s),this.manager.itemEnd(e)},0),s;if(Vi[e]!==void 0){Vi[e].push({onLoad:t,onProgress:i,onError:r});return}Vi[e]=[],Vi[e].push({onLoad:t,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=Vi[e],f=c.body.getReader(),h=c.headers.get("Content-Length")||c.headers.get("X-File-Size"),d=h?parseInt(h):0,_=d!==0;let m=0;const p=new ReadableStream({start(g){x();function x(){f.read().then(({done:v,value:y})=>{if(v)g.close();else{m+=y.byteLength;const T=new ProgressEvent("progress",{lengthComputable:_,loaded:m,total:d});for(let b=0,A=u.length;b<A;b++){const P=u[b];P.onProgress&&P.onProgress(T)}g.enqueue(y),x()}})}}});return new Response(p)}else throw new iO(`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===void 0)return c.text();{const f=/charset="?([^;"\s]*)"?/i.exec(a),h=f&&f[1]?f[1].toLowerCase():void 0,d=new TextDecoder(h);return c.arrayBuffer().then(_=>d.decode(_))}}}).then(c=>{Pr.add(e,c);const u=Vi[e];delete Vi[e];for(let f=0,h=u.length;f<h;f++){const d=u[f];d.onLoad&&d.onLoad(c)}}).catch(c=>{const u=Vi[e];if(u===void 0)throw this.manager.itemError(e),c;delete Vi[e];for(let f=0,h=u.length;f<h;f++){const d=u[f];d.onError&&d.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 rO extends na{constructor(e){super(e)}load(e,t,i,r){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=Pr.get(e);if(o!==void 0)return s.manager.itemStart(e),setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o;const a=qa("img");function l(){u(),Pr.add(e,this),t&&t(this),s.manager.itemEnd(e)}function c(f){u(),r&&r(f),s.manager.itemError(e),s.manager.itemEnd(e)}function u(){a.removeEventListener("load",l,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),s.manager.itemStart(e),a.src=e,a}}class ux extends na{constructor(e){super(e)}load(e,t,i,r){const s=new Dt,o=new rO(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){s.image=a,s.needsUpdate=!0,t!==void 0&&t(s)},i,r),s}}class fu extends Tt{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new Ne(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}const Ef=new Be,m_=new X,g_=new X;class Fd{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Ge(512,512),this.map=null,this.mapPass=null,this.matrix=new Be,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Pd,this._frameExtents=new Ge(1,1),this._viewportCount=1,this._viewports=[new st(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,i=this.matrix;m_.setFromMatrixPosition(e.matrixWorld),t.position.copy(m_),g_.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(g_),t.updateMatrixWorld(),Ef.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Ef),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(Ef)}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.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return 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 sO extends Fd{constructor(){super(new gn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,i=Ho*2*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,s=e.distance||t.far;(i!==t.fov||r!==t.aspect||s!==t.far)&&(t.fov=i,t.aspect=r,t.far=s,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class oO extends fu{constructor(e,t,i=0,r=Math.PI/3,s=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Tt.DEFAULT_UP),this.updateMatrix(),this.target=new Tt,this.distance=i,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new sO}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const __=new Be,ma=new X,bf=new X;class aO extends Fd{constructor(){super(new gn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Ge(4,2),this._viewportCount=6,this._viewports=[new st(2,1,1,1),new st(0,1,1,1),new st(3,1,1,1),new st(1,1,1,1),new st(3,0,1,1),new st(1,0,1,1)],this._cubeDirections=[new X(1,0,0),new X(-1,0,0),new X(0,0,1),new X(0,0,-1),new X(0,1,0),new X(0,-1,0)],this._cubeUps=[new X(0,1,0),new X(0,1,0),new X(0,1,0),new X(0,1,0),new X(0,0,1),new X(0,0,-1)]}updateMatrices(e,t=0){const i=this.camera,r=this.matrix,s=e.distance||i.far;s!==i.far&&(i.far=s,i.updateProjectionMatrix()),ma.setFromMatrixPosition(e.matrixWorld),i.position.copy(ma),bf.copy(i.position),bf.add(this._cubeDirections[t]),i.up.copy(this._cubeUps[t]),i.lookAt(bf),i.updateMatrixWorld(),r.makeTranslation(-ma.x,-ma.y,-ma.z),__.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(__)}}class lO extends fu{constructor(e,t,i=0,r=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=r,this.shadow=new aO}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class cO extends Fd{constructor(){super(new Ld(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class uO extends fu{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Tt.DEFAULT_UP),this.updateMatrix(),this.target=new Tt,this.shadow=new cO}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class fO extends fu{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class Na{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let i=0,r=e.length;i<r;i++)t+=String.fromCharCode(e[i]);try{return decodeURIComponent(escape(t))}catch{return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class hO extends na{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=Pr.get(e);if(o!==void 0){if(s.manager.itemStart(e),o.then){o.then(c=>{t&&t(c),s.manager.itemEnd(e)}).catch(c=>{r&&r(c)});return}return setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader;const l=fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(c){return Pr.add(e,c),t&&t(c),s.manager.itemEnd(e),c}).catch(function(c){r&&r(c),Pr.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});Pr.add(e,l),s.manager.itemStart(e)}}class dO{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=v_(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=v_();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function v_(){return(typeof performance>"u"?Date:performance).now()}const kd="\\[\\]\\.:\\/",pO=new RegExp("["+kd+"]","g"),Bd="[^"+kd+"]",mO="[^"+kd.replace("\\.","")+"]",gO=/((?:WC+[\/:])*)/.source.replace("WC",Bd),_O=/(WCOD+)?/.source.replace("WCOD",mO),vO=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Bd),yO=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Bd),xO=new RegExp("^"+gO+_O+vO+yO+"$"),SO=["material","materials","bones","map"];class MO{constructor(e,t,i){const r=i||et.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,r=this._bindings[i];r!==void 0&&r.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=i.length;r!==s;++r)i[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class et{constructor(e,t,i){this.path=t,this.parsedPath=i||et.parseTrackName(t),this.node=et.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new et.Composite(e,t,i):new et(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(pO,"")}static parseTrackName(e){const t=xO.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const s=i.nodeName.substring(r+1);SO.indexOf(s)!==-1&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=s)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=function(s){for(let o=0;o<s.length;o++){const a=s[o];if(a.name===t||a.uuid===t)return a;const l=i(a.children);if(l)return l}return null},r=i(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)e[t++]=i[r]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)i[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)i[r]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)i[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,i=t.objectName,r=t.propertyName;let s=t.propertyIndex;if(e||(e=et.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(i){let c=t.objectIndex;switch(i){case"materials":if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as no
3823de does not have a material.",this);return}if(!e.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let u=0;u<e.length;u++)if(e[u].name===c){c=u;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[i]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[i]}if(c!==void 0){if(e[c]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[c]}}const o=e[r];if(o===void 0){const c=t.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+c+"."+r+" but it wasn't found.",e);return}let a=this.Versioning.None;this.targetObject=e,e.needsUpdate!==void 0?a=this.Versioning.NeedsUpdate:e.matrixWorldNeedsUpdate!==void 0&&(a=this.Versioning.MatrixWorldNeedsUpdate);let l=this.BindingType.Direct;if(s!==void 0){if(r==="morphTargetInfluences"){if(!e.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[s]!==void 0&&(s=e.morphTargetDictionary[s])}l=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=s}else o.fromArray!==void 0&&o.toArray!==void 0?(l=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(l=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=r;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}et.Composite=MO;et.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};et.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};et.prototype.GetterByBindingType=[et.prototype._getValue_direct,et.prototype._getValue_array,et.prototype._getValue_arrayElement,et.prototype._getValue_toArray];et.prototype.SetterByBindingTypeAndVersioning=[[et.prototype._setValue_direct,et.prototype._setValue_direct_setNeedsUpdate,et.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[et.prototype._setValue_array,et.prototype._setValue_array_setNeedsUpdate,et.prototype._setValue_array_setMatrixWorldNeedsUpdate],[et.prototype._setValue_arrayElement,et.prototype._setValue_arrayElement_setNeedsUpdate,et.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[et.prototype._setValue_fromArray,et.prototype._setValue_fromArray_setNeedsUpdate,et.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];const y_=new Be;class K2{constructor(e,t,i=0,r=1/0){this.ray=new fl(e,t),this.near=i,this.far=r,this.camera=null,this.layers=new Cd,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}setFromXRController(e){return y_.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(y_),this}intersectObject(e,t=!0,i=[]){return wh(e,this,i,t),i.sort(x_),i}intersectObjects(e,t=!0,i=[]){for(let r=0,s=e.length;r<s;r++)wh(e[r],this,i,t);return i.sort(x_),i}}function x_(n,e){return n.distance-e.distance}
vendor: 7,251 bytes, line 3823
3823function wh(n,e,t,i){if(n.layers.test(e.layers)&&n.raycast(e,t),i===!0){const r=n.children;for(let s=0,o=r.length;s<o;s++)wh(r[s],e,t,!0)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:bd}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=bd);function S_(n,e){if(e===QC)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),n;if(e===Mh||e===Oy){let t=n.getIndex();if(t===null){const o=[],a=n.getAttribute("position");if(a!==void 0){for(let l=0;l<a.count;l++)o.push(l);n.setIndex(o),t=n.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),n}const i=t.count-2,r=[];if(e===Mh)for(let o=1;o<=i;o++)r.push(t.getX(0)),r.push(t.getX(o)),r.push(t.getX(o+1));else for(let o=0;o<i;o++)o%2===0?(r.push(t.getX(o)),r.push(t.getX(o+1)),r.push(t.getX(o+2))):(r.push(t.getX(o+2)),r.push(t.getX(o+1)),r.push(t.getX(o)));r.length/3!==i&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const s=n.clone();return s.setIndex(r),s.clearGroups(),s}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),n}class TO extends na{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new RO(t)}),this.register(function(t){return new FO(t)}),this.register(function(t){return new kO(t)}),this.register(function(t){return new BO(t)}),this.register(function(t){return new PO(t)}),this.register(function(t){return new LO(t)}),this.register(function(t){return new IO(t)}),this.register(function(t){return new DO(t)}),this.register(function(t){return new wO(t)}),this.register(function(t){return new NO(t)}),this.register(function(t){return new CO(t)}),this.register(function(t){return new UO(t)}),this.register(function(t){return new OO(t)}),this.register(function(t){return new bO(t)}),this.register(function(t){return new HO(t)}),this.register(function(t){return new zO(t)})}load(e,t,i,r){const s=this;let o;if(this.resourcePath!=="")o=this.resourcePath;else if(this.path!==""){const c=Na.extractUrlBase(e);o=Na.resolveURL(c,this.path)}else o=Na.extractUrlBase(e);this.manager.itemStart(e);const a=function(c){r?r(c):console.error(c),s.manager.itemError(e),s.manager.itemEnd(e)},l=new cx(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(e,function(c){try{s.parse(c,o,function(u){t(u),s.manager.itemEnd(e)},a)}catch(u){a(u)}},i,a)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,i,r){let s;const o={},a={},l=new TextDecoder;if(typeof e=="string")s=JSON.parse(e);else if(e instanceof ArrayBuffer)if(l.decode(new Uint8Array(e,0,4))===fx){try{o[Xe.KHR_BINARY_GLTF]=new VO(e)}catch(f){r&&r(f);return}s=JSON.parse(o[Xe.KHR_BINARY_GLTF].content)}else s=JSON.parse(l.decode(e));else s=e;if(s.asset===void 0||s.asset.version[0]<2){r&&r(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const c=new tU(s,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u<this.pluginCallbacks.length;u++){const f=this.pluginCallbacks[u](c);f.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[f.name]=f,o[f.name]=!0}if(s.extensionsUsed)for(let u=0;u<s.extensionsUsed.length;++u){const f=s.extensionsUsed[u],h=s.extensionsRequired||[];switch(f){case Xe.KHR_MATERIALS_UNLIT:o[f]=new AO;break;case Xe.KHR_DRACO_MESH_COMPRESSION:o[f]=new GO(s,this.dracoLoader);break;case Xe.KHR_TEXTURE_TRANSFORM:o[f]=new WO;break;case Xe.KHR_MESH_QUANTIZATION:o[f]=new XO;break;default:h.indexOf(f)>=0&&a[f]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+f+'".')}}c.setExtensions(o),c.setPlugins(a),c.parse(i,r)}parseAsync(e,t){const i=this;return new Promise(function(r,s){i.parse(e,t,r,s)})}}function EO(){let n={};return{get:function(e){return n[e]},add:function(e,t){n[e]=t},remove:function(e){delete n[e]},removeAll:function(){n={}}}}const Xe={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class bO{constructor(e){this.parser=e,this.name=Xe.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let i=0,r=t.length;i<r;i++){const s=t[i];s.extensions&&s.extensions[this.name]&&s.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,s.extensions[this.name].light)}}_loadLight(e){const t=this.parser,i="light:"+e;let r=t.cache.get(i);if(r)return r;const s=t.json,l=((s.extensions&&s.extensions[this.name]||{}).lights||[])[e];let c;const u=new Ne(16777215);l.color!==void 0&&u.setRGB(l.color[0],l.color[1],l.color[2],Jt);const f=l.range!==void 0?l.range:0;switch(l.type){case"directional":c=new uO(u),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new lO(u),c.distance=f;break;case"spot":c=new oO(u),c.distance=f,l.spot=l.spot||{},l.spot.innerConeAngle=l.spot.innerConeAngle!==void 0?l.spot.innerConeAngle:0,l.spot.outerConeAngle=l.spot.outerConeAngle!==void 0?l.spot.outerConeAngle:Math.PI/4,c.angle=l.spot.outerConeAngle,c.penumbra=1-l.spot.innerConeAngle/l.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+l.type)}return c.position.set(0,0,0),c.decay=2,br(c,l),l.intensity!==void 0&&(c.intensity=l.intensity),c.name=t.createUniqueName(l.name||"light_"+e),r=Promise.resolve(c),t.cac
vendor: 9,644 bytes, line 3823
3823he.add(i,r),r}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){const t=this,i=this.parser,s=i.json.nodes[e],a=(s.extensions&&s.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(l){return i._getNodeRef(t.cache,a,l)})}}class AO{constructor(){this.name=Xe.KHR_MATERIALS_UNLIT}getMaterialType(){return vs}extendParams(e,t,i){const r=[];e.color=new Ne(1,1,1),e.opacity=1;const s=t.pbrMetallicRoughness;if(s){if(Array.isArray(s.baseColorFactor)){const o=s.baseColorFactor;e.color.setRGB(o[0],o[1],o[2],Jt),e.opacity=o[3]}s.baseColorTexture!==void 0&&r.push(i.assignTexture(e,"map",s.baseColorTexture,pn))}return Promise.all(r)}}class wO{constructor(e){this.parser=e,this.name=Xe.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=r.extensions[this.name].emissiveStrength;return s!==void 0&&(t.emissiveIntensity=s),Promise.resolve()}}class RO{constructor(e){this.parser=e,this.name=Xe.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:fr}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];if(o.clearcoatFactor!==void 0&&(t.clearcoat=o.clearcoatFactor),o.clearcoatTexture!==void 0&&s.push(i.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),o.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),o.clearcoatRoughnessTexture!==void 0&&s.push(i.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),o.clearcoatNormalTexture!==void 0&&(s.push(i.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),o.clearcoatNormalTexture.scale!==void 0)){const a=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new Ge(a,a)}return Promise.all(s)}}class CO{constructor(e){this.parser=e,this.name=Xe.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:fr}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return o.iridescenceFactor!==void 0&&(t.iridescence=o.iridescenceFactor),o.iridescenceTexture!==void 0&&s.push(i.assignTexture(t,"iridescenceMap",o.iridescenceTexture)),o.iridescenceIor!==void 0&&(t.iridescenceIOR=o.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),o.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=o.iridescenceThicknessMinimum),o.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=o.iridescenceThicknessMaximum),o.iridescenceThicknessTexture!==void 0&&s.push(i.assignTexture(t,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(s)}}class PO{constructor(e){this.parser=e,this.name=Xe.KHR_MATERIALS_SHEEN}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:fr}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[];t.sheenColor=new Ne(0,0,0),t.sheenRoughness=0,t.sheen=1;const o=r.extensions[this.name];if(o.sheenColorFactor!==void 0){const a=o.sheenColorFactor;t.sheenColor.setRGB(a[0],a[1],a[2],Jt)}return o.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=o.sheenRoughnessFactor),o.sheenColorTexture!==void 0&&s.push(i.assignTexture(t,"sheenColorMap",o.sheenColorTexture,pn)),o.sheenRoughnessTexture!==void 0&&s.push(i.assignTexture(t,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(s)}}class LO{constructor(e){this.parser=e,this.name=Xe.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:fr}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return o.transmissionFactor!==void 0&&(t.transmission=o.transmissionFactor),o.transmissionTexture!==void 0&&s.push(i.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(s)}}class IO{constructor(e){this.parser=e,this.name=Xe.KHR_MATERIALS_VOLUME}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:fr}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];t.thickness=o.thicknessFactor!==void 0?o.thicknessFactor:0,o.thicknessTexture!==void 0&&s.push(i.assignTexture(t,"thicknessMap",o.thicknessTexture)),t.attenuationDistance=o.attenuationDistance||1/0;const a=o.attenuationColor||[1,1,1];return t.attenuationColor=new Ne().setRGB(a[0],a[1],a[2],Jt),Promise.all(s)}}class DO{constructor(e){this.parser=e,this.name=Xe.KHR_MATERIALS_IOR}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:fr}extendMaterialParams(e,t){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=r.extensions[this.name];return t.ior=s.ior!==void 0?s.ior:1.5,Promise.resolve()}}class NO{constructor(e){this.parser=e,this.name=Xe.KHR_MATERIALS_SPECULAR}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:fr}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];t.specularIntensity=o.specularFactor!==void 0?o.specularFactor:1,o.specularTexture!==void 0&&s.push(i.assignTexture(t,"specularIntensityMap",o.specularTexture));const a=o.specularColorFactor||[1,1,1];return t.specularColor=new Ne().setRGB(a[0],a[1],a[2],Jt),o.specularColorTexture!==void 0&&s.push(i.assignTexture(t,"specularColorMap",o.specularColorTexture,pn)),Promise.all(s)}}class OO{constructor(e){this.parser=e,this.name=Xe.EXT_MATERIALS_BUMP}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:fr}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return t.bumpScale=o.bumpFactor!==void 0?o.bumpFactor:1,o.bumpTexture!==void 0&&s.push(i.assignTexture(t,"bumpMap",o.bumpTexture)),Promise.all(s)}}class UO{constructor(e){this.parser=e,this.name=Xe.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:fr}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return o.anisotropyStrength!==void 0&&(t.anisotropy=o.anisotropyStrength),o.anisotropyRotation!==void 0&&(t.anisotropyRotation=o.anisotropyRotation),o.anisotropyTexture!==void 0&&s.push(i.assignTexture(t,"anisotropyMap",o.anisotropyTexture)),Promise.all(s)}}class FO{constructor(e){this.parser=e,this.name=Xe.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,i=t.json,r=i.textures[e];if(!r.extensions||!r.extensions[this.name])return null;const s=r.extensions[this.name],o=t.options.ktx2Loader;if(!o){if(i.extensionsRequired&&i.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,s.source,o)}}class kO{constructor(e){this.parser=e,this.name=Xe.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let l=i.textureLoader;if(a.uri){const c=i.options.manager.getHandler(a.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class BO{constructor(e){this.parser=e,this.name=Xe.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let l=i.textureLoader;if(a.uri){const c=i.options.manager.getHandler(a.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdj
3823FDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class HO{constructor(e){this.name=Xe.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,i=t.bufferViews[e];if(i.extensions&&i.extensions[this.name]){const r=i.extensions[this.name],s=this.parser.getDependency("buffer",r.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(a){const l=r.byteOffset||0,c=r.byteLength||0,u=r.count,f=r.byteStride,h=new Uint8Array(a,l,c);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(u,f,h,r.mode,r.filter).then(function(d){return d.buffer}):o.ready.then(function(){const d=new ArrayBuffer(u*f);return o.decodeGltfBuffer(new Uint8Array(d),u,f,h,r.mode,r.filter),d})})}else return null}}class zO{constructor(e){this.name=Xe.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,i=t.nodes[e];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const r=t.meshes[i.mesh];for(const c of r.primitives)if(c.mode!==Kn.TRIANGLES&&c.mode!==Kn.TRIANGLE_STRIP&&c.mode!==Kn.TRIANGLE_FAN&&c.mode!==void 0)return null;const o=i.extensions[this.name].attributes,a=[],l={};for(const c in o)a.push(this.parser.getDependency("accessor",o[c]).then(u=>(l[c]=u,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(c=>{const u=c.pop(),f=u.isGroup?u.children:[u],h=c[0].count,d=[];for(const _ of f){const m=new Be,p=new X,g=new qr,x=new X(1,1,1),v=new zN(_.geometry,_.material,h);for(let y=0;y<h;y++)l.TRANSLATION&&p.fromBufferAttribute(l.TRANSLATION,y),l.ROTATION&&g.fromBufferAttribute(l.ROTATION,y),l.SCALE&&x.fromBufferAttribute(l.SCALE,y),v.setMatrixAt(y,m.compose(p,g,x));for(const y in l)if(y==="_COLOR_0"){const T=l[y];v.instanceColor=new bh(T.array,T.itemSize,T.normalized)}else y!=="TRANSLATION"&&y!=="ROTATION"&&y!=="SCALE"&&_.geometry.setAttribute(y,l[y]);Tt.prototype.copy.call(v,_),this.parser.assignFinalMaterial(v),d.push(v)}return u.isGroup?(u.clear(),u.add(...d),u):d[0]}))}}const fx="glTF",ga=12,M_={JSON:1313821514,BIN:5130562};class VO{constructor(e){this.name=Xe.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,ga),i=new TextDecoder;if(this.header={magic:i.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==fx)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const r=this.header.length-ga,s=new DataView(e,ga);let o=0;for(;o<r;){const a=s.getUint32(o,!0);o+=4;const l=s.getUint32(o,!0);if(o+=4,l===M_.JSON){const c=new Uint8Array(e,ga+o,a);this.content=i.decode(c)}else if(l===M_.BIN){const c=ga+o;this.body=e.slice(c,c+a)}o+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class GO{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=Xe.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const i=this.json,r=this.dracoLoader,s=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,a={},l={},c={};for(const u in o){const f=Rh[u]||u.toLowerCase();a[f]=o[u]}for(const u in e.attributes){const f=Rh[u]||u.toLowerCase();if(o[u]!==void 0){const h=i.accessors[e.attributes[u]],d=Eo[h.componentType];c[f]=d.name,l[f]=h.normalized===!0}}return t.getDependency("bufferView",s).then(function(u){return new Promise(function(f,h){r.decodeDracoFile(u,function(d){for(const _ in d.attributes){const m=d.attributes[_],p=l[_];p!==void 0&&(m.normalized=p)}f(d)},a,c,Jt,h)})})}}class WO{constructor(){this.name=Xe.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class XO{constructor(){this.name=Xe.KHR_MESH_QUANTIZATION}}class hx extends dl{constructor(e,t,i,r){super(e,t,i,r)}copySampleValue_(e){const t=this.resultBuffer,i=this.sampleValues,r=this.valueSize,s=e*r*3+r;for(let o=0;o!==r;o++)t[o]=i[s+o];return t}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=a*2,c=a*3,u=r-t,f=(i-t)/u,h=f*f,d=h*f,_=e*c,m=_-c,p=-2*d+3*h,g=d-h,x=1-p,v=g-h+f;for(let y=0;y!==a;y++){const T=o[m+y+a],b=o[m+y+l]*u,A=o[_+y+a],P=o[_+y]*u;s[y]=x*T+v*b+p*A+g*P}return s}}const jO=new qr;class qO extends hx{interpolate_(e,t,i,r){const s=super.interpolate_(e,t,i,r);return jO.fromArray(s).normalize().toArray(s),s}}const Kn={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},Eo={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},T_={9728:yn,9729:_n,9984:by,9985:oc,9986:xa,9987:Qi},E_={33071:Rr,33648:Ic,10497:Fo},Af={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Rh={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Sr={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},$O={CUBICSPLINE:void 0,LINEAR:Bo,STEP:ja},wf={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function KO(n){return n.DefaultMaterial===void 0&&(n.DefaultMaterial=new Ud({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:sr})),n.DefaultMaterial}function as(n,e,t){for(const i in t.extensions)n[i]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[i]=t.extensions[i])}function br(n,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(n.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function YO(n,e,t){let i=!1,r=!1,s=!1;for(let c=0,u=e.length;c<u;c++){const f=e[c];if(f.POSITION!==void 0&&(i=!0),f.NORMAL!==void 0&&(r=!0),f.COLOR_0!==void 0&&(s=!0),i&&r&&s)break}if(!i&&!r&&!s)return Promise.resolve(n);const o=[],a=[],l=[];for(let c=0,u=e.length;c<u;c++){const f=e[c];if(i){const h=f.POSITION!==void 0?t.getDependency("accessor",f.POSITION):n.attributes.position;o.push(h)}if(r){const h=f.NORMAL!==void 0?t.getDependency("accessor",f.NORMAL):n.attributes.normal;a.push(h)}if(s){const h=f.COLOR_0!==void 0?t.getDependency("accessor",f.COLOR_0):n.attributes.color;l.push(h)}}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(l)]).then(function(c){const u=c[0],f=c[1],h=c[2];return i&&(n.morphAttributes.position=u),r&&(n.morphAttributes.normal=f),s&&(n.morphAttributes.color=h),n.morphTargetsRelative=!0,n})}function ZO(n,e){if(n.updateMorphTargets(),e.weights!==void 0)for(let t=0,i=e.weights.length;t<i;t++)n.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(n.morphTargetInfluences.length===t.length){n.morphTargetDictionary={};for(let i=0,r=t.length;i<r;i++)n.morphTargetDictionary[t[i]]=i}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function JO(n){let e;const t=n.extensions&&n.extensions[Xe.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+Rf(t.attributes):e=n.indices+":"+Rf(n.attributes)+":"+n.mode,n.targets!==void 0)for(let i=0,r=n.targets.length;i<r;i++)e+=":"+Rf(n.targets[i]);return e}function Rf(n){let e="";const t=Object.keys(n).sort();for(let i=0,r=t.length;i<r;i++)e+=t[i]+":"+n[t[i]]+";";return e}function Ch(n){switch(n){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function QO(n){return n.search(/\.jpe?g($|\?)/i)>0||n.search(/^data\:image\/jpeg/)===0?"image/jpeg":n.search(/\.webp($|\?)/i)>0||n.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const eU=new Be;class tU{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new EO,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,r=!1,s=-1;typeof navigator<"u"&&(i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,r=navigator.userAgent.indexOf("Firefox")>-1,s=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||i||r&&s<98?this.textureLoader=new ux(this.options.manager):this.textureLoader=new hO(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new cx(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const i=this,r=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()}
vendor: 6,605 bytes, line 3823
3823)).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(o){const a={scene:o[0][r.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:r.asset,parser:i,userData:{}};return as(s,a,r),br(a,r),Promise.all(i._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){for(const l of a.scenes)l.updateMatrixWorld();e(a)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],i=this.json.meshes||[];for(let r=0,s=t.length;r<s;r++){const o=t[r].joints;for(let a=0,l=o.length;a<l;a++)e[o[a]].isBone=!0}for(let r=0,s=e.length;r<s;r++){const o=e[r];o.mesh!==void 0&&(this._addNodeRef(this.meshCache,o.mesh),o.skin!==void 0&&(i[o.mesh].isSkinnedMesh=!0)),o.camera!==void 0&&this._addNodeRef(this.cameraCache,o.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,i){if(e.refs[t]<=1)return i;const r=i.clone(),s=(o,a)=>{const l=this.associations.get(o);l!=null&&this.associations.set(a,l);for(const[c,u]of o.children.entries())s(u,a.children[c])};return s(i,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let i=0;i<t.length;i++){const r=e(t[i]);if(r)return r}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const i=[];for(let r=0;r<t.length;r++){const s=e(t[r]);s&&i.push(s)}return i}getDependency(e,t){const i=e+":"+t;let r=this.cache.get(i);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this._invokeOne(function(s){return s.loadNode&&s.loadNode(t)});break;case"mesh":r=this._invokeOne(function(s){return s.loadMesh&&s.loadMesh(t)});break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this._invokeOne(function(s){return s.loadBufferView&&s.loadBufferView(t)});break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this._invokeOne(function(s){return s.loadMaterial&&s.loadMaterial(t)});break;case"texture":r=this._invokeOne(function(s){return s.loadTexture&&s.loadTexture(t)});break;case"skin":r=this.loadSkin(t);break;case"animation":r=this._invokeOne(function(s){return s.loadAnimation&&s.loadAnimation(t)});break;case"camera":r=this.loadCamera(t);break;default:if(r=this._invokeOne(function(s){return s!=this&&s.getDependency&&s.getDependency(e,t)}),!r)throw new Error("Unknown type: "+e);break}this.cache.add(i,r)}return r}getDependencies(e){let t=this.cache.get(e);if(!t){const i=this,r=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(r.map(function(s,o){return i.getDependency(e,o)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],i=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[Xe.KHR_BINARY_GLTF].body);const r=this.options;return new Promise(function(s,o){i.load(Na.resolveURL(t.uri,r.path),s,void 0,function(){o(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(i){const r=t.byteLength||0,s=t.byteOffset||0;return i.slice(s,s+r)})}loadAccessor(e){const t=this,i=this.json,r=this.json.accessors[e];if(r.bufferView===void 0&&r.sparse===void 0){const o=Af[r.type],a=Eo[r.componentType],l=r.normalized===!0,c=new a(r.count*o);return Promise.resolve(new xn(c,o,l))}const s=[];return r.bufferView!==void 0?s.push(this.getDependency("bufferView",r.bufferView)):s.push(null),r.sparse!==void 0&&(s.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),s.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(s).then(function(o){const a=o[0],l=Af[r.type],c=Eo[r.componentType],u=c.BYTES_PER_ELEMENT,f=u*l,h=r.byteOffset||0,d=r.bufferView!==void 0?i.bufferViews[r.bufferView].byteStride:void 0,_=r.normalized===!0;let m,p;if(d&&d!==f){const g=Math.floor(h/d),x="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+g+":"+r.count;let v=t.cache.get(x);v||(m=new c(a,g*d,r.count*d/u),v=new UN(m,d/u),t.cache.add(x,v)),p=new Dd(v,l,h%d/u,_)}else a===null?m=new c(r.count*l):m=new c(a,h,r.count*l),p=new xn(m,l,_);if(r.sparse!==void 0){const g=Af.SCALAR,x=Eo[r.sparse.indices.componentType],v=r.sparse.indices.byteOffset||0,y=r.sparse.values.byteOffset||0,T=new x(o[1],v,r.sparse.count*g),b=new c(o[2],y,r.sparse.count*l);a!==null&&(p=new xn(p.array.slice(),p.itemSize,p.normalized));for(let A=0,P=T.length;A<P;A++){const S=T[A];if(p.setX(S,b[A*l]),l>=2&&p.setY(S,b[A*l+1]),l>=3&&p.setZ(S,b[A*l+2]),l>=4&&p.setW(S,b[A*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return p})}loadTexture(e){const t=this.json,i=this.options,s=t.textures[e].source,o=t.images[s];let a=this.textureLoader;if(o.uri){const l=i.manager.getHandler(o.uri);l!==null&&(a=l)}return this.loadTextureImage(e,s,a)}loadTextureImage(e,t,i){const r=this,s=this.json,o=s.textures[e],a=s.images[t],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(t,i).then(function(u){u.flipY=!1,u.name=o.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const h=(s.samplers||{})[o.sampler]||{};return u.magFilter=T_[h.magFilter]||_n,u.minFilter=T_[h.minFilter]||Qi,u.wrapS=E_[h.wrapS]||Fo,u.wrapT=E_[h.wrapT]||Fo,r.associations.set(u,{textures:e}),u}).catch(function(){return null});return this.textureCache[l]=c,c}loadImageSource(e,t){const i=this,r=this.json,s=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(f=>f.clone());const o=r.images[e],a=self.URL||self.webkitURL;let l=o.uri||"",c=!1;if(o.bufferView!==void 0)l=i.getDependency("bufferView",o.bufferView).then(function(f){c=!0;const h=new Blob([f],{type:o.mimeType});return l=a.createObjectURL(h),l});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const u=Promise.resolve(l).then(function(f){return new Promise(function(h,d){let _=h;t.isImageBitmapLoader===!0&&(_=function(m){const p=new Dt(m);p.needsUpdate=!0,h(p)}),t.load(Na.resolveURL(f,s.path),_,void 0,d)})}).then(function(f){return c===!0&&a.revokeObjectURL(l),f.userData.mimeType=o.mimeType||QO(o.uri),f}).catch(function(f){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),f});return this.sourceCache[e]=u,u}assignTexture(e,t,i,r){const s=this;return this.getDependency("texture",i.index).then(function(o){if
vendor: 4,488 bytes, line 3823
3823(!o)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(o=o.clone(),o.channel=i.texCoord),s.extensions[Xe.KHR_TEXTURE_TRANSFORM]){const a=i.extensions!==void 0?i.extensions[Xe.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Xe.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),s.associations.set(o,l)}}return r!==void 0&&(o.colorSpace=r),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let i=e.material;const r=t.attributes.tangent===void 0,s=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new rx,fi.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,l.sizeAttenuation=!1,this.cache.add(a,l)),i=l}else if(e.isLine){const a="LineBasicMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new ix,fi.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,this.cache.add(a,l)),i=l}if(r||s||o){let a="ClonedMaterial:"+i.uuid+":";r&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=i.clone(),s&&(l.vertexColors=!0),o&&(l.flatShading=!0),r&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(i))),i=l}e.material=i}getMaterialType(){return Ud}loadMaterial(e){const t=this,i=this.json,r=this.extensions,s=i.materials[e];let o;const a={},l=s.extensions||{},c=[];if(l[Xe.KHR_MATERIALS_UNLIT]){const f=r[Xe.KHR_MATERIALS_UNLIT];o=f.getMaterialType(),c.push(f.extendParams(a,s,t))}else{const f=s.pbrMetallicRoughness||{};if(a.color=new Ne(1,1,1),a.opacity=1,Array.isArray(f.baseColorFactor)){const h=f.baseColorFactor;a.color.setRGB(h[0],h[1],h[2],Jt),a.opacity=h[3]}f.baseColorTexture!==void 0&&c.push(t.assignTexture(a,"map",f.baseColorTexture,pn)),a.metalness=f.metallicFactor!==void 0?f.metallicFactor:1,a.roughness=f.roughnessFactor!==void 0?f.roughnessFactor:1,f.metallicRoughnessTexture!==void 0&&(c.push(t.assignTexture(a,"metalnessMap",f.metallicRoughnessTexture)),c.push(t.assignTexture(a,"roughnessMap",f.metallicRoughnessTexture))),o=this._invokeOne(function(h){return h.getMaterialType&&h.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(h){return h.extendMaterialParams&&h.extendMaterialParams(e,a)})))}s.doubleSided===!0&&(a.side=xi);const u=s.alphaMode||wf.OPAQUE;if(u===wf.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===wf.MASK&&(a.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&o!==vs&&(c.push(t.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new Ge(1,1),s.normalTexture.scale!==void 0)){const f=s.normalTexture.scale;a.normalScale.set(f,f)}if(s.occlusionTexture!==void 0&&o!==vs&&(c.push(t.assignTexture(a,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&o!==vs){const f=s.emissiveFactor;a.emissive=new Ne().setRGB(f[0],f[1],f[2],Jt)}return s.emissiveTexture!==void 0&&o!==vs&&c.push(t.assignTexture(a,"emissiveMap",s.emissiveTexture,pn)),Promise.all(c).then(function(){const f=new o(a);return s.name&&(f.name=s.name),br(f,s),t.associations.set(f,{materials:e}),s.extensions&&as(r,f,s),f})}createUniqueName(e){const t=et.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,i=this.extensions,r=this.primitiveCache;function s(a){return i[Xe.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(l){return b_(l,a,t)})}const o=[];for(let a=0,l=e.length;a<l;a++){const c=e[a],u=JO(c),f=r[u];if(f)o.push(f.promise);else{let h;c.extensions&&c.extensions[Xe.KHR_DRACO_MESH_COMPRESSION]?h=s(c):h=b_(new ni,c,t),r[u]={primitive:c,promise:h},o.push(h)}}return Promise.all(o)}loadMesh(e){const t=this,i=this.json,r=this.extensions,s=i.meshes[e],o=s.primitives,a=[];for(let l=0,c=o.length;l<c;l++){const u=o[l].material===void 0?KO(this.cache):this.getDependency("material",o[l].material);a.push(u)}return a.push(t.loadGeometries(o)),Promise.all(a).then(function(l){const c=l.slice(0,l.length-1),u=l[l.length-1],f=[];for(let d=0,_=u.length;d<_;d++){const m=u[d],p=o[d];let g;const x=c[d];if(p.mode===Kn.TRIANGLES||p.mode===Kn.TRIANGLE_STRIP||p.mode===Kn.TRIANGLE_FAN||p.mode===void 0)g=s.isSkinnedMesh===!0?new kN(m,x):new kn(m,x),g.isSkinnedMesh===!0&&g.normalizeSkinWeights(),p.mode===Kn.TRIANGLE_STRIP?g.geometry=S_(g.geometry,Oy
vendor: 4,132 bytes, line 3823
3823):p.mode===Kn.TRIANGLE_FAN&&(g.geometry=S_(g.geometry,Mh));else if(p.mode===Kn.LINES)g=new VN(m,x);else if(p.mode===Kn.LINE_STRIP)g=new Od(m,x);else if(p.mode===Kn.LINE_LOOP)g=new GN(m,x);else if(p.mode===Kn.POINTS)g=new WN(m,x);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+p.mode);Object.keys(g.geometry.morphAttributes).length>0&&ZO(g,s),g.name=t.createUniqueName(s.name||"mesh_"+e),br(g,s),p.extensions&&as(r,g,p),t.assignFinalMaterial(g),f.push(g)}for(let d=0,_=f.length;d<_;d++)t.associations.set(f[d],{meshes:e,primitives:d});if(f.length===1)return s.extensions&&as(r,f[0],s),f[0];const h=new Cr;s.extensions&&as(r,h,s),t.associations.set(h,{meshes:e});for(let d=0,_=f.length;d<_;d++)h.add(f[d]);return h})}loadCamera(e){let t;const i=this.json.cameras[e],r=i[i.type];if(!r){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return i.type==="perspective"?t=new gn(Fy.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):i.type==="orthographic"&&(t=new Ld(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),i.name&&(t.name=this.createUniqueName(i.name)),br(t,i),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],i=[];for(let r=0,s=t.joints.length;r<s;r++)i.push(this._loadNodeShallow(t.joints[r]));return t.inverseBindMatrices!==void 0?i.push(this.getDependency("accessor",t.inverseBindMatrices)):i.push(null),Promise.all(i).then(function(r){const s=r.pop(),o=r,a=[],l=[];for(let c=0,u=o.length;c<u;c++){const f=o[c];if(f){a.push(f);const h=new Be;s!==null&&h.fromArray(s.array,c*16),l.push(h)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[c])}return new Nd(a,l)})}loadAnimation(e){const t=this.json,i=this,r=t.animations[e],s=r.name?r.name:"animation_"+e,o=[],a=[],l=[],c=[],u=[];for(let f=0,h=r.channels.length;f<h;f++){const d=r.channels[f],_=r.samplers[d.sampler],m=d.target,p=m.node,g=r.parameters!==void 0?r.parameters[_.input]:_.input,x=r.parameters!==void 0?r.parameters[_.output]:_.output;m.node!==void 0&&(o.push(this.getDependency("node",p)),a.push(this.getDependency("accessor",g)),l.push(this.getDependency("accessor",x)),c.push(_),u.push(m))}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(l),Promise.all(c),Promise.all(u)]).then(function(f){const h=f[0],d=f[1],_=f[2],m=f[3],p=f[4],g=[];for(let x=0,v=h.length;x<v;x++){const y=h[x],T=d[x],b=_[x],A=m[x],P=p[x];if(y===void 0)continue;y.updateMatrix&&y.updateMatrix();const S=i._createAnimationTracks(y,T,b,A,P);if(S)for(let M=0;M<S.length;M++)g.push(S[M])}return new JN(s,void 0,g)})}createNodeMesh(e){const t=this.json,i=this,r=t.nodes[e];return r.mesh===void 0?null:i.getDependency("mesh",r.mesh).then(function(s){const o=i._getNodeRef(i.meshCache,r.mesh,s);return r.weights!==void 0&&o.traverse(function(a){if(a.isMesh)for(let l=0,c=r.weights.length;l<c;l++)a.morphTargetInfluences[l]=r.weights[l]}),o})}loadNode(e){const t=this.json,i=this,r=t.nodes[e],s=i._loadNodeShallow(e),o=[],a=r.children||[];for(let c=0,u=a.length;c<u;c++)o.push(i.getDependency("node",a[c]));const l=r.skin===void 0?Promise.resolve(null):i.getDependency("skin",r.skin);return Promise.all([s,Promise.all(o),l]).then(function(c){const u=c[0],f=c[1],h=c[2];h!==null&&u.traverse(function(d){d.isSkinnedMesh&&d.bind(h,eU)});for(let d=0,_=f.length;d<_;d++)u.add(f[d]);return u})}_loadNodeShallow(e){const t=this.json,i=this.extensions,r=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const s=t.nodes[e],o=s.name?r.createUniqueName(s.name):"",a=[],l=r._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(e)});return l&&a.push(l),s.camera!==void 0&&a.push(r.getDependency("camera",s.camera).then(function(c){return r._getNodeRef(r.cameraCache,s.camera,c)})),r._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(e)}).forEach(function(c){a.push(c)}),this.nodeCache[e]=Promise.all(a).then(function(c){let u;if(s.isBone===!0?u=new tx:c.length>1?u=new Cr:c.length===1?u=c[0]:u=new Tt,u!==c[0])for(let f=0,h=c.length;f<h;f++)u.add(c[f]);if(s.name&&(u.userData.name=s.name,u.name=o),br(u,s),s.extensions&&as(i,u,s),s.matrix!==void 0){const f=new Be;
3823f.fromArray(s.matrix),u.applyMatrix4(f)}else s.translation!==void 0&&u.position.fromArray(s.translation),s.rotation!==void 0&&u.quaternion.fromArray(s.rotation),s.scale!==void 0&&u.scale.fromArray(s.scale);return r.associations.has(u)||r.associations.set(u,{}),r.associations.get(u).nodes=e,u}),this.nodeCache[e]}loadScene(e){const t=this.extensions,i=this.json.scenes[e],r=this,s=new Cr;i.name&&(s.name=r.createUniqueName(i.name)),br(s,i),i.extensions&&as(t,s,i);const o=i.nodes||[],a=[];for(let l=0,c=o.length;l<c;l++)a.push(r.getDependency("node",o[l]));return Promise.all(a).then(function(l){for(let u=0,f=l.length;u<f;u++)s.add(l[u]);const c=u=>{const f=new Map;for(const[h,d]of r.associations)(h instanceof fi||h instanceof Dt)&&f.set(h,d);return u.traverse(h=>{const d=r.associations.get(h);d!=null&&f.set(h,d)}),f};return r.associations=c(s),s})}_createAnimationTracks(e,t,i,r,s){const o=[],a=e.name?e.name:e.uuid,l=[];Sr[s.path]===Sr.weights?e.traverse(function(h){h.morphTargetInfluences&&l.push(h.name?h.name:h.uuid)}):l.push(a);let c;switch(Sr[s.path]){case Sr.weights:c=Vo;break;case Sr.rotation:c=Ns;break;case Sr.position:case Sr.scale:c=Go;break;default:switch(i.itemSize){case 1:c=Vo;break;case 2:case 3:default:c=Go;break}break}const u=r.interpolation!==void 0?$O[r.interpolation]:Bo,f=this._getArrayFromAccessor(i);for(let h=0,d=l.length;h<d;h++){const _=new c(l[h]+"."+Sr[s.path],t.array,f,u);r.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(_),o.push(_)}return o}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const i=Ch(t.constructor),r=new Float32Array(t.length);for(let s=0,o=t.length;s<o;s++)r[s]=t[s]*i;t=r}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(i){const r=this instanceof Ns?qO:hx;return new r(this.times,this.values,this.getValueSize()/3,i)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function nU(n,e,t){const i=e.attributes,r=new Pi;if(i.POSITION!==void 0){const a=t.json.accessors[i.POSITION],l=a.min,c=a.max;if(l!==void 0&&c!==void 0){if(r.set(new X(l[0],l[1],l[2]),new X(c[0],c[1],c[2])),a.normalized){const u=Ch(Eo[a.componentType]);r.min.multiplyScalar(u),r.max.multiplyScalar(u)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const s=e.targets;if(s!==void 0){const a=new X,l=new X;for(let c=0,u=s.length;c<u;c++){const f=s[c];if(f.POSITION!==void 0){const h=t.json.accessors[f.POSITION],d=h.min,_=h.max;if(d!==void 0&&_!==void 0){if(l.setX(Math.max(Math.abs(d[0]),Math.abs(_[0]))),l.setY(Math.max(Math.abs(d[1]),Math.abs(_[1]))),l.setZ(Math.max(Math.abs(d[2]),Math.abs(_[2]))),h.normalized){const m=Ch(Eo[h.componentType]);l.multiplyScalar(m)}a.max(l)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}r.expandByVector(a)}n.boundingBox=r;const o=new Li;r.getCenter(o.center),o.radius=r.min.distanceTo(r.max)/2,n.boundingSphere=o}function b_(n,e,t){const i=e.attributes,r=[];function s(o,a){return t.getDependency("accessor",o).then(function(l){n.setAttribute(a,l)})}for(const o in i){const a=Rh[o]||o.toLowerCase();a in n.attributes||r.push(s(i[o],a))}if(e.indices!==void 0&&!n.index){const o=t.getDependency("accessor",e.indices).then(function(a){n.setIndex(a)});r.push(o)}return Je.workingColorSpace!==Jt&&"COLOR_0"in i&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Je.workingColorSpace}" not supported.`),br(n,e),nU(n,e,t),Promise.all(r).then(function(){return e.targets!==void 0?YO(n,e.targets,t):n})}const iU=.005,Cf=.94,rU={__name:"Logo3D",props:{size:{type:String,default:"small"},responsive:{type:Boolean,default:!1},maxResponsiveSize:{type:Number,default:320}},setup(n){const e=zn(null),t=zn(null);let i,r,s,o,a,l,c,u;const f=new dO;let h=null;const d=Math.PI/2;let _=0,m=0,p=!1,g=0,x=!1,v,y=0,T=0;const b=n,A=()=>{if(b.responsive&&t.value){const U=t.value.getBoundingClientRect(),ne=Math.min(U.width,b.maxResponsiveSize);return{width:ne,height:ne}}if(b.size==="small"){const U=Math.min(window.innerWidth*.35,b.maxResponsiveSize);return{width:U,height:U}}return{width:window.innerWidth,height:window.innerHeight}},P=()=>{c=A(),!(!r||!s||!c)&&(r.aspect=c.width/c.height,r.updateProjectionMatrix(),s.setSize(c.width,c.height),s.setPixelRatio(Math.min(window.devicePixelRatio,b.responsive?1.5:2)))},S=()=>{c=A(),i=new ON,r=new gn(75,c.width/c.height,.1,100),r.position.set(0,.05,1),i.add(r);const ne=new ux().load("/images/matcap.jpg"),ae=new fO(16777215,1);i.add(ae),l=new TO,l.load("/logo.glb",function(me){o=me.scene;const Ue=new Pi().setFromObject(o).getCenter(new X);o.position.sub(Ue),a=new Cr,a.add(o),i.add(a),a.position.set(Ue.x,Ue.y,Ue.z),o.rotation.set(0,0,0),o.scale.set(Cf,Cf,Cf);const Q=new XN({matcap:ne,color:3684408});o.traverse(le=>{le.isMesh&&(le.material=Q)}),a.rotation.x=Math.PI/2},void 0,function(me){console.error("An error happened:",me)}),s=new NN({canvas:e.value,antialias:!0}),s.shadowMap.enabled=!0,s.shadowMap.type=My,s.setSize(c.width,c.height),s.setPixelRatio(Math.min(window.devicePixelRatio,b.responsive?1.5:2)),s.setClearColor(0,0),window.addEventListener("resize",M,!1)},M=()=>{P()},O=()=>{if(!x)return;const U=window.scrollY||window.pageYOffset,ne=U-T;T=U,y+=ne*8e-4,y=Fy.clamp(y,-.08,.08)},I=U=>{p=!0,g=U.clientX,e.value?.setPointerCapture?.(U.pointerId)},L=U=>{if(!p)return;const ne=U.clientX-g;g=U.clientX,_=ne*.01,m+=_},V=U=>{p&&(p=!1,e.value?.releasePointerCapture?.(U.pointerId))},$=()=>{x&&(f.getElapsedTime(),p||(_*=.94,m+=_+iU),y*=.9,m+=y,a&&(a.rotation.x+=(d-a.rotation.x)*.1,a.rotation.z+=(m-a.rotation.z)*.15),s.render(i,r),h=window.requestAnimationFrame($))},G=()=>{x||(x=!0,f.getElapsedTime(),$())},J=()=>{x&&(x=!1,h&&(window.cancelAnimationFrame(h),h=null))};return Zo(()=>{S(),b.responsive&&t.value&&(u=new ResizeObserver(()=>P()),u.observe(t.value)),e.value&&e.value.addEventListener("pointerdown",I),document.addEventListener("pointermove",L),document.addEventListener("pointerup",V),T=window.scrollY||window.pageYOffset||0,window.addEventListener("scroll",O,{passive:!0}),t.value?(v=new IntersectionObserver(U=>
vendor: 6,932 bytes, lines 3823-3830
3823{U.forEach(ne=>{ne.isIntersecting?G():J()})},{threshold:.1}),v.observe(t.value)):G()}),sd(()=>{window.removeEventListener("resize",M),J(),window.removeEventListener("scroll",O),e.value&&e.value.removeEventListener("pointerdown",I),document.removeEventListener("pointermove",L),document.removeEventListener("pointerup",V),u&&t.value&&u.unobserve(t.value),v&&t.value&&(v.unobserve(t.value),v.disconnect())}),(U,ne)=>(Ft(),qi("div",{ref_key:"rootEl",ref:t,class:Us([`logo-3d logo-3d--${n.size}`])},[Ot("canvas",{ref_key:"canvas",ref:e},null,512)],2))}},dx=ou(rU,[["__scopeId","data-v-26e47123"]]),sU=Object.freeze(Object.defineProperty({__proto__:null,default:dx},Symbol.toStringTag,{value:"Module"}));function Xi(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function px(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e}/*! 3824 * GSAP 3.14.2 3825 * https://gsap.com 3826 * 3827 * @license Copyright 2008-2025, GreenSock. All rights reserved. 3828 * Subject to the terms at https://gsap.com/standard-license 3829 * @author: Jack Doyle, [email protected] 3830*/var Vn={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Wo={duration:.5,overwrite:!1,delay:0},Hd,Zt,pt,Zn=1e8,it=1/Zn,Ph=Math.PI*2,oU=Ph/4,aU=0,mx=Math.sqrt,lU=Math.cos,cU=Math.sin,jt=function(e){return typeof e=="string"},At=function(e){return typeof e=="function"},or=function(e){return typeof e=="number"},zd=function(e){return typeof e>"u"},Ri=function(e){return typeof e=="object"},An=function(e){return e!==!1},Vd=function(){return typeof window<"u"},tc=function(e){return At(e)||jt(e)},gx=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},cn=Array.isArray,uU=/random\([^)]+\)/g,fU=/,\s*/g,A_=/(?:-?\.?\d|\.)+/gi,_x=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,uo=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Pf=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,vx=/[+-]=-?[.\d]+/,hU=/[^,'"\[\]\s]+/gi,dU=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,St,vi,Lh,Gd,Gn={},kc={},yx,xx=function(e){return(kc=Xo(e,Gn))&&Pn},Wd=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},$a=function(e,t){return!t&&console.warn(e)},Sx=function(e,t){return e&&(Gn[e]=t)&&kc&&(kc[e]=t)||Gn},Ka=function(){return 0},pU={suppressEvents:!0,isStart:!0,kill:!1},lc={suppressEvents:!0,kill:!1},mU={suppressEvents:!0},Xd={},Hr=[],Ih={},Mx,On={},Lf={},w_=30,cc=[],jd="",qd=function(e){var t=e[0],i,r;if(Ri(t)||At(t)||(e=[e]),!(i=(t._gsap||{}).harness)){for(r=cc.length;r--&&!cc[r].targetTest(t););i=cc[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new jx(e[r],i)))||e.splice(r,1);return e},bs=function(e){return e._gsap||qd(Jn(e))[0]._gsap},Tx=function(e,t,i){return(i=e[t])&&At(i)?e[t]():zd(i)&&e.getAttribute&&e.getAttribute(t)||i},wn=function(e,t){return(e=e.split(",")).forEach(t)||e},Rt=function(e){return Math.round(e*1e5)/1e5||0},yt=function(e){return Math.round(e*1e7)/1e7||0},bo=function(e,t){var i=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),i==="+"?e+r:i==="-"?e-r:i==="*"?e*r:e/r},gU=function(e,t){for(var i=t.length,r=0;e.indexOf(t[r])<0&&++r<i;);return r<i},Bc=function(){var e=Hr.length,t=Hr.slice(0),i,r;for(Ih={},Hr.length=0,i=0;i<e;i++)r=t[i],r&&r._lazy&&(r.render(r._lazy[0],r._lazy[1],!0)._lazy=0)},$d=function(e){return!!(e._initted||e._startAt||e.add)},Ex=function(e,t,i,r){Hr.length&&!Zt&&Bc(),e.render(t,i,!!(Zt&&t<0&&$d(e))),Hr.length&&!Zt&&Bc()},bx=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(hU).length<2?t:jt(e)?e.trim():e},Ax=function(e){return e},Wn=function(e,t){for(var i in t)i in e||(e[i]=t[i]);return e},_U=function(e){return function(t,i){for(var r in i)r in t||r==="duration"&&e||r==="ease"||(t[r]=i[r])}},Xo=function(e,t){for(var i in t)e[i]=t[i];return e},R_=function n(e,t){for(var i in t)i!=="__proto__"&&i!=="constructor"&&i!=="prototype"&&(e[i]=Ri(t[i])?n(e[i]||(e[i]={}),t[i]):t[i]);return e},Hc=function(e,t){var i={},r;for(r in e)r in t||(i[r]=e[r]);return i},Oa=function(e){var t=e.parent||St,i=e.keyframes?_U(cn(e.keyframes)):Wn;if(An(e.inherit))for(;t;)i(e,t.vars.defaults),t=t.parent||t._dp;return e},vU=function(e,t){for(var i=e.length,r=i===t.length;r&&i--&&e[i]===t[i];);return i<0},wx=function(e,t,i,r,s){var o=e[r],a;if(s)for(a=t[s];o&&o[s]>a;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[i],e[i]=t),t._next?t._next._prev=t:e[r]=t,t._prev=o,t.parent=t._dp=e,t},hu=function(e,t,i,r){i===void 0&&(i="_first"),r===void 0&&(r="_last");var s=t._prev,o=t._next;s?s._next=o:e[i]===t&&(e[i]=o),o?o._prev=s:e[r]===t&&(e[r]=s),t._next=t._prev=t.parent=null},Gr=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},As=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var i=e;i;)i._dirty=1,i=i.parent;return e},yU=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},Dh=function(e,t,i,r){return e._startAt&&(Zt?e._startAt.revert(lc):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},xU=function n(e){return!e||e._ts&&n(e.parent)},C_=function(e){return e._repeat?jo(e._tTime,e=e.duration()+e._rDelay)*e:0},jo=function(e,t){var i=Math.floor(e=yt(e/t));return e&&i===e?i-1:i},zc=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},du=function(e){return e._end=yt(e._start+(e._tDur/Math.abs(e._ts||e._rts||it)||0))},pu=function(e,t){var i=e._dp;return i&&i.smoothChildTiming&&e._ts&&(e._start=yt(i._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),du(e),i._dirty||As(i,e)),e},Rx=function(e,t){var i;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(i=zc(e.rawTime(),t),(!t._dur||pl(0,t.totalDuration(),i)-t._tTime>it)&&t.render(i,!0)),As(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(i=e;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;e._zTime=-it}},Mi=function(e,t,i,r){return t.parent&&Gr(t),t._start=yt((or(i)?i:i||e!==St?$n(e,i,t):e._time)+t._delay),t._end=yt(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),wx(e,t,"_first","_last",e._sort?"_start":0),Nh(t)||(e._recent=t),r||Rx(e,t),e._ts<0&&pu(e,e._tTime),e},Cx=function(e,t){return(Gn.ScrollTrigger||Wd("scrollTrigger",t))&&Gn.ScrollTrigger.create(t,e)},Px=function(e,t,i,r,s){if(Yd(e,t,s),!e._initted)return 1;if(!i&&e._pt&&!Zt&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&Mx!==Fn.frame)return Hr.push(e),e._lazy=[s,r],1},SU=function n(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||n(t))},Nh=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},MU=function(e,t,i,r){var s=e.ratio,o=t<0||!t&&(!e._start&&SU(e)&&!(!e._initted&&Nh(e))||(e._ts<0||e._dp._ts<0)&&!Nh(e))?0:1,a=e._rDelay,l=0,c,u,f;if(a&&e._repeat&&(l=pl(0,e._tDur,t),u=jo(l,a),e._yoyo&&u&1&&(o=1-o),u!==jo(e._tTime,a)&&(s=1-o,e.vars.repeatRefresh&&e._initted&&e.invali
vendor: 4,925 bytes, line 3830
3830date())),o!==s||Zt||r||e._zTime===it||!t&&e._zTime){if(!e._initted&&Px(e,t,r,i,l))return;for(f=e._zTime,e._zTime=t||(i?it:0),i||(i=t&&!f),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=l,c=e._pt;c;)c.r(o,c.d),c=c._next;t<0&&Dh(e,t,i,!0),e._onUpdate&&!i&&Bn(e,"onUpdate"),l&&e._repeat&&!i&&e.parent&&Bn(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&Gr(e,1),!i&&!Zt&&(Bn(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},TU=function(e,t,i){var r;if(i>t)for(r=e._first;r&&r._start<=i;){if(r.data==="isPause"&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=i;){if(r.data==="isPause"&&r._start<t)return r;r=r._prev}},qo=function(e,t,i,r){var s=e._repeat,o=yt(t)||0,a=e._tTime/e._tDur;return a&&!r&&(e._time*=o/e._dur),e._dur=o,e._tDur=s?s<0?1e10:yt(o*(s+1)+e._rDelay*s):o,a>0&&!r&&pu(e,e._tTime=e._tDur*a),e.parent&&du(e),i||As(e.parent,e),e},P_=function(e){return e instanceof vn?As(e):qo(e,e._dur)},EU={_start:0,endTime:Ka,totalDuration:Ka},$n=function n(e,t,i){var r=e.labels,s=e._recent||EU,o=e.duration()>=Zn?s.endTime(!1):e._dur,a,l,c;return jt(t)&&(isNaN(t)||t in r)?(l=t.charAt(0),c=t.substr(-1)==="%",a=t.indexOf("="),l==="<"||l===">"?(a>=0&&(t=t.replace(/=/,"")),(l==="<"?s._start:s.endTime(s._repeat>=0))+(parseFloat(t.substr(1))||0)*(c?(a<0?s:i).totalDuration()/100:1)):a<0?(t in r||(r[t]=o),r[t]):(l=parseFloat(t.charAt(a-1)+t.substr(a+1)),c&&i&&(l=l/100*(cn(i)?i[0]:i).totalDuration()),a>1?n(e,t.substr(0,a-1),i)+l:o+l)):t==null?o:+t},Ua=function(e,t,i){var r=or(t[1]),s=(r?2:1)+(e<2?0:1),o=t[s],a,l;if(r&&(o.duration=t[1]),o.parent=i,e){for(a=o,l=i;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=An(l.vars.inherit)&&l.parent;o.immediateRender=An(a.immediateRender),e<2?o.runBackwards=1:o.startAt=t[s-1]}return new Pt(t[0],o,t[s+1])},$r=function(e,t){return e||e===0?t(e):t},pl=function(e,t,i){return i<e?e:i>t?t:i},ln=function(e,t){return!jt(e)||!(t=dU.exec(e))?"":t[1]},bU=function(e,t,i){return $r(i,function(r){return pl(e,t,r)})},Oh=[].slice,Lx=function(e,t){return e&&Ri(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&Ri(e[0]))&&!e.nodeType&&e!==vi},AU=function(e,t,i){return i===void 0&&(i=[]),e.forEach(function(r){var s;return jt(r)&&!t||Lx(r,1)?(s=i).push.apply(s,Jn(r)):i.push(r)})||i},Jn=function(e,t,i){return pt&&!t&&pt.selector?pt.selector(e):jt(e)&&!i&&(Lh||!$o())?Oh.call((t||Gd).querySelectorAll(e),0):cn(e)?AU(e,i):Lx(e)?Oh.call(e,0):e?[e]:[]},Uh=function(e){return e=Jn(e)[0]||$a("Invalid scope")||{},function(t){var i=e.current||e.nativeElement||e;return Jn(t,i.querySelectorAll?i:i===e?$a("Invalid scope")||Gd.createElement("div"):e)}},Ix=function(e){return e.sort(function(){return .5-Math.random()})},Dx=function(e){if(At(e))return e;var t=Ri(e)?e:{each:e},i=ws(t.ease),r=t.from||0,s=parseFloat(t.base)||0,o={},a=r>0&&r<1,l=isNaN(r)||a,c=t.axis,u=r,f=r;return jt(r)?u=f={center:.5,edges:.5,end:1}[r]||0:!a&&l&&(u=r[0],f=r[1]),function(h,d,_){var m=(_||t).length,p=o[m],g,x,v,y,T,b,A,P,S;if(!p){if(S=t.grid==="auto"?0:(t.grid||[1,Zn])[1],!S){for(A=-Zn;A<(A=_[S++].getBoundingClientRect().left)&&S<m;);S<m&&S--}for(p=o[m]=[],g=l?Math.min(S,m)*u-.5:r%S,x=S===Zn?0:l?m*f/S-.5:r/S|0,A=0,P=Zn,b=0;b<m;b++)v=b%S-g,y=x-(b/S|0),p[b]=T=c?Math.abs(c==="y"?y:v):mx(v*v+y*y),T>A&&(A=T),T<P&&(P=T);r==="random"&&Ix(p),p.max=A-P,p.min=P,p.v=m=(parseFloat(t.amount)||parseFloat(t.each)*(S>m?m-1:c?c==="y"?m/S:S:Math.max(S,m/S))||0)*(r==="edges"?-1:1),p.b=m<0?s-m:s,p.u=ln(t.amount||t.each)||0,i=i&&m<0?Gx(i):i}return m=(p[h]-p.min)/p.max||0,yt(p.b+(i?i(m):m)*p.v)+p.u}},Fh=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(i){var r=yt(Math.round(parseFloat(i)/e)*e*t);return(r-r%1)/t+(or(i)?0:ln(i))}},Nx=function(e,t){var i=cn(e),r,s;return!i&&Ri(e)&&(r=i=e.radius||Zn,e.values?(e=Jn(e.values),(s=!or(e[0]))&&(r*=r)):e=Fh(e.increment)),$r(t,i?At(e)?function(o){return s=e(o),Math.abs(s-o)<=r?s:o}:function(o){for(var a=parseFloat(s?o.x:o),l=parseFloat(s?o.y:0),c=Zn,u=0,f=e.length,h,d;f--;)s?(h=e[f].x-a,d=e[f].y-l,h=h*h+d*d):h=Math.abs(e[f]-a),h<c&&(c=h,u=f);return u=!r||c<=r?e[u]:o,s||u===o||or(o)?u:u+ln(o)}:Fh(e))},Ox=function(e,t,i,r){return $r(cn(e)?!t:i===!0?!!(i=0):!r,function(){return cn(e)?e[~~(Math.random()*e.length)]:(i=i||1e-5)&&(r=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((e-i/2+Math.random()*(t-e+i*.99))/i)*i*r)/r})},wU=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(r){return t.reduce(function(s,o){return o(s)},r)}},RU=function(e,t){return function(i){return e(parseFloat(i))+(t||ln(i))}},CU=function(e,t,i){return Fx(e,t,0,1,i)},Ux=function(e,t,i){return $r(i,function(r){return e[~~t(r)]})},PU=function n(e,t,i){var r=t-e;return cn(e)?Ux(e,n(0,e.length),t):$r(i,function(s){return(r+(s-e)%r)%r+e})},LU=function n(e,t,i){var r=t-e,s=r*2;return cn(e)?Ux(e,n(0,e.length-1),t):$r(i,function(o){return o=(s+(o-e)%s)%s||
vendor: 4,581 bytes, line 3830
38300,e+(o>r?s-o:o)})},Ya=function(e){return e.replace(uU,function(t){var i=t.indexOf("[")+1,r=t.substring(i||7,i?t.indexOf("]"):t.length-1).split(fU);return Ox(i?r:+r[0],i?0:+r[1],+r[2]||1e-5)})},Fx=function(e,t,i,r,s){var o=t-e,a=r-i;return $r(s,function(l){return i+((l-e)/o*a||0)})},IU=function n(e,t,i,r){var s=isNaN(e+t)?0:function(d){return(1-d)*e+d*t};if(!s){var o=jt(e),a={},l,c,u,f,h;if(i===!0&&(r=1)&&(i=null),o)e={p:e},t={p:t};else if(cn(e)&&!cn(t)){for(u=[],f=e.length,h=f-2,c=1;c<f;c++)u.push(n(e[c-1],e[c]));f--,s=function(_){_*=f;var m=Math.min(h,~~_);return u[m](_-m)},i=t}else r||(e=Xo(cn(e)?[]:{},e));if(!u){for(l in t)Kd.call(a,e,l,"get",t[l]);s=function(_){return Qd(_,a)||(o?e.p:e)}}}return $r(i,s)},L_=function(e,t,i){var r=e.labels,s=Zn,o,a,l;for(o in r)a=r[o]-t,a<0==!!i&&a&&s>(a=Math.abs(a))&&(l=o,s=a);return l},Bn=function(e,t,i){var r=e.vars,s=r[t],o=pt,a=e._ctx,l,c,u;if(s)return l=r[t+"Params"],c=r.callbackScope||e,i&&Hr.length&&Bc(),a&&(pt=a),u=l?s.apply(c,l):s.call(c),pt=o,u},Ma=function(e){return Gr(e),e.scrollTrigger&&e.scrollTrigger.kill(!!Zt),e.progress()<1&&Bn(e,"onInterrupt"),e},fo,kx=[],Bx=function(e){if(e)if(e=!e.name&&e.default||e,Vd()||e.headless){var t=e.name,i=At(e),r=t&&!i&&e.init?function(){this._props=[]}:e,s={init:Ka,render:Qd,add:Kd,kill:$U,modifier:qU,rawVars:0},o={targetTest:0,get:0,getSetter:Jd,aliases:{},register:0};if($o(),e!==r){if(On[t])return;Wn(r,Wn(Hc(e,s),o)),Xo(r.prototype,Xo(s,Hc(e,o))),On[r.prop=t]=r,e.targetTest&&(cc.push(r),Xd[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}Sx(t,r),e.register&&e.register(Pn,r,Rn)}else kx.push(e)},nt=255,Ta={aqua:[0,nt,nt],lime:[0,nt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,nt],navy:[0,0,128],white:[nt,nt,nt],olive:[128,128,0],yellow:[nt,nt,0],orange:[nt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[nt,0,0],pink:[nt,192,203],cyan:[0,nt,nt],transparent:[nt,nt,nt,0]},If=function(e,t,i){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(i-t)*e*6:e<.5?i:e*3<2?t+(i-t)*(2/3-e)*6:t)*nt+.5|0},Hx=function(e,t,i){var r=e?or(e)?[e>>16,e>>8&nt,e&nt]:0:Ta.black,s,o,a,l,c,u,f,h,d,_;if(!r){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Ta[e])r=Ta[e];else if(e.charAt(0)==="#"){if(e.length<6&&(s=e.charAt(1),o=e.charAt(2),a=e.charAt(3),e="#"+s+s+o+o+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return r=parseInt(e.substr(1,6),16),[r>>16,r>>8&nt,r&nt,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),r=[e>>16,e>>8&nt,e&nt]}else if(e.substr(0,3)==="hsl"){if(r=_=e.match(A_),!t)l=+r[0]%360/360,c=+r[1]/100,u=+r[2]/100,o=u<=.5?u*(c+1):u+c-u*c,s=u*2-o,r.length>3&&(r[3]*=1),r[0]=If(l+1/3,s,o),r[1]=If(l,s,o),r[2]=If(l-1/3,s,o);else if(~e.indexOf("="))return r=e.match(_x),i&&r.length<4&&(r[3]=1),r}else r=e.match(A_)||Ta.transparent;r=r.map(Number)}return t&&!_&&(s=r[0]/nt,o=r[1]/nt,a=r[2]/nt,f=Math.max(s,o,a),h=Math.min(s,o,a),u=(f+h)/2,f===h?l=c=0:(d=f-h,c=u>.5?d/(2-f-h):d/(f+h),l=f===s?(o-a)/d+(o<a?6:0):f===o?(a-s)/d+2:(s-o)/d+4,l*=60),r[0]=~~(l+.5),r[1]=~~(c*100+.5),r[2]=~~(u*100+.5)),i&&r.length<4&&(r[3]=1),r},zx=function(e){var t=[],i=[],r=-1;return e.split(zr).forEach(function(s){var o=s.match(uo)||[];t.push.apply(t,o),i.push(r+=o.length+1)}),t.c=i,t},I_=function(e,t,i){var r="",s=(e+r).match(zr),o=t?"hsla(":"rgba(",a=0,l,c,u,f;if(!s)return e;if(s=s.map(function(h){return(h=Hx(h,t,1))&&o+(t?h[0]+","+h[1]+"%,"+h[2]+"%,"+h[3]:h.join(","))+")"}),i&&(u=zx(e),l=i.c,l.join(r)!==u.c.join(r)))for(c=e.replace(zr,"1").split(uo),f=c.length-1;a<f;a++)r+=c[a]+(~l.indexOf(a)?s.shift()||o+"0,0,0,0)":(u.length?u:s.length?s:i).shift());if(!c)for(c=e.split(zr),f=c.length-1;a<f;a++)r+=c[a]+s[a];return r+c[f]},zr=(function(){var n="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in Ta)n+="|"+e+"\\b";return new RegExp(n+")","gi")})(),DU=/hsl[a]?\(/,Vx=function(e){var t=e.join(" "),i;if(zr.lastIndex=0,zr.test(t))return i=DU.test(t),e[1]=I_(e[1],i),e[0]=I_(e[0],i,zx(e[1])),!0},Za,Fn=(function(){var n=Date.now,e=500,t=33,i=n(),r=i,s=1e3/240,o=s,a=[],l,c,u,f,h,d,_=function m(p){var g=n()-r,x=p===!0,v,y,T,b;if((g>e||g<0)&&(i+=g-t),r+=g,T=r-i,v=T-o,(v>0||x)&&(b=++f.frame,h=T-f.time*1e3,f.time=T=T/1e3,o+=v+(v>=s?4:s-v),y=1),x||(l=c(m)),y)for(d=0;d<a.length;d++)a[d](T,h,b,p)};return f={time:0,frame:0,tick:function(){_(!0)},deltaRatio:function(p){return h/(1e3/(p||60))},wake:function(){yx&&(!Lh&&Vd()&&(vi=Lh=window,Gd=vi.document||{},Gn.gsap=Pn,(vi.gsapVersions||(vi.gsapVersions=[])).push(Pn.version),xx(kc||vi.GreenSockGlobals||!vi.gsap&&vi||{}
vendor: 11,016 bytes, line 3830
3830),kx.forEach(Bx)),u=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&f.sleep(),c=u||function(p){return setTimeout(p,o-f.time*1e3+1|0)},Za=1,_(2))},sleep:function(){(u?cancelAnimationFrame:clearTimeout)(l),Za=0,c=Ka},lagSmoothing:function(p,g){e=p||1/0,t=Math.min(g||33,e)},fps:function(p){s=1e3/(p||240),o=f.time*1e3+s},add:function(p,g,x){var v=g?function(y,T,b,A){p(y,T,b,A),f.remove(v)}:p;return f.remove(p),a[x?"unshift":"push"](v),$o(),v},remove:function(p,g){~(g=a.indexOf(p))&&a.splice(g,1)&&d>=g&&d--},_listeners:a},f})(),$o=function(){return!Za&&Fn.wake()},qe={},NU=/^[\d.\-M][\d.\-,\s]/,OU=/["']/g,UU=function(e){for(var t={},i=e.substr(1,e.length-3).split(":"),r=i[0],s=1,o=i.length,a,l,c;s<o;s++)l=i[s],a=s!==o-1?l.lastIndexOf(","):l.length,c=l.substr(0,a),t[r]=isNaN(c)?c.replace(OU,"").trim():+c,r=l.substr(a+1).trim();return t},FU=function(e){var t=e.indexOf("(")+1,i=e.indexOf(")"),r=e.indexOf("(",t);return e.substring(t,~r&&r<i?e.indexOf(")",i+1):i)},kU=function(e){var t=(e+"").split("("),i=qe[t[0]];return i&&t.length>1&&i.config?i.config.apply(null,~e.indexOf("{")?[UU(t[1])]:FU(e).split(",").map(bx)):qe._CE&&NU.test(e)?qe._CE("",e):i},Gx=function(e){return function(t){return 1-e(1-t)}},Wx=function n(e,t){for(var i=e._first,r;i;)i instanceof vn?n(i,t):i.vars.yoyoEase&&(!i._yoyo||!i._repeat)&&i._yoyo!==t&&(i.timeline?n(i.timeline,t):(r=i._ease,i._ease=i._yEase,i._yEase=r,i._yoyo=t)),i=i._next},ws=function(e,t){return e&&(At(e)?e:qe[e]||kU(e))||t},ks=function(e,t,i,r){i===void 0&&(i=function(l){return 1-t(1-l)}),r===void 0&&(r=function(l){return l<.5?t(l*2)/2:1-t((1-l)*2)/2});var s={easeIn:t,easeOut:i,easeInOut:r},o;return wn(e,function(a){qe[a]=Gn[a]=s,qe[o=a.toLowerCase()]=i;for(var l in s)qe[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=qe[a+"."+l]=s[l]}),s},Xx=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},Df=function n(e,t,i){var r=t>=1?t:1,s=(i||(e?.3:.45))/(t<1?t:1),o=s/Ph*(Math.asin(1/r)||0),a=function(u){return u===1?1:r*Math.pow(2,-10*u)*cU((u-o)*s)+1},l=e==="out"?a:e==="in"?function(c){return 1-a(1-c)}:Xx(a);return s=Ph/s,l.config=function(c,u){return n(e,c,u)},l},Nf=function n(e,t){t===void 0&&(t=1.70158);var i=function(o){return o?--o*o*((t+1)*o+t)+1:0},r=e==="out"?i:e==="in"?function(s){return 1-i(1-s)}:Xx(i);return r.config=function(s){return n(e,s)},r};wn("Linear,Quad,Cubic,Quart,Quint,Strong",function(n,e){var t=e<5?e+1:e;ks(n+",Power"+(t-1),e?function(i){return Math.pow(i,t)}:function(i){return i},function(i){return 1-Math.pow(1-i,t)},function(i){return i<.5?Math.pow(i*2,t)/2:1-Math.pow((1-i)*2,t)/2})});qe.Linear.easeNone=qe.none=qe.Linear.easeIn;ks("Elastic",Df("in"),Df("out"),Df());(function(n,e){var t=1/e,i=2*t,r=2.5*t,s=function(a){return a<t?n*a*a:a<i?n*Math.pow(a-1.5/e,2)+.75:a<r?n*(a-=2.25/e)*a+.9375:n*Math.pow(a-2.625/e,2)+.984375};ks("Bounce",function(o){return 1-s(1-o)},s)})(7.5625,2.75);ks("Expo",function(n){return Math.pow(2,10*(n-1))*n+n*n*n*n*n*n*(1-n)});ks("Circ",function(n){return-(mx(1-n*n)-1)});ks("Sine",function(n){return n===1?1:-lU(n*oU)+1});ks("Back",Nf("in"),Nf("out"),Nf());qe.SteppedEase=qe.steps=Gn.SteppedEase={config:function(e,t){e===void 0&&(e=1);var i=1/e,r=e+(t?0:1),s=t?1:0,o=1-it;return function(a){return((r*pl(0,o,a)|0)+s)*i}}};Wo.ease=qe["quad.out"];wn("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(n){return jd+=n+","+n+"Params,"});var jx=function(e,t){this.id=aU++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:Tx,this.set=t?t.getSetter:Jd},Ja=(function(){function n(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,qo(this,+t.duration,1,1),this.data=t.data,pt&&(this._ctx=pt,pt.data.push(this)),Za||Fn.wake()}var e=n.prototype;return e.delay=function(i){return i||i===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+i-this._delay),this._delay=i,this):this._delay},e.duration=function(i){return arguments.length?this.totalDuration(this._repeat>0?i+(i+this._rDelay)*this._repeat:i):this.totalDuration()&&this._dur},e.totalDuration=function(i){return arguments.length?(this._dirty=0,qo(this,this._repeat<0?i:(i-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(i,r){if($o(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(pu(this,i),!s._dp||s.parent||Rx(s,this);s&&s.parent;)s.parent._time!==s._start+(s._ts>=0?s._tTime/s._ts:(s.totalDuration()-s._tTime)/-s._ts)&&s.totalTime(s._tTime,!0),s=s.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&i<this._tDur||this._ts<0&&i>0||!this._tDur&&!i)&&Mi(this._dp,this,this._start-this._delay)}return(this._tTime!==i||!this._dur&&!r||this._initted&&Math.abs(this._zTime)===it||!this._initted&&this._dur&&i||!i&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=i),Ex(this,i,r)),this},e.time=function(i,r){return arguments.length?this.totalTime(Math.min(this.totalDuration(),i+C_(this))%(this._dur+this._rDelay)||(i?this._dur:0),r):this._time},e.totalProgress=function(i,r){return arguments.length?this.totalTime(this.totalDuration()*i,r):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(i,r){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-i:i)+C_(this),r):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(i,r){var s=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(i-1)*s,r):this._repeat?jo(this._tTime,s)+1:1},e.timeScale=function(i,r){if(!arguments.length)return this._rts===-it?0:this._rts;if(this._rts===i)return this;var s=this.parent&&this._ts?zc(this.parent._time,this):this._tTime;return this._rts=+i||0,this._ts=this._ps||i===-it?0:this._rts,this.totalTime(pl(-Math.abs(this._delay),this.totalDuration(),s),r!==!1),du(this),yU(this)},e.paused=function(i){return arguments.length?(this._ps!==i&&(this._ps=i,i?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):($o(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==it&&(this._tTime-=it)))),this):this._ps},e.startTime=function(i){if(arguments.length){this._start=yt(i);var r=this.parent||this._dp;return r&&(r._sort||!this.parent)&&Mi(r,this,this._start-this._delay),this}return this._start},e.endTime=function(i){return this._start+(An(i)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(i){var r=this.parent||this._dp;return r?i&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?zc(r.rawTime(i),this):this._tTime:this._tTime},e.revert=function(i){i===void 0&&(i=mU);var r=Zt;return Zt=i,$d(this)&&(this.timeline&&this.timeline.revert(i),this.totalTime(-.01,i.suppressEvents)),this.data!=="nested"&&i.kill!==!1&&this.kill(),Zt=r,this},e.globalTime=function(i){for(var r=this,s=arguments.length?i:r.rawTime();r;)s=r._start+s/(Math.abs(r._ts)||1),r=r._dp;return!this.parent&&this._sat?this._sat.globalTime(i):s},e.repeat=function(i){return arguments.length?(this._repeat=i===1/0?-2:i,P_(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(i){if(arguments.length){var r=this._time;return this._rDelay=i,P_(this),r?this.time(r):this}return this._rDelay},e.yoyo=function(i){return arguments.length?(this._yoyo=i,this):this._yoyo},e.seek=function(i,r){return this.totalTime($n(this,i),An(r))},e.restart=function(i,r){return this.play().totalTime(i?-this._delay:0,An(r)),this._dur||(this._zTime=-it),this},e.play=function(i,r){return i!=null&&this.seek(i,r),this.reversed(!1).paused(!1)},e.reverse=function(i,r){return i!=null&&this.seek(i||this.totalDuration(),r),this.reversed(!0).paused(!1)},e.pause=function(i,r){return i!=null&&this.seek(i,r),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(i){return arguments.length?(!!i!==this.reversed()&&this.timeScale(-this._rts||(i?-it:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-it,this},e.isActive=function(){var i=this.parent||this._dp,r=this._start,s;return!!(!i||this._ts&&this._initted&&i.isActive()&&(s=i.rawTime(!0))>=r&&s<this.endTime(!0)-it)},e.eventCallback=function(i,r,s){var o=this.vars;return arguments.length>1?(r?(o[i]=r,s&&(o[i+"Params"]=s),i==="onUpdate"&&(this._onUpdate=r)):delete o[i],this):o[i]},e.then=function(i){var r=this,s=r._prom;return new Promise(function(o){var a=At(i)?i:Ax,l=function(){var u=r.then;r.then=null,s&&s(),At(a)&&(a=a(r))&&(a.then||a===r)&&(r.then=u),o(a),r.then=u};r._initted&&r.totalProgress()===1&&r._ts>=0||!r._tTime&&r._ts<0?l():r._prom=l})},e.kill=function(){Ma(this)},n})();Wn(Ja.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-it,_prom:0,_ps:!1,_rts:1});var vn=(function(n){px(e,n);function e(i,r){var s;return i===void 0&&(i={}),s=n.call(this,i)||this,s.labels={},s.smoothChildTiming=!!i.smoothChildTiming,s.autoRemoveChildren=!!i.autoRemoveChildren,s._sort=An(i.sortChildren),St&&Mi(i.parent||St,Xi(s),r),i.reversed&&s.reverse(),i.paused&&s.paused(!0),i.scrollTrigger&&Cx(Xi(s),i.scrollTrigger),s}var t=e.prototype;return t.to=function(r,s,o){return Ua(0,arguments,this),this},t.from=function(r,s,o){return Ua(1,arguments,this),this},t.fromTo=function(r,s,o,a){return Ua(2,arguments,this),this},t.set=function(r,s,o){return s.duration=0,s.parent=this,Oa(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new Pt(r,s,$n(this,o),1),this},t.call=function(r,s,o){return Mi(this,Pt.delayedCall(0,r,s),o)},t.staggerTo=function(r,s,o,a,l,c,u){return o.duration=s,o.stagger=o.stagger||a,o.onComplete=c,o.onCompleteParams=u,o.parent=this,new Pt(r,o,$n(this,l)),this},t.staggerFrom=function(r,s,o,a,l,c,u){return o.runBackwards=1,Oa(o).immediateRender=An(o.immediateRender),this.staggerTo(r,s,o,a,l,c,u)},t.staggerFromTo=function(r,s,o,a,l,c,u,f){return a.startAt=o,Oa(a).immediateRender=An(a.immediateRender),this.staggerTo(r,s,a,l,c,u,f)},t.render=function(r,s,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,c=this._dur,u=r<=0?0:yt(r),f=this._zTime<0!=r<0&&(this._initted||!c),h,d,_,m,p,g,x,v,y,T,b,A;if(this!==St&&u>l&&r>=0&&(u=l),u!==this._tTime||o||f){if(a!==this._time&&c&&(u+=this._time-a,r+=this._time-a),h=u,y=this._start,v=this._ts,g=!v,f&&(c||(a=this._zTime),(r||!s)&&(this._zTime=r)),this._repeat){if(b=this._yoyo,p=c+this._rDelay,this._repeat<-1&&r<0)return this.totalTime(p*100+r,s,o);if(h=yt(u%p),u===l?(m=this._repeat,h=c):(T=yt(u/p),m=~~T,m&&m===T&&(h=c,m--),h>c&&(h=c)),T=jo(this._tTime,p),!a&&this._tTime&&T!==m&&this._tTime-T*p-this._dur<=0&&(T=m),b&&m&1&&(h=c-h,A=1),m!==T&&!this._lock){var P=b&&T&1,S=P===(b&&m&1);
vendor: 6,222 bytes, line 3830
3830if(m<T&&(P=!P),a=P?0:u%c?c:u,this._lock=1,this.render(a||(A?0:yt(m*p)),s,!c)._lock=0,this._tTime=u,!s&&this.parent&&Bn(this,"onRepeat"),this.vars.repeatRefresh&&!A&&(this.invalidate()._lock=1,T=m),a&&a!==this._time||g!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(c=this._dur,l=this._tDur,S&&(this._lock=2,a=P?c:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!A&&this.invalidate()),this._lock=0,!this._ts&&!g)return this;Wx(this,A)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(x=TU(this,yt(a),yt(h)),x&&(u-=h-(h=x._start))),this._tTime=u,this._time=h,this._act=!v,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=r,a=0),!a&&u&&c&&!s&&!T&&(Bn(this,"onStart"),this._tTime!==u))return this;if(h>=a&&r>=0)for(d=this._first;d;){if(_=d._next,(d._act||h>=d._start)&&d._ts&&x!==d){if(d.parent!==this)return this.render(r,s,o);if(d.render(d._ts>0?(h-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(h-d._start)*d._ts,s,o),h!==this._time||!this._ts&&!g){x=0,_&&(u+=this._zTime=-it);break}}d=_}else{d=this._last;for(var M=r<0?r:h;d;){if(_=d._prev,(d._act||M<=d._end)&&d._ts&&x!==d){if(d.parent!==this)return this.render(r,s,o);if(d.render(d._ts>0?(M-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(M-d._start)*d._ts,s,o||Zt&&$d(d)),h!==this._time||!this._ts&&!g){x=0,_&&(u+=this._zTime=M?-it:it);break}}d=_}}if(x&&!s&&(this.pause(),x.render(h>=a?0:-it)._zTime=h>=a?1:-1,this._ts))return this._start=y,du(this),this.render(r,s,o);this._onUpdate&&!s&&Bn(this,"onUpdate",!0),(u===l&&this._tTime>=this.totalDuration()||!u&&a)&&(y===this._start||Math.abs(v)!==Math.abs(this._ts))&&(this._lock||((r||!c)&&(u===l&&this._ts>0||!u&&this._ts<0)&&Gr(this,1),!s&&!(r<0&&!a)&&(u||a||!l)&&(Bn(this,u===l&&r>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(u<l&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(r,s){var o=this;if(or(s)||(s=$n(this,s,r)),!(r instanceof Ja)){if(cn(r))return r.forEach(function(a){return o.add(a,s)}),this;if(jt(r))return this.addLabel(r,s);if(At(r))r=Pt.delayedCall(0,r);else return this}return this!==r?Mi(this,r,s):this},t.getChildren=function(r,s,o,a){r===void 0&&(r=!0),s===void 0&&(s=!0),o===void 0&&(o=!0),a===void 0&&(a=-Zn);for(var l=[],c=this._first;c;)c._start>=a&&(c instanceof Pt?s&&l.push(c):(o&&l.push(c),r&&l.push.apply(l,c.getChildren(!0,s,o)))),c=c._next;return l},t.getById=function(r){for(var s=this.getChildren(1,1,1),o=s.length;o--;)if(s[o].vars.id===r)return s[o]},t.remove=function(r){return jt(r)?this.removeLabel(r):At(r)?this.killTweensOf(r):(r.parent===this&&hu(this,r),r===this._recent&&(this._recent=this._last),As(this))},t.totalTime=function(r,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=yt(Fn.time-(this._ts>0?r/this._ts:(this.totalDuration()-r)/-this._ts))),n.prototype.totalTime.call(this,r,s),this._forcing=0,this):this._tTime},t.addLabel=function(r,s){return this.labels[r]=$n(this,s),this},t.removeLabel=function(r){return delete this.labels[r],this},t.addPause=function(r,s,o){var a=Pt.delayedCall(0,s||Ka,o);return a.data="isPause",this._hasPause=1,Mi(this,a,$n(this,r))},t.removePause=function(r){var s=this._first;for(r=$n(this,r);s;)s._start===r&&s.data==="isPause"&&Gr(s),s=s._next},t.killTweensOf=function(r,s,o){for(var a=this.getTweensOf(r,o),l=a.length;l--;)Lr!==a[l]&&a[l].kill(r,s);return this},t.getTweensOf=function(r,s){for(var o=[],a=Jn(r),l=this._first,c=or(s),u;l;)l instanceof Pt?gU(l._targets,a)&&(c?(!Lr||l._initted&&l._ts)&&l.globalTime(0)<=s&&l.globalTime(l.totalDuration())>s:!s||l.isActive())&&o.push(l):(u=l.getTweensOf(a,s)).length&&o.push.apply(o,u),l=l._next;return o},t.tweenTo=function(r,s){s=s||{};var o=this,a=$n(o,r),l=s,c=l.startAt,u=l.onStart,f=l.onStartParams,h=l.immediateRender,d,_=Pt.to(o,Wn({ease:s.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale())||it,onStart:function(){if(o.pause(),!d){var p=s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale());_._dur!==p&&qo(_,p,0,1).render(_._time,!0,!0),d=1}u&&u.apply(_,f||[])}},s));return h?_.render(0):_},t.tweenFromTo=function(r,s,o){return this.tweenTo(s,Wn({startAt:{time:$n(this,r)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(r){return r===void 0&&(r=this._time),L_(this,$n(this,r))},t.previousLabel=function(r){return r===void 0&&(r=this._time),L_(this,$n(this,r),1)},t.currentLabel=function(r){return arguments.length?this.seek(r,!0):this.previousLabel(this._time+it)},t.shiftChildren=function(r,s,o){o===void 0&&(o=0);var a=this._first,l=this.labels,c;for(r=yt(r);a;)a._start>=o&&(a._start+=r,a._end+=r),a=a._next;if(s)for(c in l)l[c]>=o&&(l[c]+=r);return As(this)},t.invalidate=function(r){var s=this._first;for(this._lock=0;s;)s.invalidate(r),s=s._next;return n.prototype.invalidate.call(this,r)},t.clear=function(r){r===void 0&&(r=!0);for(var s=this._first,o;s;)o=s._next,this.remove(s),s=o;return this._dp&&(this._time=this._tTime=this._pTime=0),r&&(this.labels={}),As(this)},t.totalDuration=function(r){var s=0,o=this,a=o._last,l=Zn,c,u,f;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-r:r));if(o._dirty){for(f=o.parent;a;)c=a._prev,a._dirty&&a.totalDuration(),u=a._start,u>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,Mi(o,a,u-a._delay,1)._lock=0):l=u,u<0&&a._ts&&(s-=u,(!f&&!o._dp||f&&f.smoothChildTiming)&&(o._start+=yt(u/o._ts),o._time-=u,o._tTime-=u),o.shiftChildren(-u,!1,-1/0),l=0),a._end>s&&a._ts&&(s=a._end),a=c;qo(o,o===St&&o._time>s?o._time:s,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(r){if(St._ts&&(Ex(St,zc(r,St)),Mx=Fn.frame),Fn.frame>=w_){w_+=Vn.autoSleep||120;var s=St._first;if((!s||!s._ts)&&Vn.autoSleep&&Fn._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||Fn.sleep()}}},e})(Ja);Wn(vn.prototype,{_lock:0,_hasPause:0,_forcing:0});var BU=function(e,t,i,r,s,o,a){var l=new Rn(this._pt,e,t,0,1,Jx,null,s),c=0,u=0,f,h,d,_,m,p,g,x;for(l.b=i,l.e=r,i+="",r+="",(g=~r.indexOf("random("))&&(r=Ya(r)),o&&(x=[i,r],o(x,e,t),i=x[0],r=x[1]),h=i.match(Pf)||[];f=Pf.exec(r);)_=f[0],m=r.substring(c,f.index),d?d=(d+1)%5:m.substr(-5)==="rgba("&&(d=1),_!==h[u
vendor: 4,296 bytes, line 3830
3830++]&&(p=parseFloat(h[u-1])||0,l._pt={_next:l._pt,p:m||u===1?m:",",s:p,c:_.charAt(1)==="="?bo(p,_)-p:parseFloat(_)-p,m:d&&d<4?Math.round:0},c=Pf.lastIndex);return l.c=c<r.length?r.substring(c,r.length):"",l.fp=a,(vx.test(r)||g)&&(l.e=0),this._pt=l,l},Kd=function(e,t,i,r,s,o,a,l,c,u){At(r)&&(r=r(s||0,e,o));var f=e[t],h=i!=="get"?i:At(f)?c?e[t.indexOf("set")||!At(e["get"+t.substr(3)])?t:"get"+t.substr(3)](c):e[t]():f,d=At(f)?c?WU:Yx:Zd,_;if(jt(r)&&(~r.indexOf("random(")&&(r=Ya(r)),r.charAt(1)==="="&&(_=bo(h,r)+(ln(h)||0),(_||_===0)&&(r=_))),!u||h!==r||kh)return!isNaN(h*r)&&r!==""?(_=new Rn(this._pt,e,t,+h||0,r-(h||0),typeof f=="boolean"?jU:Zx,0,d),c&&(_.fp=c),a&&_.modifier(a,this,e),this._pt=_):(!f&&!(t in e)&&Wd(t,r),BU.call(this,e,t,h,r,d,l||Vn.stringFilter,c))},HU=function(e,t,i,r,s){if(At(e)&&(e=Fa(e,s,t,i,r)),!Ri(e)||e.style&&e.nodeType||cn(e)||gx(e))return jt(e)?Fa(e,s,t,i,r):e;var o={},a;for(a in e)o[a]=Fa(e[a],s,t,i,r);return o},qx=function(e,t,i,r,s,o){var a,l,c,u;if(On[e]&&(a=new On[e]).init(s,a.rawVars?t[e]:HU(t[e],r,s,o,i),i,r,o)!==!1&&(i._pt=l=new Rn(i._pt,s,e,0,1,a.render,a,0,a.priority),i!==fo))for(c=i._ptLookup[i._targets.indexOf(s)],u=a._props.length;u--;)c[a._props[u]]=l;return a},Lr,kh,Yd=function n(e,t,i){var r=e.vars,s=r.ease,o=r.startAt,a=r.immediateRender,l=r.lazy,c=r.onUpdate,u=r.runBackwards,f=r.yoyoEase,h=r.keyframes,d=r.autoRevert,_=e._dur,m=e._startAt,p=e._targets,g=e.parent,x=g&&g.data==="nested"?g.vars.targets:p,v=e._overwrite==="auto"&&!Hd,y=e.timeline,T,b,A,P,S,M,O,I,L,V,$,G,J;if(y&&(!h||!s)&&(s="none"),e._ease=ws(s,Wo.ease),e._yEase=f?Gx(ws(f===!0?s:f,Wo.ease)):0,f&&e._yoyo&&!e._repeat&&(f=e._yEase,e._yEase=e._ease,e._ease=f),e._from=!y&&!!r.runBackwards,!y||h&&!r.stagger){if(I=p[0]?bs(p[0]).harness:0,G=I&&r[I.prop],T=Hc(r,Xd),m&&(m._zTime<0&&m.progress(1),t<0&&u&&a&&!d?m.render(-1,!0):m.revert(u&&_?lc:pU),m._lazy=0),o){if(Gr(e._startAt=Pt.set(p,Wn({data:"isStart",overwrite:!1,parent:g,immediateRender:!0,lazy:!m&&An(l),startAt:null,delay:0,onUpdate:c&&function(){return Bn(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(Zt||!a&&!d)&&e._startAt.revert(lc),a&&_&&t<=0&&i<=0){t&&(e._zTime=t);return}}else if(u&&_&&!m){if(t&&(a=!1),A=Wn({overwrite:!1,data:"isFromStart",lazy:a&&!m&&An(l),immediateRender:a,stagger:0,parent:g},T),G&&(A[I.prop]=G),Gr(e._startAt=Pt.set(p,A)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(Zt?e._startAt.revert(lc):e._startAt.render(-1,!0)),e._zTime=t,!a)n(e._startAt,it,it);else if(!t)return}for(e._pt=e._ptCache=0,l=_&&An(l)||l&&!_,b=0;b<p.length;b++){if(S=p[b],O=S._gsap||qd(p)[b]._gsap,e._ptLookup[b]=V={},Ih[O.id]&&Hr.length&&Bc(),$=x===p?b:x.indexOf(S),I&&(L=new I).init(S,G||T,e,$,x)!==!1&&(e._pt=P=new Rn(e._pt,S,L.name,0,1,L.render,L,0,L.priority),L._props.forEach(function(U){V[U]=P}),L.priority&&(M=1)),!I||G)for(A in T)On[A]&&(L=qx(A,T,e,$,S,x))?L.priority&&(M=1):V[A]=P=Kd.call(e,S,A,"get",T[A],$,x,0,r.stringFilter);e._op&&e._op[b]&&e.kill(S,e._op[b]),v&&e._pt&&(Lr=e,St.killTweensOf(S,V,e.globalTime(t)),J=!e.parent,Lr=0),e._pt&&l&&(Ih[O.id]=1)}M&&Qx(e),e._onInit&&e._onInit(e)}e._onUpdate=c,e._initted=(!e._op||e._pt)&&!J,h&&t<=0&&y.render(Zn,!0,!0)},zU=function(e,t,i,r,s,o,a,l){var c=(e._pt&&e._ptCache||(e._ptCache={}))[t],u,f,h,d;if(!c)for(c=e._ptCache[t]=[],h=e._ptLookup,d=e._targets.length;d--;){if(u=h[d][t],u&&u.d&&u.d._pt)for(u=u.d._pt;u&&u.p!==t&&u.fp!==t;)u=u._next;if(!u)return kh=1,e.vars[t]="+=0",Yd(e,a),kh=0,l?$a(t+" not eligible for reset"):1;c.push(u)}for(d=c.length;d--;)f=c[d],u=f._pt||f,u.s=(r||r===0)&&!s?r:u.s+(r||0)+o*u.c,u.c=i-u.s,f.e&&(f.e=Rt(i)+ln(f.e)),f.b&&(f.b=u.s+ln(f.b))},VU=function(e,t){var i=e[0]?bs(e[0]).harness:0,r=i&&i.aliases,s,o,a,l;if(!r)return t;s=Xo({},t);for(o in r)if(o in s)for(l=r[o].split(","),a=l.length;a--;)s[l[a]]=s[o];return s},GU=function(e,t,i,r){var s=t.ease||r||"power1.inOut",o,a;if(cn(t))a=i[e]||(i[e]=[]),t.forEach(function(l,c){return a.push({t:c/(t.length-1)*100,v:l,e:s})});else for(o in t)a=i[o]||(i[o]=[]),o==="ease"||a.push({t:parseFloat(e),v:t[o],e:s})},Fa=function(e,t,i,r,s){return At(e)?e.call(t,i,r,s):jt(e)&&~e.indexOf("random(")?Ya(e):e},$x=jd+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",Kx={};wn($x+",id,stagger,delay,duration,paused,scrollTrigger",function(n){return Kx[n]=1});
vendor: 16,833 bytes, lines 3830-3837
3830var Pt=(function(n){px(e,n);function e(i,r,s,o){var a;typeof r=="number"&&(s.duration=r,r=s,s=null),a=n.call(this,o?r:Oa(r))||this;var l=a.vars,c=l.duration,u=l.delay,f=l.immediateRender,h=l.stagger,d=l.overwrite,_=l.keyframes,m=l.defaults,p=l.scrollTrigger,g=l.yoyoEase,x=r.parent||St,v=(cn(i)||gx(i)?or(i[0]):"length"in r)?[i]:Jn(i),y,T,b,A,P,S,M,O;if(a._targets=v.length?qd(v):$a("GSAP target "+i+" not found. https://gsap.com",!Vn.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=d,_||h||tc(c)||tc(u)){if(r=a.vars,y=a.timeline=new vn({data:"nested",defaults:m||{},targets:x&&x.data==="nested"?x.vars.targets:v}),y.kill(),y.parent=y._dp=Xi(a),y._start=0,h||tc(c)||tc(u)){if(A=v.length,M=h&&Dx(h),Ri(h))for(P in h)~$x.indexOf(P)&&(O||(O={}),O[P]=h[P]);for(T=0;T<A;T++)b=Hc(r,Kx),b.stagger=0,g&&(b.yoyoEase=g),O&&Xo(b,O),S=v[T],b.duration=+Fa(c,Xi(a),T,S,v),b.delay=(+Fa(u,Xi(a),T,S,v)||0)-a._delay,!h&&A===1&&b.delay&&(a._delay=u=b.delay,a._start+=u,b.delay=0),y.to(S,b,M?M(T,S,v):0),y._ease=qe.none;y.duration()?c=u=0:a.timeline=0}else if(_){Oa(Wn(y.vars.defaults,{ease:"none"})),y._ease=ws(_.ease||r.ease||"none");var I=0,L,V,$;if(cn(_))_.forEach(function(G){return y.to(v,G,">")}),y.duration();else{b={};for(P in _)P==="ease"||P==="easeEach"||GU(P,_[P],b,_.easeEach);for(P in b)for(L=b[P].sort(function(G,J){return G.t-J.t}),I=0,T=0;T<L.length;T++)V=L[T],$={ease:V.e,duration:(V.t-(T?L[T-1].t:0))/100*c},$[P]=V.v,y.to(v,$,I),I+=$.duration;y.duration()<c&&y.to({},{duration:c-y.duration()})}}c||a.duration(c=y.duration())}else a.timeline=0;return d===!0&&!Hd&&(Lr=Xi(a),St.killTweensOf(v),Lr=0),Mi(x,Xi(a),s),r.reversed&&a.reverse(),r.paused&&a.paused(!0),(f||!c&&!_&&a._start===yt(x._time)&&An(f)&&xU(Xi(a))&&x.data!=="nested")&&(a._tTime=-it,a.render(Math.max(0,-u)||0)),p&&Cx(Xi(a),p),a}var t=e.prototype;return t.render=function(r,s,o){var a=this._time,l=this._tDur,c=this._dur,u=r<0,f=r>l-it&&!u?l:r<it?0:r,h,d,_,m,p,g,x,v,y;if(!c)MU(this,r,s,o);else if(f!==this._tTime||!r||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==u||this._lazy){if(h=f,v=this.timeline,this._repeat){if(m=c+this._rDelay,this._repeat<-1&&u)return this.totalTime(m*100+r,s,o);if(h=yt(f%m),f===l?(_=this._repeat,h=c):(p=yt(f/m),_=~~p,_&&_===p?(h=c,_--):h>c&&(h=c)),g=this._yoyo&&_&1,g&&(y=this._yEase,h=c-h),p=jo(this._tTime,m),h===a&&!o&&this._initted&&_===p)return this._tTime=f,this;_!==p&&(v&&this._yEase&&Wx(v,g),this.vars.repeatRefresh&&!g&&!this._lock&&h!==m&&this._initted&&(this._lock=o=1,this.render(yt(m*_),!0).invalidate()._lock=0))}if(!this._initted){if(Px(this,u?r:h,o,s,f))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&_!==p))return this;if(c!==this._dur)return this.render(r,s,o)}if(this._tTime=f,this._time=h,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=x=(y||this._ease)(h/c),this._from&&(this.ratio=x=1-x),!a&&f&&!s&&!p&&(Bn(this,"onStart"),this._tTime!==f))return this;for(d=this._pt;d;)d.r(x,d.d),d=d._next;v&&v.render(r<0?r:v._dur*v._ease(h/this._dur),s,o)||this._startAt&&(this._zTime=r),this._onUpdate&&!s&&(u&&Dh(this,r,s,o),Bn(this,"onUpdate")),this._repeat&&_!==p&&this.vars.onRepeat&&!s&&this.parent&&Bn(this,"onRepeat"),(f===this._tDur||!f)&&this._tTime===f&&(u&&!this._onUpdate&&Dh(this,r,!0,!0),(r||!c)&&(f===this._tDur&&this._ts>0||!f&&this._ts<0)&&Gr(this,1),!s&&!(u&&!a)&&(f||a||g)&&(Bn(this,f===l?"onComplete":"onReverseComplete",!0),this._prom&&!(f<l&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(r){return(!r||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(r),n.prototype.invalidate.call(this,r)},t.resetTo=function(r,s,o,a,l){Za||Fn.wake(),this._ts||this.play();var c=Math.min(this._dur,(this._dp._time-this._start)*this._ts),u;return this._initted||Yd(this,c),u=this._ease(c/this._dur),zU(this,r,s,o,a,u,c,l)?this.resetTo(r,s,o,a,1):(pu(this,0),this.parent||wx(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(r,s){if(s===void 0&&(s="all"),!r&&(!s||s==="all"))return this._lazy=this._pt=0,this.parent?Ma(this):this.scrollTrigger&&this.scrollTrigger.kill(!!Zt),this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(r,s,Lr&&Lr.vars.overwrite!==!0)._first||Ma(this),this.parent&&o!==this.timeline.totalDuration()&&qo(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=r?Jn(r):a,c=this._ptLookup,u=this._pt,f,h,d,_,m,p,g;if((!s||s==="all")&&vU(a,l))return s==="all"&&(this._pt=0),Ma(this);for(f=this._op=this._op||[],s!=="all"&&(jt(s)&&(m={},wn(s,function(x){return m[x]=1}),s=m),s=VU(a,s)),g=a.length;g--;)if(~l.indexOf(a[g])){h=c[g],s==="all"?(f[g]=s,_=h,d={}):(d=f[g]=f[g]||{},_=s);for(m in _)p=h&&h[m],p&&((!("kill"in p.d)||p.d.kill(m)===!0)&&hu(this,p,"_pt"),delete h[m]),d!=="all"&&(d[m]=1)}return this._initted&&!this._pt&&u&&Ma(this),this},e.to=function(r,s){return new e(r,s,arguments[2])},e.from=function(r,s){return Ua(1,arguments)},e.delayedCall=function(r,s,o,a){return new e(s,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:r,onComplete:s,onReverseComplete:s,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},e.fromTo=function(r,s,o){return Ua(2,arguments)},e.set=function(r,s){return s.duration=0,s.repeatDelay||(s.repeat=0),new e(r,s)},e.killTweensOf=function(r,s,o){return St.killTweensOf(r,s,o)},e})(Ja);Wn(Pt.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});wn("staggerTo,staggerFrom,staggerFromTo",function(n){Pt[n]=function(){var e=new vn,t=Oh.call(arguments,0);return t.splice(n==="staggerFromTo"?5:4,0,0),e[n].apply(e,t)}});var Zd=function(e,t,i){return e[t]=i},Yx=function(e,t,i){return e[t](i)},WU=function(e,t,i,r){return e[t](r.fp,i)},XU=function(e,t,i){return e.setAttribute(t,i)},Jd=function(e,t){return At(e[t])?Yx:zd(e[t])&&e.setAttribute?XU:Zd},Zx=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},jU=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},Jx=function(e,t){var i=t._pt,r="";if(!e&&t.b)r=t.b;else if(e===1&&t.e)r=t.e;else{for(;i;)r=i.p+(i.m?i.m(i.s+i.c*e):Math.round((i.s+i.c*e)*1e4)/1e4)+r,i=i._next;r+=t.c}t.set(t.t,t.p,r,t)},Qd=function(e,t){for(var i=t._pt;i;)i.r(e,i.d),i=i._next},qU=function(e,t,i,r){for(var s=this._pt,o;s;)o=s._next,s.p===r&&s.modifier(e,t,i),s=o},$U=function(e){for(var t=this._pt,i,r;t;)r=t._next,t.p===e&&!t.op||t.op===e?hu(this,t,"_pt"):t.dep||(i=1),t=r;return!i},KU=function(e,t,i,r){r.mSet(e,t,r.m.call(r.tween,i,r.mt),r)},Qx=function(e){for(var t=e._pt,i,r,s,o;t;){for(i=t._next,r=s;r&&r.pr>t.pr;)r=r._next;(t._prev=r?r._prev:o)?t._prev._next=t:s=t,(t._next=r)?r._prev=t:o=t,t=i}e._pt=s},Rn=(function(){function n(t,i,r,s,o,a,l,c,u){this.t=i,this.s=s,this.c=o,this.p=r,this.r=a||Zx,this.d=l||this,this.set=c||Zd,this.pr=u||0,this._next=t,t&&(t._prev=this)}var e=n.prototype;return e.modifier=function(i,r,s){this.mSet=this.mSet||this.set,this.set=KU,this.m=i,this.mt=s,this.tween=r},n})();wn(jd+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(n){return Xd[n]=1});Gn.TweenMax=Gn.TweenLite=Pt;Gn.TimelineLite=Gn.TimelineMax=vn;St=new vn({sortChildren:!1,defaults:Wo,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Vn.stringFilter=Vx;var Rs=[],uc={},YU=[],D_=0,ZU=0,Of=function(e){return(uc[e]||YU).map(function(t){return t()})},Bh=function(){var e=Date.now(),t=[];e-D_>2&&(Of("matchMediaInit"),Rs.forEach(function(i){var r=i.queries,s=i.conditions,o,a,l,c;for(a in r)o=vi.matchMedia(r[a]).matches,o&&(l=1),o!==s[a]&&(s[a]=o,c=1);c&&(i.revert(),l&&t.push(i))}),Of("matchMediaRevert"),t.forEach(function(i){return i.onMatch(i,function(r){return i.add(null,r)})}),D_=e,Of("matchMedia"))},eS=(function(){function n(t,i){this.selector=i&&Uh(i),this.data=[],this._r=[],this.isReverted=!1,this.id=ZU++,t&&this.add(t)}var e=n.prototype;return e.add=function(i,r,s){At(i)&&(s=r,r=i,i=At);var o=this,a=function(){var c=pt,u=o.selector,f;return c&&c!==o&&c.data.push(o),s&&(o.selector=Uh(s)),pt=o,f=r.apply(o,arguments),At(f)&&o._r.push(f),pt=c,o.selector=u,o.isReverted=!1,f};return o.last=a,i===At?a(o,function(l){return o.add(null,l)}):i?o[i]=a:a},e.ignore=function(i){var r=pt;pt=null,i(this),pt=r},e.getTweens=function(){var i=[];return this.data.forEach(function(r){return r instanceof n?i.push.apply(i,r.getTweens()):r instanceof Pt&&!(r.parent&&r.parent.data==="nested")&&i.push(r)}),i},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(i,r){var s=this;if(i?(function(){for(var a=s.getTweens(),l=s.data.length,c;l--;)c=s.data[l],c.data==="isFlip"&&(c.revert(),c.getChildren(!0,!0,!1).forEach(function(u){return a.splice(a.indexOf(u),1)}));for(a.map(function(u){return{g:u._dur||u._delay||u._sat&&!u._sat.vars.immediateRender?u.globalTime(0):-1/0,t:u}}).sort(function(u,f){return f.g-u.g||-1/0}).forEach(function(u){return u.t.revert(i)}),l=s.data.length;l--;)c=s.data[l],c instanceof vn?c.data!=="nested"&&(c.scrollTrigger&&c.scrollTrigger.revert(),c.kill()):!(c instanceof Pt)&&c.revert&&c.revert(i);s._r.forEach(function(u){return u(i,s)}),s.isReverted=!0})():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),r)for(var o=Rs.length;o--;)Rs[o].id===this.id&&Rs.splice(o,1)},e.revert=function(i){this.kill(i||{})},n})(),JU=(function(){function n(t){this.contexts=[],this.scope=t,pt&&pt.data.push(this)}var e=n.prototype;return e.add=function(i,r,s){Ri(i)||(i={matches:i});var o=new eS(0,s||this.scope),a=o.conditions={},l,c,u;pt&&!o.selector&&(o.selector=pt.selector),this.contexts.push(o),r=o.add("onMatch",r),o.queries=i;for(c in i)c==="all"?u=1:(l=vi.matchMedia(i[c]),l&&(Rs.indexOf(o)<0&&Rs.push(o),(a[c]=l.matches)&&(u=1),l.addListener?l.addListener(Bh):l.addEventListener("change",Bh)));return u&&r(o,function(f){return o.add(null,f)}),this},e.revert=function(i){this.kill(i||{})},e.kill=function(i){this.contexts.forEach(function(r){return r.kill(i,!0)})},n})(),Vc={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t.forEach(function(r){return Bx(r)})},timeline:function(e){return new vn(e)},getTweensOf:function(e,t){return St.getTweensOf(e,t)},getProperty:function(e,t,i,r){jt(e)&&(e=Jn(e)[0]);var s=bs(e||{}).get,o=i?Ax:bx;return i==="native"&&(i=""),e&&(t?o((On[t]&&On[t].get||s)(e,t,i,r)):function(a,l,c){return o((On[a]&&On[a].get||s)(e,a,l,c))})},quickSetter:function(e,t,i){if(e=Jn(e),e.length>1){var r=e.map(function(u){return Pn.quickSetter(u,t,i)}),s=r.length;return function(u){for(var f=s;f--;)r[f](u)}}e=e[0]||{};var o=On[t],a=bs(e),l=a.harness&&(a.harness.aliases||{})[t]||t,c=o?function(u){var f=new o;fo._pt=0,f.init(e,i?u+i:u,fo,0,[e]),f.render(1,f),fo._pt&&Qd(1,fo)}:a.set(e,l);return o?c:function(u){return c(e,l,i?u+i:u,a,1)}},quickTo:function(e,t,i){var r,s=Pn.to(e,Wn((r={},r[t]="+=0.1",r.paused=!0,r.stagger=0,r),i||{})),o=function(l,c,u){return s.resetTo(t,l,c,u)};return o.tween=s,o},isTweening:function(e){return St.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=ws(e.ease,Wo.ease)),R_(Wo,e||{})},config:function(e){return R_(Vn,e||{})},registerEffect:function(e){var t=e.name,i=e.effect,r=e.plugins,s=e.defaults,o=e.extendTimeline;(r||"").split(",").forEach(function(a){return a&&!On[a]&&!Gn[a]&&$a(t+" effect requires "+a+" plugin.")}),Lf[t]=function(a,l,c){return i(Jn(a),Wn(l||{},s),c)},o&&(vn.prototype[t]=function(a,l,c){return this.add(Lf[t](a,Ri(l)?l:(c=l)&&{},this),c)})},registerEase:function(e,t){qe[e]=ws(t)},parseEase:function(e,t){return arguments.length?ws(e,t):qe},getById:function(e){return St.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var i=new vn(e),r,s;for(i.smoothChildTiming=An(e.smoothChildTiming),St.remove(i),i._dp=0,i._time=i._tTime=St._time,r=St._first;r;)s=r._next,(t||!(!r._dur&&r instanceof Pt&&r.vars.onComplete===r._targets[0]))&&Mi(i,r,r._start-r._delay),r=s;return Mi(St,i,0),i},context:function(e,t){return e?new eS(e,t):pt},matchMedia:function(e){return new JU(e)},matchMediaRefresh:function(){return Rs.forEach(function(e){var t=e.conditions,i,r;for(r in t)t[r]&&(t[r]=!1,i=1);i&&e.revert()})||Bh()},addEventListener:function(e,t){var i=uc[e]||(uc[e]=[]);~i.indexOf(t)||i.push(t)},removeEventListener:function(e,t){var i=uc[e],r=i&&i.indexOf(t);r>=0&&i.splice(r,1)},utils:{wrap:PU,wrapYoyo:LU,distribute:Dx,random:Ox,snap:Nx,normalize:CU,getUnit:ln,clamp:bU,splitColor:Hx,toArray:Jn,selector:Uh,mapRange:Fx,pipe:wU,unitize:RU,interpolate:IU,shuffle:Ix},install:xx,effects:Lf,ticker:Fn,updateRoot:vn.updateRoot,plugins:On,globalTimeline:St,core:{PropTween:Rn,globals:Sx,Tween:Pt,Timeline:vn,Animation:Ja,getCache:bs,_removeLinkedListItem:hu,reverting:function(){return Zt},context:function(e){return e&&pt&&(pt.data.push(e),e._ctx=pt),pt},suppressOverwrites:function(e){return Hd=e}}};wn("to,from,fromTo,delayedCall,set,killTweensOf",function(n){return Vc[n]=Pt[n]});Fn.add(vn.updateRoot);fo=Vc.to({},{duration:0});var QU=function(e,t){for(var i=e._pt;i&&i.p!==t&&i.op!==t&&i.fp!==t;)i=i._next;return i},e2=function(e,t){var i=e._targets,r,s,o;for(r in t)for(s=i.length;s--;)o=e._ptLookup[s][r],o&&(o=o.d)&&(o._pt&&(o=QU(o,r)),o&&o.modifier&&o.modifier(t[r],e,i[s],r))},Uf=function(e,t){return{name:e,headless:1,rawVars:1,init:function(r,s,o){o._onInit=function(a){var l,c;if(jt(s)&&(l={},wn(s,function(u){return l[u]=1}),s=l),t){l={};for(c in s)l[c]=t(s[c]);s=l}e2(a,s)}}}},Pn=Vc.registerPlugin({name:"attr",init:function(e,t,i,r,s){var o,a,l;this.tween=i;for(o in t)l=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(l||0)+"",t[o],r,s,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(e,t){for(var i=t._pt;i;)Zt?i.set(i.t,i.p,i.b,i):i.r(e,i.d),i=i._next}},{name:"endArray",headless:1,init:function(e,t){for(var i=t.length;i--;)this.add(e,i,e[i]||0,t[i],0,0,0,0,0,1)}},Uf("roundProps",Fh),Uf("modifiers"),Uf("snap",Nx))||Vc;Pt.version=vn.version=Pn.version="3.14.2";yx=1;Vd()&&$o();qe.Power0;qe.Power1;qe.Power2;qe.Power3;qe.Power4;qe.Linear;qe.Quad;qe.Cubic;qe.Quart;qe.Quint;qe.Strong;qe.Elastic;qe.Back;qe.SteppedEase;qe.Bounce;qe.Sine;qe.Expo;qe.Circ;/*! 3831 * CSSPlugin 3.14.2 3832 * https://gsap.com 3833 * 3834 * Copyright 2008-2025, GreenSock. All rights reserved. 3835 * Subject to the terms at https://gsap.com/standard-license 3836 * @author: Jack Doyle, [email protected] 3837*/var N_,Ir,Ao,ep,ys,O_,tp,t2=function(){return typeof window<"u"},ar={},ps=180/Math.PI,wo=Math.PI/180,so=Math.atan2,U_=1e8,np=/([A-Z])/g,n2=/(left|right|width|margin|padding|x)/i,i2=/[\s,\(]\S/,bi={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Hh=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},r2=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},s2=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},o2=function(e,t){return t.set(t.t,t.p,e===1?t.e:e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},a2=function(e,t){var i=t.s+t.c*e;t.set(t.t,t.p,~~(i+(i<0?-.5:.5))+t.u,t)},tS=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},nS=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},l2=function(e,t,i){return e.style[t]=i},c2=function(e,t,i){return e.style.setProperty(t,i)},u2=function(e,t,i){return e._gsap[t]=i},f2=function(e,t,i){return e._gsap.scaleX=e._gsap.scaleY=i},h2=function(e,t,i,r,s){var o=e._gsap;o.scaleX=o.scaleY=i,o.renderTransform(s,o)},d2=function(e,t,i,r,s){var o=e._gsap;o[t]=i,o.renderTransform(s,o)},Mt="transform",Cn=Mt+"Origin",p2=function n(e,t){var i=this,r=this.target,s=r.style,o=r._gsap;if(e in ar&&s){if(this.tfm=this.tfm||{},e!=="transform")e=bi[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return i.tfm[a]=$i(r,a)}):this.tfm[e]=o.x?o[e]:$i(r,e),e===Cn&&(this.tfm.zOrigin=o.zOrigin);else return bi.transform.split(",").forEach(function(a){return n.call(i,a,t)});if(this.props.indexOf(Mt)>=0)return;o.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(Cn,t,"")),e=Mt}(s||t)&&this.props.push(e,t,s[e])},iS=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},m2=function(){var e=this.props,t=this.target,i=t.style,r=t._gsap,s,o;for(s=0;s<e.length;s+=3)e[s+1]?e[s+1]===2?t[e[s]](e[s+2]):t[e[s]]=e[s+2]:e[s+2]?i[e[s]]=e[s+2]:i.removeProperty(e[s].substr(0,2)==="--"?e[s]:e[s].replace(np,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)r[o]=this.tfm[o];r.svg&&(r.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),s=tp(),(!s||!s.isStart)&&!i[Mt]&&(iS(i),r.zOrigin&&i[Cn]&&(i[Cn]+=" "+r.zOrigin+"px",r.zOrigin=0,r.renderTransform()),r.uncache=1)}}
vendor: 2,790 bytes, line 3837
3837,rS=function(e,t){var i={target:e,props:[],revert:m2,save:p2};return e._gsap||Pn.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach(function(r){return i.save(r)}),i},sS,zh=function(e,t){var i=Ir.createElementNS?Ir.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):Ir.createElement(e);return i&&i.style?i:Ir.createElement(e)},Hn=function n(e,t,i){var r=getComputedStyle(e);return r[t]||r.getPropertyValue(t.replace(np,"-$1").toLowerCase())||r.getPropertyValue(t)||!i&&n(e,Ko(t)||t,1)||""},F_="O,Moz,ms,Ms,Webkit".split(","),Ko=function(e,t,i){var r=t||ys,s=r.style,o=5;if(e in s&&!i)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(F_[o]+e in s););return o<0?null:(o===3?"ms":o>=0?F_[o]:"")+e},Vh=function(){t2()&&window.document&&(N_=window,Ir=N_.document,Ao=Ir.documentElement,ys=zh("div")||{style:{}},zh("div"),Mt=Ko(Mt),Cn=Mt+"Origin",ys.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",sS=!!Ko("perspective"),tp=Pn.core.reverting,ep=1)},k_=function(e){var t=e.ownerSVGElement,i=zh("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=e.cloneNode(!0),s;r.style.display="block",i.appendChild(r),Ao.appendChild(i);try{s=r.getBBox()}catch{}return i.removeChild(r),Ao.removeChild(i),s},B_=function(e,t){for(var i=t.length;i--;)if(e.hasAttribute(t[i]))return e.getAttribute(t[i])},oS=function(e){var t,i;try{t=e.getBBox()}catch{t=k_(e),i=1}return t&&(t.width||t.height)||i||(t=k_(e)),t&&!t.width&&!t.x&&!t.y?{x:+B_(e,["x","cx","x1"])||0,y:+B_(e,["y","cy","y1"])||0,width:0,height:0}:t},aS=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&oS(e))},Wr=function(e,t){if(t){var i=e.style,r;t in ar&&t!==Cn&&(t=Mt),i.removeProperty?(r=t.substr(0,2),(r==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),i.removeProperty(r==="--"?t:t.replace(np,"-$1").toLowerCase())):i.removeAttribute(t)}},Dr=function(e,t,i,r,s,o){var a=new Rn(e._pt,t,i,0,1,o?nS:tS);return e._pt=a,a.b=r,a.e=s,e._props.push(i),a},H_={deg:1,rad:1,turn:1},g2={grid:1,flex:1},Xr=function n(e,t,i,r){var s=parseFloat(i)||0,o=(i+"").trim().substr((s+"").length)||"px",a=ys.style,l=n2.test(t),c=e.tagName.toLowerCase()==="svg",u=(c?"client":"offset")+(l?"Width":"Height"),f=100,h=r==="px",d=r==="%",_,m,p,g;if(r===o||!s||H_[r]||H_[o])return s;if(o!=="px"&&!h&&(s=n(e,t,i,"px")),g=e.getCTM&&aS(e),(d||o==="%")&&(ar[t]||~t.indexOf("adius")))return _=g?e.getBBox()[l?"width":"height"]:e[u],Rt(d?s/_*f:s/100*_);if(a[l?"width":"height"]=f+(h?o:r),m=r!=="rem"&&~t.indexOf("adius")||r==="em"&&e.appendChild&&!c?e:e.parentNode,g&&(m=(e.ownerSVGElement||{}).parentNode),(!m||m===Ir||!m.appendChild)&&(m=Ir.body),p=m._gsap,p&&d&&p.width&&l&&p.time===Fn.time&&!p.uncache)return Rt(s/p.width*f);if(d&&(t==="height"||t==="width")){var x=e.style[t];
vendor: 6,971 bytes, line 3837
3837e.style[t]=f+r,_=e[u],x?e.style[t]=x:Wr(e,t)}else(d||o==="%")&&!g2[Hn(m,"display")]&&(a.position=Hn(e,"position")),m===e&&(a.position="static"),m.appendChild(ys),_=ys[u],m.removeChild(ys),a.position="absolute";return l&&d&&(p=bs(m),p.time=Fn.time,p.width=m[u]),Rt(h?_*s/f:_&&s?f/_*s:0)},$i=function(e,t,i,r){var s;return ep||Vh(),t in bi&&t!=="transform"&&(t=bi[t],~t.indexOf(",")&&(t=t.split(",")[0])),ar[t]&&t!=="transform"?(s=el(e,r),s=t!=="transformOrigin"?s[t]:s.svg?s.origin:Wc(Hn(e,Cn))+" "+s.zOrigin+"px"):(s=e.style[t],(!s||s==="auto"||r||~(s+"").indexOf("calc("))&&(s=Gc[t]&&Gc[t](e,t,i)||Hn(e,t)||Tx(e,t)||(t==="opacity"?1:0))),i&&!~(s+"").trim().indexOf(" ")?Xr(e,t,s,i)+i:s},_2=function(e,t,i,r){if(!i||i==="none"){var s=Ko(t,e,1),o=s&&Hn(e,s,1);o&&o!==i?(t=s,i=o):t==="borderColor"&&(i=Hn(e,"borderTopColor"))}var a=new Rn(this._pt,e.style,t,0,1,Jx),l=0,c=0,u,f,h,d,_,m,p,g,x,v,y,T;if(a.b=i,a.e=r,i+="",r+="",r.substring(0,6)==="var(--"&&(r=Hn(e,r.substring(4,r.indexOf(")")))),r==="auto"&&(m=e.style[t],e.style[t]=r,r=Hn(e,t)||r,m?e.style[t]=m:Wr(e,t)),u=[i,r],Vx(u),i=u[0],r=u[1],h=i.match(uo)||[],T=r.match(uo)||[],T.length){for(;f=uo.exec(r);)p=f[0],x=r.substring(l,f.index),_?_=(_+1)%5:(x.substr(-5)==="rgba("||x.substr(-5)==="hsla(")&&(_=1),p!==(m=h[c++]||"")&&(d=parseFloat(m)||0,y=m.substr((d+"").length),p.charAt(1)==="="&&(p=bo(d,p)+y),g=parseFloat(p),v=p.substr((g+"").length),l=uo.lastIndex-v.length,v||(v=v||Vn.units[t]||y,l===r.length&&(r+=v,a.e+=v)),y!==v&&(d=Xr(e,t,m,v)||0),a._pt={_next:a._pt,p:x||c===1?x:",",s:d,c:g-d,m:_&&_<4||t==="zIndex"?Math.round:0});a.c=l<r.length?r.substring(l,r.length):""}else a.r=t==="display"&&r==="none"?nS:tS;return vx.test(r)&&(a.e=0),this._pt=a,a},z_={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},v2=function(e){var t=e.split(" "),i=t[0],r=t[1]||"50%";return(i==="top"||i==="bottom"||r==="left"||r==="right")&&(e=i,i=r,r=e),t[0]=z_[i]||i,t[1]=z_[r]||r,t.join(" ")},y2=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var i=t.t,r=i.style,s=t.u,o=i._gsap,a,l,c;if(s==="all"||s===!0)r.cssText="",l=1;else for(s=s.split(","),c=s.length;--c>-1;)a=s[c],ar[a]&&(l=1,a=a==="transformOrigin"?Cn:Mt),Wr(i,a);l&&(Wr(i,Mt),o&&(o.svg&&i.removeAttribute("transform"),r.scale=r.rotate=r.translate="none",el(i,1),o.uncache=1,iS(r)))}},Gc={clearProps:function(e,t,i,r,s){if(s.data!=="isFromStart"){var o=e._pt=new Rn(e._pt,t,i,0,0,y2);return o.u=r,o.pr=-10,o.tween=s,e._props.push(i),1}}},Qa=[1,0,0,1,0,0],lS={},cS=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},V_=function(e){var t=Hn(e,Mt);return cS(t)?Qa:t.substr(7).match(_x).map(Rt)},ip=function(e,t){var i=e._gsap||bs(e),r=e.style,s=V_(e),o,a,l,c;return i.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,s=[l.a,l.b,l.c,l.d,l.e,l.f],s.join(",")==="1,0,0,1,0,0"?Qa:s):(s===Qa&&!e.offsetParent&&e!==Ao&&!i.svg&&(l=r.display,r.display="block",o=e.parentNode,(!o||!e.offsetParent&&!e.getBoundingClientRect().width)&&(c=1,a=e.nextElementSibling,Ao.appendChild(e)),s=V_(e),l?r.display=l:Wr(e,"display"),c&&(a?o.insertBefore(e,a):o?o.appendChild(e):Ao.removeChild(e))),t&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},Gh=function(e,t,i,r,s,o){var a=e._gsap,l=s||ip(e,!0),c=a.xOrigin||0,u=a.yOrigin||0,f=a.xOffset||0,h=a.yOffset||0,d=l[0],_=l[1],m=l[2],p=l[3],g=l[4],x=l[5],v=t.split(" "),y=parseFloat(v[0])||0,T=parseFloat(v[1])||0,b,A,P,S;i?l!==Qa&&(A=d*p-_*m)&&(P=y*(p/A)+T*(-m/A)+(m*x-p*g)/A,S=y*(-_/A)+T*(d/A)-(d*x-_*g)/A,y=P,T=S):(b=oS(e),y=b.x+(~v[0].indexOf("%")?y/100*b.width:y),T=b.y+(~(v[1]||v[0]).indexOf("%")?T/100*b.height:T)),r||r!==!1&&a.smooth?(g=y-c,x=T-u,a.xOffset=f+(g*d+x*m)-g,a.yOffset=h+(g*_+x*p)-x):a.xOffset=a.yOffset=0,a.xOrigin=y,a.yOrigin=T,a.smooth=!!r,a.origin=t,a.originIsAbsolute=!!i,e.style[Cn]="0px 0px",o&&(Dr(o,a,"xOrigin",c,y),Dr(o,a,"yOrigin",u,T),Dr(o,a,"xOffset",f,a.xOffset),Dr(o,a,"yOffset",h,a.yOffset)),e.setAttribute("data-svg-origin",y+" "+T)},el=function(e,t){var i=e._gsap||new jx(e);if("x"in i&&!t&&!i.uncache)return i;var r=e.style,s=i.scaleX<0,o="px",a="deg",l=getComputedStyle(e),c=Hn(e,Cn)||"0",u,f,h,d,_,m,p,g,x,v,y,T,b,A,P,S,M,O,I,L,V,$,G,J,U,ne,ae,me,Ee,Ue,Q,le;return u=f=h=m=p=g=x=v=y=0,d=_=1,i.svg=!!(e.getCTM&&aS(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(r[Mt]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[Mt]!=="none"?l[Mt]:"")),r.scale=r.rotate=r.translate="none"),A=ip(e,i.svg),i.svg&&(i.uncache?(U=e.getBBox(),c=i.xOrigin-U.x+"px "+(i.yOrigin-U.y)+"px",J=""):J=!t&&e.getAttribute("data-svg-origin"),Gh(e,J||c,!!J||i.originIsAbsolute,i.smooth!==!1,A)),T=i.xOrigin||0,b=i.yOrigin||0,A!==Qa&&(O=A[0],I=A[1],L=A[2],V=A[3],u=$=A[4],f=G=A[5],A.length===6?(d=Math.sqrt(O*O+I*I),_=Math.sqrt(V*V+L*L),m=O||I?so(I,O)*ps:0,x=L||V?so(L,V)*ps+m:0,x&&(_*=Math.abs(Math.cos(x*wo))),i.svg&&(u-=T-(T*O+b*L),f-=b-(T*I+b*V))):(le=A[6],Ue=A[7],ae=A[8],me=A[9],Ee=A[10],Q=A[11],u=A[12],f=A[13],h=A[14],P=so(le,Ee),p=P*ps,P&&(S=Math.cos(-P),M=Math.sin(-P),J=$*S+ae*M,U=G*S+me*M,ne=le*S+Ee*M,ae=$*-M+ae*S,me=G*-M+me*S,Ee=le*-M+Ee*S,Q=Ue*-M+Q*S,$=J,G=U,le=ne),P=so(-L,Ee),g=P*ps,P&&(S=Math.cos(-P),M=Math.sin(-P),J=O*S-ae*M,U=I*S-me*M,ne=L*S-Ee*M,Q=V*M+Q*S,O=J,I=U,L=ne),P=so(I,O),m=P*ps,P&&(S=Math.cos(P),M=Math.sin(P),J=O*S+I*M,U=$*S+G*M,I=I*S-O*M,G=G*S-$*M,O=J,$=U),p&&Math.abs(p)+Math.abs(m)>359.9&&(p=m=0,g=180-g),d=Rt(Math.sqrt(O*O+I*I+L*L)),_=Rt(Math.sqrt(G*G+le*le)),P=so($,G),x=Math.abs(P)>2e-4?P*ps:0,y=Q?1/(Q<0?-Q:Q):0),i.svg&&(J=e.getAttribute("transform"),i.forceCSS=e.setAttribute("transform","")||!cS(Hn(e,Mt)),J&&e.setAttribute("transform",J))),Math.abs(x)>90&&Math.abs(x)<270&&(s?(d*=-1,x+=m<=0?180:-180,m+=m<=0?180:-180):(_*=-1,x+=x<=0?180:-180)),t=t||i.uncache,i.x=u-((i.xPercent=u&&(!t&&i.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-u)?-50:0)))?e.offsetWidth*i.xPercent/100:0)+o,i.y=f-((i.yPercent=f&&(!t&&i.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-f)?-50:0)))?e.offsetHeight*i.yPercent/100:0)+o,i.z=h+o,i.scaleX=Rt(d),i.scaleY=Rt(_),i.rotation=Rt(m)+a,i.rotationX=Rt(p)+a,i.rotationY=Rt(g)+a,i.skewX=x+a,i.skewY=v+a,i.transformPerspective=y+o,(i.zOrigin=parseFloat(c.split(" ")[2])||!t&&i.zOrigin||0)&&(r[Cn]=Wc(c)),i.xOffset=i.yOffset=0,i.force3D=Vn.force3D,i.renderTransform=i.svg?S2:sS?uS:x2,i.uncache=0,i},Wc=function(e){return(e=e.split(" "))[0]+" "+e[1]},Ff=function(e,t,i){var r=ln(t);return Rt(parseFloat(t)+parseFloat(Xr(e,"x",i+"px",r)))+r},x2=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,uS(e,t)},ls="0deg",_a="0px",cs=") ",uS=function(e,t){var i=t||this,r=i.xPercent,s=i.yPercent,o=i.x,a=i.y,l=i.z,c=i.rotation,u=i.rotationY,f=i.rotationX,h=i.skewX,d=i.skewY,_=i.scaleX,m=i.scaleY,p=i.transformPerspective,g=i.force3D,x=i.target,v=i.zOrigin,y="",T=g==="auto"&&e&&e!==1||g===!0;
vendor: 2,428 bytes, line 3837
3837if(v&&(f!==ls||u!==ls)){var b=parseFloat(u)*wo,A=Math.sin(b),P=Math.cos(b),S;b=parseFloat(f)*wo,S=Math.cos(b),o=Ff(x,o,A*S*-v),a=Ff(x,a,-Math.sin(b)*-v),l=Ff(x,l,P*S*-v+v)}p!==_a&&(y+="perspective("+p+cs),(r||s)&&(y+="translate("+r+"%, "+s+"%) "),(T||o!==_a||a!==_a||l!==_a)&&(y+=l!==_a||T?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+cs),c!==ls&&(y+="rotate("+c+cs),u!==ls&&(y+="rotateY("+u+cs),f!==ls&&(y+="rotateX("+f+cs),(h!==ls||d!==ls)&&(y+="skew("+h+", "+d+cs),(_!==1||m!==1)&&(y+="scale("+_+", "+m+cs),x.style[Mt]=y||"translate(0, 0)"},S2=function(e,t){var i=t||this,r=i.xPercent,s=i.yPercent,o=i.x,a=i.y,l=i.rotation,c=i.skewX,u=i.skewY,f=i.scaleX,h=i.scaleY,d=i.target,_=i.xOrigin,m=i.yOrigin,p=i.xOffset,g=i.yOffset,x=i.forceCSS,v=parseFloat(o),y=parseFloat(a),T,b,A,P,S;l=parseFloat(l),c=parseFloat(c),u=parseFloat(u),u&&(u=parseFloat(u),c+=u,l+=u),l||c?(l*=wo,c*=wo,T=Math.cos(l)*f,b=Math.sin(l)*f,A=Math.sin(l-c)*-h,P=Math.cos(l-c)*h,c&&(u*=wo,S=Math.tan(c-u),S=Math.sqrt(1+S*S),A*=S,P*=S,u&&(S=Math.tan(u),S=Math.sqrt(1+S*S),T*=S,b*=S)),T=Rt(T),b=Rt(b),A=Rt(A),P=Rt(P)):(T=f,P=h,b=A=0),(v&&!~(o+"").indexOf("px")||y&&!~(a+"").indexOf("px"))&&(v=Xr(d,"x",o,"px"),y=Xr(d,"y",a,"px")),(_||m||p||g)&&(v=Rt(v+_-(_*T+m*A)+p),y=Rt(y+m-(_*b+m*P)+g)),(r||s)&&(S=d.getBBox(),v=Rt(v+r/100*S.width),y=Rt(y+s/100*S.height)),S="matrix("+T+","+b+","+A+","+P+","+v+","+y+")",d.setAttribute("transform",S),x&&(d.style[Mt]=S)},M2=function(e,t,i,r,s){var o=360,a=jt(s),l=parseFloat(s)*(a&&~s.indexOf("rad")?ps:1),c=l-r,u=r+c+"deg",f,h;return a&&(f=s.split("_")[1],f==="short"&&(c%=o,c!==c%(o/2)&&(c+=c<0?o:-o)),f==="cw"&&c<0?c=(c+o*U_)%o-~~(c/o)*o:f==="ccw"&&c>0&&(c=(c-o*U_)%o-~~(c/o)*o)),e._pt=h=new Rn(e._pt,t,i,r,c,r2),h.e=u,h.u="deg",e._props.push(i),h},G_=function(e,t){for(var i in t)e[i]=t[i];return e},T2=function(e,t,i){var r=G_({},i._gsap),s="perspective,force3D,transformOrigin,svgOrigin",o=i.style,a,l,c,u,f,h,d,_;r.svg?(c=i.getAttribute("transform"),i.setAttribute("transform",""),o[Mt]=t,a=el(i,1),Wr(i,Mt),i.setAttribute("transform",c)):(c=getComputedStyle(i)[Mt],o[Mt]=t,a=el(i,1),o[Mt]=c);for(l in ar)c=r[l],u=a[l],c!==u&&s.indexOf(l)<0&&(d=ln(c),_=ln(u),f=d!==_?Xr(i,l,c,_):parseFloat(c),h=parseFloat(u),e._pt=new Rn(e._pt,a,l,f,h-f,Hh),e._pt.u=_||0,e._props.push(l));G_(a,r)};wn("padding,margin,Width,Radius",function(n,e){var t="Top",i="Right",r="Bottom",s="Left",o=(e<3?[t,i,r,s]:[t+s,t+i,r+i,r+s]
vendor: 5,140 bytes, line 3837
3837).map(function(a){return e<2?n+a:"border"+a+n});Gc[e>1?"border"+n:n]=function(a,l,c,u,f){var h,d;if(arguments.length<4)return h=o.map(function(_){return $i(a,_,c)}),d=h.join(" "),d.split(h[0]).length===5?h[0]:d;h=(u+"").split(" "),d={},o.forEach(function(_,m){return d[_]=h[m]=h[m]||h[(m-1)/2|0]}),a.init(l,d,f)}});var fS={name:"css",register:Vh,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,i,r,s){var o=this._props,a=e.style,l=i.vars.startAt,c,u,f,h,d,_,m,p,g,x,v,y,T,b,A,P,S;ep||Vh(),this.styles=this.styles||rS(e),P=this.styles.props,this.tween=i;for(m in t)if(m!=="autoRound"&&(u=t[m],!(On[m]&&qx(m,t,i,r,e,s)))){if(d=typeof u,_=Gc[m],d==="function"&&(u=u.call(i,r,e,s),d=typeof u),d==="string"&&~u.indexOf("random(")&&(u=Ya(u)),_)_(this,e,m,u,i)&&(A=1);else if(m.substr(0,2)==="--")c=(getComputedStyle(e).getPropertyValue(m)+"").trim(),u+="",zr.lastIndex=0,zr.test(c)||(p=ln(c),g=ln(u),g?p!==g&&(c=Xr(e,m,c,g)+g):p&&(u+=p)),this.add(a,"setProperty",c,u,r,s,0,0,m),o.push(m),P.push(m,0,a[m]);else if(d!=="undefined"){if(l&&m in l?(c=typeof l[m]=="function"?l[m].call(i,r,e,s):l[m],jt(c)&&~c.indexOf("random(")&&(c=Ya(c)),ln(c+"")||c==="auto"||(c+=Vn.units[m]||ln($i(e,m))||""),(c+"").charAt(1)==="="&&(c=$i(e,m))):c=$i(e,m),h=parseFloat(c),x=d==="string"&&u.charAt(1)==="="&&u.substr(0,2),x&&(u=u.substr(2)),f=parseFloat(u),m in bi&&(m==="autoAlpha"&&(h===1&&$i(e,"visibility")==="hidden"&&f&&(h=0),P.push("visibility",0,a.visibility),Dr(this,a,"visibility",h?"inherit":"hidden",f?"inherit":"hidden",!f)),m!=="scale"&&m!=="transform"&&(m=bi[m],~m.indexOf(",")&&(m=m.split(",")[0]))),v=m in ar,v){if(this.styles.save(m),S=u,d==="string"&&u.substring(0,6)==="var(--"){if(u=Hn(e,u.substring(4,u.indexOf(")"))),u.substring(0,5)==="calc("){var M=e.style.perspective;e.style.perspective=u,u=Hn(e,"perspective"),M?e.style.perspective=M:Wr(e,"perspective")}f=parseFloat(u)}if(y||(T=e._gsap,T.renderTransform&&!t.parseTransform||el(e,t.parseTransform),b=t.smoothOrigin!==!1&&T.smooth,y=this._pt=new Rn(this._pt,a,Mt,0,1,T.renderTransform,T,0,-1),y.dep=1),m==="scale")this._pt=new Rn(this._pt,T,"scaleY",T.scaleY,(x?bo(T.scaleY,x+f):f)-T.scaleY||0,Hh),this._pt.u=0,o.push("scaleY",m),m+="X";else if(m==="transformOrigin"){P.push(Cn,0,a[Cn]),u=v2(u),T.svg?Gh(e,u,0,b,0,this):(g=parseFloat(u.split(" ")[2])||0,g!==T.zOrigin&&Dr(this,T,"zOrigin",T.zOrigin,g),Dr(this,a,m,Wc(c),Wc(u)));continue}else if(m==="svgOrigin"){Gh(e,u,1,b,0,this);continue}else if(m in lS){M2(this,T,m,h,x?bo(h,x+u):u);continue}else if(m==="smoothOrigin"){Dr(this,T,"smooth",T.smooth,u);continue}else if(m==="force3D"){T[m]=u;continue}else if(m==="transform"){T2(this,u,e);continue}}else m in a||(m=Ko(m)||m);if(v||(f||f===0)&&(h||h===0)&&!i2.test(u)&&m in a)p=(c+"").substr((h+"").length),f||(f=0),g=ln(u)||(m in Vn.units?Vn.units[m]:p),p!==g&&(h=Xr(e,m,c,g)),this._pt=new Rn(this._pt,v?T:a,m,h,(x?bo(h,x+f):f)-h,!v&&(g==="px"||m==="zIndex")&&t.autoRound!==!1?a2:Hh),this._pt.u=g||0,v&&S!==u?(this._pt.b=c,this._pt.e=S,this._pt.r=o2):p!==g&&g!=="%"&&(this._pt.b=c,this._pt.r=s2);else if(m in a)_2.call(this,e,m,c,x?x+u:u);else if(m in e)this.add(e,m,c||e[m],x?x+u:u,r,s);else if(m!=="parseTransform"){Wd(m,u);continue}v||(m in a?P.push(m,0,a[m]):typeof e[m]=="function"?P.push(m,2,e[m]()):P.push(m,1,c||e[m])),o.push(m)}}A&&Qx(this)},render:function(e,t){if(t.tween._time||!tp())for(var i=t._pt;i;)i.r(e,i.d),i=i._next;else t.styles.revert()},get:$i,aliases:bi,getSetter:function(e,t,i){var r=bi[t];return r&&r.indexOf(",")<0&&(t=r),t in ar&&t!==Cn&&(e._gsap.x||$i(e,"x"))?i&&O_===i?t==="scale"?f2:u2:(O_=i||{})&&(t==="scale"?h2:d2):e.style&&!zd(e.style[t])?l2:~t.indexOf("-")?c2:Jd(e,t)},core:{_removeProperty:Wr,_getMatrix:ip}};Pn.utils.checkPrefix=Ko;Pn.core.getStyleSaver=rS;(function(n,e,t,i){var r=wn(n+","+e+","+t,function(s){ar[s]=1});wn(e,function(s){Vn.units[s]="deg",lS[s]=1}),bi[r[13]]=n+","+e,wn(i,function(s){var o=s.split(":");bi[o[1]]=r[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");wn("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(n){Vn.units[n]="px"});Pn.registerPlugin(fS);var Wh=Pn.registerPlugin(fS)||Pn;Wh.core.Tween;const sn=ti({windowWidth:window.innerWidth,windowHeight:window.innerHeight,isMobile:!1,isDesktop:!1,isLandscape:!1,isTouch:"ontouchstart"in window});sn.isMobile=hS();sn.isDesktop=dS();sn.isLandscape=pS();sn.isTouch=mS();function hS(){return E2()?!0:sn.windowWidth<768}function dS(){return sn.windowWidth>=1050}function pS(){return sn.windowWidth>sn.windowHeight}function mS(){return"ontouchstart"in window}function E2(){return/iPad|Macintosh/.test(navigator.userAgent)&&"ontouchend"in document||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1}function b2(){sn.windowWidth,window.innerWidth,sn.windowWidth=window.innerWidth,sn.windowHeight=window.innerHeight,sn.isMobile=hS(),sn.isDesktop=dS(),sn.isLandscape=pS(),sn.isTouch=mS(),g
3837S()}const gS=()=>{document.documentElement.style.setProperty("--vh",`${window.innerHeight*.01}px`)};window.addEventListener("resize",b2),gS();const A2={class:"error-page"},w2={class:"error-btn"},W_=25,R2={__name:"error",setup(n){const e=["booba","sch","soprano","ninho","amel bent","dosseh","alonzo","jul","nessbeal","lacrim","mac tyer","leto","vitaa","kendji girac","hatik","seth gueko","eva queen","dinos","kaaris","naps","niska","lefa","la fouine","rohff","kery james","mokobe","tony parker","magic system","georgio","ateyaba","lino","sadek","mhd","benash","marina kaye","damso","gato","sexion dâassaut","gradur","youssoupha","shtar ac","carlos dante","Nâseven7","hös copperfield","still fresh","hooss","Ixzo","noemie","mc box","david carreira","jonesic","lea castel","imran khan","emis killa","fler","tiitof","young chang mc","t kimp gee","princess lover","2 wayz"],t=xt(()=>!sn.isDesktop),i=Array.from({length:t.value?3:6},(o,a)=>e.filter((l,c)=>c%(t.value?3:6)===a)),r=zn(null);Zo(()=>{r.value.querySelectorAll(".column").forEach((a,l)=>{const c=l%2===0;a.querySelectorAll("ul").forEach(f=>s(f,c?-W_:W_))})});function s(o,a){const l=o.scrollHeight,c=Math.abs(l/a),u=a<0?"-":"+";Wh.timeline({repeat:-1,defaults:{ease:"none"}}).fromTo(o,{y:0},{y:`${u}=${l}`,duration:c,onComplete:()=>{Wh.set(o,{y:0})}})}return(o,a)=>{const l=xy,c=dx,u=gy;return Ft(),qi("div",A2,[ot(l),ot(c,{size:"large"}),Ot("div",{class:"error-list",ref_key:"list",ref:r},[(Ft(!0),qi(Ut,null,wu(bt(i),(f,h)=>(Ft(),qi("div",{class:Us(["column",{even:h%2===0,odd:h%2!==0}]),key:h},[(Ft(),qi(Ut,null,wu(4,d=>Ot("ul",{key:d},[(Ft(!0),qi(Ut,null,wu(f,(_,m)=>(Ft(),qi("li",{class:"h3",key:m},t0(_),1))),128))])),64))],2))),128))],512),Ot("div",w2,[ot(u,{to:"/"},{default:rl(()=>[...a[0]||(a[0]=[ud(" [ 404 error ⤠back home ] ",-1)])]),_:1})])])}}},C2=ou(R2,[["__scopeId","data-v-1b13ead5"]]),P2={key:0},X_={__name:"nuxt-root",setup(n){const e=()=>null,t=gt(),i=t.deferHydration();if(t.isHydrating){const c=t.hooks.hookOnce("app:error",i);Mn().beforeEach(c)}const r=!1;Ur(Is,al()),t.hooks.callHookWith(c=>c.map(u=>u()),"vue:setup");const s=ll(),o=!1,a=/bot\b|chrome-lighthouse|facebookexternalhit|google\b/i;F0((c,u,f)=>{if(t.hooks.callHook("vue:error",c,u,f).catch(h=>console.error("[nuxt] Error in `vue:error` hook",h)),a.test(navigator.userAgent))return t.hooks.callHook("app:error",c),console.error(`[nuxt] Not rendering error page for bot with user agent \`${navigator.userAgent}\`:`,c),!1;if(Hv(c)&&(c.fatal||c.unhandled))return t.runWithContext(()=>fs(c)),!1});const l=!1;return(c,u)=>(Ft(),Zi(cd,{onResolve:bt(i)},{default:rl(()=>[bt(o)?(Ft(),qi("div",P2)):bt(s)?(Ft(),Zi(bt(C2),{key:1,error:bt(s)},null,8,["error"])):bt(l)?(Ft(),Zi(bt(e),{key:2,context:bt(l)},null,8,["context"])):bt(r)?(Ft(),Zi(CM(bt(r)),{key:3})):(Ft(),Zi(bt(tC),{key:4}))]),_:1},8,["onResolve"]))}};let j_;{let n;j_=async function(){if(n)return n;const i=!!(window.__NUXT__?.serverRendered??document.getElementById("__NUXT_DATA__")?.dataset.ssr==="true")?YT(X_):KT(X_),r=cb({vueApp:i});async function s(o){await r.callHook("app:error",o),r.payload.error||=Es(o)}i.config.errorHandler=s,r.hook("app:suspense:resolve",()=>{i.config.errorHandler===s&&(i.config.errorHandler=void 0)});try{await hb(r,VR)}catch(o){s(o)}try{await r.hooks.callHook("app:created",i),await r.hooks.callHook("app:beforeMount",i),i.mount(ob),await r.hooks.callHook("app:mounted",i),await Ro()}catch(o){s(o)}return i},n=j_().catch(e=>{throw console.error("Error while mounting app:",e),e})}export{yn as $,Ro as A,sd as B,Us as C,Md as D,dO as E,Ut as F,$2 as G,Dt as H,Vr as I,Ge as J,kn as K,_n as L,Fy as M,N2 as N,Ld as O,cu as P,CM as Q,ti as R,ON as S,bT as T,dx as U,sn as V,NN as W,nx as X,li as Y,Ei as Z,ou as _,qi as a,EM as a$,q2 as a0,pn as a1,xi as a2,$c as a3,G2 as a4,gd as a5,z2 as a6,Ci as a7,tu as a8,wv as a9,tO as aA,j2 as aB,wi as aC,K2 as aD,sx as aE,ux as aF,xh as aG,gn as aH,Pc as aI,sr as aJ,xy as aK,WR as aL,yy as aM,Pn as aN,fS as aO,gy as aP,al as aQ,F2 as aR,W2 as aS,x0 as aT,V2 as aU,I2 as aV,r0 as aW,Cs as aX,M0 as aY,Es as aZ,jr as a_,gt as aa,ol as ab,O2 as ac,fv as ad,L2 as ae,ox as af,X as ag,vs as ah,ni as ai,Sn as aj,W1 as ak,Ds as al,Dc as am,Fr as an,Ne as ao,Lm as ap,Rr as aq,Ey as ar,Jt as as,wy as at,WC as au,GC as av,ko as aw,Br as ax,cx as ay,na as az,Ot as b,Wt as b0,Vf as b1,tt as b2,xt as c,k2 as d,Zi as e,bt as f,wu as g,rl as h,ud as i,Wh as j,X2 as k,Zo as l,vo as m,ot as n,Ft as o,D2 as p,vy as q,zn as r,nC as s,t0 as t,uA as u,B2 as v,U2 as w,Fs as x,H2 as y,cr as z};
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.