function by(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(i,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function Sf(t,e){const n=Object.create(null),i=t.split(",");for(let r=0;r<i.length;r++)n[i[r]]=!0;return e?r=>!!n[r.toLowerCase()]:r=>!!n[r]}const vt={},ys=[],Jn=()=>{},My=()=>!1,Ty=/^on[^a-z]/,jo=t=>Ty.test(t),Ef=t=>t.startsWith("onUpdate:"),Nt=Object.assign,bf=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},wy=Object.prototype.hasOwnProperty,it=(t,e)=>wy.call(t,e),Ue=Array.isArray,xs=t=>qo(t)==="[object Map]",gg=t=>qo(t)==="[object Set]",Ay=t=>qo(t)==="[object RegExp]",Ve=t=>typeof t=="function",bt=t=>typeof t=="string",Mf=t=>typeof t=="symbol",gt=t=>t!==null&&typeof t=="object",Tf=t=>gt(t)&&Ve(t.then)&&Ve(t.catch),_g=Object.prototype.toString,qo=t=>_g.call(t),Ry=t=>qo(t).slice(8,-1),vg=t=>qo(t)==="[object Object]",wf=t=>bt(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,yo=Sf(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Al=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Cy=/-(\w)/g,di=Al(t=>t.replace(Cy,(e,n)=>n?n.toUpperCase():"")),Ly=/\B([A-Z])/g,Gs=Al(t=>t.replace(Ly,"-$1").toLowerCase()),Rl=Al(t=>t.charAt(0).toUpperCase()+t.slice(1)),mc=Al(t=>t?`on${Rl(t)}`:""),Io=(t,e)=>!Object.is(t,e),xo=(t,e)=>{for(let n=0;n<t.length;n++)t[n](e)},nl=(t,e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})},Py=t=>{const e=parseFloat(t);return isNaN(e)?t:e},yg=t=>{const e=bt(t)?Number(t):NaN;return isNaN(e)?t:e};let Td;const pu=()=>Td||(Td=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Un(t){if(Ue(t)){const e={};for(let n=0;n<t.length;n++){const i=t[n],r=bt(i)?Uy(i):Un(i);if(r)for(const s in r)e[s]=r[s]}return e}else{if(bt(t))return t;if(gt(t))return t}}const Iy=/;(?![^(]*\))/g,Dy=/:([^]+)/,Ny=/\/\*[^]*?\*\//g;function Uy(t){const e={};return t.replace(Ny,"").split(Iy).forEach(n=>{if(n){const i=n.split(Dy);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function Rt(t){let e="";if(bt(t))e=t;else if(Ue(t))for(let n=0;n<t.length;n++){const i=Rt(t[n]);i&&(e+=i+" ")}else if(gt(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function DO(t){if(!t)return null;let{class:e,style:n}=t;return e&&!bt(e)&&(t.class=Rt(e)),n&&(t.style=Un(n)),t}const Oy="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Fy=Sf(Oy);function xg(t){return!!t||t===""}const il=t=>bt(t)?t:t==null?"":Ue(t)||gt(t)&&(t.toString===_g||!Ve(t.toString))?JSON.stringify(t,Sg,2):String(t),Sg=(t,e)=>e&&e.__v_isRef?Sg(t,e.value):xs(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,r])=>(n[`${i} =>`]=r,n),{})}:gg(e)?{[`Set(${e.size})`]:[...e.values()]}:gt(e)&&!Ue(e)&&!vg(e)?String(e):e;let Mn;class Eg{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Mn,!e&&Mn&&(this.index=(Mn.scopes||(Mn.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const n=Mn;try{return Mn=this,e()}finally{Mn=n}}}on(){Mn=this}off(){Mn=this.parent}stop(e){if(this._active){let n,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.scopes)for(n=0,i=this.scopes.length;n<i;n++)this.scopes[n].stop(!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,this._active=!1}}}function Cl(t){return new Eg(t)}function ky(t,e=Mn){e&&e.active&&e.effects.push(t)}function bg(){return Mn}function By(t){Mn&&Mn.cleanups.push(t)}const Af=t=>{const e=new Set(t);return e.w=0,e.n=0,e},Mg=t=>(t.w&sr)>0,Tg=t=>(t.n&sr)>0,Hy=({deps:t})=>{if(t.length)for(let e=0;e<t.length;e++)t[e].w|=sr},zy=t=>{const{deps:e}=t;if(e.length){let n=0;for(let i=0;i<e.length;i++){const r=e[i];Mg(r)&&!Tg(r)?r.delete(t):e[n++]=r,r.w&=~sr,r.n&=~sr}e.length=n}},rl=new WeakMap;let mo=0,sr=1;const mu=30;let jn;const Ir=Symbol(""),gu=Symbol("");class Rf{constructor(e,n=null,i){this.fn=e,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,ky(this,i)}run(){if(!this.active)return this.fn();let e=jn,n=Qi;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=jn,jn=this,Qi=!0,sr=1<<++mo,mo<=mu?Hy(this):wd(this),this.fn()}finally{mo<=mu&&zy(this),sr=1<<--mo,jn=this.parent,Qi=n,this.parent=void 0,this.deferStop&&this.stop()}}stop(){jn===this?this.deferStop=!0:this.active&&(wd(this),this.onStop&&this.onStop(),this.active=!1)}}function wd(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}let Qi=!0;const wg=[];function Ws(){wg.push(Qi),Qi=!1}function $s(){const t=wg.pop();Qi=t===void 0?!0:t}function xn(t,e,n){if(Qi&&jn){let i=rl.get(t);i||rl.set(t,i=new Map);let r=i.get(n);r||i.set(n,r=Af()),Ag(r)}}function Ag(t,e){let n=!1;mo<=mu?Tg(t)||(t.n|=sr,n=!Mg(t)):n=!t.has(jn),n&&(t.add(jn),jn.deps.push(t))}function Pi(t,e,n,i,r,s){const o=rl.get(t);if(!o)return;let a=[];if(e==="clear")a=[...o.values()];else if(n==="length"&&Ue(t)){const l=Number(i);o.forEach((c,u)=>{(u==="length"||u>=l)&&a.push(c)})}else switch(n!==void 0&&a.push(o.get(n)),e){case"add":Ue(t)?wf(n)&&a.push(o.get("length")):(a.push(o.get(Ir)),xs(t)&&a.push(o.get(gu)));break;case"delete":Ue(t)||(a.push(o.get(Ir)),xs(t)&&a.push(o.get(gu)));break;case"set":xs(t)&&a.push(o.get(Ir));break}if(a.length===1)a[0]&&_u(a[0]);else{const l=[];for(const c of a)c&&l.push(...c);_u(Af(l))}}function _u(t,e){const n=Ue(t)?t:[...t];for(const i of n)i.computed&&Ad(i);for(const i of n)i.computed||Ad(i)}function Ad(t,e){(t!==jn||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}function Vy(t,e){var n;return(n=rl.get(t))==null?void 0:n.get(e)}const Gy=Sf("__proto__,__v_isRef,__isVue"),Rg=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Mf)),Wy=Cf(),$y=Cf(!1,!0),Xy=Cf(!0),Rd=jy();function jy(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...n){const i=et(this);for(let s=0,o=this.length;s<o;s++)xn(i,"get",s+"");const r=i[e](...n);return r===-1||r===!1?i[e](...n.map(et)):r}}),["push","pop","shift","unshift","splice"].forEach(e=>{t[e]=function(...n){Ws();const i=et(this)[e].apply(this,n);return $s(),i}}),t}function qy(t){const e=et(this);return xn(e,"has",t),e.hasOwnProperty(t)}function Cf(t=!1,e=!1){return function(i,r,s){if(r==="__v_isReactive")return!t;if(r==="__v_isReadonly")return t;if(r==="__v_isShallow")return e;if(r==="__v_raw"&&s===(t?e?ux:Dg:e?Ig:Pg).get(i))return i;const o=Ue(i);if(!t){if(o&&it(Rd,r))return Reflect.get(Rd,r,s);if(r==="hasOwnProperty")return qy}const a=Reflect.get(i,r,s);return(Mf(r)?Rg.has(r):Gy(r))||(t||xn(i,"get",r),e)?a:ut(a)?o&&wf(r)?a:a.value:gt(a)?t?Ng(a):Fn(a):a}}const Yy=Cg(),Ky=Cg(!0);function Cg(t=!1){return function(n,i,r,s){let o=n[i];if(kr(o)&&ut(o)&&!ut(r))return!1;if(!t&&(!sl(r)&&!kr(r)&&(o=et(o),r=et(r)),!Ue(n)&&ut(o)&&!ut(r)))return o.value=r,!0;const a=Ue(n)&&wf(i)?Number(i)<n.length:it(n,i),l=Reflect.set(n,i,r,s);return n===et(s)&&(a?Io(r,o)&&Pi(n,"set",i,r):Pi(n,"add",i,r)),l}}function Zy(t,e){const n=it(t,e);t[e];const i=Reflect.deleteProperty(t,e);return i&&n&&Pi(t,"delete",e,void 0),i}function Jy(t,e){const n=Reflect.has(t,e);return(!Mf(e)||!Rg.has(e))&&xn(t,"has",e),n}function Qy(t){return xn(t,"iterate",Ue(t)?"length":Ir),Reflect.ownKeys(t)}const Lg={get:Wy,set:Yy,deleteProperty:Zy,has:Jy,ownKeys:Qy},ex={get:Xy,set(t,e){return!0},deleteProperty(t,e){return!0}},tx=Nt({},Lg,{get:$y,set:Ky}),Lf=t=>t,Ll=t=>Reflect.getPrototypeOf(t);function fa(t,e,n=!1,i=!1){t=t.__v_raw;const r=et(t),s=et(e);n||(e!==s&&xn(r,"get",e),xn(r,"get",s));const{has:o}=Ll(r),a=i?Lf:n?Df:Do;if(o.call(r,e))return a(t.get(e));if(o.call(r,s))return a(t.get(s));t!==r&&t.get(e)}function da(t,e=!1){const n=this.__v_raw,i=et(n),r=et(t);return e||(t!==r&&xn(i,"has",t),xn(i,"has",r)),t===r?n.has(t):n.has(t)||n.has(r)}function ha(t,e=!1){return t=t.__v_raw,!e&&xn(et(t),"iterate",Ir),Reflect.get(t,"size",t)}function Cd(t){t=et(t);const e=et(this);return Ll(e).has.call(e,t)||(e.add(t),Pi(e,"add",t,t)),this}function Ld(t,e){e=et(e);const n=et(this),{has:i,get:r}=Ll(n);let s=i.call(n,t);s||(t=et(t),s=i.call(n,t));const o=r.call(n,t);return n.set(t,e),s?Io(e,o)&&Pi(n,"set",t,e):Pi(n,"add",t,e),this}function Pd(t){const e=et(this),{has:n,get:i}=Ll(e);let r=n.call(e,t);r||(t=et(t),r=n.call(e,t)),i&&i.call(e,t);const s=e.delete(t);return r&&Pi(e,"delete",t,void 0),s}function Id(){const t=et(this),e=t.size!==0,n=t.clear();return e&&Pi(t,"clear",void 0,void 0),n}function pa(t,e){return function(i,r){const s=this,o=s.__v_raw,a=et(o),l=e?Lf:t?Df:Do;return!t&&xn(a,"iterate",Ir),o.forEach((c,u)=>i.call(r,l(c),l(u),s))}}function ma(t,e,n){return function(...i){const r=this.__v_raw,s=et(r),o=xs(s),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,c=r[t](...i),u=n?Lf:e?Df:Do;return!e&&xn(s,"iterate",l?gu:Ir),{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 Oi(t){return function(...e){return t==="delete"?!1:this}}function nx(){const t={get(s){return fa(this,s)},get size(){return ha(this)},has:da,add:Cd,set:Ld,delete:Pd,clear:Id,forEach:pa(!1,!1)},e={get(s){return fa(this,s,!1,!0)},get size(){return ha(this)},has:da,add:Cd,set:Ld,delete:Pd,clear:Id,forEach:pa(!1,!0)},n={get(s){return fa(this,s,!0)},get size(){return ha(this,!0)},has(s){return da.call(this,s,!0)},add:Oi("add"),set:Oi("set"),delete:Oi("delete"),clear:Oi("clear"),forEach:pa(!0,!1)},i={get(s){return fa(this,s,!0,!0)},get size(){return ha(this,!0)},has(s){return da.call(this,s,!0)},add:Oi("add"),set:Oi("set"),delete:Oi("delete"),clear:Oi("clear"),forEach:pa(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{t[s]=ma(s,!1,!1),n[s]=ma(s,!0,!1),e[s]=ma(s,!1,!0),i[s]=ma(s,!0,!0)}),[t,n,e,i]}const[ix,rx,sx,ox]=nx();function Pf(t,e){const n=e?t?ox:sx:t?rx:ix;return(i,r,s)=>r==="__v_isReactive"?!t:r==="__v_isReadonly"?t:r==="__v_raw"?i:Reflect.get(it(n,r)&&r in i?n:i,r,s)}const ax={get:Pf(!1,!1)},lx={get:Pf(!1,!0)},cx={get:Pf(!0,!1)},Pg=new WeakMap,Ig=new WeakMap,Dg=new WeakMap,ux=new WeakMap;function fx(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function dx(t){return t.__v_skip||!Object.isExtensible(t)?0:fx(Ry(t))}function Fn(t){return kr(t)?t:If(t,!1,Lg,ax,Pg)}function Yo(t){return If(t,!1,tx,lx,Ig)}function Ng(t){return If(t,!0,ex,cx,Dg)}function If(t,e,n,i,r){if(!gt(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const s=r.get(t);if(s)return s;const o=dx(t);if(o===0)return t;const a=new Proxy(t,o===2?i:n);return r.set(t,a),a}function er(t){return kr(t)?er(t.__v_raw):!!(t&&t.__v_isReactive)}function kr(t){return!!(t&&t.__v_isReadonly)}function sl(t){return!!(t&&t.__v_isShallow)}function Ug(t){return er(t)||kr(t)}function et(t){const e=t&&t.__v_raw;return e?et(e):t}function Pl(t){return nl(t,"__v_skip",!0),t}const Do=t=>gt(t)?Fn(t):t,Df=t=>gt(t)?Ng(t):t;function Og(t){Qi&&jn&&(t=et(t),Ag(t.dep||(t.dep=Af())))}function Fg(t,e){t=et(t);const n=t.dep;n&&_u(n)}function ut(t){return!!(t&&t.__v_isRef===!0)}function Ge(t){return kg(t,!1)}function No(t){return kg(t,!0)}function kg(t,e){return ut(t)?t:new hx(t,e)}class hx{constructor(e,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?e:et(e),this._value=n?e:Do(e)}get value(){return Og(this),this._value}set value(e){const n=this.__v_isShallow||sl(e)||kr(e);e=n?e:et(e),Io(e,this._rawValue)&&(this._rawValue=e,this._value=n?e:Do(e),Fg(this))}}function pe(t){return ut(t)?t.value:t}const px={get:(t,e,n)=>pe(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const r=t[e];return ut(r)&&!ut(n)?(r.value=n,!0):Reflect.set(t,e,n,i)}};function Bg(t){return er(t)?t:new Proxy(t,px)}function Hg(t){const e=Ue(t)?new Array(t.length):{};for(const n in t)e[n]=zg(t,n);return e}class mx{constructor(e,n,i){this._object=e,this._key=n,this._defaultValue=i,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return Vy(et(this._object),this._key)}}class gx{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Nf(t,e,n){return ut(t)?t:Ve(t)?new gx(t):gt(t)&&arguments.length>1?zg(t,e,n):Ge(t)}function zg(t,e,n){const i=t[e];return ut(i)?i:new mx(t,e,n)}class _x{constructor(e,n,i,r){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new Rf(e,()=>{this._dirty||(this._dirty=!0,Fg(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=i}get value(){const e=et(this);return Og(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function vx(t,e,n=!1){let i,r;const s=Ve(t);return s?(i=t,r=Jn):(i=t.get,r=t.set),new _x(i,r,s||!r,n)}function tr(t,e,n,i){let r;try{r=i?t(...i):t()}catch(s){Xs(s,e,n)}return r}function On(t,e,n,i){if(Ve(t)){const s=tr(t,e,n,i);return s&&Tf(s)&&s.catch(o=>{Xs(o,e,n)}),s}const r=[];for(let s=0;s<t.length;s++)r.push(On(t[s],e,n,i));return r}function Xs(t,e,n,i=!0){const r=e?e.vnode:null;if(e){let s=e.parent;const o=e.proxy,a=n;for(;s;){const c=s.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](t,o,a)===!1)return}s=s.parent}const l=e.appContext.config.errorHandler;if(l){tr(l,null,10,[t,o,a]);return}}yx(t,n,r,i)}function yx(t,e,n,i=!0){console.error(t)}let Uo=!1,vu=!1;const tn=[];let ci=0;const Ss=[];let wi=null,Ar=0;const Vg=Promise.resolve();let Uf=null;function mi(t){const e=Uf||Vg;return t?e.then(this?t.bind(this):t):e}function xx(t){let e=ci+1,n=tn.length;for(;e<n;){const i=e+n>>>1;Oo(tn[i])<t?e=i+1:n=i}return e}function Il(t){(!tn.length||!tn.includes(t,Uo&&t.allowRecurse?ci+1:ci))&&(t.id==null?tn.push(t):tn.splice(xx(t.id),0,t),Gg())}function Gg(){!Uo&&!vu&&(vu=!0,Uf=Vg.then($g))}function Sx(t){const e=tn.indexOf(t);e>ci&&tn.splice(e,1)}function Wg(t){Ue(t)?Ss.push(...t):(!wi||!wi.includes(t,t.allowRecurse?Ar+1:Ar))&&Ss.push(t),Gg()}function Dd(t,e=Uo?ci+1:0){for(;e<tn.length;e++){const n=tn[e];n&&n.pre&&(tn.splice(e,1),e--,n())}}function ol(t){if(Ss.length){const e=[...new Set(Ss)];if(Ss.length=0,wi){wi.push(...e);return}for(wi=e,wi.sort((n,i)=>Oo(n)-Oo(i)),Ar=0;Ar<wi.length;Ar++)wi[Ar]();wi=null,Ar=0}}const Oo=t=>t.id==null?1/0:t.id,Ex=(t,e)=>{const n=Oo(t)-Oo(e);if(n===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return n};function $g(t){vu=!1,Uo=!0,tn.sort(Ex);const e=Jn;try{for(ci=0;ci<tn.length;ci++){const n=tn[ci];n&&n.active!==!1&&tr(n,null,14)}}finally{ci=0,tn.length=0,ol(),Uo=!1,Uf=null,(tn.length||Ss.length)&&$g()}}function bx(t,e,...n){if(t.isUnmounted)return;const i=t.vnode.props||vt;let r=n;const s=e.startsWith("update:"),o=s&&e.slice(7);if(o&&o in i){const u=`${o==="modelValue"?"model":o}Modifiers`,{number:f,trim:h}=i[u]||vt;h&&(r=n.map(p=>bt(p)?p.trim():p)),f&&(r=n.map(Py))}let a,l=i[a=mc(e)]||i[a=mc(di(e))];!l&&s&&(l=i[a=mc(Gs(e))]),l&&On(l,t,6,r);const c=i[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,On(c,t,6,r)}}function Xg(t,e,n=!1){const i=e.emitsCache,r=i.get(t);if(r!==void 0)return r;const s=t.emits;let o={},a=!1;if(!Ve(t)){const l=c=>{const u=Xg(c,e,!0);u&&(a=!0,Nt(o,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!s&&!a?(gt(t)&&i.set(t,null),null):(Ue(s)?s.forEach(l=>o[l]=null):Nt(o,s),gt(t)&&i.set(t,o),o)}function Dl(t,e){return!t||!jo(e)?!1:(e=e.slice(2).replace(/Once$/,""),it(t,e[0].toLowerCase()+e.slice(1))||it(t,Gs(e))||it(t,e))}let Wt=null,Nl=null;function al(t){const e=Wt;return Wt=t,Nl=t&&t.type.__scopeId||null,e}function NO(t){Nl=t}function UO(){Nl=null}function Ut(t,e=Wt,n){if(!e||t._n)return t;const i=(...r)=>{i._d&&Xd(-1);const s=al(e);let o;try{o=t(...r)}finally{al(s),i._d&&Xd(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function gc(t){const{type:e,vnode:n,proxy:i,withProxy:r,props:s,propsOptions:[o],slots:a,attrs:l,emit:c,render:u,renderCache:f,data:h,setupState:p,ctx:g,inheritAttrs:_}=t;let m,d;const v=al(t);try{if(n.shapeFlag&4){const x=r||i;m=Pn(u.call(x,x,f,s,p,h,g)),d=l}else{const x=e;m=Pn(x.length>1?x(s,{attrs:l,slots:a,emit:c}):x(s,null)),d=e.props?l:Tx(l)}}catch(x){bo.length=0,Xs(x,t,1),m=De(fn)}let y=m;if(d&&_!==!1){const x=Object.keys(d),{shapeFlag:S}=y;x.length&&S&7&&(o&&x.some(Ef)&&(d=wx(d,o)),y=Di(y,d))}return n.dirs&&(y=Di(y),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&(y.transition=n.transition),m=y,al(v),m}function Mx(t){let e;for(let n=0;n<t.length;n++){const i=t[n];if(Cs(i)){if(i.type!==fn||i.children==="v-if"){if(e)return;e=i}}else return}return e}const Tx=t=>{let e;for(const n in t)(n==="class"||n==="style"||jo(n))&&((e||(e={}))[n]=t[n]);return e},wx=(t,e)=>{const n={};for(const i in t)(!Ef(i)||!(i.slice(9)in e))&&(n[i]=t[i]);return n};function Ax(t,e,n){const{props:i,children:r,component:s}=t,{props:o,children:a,patchFlag:l}=e,c=s.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return i?Nd(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]&&!Dl(c,h))return!0}}}else return(r||a)&&(!a||!a.$stable)?!0:i===o?!1:i?o?Nd(i,o,c):!0:!!o;return!1}function Nd(t,e,n){const i=Object.keys(e);if(i.length!==Object.keys(t).length)return!0;for(let r=0;r<i.length;r++){const s=i[r];if(e[s]!==t[s]&&!Dl(n,s))return!0}return!1}function Of({vnode:t,parent:e},n){for(;e&&e.subTree===t;)(t=e.vnode).el=n,e=e.parent}const jg=t=>t.__isSuspense,Rx={name:"Suspense",__isSuspense:!0,process(t,e,n,i,r,s,o,a,l,c){t==null?Cx(e,n,i,r,s,o,a,l,c):Lx(t,e,n,i,r,o,a,l,c)},hydrate:Px,create:Ff,normalize:Ix},qg=Rx;function Fo(t,e){const n=t.props&&t.props[e];Ve(n)&&n()}function Cx(t,e,n,i,r,s,o,a,l){const{p:c,o:{createElement:u}}=l,f=u("div"),h=t.suspense=Ff(t,r,i,e,f,n,s,o,a,l);c(null,h.pendingBranch=t.ssContent,f,null,i,h,s,o),h.deps>0?(Fo(t,"onPending"),Fo(t,"onFallback"),c(null,t.ssFallback,e,n,i,null,s,o),Es(h,t.ssFallback)):h.resolve(!1,!0)}function Lx(t,e,n,i,r,s,o,a,{p:l,um:c,o:{createElement:u}}){const f=e.suspense=t.suspense;f.vnode=e,e.el=t.el;const h=e.ssContent,p=e.ssFallback,{activeBranch:g,pendingBranch:_,isInFallback:m,isHydrating:d}=f;if(_)f.pendingBranch=h,qn(h,_)?(l(_,h,f.hiddenContainer,null,r,f,s,o,a),f.deps<=0?f.resolve():m&&(l(g,p,n,i,r,null,s,o,a),Es(f,p))):(f.pendingId++,d?(f.isHydrating=!1,f.activeBranch=_):c(_,r,f),f.deps=0,f.effects.length=0,f.hiddenContainer=u("div"),m?(l(null,h,f.hiddenContainer,null,r,f,s,o,a),f.deps<=0?f.resolve():(l(g,p,n,i,r,null,s,o,a),Es(f,p))):g&&qn(h,g)?(l(g,h,n,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(g&&qn(h,g))l(g,h,n,i,r,f,s,o,a),Es(f,h);else if(Fo(e,"onPending"),f.pendingBranch=h,f.pendingId++,l(null,h,f.hiddenContainer,null,r,f,s,o,a),f.deps<=0)f.resolve();else{const{timeout:v,pendingId:y}=f;v>0?setTimeout(()=>{f.pendingId===y&&f.fallback(p)},v):v===0&&f.fallback(p)}}function Ff(t,e,n,i,r,s,o,a,l,c,u=!1){const{p:f,m:h,um:p,n:g,o:{parentNode:_,remove:m}}=c;let d;const v=Dx(t);v&&e!=null&&e.pendingBranch&&(d=e.pendingId,e.deps++);const y=t.props?yg(t.props.timeout):void 0,x={vnode:t,parent:e,parentComponent:n,isSVG:o,container:i,hiddenContainer:r,anchor:s,deps:0,pendingId:0,timeout:typeof y=="number"?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:u,isUnmounted:!1,effects:[],resolve(S=!1,C=!1){const{vnode:R,activeBranch:I,pendingBranch:b,pendingId:L,effects:B,parentComponent:U,container:k}=x;if(x.isHydrating)x.isHydrating=!1;else if(!S){const $=I&&b.transition&&b.transition.mode==="out-in";$&&(I.transition.afterLeave=()=>{L===x.pendingId&&h(b,k,j,0)});let{anchor:j}=x;I&&(j=g(I),p(I,U,x,!0)),$||h(b,k,j,0)}Es(x,b),x.pendingBranch=null,x.isInFallback=!1;let D=x.parent,G=!1;for(;D;){if(D.pendingBranch){D.effects.push(...B),G=!0;break}D=D.parent}G||Wg(B),x.effects=[],v&&e&&e.pendingBranch&&d===e.pendingId&&(e.deps--,e.deps===0&&!C&&e.resolve()),Fo(R,"onResolve")},fallback(S){if(!x.pendingBranch)return;const{vnode:C,activeBranch:R,parentComponent:I,container:b,isSVG:L}=x;Fo(C,"onFallback");const B=g(R),U=()=>{x.isInFallback&&(f(null,S,b,B,I,null,L,a,l),Es(x,S))},k=S.transition&&S.transition.mode==="out-in";k&&(R.transition.afterLeave=U),x.isInFallback=!0,p(R,I,null,!0),k||U()},move(S,C,R){x.activeBranch&&h(x.activeBranch,S,C,R),x.container=S},next(){return x.activeBranch&&g(x.activeBranch)},registerDep(S,C){const R=!!x.pendingBranch;R&&x.deps++;const I=S.vnode.el;S.asyncDep.catch(b=>{Xs(b,S,0)}).then(b=>{if(S.isUnmounted||x.isUnmounted||x.pendingId!==S.suspenseId)return;S.asyncResolved=!0;const{vnode:L}=S;Mu(S,b,!1),I&&(L.el=I);const B=!I&&S.subTree.el;C(S,L,_(I||S.subTree.el),I?null:g(S.subTree),x,o,l),B&&m(B),Of(S,L.el),R&&--x.deps===0&&x.resolve()})},unmount(S,C){x.isUnmounted=!0,x.activeBranch&&p(x.activeBranch,n,S,C),x.pendingBranch&&p(x.pendingBranch,n,S,C)}};return x}function Px(t,e,n,i,r,s,o,a,l){const c=e.suspense=Ff(e,i,n,t.parentNode,document.createElement("div"),null,r,s,o,a,!0),u=l(t,c.pendingBranch=e.ssContent,n,c,s,o);return c.deps===0&&c.resolve(!1,!0),u}function Ix(t){const{shapeFlag:e,children:n}=t,i=e&32;t.ssContent=Ud(i?n.default:n),t.ssFallback=i?Ud(n.fallback):De(fn)}function Ud(t){let e;if(Ve(t)){const n=Rs&&t._c;n&&(t._d=!1,Xe()),t=t(),n&&(t._d=!0,e=Nn,y_())}return Ue(t)&&(t=Mx(t)),t=Pn(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(n=>n!==t)),t}function Yg(t,e){e&&e.pendingBranch?Ue(t)?e.effects.push(...t):e.effects.push(t):Wg(t)}function Es(t,e){t.activeBranch=e;const{vnode:n,parentComponent:i}=t,r=n.el=e.el;i&&i.subTree===n&&(i.vnode.el=r,Of(i,r))}function Dx(t){var e;return((e=t.props)==null?void 0:e.suspensible)!=null&&t.props.suspensible!==!1}function Nx(t,e){return kf(t,null,e)}const ga={};function Ot(t,e,n){return kf(t,e,n)}function kf(t,e,{immediate:n,deep:i,flush:r,onTrack:s,onTrigger:o}=vt){var a;const l=bg()===((a=Dt)==null?void 0:a.scope)?Dt:null;let c,u=!1,f=!1;if(ut(t)?(c=()=>t.value,u=sl(t)):er(t)?(c=()=>t,i=!0):Ue(t)?(f=!0,u=t.some(x=>er(x)||sl(x)),c=()=>t.map(x=>{if(ut(x))return x.value;if(er(x))return Pr(x);if(Ve(x))return tr(x,l,2)})):Ve(t)?e?c=()=>tr(t,l,2):c=()=>{if(!(l&&l.isUnmounted))return h&&h(),On(t,l,3,[p])}:c=Jn,e&&i){const x=c;c=()=>Pr(x())}let h,p=x=>{h=v.onStop=()=>{tr(x,l,4)}},g;if(Ls)if(p=Jn,e?n&&On(e,l,3,[c(),f?[]:void 0,p]):c(),r==="sync"){const x=bS();g=x.__watcherHandles||(x.__watcherHandles=[])}else return Jn;let _=f?new Array(t.length).fill(ga):ga;const m=()=>{if(v.active)if(e){const x=v.run();(i||u||(f?x.some((S,C)=>Io(S,_[C])):Io(x,_)))&&(h&&h(),On(e,l,3,[x,_===ga?void 0:f&&_[0]===ga?[]:_,p]),_=x)}else v.run()};m.allowRecurse=!!e;let d;r==="sync"?d=m:r==="post"?d=()=>Xt(m,l&&l.suspense):(m.pre=!0,l&&(m.id=l.uid),d=()=>Il(m));const v=new Rf(c,d);e?n?m():_=v.run():r==="post"?Xt(v.run.bind(v),l&&l.suspense):v.run();const y=()=>{v.stop(),l&&l.scope&&bf(l.scope.effects,v)};return g&&g.push(y),y}function Ux(t,e,n){const i=this.proxy,r=bt(t)?t.includes(".")?Kg(i,t):()=>i[t]:t.bind(i,i);let s;Ve(e)?s=e:(s=e.handler,n=e);const o=Dt;or(this);const a=kf(r,s.bind(i),n);return o?or(o):nr(),a}function Kg(t,e){const n=e.split(".");return()=>{let i=t;for(let r=0;r<n.length&&i;r++)i=i[n[r]];return i}}function Pr(t,e){if(!gt(t)||t.__v_skip||(e=e||new Set,e.has(t)))return t;if(e.add(t),ut(t))Pr(t.value,e);else if(Ue(t))for(let n=0;n<t.length;n++)Pr(t[n],e);else if(gg(t)||xs(t))t.forEach(n=>{Pr(n,e)});else if(vg(t))for(const n in t)Pr(t[n],e);return t}function Zg(t,e){const n=Wt;if(n===null)return t;const i=kl(n)||n.proxy,r=t.dirs||(t.dirs=[]);for(let s=0;s<e.length;s++){let[o,a,l,c=vt]=e[s];o&&(Ve(o)&&(o={mounted:o,updated:o}),o.deep&&Pr(a),r.push({dir:o,instance:i,value:a,oldValue:void 0,arg:l,modifiers:c}))}return t}function oi(t,e,n,i){const r=t.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&&(Ws(),On(l,n,8,[t.el,a,t,e]),$s())}}function Ox(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return ei(()=>{t.isMounted=!0}),Vr(()=>{t.isUnmounting=!0}),t}const Cn=[Function,Array],Jg={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Cn,onEnter:Cn,onAfterEnter:Cn,onEnterCancelled:Cn,onBeforeLeave:Cn,onLeave:Cn,onAfterLeave:Cn,onLeaveCancelled:Cn,onBeforeAppear:Cn,onAppear:Cn,onAfterAppear:Cn,onAppearCancelled:Cn},Fx={name:"BaseTransition",props:Jg,setup(t,{slots:e}){const n=Bn(),i=Ox();let r;return()=>{const s=e.default&&e_(e.default(),!0);if(!s||!s.length)return;let o=s[0];if(s.length>1){for(const _ of s)if(_.type!==fn){o=_;break}}const a=et(t),{mode:l}=a;if(i.isLeaving)return _c(o);const c=Od(o);if(!c)return _c(o);const u=yu(c,a,i,n);ll(c,u);const f=n.subTree,h=f&&Od(f);let p=!1;const{getTransitionKey:g}=c.type;if(g){const _=g();r===void 0?r=_:_!==r&&(r=_,p=!0)}if(h&&h.type!==fn&&(!qn(c,h)||p)){const _=yu(h,a,i,n);if(ll(h,_),l==="out-in")return i.isLeaving=!0,_.afterLeave=()=>{i.isLeaving=!1,n.update.active!==!1&&n.update()},_c(o);l==="in-out"&&c.type!==fn&&(_.delayLeave=(m,d,v)=>{const y=Qg(i,h);y[String(h.key)]=h,m._leaveCb=()=>{d(),m._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=v})}return o}}},kx=Fx;function Qg(t,e){const{leavingVNodes:n}=t;let i=n.get(e.type);return i||(i=Object.create(null),n.set(e.type,i)),i}function yu(t,e,n,i){const{appear:r,mode:s,persisted:o=!1,onBeforeEnter:a,onEnter:l,onAfterEnter:c,onEnterCancelled:u,onBeforeLeave:f,onLeave:h,onAfterLeave:p,onLeaveCancelled:g,onBeforeAppear:_,onAppear:m,onAfterAppear:d,onAppearCancelled:v}=e,y=String(t.key),x=Qg(n,t),S=(I,b)=>{I&&On(I,i,9,b)},C=(I,b)=>{const L=b[1];S(I,b),Ue(I)?I.every(B=>B.length<=1)&&L():I.length<=1&&L()},R={mode:s,persisted:o,beforeEnter(I){let b=a;if(!n.isMounted)if(r)b=_||a;else return;I._leaveCb&&I._leaveCb(!0);const L=x[y];L&&qn(t,L)&&L.el._leaveCb&&L.el._leaveCb(),S(b,[I])},enter(I){let b=l,L=c,B=u;if(!n.isMounted)if(r)b=m||l,L=d||c,B=v||u;else return;let U=!1;const k=I._enterCb=D=>{U||(U=!0,D?S(B,[I]):S(L,[I]),R.delayedLeave&&R.delayedLeave(),I._enterCb=void 0)};b?C(b,[I,k]):k()},leave(I,b){const L=String(t.key);if(I._enterCb&&I._enterCb(!0),n.isUnmounting)return b();S(f,[I]);let B=!1;const U=I._leaveCb=k=>{B||(B=!0,b(),k?S(g,[I]):S(p,[I]),I._leaveCb=void 0,x[L]===t&&delete x[L])};x[L]=t,h?C(h,[I,U]):U()},clone(I){return yu(I,e,n,i)}};return R}function _c(t){if(Ko(t))return t=Di(t),t.children=null,t}function Od(t){return Ko(t)?t.children?t.children[0]:void 0:t}function ll(t,e){t.shapeFlag&6&&t.component?ll(t.component.subTree,e):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function e_(t,e=!1,n){let i=[],r=0;for(let s=0;s<t.length;s++){let o=t[s];const a=n==null?o.key:String(n)+String(o.key!=null?o.key:s);o.type===Lt?(o.patchFlag&128&&r++,i=i.concat(e_(o.children,e,a))):(e||o.type!==fn)&&i.push(a!=null?Di(o,{key:a}):o)}if(r>1)for(let s=0;s<i.length;s++)i[s].patchFlag=-2;return i}function $t(t,e){return Ve(t)?(()=>Nt({name:t.name},e,{setup:t}))():t}const Dr=t=>!!t.type.__asyncLoader;function _a(t){Ve(t)&&(t={loader:t});const{loader:e,loadingComponent:n,errorComponent:i,delay:r=200,timeout:s,suspensible:o=!0,onError:a}=t;let l=null,c,u=0;const f=()=>(u++,l=null,h()),h=()=>{let p;return l||(p=l=e().catch(g=>{if(g=g instanceof Error?g:new Error(String(g)),a)return new Promise((_,m)=>{a(g,()=>_(f()),()=>m(g),u+1)});throw g}).then(g=>p!==l&&l?l:(g&&(g.__esModule||g[Symbol.toStringTag]==="Module")&&(g=g.default),c=g,g)))};return $t({name:"AsyncComponentWrapper",__asyncLoader:h,get __asyncResolved(){return c},setup(){const p=Dt;if(c)return()=>vc(c,p);const g=v=>{l=null,Xs(v,p,13,!i)};if(o&&p.suspense||Ls)return h().then(v=>()=>vc(v,p)).catch(v=>(g(v),()=>i?De(i,{error:v}):null));const _=Ge(!1),m=Ge(),d=Ge(!!r);return r&&setTimeout(()=>{d.value=!1},r),s!=null&&setTimeout(()=>{if(!_.value&&!m.value){const v=new Error(`Async component timed out after ${s}ms.`);g(v),m.value=v}},s),h().then(()=>{_.value=!0,p.parent&&Ko(p.parent.vnode)&&Il(p.parent.update)}).catch(v=>{g(v),m.value=v}),()=>{if(_.value&&c)return vc(c,p);if(m.value&&i)return De(i,{error:m.value});if(n&&!d.value)return De(n)}}})}function vc(t,e){const{ref:n,props:i,children:r,ce:s}=e.vnode,o=De(t,i,r);return o.ref=n,o.ce=s,delete e.vnode.ce,o}const Ko=t=>t.type.__isKeepAlive,Bx={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(t,{slots:e}){const n=Bn(),i=n.ctx;if(!i.renderer)return()=>{const v=e.default&&e.default();return v&&v.length===1?v[0]:v};const r=new Map,s=new Set;let o=null;const a=n.suspense,{renderer:{p:l,m:c,um:u,o:{createElement:f}}}=i,h=f("div");i.activate=(v,y,x,S,C)=>{const R=v.component;c(v,y,x,0,a),l(R.vnode,v,y,x,R,a,S,v.slotScopeIds,C),Xt(()=>{R.isDeactivated=!1,R.a&&xo(R.a);const I=v.props&&v.props.onVnodeMounted;I&&gn(I,R.parent,v)},a)},i.deactivate=v=>{const y=v.component;c(v,h,null,1,a),Xt(()=>{y.da&&xo(y.da);const x=v.props&&v.props.onVnodeUnmounted;x&&gn(x,y.parent,v),y.isDeactivated=!0},a)};function p(v){yc(v),u(v,n,a,!0)}function g(v){r.forEach((y,x)=>{const S=Tu(y.type);S&&(!v||!v(S))&&_(x)})}function _(v){const y=r.get(v);!o||!qn(y,o)?p(y):o&&yc(o),r.delete(v),s.delete(v)}Ot(()=>[t.include,t.exclude],([v,y])=>{v&&g(x=>go(v,x)),y&&g(x=>!go(y,x))},{flush:"post",deep:!0});let m=null;const d=()=>{m!=null&&r.set(m,xc(n.subTree))};return ei(d),s_(d),Vr(()=>{r.forEach(v=>{const{subTree:y,suspense:x}=n,S=xc(y);if(v.type===S.type&&v.key===S.key){yc(S);const C=S.component.da;C&&Xt(C,x);return}p(v)})}),()=>{if(m=null,!e.default)return null;const v=e.default(),y=v[0];if(v.length>1)return o=null,v;if(!Cs(y)||!(y.shapeFlag&4)&&!(y.shapeFlag&128))return o=null,y;let x=xc(y);const S=x.type,C=Tu(Dr(x)?x.type.__asyncResolved||{}:S),{include:R,exclude:I,max:b}=t;if(R&&(!C||!go(R,C))||I&&C&&go(I,C))return o=x,y;const L=x.key==null?S:x.key,B=r.get(L);return x.el&&(x=Di(x),y.shapeFlag&128&&(y.ssContent=x)),m=L,B?(x.el=B.el,x.component=B.component,x.transition&&ll(x,x.transition),x.shapeFlag|=512,s.delete(L),s.add(L)):(s.add(L),b&&s.size>parseInt(b,10)&&_(s.values().next().value)),x.shapeFlag|=256,o=x,jg(y.type)?y:x}}},Hx=Bx;function go(t,e){return Ue(t)?t.some(n=>go(n,e)):bt(t)?t.split(",").includes(e):Ay(t)?t.test(e):!1}function t_(t,e){i_(t,"a",e)}function n_(t,e){i_(t,"da",e)}function i_(t,e,n=Dt){const i=t.__wdc||(t.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return t()});if(Ul(e,i,n),n){let r=n.parent;for(;r&&r.parent;)Ko(r.parent.vnode)&&zx(i,e,n,r),r=r.parent}}function zx(t,e,n,i){const r=Ul(e,t,i,!0);Ii(()=>{bf(i[e],r)},n)}function yc(t){t.shapeFlag&=-257,t.shapeFlag&=-513}function xc(t){return t.shapeFlag&128?t.ssContent:t}function Ul(t,e,n=Dt,i=!1){if(n){const r=n[t]||(n[t]=[]),s=e.__weh||(e.__weh=(...o)=>{if(n.isUnmounted)return;Ws(),or(n);const a=On(e,n,t,o);return nr(),$s(),a});return i?r.unshift(s):r.push(s),s}}const Ui=t=>(e,n=Dt)=>(!Ls||t==="sp")&&Ul(t,(...i)=>e(...i),n),r_=Ui("bm"),ei=Ui("m"),Vx=Ui("bu"),s_=Ui("u"),Vr=Ui("bum"),Ii=Ui("um"),Gx=Ui("sp"),Wx=Ui("rtg"),$x=Ui("rtc");function o_(t,e=Dt){Ul("ec",t,e)}const Bf="components";function Xx(t,e){return l_(Bf,t,!0,e)||t}const a_=Symbol.for("v-ndc");function Zo(t){return bt(t)?l_(Bf,t,!1)||t:t||a_}function l_(t,e,n=!0,i=!1){const r=Wt||Dt;if(r){const s=r.type;if(t===Bf){const a=Tu(s,!1);if(a&&(a===e||a===di(e)||a===Rl(di(e))))return s}const o=Fd(r[t]||s[t],e)||Fd(r.appContext[t],e);return!o&&i?s:o}}function Fd(t,e){return t&&(t[e]||t[di(e)]||t[Rl(di(e))])}function Hf(t,e,n,i){let r;const s=n&&n[i];if(Ue(t)||bt(t)){r=new Array(t.length);for(let o=0,a=t.length;o<a;o++)r[o]=e(t[o],o,void 0,s&&s[o])}else if(typeof t=="number"){r=new Array(t);for(let o=0;o<t;o++)r[o]=e(o+1,o,void 0,s&&s[o])}else if(gt(t))if(t[Symbol.iterator])r=Array.from(t,(o,a)=>e(o,a,void 0,s&&s[a]));else{const o=Object.keys(t);r=new Array(o.length);for(let a=0,l=o.length;a<l;a++){const c=o[a];r[a]=e(t[c],c,a,s&&s[a])}}else r=[];return n&&(n[i]=r),r}function As(t,e,n={},i,r){if(Wt.isCE||Wt.parent&&Dr(Wt.parent)&&Wt.parent.isCE)return e!=="default"&&(n.name=e),De("slot",n,i&&i());let s=t[e];s&&s._c&&(s._d=!1),Xe();const o=s&&c_(s(n)),a=nn(Lt,{key:n.key||o&&o.key||`_${e}`},o||(i?i():[]),o&&t._===1?64:-2);return!r&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),s&&s._c&&(s._d=!0),a}function c_(t){return t.some(e=>Cs(e)?!(e.type===fn||e.type===Lt&&!c_(e.children)):!0)?t:null}const xu=t=>t?b_(t)?kl(t)||t.proxy:xu(t.parent):null,So=Nt(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>xu(t.parent),$root:t=>xu(t.root),$emit:t=>t.emit,$options:t=>zf(t),$forceUpdate:t=>t.f||(t.f=()=>Il(t.update)),$nextTick:t=>t.n||(t.n=mi.bind(t.proxy)),$watch:t=>Ux.bind(t)}),Sc=(t,e)=>t!==vt&&!t.__isScriptSetup&&it(t,e),jx={get({_:t},e){const{ctx:n,setupState:i,data:r,props:s,accessCache:o,type:a,appContext:l}=t;let c;if(e[0]!=="$"){const p=o[e];if(p!==void 0)switch(p){case 1:return i[e];case 2:return r[e];case 4:return n[e];case 3:return s[e]}else{if(Sc(i,e))return o[e]=1,i[e];if(r!==vt&&it(r,e))return o[e]=2,r[e];if((c=t.propsOptions[0])&&it(c,e))return o[e]=3,s[e];if(n!==vt&&it(n,e))return o[e]=4,n[e];Su&&(o[e]=0)}}const u=So[e];let f,h;if(u)return e==="$attrs"&&xn(t,"get",e),u(t);if((f=a.__cssModules)&&(f=f[e]))return f;if(n!==vt&&it(n,e))return o[e]=4,n[e];if(h=l.config.globalProperties,it(h,e))return h[e]},set({_:t},e,n){const{data:i,setupState:r,ctx:s}=t;return Sc(r,e)?(r[e]=n,!0):i!==vt&&it(i,e)?(i[e]=n,!0):it(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(s[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:i,appContext:r,propsOptions:s}},o){let a;return!!n[o]||t!==vt&&it(t,o)||Sc(e,o)||(a=s[0])&&it(a,o)||it(i,o)||it(So,o)||it(r.config.globalProperties,o)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:it(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};function kd(t){return Ue(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}function qx(t){const e=Bn();let n=t();return nr(),Tf(n)&&(n=n.catch(i=>{throw or(e),i})),[n,()=>or(e)]}let Su=!0;function Yx(t){const e=zf(t),n=t.proxy,i=t.ctx;Su=!1,e.beforeCreate&&Bd(e.beforeCreate,t,"bc");const{data:r,computed:s,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:f,mounted:h,beforeUpdate:p,updated:g,activated:_,deactivated:m,beforeDestroy:d,beforeUnmount:v,destroyed:y,unmounted:x,render:S,renderTracked:C,renderTriggered:R,errorCaptured:I,serverPrefetch:b,expose:L,inheritAttrs:B,components:U,directives:k,filters:D}=e;if(c&&Kx(c,i,null),o)for(const j in o){const oe=o[j];Ve(oe)&&(i[j]=oe.bind(n))}if(r){const j=r.call(n,n);gt(j)&&(t.data=Fn(j))}if(Su=!0,s)for(const j in s){const oe=s[j],se=Ve(oe)?oe.bind(n,n):Ve(oe.get)?oe.get.bind(n,n):Jn,he=!Ve(oe)&&Ve(oe.set)?oe.set.bind(n):Jn,me=He({get:se,set:he});Object.defineProperty(i,j,{enumerable:!0,configurable:!0,get:()=>me.value,set:ye=>me.value=ye})}if(a)for(const j in a)u_(a[j],i,n,j);if(l){const j=Ve(l)?l.call(n):l;Reflect.ownKeys(j).forEach(oe=>{bs(oe,j[oe])})}u&&Bd(u,t,"c");function $(j,oe){Ue(oe)?oe.forEach(se=>j(se.bind(n))):oe&&j(oe.bind(n))}if($(r_,f),$(ei,h),$(Vx,p),$(s_,g),$(t_,_),$(n_,m),$(o_,I),$($x,C),$(Wx,R),$(Vr,v),$(Ii,x),$(Gx,b),Ue(L))if(L.length){const j=t.exposed||(t.exposed={});L.forEach(oe=>{Object.defineProperty(j,oe,{get:()=>n[oe],set:se=>n[oe]=se})})}else t.exposed||(t.exposed={});S&&t.render===Jn&&(t.render=S),B!=null&&(t.inheritAttrs=B),U&&(t.components=U),k&&(t.directives=k)}function Kx(t,e,n=Jn){Ue(t)&&(t=Eu(t));for(const i in t){const r=t[i];let s;gt(r)?"default"in r?s=Ft(r.from||i,r.default,!0):s=Ft(r.from||i):s=Ft(r),ut(s)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):e[i]=s}}function Bd(t,e,n){On(Ue(t)?t.map(i=>i.bind(e.proxy)):t.bind(e.proxy),e,n)}function u_(t,e,n,i){const r=i.includes(".")?Kg(n,i):()=>n[i];if(bt(t)){const s=e[t];Ve(s)&&Ot(r,s)}else if(Ve(t))Ot(r,t.bind(n));else if(gt(t))if(Ue(t))t.forEach(s=>u_(s,e,n,i));else{const s=Ve(t.handler)?t.handler.bind(n):e[t.handler];Ve(s)&&Ot(r,s,t)}}function zf(t){const e=t.type,{mixins:n,extends:i}=e,{mixins:r,optionsCache:s,config:{optionMergeStrategies:o}}=t.appContext,a=s.get(e);let l;return a?l=a:!r.length&&!n&&!i?l=e:(l={},r.length&&r.forEach(c=>cl(l,c,o,!0)),cl(l,e,o)),gt(e)&&s.set(e,l),l}function cl(t,e,n,i=!1){const{mixins:r,extends:s}=e;s&&cl(t,s,n,!0),r&&r.forEach(o=>cl(t,o,n,!0));for(const o in e)if(!(i&&o==="expose")){const a=Zx[o]||n&&n[o];t[o]=a?a(t[o],e[o]):e[o]}return t}const Zx={data:Hd,props:zd,emits:zd,methods:_o,computed:_o,beforeCreate:an,created:an,beforeMount:an,mounted:an,beforeUpdate:an,updated:an,beforeDestroy:an,beforeUnmount:an,destroyed:an,unmounted:an,activated:an,deactivated:an,errorCaptured:an,serverPrefetch:an,components:_o,directives:_o,watch:Qx,provide:Hd,inject:Jx};function Hd(t,e){return e?t?function(){return Nt(Ve(t)?t.call(this,this):t,Ve(e)?e.call(this,this):e)}:e:t}function Jx(t,e){return _o(Eu(t),Eu(e))}function Eu(t){if(Ue(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function an(t,e){return t?[...new Set([].concat(t,e))]:e}function _o(t,e){return t?Nt(Object.create(null),t,e):e}function zd(t,e){return t?Ue(t)&&Ue(e)?[...new Set([...t,...e])]:Nt(Object.create(null),kd(t),kd(e??{})):e}function Qx(t,e){if(!t)return e;if(!e)return t;const n=Nt(Object.create(null),t);for(const i in e)n[i]=an(t[i],e[i]);return n}function f_(){return{app:null,config:{isNativeTag:My,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 eS=0;function tS(t,e){return function(i,r=null){Ve(i)||(i=Nt({},i)),r!=null&&!gt(r)&&(r=null);const s=f_(),o=new Set;let a=!1;const l=s.app={_uid:eS++,_component:i,_props:r,_container:null,_context:s,_instance:null,version:T_,get config(){return s.config},set config(c){},use(c,...u){return o.has(c)||(c&&Ve(c.install)?(o.add(c),c.install(l,...u)):Ve(c)&&(o.add(c),c(l,...u))),l},mixin(c){return s.mixins.includes(c)||s.mixins.push(c),l},component(c,u){return u?(s.components[c]=u,l):s.components[c]},directive(c,u){return u?(s.directives[c]=u,l):s.directives[c]},mount(c,u,f){if(!a){const h=De(i,r);return h.appContext=s,u&&e?e(h,c):t(h,c,f),a=!0,l._container=c,c.__vue_app__=l,kl(h.component)||h.component.proxy}},unmount(){a&&(t(null,l._container),delete l._container.__vue_app__)},provide(c,u){return s.provides[c]=u,l},runWithContext(c){ko=l;try{return c()}finally{ko=null}}};return l}}let ko=null;function bs(t,e){if(Dt){let n=Dt.provides;const i=Dt.parent&&Dt.parent.provides;i===n&&(n=Dt.provides=Object.create(i)),n[t]=e}}function Ft(t,e,n=!1){const i=Dt||Wt;if(i||ko){const r=i?i.parent==null?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:ko._context.provides;if(r&&t in r)return r[t];if(arguments.length>1)return n&&Ve(e)?e.call(i&&i.proxy):e}}function Vf(){return!!(Dt||Wt||ko)}function nS(t,e,n,i=!1){const r={},s={};nl(s,Ol,1),t.propsDefaults=Object.create(null),d_(t,e,r,s);for(const o in t.propsOptions[0])o in r||(r[o]=void 0);n?t.props=i?r:Yo(r):t.type.props?t.props=r:t.props=s,t.attrs=s}function iS(t,e,n,i){const{props:r,attrs:s,vnode:{patchFlag:o}}=t,a=et(r),[l]=t.propsOptions;let c=!1;if((i||o>0)&&!(o&16)){if(o&8){const u=t.vnode.dynamicProps;for(let f=0;f<u.length;f++){let h=u[f];if(Dl(t.emitsOptions,h))continue;const p=e[h];if(l)if(it(s,h))p!==s[h]&&(s[h]=p,c=!0);else{const g=di(h);r[g]=bu(l,a,g,p,t,!1)}else p!==s[h]&&(s[h]=p,c=!0)}}}else{d_(t,e,r,s)&&(c=!0);let u;for(const f in a)(!e||!it(e,f)&&((u=Gs(f))===f||!it(e,u)))&&(l?n&&(n[f]!==void 0||n[u]!==void 0)&&(r[f]=bu(l,a,f,void 0,t,!0)):delete r[f]);if(s!==a)for(const f in s)(!e||!it(e,f))&&(delete s[f],c=!0)}c&&Pi(t,"set","$attrs")}function d_(t,e,n,i){const[r,s]=t.propsOptions;let o=!1,a;if(e)for(let l in e){if(yo(l))continue;const c=e[l];let u;r&&it(r,u=di(l))?!s||!s.includes(u)?n[u]=c:(a||(a={}))[u]=c:Dl(t.emitsOptions,l)||(!(l in i)||c!==i[l])&&(i[l]=c,o=!0)}if(s){const l=et(n),c=a||vt;for(let u=0;u<s.length;u++){const f=s[u];n[f]=bu(r,l,f,c[f],t,!it(c,f))}}return o}function bu(t,e,n,i,r,s){const o=t[n];if(o!=null){const a=it(o,"default");if(a&&i===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&Ve(l)){const{propsDefaults:c}=r;n in c?i=c[n]:(or(r),i=c[n]=l.call(null,e),nr())}else i=l}o[0]&&(s&&!a?i=!1:o[1]&&(i===""||i===Gs(n))&&(i=!0))}return i}function h_(t,e,n=!1){const i=e.propsCache,r=i.get(t);if(r)return r;const s=t.props,o={},a=[];let l=!1;if(!Ve(t)){const u=f=>{l=!0;const[h,p]=h_(f,e,!0);Nt(o,h),p&&a.push(...p)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!s&&!l)return gt(t)&&i.set(t,ys),ys;if(Ue(s))for(let u=0;u<s.length;u++){const f=di(s[u]);Vd(f)&&(o[f]=vt)}else if(s)for(const u in s){const f=di(u);if(Vd(f)){const h=s[u],p=o[f]=Ue(h)||Ve(h)?{type:h}:Nt({},h);if(p){const g=$d(Boolean,p.type),_=$d(String,p.type);p[0]=g>-1,p[1]=_<0||g<_,(g>-1||it(p,"default"))&&a.push(f)}}}const c=[o,a];return gt(t)&&i.set(t,c),c}function Vd(t){return t[0]!=="$"}function Gd(t){const e=t&&t.toString().match(/^\s*(function|class) (\w+)/);return e?e[2]:t===null?"null":""}function Wd(t,e){return Gd(t)===Gd(e)}function $d(t,e){return Ue(e)?e.findIndex(n=>Wd(n,t)):Ve(e)&&Wd(e,t)?0:-1}const p_=t=>t[0]==="_"||t==="$stable",Gf=t=>Ue(t)?t.map(Pn):[Pn(t)],rS=(t,e,n)=>{if(e._n)return e;const i=Ut((...r)=>Gf(e(...r)),n);return i._c=!1,i},m_=(t,e,n)=>{const i=t._ctx;for(const r in t){if(p_(r))continue;const s=t[r];if(Ve(s))e[r]=rS(r,s,i);else if(s!=null){const o=Gf(s);e[r]=()=>o}}},g_=(t,e)=>{const n=Gf(e);t.slots.default=()=>n},sS=(t,e)=>{if(t.vnode.shapeFlag&32){const n=e._;n?(t.slots=et(e),nl(e,"_",n)):m_(e,t.slots={})}else t.slots={},e&&g_(t,e);nl(t.slots,Ol,1)},oS=(t,e,n)=>{const{vnode:i,slots:r}=t;let s=!0,o=vt;if(i.shapeFlag&32){const a=e._;a?n&&a===1?s=!1:(Nt(r,e),!n&&a===1&&delete r._):(s=!e.$stable,m_(e,r)),o=e}else e&&(g_(t,e),o={default:1});if(s)for(const a in r)!p_(a)&&!(a in o)&&delete r[a]};function ul(t,e,n,i,r=!1){if(Ue(t)){t.forEach((h,p)=>ul(h,e&&(Ue(e)?e[p]:e),n,i,r));return}if(Dr(i)&&!r)return;const s=i.shapeFlag&4?kl(i.component)||i.component.proxy:i.el,o=r?null:s,{i:a,r:l}=t,c=e&&e.r,u=a.refs===vt?a.refs={}:a.refs,f=a.setupState;if(c!=null&&c!==l&&(bt(c)?(u[c]=null,it(f,c)&&(f[c]=null)):ut(c)&&(c.value=null)),Ve(l))tr(l,a,12,[o,u]);else{const h=bt(l),p=ut(l);if(h||p){const g=()=>{if(t.f){const _=h?it(f,l)?f[l]:u[l]:l.value;r?Ue(_)&&bf(_,s):Ue(_)?_.includes(s)||_.push(s):h?(u[l]=[s],it(f,l)&&(f[l]=u[l])):(l.value=[s],t.k&&(u[t.k]=l.value))}else h?(u[l]=o,it(f,l)&&(f[l]=o)):p&&(l.value=o,t.k&&(u[t.k]=o))};o?(g.id=-1,Xt(g,n)):g()}}}let Fi=!1;const va=t=>/svg/.test(t.namespaceURI)&&t.tagName!=="foreignObject",ya=t=>t.nodeType===8;function aS(t){const{mt:e,p:n,o:{patchProp:i,createText:r,nextSibling:s,parentNode:o,remove:a,insert:l,createComment:c}}=t,u=(d,v)=>{if(!v.hasChildNodes()){n(null,d,v),ol(),v._vnode=d;return}Fi=!1,f(v.firstChild,d,null,null,null),ol(),v._vnode=d,Fi&&console.error("Hydration completed but contains mismatches.")},f=(d,v,y,x,S,C=!1)=>{const R=ya(d)&&d.data==="[",I=()=>_(d,v,y,x,S,R),{type:b,ref:L,shapeFlag:B,patchFlag:U}=v;let k=d.nodeType;v.el=d,U===-2&&(C=!1,v.dynamicChildren=null);let D=null;switch(b){case Br:k!==3?v.children===""?(l(v.el=r(""),o(d),d),D=d):D=I():(d.data!==v.children&&(Fi=!0,d.data=v.children),D=s(d));break;case fn:k!==8||R?D=I():D=s(d);break;case Eo:if(R&&(d=s(d),k=d.nodeType),k===1||k===3){D=d;const G=!v.children.length;for(let $=0;$<v.staticCount;$++)G&&(v.children+=D.nodeType===1?D.outerHTML:D.data),$===v.staticCount-1&&(v.anchor=D),D=s(D);return R?s(D):D}else I();break;case Lt:R?D=g(d,v,y,x,S,C):D=I();break;default:if(B&1)k!==1||v.type.toLowerCase()!==d.tagName.toLowerCase()?D=I():D=h(d,v,y,x,S,C);else if(B&6){v.slotScopeIds=S;const G=o(d);if(e(v,G,null,y,x,va(G),C),D=R?m(d):s(d),D&&ya(D)&&D.data==="teleport end"&&(D=s(D)),Dr(v)){let $;R?($=De(Lt),$.anchor=D?D.previousSibling:G.lastChild):$=d.nodeType===3?E_(""):De("div"),$.el=d,v.component.subTree=$}}else B&64?k!==8?D=I():D=v.type.hydrate(d,v,y,x,S,C,t,p):B&128&&(D=v.type.hydrate(d,v,y,x,va(o(d)),S,C,t,f))}return L!=null&&ul(L,null,x,v),D},h=(d,v,y,x,S,C)=>{C=C||!!v.dynamicChildren;const{type:R,props:I,patchFlag:b,shapeFlag:L,dirs:B}=v,U=R==="input"&&B||R==="option";if(U||b!==-1){if(B&&oi(v,null,y,"created"),I)if(U||!C||b&48)for(const D in I)(U&&D.endsWith("value")||jo(D)&&!yo(D))&&i(d,D,null,I[D],!1,void 0,y);else I.onClick&&i(d,"onClick",null,I.onClick,!1,void 0,y);let k;if((k=I&&I.onVnodeBeforeMount)&&gn(k,y,v),B&&oi(v,null,y,"beforeMount"),((k=I&&I.onVnodeMounted)||B)&&Yg(()=>{k&&gn(k,y,v),B&&oi(v,null,y,"mounted")},x),L&16&&!(I&&(I.innerHTML||I.textContent))){let D=p(d.firstChild,v,d,y,x,S,C);for(;D;){Fi=!0;const G=D;D=D.nextSibling,a(G)}}else L&8&&d.textContent!==v.children&&(Fi=!0,d.textContent=v.children)}return d.nextSibling},p=(d,v,y,x,S,C,R)=>{R=R||!!v.dynamicChildren;const I=v.children,b=I.length;for(let L=0;L<b;L++){const B=R?I[L]:I[L]=Pn(I[L]);if(d)d=f(d,B,x,S,C,R);else{if(B.type===Br&&!B.children)continue;Fi=!0,n(null,B,y,null,x,S,va(y),C)}}return d},g=(d,v,y,x,S,C)=>{const{slotScopeIds:R}=v;R&&(S=S?S.concat(R):R);const I=o(d),b=p(s(d),v,I,y,x,S,C);return b&&ya(b)&&b.data==="]"?s(v.anchor=b):(Fi=!0,l(v.anchor=c("]"),I,b),b)},_=(d,v,y,x,S,C)=>{if(Fi=!0,v.el=null,C){const b=m(d);for(;;){const L=s(d);if(L&&L!==b)a(L);else break}}const R=s(d),I=o(d);return a(d),n(null,v,I,R,y,x,va(I),S),R},m=d=>{let v=0;for(;d;)if(d=s(d),d&&ya(d)&&(d.data==="["&&v++,d.data==="]")){if(v===0)return s(d);v--}return d};return[u,f]}const Xt=Yg;function lS(t){return __(t)}function cS(t){return __(t,aS)}function __(t,e){const n=pu();n.__VUE__=!0;const{insert:i,remove:r,patchProp:s,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:f,nextSibling:h,setScopeId:p=Jn,insertStaticContent:g}=t,_=(T,E,w,N=null,O=null,W=null,q=!1,Z=null,ce=!!E.dynamicChildren)=>{if(T===E)return;T&&!qn(T,E)&&(N=V(T),ye(T,O,W,!0),T=null),E.patchFlag===-2&&(ce=!1,E.dynamicChildren=null);const{type:ee,ref:z,shapeFlag:M}=E;switch(ee){case Br:m(T,E,w,N);break;case fn:d(T,E,w,N);break;case Eo:T==null&&v(E,w,N,q);break;case Lt:U(T,E,w,N,O,W,q,Z,ce);break;default:M&1?S(T,E,w,N,O,W,q,Z,ce):M&6?k(T,E,w,N,O,W,q,Z,ce):(M&64||M&128)&&ee.process(T,E,w,N,O,W,q,Z,ce,ne)}z!=null&&O&&ul(z,T&&T.ref,W,E||T,!E)},m=(T,E,w,N)=>{if(T==null)i(E.el=a(E.children),w,N);else{const O=E.el=T.el;E.children!==T.children&&c(O,E.children)}},d=(T,E,w,N)=>{T==null?i(E.el=l(E.children||""),w,N):E.el=T.el},v=(T,E,w,N)=>{[T.el,T.anchor]=g(T.children,E,w,N,T.el,T.anchor)},y=({el:T,anchor:E},w,N)=>{let O;for(;T&&T!==E;)O=h(T),i(T,w,N),T=O;i(E,w,N)},x=({el:T,anchor:E})=>{let w;for(;T&&T!==E;)w=h(T),r(T),T=w;r(E)},S=(T,E,w,N,O,W,q,Z,ce)=>{q=q||E.type==="svg",T==null?C(E,w,N,O,W,q,Z,ce):b(T,E,O,W,q,Z,ce)},C=(T,E,w,N,O,W,q,Z)=>{let ce,ee;const{type:z,props:M,shapeFlag:A,transition:F,dirs:ie}=T;if(ce=T.el=o(T.type,W,M&&M.is,M),A&8?u(ce,T.children):A&16&&I(T.children,ce,null,N,O,W&&z!=="foreignObject",q,Z),ie&&oi(T,null,N,"created"),R(ce,T,T.scopeId,q,N),M){for(const ae in M)ae!=="value"&&!yo(ae)&&s(ce,ae,null,M[ae],W,T.children,N,O,Te);"value"in M&&s(ce,"value",null,M.value),(ee=M.onVnodeBeforeMount)&&gn(ee,N,T)}ie&&oi(T,null,N,"beforeMount");const re=(!O||O&&!O.pendingBranch)&&F&&!F.persisted;re&&F.beforeEnter(ce),i(ce,E,w),((ee=M&&M.onVnodeMounted)||re||ie)&&Xt(()=>{ee&&gn(ee,N,T),re&&F.enter(ce),ie&&oi(T,null,N,"mounted")},O)},R=(T,E,w,N,O)=>{if(w&&p(T,w),N)for(let W=0;W<N.length;W++)p(T,N[W]);if(O){let W=O.subTree;if(E===W){const q=O.vnode;R(T,q,q.scopeId,q.slotScopeIds,O.parent)}}},I=(T,E,w,N,O,W,q,Z,ce=0)=>{for(let ee=ce;ee<T.length;ee++){const z=T[ee]=Z?ji(T[ee]):Pn(T[ee]);_(null,z,E,w,N,O,W,q,Z)}},b=(T,E,w,N,O,W,q)=>{const Z=E.el=T.el;let{patchFlag:ce,dynamicChildren:ee,dirs:z}=E;ce|=T.patchFlag&16;const M=T.props||vt,A=E.props||vt;let F;w&&gr(w,!1),(F=A.onVnodeBeforeUpdate)&&gn(F,w,E,T),z&&oi(E,T,w,"beforeUpdate"),w&&gr(w,!0);const ie=O&&E.type!=="foreignObject";if(ee?L(T.dynamicChildren,ee,Z,w,N,ie,W):q||oe(T,E,Z,null,w,N,ie,W,!1),ce>0){if(ce&16)B(Z,E,M,A,w,N,O);else if(ce&2&&M.class!==A.class&&s(Z,"class",null,A.class,O),ce&4&&s(Z,"style",M.style,A.style,O),ce&8){const re=E.dynamicProps;for(let ae=0;ae<re.length;ae++){const Se=re[ae],ge=M[Se],we=A[Se];(we!==ge||Se==="value")&&s(Z,Se,ge,we,O,T.children,w,N,Te)}}ce&1&&T.children!==E.children&&u(Z,E.children)}else!q&&ee==null&&B(Z,E,M,A,w,N,O);((F=A.onVnodeUpdated)||z)&&Xt(()=>{F&&gn(F,w,E,T),z&&oi(E,T,w,"updated")},N)},L=(T,E,w,N,O,W,q)=>{for(let Z=0;Z<E.length;Z++){const ce=T[Z],ee=E[Z],z=ce.el&&(ce.type===Lt||!qn(ce,ee)||ce.shapeFlag&70)?f(ce.el):w;_(ce,ee,z,null,N,O,W,q,!0)}},B=(T,E,w,N,O,W,q)=>{if(w!==N){if(w!==vt)for(const Z in w)!yo(Z)&&!(Z in N)&&s(T,Z,w[Z],null,q,E.children,O,W,Te);for(const Z in N){if(yo(Z))continue;const ce=N[Z],ee=w[Z];ce!==ee&&Z!=="value"&&s(T,Z,ee,ce,q,E.children,O,W,Te)}"value"in N&&s(T,"value",w.value,N.value)}},U=(T,E,w,N,O,W,q,Z,ce)=>{const ee=E.el=T?T.el:a(""),z=E.anchor=T?T.anchor:a("");let{patchFlag:M,dynamicChildren:A,slotScopeIds:F}=E;F&&(Z=Z?Z.concat(F):F),T==null?(i(ee,w,N),i(z,w,N),I(E.children,w,z,O,W,q,Z,ce)):M>0&&M&64&&A&&T.dynamicChildren?(L(T.dynamicChildren,A,w,O,W,q,Z),(E.key!=null||O&&E===O.subTree)&&v_(T,E,!0)):oe(T,E,w,z,O,W,q,Z,ce)},k=(T,E,w,N,O,W,q,Z,ce)=>{E.slotScopeIds=Z,T==null?E.shapeFlag&512?O.ctx.activate(E,w,N,q,ce):D(E,w,N,O,W,q,ce):G(T,E,ce)},D=(T,E,w,N,O,W,q)=>{const Z=T.component=gS(T,N,O);if(Ko(T)&&(Z.ctx.renderer=ne),_S(Z),Z.asyncDep){if(O&&O.registerDep(Z,$),!T.el){const ce=Z.subTree=De(fn);d(null,ce,E,w)}return}$(Z,T,E,w,O,W,q)},G=(T,E,w)=>{const N=E.component=T.component;if(Ax(T,E,w))if(N.asyncDep&&!N.asyncResolved){j(N,E,w);return}else N.next=E,Sx(N.update),N.update();else E.el=T.el,N.vnode=E},$=(T,E,w,N,O,W,q)=>{const Z=()=>{if(T.isMounted){let{next:z,bu:M,u:A,parent:F,vnode:ie}=T,re=z,ae;gr(T,!1),z?(z.el=ie.el,j(T,z,q)):z=ie,M&&xo(M),(ae=z.props&&z.props.onVnodeBeforeUpdate)&&gn(ae,F,z,ie),gr(T,!0);const Se=gc(T),ge=T.subTree;T.subTree=Se,_(ge,Se,f(ge.el),V(ge),T,O,W),z.el=Se.el,re===null&&Of(T,Se.el),A&&Xt(A,O),(ae=z.props&&z.props.onVnodeUpdated)&&Xt(()=>gn(ae,F,z,ie),O)}else{let z;const{el:M,props:A}=E,{bm:F,m:ie,parent:re}=T,ae=Dr(E);if(gr(T,!1),F&&xo(F),!ae&&(z=A&&A.onVnodeBeforeMount)&&gn(z,re,E),gr(T,!0),M&&Me){const Se=()=>{T.subTree=gc(T),Me(M,T.subTree,T,O,null)};ae?E.type.__asyncLoader().then(()=>!T.isUnmounted&&Se()):Se()}else{const Se=T.subTree=gc(T);_(null,Se,w,N,T,O,W),E.el=Se.el}if(ie&&Xt(ie,O),!ae&&(z=A&&A.onVnodeMounted)){const Se=E;Xt(()=>gn(z,re,Se),O)}(E.shapeFlag&256||re&&Dr(re.vnode)&&re.vnode.shapeFlag&256)&&T.a&&Xt(T.a,O),T.isMounted=!0,E=w=N=null}},ce=T.effect=new Rf(Z,()=>Il(ee),T.scope),ee=T.update=()=>ce.run();ee.id=T.uid,gr(T,!0),ee()},j=(T,E,w)=>{E.component=T;const N=T.vnode.props;T.vnode=E,T.next=null,iS(T,E.props,N,w),oS(T,E.children,w),Ws(),Dd(),$s()},oe=(T,E,w,N,O,W,q,Z,ce=!1)=>{const ee=T&&T.children,z=T?T.shapeFlag:0,M=E.children,{patchFlag:A,shapeFlag:F}=E;if(A>0){if(A&128){he(ee,M,w,N,O,W,q,Z,ce);return}else if(A&256){se(ee,M,w,N,O,W,q,Z,ce);return}}F&8?(z&16&&Te(ee,O,W),M!==ee&&u(w,M)):z&16?F&16?he(ee,M,w,N,O,W,q,Z,ce):Te(ee,O,W,!0):(z&8&&u(w,""),F&16&&I(M,w,N,O,W,q,Z,ce))},se=(T,E,w,N,O,W,q,Z,ce)=>{T=T||ys,E=E||ys;const ee=T.length,z=E.length,M=Math.min(ee,z);let A;for(A=0;A<M;A++){const F=E[A]=ce?ji(E[A]):Pn(E[A]);_(T[A],F,w,null,O,W,q,Z,ce)}ee>z?Te(T,O,W,!0,!1,M):I(E,w,N,O,W,q,Z,ce,M)},he=(T,E,w,N,O,W,q,Z,ce)=>{let ee=0;const z=E.length;let M=T.length-1,A=z-1;for(;ee<=M&&ee<=A;){const F=T[ee],ie=E[ee]=ce?ji(E[ee]):Pn(E[ee]);if(qn(F,ie))_(F,ie,w,null,O,W,q,Z,ce);else break;ee++}for(;ee<=M&&ee<=A;){const F=T[M],ie=E[A]=ce?ji(E[A]):Pn(E[A]);if(qn(F,ie))_(F,ie,w,null,O,W,q,Z,ce);else break;M--,A--}if(ee>M){if(ee<=A){const F=A+1,ie=F<z?E[F].el:N;for(;ee<=A;)_(null,E[ee]=ce?ji(E[ee]):Pn(E[ee]),w,ie,O,W,q,Z,ce),ee++}}else if(ee>A)for(;ee<=M;)ye(T[ee],O,W,!0),ee++;else{const F=ee,ie=ee,re=new Map;for(ee=ie;ee<=A;ee++){const We=E[ee]=ce?ji(E[ee]):Pn(E[ee]);We.key!=null&&re.set(We.key,ee)}let ae,Se=0;const ge=A-ie+1;let we=!1,Oe=0;const Je=new Array(ge);for(ee=0;ee<ge;ee++)Je[ee]=0;for(ee=F;ee<=M;ee++){const We=T[ee];if(Se>=ge){ye(We,O,W,!0);continue}let Ie;if(We.key!=null)Ie=re.get(We.key);else for(ae=ie;ae<=A;ae++)if(Je[ae-ie]===0&&qn(We,E[ae])){Ie=ae;break}Ie===void 0?ye(We,O,W,!0):(Je[Ie-ie]=ee+1,Ie>=Oe?Oe=Ie:we=!0,_(We,E[Ie],w,null,O,W,q,Z,ce),Se++)}const _e=we?uS(Je):ys;for(ae=_e.length-1,ee=ge-1;ee>=0;ee--){const We=ie+ee,Ie=E[We],Fe=We+1<z?E[We+1].el:N;Je[ee]===0?_(null,Ie,w,Fe,O,W,q,Z,ce):we&&(ae<0||ee!==_e[ae]?me(Ie,w,Fe,2):ae--)}}},me=(T,E,w,N,O=null)=>{const{el:W,type:q,transition:Z,children:ce,shapeFlag:ee}=T;if(ee&6){me(T.component.subTree,E,w,N);return}if(ee&128){T.suspense.move(E,w,N);return}if(ee&64){q.move(T,E,w,ne);return}if(q===Lt){i(W,E,w);for(let M=0;M<ce.length;M++)me(ce[M],E,w,N);i(T.anchor,E,w);return}if(q===Eo){y(T,E,w);return}if(N!==2&&ee&1&&Z)if(N===0)Z.beforeEnter(W),i(W,E,w),Xt(()=>Z.enter(W),O);else{const{leave:M,delayLeave:A,afterLeave:F}=Z,ie=()=>i(W,E,w),re=()=>{M(W,()=>{ie(),F&&F()})};A?A(W,ie,re):re()}else i(W,E,w)},ye=(T,E,w,N=!1,O=!1)=>{const{type:W,props:q,ref:Z,children:ce,dynamicChildren:ee,shapeFlag:z,patchFlag:M,dirs:A}=T;if(Z!=null&&ul(Z,null,w,T,!0),z&256){E.ctx.deactivate(T);return}const F=z&1&&A,ie=!Dr(T);let re;if(ie&&(re=q&&q.onVnodeBeforeUnmount)&&gn(re,E,T),z&6)be(T.component,w,N);else{if(z&128){T.suspense.unmount(w,N);return}F&&oi(T,null,E,"beforeUnmount"),z&64?T.type.remove(T,E,w,O,ne,N):ee&&(W!==Lt||M>0&&M&64)?Te(ee,E,w,!1,!0):(W===Lt&&M&384||!O&&z&16)&&Te(ce,E,w),N&&te(T)}(ie&&(re=q&&q.onVnodeUnmounted)||F)&&Xt(()=>{re&&gn(re,E,T),F&&oi(T,null,E,"unmounted")},w)},te=T=>{const{type:E,el:w,anchor:N,transition:O}=T;if(E===Lt){fe(w,N);return}if(E===Eo){x(T);return}const W=()=>{r(w),O&&!O.persisted&&O.afterLeave&&O.afterLeave()};if(T.shapeFlag&1&&O&&!O.persisted){const{leave:q,delayLeave:Z}=O,ce=()=>q(w,W);Z?Z(T.el,W,ce):ce()}else W()},fe=(T,E)=>{let w;for(;T!==E;)w=h(T),r(T),T=w;r(E)},be=(T,E,w)=>{const{bum:N,scope:O,update:W,subTree:q,um:Z}=T;N&&xo(N),O.stop(),W&&(W.active=!1,ye(q,T,E,w)),Z&&Xt(Z,E),Xt(()=>{T.isUnmounted=!0},E),E&&E.pendingBranch&&!E.isUnmounted&&T.asyncDep&&!T.asyncResolved&&T.suspenseId===E.pendingId&&(E.deps--,E.deps===0&&E.resolve())},Te=(T,E,w,N=!1,O=!1,W=0)=>{for(let q=W;q<T.length;q++)ye(T[q],E,w,N,O)},V=T=>T.shapeFlag&6?V(T.component.subTree):T.shapeFlag&128?T.suspense.next():h(T.anchor||T.el),ue=(T,E,w)=>{T==null?E._vnode&&ye(E._vnode,null,null,!0):_(E._vnode||null,T,E,null,null,null,w),Dd(),ol(),E._vnode=T},ne={p:_,um:ye,m:me,r:te,mt:D,mc:I,pc:oe,pbc:L,n:V,o:t};let de,Me;return e&&([de,Me]=e(ne)),{render:ue,hydrate:de,createApp:tS(ue,de)}}function gr({effect:t,update:e},n){t.allowRecurse=e.allowRecurse=n}function v_(t,e,n=!1){const i=t.children,r=e.children;if(Ue(i)&&Ue(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]=ji(r[s]),a.el=o.el),n||v_(o,a)),a.type===Br&&(a.el=o.el)}}function uS(t){const e=t.slice(),n=[0];let i,r,s,o,a;const l=t.length;for(i=0;i<l;i++){const c=t[i];if(c!==0){if(r=n[n.length-1],t[r]<c){e[i]=r,n.push(i);continue}for(s=0,o=n.length-1;s<o;)a=s+o>>1,t[n[a]]<c?s=a+1:o=a;c<t[n[s]]&&(s>0&&(e[i]=n[s-1]),n[s]=i)}}for(s=n.length,o=n[s-1];s-- >0;)n[s]=o,o=e[o];return n}const fS=t=>t.__isTeleport,Lt=Symbol.for("v-fgt"),Br=Symbol.for("v-txt"),fn=Symbol.for("v-cmt"),Eo=Symbol.for("v-stc"),bo=[];let Nn=null;function Xe(t=!1){bo.push(Nn=t?null:[])}function y_(){bo.pop(),Nn=bo[bo.length-1]||null}let Rs=1;function Xd(t){Rs+=t}function x_(t){return t.dynamicChildren=Rs>0?Nn||ys:null,y_(),Rs>0&&Nn&&Nn.push(t),t}function yt(t,e,n,i,r,s){return x_(mt(t,e,n,i,r,s,!0))}function nn(t,e,n,i,r){return x_(De(t,e,n,i,r,!0))}function Cs(t){return t?t.__v_isVNode===!0:!1}function qn(t,e){return t.type===e.type&&t.key===e.key}const Ol="__vInternal",S_=({key:t})=>t??null,el=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?bt(t)||ut(t)||Ve(t)?{i:Wt,r:t,k:e,f:!!n}:t:null);function mt(t,e=null,n=null,i=0,r=null,s=t===Lt?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&S_(e),ref:e&&el(e),scopeId:Nl,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:i,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Wt};return a?(Wf(l,n),s&128&&t.normalize(l)):n&&(l.shapeFlag|=bt(n)?8:16),Rs>0&&!o&&Nn&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&Nn.push(l),l}const De=dS;function dS(t,e=null,n=null,i=0,r=null,s=!1){if((!t||t===a_)&&(t=fn),Cs(t)){const a=Di(t,e,!0);return n&&Wf(a,n),Rs>0&&!s&&Nn&&(a.shapeFlag&6?Nn[Nn.indexOf(t)]=a:Nn.push(a)),a.patchFlag|=-2,a}if(SS(t)&&(t=t.__vccOpts),e){e=hS(e);let{class:a,style:l}=e;a&&!bt(a)&&(e.class=Rt(a)),gt(l)&&(Ug(l)&&!Ue(l)&&(l=Nt({},l)),e.style=Un(l))}const o=bt(t)?1:jg(t)?128:fS(t)?64:gt(t)?4:Ve(t)?2:0;return mt(t,e,n,i,r,o,s,!0)}function hS(t){return t?Ug(t)||Ol in t?Nt({},t):t:null}function Di(t,e,n=!1){const{props:i,ref:r,patchFlag:s,children:o}=t,a=e?Fl(i||{},e):i;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:a,key:a&&S_(a),ref:e&&e.ref?n&&r?Ue(r)?r.concat(el(e)):[r,el(e)]:el(e):r,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:o,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Lt?s===-1?16:s|16:s,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Di(t.ssContent),ssFallback:t.ssFallback&&Di(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function E_(t=" ",e=0){return De(Br,null,t,e)}function OO(t,e){const n=De(Eo,null,t);return n.staticCount=e,n}function hi(t="",e=!1){return e?(Xe(),nn(fn,null,t)):De(fn,null,t)}function Pn(t){return t==null||typeof t=="boolean"?De(fn):Ue(t)?De(Lt,null,t.slice()):typeof t=="object"?ji(t):De(Br,null,String(t))}function ji(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Di(t)}function Wf(t,e){let n=0;const{shapeFlag:i}=t;if(e==null)e=null;else if(Ue(e))n=16;else if(typeof e=="object")if(i&65){const r=e.default;r&&(r._c&&(r._d=!1),Wf(t,r()),r._c&&(r._d=!0));return}else{n=32;const r=e._;!r&&!(Ol in e)?e._ctx=Wt:r===3&&Wt&&(Wt.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else Ve(e)?(e={default:e,_ctx:Wt},n=32):(e=String(e),i&64?(n=16,e=[E_(e)]):n=8);t.children=e,t.shapeFlag|=n}function Fl(...t){const e={};for(let n=0;n<t.length;n++){const i=t[n];for(const r in i)if(r==="class")e.class!==i.class&&(e.class=Rt([e.class,i.class]));else if(r==="style")e.style=Un([e.style,i.style]);else if(jo(r)){const s=e[r],o=i[r];o&&s!==o&&!(Ue(s)&&s.includes(o))&&(e[r]=s?[].concat(s,o):o)}else r!==""&&(e[r]=i[r])}return e}function gn(t,e,n,i=null){On(t,e,7,[n,i])}const pS=f_();let mS=0;function gS(t,e,n){const i=t.type,r=(e?e.appContext:t.appContext)||pS,s={uid:mS++,vnode:t,type:i,parent:e,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new Eg(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:h_(i,r),emitsOptions:Xg(i,r),emit:null,emitted:null,propsDefaults:vt,inheritAttrs:i.inheritAttrs,ctx:vt,data:vt,props:vt,attrs:vt,slots:vt,refs:vt,setupState:vt,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:n,suspenseId:n?n.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=bx.bind(null,s),t.ce&&t.ce(s),s}let Dt=null;const Bn=()=>Dt||Wt;let $f,Xr,jd="__VUE_INSTANCE_SETTERS__";(Xr=pu()[jd])||(Xr=pu()[jd]=[]),Xr.push(t=>Dt=t),$f=t=>{Xr.length>1?Xr.forEach(e=>e(t)):Xr[0](t)};const or=t=>{$f(t),t.scope.on()},nr=()=>{Dt&&Dt.scope.off(),$f(null)};function b_(t){return t.vnode.shapeFlag&4}let Ls=!1;function _S(t,e=!1){Ls=e;const{props:n,children:i}=t.vnode,r=b_(t);nS(t,n,r,e),sS(t,i);const s=r?vS(t,e):void 0;return Ls=!1,s}function vS(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=Pl(new Proxy(t.ctx,jx));const{setup:i}=n;if(i){const r=t.setupContext=i.length>1?xS(t):null;or(t),Ws();const s=tr(i,t,0,[t.props,r]);if($s(),nr(),Tf(s)){if(s.then(nr,nr),e)return s.then(o=>{Mu(t,o,e)}).catch(o=>{Xs(o,t,0)});t.asyncDep=s}else Mu(t,s,e)}else M_(t,e)}function Mu(t,e,n){Ve(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:gt(e)&&(t.setupState=Bg(e)),M_(t,n)}let qd;function M_(t,e,n){const i=t.type;if(!t.render){if(!e&&qd&&!i.render){const r=i.template||zf(t).template;if(r){const{isCustomElement:s,compilerOptions:o}=t.appContext.config,{delimiters:a,compilerOptions:l}=i,c=Nt(Nt({isCustomElement:s,delimiters:a},o),l);i.render=qd(r,c)}}t.render=i.render||Jn}or(t),Ws(),Yx(t),$s(),nr()}function yS(t){return t.attrsProxy||(t.attrsProxy=new Proxy(t.attrs,{get(e,n){return xn(t,"get","$attrs"),e[n]}}))}function xS(t){const e=n=>{t.exposed=n||{}};return{get attrs(){return yS(t)},slots:t.slots,emit:t.emit,expose:e}}function kl(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(Bg(Pl(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in So)return So[n](t)},has(e,n){return n in e||n in So}}))}function Tu(t,e=!0){return Ve(t)?t.displayName||t.name:t.name||e&&t.__name}function SS(t){return Ve(t)&&"__vccOpts"in t}const He=(t,e)=>vx(t,e,Ls);function Et(t,e,n){const i=arguments.length;return i===2?gt(e)&&!Ue(e)?Cs(e)?De(t,null,[e]):De(t,e):De(t,null,e):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&Cs(n)&&(n=[n]),De(t,e,n))}const ES=Symbol.for("v-scx"),bS=()=>Ft(ES),T_="3.3.4",MS="http://www.w3.org/2000/svg",Rr=typeof document<"u"?document:null,Yd=Rr&&Rr.createElement("template"),TS={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,i)=>{const r=e?Rr.createElementNS(MS,t):Rr.createElement(t,n?{is:n}:void 0);return t==="select"&&i&&i.multiple!=null&&r.setAttribute("multiple",i.multiple),r},createText:t=>Rr.createTextNode(t),createComment:t=>Rr.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Rr.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,i,r,s){const o=n?n.previousSibling:e.lastChild;if(r&&(r===s||r.nextSibling))for(;e.insertBefore(r.cloneNode(!0),n),!(r===s||!(r=r.nextSibling)););else{Yd.innerHTML=i?`<svg>${t}</svg>`:t;const a=Yd.content;if(i){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[o?o.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}};function wS(t,e,n){const i=t._vtc;i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}function AS(t,e,n){const i=t.style,r=bt(n);if(n&&!r){if(e&&!bt(e))for(const s in e)n[s]==null&&wu(i,s,"");for(const s in n)wu(i,s,n[s])}else{const s=i.display;r?e!==n&&(i.cssText=n):e&&t.removeAttribute("style"),"_vod"in t&&(i.display=s)}}const Kd=/\s*!important$/;function wu(t,e,n){if(Ue(n))n.forEach(i=>wu(t,e,i));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const i=RS(t,e);Kd.test(n)?t.setProperty(Gs(i),n.replace(Kd,""),"important"):t[i]=n}}const Zd=["Webkit","Moz","ms"],Ec={};function RS(t,e){const n=Ec[e];if(n)return n;let i=di(e);if(i!=="filter"&&i in t)return Ec[e]=i;i=Rl(i);for(let r=0;r<Zd.length;r++){const s=Zd[r]+i;if(s in t)return Ec[e]=s}return e}const Jd="http://www.w3.org/1999/xlink";function CS(t,e,n,i,r){if(i&&e.startsWith("xlink:"))n==null?t.removeAttributeNS(Jd,e.slice(6,e.length)):t.setAttributeNS(Jd,e,n);else{const s=Fy(e);n==null||s&&!xg(n)?t.removeAttribute(e):t.setAttribute(e,s?"":n)}}function LS(t,e,n,i,r,s,o){if(e==="innerHTML"||e==="textContent"){i&&o(i,r,s),t[e]=n??"";return}const a=t.tagName;if(e==="value"&&a!=="PROGRESS"&&!a.includes("-")){t._value=n;const c=a==="OPTION"?t.getAttribute("value"):t.value,u=n??"";c!==u&&(t.value=u),n==null&&t.removeAttribute(e);return}let l=!1;if(n===""||n==null){const c=typeof t[e];c==="boolean"?n=xg(n):n==null&&c==="string"?(n="",l=!0):c==="number"&&(n=0,l=!0)}try{t[e]=n}catch{}l&&t.removeAttribute(e)}function PS(t,e,n,i){t.addEventListener(e,n,i)}function IS(t,e,n,i){t.removeEventListener(e,n,i)}function DS(t,e,n,i,r=null){const s=t._vei||(t._vei={}),o=s[e];if(i&&o)o.value=i;else{const[a,l]=NS(e);if(i){const c=s[e]=FS(i,r);PS(t,a,c,l)}else o&&(IS(t,a,o,l),s[e]=void 0)}}const Qd=/(?:Once|Passive|Capture)$/;function NS(t){let e;if(Qd.test(t)){e={};let i;for(;i=t.match(Qd);)t=t.slice(0,t.length-i[0].length),e[i[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):Gs(t.slice(2)),e]}let bc=0;const US=Promise.resolve(),OS=()=>bc||(US.then(()=>bc=0),bc=Date.now());function FS(t,e){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;On(kS(i,n.value),e,5,[i])};return n.value=t,n.attached=OS(),n}function kS(t,e){if(Ue(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(i=>r=>!r._stopped&&i&&i(r))}else return e}const eh=/^on[a-z]/,BS=(t,e,n,i,r=!1,s,o,a,l)=>{e==="class"?wS(t,i,r):e==="style"?AS(t,n,i):jo(e)?Ef(e)||DS(t,e,n,i,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):HS(t,e,i,r))?LS(t,e,i,s,o,a,l):(e==="true-value"?t._trueValue=i:e==="false-value"&&(t._falseValue=i),CS(t,e,i,r))};function HS(t,e,n,i){return i?!!(e==="innerHTML"||e==="textContent"||e in t&&eh.test(e)&&Ve(n)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA"||eh.test(e)&&bt(n)?!1:e in t}const ki="transition",eo="animation",ar=(t,{slots:e})=>Et(kx,zS(t),e);ar.displayName="Transition";const w_={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};ar.props=Nt({},Jg,w_);const _r=(t,e=[])=>{Ue(t)?t.forEach(n=>n(...e)):t&&t(...e)},th=t=>t?Ue(t)?t.some(e=>e.length>1):t.length>1:!1;function zS(t){const e={};for(const U in t)U in w_||(e[U]=t[U]);if(t.css===!1)return e;const{name:n="v",type:i,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=t,g=VS(r),_=g&&g[0],m=g&&g[1],{onBeforeEnter:d,onEnter:v,onEnterCancelled:y,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=d,onAppear:R=v,onAppearCancelled:I=y}=e,b=(U,k,D)=>{vr(U,k?u:a),vr(U,k?c:o),D&&D()},L=(U,k)=>{U._isLeaving=!1,vr(U,f),vr(U,p),vr(U,h),k&&k()},B=U=>(k,D)=>{const G=U?R:v,$=()=>b(k,U,D);_r(G,[k,$]),nh(()=>{vr(k,U?l:s),Bi(k,U?u:a),th(G)||ih(k,i,_,$)})};return Nt(e,{onBeforeEnter(U){_r(d,[U]),Bi(U,s),Bi(U,o)},onBeforeAppear(U){_r(C,[U]),Bi(U,l),Bi(U,c)},onEnter:B(!1),onAppear:B(!0),onLeave(U,k){U._isLeaving=!0;const D=()=>L(U,k);Bi(U,f),$S(),Bi(U,h),nh(()=>{U._isLeaving&&(vr(U,f),Bi(U,p),th(x)||ih(U,i,m,D))}),_r(x,[U,D])},onEnterCancelled(U){b(U,!1),_r(y,[U])},onAppearCancelled(U){b(U,!0),_r(I,[U])},onLeaveCancelled(U){L(U),_r(S,[U])}})}function VS(t){if(t==null)return null;if(gt(t))return[Mc(t.enter),Mc(t.leave)];{const e=Mc(t);return[e,e]}}function Mc(t){return yg(t)}function Bi(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t._vtc||(t._vtc=new Set)).add(e)}function vr(t,e){e.split(/\s+/).forEach(i=>i&&t.classList.remove(i));const{_vtc:n}=t;n&&(n.delete(e),n.size||(t._vtc=void 0))}function nh(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let GS=0;function ih(t,e,n,i){const r=t._endId=++GS,s=()=>{r===t._endId&&i()};if(n)return setTimeout(s,n);const{type:o,timeout:a,propCount:l}=WS(t,e);if(!o)return i();const c=o+"end";let u=0;const f=()=>{t.removeEventListener(c,h),s()},h=p=>{p.target===t&&++u>=l&&f()};setTimeout(()=>{u<l&&f()},a+1),t.addEventListener(c,h)}function WS(t,e){const n=window.getComputedStyle(t),i=g=>(n[g]||"").split(", "),r=i(`${ki}Delay`),s=i(`${ki}Duration`),o=rh(r,s),a=i(`${eo}Delay`),l=i(`${eo}Duration`),c=rh(a,l);let u=null,f=0,h=0;e===ki?o>0&&(u=ki,f=o,h=s.length):e===eo?c>0&&(u=eo,f=c,h=l.length):(f=Math.max(o,c),u=f>0?o>c?ki:eo:null,h=u?u===ki?s.length:l.length:0);const p=u===ki&&/\b(transform|all)(,|$)/.test(i(`${ki}Property`).toString());return{type:u,timeout:f,propCount:h,hasTransform:p}}function rh(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((n,i)=>sh(n)+sh(t[i])))}function sh(t){return Number(t.slice(0,-1).replace(",","."))*1e3}function $S(){return document.body.offsetHeight}const XS=["ctrl","shift","alt","meta"],jS={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>XS.some(n=>t[`${n}Key`]&&!e.includes(n))},FO=(t,e)=>(n,...i)=>{for(let r=0;r<e.length;r++){const s=jS[e[r]];if(s&&s(n,e))return}return t(n,...i)},A_={beforeMount(t,{value:e},{transition:n}){t._vod=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):to(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:i}){!e!=!n&&(i?e?(i.beforeEnter(t),to(t,!0),i.enter(t)):i.leave(t,()=>{to(t,!1)}):to(t,e))},beforeUnmount(t,{value:e}){to(t,e)}};function to(t,e){t.style.display=e?t._vod:"none"}const R_=Nt({patchProp:BS},TS);let Mo,oh=!1;function qS(){return Mo||(Mo=lS(R_))}function YS(){return Mo=oh?Mo:cS(R_),oh=!0,Mo}const KS=(...t)=>{const e=qS().createApp(...t),{mount:n}=e;return e.mount=i=>{const r=C_(i);if(!r)return;const s=e._component;!Ve(s)&&!s.render&&!s.template&&(s.template=r.innerHTML),r.innerHTML="";const o=n(r,!1,r instanceof SVGElement);return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},e},ZS=(...t)=>{const e=YS().createApp(...t),{mount:n}=e;return e.mount=i=>{const r=C_(i);if(r)return n(r,!0,r instanceof SVGElement)},e};function C_(t){return bt(t)?document.querySelector(t):t}const JS=/"(?:_|\\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*:/,QS=/"(?: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*:/,eE=/^\s*["[{]|^\s*-?\d[\d.]{0,14}\s*$/;function tE(t,e){if(t==="__proto__"||t==="constructor"&&e&&typeof e=="object"&&"prototype"in e){nE(t);return}return e}function nE(t){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`)}function L_(t,e={}){if(typeof t!="string")return t;const n=t.trim();if(t[0]==='"'&&t[t.length-1]==='"')return n.slice(1,-1);const i=n.toLowerCase();if(i==="true")return!0;if(i==="false")return!1;if(i!=="undefined"){if(i==="null")return null;if(i==="nan")return Number.NaN;if(i==="infinity")return Number.POSITIVE_INFINITY;if(i==="-infinity")return Number.NEGATIVE_INFINITY;if(!eE.test(t)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return t}try{if(JS.test(t)||QS.test(t)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(t,tE)}return JSON.parse(t)}catch(r){if(e.strict)throw r;return t}}}const iE=/#/g,rE=/&/g,sE=/=/g,P_=/\+/g,oE=/%5e/gi,aE=/%60/gi,lE=/%7c/gi,cE=/%20/gi;function uE(t){return encodeURI(""+t).replace(lE,"|")}function Au(t){return uE(typeof t=="string"?t:JSON.stringify(t)).replace(P_,"%2B").replace(cE,"+").replace(iE,"%23").replace(rE,"%26").replace(aE,"`").replace(oE,"^")}function Tc(t){return Au(t).replace(sE,"%3D")}function fl(t=""){try{return decodeURIComponent(""+t)}catch{return""+t}}function fE(t){return fl(t.replace(P_," "))}function I_(t=""){const e={};t[0]==="?"&&(t=t.slice(1));for(const n of t.split("&")){const i=n.match(/([^=]+)=?(.*)/)||[];if(i.length<2)continue;const r=fl(i[1]);if(r==="__proto__"||r==="constructor")continue;const s=fE(i[2]||"");typeof e[r]<"u"?Array.isArray(e[r])?e[r].push(s):e[r]=[e[r],s]:e[r]=s}return e}function dE(t,e){return(typeof e=="number"||typeof e=="boolean")&&(e=String(e)),e?Array.isArray(e)?e.map(n=>`${Tc(t)}=${Au(n)}`).join("&"):`${Tc(t)}=${Au(e)}`:Tc(t)}function hE(t){return Object.keys(t).filter(e=>t[e]!==void 0).map(e=>dE(e,t[e])).join("&")}const pE=/^\w{2,}:([/\\]{1,2})/,mE=/^\w{2,}:([/\\]{2})?/,gE=/^([/\\]\s*){2,}[^/\\]/;function js(t,e={}){return typeof e=="boolean"&&(e={acceptRelative:e}),e.strict?pE.test(t):mE.test(t)||(e.acceptRelative?gE.test(t):!1)}const _E=/\/$|\/\?/;function Ru(t="",e=!1){return e?_E.test(t):t.endsWith("/")}function Xf(t="",e=!1){if(!e)return(Ru(t)?t.slice(0,-1):t)||"/";if(!Ru(t,!0))return t||"/";const[n,...i]=t.split("?");return(n.slice(0,-1)||"/")+(i.length>0?`?${i.join("?")}`:"")}function dl(t="",e=!1){if(!e)return t.endsWith("/")?t:t+"/";if(Ru(t,!0))return t||"/";const[n,...i]=t.split("?");return n+"/"+(i.length>0?`?${i.join("?")}`:"")}function D_(t=""){return t.startsWith("/")}function vE(t=""){return(D_(t)?t.slice(1):t)||"/"}function ah(t=""){return D_(t)?t:"/"+t}function yE(t,e){if(U_(e)||js(t))return t;const n=Xf(e);return t.startsWith(n)?t:Jo(n,t)}function lh(t,e){if(U_(e))return t;const n=Xf(e);if(!t.startsWith(n))return t;const i=t.slice(n.length);return i[0]==="/"?i:"/"+i}function N_(t,e){const n=Bl(t),i={...I_(n.search),...e};return n.search=hE(i),SE(n)}function U_(t){return!t||t==="/"}function xE(t){return t&&t!=="/"}function Jo(t,...e){let n=t||"";for(const i of e.filter(r=>xE(r)))n=n?dl(n)+vE(i):i;return n}function O_(t,e,n={}){return n.trailingSlash||(t=dl(t),e=dl(e)),n.leadingSlash||(t=ah(t),e=ah(e)),n.encoding||(t=fl(t),e=fl(e)),t===e}function Bl(t="",e){if(!js(t,{acceptRelative:!0}))return e?Bl(e+t):ch(t);const[n="",i,r=""]=(t.replace(/\\/g,"/").match(/([^/:]+:)?\/\/([^/@]+@)?(.*)/)||[]).splice(1),[s="",o=""]=(r.match(/([^#/?]*)(.*)?/)||[]).splice(1),{pathname:a,search:l,hash:c}=ch(o.replace(/\/(?=[A-Za-z]:)/,""));return{protocol:n,auth:i?i.slice(0,Math.max(0,i.length-1)):"",host:s,pathname:a,search:l,hash:c}}function ch(t=""){const[e="",n="",i=""]=(t.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:e,search:n,hash:i}}function SE(t){const e=t.pathname+(t.search?(t.search.startsWith("?")?"":"?")+t.search:"")+t.hash;return t.protocol?t.protocol+"//"+(t.auth?t.auth+"@":"")+t.host+e:e}class EE extends Error{constructor(){super(...arguments),this.name="FetchError"}}function bE(t,e,n){let i="";e&&(i=e.message),t&&n?i=`${i} (${n.status} ${n.statusText} (${t.toString()}))`:t&&(i=`${i} (${t.toString()})`);const r=new EE(i);return Object.defineProperty(r,"request",{get(){return t}}),Object.defineProperty(r,"response",{get(){return n}}),Object.defineProperty(r,"data",{get(){return n&&n._data}}),Object.defineProperty(r,"status",{get(){return n&&n.status}}),Object.defineProperty(r,"statusText",{get(){return n&&n.statusText}}),Object.defineProperty(r,"statusCode",{get(){return n&&n.status}}),Object.defineProperty(r,"statusMessage",{get(){return n&&n.statusText}}),r}const ME=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function uh(t="GET"){return ME.has(t.toUpperCase())}function TE(t){if(t===void 0)return!1;const e=typeof t;return e==="string"||e==="number"||e==="boolean"||e===null?!0:e!=="object"?!1:Array.isArray(t)?!0:t.constructor&&t.constructor.name==="Object"||typeof t.toJSON=="function"}const wE=new Set(["image/svg","application/xml","application/xhtml","application/html"]),AE=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function RE(t=""){if(!t)return"json";const e=t.split(";").shift()||"";return AE.test(e)?"json":wE.has(e)||e.startsWith("text/")?"text":"blob"}function CE(t,e,n=globalThis.Headers){const i={...e,...t};if(e!=null&&e.params&&(t!=null&&t.params)&&(i.params={...e==null?void 0:e.params,...t==null?void 0:t.params}),e!=null&&e.query&&(t!=null&&t.query)&&(i.query={...e==null?void 0:e.query,...t==null?void 0:t.query}),e!=null&&e.headers&&(t!=null&&t.headers)){i.headers=new n((e==null?void 0:e.headers)||{});for(const[r,s]of new n((t==null?void 0:t.headers)||{}))i.headers.set(r,s)}return i}const LE=new Set([408,409,425,429,500,502,503,504]);function F_(t){const{fetch:e,Headers:n}=t;function i(o){const a=o.error&&o.error.name==="AbortError"||!1;if(o.options.retry!==!1&&!a){let c;typeof o.options.retry=="number"?c=o.options.retry:c=uh(o.options.method)?0:1;const u=o.response&&o.response.status||500;if(c>0&&LE.has(u))return r(o.request,{...o.options,retry:c-1})}const l=bE(o.request,o.error,o.response);throw Error.captureStackTrace&&Error.captureStackTrace(l,r),l}const r=async function(a,l={}){const c={request:a,options:CE(l,t.defaults,n),response:void 0,error:void 0};c.options.onRequest&&await c.options.onRequest(c),typeof c.request=="string"&&(c.options.baseURL&&(c.request=yE(c.request,c.options.baseURL)),(c.options.query||c.options.params)&&(c.request=N_(c.request,{...c.options.params,...c.options.query})),c.options.body&&uh(c.options.method)&&TE(c.options.body)&&(c.options.body=typeof c.options.body=="string"?c.options.body:JSON.stringify(c.options.body),c.options.headers=new n(c.options.headers||{}),c.options.headers.has("content-type")||c.options.headers.set("content-type","application/json"),c.options.headers.has("accept")||c.options.headers.set("accept","application/json")));try{c.response=await e(c.request,c.options)}catch(f){return c.error=f,c.options.onRequestError&&await c.options.onRequestError(c),await i(c)}const u=(c.options.parseResponse?"json":c.options.responseType)||RE(c.response.headers.get("content-type")||"");if(u==="json"){const f=await c.response.text(),h=c.options.parseResponse||L_;c.response._data=h(f)}else u==="stream"?c.response._data=c.response.body:c.response._data=await c.response[u]();return c.options.onResponse&&await c.options.onResponse(c),!c.options.ignoreResponseError&&c.response.status>=400&&c.response.status<600?(c.options.onResponseError&&await c.options.onResponseError(c),await i(c)):c.response},s=async function(a,l){return(await r(a,l))._data};return s.raw=r,s.native=e,s.create=(o={})=>F_({...t,defaults:{...t.defaults,...o}}),s}const k_=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")}(),PE=k_.fetch||(()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!"))),IE=k_.Headers,DE=F_({fetch:PE,Headers:IE}),NE=DE,UE=()=>{var t;return((t=window==null?void 0:window.__NUXT__)==null?void 0:t.config)||{}},hl=UE().app,OE=()=>hl.baseURL,FE=()=>hl.buildAssetsDir,kE=(...t)=>Jo(B_(),FE(),...t),B_=(...t)=>{const e=hl.cdnURL||hl.baseURL;return t.length?Jo(e,...t):e};globalThis.__buildAssetsURL=kE,globalThis.__publicAssetsURL=B_;function Cu(t,e={},n){for(const i in t){const r=t[i],s=n?`${n}:${i}`:i;typeof r=="object"&&r!==null?Cu(r,e,s):typeof r=="function"&&(e[s]=r)}return e}const BE={run:t=>t()},HE=()=>BE,H_=typeof console.createTask<"u"?console.createTask:HE;function zE(t,e){const n=e.shift(),i=H_(n);return t.reduce((r,s)=>r.then(()=>i.run(()=>s(...e))),Promise.resolve())}function VE(t,e){const n=e.shift(),i=H_(n);return Promise.all(t.map(r=>i.run(()=>r(...e))))}function wc(t,e){for(const n of[...t])n(e)}class GE{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,n,i={}){if(!e||typeof n!="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)||(console.warn(o),this._deprecatedMessages.add(o))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+e.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(n),()=>{n&&(this.removeHook(e,n),n=void 0)}}hookOnce(e,n){let i,r=(...s)=>(typeof i=="function"&&i(),i=void 0,r=void 0,n(...s));return i=this.hook(e,r),i}removeHook(e,n){if(this._hooks[e]){const i=this._hooks[e].indexOf(n);i!==-1&&this._hooks[e].splice(i,1),this._hooks[e].length===0&&delete this._hooks[e]}}deprecateHook(e,n){this._deprecatedHooks[e]=typeof n=="string"?{to:n}:n;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 n in e)this.deprecateHook(n,e[n])}addHooks(e){const n=Cu(e),i=Object.keys(n).map(r=>this.hook(r,n[r]));return()=>{for(const r of i.splice(0,i.length))r()}}removeHooks(e){const n=Cu(e);for(const i in n)this.removeHook(i,n[i])}removeAllHooks(){for(const e in this._hooks)delete this._hooks[e]}callHook(e,...n){return n.unshift(e),this.callHookWith(zE,e,...n)}callHookParallel(e,...n){return n.unshift(e),this.callHookWith(VE,e,...n)}callHookWith(e,n,...i){const r=this._before||this._after?{name:n,args:i,context:{}}:void 0;this._before&&wc(this._before,r);const s=e(n in this._hooks?[...this._hooks[n]]:[],i);return s instanceof Promise?s.finally(()=>{this._after&&r&&wc(this._after,r)}):(this._after&&r&&wc(this._after,r),s)}beforeEach(e){return this._before=this._before||[],this._before.push(e),()=>{if(this._before!==void 0){const n=this._before.indexOf(e);n!==-1&&this._before.splice(n,1)}}}afterEach(e){return this._after=this._after||[],this._after.push(e),()=>{if(this._after!==void 0){const n=this._after.indexOf(e);n!==-1&&this._after.splice(n,1)}}}}function z_(){return new GE}function WE(t={}){let e,n=!1;const i=o=>{if(e&&e!==o)throw new Error("Context conflict")};let r;if(t.asyncContext){const o=t.AsyncLocalStorage||globalThis.AsyncLocalStorage;o?r=new o:console.warn("[unctx] `AsyncLocalStorage` is not provided.")}const s=()=>{if(r&&e===void 0){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,n=!0},unset:()=>{e=void 0,n=!1},call:(o,a)=>{i(o),e=o;try{return r?r.run(o,a):a()}finally{n||(e=void 0)}},async callAsync(o,a){e=o;const l=()=>{e=o},c=()=>e===o?l:void 0;Lu.add(c);try{const u=r?r.run(o,a):a();return n||(e=void 0),await u}finally{Lu.delete(c)}}}}function $E(t={}){const e={};return{get(n,i={}){return e[n]||(e[n]=WE({...t,...i})),e[n],e[n]}}}const pl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof global<"u"?global:typeof window<"u"?window:{},fh="__unctx__",XE=pl[fh]||(pl[fh]=$E()),jE=(t,e={})=>XE.get(t,e),dh="__unctx_async_handlers__",Lu=pl[dh]||(pl[dh]=new Set);function Nr(t){const e=[];for(const r of Lu){const s=r();s&&e.push(s)}const n=()=>{for(const r of e)r()};let i=t();return i&&typeof i=="object"&&"catch"in i&&(i=i.catch(r=>{throw n(),r})),[i,n]}const V_=jE("nuxt-app"),qE="__nuxt_plugin";function YE(t){let e=0;const n={provide:void 0,globalName:"nuxt",versions:{get nuxt(){return"3.6.5"},get vue(){return n.vueApp.version}},payload:Fn({data:{},state:{},_errors:{},...window.__NUXT__??{}}),static:{data:{}},runWithContext:r=>JE(n,r),isHydrating:!0,deferHydration(){if(!n.isHydrating)return()=>{};e++;let r=!1;return()=>{if(!r&&(r=!0,e--,e===0))return n.isHydrating=!1,n.callHook("app:suspense:resolve")}},_asyncDataPromises:{},_asyncData:{},_payloadRevivers:{},...t};n.hooks=z_(),n.hook=n.hooks.hook,n.callHook=n.hooks.callHook,n.provide=(r,s)=>{const o="$"+r;xa(n,o,s),xa(n.vueApp.config.globalProperties,o,s)},xa(n.vueApp,"$nuxt",n),xa(n.vueApp.config.globalProperties,"$nuxt",n);{window.addEventListener("nuxt.preloadError",s=>{n.callHook("app:chunkError",{error:s.payload})}),window.useNuxtApp=window.useNuxtApp||ft;const r=n.hook("app:error",(...s)=>{console.error("[nuxt] error caught during app initialization",...s)});n.hook("app:mounted",r)}const i=Fn(n.payload.config);return n.provide("config",i),n}async function KE(t,e){if(e.hooks&&t.hooks.addHooks(e.hooks),typeof e=="function"){const{provide:n}=await t.runWithContext(()=>e(t))||{};if(n&&typeof n=="object")for(const i in n)t.provide(i,n[i])}}async function ZE(t,e){const n=[],i=[];for(const r of e){const s=KE(t,r);r.parallel?n.push(s.catch(o=>i.push(o))):await s}if(await Promise.all(n),i.length)throw i[0]}/*! @__NO_SIDE_EFFECTS__ */function ti(t){return typeof t=="function"?t:(delete t.name,Object.assign(t.setup||(()=>{}),t,{[qE]:!0}))}function JE(t,e,n){const i=()=>n?e(...n):e();return V_.set(t),t.vueApp.runWithContext(i)}/*! @__NO_SIDE_EFFECTS__ */function ft(){var e;let t;if(Vf()&&(t=(e=Bn())==null?void 0:e.appContext.app.$nuxt),t=t||V_.tryUse(),!t)throw new Error("[nuxt] instance unavailable");return t}/*! @__NO_SIDE_EFFECTS__ */function Hl(){return ft().$config}function xa(t,e,n){Object.defineProperty(t,e,{get:()=>n})}const QE="modulepreload",eb=function(t,e){return t.startsWith(".")?new URL(t,e).href:t},hh={},tb=function(e,n,i){if(!n||n.length===0)return e();const r=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=eb(s,i),s in hh)return;hh[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!i)for(let u=r.length-1;u>=0;u--){const f=r[u];if(f.href===s&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const c=document.createElement("link");if(c.rel=o?"stylesheet":QE,o||(c.as="script",c.crossOrigin=""),c.href=s,document.head.appendChild(c),o)return new Promise((u,f)=>{c.addEventListener("load",u),c.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e())},Tt=(...t)=>tb(...t).catch(e=>{const n=new Event("nuxt.preloadError");throw n.payload=e,window.dispatchEvent(n),e}),nb=-1,ib=-2,rb=-3,sb=-4,ob=-5,ab=-6;function lb(t,e){return cb(JSON.parse(t),e)}function cb(t,e){if(typeof t=="number")return r(t,!0);if(!Array.isArray(t)||t.length===0)throw new Error("Invalid input");const n=t,i=Array(n.length);function r(s,o=!1){if(s===nb)return;if(s===rb)return NaN;if(s===sb)return 1/0;if(s===ob)return-1/0;if(s===ab)return-0;if(o)throw new Error("Invalid input");if(s in i)return i[s];const a=n[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==null?void 0:e[l];if(c)return i[s]=c(r(a[1]));switch(l){case"Date":i[s]=new Date(a[1]);break;case"Set":const u=new Set;i[s]=u;for(let p=1;p<a.length;p+=1)u.add(r(a[p]));break;case"Map":const f=new Map;i[s]=f;for(let p=1;p<a.length;p+=2)f.set(r(a[p]),r(a[p+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 p=1;p<a.length;p+=2)h[a[p]]=r(a[p+1]);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!==ib&&(l[c]=r(u))}}else{const l={};i[s]=l;for(const c in a){const u=a[c];l[c]=r(u)}}return i[s]}return r(0)}function ub(t){return Array.isArray(t)?t:[t]}const G_=["title","script","style","noscript"],W_=["base","meta","link","style","script","noscript"],fb=["title","titleTemplate","templateParams","base","htmlAttrs","bodyAttrs","meta","link","style","script","noscript"],db=["base","title","titleTemplate","bodyAttrs","htmlAttrs","templateParams"],hb=["tagPosition","tagPriority","tagDuplicateStrategy","innerHTML","textContent"];function $_(t){let e=9;for(let n=0;n<t.length;)e=Math.imul(e^t.charCodeAt(n++),9**9);return((e^e>>>9)+65536).toString(16).substring(1,8).toLowerCase()}function Pu(t){return $_(`${t.tag}:${t.textContent||t.innerHTML||""}:${Object.entries(t.props).map(([e,n])=>`${e}:${String(n)}`).join(",")}`)}function pb(t){let e=9;for(const n of t)for(let i=0;i<n.length;)e=Math.imul(e^n.charCodeAt(i++),9**9);return((e^e>>>9)+65536).toString(16).substring(1,8).toLowerCase()}function X_(t,e){const{props:n,tag:i}=t;if(db.includes(i))return i;if(i==="link"&&n.rel==="canonical")return"canonical";if(n.charset)return"charset";const r=["id"];i==="meta"&&r.push("name","property","http-equiv");for(const s of r)if(typeof n[s]<"u"){const o=String(n[s]);return e&&!e(o)?!1:`${i}:${s}:${o}`}return!1}function ph(t,e){return t==null?e||null:typeof t=="function"?t(e):t}function Sa(t,e=!1,n){const{tag:i,$el:r}=t;r&&(Object.entries(i.props).forEach(([s,o])=>{o=String(o);const a=`attr:${s}`;if(s==="class"){if(!o)return;for(const l of o.split(" ")){const c=`${a}:${l}`;n&&n(t,c,()=>r.classList.remove(l)),r.classList.contains(l)||r.classList.add(l)}return}n&&!s.startsWith("data-h-")&&n(t,a,()=>r.removeAttribute(s)),(e||r.getAttribute(s)!==o)&&r.setAttribute(s,o)}),G_.includes(i.tag)&&(i.textContent&&i.textContent!==r.textContent?r.textContent=i.textContent:i.innerHTML&&i.innerHTML!==r.innerHTML&&(r.innerHTML=i.innerHTML)))}let no=!1;async function mb(t,e={}){var h,p;const n={shouldRender:!0};if(await t.hooks.callHook("dom:beforeRender",n),!n.shouldRender)return;const i=e.document||t.resolvedOptions.document||window.document,r=(await t.resolveTags()).map(a);if(t.resolvedOptions.experimentalHashHydration&&(no=no||t._hash||!1,no)){const g=pb(r.map(_=>_.tag._h));if(no===g)return;no=g}const s=t._popSideEffectQueue();t.headEntries().map(g=>g._sde).forEach(g=>{Object.entries(g).forEach(([_,m])=>{s[_]=m})});const o=(g,_,m)=>{_=`${g.renderId}:${_}`,g.entry&&(g.entry._sde[_]=m),delete s[_]};function a(g){const _=t.headEntries().find(d=>d._i===g._e),m={renderId:g._d||Pu(g),$el:null,shouldRender:!0,tag:g,entry:_,markSideEffect:(d,v)=>o(m,d,v)};return m}const l=[],c={body:[],head:[]},u=g=>{t._elMap[g.renderId]=g.$el,l.push(g),o(g,"el",()=>{var _;(_=g.$el)==null||_.remove(),delete t._elMap[g.renderId]})};for(const g of r){if(await t.hooks.callHook("dom:beforeRenderTag",g),!g.shouldRender)continue;const{tag:_}=g;if(_.tag==="title"){i.title=_.textContent||"",l.push(g);continue}if(_.tag==="htmlAttrs"||_.tag==="bodyAttrs"){g.$el=i[_.tag==="htmlAttrs"?"documentElement":"body"],Sa(g,!1,o),l.push(g);continue}if(g.$el=t._elMap[g.renderId],!g.$el&&_.key&&(g.$el=i.querySelector(`${(h=_.tagPosition)!=null&&h.startsWith("body")?"body":"head"} > ${_.tag}[data-h-${_._h}]`)),g.$el){g.tag._d&&Sa(g),u(g);continue}c[(p=_.tagPosition)!=null&&p.startsWith("body")?"body":"head"].push(g)}const f={bodyClose:void 0,bodyOpen:void 0,head:void 0};Object.entries(c).forEach(([g,_])=>{var d;if(!_.length)return;const m=(d=i==null?void 0:i[g])==null?void 0:d.children;if(m){for(const v of[...m].reverse()){const y=v.tagName.toLowerCase();if(!W_.includes(y))continue;const x=v.getAttributeNames().reduce((I,b)=>({...I,[b]:v.getAttribute(b)}),{}),S={tag:y,props:x};v.innerHTML&&(S.innerHTML=v.innerHTML);const C=Pu(S);let R=_.findIndex(I=>(I==null?void 0:I.renderId)===C);if(R===-1){const I=X_(S);R=_.findIndex(b=>(b==null?void 0:b.tag._d)&&b.tag._d===I)}if(R!==-1){const I=_[R];I.$el=v,Sa(I),u(I),delete _[R]}}_.forEach(v=>{const y=v.tag.tagPosition||"head";f[y]=f[y]||i.createDocumentFragment(),v.$el||(v.$el=i.createElement(v.tag.tag),Sa(v,!0)),f[y].appendChild(v.$el),u(v)})}}),f.head&&i.head.appendChild(f.head),f.bodyOpen&&i.body.insertBefore(f.bodyOpen,i.body.firstChild),f.bodyClose&&i.body.appendChild(f.bodyClose);for(const g of l)await t.hooks.callHook("dom:renderTag",g);Object.values(s).forEach(g=>g())}let Ac=null;async function gb(t,e={}){function n(){return Ac=null,mb(t,e)}const i=e.delayFn||(r=>setTimeout(r,10));return Ac=Ac||new Promise(r=>i(()=>r(n())))}function _b(t){return{hooks:{"entries:updated":function(e){if(typeof(t==null?void 0:t.document)>"u"&&typeof window>"u")return;let n=t==null?void 0:t.delayFn;!n&&typeof requestAnimationFrame<"u"&&(n=requestAnimationFrame),gb(e,{document:(t==null?void 0:t.document)||window.document,delayFn:n})}}}}function vb(t){var e;return((e=t==null?void 0:t.head.querySelector('meta[name="unhead:ssr"]'))==null?void 0:e.getAttribute("content"))||!1}const mh={base:-1,title:1},gh={critical:-8,high:-1,low:2};function ml(t){let e=10;const n=t.tagPriority;return typeof n=="number"?n:(t.tag==="meta"?(t.props.charset&&(e=-2),t.props["http-equiv"]==="content-security-policy"&&(e=0)):t.tag in mh&&(e=mh[t.tag]),typeof n=="string"&&n in gh?e+gh[n]:e)}const yb=[{prefix:"before:",offset:-1},{prefix:"after:",offset:1}];function xb(){return{hooks:{"tags:resolve":t=>{const e=n=>{var i;return(i=t.tags.find(r=>r._d===n))==null?void 0:i._p};for(const{prefix:n,offset:i}of yb)for(const r of t.tags.filter(s=>typeof s.tagPriority=="string"&&s.tagPriority.startsWith(n))){const s=e(r.tagPriority.replace(n,""));typeof s<"u"&&(r._p=s+i)}t.tags.sort((n,i)=>n._p-i._p).sort((n,i)=>ml(n)-ml(i))}}}}function Sb(){return{hooks:{"tags:resolve":t=>{const{tags:e}=t;let n=e.findIndex(r=>r.tag==="titleTemplate");const i=e.findIndex(r=>r.tag==="title");if(i!==-1&&n!==-1){const r=ph(e[n].textContent,e[i].textContent);r!==null?e[i].textContent=r||e[i].textContent:delete e[i]}else if(n!==-1){const r=ph(e[n].textContent);r!==null&&(e[n].textContent=r,e[n].tag="title",n=-1)}n!==-1&&delete e[n],t.tags=e.filter(Boolean)}}}}function Eb(){return{hooks:{"tag:normalise":function({tag:t}){typeof t.props.body<"u"&&(t.tagPosition="bodyClose",delete t.props.body)}}}}const bb=["link","style","script","noscript"];function Mb(){return{hooks:{"tag:normalise":({tag:t,resolvedOptions:e})=>{e.experimentalHashHydration===!0&&(t._h=Pu(t)),t.key&&bb.includes(t.tag)&&(t._h=$_(t.key),t.props[`data-h-${t._h}`]="")}}}}const _h=["script","link","bodyAttrs"];function Tb(){const t=(e,n)=>{const i={},r={};Object.entries(n.props).forEach(([o,a])=>{o.startsWith("on")&&typeof a=="function"?r[o]=a:i[o]=a});let s;return e==="dom"&&n.tag==="script"&&typeof i.src=="string"&&typeof r.onload<"u"&&(s=i.src,delete i.src),{props:i,eventHandlers:r,delayedSrc:s}};return{hooks:{"ssr:render":function(e){e.tags=e.tags.map(n=>(!_h.includes(n.tag)||!Object.entries(n.props).find(([i,r])=>i.startsWith("on")&&typeof r=="function")||(n.props=t("ssr",n).props),n))},"dom:beforeRenderTag":function(e){if(!_h.includes(e.tag.tag)||!Object.entries(e.tag.props).find(([s,o])=>s.startsWith("on")&&typeof o=="function"))return;const{props:n,eventHandlers:i,delayedSrc:r}=t("dom",e.tag);Object.keys(i).length&&(e.tag.props=n,e.tag._eventHandlers=i,e.tag._delayedSrc=r)},"dom:renderTag":function(e){const n=e.$el;if(!e.tag._eventHandlers||!n)return;const i=e.tag.tag==="bodyAttrs"&&typeof window<"u"?window:n;Object.entries(e.tag._eventHandlers).forEach(([r,s])=>{const o=`${e.tag._d||e.tag._p}:${r}`,a=r.slice(2).toLowerCase(),l=`data-h-${a}`;if(e.markSideEffect(o,()=>{}),n.hasAttribute(l))return;const c=s;n.setAttribute(l,""),i.addEventListener(a,c),e.entry&&(e.entry._sde[o]=()=>{i.removeEventListener(a,c),n.removeAttribute(l)})}),e.tag._delayedSrc&&n.setAttribute("src",e.tag._delayedSrc)}}}}const wb=["templateParams","htmlAttrs","bodyAttrs"];function Ab(){return{hooks:{"tag:normalise":function({tag:t}){["hid","vmid","key"].forEach(i=>{t.props[i]&&(t.key=t.props[i],delete t.props[i])});const n=X_(t)||(t.key?`${t.tag}:${t.key}`:!1);n&&(t._d=n)},"tags:resolve":function(t){const e={};t.tags.forEach(i=>{const r=(i.key?`${i.tag}:${i.key}`:i._d)||i._p,s=e[r];if(s){let a=i==null?void 0:i.tagDuplicateStrategy;if(!a&&wb.includes(i.tag)&&(a="merge"),a==="merge"){const l=s.props;["class","style"].forEach(c=>{i.props[c]&&l[c]&&(c==="style"&&!l[c].endsWith(";")&&(l[c]+=";"),i.props[c]=`${l[c]} ${i.props[c]}`)}),e[r].props={...l,...i.props};return}else if(i._e===s._e){s._duped=s._duped||[],i._d=`${s._d}:${s._duped.length+1}`,s._duped.push(i);return}else if(ml(i)>ml(s))return}const o=Object.keys(i.props).length+(i.innerHTML?1:0)+(i.textContent?1:0);if(W_.includes(i.tag)&&o===0){delete e[r];return}e[r]=i});const n=[];Object.values(e).forEach(i=>{const r=i._duped;delete i._duped,n.push(i),r&&n.push(...r)}),t.tags=n}}}}function io(t,e){if(typeof t!="string")return t;function n(o){if(["s","pageTitle"].includes(o))return e.pageTitle;let a;return o.includes(".")?a=o.split(".").reduce((l,c)=>l&&l[c]||void 0,e):a=e[o],typeof a<"u"?a||"":!1}let i=t;try{i=decodeURI(t)}catch{}(i.match(/%(\w+\.+\w+)|%(\w+)/g)||[]).sort().reverse().forEach(o=>{const a=n(o.slice(1));typeof a=="string"&&(t=t.replace(new RegExp(`\\${o}(\\W|$)`,"g"),`${a}$1`).trim())});const s=e.separator;return t.includes(s)&&(t.endsWith(s)&&(t=t.slice(0,-s.length).trim()),t.startsWith(s)&&(t=t.slice(s.length).trim()),t=t.replace(new RegExp(`\\${s}\\s*\\${s}`,"g"),s)),t}function Rb(){return{hooks:{"tags:resolve":t=>{var s;const{tags:e}=t,n=(s=e.find(o=>o.tag==="title"))==null?void 0:s.textContent,i=e.findIndex(o=>o.tag==="templateParams"),r=i!==-1?e[i].props:{};r.separator=r.separator||"|",r.pageTitle=io(r.pageTitle||n||"",r);for(const o of e)if(["titleTemplate","title"].includes(o.tag)&&typeof o.textContent=="string")o.textContent=io(o.textContent,r);else if(o.tag==="meta"&&typeof o.props.content=="string")o.props.content=io(o.props.content,r);else if(o.tag==="link"&&typeof o.props.href=="string")o.props.href=io(o.props.href,r);else if(o.tag==="script"&&["application/json","application/ld+json"].includes(o.props.type)&&typeof o.innerHTML=="string")try{o.innerHTML=JSON.stringify(JSON.parse(o.innerHTML),(a,l)=>typeof l=="string"?io(l,r):l)}catch{}t.tags=e.filter(o=>o.tag!=="templateParams")}}}}const Cb=typeof window<"u";let j_;function Lb(t){return j_=t}function Pb(){return j_}async function Ib(t,e){const n={tag:t,props:{}};return e instanceof Promise&&(e=await e),t==="templateParams"?(n.props=e,n):["title","titleTemplate"].includes(t)?(e&&typeof e=="object"?(n.textContent=e.textContent,e.tagPriority&&(n.tagPriority=e.tagPriority)):n.textContent=e,n):typeof e=="string"?["script","noscript","style"].includes(t)?(t==="script"&&(/^(https?:)?\/\//.test(e)||e.startsWith("/"))?n.props.src=e:n.innerHTML=e,n):!1:(n.props=await Nb(t,{...e}),n.props.children&&(n.props.innerHTML=n.props.children),delete n.props.children,Object.keys(n.props).filter(i=>hb.includes(i)).forEach(i=>{(!["innerHTML","textContent"].includes(i)||G_.includes(n.tag))&&(n[i]=n.props[i]),delete n.props[i]}),["innerHTML","textContent"].forEach(i=>{if(n.tag==="script"&&typeof n[i]=="string"&&["application/ld+json","application/json"].includes(n.props.type))try{n[i]=JSON.parse(n[i])}catch{n[i]=""}typeof n[i]=="object"&&(n[i]=JSON.stringify(n[i]))}),n.props.class&&(n.props.class=Db(n.props.class)),n.props.content&&Array.isArray(n.props.content)?n.props.content.map(i=>({...n,props:{...n.props,content:i}})):n)}function Db(t){return typeof t=="object"&&!Array.isArray(t)&&(t=Object.keys(t).filter(e=>t[e])),(Array.isArray(t)?t.join(" "):t).split(" ").filter(e=>e.trim()).filter(Boolean).join(" ")}async function Nb(t,e){for(const n of Object.keys(e)){const i=n.startsWith("data-");e[n]instanceof Promise&&(e[n]=await e[n]),String(e[n])==="true"?e[n]=i?"true":"":String(e[n])==="false"&&(i?e[n]="false":delete e[n])}return e}const Ub=10;async function Ob(t){const e=[];return Object.entries(t.resolvedInput).filter(([n,i])=>typeof i<"u"&&fb.includes(n)).forEach(([n,i])=>{const r=ub(i);e.push(...r.map(s=>Ib(n,s)).flat())}),(await Promise.all(e)).flat().filter(Boolean).map((n,i)=>(n._e=t._i,n._p=(t._i<<Ub)+i,n))}function Fb(){return[Ab(),xb(),Rb(),Sb(),Mb(),Tb(),Eb()]}function kb(t={}){return[_b({document:t==null?void 0:t.document,delayFn:t==null?void 0:t.domDelayFn})]}function Bb(t={}){const e=Hb({...t,plugins:[...kb(t),...(t==null?void 0:t.plugins)||[]]});return t.experimentalHashHydration&&e.resolvedOptions.document&&(e._hash=vb(e.resolvedOptions.document)),Lb(e),e}function Hb(t={}){let e=[],n={},i=0;const r=z_();t!=null&&t.hooks&&r.addHooks(t.hooks),t.plugins=[...Fb(),...(t==null?void 0:t.plugins)||[]],t.plugins.forEach(a=>a.hooks&&r.addHooks(a.hooks)),t.document=t.document||(Cb?document:void 0);const s=()=>r.callHook("entries:updated",o),o={resolvedOptions:t,headEntries(){return e},get hooks(){return r},use(a){a.hooks&&r.addHooks(a.hooks)},push(a,l){const c={_i:i++,input:a,_sde:{}};return l!=null&&l.mode&&(c._m=l==null?void 0:l.mode),l!=null&&l.transform&&(c._t=l==null?void 0:l.transform),e.push(c),s(),{dispose(){e=e.filter(u=>u._i!==c._i?!0:(n={...n,...u._sde||{}},u._sde={},s(),!1))},patch(u){e=e.map(f=>(f._i===c._i&&(c.input=f.input=u,s()),f))}}},async resolveTags(){const a={tags:[],entries:[...e]};await r.callHook("entries:resolve",a);for(const l of a.entries){const c=l._t||(u=>u);if(l.resolvedInput=c(l.resolvedInput||l.input),l.resolvedInput)for(const u of await Ob(l)){const f={tag:u,entry:l,resolvedOptions:o.resolvedOptions};await r.callHook("tag:normalise",f),a.tags.push(f.tag)}}return await r.callHook("tags:resolve",a),a.tags},_popSideEffectQueue(){const a={...n};return n={},a},_elMap:{}};return o.hooks.callHook("init",o),o}function zb(t){return typeof t=="function"?t():pe(t)}function gl(t,e=""){if(t instanceof Promise)return t;const n=zb(t);return!t||!n?n:Array.isArray(n)?n.map(i=>gl(i,e)):typeof n=="object"?Object.fromEntries(Object.entries(n).map(([i,r])=>i==="titleTemplate"||i.startsWith("on")?[i,pe(r)]:[i,gl(r,i)])):n}const Vb=T_.startsWith("3"),Gb=typeof window<"u",q_="usehead";function jf(){return Bn()&&Ft(q_)||Pb()}function Wb(t){return{install(n){Vb&&(n.config.globalProperties.$unhead=t,n.config.globalProperties.$head=t,n.provide(q_,t))}}.install}function $b(t={}){const e=Bb({...t,domDelayFn:n=>setTimeout(()=>mi(()=>n()),10),plugins:[Xb(),...(t==null?void 0:t.plugins)||[]]});return e.install=Wb(e),e}function Xb(){return{hooks:{"entries:resolve":function(t){for(const e of t.entries)e.resolvedInput=gl(e.input)}}}}function jb(t,e={}){const n=jf(),i=Ge(!1),r=Ge({});Nx(()=>{r.value=i.value?{}:gl(t)});const s=n.push(r.value,e);return Ot(r,a=>{s.patch(a)}),Bn()&&(Vr(()=>{s.dispose()}),n_(()=>{i.value=!0}),t_(()=>{i.value=!1})),s}function qb(t,e={}){return jf().push(t,e)}function zl(t,e={}){var i;const n=jf();if(n){const r=Gb||!!((i=n.resolvedOptions)!=null&&i.document);return e.mode==="server"&&r||e.mode==="client"&&!r?void 0:r?jb(t,e):qb(t,e)}}const Iu={name:"t-page",mode:"out-in"},Yb={meta:[{charset:"utf-8"},{hid:"description",name:"description",content:""},{name:"format-detection",content:"telephone=no"},{name:"viewport",content:"width=device-width, initial-scale=1"}],link:[{rel:"icon",type:"image/x-icon",href:"/favicon-dark.ico",media:"(prefers-color-scheme: dark)"},{rel:"icon",type:"image/x-icon",href:"/favicon-light.ico",media:"(prefers-color-scheme: light)"}],style:[],script:[{body:!0,async:!0,defer:!0,src:"https://scripts.withcabin.com/hello.js"}],noscript:[],title:"After August"},Kb=!1,Zb="__nuxt",Jb=!0;async function Qb(t){try{return Jb?Y_(await fetch(t).then(e=>e.text())):await Tt(()=>import(t),[],import.meta.url).then(e=>e.default||e)}catch(e){console.warn("[nuxt] Cannot load payload ",t,e)}return null}let Ea=null;async function eM(){if(Ea)return Ea;const t=document.getElementById("__NUXT_DATA__");if(!t)return{};const e=Y_(t.textContent||""),n=t.dataset.src?await Qb(t.dataset.src):void 0;return Ea={...e,...n,...window.__NUXT__},Ea}function Y_(t){return lb(t,ft()._payloadRevivers)}function tM(t,e){ft()._payloadRevivers[t]=e}const ba=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function nM(t,e){if(typeof t!="string")throw new TypeError("argument str must be a string");const n={},r=(e||{}).decode||sM;let s=0;for(;s<t.length;){const o=t.indexOf("=",s);if(o===-1)break;let a=t.indexOf(";",s);if(a===-1)a=t.length;else if(a<o){s=t.lastIndexOf(";",o-1)+1;continue}const l=t.slice(s,o).trim();if(n[l]===void 0){let c=t.slice(o+1,a).trim();c.codePointAt(0)===34&&(c=c.slice(1,-1)),n[l]=rM(c,r)}s=a+1}return n}function vh(t,e,n){const i=n||{},r=i.encode||oM;if(typeof r!="function")throw new TypeError("option encode is invalid");if(!ba.test(t))throw new TypeError("argument name is invalid");const s=r(e);if(s&&!ba.test(s))throw new TypeError("argument val is invalid");let o=t+"="+s;if(i.maxAge!==void 0&&i.maxAge!==null){const a=i.maxAge-0;if(Number.isNaN(a)||!Number.isFinite(a))throw new TypeError("option maxAge is invalid");o+="; Max-Age="+Math.floor(a)}if(i.domain){if(!ba.test(i.domain))throw new TypeError("option domain is invalid");o+="; Domain="+i.domain}if(i.path){if(!ba.test(i.path))throw new TypeError("option path is invalid");o+="; Path="+i.path}if(i.expires){if(!iM(i.expires)||Number.isNaN(i.expires.valueOf()))throw new TypeError("option expires is invalid");o+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(o+="; HttpOnly"),i.secure&&(o+="; Secure"),i.priority)switch(typeof i.priority=="string"?i.priority.toLowerCase():i.priority){case"low":o+="; Priority=Low";break;case"medium":o+="; Priority=Medium";break;case"high":o+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o}function iM(t){return Object.prototype.toString.call(t)==="[object Date]"||t instanceof Date}function rM(t,e){try{return e(t)}catch{return t}}function sM(t){return t.includes("%")?decodeURIComponent(t):t}function oM(t){return encodeURIComponent(t)}function Rc(t){return t!==null&&typeof t=="object"}function Du(t,e,n=".",i){if(!Rc(e))return Du(t,{},n,i);const r=Object.assign({},e);for(const s in t){if(s==="__proto__"||s==="constructor")continue;const o=t[s];o!=null&&(i&&i(r,s,o,n)||(Array.isArray(o)&&Array.isArray(r[s])?r[s]=[...o,...r[s]]:Rc(o)&&Rc(r[s])?r[s]=Du(o,r[s],(n?`${n}.`:"")+s.toString(),i):r[s]=o))}return r}function aM(t){return(...e)=>e.reduce((n,i)=>Du(n,i,"",t),{})}const lM=aM();class Nu extends Error{constructor(){super(...arguments),this.statusCode=500,this.fatal=!1,this.unhandled=!1}toJSON(){const e={message:this.message,statusCode:Ou(this.statusCode,500)};return this.statusMessage&&(e.statusMessage=K_(this.statusMessage)),this.data!==void 0&&(e.data=this.data),e}}Nu.__h3_error__=!0;function Uu(t){if(typeof t=="string")return new Nu(t);if(cM(t))return t;const e=new Nu(t.message??t.statusMessage??"",t.cause?{cause:t.cause}:void 0);if("stack"in t)try{Object.defineProperty(e,"stack",{get(){return t.stack}})}catch{try{e.stack=t.stack}catch{}}if(t.data&&(e.data=t.data),t.statusCode?e.statusCode=Ou(t.statusCode,e.statusCode):t.status&&(e.statusCode=Ou(t.status,e.statusCode)),t.statusMessage?e.statusMessage=t.statusMessage:t.statusText&&(e.statusMessage=t.statusText),e.statusMessage){const n=e.statusMessage;K_(e.statusMessage)!==n&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return t.fatal!==void 0&&(e.fatal=t.fatal),t.unhandled!==void 0&&(e.unhandled=t.unhandled),e}function cM(t){var e;return((e=t==null?void 0:t.constructor)==null?void 0:e.__h3_error__)===!0}const uM=/[^\u0009\u0020-\u007E]/g;function K_(t=""){return t.replace(uM,"")}function Ou(t,e=200){return!t||(typeof t=="string"&&(t=Number.parseInt(t,10)),t<100||t>999)?e:t}const fM="$s";function Z_(...t){const e=typeof t[t.length-1]=="string"?t.pop():void 0;typeof t[0]!="string"&&t.unshift(e);const[n,i]=t;if(!n||typeof n!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+n);if(i!==void 0&&typeof i!="function")throw new Error("[nuxt] [useState] init must be a function: "+i);const r=fM+n,s=ft(),o=Nf(s.payload.state,r);if(o.value===void 0&&i){const a=i();if(ut(a))return s.payload.state[r]=a,a;o.value=a}return o}const dM=Symbol("layout-meta"),Vl=Symbol("route"),gi=()=>{var t;return(t=ft())==null?void 0:t.$router},Gr=()=>Vf()?Ft(Vl,ft()._route):ft()._route;/*! @__NO_SIDE_EFFECTS__ */const hM=(t,e,n={})=>{const i=ft(),r=n.global||typeof t!="string",s=typeof t!="string"?t:e;if(!s){console.warn("[nuxt] No route middleware passed to `addRouteMiddleware`.",t);return}r?i._middleware.global.push(s):i._middleware.named[t]=s},pM=()=>{try{if(ft()._processingMiddleware)return!0}catch{return!0}return!1},J_=(t,e)=>{t||(t="/");const n=typeof t=="string"?t:N_(t.path||"/",t.query||{})+(t.hash||"");if(e!=null&&e.open){{const{target:a="_blank",windowFeatures:l={}}=e.open,c=Object.entries(l).filter(([u,f])=>f!==void 0).map(([u,f])=>`${u.toLowerCase()}=${f}`).join(", ");open(n,a,c)}return Promise.resolve()}const i=(e==null?void 0:e.external)||js(n,{acceptRelative:!0});if(i&&!(e!=null&&e.external))throw new Error("Navigating to external URL is not allowed by default. Use `navigateTo (url, { external: true })`.");if(i&&Bl(n).protocol==="script:")throw new Error("Cannot navigate to an URL with script protocol.");const r=pM();if(!i&&r)return t;const s=gi(),o=ft();return i?(e!=null&&e.replace?location.replace(n):location.href=n,r?o.isHydrating?new Promise(()=>{}):!1:Promise.resolve()):e!=null&&e.replace?s.replace(t):s.push(t)},Gl=()=>Nf(ft().payload,"error"),ms=t=>{const e=qs(t);try{const n=ft(),i=Gl();n.hooks.callHook("app:error",e),i.value=i.value||e}catch{throw e}return e},mM=async(t={})=>{const e=ft(),n=Gl();e.callHook("app:error:cleared",t),t.redirect&&await gi().replace(t.redirect),n.value=null},gM=t=>!!(t&&typeof t=="object"&&"__nuxt_error"in t),qs=t=>{const e=Uu(t);return e.__nuxt_error=!0,e},yh={NuxtError:t=>qs(t),EmptyShallowRef:t=>No(t==="_"?void 0:t==="0n"?BigInt(0):JSON.parse(t)),EmptyRef:t=>Ge(t==="_"?void 0:t==="0n"?BigInt(0):JSON.parse(t)),ShallowRef:t=>No(t),ShallowReactive:t=>Yo(t),Ref:t=>Ge(t),Reactive:t=>Fn(t)},_M=ti({name:"nuxt:revive-payload:client",order:-30,async setup(t){let e,n;for(const i in yh)tM(i,yh[i]);Object.assign(t.payload,([e,n]=Nr(()=>t.runWithContext(eM)),e=await e,n(),e)),window.__NUXT__=t.payload}});/*!
  * vue-router v4.2.4
  * (c) 2023 Eduardo San Martin Morote
  * @license MIT
  */const hs=typeof window<"u";function vM(t){return t.__esModule||t[Symbol.toStringTag]==="Module"}const lt=Object.assign;function Cc(t,e){const n={};for(const i in e){const r=e[i];n[i]=Qn(r)?r.map(t):t(r)}return n}const To=()=>{},Qn=Array.isArray,yM=/\/$/,xM=t=>t.replace(yM,"");function Lc(t,e,n="/"){let i,r={},s="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(i=e.slice(0,l),s=e.slice(l+1,a>-1?a:e.length),r=t(s)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=MM(i??e,n),{fullPath:i+(s&&"?")+s+o,path:i,query:r,hash:o}}function SM(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function xh(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function EM(t,e,n){const i=e.matched.length-1,r=n.matched.length-1;return i>-1&&i===r&&Ps(e.matched[i],n.matched[r])&&Q_(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function Ps(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function Q_(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!bM(t[n],e[n]))return!1;return!0}function bM(t,e){return Qn(t)?Sh(t,e):Qn(e)?Sh(e,t):t===e}function Sh(t,e){return Qn(e)?t.length===e.length&&t.every((n,i)=>n===e[i]):t.length===1&&t[0]===e}function MM(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),i=t.split("/"),r=i[i.length-1];(r===".."||r===".")&&i.push("");let s=n.length-1,o,a;for(o=0;o<i.length;o++)if(a=i[o],a!==".")if(a==="..")s>1&&s--;else break;return n.slice(0,s).join("/")+"/"+i.slice(o-(o===i.length?1:0)).join("/")}var Bo;(function(t){t.pop="pop",t.push="push"})(Bo||(Bo={}));var wo;(function(t){t.back="back",t.forward="forward",t.unknown=""})(wo||(wo={}));function TM(t){if(!t)if(hs){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),xM(t)}const wM=/^[^#]+#/;function AM(t,e){return t.replace(wM,"#")+e}function RM(t,e){const n=document.documentElement.getBoundingClientRect(),i=t.getBoundingClientRect();return{behavior:e.behavior,left:i.left-n.left-(e.left||0),top:i.top-n.top-(e.top||0)}}const Wl=()=>({left:window.pageXOffset,top:window.pageYOffset});function CM(t){let e;if("el"in t){const n=t.el,i=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?i?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;e=RM(r,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.pageXOffset,e.top!=null?e.top:window.pageYOffset)}function Eh(t,e){return(history.state?history.state.position-e:-1)+t}const Fu=new Map;function LM(t,e){Fu.set(t,e)}function PM(t){const e=Fu.get(t);return Fu.delete(t),e}let IM=()=>location.protocol+"//"+location.host;function ev(t,e){const{pathname:n,search:i,hash:r}=e,s=t.indexOf("#");if(s>-1){let a=r.includes(t.slice(s))?t.slice(s).length:1,l=r.slice(a);return l[0]!=="/"&&(l="/"+l),xh(l,"")}return xh(n,t)+i+r}function DM(t,e,n,i){let r=[],s=[],o=null;const a=({state:h})=>{const p=ev(t,location),g=n.value,_=e.value;let m=0;if(h){if(n.value=p,e.value=h,o&&o===g){o=null;return}m=_?h.position-_.position:0}else i(p);r.forEach(d=>{d(n.value,g,{delta:m,type:Bo.pop,direction:m?m>0?wo.forward:wo.back:wo.unknown})})};function l(){o=n.value}function c(h){r.push(h);const p=()=>{const g=r.indexOf(h);g>-1&&r.splice(g,1)};return s.push(p),p}function u(){const{history:h}=window;h.state&&h.replaceState(lt({},h.state,{scroll:Wl()}),"")}function f(){for(const h of s)h();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:f}}function bh(t,e,n,i=!1,r=!1){return{back:t,current:e,forward:n,replaced:i,position:window.history.length,scroll:r?Wl():null}}function NM(t){const{history:e,location:n}=window,i={value:ev(t,n)},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=t.indexOf("#"),h=f>-1?(n.host&&document.querySelector("base")?t:t.slice(f))+l:IM()+t+l;try{e[u?"replaceState":"pushState"](c,"",h),r.value=c}catch(p){console.error(p),n[u?"replace":"assign"](h)}}function o(l,c){const u=lt({},e.state,bh(r.value.back,l,r.value.forward,!0),c,{position:r.value.position});s(l,u,!0),i.value=l}function a(l,c){const u=lt({},r.value,e.state,{forward:l,scroll:Wl()});s(u.current,u,!0);const f=lt({},bh(i.value,l,null),{position:u.position+1},c);s(l,f,!1),i.value=l}return{location:i,state:r,push:a,replace:o}}function tv(t){t=TM(t);const e=NM(t),n=DM(t,e.state,e.location,e.replace);function i(s,o=!0){o||n.pauseListeners(),history.go(s)}const r=lt({location:"",base:t,go:i,createHref:AM.bind(null,t)},e,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>e.state.value}),r}function UM(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),tv(t)}function OM(t){return typeof t=="string"||t&&typeof t=="object"}function nv(t){return typeof t=="string"||typeof t=="symbol"}const ri={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},iv=Symbol("");var Mh;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(Mh||(Mh={}));function Is(t,e){return lt(new Error,{type:t,[iv]:!0},e)}function vi(t,e){return t instanceof Error&&iv in t&&(e==null||!!(t.type&e))}const Th="[^/]+?",FM={sensitive:!1,strict:!1,start:!0,end:!0},kM=/[.+*?^${}()[\]/\\]/g;function BM(t,e){const n=lt({},FM,e),i=[];let r=n.start?"^":"";const s=[];for(const c of t){const u=c.length?[]:[90];n.strict&&!c.length&&(r+="/");for(let f=0;f<c.length;f++){const h=c[f];let p=40+(n.sensitive?.25:0);if(h.type===0)f||(r+="/"),r+=h.value.replace(kM,"\\$&"),p+=40;else if(h.type===1){const{value:g,repeatable:_,optional:m,regexp:d}=h;s.push({name:g,repeatable:_,optional:m});const v=d||Th;if(v!==Th){p+=10;try{new RegExp(`(${v})`)}catch(x){throw new Error(`Invalid custom RegExp for param "${g}" (${v}): `+x.message)}}let y=_?`((?:${v})(?:/(?:${v}))*)`:`(${v})`;f||(y=m&&c.length<2?`(?:/${y})`:"/"+y),m&&(y+="?"),r+=y,p+=20,m&&(p+=-8),_&&(p+=-20),v===".*"&&(p+=-50)}u.push(p)}i.push(u)}if(n.strict&&n.end){const c=i.length-1;i[c][i[c].length-1]+=.7000000000000001}n.strict||(r+="/?"),n.end?r+="$":n.strict&&(r+="(?:/|$)");const o=new RegExp(r,n.sensitive?"":"i");function a(c){const u=c.match(o),f={};if(!u)return null;for(let h=1;h<u.length;h++){const p=u[h]||"",g=s[h-1];f[g.name]=p&&g.repeatable?p.split("/"):p}return f}function l(c){let u="",f=!1;for(const h of t){(!f||!u.endsWith("/"))&&(u+="/"),f=!1;for(const p of h)if(p.type===0)u+=p.value;else if(p.type===1){const{value:g,repeatable:_,optional:m}=p,d=g in c?c[g]:"";if(Qn(d)&&!_)throw new Error(`Provided param "${g}" is an array but it is not repeatable (* or + modifiers)`);const v=Qn(d)?d.join("/"):d;if(!v)if(m)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):f=!0);else throw new Error(`Missing required param "${g}"`);u+=v}}return u||"/"}return{re:o,score:i,keys:s,parse:a,stringify:l}}function HM(t,e){let n=0;for(;n<t.length&&n<e.length;){const i=e[n]-t[n];if(i)return i;n++}return t.length<e.length?t.length===1&&t[0]===40+40?-1:1:t.length>e.length?e.length===1&&e[0]===40+40?1:-1:0}function zM(t,e){let n=0;const i=t.score,r=e.score;for(;n<i.length&&n<r.length;){const s=HM(i[n],r[n]);if(s)return s;n++}if(Math.abs(r.length-i.length)===1){if(wh(i))return 1;if(wh(r))return-1}return r.length-i.length}function wh(t){const e=t[t.length-1];return t.length>0&&e[e.length-1]<0}const VM={type:0,value:""},GM=/[a-zA-Z0-9_]/;function WM(t){if(!t)return[[]];if(t==="/")return[[VM]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(p){throw new Error(`ERR (${n})/"${c}": ${p}`)}let n=0,i=n;const r=[];let s;function o(){s&&r.push(s),s=[]}let a=0,l,c="",u="";function f(){c&&(n===0?s.push({type:0,value:c}):n===1||n===2||n===3?(s.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function h(){c+=l}for(;a<t.length;){if(l=t[a++],l==="\\"&&n!==2){i=n,n=4;continue}switch(n){case 0:l==="/"?(c&&f(),o()):l===":"?(f(),n=1):h();break;case 4:h(),n=i;break;case 1:l==="("?n=2:GM.test(l)?h():(f(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:n=3:u+=l;break;case 3:f(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:e("Unknown state");break}}return n===2&&e(`Unfinished custom RegExp for param "${c}"`),f(),o(),r}function $M(t,e,n){const i=BM(WM(t.path),n),r=lt(i,{record:t,parent:e,children:[],alias:[]});return e&&!r.record.aliasOf==!e.record.aliasOf&&e.children.push(r),r}function XM(t,e){const n=[],i=new Map;e=Ch({strict:!1,end:!0,sensitive:!1},e);function r(u){return i.get(u)}function s(u,f,h){const p=!h,g=jM(u);g.aliasOf=h&&h.record;const _=Ch(e,u),m=[g];if("alias"in u){const y=typeof u.alias=="string"?[u.alias]:u.alias;for(const x of y)m.push(lt({},g,{components:h?h.record.components:g.components,path:x,aliasOf:h?h.record:g}))}let d,v;for(const y of m){const{path:x}=y;if(f&&x[0]!=="/"){const S=f.record.path,C=S[S.length-1]==="/"?"":"/";y.path=f.record.path+(x&&C+x)}if(d=$M(y,f,_),h?h.alias.push(d):(v=v||d,v!==d&&v.alias.push(d),p&&u.name&&!Rh(d)&&o(u.name)),g.children){const S=g.children;for(let C=0;C<S.length;C++)s(S[C],d,h&&h.children[C])}h=h||d,(d.record.components&&Object.keys(d.record.components).length||d.record.name||d.record.redirect)&&l(d)}return v?()=>{o(v)}:To}function o(u){if(nv(u)){const f=i.get(u);f&&(i.delete(u),n.splice(n.indexOf(f),1),f.children.forEach(o),f.alias.forEach(o))}else{const f=n.indexOf(u);f>-1&&(n.splice(f,1),u.record.name&&i.delete(u.record.name),u.children.forEach(o),u.alias.forEach(o))}}function a(){return n}function l(u){let f=0;for(;f<n.length&&zM(u,n[f])>=0&&(u.record.path!==n[f].record.path||!rv(u,n[f]));)f++;n.splice(f,0,u),u.record.name&&!Rh(u)&&i.set(u.record.name,u)}function c(u,f){let h,p={},g,_;if("name"in u&&u.name){if(h=i.get(u.name),!h)throw Is(1,{location:u});_=h.record.name,p=lt(Ah(f.params,h.keys.filter(v=>!v.optional).map(v=>v.name)),u.params&&Ah(u.params,h.keys.map(v=>v.name))),g=h.stringify(p)}else if("path"in u)g=u.path,h=n.find(v=>v.re.test(g)),h&&(p=h.parse(g),_=h.record.name);else{if(h=f.name?i.get(f.name):n.find(v=>v.re.test(f.path)),!h)throw Is(1,{location:u,currentLocation:f});_=h.record.name,p=lt({},f.params,u.params),g=h.stringify(p)}const m=[];let d=h;for(;d;)m.unshift(d.record),d=d.parent;return{name:_,path:g,params:p,matched:m,meta:YM(m)}}return t.forEach(u=>s(u)),{addRoute:s,resolve:c,removeRoute:o,getRoutes:a,getRecordMatcher:r}}function Ah(t,e){const n={};for(const i of e)i in t&&(n[i]=t[i]);return n}function jM(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:qM(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}}}function qM(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const i in t.components)e[i]=typeof n=="object"?n[i]:n;return e}function Rh(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function YM(t){return t.reduce((e,n)=>lt(e,n.meta),{})}function Ch(t,e){const n={};for(const i in t)n[i]=i in e?e[i]:t[i];return n}function rv(t,e){return e.children.some(n=>n===t||rv(t,n))}const sv=/#/g,KM=/&/g,ZM=/\//g,JM=/=/g,QM=/\?/g,ov=/\+/g,eT=/%5B/g,tT=/%5D/g,av=/%5E/g,nT=/%60/g,lv=/%7B/g,iT=/%7C/g,cv=/%7D/g,rT=/%20/g;function qf(t){return encodeURI(""+t).replace(iT,"|").replace(eT,"[").replace(tT,"]")}function sT(t){return qf(t).replace(lv,"{").replace(cv,"}").replace(av,"^")}function ku(t){return qf(t).replace(ov,"%2B").replace(rT,"+").replace(sv,"%23").replace(KM,"%26").replace(nT,"`").replace(lv,"{").replace(cv,"}").replace(av,"^")}function oT(t){return ku(t).replace(JM,"%3D")}function aT(t){return qf(t).replace(sv,"%23").replace(QM,"%3F")}function lT(t){return t==null?"":aT(t).replace(ZM,"%2F")}function _l(t){try{return decodeURIComponent(""+t)}catch{}return""+t}function cT(t){const e={};if(t===""||t==="?")return e;const i=(t[0]==="?"?t.slice(1):t).split("&");for(let r=0;r<i.length;++r){const s=i[r].replace(ov," "),o=s.indexOf("="),a=_l(o<0?s:s.slice(0,o)),l=o<0?null:_l(s.slice(o+1));if(a in e){let c=e[a];Qn(c)||(c=e[a]=[c]),c.push(l)}else e[a]=l}return e}function Lh(t){let e="";for(let n in t){const i=t[n];if(n=oT(n),i==null){i!==void 0&&(e+=(e.length?"&":"")+n);continue}(Qn(i)?i.map(s=>s&&ku(s)):[i&&ku(i)]).forEach(s=>{s!==void 0&&(e+=(e.length?"&":"")+n,s!=null&&(e+="="+s))})}return e}function uT(t){const e={};for(const n in t){const i=t[n];i!==void 0&&(e[n]=Qn(i)?i.map(r=>r==null?null:""+r):i==null?i:""+i)}return e}const fT=Symbol(""),Ph=Symbol(""),Qo=Symbol(""),Yf=Symbol(""),Bu=Symbol("");function ro(){let t=[];function e(i){return t.push(i),()=>{const r=t.indexOf(i);r>-1&&t.splice(r,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function qi(t,e,n,i,r){const s=i&&(i.enterCallbacks[r]=i.enterCallbacks[r]||[]);return()=>new Promise((o,a)=>{const l=f=>{f===!1?a(Is(4,{from:n,to:e})):f instanceof Error?a(f):OM(f)?a(Is(2,{from:e,to:f})):(s&&i.enterCallbacks[r]===s&&typeof f=="function"&&s.push(f),o())},c=t.call(i&&i.instances[r],e,n,l);let u=Promise.resolve(c);t.length<3&&(u=u.then(l)),u.catch(f=>a(f))})}function Pc(t,e,n,i){const r=[];for(const s of t)for(const o in s.components){let a=s.components[o];if(!(e!=="beforeRouteEnter"&&!s.instances[o]))if(dT(a)){const c=(a.__vccOpts||a)[e];c&&r.push(qi(c,n,i,s,o))}else{let l=a();r.push(()=>l.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${o}" at "${s.path}"`));const u=vM(c)?c.default:c;s.components[o]=u;const h=(u.__vccOpts||u)[e];return h&&qi(h,n,i,s,o)()}))}}return r}function dT(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function Ih(t){const e=Ft(Qo),n=Ft(Yf),i=He(()=>e.resolve(pe(t.to))),r=He(()=>{const{matched:l}=i.value,{length:c}=l,u=l[c-1],f=n.matched;if(!u||!f.length)return-1;const h=f.findIndex(Ps.bind(null,u));if(h>-1)return h;const p=Dh(l[c-2]);return c>1&&Dh(u)===p&&f[f.length-1].path!==p?f.findIndex(Ps.bind(null,l[c-2])):h}),s=He(()=>r.value>-1&&gT(n.params,i.value.params)),o=He(()=>r.value>-1&&r.value===n.matched.length-1&&Q_(n.params,i.value.params));function a(l={}){return mT(l)?e[pe(t.replace)?"replace":"push"](pe(t.to)).catch(To):Promise.resolve()}return{route:i,href:He(()=>i.value.href),isActive:s,isExactActive:o,navigate:a}}const hT=$t({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"}},useLink:Ih,setup(t,{slots:e}){const n=Fn(Ih(t)),{options:i}=Ft(Qo),r=He(()=>({[Nh(t.activeClass,i.linkActiveClass,"router-link-active")]:n.isActive,[Nh(t.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=e.default&&e.default(n);return t.custom?s:Et("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},s)}}}),pT=hT;function mT(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function gT(t,e){for(const n in e){const i=e[n],r=t[n];if(typeof i=="string"){if(i!==r)return!1}else if(!Qn(r)||r.length!==i.length||i.some((s,o)=>s!==r[o]))return!1}return!0}function Dh(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const Nh=(t,e,n)=>t??e??n,_T=$t({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const i=Ft(Bu),r=He(()=>t.route||i.value),s=Ft(Ph,0),o=He(()=>{let c=pe(s);const{matched:u}=r.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),a=He(()=>r.value.matched[o.value]);bs(Ph,He(()=>o.value+1)),bs(fT,a),bs(Bu,r);const l=Ge();return Ot(()=>[l.value,a.value,t.name],([c,u,f],[h,p,g])=>{u&&(u.instances[f]=c,p&&p!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=p.leaveGuards),u.updateGuards.size||(u.updateGuards=p.updateGuards))),c&&u&&(!p||!Ps(u,p)||!h)&&(u.enterCallbacks[f]||[]).forEach(_=>_(c))},{flush:"post"}),()=>{const c=r.value,u=t.name,f=a.value,h=f&&f.components[u];if(!h)return Uh(n.default,{Component:h,route:c});const p=f.props[u],g=p?p===!0?c.params:typeof p=="function"?p(c):p:null,m=Et(h,lt({},g,e,{onVnodeUnmounted:d=>{d.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return Uh(n.default,{Component:m,route:c})||m}}});function Uh(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const uv=_T;function vT(t){const e=XM(t.routes,t),n=t.parseQuery||cT,i=t.stringifyQuery||Lh,r=t.history,s=ro(),o=ro(),a=ro(),l=No(ri);let c=ri;hs&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Cc.bind(null,V=>""+V),f=Cc.bind(null,lT),h=Cc.bind(null,_l);function p(V,ue){let ne,de;return nv(V)?(ne=e.getRecordMatcher(V),de=ue):de=V,e.addRoute(de,ne)}function g(V){const ue=e.getRecordMatcher(V);ue&&e.removeRoute(ue)}function _(){return e.getRoutes().map(V=>V.record)}function m(V){return!!e.getRecordMatcher(V)}function d(V,ue){if(ue=lt({},ue||l.value),typeof V=="string"){const w=Lc(n,V,ue.path),N=e.resolve({path:w.path},ue),O=r.createHref(w.fullPath);return lt(w,N,{params:h(N.params),hash:_l(w.hash),redirectedFrom:void 0,href:O})}let ne;if("path"in V)ne=lt({},V,{path:Lc(n,V.path,ue.path).path});else{const w=lt({},V.params);for(const N in w)w[N]==null&&delete w[N];ne=lt({},V,{params:f(w)}),ue.params=f(ue.params)}const de=e.resolve(ne,ue),Me=V.hash||"";de.params=u(h(de.params));const T=SM(i,lt({},V,{hash:sT(Me),path:de.path})),E=r.createHref(T);return lt({fullPath:T,hash:Me,query:i===Lh?uT(V.query):V.query||{}},de,{redirectedFrom:void 0,href:E})}function v(V){return typeof V=="string"?Lc(n,V,l.value.path):lt({},V)}function y(V,ue){if(c!==V)return Is(8,{from:ue,to:V})}function x(V){return R(V)}function S(V){return x(lt(v(V),{replace:!0}))}function C(V){const ue=V.matched[V.matched.length-1];if(ue&&ue.redirect){const{redirect:ne}=ue;let de=typeof ne=="function"?ne(V):ne;return typeof de=="string"&&(de=de.includes("?")||de.includes("#")?de=v(de):{path:de},de.params={}),lt({query:V.query,hash:V.hash,params:"path"in de?{}:V.params},de)}}function R(V,ue){const ne=c=d(V),de=l.value,Me=V.state,T=V.force,E=V.replace===!0,w=C(ne);if(w)return R(lt(v(w),{state:typeof w=="object"?lt({},Me,w.state):Me,force:T,replace:E}),ue||ne);const N=ne;N.redirectedFrom=ue;let O;return!T&&EM(i,de,ne)&&(O=Is(16,{to:N,from:de}),me(de,de,!0,!1)),(O?Promise.resolve(O):L(N,de)).catch(W=>vi(W)?vi(W,2)?W:he(W):oe(W,N,de)).then(W=>{if(W){if(vi(W,2))return R(lt({replace:E},v(W.to),{state:typeof W.to=="object"?lt({},Me,W.to.state):Me,force:T}),ue||N)}else W=U(N,de,!0,E,Me);return B(N,de,W),W})}function I(V,ue){const ne=y(V,ue);return ne?Promise.reject(ne):Promise.resolve()}function b(V){const ue=fe.values().next().value;return ue&&typeof ue.runWithContext=="function"?ue.runWithContext(V):V()}function L(V,ue){let ne;const[de,Me,T]=yT(V,ue);ne=Pc(de.reverse(),"beforeRouteLeave",V,ue);for(const w of de)w.leaveGuards.forEach(N=>{ne.push(qi(N,V,ue))});const E=I.bind(null,V,ue);return ne.push(E),Te(ne).then(()=>{ne=[];for(const w of s.list())ne.push(qi(w,V,ue));return ne.push(E),Te(ne)}).then(()=>{ne=Pc(Me,"beforeRouteUpdate",V,ue);for(const w of Me)w.updateGuards.forEach(N=>{ne.push(qi(N,V,ue))});return ne.push(E),Te(ne)}).then(()=>{ne=[];for(const w of T)if(w.beforeEnter)if(Qn(w.beforeEnter))for(const N of w.beforeEnter)ne.push(qi(N,V,ue));else ne.push(qi(w.beforeEnter,V,ue));return ne.push(E),Te(ne)}).then(()=>(V.matched.forEach(w=>w.enterCallbacks={}),ne=Pc(T,"beforeRouteEnter",V,ue),ne.push(E),Te(ne))).then(()=>{ne=[];for(const w of o.list())ne.push(qi(w,V,ue));return ne.push(E),Te(ne)}).catch(w=>vi(w,8)?w:Promise.reject(w))}function B(V,ue,ne){a.list().forEach(de=>b(()=>de(V,ue,ne)))}function U(V,ue,ne,de,Me){const T=y(V,ue);if(T)return T;const E=ue===ri,w=hs?history.state:{};ne&&(de||E?r.replace(V.fullPath,lt({scroll:E&&w&&w.scroll},Me)):r.push(V.fullPath,Me)),l.value=V,me(V,ue,ne,E),he()}let k;function D(){k||(k=r.listen((V,ue,ne)=>{if(!be.listening)return;const de=d(V),Me=C(de);if(Me){R(lt(Me,{replace:!0}),de).catch(To);return}c=de;const T=l.value;hs&&LM(Eh(T.fullPath,ne.delta),Wl()),L(de,T).catch(E=>vi(E,12)?E:vi(E,2)?(R(E.to,de).then(w=>{vi(w,20)&&!ne.delta&&ne.type===Bo.pop&&r.go(-1,!1)}).catch(To),Promise.reject()):(ne.delta&&r.go(-ne.delta,!1),oe(E,de,T))).then(E=>{E=E||U(de,T,!1),E&&(ne.delta&&!vi(E,8)?r.go(-ne.delta,!1):ne.type===Bo.pop&&vi(E,20)&&r.go(-1,!1)),B(de,T,E)}).catch(To)}))}let G=ro(),$=ro(),j;function oe(V,ue,ne){he(V);const de=$.list();return de.length?de.forEach(Me=>Me(V,ue,ne)):console.error(V),Promise.reject(V)}function se(){return j&&l.value!==ri?Promise.resolve():new Promise((V,ue)=>{G.add([V,ue])})}function he(V){return j||(j=!V,D(),G.list().forEach(([ue,ne])=>V?ne(V):ue()),G.reset()),V}function me(V,ue,ne,de){const{scrollBehavior:Me}=t;if(!hs||!Me)return Promise.resolve();const T=!ne&&PM(Eh(V.fullPath,0))||(de||!ne)&&history.state&&history.state.scroll||null;return mi().then(()=>Me(V,ue,T)).then(E=>E&&CM(E)).catch(E=>oe(E,V,ue))}const ye=V=>r.go(V);let te;const fe=new Set,be={currentRoute:l,listening:!0,addRoute:p,removeRoute:g,hasRoute:m,getRoutes:_,resolve:d,options:t,push:x,replace:S,go:ye,back:()=>ye(-1),forward:()=>ye(1),beforeEach:s.add,beforeResolve:o.add,afterEach:a.add,onError:$.add,isReady:se,install(V){const ue=this;V.component("RouterLink",pT),V.component("RouterView",uv),V.config.globalProperties.$router=ue,Object.defineProperty(V.config.globalProperties,"$route",{enumerable:!0,get:()=>pe(l)}),hs&&!te&&l.value===ri&&(te=!0,x(r.location).catch(Me=>{}));const ne={};for(const Me in ri)Object.defineProperty(ne,Me,{get:()=>l.value[Me],enumerable:!0});V.provide(Qo,ue),V.provide(Yf,Yo(ne)),V.provide(Bu,l);const de=V.unmount;fe.add(V),V.unmount=function(){fe.delete(V),fe.size<1&&(c=ri,k&&k(),k=null,l.value=ri,te=!1,j=!1),de()}}};function Te(V){return V.reduce((ue,ne)=>ue.then(()=>b(ne)),Promise.resolve())}return be}function yT(t,e){const n=[],i=[],r=[],s=Math.max(e.matched.length,t.matched.length);for(let o=0;o<s;o++){const a=e.matched[o];a&&(t.matched.find(c=>Ps(c,a))?i.push(a):n.push(a));const l=t.matched[o];l&&(e.matched.find(c=>Ps(c,l))||r.push(l))}return[n,i,r]}function fv(){return Ft(Qo)}function dv(){return Ft(Yf)}const Oh=[{name:"prismic-preview___prs",path:"/prs/preview",meta:{},alias:[],redirect:void 0,component:()=>Tt(()=>import("./preview.613147be.js"),["./preview.613147be.js","./preview.5e129957.css"],import.meta.url).then(t=>t.default||t)},{name:"prismic-preview___ps",path:"/ps/preview",meta:{},alias:[],redirect:void 0,component:()=>Tt(()=>import("./preview.613147be.js"),["./preview.613147be.js","./preview.5e129957.css"],import.meta.url).then(t=>t.default||t)},{name:"prismic-preview___en",path:"/preview",meta:{},alias:[],redirect:void 0,component:()=>Tt(()=>import("./preview.613147be.js"),["./preview.613147be.js","./preview.5e129957.css"],import.meta.url).then(t=>t.default||t)},{name:"about___prs",path:"/prs/about",meta:{},alias:[],redirect:void 0,component:()=>Tt(()=>import("./about.6a1b9c53.js"),["./about.6a1b9c53.js","./PageLayout.7931c648.js","./PageLayout.19d066df.css","./about.44a01ff6.css"],import.meta.url).then(t=>t.default||t)},{name:"about___ps",path:"/ps/about",meta:{},alias:[],redirect:void 0,component:()=>Tt(()=>import("./about.6a1b9c53.js"),["./about.6a1b9c53.js","./PageLayout.7931c648.js","./PageLayout.19d066df.css","./about.44a01ff6.css"],import.meta.url).then(t=>t.default||t)},{name:"about___en",path:"/about",meta:{},alias:[],redirect:void 0,component:()=>Tt(()=>import("./about.6a1b9c53.js"),["./about.6a1b9c53.js","./PageLayout.7931c648.js","./PageLayout.19d066df.css","./about.44a01ff6.css"],import.meta.url).then(t=>t.default||t)},{name:"index___prs",path:"/prs",meta:{},alias:[],redirect:void 0,component:()=>Tt(()=>import("./index.40e688eb.js"),["./index.40e688eb.js","./icon-arrow.f2baa589.js","./PageLayout.7931c648.js","./PageLayout.19d066df.css","./index.3893eb58.css"],import.meta.url).then(t=>t.default||t)},{name:"index___ps",path:"/ps",meta:{},alias:[],redirect:void 0,component:()=>Tt(()=>import("./index.40e688eb.js"),["./index.40e688eb.js","./icon-arrow.f2baa589.js","./PageLayout.7931c648.js","./PageLayout.19d066df.css","./index.3893eb58.css"],import.meta.url).then(t=>t.default||t)},{name:"index___en",path:"/",meta:{},alias:[],redirect:void 0,component:()=>Tt(()=>import("./index.40e688eb.js"),["./index.40e688eb.js","./icon-arrow.f2baa589.js","./PageLayout.7931c648.js","./PageLayout.19d066df.css","./index.3893eb58.css"],import.meta.url).then(t=>t.default||t)},{name:"story-uid___prs",path:"/prs/story/:uid()",meta:{},alias:[],redirect:void 0,component:()=>Tt(()=>import("./_uid_.0cec1861.js"),["./_uid_.0cec1861.js","./useFetchByUID.311c9267.js","./useFetchByUID.5fb78b37.css","./PageLayout.7931c648.js","./PageLayout.19d066df.css","./_uid_.31a6c036.css"],import.meta.url).then(t=>t.default||t)},{name:"story-uid___ps",path:"/ps/story/:uid()",meta:{},alias:[],redirect:void 0,component:()=>Tt(()=>import("./_uid_.0cec1861.js"),["./_uid_.0cec1861.js","./useFetchByUID.311c9267.js","./useFetchByUID.5fb78b37.css","./PageLayout.7931c648.js","./PageLayout.19d066df.css","./_uid_.31a6c036.css"],import.meta.url).then(t=>t.default||t)},{name:"story-uid___en",path:"/story/:uid()",meta:{},alias:[],redirect:void 0,component:()=>Tt(()=>import("./_uid_.0cec1861.js"),["./_uid_.0cec1861.js","./useFetchByUID.311c9267.js","./useFetchByUID.5fb78b37.css","./PageLayout.7931c648.js","./PageLayout.19d066df.css","./_uid_.31a6c036.css"],import.meta.url).then(t=>t.default||t)},{name:"timeline___prs",path:"/prs/timeline",meta:{},alias:[],redirect:void 0,component:()=>Tt(()=>import("./timeline.ce11a106.js"),["./timeline.ce11a106.js","./useFetchByUID.311c9267.js","./useFetchByUID.5fb78b37.css","./PageLayout.7931c648.js","./PageLayout.19d066df.css","./timeline.23253096.css"],import.meta.url).then(t=>t.default||t)},{name:"timeline___ps",path:"/ps/timeline",meta:{},alias:[],redirect:void 0,component:()=>Tt(()=>import("./timeline.ce11a106.js"),["./timeline.ce11a106.js","./useFetchByUID.311c9267.js","./useFetchByUID.5fb78b37.css","./PageLayout.7931c648.js","./PageLayout.19d066df.css","./timeline.23253096.css"],import.meta.url).then(t=>t.default||t)},{name:"timeline___en",path:"/timeline",meta:{},alias:[],redirect:void 0,component:()=>Tt(()=>import("./timeline.ce11a106.js"),["./timeline.ce11a106.js","./useFetchByUID.311c9267.js","./useFetchByUID.5fb78b37.css","./PageLayout.7931c648.js","./PageLayout.19d066df.css","./timeline.23253096.css"],import.meta.url).then(t=>t.default||t)}],xT={scrollBehavior(t,e,n){const i=ft();let r=n||void 0;if(!r&&e&&t&&t.meta.scrollToTop!==!1&&ST(e,t)&&(r={left:0,top:0}),t.path===e.path){if(e.hash&&!t.hash)return{left:0,top:0};if(t.hash)return{el:t.hash,top:Fh(t.hash)}}const s=a=>!!(a.meta.pageTransition??Iu),o=s(e)&&s(t)?"page:transition:finish":"page:finish";return new Promise(a=>{i.hooks.hookOnce(o,async()=>{await mi(),t.hash&&(r={el:t.hash,top:Fh(t.hash)}),a(r)})})}};function Fh(t){try{const e=document.querySelector(t);if(e)return parseFloat(getComputedStyle(e).scrollMarginTop)}catch{}return 0}function ST(t,e){const n=e.matched.every((i,r)=>{var s,o,a;return((s=i.components)==null?void 0:s.default)===((a=(o=t.matched[r])==null?void 0:o.components)==null?void 0:a.default)});return!!(!n||n&&JSON.stringify(t.params)!==JSON.stringify(e.params))}const ET={linkActiveClass:"nuxt-link--active",linkExactActiveClass:"nuxt-link--exact-active"},dn={...ET,...xT},bT=async t=>{var l;let e,n;if(!((l=t.meta)!=null&&l.validate))return;const i=ft(),r=gi();if(([e,n]=Nr(()=>Promise.resolve(t.meta.validate(t))),e=await e,n(),e)===!0)return;const o=qs({statusCode:404,statusMessage:`Page Not Found: ${t.fullPath}`}),a=r.beforeResolve(c=>{if(a(),c===t){const u=r.afterEach(async()=>{u(),await i.runWithContext(()=>ms(o)),window.history.pushState({},"",t.fullPath)});return!1}})},MT=[bT],Ao={};function TT(t,e,n){const{pathname:i,search:r,hash:s}=e,o=t.indexOf("#");if(o>-1){const c=s.includes(t.slice(o))?t.slice(o).length:1;let u=s.slice(c);return u[0]!=="/"&&(u="/"+u),lh(u,"")}const a=lh(i,t),l=!n||O_(a,n,{trailingSlash:!0})?a:n;return l+(l.includes("?")?"":r)+s}const wT=ti({name:"nuxt:router",enforce:"pre",async setup(t){var _,m;let e,n,i=Hl().app.baseURL;dn.hashMode&&!i.includes("#")&&(i+="#");const r=((_=dn.history)==null?void 0:_.call(dn,i))??(dn.hashMode?UM(i):tv(i)),s=((m=dn.routes)==null?void 0:m.call(dn,Oh))??Oh;let o;const a=TT(i,window.location,t.payload.path),l=vT({...dn,scrollBehavior:(d,v,y)=>{var x;if(v===ri){o=y;return}return l.options.scrollBehavior=dn.scrollBehavior,(x=dn.scrollBehavior)==null?void 0:x.call(dn,d,ri,o||y)},history:r,routes:s});t.vueApp.use(l);const c=No(l.currentRoute.value);l.afterEach((d,v)=>{c.value=v}),Object.defineProperty(t.vueApp.config.globalProperties,"previousRoute",{get:()=>c.value});const u=No(l.resolve(a)),f=()=>{u.value=l.currentRoute.value};t.hook("page:finish",f),l.afterEach((d,v)=>{var y,x,S,C;((x=(y=d.matched[0])==null?void 0:y.components)==null?void 0:x.default)===((C=(S=v.matched[0])==null?void 0:S.components)==null?void 0:C.default)&&f()});const h={};for(const d in u.value)Object.defineProperty(h,d,{get:()=>u.value[d]});t._route=Yo(h),t._middleware=t._middleware||{global:[],named:{}};const p=Gl();try{[e,n]=Nr(()=>l.isReady()),await e,n()}catch(d){[e,n]=Nr(()=>t.runWithContext(()=>ms(d))),await e,n()}const g=Z_("_layout");return l.beforeEach(async(d,v)=>{var y;d.meta=Fn(d.meta),t.isHydrating&&g.value&&!kr(d.meta.layout)&&(d.meta.layout=g.value),t._processingMiddleware=!0;{const x=new Set([...MT,...t._middleware.global]);for(const S of d.matched){const C=S.meta.middleware;if(C)if(Array.isArray(C))for(const R of C)x.add(R);else x.add(C)}for(const S of x){const C=typeof S=="string"?t._middleware.named[S]||await((y=Ao[S])==null?void 0:y.call(Ao).then(I=>I.default||I)):S;if(!C)throw new Error(`Unknown route middleware: '${S}'.`);const R=await t.runWithContext(()=>C(d,v));if(!t.payload.serverRendered&&t.isHydrating&&(R===!1||R instanceof Error)){const I=R||Uu({statusCode:404,statusMessage:`Page Not Found: ${a}`});return await t.runWithContext(()=>ms(I)),!1}if(R||R===!1)return R}}}),l.onError(()=>{delete t._processingMiddleware}),l.afterEach(async(d,v,y)=>{delete t._processingMiddleware,!t.isHydrating&&p.value&&await t.runWithContext(mM),d.matched.length===0&&await t.runWithContext(()=>ms(Uu({statusCode:404,fatal:!1,statusMessage:`Page not found: ${d.fullPath}`})))}),t.hooks.hookOnce("app:created",async()=>{try{await l.replace({...l.resolve(a),name:void 0,force:!0}),l.options.scrollBehavior=dn.scrollBehavior}catch(d){await t.runWithContext(()=>ms(d))}}),{provide:{router:l}}}}),AT=!1,RT=!0;/*!
  * pinia v2.1.4
  * (c) 2023 Eduardo San Martin Morote
  * @license MIT
  */let hv;const ea=t=>hv=t,pv=Symbol();function Hu(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var Ro;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(Ro||(Ro={}));function CT(){const t=Cl(!0),e=t.run(()=>Ge({}));let n=[],i=[];const r=Pl({install(s){ea(r),r._a=s,s.provide(pv,r),s.config.globalProperties.$pinia=r,i.forEach(o=>n.push(o)),i=[]},use(s){return!this._a&&!AT?i.push(s):n.push(s),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return r}const mv=()=>{};function kh(t,e,n,i=mv){t.push(e);const r=()=>{const s=t.indexOf(e);s>-1&&(t.splice(s,1),i())};return!n&&bg()&&By(r),r}function jr(t,...e){t.slice().forEach(n=>{n(...e)})}const LT=t=>t();function zu(t,e){t instanceof Map&&e instanceof Map&&e.forEach((n,i)=>t.set(i,n)),t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const i=e[n],r=t[n];Hu(r)&&Hu(i)&&t.hasOwnProperty(n)&&!ut(i)&&!er(i)?t[n]=zu(r,i):t[n]=i}return t}const PT=Symbol();function IT(t){return!Hu(t)||!t.hasOwnProperty(PT)}const{assign:Xi}=Object;function DT(t){return!!(ut(t)&&t.effect)}function NT(t,e,n,i){const{state:r,actions:s,getters:o}=e,a=n.state.value[t];let l;function c(){a||(n.state.value[t]=r?r():{});const u=Hg(n.state.value[t]);return Xi(u,s,Object.keys(o||{}).reduce((f,h)=>(f[h]=Pl(He(()=>{ea(n);const p=n._s.get(t);return o[h].call(p,p)})),f),{}))}return l=gv(t,c,e,n,i,!0),l}function gv(t,e,n={},i,r,s){let o;const a=Xi({actions:{}},n),l={deep:!0};let c,u,f=[],h=[],p;const g=i.state.value[t];!s&&!g&&(i.state.value[t]={}),Ge({});let _;function m(I){let b;c=u=!1,typeof I=="function"?(I(i.state.value[t]),b={type:Ro.patchFunction,storeId:t,events:p}):(zu(i.state.value[t],I),b={type:Ro.patchObject,payload:I,storeId:t,events:p});const L=_=Symbol();mi().then(()=>{_===L&&(c=!0)}),u=!0,jr(f,b,i.state.value[t])}const d=s?function(){const{state:b}=n,L=b?b():{};this.$patch(B=>{Xi(B,L)})}:mv;function v(){o.stop(),f=[],h=[],i._s.delete(t)}function y(I,b){return function(){ea(i);const L=Array.from(arguments),B=[],U=[];function k($){B.push($)}function D($){U.push($)}jr(h,{args:L,name:I,store:S,after:k,onError:D});let G;try{G=b.apply(this&&this.$id===t?this:S,L)}catch($){throw jr(U,$),$}return G instanceof Promise?G.then($=>(jr(B,$),$)).catch($=>(jr(U,$),Promise.reject($))):(jr(B,G),G)}}const x={_p:i,$id:t,$onAction:kh.bind(null,h),$patch:m,$reset:d,$subscribe(I,b={}){const L=kh(f,I,b.detached,()=>B()),B=o.run(()=>Ot(()=>i.state.value[t],U=>{(b.flush==="sync"?u:c)&&I({storeId:t,type:Ro.direct,events:p},U)},Xi({},l,b)));return L},$dispose:v},S=Fn(x);i._s.set(t,S);const C=i._a&&i._a.runWithContext||LT,R=i._e.run(()=>(o=Cl(),C(()=>o.run(e))));for(const I in R){const b=R[I];if(ut(b)&&!DT(b)||er(b))s||(g&&IT(b)&&(ut(b)?b.value=g[I]:zu(b,g[I])),i.state.value[t][I]=b);else if(typeof b=="function"){const L=y(I,b);R[I]=L,a.actions[I]=b}}return Xi(S,R),Xi(et(S),R),Object.defineProperty(S,"$state",{get:()=>i.state.value[t],set:I=>{m(b=>{Xi(b,I)})}}),i._p.forEach(I=>{Xi(S,o.run(()=>I({store:S,app:i._a,pinia:i,options:a})))}),g&&s&&n.hydrate&&n.hydrate(S.$state,g),c=!0,u=!0,S}function UT(t,e,n){let i,r;const s=typeof e=="function";typeof t=="string"?(i=t,r=s?n:e):(r=t,i=t.id);function o(a,l){const c=Vf();return a=a||(c?Ft(pv,null):null),a&&ea(a),a=hv,a._s.has(i)||(s?gv(i,e,r,a):NT(i,r,a)),a._s.get(i)}return o.$id=i,o}const Vu=globalThis.requestIdleCallback||(t=>{const e=Date.now(),n={didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-e))};return setTimeout(()=>{t(n)},1)}),OT=globalThis.cancelIdleCallback||(t=>{clearTimeout(t)}),Kf=t=>{const e=ft();e.isHydrating?e.hooks.hookOnce("app:suspense:resolve",()=>{Vu(t)}):Vu(t)},FT=()=>null;function _v(...t){const e=typeof t[t.length-1]=="string"?t.pop():void 0;typeof t[0]!="string"&&t.unshift(e);let[n,i,r={}]=t;if(typeof n!="string")throw new TypeError("[nuxt] [asyncData] key must be a string.");if(typeof i!="function")throw new TypeError("[nuxt] [asyncData] handler must be a function.");r.server=r.server??!0,r.default=r.default??FT,r.lazy=r.lazy??!1,r.immediate=r.immediate??!0;const s=ft(),o=()=>s.isHydrating?s.payload.data[n]:s.static.data[n],a=()=>o()!==void 0;s._asyncData[n]||(s._asyncData[n]={data:Ge(o()??r.default()),pending:Ge(!a()),error:Nf(s.payload._errors,n),status:Ge("idle")});const l={...s._asyncData[n]};l.refresh=l.execute=(h={})=>{if(s._asyncDataPromises[n]){if(h.dedupe===!1)return s._asyncDataPromises[n];s._asyncDataPromises[n].cancelled=!0}if((h._initial||s.isHydrating&&h._initial!==!1)&&a())return o();l.pending.value=!0,l.status.value="pending";const p=new Promise((g,_)=>{try{g(i(s))}catch(m){_(m)}}).then(g=>{if(p.cancelled)return s._asyncDataPromises[n];let _=g;r.transform&&(_=r.transform(g)),r.pick&&(_=kT(_,r.pick)),l.data.value=_,l.error.value=null,l.status.value="success"}).catch(g=>{if(p.cancelled)return s._asyncDataPromises[n];l.error.value=g,l.data.value=pe(r.default()),l.status.value="error"}).finally(()=>{p.cancelled||(l.pending.value=!1,s.payload.data[n]=l.data.value,l.error.value&&(s.payload._errors[n]=qs(l.error.value)),delete s._asyncDataPromises[n])});return s._asyncDataPromises[n]=p,s._asyncDataPromises[n]};const c=()=>l.refresh({_initial:!0}),u=r.server!==!1&&s.payload.serverRendered;{const h=Bn();if(h&&!h._nuxtOnBeforeMountCbs){h._nuxtOnBeforeMountCbs=[];const g=h._nuxtOnBeforeMountCbs;h&&(r_(()=>{g.forEach(_=>{_()}),g.splice(0,g.length)}),Ii(()=>g.splice(0,g.length)))}u&&s.isHydrating&&a()?(l.pending.value=!1,l.status.value=l.error.value?"error":"success"):h&&(s.payload.serverRendered&&s.isHydrating||r.lazy)&&r.immediate?h._nuxtOnBeforeMountCbs.push(c):r.immediate&&c(),r.watch&&Ot(r.watch,()=>l.refresh());const p=s.hook("app:data:refresh",g=>{if(!g||g.includes(n))return l.refresh()});h&&Ii(p)}const f=Promise.resolve(s._asyncDataPromises[n]).then(()=>l);return Object.assign(f,l),f}async function vv(t){await new Promise(n=>Kf(n));const e=t?Array.isArray(t)?t:[t]:void 0;await ft().hooks.callHookParallel("app:data:refresh",e)}function kT(t,e){const n={};for(const i of e)n[i]=t[i];return n}const Bh="__nuxt_component";async function BT(t,e){const n=ft(),i=Gr(),r=Bn(),{fetchKey:s,_fetchKeyBase:o}=r.proxy.$options,a=(typeof s=="function"?s(()=>""):s)||[o,i.fullPath,i.matched.findIndex(u=>Object.values(u.components||{}).includes(r.type))].join(":"),{data:l,error:c}=await _v(`options:asyncdata:${a}`,()=>n.runWithContext(()=>e(n)));if(c.value)throw qs(c.value);l.value&&typeof l.value=="object"&&Object.assign(await t,Hg(Fn(l.value)))}const HT=function(...e){const[n,i]=e,{setup:r}=n;return!r&&!n.asyncData&&!n.head?{[Bh]:!0,...n}:{[Bh]:!0,_fetchKeyBase:i,...n,setup(s,o){const a=ft(),l=r?Promise.resolve(a.runWithContext(()=>r(s,o))).then(u=>u||{}):{},c=[];if(n.asyncData&&c.push(BT(l,n.asyncData)),n.head){const u=ft();zl(typeof n.head=="function"?()=>n.head(u):n.head)}return Promise.resolve(l).then(()=>Promise.all(c)).then(()=>l).finally(()=>{c.length=0})}}},zT={ignoreUnknown:!1,respectType:!1,respectFunctionNames:!1,respectFunctionProperties:!1,unorderedObjects:!0,unorderedArrays:!1,unorderedSets:!1};function Hh(t,e={}){e={...zT,...e};const n=yv(e);return n.dispatch(t),n.toString()}function yv(t){const e=[];let n=[];const i=r=>{e.push(r)};return{toString(){return e.join("")},getContext(){return n},dispatch(r){return t.replacer&&(r=t.replacer(r)),this["_"+(r===null?"null":typeof r)](r)},_object(r){if(r&&typeof r.toJSON=="function")return this._object(r.toJSON());const s=/\[object (.*)]/i,o=Object.prototype.toString.call(r),a=s.exec(o),l=a?a[1].toLowerCase():"unknown:["+o.toLowerCase()+"]";let c=null;if((c=n.indexOf(r))>=0)return this.dispatch("[CIRCULAR:"+c+"]");if(n.push(r),typeof Buffer<"u"&&Buffer.isBuffer&&Buffer.isBuffer(r))return i("buffer:"),i(r.toString("utf8"));if(l!=="object"&&l!=="function"&&l!=="asyncfunction")this["_"+l]?this["_"+l](r):t.ignoreUnknown||this._unkown(r,l);else{let u=Object.keys(r);t.unorderedObjects&&(u=u.sort()),t.respectType!==!1&&!zh(r)&&u.splice(0,0,"prototype","__proto__","letructor"),t.excludeKeys&&(u=u.filter(function(f){return!t.excludeKeys(f)})),i("object:"+u.length+":");for(const f of u)this.dispatch(f),i(":"),t.excludeValues||this.dispatch(r[f]),i(",")}},_array(r,s){if(s=typeof s<"u"?s:t.unorderedArrays!==!1,i("array:"+r.length+":"),!s||r.length<=1){for(const l of r)this.dispatch(l);return}const o=[],a=r.map(l=>{const c=yv(t);return c.dispatch(l),o.push(c.getContext()),c.toString()});return n=[...n,...o],a.sort(),this._array(a,!1)},_date(r){return i("date:"+r.toJSON())},_symbol(r){return i("symbol:"+r.toString())},_unkown(r,s){if(i(s),!!r&&(i(":"),r&&typeof r.entries=="function"))return this._array(Array.from(r.entries()),!0)},_error(r){return i("error:"+r.toString())},_boolean(r){return i("bool:"+r.toString())},_string(r){i("string:"+r.length+":"),i(r.toString())},_function(r){i("fn:"),zh(r)?this.dispatch("[native]"):this.dispatch(r.toString()),t.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(r.name)),t.respectFunctionProperties&&this._object(r)},_number(r){return i("number:"+r.toString())},_xml(r){return i("xml:"+r.toString())},_null(){return i("Null")},_undefined(){return i("Undefined")},_regexp(r){return i("regex:"+r.toString())},_uint8array(r){return i("uint8array:"),this.dispatch(Array.prototype.slice.call(r))},_uint8clampedarray(r){return i("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(r))},_int8array(r){return i("int8array:"),this.dispatch(Array.prototype.slice.call(r))},_uint16array(r){return i("uint16array:"),this.dispatch(Array.prototype.slice.call(r))},_int16array(r){return i("int16array:"),this.dispatch(Array.prototype.slice.call(r))},_uint32array(r){return i("uint32array:"),this.dispatch(Array.prototype.slice.call(r))},_int32array(r){return i("int32array:"),this.dispatch(Array.prototype.slice.call(r))},_float32array(r){return i("float32array:"),this.dispatch(Array.prototype.slice.call(r))},_float64array(r){return i("float64array:"),this.dispatch(Array.prototype.slice.call(r))},_arraybuffer(r){return i("arraybuffer:"),this.dispatch(new Uint8Array(r))},_url(r){return i("url:"+r.toString())},_map(r){i("map:");const s=[...r];return this._array(s,t.unorderedSets!==!1)},_set(r){i("set:");const s=[...r];return this._array(s,t.unorderedSets!==!1)},_file(r){return i("file:"),this.dispatch([r.name,r.size,r.type,r.lastModfied])},_blob(){if(t.ignoreUnknown)return i("[blob]");throw new Error(`Hashing Blob objects is currently not supported
Use "options.replacer" or "options.ignoreUnknown"
`)},_domwindow(){return i("domwindow")},_bigint(r){return i("bigint:"+r.toString())},_process(){return i("process")},_timer(){return i("timer")},_pipe(){return i("pipe")},_tcp(){return i("tcp")},_udp(){return i("udp")},_tty(){return i("tty")},_statwatcher(){return i("statwatcher")},_securecontext(){return i("securecontext")},_connection(){return i("connection")},_zlib(){return i("zlib")},_context(){return i("context")},_nodescript(){return i("nodescript")},_httpparser(){return i("httpparser")},_dataview(){return i("dataview")},_signal(){return i("signal")},_fsevent(){return i("fsevent")},_tlswrap(){return i("tlswrap")}}}function zh(t){return typeof t!="function"?!1:/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code]\s+}$/i.exec(Function.prototype.toString.call(t))!=null}function VT(t,e,n={}){return t===e||Hh(t,n)===Hh(e,n)}const GT={path:"/",watch:!0,decode:t=>L_(decodeURIComponent(t)),encode:t=>encodeURIComponent(typeof t=="string"?t:JSON.stringify(t))};function Vh(t,e){var s;const n={...GT,...e},i=WT(n)||{},r=Ge(i[t]??((s=n.default)==null?void 0:s.call(n)));{const o=typeof BroadcastChannel>"u"?null:new BroadcastChannel(`nuxt:cookies:${t}`);Bn()&&Ii(()=>{o==null||o.close()});const a=()=>{XT(t,r.value,n),o==null||o.postMessage(et(r.value))};let l=!1;o&&(o.onmessage=c=>{l=!0,r.value=c.data,mi(()=>{l=!1})}),n.watch?Ot(r,(c,u)=>{l||VT(c,u)||a()},{deep:n.watch!=="shallow"}):a()}return r}function WT(t={}){return nM(document.cookie,t)}function $T(t,e,n={}){return e==null?vh(t,e,{...n,maxAge:-1}):vh(t,e,n)}function XT(t,e,n={}){document.cookie=$T(t,e,n)}async function xv(t,e=gi()){const{path:n,matched:i}=e.resolve(t);if(!i.length||(e._routePreloaded||(e._routePreloaded=new Set),e._routePreloaded.has(n)))return;const r=e._preloadPromises=e._preloadPromises||[];if(r.length>4)return Promise.all(r).then(()=>xv(t,e));e._routePreloaded.add(n);const s=i.map(o=>{var a;return(a=o.components)==null?void 0:a.default}).filter(o=>typeof o=="function");for(const o of s){const a=Promise.resolve(o()).catch(()=>{}).finally(()=>r.splice(r.indexOf(a)));r.push(a)}await Promise.all(r)}function jT(t={}){const e=t.path||window.location.pathname;let n={};try{n=JSON.parse(sessionStorage.getItem("nuxt:reload")||"{}")}catch{}if(t.force||(n==null?void 0:n.path)!==e||(n==null?void 0:n.expires)<Date.now()){try{sessionStorage.setItem("nuxt:reload",JSON.stringify({path:e,expires:Date.now()+(t.ttl??1e4)}))}catch{}if(t.persistState)try{sessionStorage.setItem("nuxt:reload:state",JSON.stringify({state:ft().payload.state}))}catch{}window.location.pathname!==e?window.location.href=e:window.location.reload()}}const qT=(...t)=>t.find(e=>e!==void 0),YT="noopener noreferrer";/*! @__NO_SIDE_EFFECTS__ */function KT(t){const e=t.componentName||"NuxtLink",n=(i,r)=>{if(!i||t.trailingSlash!=="append"&&t.trailingSlash!=="remove")return i;const s=t.trailingSlash==="append"?dl:Xf;if(typeof i=="string")return s(i,!0);const o="path"in i?i.path:r(i).path;return{...i,name:void 0,path:s(o,!0)}};return $t({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},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}},setup(i,{slots:r}){const s=gi(),o=He(()=>{const f=i.to||i.href||"";return n(f,s.resolve)}),a=He(()=>i.external||i.target&&i.target!=="_self"?!0:typeof o.value=="object"?!1:o.value===""||js(o.value,{acceptRelative:!0})),l=Ge(!1),c=Ge(null),u=f=>{var h;c.value=i.custom?(h=f==null?void 0:f.$el)==null?void 0:h.nextElementSibling:f==null?void 0:f.$el};if(i.prefetch!==!1&&i.noPrefetch!==!0&&i.target!=="_blank"&&!JT()){const h=ft();let p,g=null;ei(()=>{const _=ZT();Kf(()=>{p=Vu(()=>{var m;(m=c==null?void 0:c.value)!=null&&m.tagName&&(g=_.observe(c.value,async()=>{g==null||g(),g=null;const d=typeof o.value=="string"?o.value:s.resolve(o.value).fullPath;await Promise.all([h.hooks.callHook("link:prefetch",d).catch(()=>{}),!a.value&&xv(o.value,s).catch(()=>{})]),l.value=!0}))})})}),Vr(()=>{p&&OT(p),g==null||g(),g=null})}return()=>{var _,m;if(!a.value){const d={ref:u,to:o.value,activeClass:i.activeClass||t.activeClass,exactActiveClass:i.exactActiveClass||t.exactActiveClass,replace:i.replace,ariaCurrentValue:i.ariaCurrentValue,custom:i.custom};return i.custom||(l.value&&(d.class=i.prefetchedClass||t.prefetchedClass),d.rel=i.rel),Et(Xx("RouterLink"),d,r.default)}const f=typeof o.value=="object"?((_=s.resolve(o.value))==null?void 0:_.href)??null:o.value||null,h=i.target||null,p=i.noRel?null:qT(i.rel,t.externalRelAttribute,f?YT:"")||null,g=()=>J_(f,{replace:i.replace});return i.custom?r.default?r.default({href:f,navigate:g,get route(){if(!f)return;const d=Bl(f);return{path:d.pathname,fullPath:d.pathname,get query(){return I_(d.search)},hash:d.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:f}},rel:p,target:h,isExternal:a.value,isActive:!1,isExactActive:!1}):null:Et("a",{ref:c,href:f,rel:p,target:h},(m=r.default)==null?void 0:m.call(r))}}})}const Ds=KT({componentName:"NuxtLink"});function ZT(){const t=ft();if(t._observer)return t._observer;let e=null;const n=new Map,i=(s,o)=>(e||(e=new IntersectionObserver(a=>{for(const l of a){const c=n.get(l.target);(l.isIntersecting||l.intersectionRatio>0)&&c&&c()}})),n.set(s,o),e.observe(s),()=>{n.delete(s),e.unobserve(s),n.size===0&&(e.disconnect(),e=null)});return t._observer={observe:i}}function JT(){const t=navigator.connection;return!!(t&&(t.saveData||/2g/.test(t.effectiveType)))}const QT=ti(t=>{const e=CT();return t.vueApp.use(e),ea(e),t.payload&&t.payload.pinia&&(e.state.value=t.payload.pinia),{provide:{pinia:e}}}),ew=ti({name:"nuxt:global-components"}),tw=ti({name:"nuxt:head",setup(t){const n=$b();n.push(Yb),t.vueApp.use(n);{let i=!0;const r=()=>{i=!1,n.hooks.callHook("entries:updated",n)};n.hooks.hook("dom:beforeRender",s=>{s.shouldRender=!i}),t.hooks.hook("page:start",()=>{i=!0}),t.hooks.hook("page:finish",r),t.hooks.hook("app:suspense:resolve",r)}}}),Ma={},nw=ti({name:"nuxt:prefetch",setup(t){const e=gi();t.hooks.hook("app:mounted",()=>{e.beforeEach(async n=>{var r;const i=(r=n==null?void 0:n.meta)==null?void 0:r.layout;i&&typeof Ma[i]=="function"&&await Ma[i]()})}),t.hooks.hook("link:prefetch",n=>{var o,a,l,c;if(js(n))return;const i=e.resolve(n);if(!i)return;const r=(o=i==null?void 0:i.meta)==null?void 0:o.layout;let s=Array.isArray((a=i==null?void 0:i.meta)==null?void 0:a.middleware)?(l=i==null?void 0:i.meta)==null?void 0:l.middleware:[(c=i==null?void 0:i.meta)==null?void 0:c.middleware];s=s.filter(u=>typeof u=="string");for(const u of s)typeof Ao[u]=="function"&&Ao[u]();r&&typeof Ma[r]=="function"&&Ma[r]()})}}),iw=ti(()=>{});/*!
  * shared v9.3.0-beta.24
  * (c) 2023 kazuya kawaguchi
  * Released under the MIT License.
  */const Gu=typeof window<"u",Wr=(t,e=!1)=>e?Symbol.for(t):Symbol(t),rw=(t,e,n)=>sw({l:t,k:e,s:n}),sw=t=>JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Gt=t=>typeof t=="number"&&isFinite(t),ow=t=>Ev(t)==="[object Date]",vl=t=>Ev(t)==="[object RegExp]",$l=t=>tt(t)&&Object.keys(t).length===0;function aw(t,e){typeof console<"u"&&(console.warn("[intlify] "+t),e&&console.warn(e.stack))}const Yt=Object.assign;let Gh;const Zf=()=>Gh||(Gh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Wh(t){return t.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const lw=Object.prototype.hasOwnProperty;function Jf(t,e){return lw.call(t,e)}const At=Array.isArray,It=t=>typeof t=="function",Ae=t=>typeof t=="string",wt=t=>typeof t=="boolean",rt=t=>t!==null&&typeof t=="object",Sv=Object.prototype.toString,Ev=t=>Sv.call(t),tt=t=>{if(!rt(t))return!1;const e=Object.getPrototypeOf(t);return e===null||e.constructor===Object},cw=t=>t==null?"":At(t)||tt(t)&&t.toString===Sv?JSON.stringify(t,null,2):String(t);function Qf(t,e=""){return t.reduce((n,i,r)=>r===0?n+i:n+e+i,"")}/*!
  * message-compiler v9.3.0-beta.24
  * (c) 2023 kazuya kawaguchi
  * Released under the MIT License.
  */function uw(t,e,n){return{line:t,column:e,offset:n}}function Wu(t,e,n){const i={start:t,end:e};return n!=null&&(i.source=n),i}const st={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15};function Xl(t,e,n={}){const{domain:i,messages:r,args:s}=n,o=t,a=new SyntaxError(String(o));return a.code=t,e&&(a.location=e),a.domain=i,a}function fw(t){throw t}const yi=" ",dw="\r",cn=`
`,hw=String.fromCharCode(8232),pw=String.fromCharCode(8233);function mw(t){const e=t;let n=0,i=1,r=1,s=0;const o=R=>e[R]===dw&&e[R+1]===cn,a=R=>e[R]===cn,l=R=>e[R]===pw,c=R=>e[R]===hw,u=R=>o(R)||a(R)||l(R)||c(R),f=()=>n,h=()=>i,p=()=>r,g=()=>s,_=R=>o(R)||l(R)||c(R)?cn:e[R],m=()=>_(n),d=()=>_(n+s);function v(){return s=0,u(n)&&(i++,r=0),o(n)&&n++,n++,r++,e[n]}function y(){return o(n+s)&&s++,s++,e[n+s]}function x(){n=0,i=1,r=1,s=0}function S(R=0){s=R}function C(){const R=n+s;for(;R!==n;)v();s=0}return{index:f,line:h,column:p,peekOffset:g,charAt:_,currentChar:m,currentPeek:d,next:v,peek:y,reset:x,resetPeek:S,skipToPeek:C}}const Hi=void 0,$h="'",gw="tokenizer";function _w(t,e={}){const n=e.location!==!1,i=mw(t),r=()=>i.index(),s=()=>uw(i.line(),i.column(),i.index()),o=s(),a=r(),l={currentType:14,offset:a,startLoc:o,endLoc:o,lastType:14,lastOffset:a,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},c=()=>l,{onError:u}=e;function f(E,w,N,...O){const W=c();if(w.column+=N,w.offset+=N,u){const q=n?Wu(W.startLoc,w):null,Z=Xl(E,q,{domain:gw,args:O});u(Z)}}function h(E,w,N){E.endLoc=s(),E.currentType=w;const O={type:w};return n&&(O.loc=Wu(E.startLoc,E.endLoc)),N!=null&&(O.value=N),O}const p=E=>h(E,14);function g(E,w){return E.currentChar()===w?(E.next(),w):(f(st.EXPECTED_TOKEN,s(),0,w),"")}function _(E){let w="";for(;E.currentPeek()===yi||E.currentPeek()===cn;)w+=E.currentPeek(),E.peek();return w}function m(E){const w=_(E);return E.skipToPeek(),w}function d(E){if(E===Hi)return!1;const w=E.charCodeAt(0);return w>=97&&w<=122||w>=65&&w<=90||w===95}function v(E){if(E===Hi)return!1;const w=E.charCodeAt(0);return w>=48&&w<=57}function y(E,w){const{currentType:N}=w;if(N!==2)return!1;_(E);const O=d(E.currentPeek());return E.resetPeek(),O}function x(E,w){const{currentType:N}=w;if(N!==2)return!1;_(E);const O=E.currentPeek()==="-"?E.peek():E.currentPeek(),W=v(O);return E.resetPeek(),W}function S(E,w){const{currentType:N}=w;if(N!==2)return!1;_(E);const O=E.currentPeek()===$h;return E.resetPeek(),O}function C(E,w){const{currentType:N}=w;if(N!==8)return!1;_(E);const O=E.currentPeek()===".";return E.resetPeek(),O}function R(E,w){const{currentType:N}=w;if(N!==9)return!1;_(E);const O=d(E.currentPeek());return E.resetPeek(),O}function I(E,w){const{currentType:N}=w;if(!(N===8||N===12))return!1;_(E);const O=E.currentPeek()===":";return E.resetPeek(),O}function b(E,w){const{currentType:N}=w;if(N!==10)return!1;const O=()=>{const q=E.currentPeek();return q==="{"?d(E.peek()):q==="@"||q==="%"||q==="|"||q===":"||q==="."||q===yi||!q?!1:q===cn?(E.peek(),O()):d(q)},W=O();return E.resetPeek(),W}function L(E){_(E);const w=E.currentPeek()==="|";return E.resetPeek(),w}function B(E){const w=_(E),N=E.currentPeek()==="%"&&E.peek()==="{";return E.resetPeek(),{isModulo:N,hasSpace:w.length>0}}function U(E,w=!0){const N=(W=!1,q="",Z=!1)=>{const ce=E.currentPeek();return ce==="{"?q==="%"?!1:W:ce==="@"||!ce?q==="%"?!0:W:ce==="%"?(E.peek(),N(W,"%",!0)):ce==="|"?q==="%"||Z?!0:!(q===yi||q===cn):ce===yi?(E.peek(),N(!0,yi,Z)):ce===cn?(E.peek(),N(!0,cn,Z)):!0},O=N();return w&&E.resetPeek(),O}function k(E,w){const N=E.currentChar();return N===Hi?Hi:w(N)?(E.next(),N):null}function D(E){return k(E,N=>{const O=N.charCodeAt(0);return O>=97&&O<=122||O>=65&&O<=90||O>=48&&O<=57||O===95||O===36})}function G(E){return k(E,N=>{const O=N.charCodeAt(0);return O>=48&&O<=57})}function $(E){return k(E,N=>{const O=N.charCodeAt(0);return O>=48&&O<=57||O>=65&&O<=70||O>=97&&O<=102})}function j(E){let w="",N="";for(;w=G(E);)N+=w;return N}function oe(E){m(E);const w=E.currentChar();return w!=="%"&&f(st.EXPECTED_TOKEN,s(),0,w),E.next(),"%"}function se(E){let w="";for(;;){const N=E.currentChar();if(N==="{"||N==="}"||N==="@"||N==="|"||!N)break;if(N==="%")if(U(E))w+=N,E.next();else break;else if(N===yi||N===cn)if(U(E))w+=N,E.next();else{if(L(E))break;w+=N,E.next()}else w+=N,E.next()}return w}function he(E){m(E);let w="",N="";for(;w=D(E);)N+=w;return E.currentChar()===Hi&&f(st.UNTERMINATED_CLOSING_BRACE,s(),0),N}function me(E){m(E);let w="";return E.currentChar()==="-"?(E.next(),w+=`-${j(E)}`):w+=j(E),E.currentChar()===Hi&&f(st.UNTERMINATED_CLOSING_BRACE,s(),0),w}function ye(E){m(E),g(E,"'");let w="",N="";const O=q=>q!==$h&&q!==cn;for(;w=k(E,O);)w==="\\"?N+=te(E):N+=w;const W=E.currentChar();return W===cn||W===Hi?(f(st.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),W===cn&&(E.next(),g(E,"'")),N):(g(E,"'"),N)}function te(E){const w=E.currentChar();switch(w){case"\\":case"'":return E.next(),`\\${w}`;case"u":return fe(E,w,4);case"U":return fe(E,w,6);default:return f(st.UNKNOWN_ESCAPE_SEQUENCE,s(),0,w),""}}function fe(E,w,N){g(E,w);let O="";for(let W=0;W<N;W++){const q=$(E);if(!q){f(st.INVALID_UNICODE_ESCAPE_SEQUENCE,s(),0,`\\${w}${O}${E.currentChar()}`);break}O+=q}return`\\${w}${O}`}function be(E){m(E);let w="",N="";const O=W=>W!=="{"&&W!=="}"&&W!==yi&&W!==cn;for(;w=k(E,O);)N+=w;return N}function Te(E){let w="",N="";for(;w=D(E);)N+=w;return N}function V(E){const w=(N=!1,O)=>{const W=E.currentChar();return W==="{"||W==="%"||W==="@"||W==="|"||!W||W===yi?O:W===cn?(O+=W,E.next(),w(N,O)):(O+=W,E.next(),w(!0,O))};return w(!1,"")}function ue(E){m(E);const w=g(E,"|");return m(E),w}function ne(E,w){let N=null;switch(E.currentChar()){case"{":return w.braceNest>=1&&f(st.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),E.next(),N=h(w,2,"{"),m(E),w.braceNest++,N;case"}":return w.braceNest>0&&w.currentType===2&&f(st.EMPTY_PLACEHOLDER,s(),0),E.next(),N=h(w,3,"}"),w.braceNest--,w.braceNest>0&&m(E),w.inLinked&&w.braceNest===0&&(w.inLinked=!1),N;case"@":return w.braceNest>0&&f(st.UNTERMINATED_CLOSING_BRACE,s(),0),N=de(E,w)||p(w),w.braceNest=0,N;default:let W=!0,q=!0,Z=!0;if(L(E))return w.braceNest>0&&f(st.UNTERMINATED_CLOSING_BRACE,s(),0),N=h(w,1,ue(E)),w.braceNest=0,w.inLinked=!1,N;if(w.braceNest>0&&(w.currentType===5||w.currentType===6||w.currentType===7))return f(st.UNTERMINATED_CLOSING_BRACE,s(),0),w.braceNest=0,Me(E,w);if(W=y(E,w))return N=h(w,5,he(E)),m(E),N;if(q=x(E,w))return N=h(w,6,me(E)),m(E),N;if(Z=S(E,w))return N=h(w,7,ye(E)),m(E),N;if(!W&&!q&&!Z)return N=h(w,13,be(E)),f(st.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,N.value),m(E),N;break}return N}function de(E,w){const{currentType:N}=w;let O=null;const W=E.currentChar();switch((N===8||N===9||N===12||N===10)&&(W===cn||W===yi)&&f(st.INVALID_LINKED_FORMAT,s(),0),W){case"@":return E.next(),O=h(w,8,"@"),w.inLinked=!0,O;case".":return m(E),E.next(),h(w,9,".");case":":return m(E),E.next(),h(w,10,":");default:return L(E)?(O=h(w,1,ue(E)),w.braceNest=0,w.inLinked=!1,O):C(E,w)||I(E,w)?(m(E),de(E,w)):R(E,w)?(m(E),h(w,12,Te(E))):b(E,w)?(m(E),W==="{"?ne(E,w)||O:h(w,11,V(E))):(N===8&&f(st.INVALID_LINKED_FORMAT,s(),0),w.braceNest=0,w.inLinked=!1,Me(E,w))}}function Me(E,w){let N={type:14};if(w.braceNest>0)return ne(E,w)||p(w);if(w.inLinked)return de(E,w)||p(w);switch(E.currentChar()){case"{":return ne(E,w)||p(w);case"}":return f(st.UNBALANCED_CLOSING_BRACE,s(),0),E.next(),h(w,3,"}");case"@":return de(E,w)||p(w);default:if(L(E))return N=h(w,1,ue(E)),w.braceNest=0,w.inLinked=!1,N;const{isModulo:W,hasSpace:q}=B(E);if(W)return q?h(w,0,se(E)):h(w,4,oe(E));if(U(E))return h(w,0,se(E));break}return N}function T(){const{currentType:E,offset:w,startLoc:N,endLoc:O}=l;return l.lastType=E,l.lastOffset=w,l.lastStartLoc=N,l.lastEndLoc=O,l.offset=r(),l.startLoc=s(),i.currentChar()===Hi?h(l,14):Me(i,l)}return{nextToken:T,currentOffset:r,currentPosition:s,context:c}}const vw="parser",yw=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function xw(t,e,n){switch(t){case"\\\\":return"\\";case"\\'":return"'";default:{const i=parseInt(e||n,16);return i<=55295||i>=57344?String.fromCodePoint(i):"�"}}}function Sw(t={}){const e=t.location!==!1,{onError:n}=t;function i(d,v,y,x,...S){const C=d.currentPosition();if(C.offset+=x,C.column+=x,n){const R=e?Wu(y,C):null,I=Xl(v,R,{domain:vw,args:S});n(I)}}function r(d,v,y){const x={type:d};return e&&(x.start=v,x.end=v,x.loc={start:y,end:y}),x}function s(d,v,y,x){x&&(d.type=x),e&&(d.end=v,d.loc&&(d.loc.end=y))}function o(d,v){const y=d.context(),x=r(3,y.offset,y.startLoc);return x.value=v,s(x,d.currentOffset(),d.currentPosition()),x}function a(d,v){const y=d.context(),{lastOffset:x,lastStartLoc:S}=y,C=r(5,x,S);return C.index=parseInt(v,10),d.nextToken(),s(C,d.currentOffset(),d.currentPosition()),C}function l(d,v){const y=d.context(),{lastOffset:x,lastStartLoc:S}=y,C=r(4,x,S);return C.key=v,d.nextToken(),s(C,d.currentOffset(),d.currentPosition()),C}function c(d,v){const y=d.context(),{lastOffset:x,lastStartLoc:S}=y,C=r(9,x,S);return C.value=v.replace(yw,xw),d.nextToken(),s(C,d.currentOffset(),d.currentPosition()),C}function u(d){const v=d.nextToken(),y=d.context(),{lastOffset:x,lastStartLoc:S}=y,C=r(8,x,S);return v.type!==12?(i(d,st.UNEXPECTED_EMPTY_LINKED_MODIFIER,y.lastStartLoc,0),C.value="",s(C,x,S),{nextConsumeToken:v,node:C}):(v.value==null&&i(d,st.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ii(v)),C.value=v.value||"",s(C,d.currentOffset(),d.currentPosition()),{node:C})}function f(d,v){const y=d.context(),x=r(7,y.offset,y.startLoc);return x.value=v,s(x,d.currentOffset(),d.currentPosition()),x}function h(d){const v=d.context(),y=r(6,v.offset,v.startLoc);let x=d.nextToken();if(x.type===9){const S=u(d);y.modifier=S.node,x=S.nextConsumeToken||d.nextToken()}switch(x.type!==10&&i(d,st.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,ii(x)),x=d.nextToken(),x.type===2&&(x=d.nextToken()),x.type){case 11:x.value==null&&i(d,st.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,ii(x)),y.key=f(d,x.value||"");break;case 5:x.value==null&&i(d,st.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,ii(x)),y.key=l(d,x.value||"");break;case 6:x.value==null&&i(d,st.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,ii(x)),y.key=a(d,x.value||"");break;case 7:x.value==null&&i(d,st.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,ii(x)),y.key=c(d,x.value||"");break;default:i(d,st.UNEXPECTED_EMPTY_LINKED_KEY,v.lastStartLoc,0);const S=d.context(),C=r(7,S.offset,S.startLoc);return C.value="",s(C,S.offset,S.startLoc),y.key=C,s(y,S.offset,S.startLoc),{nextConsumeToken:x,node:y}}return s(y,d.currentOffset(),d.currentPosition()),{node:y}}function p(d){const v=d.context(),y=v.currentType===1?d.currentOffset():v.offset,x=v.currentType===1?v.endLoc:v.startLoc,S=r(2,y,x);S.items=[];let C=null;do{const b=C||d.nextToken();switch(C=null,b.type){case 0:b.value==null&&i(d,st.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,ii(b)),S.items.push(o(d,b.value||""));break;case 6:b.value==null&&i(d,st.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,ii(b)),S.items.push(a(d,b.value||""));break;case 5:b.value==null&&i(d,st.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,ii(b)),S.items.push(l(d,b.value||""));break;case 7:b.value==null&&i(d,st.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,ii(b)),S.items.push(c(d,b.value||""));break;case 8:const L=h(d);S.items.push(L.node),C=L.nextConsumeToken||null;break}}while(v.currentType!==14&&v.currentType!==1);const R=v.currentType===1?v.lastOffset:d.currentOffset(),I=v.currentType===1?v.lastEndLoc:d.currentPosition();return s(S,R,I),S}function g(d,v,y,x){const S=d.context();let C=x.items.length===0;const R=r(1,v,y);R.cases=[],R.cases.push(x);do{const I=p(d);C||(C=I.items.length===0),R.cases.push(I)}while(S.currentType!==14);return C&&i(d,st.MUST_HAVE_MESSAGES_IN_PLURAL,y,0),s(R,d.currentOffset(),d.currentPosition()),R}function _(d){const v=d.context(),{offset:y,startLoc:x}=v,S=p(d);return v.currentType===14?S:g(d,y,x,S)}function m(d){const v=_w(d,Yt({},t)),y=v.context(),x=r(0,y.offset,y.startLoc);return e&&x.loc&&(x.loc.source=d),x.body=_(v),t.onCacheKey&&(x.cacheKey=t.onCacheKey(d)),y.currentType!==14&&i(v,st.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,d[y.offset]||""),s(x,v.currentOffset(),v.currentPosition()),x}return{parse:m}}function ii(t){if(t.type===14)return"EOF";const e=(t.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function Ew(t,e={}){const n={ast:t,helpers:new Set};return{context:()=>n,helper:s=>(n.helpers.add(s),s)}}function Xh(t,e){for(let n=0;n<t.length;n++)ed(t[n],e)}function ed(t,e){switch(t.type){case 1:Xh(t.cases,e),e.helper("plural");break;case 2:Xh(t.items,e);break;case 6:ed(t.key,e),e.helper("linked"),e.helper("type");break;case 5:e.helper("interpolate"),e.helper("list");break;case 4:e.helper("interpolate"),e.helper("named");break}}function bw(t,e={}){const n=Ew(t);n.helper("normalize"),t.body&&ed(t.body,n);const i=n.context();t.helpers=Array.from(i.helpers)}function Mw(t){const e=t.body;return e.type===2?jh(e):e.cases.forEach(n=>jh(n)),t}function jh(t){if(t.items.length===1){const e=t.items[0];(e.type===3||e.type===9)&&(t.static=e.value,delete e.value)}else{const e=[];for(let n=0;n<t.items.length;n++){const i=t.items[n];if(!(i.type===3||i.type===9)||i.value==null)break;e.push(i.value)}if(e.length===t.items.length){t.static=Qf(e);for(let n=0;n<t.items.length;n++){const i=t.items[n];(i.type===3||i.type===9)&&delete i.value}}}}function Tw(t,e){const{sourceMap:n,filename:i,breakLineCode:r,needIndent:s}=e,o=e.location!==!1,a={filename:i,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:s,indentLevel:0};o&&t.loc&&(a.source=t.loc.source);const l=()=>a;function c(m,d){a.code+=m}function u(m,d=!0){const v=d?r:"";c(s?v+"  ".repeat(m):v)}function f(m=!0){const d=++a.indentLevel;m&&u(d)}function h(m=!0){const d=--a.indentLevel;m&&u(d)}function p(){u(a.indentLevel)}return{context:l,push:c,indent:f,deindent:h,newline:p,helper:m=>`_${m}`,needIndent:()=>a.needIndent}}function ww(t,e){const{helper:n}=t;t.push(`${n("linked")}(`),Ns(t,e.key),e.modifier?(t.push(", "),Ns(t,e.modifier),t.push(", _type")):t.push(", undefined, _type"),t.push(")")}function Aw(t,e){const{helper:n,needIndent:i}=t;t.push(`${n("normalize")}([`),t.indent(i());const r=e.items.length;for(let s=0;s<r&&(Ns(t,e.items[s]),s!==r-1);s++)t.push(", ");t.deindent(i()),t.push("])")}function Rw(t,e){const{helper:n,needIndent:i}=t;if(e.cases.length>1){t.push(`${n("plural")}([`),t.indent(i());const r=e.cases.length;for(let s=0;s<r&&(Ns(t,e.cases[s]),s!==r-1);s++)t.push(", ");t.deindent(i()),t.push("])")}}function Cw(t,e){e.body?Ns(t,e.body):t.push("null")}function Ns(t,e){const{helper:n}=t;switch(e.type){case 0:Cw(t,e);break;case 1:Rw(t,e);break;case 2:Aw(t,e);break;case 6:ww(t,e);break;case 8:t.push(JSON.stringify(e.value),e);break;case 7:t.push(JSON.stringify(e.value),e);break;case 5:t.push(`${n("interpolate")}(${n("list")}(${e.index}))`,e);break;case 4:t.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(e.key)}))`,e);break;case 9:t.push(JSON.stringify(e.value),e);break;case 3:t.push(JSON.stringify(e.value),e);break}}const Lw=(t,e={})=>{const n=Ae(e.mode)?e.mode:"normal",i=Ae(e.filename)?e.filename:"message.intl",r=!!e.sourceMap,s=e.breakLineCode!=null?e.breakLineCode:n==="arrow"?";":`
`,o=e.needIndent?e.needIndent:n!=="arrow",a=t.helpers||[],l=Tw(t,{mode:n,filename:i,sourceMap:r,breakLineCode:s,needIndent:o});l.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(o),a.length>0&&(l.push(`const { ${Qf(a.map(f=>`${f}: _${f}`),", ")} } = ctx`),l.newline()),l.push("return "),Ns(l,t),l.deindent(o),l.push("}"),delete t.helpers;const{code:c,map:u}=l.context();return{ast:t,code:c,map:u?u.toJSON():void 0}};function Pw(t,e={}){const n=Yt({},e),i=!!n.jit,r=n.optimize==null?!0:n.optimize,o=Sw(n).parse(t);return i?(r&&Mw(o),{ast:o,code:""}):(bw(o,n),Lw(o,n))}/*!
  * devtools-if v9.3.0-beta.24
  * (c) 2023 kazuya kawaguchi
  * Released under the MIT License.
  */const bv={I18nInit:"i18n:init",FunctionTranslate:"function:translate"};/*!
  * core-base v9.3.0-beta.24
  * (c) 2023 kazuya kawaguchi
  * Released under the MIT License.
  */function Iw(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Zf().__INTLIFY_PROD_DEVTOOLS__=!1)}const fr=[];fr[0]={w:[0],i:[3,0],["["]:[4],o:[7]};fr[1]={w:[1],["."]:[2],["["]:[4],o:[7]};fr[2]={w:[2],i:[3,0],[0]:[3,0]};fr[3]={i:[3,0],[0]:[3,0],w:[1,1],["."]:[2,1],["["]:[4,1],o:[7,1]};fr[4]={["'"]:[5,0],['"']:[6,0],["["]:[4,2],["]"]:[1,3],o:8,l:[4,0]};fr[5]={["'"]:[4,0],o:8,l:[5,0]};fr[6]={['"']:[4,0],o:8,l:[6,0]};const Dw=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Nw(t){return Dw.test(t)}function Uw(t){const e=t.charCodeAt(0),n=t.charCodeAt(t.length-1);return e===n&&(e===34||e===39)?t.slice(1,-1):t}function Ow(t){if(t==null)return"o";switch(t.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return t;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function Fw(t){const e=t.trim();return t.charAt(0)==="0"&&isNaN(parseInt(t))?!1:Nw(e)?Uw(e):"*"+e}function kw(t){const e=[];let n=-1,i=0,r=0,s,o,a,l,c,u,f;const h=[];h[0]=()=>{o===void 0?o=a:o+=a},h[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},h[2]=()=>{h[0](),r++},h[3]=()=>{if(r>0)r--,i=4,h[0]();else{if(r=0,o===void 0||(o=Fw(o),o===!1))return!1;h[1]()}};function p(){const g=t[n+1];if(i===5&&g==="'"||i===6&&g==='"')return n++,a="\\"+g,h[0](),!0}for(;i!==null;)if(n++,s=t[n],!(s==="\\"&&p())){if(l=Ow(s),f=fr[i],c=f[l]||f.l||8,c===8||(i=c[0],c[1]!==void 0&&(u=h[c[1]],u&&(a=s,u()===!1))))return;if(i===7)return e}}const qh=new Map;function Bw(t,e){return rt(t)?t[e]:null}function Hw(t,e){if(!rt(t))return null;let n=qh.get(e);if(n||(n=kw(e),n&&qh.set(e,n)),!n)return null;const i=n.length;let r=t,s=0;for(;s<i;){const o=r[n[s]];if(o===void 0)return null;r=o,s++}return r}const zw=t=>t,Vw=t=>"",Gw="text",Ww=t=>t.length===0?"":Qf(t),$w=cw;function Yh(t,e){return t=Math.abs(t),e===2?t?t>1?1:0:1:t?Math.min(t,2):0}function Xw(t){const e=Gt(t.pluralIndex)?t.pluralIndex:-1;return t.named&&(Gt(t.named.count)||Gt(t.named.n))?Gt(t.named.count)?t.named.count:Gt(t.named.n)?t.named.n:e:e}function jw(t,e){e.count||(e.count=t),e.n||(e.n=t)}function qw(t={}){const e=t.locale,n=Xw(t),i=rt(t.pluralRules)&&Ae(e)&&It(t.pluralRules[e])?t.pluralRules[e]:Yh,r=rt(t.pluralRules)&&Ae(e)&&It(t.pluralRules[e])?Yh:void 0,s=d=>d[i(n,d.length,r)],o=t.list||[],a=d=>o[d],l=t.named||{};Gt(t.pluralIndex)&&jw(n,l);const c=d=>l[d];function u(d){const v=It(t.messages)?t.messages(d):rt(t.messages)?t.messages[d]:!1;return v||(t.parent?t.parent.message(d):Vw)}const f=d=>t.modifiers?t.modifiers[d]:zw,h=tt(t.processor)&&It(t.processor.normalize)?t.processor.normalize:Ww,p=tt(t.processor)&&It(t.processor.interpolate)?t.processor.interpolate:$w,g=tt(t.processor)&&Ae(t.processor.type)?t.processor.type:Gw,m={list:a,named:c,plural:s,linked:(d,...v)=>{const[y,x]=v;let S="text",C="";v.length===1?rt(y)?(C=y.modifier||C,S=y.type||S):Ae(y)&&(C=y||C):v.length===2&&(Ae(y)&&(C=y||C),Ae(x)&&(S=x||S));const R=u(d)(m),I=S==="vnode"&&At(R)&&C?R[0]:R;return C?f(C)(I,S):I},message:u,type:g,interpolate:p,normalize:h};return m}let Ho=null;function Yw(t){Ho=t}function Kw(t,e,n){Ho&&Ho.emit(bv.I18nInit,{timestamp:Date.now(),i18n:t,version:e,meta:n})}const Zw=Jw(bv.FunctionTranslate);function Jw(t){return e=>Ho&&Ho.emit(t,e)}function Qw(t,e,n){return[...new Set([n,...At(e)?e:rt(e)?Object.keys(e):Ae(e)?[e]:[n]])]}function Mv(t,e,n){const i=Ae(n)?n:td,r=t;r.__localeChainCache||(r.__localeChainCache=new Map);let s=r.__localeChainCache.get(i);if(!s){s=[];let o=[n];for(;At(o);)o=Kh(s,o,e);const a=At(e)||!tt(e)?e:e.default?e.default:null;o=Ae(a)?[a]:a,At(o)&&Kh(s,o,!1),r.__localeChainCache.set(i,s)}return s}function Kh(t,e,n){let i=!0;for(let r=0;r<e.length&&wt(i);r++){const s=e[r];Ae(s)&&(i=eA(t,e[r],n))}return i}function eA(t,e,n){let i;const r=e.split("-");do{const s=r.join("-");i=tA(t,s,n),r.splice(-1,1)}while(r.length&&i===!0);return i}function tA(t,e,n){let i=!1;if(!t.includes(e)&&(i=!0,e)){i=e[e.length-1]!=="!";const r=e.replace(/!/g,"");t.push(r),(At(n)||tt(n))&&n[r]&&(i=n[r])}return i}const nA="9.3.0-beta.24",jl=-1,td="en-US",Zh="",Jh=t=>`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`;function iA(){return{upper:(t,e)=>e==="text"&&Ae(t)?t.toUpperCase():e==="vnode"&&rt(t)&&"__v_isVNode"in t?t.children.toUpperCase():t,lower:(t,e)=>e==="text"&&Ae(t)?t.toLowerCase():e==="vnode"&&rt(t)&&"__v_isVNode"in t?t.children.toLowerCase():t,capitalize:(t,e)=>e==="text"&&Ae(t)?Jh(t):e==="vnode"&&rt(t)&&"__v_isVNode"in t?Jh(t.children):t}}let Tv;function rA(t){Tv=t}let wv;function sA(t){wv=t}let Av;function oA(t){Av=t}let Rv=null;const Qh=t=>{Rv=t},aA=()=>Rv;let Cv=null;const ep=t=>{Cv=t},lA=()=>Cv;let tp=0;function cA(t={}){const e=Ae(t.version)?t.version:nA,n=Ae(t.locale)?t.locale:td,i=At(t.fallbackLocale)||tt(t.fallbackLocale)||Ae(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:n,r=tt(t.messages)?t.messages:{[n]:{}},s=tt(t.datetimeFormats)?t.datetimeFormats:{[n]:{}},o=tt(t.numberFormats)?t.numberFormats:{[n]:{}},a=Yt({},t.modifiers||{},iA()),l=t.pluralRules||{},c=It(t.missing)?t.missing:null,u=wt(t.missingWarn)||vl(t.missingWarn)?t.missingWarn:!0,f=wt(t.fallbackWarn)||vl(t.fallbackWarn)?t.fallbackWarn:!0,h=!!t.fallbackFormat,p=!!t.unresolving,g=It(t.postTranslation)?t.postTranslation:null,_=tt(t.processor)?t.processor:null,m=wt(t.warnHtmlMessage)?t.warnHtmlMessage:!0,d=!!t.escapeParameter,v=It(t.messageCompiler)?t.messageCompiler:Tv,y=It(t.messageResolver)?t.messageResolver:wv||Bw,x=It(t.localeFallbacker)?t.localeFallbacker:Av||Qw,S=rt(t.fallbackContext)?t.fallbackContext:void 0,C=It(t.onWarn)?t.onWarn:aw,R=t,I=rt(R.__datetimeFormatters)?R.__datetimeFormatters:new Map,b=rt(R.__numberFormatters)?R.__numberFormatters:new Map,L=rt(R.__meta)?R.__meta:{};tp++;const B={version:e,cid:tp,locale:n,fallbackLocale:i,messages:r,modifiers:a,pluralRules:l,missing:c,missingWarn:u,fallbackWarn:f,fallbackFormat:h,unresolving:p,postTranslation:g,processor:_,warnHtmlMessage:m,escapeParameter:d,messageCompiler:v,messageResolver:y,localeFallbacker:x,fallbackContext:S,onWarn:C,__meta:L};return B.datetimeFormats=s,B.numberFormats=o,B.__datetimeFormatters=I,B.__numberFormatters=b,__INTLIFY_PROD_DEVTOOLS__&&Kw(B,e,L),B}function nd(t,e,n,i,r){const{missing:s,onWarn:o}=t;if(s!==null){const a=s(t,n,e,r);return Ae(a)?a:e}else return e}function so(t,e,n){const i=t;i.__localeChainCache=new Map,t.localeFallbacker(t,n,e)}function Ic(t){return n=>uA(n,t)}function uA(t,e){return e.body.type===1?t.plural(e.body.cases.reduce((n,i)=>[...n,np(t,i)],[])):np(t,e.body)}function np(t,e){if(e.static)return t.type==="text"?e.static:t.normalize([e.static]);{const n=e.items.reduce((i,r)=>[...i,$u(t,r)],[]);return t.normalize(n)}}function $u(t,e){switch(e.type){case 3:return e.value;case 9:return e.value;case 4:return t.interpolate(t.named(e.key));case 5:return t.interpolate(t.list(e.index));case 6:return t.linked($u(t,e.key),e.modifier?$u(t,e.modifier):void 0,t.type);case 7:return e.value;case 8:return e.value;default:throw new Error(`unhandled node type on format message part: ${e.type}`)}}let Lv=st.__EXTEND_POINT__;const Ta=()=>++Lv,gs={INVALID_ARGUMENT:Lv,INVALID_DATE_ARGUMENT:Ta(),INVALID_ISO_DATE_ARGUMENT:Ta(),NOT_SUPPORT_AST:Ta(),__EXTEND_POINT__:Ta()};function _s(t){return Xl(t,null,void 0)}const fA=t=>t;let wa=Object.create(null);function dA(t,e={}){let n=!1;const i=e.onError||fw;return e.onError=r=>{n=!0,i(r)},{...Pw(t,e),detectError:n}}function hA(t,e={}){if(Ae(t)){wt(e.warnHtmlMessage)&&e.warnHtmlMessage;const i=(e.onCacheKey||fA)(t),r=wa[i];if(r)return r;const{ast:s,detectError:o}=dA(t,{...e,location:!1,jit:!0}),a=Ic(s);return o?a:wa[i]=a}else{const n=t.cacheKey;if(n){const i=wa[n];return i||(wa[n]=Ic(t))}else return Ic(t)}}const ip=()=>"",Wn=t=>It(t),zo=t=>rt(t)&&t.type===0&&"body"in t;function rp(t,...e){const{fallbackFormat:n,postTranslation:i,unresolving:r,messageCompiler:s,fallbackLocale:o,messages:a}=t,[l,c]=Xu(...e),u=wt(c.missingWarn)?c.missingWarn:t.missingWarn,f=wt(c.fallbackWarn)?c.fallbackWarn:t.fallbackWarn,h=wt(c.escapeParameter)?c.escapeParameter:t.escapeParameter,p=!!c.resolvedMessage,g=Ae(c.default)||wt(c.default)?wt(c.default)?s?l:()=>l:c.default:n?s?l:()=>l:"",_=n||g!=="",m=Ae(c.locale)?c.locale:t.locale;h&&pA(c);let[d,v,y]=p?[l,m,a[m]||{}]:Pv(t,l,m,o,f,u),x=d,S=l;if(!p&&!(Ae(x)||zo(x)||Wn(x))&&_&&(x=g,S=x),!p&&(!(Ae(x)||zo(x)||Wn(x))||!Ae(v)))return r?jl:l;let C=!1;const R=()=>{C=!0},I=Wn(x)?x:Iv(t,l,v,x,S,R);if(C)return x;const b=_A(t,v,y,c),L=qw(b),B=mA(t,I,L),U=i?i(B,l):B;if(__INTLIFY_PROD_DEVTOOLS__){const k={timestamp:Date.now(),key:Ae(l)?l:Wn(x)?x.key:"",locale:v||(Wn(x)?x.locale:""),format:Ae(x)?x:Wn(x)?x.source:"",message:U};k.meta=Yt({},t.__meta,aA()||{}),Zw(k)}return U}function pA(t){At(t.list)?t.list=t.list.map(e=>Ae(e)?Wh(e):e):rt(t.named)&&Object.keys(t.named).forEach(e=>{Ae(t.named[e])&&(t.named[e]=Wh(t.named[e]))})}function Pv(t,e,n,i,r,s){const{messages:o,onWarn:a,messageResolver:l,localeFallbacker:c}=t,u=c(t,i,n);let f={},h,p=null;const g="translate";for(let _=0;_<u.length&&(h=u[_],f=o[h]||{},(p=l(f,e))===null&&(p=f[e]),!(Ae(p)||zo(p)||Wn(p)));_++){const m=nd(t,e,h,s,g);m!==e&&(p=m)}return[p,h,f]}function Iv(t,e,n,i,r,s){const{messageCompiler:o,warnHtmlMessage:a}=t;if(Wn(i)){const c=i;return c.locale=c.locale||n,c.key=c.key||e,c}if(o==null){const c=()=>i;return c.locale=n,c.key=e,c}const l=o(i,gA(t,n,r,i,a,s));return l.locale=n,l.key=e,l.source=i,l}function mA(t,e,n){return e(n)}function Xu(...t){const[e,n,i]=t,r={};if(!Ae(e)&&!Gt(e)&&!Wn(e)&&!zo(e))throw _s(gs.INVALID_ARGUMENT);const s=Gt(e)?String(e):(Wn(e),e);return Gt(n)?r.plural=n:Ae(n)?r.default=n:tt(n)&&!$l(n)?r.named=n:At(n)&&(r.list=n),Gt(i)?r.plural=i:Ae(i)?r.default=i:tt(i)&&Yt(r,i),[s,r]}function gA(t,e,n,i,r,s){return{warnHtmlMessage:r,onError:o=>{throw s&&s(o),o},onCacheKey:o=>rw(e,n,o)}}function _A(t,e,n,i){const{modifiers:r,pluralRules:s,messageResolver:o,fallbackLocale:a,fallbackWarn:l,missingWarn:c,fallbackContext:u}=t,h={locale:e,modifiers:r,pluralRules:s,messages:p=>{let g=o(n,p);if(g==null&&u){const[,,_]=Pv(u,p,e,a,l,c);g=o(_,p)}if(Ae(g)||zo(g)){let _=!1;const d=Iv(t,p,e,g,p,()=>{_=!0});return _?ip:d}else return Wn(g)?g:ip}};return t.processor&&(h.processor=t.processor),i.list&&(h.list=i.list),i.named&&(h.named=i.named),Gt(i.plural)&&(h.pluralIndex=i.plural),h}function sp(t,...e){const{datetimeFormats:n,unresolving:i,fallbackLocale:r,onWarn:s,localeFallbacker:o}=t,{__datetimeFormatters:a}=t,[l,c,u,f]=ju(...e),h=wt(u.missingWarn)?u.missingWarn:t.missingWarn;wt(u.fallbackWarn)?u.fallbackWarn:t.fallbackWarn;const p=!!u.part,g=Ae(u.locale)?u.locale:t.locale,_=o(t,r,g);if(!Ae(l)||l==="")return new Intl.DateTimeFormat(g,f).format(c);let m={},d,v=null;const y="datetime format";for(let C=0;C<_.length&&(d=_[C],m=n[d]||{},v=m[l],!tt(v));C++)nd(t,l,d,h,y);if(!tt(v)||!Ae(d))return i?jl:l;let x=`${d}__${l}`;$l(f)||(x=`${x}__${JSON.stringify(f)}`);let S=a.get(x);return S||(S=new Intl.DateTimeFormat(d,Yt({},v,f)),a.set(x,S)),p?S.formatToParts(c):S.format(c)}const Dv=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function ju(...t){const[e,n,i,r]=t,s={};let o={},a;if(Ae(e)){const l=e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!l)throw _s(gs.INVALID_ISO_DATE_ARGUMENT);const c=l[3]?l[3].trim().startsWith("T")?`${l[1].trim()}${l[3].trim()}`:`${l[1].trim()}T${l[3].trim()}`:l[1].trim();a=new Date(c);try{a.toISOString()}catch{throw _s(gs.INVALID_ISO_DATE_ARGUMENT)}}else if(ow(e)){if(isNaN(e.getTime()))throw _s(gs.INVALID_DATE_ARGUMENT);a=e}else if(Gt(e))a=e;else throw _s(gs.INVALID_ARGUMENT);return Ae(n)?s.key=n:tt(n)&&Object.keys(n).forEach(l=>{Dv.includes(l)?o[l]=n[l]:s[l]=n[l]}),Ae(i)?s.locale=i:tt(i)&&(o=i),tt(r)&&(o=r),[s.key||"",a,s,o]}function op(t,e,n){const i=t;for(const r in n){const s=`${e}__${r}`;i.__datetimeFormatters.has(s)&&i.__datetimeFormatters.delete(s)}}function ap(t,...e){const{numberFormats:n,unresolving:i,fallbackLocale:r,onWarn:s,localeFallbacker:o}=t,{__numberFormatters:a}=t,[l,c,u,f]=qu(...e),h=wt(u.missingWarn)?u.missingWarn:t.missingWarn;wt(u.fallbackWarn)?u.fallbackWarn:t.fallbackWarn;const p=!!u.part,g=Ae(u.locale)?u.locale:t.locale,_=o(t,r,g);if(!Ae(l)||l==="")return new Intl.NumberFormat(g,f).format(c);let m={},d,v=null;const y="number format";for(let C=0;C<_.length&&(d=_[C],m=n[d]||{},v=m[l],!tt(v));C++)nd(t,l,d,h,y);if(!tt(v)||!Ae(d))return i?jl:l;let x=`${d}__${l}`;$l(f)||(x=`${x}__${JSON.stringify(f)}`);let S=a.get(x);return S||(S=new Intl.NumberFormat(d,Yt({},v,f)),a.set(x,S)),p?S.formatToParts(c):S.format(c)}const Nv=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function qu(...t){const[e,n,i,r]=t,s={};let o={};if(!Gt(e))throw _s(gs.INVALID_ARGUMENT);const a=e;return Ae(n)?s.key=n:tt(n)&&Object.keys(n).forEach(l=>{Nv.includes(l)?o[l]=n[l]:s[l]=n[l]}),Ae(i)?s.locale=i:tt(i)&&(o=i),tt(r)&&(o=r),[s.key||"",a,s,o]}function lp(t,e,n){const i=t;for(const r in n){const s=`${e}__${r}`;i.__numberFormatters.has(s)&&i.__numberFormatters.delete(s)}}Iw();/*!
  * vue-i18n v9.3.0-beta.24
  * (c) 2023 kazuya kawaguchi
  * Released under the MIT License.
  */const vA="9.3.0-beta.24";function yA(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Zf().__INTLIFY_PROD_DEVTOOLS__=!1)}let Uv=st.__EXTEND_POINT__;const hn=()=>++Uv,An={UNEXPECTED_RETURN_TYPE:Uv,INVALID_ARGUMENT:hn(),MUST_BE_CALL_SETUP_TOP:hn(),NOT_INSTALLED:hn(),NOT_AVAILABLE_IN_LEGACY_MODE:hn(),REQUIRED_VALUE:hn(),INVALID_VALUE:hn(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:hn(),NOT_INSTALLED_WITH_PROVIDE:hn(),UNEXPECTED_ERROR:hn(),NOT_COMPATIBLE_LEGACY_VUE_I18N:hn(),BRIDGE_SUPPORT_VUE_2_ONLY:hn(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:hn(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:hn(),__EXTEND_POINT__:hn()};function kn(t,...e){return Xl(t,null,void 0)}const Yu=Wr("__translateVNode"),Ku=Wr("__datetimeParts"),Zu=Wr("__numberParts"),xA=Wr("__setPluralRules"),SA=Wr("__injectWithOption");function Ju(t){if(!rt(t))return t;for(const e in t)if(Jf(t,e))if(!e.includes("."))rt(t[e])&&Ju(t[e]);else{const n=e.split("."),i=n.length-1;let r=t,s=!1;for(let o=0;o<i;o++){if(n[o]in r||(r[n[o]]={}),!rt(r[n[o]])){s=!0;break}r=r[n[o]]}s||(r[n[i]]=t[e],delete t[e]),rt(r[n[i]])&&Ju(r[n[i]])}return t}function Ov(t,e){const{messages:n,__i18n:i,messageResolver:r,flatJson:s}=e,o=tt(n)?n:At(i)?{}:{[t]:{}};if(At(i)&&i.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:l,resource:c}=a;l?(o[l]=o[l]||{},Co(c,o[l])):Co(c,o)}else Ae(a)&&Co(JSON.parse(a),o)}),r==null&&s)for(const a in o)Jf(o,a)&&Ju(o[a]);return o}const Aa=t=>!rt(t)||At(t);function Co(t,e){if(Aa(t)||Aa(e))throw kn(An.INVALID_VALUE);for(const n in t)Jf(t,n)&&(Aa(t[n])||Aa(e[n])?e[n]=t[n]:Co(t[n],e[n]))}function Fv(t){return t.type}function EA(t,e,n){let i=rt(e.messages)?e.messages:{};"__i18nGlobal"in n&&(i=Ov(t.locale.value,{messages:i,__i18n:n.__i18nGlobal}));const r=Object.keys(i);r.length&&r.forEach(s=>{t.mergeLocaleMessage(s,i[s])});{if(rt(e.datetimeFormats)){const s=Object.keys(e.datetimeFormats);s.length&&s.forEach(o=>{t.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(rt(e.numberFormats)){const s=Object.keys(e.numberFormats);s.length&&s.forEach(o=>{t.mergeNumberFormat(o,e.numberFormats[o])})}}}function cp(t){return De(Br,null,t,0)}const up="__INTLIFY_META__";let fp=0;function dp(t){return(e,n,i,r)=>t(n,i,Bn()||void 0,r)}const bA=()=>{const t=Bn();let e=null;return t&&(e=Fv(t)[up])?{[up]:e}:null};function kv(t={},e){const{__root:n}=t,i=n===void 0;let r=wt(t.inheritLocale)?t.inheritLocale:!0;const s=Ge(n&&r?n.locale.value:Ae(t.locale)?t.locale:td),o=Ge(n&&r?n.fallbackLocale.value:Ae(t.fallbackLocale)||At(t.fallbackLocale)||tt(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:s.value),a=Ge(Ov(s.value,t)),l=Ge(tt(t.datetimeFormats)?t.datetimeFormats:{[s.value]:{}}),c=Ge(tt(t.numberFormats)?t.numberFormats:{[s.value]:{}});let u=n?n.missingWarn:wt(t.missingWarn)||vl(t.missingWarn)?t.missingWarn:!0,f=n?n.fallbackWarn:wt(t.fallbackWarn)||vl(t.fallbackWarn)?t.fallbackWarn:!0,h=n?n.fallbackRoot:wt(t.fallbackRoot)?t.fallbackRoot:!0,p=!!t.fallbackFormat,g=It(t.missing)?t.missing:null,_=It(t.missing)?dp(t.missing):null,m=It(t.postTranslation)?t.postTranslation:null,d=n?n.warnHtmlMessage:wt(t.warnHtmlMessage)?t.warnHtmlMessage:!0,v=!!t.escapeParameter;const y=n?n.modifiers:tt(t.modifiers)?t.modifiers:{};let x=t.pluralRules||n&&n.pluralRules,S;S=(()=>{i&&ep(null);const z={version:vA,locale:s.value,fallbackLocale:o.value,messages:a.value,modifiers:y,pluralRules:x,missing:_===null?void 0:_,missingWarn:u,fallbackWarn:f,fallbackFormat:p,unresolving:!0,postTranslation:m===null?void 0:m,warnHtmlMessage:d,escapeParameter:v,messageResolver:t.messageResolver,__meta:{framework:"vue"}};z.datetimeFormats=l.value,z.numberFormats=c.value,z.__datetimeFormatters=tt(S)?S.__datetimeFormatters:void 0,z.__numberFormatters=tt(S)?S.__numberFormatters:void 0;const M=cA(z);return i&&ep(M),M})(),so(S,s.value,o.value);function R(){return[s.value,o.value,a.value,l.value,c.value]}const I=He({get:()=>s.value,set:z=>{s.value=z,S.locale=s.value}}),b=He({get:()=>o.value,set:z=>{o.value=z,S.fallbackLocale=o.value,so(S,s.value,z)}}),L=He(()=>a.value),B=He(()=>l.value),U=He(()=>c.value);function k(){return It(m)?m:null}function D(z){m=z,S.postTranslation=z}function G(){return g}function $(z){z!==null&&(_=dp(z)),g=z,S.missing=_}const j=(z,M,A,F,ie,re)=>{R();let ae;if(__INTLIFY_PROD_DEVTOOLS__)try{Qh(bA()),i||(S.fallbackContext=n?lA():void 0),ae=z(S)}finally{Qh(null),i||(S.fallbackContext=void 0)}else ae=z(S);if(Gt(ae)&&ae===jl){const[Se,ge]=M();return n&&h?F(n):ie(Se)}else{if(re(ae))return ae;throw kn(An.UNEXPECTED_RETURN_TYPE)}};function oe(...z){return j(M=>Reflect.apply(rp,null,[M,...z]),()=>Xu(...z),"translate",M=>Reflect.apply(M.t,M,[...z]),M=>M,M=>Ae(M))}function se(...z){const[M,A,F]=z;if(F&&!rt(F))throw kn(An.INVALID_ARGUMENT);return oe(M,A,Yt({resolvedMessage:!0},F||{}))}function he(...z){return j(M=>Reflect.apply(sp,null,[M,...z]),()=>ju(...z),"datetime format",M=>Reflect.apply(M.d,M,[...z]),()=>Zh,M=>Ae(M))}function me(...z){return j(M=>Reflect.apply(ap,null,[M,...z]),()=>qu(...z),"number format",M=>Reflect.apply(M.n,M,[...z]),()=>Zh,M=>Ae(M))}function ye(z){return z.map(M=>Ae(M)||Gt(M)||wt(M)?cp(String(M)):M)}const fe={normalize:ye,interpolate:z=>z,type:"vnode"};function be(...z){return j(M=>{let A;const F=M;try{F.processor=fe,A=Reflect.apply(rp,null,[F,...z])}finally{F.processor=null}return A},()=>Xu(...z),"translate",M=>M[Yu](...z),M=>[cp(M)],M=>At(M))}function Te(...z){return j(M=>Reflect.apply(ap,null,[M,...z]),()=>qu(...z),"number format",M=>M[Zu](...z),()=>[],M=>Ae(M)||At(M))}function V(...z){return j(M=>Reflect.apply(sp,null,[M,...z]),()=>ju(...z),"datetime format",M=>M[Ku](...z),()=>[],M=>Ae(M)||At(M))}function ue(z){x=z,S.pluralRules=x}function ne(z,M){const A=Ae(M)?M:s.value,F=T(A);return S.messageResolver(F,z)!==null}function de(z){let M=null;const A=Mv(S,o.value,s.value);for(let F=0;F<A.length;F++){const ie=a.value[A[F]]||{},re=S.messageResolver(ie,z);if(re!=null){M=re;break}}return M}function Me(z){const M=de(z);return M??(n?n.tm(z)||{}:{})}function T(z){return a.value[z]||{}}function E(z,M){a.value[z]=M,S.messages=a.value}function w(z,M){a.value[z]=a.value[z]||{},Co(M,a.value[z]),S.messages=a.value}function N(z){return l.value[z]||{}}function O(z,M){l.value[z]=M,S.datetimeFormats=l.value,op(S,z,M)}function W(z,M){l.value[z]=Yt(l.value[z]||{},M),S.datetimeFormats=l.value,op(S,z,M)}function q(z){return c.value[z]||{}}function Z(z,M){c.value[z]=M,S.numberFormats=c.value,lp(S,z,M)}function ce(z,M){c.value[z]=Yt(c.value[z]||{},M),S.numberFormats=c.value,lp(S,z,M)}fp++,n&&Gu&&(Ot(n.locale,z=>{r&&(s.value=z,S.locale=z,so(S,s.value,o.value))}),Ot(n.fallbackLocale,z=>{r&&(o.value=z,S.fallbackLocale=z,so(S,s.value,o.value))}));const ee={id:fp,locale:I,fallbackLocale:b,get inheritLocale(){return r},set inheritLocale(z){r=z,z&&n&&(s.value=n.locale.value,o.value=n.fallbackLocale.value,so(S,s.value,o.value))},get availableLocales(){return Object.keys(a.value).sort()},messages:L,get modifiers(){return y},get pluralRules(){return x||{}},get isGlobal(){return i},get missingWarn(){return u},set missingWarn(z){u=z,S.missingWarn=u},get fallbackWarn(){return f},set fallbackWarn(z){f=z,S.fallbackWarn=f},get fallbackRoot(){return h},set fallbackRoot(z){h=z},get fallbackFormat(){return p},set fallbackFormat(z){p=z,S.fallbackFormat=p},get warnHtmlMessage(){return d},set warnHtmlMessage(z){d=z,S.warnHtmlMessage=z},get escapeParameter(){return v},set escapeParameter(z){v=z,S.escapeParameter=z},t:oe,getLocaleMessage:T,setLocaleMessage:E,mergeLocaleMessage:w,getPostTranslationHandler:k,setPostTranslationHandler:D,getMissingHandler:G,setMissingHandler:$,[xA]:ue};return ee.datetimeFormats=B,ee.numberFormats=U,ee.rt=se,ee.te=ne,ee.tm=Me,ee.d=he,ee.n=me,ee.getDateTimeFormat=N,ee.setDateTimeFormat=O,ee.mergeDateTimeFormat=W,ee.getNumberFormat=q,ee.setNumberFormat=Z,ee.mergeNumberFormat=ce,ee[SA]=t.__injectWithOption,ee[Yu]=be,ee[Ku]=V,ee[Zu]=Te,ee}const id={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function MA({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((i,r)=>[...i,...r.type===Lt?r.children:[r]],[]):e.reduce((n,i)=>{const r=t[i];return r&&(n[i]=r()),n},{})}function Bv(t){return Lt}const TA=$t({name:"i18n-t",props:Yt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>Gt(t)||!isNaN(t)}},id),setup(t,e){const{slots:n,attrs:i}=e,r=t.i18n||dr({useScope:t.scope,__useComponent:!0});return()=>{const s=Object.keys(n).filter(f=>f!=="_"),o={};t.locale&&(o.locale=t.locale),t.plural!==void 0&&(o.plural=Ae(t.plural)?+t.plural:t.plural);const a=MA(e,s),l=r[Yu](t.keypath,a,o),c=Yt({},i),u=Ae(t.tag)||rt(t.tag)?t.tag:Bv();return Et(u,c,l)}}}),hp=TA;function wA(t){return At(t)&&!Ae(t[0])}function Hv(t,e,n,i){const{slots:r,attrs:s}=e;return()=>{const o={part:!0};let a={};t.locale&&(o.locale=t.locale),Ae(t.format)?o.key=t.format:rt(t.format)&&(Ae(t.format.key)&&(o.key=t.format.key),a=Object.keys(t.format).reduce((h,p)=>n.includes(p)?Yt({},h,{[p]:t.format[p]}):h,{}));const l=i(t.value,o,a);let c=[o.key];At(l)?c=l.map((h,p)=>{const g=r[h.type],_=g?g({[h.type]:h.value,index:p,parts:l}):[h.value];return wA(_)&&(_[0].key=`${h.type}-${p}`),_}):Ae(l)&&(c=[l]);const u=Yt({},s),f=Ae(t.tag)||rt(t.tag)?t.tag:Bv();return Et(f,u,c)}}const AA=$t({name:"i18n-n",props:Yt({value:{type:Number,required:!0},format:{type:[String,Object]}},id),setup(t,e){const n=t.i18n||dr({useScope:"parent",__useComponent:!0});return Hv(t,e,Nv,(...i)=>n[Zu](...i))}}),pp=AA,RA=$t({name:"i18n-d",props:Yt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},id),setup(t,e){const n=t.i18n||dr({useScope:"parent",__useComponent:!0});return Hv(t,e,Dv,(...i)=>n[Ku](...i))}}),mp=RA;function CA(t,e){const n=t;if(t.mode==="composition")return n.__getInstance(e)||t.global;{const i=n.__getInstance(e);return i!=null?i.__composer:t.global.__composer}}function LA(t){const e=o=>{const{instance:a,modifiers:l,value:c}=o;if(!a||!a.$)throw kn(An.UNEXPECTED_ERROR);const u=CA(t,a.$),f=gp(c);return[Reflect.apply(u.t,u,[..._p(f)]),u]};return{created:(o,a)=>{const[l,c]=e(a);Gu&&t.global===c&&(o.__i18nWatcher=Ot(c.locale,()=>{a.instance&&a.instance.$forceUpdate()})),o.__composer=c,o.textContent=l},unmounted:o=>{Gu&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:a})=>{if(o.__composer){const l=o.__composer,c=gp(a);o.textContent=Reflect.apply(l.t,l,[..._p(c)])}},getSSRProps:o=>{const[a]=e(o);return{textContent:a}}}}function gp(t){if(Ae(t))return{path:t};if(tt(t)){if(!("path"in t))throw kn(An.REQUIRED_VALUE,"path");return t}else throw kn(An.INVALID_VALUE)}function _p(t){const{path:e,locale:n,args:i,choice:r,plural:s}=t,o={},a=i||{};return Ae(n)&&(o.locale=n),Gt(r)&&(o.plural=r),Gt(s)&&(o.plural=s),[e,a,o]}function PA(t,e,...n){const i=tt(n[0])?n[0]:{},r=!!i.useI18nComponentName;(wt(i.globalInstall)?i.globalInstall:!0)&&([r?"i18n":hp.name,"I18nT"].forEach(o=>t.component(o,hp)),[pp.name,"I18nN"].forEach(o=>t.component(o,pp)),[mp.name,"I18nD"].forEach(o=>t.component(o,mp))),t.directive("t",LA(e))}const IA=Wr("global-vue-i18n");function DA(t={},e){const n=wt(t.globalInjection)?t.globalInjection:!0,i=!0,r=new Map,[s,o]=NA(t),a=Wr("");function l(f){return r.get(f)||null}function c(f,h){r.set(f,h)}function u(f){r.delete(f)}{const f={get mode(){return"composition"},get allowComposition(){return i},async install(h,...p){if(h.__VUE_I18N_SYMBOL__=a,h.provide(h.__VUE_I18N_SYMBOL__,f),tt(p[0])){const _=p[0];f.__composerExtend=_.__composerExtend,f.__vueI18nExtend=_.__vueI18nExtend}n&&GA(h,f.global),PA(h,f,...p);const g=h.unmount;h.unmount=()=>{f.dispose(),g()}},get global(){return o},dispose(){s.stop()},__instances:r,__getInstance:l,__setInstance:c,__deleteInstance:u};return f}}function dr(t={}){const e=Bn();if(e==null)throw kn(An.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw kn(An.NOT_INSTALLED);const n=UA(e),i=FA(n),r=Fv(e),s=OA(t,r);if(s==="global")return EA(i,t,r),i;if(s==="parent"){let l=kA(n,e,t.__useComponent);return l==null&&(l=i),l}const o=n;let a=o.__getInstance(e);if(a==null){const l=Yt({},t);"__i18n"in r&&(l.__i18n=r.__i18n),i&&(l.__root=i),a=kv(l),o.__composerExtend&&o.__composerExtend(a),HA(o,e),o.__setInstance(e,a)}return a}function NA(t,e,n){const i=Cl();{const r=i.run(()=>kv(t));if(r==null)throw kn(An.UNEXPECTED_ERROR);return[i,r]}}function UA(t){{const e=Ft(t.isCE?IA:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw kn(t.isCE?An.NOT_INSTALLED_WITH_PROVIDE:An.UNEXPECTED_ERROR);return e}}function OA(t,e){return $l(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function FA(t){return t.mode==="composition"?t.global:t.global.__composer}function kA(t,e,n=!1){let i=null;const r=e.root;let s=BA(e,n);for(;s!=null;){const o=t;if(t.mode==="composition"&&(i=o.__getInstance(s)),i!=null||r===s)break;s=s.parent}return i}function BA(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function HA(t,e,n){ei(()=>{},e),Ii(()=>{t.__deleteInstance(e)},e)}const zA=["locale","fallbackLocale","availableLocales"],VA=["t","rt","d","n","tm","te"];function GA(t,e){const n=Object.create(null);zA.forEach(i=>{const r=Object.getOwnPropertyDescriptor(e,i);if(!r)throw kn(An.UNEXPECTED_ERROR);const s=ut(r.value)?{get(){return r.value.value},set(o){r.value.value=o}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,i,s)}),t.config.globalProperties.$i18n=n,VA.forEach(i=>{const r=Object.getOwnPropertyDescriptor(e,i);if(!r||!r.value)throw kn(An.UNEXPECTED_ERROR);Object.defineProperty(t.config.globalProperties,`$${i}`,r)})}yA();rA(hA);sA(Hw);oA(Mv);if(__INTLIFY_PROD_DEVTOOLS__){const t=Zf();t.__INTLIFY__=!0,Yw(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const zv={PREFIX:"prefix",PREFIX_EXCEPT_DEFAULT:"prefix_except_default",PREFIX_AND_DEFAULT:"prefix_and_default",NO_PREFIX:"no_prefix"},WA="",$A=zv.PREFIX_EXCEPT_DEFAULT,XA=!1,jA="___",qA="default",YA="ltr",KA="",Vv="";/*!
  * shared v9.3.0-beta.16
  * (c) 2023 kazuya kawaguchi
  * Released under the MIT License.
  */const ZA=(t,e=!1)=>e?Symbol.for(t):Symbol(t),ql=Object.assign,Gv=Array.isArray,Qu=t=>typeof t=="function",Us=t=>typeof t=="string",JA=t=>typeof t=="symbol",rd=t=>t!==null&&typeof t=="object",QA=/\/$|\/\?/;function ef(t="",e=!1){return e?QA.test(t):t.endsWith("/")}function eR(t="",e=!1){if(!e)return(ef(t)?t.slice(0,-1):t)||"/";if(!ef(t,!0))return t||"/";const[n,...i]=t.split("?");return(n.slice(0,-1)||"/")+(i.length>0?`?${i.join("?")}`:"")}function tR(t="",e=!1){if(!e)return t.endsWith("/")?t:t+"/";if(ef(t,!0))return t||"/";const[n,...i]=t.split("?");return n+"/"+(i.length>0?`?${i.join("?")}`:"")}const nR=typeof window<"u";function Wv(t,e){typeof console<"u"&&(console.warn("[vue-i18n-routing] "+t),e&&console.warn(e.stack))}function iR(t){t=t||[];const e=[];for(const n of t)Us(n)?e.push({code:n}):e.push(n);return e}function $r(t){return t!=null&&"global"in t&&"mode"in t}function Ys(t){return t!=null&&!("__composer"in t)&&ut(t.locale)}function lr(t){return t!=null&&"__composer"in t}function ta(t){return t!=null&&!("__composer"in t)&&!ut(t.locale)}function Yl(t){return t!=null&&("__VUE_I18N_BRIDGE__"in t||"_sync"in t)}function Hr(t){return $r(t)?Ys(t.global)?t.global:t.global.__composer:lr(t)?t.__composer:t}function Kl(t){const e=$r(t)?t.global:t;return Ys(e)?e.locale.value:(ta(e)||lr(e)||Yl(e),e.locale)}function rR(t){const e=$r(t)?t.global:t;return Ys(e)?e.locales.value:(ta(e)||lr(e)||Yl(e),e.locales)}function sR(t){const e=$r(t)?t.global:t;return Ys(e)?e.localeCodes.value:(ta(e)||lr(e)||Yl(e),e.localeCodes)}function $v(t,e){const n=$r(t)?t.global:t;if(Ys(n))n.locale.value=e;else if(ta(n)||lr(n)||Yl(n))n.locale=e;else throw new Error("TODO:")}function Xv(t){return Us(t)?t:JA(t)?t.toString():"(null)"}function vp(t,e,{defaultLocale:n,strategy:i,routesNameSeparator:r,defaultLocaleRouteNameSuffix:s}){let o=Xv(t)+(i==="no_prefix"?"":r+e);return e===n&&i==="prefix_and_default"&&(o+=r+s),o}function yp(t,e){return Qu(t)?t(e):t}function oR(t,e){const n=[];for(const[i,r]of e.entries()){const s=t.find(o=>o.iso.toLowerCase()===r.toLowerCase());if(s){n.push({code:s.code,score:1-i/e.length});break}}for(const[i,r]of e.entries()){const s=r.split("-")[0].toLowerCase(),o=t.find(a=>a.iso.split("-")[0].toLowerCase()===s);if(o){n.push({code:o.code,score:.999-i/e.length});break}}return n}const aR=oR;function lR(t,e){return t.score===e.score?e.code.length-t.code.length:e.score-t.score}const cR=lR;function uR(t,e,{matcher:n=aR,comparer:i=cR}={}){const r=[];for(const o of t){const{code:a}=o,l=o.iso||a;r.push({code:a,iso:l})}const s=n(r,e);return s.length>1&&s.sort(i),s.length?s[0].code:""}function yr(t){return function(){return Reflect.apply(t,{getRouteBaseName:this.getRouteBaseName,localePath:this.localePath,localeRoute:this.localeRoute,localeLocation:this.localeLocation,resolveRoute:this.resolveRoute,switchLocalePath:this.switchLocalePath,localeHead:this.localeHead,i18n:this.$i18n,route:this.$route,router:this.$router},arguments)}}function fR(t,{locales:e=[],localeCodes:n=[],baseUrl:i=KA,hooks:r={},context:s={}}={}){const o=Cl(),a=t.install;return t.install=(l,...c)=>{const u=pR(c[0])?ql({},c[0]):{inject:!0};u.inject==null&&(u.inject=!0);const f=u.__composerExtend;if(u.__composerExtend=_=>{const m=Hr(t);_.locales=He(()=>m.locales.value),_.localeCodes=He(()=>m.localeCodes.value),_.baseUrl=He(()=>m.baseUrl.value),Qu(f)&&Reflect.apply(f,u,[_])},lr(t.global)){const _=u.__vueI18nExtend;u.__vueI18nExtend=m=>{xp(m,r.onExtendVueI18n),Qu(_)&&Reflect.apply(_,u,[m])}}c[0]=u,Reflect.apply(a,t,[l,...c]);const h=Hr(t);o.run(()=>dR(h,{locales:e,localeCodes:n,baseUrl:i,hooks:r,context:s})),lr(t.global)&&xp(t.global,r.onExtendVueI18n);const p=l,g=t.mode==="composition"?p.config.globalProperties.$i18n:null;if(g&&hR(g,h,r.onExtendExportedGlobal),u.inject&&l.mixin({methods:{resolveRoute:yr(Jl),localePath:yr(Zl),localeRoute:yr(sd),localeLocation:yr(ER),switchLocalePath:yr(Vo),getRouteBaseName:yr(Os),localeHead:yr(Yv)}}),p.unmount){const _=p.unmount;p.unmount=()=>{o.stop(),_()}}},o}function dR(t,e){const{locales:n,localeCodes:i,baseUrl:r,context:s}=e,o=Ge(n),a=Ge(i),l=Ge("");t.locales=He(()=>o.value),t.localeCodes=He(()=>a.value),t.baseUrl=He(()=>l.value),nR?Ot(t.locale,()=>{l.value=yp(r,s)},{immediate:!0}):l.value=yp(r,s),e.hooks&&e.hooks.onExtendComposer&&e.hooks.onExtendComposer(t)}function hR(t,e,n){const i=[{locales:{get(){return e.locales.value}},localeCodes:{get(){return e.localeCodes.value}},baseUrl:{get(){return e.baseUrl.value}}}];n&&i.push(n(e));for(const r of i)for(const[s,o]of Object.entries(r))Object.defineProperty(t,s,o)}function xp(t,e){const n=Hr(t),i=[{locales:{get(){return n.locales.value}},localeCodes:{get(){return n.localeCodes.value}},baseUrl:{get(){return n.baseUrl.value}}}];e&&i.push(e(n));for(const r of i)for(const[s,o]of Object.entries(r))Object.defineProperty(t,s,o)}function pR(t){return rd(t)&&("inject"in t||"__composerExtend"in t||"__vueI18nExtend"in t)}const tf=ZA("vue-i18n-routing-gor");function mR(t,e){t[tf]?Wv("already registered global options"):t[tf]=e}function gR(t){var e;return(e=t[tf])!=null?e:{}}function nf(t){return new RegExp(`^/(${t.join("|")})(?:/|$)`,"i")}function _R(t,e,n){const i=`(${t.join("|")})`,r=`(?:${e}${n})?`,s=new RegExp(`${e}${i}${r}$`,"i"),o=nf(t);return l=>{if(rd(l)){if(l.name){const u=(Us(l.name)?l.name:l.name.toString()).match(s);if(u&&u.length>1)return u[1]}else if(l.path){const c=l.path.match(o);if(c&&c.length>1)return c[1]}}else if(Us(l)){const c=l.match(o);if(c&&c.length>1)return c[1]}return""}}function na(t,e,{defaultLocale:n=WA,defaultDirection:i=YA,defaultLocaleRouteNameSuffix:r=qA,routesNameSeparator:s=jA,strategy:o=$A,trailingSlash:a=XA,localeCodes:l=[],prefixable:c=jv,switchLocalePathIntercepter:u=qv,dynamicRouteParamsKey:f=Vv}={}){const h=gR(t);return{defaultLocale:e.defaultLocale||h.defaultLocale||n,defaultDirection:e.defaultDirection||h.defaultDirection||i,defaultLocaleRouteNameSuffix:e.defaultLocaleRouteNameSuffix||h.defaultLocaleRouteNameSuffix||r,routesNameSeparator:e.routesNameSeparator||h.routesNameSeparator||s,strategy:e.strategy||h.strategy||o,trailingSlash:e.trailingSlash||h.trailingSlash||a,localeCodes:e.localeCodes||h.localeCodes||l,prefixable:e.prefixable||h.prefixable||c,switchLocalePathIntercepter:e.switchLocalePathIntercepter||h.switchLocalePathIntercepter||u,dynamicRouteParamsKey:e.dynamicRouteParamsKey||h.dynamicRouteParamsKey||f}}function vR(t,e){return[t.slice(0,e),t.slice(e)]}function yR(t,e,n,i){if(n==="prefix"){if(Gv(e.matched)&&e.matched.length>0)return e.matched[0];const[r,s]=vR(e.path,1),o=`${r}${i}${s===""?s:`/${s}`}`,a=t.options.routes.find(l=>l.path===o);if(a==null)return e;{const l=ql({},e,a);return l.path=o,t.resolve(l)}}else return t.resolve(e)}const xR=new Set(["prefix_and_default","prefix_except_default"]);function SR(t){const{currentLocale:e,defaultLocale:n,strategy:i}=t;return!(e===n&&xR.has(i))&&i!=="no_prefix"}const jv=SR;function Os(t){const e=this.router,{routesNameSeparator:n}=na(e,this),i=t!=null?ut(t)?pe(t):t:this.route;return i==null||!i.name?void 0:Xv(i.name).split(n)[0]}function Zl(t,e){const n=Jl.call(this,t,e);return n==null?"":n.redirectedFrom||n.fullPath}function sd(t,e){const n=Jl.call(this,t,e);return n??void 0}function ER(t,e){const n=Jl.call(this,t,e);return n??void 0}function Jl(t,e){const n=this.router,i=this.i18n,r=e||Kl(i),{routesNameSeparator:s,defaultLocale:o,defaultLocaleRouteNameSuffix:a,strategy:l,trailingSlash:c,prefixable:u}=na(n,this);let f=t;Us(t)&&(f[0]==="/"?f={path:t}:f={name:t});let h=ql({},f);if(h.path&&!h.name){let p=null;try{p=yR(n,h,l,r)}catch{}const g=p,_=Os.call(this,g);Us(_)?(h={name:vp(_,r,{defaultLocale:o,strategy:l,routesNameSeparator:s,defaultLocaleRouteNameSuffix:a}),params:g.params,query:g.query,hash:g.hash},h.state=g.state):(u({currentLocale:r,defaultLocale:o,strategy:l})&&(h.path=`/${r}${h.path}`),h.path=c?tR(h.path,!0):eR(h.path,!0))}else!h.name&&!h.path&&(h.name=Os.call(this,this.route)),h.name=vp(h.name,r,{defaultLocale:o,strategy:l,routesNameSeparator:s,defaultLocaleRouteNameSuffix:a});try{const p=n.resolve(h);return(RT?p.name:p.route.name)?p:n.resolve(t)}catch(p){if(p.type===1)return null}}const qv=t=>t;function bR(t,e){const n={};if(e===Vv)return n;const i=t.meta;return ut(i)?i.value[e]||n:i[e]||n}function Vo(t){const e=this.route,n=Os.call(this,e);if(!n)return"";const{switchLocalePathIntercepter:i,dynamicRouteParamsKey:r}=na(this.router,this),{params:s,...o}=e,a=bR(e,r)[t]||{},l={name:n,params:{...s,...a}},c=ql({},o,l);let u=Zl.call(this,c,t);return u=i(u,t),u}function Yv({addDirAttribute:t=!1,addSeoAttributes:e=!1,identifierAttribute:n="hid"}={}){const i=this.router,r=this.i18n,{defaultDirection:s}=na(i,this),o={htmlAttrs:{},link:[],meta:[]};if(r.locales==null||r.baseUrl==null)return o;const a=Kl(r),l=rR(r),c=iR(l).find(h=>h.code===a)||{code:a},u=c.iso,f=c.dir||s;return t&&(o.htmlAttrs.dir=f),e&&a&&r.locales&&(u&&(o.htmlAttrs.lang=u),MR.call(this,l,pe(r.baseUrl),o.link,n),TR.call(this,pe(r.baseUrl),o.link,o.meta,n,e),wR(c,u,o.meta,n),AR(l,u,o.meta,n)),o}function MR(t,e,n,i){const r=this.router,{defaultLocale:s,strategy:o}=na(r,this);if(o===zv.NO_PREFIX)return;const a=new Map;for(const l of t){const c=l.iso;if(!c){Wv("Locale ISO code is required to generate alternate link");continue}const[u,f]=c.split("-");u&&f&&(l.isCatchallLocale||!a.has(u))&&a.set(u,l),a.set(c,l)}for(const[l,c]of a.entries()){const u=Vo.call(this,c.code);u&&n.push({[i]:`i18n-alt-${l}`,rel:"alternate",href:rf(u,e),hreflang:l})}if(s){const l=Vo.call(this,s);l&&n.push({[i]:"i18n-xd",rel:"alternate",href:rf(l,e),hreflang:"x-default"})}}function TR(t,e,n,i,r){const s=this.route,o=sd.call(this,{...s,name:Os.call(this,s)});if(o){let a=rf(o.path,t);const l=rd(r)&&r.canonicalQueries||[];if(l.length){const c=o.query,u=new URLSearchParams;for(const h of l)if(h in c){const p=c[h];Gv(p)?p.forEach(g=>u.append(h,g||"")):u.append(h,p||"")}const f=u.toString();f&&(a=`${a}?${f}`)}e.push({[i]:"i18n-can",rel:"canonical",href:a}),n.push({[i]:"i18n-og-url",property:"og:url",content:a})}}function wR(t,e,n,i){t&&e&&n.push({[i]:"i18n-og",property:"og:locale",content:Kv(e)})}function AR(t,e,n,i){const r=t.filter(s=>{const o=s.iso;return o&&o!==e});if(r.length){const s=r.map(o=>({[i]:`i18n-og-alt-${o.iso}`,property:"og:locale:alternate",content:Kv(o.iso)}));n.push(...s)}}function Kv(t){return(t||"").replace(/-/g,"_")}function rf(t,e){return t.match(/^https?:\/\//)?t:e+t}function Zv(t,e){const{router:n,route:i,i18n:r,defaultLocale:s,strategy:o,defaultLocaleRouteNameSuffix:a,trailingSlash:l,routesNameSeparator:c}=t;return function(...u){return Reflect.apply(e,{router:n,route:i,i18n:r,defaultLocale:s,strategy:o,defaultLocaleRouteNameSuffix:a,trailingSlash:l,routesNameSeparator:c},u)}}function RR({router:t=fv(),route:e=dv(),i18n:n=dr(),defaultLocale:i=void 0,defaultLocaleRouteNameSuffix:r=void 0,routesNameSeparator:s=void 0,strategy:o=void 0,trailingSlash:a=void 0}={}){return Zv({router:t,route:e,i18n:n,defaultLocale:i,defaultLocaleRouteNameSuffix:r,routesNameSeparator:s,strategy:o,trailingSlash:a},Zl)}function Jv({router:t=fv(),route:e=dv(),i18n:n=dr(),defaultLocale:i=void 0,defaultLocaleRouteNameSuffix:r=void 0,routesNameSeparator:s=void 0,strategy:o=void 0,trailingSlash:a=void 0}={}){return Zv({router:t,route:e,i18n:n,defaultLocale:i,defaultLocaleRouteNameSuffix:r,routesNameSeparator:s,strategy:o,trailingSlash:a},Vo)}const qr=["prs","ps","en"],CR={},LR=async t=>{const e=Object({});e.experimental=Object({jsTsFormatResource:!1}),e.compilation=Object({jit:!0,strictMessage:!0,escapeHtml:!1});const i=await(async r=>{const s=await r().then(o=>o.default||o);return typeof s=="object"?s:typeof s=="function"?await s():{}})(()=>Tt(()=>import("./i18n.config.767fef18.js"),[],import.meta.url));return e.vueI18n=i,e.locales=[Object({code:"prs",name:"دری",iso:"pr-af",dir:"rtl"}),Object({code:"ps",name:"پښتو",iso:"ps-af",dir:"rtl"}),Object({code:"en",name:"English",iso:"en-gb",dir:"ltr"})],e.defaultLocale="en",e.defaultDirection="ltr",e.routesNameSeparator="___",e.trailingSlash=!1,e.defaultLocaleRouteNameSuffix="default",e.strategy="prefix_except_default",e.lazy=!1,e.langDir=null,e.rootRedirect=null,e.detectBrowserLanguage=Object({alwaysRedirect:!1,cookieCrossOrigin:!1,cookieDomain:null,cookieKey:"i18n_redirected",cookieSecure:!1,fallbackLocale:"",redirectOn:"root",useCookie:!0}),e.differentDomains=!1,e.baseUrl="",e.dynamicRouteParams=!1,e.customRoutes="page",e.pages=Object({}),e.skipSettingLocaleOnNavigate=!1,e.types="composition",e.debug=!1,e},Tn=Object({experimental:Object({jsTsFormatResource:!1}),compilation:Object({jit:!0,strictMessage:!0,escapeHtml:!1}),vueI18n:"",locales:[],defaultLocale:"",defaultDirection:"ltr",routesNameSeparator:"___",trailingSlash:!1,defaultLocaleRouteNameSuffix:"default",strategy:"prefix_except_default",lazy:!1,langDir:null,rootRedirect:null,detectBrowserLanguage:Object({alwaysRedirect:!1,cookieCrossOrigin:!1,cookieDomain:null,cookieKey:"i18n_redirected",cookieSecure:!1,fallbackLocale:"",redirectOn:"root",useCookie:!0}),differentDomains:!1,baseUrl:"",dynamicRouteParams:!1,customRoutes:"page",pages:Object({}),skipSettingLocaleOnNavigate:!1,types:"composition",debug:!1}),sf=Object({__normalizedLocales:[Object({code:"prs",name:"دری",iso:"pr-af",dir:"rtl"}),Object({code:"ps",name:"پښتو",iso:"ps-af",dir:"rtl"}),Object({code:"en",name:"English",iso:"en-gb",dir:"ltr"})]}),Qv="@nuxtjs/i18n",PR=!1;/*! js-cookie v3.0.5 | MIT */function Ra(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)t[i]=n[i]}return t}var IR={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function of(t,e){function n(r,s,o){if(!(typeof document>"u")){o=Ra({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),r=encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,o[l]!==!0&&(a+="="+o[l].split(";")[0]));return document.cookie=r+"="+t.write(s,r)+a}}function i(r){if(!(typeof document>"u"||arguments.length&&!r)){for(var s=document.cookie?document.cookie.split("; "):[],o={},a=0;a<s.length;a++){var l=s[a].split("="),c=l.slice(1).join("=");try{var u=decodeURIComponent(l[0]);if(o[u]=t.read(c,u),r===u)break}catch{}}return r?o[r]:o}}return Object.create({set:n,get:i,remove:function(r,s){n(r,"",Ra({},s,{expires:-1}))},withAttributes:function(r){return of(this.converter,Ra({},this.attributes,r))},withConverter:function(r){return of(Ra({},this.converter,r),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var e0=of(IR,{path:"/"});function yl(t){return Qv+" "+t}function DR(t){return t!=null&&("__VUE_I18N_BRIDGE__"in t||"_sync"in t)}function Ql(t,e,...n){const i=$r(t)?t.global:t,[r,s]=[i,i[e]];return Reflect.apply(s,r,[...n])}function NR(t,e){const n=$r(t)?t.global:t;return Ys(n)?n[e].value:(ta(n)||lr(n)||DR(n),n[e])}function Sp(t,e,n){Object.defineProperty(t,e,{get:()=>n})}function UR(t,e){return function(){return Reflect.apply(e,{i18n:t.$i18n,getRouteBaseName:t.$getRouteBaseName,localePath:t.$localePath,localeRoute:t.$localeRoute,switchLocalePath:t.$switchLocalePath,localeHead:t.$localeHead,route:t.$router.currentRoute.value,router:t.$router},arguments)}}function af(t,e,n){for(const i in t)At(t[i])?(At(e[i])||(e[i]=[]),t[i].forEach((r,s)=>{if(!e[i][s]){const o={};af(r,o,n),e[i].push(o)}})):rt(t[i])?(rt(e[i])||(e[i]={}),af(t[i],e[i],n)):n?n(t[i],e[i])&&(e[i]=t[i]):e[i]=t[i]}async function Ep(t,e,n){var s,o;const i=(s=t.$config.public)==null?void 0:s.i18n;let r=null;try{const a=await e().then(l=>l.default||l);It(a)?(o=i.experimental)!=null&&o.jsTsFormatResource?r=await a(n):console.warn(yl("Not support js / ts extension format as default. you can do enable with `i18n.experimental.jsTsFormatResource: true` (experimental)")):r=a}catch(a){console.error(yl("Failed locale loading: "+a.message))}return r}const Ca=[],Yr=new Map;async function xl(t,e,n){if(Ca.includes(e))Ca.includes(e)||console.warn(yl("Could not find "+e+" locale code in localeMessages"));else{const i=CR[e];if(i!=null){if(i.length===1){const{key:r,load:s}=i[0];let o=null;Yr.has(r)?o=Yr.get(r):(o=await Ep(t,s,e),o!=null&&Yr.set(r,o)),o!=null&&(n(e,o),Ca.push(e))}else if(i.length>1){const r={};for(const{key:s,load:o}of i){let a=null;Yr.has(s)?a=Yr.get(s):(a=await Ep(t,o,e),a!=null&&Yr.set(s,a)),a!=null&&af(a,r)}n(e,r),Ca.push(e)}}}}function t0(t,e){let n;return navigator.languages&&(n=uR(t.__normalizedLocales,navigator.languages)),n}function od(t,{useCookie:e=Tn.detectBrowserLanguage.useCookie,cookieKey:n=Tn.detectBrowserLanguage.cookieKey,localeCodes:i=[]}={}){if(e){let r;if(r=e0.get(n),r&&i.includes(r))return r}}function OR(t,e,{useCookie:n=Tn.detectBrowserLanguage.useCookie,cookieKey:i=Tn.detectBrowserLanguage.cookieKey,cookieDomain:r=Tn.detectBrowserLanguage.cookieDomain,cookieSecure:s=Tn.detectBrowserLanguage.cookieSecure,cookieCrossOrigin:o=Tn.detectBrowserLanguage.cookieCrossOrigin}={}){if(!n)return;const a=new Date,l={expires:new Date(a.setDate(a.getDate()+365)),path:"/",sameSite:o?"none":"lax",secure:o||s};r&&(l.domain=r),e0.set(i,t,l)}const FR={locale:"",stat:!1,reason:"unknown",from:"unknown"};function kR(t,e,n,i,r,s=[],o=""){const{strategy:a}=n,{ssg:l,callType:c,firstAccess:u}=r;if(!u)return{locale:"",stat:!1,reason:"first_access_only"};const{redirectOn:f,alwaysRedirect:h,useCookie:p,fallbackLocale:g}=n.detectBrowserLanguage,_=Ae(t)?t:t.path;if(a!=="no_prefix"){if(f==="root"){if(_!=="/")return{locale:"",stat:!1,reason:"not_redirect_on_root"}}else if(f==="no prefix"&&!h&&_.match(nf(s)))return{locale:"",stat:!1,reason:"not_redirect_on_no_prefix"}}let m="unknown",d,v;p&&(v=d=od(e,{...n.detectBrowserLanguage,localeCodes:s}),m="cookie"),v||(v=t0(i),m="navigator_or_header");const y=v||g;!v&&g&&(m="fallback");const x=o||n.vueI18n.locale;if(y&&(!p||h||!d)){if(a==="no_prefix")return{locale:y,stat:!0,from:m};if(c==="setup"&&y!==x)return{locale:y,stat:!0,from:m};if(h){const S=_==="/",C=f==="all",R=f==="no prefix"&&!_.match(nf(s));if(S||C||R)return{locale:y,stat:!0,from:m}}}return l==="ssg_setup"&&y?{locale:y,stat:!0,from:m}:(m==="navigator_or_header"||m==="cookie")&&y?{locale:y,stat:!0,from:m}:{locale:"",stat:!1,reason:"not_found_match"}}function BR(){let t;return t=window.location.host,t}function HR(t){let e=BR()||"";if(e){const n=t.find(i=>i.domain===e);if(n)return n.code;e=""}return e}function n0(t,e,n){const i=e.find(r=>r.code===t);if(i&&i.domain){if(js(i.domain))return i.domain;let r;return r=window.location.protocol.split(":")[0],r+"://"+i.domain}console.warn(yl("Could not find domain name for locale "+t))}function zR(t,e){return Ql(t,"setLocaleCookie",e)}function VR(t,e,n){return Ql(t,"mergeLocaleMessage",e,n)}function GR(t,e,n,i,r){return Ql(t,"onBeforeLanguageSwitch",e,n,i,r)}function WR(t,e,n){return Ql(t,"onLanguageSwitched",e,n)}function i0(t,e){let n=[];if(At(t))n=t;else if(rt(t)){const i=[...e,"default"];for(const r of i)t[r]&&(n=[...n,...t[r].filter(Boolean)])}else Ae(t)&&e.every(i=>i!==t)&&n.push(t);return n}async function $R(t,e,n){const{defaultLocale:i,initialLocale:r,localeCodes:s,fallbackLocale:o,langDir:a,lazy:l}=n,c=(u,f)=>{const h=e[u]||{};e[u]={...h,...f}};if(a){if(l&&o){const f=i0(o,[i,r]);await Promise.all(f.map(h=>xl(t,h,c)))}const u=l?[...new Set().add(i).add(r)]:s;await Promise.all(u.map(f=>xl(t,f,c)))}return e}async function bp(t,e,n,{useCookie:i=Tn.detectBrowserLanguage.useCookie,skipSettingLocaleOnNavigate:r=Tn.skipSettingLocaleOnNavigate,differentDomains:s=Tn.differentDomains,initial:o=!1,lazy:a=!1,langDir:l=null}={}){let c=!1;const u=Kl(n);if(!t)return[c,u];if(!o&&s)return[c,u];if(u===t)return[c,u];const f=await GR(n,u,t,o,e),h=sR(n);if(f&&h&&h.includes(f)){if(f===u)return[c,u];t=f}if(l){const p=NR(n,"fallbackLocale");if(a){const g=(_,m)=>VR(n,_,m);if(p){const _=i0(p,[t]);await Promise.all(_.map(m=>xl(e,m,g)))}await xl(e,t,g)}}return r?[c,u]:(i&&zR(n,t),$v(n,t),await WR(n,u,t),c=!0,[c,u])}function Mp(t,e,n,i,r,s,o,a=[]){const{strategy:l,defaultLocale:c,differentDomains:u}=i,f=It(r)?r():r,{locale:h,stat:p,reason:g,from:_}=i.detectBrowserLanguage?kR(t,e,i,sf,s,a,f):FR;if(g==="detect_ignore_on_ssg")return f;if((_==="navigator_or_header"||_==="cookie"||_==="fallback")&&h)return h;let m=h;return m||(u?m=HR(o):l!=="no_prefix"?m=n(t):i.detectBrowserLanguage||(m=f)),!m&&i.detectBrowserLanguage&&i.detectBrowserLanguage.useCookie&&(m=od(e,{...i.detectBrowserLanguage,localeCodes:a})||""),m||(m=c||""),m}function Tp(t,e,n,i,r){const{strategy:s,differentDomains:o}=r;let a="";if(!o&&s!=="no_prefix"&&s!=="prefix_and_default"&&i(t.to)!==n){const{fullPath:l}=t.to,c=e.$switchLocalePath(n)||e.$localePath(l,n);Ae(c)&&c&&!O_(c,l)&&!c.startsWith("//")&&(a=t.from&&t.from.fullPath===c?"":c)}if(o||PR){const c=Jv({i18n:Hr(e.$i18n),route:t.to,router:e.$router})(n);Ae(c)&&(a=c)}return a}function XR(t){return rt(t)&&"path"in t&&"statusCode"in t}const jR=()=>Z_(Qv+":redirect",()=>"");function wp(t,e){return J_(t,{redirectCode:e})}async function Ap(t,{status:e=301,rootRedirect:n=Tn.rootRedirect,differentDomains:i=Tn.differentDomains,skipSettingLocaleOnNavigate:r=Tn.skipSettingLocaleOnNavigate}={}){const{i18n:s,locale:o,route:a}=t;let{redirectPath:l}=t;if(a.path==="/"&&n)return Ae(n)?l="/"+n:XR(n)&&(l="/"+n.path,e=n.statusCode),wp(l,e);if(r){s.__pendingLocale=o,s.__pendingLocalePromise=new Promise(c=>{s.__resolvePendingLocalePromise=c});return}if(i){const c=jR();c.value!==l&&(c.value="",window.location.assign(l))}else if(l)return wp(l,e)}function qR(t,e){Sp(t,"$i18n",e.global);for(const n of[["getRouteBaseName",Os],["localePath",Zl],["localeRoute",sd],["switchLocalePath",Vo],["localeHead",Yv]])Sp(t,"$"+n[0],UR(t,n[1]))}function YR(t){return e=>jv(e)&&!t}function KR(t,e,n){return(i,r)=>{if(t){const s=n0(r,e);return s?Jo(s,i):i}else return qv(i)}}function ZR(t,e){return n=>{var l,c;if(It(t))return t(n);const{differentDomains:i,localeCodeLoader:r,normalizedLocales:s}=e,o=It(r)?r():r;if(i&&o){const u=n0(o,s,e.nuxt);if(u)return u}const a=(c=(l=n.$config)==null?void 0:l.public)==null?void 0:c.i18n;return a!=null&&a.baseUrl?a.baseUrl:t}}const JR=ti(async t=>{let e,n;const i=gi(),r=Gr(),{vueApp:s}=t,o=t,a=([e,n]=Nr(()=>LR()),e=await e,n(),e),l=a.detectBrowserLanguage&&a.detectBrowserLanguage.useCookie,{__normalizedLocales:c}=sf,{defaultLocale:u,differentDomains:f,skipSettingLocaleOnNavigate:h,lazy:p,langDir:g,routesNameSeparator:_,defaultLocaleRouteNameSuffix:m,strategy:d,rootRedirect:v}=a;a.baseUrl=ZR(a.baseUrl,{differentDomains:f,nuxt:o,localeCodeLoader:u,normalizedLocales:c});const y=_R(qr,_,m),x=a.vueI18n;x.messages=x.messages||{},x.fallbackLocale=x.fallbackLocale??!1,mR(i,{...a,dynamicRouteParamsKey:"nuxtI18n",switchLocalePathIntercepter:KR(f,c),prefixable:YR(f)});const S=U=>U||x.locale||"en-US";let C=Mp(r,t.ssrContext,y,a,S(u),{ssg:"normal",callType:"setup",firstAccess:!0},c,qr);x.messages=([e,n]=Nr(()=>$R(o,x.messages,{...a,initialLocale:C,fallbackLocale:x.fallbackLocale,localeCodes:qr})),e=await e,n(),e),C=S(C);const R=DA({...x,locale:C});let I=!0;const b=U=>C!==U&&I;fR(R,{locales:a.locales,localeCodes:qr,baseUrl:a.baseUrl,context:o,hooks:{onExtendComposer(U){U.strategy=d,U.localeProperties=He(()=>c.find(k=>k.code===U.locale.value)||{code:U.locale.value}),U.setLocale=async k=>{const D=b(k),[G]=await bp(k,o,R,{useCookie:l,differentDomains:f,initial:D,skipSettingLocaleOnNavigate:h,lazy:p,langDir:g});G&&D&&(I=!1);const $=Tp({to:r},o,k,y,a);await Ap({i18n:R,redirectPath:$,locale:k,route:r},{differentDomains:f,skipSettingLocaleOnNavigate:h,rootRedirect:v})},U.differentDomains=f,U.defaultLocale=u,U.getBrowserLocale=()=>t0(sf,t.ssrContext),U.getLocaleCookie=()=>od(t.ssrContext,{...a.detectBrowserLanguage,localeCodes:qr}),U.setLocaleCookie=k=>OR(k,t.ssrContext,a.detectBrowserLanguage||void 0),U.onBeforeLanguageSwitch=(k,D,G,$)=>t.callHook("i18n:beforeLocaleSwitch",{oldLocale:k,newLocale:D,initialSetup:G,context:$}),U.onLanguageSwitched=(k,D)=>t.callHook("i18n:localeSwitched",{oldLocale:k,newLocale:D}),U.finalizePendingLocaleChange=async()=>{R.__pendingLocale&&($v(R,R.__pendingLocale),R.__resolvePendingLocalePromise&&await R.__resolvePendingLocalePromise(),R.__pendingLocale=void 0)},U.waitForPendingLocaleChange=async()=>{R.__pendingLocale&&R.__pendingLocalePromise&&await R.__pendingLocalePromise}},onExtendExportedGlobal(U){return{strategy:{get(){return U.strategy}},localeProperties:{get(){return U.localeProperties.value}},setLocale:{get(){return async k=>Reflect.apply(U.setLocale,U,[k])}},differentDomains:{get(){return U.differentDomains}},defaultLocale:{get(){return U.defaultLocale}},getBrowserLocale:{get(){return()=>Reflect.apply(U.getBrowserLocale,U,[])}},getLocaleCookie:{get(){return()=>Reflect.apply(U.getLocaleCookie,U,[])}},setLocaleCookie:{get(){return k=>Reflect.apply(U.setLocaleCookie,U,[k])}},onBeforeLanguageSwitch:{get(){return(k,D,G,$)=>Reflect.apply(U.onBeforeLanguageSwitch,U,[k,D,G,$])}},onLanguageSwitched:{get(){return(k,D)=>Reflect.apply(U.onLanguageSwitched,U,[k,D])}},finalizePendingLocaleChange:{get(){return()=>Reflect.apply(U.finalizePendingLocaleChange,U,[])}},waitForPendingLocaleChange:{get(){return()=>Reflect.apply(U.waitForPendingLocaleChange,U,[])}}}},onExtendVueI18n(U){return{strategy:{get(){return U.strategy}},localeProperties:{get(){return U.localeProperties.value}},setLocale:{get(){return async k=>Reflect.apply(U.setLocale,U,[k])}},differentDomains:{get(){return U.differentDomains}},defaultLocale:{get(){return U.defaultLocale}},getBrowserLocale:{get(){return()=>Reflect.apply(U.getBrowserLocale,U,[])}},getLocaleCookie:{get(){return()=>Reflect.apply(U.getLocaleCookie,U,[])}},setLocaleCookie:{get(){return k=>Reflect.apply(U.setLocaleCookie,U,[k])}},onBeforeLanguageSwitch:{get(){return(k,D,G,$)=>Reflect.apply(U.onBeforeLanguageSwitch,U,[k,D,G,$])}},onLanguageSwitched:{get(){return(k,D)=>Reflect.apply(U.onLanguageSwitched,U,[k,D])}},finalizePendingLocaleChange:{get(){return()=>Reflect.apply(U.finalizePendingLocaleChange,U,[])}},waitForPendingLocaleChange:{get(){return()=>Reflect.apply(U.waitForPendingLocaleChange,U,[])}}}}}});const L={__composerExtend:U=>{const k=Hr(R);U.strategy=k.strategy,U.localeProperties=He(()=>k.localeProperties.value),U.setLocale=k.setLocale,U.differentDomains=k.differentDomains,U.getBrowserLocale=k.getBrowserLocale,U.getLocaleCookie=k.getLocaleCookie,U.setLocaleCookie=k.setLocaleCookie,U.onBeforeLanguageSwitch=k.onBeforeLanguageSwitch,U.onLanguageSwitched=k.onLanguageSwitched,U.finalizePendingLocaleChange=k.finalizePendingLocaleChange,U.waitForPendingLocaleChange=k.waitForPendingLocaleChange}};s.use(R,L),qR(o,R);let B=0;hM("locale-changing",async(U,k)=>{let D,G;const $=Mp(U,t.ssrContext,y,a,()=>Kl(R)||S(u),{ssg:"normal",callType:"routing",firstAccess:B===0},c,qr),j=b($),[oe]=([D,G]=Nr(()=>bp($,o,R,{useCookie:l,differentDomains:f,initial:j,skipSettingLocaleOnNavigate:h,lazy:p,langDir:g})),D=await D,G(),D);oe&&j&&(I=!1);const se=Tp({to:U,from:k},o,$,y,a);return B++,Ap({i18n:R,redirectPath:se,locale:$,route:U},{differentDomains:f,skipSettingLocaleOnNavigate:h,rootRedirect:v})},{global:!0})}),QR=ti(t=>{Hl().public.prismic.preview&&window.addEventListener("prismicPreviewUpdate",n=>{n.preventDefault(),vv()})}),r0=t=>Array.isArray(t)?`[${t.map(r0).join(", ")}]`:typeof t=="string"?`"${t}"`:t instanceof Date?`${t.getTime()}`:`${t}`,ht=t=>(n,...i)=>{const r=i.map(r0).join(", "),s=n&&i.length?", ":"";return`[${t}(${n}${s}${r})]`},Rp=t=>{const e=ht(t);return i=>e(i)},eC=t=>{const e=ht(t);return(...i)=>e("",...i)},ai={at:ht("at"),not:ht("not"),any:ht("any"),in:ht("in"),fulltext:ht("fulltext"),has:Rp("has"),missing:Rp("missing"),similar:eC("similar"),geopointNear:ht("geopoint.near"),numberLessThan:ht("number.lt"),numberGreaterThan:ht("number.gt"),numberInRange:ht("number.inRange"),dateAfter:ht("date.after"),dateBefore:ht("date.before"),dateBetween:ht("date.between"),dateDayOfMonth:ht("date.day-of-month"),dateDayOfMonthAfter:ht("date.day-of-month-after"),dateDayOfMonthBefore:ht("date.day-of-month-before"),dateDayOfWeek:ht("date.day-of-week"),dateDayOfWeekAfter:ht("date.day-of-week-after"),dateDayOfWeekBefore:ht("date.day-of-week-before"),dateMonth:ht("date.month"),dateMonthAfter:ht("date.month-after"),dateMonthBefore:ht("date.month-before"),dateYear:ht("date.year"),dateHour:ht("date.hour"),dateHourAfter:ht("date.hour-after"),dateHourBefore:ht("date.hour-before")},Yi=t=>Array.isArray(t)?t:[t],on=(t={},e)=>({...t,filters:[...t.filters||[],...Yi(e)]}),tC=t=>typeof t=="function"?t:()=>t,Cp=t=>ai.at("document.tags",Yi(t));var nC=Object.defineProperty,iC=(t,e,n)=>e in t?nC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Lp=(t,e,n)=>(iC(t,typeof e!="symbol"?e+"":e,n),n);class Yn extends Error{constructor(e="An invalid API response was returned",n,i){super(e),Lp(this,"url"),Lp(this,"response"),this.url=n,this.response=i}}const ad=(t,e)=>{const n=t.find(i=>e(i));if(!n)throw new Yn("Ref could not be found.",void 0,void 0);return n},Pp=t=>ad(t,e=>e.isMasterRef),Dc=(t,e)=>ad(t,n=>n.id===e),Nc=(t,e)=>ad(t,n=>n.label===e),s0="io.prismic.preview",rC=Object.freeze(Object.defineProperty({__proto__:null,preview:s0},Symbol.toStringTag,{value:"Module"})),Ip=t=>t.replace(/%3B/g,";"),sC=t=>{const e=t.split("; ");let n;for(const i of e){const r=i.split("=");if(Ip(r[0]).replace(/%3D/g,"=")===s0){n=Ip(r.slice(1).join("="));break}}return n},oC=t=>t.replace(/(\n| )*( |{|})(\n| )*/gm,(e,n,i)=>i),La=t=>ai.any("document.tags",Yi(t)),Kr=t=>ai.at("document.type",t);class aC extends Yn{}class lC extends Yn{}class cC extends Yn{}const Ki={Any:"Any",Document:"Document",Media:"Media",Web:"Web"},o0=t=>{var e;return{link_type:Ki.Document,id:t.id,uid:t.uid||void 0,type:t.type,tags:t.tags,lang:t.lang,url:t.url==null?void 0:t.url,slug:(e=t.slugs)==null?void 0:e[0],...t.data&&Object.keys(t.data).length>0?{data:t.data}:{}}},ia=(t,...e)=>{if(!t)return null;const n="link_type"in t?t:o0(t),[i]=e;let r;switch(typeof i=="function"||i==null?r={linkResolver:i}:r={...i},n.link_type){case Ki.Media:case Ki.Web:return"url"in n?n.url:null;case Ki.Document:{if("id"in n&&r.linkResolver){const s=r.linkResolver(n);if(s!=null)return s}return"url"in n&&n.url?n.url:null}case Ki.Any:default:return null}},uC={accessToken:"access_token"},fC=t=>typeof t=="string"?t:t.direction==="desc"?`${t.field} desc`:t.field,dC=(t,e)=>{const{filters:n,predicates:i,...r}=e,s=new URL("documents/search",`${t}/`);if(n)for(const o of Yi(n))s.searchParams.append("q",`[${o}]`);if(i)for(const o of Yi(i))s.searchParams.append("q",`[${o}]`);for(const o in r){const a=uC[o]||o;let l=r[o];if(a==="orderings"){const c=r[a];c!=null&&(l=`[${Yi(c).map(f=>fC(f)).join(",")}]`)}else a==="routes"&&typeof r[a]=="object"&&(l=JSON.stringify(Yi(r[a])));l!=null&&s.searchParams.set(a,Yi(l).join(","))}return s.toString()},hC=t=>/^[a-zA-Z0-9][-a-zA-Z0-9]{2,}[a-zA-Z0-9]$/.test(t),pC=t=>{if(hC(t))return`https://${t}.cdn.prismic.io/api/v2`;throw new Yn(`An invalid Prismic repository name was given: ${t}`,void 0,void 0)},mC=t=>{try{return new URL(t).hostname.split(".")[0]}catch{throw new Yn(`An invalid Prismic Rest API V2 endpoint was provided: ${t}`,void 0,void 0)}},a0=t=>{try{return new URL(t),!0}catch{return!1}};var gC=Object.defineProperty,_C=(t,e,n)=>e in t?gC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Hn=(t,e,n)=>(_C(t,typeof e!="symbol"?e+"":e,n),n);const vC=100,yC=5e3,xC=500;var si;(function(t){t.Master="Master",t.ReleaseID="ReleaseID",t.ReleaseLabel="ReleaseLabel",t.Manual="Manual"})(si||(si={}));const SC=(t,e)=>new EC(t,e);class EC{constructor(e,n={}){if(Hn(this,"endpoint"),Hn(this,"accessToken"),Hn(this,"routes"),Hn(this,"brokenRoute"),Hn(this,"fetchFn"),Hn(this,"fetchOptions"),Hn(this,"defaultParams"),Hn(this,"refState",{mode:si.Master,autoPreviewsEnabled:!0}),Hn(this,"cachedRepository"),Hn(this,"cachedRepositoryExpiration",0),Hn(this,"fetchJobs",{}),a0(e)?this.endpoint=e:this.endpoint=pC(e),this.accessToken=n.accessToken,this.routes=n.routes,this.brokenRoute=n.brokenRoute,this.fetchOptions=n.fetchOptions,this.defaultParams=n.defaultParams,n.ref&&this.queryContentFromRef(n.ref),typeof n.fetch=="function")this.fetchFn=n.fetch;else if(typeof globalThis.fetch=="function")this.fetchFn=globalThis.fetch;else throw new Yn("A valid fetch implementation was not provided. In environments where fetch is not available (including Node.js), a fetch implementation must be provided via a polyfill or the `fetch` option.",void 0,void 0);this.fetchFn===globalThis.fetch&&(this.fetchFn=this.fetchFn.bind(globalThis)),this.graphQLFetch=this.graphQLFetch.bind(this)}enableAutoPreviews(){this.refState.autoPreviewsEnabled=!0}enableAutoPreviewsFromReq(e){this.refState.httpRequest=e,this.refState.autoPreviewsEnabled=!0}disableAutoPreviews(){this.refState.autoPreviewsEnabled=!1}async get(e){const n=await this.buildQueryURL(e);return await this.fetch(n,e)}async getFirst(e){var n;const i={...e};!(e&&e.page)&&!(e!=null&&e.pageSize)&&(i.pageSize=((n=this.defaultParams)==null?void 0:n.pageSize)??1);const r=await this.buildQueryURL(i),o=(await this.fetch(r,e)).results[0];if(o)return o;throw new Yn("No documents were returned",r,void 0)}async dangerouslyGetAll(e={}){var n;const{limit:i=1/0,...r}=e,s={...r,pageSize:Math.min(i,r.pageSize||((n=this.defaultParams)==null?void 0:n.pageSize)||vC)},o=[];let a;for(;(!a||a.next_page)&&o.length<i;){const l=a?a.page+1:void 0;a=await this.get({...s,page:l}),o.push(...a.results),a.next_page&&await new Promise(c=>setTimeout(c,xC))}return o.slice(0,i)}async getByID(e,n){return await this.getFirst(on(n,ai.at("document.id",e)))}async getByIDs(e,n){return await this.get(on(n,ai.in("document.id",e)))}async getAllByIDs(e,n){return await this.dangerouslyGetAll(on(n,ai.in("document.id",e)))}async getByUID(e,n,i){return await this.getFirst(on(i,[Kr(e),ai.at(`my.${e}.uid`,n)]))}async getByUIDs(e,n,i){return await this.get(on(i,[Kr(e),ai.in(`my.${e}.uid`,n)]))}async getAllByUIDs(e,n,i){return await this.dangerouslyGetAll(on(i,[Kr(e),ai.in(`my.${e}.uid`,n)]))}async getSingle(e,n){return await this.getFirst(on(n,Kr(e)))}async getByType(e,n){return await this.get(on(n,Kr(e)))}async getAllByType(e,n){return await this.dangerouslyGetAll(on(n,Kr(e)))}async getByTag(e,n){return await this.get(on(n,La(e)))}async getAllByTag(e,n){return await this.dangerouslyGetAll(on(n,La(e)))}async getByEveryTag(e,n){return await this.get(on(n,Cp(e)))}async getAllByEveryTag(e,n){return await this.dangerouslyGetAll(on(n,Cp(e)))}async getBySomeTags(e,n){return await this.get(on(n,La(e)))}async getAllBySomeTags(e,n){return await this.dangerouslyGetAll(on(n,La(e)))}async getRepository(e){const n=new URL(this.endpoint);return this.accessToken&&n.searchParams.set("access_token",this.accessToken),await this.fetch(n.toString(),e)}async getRefs(e){return(await this.getRepository(e)).refs}async getRefByID(e,n){const i=await this.getRefs(n);return Dc(i,e)}async getRefByLabel(e,n){const i=await this.getRefs(n);return Nc(i,e)}async getMasterRef(e){const n=await this.getRefs(e);return Pp(n)}async getReleases(e){return(await this.getRefs(e)).filter(i=>!i.isMasterRef)}async getReleaseByID(e,n){const i=await this.getReleases(n);return Dc(i,e)}async getReleaseByLabel(e,n){const i=await this.getReleases(n);return Nc(i,e)}async getTags(e){try{const n=await this.getCachedRepositoryForm("tags",e),i=new URL(n.action);return this.accessToken&&i.searchParams.set("access_token",this.accessToken),await this.fetch(i.toString(),e)}catch{return(await this.getRepository(e)).tags}}async buildQueryURL({signal:e,fetchOptions:n,...i}={}){const r=i.ref||await this.getResolvedRefString({signal:e,fetchOptions:n}),s=i.integrationFieldsRef||(await this.getCachedRepository({signal:e,fetchOptions:n})).integrationFieldsRef||void 0;return dC(this.endpoint,{...this.defaultParams,...i,ref:r,integrationFieldsRef:s,routes:i.routes||this.routes,brokenRoute:i.brokenRoute||this.brokenRoute,accessToken:i.accessToken||this.accessToken})}async resolvePreviewURL(e){var n,i;let r=e.documentID,s=e.previewToken;if(typeof globalThis.location<"u"){const o=new URLSearchParams(globalThis.location.search);r=r||o.get("documentId"),s=s||o.get("token")}else if(this.refState.httpRequest){if("query"in this.refState.httpRequest)r=r||((n=this.refState.httpRequest.query)==null?void 0:n.documentId),s=s||((i=this.refState.httpRequest.query)==null?void 0:i.token);else if("url"in this.refState.httpRequest&&this.refState.httpRequest.url){const o=new URL(this.refState.httpRequest.url,"missing-host://").searchParams;r=r||o.get("documentId"),s=s||o.get("token")}}if(r!=null&&s!=null){const o=await this.getByID(r,{ref:s,lang:"*",signal:e.signal,fetchOptions:e.fetchOptions}),a=ia(o,{linkResolver:e.linkResolver});if(typeof a=="string")return a}return e.defaultURL}queryLatestContent(){this.refState.mode=si.Master}queryContentFromReleaseByID(e){this.refState={...this.refState,mode:si.ReleaseID,releaseID:e}}queryContentFromReleaseByLabel(e){this.refState={...this.refState,mode:si.ReleaseLabel,releaseLabel:e}}queryContentFromRef(e){this.refState={...this.refState,mode:si.Manual,ref:e}}async graphQLFetch(e,n){const i=await this.getCachedRepository(),r=await this.getResolvedRefString(),s={"Prismic-ref":r,Authorization:this.accessToken?`Token ${this.accessToken}`:"",...n?n.headers:{}};i.integrationFieldsRef&&(s["Prismic-integration-field-ref"]=i.integrationFieldsRef);const o={};for(const c in s)s[c]&&(o[c.toLowerCase()]=s[c]);const a=new URL(e);a.searchParams.set("ref",r);const l=a.searchParams.get("query");return l&&a.searchParams.set("query",oC(l)),await this.fetchFn(a.toString(),{...n,headers:o})}async getCachedRepository(e){return(!this.cachedRepository||Date.now()>=this.cachedRepositoryExpiration)&&(this.cachedRepositoryExpiration=Date.now()+yC,this.cachedRepository=await this.getRepository(e)),this.cachedRepository}async getCachedRepositoryForm(e,n){const r=(await this.getCachedRepository(n)).forms[e];if(!r)throw new Yn(`Form with name "${e}" could not be found`,void 0,void 0);return r}async getResolvedRefString(e){var n,i;if(this.refState.autoPreviewsEnabled){let o,a;if((n=this.refState.httpRequest)!=null&&n.headers?"get"in this.refState.httpRequest.headers&&typeof this.refState.httpRequest.headers.get=="function"?a=this.refState.httpRequest.headers.get("cookie"):"cookie"in this.refState.httpRequest.headers&&(a=this.refState.httpRequest.headers.cookie):(i=globalThis.document)!=null&&i.cookie&&(a=globalThis.document.cookie),a&&(o=sC(a)),o)return o}const r=await this.getCachedRepository(e),s=this.refState.mode;if(s===si.ReleaseID)return Dc(r.refs,this.refState.releaseID).ref;if(s===si.ReleaseLabel)return Nc(r.refs,this.refState.releaseLabel).ref;if(s===si.Manual){const o=await tC(this.refState.ref)();if(typeof o=="string")return o}return Pp(r.refs).ref}async fetch(e,n={}){var i,r,s,o;const a={...this.fetchOptions,...n.fetchOptions,headers:{...(i=this.fetchOptions)==null?void 0:i.headers,...(r=n.fetchOptions)==null?void 0:r.headers},signal:((s=n.fetchOptions)==null?void 0:s.signal)||n.signal||((o=this.fetchOptions)==null?void 0:o.signal)};let l;this.fetchJobs[e]&&this.fetchJobs[e].has(a.signal)?l=this.fetchJobs[e].get(a.signal):(this.fetchJobs[e]=this.fetchJobs[e]||new Map,l=this.fetchFn(e,a).then(async u=>{let f;try{f=await u.json()}catch{}return{status:u.status,json:f}}).finally(()=>{this.fetchJobs[e].delete(a.signal),this.fetchJobs[e].size===0&&delete this.fetchJobs[e]}),this.fetchJobs[e].set(a.signal,l));const c=await l;if(c.status!==404&&c.json==null)throw new Yn(void 0,e,c.json);switch(c.status){case 200:return c.json;case 400:throw new cC(c.json.message,e,c.json);case 401:case 403:throw new aC("error"in c.json?c.json.error:c.json.message,e,c.json);case 404:throw new lC(`Prismic repository not found. Check that "${this.endpoint}" is pointing to the correct repository.`,e,void 0)}throw new Yn(void 0,e,c.json)}}const bC=t=>t?t.length===24?new Date(t.replace(/(\+|-)(\d{2})(\d{2})$/,".000$1$2:$3")):new Date(t):null,MC=t=>{const e=/^(\/(?!\/)|#)/.test(t),n=!e&&!/^https?:\/\//.test(t);return e&&!n},ld=t=>t!=null,l0=t=>ld(t)?t.length===1&&"text"in t[0]?!!t[0].text:!!t.length:!1,ec=t=>ld(t)&&!!t.url,TC=ec,wC=t=>ld(t)&&("id"in t||"url"in t),AC=(t,e={})=>{if(t&&("link_type"in t?wC(t):t)){const n="target"in t?t.target:void 0,i=ia(t,e.linkResolver),r=i??void 0,s=typeof r=="string"?!MC(r):!1,o=e.rel?e.rel({href:r,isExternal:s,target:n}):s?"noreferrer":void 0;return{href:r,target:n,rel:o??void 0}}return{}},at={heading1:"heading1",heading2:"heading2",heading3:"heading3",heading4:"heading4",heading5:"heading5",heading6:"heading6",paragraph:"paragraph",preformatted:"preformatted",strong:"strong",em:"em",listItem:"list-item",oListItem:"o-list-item",list:"group-list-item",oList:"group-o-list-item",image:"image",embed:"embed",hyperlink:"hyperlink",label:"label",span:"span"},tc=()=>(++tc.i).toString();tc.i=0;const RC=t=>{const e=CC(t),n=[];for(let i=0;i<e.length;i++)n.push(c0(e[i]));return{key:tc(),children:n}},Lo=(t,e=[])=>({key:tc(),type:t.type,text:"text"in t?t.text:void 0,node:t,children:e}),Uc=t=>Lo({type:at.span,text:t,spans:[]}),CC=t=>{const e=t.slice(0);for(let n=0;n<e.length;n++){const i=e[n];if(i.type===at.listItem||i.type===at.oListItem){const r=[i];for(;e[n+1]&&e[n+1].type===i.type;)r.push(e[n+1]),e.splice(n,1);i.type===at.listItem?e[n]={type:at.list,items:r}:e[n]={type:at.oList,items:r}}}return e},c0=t=>{if("text"in t)return Lo(t,u0(t.spans,t));if("items"in t){const e=[];for(let n=0;n<t.items.length;n++)e.push(c0(t.items[n]));return Lo(t,e)}return Lo(t)},u0=(t,e,n)=>{if(!t.length)return[Uc(e.text)];const i=t.slice(0);i.sort((s,o)=>s.start-o.start||o.end-s.end);const r=[];for(let s=0;s<i.length;s++){const o=i[s],a=n&&n.start||0,l=o.start-a,c=o.end-a,u=e.text.slice(l,c),f=[];for(let p=s;p<i.length;p++){const g=i[p];g!==o&&(g.start>=o.start&&g.end<=o.end?(f.push(g),i.splice(p,1),p--):g.start<o.end&&g.end>o.start&&(f.push({...g,end:o.end}),i[p]={...g,start:o.end}))}s===0&&l>0&&r.push(Uc(e.text.slice(0,l)));const h={...o,text:u};r.push(Lo(h,u0(f,{...e,text:u},o))),c<e.text.length&&r.push(Uc(e.text.slice(c,i[s+1]?i[s+1].start-a:void 0)))}return r},LC=(t,e=" ")=>{let n="";for(let i=0;i<t.length;i++)"text"in t[i]&&(n+=(n?e:"")+t[i].text);return n},PC=(t,e)=>f0(RC(t).children,e),f0=(t,e)=>{const n=[];for(let i=0;i<t.length;i++){const r=t[i],s=e(r.type,r.node,r.text,f0(r.children,e),r.key);s!=null&&n.push(s)}return n},IC={[at.listItem]:"listItem",[at.oListItem]:"oListItem",[at.list]:"list",[at.oList]:"oList"},DC=t=>(e,n,i,r,s)=>{const o=t[IC[e]||e];if(o)return o({type:e,node:n,text:i,children:r,key:s})},NC=(...t)=>(...e)=>{for(let n=0;n<t.length;n++){const i=t[n];if(i){const r=i(...e);if(r!=null)return r}}},d0=(t,...e)=>{if(t){const[n]=e;let i;return typeof n=="string"?i={separator:n}:i={...n},LC(t,i.separator)}else return null},UC={heading1:"heading1",heading2:"heading2",heading3:"heading3",heading4:"heading4",heading5:"heading5",heading6:"heading6",paragraph:"paragraph",preformatted:"preformatted",strong:"strong",em:"em",listItem:"list-item",oListItem:"o-list-item",list:"group-list-item",oList:"group-o-list-item",image:"image",embed:"embed",hyperlink:"hyperlink",label:"label",span:"span"},OC=/["'&<>]/,Go=t=>{const e=""+t,n=OC.exec(e);if(!n)return e;let i,r="",s=0,o=0;for(s=n.index;s<e.length;s++){switch(e.charCodeAt(s)){case 34:i="&quot;";break;case 38:i="&amp;";break;case 39:i="&#39;";break;case 60:i="&lt;";break;case 62:i="&gt;";break;default:continue}o!==s&&(r+=e.substring(o,s)),o=s+1,r+=i}return o!==s?r+e.substring(o,s):r},Ms=t=>"data"in t&&"label"in t.data?` class="${t.data.label}"`:"",pn=(t,e,n)=>`<${t}${Ms(e)}>${n.join("")}</${t}>`,FC=t=>`<pre${Ms(t)}>${Go(t.text)}</pre>`,kC=(t,e)=>{let n=`<img src="${e.url}" alt="${Go(e.alt)}"${e.copyright?` copyright="${Go(e.copyright)}"`:""} />`;return e.linkTo&&(n=h0(t,{type:UC.hyperlink,data:e.linkTo,start:0,end:0},[n])),`<p class="block-img">${n}</p>`},BC=t=>`<div data-oembed="${t.oembed.embed_url}" data-oembed-type="${t.oembed.type}" data-oembed-provider="${t.oembed.provider_name}"${Ms(t)}>${t.oembed.html}</div>`,h0=(t,e,n)=>{switch(e.data.link_type){case Ki.Web:return`<a href="${Go(e.data.url)}" ${e.data.target?`target="${e.data.target}" `:""}rel="noopener noreferrer"${Ms(e)}>${n.join("")}</a>`;case Ki.Document:return`<a href="${ia(e.data,t)}"${Ms(e)}>${n.join("")}</a>`;case Ki.Media:return`<a href="${e.data.url}"${Ms(e)}>${n.join("")}</a>`}},HC=t=>t?Go(t).replace(/\n/g,"<br />"):"",Dp=t=>(e,n,i,r,s)=>{switch(n.type){case at.heading1:return pn("h1",n,r);case at.heading2:return pn("h2",n,r);case at.heading3:return pn("h3",n,r);case at.heading4:return pn("h4",n,r);case at.heading5:return pn("h5",n,r);case at.heading6:return pn("h6",n,r);case at.paragraph:return pn("p",n,r);case at.preformatted:return FC(n);case at.strong:return pn("strong",n,r);case at.em:return pn("em",n,r);case at.listItem:return pn("li",n,r);case at.oListItem:return pn("li",n,r);case at.list:return pn("ul",n,r);case at.oList:return pn("ol",n,r);case at.image:return kC(t,n);case at.embed:return BC(n);case at.hyperlink:return h0(t,n,r);case at.label:return pn("span",n,r);case at.span:default:return HC(i)}},zC=t=>{const e={};for(const n in t){const i=t[n];i&&(e[n]=r=>i({...r,children:r.children.join("")}))}return DC(e)},p0=(t,...e)=>{if(t){const[n,i]=e;let r;typeof n=="function"||n==null?r={linkResolver:n,serializer:i}:r={...n};let s;return r.serializer?s=NC(typeof r.serializer=="object"?zC(r.serializer):(o,a,l,c,u)=>r.serializer(o,a,l,c.join(""),u),Dp(r.linkResolver)):s=Dp(r.linkResolver),PC(t,s).join("")}else return null},VC=t=>t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),ra=(t,e)=>{const n=new URL(t);for(const r in e){const s=VC(r),o=e[r];o===void 0?n.searchParams.delete(s):Array.isArray(o)?n.searchParams.set(s,o.join(",")):n.searchParams.set(s,`${o}`)}const i=n.searchParams.get("s");return i&&(n.searchParams.delete("s"),n.searchParams.append("s",i)),n.toString()},GC=(t,{pixelDensities:e,...n})=>e.map(i=>`${ra(t,{...n,dpr:i})} ${i}x`).join(", "),Oc=(t,{widths:e,...n})=>e.map(i=>`${ra(t,{...n,w:void 0,width:i})} ${i}w`).join(", "),m0=(t,e={})=>t&&ec(t)?ra(t.url,e):null,Np=[640,828,1200,2048,3840],g0=(t,e={})=>{if(t&&ec(t)){let{widths:n=Np,...i}=e;const{url:r,dimensions:s,alt:o,copyright:a,...l}=t,c=Object.values(l);return n==="thumbnails"&&c.length<1&&(n=Np),{src:ra(r,i),srcset:n==="thumbnails"?[Oc(r,{...i,widths:[s.width]}),...c.map(u=>Oc(u.url,{...i,widths:[u.dimensions.width]}))].join(", "):Oc(t.url,{...i,widths:n})}}else return null},WC=[1,2,3],_0=(t,e={})=>{if(t&&ec(t)){const{pixelDensities:n=WC,...i}=e;return{src:ra(t.url,i),srcset:GC(t.url,{...i,pixelDensities:n})}}else return null},v0=Symbol("prismic"),$C=(t,e,n)=>{if(typeof t=="string")return e.default&&e.default(n);if(e.default){const i=e.default(n);return{...e,default:()=>i}}else return e},y0=t=>{const e=/^\/(?!\/)/.test(t),n=!e&&!/^https?:\/\//i.test(t);return e&&!n},zr=t=>Zo(t),Ks=()=>Ft(v0,{options:{endpoint:""}}),XC="router-link",jC="a",qC="noopener noreferrer",YC=t=>{const{options:e}=Ks(),n=He(()=>{var o,a;const l=pe(t.internalComponent)||((o=e.components)==null?void 0:o.linkInternalComponent)||XC,c=pe(t.externalComponent)||((a=e.components)==null?void 0:a.linkExternalComponent)||jC;return i.value&&y0(i.value)&&!r.value?l:c}),i=He(()=>{const o=pe(t.field),a=pe(t.linkResolver)??e.linkResolver;return ia(o,a)??""}),r=He(()=>{const o=pe(t.field),a=pe(t.target);return typeof a<"u"?a:o&&"target"in o&&o.target?o.target:null}),s=He(()=>{var o;const a=pe(t.rel);if(typeof a<"u")return a;if(r.value==="_blank"){const l=pe(t.blankTargetRelAttribute);return typeof l<"u"?l:typeof((o=e.components)==null?void 0:o.linkBlankTargetRelAttribute)<"u"?e.components.linkBlankTargetRelAttribute:qC}else return null});return{type:n,href:i,target:r,rel:s}},KC=$t({name:"PrismicLink",props:{field:{type:Object,required:!0},linkResolver:{type:Function,default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},blankTargetRelAttribute:{type:String,default:void 0,required:!1},internalComponent:{type:[String,Object,Function],default:void 0,required:!1},externalComponent:{type:[String,Object,Function],default:void 0,required:!1}},setup(t,{slots:e}){if(!t.field)return()=>null;const{type:n,href:i,target:r,rel:s}=YC(t);return()=>{const o=n.value==="a"?"a":zr(n.value),a=$C(o,e,Fn({href:i.value}));return typeof o=="string"?Et(o,{href:i.value,target:r.value,rel:s.value},a):Et(o,{to:i.value,target:r.value,rel:s.value},a)}}}),Up=KC,ZC="div",JC=$t({name:"PrismicEmbed",props:{field:{type:Object,required:!0},wrapper:{type:[String,Object,Function],default:void 0,required:!1}},setup(t){return t.field?()=>Et(zr(t.wrapper||ZC),{"data-oembed":t.field.embed_url,"data-oembed-type":t.field.type,"data-oembed-provider":t.field.provider_name,innerHTML:t.field.html||null}):()=>null}}),Op=JC,QC="img",e1=t=>{const{options:e}=Ks(),n=He(()=>{var a,l;const c=pe(t.field);if(!TC(c))return{src:null,srcset:null};const u=pe(t.imgixParams),f=pe(t.widths),h=pe(t.pixelDensities);return f?g0(c,{...u,widths:f==="defaults"?(a=e.components)==null?void 0:a.imageWidthSrcSetDefaults:f}):h?_0(c,{...u,pixelDensities:h==="defaults"?(l=e.components)==null?void 0:l.imagePixelDensitySrcSetDefaults:h}):{src:m0(c,u),srcset:null}}),i=He(()=>n.value.src),r=He(()=>n.value.srcset),s=He(()=>pe(t.field).alt||""),o=He(()=>pe(t.field).copyright||null);return{src:i,srcset:r,alt:s,copyright:o}},t1=$t({name:"PrismicImage",props:{field:{type:Object,required:!0},imageComponent:{type:[String,Object],default:void 0,required:!1},imgixParams:{type:Object,default:void 0,required:!1},widths:{type:[String,Object],default:void 0,required:!1},pixelDensities:{type:[String,Object],default:void 0,required:!1}},setup(t){if(!t.field)return()=>null;const{options:e}=Ks(),n=He(()=>{var a;return t.imageComponent||((a=e.components)==null?void 0:a.imageComponent)||QC}),{src:i,srcset:r,alt:s,copyright:o}=e1(t);return()=>{const a={src:i.value,srcset:r.value,alt:s.value};switch(n.value){case"img":return Et("img",a);default:return Et(zr(n.value),{...a,copyright:o.value})}}}}),Fp=t1,n1="div",i1=t=>({text:He(()=>{const n=pe(t.field);return l0(n)?d0(pe(n),pe(t.separator)):pe(t.fallback)??""})}),r1=$t({name:"PrismicText",props:{field:{type:Array,default:void 0,required:!1},separator:{type:String,default:void 0,required:!1},wrapper:{type:[String,Object,Function],default:void 0,required:!1},fallback:{type:String,default:void 0,required:!1}},setup(t){const{text:e}=i1(t);return()=>{const n=zr(t.wrapper||n1);return Et(n,null,{default:()=>e.value})}}}),kp=r1,s1="div",o1=t=>{const{options:e}=Ks();return{html:He(()=>{const i=pe(t.field);if(!l0(i))return pe(t.fallback)??"";const r=pe(t.linkResolver)??e.linkResolver,s=pe(t.serializer)??pe(t.htmlSerializer)??e.richTextSerializer??e.htmlSerializer;return p0(pe(i),r,s)})}},a1=$t({name:"PrismicRichText",props:{field:{type:Array,default:void 0,required:!1},linkResolver:{type:Function,default:void 0,required:!1},serializer:{type:[Function,Object],default:void 0,required:!1},htmlSerializer:{type:[Function,Object],default:void 0,required:!1},wrapper:{type:[String,Object,Function],default:void 0,required:!1},fallback:{type:String,default:void 0,required:!1}},setup(t){const{html:e}=o1(t),n=Ge(null),i=Ft(Qo,null);if(i){let r=[];const s=function(l){l.preventDefault(),i.push(this.href)},o=()=>{const l=n.value&&"$el"in n.value?n.value.$el:n.value;l&&"querySelectorAll"in l&&(r=Array.from(l.querySelectorAll("a")).map(c=>{const u=c.getAttribute("href");if(u&&y0(u)){const f=s.bind({href:u});return c.addEventListener("click",f),{element:c,listener:f}}else return!1}).filter(c=>c))},a=()=>{r.forEach(({element:l,listener:c})=>l.removeEventListener("click",c)),r=[]};Ot(e,()=>{a(),mi(o)},{immediate:!0}),Vr(()=>{a()})}return()=>Et(zr(t.wrapper||s1),{innerHTML:e.value,ref:n})}}),Bp=a1,l1=()=>null,c1=$t({name:"SliceZone",props:{slices:{type:Array,required:!0},components:{type:Object,default:void 0,required:!1},resolver:{type:Function,default:void 0,required:!1},context:{type:null,default:void 0,required:!1},defaultComponent:{type:Object,default:void 0,required:!1},wrapper:{type:[String,Object,Function],default:void 0,required:!1}},setup(t){if(!t.slices)return()=>null;const{options:e}=Ks(),n=He(()=>t.slices.map((i,r)=>{var s;const o="slice_type"in i?i.slice_type:i.type;let a=t.components&&o in t.components?t.components[o]:t.defaultComponent||((s=e.components)==null?void 0:s.sliceZoneDefaultComponent)||l1;if(t.resolver){const u=t.resolver({slice:i,sliceName:o,i:r});u&&(a=u)}const c={key:"id"in i&&i.id?i.id:`${r}-${JSON.stringify(i)}`,slice:i,index:r,context:t.context,slices:t.slices};return Et(zr(a),c)}));return()=>{if(t.wrapper){const i=zr(t.wrapper);return typeof i=="string"?Et(i,null,n.value):Et(i,null,{default:()=>n.value})}else return n.value}}}),Hp=c1,u1=t=>{let e;return t.client?e=t.client:e=SC(t.endpoint,{fetch:async(s,o)=>{let a;return typeof globalThis.fetch=="function"?a=globalThis.fetch:a=(await Tt(()=>import("./browser.e1d28cce.js").then(l=>l.b),[],import.meta.url)).default,await a(s,o)},...t.clientConfig}),{options:t,...{client:e,filter:ai,cookie:rC},...{asText:d0,asHTML:(s,...o)=>{const[a,l]=o;return p0(s,typeof a=="function"||a==null?{linkResolver:a||t.linkResolver,serializer:l||t.richTextSerializer||t.htmlSerializer}:{linkResolver:t.linkResolver,serializer:t.richTextSerializer||t.htmlSerializer,...a})},asLink:(s,o)=>ia(s,typeof o=="function"?{linkResolver:o}:{linkResolver:t.linkResolver,...o}),asLinkAttrs:(s,o)=>AC(s,{linkResolver:t.linkResolver,...o}),asDate:bC,asImageSrc:m0,asImageWidthSrcSet:g0,asImagePixelDensitySrcSet:_0,documentToLinkField:o0},install(s){s.provide(v0,this),s.config.globalProperties.$prismic=this,t.injectComponents!==!1&&(s.component(Up.name,Up),s.component(Op.name,Op),s.component(Fp.name,Fp),s.component(kp.name,kp),s.component(Bp.name,Bp),s.component(Hp.name,Hp))}}},f1=void 0,d1=void 0,h1=void 0,p1=ti(t=>{const e=Hl().public.prismic,n=u1({...e,client:f1,linkResolver:d1,richTextSerializer:h1,injectComponents:!1,components:{linkInternalComponent:Ds,linkExternalComponent:Ds,...e.components}});if(t.vueApp.use(n),e.preview){const i=Vh("io.prismic.preview").value;if(i)try{const r=typeof i=="string"?JSON.parse(decodeURIComponent(i)):i;Object.keys(r).some(s=>s in r&&typeof r[s]=="object"&&r[s]!==null&&"preview"in r[s]&&r[s].preview)&&Kf(()=>vv())}catch(r){console.warn("Failed to parse Prismic preview cookie",r)}}if(e.toolbar){const i=a0(e.endpoint)?mC(e.endpoint):e.endpoint;zl({script:[{key:"prismic-preview",src:`https://static.cdn.prismic.io/prismic.min.js?repo=${i}&new=true`,async:!0,defer:!0}]})}else Vh("io.prismic.preview").value=null;return{provide:{prismic:n}}}),m1=ti({name:"nuxt:chunk-reload",setup(t){const e=gi(),n=Hl(),i=new Set;e.beforeEach(()=>{i.clear()}),t.hook("app:chunkError",({error:r})=>{i.add(r)}),e.onError((r,s)=>{if(i.has(r)){const a="href"in s&&s.href.startsWith("#")?n.app.baseURL+s.href:Jo(n.app.baseURL,s.fullPath);jT({path:a,persistState:!0})}})}}),g1=[_M,wT,QT,ew,tw,nw,iw,JR,QR,p1,m1],_1=t=>Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0)),v1=(t,e)=>(n,i)=>(zl(()=>t({..._1(n),...i.attrs},i)),()=>{var r,s;return e?(s=(r=i.slots).default)==null?void 0:s.call(r):null}),y1={accesskey:String,autocapitalize:String,autofocus:{type:Boolean,default:void 0},class:[String,Object,Array],contenteditable:{type:Boolean,default:void 0},contextmenu:String,dir:String,draggable:{type:Boolean,default:void 0},enterkeyhint:String,exportparts:String,hidden:{type:Boolean,default:void 0},id:String,inputmode:String,is:String,itemid:String,itemprop:String,itemref:String,itemscope:String,itemtype:String,lang:String,nonce:String,part:String,slot:String,spellcheck:{type:Boolean,default:void 0},style:String,tabindex:String,title:String,translate:String},x1=$t({name:"Style",inheritAttrs:!1,props:{...y1,type:String,media:String,nonce:String,title:String,scoped:{type:Boolean,default:void 0},body:Boolean,renderPriority:[String,Number]},setup:v1((t,{slots:e})=>{var r,s,o;const n={...t},i=(o=(s=(r=e.default)==null?void 0:r.call(e))==null?void 0:s[0])==null?void 0:o.children;return i&&(n.children=i),{style:[n]}})}),S1=$t({name:"Head",inheritAttrs:!1,setup:(t,e)=>()=>{var n,i;return(i=(n=e.slots).default)==null?void 0:i.call(n)}});function E1(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function kO(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function i(){if(this instanceof i){var r=[null];r.push.apply(r,arguments);var s=Function.bind.apply(e,r);return new s}return e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(i){var r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:function(){return t[i]}})}),n}var b1=function(e){return M1(e)&&!T1(e)};function M1(t){return!!t&&typeof t=="object"}function T1(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||R1(t)}var w1=typeof Symbol=="function"&&Symbol.for,A1=w1?Symbol.for("react.element"):60103;function R1(t){return t.$$typeof===A1}function C1(t){return Array.isArray(t)?[]:{}}function Wo(t,e){return e.clone!==!1&&e.isMergeableObject(t)?Fs(C1(t),t,e):t}function L1(t,e,n){return t.concat(e).map(function(i){return Wo(i,n)})}function P1(t,e){if(!e.customMerge)return Fs;var n=e.customMerge(t);return typeof n=="function"?n:Fs}function I1(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function zp(t){return Object.keys(t).concat(I1(t))}function x0(t,e){try{return e in t}catch{return!1}}function D1(t,e){return x0(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function N1(t,e,n){var i={};return n.isMergeableObject(t)&&zp(t).forEach(function(r){i[r]=Wo(t[r],n)}),zp(e).forEach(function(r){D1(t,r)||(x0(t,r)&&n.isMergeableObject(e[r])?i[r]=P1(r,n)(t[r],e[r],n):i[r]=Wo(e[r],n))}),i}function Fs(t,e,n){n=n||{},n.arrayMerge=n.arrayMerge||L1,n.isMergeableObject=n.isMergeableObject||b1,n.cloneUnlessOtherwiseSpecified=Wo;var i=Array.isArray(e),r=Array.isArray(t),s=i===r;return s?i?n.arrayMerge(t,e,n):N1(t,e,n):Wo(e,n)}Fs.all=function(e,n){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(i,r){return Fs(i,r,n)},{})};var U1=Fs,S0=U1;const E0=E1(S0),O1=by({__proto__:null,default:E0},[S0]),b0={minify:!1,baseFontSize:16,smViewport:375,mdViewport:1440,lgViewport:1920,layout:{margin:{sm:20,md:72,lg:72},gutter:{sm:16,md:24,lg:24},columns:{sm:12,md:12,lg:12},max:void 0},spacing:{"2xs":{sm:6,md:8,lg:8},xs:{sm:12,md:16,lg:16},sm:{sm:18,md:24,lg:24},md:{sm:32,md:40,lg:40},lg:{sm:48,md:64,lg:64},xl:{sm:64,md:80,lg:80},"2xl":{sm:80,md:128,lg:128},"3xl":{sm:120,md:160,lg:160},"4xl":{sm:180,md:240,lg:240}},fontSize:{h1:{fontSize:{sm:24,md:50,lg:64},lineHeight:{sm:1.2,md:1.2,lg:1.2},letterSpacing:{sm:0,md:0,lg:0}},h2:{fontSize:{sm:32,md:50,lg:50},lineHeight:{sm:1.3,md:1.4,lg:1.4},letterSpacing:{sm:0,md:0,lg:0}},h3:{fontSize:{sm:28,md:38,lg:48},lineHeight:{sm:1.3,md:1.1,lg:1.1},letterSpacing:{sm:0,md:0,lg:0}},h4:{fontSize:{sm:24,md:32,lg:40},lineHeight:{sm:1.2,md:1.2,lg:1.2},letterSpacing:{sm:-.03,md:-.03,lg:-.03}},name:{fontSize:{sm:80,md:128,lg:140},lineHeight:{sm:1.5,md:1.5,lg:1.5},letterSpacing:{sm:0,md:0,lg:0}},"name-sm":{fontSize:{sm:60,md:120,lg:120},lineHeight:{sm:1.5,md:1.5,lg:1.5},letterSpacing:{sm:0,md:0,lg:0}},body:{fontSize:{sm:14,md:20,lg:24},lineHeight:{sm:1.5,md:1.5,lg:1.5},letterSpacing:{sm:0,md:0,lg:0}},underline:{fontSize:{sm:12,md:12,lg:12},lineHeight:{sm:1.5,md:1.5,lg:1.5},letterSpacing:{sm:0,md:0,lg:0}},quote:{fontSize:{sm:20,md:32,lg:40},lineHeight:{sm:1.3,md:1.3,lg:1.3},letterSpacing:{sm:0,md:0,lg:0}},intro:{fontSize:{sm:18,md:20,lg:20},lineHeight:{sm:1.5,md:1.4,lg:1.4},letterSpacing:{sm:-.01,md:-.01,lg:-.01}},"caption-sm":{fontSize:{sm:12,md:12,lg:14},lineHeight:{sm:1.4,md:1.4,lg:1.4},letterSpacing:{sm:.2,md:.2,lg:.2}},button:{fontSize:{sm:14,md:14,lg:16},lineHeight:{sm:1.4,md:1.4,lg:1.4},letterSpacing:{sm:0,md:0,lg:0}},placeholder:{fontSize:{sm:16,md:18,lg:18},lineHeight:{sm:1.5,md:1.5,lg:1.5},letterSpacing:{sm:0,md:0,lg:0}},tags:{fontSize:{sm:12,md:18,lg:18},lineHeight:{sm:1.4,md:1.4,lg:1.4},letterSpacing:{sm:0,md:0,lg:0}},copyright:{fontSize:{sm:12,md:14,lg:14},lineHeight:{sm:1,md:1,lg:1},letterSpacing:{sm:0,md:0,lg:0}}}};function St(t){return String(t).replace(/[^a-zA-Z0-9]/g,"-")}function F1(t){return Object.keys(typeof t=="object"?t:{}).reduce((e,n)=>(["fontSize","lineHeight","letterSpacing"].forEach(i=>{t[n][i]&&(e[i]||(e[i]={}),e[i][n]=t[n][i])}),e),{})}function oo(t){return JSON.parse(JSON.stringify(t))}const nc=(t,e)=>{const n=t.__vccOpts||t;for(const[i,r]of e)n[i]=r;return n},k1=E0||O1,{minify:Jt}=b0,M0=Ge({config:{}}),{config:xr}=M0.value,B1=HT({name:"ThemeConfiguration",key:"ThemeConfiguration",props:{config:{type:Object,default:()=>({})},cssLayer:{type:String,default:""}},computed:{compConfig(){let t=oo(b0);return Object.keys(this.config||{}).length&&(t=k1(t,oo(this.config))),t},cssText(){const{compConfig:t,extractColorRules:e,extractLayoutRules:n,extractFontRules:i,extractRules:r}=this,{baseFontSize:s,smViewport:o,mdViewport:a,lgViewport:l}=t;let c=[e(t==null?void 0:t.colors,"default"),e(t==null?void 0:t.backgroundColors,"background"),e(t==null?void 0:t.textColors,"text"),e(t==null?void 0:t.borderColors,"border"),n(t==null?void 0:t.layout),i(t==null?void 0:t.fontSize),i(t==null?void 0:t.fontStyles),r("spacing",t==null?void 0:t.spacing),r("horizontalSpacing",t==null?void 0:t.horizontalSpacing),r("verticalSpacing",t==null?void 0:t.verticalSpacing),r("borderRadius",t==null?void 0:t.borderRadius)],u=c.reduce((m,d)=>(m.push(...d.smToMdScreenRules||[]),m),[]).filter(Boolean),f=c.reduce((m,d)=>(m.push(...d.mdScreenRules||[]),m),[]).filter(Boolean),h=c.reduce((m,d)=>(m.push(...d.mdToLgScreenRules||[]),m),[]).filter(Boolean),p=c.reduce((m,d)=>(m.push(...d.lgScreenRules||[]),m),[]).filter(Boolean);c=c.reduce((m,d)=>(m.push(...d.rules||[]),m),[]).filter(Boolean),c.length&&(Jt||(c=c.map(m=>`  ${m}`)),c.unshift(":root {"),c.push("}")),u.length&&(Jt||(u=u.map(m=>`  ${m}`)),u.unshift(":root {"),u.push("}"),Jt||(u=u.map(m=>`  ${m}`)),u.unshift(`@media screen and (min-width: ${Math.round((o+a)/2/s*1e3)/1e3}em) {`),u.push("}")),f.length&&(Jt||(f=f.map(m=>`  ${m}`)),f.unshift(":root {"),f.push("}"),Jt||(f=f.map(m=>`  ${m}`)),f.unshift(`@media screen and (min-width: ${Math.round(a/s*1e3)/1e3}em) {`),f.push("}")),h.length&&(Jt||(h=h.map(m=>`  ${m}`)),h.unshift(":root {"),h.push("}"),Jt||(h=h.map(m=>`  ${m}`)),h.unshift(`@media screen and (min-width: ${Math.round((a+l)/2/s*1e3)/1e3}em) {`),h.push("}")),p.length&&(Jt||(p=p.map(m=>`  ${m}`)),p.unshift(":root {"),p.push("}"),Jt||(p=p.map(m=>`  ${m}`)),p.unshift(`@media screen and (min-width: ${Math.round(l/s*1e3)/1e3}em) {`),p.push("}"));const g=this.cssLayer?[`@layer ${this.cssLayer} {`]:[],_=this.cssLayer?["}"]:[];return Jt?[...g,...c,...u,...f,...h,...p,..._].join(""):[...g,...c,...u,...f,...h,...p,..._].join(`
`)}},watch:{compConfig:{deep:!0,immediate:!0,handler(t){Object.assign(M0.value.config,oo(t))}}},methods:{extractColorRules(t,e){t=oo(typeof t=="object"?t:{});const n=[];return Object.entries(t).forEach(([i,r])=>{!Jt&&!n.length&&n.push(`/* colors ${e?`- ${e} `:""}*/`);const s=String((r==null?void 0:r.value)??r).split(",").join(", ").split("  ").join(" ");n.push(`--theme-colors-${e?`${e}-`:""}${St(i)}: ${s};`)}),{rules:n,mdScreenRules:[],lgScreenRules:[]}},extractLayoutRules(t){t=oo(typeof t=="object"?t:{});const e=t.columns||{};delete t.columns;const n=t.max;delete t.max;const{rules:i=[],mdScreenRules:r=[],lgScreenRules:s=[]}=this.extractRules("layout",t);Jt||(!i.length&&i.push("/* layout */"),!r.length&&r.push("/* layout */"),!s.length&&s.push("/* layout */"));const{sm:o=0,md:a=0,lg:l=0}=e;if(o||a||l){const{gutter:c,margin:u}=t,{smViewport:f,mdViewport:h,lgViewport:p}=this.compConfig,g={sm:f,md:h,lg:p},_=(v,y)=>`--theme-layout-column--${v}: ${Math.round((g[v]-u[v]*2-c[v]*(y-1))/y*1e3)/1e3}px;`,m=v=>{const y=`(var(--visual-viewport-width, 100vw) - var(--theme-layout-margin, var(--theme-layout-margin--sm)) * 2 - var(--theme-layout-gutter, var(--theme-layout-gutter--sm)) * ${v-1}) / ${v}`;return typeof n>"u"?`--theme-layout-column-of-${v}: calc(${y});`:`--theme-layout-column-of-${v}: min(${y}, (${n}px - var(--theme-layout-margin, var(--theme-layout-margin--lg)) * 2 - var(--theme-layout-gutter, var(--theme-layout-gutter--lg)) * ${v-1}) / ${v});`};i.push(_("sm",o)),i.push(_("md",a)),i.push(_("lg",l));const d=[...new Set([o,a,l])];for(let v=0;v<d.length;v++){const y=d[v];i.push(m(y))}}return typeof n>"u"?i.push("--theme-layout-max: var(--visual-viewport-width, 100vw);"):i.push(`--theme-layout-max: ${n}px;`),Jt||(i.length===1&&i.pop(),r.length===1&&r.pop(),s.length===1&&s.pop()),{rules:i,mdScreenRules:r,lgScreenRules:s}},extractFontRules(t){t=typeof t=="object"?t:{},t=F1(t);const{baseFontSize:e}=this.compConfig,n={rules:[],smToMdScreenRules:[],mdScreenRules:[],mdToLgScreenRules:[]};return["fontSize"].forEach(i=>{if(t[i]){const r=this.extractRules(i,t[i],"rem",s=>Math.round(Number(s)/e*1e3)/1e3);n.rules.push(...r.rules),n.mdScreenRules.push(...r.mdScreenRules)}}),["letterSpacing"].forEach(i=>{if(t[i]){const r=[],s=[],o=[];for(const a in t[i]){const l=t[i][a];r.push(`--theme-letterSpacing-${St(a)}--sm: ${l.sm}em;`),r.push(`--theme-letterSpacing-${St(a)}--md: ${l.md}em;`),r.push(`--theme-letterSpacing-${St(a)}--lg: ${l.lg}em;`),r.push(`--theme-letterSpacing-${St(a)}: ${l.sm}em;`),l.md!==l.sm&&s.push(`--theme-letterSpacing-${St(a)}: ${l.md}em;`),l.lg!==l.md&&o.push(`--theme-letterSpacing-${St(a)}: ${l.lg}em;`)}Jt||(r.length&&r.unshift("/* letter spacing */"),s.length&&s.unshift("/* letter spacing */"),o.length&&o.unshift("/* letter spacing */")),n.rules.push(...r),n.smToMdScreenRules.push(...s),n.mdToLgScreenRules.push(...o)}}),["lineHeight"].forEach(i=>{if(t[i]){const r=[],s=[],o=[];for(const a in t[i]){const l=t[i][a];r.push(`--theme-lineHeight-${St(a)}--sm: ${l.sm};`),r.push(`--theme-lineHeight-${St(a)}--md: ${l.md};`),r.push(`--theme-lineHeight-${St(a)}--lg: ${l.lg};`),r.push(`--theme-lineHeight-${St(a)}: ${l.sm};`),l.md!==l.sm&&s.push(`--theme-lineHeight-${St(a)}: ${l.md};`),l.lg!==l.md&&o.push(`--theme-lineHeight-${St(a)}: ${l.lg};`)}Jt||(r.length&&r.unshift("/* line height */"),s.length&&s.unshift("/* line height */"),o.length&&o.unshift("/* line height */")),n.rules.push(...r),n.smToMdScreenRules.push(...s),n.mdToLgScreenRules.push(...o)}}),n},extractRules(t,e,n="px",i=r=>Number(r)){e=typeof e=="object"?e:{};const r=[],s=[],o=[];for(const a in e){const l=e[a];for(const p in l){const g=l[p];r.push(`--theme-${St(t)}-${St(a)}--${p}: ${i(g)}${n};`)}const c=["sm","md","lg"].every(p=>Object.keys(l).includes(p)),{smViewport:u,mdViewport:f,lgViewport:h}=this.compConfig;if(c){const{sm:p,md:g,lg:_}=l,m=d=>{const v=(g-p)/(f-u),y=p-v*u;return Math.round((v*d+y)*1e3)/1e3};if(p===g||u===f)r.push(`--theme-${St(t)}-${St(a)}: ${i(p)}${n};`);else{const d=Math.min(p,g),v=Math.max(p,g),y=g;r.push(`--theme-${St(t)}-${St(a)}: clamp(${i(d)}${n}, ${i(m(0)+(n==="rem"?y:0))}${n} + ${Math.round((v-d)/(f-u)*1e5)/1e3}vw - ${n==="rem"?y:0}px, ${i(v+(n==="rem"?y:0))}${n} - ${n==="rem"?y:0}px);`.split(" - 0px").join(""))}if(_!==g)if(h===f)r.push(`--theme-${St(t)}-${St(a)}: ${i(_)}${n};`);else{const d=S=>{const C=(_-g)/(h-f),R=g-C*f;return Math.round((C*S+R)*1e3)/1e3},v=Math.min(g,_),y=Math.max(g,_),x=g;s.push(`--theme-${St(t)}-${St(a)}: clamp(${i(v+(n==="rem"?x:0))}${n} - ${n==="rem"?x:0}px, ${i(d(0)+(n==="rem"?x:0))}${n} + ${Math.round((y-v)/(h-f)*1e5)/1e3}vw - ${n==="rem"?x:0}px, ${i(y)}${n});`.split(" - 0px").join(""))}}}return Jt?{rules:r,mdScreenRules:s,lgScreenRules:o}:{rules:r.length?[`/* ${t} */`,...r]:[],mdScreenRules:s.length?[`/* ${t} */`,...s]:[],lgScreenRules:o.length?[`/* ${t} */`,...o]:[]}}}},"$9Nlxk0UPpR");function H1(t,e,n,i,r,s){const o=x1,a=S1;return Xe(),yt(Lt,null,[t.cssText?(Xe(),nn(a,{key:0},{default:Ut(()=>[De(o,{type:"text/css",children:t.cssText},null,8,["children"])]),_:1})):hi("",!0),As(t.$slots,"default")],64)}const T0=nc(B1,[["render",H1]]),ao={_targets:[],_observer:null,addTarget(t,e){var n;(n=this._observer)==null||n.observe(t),this._targets.push({callback:e,element:t})},removeTarget(t){const e=this._targets.findIndex(n=>n.element==t);e!==-1&&(this._observer.unobserve(t),this._targets.splice(e,1))}},z1={name:"ScrollAnimationController",inheritAttrs:!1,props:{observerConfig:{type:Object,default:()=>({})}},mounted(){ao._observer=new IntersectionObserver(this.onIntersection,{...this.observerConfig}),ao._targets.forEach(t=>{ao._observer.observe(t==null?void 0:t.element)})},beforeUnmount(){ao._observer.disconnect()},methods:{onIntersection(t){t.forEach(e=>{var n,i;(i=(n=ao._targets.find(r=>r.element==e.target))==null?void 0:n.callback)==null||i.call(n,e)})}}},V1={key:0,class:"c-scroll-animation-controller"};function G1(t,e,n,i,r,s){return t.$slots.default?(Xe(),yt("div",V1,[As(t.$slots,"default")])):hi("",!0)}const w0=nc(z1,[["render",G1]]);function W1(...t){let[e,n,i,r]=[typeof t[1]=="string"?t.shift():void 0,...t];ei(()=>{setTimeout(()=>{e=A0(e),e==null||e.forEach(s=>s.addEventListener(n,i)),r&&i()})}),Vr(()=>{e==null||e.forEach(s=>s.removeEventListener(n,i))})}function A0(t){let e=[];return t??(t=window),t=[t].flat(),t.forEach(n=>{if(typeof n=="function"&&(n=n()),typeof n=="string"){e=e.concat([...document.querySelectorAll(n)]);return}if(Array.isArray(n)){e=e.concat(A0(n));return}if(ut(n)){e.push(n.value);return}e.push(n)}),e}const $1={key:1,class:Rt(["c-base-button__label","font-gt-america-extended text-button","duration-200 ease-smooth","whitespace-nowrap"])},X1={class:"duration-200 ease-smooth"},j1=["textContent"],q1={__name:"BaseButton",props:{tag:{type:String,default:"button"},size:{type:String,default:"md",validator:t=>["sm","md"].includes(t)},label:{type:String,required:!1},collapsed:{type:Boolean,default:!1},direction:{type:String,default:"ltr"},disabled:{type:Boolean,default:!1},theme:{type:String,default:"light",validator:t=>["light","dark"].includes(t)}},setup(t){const e=t,n=Ge(),i=Ge(),r=He(()=>e.tag=="NuxtLink"?Ds:e.tag);Ot(()=>e.label,s),W1("resize",s,!0);function s(){i.value=null,mi(()=>{const{width:o}=n.value.getBoundingClientRect();i.value=o})}return(o,a)=>{var l;return Xe(),nn(Zo(pe(r)),Fl({class:["c-base-button block",`c-base-button--${t.size}`,`c-base-button--${t.theme}`,"duration-200 ease-smooth","rounded-full w-fit",{"opacity-20 pointer-events-none":t.disabled,"c-base-button--rtl":t.direction=="rtl","c-base-button--has-icon":o.$slots.icon,"c-base-button--has-label":o.$slots.default||((l=t.label)==null?void 0:l.length)}]},t.disabled?{"aria-disabled":"true"}:{}),{default:Ut(()=>{var c,u;return[mt("div",{ref_key:"root",ref:n,class:Rt(["overflow-hidden group","duration-200 ease-smooth","flex items-center"])},[o.$slots.icon?(Xe(),yt("div",{key:0,class:Rt(["c-base-button__icon",{"order-2 -scale-x-[1]":t.direction=="rtl"}])},[De(ar,{name:"t-base-button-icon",mode:"out-in"},{default:Ut(()=>[As(o.$slots,"icon")]),_:3})],2)):hi("",!0),(c=t.label)!=null&&c.length||o.$slots.default?(Xe(),yt("div",$1,[mt("div",X1,[(u=t.label)!=null&&u.length?(Xe(),yt("span",{key:0,textContent:il(t.label)},null,8,j1)):As(o.$slots,"default",{key:1})])])):hi("",!0)],512)]}),_:3},16,["class"])}}},cd=q1;const Y1={__name:"ScopedColorTheme",props:{tag:{type:String,default:"div"},global:{type:Boolean,default:!1},theme:{type:String,default:"light",validator:t=>["light","dark"].includes(t)}},setup(t){const e=t,n=He(()=>e.tag=="NuxtLink"?Ds:e.tag);return e.global&&zl({bodyAttrs:{class:["c-scoped-color-theme",`c-scoped-color-theme--${e.theme}`]}}),(i,r)=>i.$slots.default?(Xe(),nn(Zo(pe(n)),{key:0,class:Rt(["c-scoped-color-theme",{[`c-scoped-color-theme--${t.theme}`]:!t.global}])},{default:Ut(()=>[As(i.$slots,"default")]),_:3},8,["class"])):hi("",!0)}},K1=Y1;function Z1(t){var e;return(e=t==null?void 0:t.locales.value)==null?void 0:e.find(n=>n.code===t.locale.value||n.code==t.defaultLocale)}function ud(){const{locale:t,locales:e}=dr(),n=He(()=>{var r;return((r=e.value.find(({code:s})=>s==t.value))==null?void 0:r.dir)??"ltr"});return{currentLocale:He(()=>{var r;return(r=e.value)==null?void 0:r.find(s=>{const{value:o,code:a,defaultLocale:l}=s;return o===a||o===l})}),direction:n,locale:t,locales:e}}async function J1(t,e=!0,n=!0){var o,a;const i=Ks(),r=dr(),s=await _v(`page__${t}`,()=>{var c;const l={};return e&&(l.lang=(c=Z1(r))==null?void 0:c.iso),i.client.getSingle(t,l)});if(n&&((o=s.error)!=null&&o.value))throw qs({statusCode:404,statusMessage:"Page not found"});return(a=s.data)==null?void 0:a.value}const Q1={viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false"},eL=mt("path",{d:"M4.00195 4 16.0009 15.9989M4.00195 16 16.0009 4.00106",stroke:"currentColor"},null,-1),tL=[eL];function nL(t,e){return Xe(),yt("svg",Q1,tL)}const R0={render:nL},ic=UT("main",{state:()=>({headerOpaque:!0,shareModalOpen:!1,lenis:null,timeline:{sourcesOpen:!1,sourcesViewButton:!1}}),actions:{setHeaderOpaque(t){this.headerOpaque=t},setHeaderLarge(t){this.headerLarge=t},setShareModalOpen(t){this.shareModalOpen=t},setLenisInstance(t){this.lenis=t},setTimelineSourcesOpen(t){this.timeline.sourcesOpen=t},setTimelineSourcesViewButton(t){this.timeline.sourcesViewButton=t}}});const iL={class:Rt(["c-share-modal__content relative","bg-opacity-100 bg-strong p-layout-margin py-2xl >=960:p-2xl"])},rL={__name:"ShareModal",async setup(t){let e,n;const i=Ge("ShareModalIntro"),r=Ge(null),s=ic(),{direction:o}=ud(),{data:a}=([e,n]=qx(()=>J1("share_modal")),e=await e,n(),e),l={ShareModalIntro:_a(()=>Tt(()=>import("./ShareModalIntro.759ef922.js"),["./ShareModalIntro.759ef922.js","./icon-arrow.f2baa589.js"],import.meta.url)),ShareModalSolidarity:_a(()=>Tt(()=>import("./ShareModalSolidarity.d5d6e6f1.js"),["./ShareModalSolidarity.d5d6e6f1.js","./audio.c2d916a2.js","./icon-arrow.f2baa589.js"],import.meta.url)),ShareModalStory:_a(()=>Tt(()=>import("./ShareModalStory.290c6192.js"),["./ShareModalStory.290c6192.js","./audio.c2d916a2.js","./icon-arrow.f2baa589.js"],import.meta.url)),ShareModalFinal:_a(()=>Tt(()=>import("./ShareModalFinal.cc930d6d.js"),[],import.meta.url))};function c(u,f){i.value=u,r.value=f}return Ot(()=>s.shareModalOpen,u=>u&&(i.value="ShareModalIntro")),(u,f)=>{const h=cd,p=K1;return Xe(),nn(ar,{name:"t-modal",duration:500,appear:""},{default:Ut(()=>[pe(s).shareModalOpen?(Xe(),nn(p,{key:0,class:Rt(["c-share-modal bg-transparent","fixed w-full h-full top-[0px] left-[0px]","pt-2xl <960:px-[0px] overflow-y-scroll overscroll-none","font-gt-america"])},{default:Ut(()=>[mt("div",iL,[De(h,{simple:"",class:Rt(["absolute top-2xl",{"right-layout-margin >=960:right-2xl":pe(o)=="ltr"||!pe(o),"left-layout-margin >=960:left-2xl":pe(o)=="rtl"}]),"aria-label":"Close modal",onClick:f[0]||(f[0]=()=>pe(s).setShareModalOpen(!1))},{icon:Ut(()=>[De(pe(R0))]),_:1},8,["class"]),De(ar,{name:"t-modal-content",mode:"out-in"},{default:Ut(()=>[(Xe(),nn(Zo(l[pe(i)]),Fl({key:pe(i),direction:pe(o).value,error:pe(r)},pe(a),{onSwitch:c}),null,16,["direction","error"]))]),_:1})])]),_:1})):hi("",!0)]),_:1})}}},C0=rL,sL=(t,e)=>e.path.replace(/(:\w+)\([^)]+\)/g,"$1").replace(/(:\w+)[?+*]/g,"$1").replace(/:\w+/g,n=>{var i;return((i=t.params[n.slice(1)])==null?void 0:i.toString())||""}),lf=(t,e)=>{const n=t.route.matched.find(r=>{var s;return((s=r.components)==null?void 0:s.default)===t.Component.type}),i=e??(n==null?void 0:n.meta.key)??(n&&sL(t.route,n));return typeof i=="function"?i(t.route):i},oL=(t,e)=>({default:()=>t?Et(Hx,t===!0?{}:t,e):e}),aL=$t({name:"RouteProvider",props:{vnode:{type:Object,required:!0},route:{type:Object,required:!0},vnodeRef:Object,renderKey:String,trackRootNodes:Boolean},setup(t){const e=t.renderKey,n=t.route,i={};for(const r in t.route)Object.defineProperty(i,r,{get:()=>e===t.renderKey?t.route[r]:n[r]});return bs(Vl,Yo(i)),()=>Et(t.vnode,{ref:t.vnodeRef})}}),lL=(t,e,n)=>(e=e===!0?{}:e,{default:()=>{var i;return e?Et(t,e,n):(i=n.default)==null?void 0:i.call(n)}}),cL=$t({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(t,{attrs:e,expose:n}){const i=ft(),r=Ge(),s=Ft(Vl,null);n({pageRef:r});const o=Ft(dM,null);let a;const l=i.deferHydration();return()=>Et(uv,{name:t.name,route:t.route,...e},{default:c=>{const u=dL(s,c.route,c.Component),f=s&&s.matched.length===c.route.matched.length;if(!c.Component)return a&&!f?a:void 0;if(a&&o&&!o.isCurrent(c.route))return a;if(u&&s&&(!o||o!=null&&o.isCurrent(s)))return f?a:null;const h=lf(c,t.pageKey),p=!!(t.transition??c.route.meta.pageTransition??Iu),g=p&&fL([t.transition,c.route.meta.pageTransition,Iu,{onAfterLeave:()=>{i.callHook("page:transition:finish",c.Component)}}].filter(Boolean));return a=lL(ar,p&&g,oL(t.keepalive??c.route.meta.keepalive??Kb,Et(qg,{suspensible:!0,onPending:()=>i.callHook("page:start",c.Component),onResolve:()=>{mi(()=>i.callHook("page:finish",c.Component).finally(l))}},{default:()=>Et(aL,{key:h,vnode:c.Component,route:c.route,renderKey:h,trackRootNodes:p,vnodeRef:r})}))).default(),a}})}});function uL(t){return Array.isArray(t)?t:t?[t]:[]}function fL(t){const e=t.map(n=>({...n,onAfterLeave:uL(n.onAfterLeave)}));return lM(...e)}function dL(t,e,n){if(!t)return!1;const i=e.matched.findIndex(r=>{var s;return((s=r.components)==null?void 0:s.default)===(n==null?void 0:n.type)});return!i||i===-1?!1:e.matched.slice(0,i).some((r,s)=>{var o,a,l;return((o=r.components)==null?void 0:o.default)!==((l=(a=t.matched[s])==null?void 0:a.components)==null?void 0:l.default)})||n&&lf({route:e,Component:n})!==lf({route:t,Component:n})}const hL={name:"DeveloperTools",data(){return{columnsActive:!1,themeConfigActive:!1}},computed:{active(){return this.columnsActive||this.themeConfigActive},themeConfig(){return xr},fontSizes(){return Object.entries((xr==null?void 0:xr.fontSize)??{}).map(e=>({name:e[0],data:e[1]}))},spacings(){return Object.entries((xr==null?void 0:xr.spacing)??{}).map(e=>({name:e[0],data:e[1]}))}},mounted(){window.addEventListener("keydown",this.onKeyDown)},beforeUnmount(){window.removeEventListener("keydown",this.onKeyDown)},methods:{onKeyDown({keyCode:t}){const{activeElement:e}=document;(e===document.body||e==null)&&t===71&&(this.columnsActive=!this.columnsActive)}}},pL={key:0,class:"c-developer-tools"},mL={key:0,class:Rt(["fixed top-0 left-0 w-screen h-screen","pointer-events-none z-50"])},gL={class:Rt(["w-full h-full max-w-layout-max","mx-auto px-layout-margin"])};function _L(t,e,n,i,r,s){return s.active?(Xe(),yt("div",pL,[r.columnsActive?(Xe(),yt("div",mL,[mt("div",gL,[mt("div",{class:"w-full h-full grid gap-x-layout-gutter",style:Un({"grid-template-columns":`repeat(${s.themeConfig.layout.columns.lg}, 1fr)`})},[(Xe(!0),yt(Lt,null,Hf(s.themeConfig.layout.columns.lg,o=>(Xe(),yt("div",{key:`column-${o}`,class:"bg-[#000] bg-opacity-5 h-full"}))),128))],4)])])):hi("",!0)])):hi("",!0)}const L0=nc(hL,[["render",_L]]),P0=$t({name:"DevOnly",setup(t,e){return()=>{var n,i;return(i=(n=e.slots).fallback)==null?void 0:i.call(n)}}});var ps=Math.pow;function vL(t,e,n,i,r){var s,o,a;let l=(s=r==null?void 0:r.precision)!=null?s:1024,c=(o=r==null?void 0:r.maxIterations)!=null?o:32,u=(a=r==null?void 0:r.maxErrorMargin)!=null?a:1/ps(10,8),f=(_,m,d)=>{let v=3*d*ps(1-d,2)*_,y=3*(1-d)*ps(d,2)*m;return v+y+ps(d,3)},h=_=>f(t,n,_),p=_=>f(e,i,_),g=new Array(l+1);for(let _=0;_<=l;_++){let m=_/l-.001,d=_/l+1/ps(10,3),v=0;for(let y=0;y<c;y++){let x=h(m)-_/l,S=h(d)-_/l;if(v=(m*S-d*x)/(S-x),m=d,d=v,Math.abs(h(v)-_/l)<u)break}g[_]=p(v)}return _=>{var m,d;if(_<=0)return 0;if(_>=1)return 1;let v=Math.floor(_*l),y=Math.ceil(_*l),x=v/l,S=y/l,C=(m=g[v])!=null?m:0,R=(d=g[y])!=null?d:1,I=(_-x)/(S-x)||0;return(R-C)*I+C}}var yL=vL;function xL(){let t=typeof performance<"u",e=(t?performance:Date).now();return{timeStart:e,timePrevious:e,get isPerformanceSupported(){return t},reset(){this.timeStart=this.getActualTime(),this.timePrevious=this.timeStart},getDelta(){this.timeStart==null&&(this.timeStart=this.getActualTime()),this.timePrevious==null&&(this.timePrevious=this.timeStart);let n=this.getActualTime(),i=n-this.timePrevious;return this.timePrevious=n,i},getElapsedTime(){return this.timeStart==null&&(this.timeStart=this.getActualTime()),this.timePrevious==null&&(this.timePrevious=this.timeStart),this.getActualTime()-this.timeStart},getActualTime(){return(this.isPerformanceSupported?performance:Date).now()}}}var SL=xL;function lo(t){return Array.isArray(t)?t:t.value}function cf(...t){return{value:t,add(e){let n=lo(e);return this.value.forEach((i,r)=>{this.value[r]=i+n[r]}),this},subtract(e){let n=lo(e);return this.value.forEach((i,r)=>{this.value[r]=i-n[r]}),this},multiply(e){let n=lo(e);return this.value.forEach((i,r)=>{this.value[r]=i*n[r]}),this},divide(e){let n=lo(e);return this.value.forEach((i,r)=>{this.value[r]=i/n[r]}),this},interpolate(e,n){let i=lo(e),r=Math.min(Math.max(n,0),1);return this.value.forEach((s,o)=>{i[o]!=null&&(this.value[o]=(1-r)*s+r*i[o])}),this},normalise(){let e=this.getDistance();return this.value.forEach((n,i)=>{this.value[i]=n/e}),this},getDistance(e){let n=e??cf(...new Array(this.value.length).fill(0)),i=this.value.reduce((r,s,o)=>r+ps(n.value[o]-s,2),0);return Math.sqrt(i)},clone(){return cf(...this.value)},toString(){return`Lab.Vector(${this.value.join(", ")})`}}}var EL=cf;function I0(t){const e=SL(),n=Ge(!1),i=()=>{t(e.getDelta(),e.getElapsedTime()),n.value&&window.requestAnimationFrame(i)};Ot(n,o=>o&&(e.getDelta(),i()));const r=()=>n.value=!1,s=()=>n.value=!0;return ei(s),Ii(r),{isRunning:n,start:s,stop:r}}function uf(){return uf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},uf.apply(this,arguments)}function Sl(t,e,n){return Math.max(t,Math.min(e,n))}class bL{advance(e){var n;if(!this.isRunning)return;let i=!1;if(this.lerp)this.value=(r=this.value,s=this.to,(1-(o=1-Math.exp(-60*this.lerp*e)))*r+o*s),Math.round(this.value)===this.to&&(this.value=this.to,i=!0);else{this.currentTime+=e;const a=Sl(0,this.currentTime/this.duration,1);i=a>=1;const l=i?1:this.easing(a);this.value=this.from+(this.to-this.from)*l}var r,s,o;(n=this.onUpdate)==null||n.call(this,this.value,i),i&&this.stop()}stop(){this.isRunning=!1}fromTo(e,n,{lerp:i=.1,duration:r=1,easing:s=l=>l,onStart:o,onUpdate:a}){this.from=this.value=e,this.to=n,this.lerp=i,this.duration=r,this.easing=s,this.currentTime=0,this.isRunning=!0,o==null||o(),this.onUpdate=a}}class ML{constructor({wrapper:e,content:n,autoResize:i=!0}={}){if(this.resize=()=>{this.onWrapperResize(),this.onContentResize()},this.onWrapperResize=()=>{this.wrapper===window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)},this.onContentResize=()=>{this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth},this.wrapper=e,this.content=n,i){const r=function(s,o){let a;return function(){let l=arguments,c=this;clearTimeout(a),a=setTimeout(function(){s.apply(c,l)},250)}}(this.resize);this.wrapper!==window&&(this.wrapperResizeObserver=new ResizeObserver(r),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(r),this.contentResizeObserver.observe(this.content)}this.resize()}destroy(){var e,n;(e=this.wrapperResizeObserver)==null||e.disconnect(),(n=this.contentResizeObserver)==null||n.disconnect()}get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}}class D0{constructor(){this.events={}}emit(e,...n){let i=this.events[e]||[];for(let r=0,s=i.length;r<s;r++)i[r](...n)}on(e,n){var i;return(i=this.events[e])!=null&&i.push(n)||(this.events[e]=[n]),()=>{var r;this.events[e]=(r=this.events[e])==null?void 0:r.filter(s=>n!==s)}}off(e,n){var i;this.events[e]=(i=this.events[e])==null?void 0:i.filter(r=>n!==r)}destroy(){this.events={}}}class TL{constructor(e,{wheelMultiplier:n=1,touchMultiplier:i=2,normalizeWheel:r=!1}){this.onTouchStart=s=>{const{clientX:o,clientY:a}=s.targetTouches?s.targetTouches[0]:s;this.touchStart.x=o,this.touchStart.y=a,this.lastDelta={x:0,y:0}},this.onTouchMove=s=>{const{clientX:o,clientY:a}=s.targetTouches?s.targetTouches[0]:s,l=-(o-this.touchStart.x)*this.touchMultiplier,c=-(a-this.touchStart.y)*this.touchMultiplier;this.touchStart.x=o,this.touchStart.y=a,this.lastDelta={x:l,y:c},this.emitter.emit("scroll",{deltaX:l,deltaY:c,event:s})},this.onTouchEnd=s=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:s})},this.onWheel=s=>{let{deltaX:o,deltaY:a}=s;this.normalizeWheel&&(o=Sl(-100,o,100),a=Sl(-100,a,100)),o*=this.wheelMultiplier,a*=this.wheelMultiplier,this.emitter.emit("scroll",{deltaX:o,deltaY:a,event:s})},this.element=e,this.wheelMultiplier=n,this.touchMultiplier=i,this.normalizeWheel=r,this.touchStart={x:null,y:null},this.emitter=new D0,this.element.addEventListener("wheel",this.onWheel,{passive:!1}),this.element.addEventListener("touchstart",this.onTouchStart,{passive:!1}),this.element.addEventListener("touchmove",this.onTouchMove,{passive:!1}),this.element.addEventListener("touchend",this.onTouchEnd,{passive:!1})}on(e,n){return this.emitter.on(e,n)}destroy(){this.emitter.destroy(),this.element.removeEventListener("wheel",this.onWheel,{passive:!1}),this.element.removeEventListener("touchstart",this.onTouchStart,{passive:!1}),this.element.removeEventListener("touchmove",this.onTouchMove,{passive:!1}),this.element.removeEventListener("touchend",this.onTouchEnd,{passive:!1})}}class wL{constructor({wrapper:e=window,content:n=document.documentElement,wheelEventsTarget:i=e,eventsTarget:r=i,smoothWheel:s=!0,smoothTouch:o=!1,syncTouch:a=!1,syncTouchLerp:l=.1,__iosNoInertiaSyncTouchLerp:c=.4,touchInertiaMultiplier:u=35,duration:f,easing:h=S=>Math.min(1,1.001-Math.pow(2,-10*S)),lerp:p=!f&&.1,infinite:g=!1,orientation:_="vertical",gestureOrientation:m="vertical",touchMultiplier:d=1,wheelMultiplier:v=1,normalizeWheel:y=!1,autoResize:x=!0}={}){this.onVirtualScroll=({deltaX:S,deltaY:C,event:R})=>{if(R.ctrlKey)return;const I=R.type.includes("touch"),b=R.type.includes("wheel");if(this.options.gestureOrientation==="both"&&S===0&&C===0||this.options.gestureOrientation==="vertical"&&C===0||this.options.gestureOrientation==="horizontal"&&S===0||I&&this.options.gestureOrientation==="vertical"&&this.scroll===0&&!this.options.infinite&&C<=0)return;let L=R.composedPath();if(L=L.slice(0,L.indexOf(this.rootElement)),L.find(D=>{var G;return(D.hasAttribute==null?void 0:D.hasAttribute("data-lenis-prevent"))||I&&(D.hasAttribute==null?void 0:D.hasAttribute("data-lenis-prevent-touch"))||b&&(D.hasAttribute==null?void 0:D.hasAttribute("data-lenis-prevent-wheel"))||((G=D.classList)==null?void 0:G.contains("lenis"))}))return;if(this.isStopped||this.isLocked)return void R.preventDefault();if(this.isSmooth=(this.options.smoothTouch||this.options.syncTouch)&&I||this.options.smoothWheel&&b,!this.isSmooth)return this.isScrolling=!1,void this.animate.stop();R.preventDefault();let B=C;this.options.gestureOrientation==="both"?B=Math.abs(C)>Math.abs(S)?C:S:this.options.gestureOrientation==="horizontal"&&(B=S);const U=I&&this.options.syncTouch,k=I&&R.type==="touchend"&&Math.abs(B)>1;k&&(B=this.velocity*this.options.touchInertiaMultiplier),this.scrollTo(this.targetScroll+B,uf({programmatic:!1},U&&{lerp:k?this.syncTouchLerp:this.options.__iosNoInertiaSyncTouchLerp}))},this.onNativeScroll=()=>{if(!this.__preventNextScrollEvent&&!this.isScrolling){const S=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.velocity=0,this.direction=Math.sign(this.animatedScroll-S),this.emit()}},window.lenisVersion="1.0.29",e!==document.documentElement&&e!==document.body||(e=window),this.options={wrapper:e,content:n,wheelEventsTarget:i,eventsTarget:r,smoothWheel:s,smoothTouch:o,syncTouch:a,syncTouchLerp:l,__iosNoInertiaSyncTouchLerp:c,touchInertiaMultiplier:u,duration:f,easing:h,lerp:p,infinite:g,gestureOrientation:m,orientation:_,touchMultiplier:d,wheelMultiplier:v,normalizeWheel:y,autoResize:x},this.animate=new bL,this.emitter=new D0,this.dimensions=new ML({wrapper:e,content:n,autoResize:x}),this.toggleClass("lenis",!0),this.velocity=0,this.isLocked=!1,this.isStopped=!1,this.isSmooth=a||s||o,this.isScrolling=!1,this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll,{passive:!1}),this.virtualScroll=new TL(r,{touchMultiplier:d,wheelMultiplier:v,normalizeWheel:y}),this.virtualScroll.on("scroll",this.onVirtualScroll)}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll,{passive:!1}),this.virtualScroll.destroy(),this.dimensions.destroy(),this.toggleClass("lenis",!1),this.toggleClass("lenis-smooth",!1),this.toggleClass("lenis-scrolling",!1),this.toggleClass("lenis-stopped",!1),this.toggleClass("lenis-locked",!1)}on(e,n){return this.emitter.on(e,n)}off(e,n){return this.emitter.off(e,n)}setScroll(e){this.isHorizontal?this.rootElement.scrollLeft=e:this.rootElement.scrollTop=e}resize(){this.dimensions.resize()}emit(){this.emitter.emit("scroll",this)}reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.velocity=0,this.animate.stop()}start(){this.isStopped=!1,this.reset()}stop(){this.isStopped=!0,this.animate.stop(),this.reset()}raf(e){const n=e-(this.time||e);this.time=e,this.animate.advance(.001*n)}scrollTo(e,{offset:n=0,immediate:i=!1,lock:r=!1,duration:s=this.options.duration,easing:o=this.options.easing,lerp:a=!s&&this.options.lerp,onComplete:l=null,force:c=!1,programmatic:u=!0}={}){if(!this.isStopped&&!this.isLocked||c){if(["top","left","start"].includes(e))e=0;else if(["bottom","right","end"].includes(e))e=this.limit;else{var f;let h;if(typeof e=="string"?h=document.querySelector(e):(f=e)!=null&&f.nodeType&&(h=e),h){if(this.options.wrapper!==window){const g=this.options.wrapper.getBoundingClientRect();n-=this.isHorizontal?g.left:g.top}const p=h.getBoundingClientRect();e=(this.isHorizontal?p.left:p.top)+this.animatedScroll}}if(typeof e=="number"){if(e+=n,e=Math.round(e),this.options.infinite?u&&(this.targetScroll=this.animatedScroll=this.scroll):e=Sl(0,e,this.limit),i)return this.animatedScroll=this.targetScroll=e,this.setScroll(this.scroll),this.reset(),void(l==null||l(this));if(!u){if(e===this.targetScroll)return;this.targetScroll=e}this.animate.fromTo(this.animatedScroll,e,{duration:s,easing:o,lerp:a,onStart:()=>{r&&(this.isLocked=!0),this.isScrolling=!0},onUpdate:(h,p)=>{this.isScrolling=!0,this.velocity=h-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=h,this.setScroll(this.scroll),u&&(this.targetScroll=h),p||this.emit(),p&&(this.reset(),this.emit(),l==null||l(this),this.__preventNextScrollEvent=!0,requestAnimationFrame(()=>{delete this.__preventNextScrollEvent}))}})}}}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return this.options.orientation==="horizontal"}get actualScroll(){return this.isHorizontal?this.rootElement.scrollLeft:this.rootElement.scrollTop}get scroll(){return this.options.infinite?(this.animatedScroll%(e=this.limit)+e)%e:this.animatedScroll;var e}get progress(){return this.limit===0?1:this.scroll/this.limit}get isSmooth(){return this.__isSmooth}set isSmooth(e){this.__isSmooth!==e&&(this.__isSmooth=e,this.toggleClass("lenis-smooth",e))}get isScrolling(){return this.__isScrolling}set isScrolling(e){this.__isScrolling!==e&&(this.__isScrolling=e,this.toggleClass("lenis-scrolling",e))}get isStopped(){return this.__isStopped}set isStopped(e){this.__isStopped!==e&&(this.__isStopped=e,this.toggleClass("lenis-stopped",e))}get isLocked(){return this.__isLocked}set isLocked(e){this.__isLocked!==e&&(this.__isLocked=e,this.toggleClass("lenis-locked",e))}get className(){let e="lenis";return this.isStopped&&(e+=" lenis-stopped"),this.isLocked&&(e+=" lenis-locked"),this.isScrolling&&(e+=" lenis-scrolling"),this.isSmooth&&(e+=" lenis-smooth"),e}toggleClass(e,n){this.rootElement.classList.toggle(e,n),this.emitter.emit("className change",this)}}const AL={id:"main"},RL=mt("div",{class:"u-page-transition-overlay"},null,-1),CL={__name:"app",setup(t){const e=ic(),{direction:n}=ud();let i;ei(()=>{i=new wL({duration:.8,easing:s=>s===1?1:1-Math.pow(2,-10*s),autoResize:!0,smooth:!0,smoothTouch:!1}),e.setLenisInstance(i)}),I0((s,o)=>i.raf(Math.round(o)));const r={name:"t-page",mode:"in-out",duration:1e3,onBeforeLeave:()=>{const s=document.querySelector("[data-page]"),o=window.scrollY;s&&(s.style.overflow="hidden",s.style.width="100dvw",s.style.height="100dvh",s.scrollTop=o)},onAfterEnter:()=>{i.resize()}};return(s,o)=>{const a=T0,l=w0,c=C0,u=cL,f=L0,h=P0;return Xe(),yt("div",{style:Un(`--dir: ${pe(n)}`)},[De(a),De(l),De(c),mt("main",AL,[De(u,Fl({transition:r},{class:"u-page-transition-target","data-page":""}),null,16),RL]),De(h,null,{default:Ut(()=>[De(f)]),_:1})],4)}}},LL=CL;/**
 * @license
 * Copyright 2010-2023 Three.js Authors
 * SPDX-License-Identifier: MIT
 */const fd="159",PL=0,Vp=1,IL=2,N0=1,DL=2,Ti=3,cr=0,vn=1,Ai=2,Ci=0,Ts=1,Gp=2,Wp=3,$p=4,NL=5,Cr=100,UL=101,OL=102,Xp=103,jp=104,FL=200,kL=201,BL=202,HL=203,ff=204,df=205,zL=206,VL=207,GL=208,WL=209,$L=210,XL=211,jL=212,qL=213,YL=214,KL=0,ZL=1,JL=2,El=3,QL=4,eP=5,tP=6,nP=7,U0=0,iP=1,rP=2,ir=0,sP=1,oP=2,aP=3,lP=4,cP=5,O0=300,ks=301,Bs=302,hf=303,pf=304,rc=306,mf=1e3,Kn=1001,gf=1002,un=1003,qp=1004,Fc=1005,In=1006,uP=1007,$o=1008,rr=1009,fP=1010,dP=1011,dd=1012,F0=1013,Zi=1014,Ji=1015,Hs=1016,k0=1017,B0=1018,Ur=1020,hP=1021,Zn=1023,pP=1024,mP=1025,Or=1026,zs=1027,gP=1028,H0=1029,_P=1030,z0=1031,V0=1033,kc=33776,Bc=33777,Hc=33778,zc=33779,Yp=35840,Kp=35841,Zp=35842,Jp=35843,G0=36196,Qp=37492,em=37496,tm=37808,nm=37809,im=37810,rm=37811,sm=37812,om=37813,am=37814,lm=37815,cm=37816,um=37817,fm=37818,dm=37819,hm=37820,pm=37821,Vc=36492,mm=36494,gm=36495,vP=36283,_m=36284,vm=36285,ym=36286,W0=3e3,Fr=3001,yP=3200,xP=3201,SP=0,EP=1,Dn="",jt="srgb",Ni="srgb-linear",hd="display-p3",sc="display-p3-linear",bl="linear",_t="srgb",Ml="rec709",Tl="p3",Zr=7680,xm=519,bP=512,MP=513,TP=514,$0=515,wP=516,AP=517,RP=518,CP=519,Sm=35044,Em="300 es",_f=1035,Ri=2e3,wl=2001;class Zs{addEventListener(e,n){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(n)===-1&&i[e].push(n)}hasEventListener(e,n){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(n)!==-1}removeEventListener(e,n){if(this._listeners===void 0)return;const r=this._listeners[e];if(r!==void 0){const s=r.indexOf(n);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 Qt=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],Gc=Math.PI/180,vf=180/Math.PI;function sa(){const t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(Qt[t&255]+Qt[t>>8&255]+Qt[t>>16&255]+Qt[t>>24&255]+"-"+Qt[e&255]+Qt[e>>8&255]+"-"+Qt[e>>16&15|64]+Qt[e>>24&255]+"-"+Qt[n&63|128]+Qt[n>>8&255]+"-"+Qt[n>>16&255]+Qt[n>>24&255]+Qt[i&255]+Qt[i>>8&255]+Qt[i>>16&255]+Qt[i>>24&255]).toLowerCase()}function _n(t,e,n){return Math.max(e,Math.min(n,t))}function LP(t,e){return(t%e+e)%e}function Wc(t,e,n){return(1-n)*t+n*e}function bm(t){return(t&t-1)===0&&t!==0}function yf(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function co(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function mn(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}class ot{constructor(e=0,n=0){ot.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const n=this.x,i=this.y,r=e.elements;return this.x=r[0]*n+r[3]*i+r[6],this.y=r[1]*n+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(n,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 n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(e)/n;return Math.acos(_n(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,i=this.y-e.y;return n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const i=Math.cos(n),r=Math.sin(n),s=this.x-e.x,o=this.y-e.y;return this.x=s*i-o*r+e.x,this.y=s*r+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Ze{constructor(e,n,i,r,s,o,a,l,c){Ze.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,i,r,s,o,a,l,c)}set(e,n,i,r,s,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=r,u[2]=a,u[3]=n,u[4]=s,u[5]=l,u[6]=i,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,i=e.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],this}extractBasis(e,n,i){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const i=e.elements,r=n.elements,s=this.elements,o=i[0],a=i[3],l=i[6],c=i[1],u=i[4],f=i[7],h=i[2],p=i[5],g=i[8],_=r[0],m=r[3],d=r[6],v=r[1],y=r[4],x=r[7],S=r[2],C=r[5],R=r[8];return s[0]=o*_+a*v+l*S,s[3]=o*m+a*y+l*C,s[6]=o*d+a*x+l*R,s[1]=c*_+u*v+f*S,s[4]=c*m+u*y+f*C,s[7]=c*d+u*x+f*R,s[2]=h*_+p*v+g*S,s[5]=h*m+p*y+g*C,s[8]=h*d+p*x+g*R,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return n*o*u-n*a*c-i*s*u+i*a*l+r*s*c-r*o*l}invert(){const e=this.elements,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=u*o-a*c,h=a*l-u*s,p=c*s-o*l,g=n*f+i*h+r*p;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/g;return e[0]=f*_,e[1]=(r*c-u*i)*_,e[2]=(a*i-r*o)*_,e[3]=h*_,e[4]=(u*n-r*l)*_,e[5]=(r*s-a*n)*_,e[6]=p*_,e[7]=(i*l-c*n)*_,e[8]=(o*n-i*s)*_,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,i,r,s,o,a){const l=Math.cos(s),c=Math.sin(s);return this.set(i*l,i*c,-i*(l*o+c*a)+o+e,-r*c,r*l,-r*(-c*o+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply($c.makeScale(e,n)),this}rotate(e){return this.premultiply($c.makeRotation(-e)),this}translate(e,n){return this.premultiply($c.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,-i,0,i,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,i=e.elements;for(let r=0;r<9;r++)if(n[r]!==i[r])return!1;return!0}fromArray(e,n=0){for(let i=0;i<9;i++)this.elements[i]=e[i+n];return this}toArray(e=[],n=0){const i=this.elements;return e[n]=i[0],e[n+1]=i[1],e[n+2]=i[2],e[n+3]=i[3],e[n+4]=i[4],e[n+5]=i[5],e[n+6]=i[6],e[n+7]=i[7],e[n+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const $c=new Ze;function X0(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}function Xo(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function PP(){const t=Xo("canvas");return t.style.display="block",t}const Mm={};function Po(t){t in Mm||(Mm[t]=!0,console.warn(t))}const Tm=new Ze().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),wm=new Ze().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Pa={[Ni]:{transfer:bl,primaries:Ml,toReference:t=>t,fromReference:t=>t},[jt]:{transfer:_t,primaries:Ml,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[sc]:{transfer:bl,primaries:Tl,toReference:t=>t.applyMatrix3(wm),fromReference:t=>t.applyMatrix3(Tm)},[hd]:{transfer:_t,primaries:Tl,toReference:t=>t.convertSRGBToLinear().applyMatrix3(wm),fromReference:t=>t.applyMatrix3(Tm).convertLinearToSRGB()}},IP=new Set([Ni,sc]),dt={enabled:!0,_workingColorSpace:Ni,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(t){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!t},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!IP.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const i=Pa[e].toReference,r=Pa[n].fromReference;return r(i(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return Pa[t].primaries},getTransfer:function(t){return t===Dn?bl:Pa[t].transfer}};function ws(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function Xc(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let Jr;class j0{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Jr===void 0&&(Jr=Xo("canvas")),Jr.width=e.width,Jr.height=e.height;const i=Jr.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),n=Jr}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.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 n=Xo("canvas");n.width=e.width,n.height=e.height;const i=n.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),s=r.data;for(let o=0;o<s.length;o++)s[o]=ws(s[o]/255)*255;return i.putImageData(r,0,0),n}else if(e.data){const n=e.data.slice(0);for(let i=0;i<n.length;i++)n instanceof Uint8Array||n instanceof Uint8ClampedArray?n[i]=Math.floor(ws(n[i]/255)*255):n[i]=ws(n[i]);return{data:n,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let DP=0;class q0{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:DP++}),this.uuid=sa(),this.data=e,this.version=0}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const n=e===void 0||typeof e=="string";if(!n&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const i={uuid:this.uuid,url:""},r=this.data;if(r!==null){let s;if(Array.isArray(r)){s=[];for(let o=0,a=r.length;o<a;o++)r[o].isDataTexture?s.push(jc(r[o].image)):s.push(jc(r[o]))}else s=jc(r);i.url=s}return n||(e.images[this.uuid]=i),i}}function jc(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap?j0.getDataURL(t):t.data?{data:Array.from(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let NP=0;class yn extends Zs{constructor(e=yn.DEFAULT_IMAGE,n=yn.DEFAULT_MAPPING,i=Kn,r=Kn,s=In,o=$o,a=Zn,l=rr,c=yn.DEFAULT_ANISOTROPY,u=Dn){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:NP++}),this.uuid=sa(),this.name="",this.source=new q0(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=i,this.wrapT=r,this.magFilter=s,this.minFilter=o,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new ot(0,0),this.repeat=new ot(1,1),this.center=new ot(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ze,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,typeof u=="string"?this.colorSpace=u:(Po("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=u===Fr?jt:Dn),this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}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 n=e===void 0||typeof e=="string";if(!n&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const i={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),n||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==O0)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case mf:e.x=e.x-Math.floor(e.x);break;case Kn:e.x=e.x<0?0:1;break;case gf: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 mf:e.y=e.y-Math.floor(e.y);break;case Kn:e.y=e.y<0?0:1;break;case gf:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Po("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===jt?Fr:W0}set encoding(e){Po("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===Fr?jt:Dn}}yn.DEFAULT_IMAGE=null;yn.DEFAULT_MAPPING=O0;yn.DEFAULT_ANISOTROPY=1;class qt{constructor(e=0,n=0,i=0,r=1){qt.prototype.isVector4=!0,this.x=e,this.y=n,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,i,r){return this.x=e,this.y=n,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const n=this.x,i=this.y,r=this.z,s=this.w,o=e.elements;return this.x=o[0]*n+o[4]*i+o[8]*r+o[12]*s,this.y=o[1]*n+o[5]*i+o[9]*r+o[13]*s,this.z=o[2]*n+o[6]*i+o[10]*r+o[14]*s,this.w=o[3]*n+o[7]*i+o[11]*r+o[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,i,r,s;const l=e.elements,c=l[0],u=l[4],f=l[8],h=l[1],p=l[5],g=l[9],_=l[2],m=l[6],d=l[10];if(Math.abs(u-h)<.01&&Math.abs(f-_)<.01&&Math.abs(g-m)<.01){if(Math.abs(u+h)<.1&&Math.abs(f+_)<.1&&Math.abs(g+m)<.1&&Math.abs(c+p+d-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const y=(c+1)/2,x=(p+1)/2,S=(d+1)/2,C=(u+h)/4,R=(f+_)/4,I=(g+m)/4;return y>x&&y>S?y<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(y),r=C/i,s=R/i):x>S?x<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(x),i=C/r,s=I/r):S<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(S),i=R/s,r=I/s),this.set(i,r,s,n),this}let v=Math.sqrt((m-g)*(m-g)+(f-_)*(f-_)+(h-u)*(h-u));return Math.abs(v)<.001&&(v=1),this.x=(m-g)/v,this.y=(f-_)/v,this.z=(h-u)/v,this.w=Math.acos((c+p+d-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,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(n,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,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this.z=e.z+(n.z-e.z)*i,this.w=e.w+(n.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class UP extends Zs{constructor(e=1,n=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new qt(0,0,e,n),this.scissorTest=!1,this.viewport=new qt(0,0,e,n);const r={width:e,height:n,depth:1};i.encoding!==void 0&&(Po("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),i.colorSpace=i.encoding===Fr?jt:Dn),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:In,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},i),this.texture=new yn(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=i.generateMipmaps,this.texture.internalFormat=i.internalFormat,this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.depthTexture=i.depthTexture,this.samples=i.samples}setSize(e,n,i=1){(this.width!==e||this.height!==n||this.depth!==i)&&(this.width=e,this.height=n,this.depth=i,this.texture.image.width=e,this.texture.image.height=n,this.texture.image.depth=i,this.dispose()),this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const n=Object.assign({},e.texture.image);return this.texture.source=new q0(n),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 ur extends UP{constructor(e=1,n=1,i={}){super(e,n,i),this.isWebGLRenderTarget=!0}}class Y0 extends yn{constructor(e=null,n=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:i,depth:r},this.magFilter=un,this.minFilter=un,this.wrapR=Kn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class OP extends yn{constructor(e=null,n=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:i,depth:r},this.magFilter=un,this.minFilter=un,this.wrapR=Kn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class oa{constructor(e=0,n=0,i=0,r=1){this.isQuaternion=!0,this._x=e,this._y=n,this._z=i,this._w=r}static slerpFlat(e,n,i,r,s,o,a){let l=i[r+0],c=i[r+1],u=i[r+2],f=i[r+3];const h=s[o+0],p=s[o+1],g=s[o+2],_=s[o+3];if(a===0){e[n+0]=l,e[n+1]=c,e[n+2]=u,e[n+3]=f;return}if(a===1){e[n+0]=h,e[n+1]=p,e[n+2]=g,e[n+3]=_;return}if(f!==_||l!==h||c!==p||u!==g){let m=1-a;const d=l*h+c*p+u*g+f*_,v=d>=0?1:-1,y=1-d*d;if(y>Number.EPSILON){const S=Math.sqrt(y),C=Math.atan2(S,d*v);m=Math.sin(m*C)/S,a=Math.sin(a*C)/S}const x=a*v;if(l=l*m+h*x,c=c*m+p*x,u=u*m+g*x,f=f*m+_*x,m===1-a){const S=1/Math.sqrt(l*l+c*c+u*u+f*f);l*=S,c*=S,u*=S,f*=S}}e[n]=l,e[n+1]=c,e[n+2]=u,e[n+3]=f}static multiplyQuaternionsFlat(e,n,i,r,s,o){const a=i[r],l=i[r+1],c=i[r+2],u=i[r+3],f=s[o],h=s[o+1],p=s[o+2],g=s[o+3];return e[n]=a*g+u*f+l*p-c*h,e[n+1]=l*g+u*h+c*f-a*p,e[n+2]=c*g+u*p+a*h-l*f,e[n+3]=u*g-a*f-l*h-c*p,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,i,r){return this._x=e,this._y=n,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n){const i=e._x,r=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(i/2),u=a(r/2),f=a(s/2),h=l(i/2),p=l(r/2),g=l(s/2);switch(o){case"XYZ":this._x=h*u*f+c*p*g,this._y=c*p*f-h*u*g,this._z=c*u*g+h*p*f,this._w=c*u*f-h*p*g;break;case"YXZ":this._x=h*u*f+c*p*g,this._y=c*p*f-h*u*g,this._z=c*u*g-h*p*f,this._w=c*u*f+h*p*g;break;case"ZXY":this._x=h*u*f-c*p*g,this._y=c*p*f+h*u*g,this._z=c*u*g+h*p*f,this._w=c*u*f-h*p*g;break;case"ZYX":this._x=h*u*f-c*p*g,this._y=c*p*f+h*u*g,this._z=c*u*g-h*p*f,this._w=c*u*f+h*p*g;break;case"YZX":this._x=h*u*f+c*p*g,this._y=c*p*f+h*u*g,this._z=c*u*g-h*p*f,this._w=c*u*f-h*p*g;break;case"XZY":this._x=h*u*f-c*p*g,this._y=c*p*f-h*u*g,this._z=c*u*g+h*p*f,this._w=c*u*f+h*p*g;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return n!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const i=n/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,i=n[0],r=n[4],s=n[8],o=n[1],a=n[5],l=n[9],c=n[2],u=n[6],f=n[10],h=i+a+f;if(h>0){const p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(u-l)*p,this._y=(s-c)*p,this._z=(o-r)*p}else if(i>a&&i>f){const p=2*Math.sqrt(1+i-a-f);this._w=(u-l)/p,this._x=.25*p,this._y=(r+o)/p,this._z=(s+c)/p}else if(a>f){const p=2*Math.sqrt(1+a-i-f);this._w=(s-c)/p,this._x=(r+o)/p,this._y=.25*p,this._z=(l+u)/p}else{const p=2*Math.sqrt(1+f-i-a);this._w=(o-r)/p,this._x=(s+c)/p,this._y=(l+u)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let i=e.dot(n)+1;return i<Number.EPSILON?(i=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(_n(this.dot(e),-1,1)))}rotateTowards(e,n){const i=this.angleTo(e);if(i===0)return this;const r=Math.min(1,n/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const i=e._x,r=e._y,s=e._z,o=e._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=i*u+o*a+r*c-s*l,this._y=r*u+o*l+s*a-i*c,this._z=s*u+o*c+i*l-r*a,this._w=o*u-i*a-r*l-s*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const i=this._x,r=this._y,s=this._z,o=this._w;let a=o*e._w+i*e._x+r*e._y+s*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=r,this._z=s,this;const l=1-a*a;if(l<=Number.EPSILON){const p=1-n;return this._w=p*o+n*this._w,this._x=p*i+n*this._x,this._y=p*r+n*this._y,this._z=p*s+n*this._z,this.normalize(),this._onChangeCallback(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),f=Math.sin((1-n)*u)/c,h=Math.sin(n*u)/c;return this._w=o*f+this._w*h,this._x=i*f+this._x*h,this._y=r*f+this._y*h,this._z=s*f+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,n,i){return this.copy(e).slerp(n,i)}random(){const e=Math.random(),n=Math.sqrt(1-e),i=Math.sqrt(e),r=2*Math.PI*Math.random(),s=2*Math.PI*Math.random();return this.set(n*Math.cos(r),i*Math.sin(s),i*Math.cos(s),n*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this}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 J{constructor(e=0,n=0,i=0){J.prototype.isVector3=!0,this.x=e,this.y=n,this.z=i}set(e,n,i){return i===void 0&&(i=this.z),this.x=e,this.y=n,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}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,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(Am.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(Am.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*n+s[3]*i+s[6]*r,this.y=s[1]*n+s[4]*i+s[7]*r,this.z=s[2]*n+s[5]*i+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,i=this.y,r=this.z,s=e.elements,o=1/(s[3]*n+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*n+s[4]*i+s[8]*r+s[12])*o,this.y=(s[1]*n+s[5]*i+s[9]*r+s[13])*o,this.z=(s[2]*n+s[6]*i+s[10]*r+s[14])*o,this}applyQuaternion(e){const n=this.x,i=this.y,r=this.z,s=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*r-a*i),u=2*(a*n-s*r),f=2*(s*i-o*n);return this.x=n+l*c+o*f-a*u,this.y=i+l*u+a*c-s*f,this.z=r+l*f+s*u-o*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*n+s[4]*i+s[8]*r,this.y=s[1]*n+s[5]*i+s[9]*r,this.z=s[2]*n+s[6]*i+s[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(n,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,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this.z=e.z+(n.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const i=e.x,r=e.y,s=e.z,o=n.x,a=n.y,l=n.z;return this.x=r*l-s*a,this.y=s*o-i*l,this.z=i*a-r*o,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const i=e.dot(this)/n;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return qc.copy(this).projectOnVector(e),this.sub(qc)}reflect(e){return this.sub(qc.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(e)/n;return Math.acos(_n(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return n*n+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,i){const r=Math.sin(n)*e;return this.x=r*Math.sin(i),this.y=Math.cos(n)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,i){return this.x=e*Math.sin(n),this.y=i,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=i,this.z=r,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,n=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(n),this.y=i*Math.sin(n),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const qc=new J,Am=new oa;class aa{constructor(e=new J(1/0,1/0,1/0),n=new J(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,i=e.length;n<i;n+=3)this.expandByPoint(zn.fromArray(e,n));return this}setFromBufferAttribute(e){this.makeEmpty();for(let n=0,i=e.count;n<i;n++)this.expandByPoint(zn.fromBufferAttribute(e,n));return this}setFromPoints(e){this.makeEmpty();for(let n=0,i=e.length;n<i;n++)this.expandByPoint(e[n]);return this}setFromCenterAndSize(e,n){const i=zn.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}setFromObject(e,n=!1){return this.makeEmpty(),this.expandByObject(e,n)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,n=!1){e.updateWorldMatrix(!1,!1);const i=e.geometry;if(i!==void 0){const s=i.getAttribute("position");if(n===!0&&s!==void 0&&e.isInstancedMesh!==!0)for(let o=0,a=s.count;o<a;o++)e.isMesh===!0?e.getVertexPosition(o,zn):zn.fromBufferAttribute(s,o),zn.applyMatrix4(e.matrixWorld),this.expandByPoint(zn);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Ia.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),Ia.copy(i.boundingBox)),Ia.applyMatrix4(e.matrixWorld),this.union(Ia)}const r=e.children;for(let s=0,o=r.length;s<o;s++)this.expandByObject(r[s],n);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,zn),zn.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,i;return e.normal.x>0?(n=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),n<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(uo),Da.subVectors(this.max,uo),Qr.subVectors(e.a,uo),es.subVectors(e.b,uo),ts.subVectors(e.c,uo),zi.subVectors(es,Qr),Vi.subVectors(ts,es),Sr.subVectors(Qr,ts);let n=[0,-zi.z,zi.y,0,-Vi.z,Vi.y,0,-Sr.z,Sr.y,zi.z,0,-zi.x,Vi.z,0,-Vi.x,Sr.z,0,-Sr.x,-zi.y,zi.x,0,-Vi.y,Vi.x,0,-Sr.y,Sr.x,0];return!Yc(n,Qr,es,ts,Da)||(n=[1,0,0,0,1,0,0,0,1],!Yc(n,Qr,es,ts,Da))?!1:(Na.crossVectors(zi,Vi),n=[Na.x,Na.y,Na.z],Yc(n,Qr,es,ts,Da))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,zn).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(zn).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:(xi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),xi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),xi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),xi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),xi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),xi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),xi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),xi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(xi),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 xi=[new J,new J,new J,new J,new J,new J,new J,new J],zn=new J,Ia=new aa,Qr=new J,es=new J,ts=new J,zi=new J,Vi=new J,Sr=new J,uo=new J,Da=new J,Na=new J,Er=new J;function Yc(t,e,n,i,r){for(let s=0,o=t.length-3;s<=o;s+=3){Er.fromArray(t,s);const a=r.x*Math.abs(Er.x)+r.y*Math.abs(Er.y)+r.z*Math.abs(Er.z),l=e.dot(Er),c=n.dot(Er),u=i.dot(Er);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const FP=new aa,fo=new J,Kc=new J;class pd{constructor(e=new J,n=-1){this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const i=this.center;n!==void 0?i.copy(n):FP.setFromPoints(e).getCenter(i);let r=0;for(let s=0,o=e.length;s<o;s++)r=Math.max(r,i.distanceToSquared(e[s]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const n=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=n*n}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,n){const i=this.center.distanceToSquared(e);return n.copy(e),i>this.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;fo.subVectors(e,this.center);const n=fo.lengthSq();if(n>this.radius*this.radius){const i=Math.sqrt(n),r=(i-this.radius)*.5;this.center.addScaledVector(fo,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):(Kc.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(fo.copy(e.center).add(Kc)),this.expandByPoint(fo.copy(e.center).sub(Kc))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const Si=new J,Zc=new J,Ua=new J,Gi=new J,Jc=new J,Oa=new J,Qc=new J;class kP{constructor(e=new J,n=new J(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Si)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const i=n.dot(this.direction);return i<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=Si.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(Si.copy(this.origin).addScaledVector(this.direction,n),Si.distanceToSquared(e))}distanceSqToSegment(e,n,i,r){Zc.copy(e).add(n).multiplyScalar(.5),Ua.copy(n).sub(e).normalize(),Gi.copy(this.origin).sub(Zc);const s=e.distanceTo(n)*.5,o=-this.direction.dot(Ua),a=Gi.dot(this.direction),l=-Gi.dot(Ua),c=Gi.lengthSq(),u=Math.abs(1-o*o);let f,h,p,g;if(u>0)if(f=o*l-a,h=o*a-l,g=s*u,f>=0)if(h>=-g)if(h<=g){const _=1/u;f*=_,h*=_,p=f*(f+o*h+2*a)+h*(o*f+h+2*l)+c}else h=s,f=Math.max(0,-(o*h+a)),p=-f*f+h*(h+2*l)+c;else h=-s,f=Math.max(0,-(o*h+a)),p=-f*f+h*(h+2*l)+c;else h<=-g?(f=Math.max(0,-(-o*s+a)),h=f>0?-s:Math.min(Math.max(-s,-l),s),p=-f*f+h*(h+2*l)+c):h<=g?(f=0,h=Math.min(Math.max(-s,-l),s),p=h*(h+2*l)+c):(f=Math.max(0,-(o*s+a)),h=f>0?s:Math.min(Math.max(-s,-l),s),p=-f*f+h*(h+2*l)+c);else h=o>0?-s:s,f=Math.max(0,-(o*h+a)),p=-f*f+h*(h+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,f),r&&r.copy(Zc).addScaledVector(Ua,h),p}intersectSphere(e,n){Si.subVectors(e.center,this.origin);const i=Si.dot(this.direction),r=Si.dot(Si)-i*i,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/n;return i>=0?i:null}intersectPlane(e,n){const i=this.distanceToPlane(e);return i===null?null:this.at(i,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let i,r,s,o,a,l;const c=1/this.direction.x,u=1/this.direction.y,f=1/this.direction.z,h=this.origin;return c>=0?(i=(e.min.x-h.x)*c,r=(e.max.x-h.x)*c):(i=(e.max.x-h.x)*c,r=(e.min.x-h.x)*c),u>=0?(s=(e.min.y-h.y)*u,o=(e.max.y-h.y)*u):(s=(e.max.y-h.y)*u,o=(e.min.y-h.y)*u),i>o||s>r||((s>i||isNaN(i))&&(i=s),(o<r||isNaN(r))&&(r=o),f>=0?(a=(e.min.z-h.z)*f,l=(e.max.z-h.z)*f):(a=(e.max.z-h.z)*f,l=(e.min.z-h.z)*f),i>l||a>r)||((a>i||i!==i)&&(i=a),(l<r||r!==r)&&(r=l),r<0)?null:this.at(i>=0?i:r,n)}intersectsBox(e){return this.intersectBox(e,Si)!==null}intersectTriangle(e,n,i,r,s){Jc.subVectors(n,e),Oa.subVectors(i,e),Qc.crossVectors(Jc,Oa);let o=this.direction.dot(Qc),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Gi.subVectors(this.origin,e);const l=a*this.direction.dot(Oa.crossVectors(Gi,Oa));if(l<0)return null;const c=a*this.direction.dot(Jc.cross(Gi));if(c<0||l+c>o)return null;const u=-a*Gi.dot(Qc);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 Kt{constructor(e,n,i,r,s,o,a,l,c,u,f,h,p,g,_,m){Kt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,n,i,r,s,o,a,l,c,u,f,h,p,g,_,m)}set(e,n,i,r,s,o,a,l,c,u,f,h,p,g,_,m){const d=this.elements;return d[0]=e,d[4]=n,d[8]=i,d[12]=r,d[1]=s,d[5]=o,d[9]=a,d[13]=l,d[2]=c,d[6]=u,d[10]=f,d[14]=h,d[3]=p,d[7]=g,d[11]=_,d[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Kt().fromArray(this.elements)}copy(e){const n=this.elements,i=e.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],n[9]=i[9],n[10]=i[10],n[11]=i[11],n[12]=i[12],n[13]=i[13],n[14]=i[14],n[15]=i[15],this}copyPosition(e){const n=this.elements,i=e.elements;return n[12]=i[12],n[13]=i[13],n[14]=i[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,i){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,n,i){return this.set(e.x,n.x,i.x,0,e.y,n.y,i.y,0,e.z,n.z,i.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,i=e.elements,r=1/ns.setFromMatrixColumn(e,0).length(),s=1/ns.setFromMatrixColumn(e,1).length(),o=1/ns.setFromMatrixColumn(e,2).length();return n[0]=i[0]*r,n[1]=i[1]*r,n[2]=i[2]*r,n[3]=0,n[4]=i[4]*s,n[5]=i[5]*s,n[6]=i[6]*s,n[7]=0,n[8]=i[8]*o,n[9]=i[9]*o,n[10]=i[10]*o,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,i=e.x,r=e.y,s=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(r),c=Math.sin(r),u=Math.cos(s),f=Math.sin(s);if(e.order==="XYZ"){const h=o*u,p=o*f,g=a*u,_=a*f;n[0]=l*u,n[4]=-l*f,n[8]=c,n[1]=p+g*c,n[5]=h-_*c,n[9]=-a*l,n[2]=_-h*c,n[6]=g+p*c,n[10]=o*l}else if(e.order==="YXZ"){const h=l*u,p=l*f,g=c*u,_=c*f;n[0]=h+_*a,n[4]=g*a-p,n[8]=o*c,n[1]=o*f,n[5]=o*u,n[9]=-a,n[2]=p*a-g,n[6]=_+h*a,n[10]=o*l}else if(e.order==="ZXY"){const h=l*u,p=l*f,g=c*u,_=c*f;n[0]=h-_*a,n[4]=-o*f,n[8]=g+p*a,n[1]=p+g*a,n[5]=o*u,n[9]=_-h*a,n[2]=-o*c,n[6]=a,n[10]=o*l}else if(e.order==="ZYX"){const h=o*u,p=o*f,g=a*u,_=a*f;n[0]=l*u,n[4]=g*c-p,n[8]=h*c+_,n[1]=l*f,n[5]=_*c+h,n[9]=p*c-g,n[2]=-c,n[6]=a*l,n[10]=o*l}else if(e.order==="YZX"){const h=o*l,p=o*c,g=a*l,_=a*c;n[0]=l*u,n[4]=_-h*f,n[8]=g*f+p,n[1]=f,n[5]=o*u,n[9]=-a*u,n[2]=-c*u,n[6]=p*f+g,n[10]=h-_*f}else if(e.order==="XZY"){const h=o*l,p=o*c,g=a*l,_=a*c;n[0]=l*u,n[4]=-f,n[8]=c*u,n[1]=h*f+_,n[5]=o*u,n[9]=p*f-g,n[2]=g*f-p,n[6]=a*u,n[10]=_*f+h}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(BP,e,HP)}lookAt(e,n,i){const r=this.elements;return En.subVectors(e,n),En.lengthSq()===0&&(En.z=1),En.normalize(),Wi.crossVectors(i,En),Wi.lengthSq()===0&&(Math.abs(i.z)===1?En.x+=1e-4:En.z+=1e-4,En.normalize(),Wi.crossVectors(i,En)),Wi.normalize(),Fa.crossVectors(En,Wi),r[0]=Wi.x,r[4]=Fa.x,r[8]=En.x,r[1]=Wi.y,r[5]=Fa.y,r[9]=En.y,r[2]=Wi.z,r[6]=Fa.z,r[10]=En.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const i=e.elements,r=n.elements,s=this.elements,o=i[0],a=i[4],l=i[8],c=i[12],u=i[1],f=i[5],h=i[9],p=i[13],g=i[2],_=i[6],m=i[10],d=i[14],v=i[3],y=i[7],x=i[11],S=i[15],C=r[0],R=r[4],I=r[8],b=r[12],L=r[1],B=r[5],U=r[9],k=r[13],D=r[2],G=r[6],$=r[10],j=r[14],oe=r[3],se=r[7],he=r[11],me=r[15];return s[0]=o*C+a*L+l*D+c*oe,s[4]=o*R+a*B+l*G+c*se,s[8]=o*I+a*U+l*$+c*he,s[12]=o*b+a*k+l*j+c*me,s[1]=u*C+f*L+h*D+p*oe,s[5]=u*R+f*B+h*G+p*se,s[9]=u*I+f*U+h*$+p*he,s[13]=u*b+f*k+h*j+p*me,s[2]=g*C+_*L+m*D+d*oe,s[6]=g*R+_*B+m*G+d*se,s[10]=g*I+_*U+m*$+d*he,s[14]=g*b+_*k+m*j+d*me,s[3]=v*C+y*L+x*D+S*oe,s[7]=v*R+y*B+x*G+S*se,s[11]=v*I+y*U+x*$+S*he,s[15]=v*b+y*k+x*j+S*me,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],i=e[4],r=e[8],s=e[12],o=e[1],a=e[5],l=e[9],c=e[13],u=e[2],f=e[6],h=e[10],p=e[14],g=e[3],_=e[7],m=e[11],d=e[15];return g*(+s*l*f-r*c*f-s*a*h+i*c*h+r*a*p-i*l*p)+_*(+n*l*p-n*c*h+s*o*h-r*o*p+r*c*u-s*l*u)+m*(+n*c*f-n*a*p-s*o*f+i*o*p+s*a*u-i*c*u)+d*(-r*a*u-n*l*f+n*a*h+r*o*f-i*o*h+i*l*u)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,i){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=n,r[14]=i),this}invert(){const e=this.elements,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],p=e[11],g=e[12],_=e[13],m=e[14],d=e[15],v=f*m*c-_*h*c+_*l*p-a*m*p-f*l*d+a*h*d,y=g*h*c-u*m*c-g*l*p+o*m*p+u*l*d-o*h*d,x=u*_*c-g*f*c+g*a*p-o*_*p-u*a*d+o*f*d,S=g*f*l-u*_*l-g*a*h+o*_*h+u*a*m-o*f*m,C=n*v+i*y+r*x+s*S;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const R=1/C;return e[0]=v*R,e[1]=(_*h*s-f*m*s-_*r*p+i*m*p+f*r*d-i*h*d)*R,e[2]=(a*m*s-_*l*s+_*r*c-i*m*c-a*r*d+i*l*d)*R,e[3]=(f*l*s-a*h*s-f*r*c+i*h*c+a*r*p-i*l*p)*R,e[4]=y*R,e[5]=(u*m*s-g*h*s+g*r*p-n*m*p-u*r*d+n*h*d)*R,e[6]=(g*l*s-o*m*s-g*r*c+n*m*c+o*r*d-n*l*d)*R,e[7]=(o*h*s-u*l*s+u*r*c-n*h*c-o*r*p+n*l*p)*R,e[8]=x*R,e[9]=(g*f*s-u*_*s-g*i*p+n*_*p+u*i*d-n*f*d)*R,e[10]=(o*_*s-g*a*s+g*i*c-n*_*c-o*i*d+n*a*d)*R,e[11]=(u*a*s-o*f*s-u*i*c+n*f*c+o*i*p-n*a*p)*R,e[12]=S*R,e[13]=(u*_*r-g*f*r+g*i*h-n*_*h-u*i*m+n*f*m)*R,e[14]=(g*a*r-o*_*r-g*i*l+n*_*l+o*i*m-n*a*m)*R,e[15]=(o*f*r-u*a*r+u*i*l-n*f*l-o*i*h+n*a*h)*R,this}scale(e){const n=this.elements,i=e.x,r=e.y,s=e.z;return n[0]*=i,n[4]*=r,n[8]*=s,n[1]*=i,n[5]*=r,n[9]*=s,n[2]*=i,n[6]*=r,n[10]*=s,n[3]*=i,n[7]*=r,n[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,i,r))}makeTranslation(e,n,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,i,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,n,-i,0,0,i,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,0,i,0,0,1,0,0,-i,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,-i,0,0,i,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const i=Math.cos(n),r=Math.sin(n),s=1-i,o=e.x,a=e.y,l=e.z,c=s*o,u=s*a;return this.set(c*o+i,c*a-r*l,c*l+r*a,0,c*a+r*l,u*a+i,u*l-r*o,0,c*l-r*a,u*l+r*o,s*l*l+i,0,0,0,0,1),this}makeScale(e,n,i){return this.set(e,0,0,0,0,n,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,n,i,r,s,o){return this.set(1,i,s,0,e,1,o,0,n,r,1,0,0,0,0,1),this}compose(e,n,i){const r=this.elements,s=n._x,o=n._y,a=n._z,l=n._w,c=s+s,u=o+o,f=a+a,h=s*c,p=s*u,g=s*f,_=o*u,m=o*f,d=a*f,v=l*c,y=l*u,x=l*f,S=i.x,C=i.y,R=i.z;return r[0]=(1-(_+d))*S,r[1]=(p+x)*S,r[2]=(g-y)*S,r[3]=0,r[4]=(p-x)*C,r[5]=(1-(h+d))*C,r[6]=(m+v)*C,r[7]=0,r[8]=(g+y)*R,r[9]=(m-v)*R,r[10]=(1-(h+_))*R,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,n,i){const r=this.elements;let s=ns.set(r[0],r[1],r[2]).length();const o=ns.set(r[4],r[5],r[6]).length(),a=ns.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],Vn.copy(this);const c=1/s,u=1/o,f=1/a;return Vn.elements[0]*=c,Vn.elements[1]*=c,Vn.elements[2]*=c,Vn.elements[4]*=u,Vn.elements[5]*=u,Vn.elements[6]*=u,Vn.elements[8]*=f,Vn.elements[9]*=f,Vn.elements[10]*=f,n.setFromRotationMatrix(Vn),i.x=s,i.y=o,i.z=a,this}makePerspective(e,n,i,r,s,o,a=Ri){const l=this.elements,c=2*s/(n-e),u=2*s/(i-r),f=(n+e)/(n-e),h=(i+r)/(i-r);let p,g;if(a===Ri)p=-(o+s)/(o-s),g=-2*o*s/(o-s);else if(a===wl)p=-o/(o-s),g=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=f,l[12]=0,l[1]=0,l[5]=u,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=p,l[14]=g,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,i,r,s,o,a=Ri){const l=this.elements,c=1/(n-e),u=1/(i-r),f=1/(o-s),h=(n+e)*c,p=(i+r)*u;let g,_;if(a===Ri)g=(o+s)*f,_=-2*f;else if(a===wl)g=s*f,_=-1*f;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-p,l[2]=0,l[6]=0,l[10]=_,l[14]=-g,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const n=this.elements,i=e.elements;for(let r=0;r<16;r++)if(n[r]!==i[r])return!1;return!0}fromArray(e,n=0){for(let i=0;i<16;i++)this.elements[i]=e[i+n];return this}toArray(e=[],n=0){const i=this.elements;return e[n]=i[0],e[n+1]=i[1],e[n+2]=i[2],e[n+3]=i[3],e[n+4]=i[4],e[n+5]=i[5],e[n+6]=i[6],e[n+7]=i[7],e[n+8]=i[8],e[n+9]=i[9],e[n+10]=i[10],e[n+11]=i[11],e[n+12]=i[12],e[n+13]=i[13],e[n+14]=i[14],e[n+15]=i[15],e}}const ns=new J,Vn=new Kt,BP=new J(0,0,0),HP=new J(1,1,1),Wi=new J,Fa=new J,En=new J,Rm=new Kt,Cm=new oa;class oc{constructor(e=0,n=0,i=0,r=oc.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=i,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,i,r=this._order){return this._x=e,this._y=n,this._z=i,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,i=!0){const r=e.elements,s=r[0],o=r[4],a=r[8],l=r[1],c=r[5],u=r[9],f=r[2],h=r[6],p=r[10];switch(n){case"XYZ":this._y=Math.asin(_n(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-_n(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,p),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(_n(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,p),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-_n(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(_n(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(a,p));break;case"XZY":this._z=Math.asin(-_n(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-u,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,i){return Rm.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Rm,n,i)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return Cm.setFromEuler(this),this.setFromQuaternion(Cm,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}oc.DEFAULT_ORDER="XYZ";class K0{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 zP=0;const Lm=new J,is=new oa,Ei=new Kt,ka=new J,ho=new J,VP=new J,GP=new oa,Pm=new J(1,0,0),Im=new J(0,1,0),Dm=new J(0,0,1),WP={type:"added"},$P={type:"removed"};class wn extends Zs{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:zP++}),this.uuid=sa(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=wn.DEFAULT_UP.clone();const e=new J,n=new oc,i=new oa,r=new J(1,1,1);function s(){i.setFromEuler(n,!1)}function o(){n.setFromQuaternion(i,void 0,!1)}n._onChange(s),i._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new Kt},normalMatrix:{value:new Ze}}),this.matrix=new Kt,this.matrixWorld=new Kt,this.matrixAutoUpdate=wn.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=wn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new K0,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,n){this.quaternion.setFromAxisAngle(e,n)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,n){return is.setFromAxisAngle(e,n),this.quaternion.multiply(is),this}rotateOnWorldAxis(e,n){return is.setFromAxisAngle(e,n),this.quaternion.premultiply(is),this}rotateX(e){return this.rotateOnAxis(Pm,e)}rotateY(e){return this.rotateOnAxis(Im,e)}rotateZ(e){return this.rotateOnAxis(Dm,e)}translateOnAxis(e,n){return Lm.copy(e).applyQuaternion(this.quaternion),this.position.add(Lm.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(Pm,e)}translateY(e){return this.translateOnAxis(Im,e)}translateZ(e){return this.translateOnAxis(Dm,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(Ei.copy(this.matrixWorld).invert())}lookAt(e,n,i){e.isVector3?ka.copy(e):ka.set(e,n,i);const r=this.parent;this.updateWorldMatrix(!0,!1),ho.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Ei.lookAt(ho,ka,this.up):Ei.lookAt(ka,ho,this.up),this.quaternion.setFromRotationMatrix(Ei),r&&(Ei.extractRotation(r.matrixWorld),is.setFromRotationMatrix(Ei),this.quaternion.premultiply(is.invert()))}add(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.parent!==null&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(WP)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const n=this.children.indexOf(e);return n!==-1&&(e.parent=null,this.children.splice(n,1),e.dispatchEvent($P)),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),Ei.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),Ei.multiply(e.parent.matrixWorld)),e.applyMatrix4(Ei),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,n){if(this[e]===n)return this;for(let i=0,r=this.children.length;i<r;i++){const o=this.children[i].getObjectByProperty(e,n);if(o!==void 0)return o}}getObjectsByProperty(e,n,i=[]){this[e]===n&&i.push(this);const r=this.children;for(let s=0,o=r.length;s<o;s++)r[s].getObjectsByProperty(e,n,i);return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ho,e,VP),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ho,GP,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const n=this.matrixWorld.elements;return e.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(e){e(this);const n=this.children;for(let i=0,r=n.length;i<r;i++)n[i].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const n=this.children;for(let i=0,r=n.length;i<r;i++)n[i].traverseVisible(e)}traverseAncestors(e){const n=this.parent;n!==null&&(e(n),n.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const n=this.children;for(let i=0,r=n.length;i<r;i++){const s=n[i];(s.matrixWorldAutoUpdate===!0||e===!0)&&s.updateMatrixWorld(e)}}updateWorldMatrix(e,n){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),n===!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 n=e===void 0||typeof e=="string",i={};n&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});const r={};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.castShadow===!0&&(r.castShadow=!0),this.receiveShadow===!0&&(r.receiveShadow=!0),this.visible===!1&&(r.visible=!1),this.frustumCulled===!1&&(r.frustumCulled=!1),this.renderOrder!==0&&(r.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.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(n){const a=o(e.geometries),l=o(e.materials),c=o(e.textures),u=o(e.images),f=o(e.shapes),h=o(e.skeletons),p=o(e.animations),g=o(e.nodes);a.length>0&&(i.geometries=a),l.length>0&&(i.materials=l),c.length>0&&(i.textures=c),u.length>0&&(i.images=u),f.length>0&&(i.shapes=f),h.length>0&&(i.skeletons=h),p.length>0&&(i.animations=p),g.length>0&&(i.nodes=g)}return i.object=r,i;function o(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let i=0;i<e.children.length;i++){const r=e.children[i];this.add(r.clone())}return this}}wn.DEFAULT_UP=new J(0,1,0);wn.DEFAULT_MATRIX_AUTO_UPDATE=!0;wn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Gn=new J,bi=new J,eu=new J,Mi=new J,rs=new J,ss=new J,Nm=new J,tu=new J,nu=new J,iu=new J;let Ba=!1;class $n{constructor(e=new J,n=new J,i=new J){this.a=e,this.b=n,this.c=i}static getNormal(e,n,i,r){r.subVectors(i,n),Gn.subVectors(e,n),r.cross(Gn);const s=r.lengthSq();return s>0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,n,i,r,s){Gn.subVectors(r,n),bi.subVectors(i,n),eu.subVectors(e,n);const o=Gn.dot(Gn),a=Gn.dot(bi),l=Gn.dot(eu),c=bi.dot(bi),u=bi.dot(eu),f=o*c-a*a;if(f===0)return s.set(-2,-1,-1);const h=1/f,p=(c*l-a*u)*h,g=(o*u-a*l)*h;return s.set(1-p-g,g,p)}static containsPoint(e,n,i,r){return this.getBarycoord(e,n,i,r,Mi),Mi.x>=0&&Mi.y>=0&&Mi.x+Mi.y<=1}static getUV(e,n,i,r,s,o,a,l){return Ba===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Ba=!0),this.getInterpolation(e,n,i,r,s,o,a,l)}static getInterpolation(e,n,i,r,s,o,a,l){return this.getBarycoord(e,n,i,r,Mi),l.setScalar(0),l.addScaledVector(s,Mi.x),l.addScaledVector(o,Mi.y),l.addScaledVector(a,Mi.z),l}static isFrontFacing(e,n,i,r){return Gn.subVectors(i,n),bi.subVectors(e,n),Gn.cross(bi).dot(r)<0}set(e,n,i){return this.a.copy(e),this.b.copy(n),this.c.copy(i),this}setFromPointsAndIndices(e,n,i,r){return this.a.copy(e[n]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,n,i,r){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Gn.subVectors(this.c,this.b),bi.subVectors(this.a,this.b),Gn.cross(bi).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return $n.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return $n.getBarycoord(e,this.a,this.b,this.c,n)}getUV(e,n,i,r,s){return Ba===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Ba=!0),$n.getInterpolation(e,this.a,this.b,this.c,n,i,r,s)}getInterpolation(e,n,i,r,s){return $n.getInterpolation(e,this.a,this.b,this.c,n,i,r,s)}containsPoint(e){return $n.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return $n.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const i=this.a,r=this.b,s=this.c;let o,a;rs.subVectors(r,i),ss.subVectors(s,i),tu.subVectors(e,i);const l=rs.dot(tu),c=ss.dot(tu);if(l<=0&&c<=0)return n.copy(i);nu.subVectors(e,r);const u=rs.dot(nu),f=ss.dot(nu);if(u>=0&&f<=u)return n.copy(r);const h=l*f-u*c;if(h<=0&&l>=0&&u<=0)return o=l/(l-u),n.copy(i).addScaledVector(rs,o);iu.subVectors(e,s);const p=rs.dot(iu),g=ss.dot(iu);if(g>=0&&p<=g)return n.copy(s);const _=p*c-l*g;if(_<=0&&c>=0&&g<=0)return a=c/(c-g),n.copy(i).addScaledVector(ss,a);const m=u*g-p*f;if(m<=0&&f-u>=0&&p-g>=0)return Nm.subVectors(s,r),a=(f-u)/(f-u+(p-g)),n.copy(r).addScaledVector(Nm,a);const d=1/(m+_+h);return o=_*d,a=h*d,n.copy(i).addScaledVector(rs,o).addScaledVector(ss,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const Z0={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},$i={h:0,s:0,l:0},Ha={h:0,s:0,l:0};function ru(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}class ct{constructor(e,n,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,i)}set(e,n,i){if(n===void 0&&i===void 0){const r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,n,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=jt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,dt.toWorkingColorSpace(this,n),this}setRGB(e,n,i,r=dt.workingColorSpace){return this.r=e,this.g=n,this.b=i,dt.toWorkingColorSpace(this,r),this}setHSL(e,n,i,r=dt.workingColorSpace){if(e=LP(e,1),n=_n(n,0,1),i=_n(i,0,1),n===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+n):i+n-i*n,o=2*i-s;this.r=ru(o,s,e+1/3),this.g=ru(o,s,e),this.b=ru(o,s,e-1/3)}return dt.toWorkingColorSpace(this,r),this}setStyle(e,n=jt){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=r[1],a=r[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,n);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,n);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=r[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,n);if(o===6)return this.setHex(parseInt(s,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=jt){const i=Z0[e.toLowerCase()];return i!==void 0?this.setHex(i,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=ws(e.r),this.g=ws(e.g),this.b=ws(e.b),this}copyLinearToSRGB(e){return this.r=Xc(e.r),this.g=Xc(e.g),this.b=Xc(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=jt){return dt.fromWorkingColorSpace(en.copy(this),e),Math.round(_n(en.r*255,0,255))*65536+Math.round(_n(en.g*255,0,255))*256+Math.round(_n(en.b*255,0,255))}getHexString(e=jt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=dt.workingColorSpace){dt.fromWorkingColorSpace(en.copy(this),n);const i=en.r,r=en.g,s=en.b,o=Math.max(i,r,s),a=Math.min(i,r,s);let l,c;const u=(a+o)/2;if(a===o)l=0,c=0;else{const f=o-a;switch(c=u<=.5?f/(o+a):f/(2-o-a),o){case i:l=(r-s)/f+(r<s?6:0);break;case r:l=(s-i)/f+2;break;case s:l=(i-r)/f+4;break}l/=6}return e.h=l,e.s=c,e.l=u,e}getRGB(e,n=dt.workingColorSpace){return dt.fromWorkingColorSpace(en.copy(this),n),e.r=en.r,e.g=en.g,e.b=en.b,e}getStyle(e=jt){dt.fromWorkingColorSpace(en.copy(this),e);const n=en.r,i=en.g,r=en.b;return e!==jt?`color(${e} ${n.toFixed(3)} ${i.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(n*255)},${Math.round(i*255)},${Math.round(r*255)})`}offsetHSL(e,n,i){return this.getHSL($i),this.setHSL($i.h+e,$i.s+n,$i.l+i)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,n){return this.r=e.r+n.r,this.g=e.g+n.g,this.b=e.b+n.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,n){return this.r+=(e.r-this.r)*n,this.g+=(e.g-this.g)*n,this.b+=(e.b-this.b)*n,this}lerpColors(e,n,i){return this.r=e.r+(n.r-e.r)*i,this.g=e.g+(n.g-e.g)*i,this.b=e.b+(n.b-e.b)*i,this}lerpHSL(e,n){this.getHSL($i),e.getHSL(Ha);const i=Wc($i.h,Ha.h,n),r=Wc($i.s,Ha.s,n),s=Wc($i.l,Ha.l,n);return this.setHSL(i,r,s),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const n=this.r,i=this.g,r=this.b,s=e.elements;return this.r=s[0]*n+s[3]*i+s[6]*r,this.g=s[1]*n+s[4]*i+s[7]*r,this.b=s[2]*n+s[5]*i+s[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,n=0){return this.r=e[n],this.g=e[n+1],this.b=e[n+2],this}toArray(e=[],n=0){return e[n]=this.r,e[n+1]=this.g,e[n+2]=this.b,e}fromBufferAttribute(e,n){return this.r=e.getX(n),this.g=e.getY(n),this.b=e.getZ(n),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const en=new ct;ct.NAMES=Z0;let XP=0;class ac extends Zs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:XP++}),this.uuid=sa(),this.name="",this.type="Material",this.blending=Ts,this.side=cr,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=ff,this.blendDst=df,this.blendEquation=Cr,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new ct(0,0,0),this.blendAlpha=0,this.depthFunc=El,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=xm,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Zr,this.stencilZFail=Zr,this.stencilZPass=Zr,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 n in e){const i=e[n];if(i===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const r=this[n];if(r===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[n]=i}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.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.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!==Ts&&(i.blending=this.blending),this.side!==cr&&(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!==ff&&(i.blendSrc=this.blendSrc),this.blendDst!==df&&(i.blendDst=this.blendDst),this.blendEquation!==Cr&&(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!==El&&(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!==xm&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Zr&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Zr&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Zr&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(n){const s=r(e.textures),o=r(e.images);s.length>0&&(i.textures=s),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let i=null;if(n!==null){const r=n.length;i=new Array(r);for(let s=0;s!==r;++s)i[s]=n[s].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class J0 extends ac{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ct(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.combine=U0,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.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 Pt=new J,za=new ot;class fi{constructor(e,n,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=n,this.count=e!==void 0?e.length/n:0,this.normalized=i,this.usage=Sm,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ji,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.BufferAttribute: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,n,i){e*=this.itemSize,i*=n.itemSize;for(let r=0,s=this.itemSize;r<s;r++)this.array[e+r]=n.array[i+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let n=0,i=this.count;n<i;n++)za.fromBufferAttribute(this,n),za.applyMatrix3(e),this.setXY(n,za.x,za.y);else if(this.itemSize===3)for(let n=0,i=this.count;n<i;n++)Pt.fromBufferAttribute(this,n),Pt.applyMatrix3(e),this.setXYZ(n,Pt.x,Pt.y,Pt.z);return this}applyMatrix4(e){for(let n=0,i=this.count;n<i;n++)Pt.fromBufferAttribute(this,n),Pt.applyMatrix4(e),this.setXYZ(n,Pt.x,Pt.y,Pt.z);return this}applyNormalMatrix(e){for(let n=0,i=this.count;n<i;n++)Pt.fromBufferAttribute(this,n),Pt.applyNormalMatrix(e),this.setXYZ(n,Pt.x,Pt.y,Pt.z);return this}transformDirection(e){for(let n=0,i=this.count;n<i;n++)Pt.fromBufferAttribute(this,n),Pt.transformDirection(e),this.setXYZ(n,Pt.x,Pt.y,Pt.z);return this}set(e,n=0){return this.array.set(e,n),this}getComponent(e,n){let i=this.array[e*this.itemSize+n];return this.normalized&&(i=co(i,this.array)),i}setComponent(e,n,i){return this.normalized&&(i=mn(i,this.array)),this.array[e*this.itemSize+n]=i,this}getX(e){let n=this.array[e*this.itemSize];return this.normalized&&(n=co(n,this.array)),n}setX(e,n){return this.normalized&&(n=mn(n,this.array)),this.array[e*this.itemSize]=n,this}getY(e){let n=this.array[e*this.itemSize+1];return this.normalized&&(n=co(n,this.array)),n}setY(e,n){return this.normalized&&(n=mn(n,this.array)),this.array[e*this.itemSize+1]=n,this}getZ(e){let n=this.array[e*this.itemSize+2];return this.normalized&&(n=co(n,this.array)),n}setZ(e,n){return this.normalized&&(n=mn(n,this.array)),this.array[e*this.itemSize+2]=n,this}getW(e){let n=this.array[e*this.itemSize+3];return this.normalized&&(n=co(n,this.array)),n}setW(e,n){return this.normalized&&(n=mn(n,this.array)),this.array[e*this.itemSize+3]=n,this}setXY(e,n,i){return e*=this.itemSize,this.normalized&&(n=mn(n,this.array),i=mn(i,this.array)),this.array[e+0]=n,this.array[e+1]=i,this}setXYZ(e,n,i,r){return e*=this.itemSize,this.normalized&&(n=mn(n,this.array),i=mn(i,this.array),r=mn(r,this.array)),this.array[e+0]=n,this.array[e+1]=i,this.array[e+2]=r,this}setXYZW(e,n,i,r,s){return e*=this.itemSize,this.normalized&&(n=mn(n,this.array),i=mn(i,this.array),r=mn(r,this.array),s=mn(s,this.array)),this.array[e+0]=n,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!==Sm&&(e.usage=this.usage),e}}class Q0 extends fi{constructor(e,n,i){super(new Uint16Array(e),n,i)}}class ey extends fi{constructor(e,n,i){super(new Uint32Array(e),n,i)}}class Li extends fi{constructor(e,n,i){super(new Float32Array(e),n,i)}}let jP=0;const Ln=new Kt,su=new wn,os=new J,bn=new aa,po=new aa,Vt=new J;class hr extends Zs{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:jP++}),this.uuid=sa(),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(X0(e)?ey:Q0)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,n){return this.attributes[e]=n,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,n,i=0){this.groups.push({start:e,count:n,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,n){this.drawRange.start=e,this.drawRange.count=n}applyMatrix4(e){const n=this.attributes.position;n!==void 0&&(n.applyMatrix4(e),n.needsUpdate=!0);const i=this.attributes.normal;if(i!==void 0){const s=new Ze().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 Ln.makeRotationFromQuaternion(e),this.applyMatrix4(Ln),this}rotateX(e){return Ln.makeRotationX(e),this.applyMatrix4(Ln),this}rotateY(e){return Ln.makeRotationY(e),this.applyMatrix4(Ln),this}rotateZ(e){return Ln.makeRotationZ(e),this.applyMatrix4(Ln),this}translate(e,n,i){return Ln.makeTranslation(e,n,i),this.applyMatrix4(Ln),this}scale(e,n,i){return Ln.makeScale(e,n,i),this.applyMatrix4(Ln),this}lookAt(e){return su.lookAt(e),su.updateMatrix(),this.applyMatrix4(su.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(os).negate(),this.translate(os.x,os.y,os.z),this}setFromPoints(e){const n=[];for(let i=0,r=e.length;i<r;i++){const s=e[i];n.push(s.x,s.y,s.z||0)}return this.setAttribute("position",new Li(n,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new aa);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),this.boundingBox.set(new J(-1/0,-1/0,-1/0),new J(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),n)for(let i=0,r=n.length;i<r;i++){const s=n[i];bn.setFromBufferAttribute(s),this.morphTargetsRelative?(Vt.addVectors(this.boundingBox.min,bn.min),this.boundingBox.expandByPoint(Vt),Vt.addVectors(this.boundingBox.max,bn.max),this.boundingBox.expandByPoint(Vt)):(this.boundingBox.expandByPoint(bn.min),this.boundingBox.expandByPoint(bn.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 pd);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),this.boundingSphere.set(new J,1/0);return}if(e){const i=this.boundingSphere.center;if(bn.setFromBufferAttribute(e),n)for(let s=0,o=n.length;s<o;s++){const a=n[s];po.setFromBufferAttribute(a),this.morphTargetsRelative?(Vt.addVectors(bn.min,po.min),bn.expandByPoint(Vt),Vt.addVectors(bn.max,po.max),bn.expandByPoint(Vt)):(bn.expandByPoint(po.min),bn.expandByPoint(po.max))}bn.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(n)for(let s=0,o=n.length;s<o;s++){const a=n[s],l=this.morphTargetsRelative;for(let c=0,u=a.count;c<u;c++)Vt.fromBufferAttribute(a,c),l&&(os.fromBufferAttribute(e,c),Vt.add(os)),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,n=this.attributes;if(e===null||n.position===void 0||n.normal===void 0||n.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const i=e.array,r=n.position.array,s=n.normal.array,o=n.uv.array,a=r.length/3;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new fi(new Float32Array(4*a),4));const l=this.getAttribute("tangent").array,c=[],u=[];for(let L=0;L<a;L++)c[L]=new J,u[L]=new J;const f=new J,h=new J,p=new J,g=new ot,_=new ot,m=new ot,d=new J,v=new J;function y(L,B,U){f.fromArray(r,L*3),h.fromArray(r,B*3),p.fromArray(r,U*3),g.fromArray(o,L*2),_.fromArray(o,B*2),m.fromArray(o,U*2),h.sub(f),p.sub(f),_.sub(g),m.sub(g);const k=1/(_.x*m.y-m.x*_.y);isFinite(k)&&(d.copy(h).multiplyScalar(m.y).addScaledVector(p,-_.y).multiplyScalar(k),v.copy(p).multiplyScalar(_.x).addScaledVector(h,-m.x).multiplyScalar(k),c[L].add(d),c[B].add(d),c[U].add(d),u[L].add(v),u[B].add(v),u[U].add(v))}let x=this.groups;x.length===0&&(x=[{start:0,count:i.length}]);for(let L=0,B=x.length;L<B;++L){const U=x[L],k=U.start,D=U.count;for(let G=k,$=k+D;G<$;G+=3)y(i[G+0],i[G+1],i[G+2])}const S=new J,C=new J,R=new J,I=new J;function b(L){R.fromArray(s,L*3),I.copy(R);const B=c[L];S.copy(B),S.sub(R.multiplyScalar(R.dot(B))).normalize(),C.crossVectors(I,B);const k=C.dot(u[L])<0?-1:1;l[L*4]=S.x,l[L*4+1]=S.y,l[L*4+2]=S.z,l[L*4+3]=k}for(let L=0,B=x.length;L<B;++L){const U=x[L],k=U.start,D=U.count;for(let G=k,$=k+D;G<$;G+=3)b(i[G+0]),b(i[G+1]),b(i[G+2])}}computeVertexNormals(){const e=this.index,n=this.getAttribute("position");if(n!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new fi(new Float32Array(n.count*3),3),this.setAttribute("normal",i);else for(let h=0,p=i.count;h<p;h++)i.setXYZ(h,0,0,0);const r=new J,s=new J,o=new J,a=new J,l=new J,c=new J,u=new J,f=new J;if(e)for(let h=0,p=e.count;h<p;h+=3){const g=e.getX(h+0),_=e.getX(h+1),m=e.getX(h+2);r.fromBufferAttribute(n,g),s.fromBufferAttribute(n,_),o.fromBufferAttribute(n,m),u.subVectors(o,s),f.subVectors(r,s),u.cross(f),a.fromBufferAttribute(i,g),l.fromBufferAttribute(i,_),c.fromBufferAttribute(i,m),a.add(u),l.add(u),c.add(u),i.setXYZ(g,a.x,a.y,a.z),i.setXYZ(_,l.x,l.y,l.z),i.setXYZ(m,c.x,c.y,c.z)}else for(let h=0,p=n.count;h<p;h+=3)r.fromBufferAttribute(n,h+0),s.fromBufferAttribute(n,h+1),o.fromBufferAttribute(n,h+2),u.subVectors(o,s),f.subVectors(r,s),u.cross(f),i.setXYZ(h+0,u.x,u.y,u.z),i.setXYZ(h+1,u.x,u.y,u.z),i.setXYZ(h+2,u.x,u.y,u.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let n=0,i=e.count;n<i;n++)Vt.fromBufferAttribute(e,n),Vt.normalize(),e.setXYZ(n,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 p=0,g=0;for(let _=0,m=l.length;_<m;_++){a.isInterleavedBufferAttribute?p=l[_]*a.data.stride+a.offset:p=l[_]*u;for(let d=0;d<u;d++)h[g++]=c[p++]}return new fi(h,u,f)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const n=new hr,i=this.index.array,r=this.attributes;for(const a in r){const l=r[a],c=e(l,i);n.setAttribute(a,c)}const s=this.morphAttributes;for(const a in s){const l=[],c=s[a];for(let u=0,f=c.length;u<f;u++){const h=c[u],p=e(h,i);l.push(p)}n.morphAttributes[a]=l}n.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let a=0,l=o.length;a<l;a++){const c=o[a];n.addGroup(c.start,c.count,c.materialIndex)}return n}toJSON(){const e={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};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 n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const i=this.attributes;for(const l in i){const c=i[l];e.data.attributes[l]=c.toJSON(e.data)}const r={};let s=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let f=0,h=c.length;f<h;f++){const p=c[f];u.push(p.toJSON(e.data))}u.length>0&&(r[l]=u,s=!0)}s&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(n));const r=e.attributes;for(const c in r){const u=r[c];this.setAttribute(c,u.clone(n))}const s=e.morphAttributes;for(const c in s){const u=[],f=s[c];for(let h=0,p=f.length;h<p;h++)u.push(f[h].clone(n));this.morphAttributes[c]=u}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let c=0,u=o.length;c<u;c++){const f=o[c];this.addGroup(f.start,f.count,f.materialIndex)}const a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());const l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const Um=new Kt,br=new kP,Va=new pd,Om=new J,as=new J,ls=new J,cs=new J,ou=new J,Ga=new J,Wa=new ot,$a=new ot,Xa=new ot,Fm=new J,km=new J,Bm=new J,ja=new J,qa=new J;class ui extends wn{constructor(e=new hr,n=new J0){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=n,this.updateMorphTargets()}copy(e,n){return super.copy(e,n),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const n=this.geometry.morphAttributes,i=Object.keys(n);if(i.length>0){const r=n[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s<o;s++){const a=r[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}getVertexPosition(e,n){const i=this.geometry,r=i.attributes.position,s=i.morphAttributes.position,o=i.morphTargetsRelative;n.fromBufferAttribute(r,e);const a=this.morphTargetInfluences;if(s&&a){Ga.set(0,0,0);for(let l=0,c=s.length;l<c;l++){const u=a[l],f=s[l];u!==0&&(ou.fromBufferAttribute(f,e),o?Ga.addScaledVector(ou,u):Ga.addScaledVector(ou.sub(n),u))}n.add(Ga)}return n}raycast(e,n){const i=this.geometry,r=this.material,s=this.matrixWorld;r!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),Va.copy(i.boundingSphere),Va.applyMatrix4(s),br.copy(e.ray).recast(e.near),!(Va.containsPoint(br.origin)===!1&&(br.intersectSphere(Va,Om)===null||br.origin.distanceToSquared(Om)>(e.far-e.near)**2))&&(Um.copy(s).invert(),br.copy(e.ray).applyMatrix4(Um),!(i.boundingBox!==null&&br.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,n,br)))}_computeIntersections(e,n,i){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,u=s.attributes.uv1,f=s.attributes.normal,h=s.groups,p=s.drawRange;if(a!==null)if(Array.isArray(o))for(let g=0,_=h.length;g<_;g++){const m=h[g],d=o[m.materialIndex],v=Math.max(m.start,p.start),y=Math.min(a.count,Math.min(m.start+m.count,p.start+p.count));for(let x=v,S=y;x<S;x+=3){const C=a.getX(x),R=a.getX(x+1),I=a.getX(x+2);r=Ya(this,d,e,i,c,u,f,C,R,I),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=m.materialIndex,n.push(r))}}else{const g=Math.max(0,p.start),_=Math.min(a.count,p.start+p.count);for(let m=g,d=_;m<d;m+=3){const v=a.getX(m),y=a.getX(m+1),x=a.getX(m+2);r=Ya(this,o,e,i,c,u,f,v,y,x),r&&(r.faceIndex=Math.floor(m/3),n.push(r))}}else if(l!==void 0)if(Array.isArray(o))for(let g=0,_=h.length;g<_;g++){const m=h[g],d=o[m.materialIndex],v=Math.max(m.start,p.start),y=Math.min(l.count,Math.min(m.start+m.count,p.start+p.count));for(let x=v,S=y;x<S;x+=3){const C=x,R=x+1,I=x+2;r=Ya(this,d,e,i,c,u,f,C,R,I),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=m.materialIndex,n.push(r))}}else{const g=Math.max(0,p.start),_=Math.min(l.count,p.start+p.count);for(let m=g,d=_;m<d;m+=3){const v=m,y=m+1,x=m+2;r=Ya(this,o,e,i,c,u,f,v,y,x),r&&(r.faceIndex=Math.floor(m/3),n.push(r))}}}}function qP(t,e,n,i,r,s,o,a){let l;if(e.side===vn?l=i.intersectTriangle(o,s,r,!0,a):l=i.intersectTriangle(r,s,o,e.side===cr,a),l===null)return null;qa.copy(a),qa.applyMatrix4(t.matrixWorld);const c=n.ray.origin.distanceTo(qa);return c<n.near||c>n.far?null:{distance:c,point:qa.clone(),object:t}}function Ya(t,e,n,i,r,s,o,a,l,c){t.getVertexPosition(a,as),t.getVertexPosition(l,ls),t.getVertexPosition(c,cs);const u=qP(t,e,n,i,as,ls,cs,ja);if(u){r&&(Wa.fromBufferAttribute(r,a),$a.fromBufferAttribute(r,l),Xa.fromBufferAttribute(r,c),u.uv=$n.getInterpolation(ja,as,ls,cs,Wa,$a,Xa,new ot)),s&&(Wa.fromBufferAttribute(s,a),$a.fromBufferAttribute(s,l),Xa.fromBufferAttribute(s,c),u.uv1=$n.getInterpolation(ja,as,ls,cs,Wa,$a,Xa,new ot),u.uv2=u.uv1),o&&(Fm.fromBufferAttribute(o,a),km.fromBufferAttribute(o,l),Bm.fromBufferAttribute(o,c),u.normal=$n.getInterpolation(ja,as,ls,cs,Fm,km,Bm,new J),u.normal.dot(i.direction)>0&&u.normal.multiplyScalar(-1));const f={a,b:l,c,normal:new J,materialIndex:0};$n.getNormal(as,ls,cs,f.normal),u.face=f}return u}class la extends hr{constructor(e=1,n=1,i=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:i,widthSegments:r,heightSegments:s,depthSegments:o};const a=this;r=Math.floor(r),s=Math.floor(s),o=Math.floor(o);const l=[],c=[],u=[],f=[];let h=0,p=0;g("z","y","x",-1,-1,i,n,e,o,s,0),g("z","y","x",1,-1,i,n,-e,o,s,1),g("x","z","y",1,1,e,i,n,r,o,2),g("x","z","y",1,-1,e,i,-n,r,o,3),g("x","y","z",1,-1,e,n,i,r,s,4),g("x","y","z",-1,-1,e,n,-i,r,s,5),this.setIndex(l),this.setAttribute("position",new Li(c,3)),this.setAttribute("normal",new Li(u,3)),this.setAttribute("uv",new Li(f,2));function g(_,m,d,v,y,x,S,C,R,I,b){const L=x/R,B=S/I,U=x/2,k=S/2,D=C/2,G=R+1,$=I+1;let j=0,oe=0;const se=new J;for(let he=0;he<$;he++){const me=he*B-k;for(let ye=0;ye<G;ye++){const te=ye*L-U;se[_]=te*v,se[m]=me*y,se[d]=D,c.push(se.x,se.y,se.z),se[_]=0,se[m]=0,se[d]=C>0?1:-1,u.push(se.x,se.y,se.z),f.push(ye/R),f.push(1-he/I),j+=1}}for(let he=0;he<I;he++)for(let me=0;me<R;me++){const ye=h+me+G*he,te=h+me+G*(he+1),fe=h+(me+1)+G*(he+1),be=h+(me+1)+G*he;l.push(ye,te,be),l.push(te,fe,be),oe+=6}a.addGroup(p,oe,b),p+=oe,h+=j}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new la(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function Vs(t){const e={};for(const n in t){e[n]={};for(const i in t[n]){const r=t[n][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[n][i]=null):e[n][i]=r.clone():Array.isArray(r)?e[n][i]=r.slice():e[n][i]=r}}return e}function ln(t){const e={};for(let n=0;n<t.length;n++){const i=Vs(t[n]);for(const r in i)e[r]=i[r]}return e}function YP(t){const e=[];for(let n=0;n<t.length;n++)e.push(t[n].clone());return e}function ty(t){return t.getRenderTarget()===null?t.outputColorSpace:dt.workingColorSpace}const ny={clone:Vs,merge:ln};var KP=`void main() {
	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}`,ZP=`void main() {
	gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
}`;class pi extends ac{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=KP,this.fragmentShader=ZP,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!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=Vs(e.uniforms),this.uniformsGroups=YP(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const n=super.toJSON(e);n.glslVersion=this.glslVersion,n.uniforms={};for(const r in this.uniforms){const o=this.uniforms[r].value;o&&o.isTexture?n.uniforms[r]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?n.uniforms[r]={type:"c",value:o.getHex()}:o&&o.isVector2?n.uniforms[r]={type:"v2",value:o.toArray()}:o&&o.isVector3?n.uniforms[r]={type:"v3",value:o.toArray()}:o&&o.isVector4?n.uniforms[r]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?n.uniforms[r]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?n.uniforms[r]={type:"m4",value:o.toArray()}:n.uniforms[r]={value:o}}Object.keys(this.defines).length>0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const i={};for(const r in this.extensions)this.extensions[r]===!0&&(i[r]=!0);return Object.keys(i).length>0&&(n.extensions=i),n}}class md extends wn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Kt,this.projectionMatrix=new Kt,this.projectionMatrixInverse=new Kt,this.coordinateSystem=Ri}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class Xn extends md{constructor(e=50,n=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=r,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=vf*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Gc*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return vf*2*Math.atan(Math.tan(Gc*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,n,i,r,s,o){this.aspect=e/n,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(Gc*.5*this.fov)/this.zoom,i=2*n,r=this.aspect*i,s=-.5*r;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;s+=o.offsetX*r/l,n-=o.offsetY*i/c,r*=o.width/l,i*=o.height/c}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,n,n-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const us=-90,fs=1;class JP extends wn{constructor(e,n,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new Xn(us,fs,e,n);r.layers=this.layers,this.add(r);const s=new Xn(us,fs,e,n);s.layers=this.layers,this.add(s);const o=new Xn(us,fs,e,n);o.layers=this.layers,this.add(o);const a=new Xn(us,fs,e,n);a.layers=this.layers,this.add(a);const l=new Xn(us,fs,e,n);l.layers=this.layers,this.add(l);const c=new Xn(us,fs,e,n);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[i,r,s,o,a,l]=n;for(const c of n)this.remove(c);if(e===Ri)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===wl)i.up.set(0,-1,0),i.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),s.up.set(0,0,1),s.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of n)this.add(c),c.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,o,a,l,c,u]=this.children,f=e.getRenderTarget(),h=e.getActiveCubeFace(),p=e.getActiveMipmapLevel(),g=e.xr.enabled;e.xr.enabled=!1;const _=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,r),e.render(n,s),e.setRenderTarget(i,1,r),e.render(n,o),e.setRenderTarget(i,2,r),e.render(n,a),e.setRenderTarget(i,3,r),e.render(n,l),e.setRenderTarget(i,4,r),e.render(n,c),i.texture.generateMipmaps=_,e.setRenderTarget(i,5,r),e.render(n,u),e.setRenderTarget(f,h,p),e.xr.enabled=g,i.texture.needsPMREMUpdate=!0}}class iy extends yn{constructor(e,n,i,r,s,o,a,l,c,u){e=e!==void 0?e:[],n=n!==void 0?n:ks,super(e,n,i,r,s,o,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class QP extends ur{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];n.encoding!==void 0&&(Po("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===Fr?jt:Dn),this.texture=new iy(r,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:In}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:`

				varying vec3 vWorldDirection;

				vec3 transformDirection( in vec3 dir, in mat4 matrix ) {

					return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );

				}

				void main() {

					vWorldDirection = transformDirection( position, modelMatrix );

					#include <begin_vertex>
					#include <project_vertex>

				}
			`,fragmentShader:`

				uniform sampler2D tEquirect;

				varying vec3 vWorldDirection;

				#include <common>

				void main() {

					vec3 direction = normalize( vWorldDirection );

					vec2 sampleUV = equirectUv( direction );

					gl_FragColor = texture2D( tEquirect, sampleUV );

				}
			`},r=new la(5,5,5),s=new pi({name:"CubemapFromEquirect",uniforms:Vs(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:vn,blending:Ci});s.uniforms.tEquirect.value=n;const o=new ui(r,s),a=n.minFilter;return n.minFilter===$o&&(n.minFilter=In),new JP(1,10,this).update(e,o),n.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,n,i,r){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(n,i,r);e.setRenderTarget(s)}}const au=new J,eI=new J,tI=new Ze;class Tr{constructor(e=new J(1,0,0),n=0){this.isPlane=!0,this.normal=e,this.constant=n}set(e,n){return this.normal.copy(e),this.constant=n,this}setComponents(e,n,i,r){return this.normal.set(e,n,i),this.constant=r,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,i){const r=au.subVectors(i,n).cross(eI.subVectors(e,n)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,n){return n.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,n){const i=e.delta(au),r=this.normal.dot(i);if(r===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/r;return s<0||s>1?null:n.copy(e.start).addScaledVector(i,s)}intersectsLine(e){const n=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return n<0&&i>0||i<0&&n>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const i=n||tI.getNormalMatrix(e),r=this.coplanarPoint(au).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 Mr=new pd,Ka=new J;class ry{constructor(e=new Tr,n=new Tr,i=new Tr,r=new Tr,s=new Tr,o=new Tr){this.planes=[e,n,i,r,s,o]}set(e,n,i,r,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(i),a[3].copy(r),a[4].copy(s),a[5].copy(o),this}copy(e){const n=this.planes;for(let i=0;i<6;i++)n[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,n=Ri){const i=this.planes,r=e.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],u=r[5],f=r[6],h=r[7],p=r[8],g=r[9],_=r[10],m=r[11],d=r[12],v=r[13],y=r[14],x=r[15];if(i[0].setComponents(l-s,h-c,m-p,x-d).normalize(),i[1].setComponents(l+s,h+c,m+p,x+d).normalize(),i[2].setComponents(l+o,h+u,m+g,x+v).normalize(),i[3].setComponents(l-o,h-u,m-g,x-v).normalize(),i[4].setComponents(l-a,h-f,m-_,x-y).normalize(),n===Ri)i[5].setComponents(l+a,h+f,m+_,x+y).normalize();else if(n===wl)i[5].setComponents(a,f,_,y).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Mr.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),Mr.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Mr)}intersectsSprite(e){return Mr.center.set(0,0,0),Mr.radius=.7071067811865476,Mr.applyMatrix4(e.matrixWorld),this.intersectsSphere(Mr)}intersectsSphere(e){const n=this.planes,i=e.center,r=-e.radius;for(let s=0;s<6;s++)if(n[s].distanceToPoint(i)<r)return!1;return!0}intersectsBox(e){const n=this.planes;for(let i=0;i<6;i++){const r=n[i];if(Ka.x=r.normal.x>0?e.max.x:e.min.x,Ka.y=r.normal.y>0?e.max.y:e.min.y,Ka.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Ka)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let i=0;i<6;i++)if(n[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function sy(){let t=null,e=!1,n=null,i=null;function r(s,o){n(s,o),i=t.requestAnimationFrame(r)}return{start:function(){e!==!0&&n!==null&&(i=t.requestAnimationFrame(r),e=!0)},stop:function(){t.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(s){n=s},setContext:function(s){t=s}}}function nI(t,e){const n=e.isWebGL2,i=new WeakMap;function r(c,u){const f=c.array,h=c.usage,p=f.byteLength,g=t.createBuffer();t.bindBuffer(u,g),t.bufferData(u,f,h),c.onUploadCallback();let _;if(f instanceof Float32Array)_=t.FLOAT;else if(f instanceof Uint16Array)if(c.isFloat16BufferAttribute)if(n)_=t.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else _=t.UNSIGNED_SHORT;else if(f instanceof Int16Array)_=t.SHORT;else if(f instanceof Uint32Array)_=t.UNSIGNED_INT;else if(f instanceof Int32Array)_=t.INT;else if(f instanceof Int8Array)_=t.BYTE;else if(f instanceof Uint8Array)_=t.UNSIGNED_BYTE;else if(f instanceof Uint8ClampedArray)_=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+f);return{buffer:g,type:_,bytesPerElement:f.BYTES_PER_ELEMENT,version:c.version,size:p}}function s(c,u,f){const h=u.array,p=u._updateRange,g=u.updateRanges;if(t.bindBuffer(f,c),p.count===-1&&g.length===0&&t.bufferSubData(f,0,h),g.length!==0){for(let _=0,m=g.length;_<m;_++){const d=g[_];n?t.bufferSubData(f,d.start*h.BYTES_PER_ELEMENT,h,d.start,d.count):t.bufferSubData(f,d.start*h.BYTES_PER_ELEMENT,h.subarray(d.start,d.start+d.count))}u.clearUpdateRanges()}p.count!==-1&&(n?t.bufferSubData(f,p.offset*h.BYTES_PER_ELEMENT,h,p.offset,p.count):t.bufferSubData(f,p.offset*h.BYTES_PER_ELEMENT,h.subarray(p.offset,p.offset+p.count)),p.count=-1),u.onUploadCallback()}function o(c){return c.isInterleavedBufferAttribute&&(c=c.data),i.get(c)}function a(c){c.isInterleavedBufferAttribute&&(c=c.data);const u=i.get(c);u&&(t.deleteBuffer(u.buffer),i.delete(c))}function l(c,u){if(c.isGLBufferAttribute){const h=i.get(c);(!h||h.version<c.version)&&i.set(c,{buffer:c.buffer,type:c.type,bytesPerElement:c.elementSize,version:c.version});return}c.isInterleavedBufferAttribute&&(c=c.data);const f=i.get(c);if(f===void 0)i.set(c,r(c,u));else if(f.version<c.version){if(f.size!==c.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.");s(f.buffer,c,u),f.version=c.version}}return{get:o,remove:a,update:l}}class lc extends hr{constructor(e=1,n=1,i=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:n,widthSegments:i,heightSegments:r};const s=e/2,o=n/2,a=Math.floor(i),l=Math.floor(r),c=a+1,u=l+1,f=e/a,h=n/l,p=[],g=[],_=[],m=[];for(let d=0;d<u;d++){const v=d*h-o;for(let y=0;y<c;y++){const x=y*f-s;g.push(x,-v,0),_.push(0,0,1),m.push(y/a),m.push(1-d/l)}}for(let d=0;d<l;d++)for(let v=0;v<a;v++){const y=v+c*d,x=v+c*(d+1),S=v+1+c*(d+1),C=v+1+c*d;p.push(y,x,C),p.push(x,S,C)}this.setIndex(p),this.setAttribute("position",new Li(g,3)),this.setAttribute("normal",new Li(_,3)),this.setAttribute("uv",new Li(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new lc(e.width,e.height,e.widthSegments,e.heightSegments)}}var iI=`#ifdef USE_ALPHAHASH
	if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;
#endif`,rI=`#ifdef USE_ALPHAHASH
	const float ALPHA_HASH_SCALE = 0.05;
	float hash2D( vec2 value ) {
		return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );
	}
	float hash3D( vec3 value ) {
		return hash2D( vec2( hash2D( value.xy ), value.z ) );
	}
	float getAlphaHashThreshold( vec3 position ) {
		float maxDeriv = max(
			length( dFdx( position.xyz ) ),
			length( dFdy( position.xyz ) )
		);
		float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );
		vec2 pixScales = vec2(
			exp2( floor( log2( pixScale ) ) ),
			exp2( ceil( log2( pixScale ) ) )
		);
		vec2 alpha = vec2(
			hash3D( floor( pixScales.x * position.xyz ) ),
			hash3D( floor( pixScales.y * position.xyz ) )
		);
		float lerpFactor = fract( log2( pixScale ) );
		float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;
		float a = min( lerpFactor, 1.0 - lerpFactor );
		vec3 cases = vec3(
			x * x / ( 2.0 * a * ( 1.0 - a ) ),
			( x - 0.5 * a ) / ( 1.0 - a ),
			1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )
		);
		float threshold = ( x < ( 1.0 - a ) )
			? ( ( x < a ) ? cases.x : cases.y )
			: cases.z;
		return clamp( threshold , 1.0e-6, 1.0 );
	}
#endif`,sI=`#ifdef USE_ALPHAMAP
	diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;
#endif`,oI=`#ifdef USE_ALPHAMAP
	uniform sampler2D alphaMap;
#endif`,aI=`#ifdef USE_ALPHATEST
	if ( diffuseColor.a < alphaTest ) discard;
#endif`,lI=`#ifdef USE_ALPHATEST
	uniform float alphaTest;
#endif`,cI=`#ifdef USE_AOMAP
	float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;
	reflectedLight.indirectDiffuse *= ambientOcclusion;
	#if defined( USE_CLEARCOAT ) 
		clearcoatSpecularIndirect *= ambientOcclusion;
	#endif
	#if defined( USE_SHEEN ) 
		sheenSpecularIndirect *= ambientOcclusion;
	#endif
	#if defined( USE_ENVMAP ) && defined( STANDARD )
		float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );
		reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );
	#endif
#endif`,uI=`#ifdef USE_AOMAP
	uniform sampler2D aoMap;
	uniform float aoMapIntensity;
#endif`,fI=`#ifdef USE_BATCHING
	attribute float batchId;
	uniform highp sampler2D batchingTexture;
	mat4 getBatchingMatrix( const in float i ) {
		int size = textureSize( batchingTexture, 0 ).x;
		int j = int( i ) * 4;
		int x = j % size;
		int y = j / size;
		vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );
		vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );
		vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );
		vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );
		return mat4( v1, v2, v3, v4 );
	}
#endif`,dI=`#ifdef USE_BATCHING
	mat4 batchingMatrix = getBatchingMatrix( batchId );
#endif`,hI=`vec3 transformed = vec3( position );
#ifdef USE_ALPHAHASH
	vPosition = vec3( position );
#endif`,pI=`vec3 objectNormal = vec3( normal );
#ifdef USE_TANGENT
	vec3 objectTangent = vec3( tangent.xyz );
#endif`,mI=`float G_BlinnPhong_Implicit( ) {
	return 0.25;
}
float D_BlinnPhong( const in float shininess, const in float dotNH ) {
	return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );
}
vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {
	vec3 halfDir = normalize( lightDir + viewDir );
	float dotNH = saturate( dot( normal, halfDir ) );
	float dotVH = saturate( dot( viewDir, halfDir ) );
	vec3 F = F_Schlick( specularColor, 1.0, dotVH );
	float G = G_BlinnPhong_Implicit( );
	float D = D_BlinnPhong( shininess, dotNH );
	return F * ( G * D );
} // validated`,gI=`#ifdef USE_IRIDESCENCE
	const mat3 XYZ_TO_REC709 = mat3(
		 3.2404542, -0.9692660,  0.0556434,
		-1.5371385,  1.8760108, -0.2040259,
		-0.4985314,  0.0415560,  1.0572252
	);
	vec3 Fresnel0ToIor( vec3 fresnel0 ) {
		vec3 sqrtF0 = sqrt( fresnel0 );
		return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );
	}
	vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {
		return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );
	}
	float IorToFresnel0( float transmittedIor, float incidentIor ) {
		return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));
	}
	vec3 evalSensitivity( float OPD, vec3 shift ) {
		float phase = 2.0 * PI * OPD * 1.0e-9;
		vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );
		vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );
		vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );
		vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );
		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 ) );
		xyz /= 1.0685e-7;
		vec3 rgb = XYZ_TO_REC709 * xyz;
		return rgb;
	}
	vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {
		vec3 I;
		float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );
		float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );
		float cosTheta2Sq = 1.0 - sinTheta2Sq;
		if ( cosTheta2Sq < 0.0 ) {
			return vec3( 1.0 );
		}
		float cosTheta2 = sqrt( cosTheta2Sq );
		float R0 = IorToFresnel0( iridescenceIOR, outsideIOR );
		float R12 = F_Schlick( R0, 1.0, cosTheta1 );
		float T121 = 1.0 - R12;
		float phi12 = 0.0;
		if ( iridescenceIOR < outsideIOR ) phi12 = PI;
		float phi21 = PI - phi12;
		vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );		vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );
		vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );
		vec3 phi23 = vec3( 0.0 );
		if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;
		if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;
		if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;
		float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;
		vec3 phi = vec3( phi21 ) + phi23;
		vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );
		vec3 r123 = sqrt( R123 );
		vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );
		vec3 C0 = R12 + Rs;
		I = C0;
		vec3 Cm = Rs - T121;
		for ( int m = 1; m <= 2; ++ m ) {
			Cm *= r123;
			vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );
			I += Cm * Sm;
		}
		return max( I, vec3( 0.0 ) );
	}
#endif`,_I=`#ifdef USE_BUMPMAP
	uniform sampler2D bumpMap;
	uniform float bumpScale;
	vec2 dHdxy_fwd() {
		vec2 dSTdx = dFdx( vBumpMapUv );
		vec2 dSTdy = dFdy( vBumpMapUv );
		float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;
		float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;
		float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;
		return vec2( dBx, dBy );
	}
	vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {
		vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );
		vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );
		vec3 vN = surf_norm;
		vec3 R1 = cross( vSigmaY, vN );
		vec3 R2 = cross( vN, vSigmaX );
		float fDet = dot( vSigmaX, R1 ) * faceDirection;
		vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );
		return normalize( abs( fDet ) * surf_norm - vGrad );
	}
#endif`,vI=`#if NUM_CLIPPING_PLANES > 0
	vec4 plane;
	#pragma unroll_loop_start
	for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
		plane = clippingPlanes[ i ];
		if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;
	}
	#pragma unroll_loop_end
	#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
		bool clipped = true;
		#pragma unroll_loop_start
		for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
			plane = clippingPlanes[ i ];
			clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;
		}
		#pragma unroll_loop_end
		if ( clipped ) discard;
	#endif
#endif`,yI=`#if NUM_CLIPPING_PLANES > 0
	varying vec3 vClipPosition;
	uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
#endif`,xI=`#if NUM_CLIPPING_PLANES > 0
	varying vec3 vClipPosition;
#endif`,SI=`#if NUM_CLIPPING_PLANES > 0
	vClipPosition = - mvPosition.xyz;
#endif`,EI=`#if defined( USE_COLOR_ALPHA )
	diffuseColor *= vColor;
#elif defined( USE_COLOR )
	diffuseColor.rgb *= vColor;
#endif`,bI=`#if defined( USE_COLOR_ALPHA )
	varying vec4 vColor;
#elif defined( USE_COLOR )
	varying vec3 vColor;
#endif`,MI=`#if defined( USE_COLOR_ALPHA )
	varying vec4 vColor;
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )
	varying vec3 vColor;
#endif`,TI=`#if defined( USE_COLOR_ALPHA )
	vColor = vec4( 1.0 );
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )
	vColor = vec3( 1.0 );
#endif
#ifdef USE_COLOR
	vColor *= color;
#endif
#ifdef USE_INSTANCING_COLOR
	vColor.xyz *= instanceColor.xyz;
#endif`,wI=`#define PI 3.141592653589793
#define PI2 6.283185307179586
#define PI_HALF 1.5707963267948966
#define RECIPROCAL_PI 0.3183098861837907
#define RECIPROCAL_PI2 0.15915494309189535
#define EPSILON 1e-6
#ifndef saturate
#define saturate( a ) clamp( a, 0.0, 1.0 )
#endif
#define whiteComplement( a ) ( 1.0 - saturate( a ) )
float pow2( const in float x ) { return x*x; }
vec3 pow2( const in vec3 x ) { return x*x; }
float pow3( const in float x ) { return x*x*x; }
float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }
float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }
highp float rand( const in vec2 uv ) {
	const highp float a = 12.9898, b = 78.233, c = 43758.5453;
	highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
	return fract( sin( sn ) * c );
}
#ifdef HIGH_PRECISION
	float precisionSafeLength( vec3 v ) { return length( v ); }
#else
	float precisionSafeLength( vec3 v ) {
		float maxComponent = max3( abs( v ) );
		return length( v / maxComponent ) * maxComponent;
	}
#endif
struct IncidentLight {
	vec3 color;
	vec3 direction;
	bool visible;
};
struct ReflectedLight {
	vec3 directDiffuse;
	vec3 directSpecular;
	vec3 indirectDiffuse;
	vec3 indirectSpecular;
};
#ifdef USE_ALPHAHASH
	varying vec3 vPosition;
#endif
vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
	return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
}
vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
	return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
}
mat3 transposeMat3( const in mat3 m ) {
	mat3 tmp;
	tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );
	tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );
	tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );
	return tmp;
}
float luminance( const in vec3 rgb ) {
	const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );
	return dot( weights, rgb );
}
bool isPerspectiveMatrix( mat4 m ) {
	return m[ 2 ][ 3 ] == - 1.0;
}
vec2 equirectUv( in vec3 dir ) {
	float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;
	float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
	return vec2( u, v );
}
vec3 BRDF_Lambert( const in vec3 diffuseColor ) {
	return RECIPROCAL_PI * diffuseColor;
}
vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {
	float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
	return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
}
float F_Schlick( const in float f0, const in float f90, const in float dotVH ) {
	float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
	return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
} // validated`,AI=`#ifdef ENVMAP_TYPE_CUBE_UV
	#define cubeUV_minMipLevel 4.0
	#define cubeUV_minTileSize 16.0
	float getFace( vec3 direction ) {
		vec3 absDirection = abs( direction );
		float face = - 1.0;
		if ( absDirection.x > absDirection.z ) {
			if ( absDirection.x > absDirection.y )
				face = direction.x > 0.0 ? 0.0 : 3.0;
			else
				face = direction.y > 0.0 ? 1.0 : 4.0;
		} else {
			if ( absDirection.z > absDirection.y )
				face = direction.z > 0.0 ? 2.0 : 5.0;
			else
				face = direction.y > 0.0 ? 1.0 : 4.0;
		}
		return face;
	}
	vec2 getUV( vec3 direction, float face ) {
		vec2 uv;
		if ( face == 0.0 ) {
			uv = vec2( direction.z, direction.y ) / abs( direction.x );
		} else if ( face == 1.0 ) {
			uv = vec2( - direction.x, - direction.z ) / abs( direction.y );
		} else if ( face == 2.0 ) {
			uv = vec2( - direction.x, direction.y ) / abs( direction.z );
		} else if ( face == 3.0 ) {
			uv = vec2( - direction.z, direction.y ) / abs( direction.x );
		} else if ( face == 4.0 ) {
			uv = vec2( - direction.x, direction.z ) / abs( direction.y );
		} else {
			uv = vec2( direction.x, direction.y ) / abs( direction.z );
		}
		return 0.5 * ( uv + 1.0 );
	}
	vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {
		float face = getFace( direction );
		float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );
		mipInt = max( mipInt, cubeUV_minMipLevel );
		float faceSize = exp2( mipInt );
		highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;
		if ( face > 2.0 ) {
			uv.y += faceSize;
			face -= 3.0;
		}
		uv.x += face * faceSize;
		uv.x += filterInt * 3.0 * cubeUV_minTileSize;
		uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );
		uv.x *= CUBEUV_TEXEL_WIDTH;
		uv.y *= CUBEUV_TEXEL_HEIGHT;
		#ifdef texture2DGradEXT
			return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;
		#else
			return texture2D( envMap, uv ).rgb;
		#endif
	}
	#define cubeUV_r0 1.0
	#define cubeUV_v0 0.339
	#define cubeUV_m0 - 2.0
	#define cubeUV_r1 0.8
	#define cubeUV_v1 0.276
	#define cubeUV_m1 - 1.0
	#define cubeUV_r4 0.4
	#define cubeUV_v4 0.046
	#define cubeUV_m4 2.0
	#define cubeUV_r5 0.305
	#define cubeUV_v5 0.016
	#define cubeUV_m5 3.0
	#define cubeUV_r6 0.21
	#define cubeUV_v6 0.0038
	#define cubeUV_m6 4.0
	float roughnessToMip( float roughness ) {
		float mip = 0.0;
		if ( roughness >= cubeUV_r1 ) {
			mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;
		} else if ( roughness >= cubeUV_r4 ) {
			mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;
		} else if ( roughness >= cubeUV_r5 ) {
			mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;
		} else if ( roughness >= cubeUV_r6 ) {
			mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;
		} else {
			mip = - 2.0 * log2( 1.16 * roughness );		}
		return mip;
	}
	vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {
		float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );
		float mipF = fract( mip );
		float mipInt = floor( mip );
		vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );
		if ( mipF == 0.0 ) {
			return vec4( color0, 1.0 );
		} else {
			vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );
			return vec4( mix( color0, color1, mipF ), 1.0 );
		}
	}
#endif`,RI=`vec3 transformedNormal = objectNormal;
#ifdef USE_TANGENT
	vec3 transformedTangent = objectTangent;
#endif
#ifdef USE_BATCHING
	mat3 bm = mat3( batchingMatrix );
	transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );
	transformedNormal = bm * transformedNormal;
	#ifdef USE_TANGENT
		transformedTangent = bm * transformedTangent;
	#endif
#endif
#ifdef USE_INSTANCING
	mat3 im = mat3( instanceMatrix );
	transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );
	transformedNormal = im * transformedNormal;
	#ifdef USE_TANGENT
		transformedTangent = im * transformedTangent;
	#endif
#endif
transformedNormal = normalMatrix * transformedNormal;
#ifdef FLIP_SIDED
	transformedNormal = - transformedNormal;
#endif
#ifdef USE_TANGENT
	transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;
	#ifdef FLIP_SIDED
		transformedTangent = - transformedTangent;
	#endif
#endif`,CI=`#ifdef USE_DISPLACEMENTMAP
	uniform sampler2D displacementMap;
	uniform float displacementScale;
	uniform float displacementBias;
#endif`,LI=`#ifdef USE_DISPLACEMENTMAP
	transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );
#endif`,PI=`#ifdef USE_EMISSIVEMAP
	vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );
	totalEmissiveRadiance *= emissiveColor.rgb;
#endif`,II=`#ifdef USE_EMISSIVEMAP
	uniform sampler2D emissiveMap;
#endif`,DI="gl_FragColor = linearToOutputTexel( gl_FragColor );",NI=`
const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(
	vec3( 0.8224621, 0.177538, 0.0 ),
	vec3( 0.0331941, 0.9668058, 0.0 ),
	vec3( 0.0170827, 0.0723974, 0.9105199 )
);
const mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(
	vec3( 1.2249401, - 0.2249404, 0.0 ),
	vec3( - 0.0420569, 1.0420571, 0.0 ),
	vec3( - 0.0196376, - 0.0786361, 1.0982735 )
);
vec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {
	return vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );
}
vec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {
	return vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );
}
vec4 LinearTransferOETF( in vec4 value ) {
	return value;
}
vec4 sRGBTransferOETF( in vec4 value ) {
	return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );
}
vec4 LinearToLinear( in vec4 value ) {
	return value;
}
vec4 LinearTosRGB( in vec4 value ) {
	return sRGBTransferOETF( value );
}`,UI=`#ifdef USE_ENVMAP
	#ifdef ENV_WORLDPOS
		vec3 cameraToFrag;
		if ( isOrthographic ) {
			cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
		} else {
			cameraToFrag = normalize( vWorldPosition - cameraPosition );
		}
		vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
		#ifdef ENVMAP_MODE_REFLECTION
			vec3 reflectVec = reflect( cameraToFrag, worldNormal );
		#else
			vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );
		#endif
	#else
		vec3 reflectVec = vReflect;
	#endif
	#ifdef ENVMAP_TYPE_CUBE
		vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );
	#else
		vec4 envColor = vec4( 0.0 );
	#endif
	#ifdef ENVMAP_BLENDING_MULTIPLY
		outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );
	#elif defined( ENVMAP_BLENDING_MIX )
		outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );
	#elif defined( ENVMAP_BLENDING_ADD )
		outgoingLight += envColor.xyz * specularStrength * reflectivity;
	#endif
#endif`,OI=`#ifdef USE_ENVMAP
	uniform float envMapIntensity;
	uniform float flipEnvMap;
	#ifdef ENVMAP_TYPE_CUBE
		uniform samplerCube envMap;
	#else
		uniform sampler2D envMap;
	#endif
	
#endif`,FI=`#ifdef USE_ENVMAP
	uniform float reflectivity;
	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
		#define ENV_WORLDPOS
	#endif
	#ifdef ENV_WORLDPOS
		varying vec3 vWorldPosition;
		uniform float refractionRatio;
	#else
		varying vec3 vReflect;
	#endif
#endif`,kI=`#ifdef USE_ENVMAP
	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
		#define ENV_WORLDPOS
	#endif
	#ifdef ENV_WORLDPOS
		
		varying vec3 vWorldPosition;
	#else
		varying vec3 vReflect;
		uniform float refractionRatio;
	#endif
#endif`,BI=`#ifdef USE_ENVMAP
	#ifdef ENV_WORLDPOS
		vWorldPosition = worldPosition.xyz;
	#else
		vec3 cameraToVertex;
		if ( isOrthographic ) {
			cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
		} else {
			cameraToVertex = normalize( worldPosition.xyz - cameraPosition );
		}
		vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
		#ifdef ENVMAP_MODE_REFLECTION
			vReflect = reflect( cameraToVertex, worldNormal );
		#else
			vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
		#endif
	#endif
#endif`,HI=`#ifdef USE_FOG
	vFogDepth = - mvPosition.z;
#endif`,zI=`#ifdef USE_FOG
	varying float vFogDepth;
#endif`,VI=`#ifdef USE_FOG
	#ifdef FOG_EXP2
		float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );
	#else
		float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );
	#endif
	gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
#endif`,GI=`#ifdef USE_FOG
	uniform vec3 fogColor;
	varying float vFogDepth;
	#ifdef FOG_EXP2
		uniform float fogDensity;
	#else
		uniform float fogNear;
		uniform float fogFar;
	#endif
#endif`,WI=`#ifdef USE_GRADIENTMAP
	uniform sampler2D gradientMap;
#endif
vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
	float dotNL = dot( normal, lightDirection );
	vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );
	#ifdef USE_GRADIENTMAP
		return vec3( texture2D( gradientMap, coord ).r );
	#else
		vec2 fw = fwidth( coord ) * 0.5;
		return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );
	#endif
}`,$I=`#ifdef USE_LIGHTMAP
	vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
	vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
	reflectedLight.indirectDiffuse += lightMapIrradiance;
#endif`,XI=`#ifdef USE_LIGHTMAP
	uniform sampler2D lightMap;
	uniform float lightMapIntensity;
#endif`,jI=`LambertMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.specularStrength = specularStrength;`,qI=`varying vec3 vViewPosition;
struct LambertMaterial {
	vec3 diffuseColor;
	float specularStrength;
};
void 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 ) {
	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
	vec3 irradiance = dotNL * directLight.color;
	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void 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 ) {
	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct				RE_Direct_Lambert
#define RE_IndirectDiffuse		RE_IndirectDiffuse_Lambert`,YI=`uniform bool receiveShadow;
uniform vec3 ambientLightColor;
#if defined( USE_LIGHT_PROBES )
	uniform vec3 lightProbe[ 9 ];
#endif
vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {
	float x = normal.x, y = normal.y, z = normal.z;
	vec3 result = shCoefficients[ 0 ] * 0.886227;
	result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;
	result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;
	result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;
	result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;
	result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;
	result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );
	result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;
	result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );
	return result;
}
vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {
	vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
	vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );
	return irradiance;
}
vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
	vec3 irradiance = ambientLightColor;
	return irradiance;
}
float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {
	#if defined ( LEGACY_LIGHTS )
		if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {
			return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );
		}
		return 1.0;
	#else
		float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );
		if ( cutoffDistance > 0.0 ) {
			distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );
		}
		return distanceFalloff;
	#endif
}
float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {
	return smoothstep( coneCosine, penumbraCosine, angleCosine );
}
#if NUM_DIR_LIGHTS > 0
	struct DirectionalLight {
		vec3 direction;
		vec3 color;
	};
	uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];
	void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {
		light.color = directionalLight.color;
		light.direction = directionalLight.direction;
		light.visible = true;
	}
#endif
#if NUM_POINT_LIGHTS > 0
	struct PointLight {
		vec3 position;
		vec3 color;
		float distance;
		float decay;
	};
	uniform PointLight pointLights[ NUM_POINT_LIGHTS ];
	void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {
		vec3 lVector = pointLight.position - geometryPosition;
		light.direction = normalize( lVector );
		float lightDistance = length( lVector );
		light.color = pointLight.color;
		light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );
		light.visible = ( light.color != vec3( 0.0 ) );
	}
#endif
#if NUM_SPOT_LIGHTS > 0
	struct SpotLight {
		vec3 position;
		vec3 direction;
		vec3 color;
		float distance;
		float decay;
		float coneCos;
		float penumbraCos;
	};
	uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];
	void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {
		vec3 lVector = spotLight.position - geometryPosition;
		light.direction = normalize( lVector );
		float angleCos = dot( light.direction, spotLight.direction );
		float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );
		if ( spotAttenuation > 0.0 ) {
			float lightDistance = length( lVector );
			light.color = spotLight.color * spotAttenuation;
			light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );
			light.visible = ( light.color != vec3( 0.0 ) );
		} else {
			light.color = vec3( 0.0 );
			light.visible = false;
		}
	}
#endif
#if NUM_RECT_AREA_LIGHTS > 0
	struct RectAreaLight {
		vec3 color;
		vec3 position;
		vec3 halfWidth;
		vec3 halfHeight;
	};
	uniform sampler2D ltc_1;	uniform sampler2D ltc_2;
	uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];
#endif
#if NUM_HEMI_LIGHTS > 0
	struct HemisphereLight {
		vec3 direction;
		vec3 skyColor;
		vec3 groundColor;
	};
	uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];
	vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {
		float dotNL = dot( normal, hemiLight.direction );
		float hemiDiffuseWeight = 0.5 * dotNL + 0.5;
		vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );
		return irradiance;
	}
#endif`,KI=`#ifdef USE_ENVMAP
	vec3 getIBLIrradiance( const in vec3 normal ) {
		#ifdef ENVMAP_TYPE_CUBE_UV
			vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
			vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );
			return PI * envMapColor.rgb * envMapIntensity;
		#else
			return vec3( 0.0 );
		#endif
	}
	vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {
		#ifdef ENVMAP_TYPE_CUBE_UV
			vec3 reflectVec = reflect( - viewDir, normal );
			reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );
			reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
			vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );
			return envMapColor.rgb * envMapIntensity;
		#else
			return vec3( 0.0 );
		#endif
	}
	#ifdef USE_ANISOTROPY
		vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {
			#ifdef ENVMAP_TYPE_CUBE_UV
				vec3 bentNormal = cross( bitangent, viewDir );
				bentNormal = normalize( cross( bentNormal, bitangent ) );
				bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );
				return getIBLRadiance( viewDir, bentNormal, roughness );
			#else
				return vec3( 0.0 );
			#endif
		}
	#endif
#endif`,ZI=`ToonMaterial material;
material.diffuseColor = diffuseColor.rgb;`,JI=`varying vec3 vViewPosition;
struct ToonMaterial {
	vec3 diffuseColor;
};
void 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 ) {
	vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;
	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void 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 ) {
	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct				RE_Direct_Toon
#define RE_IndirectDiffuse		RE_IndirectDiffuse_Toon`,QI=`BlinnPhongMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.specularColor = specular;
material.specularShininess = shininess;
material.specularStrength = specularStrength;`,eD=`varying vec3 vViewPosition;
struct BlinnPhongMaterial {
	vec3 diffuseColor;
	vec3 specularColor;
	float specularShininess;
	float specularStrength;
};
void 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 ) {
	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
	vec3 irradiance = dotNL * directLight.color;
	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
	reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;
}
void 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 ) {
	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct				RE_Direct_BlinnPhong
#define RE_IndirectDiffuse		RE_IndirectDiffuse_BlinnPhong`,tD=`PhysicalMaterial material;
material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );
vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );
float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );
material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;
material.roughness = min( material.roughness, 1.0 );
#ifdef IOR
	material.ior = ior;
	#ifdef USE_SPECULAR
		float specularIntensityFactor = specularIntensity;
		vec3 specularColorFactor = specularColor;
		#ifdef USE_SPECULAR_COLORMAP
			specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;
		#endif
		#ifdef USE_SPECULAR_INTENSITYMAP
			specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;
		#endif
		material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );
	#else
		float specularIntensityFactor = 1.0;
		vec3 specularColorFactor = vec3( 1.0 );
		material.specularF90 = 1.0;
	#endif
	material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );
#else
	material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );
	material.specularF90 = 1.0;
#endif
#ifdef USE_CLEARCOAT
	material.clearcoat = clearcoat;
	material.clearcoatRoughness = clearcoatRoughness;
	material.clearcoatF0 = vec3( 0.04 );
	material.clearcoatF90 = 1.0;
	#ifdef USE_CLEARCOATMAP
		material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;
	#endif
	#ifdef USE_CLEARCOAT_ROUGHNESSMAP
		material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;
	#endif
	material.clearcoat = saturate( material.clearcoat );	material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );
	material.clearcoatRoughness += geometryRoughness;
	material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );
#endif
#ifdef USE_IRIDESCENCE
	material.iridescence = iridescence;
	material.iridescenceIOR = iridescenceIOR;
	#ifdef USE_IRIDESCENCEMAP
		material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;
	#endif
	#ifdef USE_IRIDESCENCE_THICKNESSMAP
		material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;
	#else
		material.iridescenceThickness = iridescenceThicknessMaximum;
	#endif
#endif
#ifdef USE_SHEEN
	material.sheenColor = sheenColor;
	#ifdef USE_SHEEN_COLORMAP
		material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;
	#endif
	material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );
	#ifdef USE_SHEEN_ROUGHNESSMAP
		material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;
	#endif
#endif
#ifdef USE_ANISOTROPY
	#ifdef USE_ANISOTROPYMAP
		mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );
		vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;
		vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;
	#else
		vec2 anisotropyV = anisotropyVector;
	#endif
	material.anisotropy = length( anisotropyV );
	if( material.anisotropy == 0.0 ) {
		anisotropyV = vec2( 1.0, 0.0 );
	} else {
		anisotropyV /= material.anisotropy;
		material.anisotropy = saturate( material.anisotropy );
	}
	material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
	material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;
	material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;
#endif`,nD=`struct PhysicalMaterial {
	vec3 diffuseColor;
	float roughness;
	vec3 specularColor;
	float specularF90;
	#ifdef USE_CLEARCOAT
		float clearcoat;
		float clearcoatRoughness;
		vec3 clearcoatF0;
		float clearcoatF90;
	#endif
	#ifdef USE_IRIDESCENCE
		float iridescence;
		float iridescenceIOR;
		float iridescenceThickness;
		vec3 iridescenceFresnel;
		vec3 iridescenceF0;
	#endif
	#ifdef USE_SHEEN
		vec3 sheenColor;
		float sheenRoughness;
	#endif
	#ifdef IOR
		float ior;
	#endif
	#ifdef USE_TRANSMISSION
		float transmission;
		float transmissionAlpha;
		float thickness;
		float attenuationDistance;
		vec3 attenuationColor;
	#endif
	#ifdef USE_ANISOTROPY
		float anisotropy;
		float alphaT;
		vec3 anisotropyT;
		vec3 anisotropyB;
	#endif
};
vec3 clearcoatSpecularDirect = vec3( 0.0 );
vec3 clearcoatSpecularIndirect = vec3( 0.0 );
vec3 sheenSpecularDirect = vec3( 0.0 );
vec3 sheenSpecularIndirect = vec3(0.0 );
vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {
    float x = clamp( 1.0 - dotVH, 0.0, 1.0 );
    float x2 = x * x;
    float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );
    return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );
}
float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {
	float a2 = pow2( alpha );
	float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
	float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
	return 0.5 / max( gv + gl, EPSILON );
}
float D_GGX( const in float alpha, const in float dotNH ) {
	float a2 = pow2( alpha );
	float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;
	return RECIPROCAL_PI * a2 / pow2( denom );
}
#ifdef USE_ANISOTROPY
	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 ) {
		float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );
		float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );
		float v = 0.5 / ( gv + gl );
		return saturate(v);
	}
	float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {
		float a2 = alphaT * alphaB;
		highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );
		highp float v2 = dot( v, v );
		float w2 = a2 / v2;
		return RECIPROCAL_PI * a2 * pow2 ( w2 );
	}
#endif
#ifdef USE_CLEARCOAT
	vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {
		vec3 f0 = material.clearcoatF0;
		float f90 = material.clearcoatF90;
		float roughness = material.clearcoatRoughness;
		float alpha = pow2( roughness );
		vec3 halfDir = normalize( lightDir + viewDir );
		float dotNL = saturate( dot( normal, lightDir ) );
		float dotNV = saturate( dot( normal, viewDir ) );
		float dotNH = saturate( dot( normal, halfDir ) );
		float dotVH = saturate( dot( viewDir, halfDir ) );
		vec3 F = F_Schlick( f0, f90, dotVH );
		float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
		float D = D_GGX( alpha, dotNH );
		return F * ( V * D );
	}
#endif
vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {
	vec3 f0 = material.specularColor;
	float f90 = material.specularF90;
	float roughness = material.roughness;
	float alpha = pow2( roughness );
	vec3 halfDir = normalize( lightDir + viewDir );
	float dotNL = saturate( dot( normal, lightDir ) );
	float dotNV = saturate( dot( normal, viewDir ) );
	float dotNH = saturate( dot( normal, halfDir ) );
	float dotVH = saturate( dot( viewDir, halfDir ) );
	vec3 F = F_Schlick( f0, f90, dotVH );
	#ifdef USE_IRIDESCENCE
		F = mix( F, material.iridescenceFresnel, material.iridescence );
	#endif
	#ifdef USE_ANISOTROPY
		float dotTL = dot( material.anisotropyT, lightDir );
		float dotTV = dot( material.anisotropyT, viewDir );
		float dotTH = dot( material.anisotropyT, halfDir );
		float dotBL = dot( material.anisotropyB, lightDir );
		float dotBV = dot( material.anisotropyB, viewDir );
		float dotBH = dot( material.anisotropyB, halfDir );
		float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );
		float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );
	#else
		float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
		float D = D_GGX( alpha, dotNH );
	#endif
	return F * ( V * D );
}
vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {
	const float LUT_SIZE = 64.0;
	const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;
	const float LUT_BIAS = 0.5 / LUT_SIZE;
	float dotNV = saturate( dot( N, V ) );
	vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );
	uv = uv * LUT_SCALE + LUT_BIAS;
	return uv;
}
float LTC_ClippedSphereFormFactor( const in vec3 f ) {
	float l = length( f );
	return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );
}
vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {
	float x = dot( v1, v2 );
	float y = abs( x );
	float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;
	float b = 3.4175940 + ( 4.1616724 + y ) * y;
	float v = a / b;
	float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;
	return cross( v1, v2 ) * theta_sintheta;
}
vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {
	vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];
	vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];
	vec3 lightNormal = cross( v1, v2 );
	if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );
	vec3 T1, T2;
	T1 = normalize( V - N * dot( V, N ) );
	T2 = - cross( N, T1 );
	mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );
	vec3 coords[ 4 ];
	coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );
	coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );
	coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );
	coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );
	coords[ 0 ] = normalize( coords[ 0 ] );
	coords[ 1 ] = normalize( coords[ 1 ] );
	coords[ 2 ] = normalize( coords[ 2 ] );
	coords[ 3 ] = normalize( coords[ 3 ] );
	vec3 vectorFormFactor = vec3( 0.0 );
	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );
	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );
	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );
	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );
	float result = LTC_ClippedSphereFormFactor( vectorFormFactor );
	return vec3( result );
}
#if defined( USE_SHEEN )
float D_Charlie( float roughness, float dotNH ) {
	float alpha = pow2( roughness );
	float invAlpha = 1.0 / alpha;
	float cos2h = dotNH * dotNH;
	float sin2h = max( 1.0 - cos2h, 0.0078125 );
	return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );
}
float V_Neubelt( float dotNV, float dotNL ) {
	return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );
}
vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {
	vec3 halfDir = normalize( lightDir + viewDir );
	float dotNL = saturate( dot( normal, lightDir ) );
	float dotNV = saturate( dot( normal, viewDir ) );
	float dotNH = saturate( dot( normal, halfDir ) );
	float D = D_Charlie( sheenRoughness, dotNH );
	float V = V_Neubelt( dotNV, dotNL );
	return sheenColor * ( D * V );
}
#endif
float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
	float dotNV = saturate( dot( normal, viewDir ) );
	float r2 = roughness * roughness;
	float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;
	float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;
	float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );
	return saturate( DG * RECIPROCAL_PI );
}
vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
	float dotNV = saturate( dot( normal, viewDir ) );
	const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );
	const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );
	vec4 r = roughness * c0 + c1;
	float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;
	vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;
	return fab;
}
vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {
	vec2 fab = DFGApprox( normal, viewDir, roughness );
	return specularColor * fab.x + specularF90 * fab.y;
}
#ifdef USE_IRIDESCENCE
void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {
#else
void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {
#endif
	vec2 fab = DFGApprox( normal, viewDir, roughness );
	#ifdef USE_IRIDESCENCE
		vec3 Fr = mix( specularColor, iridescenceF0, iridescence );
	#else
		vec3 Fr = specularColor;
	#endif
	vec3 FssEss = Fr * fab.x + specularF90 * fab.y;
	float Ess = fab.x + fab.y;
	float Ems = 1.0 - Ess;
	vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;	vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );
	singleScatter += FssEss;
	multiScatter += Fms * Ems;
}
#if NUM_RECT_AREA_LIGHTS > 0
	void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
		vec3 normal = geometryNormal;
		vec3 viewDir = geometryViewDir;
		vec3 position = geometryPosition;
		vec3 lightPos = rectAreaLight.position;
		vec3 halfWidth = rectAreaLight.halfWidth;
		vec3 halfHeight = rectAreaLight.halfHeight;
		vec3 lightColor = rectAreaLight.color;
		float roughness = material.roughness;
		vec3 rectCoords[ 4 ];
		rectCoords[ 0 ] = lightPos + halfWidth - halfHeight;		rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;
		rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;
		rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;
		vec2 uv = LTC_Uv( normal, viewDir, roughness );
		vec4 t1 = texture2D( ltc_1, uv );
		vec4 t2 = texture2D( ltc_2, uv );
		mat3 mInv = mat3(
			vec3( t1.x, 0, t1.y ),
			vec3(    0, 1,    0 ),
			vec3( t1.z, 0, t1.w )
		);
		vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );
		reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );
		reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );
	}
#endif
void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
	vec3 irradiance = dotNL * directLight.color;
	#ifdef USE_CLEARCOAT
		float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );
		vec3 ccIrradiance = dotNLcc * directLight.color;
		clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );
	#endif
	#ifdef USE_SHEEN
		sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );
	#endif
	reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );
	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void 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 ) {
	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {
	#ifdef USE_CLEARCOAT
		clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );
	#endif
	#ifdef USE_SHEEN
		sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );
	#endif
	vec3 singleScattering = vec3( 0.0 );
	vec3 multiScattering = vec3( 0.0 );
	vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;
	#ifdef USE_IRIDESCENCE
		computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );
	#else
		computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );
	#endif
	vec3 totalScattering = singleScattering + multiScattering;
	vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );
	reflectedLight.indirectSpecular += radiance * singleScattering;
	reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;
	reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;
}
#define RE_Direct				RE_Direct_Physical
#define RE_Direct_RectArea		RE_Direct_RectArea_Physical
#define RE_IndirectDiffuse		RE_IndirectDiffuse_Physical
#define RE_IndirectSpecular		RE_IndirectSpecular_Physical
float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
	return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );
}`,iD=`
vec3 geometryPosition = - vViewPosition;
vec3 geometryNormal = normal;
vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );
vec3 geometryClearcoatNormal = vec3( 0.0 );
#ifdef USE_CLEARCOAT
	geometryClearcoatNormal = clearcoatNormal;
#endif
#ifdef USE_IRIDESCENCE
	float dotNVi = saturate( dot( normal, geometryViewDir ) );
	if ( material.iridescenceThickness == 0.0 ) {
		material.iridescence = 0.0;
	} else {
		material.iridescence = saturate( material.iridescence );
	}
	if ( material.iridescence > 0.0 ) {
		material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );
		material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );
	}
#endif
IncidentLight directLight;
#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )
	PointLight pointLight;
	#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0
	PointLightShadow pointLightShadow;
	#endif
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
		pointLight = pointLights[ i ];
		getPointLightInfo( pointLight, geometryPosition, directLight );
		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )
		pointLightShadow = pointLightShadows[ i ];
		directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;
		#endif
		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
	}
	#pragma unroll_loop_end
#endif
#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )
	SpotLight spotLight;
	vec4 spotColor;
	vec3 spotLightCoord;
	bool inSpotLightMap;
	#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0
	SpotLightShadow spotLightShadow;
	#endif
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
		spotLight = spotLights[ i ];
		getSpotLightInfo( spotLight, geometryPosition, directLight );
		#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
		#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX
		#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
		#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS
		#else
		#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
		#endif
		#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )
			spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;
			inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );
			spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );
			directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;
		#endif
		#undef SPOT_LIGHT_MAP_INDEX
		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
		spotLightShadow = spotLightShadows[ i ];
		directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
		#endif
		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
	}
	#pragma unroll_loop_end
#endif
#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )
	DirectionalLight directionalLight;
	#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0
	DirectionalLightShadow directionalLightShadow;
	#endif
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
		directionalLight = directionalLights[ i ];
		getDirectionalLightInfo( directionalLight, directLight );
		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
		directionalLightShadow = directionalLightShadows[ i ];
		directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
		#endif
		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
	}
	#pragma unroll_loop_end
#endif
#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )
	RectAreaLight rectAreaLight;
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {
		rectAreaLight = rectAreaLights[ i ];
		RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
	}
	#pragma unroll_loop_end
#endif
#if defined( RE_IndirectDiffuse )
	vec3 iblIrradiance = vec3( 0.0 );
	vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );
	#if defined( USE_LIGHT_PROBES )
		irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );
	#endif
	#if ( NUM_HEMI_LIGHTS > 0 )
		#pragma unroll_loop_start
		for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
			irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );
		}
		#pragma unroll_loop_end
	#endif
#endif
#if defined( RE_IndirectSpecular )
	vec3 radiance = vec3( 0.0 );
	vec3 clearcoatRadiance = vec3( 0.0 );
#endif`,rD=`#if defined( RE_IndirectDiffuse )
	#ifdef USE_LIGHTMAP
		vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
		vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
		irradiance += lightMapIrradiance;
	#endif
	#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )
		iblIrradiance += getIBLIrradiance( geometryNormal );
	#endif
#endif
#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )
	#ifdef USE_ANISOTROPY
		radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );
	#else
		radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );
	#endif
	#ifdef USE_CLEARCOAT
		clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );
	#endif
#endif`,sD=`#if defined( RE_IndirectDiffuse )
	RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
#endif
#if defined( RE_IndirectSpecular )
	RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
#endif`,oD=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
	gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
#endif`,aD=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
	uniform float logDepthBufFC;
	varying float vFragDepth;
	varying float vIsPerspective;
#endif`,lD=`#ifdef USE_LOGDEPTHBUF
	#ifdef USE_LOGDEPTHBUF_EXT
		varying float vFragDepth;
		varying float vIsPerspective;
	#else
		uniform float logDepthBufFC;
	#endif
#endif`,cD=`#ifdef USE_LOGDEPTHBUF
	#ifdef USE_LOGDEPTHBUF_EXT
		vFragDepth = 1.0 + gl_Position.w;
		vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
	#else
		if ( isPerspectiveMatrix( projectionMatrix ) ) {
			gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;
			gl_Position.z *= gl_Position.w;
		}
	#endif
#endif`,uD=`#ifdef USE_MAP
	vec4 sampledDiffuseColor = texture2D( map, vMapUv );
	#ifdef DECODE_VIDEO_TEXTURE
		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 );
	
	#endif
	diffuseColor *= sampledDiffuseColor;
#endif`,fD=`#ifdef USE_MAP
	uniform sampler2D map;
#endif`,dD=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
	#if defined( USE_POINTS_UV )
		vec2 uv = vUv;
	#else
		vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;
	#endif
#endif
#ifdef USE_MAP
	diffuseColor *= texture2D( map, uv );
#endif
#ifdef USE_ALPHAMAP
	diffuseColor.a *= texture2D( alphaMap, uv ).g;
#endif`,hD=`#if defined( USE_POINTS_UV )
	varying vec2 vUv;
#else
	#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
		uniform mat3 uvTransform;
	#endif
#endif
#ifdef USE_MAP
	uniform sampler2D map;
#endif
#ifdef USE_ALPHAMAP
	uniform sampler2D alphaMap;
#endif`,pD=`float metalnessFactor = metalness;
#ifdef USE_METALNESSMAP
	vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );
	metalnessFactor *= texelMetalness.b;
#endif`,mD=`#ifdef USE_METALNESSMAP
	uniform sampler2D metalnessMap;
#endif`,gD=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )
	vColor *= morphTargetBaseInfluence;
	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
		#if defined( USE_COLOR_ALPHA )
			if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];
		#elif defined( USE_COLOR )
			if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];
		#endif
	}
#endif`,_D=`#ifdef USE_MORPHNORMALS
	objectNormal *= morphTargetBaseInfluence;
	#ifdef MORPHTARGETS_TEXTURE
		for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
			if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];
		}
	#else
		objectNormal += morphNormal0 * morphTargetInfluences[ 0 ];
		objectNormal += morphNormal1 * morphTargetInfluences[ 1 ];
		objectNormal += morphNormal2 * morphTargetInfluences[ 2 ];
		objectNormal += morphNormal3 * morphTargetInfluences[ 3 ];
	#endif
#endif`,vD=`#ifdef USE_MORPHTARGETS
	uniform float morphTargetBaseInfluence;
	#ifdef MORPHTARGETS_TEXTURE
		uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];
		uniform sampler2DArray morphTargetsTexture;
		uniform ivec2 morphTargetsTextureSize;
		vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {
			int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;
			int y = texelIndex / morphTargetsTextureSize.x;
			int x = texelIndex - y * morphTargetsTextureSize.x;
			ivec3 morphUV = ivec3( x, y, morphTargetIndex );
			return texelFetch( morphTargetsTexture, morphUV, 0 );
		}
	#else
		#ifndef USE_MORPHNORMALS
			uniform float morphTargetInfluences[ 8 ];
		#else
			uniform float morphTargetInfluences[ 4 ];
		#endif
	#endif
#endif`,yD=`#ifdef USE_MORPHTARGETS
	transformed *= morphTargetBaseInfluence;
	#ifdef MORPHTARGETS_TEXTURE
		for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
			if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];
		}
	#else
		transformed += morphTarget0 * morphTargetInfluences[ 0 ];
		transformed += morphTarget1 * morphTargetInfluences[ 1 ];
		transformed += morphTarget2 * morphTargetInfluences[ 2 ];
		transformed += morphTarget3 * morphTargetInfluences[ 3 ];
		#ifndef USE_MORPHNORMALS
			transformed += morphTarget4 * morphTargetInfluences[ 4 ];
			transformed += morphTarget5 * morphTargetInfluences[ 5 ];
			transformed += morphTarget6 * morphTargetInfluences[ 6 ];
			transformed += morphTarget7 * morphTargetInfluences[ 7 ];
		#endif
	#endif
#endif`,xD=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
#ifdef FLAT_SHADED
	vec3 fdx = dFdx( vViewPosition );
	vec3 fdy = dFdy( vViewPosition );
	vec3 normal = normalize( cross( fdx, fdy ) );
#else
	vec3 normal = normalize( vNormal );
	#ifdef DOUBLE_SIDED
		normal *= faceDirection;
	#endif
#endif
#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )
	#ifdef USE_TANGENT
		mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
	#else
		mat3 tbn = getTangentFrame( - vViewPosition, normal,
		#if defined( USE_NORMALMAP )
			vNormalMapUv
		#elif defined( USE_CLEARCOAT_NORMALMAP )
			vClearcoatNormalMapUv
		#else
			vUv
		#endif
		);
	#endif
	#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
		tbn[0] *= faceDirection;
		tbn[1] *= faceDirection;
	#endif
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
	#ifdef USE_TANGENT
		mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
	#else
		mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );
	#endif
	#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
		tbn2[0] *= faceDirection;
		tbn2[1] *= faceDirection;
	#endif
#endif
vec3 nonPerturbedNormal = normal;`,SD=`#ifdef USE_NORMALMAP_OBJECTSPACE
	normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
	#ifdef FLIP_SIDED
		normal = - normal;
	#endif
	#ifdef DOUBLE_SIDED
		normal = normal * faceDirection;
	#endif
	normal = normalize( normalMatrix * normal );
#elif defined( USE_NORMALMAP_TANGENTSPACE )
	vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
	mapN.xy *= normalScale;
	normal = normalize( tbn * mapN );
#elif defined( USE_BUMPMAP )
	normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );
#endif`,ED=`#ifndef FLAT_SHADED
	varying vec3 vNormal;
	#ifdef USE_TANGENT
		varying vec3 vTangent;
		varying vec3 vBitangent;
	#endif
#endif`,bD=`#ifndef FLAT_SHADED
	varying vec3 vNormal;
	#ifdef USE_TANGENT
		varying vec3 vTangent;
		varying vec3 vBitangent;
	#endif
#endif`,MD=`#ifndef FLAT_SHADED
	vNormal = normalize( transformedNormal );
	#ifdef USE_TANGENT
		vTangent = normalize( transformedTangent );
		vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
	#endif
#endif`,TD=`#ifdef USE_NORMALMAP
	uniform sampler2D normalMap;
	uniform vec2 normalScale;
#endif
#ifdef USE_NORMALMAP_OBJECTSPACE
	uniform mat3 normalMatrix;
#endif
#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )
	mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {
		vec3 q0 = dFdx( eye_pos.xyz );
		vec3 q1 = dFdy( eye_pos.xyz );
		vec2 st0 = dFdx( uv.st );
		vec2 st1 = dFdy( uv.st );
		vec3 N = surf_norm;
		vec3 q1perp = cross( q1, N );
		vec3 q0perp = cross( N, q0 );
		vec3 T = q1perp * st0.x + q0perp * st1.x;
		vec3 B = q1perp * st0.y + q0perp * st1.y;
		float det = max( dot( T, T ), dot( B, B ) );
		float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );
		return mat3( T * scale, B * scale, N );
	}
#endif`,wD=`#ifdef USE_CLEARCOAT
	vec3 clearcoatNormal = nonPerturbedNormal;
#endif`,AD=`#ifdef USE_CLEARCOAT_NORMALMAP
	vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;
	clearcoatMapN.xy *= clearcoatNormalScale;
	clearcoatNormal = normalize( tbn2 * clearcoatMapN );
#endif`,RD=`#ifdef USE_CLEARCOATMAP
	uniform sampler2D clearcoatMap;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
	uniform sampler2D clearcoatNormalMap;
	uniform vec2 clearcoatNormalScale;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
	uniform sampler2D clearcoatRoughnessMap;
#endif`,CD=`#ifdef USE_IRIDESCENCEMAP
	uniform sampler2D iridescenceMap;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
	uniform sampler2D iridescenceThicknessMap;
#endif`,LD=`#ifdef OPAQUE
diffuseColor.a = 1.0;
#endif
#ifdef USE_TRANSMISSION
diffuseColor.a *= material.transmissionAlpha;
#endif
gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,PD=`vec3 packNormalToRGB( const in vec3 normal ) {
	return normalize( normal ) * 0.5 + 0.5;
}
vec3 unpackRGBToNormal( const in vec3 rgb ) {
	return 2.0 * rgb.xyz - 1.0;
}
const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;
const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );
const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );
const float ShiftRight8 = 1. / 256.;
vec4 packDepthToRGBA( const in float v ) {
	vec4 r = vec4( fract( v * PackFactors ), v );
	r.yzw -= r.xyz * ShiftRight8;	return r * PackUpscale;
}
float unpackRGBAToDepth( const in vec4 v ) {
	return dot( v, UnpackFactors );
}
vec2 packDepthToRG( in highp float v ) {
	return packDepthToRGBA( v ).yx;
}
float unpackRGToDepth( const in highp vec2 v ) {
	return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );
}
vec4 pack2HalfToRGBA( vec2 v ) {
	vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );
	return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );
}
vec2 unpackRGBATo2Half( vec4 v ) {
	return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );
}
float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {
	return ( viewZ + near ) / ( near - far );
}
float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {
	return depth * ( near - far ) - near;
}
float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {
	return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );
}
float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {
	return ( near * far ) / ( ( far - near ) * depth - far );
}`,ID=`#ifdef PREMULTIPLIED_ALPHA
	gl_FragColor.rgb *= gl_FragColor.a;
#endif`,DD=`vec4 mvPosition = vec4( transformed, 1.0 );
#ifdef USE_BATCHING
	mvPosition = batchingMatrix * mvPosition;
#endif
#ifdef USE_INSTANCING
	mvPosition = instanceMatrix * mvPosition;
#endif
mvPosition = modelViewMatrix * mvPosition;
gl_Position = projectionMatrix * mvPosition;`,ND=`#ifdef DITHERING
	gl_FragColor.rgb = dithering( gl_FragColor.rgb );
#endif`,UD=`#ifdef DITHERING
	vec3 dithering( vec3 color ) {
		float grid_position = rand( gl_FragCoord.xy );
		vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
		dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
		return color + dither_shift_RGB;
	}
#endif`,OD=`float roughnessFactor = roughness;
#ifdef USE_ROUGHNESSMAP
	vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
	roughnessFactor *= texelRoughness.g;
#endif`,FD=`#ifdef USE_ROUGHNESSMAP
	uniform sampler2D roughnessMap;
#endif`,kD=`#if NUM_SPOT_LIGHT_COORDS > 0
	varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
#endif
#if NUM_SPOT_LIGHT_MAPS > 0
	uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];
#endif
#ifdef USE_SHADOWMAP
	#if NUM_DIR_LIGHT_SHADOWS > 0
		uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];
		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
		struct DirectionalLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
		};
		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
	#endif
	#if NUM_SPOT_LIGHT_SHADOWS > 0
		uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];
		struct SpotLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
		};
		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
	#endif
	#if NUM_POINT_LIGHT_SHADOWS > 0
		uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];
		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
		struct PointLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
			float shadowCameraNear;
			float shadowCameraFar;
		};
		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
	#endif
	float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {
		return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );
	}
	vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {
		return unpackRGBATo2Half( texture2D( shadow, uv ) );
	}
	float VSMShadow (sampler2D shadow, vec2 uv, float compare ){
		float occlusion = 1.0;
		vec2 distribution = texture2DDistribution( shadow, uv );
		float hard_shadow = step( compare , distribution.x );
		if (hard_shadow != 1.0 ) {
			float distance = compare - distribution.x ;
			float variance = max( 0.00000, distribution.y * distribution.y );
			float softness_probability = variance / (variance + distance * distance );			softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );			occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );
		}
		return occlusion;
	}
	float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
		float shadow = 1.0;
		shadowCoord.xyz /= shadowCoord.w;
		shadowCoord.z += shadowBias;
		bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
		bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
		if ( frustumTest ) {
		#if defined( SHADOWMAP_TYPE_PCF )
			vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
			float dx0 = - texelSize.x * shadowRadius;
			float dy0 = - texelSize.y * shadowRadius;
			float dx1 = + texelSize.x * shadowRadius;
			float dy1 = + texelSize.y * shadowRadius;
			float dx2 = dx0 / 2.0;
			float dy2 = dy0 / 2.0;
			float dx3 = dx1 / 2.0;
			float dy3 = dy1 / 2.0;
			shadow = (
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )
			) * ( 1.0 / 17.0 );
		#elif defined( SHADOWMAP_TYPE_PCF_SOFT )
			vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
			float dx = texelSize.x;
			float dy = texelSize.y;
			vec2 uv = shadowCoord.xy;
			vec2 f = fract( uv * shadowMapSize + 0.5 );
			uv -= f * texelSize;
			shadow = (
				texture2DCompare( shadowMap, uv, shadowCoord.z ) +
				texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +
				texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +
				mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),
					 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),
					 f.x ) +
				mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),
					 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),
					 f.x ) +
				mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),
					 texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),
					 f.y ) +
				mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),
					 texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),
					 f.y ) +
				mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),
						  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),
						  f.x ),
					 mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),
						  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),
						  f.x ),
					 f.y )
			) * ( 1.0 / 9.0 );
		#elif defined( SHADOWMAP_TYPE_VSM )
			shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );
		#else
			shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );
		#endif
		}
		return shadow;
	}
	vec2 cubeToUV( vec3 v, float texelSizeY ) {
		vec3 absV = abs( v );
		float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );
		absV *= scaleToCube;
		v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );
		vec2 planar = v.xy;
		float almostATexel = 1.5 * texelSizeY;
		float almostOne = 1.0 - almostATexel;
		if ( absV.z >= almostOne ) {
			if ( v.z > 0.0 )
				planar.x = 4.0 - v.x;
		} else if ( absV.x >= almostOne ) {
			float signX = sign( v.x );
			planar.x = v.z * signX + 2.0 * signX;
		} else if ( absV.y >= almostOne ) {
			float signY = sign( v.y );
			planar.x = v.x + 2.0 * signY + 2.0;
			planar.y = v.z * signY - 2.0;
		}
		return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );
	}
	float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
		vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );
		vec3 lightToPosition = shadowCoord.xyz;
		float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );		dp += shadowBias;
		vec3 bd3D = normalize( lightToPosition );
		#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )
			vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;
			return (
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )
			) * ( 1.0 / 9.0 );
		#else
			return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );
		#endif
	}
#endif`,BD=`#if NUM_SPOT_LIGHT_COORDS > 0
	uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];
	varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
#endif
#ifdef USE_SHADOWMAP
	#if NUM_DIR_LIGHT_SHADOWS > 0
		uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];
		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
		struct DirectionalLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
		};
		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
	#endif
	#if NUM_SPOT_LIGHT_SHADOWS > 0
		struct SpotLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
		};
		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
	#endif
	#if NUM_POINT_LIGHT_SHADOWS > 0
		uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];
		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
		struct PointLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
			float shadowCameraNear;
			float shadowCameraFar;
		};
		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
	#endif
#endif`,HD=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )
	vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
	vec4 shadowWorldPosition;
#endif
#if defined( USE_SHADOWMAP )
	#if NUM_DIR_LIGHT_SHADOWS > 0
		#pragma unroll_loop_start
		for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
			shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );
			vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;
		}
		#pragma unroll_loop_end
	#endif
	#if NUM_POINT_LIGHT_SHADOWS > 0
		#pragma unroll_loop_start
		for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
			shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );
			vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;
		}
		#pragma unroll_loop_end
	#endif
#endif
#if NUM_SPOT_LIGHT_COORDS > 0
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {
		shadowWorldPosition = worldPosition;
		#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
			shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;
		#endif
		vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;
	}
	#pragma unroll_loop_end
#endif`,zD=`float getShadowMask() {
	float shadow = 1.0;
	#ifdef USE_SHADOWMAP
	#if NUM_DIR_LIGHT_SHADOWS > 0
	DirectionalLightShadow directionalLight;
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
		directionalLight = directionalLightShadows[ i ];
		shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
	}
	#pragma unroll_loop_end
	#endif
	#if NUM_SPOT_LIGHT_SHADOWS > 0
	SpotLightShadow spotLight;
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
		spotLight = spotLightShadows[ i ];
		shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
	}
	#pragma unroll_loop_end
	#endif
	#if NUM_POINT_LIGHT_SHADOWS > 0
	PointLightShadow pointLight;
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
		pointLight = pointLightShadows[ i ];
		shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
	}
	#pragma unroll_loop_end
	#endif
	#endif
	return shadow;
}`,VD=`#ifdef USE_SKINNING
	mat4 boneMatX = getBoneMatrix( skinIndex.x );
	mat4 boneMatY = getBoneMatrix( skinIndex.y );
	mat4 boneMatZ = getBoneMatrix( skinIndex.z );
	mat4 boneMatW = getBoneMatrix( skinIndex.w );
#endif`,GD=`#ifdef USE_SKINNING
	uniform mat4 bindMatrix;
	uniform mat4 bindMatrixInverse;
	uniform highp sampler2D boneTexture;
	mat4 getBoneMatrix( const in float i ) {
		int size = textureSize( boneTexture, 0 ).x;
		int j = int( i ) * 4;
		int x = j % size;
		int y = j / size;
		vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );
		vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );
		vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );
		vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );
		return mat4( v1, v2, v3, v4 );
	}
#endif`,WD=`#ifdef USE_SKINNING
	vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
	vec4 skinned = vec4( 0.0 );
	skinned += boneMatX * skinVertex * skinWeight.x;
	skinned += boneMatY * skinVertex * skinWeight.y;
	skinned += boneMatZ * skinVertex * skinWeight.z;
	skinned += boneMatW * skinVertex * skinWeight.w;
	transformed = ( bindMatrixInverse * skinned ).xyz;
#endif`,$D=`#ifdef USE_SKINNING
	mat4 skinMatrix = mat4( 0.0 );
	skinMatrix += skinWeight.x * boneMatX;
	skinMatrix += skinWeight.y * boneMatY;
	skinMatrix += skinWeight.z * boneMatZ;
	skinMatrix += skinWeight.w * boneMatW;
	skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;
	objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;
	#ifdef USE_TANGENT
		objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
	#endif
#endif`,XD=`float specularStrength;
#ifdef USE_SPECULARMAP
	vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );
	specularStrength = texelSpecular.r;
#else
	specularStrength = 1.0;
#endif`,jD=`#ifdef USE_SPECULARMAP
	uniform sampler2D specularMap;
#endif`,qD=`#if defined( TONE_MAPPING )
	gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
#endif`,YD=`#ifndef saturate
#define saturate( a ) clamp( a, 0.0, 1.0 )
#endif
uniform float toneMappingExposure;
vec3 LinearToneMapping( vec3 color ) {
	return saturate( toneMappingExposure * color );
}
vec3 ReinhardToneMapping( vec3 color ) {
	color *= toneMappingExposure;
	return saturate( color / ( vec3( 1.0 ) + color ) );
}
vec3 OptimizedCineonToneMapping( vec3 color ) {
	color *= toneMappingExposure;
	color = max( vec3( 0.0 ), color - 0.004 );
	return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );
}
vec3 RRTAndODTFit( vec3 v ) {
	vec3 a = v * ( v + 0.0245786 ) - 0.000090537;
	vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;
	return a / b;
}
vec3 ACESFilmicToneMapping( vec3 color ) {
	const mat3 ACESInputMat = mat3(
		vec3( 0.59719, 0.07600, 0.02840 ),		vec3( 0.35458, 0.90834, 0.13383 ),
		vec3( 0.04823, 0.01566, 0.83777 )
	);
	const mat3 ACESOutputMat = mat3(
		vec3(  1.60475, -0.10208, -0.00327 ),		vec3( -0.53108,  1.10813, -0.07276 ),
		vec3( -0.07367, -0.00605,  1.07602 )
	);
	color *= toneMappingExposure / 0.6;
	color = ACESInputMat * color;
	color = RRTAndODTFit( color );
	color = ACESOutputMat * color;
	return saturate( color );
}
vec3 CustomToneMapping( vec3 color ) { return color; }`,KD=`#ifdef USE_TRANSMISSION
	material.transmission = transmission;
	material.transmissionAlpha = 1.0;
	material.thickness = thickness;
	material.attenuationDistance = attenuationDistance;
	material.attenuationColor = attenuationColor;
	#ifdef USE_TRANSMISSIONMAP
		material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;
	#endif
	#ifdef USE_THICKNESSMAP
		material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;
	#endif
	vec3 pos = vWorldPosition;
	vec3 v = normalize( cameraPosition - pos );
	vec3 n = inverseTransformDirection( normal, viewMatrix );
	vec4 transmitted = getIBLVolumeRefraction(
		n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,
		pos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,
		material.attenuationColor, material.attenuationDistance );
	material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );
	totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );
#endif`,ZD=`#ifdef USE_TRANSMISSION
	uniform float transmission;
	uniform float thickness;
	uniform float attenuationDistance;
	uniform vec3 attenuationColor;
	#ifdef USE_TRANSMISSIONMAP
		uniform sampler2D transmissionMap;
	#endif
	#ifdef USE_THICKNESSMAP
		uniform sampler2D thicknessMap;
	#endif
	uniform vec2 transmissionSamplerSize;
	uniform sampler2D transmissionSamplerMap;
	uniform mat4 modelMatrix;
	uniform mat4 projectionMatrix;
	varying vec3 vWorldPosition;
	float w0( float a ) {
		return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );
	}
	float w1( float a ) {
		return ( 1.0 / 6.0 ) * ( a *  a * ( 3.0 * a - 6.0 ) + 4.0 );
	}
	float w2( float a ){
		return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );
	}
	float w3( float a ) {
		return ( 1.0 / 6.0 ) * ( a * a * a );
	}
	float g0( float a ) {
		return w0( a ) + w1( a );
	}
	float g1( float a ) {
		return w2( a ) + w3( a );
	}
	float h0( float a ) {
		return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );
	}
	float h1( float a ) {
		return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );
	}
	vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {
		uv = uv * texelSize.zw + 0.5;
		vec2 iuv = floor( uv );
		vec2 fuv = fract( uv );
		float g0x = g0( fuv.x );
		float g1x = g1( fuv.x );
		float h0x = h0( fuv.x );
		float h1x = h1( fuv.x );
		float h0y = h0( fuv.y );
		float h1y = h1( fuv.y );
		vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
		vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
		vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
		vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
		return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +
			g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );
	}
	vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {
		vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );
		vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );
		vec2 fLodSizeInv = 1.0 / fLodSize;
		vec2 cLodSizeInv = 1.0 / cLodSize;
		vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );
		vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );
		return mix( fSample, cSample, fract( lod ) );
	}
	vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {
		vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );
		vec3 modelScale;
		modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );
		modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );
		modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );
		return normalize( refractionVector ) * thickness * modelScale;
	}
	float applyIorToRoughness( const in float roughness, const in float ior ) {
		return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );
	}
	vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {
		float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );
		return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );
	}
	vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {
		if ( isinf( attenuationDistance ) ) {
			return vec3( 1.0 );
		} else {
			vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;
			vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );			return transmittance;
		}
	}
	vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,
		const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,
		const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,
		const in vec3 attenuationColor, const in float attenuationDistance ) {
		vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );
		vec3 refractedRayExit = position + transmissionRay;
		vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
		vec2 refractionCoords = ndcPos.xy / ndcPos.w;
		refractionCoords += 1.0;
		refractionCoords /= 2.0;
		vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );
		vec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );
		vec3 attenuatedColor = transmittance * transmittedLight.rgb;
		vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );
		float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;
		return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );
	}
#endif`,JD=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
	varying vec2 vUv;
#endif
#ifdef USE_MAP
	varying vec2 vMapUv;
#endif
#ifdef USE_ALPHAMAP
	varying vec2 vAlphaMapUv;
#endif
#ifdef USE_LIGHTMAP
	varying vec2 vLightMapUv;
#endif
#ifdef USE_AOMAP
	varying vec2 vAoMapUv;
#endif
#ifdef USE_BUMPMAP
	varying vec2 vBumpMapUv;
#endif
#ifdef USE_NORMALMAP
	varying vec2 vNormalMapUv;
#endif
#ifdef USE_EMISSIVEMAP
	varying vec2 vEmissiveMapUv;
#endif
#ifdef USE_METALNESSMAP
	varying vec2 vMetalnessMapUv;
#endif
#ifdef USE_ROUGHNESSMAP
	varying vec2 vRoughnessMapUv;
#endif
#ifdef USE_ANISOTROPYMAP
	varying vec2 vAnisotropyMapUv;
#endif
#ifdef USE_CLEARCOATMAP
	varying vec2 vClearcoatMapUv;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
	varying vec2 vClearcoatNormalMapUv;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
	varying vec2 vClearcoatRoughnessMapUv;
#endif
#ifdef USE_IRIDESCENCEMAP
	varying vec2 vIridescenceMapUv;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
	varying vec2 vIridescenceThicknessMapUv;
#endif
#ifdef USE_SHEEN_COLORMAP
	varying vec2 vSheenColorMapUv;
#endif
#ifdef USE_SHEEN_ROUGHNESSMAP
	varying vec2 vSheenRoughnessMapUv;
#endif
#ifdef USE_SPECULARMAP
	varying vec2 vSpecularMapUv;
#endif
#ifdef USE_SPECULAR_COLORMAP
	varying vec2 vSpecularColorMapUv;
#endif
#ifdef USE_SPECULAR_INTENSITYMAP
	varying vec2 vSpecularIntensityMapUv;
#endif
#ifdef USE_TRANSMISSIONMAP
	uniform mat3 transmissionMapTransform;
	varying vec2 vTransmissionMapUv;
#endif
#ifdef USE_THICKNESSMAP
	uniform mat3 thicknessMapTransform;
	varying vec2 vThicknessMapUv;
#endif`,QD=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
	varying vec2 vUv;
#endif
#ifdef USE_MAP
	uniform mat3 mapTransform;
	varying vec2 vMapUv;
#endif
#ifdef USE_ALPHAMAP
	uniform mat3 alphaMapTransform;
	varying vec2 vAlphaMapUv;
#endif
#ifdef USE_LIGHTMAP
	uniform mat3 lightMapTransform;
	varying vec2 vLightMapUv;
#endif
#ifdef USE_AOMAP
	uniform mat3 aoMapTransform;
	varying vec2 vAoMapUv;
#endif
#ifdef USE_BUMPMAP
	uniform mat3 bumpMapTransform;
	varying vec2 vBumpMapUv;
#endif
#ifdef USE_NORMALMAP
	uniform mat3 normalMapTransform;
	varying vec2 vNormalMapUv;
#endif
#ifdef USE_DISPLACEMENTMAP
	uniform mat3 displacementMapTransform;
	varying vec2 vDisplacementMapUv;
#endif
#ifdef USE_EMISSIVEMAP
	uniform mat3 emissiveMapTransform;
	varying vec2 vEmissiveMapUv;
#endif
#ifdef USE_METALNESSMAP
	uniform mat3 metalnessMapTransform;
	varying vec2 vMetalnessMapUv;
#endif
#ifdef USE_ROUGHNESSMAP
	uniform mat3 roughnessMapTransform;
	varying vec2 vRoughnessMapUv;
#endif
#ifdef USE_ANISOTROPYMAP
	uniform mat3 anisotropyMapTransform;
	varying vec2 vAnisotropyMapUv;
#endif
#ifdef USE_CLEARCOATMAP
	uniform mat3 clearcoatMapTransform;
	varying vec2 vClearcoatMapUv;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
	uniform mat3 clearcoatNormalMapTransform;
	varying vec2 vClearcoatNormalMapUv;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
	uniform mat3 clearcoatRoughnessMapTransform;
	varying vec2 vClearcoatRoughnessMapUv;
#endif
#ifdef USE_SHEEN_COLORMAP
	uniform mat3 sheenColorMapTransform;
	varying vec2 vSheenColorMapUv;
#endif
#ifdef USE_SHEEN_ROUGHNESSMAP
	uniform mat3 sheenRoughnessMapTransform;
	varying vec2 vSheenRoughnessMapUv;
#endif
#ifdef USE_IRIDESCENCEMAP
	uniform mat3 iridescenceMapTransform;
	varying vec2 vIridescenceMapUv;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
	uniform mat3 iridescenceThicknessMapTransform;
	varying vec2 vIridescenceThicknessMapUv;
#endif
#ifdef USE_SPECULARMAP
	uniform mat3 specularMapTransform;
	varying vec2 vSpecularMapUv;
#endif
#ifdef USE_SPECULAR_COLORMAP
	uniform mat3 specularColorMapTransform;
	varying vec2 vSpecularColorMapUv;
#endif
#ifdef USE_SPECULAR_INTENSITYMAP
	uniform mat3 specularIntensityMapTransform;
	varying vec2 vSpecularIntensityMapUv;
#endif
#ifdef USE_TRANSMISSIONMAP
	uniform mat3 transmissionMapTransform;
	varying vec2 vTransmissionMapUv;
#endif
#ifdef USE_THICKNESSMAP
	uniform mat3 thicknessMapTransform;
	varying vec2 vThicknessMapUv;
#endif`,eN=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
	vUv = vec3( uv, 1 ).xy;
#endif
#ifdef USE_MAP
	vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;
#endif
#ifdef USE_ALPHAMAP
	vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_LIGHTMAP
	vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_AOMAP
	vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_BUMPMAP
	vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_NORMALMAP
	vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_DISPLACEMENTMAP
	vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_EMISSIVEMAP
	vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_METALNESSMAP
	vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_ROUGHNESSMAP
	vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_ANISOTROPYMAP
	vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_CLEARCOATMAP
	vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
	vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
	vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_IRIDESCENCEMAP
	vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
	vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SHEEN_COLORMAP
	vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SHEEN_ROUGHNESSMAP
	vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SPECULARMAP
	vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SPECULAR_COLORMAP
	vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SPECULAR_INTENSITYMAP
	vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_TRANSMISSIONMAP
	vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_THICKNESSMAP
	vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;
#endif`,tN=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0
	vec4 worldPosition = vec4( transformed, 1.0 );
	#ifdef USE_BATCHING
		worldPosition = batchingMatrix * worldPosition;
	#endif
	#ifdef USE_INSTANCING
		worldPosition = instanceMatrix * worldPosition;
	#endif
	worldPosition = modelMatrix * worldPosition;
#endif`;const nN=`varying vec2 vUv;
uniform mat3 uvTransform;
void main() {
	vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
	gl_Position = vec4( position.xy, 1.0, 1.0 );
}`,iN=`uniform sampler2D t2D;
uniform float backgroundIntensity;
varying vec2 vUv;
void main() {
	vec4 texColor = texture2D( t2D, vUv );
	#ifdef DECODE_VIDEO_TEXTURE
		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 );
	#endif
	texColor.rgb *= backgroundIntensity;
	gl_FragColor = texColor;
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
}`,rN=`varying vec3 vWorldDirection;
#include <common>
void main() {
	vWorldDirection = transformDirection( position, modelMatrix );
	#include <begin_vertex>
	#include <project_vertex>
	gl_Position.z = gl_Position.w;
}`,sN=`#ifdef ENVMAP_TYPE_CUBE
	uniform samplerCube envMap;
#elif defined( ENVMAP_TYPE_CUBE_UV )
	uniform sampler2D envMap;
#endif
uniform float flipEnvMap;
uniform float backgroundBlurriness;
uniform float backgroundIntensity;
varying vec3 vWorldDirection;
#include <cube_uv_reflection_fragment>
void main() {
	#ifdef ENVMAP_TYPE_CUBE
		vec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );
	#elif defined( ENVMAP_TYPE_CUBE_UV )
		vec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );
	#else
		vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );
	#endif
	texColor.rgb *= backgroundIntensity;
	gl_FragColor = texColor;
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
}`,oN=`varying vec3 vWorldDirection;
#include <common>
void main() {
	vWorldDirection = transformDirection( position, modelMatrix );
	#include <begin_vertex>
	#include <project_vertex>
	gl_Position.z = gl_Position.w;
}`,aN=`uniform samplerCube tCube;
uniform float tFlip;
uniform float opacity;
varying vec3 vWorldDirection;
void main() {
	vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );
	gl_FragColor = texColor;
	gl_FragColor.a *= opacity;
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
}`,lN=`#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
varying vec2 vHighPrecisionZW;
void main() {
	#include <uv_vertex>
	#include <batching_vertex>
	#include <skinbase_vertex>
	#ifdef USE_DISPLACEMENTMAP
		#include <beginnormal_vertex>
		#include <morphnormal_vertex>
		#include <skinnormal_vertex>
	#endif
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vHighPrecisionZW = gl_Position.zw;
}`,cN=`#if DEPTH_PACKING == 3200
	uniform float opacity;
#endif
#include <common>
#include <packing>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
varying vec2 vHighPrecisionZW;
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( 1.0 );
	#if DEPTH_PACKING == 3200
		diffuseColor.a = opacity;
	#endif
	#include <map_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <logdepthbuf_fragment>
	float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;
	#if DEPTH_PACKING == 3200
		gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );
	#elif DEPTH_PACKING == 3201
		gl_FragColor = packDepthToRGBA( fragCoordZ );
	#endif
}`,uN=`#define DISTANCE
varying vec3 vWorldPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <batching_vertex>
	#include <skinbase_vertex>
	#ifdef USE_DISPLACEMENTMAP
		#include <beginnormal_vertex>
		#include <morphnormal_vertex>
		#include <skinnormal_vertex>
	#endif
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <worldpos_vertex>
	#include <clipping_planes_vertex>
	vWorldPosition = worldPosition.xyz;
}`,fN=`#define DISTANCE
uniform vec3 referencePosition;
uniform float nearDistance;
uniform float farDistance;
varying vec3 vWorldPosition;
#include <common>
#include <packing>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <clipping_planes_pars_fragment>
void main () {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( 1.0 );
	#include <map_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	float dist = length( vWorldPosition - referencePosition );
	dist = ( dist - nearDistance ) / ( farDistance - nearDistance );
	dist = saturate( dist );
	gl_FragColor = packDepthToRGBA( dist );
}`,dN=`varying vec3 vWorldDirection;
#include <common>
void main() {
	vWorldDirection = transformDirection( position, modelMatrix );
	#include <begin_vertex>
	#include <project_vertex>
}`,hN=`uniform sampler2D tEquirect;
varying vec3 vWorldDirection;
#include <common>
void main() {
	vec3 direction = normalize( vWorldDirection );
	vec2 sampleUV = equirectUv( direction );
	gl_FragColor = texture2D( tEquirect, sampleUV );
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
}`,pN=`uniform float scale;
attribute float lineDistance;
varying float vLineDistance;
#include <common>
#include <uv_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	vLineDistance = scale * lineDistance;
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphcolor_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <fog_vertex>
}`,mN=`uniform vec3 diffuse;
uniform float opacity;
uniform float dashSize;
uniform float totalSize;
varying float vLineDistance;
#include <common>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	if ( mod( vLineDistance, totalSize ) > dashSize ) {
		discard;
	}
	vec3 outgoingLight = vec3( 0.0 );
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	outgoingLight = diffuseColor.rgb;
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
}`,gN=`#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphcolor_vertex>
	#include <batching_vertex>
	#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )
		#include <beginnormal_vertex>
		#include <morphnormal_vertex>
		#include <skinbase_vertex>
		#include <skinnormal_vertex>
		#include <defaultnormal_vertex>
	#endif
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <worldpos_vertex>
	#include <envmap_vertex>
	#include <fog_vertex>
}`,_N=`uniform vec3 diffuse;
uniform float opacity;
#ifndef FLAT_SHADED
	varying vec3 vNormal;
#endif
#include <common>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <fog_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <specularmap_fragment>
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	#ifdef USE_LIGHTMAP
		vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
		reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;
	#else
		reflectedLight.indirectDiffuse += vec3( 1.0 );
	#endif
	#include <aomap_fragment>
	reflectedLight.indirectDiffuse *= diffuseColor.rgb;
	vec3 outgoingLight = reflectedLight.indirectDiffuse;
	#include <envmap_fragment>
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,vN=`#define LAMBERT
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphcolor_vertex>
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vViewPosition = - mvPosition.xyz;
	#include <worldpos_vertex>
	#include <envmap_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
}`,yN=`#define LAMBERT
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_lambert_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( diffuse, opacity );
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	vec3 totalEmissiveRadiance = emissive;
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <specularmap_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	#include <emissivemap_fragment>
	#include <lights_lambert_fragment>
	#include <lights_fragment_begin>
	#include <lights_fragment_maps>
	#include <lights_fragment_end>
	#include <aomap_fragment>
	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
	#include <envmap_fragment>
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,xN=`#define MATCAP
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <color_pars_vertex>
#include <displacementmap_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphcolor_vertex>
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <fog_vertex>
	vViewPosition = - mvPosition.xyz;
}`,SN=`#define MATCAP
uniform vec3 diffuse;
uniform float opacity;
uniform sampler2D matcap;
varying vec3 vViewPosition;
#include <common>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <fog_pars_fragment>
#include <normal_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	vec3 viewDir = normalize( vViewPosition );
	vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );
	vec3 y = cross( viewDir, x );
	vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;
	#ifdef USE_MATCAP
		vec4 matcapColor = texture2D( matcap, uv );
	#else
		vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );
	#endif
	vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,EN=`#define NORMAL
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
	varying vec3 vViewPosition;
#endif
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
	vViewPosition = - mvPosition.xyz;
#endif
}`,bN=`#define NORMAL
uniform float opacity;
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
	varying vec3 vViewPosition;
#endif
#include <packing>
#include <uv_pars_fragment>
#include <normal_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	#include <logdepthbuf_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	gl_FragColor = vec4( packNormalToRGB( normal ), opacity );
	#ifdef OPAQUE
		gl_FragColor.a = 1.0;
	#endif
}`,MN=`#define PHONG
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphcolor_vertex>
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vViewPosition = - mvPosition.xyz;
	#include <worldpos_vertex>
	#include <envmap_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
}`,TN=`#define PHONG
uniform vec3 diffuse;
uniform vec3 emissive;
uniform vec3 specular;
uniform float shininess;
uniform float opacity;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_phong_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( diffuse, opacity );
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	vec3 totalEmissiveRadiance = emissive;
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <specularmap_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	#include <emissivemap_fragment>
	#include <lights_phong_fragment>
	#include <lights_fragment_begin>
	#include <lights_fragment_maps>
	#include <lights_fragment_end>
	#include <aomap_fragment>
	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;
	#include <envmap_fragment>
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,wN=`#define STANDARD
varying vec3 vViewPosition;
#ifdef USE_TRANSMISSION
	varying vec3 vWorldPosition;
#endif
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphcolor_vertex>
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vViewPosition = - mvPosition.xyz;
	#include <worldpos_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
#ifdef USE_TRANSMISSION
	vWorldPosition = worldPosition.xyz;
#endif
}`,AN=`#define STANDARD
#ifdef PHYSICAL
	#define IOR
	#define USE_SPECULAR
#endif
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float roughness;
uniform float metalness;
uniform float opacity;
#ifdef IOR
	uniform float ior;
#endif
#ifdef USE_SPECULAR
	uniform float specularIntensity;
	uniform vec3 specularColor;
	#ifdef USE_SPECULAR_COLORMAP
		uniform sampler2D specularColorMap;
	#endif
	#ifdef USE_SPECULAR_INTENSITYMAP
		uniform sampler2D specularIntensityMap;
	#endif
#endif
#ifdef USE_CLEARCOAT
	uniform float clearcoat;
	uniform float clearcoatRoughness;
#endif
#ifdef USE_IRIDESCENCE
	uniform float iridescence;
	uniform float iridescenceIOR;
	uniform float iridescenceThicknessMinimum;
	uniform float iridescenceThicknessMaximum;
#endif
#ifdef USE_SHEEN
	uniform vec3 sheenColor;
	uniform float sheenRoughness;
	#ifdef USE_SHEEN_COLORMAP
		uniform sampler2D sheenColorMap;
	#endif
	#ifdef USE_SHEEN_ROUGHNESSMAP
		uniform sampler2D sheenRoughnessMap;
	#endif
#endif
#ifdef USE_ANISOTROPY
	uniform vec2 anisotropyVector;
	#ifdef USE_ANISOTROPYMAP
		uniform sampler2D anisotropyMap;
	#endif
#endif
varying vec3 vViewPosition;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <iridescence_fragment>
#include <cube_uv_reflection_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_physical_pars_fragment>
#include <fog_pars_fragment>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_physical_pars_fragment>
#include <transmission_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <clearcoat_pars_fragment>
#include <iridescence_pars_fragment>
#include <roughnessmap_pars_fragment>
#include <metalnessmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( diffuse, opacity );
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	vec3 totalEmissiveRadiance = emissive;
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <roughnessmap_fragment>
	#include <metalnessmap_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	#include <clearcoat_normal_fragment_begin>
	#include <clearcoat_normal_fragment_maps>
	#include <emissivemap_fragment>
	#include <lights_physical_fragment>
	#include <lights_fragment_begin>
	#include <lights_fragment_maps>
	#include <lights_fragment_end>
	#include <aomap_fragment>
	vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;
	vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;
	#include <transmission_fragment>
	vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;
	#ifdef USE_SHEEN
		float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );
		outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;
	#endif
	#ifdef USE_CLEARCOAT
		float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );
		vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );
		outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;
	#endif
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,RN=`#define TOON
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphcolor_vertex>
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vViewPosition = - mvPosition.xyz;
	#include <worldpos_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
}`,CN=`#define TOON
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <gradientmap_pars_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_toon_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( diffuse, opacity );
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	vec3 totalEmissiveRadiance = emissive;
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	#include <emissivemap_fragment>
	#include <lights_toon_fragment>
	#include <lights_fragment_begin>
	#include <lights_fragment_maps>
	#include <lights_fragment_end>
	#include <aomap_fragment>
	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,LN=`uniform float size;
uniform float scale;
#include <common>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
#ifdef USE_POINTS_UV
	varying vec2 vUv;
	uniform mat3 uvTransform;
#endif
void main() {
	#ifdef USE_POINTS_UV
		vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
	#endif
	#include <color_vertex>
	#include <morphcolor_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <project_vertex>
	gl_PointSize = size;
	#ifdef USE_SIZEATTENUATION
		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
		if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );
	#endif
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <worldpos_vertex>
	#include <fog_vertex>
}`,PN=`uniform vec3 diffuse;
uniform float opacity;
#include <common>
#include <color_pars_fragment>
#include <map_particle_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec3 outgoingLight = vec3( 0.0 );
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <logdepthbuf_fragment>
	#include <map_particle_fragment>
	#include <color_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	outgoingLight = diffuseColor.rgb;
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
}`,IN=`#include <common>
#include <batching_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <shadowmap_pars_vertex>
void main() {
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <worldpos_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
}`,DN=`uniform vec3 color;
uniform float opacity;
#include <common>
#include <packing>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <logdepthbuf_pars_fragment>
#include <shadowmap_pars_fragment>
#include <shadowmask_pars_fragment>
void main() {
	#include <logdepthbuf_fragment>
	gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
}`,NN=`uniform float rotation;
uniform vec2 center;
#include <common>
#include <uv_pars_vertex>
#include <fog_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );
	vec2 scale;
	scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );
	scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );
	#ifndef USE_SIZEATTENUATION
		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
		if ( isPerspective ) scale *= - mvPosition.z;
	#endif
	vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;
	vec2 rotatedPosition;
	rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
	rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
	mvPosition.xy += rotatedPosition;
	gl_Position = projectionMatrix * mvPosition;
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <fog_vertex>
}`,UN=`uniform vec3 diffuse;
uniform float opacity;
#include <common>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec3 outgoingLight = vec3( 0.0 );
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	outgoingLight = diffuseColor.rgb;
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
}`,qe={alphahash_fragment:iI,alphahash_pars_fragment:rI,alphamap_fragment:sI,alphamap_pars_fragment:oI,alphatest_fragment:aI,alphatest_pars_fragment:lI,aomap_fragment:cI,aomap_pars_fragment:uI,batching_pars_vertex:fI,batching_vertex:dI,begin_vertex:hI,beginnormal_vertex:pI,bsdfs:mI,iridescence_fragment:gI,bumpmap_pars_fragment:_I,clipping_planes_fragment:vI,clipping_planes_pars_fragment:yI,clipping_planes_pars_vertex:xI,clipping_planes_vertex:SI,color_fragment:EI,color_pars_fragment:bI,color_pars_vertex:MI,color_vertex:TI,common:wI,cube_uv_reflection_fragment:AI,defaultnormal_vertex:RI,displacementmap_pars_vertex:CI,displacementmap_vertex:LI,emissivemap_fragment:PI,emissivemap_pars_fragment:II,colorspace_fragment:DI,colorspace_pars_fragment:NI,envmap_fragment:UI,envmap_common_pars_fragment:OI,envmap_pars_fragment:FI,envmap_pars_vertex:kI,envmap_physical_pars_fragment:KI,envmap_vertex:BI,fog_vertex:HI,fog_pars_vertex:zI,fog_fragment:VI,fog_pars_fragment:GI,gradientmap_pars_fragment:WI,lightmap_fragment:$I,lightmap_pars_fragment:XI,lights_lambert_fragment:jI,lights_lambert_pars_fragment:qI,lights_pars_begin:YI,lights_toon_fragment:ZI,lights_toon_pars_fragment:JI,lights_phong_fragment:QI,lights_phong_pars_fragment:eD,lights_physical_fragment:tD,lights_physical_pars_fragment:nD,lights_fragment_begin:iD,lights_fragment_maps:rD,lights_fragment_end:sD,logdepthbuf_fragment:oD,logdepthbuf_pars_fragment:aD,logdepthbuf_pars_vertex:lD,logdepthbuf_vertex:cD,map_fragment:uD,map_pars_fragment:fD,map_particle_fragment:dD,map_particle_pars_fragment:hD,metalnessmap_fragment:pD,metalnessmap_pars_fragment:mD,morphcolor_vertex:gD,morphnormal_vertex:_D,morphtarget_pars_vertex:vD,morphtarget_vertex:yD,normal_fragment_begin:xD,normal_fragment_maps:SD,normal_pars_fragment:ED,normal_pars_vertex:bD,normal_vertex:MD,normalmap_pars_fragment:TD,clearcoat_normal_fragment_begin:wD,clearcoat_normal_fragment_maps:AD,clearcoat_pars_fragment:RD,iridescence_pars_fragment:CD,opaque_fragment:LD,packing:PD,premultiplied_alpha_fragment:ID,project_vertex:DD,dithering_fragment:ND,dithering_pars_fragment:UD,roughnessmap_fragment:OD,roughnessmap_pars_fragment:FD,shadowmap_pars_fragment:kD,shadowmap_pars_vertex:BD,shadowmap_vertex:HD,shadowmask_pars_fragment:zD,skinbase_vertex:VD,skinning_pars_vertex:GD,skinning_vertex:WD,skinnormal_vertex:$D,specularmap_fragment:XD,specularmap_pars_fragment:jD,tonemapping_fragment:qD,tonemapping_pars_fragment:YD,transmission_fragment:KD,transmission_pars_fragment:ZD,uv_pars_fragment:JD,uv_pars_vertex:QD,uv_vertex:eN,worldpos_vertex:tN,background_vert:nN,background_frag:iN,backgroundCube_vert:rN,backgroundCube_frag:sN,cube_vert:oN,cube_frag:aN,depth_vert:lN,depth_frag:cN,distanceRGBA_vert:uN,distanceRGBA_frag:fN,equirect_vert:dN,equirect_frag:hN,linedashed_vert:pN,linedashed_frag:mN,meshbasic_vert:gN,meshbasic_frag:_N,meshlambert_vert:vN,meshlambert_frag:yN,meshmatcap_vert:xN,meshmatcap_frag:SN,meshnormal_vert:EN,meshnormal_frag:bN,meshphong_vert:MN,meshphong_frag:TN,meshphysical_vert:wN,meshphysical_frag:AN,meshtoon_vert:RN,meshtoon_frag:CN,points_vert:LN,points_frag:PN,shadow_vert:IN,shadow_frag:DN,sprite_vert:NN,sprite_frag:UN},Ee={common:{diffuse:{value:new ct(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ze},alphaMap:{value:null},alphaMapTransform:{value:new Ze},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ze}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ze}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ze}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ze},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ze},normalScale:{value:new ot(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ze},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ze}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ze}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ze}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new ct(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 ct(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Ze},alphaTest:{value:0},uvTransform:{value:new Ze}},sprite:{diffuse:{value:new ct(16777215)},opacity:{value:1},center:{value:new ot(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ze},alphaMap:{value:null},alphaMapTransform:{value:new Ze},alphaTest:{value:0}}},li={basic:{uniforms:ln([Ee.common,Ee.specularmap,Ee.envmap,Ee.aomap,Ee.lightmap,Ee.fog]),vertexShader:qe.meshbasic_vert,fragmentShader:qe.meshbasic_frag},lambert:{uniforms:ln([Ee.common,Ee.specularmap,Ee.envmap,Ee.aomap,Ee.lightmap,Ee.emissivemap,Ee.bumpmap,Ee.normalmap,Ee.displacementmap,Ee.fog,Ee.lights,{emissive:{value:new ct(0)}}]),vertexShader:qe.meshlambert_vert,fragmentShader:qe.meshlambert_frag},phong:{uniforms:ln([Ee.common,Ee.specularmap,Ee.envmap,Ee.aomap,Ee.lightmap,Ee.emissivemap,Ee.bumpmap,Ee.normalmap,Ee.displacementmap,Ee.fog,Ee.lights,{emissive:{value:new ct(0)},specular:{value:new ct(1118481)},shininess:{value:30}}]),vertexShader:qe.meshphong_vert,fragmentShader:qe.meshphong_frag},standard:{uniforms:ln([Ee.common,Ee.envmap,Ee.aomap,Ee.lightmap,Ee.emissivemap,Ee.bumpmap,Ee.normalmap,Ee.displacementmap,Ee.roughnessmap,Ee.metalnessmap,Ee.fog,Ee.lights,{emissive:{value:new ct(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:qe.meshphysical_vert,fragmentShader:qe.meshphysical_frag},toon:{uniforms:ln([Ee.common,Ee.aomap,Ee.lightmap,Ee.emissivemap,Ee.bumpmap,Ee.normalmap,Ee.displacementmap,Ee.gradientmap,Ee.fog,Ee.lights,{emissive:{value:new ct(0)}}]),vertexShader:qe.meshtoon_vert,fragmentShader:qe.meshtoon_frag},matcap:{uniforms:ln([Ee.common,Ee.bumpmap,Ee.normalmap,Ee.displacementmap,Ee.fog,{matcap:{value:null}}]),vertexShader:qe.meshmatcap_vert,fragmentShader:qe.meshmatcap_frag},points:{uniforms:ln([Ee.points,Ee.fog]),vertexShader:qe.points_vert,fragmentShader:qe.points_frag},dashed:{uniforms:ln([Ee.common,Ee.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:qe.linedashed_vert,fragmentShader:qe.linedashed_frag},depth:{uniforms:ln([Ee.common,Ee.displacementmap]),vertexShader:qe.depth_vert,fragmentShader:qe.depth_frag},normal:{uniforms:ln([Ee.common,Ee.bumpmap,Ee.normalmap,Ee.displacementmap,{opacity:{value:1}}]),vertexShader:qe.meshnormal_vert,fragmentShader:qe.meshnormal_frag},sprite:{uniforms:ln([Ee.sprite,Ee.fog]),vertexShader:qe.sprite_vert,fragmentShader:qe.sprite_frag},background:{uniforms:{uvTransform:{value:new Ze},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:qe.background_vert,fragmentShader:qe.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:qe.backgroundCube_vert,fragmentShader:qe.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:qe.cube_vert,fragmentShader:qe.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:qe.equirect_vert,fragmentShader:qe.equirect_frag},distanceRGBA:{uniforms:ln([Ee.common,Ee.displacementmap,{referencePosition:{value:new J},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:qe.distanceRGBA_vert,fragmentShader:qe.distanceRGBA_frag},shadow:{uniforms:ln([Ee.lights,Ee.fog,{color:{value:new ct(0)},opacity:{value:1}}]),vertexShader:qe.shadow_vert,fragmentShader:qe.shadow_frag}};li.physical={uniforms:ln([li.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ze},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ze},clearcoatNormalScale:{value:new ot(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ze},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ze},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ze},sheen:{value:0},sheenColor:{value:new ct(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ze},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ze},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ze},transmissionSamplerSize:{value:new ot},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ze},attenuationDistance:{value:0},attenuationColor:{value:new ct(0)},specularColor:{value:new ct(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ze},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ze},anisotropyVector:{value:new ot},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ze}}]),vertexShader:qe.meshphysical_vert,fragmentShader:qe.meshphysical_frag};const Za={r:0,b:0,g:0};function ON(t,e,n,i,r,s,o){const a=new ct(0);let l=s===!0?0:1,c,u,f=null,h=0,p=null;function g(m,d){let v=!1,y=d.isScene===!0?d.background:null;y&&y.isTexture&&(y=(d.backgroundBlurriness>0?n:e).get(y)),y===null?_(a,l):y&&y.isColor&&(_(y,1),v=!0);const x=t.xr.getEnvironmentBlendMode();x==="additive"?i.buffers.color.setClear(0,0,0,1,o):x==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(t.autoClear||v)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),y&&(y.isCubeTexture||y.mapping===rc)?(u===void 0&&(u=new ui(new la(1,1,1),new pi({name:"BackgroundCubeMaterial",uniforms:Vs(li.backgroundCube.uniforms),vertexShader:li.backgroundCube.vertexShader,fragmentShader:li.backgroundCube.fragmentShader,side:vn,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(S,C,R){this.matrixWorld.copyPosition(R.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(u)),u.material.uniforms.envMap.value=y,u.material.uniforms.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=d.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=d.backgroundIntensity,u.material.toneMapped=dt.getTransfer(y.colorSpace)!==_t,(f!==y||h!==y.version||p!==t.toneMapping)&&(u.material.needsUpdate=!0,f=y,h=y.version,p=t.toneMapping),u.layers.enableAll(),m.unshift(u,u.geometry,u.material,0,0,null)):y&&y.isTexture&&(c===void 0&&(c=new ui(new lc(2,2),new pi({name:"BackgroundMaterial",uniforms:Vs(li.background.uniforms),vertexShader:li.background.vertexShader,fragmentShader:li.background.fragmentShader,side:cr,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=y,c.material.uniforms.backgroundIntensity.value=d.backgroundIntensity,c.material.toneMapped=dt.getTransfer(y.colorSpace)!==_t,y.matrixAutoUpdate===!0&&y.updateMatrix(),c.material.uniforms.uvTransform.value.copy(y.matrix),(f!==y||h!==y.version||p!==t.toneMapping)&&(c.material.needsUpdate=!0,f=y,h=y.version,p=t.toneMapping),c.layers.enableAll(),m.unshift(c,c.geometry,c.material,0,0,null))}function _(m,d){m.getRGB(Za,ty(t)),i.buffers.color.setClear(Za.r,Za.g,Za.b,d,o)}return{getClearColor:function(){return a},setClearColor:function(m,d=1){a.set(m),l=d,_(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(m){l=m,_(a,l)},render:g}}function FN(t,e,n,i){const r=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||s!==null,a={},l=m(null);let c=l,u=!1;function f(D,G,$,j,oe){let se=!1;if(o){const he=_(j,$,G);c!==he&&(c=he,p(c.object)),se=d(D,j,$,oe),se&&v(D,j,$,oe)}else{const he=G.wireframe===!0;(c.geometry!==j.id||c.program!==$.id||c.wireframe!==he)&&(c.geometry=j.id,c.program=$.id,c.wireframe=he,se=!0)}oe!==null&&n.update(oe,t.ELEMENT_ARRAY_BUFFER),(se||u)&&(u=!1,I(D,G,$,j),oe!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,n.get(oe).buffer))}function h(){return i.isWebGL2?t.createVertexArray():s.createVertexArrayOES()}function p(D){return i.isWebGL2?t.bindVertexArray(D):s.bindVertexArrayOES(D)}function g(D){return i.isWebGL2?t.deleteVertexArray(D):s.deleteVertexArrayOES(D)}function _(D,G,$){const j=$.wireframe===!0;let oe=a[D.id];oe===void 0&&(oe={},a[D.id]=oe);let se=oe[G.id];se===void 0&&(se={},oe[G.id]=se);let he=se[j];return he===void 0&&(he=m(h()),se[j]=he),he}function m(D){const G=[],$=[],j=[];for(let oe=0;oe<r;oe++)G[oe]=0,$[oe]=0,j[oe]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:G,enabledAttributes:$,attributeDivisors:j,object:D,attributes:{},index:null}}function d(D,G,$,j){const oe=c.attributes,se=G.attributes;let he=0;const me=$.getAttributes();for(const ye in me)if(me[ye].location>=0){const fe=oe[ye];let be=se[ye];if(be===void 0&&(ye==="instanceMatrix"&&D.instanceMatrix&&(be=D.instanceMatrix),ye==="instanceColor"&&D.instanceColor&&(be=D.instanceColor)),fe===void 0||fe.attribute!==be||be&&fe.data!==be.data)return!0;he++}return c.attributesNum!==he||c.index!==j}function v(D,G,$,j){const oe={},se=G.attributes;let he=0;const me=$.getAttributes();for(const ye in me)if(me[ye].location>=0){let fe=se[ye];fe===void 0&&(ye==="instanceMatrix"&&D.instanceMatrix&&(fe=D.instanceMatrix),ye==="instanceColor"&&D.instanceColor&&(fe=D.instanceColor));const be={};be.attribute=fe,fe&&fe.data&&(be.data=fe.data),oe[ye]=be,he++}c.attributes=oe,c.attributesNum=he,c.index=j}function y(){const D=c.newAttributes;for(let G=0,$=D.length;G<$;G++)D[G]=0}function x(D){S(D,0)}function S(D,G){const $=c.newAttributes,j=c.enabledAttributes,oe=c.attributeDivisors;$[D]=1,j[D]===0&&(t.enableVertexAttribArray(D),j[D]=1),oe[D]!==G&&((i.isWebGL2?t:e.get("ANGLE_instanced_arrays"))[i.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](D,G),oe[D]=G)}function C(){const D=c.newAttributes,G=c.enabledAttributes;for(let $=0,j=G.length;$<j;$++)G[$]!==D[$]&&(t.disableVertexAttribArray($),G[$]=0)}function R(D,G,$,j,oe,se,he){he===!0?t.vertexAttribIPointer(D,G,$,oe,se):t.vertexAttribPointer(D,G,$,j,oe,se)}function I(D,G,$,j){if(i.isWebGL2===!1&&(D.isInstancedMesh||j.isInstancedBufferGeometry)&&e.get("ANGLE_instanced_arrays")===null)return;y();const oe=j.attributes,se=$.getAttributes(),he=G.defaultAttributeValues;for(const me in se){const ye=se[me];if(ye.location>=0){let te=oe[me];if(te===void 0&&(me==="instanceMatrix"&&D.instanceMatrix&&(te=D.instanceMatrix),me==="instanceColor"&&D.instanceColor&&(te=D.instanceColor)),te!==void 0){const fe=te.normalized,be=te.itemSize,Te=n.get(te);if(Te===void 0)continue;const V=Te.buffer,ue=Te.type,ne=Te.bytesPerElement,de=i.isWebGL2===!0&&(ue===t.INT||ue===t.UNSIGNED_INT||te.gpuType===F0);if(te.isInterleavedBufferAttribute){const Me=te.data,T=Me.stride,E=te.offset;if(Me.isInstancedInterleavedBuffer){for(let w=0;w<ye.locationSize;w++)S(ye.location+w,Me.meshPerAttribute);D.isInstancedMesh!==!0&&j._maxInstanceCount===void 0&&(j._maxInstanceCount=Me.meshPerAttribute*Me.count)}else for(let w=0;w<ye.locationSize;w++)x(ye.location+w);t.bindBuffer(t.ARRAY_BUFFER,V);for(let w=0;w<ye.locationSize;w++)R(ye.location+w,be/ye.locationSize,ue,fe,T*ne,(E+be/ye.locationSize*w)*ne,de)}else{if(te.isInstancedBufferAttribute){for(let Me=0;Me<ye.locationSize;Me++)S(ye.location+Me,te.meshPerAttribute);D.isInstancedMesh!==!0&&j._maxInstanceCount===void 0&&(j._maxInstanceCount=te.meshPerAttribute*te.count)}else for(let Me=0;Me<ye.locationSize;Me++)x(ye.location+Me);t.bindBuffer(t.ARRAY_BUFFER,V);for(let Me=0;Me<ye.locationSize;Me++)R(ye.location+Me,be/ye.locationSize,ue,fe,be*ne,be/ye.locationSize*Me*ne,de)}}else if(he!==void 0){const fe=he[me];if(fe!==void 0)switch(fe.length){case 2:t.vertexAttrib2fv(ye.location,fe);break;case 3:t.vertexAttrib3fv(ye.location,fe);break;case 4:t.vertexAttrib4fv(ye.location,fe);break;default:t.vertexAttrib1fv(ye.location,fe)}}}}C()}function b(){U();for(const D in a){const G=a[D];for(const $ in G){const j=G[$];for(const oe in j)g(j[oe].object),delete j[oe];delete G[$]}delete a[D]}}function L(D){if(a[D.id]===void 0)return;const G=a[D.id];for(const $ in G){const j=G[$];for(const oe in j)g(j[oe].object),delete j[oe];delete G[$]}delete a[D.id]}function B(D){for(const G in a){const $=a[G];if($[D.id]===void 0)continue;const j=$[D.id];for(const oe in j)g(j[oe].object),delete j[oe];delete $[D.id]}}function U(){k(),u=!0,c!==l&&(c=l,p(c.object))}function k(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:f,reset:U,resetDefaultState:k,dispose:b,releaseStatesOfGeometry:L,releaseStatesOfProgram:B,initAttributes:y,enableAttribute:x,disableUnusedAttributes:C}}function kN(t,e,n,i){const r=i.isWebGL2;let s;function o(u){s=u}function a(u,f){t.drawArrays(s,u,f),n.update(f,s,1)}function l(u,f,h){if(h===0)return;let p,g;if(r)p=t,g="drawArraysInstanced";else if(p=e.get("ANGLE_instanced_arrays"),g="drawArraysInstancedANGLE",p===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}p[g](s,u,f,h),n.update(f,s,h)}function c(u,f,h){if(h===0)return;const p=e.get("WEBGL_multi_draw");if(p===null)for(let g=0;g<h;g++)this.render(u[g],f[g]);else{p.multiDrawArraysWEBGL(s,u,0,f,0,h);let g=0;for(let _=0;_<h;_++)g+=f[_];n.update(g,s,1)}}this.setMode=o,this.render=a,this.renderInstances=l,this.renderMultiDraw=c}function BN(t,e,n){let i;function r(){if(i!==void 0)return i;if(e.has("EXT_texture_filter_anisotropic")===!0){const R=e.get("EXT_texture_filter_anisotropic");i=t.getParameter(R.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function s(R){if(R==="highp"){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";R="mediump"}return R==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&t.constructor.name==="WebGL2RenderingContext";let a=n.precision!==void 0?n.precision:"highp";const l=s(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const c=o||e.has("WEBGL_draw_buffers"),u=n.logarithmicDepthBuffer===!0,f=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),p=t.getParameter(t.MAX_TEXTURE_SIZE),g=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),_=t.getParameter(t.MAX_VERTEX_ATTRIBS),m=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),d=t.getParameter(t.MAX_VARYING_VECTORS),v=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),y=h>0,x=o||e.has("OES_texture_float"),S=y&&x,C=o?t.getParameter(t.MAX_SAMPLES):0;return{isWebGL2:o,drawBuffers:c,getMaxAnisotropy:r,getMaxPrecision:s,precision:a,logarithmicDepthBuffer:u,maxTextures:f,maxVertexTextures:h,maxTextureSize:p,maxCubemapSize:g,maxAttributes:_,maxVertexUniforms:m,maxVaryings:d,maxFragmentUniforms:v,vertexTextures:y,floatFragmentTextures:x,floatVertexTextures:S,maxSamples:C}}function HN(t){const e=this;let n=null,i=0,r=!1,s=!1;const o=new Tr,a=new Ze,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(f,h){const p=f.length!==0||h||i!==0||r;return r=h,i=f.length,p},this.beginShadows=function(){s=!0,u(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(f,h){n=u(f,h,0)},this.setState=function(f,h,p){const g=f.clippingPlanes,_=f.clipIntersection,m=f.clipShadows,d=t.get(f);if(!r||g===null||g.length===0||s&&!m)s?u(null):c();else{const v=s?0:i,y=v*4;let x=d.clippingState||null;l.value=x,x=u(g,h,y,p);for(let S=0;S!==y;++S)x[S]=n[S];d.clippingState=x,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=v}};function c(){l.value!==n&&(l.value=n,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function u(f,h,p,g){const _=f!==null?f.length:0;let m=null;if(_!==0){if(m=l.value,g!==!0||m===null){const d=p+_*4,v=h.matrixWorldInverse;a.getNormalMatrix(v),(m===null||m.length<d)&&(m=new Float32Array(d));for(let y=0,x=p;y!==_;++y,x+=4)o.copy(f[y]).applyMatrix4(v,a),o.normal.toArray(m,x),m[x+3]=o.constant}l.value=m,l.needsUpdate=!0}return e.numPlanes=_,e.numIntersection=0,m}}function zN(t){let e=new WeakMap;function n(o,a){return a===hf?o.mapping=ks:a===pf&&(o.mapping=Bs),o}function i(o){if(o&&o.isTexture){const a=o.mapping;if(a===hf||a===pf)if(e.has(o)){const l=e.get(o).texture;return n(l,o.mapping)}else{const l=o.image;if(l&&l.height>0){const c=new QP(l.height/2);return c.fromEquirectangularTexture(t,o),e.set(o,c),o.addEventListener("dispose",r),n(c.texture,o.mapping)}else return null}}return o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:i,dispose:s}}class oy extends md{constructor(e=-1,n=1,i=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=i,this.bottom=r,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,n,i,r,s,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=i-e,o=i+e,a=r+n,l=r-n;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const vs=4,Hm=[.125,.215,.35,.446,.526,.582],Lr=20,lu=new oy,zm=new ct;let cu=null,uu=0,fu=0;const wr=(1+Math.sqrt(5))/2,ds=1/wr,Vm=[new J(1,1,1),new J(-1,1,1),new J(1,1,-1),new J(-1,1,-1),new J(0,wr,ds),new J(0,wr,-ds),new J(ds,0,wr),new J(-ds,0,wr),new J(wr,ds,0),new J(-wr,ds,0)];class Gm{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,i=.1,r=100){cu=this._renderer.getRenderTarget(),uu=this._renderer.getActiveCubeFace(),fu=this._renderer.getActiveMipmapLevel(),this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,i,r,s),n>0&&this._blur(s,0,0,n),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=Xm(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=$m(),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(cu,uu,fu),e.scissorTest=!1,Ja(e,0,0,e.width,e.height)}_fromTexture(e,n){e.mapping===ks||e.mapping===Bs?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),cu=this._renderer.getRenderTarget(),uu=this._renderer.getActiveCubeFace(),fu=this._renderer.getActiveMipmapLevel();const i=n||this._allocateTargets();return this._textureToCubeUV(e,i),this._applyPMREM(i),this._cleanup(i),i}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),n=4*this._cubeSize,i={magFilter:In,minFilter:In,generateMipmaps:!1,type:Hs,format:Zn,colorSpace:Ni,depthBuffer:!1},r=Wm(e,n,i);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==n){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=Wm(e,n,i);const{_lodMax:s}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=VN(s)),this._blurMaterial=GN(s,e,n)}return r}_compileMaterial(e){const n=new ui(this._lodPlanes[0],e);this._renderer.compile(n,lu)}_sceneToCubeUV(e,n,i,r){const a=new Xn(90,1,n,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(zm),u.toneMapping=ir,u.autoClear=!1;const p=new J0({name:"PMREM.Background",side:vn,depthWrite:!1,depthTest:!1}),g=new ui(new la,p);let _=!1;const m=e.background;m?m.isColor&&(p.color.copy(m),e.background=null,_=!0):(p.color.copy(zm),_=!0);for(let d=0;d<6;d++){const v=d%3;v===0?(a.up.set(0,l[d],0),a.lookAt(c[d],0,0)):v===1?(a.up.set(0,0,l[d]),a.lookAt(0,c[d],0)):(a.up.set(0,l[d],0),a.lookAt(0,0,c[d]));const y=this._cubeSize;Ja(r,v*y,d>2?y:0,y,y),u.setRenderTarget(r),_&&u.render(g,a),u.render(e,a)}g.geometry.dispose(),g.material.dispose(),u.toneMapping=h,u.autoClear=f,e.background=m}_textureToCubeUV(e,n){const i=this._renderer,r=e.mapping===ks||e.mapping===Bs;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=Xm()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=$m());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new ui(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;Ja(n,0,0,3*l,2*l),i.setRenderTarget(n),i.render(o,lu)}_applyPMREM(e){const n=this._renderer,i=n.autoClear;n.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=Vm[(r-1)%Vm.length];this._blur(e,r-1,r,s,o)}n.autoClear=i}_blur(e,n,i,r,s){const o=this._pingPongRenderTarget;this._halfBlur(e,o,n,i,r,"latitudinal",s),this._halfBlur(o,e,i,i,r,"longitudinal",s)}_halfBlur(e,n,i,r,s,o,a){const l=this._renderer,c=this._blurMaterial;o!=="latitudinal"&&o!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const u=3,f=new ui(this._lodPlanes[r],c),h=c.uniforms,p=this._sizeLods[i]-1,g=isFinite(s)?Math.PI/(2*p):2*Math.PI/(2*Lr-1),_=s/g,m=isFinite(s)?1+Math.floor(u*_):Lr;m>Lr&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${Lr}`);const d=[];let v=0;for(let R=0;R<Lr;++R){const I=R/_,b=Math.exp(-I*I/2);d.push(b),R===0?v+=b:R<m&&(v+=2*b)}for(let R=0;R<d.length;R++)d[R]=d[R]/v;h.envMap.value=e.texture,h.samples.value=m,h.weights.value=d,h.latitudinal.value=o==="latitudinal",a&&(h.poleAxis.value=a);const{_lodMax:y}=this;h.dTheta.value=g,h.mipInt.value=y-i;const x=this._sizeLods[r],S=3*x*(r>y-vs?r-y+vs:0),C=4*(this._cubeSize-x);Ja(n,S,C,3*x,2*x),l.setRenderTarget(n),l.render(f,lu)}}function VN(t){const e=[],n=[],i=[];let r=t;const s=t-vs+1+Hm.length;for(let o=0;o<s;o++){const a=Math.pow(2,r);n.push(a);let l=1/a;o>t-vs?l=Hm[o-t+vs-1]:o===0&&(l=0),i.push(l);const c=1/(a-2),u=-c,f=1+c,h=[u,u,f,u,f,f,u,u,f,f,u,f],p=6,g=6,_=3,m=2,d=1,v=new Float32Array(_*g*p),y=new Float32Array(m*g*p),x=new Float32Array(d*g*p);for(let C=0;C<p;C++){const R=C%3*2/3-1,I=C>2?0:-1,b=[R,I,0,R+2/3,I,0,R+2/3,I+1,0,R,I,0,R+2/3,I+1,0,R,I+1,0];v.set(b,_*g*C),y.set(h,m*g*C);const L=[C,C,C,C,C,C];x.set(L,d*g*C)}const S=new hr;S.setAttribute("position",new fi(v,_)),S.setAttribute("uv",new fi(y,m)),S.setAttribute("faceIndex",new fi(x,d)),e.push(S),r>vs&&r--}return{lodPlanes:e,sizeLods:n,sigmas:i}}function Wm(t,e,n){const i=new ur(t,e,n);return i.texture.mapping=rc,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function Ja(t,e,n,i,r){t.viewport.set(e,n,i,r),t.scissor.set(e,n,i,r)}function GN(t,e,n){const i=new Float32Array(Lr),r=new J(0,1,0);return new pi({name:"SphericalGaussianBlur",defines:{n:Lr,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:gd(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			varying vec3 vOutputDirection;

			uniform sampler2D envMap;
			uniform int samples;
			uniform float weights[ n ];
			uniform bool latitudinal;
			uniform float dTheta;
			uniform float mipInt;
			uniform vec3 poleAxis;

			#define ENVMAP_TYPE_CUBE_UV
			#include <cube_uv_reflection_fragment>

			vec3 getSample( float theta, vec3 axis ) {

				float cosTheta = cos( theta );
				// Rodrigues' axis-angle rotation
				vec3 sampleDirection = vOutputDirection * cosTheta
					+ cross( axis, vOutputDirection ) * sin( theta )
					+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );

				return bilinearCubeUV( envMap, sampleDirection, mipInt );

			}

			void main() {

				vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );

				if ( all( equal( axis, vec3( 0.0 ) ) ) ) {

					axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );

				}

				axis = normalize( axis );

				gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
				gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );

				for ( int i = 1; i < n; i++ ) {

					if ( i >= samples ) {

						break;

					}

					float theta = dTheta * float( i );
					gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
					gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );

				}

			}
		`,blending:Ci,depthTest:!1,depthWrite:!1})}function $m(){return new pi({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:gd(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			varying vec3 vOutputDirection;

			uniform sampler2D envMap;

			#include <common>

			void main() {

				vec3 outputDirection = normalize( vOutputDirection );
				vec2 uv = equirectUv( outputDirection );

				gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );

			}
		`,blending:Ci,depthTest:!1,depthWrite:!1})}function Xm(){return new pi({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:gd(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			uniform float flipEnvMap;

			varying vec3 vOutputDirection;

			uniform samplerCube envMap;

			void main() {

				gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );

			}
		`,blending:Ci,depthTest:!1,depthWrite:!1})}function gd(){return`

		precision mediump float;
		precision mediump int;

		attribute float faceIndex;

		varying vec3 vOutputDirection;

		// RH coordinate system; PMREM face-indexing convention
		vec3 getDirection( vec2 uv, float face ) {

			uv = 2.0 * uv - 1.0;

			vec3 direction = vec3( uv, 1.0 );

			if ( face == 0.0 ) {

				direction = direction.zyx; // ( 1, v, u ) pos x

			} else if ( face == 1.0 ) {

				direction = direction.xzy;
				direction.xz *= -1.0; // ( -u, 1, -v ) pos y

			} else if ( face == 2.0 ) {

				direction.x *= -1.0; // ( -u, v, 1 ) pos z

			} else if ( face == 3.0 ) {

				direction = direction.zyx;
				direction.xz *= -1.0; // ( -1, v, -u ) neg x

			} else if ( face == 4.0 ) {

				direction = direction.xzy;
				direction.xy *= -1.0; // ( -u, -1, v ) neg y

			} else if ( face == 5.0 ) {

				direction.z *= -1.0; // ( u, v, -1 ) neg z

			}

			return direction;

		}

		void main() {

			vOutputDirection = getDirection( uv, faceIndex );
			gl_Position = vec4( position, 1.0 );

		}
	`}function WN(t){let e=new WeakMap,n=null;function i(a){if(a&&a.isTexture){const l=a.mapping,c=l===hf||l===pf,u=l===ks||l===Bs;if(c||u)if(a.isRenderTargetTexture&&a.needsPMREMUpdate===!0){a.needsPMREMUpdate=!1;let f=e.get(a);return n===null&&(n=new Gm(t)),f=c?n.fromEquirectangular(a,f):n.fromCubemap(a,f),e.set(a,f),f.texture}else{if(e.has(a))return e.get(a).texture;{const f=a.image;if(c&&f&&f.height>0||u&&f&&r(f)){n===null&&(n=new Gm(t));const h=c?n.fromEquirectangular(a):n.fromCubemap(a);return e.set(a,h),a.addEventListener("dispose",s),h.texture}else return null}}}return a}function r(a){let l=0;const c=6;for(let u=0;u<c;u++)a[u]!==void 0&&l++;return l===c}function s(a){const l=a.target;l.removeEventListener("dispose",s);const c=e.get(l);c!==void 0&&(e.delete(l),c.dispose())}function o(){e=new WeakMap,n!==null&&(n.dispose(),n=null)}return{get:i,dispose:o}}function $N(t){const e={};function n(i){if(e[i]!==void 0)return e[i];let r;switch(i){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(i)}return e[i]=r,r}return{has:function(i){return n(i)!==null},init:function(i){i.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture")},get:function(i){const r=n(i);return r===null&&console.warn("THREE.WebGLRenderer: "+i+" extension not supported."),r}}}function XN(t,e,n,i){const r={},s=new WeakMap;function o(f){const h=f.target;h.index!==null&&e.remove(h.index);for(const g in h.attributes)e.remove(h.attributes[g]);for(const g in h.morphAttributes){const _=h.morphAttributes[g];for(let m=0,d=_.length;m<d;m++)e.remove(_[m])}h.removeEventListener("dispose",o),delete r[h.id];const p=s.get(h);p&&(e.remove(p),s.delete(h)),i.releaseStatesOfGeometry(h),h.isInstancedBufferGeometry===!0&&delete h._maxInstanceCount,n.memory.geometries--}function a(f,h){return r[h.id]===!0||(h.addEventListener("dispose",o),r[h.id]=!0,n.memory.geometries++),h}function l(f){const h=f.attributes;for(const g in h)e.update(h[g],t.ARRAY_BUFFER);const p=f.morphAttributes;for(const g in p){const _=p[g];for(let m=0,d=_.length;m<d;m++)e.update(_[m],t.ARRAY_BUFFER)}}function c(f){const h=[],p=f.index,g=f.attributes.position;let _=0;if(p!==null){const v=p.array;_=p.version;for(let y=0,x=v.length;y<x;y+=3){const S=v[y+0],C=v[y+1],R=v[y+2];h.push(S,C,C,R,R,S)}}else if(g!==void 0){const v=g.array;_=g.version;for(let y=0,x=v.length/3-1;y<x;y+=3){const S=y+0,C=y+1,R=y+2;h.push(S,C,C,R,R,S)}}else return;const m=new(X0(h)?ey:Q0)(h,1);m.version=_;const d=s.get(f);d&&e.remove(d),s.set(f,m)}function u(f){const h=s.get(f);if(h){const p=f.index;p!==null&&h.version<p.version&&c(f)}else c(f);return s.get(f)}return{get:a,update:l,getWireframeAttribute:u}}function jN(t,e,n,i){const r=i.isWebGL2;let s;function o(p){s=p}let a,l;function c(p){a=p.type,l=p.bytesPerElement}function u(p,g){t.drawElements(s,g,a,p*l),n.update(g,s,1)}function f(p,g,_){if(_===0)return;let m,d;if(r)m=t,d="drawElementsInstanced";else if(m=e.get("ANGLE_instanced_arrays"),d="drawElementsInstancedANGLE",m===null){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}m[d](s,g,a,p*l,_),n.update(g,s,_)}function h(p,g,_){if(_===0)return;const m=e.get("WEBGL_multi_draw");if(m===null)for(let d=0;d<_;d++)this.render(p[d]/l,g[d]);else{m.multiDrawElementsWEBGL(s,g,0,a,p,0,_);let d=0;for(let v=0;v<_;v++)d+=g[v];n.update(d,s,1)}}this.setMode=o,this.setIndex=c,this.render=u,this.renderInstances=f,this.renderMultiDraw=h}function qN(t){const e={geometries:0,textures:0},n={frame:0,calls:0,triangles:0,points:0,lines:0};function i(s,o,a){switch(n.calls++,o){case t.TRIANGLES:n.triangles+=a*(s/3);break;case t.LINES:n.lines+=a*(s/2);break;case t.LINE_STRIP:n.lines+=a*(s-1);break;case t.LINE_LOOP:n.lines+=a*s;break;case t.POINTS:n.points+=a*s;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",o);break}}function r(){n.calls=0,n.triangles=0,n.points=0,n.lines=0}return{memory:e,render:n,programs:null,autoReset:!0,reset:r,update:i}}function YN(t,e){return t[0]-e[0]}function KN(t,e){return Math.abs(e[1])-Math.abs(t[1])}function ZN(t,e,n){const i={},r=new Float32Array(8),s=new WeakMap,o=new qt,a=[];for(let c=0;c<8;c++)a[c]=[c,0];function l(c,u,f){const h=c.morphTargetInfluences;if(e.isWebGL2===!0){const p=u.morphAttributes.position||u.morphAttributes.normal||u.morphAttributes.color,g=p!==void 0?p.length:0;let _=s.get(u);if(_===void 0||_.count!==g){let D=function(){U.dispose(),s.delete(u),u.removeEventListener("dispose",D)};_!==void 0&&_.texture.dispose();const v=u.morphAttributes.position!==void 0,y=u.morphAttributes.normal!==void 0,x=u.morphAttributes.color!==void 0,S=u.morphAttributes.position||[],C=u.morphAttributes.normal||[],R=u.morphAttributes.color||[];let I=0;v===!0&&(I=1),y===!0&&(I=2),x===!0&&(I=3);let b=u.attributes.position.count*I,L=1;b>e.maxTextureSize&&(L=Math.ceil(b/e.maxTextureSize),b=e.maxTextureSize);const B=new Float32Array(b*L*4*g),U=new Y0(B,b,L,g);U.type=Ji,U.needsUpdate=!0;const k=I*4;for(let G=0;G<g;G++){const $=S[G],j=C[G],oe=R[G],se=b*L*4*G;for(let he=0;he<$.count;he++){const me=he*k;v===!0&&(o.fromBufferAttribute($,he),B[se+me+0]=o.x,B[se+me+1]=o.y,B[se+me+2]=o.z,B[se+me+3]=0),y===!0&&(o.fromBufferAttribute(j,he),B[se+me+4]=o.x,B[se+me+5]=o.y,B[se+me+6]=o.z,B[se+me+7]=0),x===!0&&(o.fromBufferAttribute(oe,he),B[se+me+8]=o.x,B[se+me+9]=o.y,B[se+me+10]=o.z,B[se+me+11]=oe.itemSize===4?o.w:1)}}_={count:g,texture:U,size:new ot(b,L)},s.set(u,_),u.addEventListener("dispose",D)}let m=0;for(let v=0;v<h.length;v++)m+=h[v];const d=u.morphTargetsRelative?1:1-m;f.getUniforms().setValue(t,"morphTargetBaseInfluence",d),f.getUniforms().setValue(t,"morphTargetInfluences",h),f.getUniforms().setValue(t,"morphTargetsTexture",_.texture,n),f.getUniforms().setValue(t,"morphTargetsTextureSize",_.size)}else{const p=h===void 0?0:h.length;let g=i[u.id];if(g===void 0||g.length!==p){g=[];for(let y=0;y<p;y++)g[y]=[y,0];i[u.id]=g}for(let y=0;y<p;y++){const x=g[y];x[0]=y,x[1]=h[y]}g.sort(KN);for(let y=0;y<8;y++)y<p&&g[y][1]?(a[y][0]=g[y][0],a[y][1]=g[y][1]):(a[y][0]=Number.MAX_SAFE_INTEGER,a[y][1]=0);a.sort(YN);const _=u.morphAttributes.position,m=u.morphAttributes.normal;let d=0;for(let y=0;y<8;y++){const x=a[y],S=x[0],C=x[1];S!==Number.MAX_SAFE_INTEGER&&C?(_&&u.getAttribute("morphTarget"+y)!==_[S]&&u.setAttribute("morphTarget"+y,_[S]),m&&u.getAttribute("morphNormal"+y)!==m[S]&&u.setAttribute("morphNormal"+y,m[S]),r[y]=C,d+=C):(_&&u.hasAttribute("morphTarget"+y)===!0&&u.deleteAttribute("morphTarget"+y),m&&u.hasAttribute("morphNormal"+y)===!0&&u.deleteAttribute("morphNormal"+y),r[y]=0)}const v=u.morphTargetsRelative?1:1-d;f.getUniforms().setValue(t,"morphTargetBaseInfluence",v),f.getUniforms().setValue(t,"morphTargetInfluences",r)}}return{update:l}}function JN(t,e,n,i){let r=new WeakMap;function s(l){const c=i.render.frame,u=l.geometry,f=e.get(l,u);if(r.get(f)!==c&&(e.update(f),r.set(f,c)),l.isInstancedMesh&&(l.hasEventListener("dispose",a)===!1&&l.addEventListener("dispose",a),r.get(l)!==c&&(n.update(l.instanceMatrix,t.ARRAY_BUFFER),l.instanceColor!==null&&n.update(l.instanceColor,t.ARRAY_BUFFER),r.set(l,c))),l.isSkinnedMesh){const h=l.skeleton;r.get(h)!==c&&(h.update(),r.set(h,c))}return f}function o(){r=new WeakMap}function a(l){const c=l.target;c.removeEventListener("dispose",a),n.remove(c.instanceMatrix),c.instanceColor!==null&&n.remove(c.instanceColor)}return{update:s,dispose:o}}class ay extends yn{constructor(e,n,i,r,s,o,a,l,c,u){if(u=u!==void 0?u:Or,u!==Or&&u!==zs)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&u===Or&&(i=Zi),i===void 0&&u===zs&&(i=Ur),super(null,r,s,o,a,l,u,i,c),this.isDepthTexture=!0,this.image={width:e,height:n},this.magFilter=a!==void 0?a:un,this.minFilter=l!==void 0?l:un,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const n=super.toJSON(e);return this.compareFunction!==null&&(n.compareFunction=this.compareFunction),n}}const ly=new yn,cy=new ay(1,1);cy.compareFunction=$0;const uy=new Y0,fy=new OP,dy=new iy,jm=[],qm=[],Ym=new Float32Array(16),Km=new Float32Array(9),Zm=new Float32Array(4);function Js(t,e,n){const i=t[0];if(i<=0||i>0)return t;const r=e*n;let s=jm[r];if(s===void 0&&(s=new Float32Array(r),jm[r]=s),e!==0){i.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=n,t[o].toArray(s,a)}return s}function kt(t,e){if(t.length!==e.length)return!1;for(let n=0,i=t.length;n<i;n++)if(t[n]!==e[n])return!1;return!0}function Bt(t,e){for(let n=0,i=e.length;n<i;n++)t[n]=e[n]}function cc(t,e){let n=qm[e];n===void 0&&(n=new Int32Array(e),qm[e]=n);for(let i=0;i!==e;++i)n[i]=t.allocateTextureUnit();return n}function QN(t,e){const n=this.cache;n[0]!==e&&(t.uniform1f(this.addr,e),n[0]=e)}function eU(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2f(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(kt(n,e))return;t.uniform2fv(this.addr,e),Bt(n,e)}}function tU(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3f(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else if(e.r!==void 0)(n[0]!==e.r||n[1]!==e.g||n[2]!==e.b)&&(t.uniform3f(this.addr,e.r,e.g,e.b),n[0]=e.r,n[1]=e.g,n[2]=e.b);else{if(kt(n,e))return;t.uniform3fv(this.addr,e),Bt(n,e)}}function nU(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(kt(n,e))return;t.uniform4fv(this.addr,e),Bt(n,e)}}function iU(t,e){const n=this.cache,i=e.elements;if(i===void 0){if(kt(n,e))return;t.uniformMatrix2fv(this.addr,!1,e),Bt(n,e)}else{if(kt(n,i))return;Zm.set(i),t.uniformMatrix2fv(this.addr,!1,Zm),Bt(n,i)}}function rU(t,e){const n=this.cache,i=e.elements;if(i===void 0){if(kt(n,e))return;t.uniformMatrix3fv(this.addr,!1,e),Bt(n,e)}else{if(kt(n,i))return;Km.set(i),t.uniformMatrix3fv(this.addr,!1,Km),Bt(n,i)}}function sU(t,e){const n=this.cache,i=e.elements;if(i===void 0){if(kt(n,e))return;t.uniformMatrix4fv(this.addr,!1,e),Bt(n,e)}else{if(kt(n,i))return;Ym.set(i),t.uniformMatrix4fv(this.addr,!1,Ym),Bt(n,i)}}function oU(t,e){const n=this.cache;n[0]!==e&&(t.uniform1i(this.addr,e),n[0]=e)}function aU(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2i(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(kt(n,e))return;t.uniform2iv(this.addr,e),Bt(n,e)}}function lU(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3i(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(kt(n,e))return;t.uniform3iv(this.addr,e),Bt(n,e)}}function cU(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4i(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(kt(n,e))return;t.uniform4iv(this.addr,e),Bt(n,e)}}function uU(t,e){const n=this.cache;n[0]!==e&&(t.uniform1ui(this.addr,e),n[0]=e)}function fU(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2ui(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(kt(n,e))return;t.uniform2uiv(this.addr,e),Bt(n,e)}}function dU(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3ui(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(kt(n,e))return;t.uniform3uiv(this.addr,e),Bt(n,e)}}function hU(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4ui(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(kt(n,e))return;t.uniform4uiv(this.addr,e),Bt(n,e)}}function pU(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r);const s=this.type===t.SAMPLER_2D_SHADOW?cy:ly;n.setTexture2D(e||s,r)}function mU(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture3D(e||fy,r)}function gU(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTextureCube(e||dy,r)}function _U(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture2DArray(e||uy,r)}function vU(t){switch(t){case 5126:return QN;case 35664:return eU;case 35665:return tU;case 35666:return nU;case 35674:return iU;case 35675:return rU;case 35676:return sU;case 5124:case 35670:return oU;case 35667:case 35671:return aU;case 35668:case 35672:return lU;case 35669:case 35673:return cU;case 5125:return uU;case 36294:return fU;case 36295:return dU;case 36296:return hU;case 35678:case 36198:case 36298:case 36306:case 35682:return pU;case 35679:case 36299:case 36307:return mU;case 35680:case 36300:case 36308:case 36293:return gU;case 36289:case 36303:case 36311:case 36292:return _U}}function yU(t,e){t.uniform1fv(this.addr,e)}function xU(t,e){const n=Js(e,this.size,2);t.uniform2fv(this.addr,n)}function SU(t,e){const n=Js(e,this.size,3);t.uniform3fv(this.addr,n)}function EU(t,e){const n=Js(e,this.size,4);t.uniform4fv(this.addr,n)}function bU(t,e){const n=Js(e,this.size,4);t.uniformMatrix2fv(this.addr,!1,n)}function MU(t,e){const n=Js(e,this.size,9);t.uniformMatrix3fv(this.addr,!1,n)}function TU(t,e){const n=Js(e,this.size,16);t.uniformMatrix4fv(this.addr,!1,n)}function wU(t,e){t.uniform1iv(this.addr,e)}function AU(t,e){t.uniform2iv(this.addr,e)}function RU(t,e){t.uniform3iv(this.addr,e)}function CU(t,e){t.uniform4iv(this.addr,e)}function LU(t,e){t.uniform1uiv(this.addr,e)}function PU(t,e){t.uniform2uiv(this.addr,e)}function IU(t,e){t.uniform3uiv(this.addr,e)}function DU(t,e){t.uniform4uiv(this.addr,e)}function NU(t,e,n){const i=this.cache,r=e.length,s=cc(n,r);kt(i,s)||(t.uniform1iv(this.addr,s),Bt(i,s));for(let o=0;o!==r;++o)n.setTexture2D(e[o]||ly,s[o])}function UU(t,e,n){const i=this.cache,r=e.length,s=cc(n,r);kt(i,s)||(t.uniform1iv(this.addr,s),Bt(i,s));for(let o=0;o!==r;++o)n.setTexture3D(e[o]||fy,s[o])}function OU(t,e,n){const i=this.cache,r=e.length,s=cc(n,r);kt(i,s)||(t.uniform1iv(this.addr,s),Bt(i,s));for(let o=0;o!==r;++o)n.setTextureCube(e[o]||dy,s[o])}function FU(t,e,n){const i=this.cache,r=e.length,s=cc(n,r);kt(i,s)||(t.uniform1iv(this.addr,s),Bt(i,s));for(let o=0;o!==r;++o)n.setTexture2DArray(e[o]||uy,s[o])}function kU(t){switch(t){case 5126:return yU;case 35664:return xU;case 35665:return SU;case 35666:return EU;case 35674:return bU;case 35675:return MU;case 35676:return TU;case 5124:case 35670:return wU;case 35667:case 35671:return AU;case 35668:case 35672:return RU;case 35669:case 35673:return CU;case 5125:return LU;case 36294:return PU;case 36295:return IU;case 36296:return DU;case 35678:case 36198:case 36298:case 36306:case 35682:return NU;case 35679:case 36299:case 36307:return UU;case 35680:case 36300:case 36308:case 36293:return OU;case 36289:case 36303:case 36311:case 36292:return FU}}class BU{constructor(e,n,i){this.id=e,this.addr=i,this.cache=[],this.type=n.type,this.setValue=vU(n.type)}}class HU{constructor(e,n,i){this.id=e,this.addr=i,this.cache=[],this.type=n.type,this.size=n.size,this.setValue=kU(n.type)}}class zU{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,n,i){const r=this.seq;for(let s=0,o=r.length;s!==o;++s){const a=r[s];a.setValue(e,n[a.id],i)}}}const du=/(\w+)(\])?(\[|\.)?/g;function Jm(t,e){t.seq.push(e),t.map[e.id]=e}function VU(t,e,n){const i=t.name,r=i.length;for(du.lastIndex=0;;){const s=du.exec(i),o=du.lastIndex;let a=s[1];const l=s[2]==="]",c=s[3];if(l&&(a=a|0),c===void 0||c==="["&&o+2===r){Jm(n,c===void 0?new BU(a,t,e):new HU(a,t,e));break}else{let f=n.map[a];f===void 0&&(f=new zU(a),Jm(n,f)),n=f}}}class tl{constructor(e,n){this.seq=[],this.map={};const i=e.getProgramParameter(n,e.ACTIVE_UNIFORMS);for(let r=0;r<i;++r){const s=e.getActiveUniform(n,r),o=e.getUniformLocation(n,s.name);VU(s,o,this)}}setValue(e,n,i,r){const s=this.map[n];s!==void 0&&s.setValue(e,i,r)}setOptional(e,n,i){const r=n[i];r!==void 0&&this.setValue(e,i,r)}static upload(e,n,i,r){for(let s=0,o=n.length;s!==o;++s){const a=n[s],l=i[a.id];l.needsUpdate!==!1&&a.setValue(e,l.value,r)}}static seqWithValue(e,n){const i=[];for(let r=0,s=e.length;r!==s;++r){const o=e[r];o.id in n&&i.push(o)}return i}}function Qm(t,e,n){const i=t.createShader(e);return t.shaderSource(i,n),t.compileShader(i),i}const GU=37297;let WU=0;function $U(t,e){const n=t.split(`
`),i=[],r=Math.max(e-6,0),s=Math.min(e+6,n.length);for(let o=r;o<s;o++){const a=o+1;i.push(`${a===e?">":" "} ${a}: ${n[o]}`)}return i.join(`
`)}function XU(t){const e=dt.getPrimaries(dt.workingColorSpace),n=dt.getPrimaries(t);let i;switch(e===n?i="":e===Tl&&n===Ml?i="LinearDisplayP3ToLinearSRGB":e===Ml&&n===Tl&&(i="LinearSRGBToLinearDisplayP3"),t){case Ni:case sc:return[i,"LinearTransferOETF"];case jt:case hd:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[i,"LinearTransferOETF"]}}function eg(t,e,n){const i=t.getShaderParameter(e,t.COMPILE_STATUS),r=t.getShaderInfoLog(e).trim();if(i&&r==="")return"";const s=/ERROR: 0:(\d+)/.exec(r);if(s){const o=parseInt(s[1]);return n.toUpperCase()+`

`+r+`

`+$U(t.getShaderSource(e),o)}else return r}function jU(t,e){const n=XU(e);return`vec4 ${t}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function qU(t,e){let n;switch(e){case sP:n="Linear";break;case oP:n="Reinhard";break;case aP:n="OptimizedCineon";break;case lP:n="ACESFilmic";break;case cP:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function YU(t){return[t.extensionDerivatives||t.envMapCubeUVHeight||t.bumpMap||t.normalMapTangentSpace||t.clearcoatNormalMap||t.flatShading||t.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(t.extensionFragDepth||t.logarithmicDepthBuffer)&&t.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",t.extensionDrawBuffers&&t.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(t.extensionShaderTextureLOD||t.envMap||t.transmission)&&t.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(vo).join(`
`)}function KU(t){const e=[];for(const n in t){const i=t[n];i!==!1&&e.push("#define "+n+" "+i)}return e.join(`
`)}function ZU(t,e){const n={},i=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let r=0;r<i;r++){const s=t.getActiveAttrib(e,r),o=s.name;let a=1;s.type===t.FLOAT_MAT2&&(a=2),s.type===t.FLOAT_MAT3&&(a=3),s.type===t.FLOAT_MAT4&&(a=4),n[o]={type:s.type,location:t.getAttribLocation(e,o),locationSize:a}}return n}function vo(t){return t!==""}function tg(t,e){const n=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function ng(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const JU=/^[ \t]*#include +<([\w\d./]+)>/gm;function xf(t){return t.replace(JU,e2)}const QU=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function e2(t,e){let n=qe[e];if(n===void 0){const i=QU.get(e);if(i!==void 0)n=qe[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return xf(n)}const t2=/#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 ig(t){return t.replace(t2,n2)}function n2(t,e,n,i){let r="";for(let s=parseInt(e);s<parseInt(n);s++)r+=i.replace(/\[\s*i\s*\]/g,"[ "+s+" ]").replace(/UNROLLED_LOOP_INDEX/g,s);return r}function rg(t){let e="precision "+t.precision+` float;
precision `+t.precision+" int;";return t.precision==="highp"?e+=`
#define HIGH_PRECISION`:t.precision==="mediump"?e+=`
#define MEDIUM_PRECISION`:t.precision==="lowp"&&(e+=`
#define LOW_PRECISION`),e}function i2(t){let e="SHADOWMAP_TYPE_BASIC";return t.shadowMapType===N0?e="SHADOWMAP_TYPE_PCF":t.shadowMapType===DL?e="SHADOWMAP_TYPE_PCF_SOFT":t.shadowMapType===Ti&&(e="SHADOWMAP_TYPE_VSM"),e}function r2(t){let e="ENVMAP_TYPE_CUBE";if(t.envMap)switch(t.envMapMode){case ks:case Bs:e="ENVMAP_TYPE_CUBE";break;case rc:e="ENVMAP_TYPE_CUBE_UV";break}return e}function s2(t){let e="ENVMAP_MODE_REFLECTION";if(t.envMap)switch(t.envMapMode){case Bs:e="ENVMAP_MODE_REFRACTION";break}return e}function o2(t){let e="ENVMAP_BLENDING_NONE";if(t.envMap)switch(t.combine){case U0:e="ENVMAP_BLENDING_MULTIPLY";break;case iP:e="ENVMAP_BLENDING_MIX";break;case rP:e="ENVMAP_BLENDING_ADD";break}return e}function a2(t){const e=t.envMapCubeUVHeight;if(e===null)return null;const n=Math.log2(e)-2,i=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,n),7*16)),texelHeight:i,maxMip:n}}function l2(t,e,n,i){const r=t.getContext(),s=n.defines;let o=n.vertexShader,a=n.fragmentShader;const l=i2(n),c=r2(n),u=s2(n),f=o2(n),h=a2(n),p=n.isWebGL2?"":YU(n),g=KU(s),_=r.createProgram();let m,d,v=n.glslVersion?"#version "+n.glslVersion+`
`:"";n.isRawShaderMaterial?(m=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,g].filter(vo).join(`
`),m.length>0&&(m+=`
`),d=[p,"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,g].filter(vo).join(`
`),d.length>0&&(d+=`
`)):(m=[rg(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,g,n.batching?"#define USE_BATCHING":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","	attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","	attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","	attribute vec2 uv1;","#endif","#ifdef USE_UV2","	attribute vec2 uv2;","#endif","#ifdef USE_UV3","	attribute vec2 uv3;","#endif","#ifdef USE_TANGENT","	attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","	attribute vec4 color;","#elif defined( USE_COLOR )","	attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","	attribute vec3 morphTarget0;","	attribute vec3 morphTarget1;","	attribute vec3 morphTarget2;","	attribute vec3 morphTarget3;","	#ifdef USE_MORPHNORMALS","		attribute vec3 morphNormal0;","		attribute vec3 morphNormal1;","		attribute vec3 morphNormal2;","		attribute vec3 morphNormal3;","	#else","		attribute vec3 morphTarget4;","		attribute vec3 morphTarget5;","		attribute vec3 morphTarget6;","		attribute vec3 morphTarget7;","	#endif","#endif","#ifdef USE_SKINNING","	attribute vec4 skinIndex;","	attribute vec4 skinWeight;","#endif",`
`].filter(vo).join(`
`),d=[p,rg(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,g,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+f:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==ir?"#define TONE_MAPPING":"",n.toneMapping!==ir?qe.tonemapping_pars_fragment:"",n.toneMapping!==ir?qU("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",qe.colorspace_pars_fragment,jU("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",`
`].filter(vo).join(`
`)),o=xf(o),o=tg(o,n),o=ng(o,n),a=xf(a),a=tg(a,n),a=ng(a,n),o=ig(o),a=ig(a),n.isWebGL2&&n.isRawShaderMaterial!==!0&&(v=`#version 300 es
`,m=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(`
`)+`
`+m,d=["precision mediump sampler2DArray;","#define varying in",n.glslVersion===Em?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===Em?"":"#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(`
`)+`
`+d);const y=v+m+o,x=v+d+a,S=Qm(r,r.VERTEX_SHADER,y),C=Qm(r,r.FRAGMENT_SHADER,x);r.attachShader(_,S),r.attachShader(_,C),n.index0AttributeName!==void 0?r.bindAttribLocation(_,0,n.index0AttributeName):n.morphTargets===!0&&r.bindAttribLocation(_,0,"position"),r.linkProgram(_);function R(B){if(t.debug.checkShaderErrors){const U=r.getProgramInfoLog(_).trim(),k=r.getShaderInfoLog(S).trim(),D=r.getShaderInfoLog(C).trim();let G=!0,$=!0;if(r.getProgramParameter(_,r.LINK_STATUS)===!1)if(G=!1,typeof t.debug.onShaderError=="function")t.debug.onShaderError(r,_,S,C);else{const j=eg(r,S,"vertex"),oe=eg(r,C,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(_,r.VALIDATE_STATUS)+`

Program Info Log: `+U+`
`+j+`
`+oe)}else U!==""?console.warn("THREE.WebGLProgram: Program Info Log:",U):(k===""||D==="")&&($=!1);$&&(B.diagnostics={runnable:G,programLog:U,vertexShader:{log:k,prefix:m},fragmentShader:{log:D,prefix:d}})}r.deleteShader(S),r.deleteShader(C),I=new tl(r,_),b=ZU(r,_)}let I;this.getUniforms=function(){return I===void 0&&R(this),I};let b;this.getAttributes=function(){return b===void 0&&R(this),b};let L=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return L===!1&&(L=r.getProgramParameter(_,GU)),L},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(_),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=WU++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=S,this.fragmentShader=C,this}let c2=0;class u2{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,i=e.fragmentShader,r=this._getShaderStage(n),s=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(r)===!1&&(o.add(r),r.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const i of n)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let i=n.get(e);return i===void 0&&(i=new Set,n.set(e,i)),i}_getShaderStage(e){const n=this.shaderCache;let i=n.get(e);return i===void 0&&(i=new f2(e),n.set(e,i)),i}}class f2{constructor(e){this.id=c2++,this.code=e,this.usedTimes=0}}function d2(t,e,n,i,r,s,o){const a=new K0,l=new u2,c=[],u=r.isWebGL2,f=r.logarithmicDepthBuffer,h=r.vertexTextures;let p=r.precision;const g={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 _(b){return b===0?"uv":`uv${b}`}function m(b,L,B,U,k){const D=U.fog,G=k.geometry,$=b.isMeshStandardMaterial?U.environment:null,j=(b.isMeshStandardMaterial?n:e).get(b.envMap||$),oe=j&&j.mapping===rc?j.image.height:null,se=g[b.type];b.precision!==null&&(p=r.getMaxPrecision(b.precision),p!==b.precision&&console.warn("THREE.WebGLProgram.getParameters:",b.precision,"not supported, using",p,"instead."));const he=G.morphAttributes.position||G.morphAttributes.normal||G.morphAttributes.color,me=he!==void 0?he.length:0;let ye=0;G.morphAttributes.position!==void 0&&(ye=1),G.morphAttributes.normal!==void 0&&(ye=2),G.morphAttributes.color!==void 0&&(ye=3);let te,fe,be,Te;if(se){const rn=li[se];te=rn.vertexShader,fe=rn.fragmentShader}else te=b.vertexShader,fe=b.fragmentShader,l.update(b),be=l.getVertexShaderID(b),Te=l.getFragmentShaderID(b);const V=t.getRenderTarget(),ue=k.isInstancedMesh===!0,ne=k.isBatchedMesh===!0,de=!!b.map,Me=!!b.matcap,T=!!j,E=!!b.aoMap,w=!!b.lightMap,N=!!b.bumpMap,O=!!b.normalMap,W=!!b.displacementMap,q=!!b.emissiveMap,Z=!!b.metalnessMap,ce=!!b.roughnessMap,ee=b.anisotropy>0,z=b.clearcoat>0,M=b.iridescence>0,A=b.sheen>0,F=b.transmission>0,ie=ee&&!!b.anisotropyMap,re=z&&!!b.clearcoatMap,ae=z&&!!b.clearcoatNormalMap,Se=z&&!!b.clearcoatRoughnessMap,ge=M&&!!b.iridescenceMap,we=M&&!!b.iridescenceThicknessMap,Oe=A&&!!b.sheenColorMap,Je=A&&!!b.sheenRoughnessMap,_e=!!b.specularMap,We=!!b.specularColorMap,Ie=!!b.specularIntensityMap,Fe=F&&!!b.transmissionMap,Ne=F&&!!b.thicknessMap,Le=!!b.gradientMap,Qe=!!b.alphaMap,H=b.alphaTest>0,Re=!!b.alphaHash,ve=!!b.extensions,le=!!G.attributes.uv1,xe=!!G.attributes.uv2,Be=!!G.attributes.uv3;let nt=ir;return b.toneMapped&&(V===null||V.isXRRenderTarget===!0)&&(nt=t.toneMapping),{isWebGL2:u,shaderID:se,shaderType:b.type,shaderName:b.name,vertexShader:te,fragmentShader:fe,defines:b.defines,customVertexShaderID:be,customFragmentShaderID:Te,isRawShaderMaterial:b.isRawShaderMaterial===!0,glslVersion:b.glslVersion,precision:p,batching:ne,instancing:ue,instancingColor:ue&&k.instanceColor!==null,supportsVertexTextures:h,outputColorSpace:V===null?t.outputColorSpace:V.isXRRenderTarget===!0?V.texture.colorSpace:Ni,map:de,matcap:Me,envMap:T,envMapMode:T&&j.mapping,envMapCubeUVHeight:oe,aoMap:E,lightMap:w,bumpMap:N,normalMap:O,displacementMap:h&&W,emissiveMap:q,normalMapObjectSpace:O&&b.normalMapType===EP,normalMapTangentSpace:O&&b.normalMapType===SP,metalnessMap:Z,roughnessMap:ce,anisotropy:ee,anisotropyMap:ie,clearcoat:z,clearcoatMap:re,clearcoatNormalMap:ae,clearcoatRoughnessMap:Se,iridescence:M,iridescenceMap:ge,iridescenceThicknessMap:we,sheen:A,sheenColorMap:Oe,sheenRoughnessMap:Je,specularMap:_e,specularColorMap:We,specularIntensityMap:Ie,transmission:F,transmissionMap:Fe,thicknessMap:Ne,gradientMap:Le,opaque:b.transparent===!1&&b.blending===Ts,alphaMap:Qe,alphaTest:H,alphaHash:Re,combine:b.combine,mapUv:de&&_(b.map.channel),aoMapUv:E&&_(b.aoMap.channel),lightMapUv:w&&_(b.lightMap.channel),bumpMapUv:N&&_(b.bumpMap.channel),normalMapUv:O&&_(b.normalMap.channel),displacementMapUv:W&&_(b.displacementMap.channel),emissiveMapUv:q&&_(b.emissiveMap.channel),metalnessMapUv:Z&&_(b.metalnessMap.channel),roughnessMapUv:ce&&_(b.roughnessMap.channel),anisotropyMapUv:ie&&_(b.anisotropyMap.channel),clearcoatMapUv:re&&_(b.clearcoatMap.channel),clearcoatNormalMapUv:ae&&_(b.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Se&&_(b.clearcoatRoughnessMap.channel),iridescenceMapUv:ge&&_(b.iridescenceMap.channel),iridescenceThicknessMapUv:we&&_(b.iridescenceThicknessMap.channel),sheenColorMapUv:Oe&&_(b.sheenColorMap.channel),sheenRoughnessMapUv:Je&&_(b.sheenRoughnessMap.channel),specularMapUv:_e&&_(b.specularMap.channel),specularColorMapUv:We&&_(b.specularColorMap.channel),specularIntensityMapUv:Ie&&_(b.specularIntensityMap.channel),transmissionMapUv:Fe&&_(b.transmissionMap.channel),thicknessMapUv:Ne&&_(b.thicknessMap.channel),alphaMapUv:Qe&&_(b.alphaMap.channel),vertexTangents:!!G.attributes.tangent&&(O||ee),vertexColors:b.vertexColors,vertexAlphas:b.vertexColors===!0&&!!G.attributes.color&&G.attributes.color.itemSize===4,vertexUv1s:le,vertexUv2s:xe,vertexUv3s:Be,pointsUvs:k.isPoints===!0&&!!G.attributes.uv&&(de||Qe),fog:!!D,useFog:b.fog===!0,fogExp2:D&&D.isFogExp2,flatShading:b.flatShading===!0,sizeAttenuation:b.sizeAttenuation===!0,logarithmicDepthBuffer:f,skinning:k.isSkinnedMesh===!0,morphTargets:G.morphAttributes.position!==void 0,morphNormals:G.morphAttributes.normal!==void 0,morphColors:G.morphAttributes.color!==void 0,morphTargetsCount:me,morphTextureStride:ye,numDirLights:L.directional.length,numPointLights:L.point.length,numSpotLights:L.spot.length,numSpotLightMaps:L.spotLightMap.length,numRectAreaLights:L.rectArea.length,numHemiLights:L.hemi.length,numDirLightShadows:L.directionalShadowMap.length,numPointLightShadows:L.pointShadowMap.length,numSpotLightShadows:L.spotShadowMap.length,numSpotLightShadowsWithMaps:L.numSpotLightShadowsWithMaps,numLightProbes:L.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:b.dithering,shadowMapEnabled:t.shadowMap.enabled&&B.length>0,shadowMapType:t.shadowMap.type,toneMapping:nt,useLegacyLights:t._useLegacyLights,decodeVideoTexture:de&&b.map.isVideoTexture===!0&&dt.getTransfer(b.map.colorSpace)===_t,premultipliedAlpha:b.premultipliedAlpha,doubleSided:b.side===Ai,flipSided:b.side===vn,useDepthPacking:b.depthPacking>=0,depthPacking:b.depthPacking||0,index0AttributeName:b.index0AttributeName,extensionDerivatives:ve&&b.extensions.derivatives===!0,extensionFragDepth:ve&&b.extensions.fragDepth===!0,extensionDrawBuffers:ve&&b.extensions.drawBuffers===!0,extensionShaderTextureLOD:ve&&b.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:u||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||i.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:b.customProgramCacheKey()}}function d(b){const L=[];if(b.shaderID?L.push(b.shaderID):(L.push(b.customVertexShaderID),L.push(b.customFragmentShaderID)),b.defines!==void 0)for(const B in b.defines)L.push(B),L.push(b.defines[B]);return b.isRawShaderMaterial===!1&&(v(L,b),y(L,b),L.push(t.outputColorSpace)),L.push(b.customProgramCacheKey),L.join()}function v(b,L){b.push(L.precision),b.push(L.outputColorSpace),b.push(L.envMapMode),b.push(L.envMapCubeUVHeight),b.push(L.mapUv),b.push(L.alphaMapUv),b.push(L.lightMapUv),b.push(L.aoMapUv),b.push(L.bumpMapUv),b.push(L.normalMapUv),b.push(L.displacementMapUv),b.push(L.emissiveMapUv),b.push(L.metalnessMapUv),b.push(L.roughnessMapUv),b.push(L.anisotropyMapUv),b.push(L.clearcoatMapUv),b.push(L.clearcoatNormalMapUv),b.push(L.clearcoatRoughnessMapUv),b.push(L.iridescenceMapUv),b.push(L.iridescenceThicknessMapUv),b.push(L.sheenColorMapUv),b.push(L.sheenRoughnessMapUv),b.push(L.specularMapUv),b.push(L.specularColorMapUv),b.push(L.specularIntensityMapUv),b.push(L.transmissionMapUv),b.push(L.thicknessMapUv),b.push(L.combine),b.push(L.fogExp2),b.push(L.sizeAttenuation),b.push(L.morphTargetsCount),b.push(L.morphAttributeCount),b.push(L.numDirLights),b.push(L.numPointLights),b.push(L.numSpotLights),b.push(L.numSpotLightMaps),b.push(L.numHemiLights),b.push(L.numRectAreaLights),b.push(L.numDirLightShadows),b.push(L.numPointLightShadows),b.push(L.numSpotLightShadows),b.push(L.numSpotLightShadowsWithMaps),b.push(L.numLightProbes),b.push(L.shadowMapType),b.push(L.toneMapping),b.push(L.numClippingPlanes),b.push(L.numClipIntersection),b.push(L.depthPacking)}function y(b,L){a.disableAll(),L.isWebGL2&&a.enable(0),L.supportsVertexTextures&&a.enable(1),L.instancing&&a.enable(2),L.instancingColor&&a.enable(3),L.matcap&&a.enable(4),L.envMap&&a.enable(5),L.normalMapObjectSpace&&a.enable(6),L.normalMapTangentSpace&&a.enable(7),L.clearcoat&&a.enable(8),L.iridescence&&a.enable(9),L.alphaTest&&a.enable(10),L.vertexColors&&a.enable(11),L.vertexAlphas&&a.enable(12),L.vertexUv1s&&a.enable(13),L.vertexUv2s&&a.enable(14),L.vertexUv3s&&a.enable(15),L.vertexTangents&&a.enable(16),L.anisotropy&&a.enable(17),L.alphaHash&&a.enable(18),L.batching&&a.enable(19),b.push(a.mask),a.disableAll(),L.fog&&a.enable(0),L.useFog&&a.enable(1),L.flatShading&&a.enable(2),L.logarithmicDepthBuffer&&a.enable(3),L.skinning&&a.enable(4),L.morphTargets&&a.enable(5),L.morphNormals&&a.enable(6),L.morphColors&&a.enable(7),L.premultipliedAlpha&&a.enable(8),L.shadowMapEnabled&&a.enable(9),L.useLegacyLights&&a.enable(10),L.doubleSided&&a.enable(11),L.flipSided&&a.enable(12),L.useDepthPacking&&a.enable(13),L.dithering&&a.enable(14),L.transmission&&a.enable(15),L.sheen&&a.enable(16),L.opaque&&a.enable(17),L.pointsUvs&&a.enable(18),L.decodeVideoTexture&&a.enable(19),b.push(a.mask)}function x(b){const L=g[b.type];let B;if(L){const U=li[L];B=ny.clone(U.uniforms)}else B=b.uniforms;return B}function S(b,L){let B;for(let U=0,k=c.length;U<k;U++){const D=c[U];if(D.cacheKey===L){B=D,++B.usedTimes;break}}return B===void 0&&(B=new l2(t,L,b,s),c.push(B)),B}function C(b){if(--b.usedTimes===0){const L=c.indexOf(b);c[L]=c[c.length-1],c.pop(),b.destroy()}}function R(b){l.remove(b)}function I(){l.dispose()}return{getParameters:m,getProgramCacheKey:d,getUniforms:x,acquireProgram:S,releaseProgram:C,releaseShaderCache:R,programs:c,dispose:I}}function h2(){let t=new WeakMap;function e(s){let o=t.get(s);return o===void 0&&(o={},t.set(s,o)),o}function n(s){t.delete(s)}function i(s,o,a){t.get(s)[o]=a}function r(){t=new WeakMap}return{get:e,remove:n,update:i,dispose:r}}function p2(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function sg(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function og(){const t=[];let e=0;const n=[],i=[],r=[];function s(){e=0,n.length=0,i.length=0,r.length=0}function o(f,h,p,g,_,m){let d=t[e];return d===void 0?(d={id:f.id,object:f,geometry:h,material:p,groupOrder:g,renderOrder:f.renderOrder,z:_,group:m},t[e]=d):(d.id=f.id,d.object=f,d.geometry=h,d.material=p,d.groupOrder=g,d.renderOrder=f.renderOrder,d.z=_,d.group=m),e++,d}function a(f,h,p,g,_,m){const d=o(f,h,p,g,_,m);p.transmission>0?i.push(d):p.transparent===!0?r.push(d):n.push(d)}function l(f,h,p,g,_,m){const d=o(f,h,p,g,_,m);p.transmission>0?i.unshift(d):p.transparent===!0?r.unshift(d):n.unshift(d)}function c(f,h){n.length>1&&n.sort(f||p2),i.length>1&&i.sort(h||sg),r.length>1&&r.sort(h||sg)}function u(){for(let f=e,h=t.length;f<h;f++){const p=t[f];if(p.id===null)break;p.id=null,p.object=null,p.geometry=null,p.material=null,p.group=null}}return{opaque:n,transmissive:i,transparent:r,init:s,push:a,unshift:l,finish:u,sort:c}}function m2(){let t=new WeakMap;function e(i,r){const s=t.get(i);let o;return s===void 0?(o=new og,t.set(i,[o])):r>=s.length?(o=new og,s.push(o)):o=s[r],o}function n(){t=new WeakMap}return{get:e,dispose:n}}function g2(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new J,color:new ct};break;case"SpotLight":n={position:new J,direction:new J,color:new ct,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new J,color:new ct,distance:0,decay:0};break;case"HemisphereLight":n={direction:new J,skyColor:new ct,groundColor:new ct};break;case"RectAreaLight":n={color:new ct,position:new J,halfWidth:new J,halfHeight:new J};break}return t[e.id]=n,n}}}function _2(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ot};break;case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ot};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ot,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let v2=0;function y2(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function x2(t,e){const n=new g2,i=_2(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let u=0;u<9;u++)r.probe.push(new J);const s=new J,o=new Kt,a=new Kt;function l(u,f){let h=0,p=0,g=0;for(let U=0;U<9;U++)r.probe[U].set(0,0,0);let _=0,m=0,d=0,v=0,y=0,x=0,S=0,C=0,R=0,I=0,b=0;u.sort(y2);const L=f===!0?Math.PI:1;for(let U=0,k=u.length;U<k;U++){const D=u[U],G=D.color,$=D.intensity,j=D.distance,oe=D.shadow&&D.shadow.map?D.shadow.map.texture:null;if(D.isAmbientLight)h+=G.r*$*L,p+=G.g*$*L,g+=G.b*$*L;else if(D.isLightProbe){for(let se=0;se<9;se++)r.probe[se].addScaledVector(D.sh.coefficients[se],$);b++}else if(D.isDirectionalLight){const se=n.get(D);if(se.color.copy(D.color).multiplyScalar(D.intensity*L),D.castShadow){const he=D.shadow,me=i.get(D);me.shadowBias=he.bias,me.shadowNormalBias=he.normalBias,me.shadowRadius=he.radius,me.shadowMapSize=he.mapSize,r.directionalShadow[_]=me,r.directionalShadowMap[_]=oe,r.directionalShadowMatrix[_]=D.shadow.matrix,x++}r.directional[_]=se,_++}else if(D.isSpotLight){const se=n.get(D);se.position.setFromMatrixPosition(D.matrixWorld),se.color.copy(G).multiplyScalar($*L),se.distance=j,se.coneCos=Math.cos(D.angle),se.penumbraCos=Math.cos(D.angle*(1-D.penumbra)),se.decay=D.decay,r.spot[d]=se;const he=D.shadow;if(D.map&&(r.spotLightMap[R]=D.map,R++,he.updateMatrices(D),D.castShadow&&I++),r.spotLightMatrix[d]=he.matrix,D.castShadow){const me=i.get(D);me.shadowBias=he.bias,me.shadowNormalBias=he.normalBias,me.shadowRadius=he.radius,me.shadowMapSize=he.mapSize,r.spotShadow[d]=me,r.spotShadowMap[d]=oe,C++}d++}else if(D.isRectAreaLight){const se=n.get(D);se.color.copy(G).multiplyScalar($),se.halfWidth.set(D.width*.5,0,0),se.halfHeight.set(0,D.height*.5,0),r.rectArea[v]=se,v++}else if(D.isPointLight){const se=n.get(D);if(se.color.copy(D.color).multiplyScalar(D.intensity*L),se.distance=D.distance,se.decay=D.decay,D.castShadow){const he=D.shadow,me=i.get(D);me.shadowBias=he.bias,me.shadowNormalBias=he.normalBias,me.shadowRadius=he.radius,me.shadowMapSize=he.mapSize,me.shadowCameraNear=he.camera.near,me.shadowCameraFar=he.camera.far,r.pointShadow[m]=me,r.pointShadowMap[m]=oe,r.pointShadowMatrix[m]=D.shadow.matrix,S++}r.point[m]=se,m++}else if(D.isHemisphereLight){const se=n.get(D);se.skyColor.copy(D.color).multiplyScalar($*L),se.groundColor.copy(D.groundColor).multiplyScalar($*L),r.hemi[y]=se,y++}}v>0&&(e.isWebGL2||t.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Ee.LTC_FLOAT_1,r.rectAreaLTC2=Ee.LTC_FLOAT_2):t.has("OES_texture_half_float_linear")===!0?(r.rectAreaLTC1=Ee.LTC_HALF_1,r.rectAreaLTC2=Ee.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=h,r.ambient[1]=p,r.ambient[2]=g;const B=r.hash;(B.directionalLength!==_||B.pointLength!==m||B.spotLength!==d||B.rectAreaLength!==v||B.hemiLength!==y||B.numDirectionalShadows!==x||B.numPointShadows!==S||B.numSpotShadows!==C||B.numSpotMaps!==R||B.numLightProbes!==b)&&(r.directional.length=_,r.spot.length=d,r.rectArea.length=v,r.point.length=m,r.hemi.length=y,r.directionalShadow.length=x,r.directionalShadowMap.length=x,r.pointShadow.length=S,r.pointShadowMap.length=S,r.spotShadow.length=C,r.spotShadowMap.length=C,r.directionalShadowMatrix.length=x,r.pointShadowMatrix.length=S,r.spotLightMatrix.length=C+R-I,r.spotLightMap.length=R,r.numSpotLightShadowsWithMaps=I,r.numLightProbes=b,B.directionalLength=_,B.pointLength=m,B.spotLength=d,B.rectAreaLength=v,B.hemiLength=y,B.numDirectionalShadows=x,B.numPointShadows=S,B.numSpotShadows=C,B.numSpotMaps=R,B.numLightProbes=b,r.version=v2++)}function c(u,f){let h=0,p=0,g=0,_=0,m=0;const d=f.matrixWorldInverse;for(let v=0,y=u.length;v<y;v++){const x=u[v];if(x.isDirectionalLight){const S=r.directional[h];S.direction.setFromMatrixPosition(x.matrixWorld),s.setFromMatrixPosition(x.target.matrixWorld),S.direction.sub(s),S.direction.transformDirection(d),h++}else if(x.isSpotLight){const S=r.spot[g];S.position.setFromMatrixPosition(x.matrixWorld),S.position.applyMatrix4(d),S.direction.setFromMatrixPosition(x.matrixWorld),s.setFromMatrixPosition(x.target.matrixWorld),S.direction.sub(s),S.direction.transformDirection(d),g++}else if(x.isRectAreaLight){const S=r.rectArea[_];S.position.setFromMatrixPosition(x.matrixWorld),S.position.applyMatrix4(d),a.identity(),o.copy(x.matrixWorld),o.premultiply(d),a.extractRotation(o),S.halfWidth.set(x.width*.5,0,0),S.halfHeight.set(0,x.height*.5,0),S.halfWidth.applyMatrix4(a),S.halfHeight.applyMatrix4(a),_++}else if(x.isPointLight){const S=r.point[p];S.position.setFromMatrixPosition(x.matrixWorld),S.position.applyMatrix4(d),p++}else if(x.isHemisphereLight){const S=r.hemi[m];S.direction.setFromMatrixPosition(x.matrixWorld),S.direction.transformDirection(d),m++}}}return{setup:l,setupView:c,state:r}}function ag(t,e){const n=new x2(t,e),i=[],r=[];function s(){i.length=0,r.length=0}function o(f){i.push(f)}function a(f){r.push(f)}function l(f){n.setup(i,f)}function c(f){n.setupView(i,f)}return{init:s,state:{lightsArray:i,shadowsArray:r,lights:n},setupLights:l,setupLightsView:c,pushLight:o,pushShadow:a}}function S2(t,e){let n=new WeakMap;function i(s,o=0){const a=n.get(s);let l;return a===void 0?(l=new ag(t,e),n.set(s,[l])):o>=a.length?(l=new ag(t,e),a.push(l)):l=a[o],l}function r(){n=new WeakMap}return{get:i,dispose:r}}class E2 extends ac{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=yP,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 b2 extends ac{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 M2=`void main() {
	gl_Position = vec4( position, 1.0 );
}`,T2=`uniform sampler2D shadow_pass;
uniform vec2 resolution;
uniform float radius;
#include <packing>
void main() {
	const float samples = float( VSM_SAMPLES );
	float mean = 0.0;
	float squared_mean = 0.0;
	float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );
	float uvStart = samples <= 1.0 ? 0.0 : - 1.0;
	for ( float i = 0.0; i < samples; i ++ ) {
		float uvOffset = uvStart + i * uvStride;
		#ifdef HORIZONTAL_PASS
			vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );
			mean += distribution.x;
			squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;
		#else
			float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );
			mean += depth;
			squared_mean += depth * depth;
		#endif
	}
	mean = mean / samples;
	squared_mean = squared_mean / samples;
	float std_dev = sqrt( squared_mean - mean * mean );
	gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
}`;function w2(t,e,n){let i=new ry;const r=new ot,s=new ot,o=new qt,a=new E2({depthPacking:xP}),l=new b2,c={},u=n.maxTextureSize,f={[cr]:vn,[vn]:cr,[Ai]:Ai},h=new pi({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new ot},radius:{value:4}},vertexShader:M2,fragmentShader:T2}),p=h.clone();p.defines.HORIZONTAL_PASS=1;const g=new hr;g.setAttribute("position",new fi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new ui(g,h),m=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=N0;let d=this.type;this.render=function(S,C,R){if(m.enabled===!1||m.autoUpdate===!1&&m.needsUpdate===!1||S.length===0)return;const I=t.getRenderTarget(),b=t.getActiveCubeFace(),L=t.getActiveMipmapLevel(),B=t.state;B.setBlending(Ci),B.buffers.color.setClear(1,1,1,1),B.buffers.depth.setTest(!0),B.setScissorTest(!1);const U=d!==Ti&&this.type===Ti,k=d===Ti&&this.type!==Ti;for(let D=0,G=S.length;D<G;D++){const $=S[D],j=$.shadow;if(j===void 0){console.warn("THREE.WebGLShadowMap:",$,"has no shadow.");continue}if(j.autoUpdate===!1&&j.needsUpdate===!1)continue;r.copy(j.mapSize);const oe=j.getFrameExtents();if(r.multiply(oe),s.copy(j.mapSize),(r.x>u||r.y>u)&&(r.x>u&&(s.x=Math.floor(u/oe.x),r.x=s.x*oe.x,j.mapSize.x=s.x),r.y>u&&(s.y=Math.floor(u/oe.y),r.y=s.y*oe.y,j.mapSize.y=s.y)),j.map===null||U===!0||k===!0){const he=this.type!==Ti?{minFilter:un,magFilter:un}:{};j.map!==null&&j.map.dispose(),j.map=new ur(r.x,r.y,he),j.map.texture.name=$.name+".shadowMap",j.camera.updateProjectionMatrix()}t.setRenderTarget(j.map),t.clear();const se=j.getViewportCount();for(let he=0;he<se;he++){const me=j.getViewport(he);o.set(s.x*me.x,s.y*me.y,s.x*me.z,s.y*me.w),B.viewport(o),j.updateMatrices($,he),i=j.getFrustum(),x(C,R,j.camera,$,this.type)}j.isPointLightShadow!==!0&&this.type===Ti&&v(j,R),j.needsUpdate=!1}d=this.type,m.needsUpdate=!1,t.setRenderTarget(I,b,L)};function v(S,C){const R=e.update(_);h.defines.VSM_SAMPLES!==S.blurSamples&&(h.defines.VSM_SAMPLES=S.blurSamples,p.defines.VSM_SAMPLES=S.blurSamples,h.needsUpdate=!0,p.needsUpdate=!0),S.mapPass===null&&(S.mapPass=new ur(r.x,r.y)),h.uniforms.shadow_pass.value=S.map.texture,h.uniforms.resolution.value=S.mapSize,h.uniforms.radius.value=S.radius,t.setRenderTarget(S.mapPass),t.clear(),t.renderBufferDirect(C,null,R,h,_,null),p.uniforms.shadow_pass.value=S.mapPass.texture,p.uniforms.resolution.value=S.mapSize,p.uniforms.radius.value=S.radius,t.setRenderTarget(S.map),t.clear(),t.renderBufferDirect(C,null,R,p,_,null)}function y(S,C,R,I){let b=null;const L=R.isPointLight===!0?S.customDistanceMaterial:S.customDepthMaterial;if(L!==void 0)b=L;else if(b=R.isPointLight===!0?l:a,t.localClippingEnabled&&C.clipShadows===!0&&Array.isArray(C.clippingPlanes)&&C.clippingPlanes.length!==0||C.displacementMap&&C.displacementScale!==0||C.alphaMap&&C.alphaTest>0||C.map&&C.alphaTest>0){const B=b.uuid,U=C.uuid;let k=c[B];k===void 0&&(k={},c[B]=k);let D=k[U];D===void 0&&(D=b.clone(),k[U]=D),b=D}if(b.visible=C.visible,b.wireframe=C.wireframe,I===Ti?b.side=C.shadowSide!==null?C.shadowSide:C.side:b.side=C.shadowSide!==null?C.shadowSide:f[C.side],b.alphaMap=C.alphaMap,b.alphaTest=C.alphaTest,b.map=C.map,b.clipShadows=C.clipShadows,b.clippingPlanes=C.clippingPlanes,b.clipIntersection=C.clipIntersection,b.displacementMap=C.displacementMap,b.displacementScale=C.displacementScale,b.displacementBias=C.displacementBias,b.wireframeLinewidth=C.wireframeLinewidth,b.linewidth=C.linewidth,R.isPointLight===!0&&b.isMeshDistanceMaterial===!0){const B=t.properties.get(b);B.light=R}return b}function x(S,C,R,I,b){if(S.visible===!1)return;if(S.layers.test(C.layers)&&(S.isMesh||S.isLine||S.isPoints)&&(S.castShadow||S.receiveShadow&&b===Ti)&&(!S.frustumCulled||i.intersectsObject(S))){S.modelViewMatrix.multiplyMatrices(R.matrixWorldInverse,S.matrixWorld);const U=e.update(S),k=S.material;if(Array.isArray(k)){const D=U.groups;for(let G=0,$=D.length;G<$;G++){const j=D[G],oe=k[j.materialIndex];if(oe&&oe.visible){const se=y(S,oe,I,b);S.onBeforeShadow(t,S,C,R,U,se,j),t.renderBufferDirect(R,null,U,se,S,j),S.onAfterShadow(t,S,C,R,U,se,j)}}}else if(k.visible){const D=y(S,k,I,b);S.onBeforeShadow(t,S,C,R,U,D,null),t.renderBufferDirect(R,null,U,D,S,null),S.onAfterShadow(t,S,C,R,U,D,null)}}const B=S.children;for(let U=0,k=B.length;U<k;U++)x(B[U],C,R,I,b)}}function A2(t,e,n){const i=n.isWebGL2;function r(){let H=!1;const Re=new qt;let ve=null;const le=new qt(0,0,0,0);return{setMask:function(xe){ve!==xe&&!H&&(t.colorMask(xe,xe,xe,xe),ve=xe)},setLocked:function(xe){H=xe},setClear:function(xe,Be,nt,Ht,rn){rn===!0&&(xe*=Ht,Be*=Ht,nt*=Ht),Re.set(xe,Be,nt,Ht),le.equals(Re)===!1&&(t.clearColor(xe,Be,nt,Ht),le.copy(Re))},reset:function(){H=!1,ve=null,le.set(-1,0,0,0)}}}function s(){let H=!1,Re=null,ve=null,le=null;return{setTest:function(xe){xe?ne(t.DEPTH_TEST):de(t.DEPTH_TEST)},setMask:function(xe){Re!==xe&&!H&&(t.depthMask(xe),Re=xe)},setFunc:function(xe){if(ve!==xe){switch(xe){case KL:t.depthFunc(t.NEVER);break;case ZL:t.depthFunc(t.ALWAYS);break;case JL:t.depthFunc(t.LESS);break;case El:t.depthFunc(t.LEQUAL);break;case QL:t.depthFunc(t.EQUAL);break;case eP:t.depthFunc(t.GEQUAL);break;case tP:t.depthFunc(t.GREATER);break;case nP:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}ve=xe}},setLocked:function(xe){H=xe},setClear:function(xe){le!==xe&&(t.clearDepth(xe),le=xe)},reset:function(){H=!1,Re=null,ve=null,le=null}}}function o(){let H=!1,Re=null,ve=null,le=null,xe=null,Be=null,nt=null,Ht=null,rn=null;return{setTest:function(pt){H||(pt?ne(t.STENCIL_TEST):de(t.STENCIL_TEST))},setMask:function(pt){Re!==pt&&!H&&(t.stencilMask(pt),Re=pt)},setFunc:function(pt,sn,ni){(ve!==pt||le!==sn||xe!==ni)&&(t.stencilFunc(pt,sn,ni),ve=pt,le=sn,xe=ni)},setOp:function(pt,sn,ni){(Be!==pt||nt!==sn||Ht!==ni)&&(t.stencilOp(pt,sn,ni),Be=pt,nt=sn,Ht=ni)},setLocked:function(pt){H=pt},setClear:function(pt){rn!==pt&&(t.clearStencil(pt),rn=pt)},reset:function(){H=!1,Re=null,ve=null,le=null,xe=null,Be=null,nt=null,Ht=null,rn=null}}}const a=new r,l=new s,c=new o,u=new WeakMap,f=new WeakMap;let h={},p={},g=new WeakMap,_=[],m=null,d=!1,v=null,y=null,x=null,S=null,C=null,R=null,I=null,b=new ct(0,0,0),L=0,B=!1,U=null,k=null,D=null,G=null,$=null;const j=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let oe=!1,se=0;const he=t.getParameter(t.VERSION);he.indexOf("WebGL")!==-1?(se=parseFloat(/^WebGL (\d)/.exec(he)[1]),oe=se>=1):he.indexOf("OpenGL ES")!==-1&&(se=parseFloat(/^OpenGL ES (\d)/.exec(he)[1]),oe=se>=2);let me=null,ye={};const te=t.getParameter(t.SCISSOR_BOX),fe=t.getParameter(t.VIEWPORT),be=new qt().fromArray(te),Te=new qt().fromArray(fe);function V(H,Re,ve,le){const xe=new Uint8Array(4),Be=t.createTexture();t.bindTexture(H,Be),t.texParameteri(H,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(H,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let nt=0;nt<ve;nt++)i&&(H===t.TEXTURE_3D||H===t.TEXTURE_2D_ARRAY)?t.texImage3D(Re,0,t.RGBA,1,1,le,0,t.RGBA,t.UNSIGNED_BYTE,xe):t.texImage2D(Re+nt,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,xe);return Be}const ue={};ue[t.TEXTURE_2D]=V(t.TEXTURE_2D,t.TEXTURE_2D,1),ue[t.TEXTURE_CUBE_MAP]=V(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),i&&(ue[t.TEXTURE_2D_ARRAY]=V(t.TEXTURE_2D_ARRAY,t.TEXTURE_2D_ARRAY,1,1),ue[t.TEXTURE_3D]=V(t.TEXTURE_3D,t.TEXTURE_3D,1,1)),a.setClear(0,0,0,1),l.setClear(1),c.setClear(0),ne(t.DEPTH_TEST),l.setFunc(El),q(!1),Z(Vp),ne(t.CULL_FACE),O(Ci);function ne(H){h[H]!==!0&&(t.enable(H),h[H]=!0)}function de(H){h[H]!==!1&&(t.disable(H),h[H]=!1)}function Me(H,Re){return p[H]!==Re?(t.bindFramebuffer(H,Re),p[H]=Re,i&&(H===t.DRAW_FRAMEBUFFER&&(p[t.FRAMEBUFFER]=Re),H===t.FRAMEBUFFER&&(p[t.DRAW_FRAMEBUFFER]=Re)),!0):!1}function T(H,Re){let ve=_,le=!1;if(H)if(ve=g.get(Re),ve===void 0&&(ve=[],g.set(Re,ve)),H.isWebGLMultipleRenderTargets){const xe=H.texture;if(ve.length!==xe.length||ve[0]!==t.COLOR_ATTACHMENT0){for(let Be=0,nt=xe.length;Be<nt;Be++)ve[Be]=t.COLOR_ATTACHMENT0+Be;ve.length=xe.length,le=!0}}else ve[0]!==t.COLOR_ATTACHMENT0&&(ve[0]=t.COLOR_ATTACHMENT0,le=!0);else ve[0]!==t.BACK&&(ve[0]=t.BACK,le=!0);le&&(n.isWebGL2?t.drawBuffers(ve):e.get("WEBGL_draw_buffers").drawBuffersWEBGL(ve))}function E(H){return m!==H?(t.useProgram(H),m=H,!0):!1}const w={[Cr]:t.FUNC_ADD,[UL]:t.FUNC_SUBTRACT,[OL]:t.FUNC_REVERSE_SUBTRACT};if(i)w[Xp]=t.MIN,w[jp]=t.MAX;else{const H=e.get("EXT_blend_minmax");H!==null&&(w[Xp]=H.MIN_EXT,w[jp]=H.MAX_EXT)}const N={[FL]:t.ZERO,[kL]:t.ONE,[BL]:t.SRC_COLOR,[ff]:t.SRC_ALPHA,[$L]:t.SRC_ALPHA_SATURATE,[GL]:t.DST_COLOR,[zL]:t.DST_ALPHA,[HL]:t.ONE_MINUS_SRC_COLOR,[df]:t.ONE_MINUS_SRC_ALPHA,[WL]:t.ONE_MINUS_DST_COLOR,[VL]:t.ONE_MINUS_DST_ALPHA,[XL]:t.CONSTANT_COLOR,[jL]:t.ONE_MINUS_CONSTANT_COLOR,[qL]:t.CONSTANT_ALPHA,[YL]:t.ONE_MINUS_CONSTANT_ALPHA};function O(H,Re,ve,le,xe,Be,nt,Ht,rn,pt){if(H===Ci){d===!0&&(de(t.BLEND),d=!1);return}if(d===!1&&(ne(t.BLEND),d=!0),H!==NL){if(H!==v||pt!==B){if((y!==Cr||C!==Cr)&&(t.blendEquation(t.FUNC_ADD),y=Cr,C=Cr),pt)switch(H){case Ts:t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case Gp:t.blendFunc(t.ONE,t.ONE);break;case Wp:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case $p:t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",H);break}else switch(H){case Ts:t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case Gp:t.blendFunc(t.SRC_ALPHA,t.ONE);break;case Wp:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case $p:t.blendFunc(t.ZERO,t.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",H);break}x=null,S=null,R=null,I=null,b.set(0,0,0),L=0,v=H,B=pt}return}xe=xe||Re,Be=Be||ve,nt=nt||le,(Re!==y||xe!==C)&&(t.blendEquationSeparate(w[Re],w[xe]),y=Re,C=xe),(ve!==x||le!==S||Be!==R||nt!==I)&&(t.blendFuncSeparate(N[ve],N[le],N[Be],N[nt]),x=ve,S=le,R=Be,I=nt),(Ht.equals(b)===!1||rn!==L)&&(t.blendColor(Ht.r,Ht.g,Ht.b,rn),b.copy(Ht),L=rn),v=H,B=!1}function W(H,Re){H.side===Ai?de(t.CULL_FACE):ne(t.CULL_FACE);let ve=H.side===vn;Re&&(ve=!ve),q(ve),H.blending===Ts&&H.transparent===!1?O(Ci):O(H.blending,H.blendEquation,H.blendSrc,H.blendDst,H.blendEquationAlpha,H.blendSrcAlpha,H.blendDstAlpha,H.blendColor,H.blendAlpha,H.premultipliedAlpha),l.setFunc(H.depthFunc),l.setTest(H.depthTest),l.setMask(H.depthWrite),a.setMask(H.colorWrite);const le=H.stencilWrite;c.setTest(le),le&&(c.setMask(H.stencilWriteMask),c.setFunc(H.stencilFunc,H.stencilRef,H.stencilFuncMask),c.setOp(H.stencilFail,H.stencilZFail,H.stencilZPass)),ee(H.polygonOffset,H.polygonOffsetFactor,H.polygonOffsetUnits),H.alphaToCoverage===!0?ne(t.SAMPLE_ALPHA_TO_COVERAGE):de(t.SAMPLE_ALPHA_TO_COVERAGE)}function q(H){U!==H&&(H?t.frontFace(t.CW):t.frontFace(t.CCW),U=H)}function Z(H){H!==PL?(ne(t.CULL_FACE),H!==k&&(H===Vp?t.cullFace(t.BACK):H===IL?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):de(t.CULL_FACE),k=H}function ce(H){H!==D&&(oe&&t.lineWidth(H),D=H)}function ee(H,Re,ve){H?(ne(t.POLYGON_OFFSET_FILL),(G!==Re||$!==ve)&&(t.polygonOffset(Re,ve),G=Re,$=ve)):de(t.POLYGON_OFFSET_FILL)}function z(H){H?ne(t.SCISSOR_TEST):de(t.SCISSOR_TEST)}function M(H){H===void 0&&(H=t.TEXTURE0+j-1),me!==H&&(t.activeTexture(H),me=H)}function A(H,Re,ve){ve===void 0&&(me===null?ve=t.TEXTURE0+j-1:ve=me);let le=ye[ve];le===void 0&&(le={type:void 0,texture:void 0},ye[ve]=le),(le.type!==H||le.texture!==Re)&&(me!==ve&&(t.activeTexture(ve),me=ve),t.bindTexture(H,Re||ue[H]),le.type=H,le.texture=Re)}function F(){const H=ye[me];H!==void 0&&H.type!==void 0&&(t.bindTexture(H.type,null),H.type=void 0,H.texture=void 0)}function ie(){try{t.compressedTexImage2D.apply(t,arguments)}catch(H){console.error("THREE.WebGLState:",H)}}function re(){try{t.compressedTexImage3D.apply(t,arguments)}catch(H){console.error("THREE.WebGLState:",H)}}function ae(){try{t.texSubImage2D.apply(t,arguments)}catch(H){console.error("THREE.WebGLState:",H)}}function Se(){try{t.texSubImage3D.apply(t,arguments)}catch(H){console.error("THREE.WebGLState:",H)}}function ge(){try{t.compressedTexSubImage2D.apply(t,arguments)}catch(H){console.error("THREE.WebGLState:",H)}}function we(){try{t.compressedTexSubImage3D.apply(t,arguments)}catch(H){console.error("THREE.WebGLState:",H)}}function Oe(){try{t.texStorage2D.apply(t,arguments)}catch(H){console.error("THREE.WebGLState:",H)}}function Je(){try{t.texStorage3D.apply(t,arguments)}catch(H){console.error("THREE.WebGLState:",H)}}function _e(){try{t.texImage2D.apply(t,arguments)}catch(H){console.error("THREE.WebGLState:",H)}}function We(){try{t.texImage3D.apply(t,arguments)}catch(H){console.error("THREE.WebGLState:",H)}}function Ie(H){be.equals(H)===!1&&(t.scissor(H.x,H.y,H.z,H.w),be.copy(H))}function Fe(H){Te.equals(H)===!1&&(t.viewport(H.x,H.y,H.z,H.w),Te.copy(H))}function Ne(H,Re){let ve=f.get(Re);ve===void 0&&(ve=new WeakMap,f.set(Re,ve));let le=ve.get(H);le===void 0&&(le=t.getUniformBlockIndex(Re,H.name),ve.set(H,le))}function Le(H,Re){const le=f.get(Re).get(H);u.get(Re)!==le&&(t.uniformBlockBinding(Re,le,H.__bindingPointIndex),u.set(Re,le))}function Qe(){t.disable(t.BLEND),t.disable(t.CULL_FACE),t.disable(t.DEPTH_TEST),t.disable(t.POLYGON_OFFSET_FILL),t.disable(t.SCISSOR_TEST),t.disable(t.STENCIL_TEST),t.disable(t.SAMPLE_ALPHA_TO_COVERAGE),t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ZERO),t.blendFuncSeparate(t.ONE,t.ZERO,t.ONE,t.ZERO),t.blendColor(0,0,0,0),t.colorMask(!0,!0,!0,!0),t.clearColor(0,0,0,0),t.depthMask(!0),t.depthFunc(t.LESS),t.clearDepth(1),t.stencilMask(4294967295),t.stencilFunc(t.ALWAYS,0,4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP),t.clearStencil(0),t.cullFace(t.BACK),t.frontFace(t.CCW),t.polygonOffset(0,0),t.activeTexture(t.TEXTURE0),t.bindFramebuffer(t.FRAMEBUFFER,null),i===!0&&(t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),t.bindFramebuffer(t.READ_FRAMEBUFFER,null)),t.useProgram(null),t.lineWidth(1),t.scissor(0,0,t.canvas.width,t.canvas.height),t.viewport(0,0,t.canvas.width,t.canvas.height),h={},me=null,ye={},p={},g=new WeakMap,_=[],m=null,d=!1,v=null,y=null,x=null,S=null,C=null,R=null,I=null,b=new ct(0,0,0),L=0,B=!1,U=null,k=null,D=null,G=null,$=null,be.set(0,0,t.canvas.width,t.canvas.height),Te.set(0,0,t.canvas.width,t.canvas.height),a.reset(),l.reset(),c.reset()}return{buffers:{color:a,depth:l,stencil:c},enable:ne,disable:de,bindFramebuffer:Me,drawBuffers:T,useProgram:E,setBlending:O,setMaterial:W,setFlipSided:q,setCullFace:Z,setLineWidth:ce,setPolygonOffset:ee,setScissorTest:z,activeTexture:M,bindTexture:A,unbindTexture:F,compressedTexImage2D:ie,compressedTexImage3D:re,texImage2D:_e,texImage3D:We,updateUBOMapping:Ne,uniformBlockBinding:Le,texStorage2D:Oe,texStorage3D:Je,texSubImage2D:ae,texSubImage3D:Se,compressedTexSubImage2D:ge,compressedTexSubImage3D:we,scissor:Ie,viewport:Fe,reset:Qe}}function R2(t,e,n,i,r,s,o){const a=r.isWebGL2,l=r.maxTextures,c=r.maxCubemapSize,u=r.maxTextureSize,f=r.maxSamples,h=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,p=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),g=new WeakMap;let _;const m=new WeakMap;let d=!1;try{d=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function v(M,A){return d?new OffscreenCanvas(M,A):Xo("canvas")}function y(M,A,F,ie){let re=1;if((M.width>ie||M.height>ie)&&(re=ie/Math.max(M.width,M.height)),re<1||A===!0)if(typeof HTMLImageElement<"u"&&M instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&M instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&M instanceof ImageBitmap){const ae=A?yf:Math.floor,Se=ae(re*M.width),ge=ae(re*M.height);_===void 0&&(_=v(Se,ge));const we=F?v(Se,ge):_;return we.width=Se,we.height=ge,we.getContext("2d").drawImage(M,0,0,Se,ge),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+M.width+"x"+M.height+") to ("+Se+"x"+ge+")."),we}else return"data"in M&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+M.width+"x"+M.height+")."),M;return M}function x(M){return bm(M.width)&&bm(M.height)}function S(M){return a?!1:M.wrapS!==Kn||M.wrapT!==Kn||M.minFilter!==un&&M.minFilter!==In}function C(M,A){return M.generateMipmaps&&A&&M.minFilter!==un&&M.minFilter!==In}function R(M){t.generateMipmap(M)}function I(M,A,F,ie,re=!1){if(a===!1)return A;if(M!==null){if(t[M]!==void 0)return t[M];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+M+"'")}let ae=A;if(A===t.RED&&(F===t.FLOAT&&(ae=t.R32F),F===t.HALF_FLOAT&&(ae=t.R16F),F===t.UNSIGNED_BYTE&&(ae=t.R8)),A===t.RED_INTEGER&&(F===t.UNSIGNED_BYTE&&(ae=t.R8UI),F===t.UNSIGNED_SHORT&&(ae=t.R16UI),F===t.UNSIGNED_INT&&(ae=t.R32UI),F===t.BYTE&&(ae=t.R8I),F===t.SHORT&&(ae=t.R16I),F===t.INT&&(ae=t.R32I)),A===t.RG&&(F===t.FLOAT&&(ae=t.RG32F),F===t.HALF_FLOAT&&(ae=t.RG16F),F===t.UNSIGNED_BYTE&&(ae=t.RG8)),A===t.RGBA){const Se=re?bl:dt.getTransfer(ie);F===t.FLOAT&&(ae=t.RGBA32F),F===t.HALF_FLOAT&&(ae=t.RGBA16F),F===t.UNSIGNED_BYTE&&(ae=Se===_t?t.SRGB8_ALPHA8:t.RGBA8),F===t.UNSIGNED_SHORT_4_4_4_4&&(ae=t.RGBA4),F===t.UNSIGNED_SHORT_5_5_5_1&&(ae=t.RGB5_A1)}return(ae===t.R16F||ae===t.R32F||ae===t.RG16F||ae===t.RG32F||ae===t.RGBA16F||ae===t.RGBA32F)&&e.get("EXT_color_buffer_float"),ae}function b(M,A,F){return C(M,F)===!0||M.isFramebufferTexture&&M.minFilter!==un&&M.minFilter!==In?Math.log2(Math.max(A.width,A.height))+1:M.mipmaps!==void 0&&M.mipmaps.length>0?M.mipmaps.length:M.isCompressedTexture&&Array.isArray(M.image)?A.mipmaps.length:1}function L(M){return M===un||M===qp||M===Fc?t.NEAREST:t.LINEAR}function B(M){const A=M.target;A.removeEventListener("dispose",B),k(A),A.isVideoTexture&&g.delete(A)}function U(M){const A=M.target;A.removeEventListener("dispose",U),G(A)}function k(M){const A=i.get(M);if(A.__webglInit===void 0)return;const F=M.source,ie=m.get(F);if(ie){const re=ie[A.__cacheKey];re.usedTimes--,re.usedTimes===0&&D(M),Object.keys(ie).length===0&&m.delete(F)}i.remove(M)}function D(M){const A=i.get(M);t.deleteTexture(A.__webglTexture);const F=M.source,ie=m.get(F);delete ie[A.__cacheKey],o.memory.textures--}function G(M){const A=M.texture,F=i.get(M),ie=i.get(A);if(ie.__webglTexture!==void 0&&(t.deleteTexture(ie.__webglTexture),o.memory.textures--),M.depthTexture&&M.depthTexture.dispose(),M.isWebGLCubeRenderTarget)for(let re=0;re<6;re++){if(Array.isArray(F.__webglFramebuffer[re]))for(let ae=0;ae<F.__webglFramebuffer[re].length;ae++)t.deleteFramebuffer(F.__webglFramebuffer[re][ae]);else t.deleteFramebuffer(F.__webglFramebuffer[re]);F.__webglDepthbuffer&&t.deleteRenderbuffer(F.__webglDepthbuffer[re])}else{if(Array.isArray(F.__webglFramebuffer))for(let re=0;re<F.__webglFramebuffer.length;re++)t.deleteFramebuffer(F.__webglFramebuffer[re]);else t.deleteFramebuffer(F.__webglFramebuffer);if(F.__webglDepthbuffer&&t.deleteRenderbuffer(F.__webglDepthbuffer),F.__webglMultisampledFramebuffer&&t.deleteFramebuffer(F.__webglMultisampledFramebuffer),F.__webglColorRenderbuffer)for(let re=0;re<F.__webglColorRenderbuffer.length;re++)F.__webglColorRenderbuffer[re]&&t.deleteRenderbuffer(F.__webglColorRenderbuffer[re]);F.__webglDepthRenderbuffer&&t.deleteRenderbuffer(F.__webglDepthRenderbuffer)}if(M.isWebGLMultipleRenderTargets)for(let re=0,ae=A.length;re<ae;re++){const Se=i.get(A[re]);Se.__webglTexture&&(t.deleteTexture(Se.__webglTexture),o.memory.textures--),i.remove(A[re])}i.remove(A),i.remove(M)}let $=0;function j(){$=0}function oe(){const M=$;return M>=l&&console.warn("THREE.WebGLTextures: Trying to use "+M+" texture units while this GPU supports only "+l),$+=1,M}function se(M){const A=[];return A.push(M.wrapS),A.push(M.wrapT),A.push(M.wrapR||0),A.push(M.magFilter),A.push(M.minFilter),A.push(M.anisotropy),A.push(M.internalFormat),A.push(M.format),A.push(M.type),A.push(M.generateMipmaps),A.push(M.premultiplyAlpha),A.push(M.flipY),A.push(M.unpackAlignment),A.push(M.colorSpace),A.join()}function he(M,A){const F=i.get(M);if(M.isVideoTexture&&ee(M),M.isRenderTargetTexture===!1&&M.version>0&&F.__version!==M.version){const ie=M.image;if(ie===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(ie.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ne(F,M,A);return}}n.bindTexture(t.TEXTURE_2D,F.__webglTexture,t.TEXTURE0+A)}function me(M,A){const F=i.get(M);if(M.version>0&&F.__version!==M.version){ne(F,M,A);return}n.bindTexture(t.TEXTURE_2D_ARRAY,F.__webglTexture,t.TEXTURE0+A)}function ye(M,A){const F=i.get(M);if(M.version>0&&F.__version!==M.version){ne(F,M,A);return}n.bindTexture(t.TEXTURE_3D,F.__webglTexture,t.TEXTURE0+A)}function te(M,A){const F=i.get(M);if(M.version>0&&F.__version!==M.version){de(F,M,A);return}n.bindTexture(t.TEXTURE_CUBE_MAP,F.__webglTexture,t.TEXTURE0+A)}const fe={[mf]:t.REPEAT,[Kn]:t.CLAMP_TO_EDGE,[gf]:t.MIRRORED_REPEAT},be={[un]:t.NEAREST,[qp]:t.NEAREST_MIPMAP_NEAREST,[Fc]:t.NEAREST_MIPMAP_LINEAR,[In]:t.LINEAR,[uP]:t.LINEAR_MIPMAP_NEAREST,[$o]:t.LINEAR_MIPMAP_LINEAR},Te={[bP]:t.NEVER,[CP]:t.ALWAYS,[MP]:t.LESS,[$0]:t.LEQUAL,[TP]:t.EQUAL,[RP]:t.GEQUAL,[wP]:t.GREATER,[AP]:t.NOTEQUAL};function V(M,A,F){if(F?(t.texParameteri(M,t.TEXTURE_WRAP_S,fe[A.wrapS]),t.texParameteri(M,t.TEXTURE_WRAP_T,fe[A.wrapT]),(M===t.TEXTURE_3D||M===t.TEXTURE_2D_ARRAY)&&t.texParameteri(M,t.TEXTURE_WRAP_R,fe[A.wrapR]),t.texParameteri(M,t.TEXTURE_MAG_FILTER,be[A.magFilter]),t.texParameteri(M,t.TEXTURE_MIN_FILTER,be[A.minFilter])):(t.texParameteri(M,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(M,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),(M===t.TEXTURE_3D||M===t.TEXTURE_2D_ARRAY)&&t.texParameteri(M,t.TEXTURE_WRAP_R,t.CLAMP_TO_EDGE),(A.wrapS!==Kn||A.wrapT!==Kn)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(M,t.TEXTURE_MAG_FILTER,L(A.magFilter)),t.texParameteri(M,t.TEXTURE_MIN_FILTER,L(A.minFilter)),A.minFilter!==un&&A.minFilter!==In&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),A.compareFunction&&(t.texParameteri(M,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(M,t.TEXTURE_COMPARE_FUNC,Te[A.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const ie=e.get("EXT_texture_filter_anisotropic");if(A.magFilter===un||A.minFilter!==Fc&&A.minFilter!==$o||A.type===Ji&&e.has("OES_texture_float_linear")===!1||a===!1&&A.type===Hs&&e.has("OES_texture_half_float_linear")===!1)return;(A.anisotropy>1||i.get(A).__currentAnisotropy)&&(t.texParameterf(M,ie.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(A.anisotropy,r.getMaxAnisotropy())),i.get(A).__currentAnisotropy=A.anisotropy)}}function ue(M,A){let F=!1;M.__webglInit===void 0&&(M.__webglInit=!0,A.addEventListener("dispose",B));const ie=A.source;let re=m.get(ie);re===void 0&&(re={},m.set(ie,re));const ae=se(A);if(ae!==M.__cacheKey){re[ae]===void 0&&(re[ae]={texture:t.createTexture(),usedTimes:0},o.memory.textures++,F=!0),re[ae].usedTimes++;const Se=re[M.__cacheKey];Se!==void 0&&(re[M.__cacheKey].usedTimes--,Se.usedTimes===0&&D(A)),M.__cacheKey=ae,M.__webglTexture=re[ae].texture}return F}function ne(M,A,F){let ie=t.TEXTURE_2D;(A.isDataArrayTexture||A.isCompressedArrayTexture)&&(ie=t.TEXTURE_2D_ARRAY),A.isData3DTexture&&(ie=t.TEXTURE_3D);const re=ue(M,A),ae=A.source;n.bindTexture(ie,M.__webglTexture,t.TEXTURE0+F);const Se=i.get(ae);if(ae.version!==Se.__version||re===!0){n.activeTexture(t.TEXTURE0+F);const ge=dt.getPrimaries(dt.workingColorSpace),we=A.colorSpace===Dn?null:dt.getPrimaries(A.colorSpace),Oe=A.colorSpace===Dn||ge===we?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,A.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,A.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,A.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,Oe);const Je=S(A)&&x(A.image)===!1;let _e=y(A.image,Je,!1,u);_e=z(A,_e);const We=x(_e)||a,Ie=s.convert(A.format,A.colorSpace);let Fe=s.convert(A.type),Ne=I(A.internalFormat,Ie,Fe,A.colorSpace,A.isVideoTexture);V(ie,A,We);let Le;const Qe=A.mipmaps,H=a&&A.isVideoTexture!==!0&&Ne!==G0,Re=Se.__version===void 0||re===!0,ve=b(A,_e,We);if(A.isDepthTexture)Ne=t.DEPTH_COMPONENT,a?A.type===Ji?Ne=t.DEPTH_COMPONENT32F:A.type===Zi?Ne=t.DEPTH_COMPONENT24:A.type===Ur?Ne=t.DEPTH24_STENCIL8:Ne=t.DEPTH_COMPONENT16:A.type===Ji&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),A.format===Or&&Ne===t.DEPTH_COMPONENT&&A.type!==dd&&A.type!==Zi&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),A.type=Zi,Fe=s.convert(A.type)),A.format===zs&&Ne===t.DEPTH_COMPONENT&&(Ne=t.DEPTH_STENCIL,A.type!==Ur&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),A.type=Ur,Fe=s.convert(A.type))),Re&&(H?n.texStorage2D(t.TEXTURE_2D,1,Ne,_e.width,_e.height):n.texImage2D(t.TEXTURE_2D,0,Ne,_e.width,_e.height,0,Ie,Fe,null));else if(A.isDataTexture)if(Qe.length>0&&We){H&&Re&&n.texStorage2D(t.TEXTURE_2D,ve,Ne,Qe[0].width,Qe[0].height);for(let le=0,xe=Qe.length;le<xe;le++)Le=Qe[le],H?n.texSubImage2D(t.TEXTURE_2D,le,0,0,Le.width,Le.height,Ie,Fe,Le.data):n.texImage2D(t.TEXTURE_2D,le,Ne,Le.width,Le.height,0,Ie,Fe,Le.data);A.generateMipmaps=!1}else H?(Re&&n.texStorage2D(t.TEXTURE_2D,ve,Ne,_e.width,_e.height),n.texSubImage2D(t.TEXTURE_2D,0,0,0,_e.width,_e.height,Ie,Fe,_e.data)):n.texImage2D(t.TEXTURE_2D,0,Ne,_e.width,_e.height,0,Ie,Fe,_e.data);else if(A.isCompressedTexture)if(A.isCompressedArrayTexture){H&&Re&&n.texStorage3D(t.TEXTURE_2D_ARRAY,ve,Ne,Qe[0].width,Qe[0].height,_e.depth);for(let le=0,xe=Qe.length;le<xe;le++)Le=Qe[le],A.format!==Zn?Ie!==null?H?n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,le,0,0,0,Le.width,Le.height,_e.depth,Ie,Le.data,0,0):n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,le,Ne,Le.width,Le.height,_e.depth,0,Le.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):H?n.texSubImage3D(t.TEXTURE_2D_ARRAY,le,0,0,0,Le.width,Le.height,_e.depth,Ie,Fe,Le.data):n.texImage3D(t.TEXTURE_2D_ARRAY,le,Ne,Le.width,Le.height,_e.depth,0,Ie,Fe,Le.data)}else{H&&Re&&n.texStorage2D(t.TEXTURE_2D,ve,Ne,Qe[0].width,Qe[0].height);for(let le=0,xe=Qe.length;le<xe;le++)Le=Qe[le],A.format!==Zn?Ie!==null?H?n.compressedTexSubImage2D(t.TEXTURE_2D,le,0,0,Le.width,Le.height,Ie,Le.data):n.compressedTexImage2D(t.TEXTURE_2D,le,Ne,Le.width,Le.height,0,Le.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):H?n.texSubImage2D(t.TEXTURE_2D,le,0,0,Le.width,Le.height,Ie,Fe,Le.data):n.texImage2D(t.TEXTURE_2D,le,Ne,Le.width,Le.height,0,Ie,Fe,Le.data)}else if(A.isDataArrayTexture)H?(Re&&n.texStorage3D(t.TEXTURE_2D_ARRAY,ve,Ne,_e.width,_e.height,_e.depth),n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,_e.width,_e.height,_e.depth,Ie,Fe,_e.data)):n.texImage3D(t.TEXTURE_2D_ARRAY,0,Ne,_e.width,_e.height,_e.depth,0,Ie,Fe,_e.data);else if(A.isData3DTexture)H?(Re&&n.texStorage3D(t.TEXTURE_3D,ve,Ne,_e.width,_e.height,_e.depth),n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,_e.width,_e.height,_e.depth,Ie,Fe,_e.data)):n.texImage3D(t.TEXTURE_3D,0,Ne,_e.width,_e.height,_e.depth,0,Ie,Fe,_e.data);else if(A.isFramebufferTexture){if(Re)if(H)n.texStorage2D(t.TEXTURE_2D,ve,Ne,_e.width,_e.height);else{let le=_e.width,xe=_e.height;for(let Be=0;Be<ve;Be++)n.texImage2D(t.TEXTURE_2D,Be,Ne,le,xe,0,Ie,Fe,null),le>>=1,xe>>=1}}else if(Qe.length>0&&We){H&&Re&&n.texStorage2D(t.TEXTURE_2D,ve,Ne,Qe[0].width,Qe[0].height);for(let le=0,xe=Qe.length;le<xe;le++)Le=Qe[le],H?n.texSubImage2D(t.TEXTURE_2D,le,0,0,Ie,Fe,Le):n.texImage2D(t.TEXTURE_2D,le,Ne,Ie,Fe,Le);A.generateMipmaps=!1}else H?(Re&&n.texStorage2D(t.TEXTURE_2D,ve,Ne,_e.width,_e.height),n.texSubImage2D(t.TEXTURE_2D,0,0,0,Ie,Fe,_e)):n.texImage2D(t.TEXTURE_2D,0,Ne,Ie,Fe,_e);C(A,We)&&R(ie),Se.__version=ae.version,A.onUpdate&&A.onUpdate(A)}M.__version=A.version}function de(M,A,F){if(A.image.length!==6)return;const ie=ue(M,A),re=A.source;n.bindTexture(t.TEXTURE_CUBE_MAP,M.__webglTexture,t.TEXTURE0+F);const ae=i.get(re);if(re.version!==ae.__version||ie===!0){n.activeTexture(t.TEXTURE0+F);const Se=dt.getPrimaries(dt.workingColorSpace),ge=A.colorSpace===Dn?null:dt.getPrimaries(A.colorSpace),we=A.colorSpace===Dn||Se===ge?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,A.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,A.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,A.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,we);const Oe=A.isCompressedTexture||A.image[0].isCompressedTexture,Je=A.image[0]&&A.image[0].isDataTexture,_e=[];for(let le=0;le<6;le++)!Oe&&!Je?_e[le]=y(A.image[le],!1,!0,c):_e[le]=Je?A.image[le].image:A.image[le],_e[le]=z(A,_e[le]);const We=_e[0],Ie=x(We)||a,Fe=s.convert(A.format,A.colorSpace),Ne=s.convert(A.type),Le=I(A.internalFormat,Fe,Ne,A.colorSpace),Qe=a&&A.isVideoTexture!==!0,H=ae.__version===void 0||ie===!0;let Re=b(A,We,Ie);V(t.TEXTURE_CUBE_MAP,A,Ie);let ve;if(Oe){Qe&&H&&n.texStorage2D(t.TEXTURE_CUBE_MAP,Re,Le,We.width,We.height);for(let le=0;le<6;le++){ve=_e[le].mipmaps;for(let xe=0;xe<ve.length;xe++){const Be=ve[xe];A.format!==Zn?Fe!==null?Qe?n.compressedTexSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+le,xe,0,0,Be.width,Be.height,Fe,Be.data):n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+le,xe,Le,Be.width,Be.height,0,Be.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):Qe?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+le,xe,0,0,Be.width,Be.height,Fe,Ne,Be.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+le,xe,Le,Be.width,Be.height,0,Fe,Ne,Be.data)}}}else{ve=A.mipmaps,Qe&&H&&(ve.length>0&&Re++,n.texStorage2D(t.TEXTURE_CUBE_MAP,Re,Le,_e[0].width,_e[0].height));for(let le=0;le<6;le++)if(Je){Qe?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+le,0,0,0,_e[le].width,_e[le].height,Fe,Ne,_e[le].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+le,0,Le,_e[le].width,_e[le].height,0,Fe,Ne,_e[le].data);for(let xe=0;xe<ve.length;xe++){const nt=ve[xe].image[le].image;Qe?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+le,xe+1,0,0,nt.width,nt.height,Fe,Ne,nt.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+le,xe+1,Le,nt.width,nt.height,0,Fe,Ne,nt.data)}}else{Qe?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+le,0,0,0,Fe,Ne,_e[le]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+le,0,Le,Fe,Ne,_e[le]);for(let xe=0;xe<ve.length;xe++){const Be=ve[xe];Qe?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+le,xe+1,0,0,Fe,Ne,Be.image[le]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+le,xe+1,Le,Fe,Ne,Be.image[le])}}}C(A,Ie)&&R(t.TEXTURE_CUBE_MAP),ae.__version=re.version,A.onUpdate&&A.onUpdate(A)}M.__version=A.version}function Me(M,A,F,ie,re,ae){const Se=s.convert(F.format,F.colorSpace),ge=s.convert(F.type),we=I(F.internalFormat,Se,ge,F.colorSpace);if(!i.get(A).__hasExternalTextures){const Je=Math.max(1,A.width>>ae),_e=Math.max(1,A.height>>ae);re===t.TEXTURE_3D||re===t.TEXTURE_2D_ARRAY?n.texImage3D(re,ae,we,Je,_e,A.depth,0,Se,ge,null):n.texImage2D(re,ae,we,Je,_e,0,Se,ge,null)}n.bindFramebuffer(t.FRAMEBUFFER,M),ce(A)?h.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,ie,re,i.get(F).__webglTexture,0,Z(A)):(re===t.TEXTURE_2D||re>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&re<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,ie,re,i.get(F).__webglTexture,ae),n.bindFramebuffer(t.FRAMEBUFFER,null)}function T(M,A,F){if(t.bindRenderbuffer(t.RENDERBUFFER,M),A.depthBuffer&&!A.stencilBuffer){let ie=a===!0?t.DEPTH_COMPONENT24:t.DEPTH_COMPONENT16;if(F||ce(A)){const re=A.depthTexture;re&&re.isDepthTexture&&(re.type===Ji?ie=t.DEPTH_COMPONENT32F:re.type===Zi&&(ie=t.DEPTH_COMPONENT24));const ae=Z(A);ce(A)?h.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,ae,ie,A.width,A.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,ae,ie,A.width,A.height)}else t.renderbufferStorage(t.RENDERBUFFER,ie,A.width,A.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,M)}else if(A.depthBuffer&&A.stencilBuffer){const ie=Z(A);F&&ce(A)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,ie,t.DEPTH24_STENCIL8,A.width,A.height):ce(A)?h.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,ie,t.DEPTH24_STENCIL8,A.width,A.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,A.width,A.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,M)}else{const ie=A.isWebGLMultipleRenderTargets===!0?A.texture:[A.texture];for(let re=0;re<ie.length;re++){const ae=ie[re],Se=s.convert(ae.format,ae.colorSpace),ge=s.convert(ae.type),we=I(ae.internalFormat,Se,ge,ae.colorSpace),Oe=Z(A);F&&ce(A)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,Oe,we,A.width,A.height):ce(A)?h.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,Oe,we,A.width,A.height):t.renderbufferStorage(t.RENDERBUFFER,we,A.width,A.height)}}t.bindRenderbuffer(t.RENDERBUFFER,null)}function E(M,A){if(A&&A.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(t.FRAMEBUFFER,M),!(A.depthTexture&&A.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!i.get(A.depthTexture).__webglTexture||A.depthTexture.image.width!==A.width||A.depthTexture.image.height!==A.height)&&(A.depthTexture.image.width=A.width,A.depthTexture.image.height=A.height,A.depthTexture.needsUpdate=!0),he(A.depthTexture,0);const ie=i.get(A.depthTexture).__webglTexture,re=Z(A);if(A.depthTexture.format===Or)ce(A)?h.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,ie,0,re):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,ie,0);else if(A.depthTexture.format===zs)ce(A)?h.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,ie,0,re):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,ie,0);else throw new Error("Unknown depthTexture format")}function w(M){const A=i.get(M),F=M.isWebGLCubeRenderTarget===!0;if(M.depthTexture&&!A.__autoAllocateDepthBuffer){if(F)throw new Error("target.depthTexture not supported in Cube render targets");E(A.__webglFramebuffer,M)}else if(F){A.__webglDepthbuffer=[];for(let ie=0;ie<6;ie++)n.bindFramebuffer(t.FRAMEBUFFER,A.__webglFramebuffer[ie]),A.__webglDepthbuffer[ie]=t.createRenderbuffer(),T(A.__webglDepthbuffer[ie],M,!1)}else n.bindFramebuffer(t.FRAMEBUFFER,A.__webglFramebuffer),A.__webglDepthbuffer=t.createRenderbuffer(),T(A.__webglDepthbuffer,M,!1);n.bindFramebuffer(t.FRAMEBUFFER,null)}function N(M,A,F){const ie=i.get(M);A!==void 0&&Me(ie.__webglFramebuffer,M,M.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,0),F!==void 0&&w(M)}function O(M){const A=M.texture,F=i.get(M),ie=i.get(A);M.addEventListener("dispose",U),M.isWebGLMultipleRenderTargets!==!0&&(ie.__webglTexture===void 0&&(ie.__webglTexture=t.createTexture()),ie.__version=A.version,o.memory.textures++);const re=M.isWebGLCubeRenderTarget===!0,ae=M.isWebGLMultipleRenderTargets===!0,Se=x(M)||a;if(re){F.__webglFramebuffer=[];for(let ge=0;ge<6;ge++)if(a&&A.mipmaps&&A.mipmaps.length>0){F.__webglFramebuffer[ge]=[];for(let we=0;we<A.mipmaps.length;we++)F.__webglFramebuffer[ge][we]=t.createFramebuffer()}else F.__webglFramebuffer[ge]=t.createFramebuffer()}else{if(a&&A.mipmaps&&A.mipmaps.length>0){F.__webglFramebuffer=[];for(let ge=0;ge<A.mipmaps.length;ge++)F.__webglFramebuffer[ge]=t.createFramebuffer()}else F.__webglFramebuffer=t.createFramebuffer();if(ae)if(r.drawBuffers){const ge=M.texture;for(let we=0,Oe=ge.length;we<Oe;we++){const Je=i.get(ge[we]);Je.__webglTexture===void 0&&(Je.__webglTexture=t.createTexture(),o.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");if(a&&M.samples>0&&ce(M)===!1){const ge=ae?A:[A];F.__webglMultisampledFramebuffer=t.createFramebuffer(),F.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,F.__webglMultisampledFramebuffer);for(let we=0;we<ge.length;we++){const Oe=ge[we];F.__webglColorRenderbuffer[we]=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,F.__webglColorRenderbuffer[we]);const Je=s.convert(Oe.format,Oe.colorSpace),_e=s.convert(Oe.type),We=I(Oe.internalFormat,Je,_e,Oe.colorSpace,M.isXRRenderTarget===!0),Ie=Z(M);t.renderbufferStorageMultisample(t.RENDERBUFFER,Ie,We,M.width,M.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+we,t.RENDERBUFFER,F.__webglColorRenderbuffer[we])}t.bindRenderbuffer(t.RENDERBUFFER,null),M.depthBuffer&&(F.__webglDepthRenderbuffer=t.createRenderbuffer(),T(F.__webglDepthRenderbuffer,M,!0)),n.bindFramebuffer(t.FRAMEBUFFER,null)}}if(re){n.bindTexture(t.TEXTURE_CUBE_MAP,ie.__webglTexture),V(t.TEXTURE_CUBE_MAP,A,Se);for(let ge=0;ge<6;ge++)if(a&&A.mipmaps&&A.mipmaps.length>0)for(let we=0;we<A.mipmaps.length;we++)Me(F.__webglFramebuffer[ge][we],M,A,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+ge,we);else Me(F.__webglFramebuffer[ge],M,A,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+ge,0);C(A,Se)&&R(t.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(ae){const ge=M.texture;for(let we=0,Oe=ge.length;we<Oe;we++){const Je=ge[we],_e=i.get(Je);n.bindTexture(t.TEXTURE_2D,_e.__webglTexture),V(t.TEXTURE_2D,Je,Se),Me(F.__webglFramebuffer,M,Je,t.COLOR_ATTACHMENT0+we,t.TEXTURE_2D,0),C(Je,Se)&&R(t.TEXTURE_2D)}n.unbindTexture()}else{let ge=t.TEXTURE_2D;if((M.isWebGL3DRenderTarget||M.isWebGLArrayRenderTarget)&&(a?ge=M.isWebGL3DRenderTarget?t.TEXTURE_3D:t.TEXTURE_2D_ARRAY:console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")),n.bindTexture(ge,ie.__webglTexture),V(ge,A,Se),a&&A.mipmaps&&A.mipmaps.length>0)for(let we=0;we<A.mipmaps.length;we++)Me(F.__webglFramebuffer[we],M,A,t.COLOR_ATTACHMENT0,ge,we);else Me(F.__webglFramebuffer,M,A,t.COLOR_ATTACHMENT0,ge,0);C(A,Se)&&R(ge),n.unbindTexture()}M.depthBuffer&&w(M)}function W(M){const A=x(M)||a,F=M.isWebGLMultipleRenderTargets===!0?M.texture:[M.texture];for(let ie=0,re=F.length;ie<re;ie++){const ae=F[ie];if(C(ae,A)){const Se=M.isWebGLCubeRenderTarget?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,ge=i.get(ae).__webglTexture;n.bindTexture(Se,ge),R(Se),n.unbindTexture()}}}function q(M){if(a&&M.samples>0&&ce(M)===!1){const A=M.isWebGLMultipleRenderTargets?M.texture:[M.texture],F=M.width,ie=M.height;let re=t.COLOR_BUFFER_BIT;const ae=[],Se=M.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,ge=i.get(M),we=M.isWebGLMultipleRenderTargets===!0;if(we)for(let Oe=0;Oe<A.length;Oe++)n.bindFramebuffer(t.FRAMEBUFFER,ge.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+Oe,t.RENDERBUFFER,null),n.bindFramebuffer(t.FRAMEBUFFER,ge.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+Oe,t.TEXTURE_2D,null,0);n.bindFramebuffer(t.READ_FRAMEBUFFER,ge.__webglMultisampledFramebuffer),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,ge.__webglFramebuffer);for(let Oe=0;Oe<A.length;Oe++){ae.push(t.COLOR_ATTACHMENT0+Oe),M.depthBuffer&&ae.push(Se);const Je=ge.__ignoreDepthValues!==void 0?ge.__ignoreDepthValues:!1;if(Je===!1&&(M.depthBuffer&&(re|=t.DEPTH_BUFFER_BIT),M.stencilBuffer&&(re|=t.STENCIL_BUFFER_BIT)),we&&t.framebufferRenderbuffer(t.READ_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,ge.__webglColorRenderbuffer[Oe]),Je===!0&&(t.invalidateFramebuffer(t.READ_FRAMEBUFFER,[Se]),t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,[Se])),we){const _e=i.get(A[Oe]).__webglTexture;t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,_e,0)}t.blitFramebuffer(0,0,F,ie,0,0,F,ie,re,t.NEAREST),p&&t.invalidateFramebuffer(t.READ_FRAMEBUFFER,ae)}if(n.bindFramebuffer(t.READ_FRAMEBUFFER,null),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),we)for(let Oe=0;Oe<A.length;Oe++){n.bindFramebuffer(t.FRAMEBUFFER,ge.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+Oe,t.RENDERBUFFER,ge.__webglColorRenderbuffer[Oe]);const Je=i.get(A[Oe]).__webglTexture;n.bindFramebuffer(t.FRAMEBUFFER,ge.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+Oe,t.TEXTURE_2D,Je,0)}n.bindFramebuffer(t.DRAW_FRAMEBUFFER,ge.__webglMultisampledFramebuffer)}}function Z(M){return Math.min(f,M.samples)}function ce(M){const A=i.get(M);return a&&M.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&A.__useRenderToTexture!==!1}function ee(M){const A=o.render.frame;g.get(M)!==A&&(g.set(M,A),M.update())}function z(M,A){const F=M.colorSpace,ie=M.format,re=M.type;return M.isCompressedTexture===!0||M.isVideoTexture===!0||M.format===_f||F!==Ni&&F!==Dn&&(dt.getTransfer(F)===_t?a===!1?e.has("EXT_sRGB")===!0&&ie===Zn?(M.format=_f,M.minFilter=In,M.generateMipmaps=!1):A=j0.sRGBToLinear(A):(ie!==Zn||re!==rr)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",F)),A}this.allocateTextureUnit=oe,this.resetTextureUnits=j,this.setTexture2D=he,this.setTexture2DArray=me,this.setTexture3D=ye,this.setTextureCube=te,this.rebindTextures=N,this.setupRenderTarget=O,this.updateRenderTargetMipmap=W,this.updateMultisampleRenderTarget=q,this.setupDepthRenderbuffer=w,this.setupFrameBufferTexture=Me,this.useMultisampledRTT=ce}function C2(t,e,n){const i=n.isWebGL2;function r(s,o=Dn){let a;const l=dt.getTransfer(o);if(s===rr)return t.UNSIGNED_BYTE;if(s===k0)return t.UNSIGNED_SHORT_4_4_4_4;if(s===B0)return t.UNSIGNED_SHORT_5_5_5_1;if(s===fP)return t.BYTE;if(s===dP)return t.SHORT;if(s===dd)return t.UNSIGNED_SHORT;if(s===F0)return t.INT;if(s===Zi)return t.UNSIGNED_INT;if(s===Ji)return t.FLOAT;if(s===Hs)return i?t.HALF_FLOAT:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(s===hP)return t.ALPHA;if(s===Zn)return t.RGBA;if(s===pP)return t.LUMINANCE;if(s===mP)return t.LUMINANCE_ALPHA;if(s===Or)return t.DEPTH_COMPONENT;if(s===zs)return t.DEPTH_STENCIL;if(s===_f)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(s===gP)return t.RED;if(s===H0)return t.RED_INTEGER;if(s===_P)return t.RG;if(s===z0)return t.RG_INTEGER;if(s===V0)return t.RGBA_INTEGER;if(s===kc||s===Bc||s===Hc||s===zc)if(l===_t)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(s===kc)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(s===Bc)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(s===Hc)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(s===zc)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(s===kc)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(s===Bc)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(s===Hc)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(s===zc)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(s===Yp||s===Kp||s===Zp||s===Jp)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(s===Yp)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(s===Kp)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(s===Zp)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(s===Jp)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(s===G0)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(s===Qp||s===em)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(s===Qp)return l===_t?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(s===em)return l===_t?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(s===tm||s===nm||s===im||s===rm||s===sm||s===om||s===am||s===lm||s===cm||s===um||s===fm||s===dm||s===hm||s===pm)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(s===tm)return l===_t?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(s===nm)return l===_t?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(s===im)return l===_t?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(s===rm)return l===_t?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(s===sm)return l===_t?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(s===om)return l===_t?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(s===am)return l===_t?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(s===lm)return l===_t?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(s===cm)return l===_t?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(s===um)return l===_t?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(s===fm)return l===_t?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(s===dm)return l===_t?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(s===hm)return l===_t?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(s===pm)return l===_t?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(s===Vc||s===mm||s===gm)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(s===Vc)return l===_t?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(s===mm)return a.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(s===gm)return a.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(s===vP||s===_m||s===vm||s===ym)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(s===Vc)return a.COMPRESSED_RED_RGTC1_EXT;if(s===_m)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(s===vm)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(s===ym)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return s===Ur?i?t.UNSIGNED_INT_24_8:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):t[s]!==void 0?t[s]:null}return{convert:r}}class L2 extends Xn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Qa extends wn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const P2={type:"move"};class hu{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Qa,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 Qa,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new J,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new J),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Qa,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new J,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new J),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const n=this._hand;if(n)for(const i of e.hand.values())this._getHandJoint(n,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,n,i){let r=null,s=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const _ of e.hand.values()){const m=n.getJointPose(_,i),d=this._getHandJoint(c,_);m!==null&&(d.matrix.fromArray(m.transform.matrix),d.matrix.decompose(d.position,d.rotation,d.scale),d.matrixWorldNeedsUpdate=!0,d.jointRadius=m.radius),d.visible=m!==null}const u=c.joints["index-finger-tip"],f=c.joints["thumb-tip"],h=u.position.distanceTo(f.position),p=.02,g=.005;c.inputState.pinching&&h>p+g?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=p-g&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=n.getPose(e.gripSpace,i),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(r=n.getPose(e.targetRaySpace,i),r===null&&s!==null&&(r=s),r!==null&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(P2)))}return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=s!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const i=new Qa;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[n.jointName]=i,e.add(i)}return e.joints[n.jointName]}}class I2 extends Zs{constructor(e,n){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,u=null,f=null,h=null,p=null,g=null;const _=n.getContextAttributes();let m=null,d=null;const v=[],y=[],x=new ot;let S=null;const C=new Xn;C.layers.enable(1),C.viewport=new qt;const R=new Xn;R.layers.enable(2),R.viewport=new qt;const I=[C,R],b=new L2;b.layers.enable(1),b.layers.enable(2);let L=null,B=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(te){let fe=v[te];return fe===void 0&&(fe=new hu,v[te]=fe),fe.getTargetRaySpace()},this.getControllerGrip=function(te){let fe=v[te];return fe===void 0&&(fe=new hu,v[te]=fe),fe.getGripSpace()},this.getHand=function(te){let fe=v[te];return fe===void 0&&(fe=new hu,v[te]=fe),fe.getHandSpace()};function U(te){const fe=y.indexOf(te.inputSource);if(fe===-1)return;const be=v[fe];be!==void 0&&(be.update(te.inputSource,te.frame,c||o),be.dispatchEvent({type:te.type,data:te.inputSource}))}function k(){r.removeEventListener("select",U),r.removeEventListener("selectstart",U),r.removeEventListener("selectend",U),r.removeEventListener("squeeze",U),r.removeEventListener("squeezestart",U),r.removeEventListener("squeezeend",U),r.removeEventListener("end",k),r.removeEventListener("inputsourceschange",D);for(let te=0;te<v.length;te++){const fe=y[te];fe!==null&&(y[te]=null,v[te].disconnect(fe))}L=null,B=null,e.setRenderTarget(m),p=null,h=null,f=null,r=null,d=null,ye.stop(),i.isPresenting=!1,e.setPixelRatio(S),e.setSize(x.width,x.height,!1),i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(te){s=te,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(te){a=te,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(te){c=te},this.getBaseLayer=function(){return h!==null?h:p},this.getBinding=function(){return f},this.getFrame=function(){return g},this.getSession=function(){return r},this.setSession=async function(te){if(r=te,r!==null){if(m=e.getRenderTarget(),r.addEventListener("select",U),r.addEventListener("selectstart",U),r.addEventListener("selectend",U),r.addEventListener("squeeze",U),r.addEventListener("squeezestart",U),r.addEventListener("squeezeend",U),r.addEventListener("end",k),r.addEventListener("inputsourceschange",D),_.xrCompatible!==!0&&await n.makeXRCompatible(),S=e.getPixelRatio(),e.getSize(x),r.renderState.layers===void 0||e.capabilities.isWebGL2===!1){const fe={antialias:r.renderState.layers===void 0?_.antialias:!0,alpha:!0,depth:_.depth,stencil:_.stencil,framebufferScaleFactor:s};p=new XRWebGLLayer(r,n,fe),r.updateRenderState({baseLayer:p}),e.setPixelRatio(1),e.setSize(p.framebufferWidth,p.framebufferHeight,!1),d=new ur(p.framebufferWidth,p.framebufferHeight,{format:Zn,type:rr,colorSpace:e.outputColorSpace,stencilBuffer:_.stencil})}else{let fe=null,be=null,Te=null;_.depth&&(Te=_.stencil?n.DEPTH24_STENCIL8:n.DEPTH_COMPONENT24,fe=_.stencil?zs:Or,be=_.stencil?Ur:Zi);const V={colorFormat:n.RGBA8,depthFormat:Te,scaleFactor:s};f=new XRWebGLBinding(r,n),h=f.createProjectionLayer(V),r.updateRenderState({layers:[h]}),e.setPixelRatio(1),e.setSize(h.textureWidth,h.textureHeight,!1),d=new ur(h.textureWidth,h.textureHeight,{format:Zn,type:rr,depthTexture:new ay(h.textureWidth,h.textureHeight,be,void 0,void 0,void 0,void 0,void 0,void 0,fe),stencilBuffer:_.stencil,colorSpace:e.outputColorSpace,samples:_.antialias?4:0});const ue=e.properties.get(d);ue.__ignoreDepthValues=h.ignoreDepthValues}d.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await r.requestReferenceSpace(a),ye.setContext(r),ye.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(r!==null)return r.environmentBlendMode};function D(te){for(let fe=0;fe<te.removed.length;fe++){const be=te.removed[fe],Te=y.indexOf(be);Te>=0&&(y[Te]=null,v[Te].disconnect(be))}for(let fe=0;fe<te.added.length;fe++){const be=te.added[fe];let Te=y.indexOf(be);if(Te===-1){for(let ue=0;ue<v.length;ue++)if(ue>=y.length){y.push(be),Te=ue;break}else if(y[ue]===null){y[ue]=be,Te=ue;break}if(Te===-1)break}const V=v[Te];V&&V.connect(be)}}const G=new J,$=new J;function j(te,fe,be){G.setFromMatrixPosition(fe.matrixWorld),$.setFromMatrixPosition(be.matrixWorld);const Te=G.distanceTo($),V=fe.projectionMatrix.elements,ue=be.projectionMatrix.elements,ne=V[14]/(V[10]-1),de=V[14]/(V[10]+1),Me=(V[9]+1)/V[5],T=(V[9]-1)/V[5],E=(V[8]-1)/V[0],w=(ue[8]+1)/ue[0],N=ne*E,O=ne*w,W=Te/(-E+w),q=W*-E;fe.matrixWorld.decompose(te.position,te.quaternion,te.scale),te.translateX(q),te.translateZ(W),te.matrixWorld.compose(te.position,te.quaternion,te.scale),te.matrixWorldInverse.copy(te.matrixWorld).invert();const Z=ne+W,ce=de+W,ee=N-q,z=O+(Te-q),M=Me*de/ce*Z,A=T*de/ce*Z;te.projectionMatrix.makePerspective(ee,z,M,A,Z,ce),te.projectionMatrixInverse.copy(te.projectionMatrix).invert()}function oe(te,fe){fe===null?te.matrixWorld.copy(te.matrix):te.matrixWorld.multiplyMatrices(fe.matrixWorld,te.matrix),te.matrixWorldInverse.copy(te.matrixWorld).invert()}this.updateCamera=function(te){if(r===null)return;b.near=R.near=C.near=te.near,b.far=R.far=C.far=te.far,(L!==b.near||B!==b.far)&&(r.updateRenderState({depthNear:b.near,depthFar:b.far}),L=b.near,B=b.far);const fe=te.parent,be=b.cameras;oe(b,fe);for(let Te=0;Te<be.length;Te++)oe(be[Te],fe);be.length===2?j(b,C,R):b.projectionMatrix.copy(C.projectionMatrix),se(te,b,fe)};function se(te,fe,be){be===null?te.matrix.copy(fe.matrixWorld):(te.matrix.copy(be.matrixWorld),te.matrix.invert(),te.matrix.multiply(fe.matrixWorld)),te.matrix.decompose(te.position,te.quaternion,te.scale),te.updateMatrixWorld(!0),te.projectionMatrix.copy(fe.projectionMatrix),te.projectionMatrixInverse.copy(fe.projectionMatrixInverse),te.isPerspectiveCamera&&(te.fov=vf*2*Math.atan(1/te.projectionMatrix.elements[5]),te.zoom=1)}this.getCamera=function(){return b},this.getFoveation=function(){if(!(h===null&&p===null))return l},this.setFoveation=function(te){l=te,h!==null&&(h.fixedFoveation=te),p!==null&&p.fixedFoveation!==void 0&&(p.fixedFoveation=te)};let he=null;function me(te,fe){if(u=fe.getViewerPose(c||o),g=fe,u!==null){const be=u.views;p!==null&&(e.setRenderTargetFramebuffer(d,p.framebuffer),e.setRenderTarget(d));let Te=!1;be.length!==b.cameras.length&&(b.cameras.length=0,Te=!0);for(let V=0;V<be.length;V++){const ue=be[V];let ne=null;if(p!==null)ne=p.getViewport(ue);else{const Me=f.getViewSubImage(h,ue);ne=Me.viewport,V===0&&(e.setRenderTargetTextures(d,Me.colorTexture,h.ignoreDepthValues?void 0:Me.depthStencilTexture),e.setRenderTarget(d))}let de=I[V];de===void 0&&(de=new Xn,de.layers.enable(V),de.viewport=new qt,I[V]=de),de.matrix.fromArray(ue.transform.matrix),de.matrix.decompose(de.position,de.quaternion,de.scale),de.projectionMatrix.fromArray(ue.projectionMatrix),de.projectionMatrixInverse.copy(de.projectionMatrix).invert(),de.viewport.set(ne.x,ne.y,ne.width,ne.height),V===0&&(b.matrix.copy(de.matrix),b.matrix.decompose(b.position,b.quaternion,b.scale)),Te===!0&&b.cameras.push(de)}}for(let be=0;be<v.length;be++){const Te=y[be],V=v[be];Te!==null&&V!==void 0&&V.update(Te,fe,c||o)}he&&he(te,fe),fe.detectedPlanes&&i.dispatchEvent({type:"planesdetected",data:fe}),g=null}const ye=new sy;ye.setAnimationLoop(me),this.setAnimationLoop=function(te){he=te},this.dispose=function(){}}}function D2(t,e){function n(m,d){m.matrixAutoUpdate===!0&&m.updateMatrix(),d.value.copy(m.matrix)}function i(m,d){d.color.getRGB(m.fogColor.value,ty(t)),d.isFog?(m.fogNear.value=d.near,m.fogFar.value=d.far):d.isFogExp2&&(m.fogDensity.value=d.density)}function r(m,d,v,y,x){d.isMeshBasicMaterial||d.isMeshLambertMaterial?s(m,d):d.isMeshToonMaterial?(s(m,d),f(m,d)):d.isMeshPhongMaterial?(s(m,d),u(m,d)):d.isMeshStandardMaterial?(s(m,d),h(m,d),d.isMeshPhysicalMaterial&&p(m,d,x)):d.isMeshMatcapMaterial?(s(m,d),g(m,d)):d.isMeshDepthMaterial?s(m,d):d.isMeshDistanceMaterial?(s(m,d),_(m,d)):d.isMeshNormalMaterial?s(m,d):d.isLineBasicMaterial?(o(m,d),d.isLineDashedMaterial&&a(m,d)):d.isPointsMaterial?l(m,d,v,y):d.isSpriteMaterial?c(m,d):d.isShadowMaterial?(m.color.value.copy(d.color),m.opacity.value=d.opacity):d.isShaderMaterial&&(d.uniformsNeedUpdate=!1)}function s(m,d){m.opacity.value=d.opacity,d.color&&m.diffuse.value.copy(d.color),d.emissive&&m.emissive.value.copy(d.emissive).multiplyScalar(d.emissiveIntensity),d.map&&(m.map.value=d.map,n(d.map,m.mapTransform)),d.alphaMap&&(m.alphaMap.value=d.alphaMap,n(d.alphaMap,m.alphaMapTransform)),d.bumpMap&&(m.bumpMap.value=d.bumpMap,n(d.bumpMap,m.bumpMapTransform),m.bumpScale.value=d.bumpScale,d.side===vn&&(m.bumpScale.value*=-1)),d.normalMap&&(m.normalMap.value=d.normalMap,n(d.normalMap,m.normalMapTransform),m.normalScale.value.copy(d.normalScale),d.side===vn&&m.normalScale.value.negate()),d.displacementMap&&(m.displacementMap.value=d.displacementMap,n(d.displacementMap,m.displacementMapTransform),m.displacementScale.value=d.displacementScale,m.displacementBias.value=d.displacementBias),d.emissiveMap&&(m.emissiveMap.value=d.emissiveMap,n(d.emissiveMap,m.emissiveMapTransform)),d.specularMap&&(m.specularMap.value=d.specularMap,n(d.specularMap,m.specularMapTransform)),d.alphaTest>0&&(m.alphaTest.value=d.alphaTest);const v=e.get(d).envMap;if(v&&(m.envMap.value=v,m.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,m.reflectivity.value=d.reflectivity,m.ior.value=d.ior,m.refractionRatio.value=d.refractionRatio),d.lightMap){m.lightMap.value=d.lightMap;const y=t._useLegacyLights===!0?Math.PI:1;m.lightMapIntensity.value=d.lightMapIntensity*y,n(d.lightMap,m.lightMapTransform)}d.aoMap&&(m.aoMap.value=d.aoMap,m.aoMapIntensity.value=d.aoMapIntensity,n(d.aoMap,m.aoMapTransform))}function o(m,d){m.diffuse.value.copy(d.color),m.opacity.value=d.opacity,d.map&&(m.map.value=d.map,n(d.map,m.mapTransform))}function a(m,d){m.dashSize.value=d.dashSize,m.totalSize.value=d.dashSize+d.gapSize,m.scale.value=d.scale}function l(m,d,v,y){m.diffuse.value.copy(d.color),m.opacity.value=d.opacity,m.size.value=d.size*v,m.scale.value=y*.5,d.map&&(m.map.value=d.map,n(d.map,m.uvTransform)),d.alphaMap&&(m.alphaMap.value=d.alphaMap,n(d.alphaMap,m.alphaMapTransform)),d.alphaTest>0&&(m.alphaTest.value=d.alphaTest)}function c(m,d){m.diffuse.value.copy(d.color),m.opacity.value=d.opacity,m.rotation.value=d.rotation,d.map&&(m.map.value=d.map,n(d.map,m.mapTransform)),d.alphaMap&&(m.alphaMap.value=d.alphaMap,n(d.alphaMap,m.alphaMapTransform)),d.alphaTest>0&&(m.alphaTest.value=d.alphaTest)}function u(m,d){m.specular.value.copy(d.specular),m.shininess.value=Math.max(d.shininess,1e-4)}function f(m,d){d.gradientMap&&(m.gradientMap.value=d.gradientMap)}function h(m,d){m.metalness.value=d.metalness,d.metalnessMap&&(m.metalnessMap.value=d.metalnessMap,n(d.metalnessMap,m.metalnessMapTransform)),m.roughness.value=d.roughness,d.roughnessMap&&(m.roughnessMap.value=d.roughnessMap,n(d.roughnessMap,m.roughnessMapTransform)),e.get(d).envMap&&(m.envMapIntensity.value=d.envMapIntensity)}function p(m,d,v){m.ior.value=d.ior,d.sheen>0&&(m.sheenColor.value.copy(d.sheenColor).multiplyScalar(d.sheen),m.sheenRoughness.value=d.sheenRoughness,d.sheenColorMap&&(m.sheenColorMap.value=d.sheenColorMap,n(d.sheenColorMap,m.sheenColorMapTransform)),d.sheenRoughnessMap&&(m.sheenRoughnessMap.value=d.sheenRoughnessMap,n(d.sheenRoughnessMap,m.sheenRoughnessMapTransform))),d.clearcoat>0&&(m.clearcoat.value=d.clearcoat,m.clearcoatRoughness.value=d.clearcoatRoughness,d.clearcoatMap&&(m.clearcoatMap.value=d.clearcoatMap,n(d.clearcoatMap,m.clearcoatMapTransform)),d.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=d.clearcoatRoughnessMap,n(d.clearcoatRoughnessMap,m.clearcoatRoughnessMapTransform)),d.clearcoatNormalMap&&(m.clearcoatNormalMap.value=d.clearcoatNormalMap,n(d.clearcoatNormalMap,m.clearcoatNormalMapTransform),m.clearcoatNormalScale.value.copy(d.clearcoatNormalScale),d.side===vn&&m.clearcoatNormalScale.value.negate())),d.iridescence>0&&(m.iridescence.value=d.iridescence,m.iridescenceIOR.value=d.iridescenceIOR,m.iridescenceThicknessMinimum.value=d.iridescenceThicknessRange[0],m.iridescenceThicknessMaximum.value=d.iridescenceThicknessRange[1],d.iridescenceMap&&(m.iridescenceMap.value=d.iridescenceMap,n(d.iridescenceMap,m.iridescenceMapTransform)),d.iridescenceThicknessMap&&(m.iridescenceThicknessMap.value=d.iridescenceThicknessMap,n(d.iridescenceThicknessMap,m.iridescenceThicknessMapTransform))),d.transmission>0&&(m.transmission.value=d.transmission,m.transmissionSamplerMap.value=v.texture,m.transmissionSamplerSize.value.set(v.width,v.height),d.transmissionMap&&(m.transmissionMap.value=d.transmissionMap,n(d.transmissionMap,m.transmissionMapTransform)),m.thickness.value=d.thickness,d.thicknessMap&&(m.thicknessMap.value=d.thicknessMap,n(d.thicknessMap,m.thicknessMapTransform)),m.attenuationDistance.value=d.attenuationDistance,m.attenuationColor.value.copy(d.attenuationColor)),d.anisotropy>0&&(m.anisotropyVector.value.set(d.anisotropy*Math.cos(d.anisotropyRotation),d.anisotropy*Math.sin(d.anisotropyRotation)),d.anisotropyMap&&(m.anisotropyMap.value=d.anisotropyMap,n(d.anisotropyMap,m.anisotropyMapTransform))),m.specularIntensity.value=d.specularIntensity,m.specularColor.value.copy(d.specularColor),d.specularColorMap&&(m.specularColorMap.value=d.specularColorMap,n(d.specularColorMap,m.specularColorMapTransform)),d.specularIntensityMap&&(m.specularIntensityMap.value=d.specularIntensityMap,n(d.specularIntensityMap,m.specularIntensityMapTransform))}function g(m,d){d.matcap&&(m.matcap.value=d.matcap)}function _(m,d){const v=e.get(d).light;m.referencePosition.value.setFromMatrixPosition(v.matrixWorld),m.nearDistance.value=v.shadow.camera.near,m.farDistance.value=v.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function N2(t,e,n,i){let r={},s={},o=[];const a=n.isWebGL2?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(v,y){const x=y.program;i.uniformBlockBinding(v,x)}function c(v,y){let x=r[v.id];x===void 0&&(g(v),x=u(v),r[v.id]=x,v.addEventListener("dispose",m));const S=y.program;i.updateUBOMapping(v,S);const C=e.render.frame;s[v.id]!==C&&(h(v),s[v.id]=C)}function u(v){const y=f();v.__bindingPointIndex=y;const x=t.createBuffer(),S=v.__size,C=v.usage;return t.bindBuffer(t.UNIFORM_BUFFER,x),t.bufferData(t.UNIFORM_BUFFER,S,C),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,y,x),x}function f(){for(let v=0;v<a;v++)if(o.indexOf(v)===-1)return o.push(v),v;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function h(v){const y=r[v.id],x=v.uniforms,S=v.__cache;t.bindBuffer(t.UNIFORM_BUFFER,y);for(let C=0,R=x.length;C<R;C++){const I=x[C];if(p(I,C,S)===!0){const b=I.__offset,L=Array.isArray(I.value)?I.value:[I.value];let B=0;for(let U=0;U<L.length;U++){const k=L[U],D=_(k);typeof k=="number"?(I.__data[0]=k,t.bufferSubData(t.UNIFORM_BUFFER,b+B,I.__data)):k.isMatrix3?(I.__data[0]=k.elements[0],I.__data[1]=k.elements[1],I.__data[2]=k.elements[2],I.__data[3]=k.elements[0],I.__data[4]=k.elements[3],I.__data[5]=k.elements[4],I.__data[6]=k.elements[5],I.__data[7]=k.elements[0],I.__data[8]=k.elements[6],I.__data[9]=k.elements[7],I.__data[10]=k.elements[8],I.__data[11]=k.elements[0]):(k.toArray(I.__data,B),B+=D.storage/Float32Array.BYTES_PER_ELEMENT)}t.bufferSubData(t.UNIFORM_BUFFER,b,I.__data)}}t.bindBuffer(t.UNIFORM_BUFFER,null)}function p(v,y,x){const S=v.value;if(x[y]===void 0){if(typeof S=="number")x[y]=S;else{const C=Array.isArray(S)?S:[S],R=[];for(let I=0;I<C.length;I++)R.push(C[I].clone());x[y]=R}return!0}else if(typeof S=="number"){if(x[y]!==S)return x[y]=S,!0}else{const C=Array.isArray(x[y])?x[y]:[x[y]],R=Array.isArray(S)?S:[S];for(let I=0;I<C.length;I++){const b=C[I];if(b.equals(R[I])===!1)return b.copy(R[I]),!0}}return!1}function g(v){const y=v.uniforms;let x=0;const S=16;let C=0;for(let R=0,I=y.length;R<I;R++){const b=y[R],L={boundary:0,storage:0},B=Array.isArray(b.value)?b.value:[b.value];for(let U=0,k=B.length;U<k;U++){const D=B[U],G=_(D);L.boundary+=G.boundary,L.storage+=G.storage}if(b.__data=new Float32Array(L.storage/Float32Array.BYTES_PER_ELEMENT),b.__offset=x,R>0){C=x%S;const U=S-C;C!==0&&U-L.boundary<0&&(x+=S-C,b.__offset=x)}x+=L.storage}return C=x%S,C>0&&(x+=S-C),v.__size=x,v.__cache={},this}function _(v){const y={boundary:0,storage:0};return typeof v=="number"?(y.boundary=4,y.storage=4):v.isVector2?(y.boundary=8,y.storage=8):v.isVector3||v.isColor?(y.boundary=16,y.storage=12):v.isVector4?(y.boundary=16,y.storage=16):v.isMatrix3?(y.boundary=48,y.storage=48):v.isMatrix4?(y.boundary=64,y.storage=64):v.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",v),y}function m(v){const y=v.target;y.removeEventListener("dispose",m);const x=o.indexOf(y.__bindingPointIndex);o.splice(x,1),t.deleteBuffer(r[y.id]),delete r[y.id],delete s[y.id]}function d(){for(const v in r)t.deleteBuffer(r[v]);o=[],r={},s={}}return{bind:l,update:c,dispose:d}}class hy{constructor(e={}){const{canvas:n=PP(),context:i=null,depth:r=!0,stencil:s=!0,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:f=!1}=e;this.isWebGLRenderer=!0;let h;i!==null?h=i.getContextAttributes().alpha:h=o;const p=new Uint32Array(4),g=new Int32Array(4);let _=null,m=null;const d=[],v=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=jt,this._useLegacyLights=!1,this.toneMapping=ir,this.toneMappingExposure=1;const y=this;let x=!1,S=0,C=0,R=null,I=-1,b=null;const L=new qt,B=new qt;let U=null;const k=new ct(0);let D=0,G=n.width,$=n.height,j=1,oe=null,se=null;const he=new qt(0,0,G,$),me=new qt(0,0,G,$);let ye=!1;const te=new ry;let fe=!1,be=!1,Te=null;const V=new Kt,ue=new ot,ne=new J,de={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Me(){return R===null?j:1}let T=i;function E(P,X){for(let K=0;K<P.length;K++){const Q=P[K],Y=n.getContext(Q,X);if(Y!==null)return Y}return null}try{const P={alpha:!0,depth:r,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:f};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${fd}`),n.addEventListener("webglcontextlost",Qe,!1),n.addEventListener("webglcontextrestored",H,!1),n.addEventListener("webglcontextcreationerror",Re,!1),T===null){const X=["webgl2","webgl","experimental-webgl"];if(y.isWebGL1Renderer===!0&&X.shift(),T=E(X,P),T===null)throw E(X)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}typeof WebGLRenderingContext<"u"&&T instanceof WebGLRenderingContext&&console.warn("THREE.WebGLRenderer: WebGL 1 support was deprecated in r153 and will be removed in r163."),T.getShaderPrecisionFormat===void 0&&(T.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(P){throw console.error("THREE.WebGLRenderer: "+P.message),P}let w,N,O,W,q,Z,ce,ee,z,M,A,F,ie,re,ae,Se,ge,we,Oe,Je,_e,We,Ie,Fe;function Ne(){w=new $N(T),N=new BN(T,w,e),w.init(N),We=new C2(T,w,N),O=new A2(T,w,N),W=new qN(T),q=new h2,Z=new R2(T,w,O,q,N,We,W),ce=new zN(y),ee=new WN(y),z=new nI(T,N),Ie=new FN(T,w,z,N),M=new XN(T,z,W,Ie),A=new JN(T,M,z,W),Oe=new ZN(T,N,Z),Se=new HN(q),F=new d2(y,ce,ee,w,N,Ie,Se),ie=new D2(y,q),re=new m2,ae=new S2(w,N),we=new ON(y,ce,ee,O,A,h,l),ge=new w2(y,A,N),Fe=new N2(T,W,N,O),Je=new kN(T,w,W,N),_e=new jN(T,w,W,N),W.programs=F.programs,y.capabilities=N,y.extensions=w,y.properties=q,y.renderLists=re,y.shadowMap=ge,y.state=O,y.info=W}Ne();const Le=new I2(y,T);this.xr=Le,this.getContext=function(){return T},this.getContextAttributes=function(){return T.getContextAttributes()},this.forceContextLoss=function(){const P=w.get("WEBGL_lose_context");P&&P.loseContext()},this.forceContextRestore=function(){const P=w.get("WEBGL_lose_context");P&&P.restoreContext()},this.getPixelRatio=function(){return j},this.setPixelRatio=function(P){P!==void 0&&(j=P,this.setSize(G,$,!1))},this.getSize=function(P){return P.set(G,$)},this.setSize=function(P,X,K=!0){if(Le.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}G=P,$=X,n.width=Math.floor(P*j),n.height=Math.floor(X*j),K===!0&&(n.style.width=P+"px",n.style.height=X+"px"),this.setViewport(0,0,P,X)},this.getDrawingBufferSize=function(P){return P.set(G*j,$*j).floor()},this.setDrawingBufferSize=function(P,X,K){G=P,$=X,j=K,n.width=Math.floor(P*K),n.height=Math.floor(X*K),this.setViewport(0,0,P,X)},this.getCurrentViewport=function(P){return P.copy(L)},this.getViewport=function(P){return P.copy(he)},this.setViewport=function(P,X,K,Q){P.isVector4?he.set(P.x,P.y,P.z,P.w):he.set(P,X,K,Q),O.viewport(L.copy(he).multiplyScalar(j).floor())},this.getScissor=function(P){return P.copy(me)},this.setScissor=function(P,X,K,Q){P.isVector4?me.set(P.x,P.y,P.z,P.w):me.set(P,X,K,Q),O.scissor(B.copy(me).multiplyScalar(j).floor())},this.getScissorTest=function(){return ye},this.setScissorTest=function(P){O.setScissorTest(ye=P)},this.setOpaqueSort=function(P){oe=P},this.setTransparentSort=function(P){se=P},this.getClearColor=function(P){return P.copy(we.getClearColor())},this.setClearColor=function(){we.setClearColor.apply(we,arguments)},this.getClearAlpha=function(){return we.getClearAlpha()},this.setClearAlpha=function(){we.setClearAlpha.apply(we,arguments)},this.clear=function(P=!0,X=!0,K=!0){let Q=0;if(P){let Y=!1;if(R!==null){const Ce=R.texture.format;Y=Ce===V0||Ce===z0||Ce===H0}if(Y){const Ce=R.texture.type,Pe=Ce===rr||Ce===Zi||Ce===dd||Ce===Ur||Ce===k0||Ce===B0,ke=we.getClearColor(),ze=we.getClearAlpha(),Ye=ke.r,$e=ke.g,je=ke.b;Pe?(p[0]=Ye,p[1]=$e,p[2]=je,p[3]=ze,T.clearBufferuiv(T.COLOR,0,p)):(g[0]=Ye,g[1]=$e,g[2]=je,g[3]=ze,T.clearBufferiv(T.COLOR,0,g))}else Q|=T.COLOR_BUFFER_BIT}X&&(Q|=T.DEPTH_BUFFER_BIT),K&&(Q|=T.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),T.clear(Q)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){n.removeEventListener("webglcontextlost",Qe,!1),n.removeEventListener("webglcontextrestored",H,!1),n.removeEventListener("webglcontextcreationerror",Re,!1),re.dispose(),ae.dispose(),q.dispose(),ce.dispose(),ee.dispose(),A.dispose(),Ie.dispose(),Fe.dispose(),F.dispose(),Le.dispose(),Le.removeEventListener("sessionstart",rn),Le.removeEventListener("sessionend",pt),Te&&(Te.dispose(),Te=null),sn.stop()};function Qe(P){P.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),x=!0}function H(){console.log("THREE.WebGLRenderer: Context Restored."),x=!1;const P=W.autoReset,X=ge.enabled,K=ge.autoUpdate,Q=ge.needsUpdate,Y=ge.type;Ne(),W.autoReset=P,ge.enabled=X,ge.autoUpdate=K,ge.needsUpdate=Q,ge.type=Y}function Re(P){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",P.statusMessage)}function ve(P){const X=P.target;X.removeEventListener("dispose",ve),le(X)}function le(P){xe(P),q.remove(P)}function xe(P){const X=q.get(P).programs;X!==void 0&&(X.forEach(function(K){F.releaseProgram(K)}),P.isShaderMaterial&&F.releaseShaderCache(P))}this.renderBufferDirect=function(P,X,K,Q,Y,Ce){X===null&&(X=de);const Pe=Y.isMesh&&Y.matrixWorld.determinant()<0,ke=yy(P,X,K,Q,Y);O.setMaterial(Q,Pe);let ze=K.index,Ye=1;if(Q.wireframe===!0){if(ze=M.getWireframeAttribute(K),ze===void 0)return;Ye=2}const $e=K.drawRange,je=K.attributes.position;let Ct=$e.start*Ye,Sn=($e.start+$e.count)*Ye;Ce!==null&&(Ct=Math.max(Ct,Ce.start*Ye),Sn=Math.min(Sn,(Ce.start+Ce.count)*Ye)),ze!==null?(Ct=Math.max(Ct,0),Sn=Math.min(Sn,ze.count)):je!=null&&(Ct=Math.max(Ct,0),Sn=Math.min(Sn,je.count));const zt=Sn-Ct;if(zt<0||zt===1/0)return;Ie.setup(Y,Q,ke,K,ze);let _i,xt=Je;if(ze!==null&&(_i=z.get(ze),xt=_e,xt.setIndex(_i)),Y.isMesh)Q.wireframe===!0?(O.setLineWidth(Q.wireframeLinewidth*Me()),xt.setMode(T.LINES)):xt.setMode(T.TRIANGLES);else if(Y.isLine){let Ke=Q.linewidth;Ke===void 0&&(Ke=1),O.setLineWidth(Ke*Me()),Y.isLineSegments?xt.setMode(T.LINES):Y.isLineLoop?xt.setMode(T.LINE_LOOP):xt.setMode(T.LINE_STRIP)}else Y.isPoints?xt.setMode(T.POINTS):Y.isSprite&&xt.setMode(T.TRIANGLES);if(Y.isBatchedMesh)xt.renderMultiDraw(Y._multiDrawStarts,Y._multiDrawCounts,Y._multiDrawCount);else if(Y.isInstancedMesh)xt.renderInstances(Ct,zt,Y.count);else if(K.isInstancedBufferGeometry){const Ke=K._maxInstanceCount!==void 0?K._maxInstanceCount:1/0,fc=Math.min(K.instanceCount,Ke);xt.renderInstances(Ct,zt,fc)}else xt.render(Ct,zt)};function Be(P,X,K){P.transparent===!0&&P.side===Ai&&P.forceSinglePass===!1?(P.side=vn,P.needsUpdate=!0,ua(P,X,K),P.side=cr,P.needsUpdate=!0,ua(P,X,K),P.side=Ai):ua(P,X,K)}this.compile=function(P,X,K=null){K===null&&(K=P),m=ae.get(K),m.init(),v.push(m),K.traverseVisible(function(Y){Y.isLight&&Y.layers.test(X.layers)&&(m.pushLight(Y),Y.castShadow&&m.pushShadow(Y))}),P!==K&&P.traverseVisible(function(Y){Y.isLight&&Y.layers.test(X.layers)&&(m.pushLight(Y),Y.castShadow&&m.pushShadow(Y))}),m.setupLights(y._useLegacyLights);const Q=new Set;return P.traverse(function(Y){const Ce=Y.material;if(Ce)if(Array.isArray(Ce))for(let Pe=0;Pe<Ce.length;Pe++){const ke=Ce[Pe];Be(ke,K,Y),Q.add(ke)}else Be(Ce,K,Y),Q.add(Ce)}),v.pop(),m=null,Q},this.compileAsync=function(P,X,K=null){const Q=this.compile(P,X,K);return new Promise(Y=>{function Ce(){if(Q.forEach(function(Pe){q.get(Pe).currentProgram.isReady()&&Q.delete(Pe)}),Q.size===0){Y(P);return}setTimeout(Ce,10)}w.get("KHR_parallel_shader_compile")!==null?Ce():setTimeout(Ce,10)})};let nt=null;function Ht(P){nt&&nt(P)}function rn(){sn.stop()}function pt(){sn.start()}const sn=new sy;sn.setAnimationLoop(Ht),typeof self<"u"&&sn.setContext(self),this.setAnimationLoop=function(P){nt=P,Le.setAnimationLoop(P),P===null?sn.stop():sn.start()},Le.addEventListener("sessionstart",rn),Le.addEventListener("sessionend",pt),this.render=function(P,X){if(X!==void 0&&X.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(x===!0)return;P.matrixWorldAutoUpdate===!0&&P.updateMatrixWorld(),X.parent===null&&X.matrixWorldAutoUpdate===!0&&X.updateMatrixWorld(),Le.enabled===!0&&Le.isPresenting===!0&&(Le.cameraAutoUpdate===!0&&Le.updateCamera(X),X=Le.getCamera()),P.isScene===!0&&P.onBeforeRender(y,P,X,R),m=ae.get(P,v.length),m.init(),v.push(m),V.multiplyMatrices(X.projectionMatrix,X.matrixWorldInverse),te.setFromProjectionMatrix(V),be=this.localClippingEnabled,fe=Se.init(this.clippingPlanes,be),_=re.get(P,d.length),_.init(),d.push(_),ni(P,X,0,y.sortObjects),_.finish(),y.sortObjects===!0&&_.sort(oe,se),this.info.render.frame++,fe===!0&&Se.beginShadows();const K=m.state.shadowsArray;if(ge.render(K,P,X),fe===!0&&Se.endShadows(),this.info.autoReset===!0&&this.info.reset(),we.render(_,P),m.setupLights(y._useLegacyLights),X.isArrayCamera){const Q=X.cameras;for(let Y=0,Ce=Q.length;Y<Ce;Y++){const Pe=Q[Y];yd(_,P,Pe,Pe.viewport)}}else yd(_,P,X);R!==null&&(Z.updateMultisampleRenderTarget(R),Z.updateRenderTargetMipmap(R)),P.isScene===!0&&P.onAfterRender(y,P,X),Ie.resetDefaultState(),I=-1,b=null,v.pop(),v.length>0?m=v[v.length-1]:m=null,d.pop(),d.length>0?_=d[d.length-1]:_=null};function ni(P,X,K,Q){if(P.visible===!1)return;if(P.layers.test(X.layers)){if(P.isGroup)K=P.renderOrder;else if(P.isLOD)P.autoUpdate===!0&&P.update(X);else if(P.isLight)m.pushLight(P),P.castShadow&&m.pushShadow(P);else if(P.isSprite){if(!P.frustumCulled||te.intersectsSprite(P)){Q&&ne.setFromMatrixPosition(P.matrixWorld).applyMatrix4(V);const Pe=A.update(P),ke=P.material;ke.visible&&_.push(P,Pe,ke,K,ne.z,null)}}else if((P.isMesh||P.isLine||P.isPoints)&&(!P.frustumCulled||te.intersectsObject(P))){const Pe=A.update(P),ke=P.material;if(Q&&(P.boundingSphere!==void 0?(P.boundingSphere===null&&P.computeBoundingSphere(),ne.copy(P.boundingSphere.center)):(Pe.boundingSphere===null&&Pe.computeBoundingSphere(),ne.copy(Pe.boundingSphere.center)),ne.applyMatrix4(P.matrixWorld).applyMatrix4(V)),Array.isArray(ke)){const ze=Pe.groups;for(let Ye=0,$e=ze.length;Ye<$e;Ye++){const je=ze[Ye],Ct=ke[je.materialIndex];Ct&&Ct.visible&&_.push(P,Pe,Ct,K,ne.z,je)}}else ke.visible&&_.push(P,Pe,ke,K,ne.z,null)}}const Ce=P.children;for(let Pe=0,ke=Ce.length;Pe<ke;Pe++)ni(Ce[Pe],X,K,Q)}function yd(P,X,K,Q){const Y=P.opaque,Ce=P.transmissive,Pe=P.transparent;m.setupLightsView(K),fe===!0&&Se.setGlobalState(y.clippingPlanes,K),Ce.length>0&&vy(Y,Ce,X,K),Q&&O.viewport(L.copy(Q)),Y.length>0&&ca(Y,X,K),Ce.length>0&&ca(Ce,X,K),Pe.length>0&&ca(Pe,X,K),O.buffers.depth.setTest(!0),O.buffers.depth.setMask(!0),O.buffers.color.setMask(!0),O.setPolygonOffset(!1)}function vy(P,X,K,Q){if((K.isScene===!0?K.overrideMaterial:null)!==null)return;const Ce=N.isWebGL2;Te===null&&(Te=new ur(1,1,{generateMipmaps:!0,type:w.has("EXT_color_buffer_half_float")?Hs:rr,minFilter:$o,samples:Ce?4:0})),y.getDrawingBufferSize(ue),Ce?Te.setSize(ue.x,ue.y):Te.setSize(yf(ue.x),yf(ue.y));const Pe=y.getRenderTarget();y.setRenderTarget(Te),y.getClearColor(k),D=y.getClearAlpha(),D<1&&y.setClearColor(16777215,.5),y.clear();const ke=y.toneMapping;y.toneMapping=ir,ca(P,K,Q),Z.updateMultisampleRenderTarget(Te),Z.updateRenderTargetMipmap(Te);let ze=!1;for(let Ye=0,$e=X.length;Ye<$e;Ye++){const je=X[Ye],Ct=je.object,Sn=je.geometry,zt=je.material,_i=je.group;if(zt.side===Ai&&Ct.layers.test(Q.layers)){const xt=zt.side;zt.side=vn,zt.needsUpdate=!0,xd(Ct,K,Q,Sn,zt,_i),zt.side=xt,zt.needsUpdate=!0,ze=!0}}ze===!0&&(Z.updateMultisampleRenderTarget(Te),Z.updateRenderTargetMipmap(Te)),y.setRenderTarget(Pe),y.setClearColor(k,D),y.toneMapping=ke}function ca(P,X,K){const Q=X.isScene===!0?X.overrideMaterial:null;for(let Y=0,Ce=P.length;Y<Ce;Y++){const Pe=P[Y],ke=Pe.object,ze=Pe.geometry,Ye=Q===null?Pe.material:Q,$e=Pe.group;ke.layers.test(K.layers)&&xd(ke,X,K,ze,Ye,$e)}}function xd(P,X,K,Q,Y,Ce){P.onBeforeRender(y,X,K,Q,Y,Ce),P.modelViewMatrix.multiplyMatrices(K.matrixWorldInverse,P.matrixWorld),P.normalMatrix.getNormalMatrix(P.modelViewMatrix),Y.onBeforeRender(y,X,K,Q,P,Ce),Y.transparent===!0&&Y.side===Ai&&Y.forceSinglePass===!1?(Y.side=vn,Y.needsUpdate=!0,y.renderBufferDirect(K,X,Q,Y,P,Ce),Y.side=cr,Y.needsUpdate=!0,y.renderBufferDirect(K,X,Q,Y,P,Ce),Y.side=Ai):y.renderBufferDirect(K,X,Q,Y,P,Ce),P.onAfterRender(y,X,K,Q,Y,Ce)}function ua(P,X,K){X.isScene!==!0&&(X=de);const Q=q.get(P),Y=m.state.lights,Ce=m.state.shadowsArray,Pe=Y.state.version,ke=F.getParameters(P,Y.state,Ce,X,K),ze=F.getProgramCacheKey(ke);let Ye=Q.programs;Q.environment=P.isMeshStandardMaterial?X.environment:null,Q.fog=X.fog,Q.envMap=(P.isMeshStandardMaterial?ee:ce).get(P.envMap||Q.environment),Ye===void 0&&(P.addEventListener("dispose",ve),Ye=new Map,Q.programs=Ye);let $e=Ye.get(ze);if($e!==void 0){if(Q.currentProgram===$e&&Q.lightsStateVersion===Pe)return Ed(P,ke),$e}else ke.uniforms=F.getUniforms(P),P.onBuild(K,ke,y),P.onBeforeCompile(ke,y),$e=F.acquireProgram(ke,ze),Ye.set(ze,$e),Q.uniforms=ke.uniforms;const je=Q.uniforms;return(!P.isShaderMaterial&&!P.isRawShaderMaterial||P.clipping===!0)&&(je.clippingPlanes=Se.uniform),Ed(P,ke),Q.needsLights=Sy(P),Q.lightsStateVersion=Pe,Q.needsLights&&(je.ambientLightColor.value=Y.state.ambient,je.lightProbe.value=Y.state.probe,je.directionalLights.value=Y.state.directional,je.directionalLightShadows.value=Y.state.directionalShadow,je.spotLights.value=Y.state.spot,je.spotLightShadows.value=Y.state.spotShadow,je.rectAreaLights.value=Y.state.rectArea,je.ltc_1.value=Y.state.rectAreaLTC1,je.ltc_2.value=Y.state.rectAreaLTC2,je.pointLights.value=Y.state.point,je.pointLightShadows.value=Y.state.pointShadow,je.hemisphereLights.value=Y.state.hemi,je.directionalShadowMap.value=Y.state.directionalShadowMap,je.directionalShadowMatrix.value=Y.state.directionalShadowMatrix,je.spotShadowMap.value=Y.state.spotShadowMap,je.spotLightMatrix.value=Y.state.spotLightMatrix,je.spotLightMap.value=Y.state.spotLightMap,je.pointShadowMap.value=Y.state.pointShadowMap,je.pointShadowMatrix.value=Y.state.pointShadowMatrix),Q.currentProgram=$e,Q.uniformsList=null,$e}function Sd(P){if(P.uniformsList===null){const X=P.currentProgram.getUniforms();P.uniformsList=tl.seqWithValue(X.seq,P.uniforms)}return P.uniformsList}function Ed(P,X){const K=q.get(P);K.outputColorSpace=X.outputColorSpace,K.batching=X.batching,K.instancing=X.instancing,K.instancingColor=X.instancingColor,K.skinning=X.skinning,K.morphTargets=X.morphTargets,K.morphNormals=X.morphNormals,K.morphColors=X.morphColors,K.morphTargetsCount=X.morphTargetsCount,K.numClippingPlanes=X.numClippingPlanes,K.numIntersection=X.numClipIntersection,K.vertexAlphas=X.vertexAlphas,K.vertexTangents=X.vertexTangents,K.toneMapping=X.toneMapping}function yy(P,X,K,Q,Y){X.isScene!==!0&&(X=de),Z.resetTextureUnits();const Ce=X.fog,Pe=Q.isMeshStandardMaterial?X.environment:null,ke=R===null?y.outputColorSpace:R.isXRRenderTarget===!0?R.texture.colorSpace:Ni,ze=(Q.isMeshStandardMaterial?ee:ce).get(Q.envMap||Pe),Ye=Q.vertexColors===!0&&!!K.attributes.color&&K.attributes.color.itemSize===4,$e=!!K.attributes.tangent&&(!!Q.normalMap||Q.anisotropy>0),je=!!K.morphAttributes.position,Ct=!!K.morphAttributes.normal,Sn=!!K.morphAttributes.color;let zt=ir;Q.toneMapped&&(R===null||R.isXRRenderTarget===!0)&&(zt=y.toneMapping);const _i=K.morphAttributes.position||K.morphAttributes.normal||K.morphAttributes.color,xt=_i!==void 0?_i.length:0,Ke=q.get(Q),fc=m.state.lights;if(fe===!0&&(be===!0||P!==b)){const Rn=P===b&&Q.id===I;Se.setState(Q,P,Rn)}let Mt=!1;Q.version===Ke.__version?(Ke.needsLights&&Ke.lightsStateVersion!==fc.state.version||Ke.outputColorSpace!==ke||Y.isBatchedMesh&&Ke.batching===!1||!Y.isBatchedMesh&&Ke.batching===!0||Y.isInstancedMesh&&Ke.instancing===!1||!Y.isInstancedMesh&&Ke.instancing===!0||Y.isSkinnedMesh&&Ke.skinning===!1||!Y.isSkinnedMesh&&Ke.skinning===!0||Y.isInstancedMesh&&Ke.instancingColor===!0&&Y.instanceColor===null||Y.isInstancedMesh&&Ke.instancingColor===!1&&Y.instanceColor!==null||Ke.envMap!==ze||Q.fog===!0&&Ke.fog!==Ce||Ke.numClippingPlanes!==void 0&&(Ke.numClippingPlanes!==Se.numPlanes||Ke.numIntersection!==Se.numIntersection)||Ke.vertexAlphas!==Ye||Ke.vertexTangents!==$e||Ke.morphTargets!==je||Ke.morphNormals!==Ct||Ke.morphColors!==Sn||Ke.toneMapping!==zt||N.isWebGL2===!0&&Ke.morphTargetsCount!==xt)&&(Mt=!0):(Mt=!0,Ke.__version=Q.version);let pr=Ke.currentProgram;Mt===!0&&(pr=ua(Q,X,Y));let bd=!1,Qs=!1,dc=!1;const Zt=pr.getUniforms(),mr=Ke.uniforms;if(O.useProgram(pr.program)&&(bd=!0,Qs=!0,dc=!0),Q.id!==I&&(I=Q.id,Qs=!0),bd||b!==P){Zt.setValue(T,"projectionMatrix",P.projectionMatrix),Zt.setValue(T,"viewMatrix",P.matrixWorldInverse);const Rn=Zt.map.cameraPosition;Rn!==void 0&&Rn.setValue(T,ne.setFromMatrixPosition(P.matrixWorld)),N.logarithmicDepthBuffer&&Zt.setValue(T,"logDepthBufFC",2/(Math.log(P.far+1)/Math.LN2)),(Q.isMeshPhongMaterial||Q.isMeshToonMaterial||Q.isMeshLambertMaterial||Q.isMeshBasicMaterial||Q.isMeshStandardMaterial||Q.isShaderMaterial)&&Zt.setValue(T,"isOrthographic",P.isOrthographicCamera===!0),b!==P&&(b=P,Qs=!0,dc=!0)}if(Y.isSkinnedMesh){Zt.setOptional(T,Y,"bindMatrix"),Zt.setOptional(T,Y,"bindMatrixInverse");const Rn=Y.skeleton;Rn&&(N.floatVertexTextures?(Rn.boneTexture===null&&Rn.computeBoneTexture(),Zt.setValue(T,"boneTexture",Rn.boneTexture,Z)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}Y.isBatchedMesh&&(Zt.setOptional(T,Y,"batchingTexture"),Zt.setValue(T,"batchingTexture",Y._matricesTexture,Z));const hc=K.morphAttributes;if((hc.position!==void 0||hc.normal!==void 0||hc.color!==void 0&&N.isWebGL2===!0)&&Oe.update(Y,K,pr),(Qs||Ke.receiveShadow!==Y.receiveShadow)&&(Ke.receiveShadow=Y.receiveShadow,Zt.setValue(T,"receiveShadow",Y.receiveShadow)),Q.isMeshGouraudMaterial&&Q.envMap!==null&&(mr.envMap.value=ze,mr.flipEnvMap.value=ze.isCubeTexture&&ze.isRenderTargetTexture===!1?-1:1),Qs&&(Zt.setValue(T,"toneMappingExposure",y.toneMappingExposure),Ke.needsLights&&xy(mr,dc),Ce&&Q.fog===!0&&ie.refreshFogUniforms(mr,Ce),ie.refreshMaterialUniforms(mr,Q,j,$,Te),tl.upload(T,Sd(Ke),mr,Z)),Q.isShaderMaterial&&Q.uniformsNeedUpdate===!0&&(tl.upload(T,Sd(Ke),mr,Z),Q.uniformsNeedUpdate=!1),Q.isSpriteMaterial&&Zt.setValue(T,"center",Y.center),Zt.setValue(T,"modelViewMatrix",Y.modelViewMatrix),Zt.setValue(T,"normalMatrix",Y.normalMatrix),Zt.setValue(T,"modelMatrix",Y.matrixWorld),Q.isShaderMaterial||Q.isRawShaderMaterial){const Rn=Q.uniformsGroups;for(let pc=0,Ey=Rn.length;pc<Ey;pc++)if(N.isWebGL2){const Md=Rn[pc];Fe.update(Md,pr),Fe.bind(Md,pr)}else console.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.")}return pr}function xy(P,X){P.ambientLightColor.needsUpdate=X,P.lightProbe.needsUpdate=X,P.directionalLights.needsUpdate=X,P.directionalLightShadows.needsUpdate=X,P.pointLights.needsUpdate=X,P.pointLightShadows.needsUpdate=X,P.spotLights.needsUpdate=X,P.spotLightShadows.needsUpdate=X,P.rectAreaLights.needsUpdate=X,P.hemisphereLights.needsUpdate=X}function Sy(P){return P.isMeshLambertMaterial||P.isMeshToonMaterial||P.isMeshPhongMaterial||P.isMeshStandardMaterial||P.isShadowMaterial||P.isShaderMaterial&&P.lights===!0}this.getActiveCubeFace=function(){return S},this.getActiveMipmapLevel=function(){return C},this.getRenderTarget=function(){return R},this.setRenderTargetTextures=function(P,X,K){q.get(P.texture).__webglTexture=X,q.get(P.depthTexture).__webglTexture=K;const Q=q.get(P);Q.__hasExternalTextures=!0,Q.__hasExternalTextures&&(Q.__autoAllocateDepthBuffer=K===void 0,Q.__autoAllocateDepthBuffer||w.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),Q.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(P,X){const K=q.get(P);K.__webglFramebuffer=X,K.__useDefaultFramebuffer=X===void 0},this.setRenderTarget=function(P,X=0,K=0){R=P,S=X,C=K;let Q=!0,Y=null,Ce=!1,Pe=!1;if(P){const ze=q.get(P);ze.__useDefaultFramebuffer!==void 0?(O.bindFramebuffer(T.FRAMEBUFFER,null),Q=!1):ze.__webglFramebuffer===void 0?Z.setupRenderTarget(P):ze.__hasExternalTextures&&Z.rebindTextures(P,q.get(P.texture).__webglTexture,q.get(P.depthTexture).__webglTexture);const Ye=P.texture;(Ye.isData3DTexture||Ye.isDataArrayTexture||Ye.isCompressedArrayTexture)&&(Pe=!0);const $e=q.get(P).__webglFramebuffer;P.isWebGLCubeRenderTarget?(Array.isArray($e[X])?Y=$e[X][K]:Y=$e[X],Ce=!0):N.isWebGL2&&P.samples>0&&Z.useMultisampledRTT(P)===!1?Y=q.get(P).__webglMultisampledFramebuffer:Array.isArray($e)?Y=$e[K]:Y=$e,L.copy(P.viewport),B.copy(P.scissor),U=P.scissorTest}else L.copy(he).multiplyScalar(j).floor(),B.copy(me).multiplyScalar(j).floor(),U=ye;if(O.bindFramebuffer(T.FRAMEBUFFER,Y)&&N.drawBuffers&&Q&&O.drawBuffers(P,Y),O.viewport(L),O.scissor(B),O.setScissorTest(U),Ce){const ze=q.get(P.texture);T.framebufferTexture2D(T.FRAMEBUFFER,T.COLOR_ATTACHMENT0,T.TEXTURE_CUBE_MAP_POSITIVE_X+X,ze.__webglTexture,K)}else if(Pe){const ze=q.get(P.texture),Ye=X||0;T.framebufferTextureLayer(T.FRAMEBUFFER,T.COLOR_ATTACHMENT0,ze.__webglTexture,K||0,Ye)}I=-1},this.readRenderTargetPixels=function(P,X,K,Q,Y,Ce,Pe){if(!(P&&P.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ke=q.get(P).__webglFramebuffer;if(P.isWebGLCubeRenderTarget&&Pe!==void 0&&(ke=ke[Pe]),ke){O.bindFramebuffer(T.FRAMEBUFFER,ke);try{const ze=P.texture,Ye=ze.format,$e=ze.type;if(Ye!==Zn&&We.convert(Ye)!==T.getParameter(T.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const je=$e===Hs&&(w.has("EXT_color_buffer_half_float")||N.isWebGL2&&w.has("EXT_color_buffer_float"));if($e!==rr&&We.convert($e)!==T.getParameter(T.IMPLEMENTATION_COLOR_READ_TYPE)&&!($e===Ji&&(N.isWebGL2||w.has("OES_texture_float")||w.has("WEBGL_color_buffer_float")))&&!je){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}X>=0&&X<=P.width-Q&&K>=0&&K<=P.height-Y&&T.readPixels(X,K,Q,Y,We.convert(Ye),We.convert($e),Ce)}finally{const ze=R!==null?q.get(R).__webglFramebuffer:null;O.bindFramebuffer(T.FRAMEBUFFER,ze)}}},this.copyFramebufferToTexture=function(P,X,K=0){const Q=Math.pow(2,-K),Y=Math.floor(X.image.width*Q),Ce=Math.floor(X.image.height*Q);Z.setTexture2D(X,0),T.copyTexSubImage2D(T.TEXTURE_2D,K,0,0,P.x,P.y,Y,Ce),O.unbindTexture()},this.copyTextureToTexture=function(P,X,K,Q=0){const Y=X.image.width,Ce=X.image.height,Pe=We.convert(K.format),ke=We.convert(K.type);Z.setTexture2D(K,0),T.pixelStorei(T.UNPACK_FLIP_Y_WEBGL,K.flipY),T.pixelStorei(T.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),T.pixelStorei(T.UNPACK_ALIGNMENT,K.unpackAlignment),X.isDataTexture?T.texSubImage2D(T.TEXTURE_2D,Q,P.x,P.y,Y,Ce,Pe,ke,X.image.data):X.isCompressedTexture?T.compressedTexSubImage2D(T.TEXTURE_2D,Q,P.x,P.y,X.mipmaps[0].width,X.mipmaps[0].height,Pe,X.mipmaps[0].data):T.texSubImage2D(T.TEXTURE_2D,Q,P.x,P.y,Pe,ke,X.image),Q===0&&K.generateMipmaps&&T.generateMipmap(T.TEXTURE_2D),O.unbindTexture()},this.copyTextureToTexture3D=function(P,X,K,Q,Y=0){if(y.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Ce=P.max.x-P.min.x+1,Pe=P.max.y-P.min.y+1,ke=P.max.z-P.min.z+1,ze=We.convert(Q.format),Ye=We.convert(Q.type);let $e;if(Q.isData3DTexture)Z.setTexture3D(Q,0),$e=T.TEXTURE_3D;else if(Q.isDataArrayTexture)Z.setTexture2DArray(Q,0),$e=T.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}T.pixelStorei(T.UNPACK_FLIP_Y_WEBGL,Q.flipY),T.pixelStorei(T.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Q.premultiplyAlpha),T.pixelStorei(T.UNPACK_ALIGNMENT,Q.unpackAlignment);const je=T.getParameter(T.UNPACK_ROW_LENGTH),Ct=T.getParameter(T.UNPACK_IMAGE_HEIGHT),Sn=T.getParameter(T.UNPACK_SKIP_PIXELS),zt=T.getParameter(T.UNPACK_SKIP_ROWS),_i=T.getParameter(T.UNPACK_SKIP_IMAGES),xt=K.isCompressedTexture?K.mipmaps[0]:K.image;T.pixelStorei(T.UNPACK_ROW_LENGTH,xt.width),T.pixelStorei(T.UNPACK_IMAGE_HEIGHT,xt.height),T.pixelStorei(T.UNPACK_SKIP_PIXELS,P.min.x),T.pixelStorei(T.UNPACK_SKIP_ROWS,P.min.y),T.pixelStorei(T.UNPACK_SKIP_IMAGES,P.min.z),K.isDataTexture||K.isData3DTexture?T.texSubImage3D($e,Y,X.x,X.y,X.z,Ce,Pe,ke,ze,Ye,xt.data):K.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),T.compressedTexSubImage3D($e,Y,X.x,X.y,X.z,Ce,Pe,ke,ze,xt.data)):T.texSubImage3D($e,Y,X.x,X.y,X.z,Ce,Pe,ke,ze,Ye,xt),T.pixelStorei(T.UNPACK_ROW_LENGTH,je),T.pixelStorei(T.UNPACK_IMAGE_HEIGHT,Ct),T.pixelStorei(T.UNPACK_SKIP_PIXELS,Sn),T.pixelStorei(T.UNPACK_SKIP_ROWS,zt),T.pixelStorei(T.UNPACK_SKIP_IMAGES,_i),Y===0&&Q.generateMipmaps&&T.generateMipmap($e),O.unbindTexture()},this.initTexture=function(P){P.isCubeTexture?Z.setTextureCube(P,0):P.isData3DTexture?Z.setTexture3D(P,0):P.isDataArrayTexture||P.isCompressedArrayTexture?Z.setTexture2DArray(P,0):Z.setTexture2D(P,0),O.unbindTexture()},this.resetState=function(){S=0,C=0,R=null,O.reset(),Ie.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Ri}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===hd?"display-p3":"srgb",n.unpackColorSpace=dt.workingColorSpace===sc?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===jt?Fr:W0}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===Fr?jt:Ni}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 U2 extends hy{}U2.prototype.isWebGL1Renderer=!0;class O2 extends wn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n}}const lg={enabled:!1,files:{},add:function(t,e){this.enabled!==!1&&(this.files[t]=e)},get:function(t){if(this.enabled!==!1)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};class F2{constructor(e,n,i){const r=this;let s=!1,o=0,a=0,l;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=n,this.onError=i,this.itemStart=function(u){a++,s===!1&&r.onStart!==void 0&&r.onStart(u,o,a),s=!0},this.itemEnd=function(u){o++,r.onProgress!==void 0&&r.onProgress(u,o,a),o===a&&(s=!1,r.onLoad!==void 0&&r.onLoad())},this.itemError=function(u){r.onError!==void 0&&r.onError(u)},this.resolveURL=function(u){return l?l(u):u},this.setURLModifier=function(u){return l=u,this},this.addHandler=function(u,f){return c.push(u,f),this},this.removeHandler=function(u){const f=c.indexOf(u);return f!==-1&&c.splice(f,2),this},this.getHandler=function(u){for(let f=0,h=c.length;f<h;f+=2){const p=c[f],g=c[f+1];if(p.global&&(p.lastIndex=0),p.test(u))return g}return null}}}const k2=new F2;class _d{constructor(e){this.manager=e!==void 0?e:k2,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,n){const i=this;return new Promise(function(r,s){i.load(e,r,n,s)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}_d.DEFAULT_MATERIAL_NAME="__DEFAULT";class B2 extends _d{constructor(e){super(e)}load(e,n,i,r){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=lg.get(e);if(o!==void 0)return s.manager.itemStart(e),setTimeout(function(){n&&n(o),s.manager.itemEnd(e)},0),o;const a=Xo("img");function l(){u(),lg.add(e,this),n&&n(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 H2 extends _d{constructor(e){super(e)}load(e,n,i,r){const s=new yn,o=new B2(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){s.image=a,s.needsUpdate=!0,n!==void 0&&n(s)},i,r),s}}class py{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=cg(),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 n=cg();e=(n-this.oldTime)/1e3,this.oldTime=n,this.elapsedTime+=e}return e}}function cg(){return(typeof performance>"u"?Date:performance).now()}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:fd}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=fd);const z2={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:`

		varying vec2 vUv;

		void main() {

			vUv = uv;
			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

		}`,fragmentShader:`

		uniform float opacity;

		uniform sampler2D tDiffuse;

		varying vec2 vUv;

		void main() {

			vec4 texel = texture2D( tDiffuse, vUv );
			gl_FragColor = opacity * texel;


		}`};class uc{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const V2=new oy(-1,1,1,-1,0,1);class G2 extends hr{constructor(){super(),this.setAttribute("position",new Li([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new Li([0,2,0,0,2,0],2))}}const W2=new G2;class $2{constructor(e){this._mesh=new ui(W2,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,V2)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}class my extends uc{constructor(e,n){super(),this.textureID=n!==void 0?n:"tDiffuse",e instanceof pi?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=ny.clone(e.uniforms),this.material=new pi({name:e.name!==void 0?e.name:"unspecified",defines:Object.assign({},e.defines),uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.fsQuad=new $2(this.material)}render(e,n,i){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=i.texture),this.fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(n),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class ug extends uc{constructor(e,n){super(),this.scene=e,this.camera=n,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(e,n,i){const r=e.getContext(),s=e.state;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0);let o,a;this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),e.setRenderTarget(i),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(n),this.clear&&e.clear(),e.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class X2 extends uc{constructor(){super(),this.needsSwap=!1}render(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}class j2{constructor(e,n){if(this.renderer=e,this._pixelRatio=e.getPixelRatio(),n===void 0){const i=e.getSize(new ot);this._width=i.width,this._height=i.height,n=new ur(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Hs}),n.texture.name="EffectComposer.rt1"}else this._width=n.width,this._height=n.height;this.renderTarget1=n,this.renderTarget2=n.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new my(z2),this.copyPass.material.blending=Ci,this.clock=new py}swapBuffers(){const e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}addPass(e){this.passes.push(e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(e,n){this.passes.splice(n,0,e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(e){const n=this.passes.indexOf(e);n!==-1&&this.passes.splice(n,1)}isLastEnabledPass(e){for(let n=e+1;n<this.passes.length;n++)if(this.passes[n].enabled)return!1;return!0}render(e){e===void 0&&(e=this.clock.getDelta());const n=this.renderer.getRenderTarget();let i=!1;for(let r=0,s=this.passes.length;r<s;r++){const o=this.passes[r];if(o.enabled!==!1){if(o.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(r),o.render(this.renderer,this.writeBuffer,this.readBuffer,e,i),o.needsSwap){if(i){const a=this.renderer.getContext(),l=this.renderer.state.buffers.stencil;l.setFunc(a.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,e),l.setFunc(a.EQUAL,1,4294967295)}this.swapBuffers()}ug!==void 0&&(o instanceof ug?i=!0:o instanceof X2&&(i=!1))}}this.renderer.setRenderTarget(n)}reset(e){if(e===void 0){const n=this.renderer.getSize(new ot);this._pixelRatio=this.renderer.getPixelRatio(),this._width=n.width,this._height=n.height,e=this.renderTarget1.clone(),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=e,this.renderTarget2=e.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}setSize(e,n){this._width=e,this._height=n;const i=this._width*this._pixelRatio,r=this._height*this._pixelRatio;this.renderTarget1.setSize(i,r),this.renderTarget2.setSize(i,r);for(let s=0;s<this.passes.length;s++)this.passes[s].setSize(i,r)}setPixelRatio(e){this._pixelRatio=e,this.setSize(this._width,this._height)}dispose(){this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.copyPass.dispose()}}class q2 extends uc{constructor(e,n,i=null,r=null,s=null){super(),this.scene=e,this.camera=n,this.overrideMaterial=i,this.clearColor=r,this.clearAlpha=s,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new ct}render(e,n,i){const r=e.autoClear;e.autoClear=!1;let s,o;this.overrideMaterial!==null&&(o=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor!==null&&(e.getClearColor(this._oldClearColor),e.setClearColor(this.clearColor)),this.clearAlpha!==null&&(s=e.getClearAlpha(),e.setClearAlpha(this.clearAlpha)),this.clearDepth==!0&&e.clearDepth(),e.setRenderTarget(this.renderToScreen?null:i),this.clear===!0&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),e.render(this.scene,this.camera),this.clearColor!==null&&e.setClearColor(this._oldClearColor),this.clearAlpha!==null&&e.setClearAlpha(s),this.overrideMaterial!==null&&(this.scene.overrideMaterial=o),e.autoClear=r}}const fg=`
    varying vec2 v_uv;

    void main() {
        v_uv = uv;
        vec4 local = vec4(position, 1.0);
        gl_Position = projectionMatrix * modelViewMatrix * local;
    }
`,dg=`
    uniform vec2 u_resolution;
    varying vec2 v_uv;

    void main() {
        gl_FragColor = vec4(vec2(v_uv), 0.0, 1.0);
    }
`,Y2={name:"ThreeShader",inheritAttrs:!1,props:{vertexShader:{type:String,required:!1},fragmentShader:{type:String,required:!1},postProcessingShaders:{type:Array,default:()=>[]},appendedUniforms:{type:Object,default:()=>({})},rendererConfiguration:{type:Object,default:()=>({precision:"lowp",antialias:!1})},texture:{type:String,required:!1},pixelRatio:{type:Number,required:!1},width:{type:Number,required:!1},height:{type:Number,required:!1},autoRender:{type:Boolean,default:!0}},emits:["loaded"],data(){return this.camera=null,this.scene=null,this.composer=null,this.renderer=null,this.renderPass=null,this.postProcessingPasses=[],this.fxaaPass=null,{uniforms:{u_time:{value:0},u_pixelRatio:{value:1},u_canvasResolution:{value:new ot},u_textureResolution:{value:new ot},...this.appendedUniforms},clock:new py,observer:null,widthActual:0,heightActual:0,textureConfiguration:null,textureObject:null,isRendering:!1,isLoaded:!1}},watch:{appendedUniforms:{deep:!0,handler(t){Object.assign(this.uniforms,t)}},uniforms:{deep:!0,handler(t){Object.entries(t).forEach(([e,{value:n}])=>{this.postProcessingPasses.forEach((i,r)=>{this.postProcessingPasses[r].uniforms[e]=n})})}},postProcessingShaders:{deep:!0,handler(t){t.forEach(({uniforms:e},n)=>{e&&Object.entries(e).forEach(([i,{value:r}])=>{var s,o;(o=(s=this.postProcessingPasses[n])==null?void 0:s.uniforms)!=null&&o[i]&&(this.postProcessingPasses[n].uniforms[i].value=r)})})}},width(t){this.camera&&this.renderer&&(this.uniforms.u_canvasResolution.value.x=Math.max(t,128),this.camera.aspect=Math.max(t,128)/Math.max(this.height,128),this.renderer.setSize(Math.max(t,128),Math.max(this.height,128)))},height(t){this.camera&&this.renderer&&(this.uniforms.u_canvasResolution.value.y=Math.max(t,128),this.camera.aspect=Math.max(this.width,128)/Math.max(t,128),this.renderer.setSize(Math.max(this.width,128),Math.max(t,128)))},isRendering(t){t&&this.render()}},async mounted(){await this.initialise(),this.autoRender&&(this.observer=new IntersectionObserver(this.onIntersection),this.observer.observe(this.$el))},beforeUnmount(){var t;(t=this.intersectionObserver)==null||t.disconnect(),this.isRendering=!1,this.isLoaded=!1},methods:{async initialise(){var o;const t=this.texture&&await this.fetchTexture();this.widthActual=this.width??(t==null?void 0:t.width)??256,this.heightActual=this.height??(t==null?void 0:t.height)??256;let e=Math.max(this.widthActual,128),n=Math.max(this.heightActual,128);const i=this.vertexShader??fg,r=this.fragmentShader??dg,s=this.pixelRatio??window.devicePixelRatio;this.scene=new O2,this.camera=new md,this.camera.position.z=1,this.scene.add(new ui(new lc(2,2),new pi({uniforms:this.uniforms,vertexShader:i,fragmentShader:r}))),this.renderer=new hy({...this.rendererConfiguration,canvas:(o=this.$refs)==null?void 0:o.canvas}),this.renderer.setSize(e,n),this.renderer.setPixelRatio(s),this.composer=new j2(this.renderer),this.renderPass=new q2(this.scene,this.camera),this.composer.addPass(this.renderPass),this.postProcessingShaders.forEach(({fragmentShader:a,vertexShader:l,uniforms:c})=>{const u=new my({fragmentShader:a??dg,vertexShader:l??fg,uniforms:{...this.uniforms,...c,tDiffuse:{value:null}}});this.postProcessingPasses.push(u),this.composer.addPass(u)}),this.uniforms.u_canvasResolution.value.x=e,this.uniforms.u_canvasResolution.value.y=n,this.uniforms.u_textureResolution.value.x=t==null?void 0:t.width,this.uniforms.u_textureResolution.value.y=t==null?void 0:t.height,this.uniforms.u_pixelRatio.value=s,this.isLoaded=!0,this.isRendering=!0,this.$emit("loaded")},render(){this.isRendering&&(window.requestAnimationFrame(this.render),this.uniforms.u_time.value=this.clock.getElapsedTime(),this.composer.render())},async fetchTexture(){return new Promise(t=>{new H2().load(this.texture,e=>{var n,i;this.uniforms.u_texture={type:"sampler2D",value:e},t({width:(n=e.image)==null?void 0:n.width,height:(i=e.image)==null?void 0:i.height})})})},onIntersection([{isIntersecting:t}]){this.isRendering=this.isLoaded&&t}}},K2={key:0,class:"c-three-shader__fallback"};function Z2(t,e,n,i,r,s){return Xe(),yt("div",{class:"c-three-shader",style:Un({"--width":r.widthActual&&`${r.widthActual}px`,"--height":r.heightActual&&`${r.heightActual}px`})},[t.$slots.fallback&&!r.isLoaded?(Xe(),yt("div",K2,[As(t.$slots,"fallback")])):hi("",!0),Zg(mt("canvas",{style:Un({opacity:+r.isLoaded}),class:"w-full h-full",ref:"canvas"},il(t.$attrs.alt??""),5),[[A_,r.isLoaded]])],4)}const J2=nc(Y2,[["render",Z2]]);function gy(t){const{route:e,router:n,i18n:i}=t||{};return RR({route:e||Gr(),router:n||gi(),i18n:i||Hr(ft().$i18n)})}function Q2(t){const{route:e,router:n,i18n:i}=t||{};return Jv({route:e||Gr(),router:n||gi(),i18n:i||Hr(ft().$i18n)})}const eO={viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",overflow:"visible","aria-hidden":"true",focusable:"false"},tO=mt("path",{d:"M10.0005 19.544C15.2723 19.544 19.546 15.2704 19.546 9.99858 19.546 4.72677 15.2723.453125 10.0005.453125 4.72872.453125.455078 4.72677.455078 9.99858.455078 15.2704 4.72872 19.544 10.0005 19.544ZM.908203 10H19.09",stroke:"currentColor"},null,-1),nO=mt("path",{d:"M0.455078 10.0012C0.455078 15.2739 4.72781 19.5467 10.0005 19.5467C10.046 19.5467 10.0914 19.5467 10.146 19.5467C12.2187 16.9194 13.4551 13.6103 13.4551 10.0103C13.4551 6.41031 12.2096 3.09213 10.146 0.464858C10.1005 0.464858 10.0551 0.464858 10.0005 0.464858C4.72781 0.455767 0.455078 4.72849 0.455078 10.0012Z",stroke:"currentColor"},null,-1),iO=mt("path",{d:"M9.99947 0.453125C9.95401 0.453125 9.90856 0.453125 9.85401 0.453125C7.78129 3.0804 6.54492 6.38949 6.54492 9.98949C6.54492 13.5895 7.79038 16.8986 9.85401 19.5259C9.89947 19.5259 9.94492 19.5259 9.99947 19.5259C15.2722 19.5259 19.5449 15.2531 19.5449 9.9804C19.5449 4.70767 15.2722 0.453125 9.99947 0.453125Z",stroke:"currentColor"},null,-1),rO=[tO,nO,iO];function sO(t,e){return Xe(),yt("svg",eO,rO)}const oO={render:sO};const aO={class:"px-[4px] group"},lO={key:0,class:Rt(["c-language-picker__choices","duration-200 ease-smooth","flex"])},cO={__name:"LanguagePicker",props:{isCollapsed:Boolean,isOpen:Boolean},setup(t){const{locale:e,locales:n}=dr(),i=Q2(),r=Ge(!1),s=He(()=>n.value.find(({code:a})=>a==e.value)),o=He(()=>n.value.filter(({code:a})=>a!==e.value));return(a,l)=>{const c=cd;return Xe(),yt("div",{class:"c-language-picker flex",onMouseenter:l[0]||(l[0]=()=>r.value=!0),onMouseleave:l[1]||(l[1]=()=>r.value=!1)},[mt("div",aO,[De(c,{ref:"buttons",collapsed:t.isCollapsed&&!t.isOpen&&!pe(r),label:pe(s).name},{icon:Ut(()=>[De(pe(oO))]),_:1},8,["collapsed","label"])]),De(ar,{name:"t-language-picker"},{default:Ut(()=>[pe(r)?(Xe(),yt("div",lO,[(Xe(!0),yt(Lt,null,Hf(pe(o),(u,f)=>(Xe(),yt("div",{key:`locale-${f}`,class:"px-[4px] group"},[De(c,{ref_for:!0,ref:"buttons",tag:"a",label:u.name,href:pe(i)(u.code)},null,8,["label","href"])]))),128))])):hi("",!0)]),_:1})],32)}}},uO=cO;const fO={class:"c-site-navigation"},dO={class:Rt(["u-direction-based","c-site-navigation__container","flex flex-col justify-center h-full","gap-y-xs w-12/12col >=960:w-8/12 mx-auto"])},hO=["textContent"],pO=["onClick"],mO=["textContent"],gO={__name:"SiteNavigation",props:{isOpen:{type:Boolean,default:!1}},emits:["close"],setup(t,{emit:e}){const n=gy(),i=ic(),r=Gr(),s=Ge([{label:"hidden-voices",url:"/"},{label:"share-your-story",onClick:o},{label:"acts-of-oppression",url:"/timeline"},{label:"about",url:"/about"}]);Ot(()=>r.path,()=>e("close"));function o(){i.setShareModalOpen(!0),e("close")}return(a,l)=>{const c=Ds;return Xe(),yt("div",fO,[De(ar,{name:"t-site-navigation",duration:800+pe(s).length*100},{default:Ut(()=>[Zg(mt("nav",{style:Un(`--amount: ${pe(s).length}`),class:Rt(["fixed top-[0px] left-[0px] z-40","w-full h-full bg-strong text-strong"])},[mt("div",dO,[(Xe(!0),yt(Lt,null,Hf(pe(s),(u,f)=>(Xe(),yt(Lt,{key:`item-${f}`},[u.url?(Xe(),nn(c,{key:0,to:pe(n)(u.url),style:Un(`--index: ${f}`),class:Rt(["relative overflow-hidden","font-gt-america-extended font-medium","uppercase text-h1 w-fit py-[.1em]","hover:underline underline-offset-[.2em]","duration-300 ease-smooth"])},{default:Ut(()=>[mt("div",{class:"origin-bottom-left",textContent:il(a.$t(u.label))},null,8,hO)]),_:2},1032,["to","style"])):(Xe(),yt("button",{key:1,style:Un(`--index: ${f}`),class:Rt(["block relative overflow-hidden","font-gt-america-extended font-medium","uppercase text-h1 h-fit w-fit py-[.1em]","hover:underline underline-offset-[.2em]"]),onClick:u.onClick},[mt("div",{class:"origin-bottom-left",textContent:il(a.$t(u.label))},null,8,mO)],12,pO))],64))),128))])],4),[[A_,t.isOpen]])]),_:1},8,["duration"])])}}},_O=gO;function vd(...t){return Fn(EL(...t))}function _y(){const t=vd(0,0),e=()=>{t.value[0]=window.innerWidth,t.value[1]=window.innerHeight};return ei(()=>(window.addEventListener("resize",e),e())),Ii(()=>window.removeEventListener("resize",e)),t}function vO(t,e){const n=_y(),i=vd(...t??[.5,.5]),r=s=>{i.value[0]=s.clientX/(e?n.value[0]:1),i.value[1]=s.clientY/(e?n.value[1]:1)};return ei(()=>window.addEventListener("mousemove",r)),Ii(()=>window.removeEventListener("mousemove",r)),i}const hg=`#define F3 0.3333333
#define G3 0.1666667

varying vec2 v_uv;

uniform vec2 u_mouse;
uniform vec2 u_textureResolution;
uniform vec2 u_canvasResolution;

uniform float u_modifier;
uniform float u_percentage;
uniform float u_pixelRatio;

uniform sampler2D u_texture;


float random2(in vec2 st) {
    return fract(sin(dot(st.xy,vec2(12.9898,78.233))) * 43758.5453123);
}

vec3 random3(vec3 c) {
	float j = 4096.0*sin(dot(c,vec3(17.0, 59.4, 15.0)));
	vec3 r;
	r.z = fract(512.0*j);
	j *= .125;
	r.x = fract(512.0*j);
	j *= .125;
	r.y = fract(512.0*j);
	return r-0.5;
}


/**
	Simplex noise function made by smarter people than me.
	https://thebookofshaders.com/edit.php#11/2d-snoise-clear.frag
*/
float simplex3d(vec3 p) {
	 vec3 s = floor(p + dot(p, vec3(F3)));
	 vec3 x = p - s + dot(s, vec3(G3));
	 
	 vec3 e = step(vec3(0.0), x - x.yzx);
	 vec3 i1 = e*(1.0 - e.zxy);
	 vec3 i2 = 1.0 - e.zxy*(1.0 - e);
	 	
	 vec3 x1 = x - i1 + G3;
	 vec3 x2 = x - i2 + 2.0*G3;
	 vec3 x3 = x - 1.0 + 3.0*G3;
	 
	 vec4 w, d;
	 
	 w.x = dot(x, x);
	 w.y = dot(x1, x1);
	 w.z = dot(x2, x2);
	 w.w = dot(x3, x3);
	 w = max(0.6 - w, 0.0);
	 
	 d.x = dot(random3(s), x);
	 d.y = dot(random3(s + i1), x1);
	 d.z = dot(random3(s + i2), x2);
	 d.w = dot(random3(s + 1.0), x3);
	 
	 w *= w;
	 w *= w;
	 d *= w;
	 
	 return dot(d, vec4(52.0));
}


void main() {    
    vec2 coords = v_uv;

    float random = random2(coords);
    float noise = simplex3d(vec3(coords, 0.0));

    vec2 mouseDelta = vec2(
        (coords.x - u_mouse.x) * u_canvasResolution.x,
        (coords.y - u_mouse.y) * u_canvasResolution.y
    );

    float mouseDistance = sqrt(
        mouseDelta.x * mouseDelta.x + 
        mouseDelta.y * mouseDelta.y
    ) / u_canvasResolution.x;

    float randomDirection = random * 3.14 * 2.0;
    float randomDistance = random * mouseDistance;

    coords.x += (cos(randomDirection) * randomDistance * 40.0 / u_textureResolution.x) * u_modifier;
    coords.y += (sin(randomDirection) * randomDistance * 40.0 / u_textureResolution.y) * u_modifier;

    coords.x += (sin(noise * 3.14 * 2.0 * 10.0) * mouseDistance * 10.0 / u_textureResolution.x) * u_modifier;
    coords.y += (cos(noise * 3.14 * 2.0 * 10.0) * mouseDistance * 10.0 / u_textureResolution.y) * u_modifier;

    float color = texture2D(u_texture, coords).a;
    gl_FragColor = vec4(vec3(0.0), round(color));
}
`,yO={viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false"},xO=mt("path",{d:"M3 6H17M3 10H17M3 14H17",stroke:"currentColor"},null,-1),SO=[xO];function EO(t,e){return Xe(),yt("svg",yO,SO)}const bO={render:EO},MO={class:"c-site-header"},TO={class:"fixed flex top-md >=960:top-lg left-layout-margin z-50"},wO={class:"px-[4px] group"},AO={__name:"SiteHeader",setup(t){const e=gy(),n=ic(),i=Gr(),r=Ge(!1),s=Ge(i.path===e("/")),o=Ge(n.headerOpaque&&s.value),a=Ge(!1),l=Ge(!1),c=_y(),u=vO([0,0]),f=vd(0,0),h=yL(.8,0,.2,1),p=Ge({u_mouse:{value:[0,0]},u_modifier:{value:0}}),g=Ge({u_mouse:{value:[0,0]},u_modifier:{value:0}}),_=Ge(),m=Ge();return ei(()=>{s.value&&n.setHeaderOpaque(!0),setTimeout(()=>{r.value=!0},700)}),I0((d,v)=>{var y,x,S,C;if(f.interpolate(u,.0025*d),_.value.$el){const R=(x=(y=_.value)==null?void 0:y.$el)==null?void 0:x.getBoundingClientRect(),I=(f.value[0]-R.left)/R.width,b=1-(f.value[1]-R.top)/R.height;p.value.u_mouse.value=[I,b]}if(m.value.$el){const R=(C=(S=m.value)==null?void 0:S.$el)==null?void 0:C.getBoundingClientRect(),I=(f.value[0]-R.left)/R.width,b=1-(f.value[1]-R.top)/R.height;g.value.u_mouse.value=[I,b]}p.value.u_modifier.value=h(Math.min(Math.max((v-1500)/2e3,0),1)*(c.value[0]>=960&&s.value?1:.35)),g.value.u_modifier.value=h(Math.min(Math.max((v-1500)/2e3,0),1)*(c.value[0]>=960&&s.value?1:.35))}),Ot(()=>n.headerOpaque,d=>{o.value=!s.value||d}),(d,v)=>{const y=J2,x=Ds,S=cd,C=uO,R=_O;return Xe(),yt("div",MO,[De(x,{class:Rt(["fixed top-md >=960:top-lg right-layout-margin","translate-x-[7%] z-20","duration-1000 ease-heavy-in-out",{"opacity-10":!pe(o)&&pe(r),"-translate-y-[20%]":pe(r),"-translate-y-[400px]":!pe(r)}]),to:pe(e)("/")},{default:Ut(()=>[De(y,{ref_key:"elementAfter",ref:_,texture:"/after.png","fragment-shader":pe(hg),width:Math.floor(1584*(pe(s)?.55:.125)*(pe(s)?pe(c).value[0]/1800:1)),height:Math.floor(454*(pe(s)?.55:.125)*(pe(s)?pe(c).value[0]/1800:1)),"appended-uniforms":pe(p)},null,8,["fragment-shader","width","height","appended-uniforms"])]),_:1},8,["class","to"]),De(x,{class:Rt(["fixed bottom-md >=960:bottom-lg left-layout-margin","-translate-x-[7%] z-20","duration-1000 ease-heavy-in-out",{"opacity-10":!pe(o)&&pe(r),"translate-y-[20%]":pe(r),"translate-y-[400px]":!pe(r)}]),to:pe(e)("/")},{default:Ut(()=>[De(y,{ref_key:"elementAugust",ref:m,texture:"/august.png","fragment-shader":pe(hg),width:Math.floor(1924*(pe(s)?.55:.125)*(pe(s)?pe(c).value[0]/1800:1)),height:Math.floor(468*(pe(s)?.55:.125)*(pe(s)?pe(c).value[0]/1800:1)),"appended-uniforms":pe(g)},null,8,["fragment-shader","width","height","appended-uniforms"])]),_:1},8,["class","to"]),mt("div",TO,[mt("div",wO,[De(S,{class:"w-[38px]",onClick:v[0]||(v[0]=()=>l.value=!pe(l))},{icon:Ut(()=>[pe(l)?(Xe(),nn(pe(R0),{key:"cross"})):(Xe(),nn(pe(bO),{key:"menu"}))]),_:1})]),De(C,{class:Rt(["duration-300 ease-smooth-out",{"opacity-0 pointer-events-none":!pe(l)}]),"is-collapsed":pe(a),"is-open":pe(l)},null,8,["class","is-collapsed","is-open"])]),De(R,{"is-open":pe(l),class:"z-40",onClose:v[1]||(v[1]=()=>l.value=!1)},null,8,["is-open"])])}}},RO=AO,CO=mt("div",{class:Rt(["absolute top-1/2 left-1/2","-translate-x-1/2 -translate-y-1/2","flex flex-col gap-y-md","w-10/12col"])},[mt("div",null,[mt("h1",{class:"text-h2"},"An error occured."),mt("span",{class:"text-body"}," Please try again later, or go back to the frontpage. ")])],-1),LO={__name:"error",setup(t){const{direction:e}=ud();return(n,i)=>{const r=T0,s=w0,o=RO,a=C0,l=L0,c=P0;return Xe(),yt("div",{style:Un(`--dir: ${pe(e)}`)},[De(r),De(s),De(o),De(a),CO,De(c,null,{default:Ut(()=>[De(l)]),_:1})],4)}}},PO=LO,IO={__name:"nuxt-root",setup(t){const e=()=>null,n=ft(),i=n.deferHydration(),r=!1;bs(Vl,Gr()),n.hooks.callHookWith(a=>a.map(l=>l()),"vue:setup");const s=Gl();o_((a,l,c)=>{if(n.hooks.callHook("vue:error",a,l,c).catch(u=>console.error("[nuxt] Error in `vue:error` hook",u)),gM(a)&&(a.fatal||a.unhandled))return n.runWithContext(()=>ms(a)),!1});const{islandContext:o}=!1;return(a,l)=>(Xe(),nn(qg,{onResolve:pe(i)},{default:Ut(()=>[pe(s)?(Xe(),nn(pe(PO),{key:0,error:pe(s)},null,8,["error"])):pe(o)?(Xe(),nn(pe(e),{key:1,context:pe(o)},null,8,["context"])):pe(r)?(Xe(),nn(Zo(pe(r)),{key:2})):(Xe(),nn(pe(LL),{key:3}))]),_:1},8,["onResolve"]))}},pg=IO;globalThis.$fetch||(globalThis.$fetch=NE.create({baseURL:OE()}));let mg;{let t;mg=async function(){var s,o;if(t)return t;const i=!!((s=window.__NUXT__)!=null&&s.serverRendered||((o=document.getElementById("__NUXT_DATA__"))==null?void 0:o.dataset.ssr)==="true")?ZS(pg):KS(pg),r=YE({vueApp:i});try{await ZE(r,g1)}catch(a){await r.callHook("app:error",a),r.payload.error=r.payload.error||a}try{await r.hooks.callHook("app:created",i),await r.hooks.callHook("app:beforeMount",i),i.mount("#"+Zb),await r.hooks.callHook("app:mounted",i),await mi()}catch(a){await r.callHook("app:error",a),r.payload.error=r.payload.error||a}return i},t=mg().catch(e=>{console.error("Error while mounting app:",e)})}export{js as $,Un as A,E_ as B,cd as C,Ft as D,_y as E,Lt as F,He as G,W1 as H,Ot as I,Fl as J,b0 as K,SL as L,As as M,_v as N,qs as O,Bp as P,Gr as Q,Zo as R,_a as S,ar as T,Tt as U,gy as V,ai as W,J_ as X,DO as Y,FO as Z,nc as _,gi as a,ah as a0,Jo as a1,Bl as a2,lM as a3,Hl as a4,ft as a5,$t as a6,Et as a7,ao as a8,hS as a9,RO as aa,K1 as ab,kO as ac,E1 as ad,ut as ae,R0 as af,Xx as ag,zl as b,yt as c,Xe as d,UO as e,mt as f,OO as g,ud as h,nn as i,Ut as j,J1 as k,pe as l,hi as m,Rt as n,ei as o,NO as p,De as q,Ds as r,dr as s,il as t,Ks as u,ic as v,qx as w,Z1 as x,Ge as y,Hf as z};