PersonalPage/dist/assets/index-Dto0pvWn.js

3852 lines
950 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const r of a)if(r.type==="childList")for(const s of r.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function n(a){const r={};return a.integrity&&(r.integrity=a.integrity),a.referrerPolicy&&(r.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?r.credentials="include":a.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(a){if(a.ep)return;a.ep=!0;const r=n(a);fetch(a.href,r)}})();/**
* @vue/shared v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**//*! #__NO_SIDE_EFFECTS__ */function xh(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const At={},As=[],Ti=()=>{},yS=()=>!1,Gu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Sh=e=>e.startsWith("onUpdate:"),ln=Object.assign,Mh=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},_S=Object.prototype.hasOwnProperty,Et=(e,t)=>_S.call(e,t),Ze=Array.isArray,Ps=e=>Wu(e)==="[object Map]",jp=e=>Wu(e)==="[object Set]",tt=e=>typeof e=="function",Wt=e=>typeof e=="string",Xa=e=>typeof e=="symbol",Lt=e=>e!==null&&typeof e=="object",Kp=e=>(Lt(e)||tt(e))&&tt(e.then)&&tt(e.catch),Zp=Object.prototype.toString,Wu=e=>Zp.call(e),bS=e=>Wu(e).slice(8,-1),Jp=e=>Wu(e)==="[object Object]",Eh=e=>Wt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,xo=xh(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),$u=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},xS=/-(\w)/g,Xn=$u(e=>e.replace(xS,(t,n)=>n?n.toUpperCase():"")),SS=/\B([A-Z])/g,Ya=$u(e=>e.replace(SS,"-$1").toLowerCase()),Hi=$u(e=>e.charAt(0).toUpperCase()+e.slice(1)),Fc=$u(e=>e?`on${Hi(e)}`:""),Oa=(e,t)=>!Object.is(e,t),ru=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Qp=(e,t,n,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:n})},Nd=e=>{const t=parseFloat(e);return isNaN(t)?e:t},MS=e=>{const t=Wt(e)?Number(e):NaN;return isNaN(t)?e:t};let rv;const Xu=()=>rv||(rv=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Er(e){if(Ze(e)){const t={};for(let n=0;n<e.length;n++){const i=e[n],a=Wt(i)?CS(i):Er(i);if(a)for(const r in a)t[r]=a[r]}return t}else if(Wt(e)||Lt(e))return e}const ES=/;(?![^(]*\))/g,wS=/:([^]+)/,TS=/\/\*[^]*?\*\//g;function CS(e){const t={};return e.replace(TS,"").split(ES).forEach(n=>{if(n){const i=n.split(wS);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function Ir(e){let t="";if(Wt(e))t=e;else if(Ze(e))for(let n=0;n<e.length;n++){const i=Ir(e[n]);i&&(t+=i+" ")}else if(Lt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const AS="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",PS=xh(AS);function ey(e){return!!e||e===""}const ty=e=>!!(e&&e.__v_isRef===!0),hi=e=>Wt(e)?e:e==null?"":Ze(e)||Lt(e)&&(e.toString===Zp||!tt(e.toString))?ty(e)?hi(e.value):JSON.stringify(e,ny,2):String(e),ny=(e,t)=>ty(t)?ny(e,t.value):Ps(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[i,a],r)=>(n[Nc(i,r)+" =>"]=a,n),{})}:jp(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Nc(n))}:Xa(t)?Nc(t):Lt(t)&&!Ze(t)&&!Jp(t)?String(t):t,Nc=(e,t="")=>{var n;return Xa(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
* @vue/reactivity v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Fn;class iy{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Fn,!t&&Fn&&(this.index=(Fn.scopes||(Fn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Fn;try{return Fn=this,t()}finally{Fn=n}}}on(){Fn=this}off(){Fn=this.parent}stop(t){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(this.effects.length=0,n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,i=this.scopes.length;n<i;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const a=this.parent.scopes.pop();a&&a!==this&&(this.parent.scopes[this.index]=a,a.index=this.index)}this.parent=void 0}}}function wh(e){return new iy(e)}function ay(){return Fn}function Sn(e,t=!1){Fn&&Fn.cleanups.push(e)}let Dt;const Oc=new WeakSet;class ry{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Fn&&Fn.active&&Fn.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Oc.has(this)&&(Oc.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||oy(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,sv(this),ly(this);const t=Dt,n=Ci;Dt=this,Ci=!0;try{return this.fn()}finally{uy(this),Dt=t,Ci=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ah(t);this.deps=this.depsTail=void 0,sv(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Oc.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Od(this)&&this.run()}get dirty(){return Od(this)}}let sy=0,So,Mo;function oy(e,t=!1){if(e.flags|=8,t){e.next=Mo,Mo=e;return}e.next=So,So=e}function Th(){sy++}function Ch(){if(--sy>0)return;if(Mo){let t=Mo;for(Mo=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;So;){let t=So;for(So=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=n}}if(e)throw e}function ly(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function uy(e){let t,n=e.depsTail,i=n;for(;i;){const a=i.prevDep;i.version===-1?(i===n&&(n=a),Ah(i),RS(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=a}e.deps=t,e.depsTail=n}function Od(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(cy(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function cy(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Po))return;e.globalVersion=Po;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Od(e)){e.flags&=-3;return}const n=Dt,i=Ci;Dt=e,Ci=!0;try{ly(e);const a=e.fn(e._value);(t.version===0||Oa(a,e._value))&&(e._value=a,t.version++)}catch(a){throw t.version++,a}finally{Dt=n,Ci=i,uy(e),e.flags&=-3}}function Ah(e,t=!1){const{dep:n,prevSub:i,nextSub:a}=e;if(i&&(i.nextSub=a,e.prevSub=void 0),a&&(a.prevSub=i,e.nextSub=void 0),n.subs===e&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)Ah(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function RS(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ci=!0;const dy=[];function qa(){dy.push(Ci),Ci=!1}function ja(){const e=dy.pop();Ci=e===void 0?!0:e}function sv(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Dt;Dt=void 0;try{t()}finally{Dt=n}}}let Po=0;class IS{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ph{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!Dt||!Ci||Dt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Dt)n=this.activeLink=new IS(Dt,this),Dt.deps?(n.prevDep=Dt.depsTail,Dt.depsTail.nextDep=n,Dt.depsTail=n):Dt.deps=Dt.depsTail=n,fy(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=Dt.depsTail,n.nextDep=void 0,Dt.depsTail.nextDep=n,Dt.depsTail=n,Dt.deps===n&&(Dt.deps=i)}return n}trigger(t){this.version++,Po++,this.notify(t)}notify(t){Th();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Ch()}}}function fy(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)fy(i)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const _u=new WeakMap,wr=Symbol(""),Ud=Symbol(""),Ro=Symbol("");function Tn(e,t,n){if(Ci&&Dt){let i=_u.get(e);i||_u.set(e,i=new Map);let a=i.get(n);a||(i.set(n,a=new Ph),a.map=i,a.key=n),a.track()}}function ta(e,t,n,i,a,r){const s=_u.get(e);if(!s){Po++;return}const o=l=>{l&&l.trigger()};if(Th(),t==="clear")s.forEach(o);else{const l=Ze(e),u=l&&Eh(n);if(l&&n==="length"){const c=Number(i);s.forEach((d,f)=>{(f==="length"||f===Ro||!Xa(f)&&f>=c)&&o(d)})}else switch((n!==void 0||s.has(void 0))&&o(s.get(n)),u&&o(s.get(Ro)),t){case"add":l?u&&o(s.get("length")):(o(s.get(wr)),Ps(e)&&o(s.get(Ud)));break;case"delete":l||(o(s.get(wr)),Ps(e)&&o(s.get(Ud)));break;case"set":Ps(e)&&o(s.get(wr));break}}Ch()}function DS(e,t){const n=_u.get(e);return n&&n.get(t)}function as(e){const t=Ye(e);return t===e?t:(Tn(t,"iterate",Ro),fi(e)?t:t.map(Cn))}function Yu(e){return Tn(e=Ye(e),"iterate",Ro),e}const LS={__proto__:null,[Symbol.iterator](){return Uc(this,Symbol.iterator,Cn)},concat(...e){return as(this).concat(...e.map(t=>Ze(t)?as(t):t))},entries(){return Uc(this,"entries",e=>(e[1]=Cn(e[1]),e))},every(e,t){return Yi(this,"every",e,t,void 0,arguments)},filter(e,t){return Yi(this,"filter",e,t,n=>n.map(Cn),arguments)},find(e,t){return Yi(this,"find",e,t,Cn,arguments)},findIndex(e,t){return Yi(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Yi(this,"findLast",e,t,Cn,arguments)},findLastIndex(e,t){return Yi(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Yi(this,"forEach",e,t,void 0,arguments)},includes(...e){return Bc(this,"includes",e)},indexOf(...e){return Bc(this,"indexOf",e)},join(e){return as(this).join(e)},lastIndexOf(...e){return Bc(this,"lastIndexOf",e)},map(e,t){return Yi(this,"map",e,t,void 0,arguments)},pop(){return ro(this,"pop")},push(...e){return ro(this,"push",e)},reduce(e,...t){return ov(this,"reduce",e,t)},reduceRight(e,...t){return ov(this,"reduceRight",e,t)},shift(){return ro(this,"shift")},some(e,t){return Yi(this,"some",e,t,void 0,arguments)},splice(...e){return ro(this,"splice",e)},toReversed(){return as(this).toReversed()},toSorted(e){return as(this).toSorted(e)},toSpliced(...e){return as(this).toSpliced(...e)},unshift(...e){return ro(this,"unshift",e)},values(){return Uc(this,"values",Cn)}};function Uc(e,t,n){const i=Yu(e),a=i[t]();return i!==e&&!fi(e)&&(a._next=a.next,a.next=()=>{const r=a._next();return r.value&&(r.value=n(r.value)),r}),a}const kS=Array.prototype;function Yi(e,t,n,i,a,r){const s=Yu(e),o=s!==e&&!fi(e),l=s[t];if(l!==kS[t]){const d=l.apply(e,r);return o?Cn(d):d}let u=n;s!==e&&(o?u=function(d,f){return n.call(this,Cn(d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=l.call(s,u,i);return o&&a?a(c):c}function ov(e,t,n,i){const a=Yu(e);let r=n;return a!==e&&(fi(e)?n.length>3&&(r=function(s,o,l){return n.call(this,s,o,l,e)}):r=function(s,o,l){return n.call(this,s,Cn(o),l,e)}),a[t](r,...i)}function Bc(e,t,n){const i=Ye(e);Tn(i,"iterate",Ro);const a=i[t](...n);return(a===-1||a===!1)&&Dh(n[0])?(n[0]=Ye(n[0]),i[t](...n)):a}function ro(e,t,n=[]){qa(),Th();const i=Ye(e)[t].apply(e,n);return Ch(),ja(),i}const VS=xh("__proto__,__v_isRef,__isVue"),hy=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Xa));function FS(e){Xa(e)||(e=String(e));const t=Ye(this);return Tn(t,"has",e),t.hasOwnProperty(e)}class my{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,i){if(n==="__v_skip")return t.__v_skip;const a=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!a;if(n==="__v_isReadonly")return a;if(n==="__v_isShallow")return r;if(n==="__v_raw")return i===(a?r?XS:yy:r?py:gy).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const s=Ze(t);if(!a){let l;if(s&&(l=LS[n]))return l;if(n==="hasOwnProperty")return FS}const o=Reflect.get(t,n,Ut(t)?t:i);return(Xa(n)?hy.has(n):VS(n))||(a||Tn(t,"get",n),r)?o:Ut(o)?s&&Eh(n)?o:o.value:Lt(o)?a?jo(o):_n(o):o}}class vy extends my{constructor(t=!1){super(!1,t)}set(t,n,i,a){let r=t[n];if(!this._isShallow){const l=Dr(r);if(!fi(i)&&!Dr(i)&&(r=Ye(r),i=Ye(i)),!Ze(t)&&Ut(r)&&!Ut(i))return l?!1:(r.value=i,!0)}const s=Ze(t)&&Eh(n)?Number(n)<t.length:Et(t,n),o=Reflect.set(t,n,i,Ut(t)?t:a);return t===Ye(a)&&(s?Oa(i,r)&&ta(t,"set",n,i):ta(t,"add",n,i)),o}deleteProperty(t,n){const i=Et(t,n);t[n];const a=Reflect.deleteProperty(t,n);return a&&i&&ta(t,"delete",n,void 0),a}has(t,n){const i=Reflect.has(t,n);return(!Xa(n)||!hy.has(n))&&Tn(t,"has",n),i}ownKeys(t){return Tn(t,"iterate",Ze(t)?"length":wr),Reflect.ownKeys(t)}}class NS extends my{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const OS=new vy,US=new NS,BS=new vy(!0);const Bd=e=>e,Sl=e=>Reflect.getPrototypeOf(e);function zS(e,t,n){return function(...i){const a=this.__v_raw,r=Ye(a),s=Ps(r),o=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,u=a[e](...i),c=n?Bd:t?zd:Cn;return!t&&Tn(r,"iterate",l?Ud:wr),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:o?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Ml(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function HS(e,t){const n={get(a){const r=this.__v_raw,s=Ye(r),o=Ye(a);e||(Oa(a,o)&&Tn(s,"get",a),Tn(s,"get",o));const{has:l}=Sl(s),u=t?Bd:e?zd:Cn;if(l.call(s,a))return u(r.get(a));if(l.call(s,o))return u(r.get(o));r!==s&&r.get(a)},get size(){const a=this.__v_raw;return!e&&Tn(Ye(a),"iterate",wr),Reflect.get(a,"size",a)},has(a){const r=this.__v_raw,s=Ye(r),o=Ye(a);return e||(Oa(a,o)&&Tn(s,"has",a),Tn(s,"has",o)),a===o?r.has(a):r.has(a)||r.has(o)},forEach(a,r){const s=this,o=s.__v_raw,l=Ye(o),u=t?Bd:e?zd:Cn;return!e&&Tn(l,"iterate",wr),o.forEach((c,d)=>a.call(r,u(c),u(d),s))}};return ln(n,e?{add:Ml("add"),set:Ml("set"),delete:Ml("delete"),clear:Ml("clear")}:{add(a){!t&&!fi(a)&&!Dr(a)&&(a=Ye(a));const r=Ye(this);return Sl(r).has.call(r,a)||(r.add(a),ta(r,"add",a,a)),this},set(a,r){!t&&!fi(r)&&!Dr(r)&&(r=Ye(r));const s=Ye(this),{has:o,get:l}=Sl(s);let u=o.call(s,a);u||(a=Ye(a),u=o.call(s,a));const c=l.call(s,a);return s.set(a,r),u?Oa(r,c)&&ta(s,"set",a,r):ta(s,"add",a,r),this},delete(a){const r=Ye(this),{has:s,get:o}=Sl(r);let l=s.call(r,a);l||(a=Ye(a),l=s.call(r,a)),o&&o.call(r,a);const u=r.delete(a);return l&&ta(r,"delete",a,void 0),u},clear(){const a=Ye(this),r=a.size!==0,s=a.clear();return r&&ta(a,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(a=>{n[a]=zS(a,e,t)}),n}function Rh(e,t){const n=HS(e,t);return(i,a,r)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?i:Reflect.get(Et(n,a)&&a in i?n:i,a,r)}const GS={get:Rh(!1,!1)},WS={get:Rh(!1,!0)},$S={get:Rh(!0,!1)};const gy=new WeakMap,py=new WeakMap,yy=new WeakMap,XS=new WeakMap;function YS(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function qS(e){return e.__v_skip||!Object.isExtensible(e)?0:YS(bS(e))}function _n(e){return Dr(e)?e:Ih(e,!1,OS,GS,gy)}function jS(e){return Ih(e,!1,BS,WS,py)}function jo(e){return Ih(e,!0,US,$S,yy)}function Ih(e,t,n,i,a){if(!Lt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=a.get(e);if(r)return r;const s=qS(e);if(s===0)return e;const o=new Proxy(e,s===2?i:n);return a.set(e,o),o}function Rs(e){return Dr(e)?Rs(e.__v_raw):!!(e&&e.__v_isReactive)}function Dr(e){return!!(e&&e.__v_isReadonly)}function fi(e){return!!(e&&e.__v_isShallow)}function Dh(e){return e?!!e.__v_raw:!1}function Ye(e){const t=e&&e.__v_raw;return t?Ye(t):e}function _y(e){return!Et(e,"__v_skip")&&Object.isExtensible(e)&&Qp(e,"__v_skip",!0),e}const Cn=e=>Lt(e)?_n(e):e,zd=e=>Lt(e)?jo(e):e;function Ut(e){return e?e.__v_isRef===!0:!1}function _e(e){return by(e,!1)}function Me(e){return by(e,!0)}function by(e,t){return Ut(e)?e:new KS(e,t)}class KS{constructor(t,n){this.dep=new Ph,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Ye(t),this._value=n?t:Cn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,i=this.__v_isShallow||fi(t)||Dr(t);t=i?t:Ye(t),Oa(t,n)&&(this._rawValue=t,this._value=i?t:Cn(t),this.dep.trigger())}}function on(e){return Ut(e)?e.value:e}function Ua(e){return tt(e)?e():on(e)}const ZS={get:(e,t,n)=>t==="__v_raw"?e:on(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const a=e[t];return Ut(a)&&!Ut(n)?(a.value=n,!0):Reflect.set(e,t,n,i)}};function xy(e){return Rs(e)?e:new Proxy(e,ZS)}function Wr(e){const t=Ze(e)?new Array(e.length):{};for(const n in e)t[n]=Sy(e,n);return t}class JS{constructor(t,n,i){this._object=t,this._key=n,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return DS(Ye(this._object),this._key)}}class QS{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function se(e,t,n){return Ut(e)?e:tt(e)?new QS(e):Lt(e)&&arguments.length>1?Sy(e,t,n):_e(e)}function Sy(e,t,n){const i=e[t];return Ut(i)?i:new JS(e,t,n)}class eM{constructor(t,n,i){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Ph(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Po-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Dt!==this)return oy(this,!0),!0}get value(){const t=this.dep.track();return cy(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function tM(e,t,n=!1){let i,a;return tt(e)?i=e:(i=e.get,a=e.set),new eM(i,a,n)}const El={},bu=new WeakMap;let hr;function nM(e,t=!1,n=hr){if(n){let i=bu.get(n);i||bu.set(n,i=[]),i.push(e)}}function iM(e,t,n=At){const{immediate:i,deep:a,once:r,scheduler:s,augmentJob:o,call:l}=n,u=x=>a?x:fi(x)||a===!1||a===0?na(x,1):na(x);let c,d,f,h,g=!1,p=!1;if(Ut(e)?(d=()=>e.value,g=fi(e)):Rs(e)?(d=()=>u(e),g=!0):Ze(e)?(p=!0,g=e.some(x=>Rs(x)||fi(x)),d=()=>e.map(x=>{if(Ut(x))return x.value;if(Rs(x))return u(x);if(tt(x))return l?l(x,2):x()})):tt(e)?t?d=l?()=>l(e,2):e:d=()=>{if(f){qa();try{f()}finally{ja()}}const x=hr;hr=c;try{return l?l(e,3,[h]):e(h)}finally{hr=x}}:d=Ti,t&&a){const x=d,C=a===!0?1/0:a;d=()=>na(x(),C)}const m=ay(),v=()=>{c.stop(),m&&m.active&&Mh(m.effects,c)};if(r&&t){const x=t;t=(...C)=>{x(...C),v()}}let _=p?new Array(e.length).fill(El):El;const M=x=>{if(!(!(c.flags&1)||!c.dirty&&!x))if(t){const C=c.run();if(a||g||(p?C.some((T,P)=>Oa(T,_[P])):Oa(C,_))){f&&f();const T=hr;hr=c;try{const P=[C,_===El?void 0:p&&_[0]===El?[]:_,h];l?l(t,3,P):t(...P),_=C}finally{hr=T}}}else c.run()};return o&&o(M),c=new ry(d),c.scheduler=s?()=>s(M,!1):M,h=x=>nM(x,!1,c),f=c.onStop=()=>{const x=bu.get(c);if(x){if(l)l(x,4);else for(const C of x)C();bu.delete(c)}},t?i?M(!0):_=c.run():s?s(M.bind(null,!0),!0):c.run(),v.pause=c.pause.bind(c),v.resume=c.resume.bind(c),v.stop=v,v}function na(e,t=1/0,n){if(t<=0||!Lt(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Ut(e))na(e.value,t,n);else if(Ze(e))for(let i=0;i<e.length;i++)na(e[i],t,n);else if(jp(e)||Ps(e))e.forEach(i=>{na(i,t,n)});else if(Jp(e)){for(const i in e)na(e[i],t,n);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&na(e[i],t,n)}return e}/**
* @vue/runtime-core v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Ko(e,t,n,i){try{return i?e(...i):e()}catch(a){qu(a,t,n)}}function Pi(e,t,n,i){if(tt(e)){const a=Ko(e,t,n,i);return a&&Kp(a)&&a.catch(r=>{qu(r,t,n)}),a}if(Ze(e)){const a=[];for(let r=0;r<e.length;r++)a.push(Pi(e[r],t,n,i));return a}}function qu(e,t,n,i=!0){const a=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||At;if(t){let o=t.parent;const l=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const c=o.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,l,u)===!1)return}o=o.parent}if(r){qa(),Ko(r,null,10,[e,l,u]),ja();return}}aM(e,n,a,i,s)}function aM(e,t,n,i=!0,a=!1){if(a)throw e;console.error(e)}const Nn=[];let Vi=-1;const Is=[];let Da=null,Ms=0;const My=Promise.resolve();let xu=null;function ft(e){const t=xu||My;return e?t.then(this?e.bind(this):e):t}function rM(e){let t=Vi+1,n=Nn.length;for(;t<n;){const i=t+n>>>1,a=Nn[i],r=Io(a);r<e||r===e&&a.flags&2?t=i+1:n=i}return t}function Lh(e){if(!(e.flags&1)){const t=Io(e),n=Nn[Nn.length-1];!n||!(e.flags&2)&&t>=Io(n)?Nn.push(e):Nn.splice(rM(t),0,e),e.flags|=1,Ey()}}function Ey(){xu||(xu=My.then(Cy))}function wy(e){Ze(e)?Is.push(...e):Da&&e.id===-1?Da.splice(Ms+1,0,e):e.flags&1||(Is.push(e),e.flags|=1),Ey()}function lv(e,t,n=Vi+1){for(;n<Nn.length;n++){const i=Nn[n];if(i&&i.flags&2){if(e&&i.id!==e.uid)continue;Nn.splice(n,1),n--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function Ty(e){if(Is.length){const t=[...new Set(Is)].sort((n,i)=>Io(n)-Io(i));if(Is.length=0,Da){Da.push(...t);return}for(Da=t,Ms=0;Ms<Da.length;Ms++){const n=Da[Ms];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Da=null,Ms=0}}const Io=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Cy(e){try{for(Vi=0;Vi<Nn.length;Vi++){const t=Nn[Vi];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Ko(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Vi<Nn.length;Vi++){const t=Nn[Vi];t&&(t.flags&=-2)}Vi=-1,Nn.length=0,Ty(),xu=null,(Nn.length||Is.length)&&Cy()}}let Un=null,Ay=null;function Su(e){const t=Un;return Un=e,Ay=e&&e.type.__scopeId||null,t}function Py(e,t=Un,n){if(!t||e._n)return e;const i=(...a)=>{i._d&&Sv(-1);const r=Su(t);let s;try{s=e(...a)}finally{Su(r),i._d&&Sv(1)}return s};return i._n=!0,i._c=!0,i._d=!0,i}function kt(e,t){if(Un===null)return e;const n=Ju(Un),i=e.dirs||(e.dirs=[]);for(let a=0;a<t.length;a++){let[r,s,o,l=At]=t[a];r&&(tt(r)&&(r={mounted:r,updated:r}),r.deep&&na(s),i.push({dir:r,instance:n,value:s,oldValue:void 0,arg:o,modifiers:l}))}return e}function nr(e,t,n,i){const a=e.dirs,r=t&&t.dirs;for(let s=0;s<a.length;s++){const o=a[s];r&&(o.oldValue=r[s].value);let l=o.dir[i];l&&(qa(),Pi(l,n,8,[e.el,o,e,t]),ja())}}const Ry=Symbol("_vte"),Iy=e=>e.__isTeleport,Eo=e=>e&&(e.disabled||e.disabled===""),uv=e=>e&&(e.defer||e.defer===""),cv=e=>typeof SVGElement<"u"&&e instanceof SVGElement,dv=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Hd=(e,t)=>{const n=e&&e.to;return Wt(n)?t?t(n):null:n},Dy={name:"Teleport",__isTeleport:!0,process(e,t,n,i,a,r,s,o,l,u){const{mc:c,pc:d,pbc:f,o:{insert:h,querySelector:g,createText:p,createComment:m}}=u,v=Eo(t.props);let{shapeFlag:_,children:M,dynamicChildren:x}=t;if(e==null){const C=t.el=p(""),T=t.anchor=p("");h(C,n,i),h(T,n,i);const P=(b,S)=>{_&16&&(a&&a.isCE&&(a.ce._teleportTarget=b),c(M,b,S,a,r,s,o,l))},w=()=>{const b=t.target=Hd(t.props,g),S=Ly(b,t,p,h);b&&(s!=="svg"&&cv(b)?s="svg":s!=="mathml"&&dv(b)&&(s="mathml"),v||(P(b,S),su(t,!1)))};v&&(P(n,T),su(t,!0)),uv(t.props)?Vn(()=>{w(),t.el.__isMounted=!0},r):w()}else{if(uv(t.props)&&!e.el.__isMounted){Vn(()=>{Dy.process(e,t,n,i,a,r,s,o,l,u),delete e.el.__isMounted},r);return}t.el=e.el,t.targetStart=e.targetStart;const C=t.anchor=e.anchor,T=t.target=e.target,P=t.targetAnchor=e.targetAnchor,w=Eo(e.props),b=w?n:T,S=w?C:P;if(s==="svg"||cv(T)?s="svg":(s==="mathml"||dv(T))&&(s="mathml"),x?(f(e.dynamicChildren,x,b,a,r,s,o),zh(e,t,!0)):l||d(e,t,b,S,a,r,s,o,!1),v)w?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):wl(t,n,C,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const E=t.target=Hd(t.props,g);E&&wl(t,E,null,u,0)}else w&&wl(t,T,P,u,1);su(t,v)}},remove(e,t,n,{um:i,o:{remove:a}},r){const{shapeFlag:s,children:o,anchor:l,targetStart:u,targetAnchor:c,target:d,props:f}=e;if(d&&(a(u),a(c)),r&&a(l),s&16){const h=r||!Eo(f);for(let g=0;g<o.length;g++){const p=o[g];i(p,t,n,h,!!p.dynamicChildren)}}},move:wl,hydrate:sM};function wl(e,t,n,{o:{insert:i},m:a},r=2){r===0&&i(e.targetAnchor,t,n);const{el:s,anchor:o,shapeFlag:l,children:u,props:c}=e,d=r===2;if(d&&i(s,t,n),(!d||Eo(c))&&l&16)for(let f=0;f<u.length;f++)a(u[f],t,n,2);d&&i(o,t,n)}function sM(e,t,n,i,a,r,{o:{nextSibling:s,parentNode:o,querySelector:l,insert:u,createText:c}},d){const f=t.target=Hd(t.props,l);if(f){const h=Eo(t.props),g=f._lpa||f.firstChild;if(t.shapeFlag&16)if(h)t.anchor=d(s(e),t,o(e),n,i,a,r),t.targetStart=g,t.targetAnchor=g&&s(g);else{t.anchor=s(e);let p=g;for(;p;){if(p&&p.nodeType===8){if(p.data==="teleport start anchor")t.targetStart=p;else if(p.data==="teleport anchor"){t.targetAnchor=p,f._lpa=t.targetAnchor&&s(t.targetAnchor);break}}p=s(p)}t.targetAnchor||Ly(f,t,c,u),d(g&&s(g),t,f,n,i,a,r)}su(t,h)}return t.anchor&&s(t.anchor)}const oM=Dy;function su(e,t){const n=e.ctx;if(n&&n.ut){let i,a;for(t?(i=e.el,a=e.anchor):(i=e.targetStart,a=e.targetAnchor);i&&i!==a;)i.nodeType===1&&i.setAttribute("data-v-owner",n.uid),i=i.nextSibling;n.ut()}}function Ly(e,t,n,i){const a=t.targetStart=n(""),r=t.targetAnchor=n("");return a[Ry]=r,e&&(i(a,e),i(r,e)),r}const La=Symbol("_leaveCb"),Tl=Symbol("_enterCb");function ky(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Zt(()=>{e.isMounted=!0}),dn(()=>{e.isUnmounting=!0}),e}const li=[Function,Array],Vy={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:li,onEnter:li,onAfterEnter:li,onEnterCancelled:li,onBeforeLeave:li,onLeave:li,onAfterLeave:li,onLeaveCancelled:li,onBeforeAppear:li,onAppear:li,onAfterAppear:li,onAppearCancelled:li},Fy=e=>{const t=e.subTree;return t.component?Fy(t.component):t},lM={name:"BaseTransition",props:Vy,setup(e,{slots:t}){const n=Xr(),i=ky();return()=>{const a=t.default&&kh(t.default(),!0);if(!a||!a.length)return;const r=Ny(a),s=Ye(e),{mode:o}=s;if(i.isLeaving)return zc(r);const l=fv(r);if(!l)return zc(r);let u=Do(l,s,i,n,d=>u=d);l.type!==On&&Lr(l,u);let c=n.subTree&&fv(n.subTree);if(c&&c.type!==On&&!pr(l,c)&&Fy(n).type!==On){let d=Do(c,s,i,n);if(Lr(c,d),o==="out-in"&&l.type!==On)return i.isLeaving=!0,d.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},zc(r);o==="in-out"&&l.type!==On?d.delayLeave=(f,h,g)=>{const p=Oy(i,c);p[String(c.key)]=c,f[La]=()=>{h(),f[La]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{g(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return r}}};function Ny(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==On){t=n;break}}return t}const uM=lM;function Oy(e,t){const{leavingVNodes:n}=e;let i=n.get(t.type);return i||(i=Object.create(null),n.set(t.type,i)),i}function Do(e,t,n,i,a){const{appear:r,mode:s,persisted:o=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:h,onAfterLeave:g,onLeaveCancelled:p,onBeforeAppear:m,onAppear:v,onAfterAppear:_,onAppearCancelled:M}=t,x=String(e.key),C=Oy(n,e),T=(b,S)=>{b&&Pi(b,i,9,S)},P=(b,S)=>{const E=S[1];T(b,S),Ze(b)?b.every(R=>R.length<=1)&&E():b.length<=1&&E()},w={mode:s,persisted:o,beforeEnter(b){let S=l;if(!n.isMounted)if(r)S=m||l;else return;b[La]&&b[La](!0);const E=C[x];E&&pr(e,E)&&E.el[La]&&E.el[La](),T(S,[b])},enter(b){let S=u,E=c,R=d;if(!n.isMounted)if(r)S=v||u,E=_||c,R=M||d;else return;let L=!1;const O=b[Tl]=G=>{L||(L=!0,G?T(R,[b]):T(E,[b]),w.delayedLeave&&w.delayedLeave(),b[Tl]=void 0)};S?P(S,[b,O]):O()},leave(b,S){const E=String(e.key);if(b[Tl]&&b[Tl](!0),n.isUnmounting)return S();T(f,[b]);let R=!1;const L=b[La]=O=>{R||(R=!0,S(),O?T(p,[b]):T(g,[b]),b[La]=void 0,C[E]===e&&delete C[E])};C[E]=e,h?P(h,[b,L]):L()},clone(b){const S=Do(b,t,n,i,a);return a&&a(S),S}};return w}function zc(e){if(ju(e))return e=ua(e),e.children=null,e}function fv(e){if(!ju(e))return Iy(e.type)&&e.children?Ny(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&tt(n.default))return n.default()}}function Lr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Lr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function kh(e,t=!1,n){let i=[],a=0;for(let r=0;r<e.length;r++){let s=e[r];const o=n==null?s.key:String(n)+String(s.key!=null?s.key:r);s.type===Ne?(s.patchFlag&128&&a++,i=i.concat(kh(s.children,t,o))):(t||s.type!==On)&&i.push(o!=null?ua(s,{key:o}):s)}if(a>1)for(let r=0;r<i.length;r++)i[r].patchFlag=-2;return i}/*! #__NO_SIDE_EFFECTS__ */function cM(e,t){return tt(e)?ln({name:e.name},t,{setup:e}):e}function Uy(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Mu(e,t,n,i,a=!1){if(Ze(e)){e.forEach((g,p)=>Mu(g,t&&(Ze(t)?t[p]:t),n,i,a));return}if(wo(i)&&!a){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&Mu(e,t,n,i.component.subTree);return}const r=i.shapeFlag&4?Ju(i.component):i.el,s=a?null:r,{i:o,r:l}=e,u=t&&t.r,c=o.refs===At?o.refs={}:o.refs,d=o.setupState,f=Ye(d),h=d===At?()=>!1:g=>Et(f,g);if(u!=null&&u!==l&&(Wt(u)?(c[u]=null,h(u)&&(d[u]=null)):Ut(u)&&(u.value=null)),tt(l))Ko(l,o,12,[s,c]);else{const g=Wt(l),p=Ut(l);if(g||p){const m=()=>{if(e.f){const v=g?h(l)?d[l]:c[l]:l.value;a?Ze(v)&&Mh(v,r):Ze(v)?v.includes(r)||v.push(r):g?(c[l]=[r],h(l)&&(d[l]=c[l])):(l.value=[r],e.k&&(c[e.k]=l.value))}else g?(c[l]=s,h(l)&&(d[l]=s)):p&&(l.value=s,e.k&&(c[e.k]=s))};s?(m.id=-1,Vn(m,n)):m()}}}Xu().requestIdleCallback;Xu().cancelIdleCallback;const wo=e=>!!e.type.__asyncLoader,ju=e=>e.type.__isKeepAlive;function By(e,t){zy(e,"a",t)}function Vh(e,t){zy(e,"da",t)}function zy(e,t,n=mn){const i=e.__wdc||(e.__wdc=()=>{let a=n;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if(Ku(t,i,n),n){let a=n.parent;for(;a&&a.parent;)ju(a.parent.vnode)&&dM(i,t,n,a),a=a.parent}}function dM(e,t,n,i){const a=Ku(t,e,i,!0);$r(()=>{Mh(i[t],a)},n)}function Ku(e,t,n=mn,i=!1){if(n){const a=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...s)=>{qa();const o=Jo(n),l=Pi(t,n,e,s);return o(),ja(),l});return i?a.unshift(r):a.push(r),r}}const ya=e=>(t,n=mn)=>{(!Vo||e==="sp")&&Ku(e,(...i)=>t(...i),n)},js=ya("bm"),Zt=ya("m"),Fh=ya("bu"),Nh=ya("u"),dn=ya("bum"),$r=ya("um"),fM=ya("sp"),hM=ya("rtg"),mM=ya("rtc");function vM(e,t=mn){Ku("ec",e,t)}const Oh="components",gM="directives";function pM(e,t){return Uh(Oh,e,!0,t)||e}const yM=Symbol.for("v-ndc");function _M(e){return Wt(e)&&Uh(Oh,e,!1)||e}function ni(e){return Uh(gM,e)}function Uh(e,t,n=!0,i=!1){const a=Un||mn;if(a){const r=a.type;if(e===Oh){const o=rE(r,!1);if(o&&(o===t||o===Xn(t)||o===Hi(Xn(t))))return r}const s=hv(a[e]||r[e],t)||hv(a.appContext[e],t);return!s&&i?r:s}}function hv(e,t){return e&&(e[t]||e[Xn(t)]||e[Hi(Xn(t))])}function bM(e,t,n,i){let a;const r=n,s=Ze(e);if(s||Wt(e)){const o=s&&Rs(e);let l=!1;o&&(l=!fi(e),e=Yu(e)),a=new Array(e.length);for(let u=0,c=e.length;u<c;u++)a[u]=t(l?Cn(e[u]):e[u],u,void 0,r)}else if(typeof e=="number"){a=new Array(e);for(let o=0;o<e;o++)a[o]=t(o+1,o,void 0,r)}else if(Lt(e))if(e[Symbol.iterator])a=Array.from(e,(o,l)=>t(o,l,void 0,r));else{const o=Object.keys(e);a=new Array(o.length);for(let l=0,u=o.length;l<u;l++){const c=o[l];a[l]=t(e[c],c,l,r)}}else a=[];return a}const Gd=e=>e?o_(e)?Ju(e):Gd(e.parent):null,To=ln(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Gd(e.parent),$root:e=>Gd(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Gy(e),$forceUpdate:e=>e.f||(e.f=()=>{Lh(e.update)}),$nextTick:e=>e.n||(e.n=ft.bind(e.proxy)),$watch:e=>zM.bind(e)}),Hc=(e,t)=>e!==At&&!e.__isScriptSetup&&Et(e,t),xM={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:i,data:a,props:r,accessCache:s,type:o,appContext:l}=e;let u;if(t[0]!=="$"){const h=s[t];if(h!==void 0)switch(h){case 1:return i[t];case 2:return a[t];case 4:return n[t];case 3:return r[t]}else{if(Hc(i,t))return s[t]=1,i[t];if(a!==At&&Et(a,t))return s[t]=2,a[t];if((u=e.propsOptions[0])&&Et(u,t))return s[t]=3,r[t];if(n!==At&&Et(n,t))return s[t]=4,n[t];Wd&&(s[t]=0)}}const c=To[t];let d,f;if(c)return t==="$attrs"&&Tn(e.attrs,"get",""),c(e);if((d=o.__cssModules)&&(d=d[t]))return d;if(n!==At&&Et(n,t))return s[t]=4,n[t];if(f=l.config.globalProperties,Et(f,t))return f[t]},set({_:e},t,n){const{data:i,setupState:a,ctx:r}=e;return Hc(a,t)?(a[t]=n,!0):i!==At&&Et(i,t)?(i[t]=n,!0):Et(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:a,propsOptions:r}},s){let o;return!!n[s]||e!==At&&Et(e,s)||Hc(t,s)||(o=r[0])&&Et(o,s)||Et(i,s)||Et(To,s)||Et(a.config.globalProperties,s)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Et(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function mv(e){return Ze(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Wd=!0;function SM(e){const t=Gy(e),n=e.proxy,i=e.ctx;Wd=!1,t.beforeCreate&&vv(t.beforeCreate,e,"bc");const{data:a,computed:r,methods:s,watch:o,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:h,updated:g,activated:p,deactivated:m,beforeDestroy:v,beforeUnmount:_,destroyed:M,unmounted:x,render:C,renderTracked:T,renderTriggered:P,errorCaptured:w,serverPrefetch:b,expose:S,inheritAttrs:E,components:R,directives:L,filters:O}=t;if(u&&MM(u,i,null),s)for(const j in s){const B=s[j];tt(B)&&(i[j]=B.bind(n))}if(a){const j=a.call(n,n);Lt(j)&&(e.data=_n(j))}if(Wd=!0,r)for(const j in r){const B=r[j],X=tt(B)?B.bind(n,n):tt(B.get)?B.get.bind(n,n):Ti,W=!tt(B)&&tt(B.set)?B.set.bind(n):Ti,H=A({get:X,set:W});Object.defineProperty(i,j,{enumerable:!0,configurable:!0,get:()=>H.value,set:te=>H.value=te})}if(o)for(const j in o)Hy(o[j],i,n,j);if(l){const j=tt(l)?l.call(n):l;Reflect.ownKeys(j).forEach(B=>{Rt(B,j[B])})}c&&vv(c,e,"c");function U(j,B){Ze(B)?B.forEach(X=>j(X.bind(n))):B&&j(B.bind(n))}if(U(js,d),U(Zt,f),U(Fh,h),U(Nh,g),U(By,p),U(Vh,m),U(vM,w),U(mM,T),U(hM,P),U(dn,_),U($r,x),U(fM,b),Ze(S))if(S.length){const j=e.exposed||(e.exposed={});S.forEach(B=>{Object.defineProperty(j,B,{get:()=>n[B],set:X=>n[B]=X})})}else e.exposed||(e.exposed={});C&&e.render===Ti&&(e.render=C),E!=null&&(e.inheritAttrs=E),R&&(e.components=R),L&&(e.directives=L),b&&Uy(e)}function MM(e,t,n=Ti){Ze(e)&&(e=$d(e));for(const i in e){const a=e[i];let r;Lt(a)?"default"in a?r=ot(a.from||i,a.default,!0):r=ot(a.from||i):r=ot(a),Ut(r)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:s=>r.value=s}):t[i]=r}}function vv(e,t,n){Pi(Ze(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,n)}function Hy(e,t,n,i){let a=i.includes(".")?n_(n,i):()=>n[i];if(Wt(e)){const r=t[e];tt(r)&&Te(a,r)}else if(tt(e))Te(a,e.bind(n));else if(Lt(e))if(Ze(e))e.forEach(r=>Hy(r,t,n,i));else{const r=tt(e.handler)?e.handler.bind(n):t[e.handler];tt(r)&&Te(a,r,e)}}function Gy(e){const t=e.type,{mixins:n,extends:i}=t,{mixins:a,optionsCache:r,config:{optionMergeStrategies:s}}=e.appContext,o=r.get(t);let l;return o?l=o:!a.length&&!n&&!i?l=t:(l={},a.length&&a.forEach(u=>Eu(l,u,s,!0)),Eu(l,t,s)),Lt(t)&&r.set(t,l),l}function Eu(e,t,n,i=!1){const{mixins:a,extends:r}=t;r&&Eu(e,r,n,!0),a&&a.forEach(s=>Eu(e,s,n,!0));for(const s in t)if(!(i&&s==="expose")){const o=EM[s]||n&&n[s];e[s]=o?o(e[s],t[s]):t[s]}return e}const EM={data:gv,props:pv,emits:pv,methods:po,computed:po,beforeCreate:Ln,created:Ln,beforeMount:Ln,mounted:Ln,beforeUpdate:Ln,updated:Ln,beforeDestroy:Ln,beforeUnmount:Ln,destroyed:Ln,unmounted:Ln,activated:Ln,deactivated:Ln,errorCaptured:Ln,serverPrefetch:Ln,components:po,directives:po,watch:TM,provide:gv,inject:wM};function gv(e,t){return t?e?function(){return ln(tt(e)?e.call(this,this):e,tt(t)?t.call(this,this):t)}:t:e}function wM(e,t){return po($d(e),$d(t))}function $d(e){if(Ze(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Ln(e,t){return e?[...new Set([].concat(e,t))]:t}function po(e,t){return e?ln(Object.create(null),e,t):t}function pv(e,t){return e?Ze(e)&&Ze(t)?[...new Set([...e,...t])]:ln(Object.create(null),mv(e),mv(t??{})):t}function TM(e,t){if(!e)return t;if(!t)return e;const n=ln(Object.create(null),e);for(const i in t)n[i]=Ln(e[i],t[i]);return n}function Wy(){return{app:null,config:{isNativeTag:yS,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 CM=0;function AM(e,t){return function(i,a=null){tt(i)||(i=ln({},i)),a!=null&&!Lt(a)&&(a=null);const r=Wy(),s=new WeakSet,o=[];let l=!1;const u=r.app={_uid:CM++,_component:i,_props:a,_container:null,_context:r,_instance:null,version:oE,get config(){return r.config},set config(c){},use(c,...d){return s.has(c)||(c&&tt(c.install)?(s.add(c),c.install(u,...d)):tt(c)&&(s.add(c),c(u,...d))),u},mixin(c){return r.mixins.includes(c)||r.mixins.push(c),u},component(c,d){return d?(r.components[c]=d,u):r.components[c]},directive(c,d){return d?(r.directives[c]=d,u):r.directives[c]},mount(c,d,f){if(!l){const h=u._ceVNode||y(i,a);return h.appContext=r,f===!0?f="svg":f===!1&&(f=void 0),e(h,c,f),l=!0,u._container=c,c.__vue_app__=u,Ju(h.component)}},onUnmount(c){o.push(c)},unmount(){l&&(Pi(o,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return r.provides[c]=d,u},runWithContext(c){const d=Tr;Tr=u;try{return c()}finally{Tr=d}}};return u}}let Tr=null;function Rt(e,t){if(mn){let n=mn.provides;const i=mn.parent&&mn.parent.provides;i===n&&(n=mn.provides=Object.create(i)),n[e]=t}}function ot(e,t,n=!1){const i=mn||Un;if(i||Tr){const a=Tr?Tr._context.provides:i?i.parent==null?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(a&&e in a)return a[e];if(arguments.length>1)return n&&tt(t)?t.call(i&&i.proxy):t}}function $y(){return!!(mn||Un||Tr)}const Xy={},Yy=()=>Object.create(Xy),qy=e=>Object.getPrototypeOf(e)===Xy;function PM(e,t,n,i=!1){const a={},r=Yy();e.propsDefaults=Object.create(null),jy(e,t,a,r);for(const s in e.propsOptions[0])s in a||(a[s]=void 0);n?e.props=i?a:jS(a):e.type.props?e.props=a:e.props=r,e.attrs=r}function RM(e,t,n,i){const{props:a,attrs:r,vnode:{patchFlag:s}}=e,o=Ye(a),[l]=e.propsOptions;let u=!1;if((i||s>0)&&!(s&16)){if(s&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(Zu(e.emitsOptions,f))continue;const h=t[f];if(l)if(Et(r,f))h!==r[f]&&(r[f]=h,u=!0);else{const g=Xn(f);a[g]=Xd(l,o,g,h,e,!1)}else h!==r[f]&&(r[f]=h,u=!0)}}}else{jy(e,t,a,r)&&(u=!0);let c;for(const d in o)(!t||!Et(t,d)&&((c=Ya(d))===d||!Et(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(a[d]=Xd(l,o,d,void 0,e,!0)):delete a[d]);if(r!==o)for(const d in r)(!t||!Et(t,d))&&(delete r[d],u=!0)}u&&ta(e.attrs,"set","")}function jy(e,t,n,i){const[a,r]=e.propsOptions;let s=!1,o;if(t)for(let l in t){if(xo(l))continue;const u=t[l];let c;a&&Et(a,c=Xn(l))?!r||!r.includes(c)?n[c]=u:(o||(o={}))[c]=u:Zu(e.emitsOptions,l)||(!(l in i)||u!==i[l])&&(i[l]=u,s=!0)}if(r){const l=Ye(n),u=o||At;for(let c=0;c<r.length;c++){const d=r[c];n[d]=Xd(a,l,d,u[d],e,!Et(u,d))}}return s}function Xd(e,t,n,i,a,r){const s=e[n];if(s!=null){const o=Et(s,"default");if(o&&i===void 0){const l=s.default;if(s.type!==Function&&!s.skipFactory&&tt(l)){const{propsDefaults:u}=a;if(n in u)i=u[n];else{const c=Jo(a);i=u[n]=l.call(null,t),c()}}else i=l;a.ce&&a.ce._setProp(n,i)}s[0]&&(r&&!o?i=!1:s[1]&&(i===""||i===Ya(n))&&(i=!0))}return i}const IM=new WeakMap;function Ky(e,t,n=!1){const i=n?IM:t.propsCache,a=i.get(e);if(a)return a;const r=e.props,s={},o=[];let l=!1;if(!tt(e)){const c=d=>{l=!0;const[f,h]=Ky(d,t,!0);ln(s,f),h&&o.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!r&&!l)return Lt(e)&&i.set(e,As),As;if(Ze(r))for(let c=0;c<r.length;c++){const d=Xn(r[c]);yv(d)&&(s[d]=At)}else if(r)for(const c in r){const d=Xn(c);if(yv(d)){const f=r[c],h=s[d]=Ze(f)||tt(f)?{type:f}:ln({},f),g=h.type;let p=!1,m=!0;if(Ze(g))for(let v=0;v<g.length;++v){const _=g[v],M=tt(_)&&_.name;if(M==="Boolean"){p=!0;break}else M==="String"&&(m=!1)}else p=tt(g)&&g.name==="Boolean";h[0]=p,h[1]=m,(p||Et(h,"default"))&&o.push(d)}}const u=[s,o];return Lt(e)&&i.set(e,u),u}function yv(e){return e[0]!=="$"&&!xo(e)}const Zy=e=>e[0]==="_"||e==="$stable",Bh=e=>Ze(e)?e.map(Fi):[Fi(e)],DM=(e,t,n)=>{if(t._n)return t;const i=Py((...a)=>Bh(t(...a)),n);return i._c=!1,i},Jy=(e,t,n)=>{const i=e._ctx;for(const a in e){if(Zy(a))continue;const r=e[a];if(tt(r))t[a]=DM(a,r,i);else if(r!=null){const s=Bh(r);t[a]=()=>s}}},Qy=(e,t)=>{const n=Bh(t);e.slots.default=()=>n},e_=(e,t,n)=>{for(const i in t)(n||i!=="_")&&(e[i]=t[i])},LM=(e,t,n)=>{const i=e.slots=Yy();if(e.vnode.shapeFlag&32){const a=t._;a?(e_(i,t,n),n&&Qp(i,"_",a,!0)):Jy(t,i)}else t&&Qy(e,t)},kM=(e,t,n)=>{const{vnode:i,slots:a}=e;let r=!0,s=At;if(i.shapeFlag&32){const o=t._;o?n&&o===1?r=!1:e_(a,t,n):(r=!t.$stable,Jy(t,a)),s=t}else t&&(Qy(e,t),s={default:1});if(r)for(const o in a)!Zy(o)&&s[o]==null&&delete a[o]},Vn=qM;function VM(e){return FM(e)}function FM(e,t){const n=Xu();n.__VUE__=!0;const{insert:i,remove:a,patchProp:r,createElement:s,createText:o,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:h=Ti,insertStaticContent:g}=e,p=(N,V,I,re=null,q=null,Z=null,oe=void 0,xe=null,ie=!!V.dynamicChildren)=>{if(N===V)return;N&&!pr(N,V)&&(re=Q(N),te(N,q,Z,!0),N=null),V.patchFlag===-2&&(ie=!1,V.dynamicChildren=null);const{type:k,ref:D,shapeFlag:z}=V;switch(k){case Zo:m(N,V,I,re);break;case On:v(N,V,I,re);break;case ou:N==null&&_(V,I,re,oe);break;case Ne:R(N,V,I,re,q,Z,oe,xe,ie);break;default:z&1?C(N,V,I,re,q,Z,oe,xe,ie):z&6?L(N,V,I,re,q,Z,oe,xe,ie):(z&64||z&128)&&k.process(N,V,I,re,q,Z,oe,xe,ie,Ae)}D!=null&&q&&Mu(D,N&&N.ref,Z,V||N,!V)},m=(N,V,I,re)=>{if(N==null)i(V.el=o(V.children),I,re);else{const q=V.el=N.el;V.children!==N.children&&u(q,V.children)}},v=(N,V,I,re)=>{N==null?i(V.el=l(V.children||""),I,re):V.el=N.el},_=(N,V,I,re)=>{[N.el,N.anchor]=g(N.children,V,I,re,N.el,N.anchor)},M=({el:N,anchor:V},I,re)=>{let q;for(;N&&N!==V;)q=f(N),i(N,I,re),N=q;i(V,I,re)},x=({el:N,anchor:V})=>{let I;for(;N&&N!==V;)I=f(N),a(N),N=I;a(V)},C=(N,V,I,re,q,Z,oe,xe,ie)=>{V.type==="svg"?oe="svg":V.type==="math"&&(oe="mathml"),N==null?T(V,I,re,q,Z,oe,xe,ie):b(N,V,q,Z,oe,xe,ie)},T=(N,V,I,re,q,Z,oe,xe)=>{let ie,k;const{props:D,shapeFlag:z,transition:ne,dirs:ue}=N;if(ie=N.el=s(N.type,Z,D&&D.is,D),z&8?c(ie,N.children):z&16&&w(N.children,ie,null,re,q,Gc(N,Z),oe,xe),ue&&nr(N,null,re,"created"),P(ie,N,N.scopeId,oe,re),D){for(const De in D)De!=="value"&&!xo(De)&&r(ie,De,null,D[De],Z,re);"value"in D&&r(ie,"value",null,D.value,Z),(k=D.onVnodeBeforeMount)&&Li(k,re,N)}ue&&nr(N,null,re,"beforeMount");const le=NM(q,ne);le&&ne.beforeEnter(ie),i(ie,V,I),((k=D&&D.onVnodeMounted)||le||ue)&&Vn(()=>{k&&Li(k,re,N),le&&ne.enter(ie),ue&&nr(N,null,re,"mounted")},q)},P=(N,V,I,re,q)=>{if(I&&h(N,I),re)for(let Z=0;Z<re.length;Z++)h(N,re[Z]);if(q){let Z=q.subTree;if(V===Z||a_(Z.type)&&(Z.ssContent===V||Z.ssFallback===V)){const oe=q.vnode;P(N,oe,oe.scopeId,oe.slotScopeIds,q.parent)}}},w=(N,V,I,re,q,Z,oe,xe,ie=0)=>{for(let k=ie;k<N.length;k++){const D=N[k]=xe?ka(N[k]):Fi(N[k]);p(null,D,V,I,re,q,Z,oe,xe)}},b=(N,V,I,re,q,Z,oe)=>{const xe=V.el=N.el;let{patchFlag:ie,dynamicChildren:k,dirs:D}=V;ie|=N.patchFlag&16;const z=N.props||At,ne=V.props||At;let ue;if(I&&ir(I,!1),(ue=ne.onVnodeBeforeUpdate)&&Li(ue,I,V,N),D&&nr(V,N,I,"beforeUpdate"),I&&ir(I,!0),(z.innerHTML&&ne.innerHTML==null||z.textContent&&ne.textContent==null)&&c(xe,""),k?S(N.dynamicChildren,k,xe,I,re,Gc(V,q),Z):oe||B(N,V,xe,null,I,re,Gc(V,q),Z,!1),ie>0){if(ie&16)E(xe,z,ne,I,q);else if(ie&2&&z.class!==ne.class&&r(xe,"class",null,ne.class,q),ie&4&&r(xe,"style",z.style,ne.style,q),ie&8){const le=V.dynamicProps;for(let De=0;De<le.length;De++){const we=le[De],Le=z[we],Qe=ne[we];(Qe!==Le||we==="value")&&r(xe,we,Le,Qe,q,I)}}ie&1&&N.children!==V.children&&c(xe,V.children)}else!oe&&k==null&&E(xe,z,ne,I,q);((ue=ne.onVnodeUpdated)||D)&&Vn(()=>{ue&&Li(ue,I,V,N),D&&nr(V,N,I,"updated")},re)},S=(N,V,I,re,q,Z,oe)=>{for(let xe=0;xe<V.length;xe++){const ie=N[xe],k=V[xe],D=ie.el&&(ie.type===Ne||!pr(ie,k)||ie.shapeFlag&70)?d(ie.el):I;p(ie,k,D,null,re,q,Z,oe,!0)}},E=(N,V,I,re,q)=>{if(V!==I){if(V!==At)for(const Z in V)!xo(Z)&&!(Z in I)&&r(N,Z,V[Z],null,q,re);for(const Z in I){if(xo(Z))continue;const oe=I[Z],xe=V[Z];oe!==xe&&Z!=="value"&&r(N,Z,xe,oe,q,re)}"value"in I&&r(N,"value",V.value,I.value,q)}},R=(N,V,I,re,q,Z,oe,xe,ie)=>{const k=V.el=N?N.el:o(""),D=V.anchor=N?N.anchor:o("");let{patchFlag:z,dynamicChildren:ne,slotScopeIds:ue}=V;ue&&(xe=xe?xe.concat(ue):ue),N==null?(i(k,I,re),i(D,I,re),w(V.children||[],I,D,q,Z,oe,xe,ie)):z>0&&z&64&&ne&&N.dynamicChildren?(S(N.dynamicChildren,ne,I,q,Z,oe,xe),(V.key!=null||q&&V===q.subTree)&&zh(N,V,!0)):B(N,V,I,D,q,Z,oe,xe,ie)},L=(N,V,I,re,q,Z,oe,xe,ie)=>{V.slotScopeIds=xe,N==null?V.shapeFlag&512?q.ctx.activate(V,I,re,oe,ie):O(V,I,re,q,Z,oe,ie):G(N,V,ie)},O=(N,V,I,re,q,Z,oe)=>{const xe=N.component=eE(N,re,q);if(ju(N)&&(xe.ctx.renderer=Ae),tE(xe,!1,oe),xe.asyncDep){if(q&&q.registerDep(xe,U,oe),!N.el){const ie=xe.subTree=y(On);v(null,ie,V,I)}}else U(xe,N,V,I,q,Z,oe)},G=(N,V,I)=>{const re=V.component=N.component;if(XM(N,V,I))if(re.asyncDep&&!re.asyncResolved){j(re,V,I);return}else re.next=V,re.update();else V.el=N.el,re.vnode=V},U=(N,V,I,re,q,Z,oe)=>{const xe=()=>{if(N.isMounted){let{next:z,bu:ne,u:ue,parent:le,vnode:De}=N;{const Fe=t_(N);if(Fe){z&&(z.el=De.el,j(N,z,oe)),Fe.asyncDep.then(()=>{N.isUnmounted||xe()});return}}let we=z,Le;ir(N,!1),z?(z.el=De.el,j(N,z,oe)):z=De,ne&&ru(ne),(Le=z.props&&z.props.onVnodeBeforeUpdate)&&Li(Le,le,z,De),ir(N,!0);const Qe=bv(N),Ce=N.subTree;N.subTree=Qe,p(Ce,Qe,d(Ce.el),Q(Ce),N,q,Z),z.el=Qe.el,we===null&&YM(N,Qe.el),ue&&Vn(ue,q),(Le=z.props&&z.props.onVnodeUpdated)&&Vn(()=>Li(Le,le,z,De),q)}else{let z;const{el:ne,props:ue}=V,{bm:le,m:De,parent:we,root:Le,type:Qe}=N,Ce=wo(V);ir(N,!1),le&&ru(le),!Ce&&(z=ue&&ue.onVnodeBeforeMount)&&Li(z,we,V),ir(N,!0);{Le.ce&&Le.ce._injectChildStyle(Qe);const Fe=N.subTree=bv(N);p(null,Fe,I,re,N,q,Z),V.el=Fe.el}if(De&&Vn(De,q),!Ce&&(z=ue&&ue.onVnodeMounted)){const Fe=V;Vn(()=>Li(z,we,Fe),q)}(V.shapeFlag&256||we&&wo(we.vnode)&&we.vnode.shapeFlag&256)&&N.a&&Vn(N.a,q),N.isMounted=!0,V=I=re=null}};N.scope.on();const ie=N.effect=new ry(xe);N.scope.off();const k=N.update=ie.run.bind(ie),D=N.job=ie.runIfDirty.bind(ie);D.i=N,D.id=N.uid,ie.scheduler=()=>Lh(D),ir(N,!0),k()},j=(N,V,I)=>{V.component=N;const re=N.vnode.props;N.vnode=V,N.next=null,RM(N,V.props,re,I),kM(N,V.children,I),qa(),lv(N),ja()},B=(N,V,I,re,q,Z,oe,xe,ie=!1)=>{const k=N&&N.children,D=N?N.shapeFlag:0,z=V.children,{patchFlag:ne,shapeFlag:ue}=V;if(ne>0){if(ne&128){W(k,z,I,re,q,Z,oe,xe,ie);return}else if(ne&256){X(k,z,I,re,q,Z,oe,xe,ie);return}}ue&8?(D&16&&ae(k,q,Z),z!==k&&c(I,z)):D&16?ue&16?W(k,z,I,re,q,Z,oe,xe,ie):ae(k,q,Z,!0):(D&8&&c(I,""),ue&16&&w(z,I,re,q,Z,oe,xe,ie))},X=(N,V,I,re,q,Z,oe,xe,ie)=>{N=N||As,V=V||As;const k=N.length,D=V.length,z=Math.min(k,D);let ne;for(ne=0;ne<z;ne++){const ue=V[ne]=ie?ka(V[ne]):Fi(V[ne]);p(N[ne],ue,I,null,q,Z,oe,xe,ie)}k>D?ae(N,q,Z,!0,!1,z):w(V,I,re,q,Z,oe,xe,ie,z)},W=(N,V,I,re,q,Z,oe,xe,ie)=>{let k=0;const D=V.length;let z=N.length-1,ne=D-1;for(;k<=z&&k<=ne;){const ue=N[k],le=V[k]=ie?ka(V[k]):Fi(V[k]);if(pr(ue,le))p(ue,le,I,null,q,Z,oe,xe,ie);else break;k++}for(;k<=z&&k<=ne;){const ue=N[z],le=V[ne]=ie?ka(V[ne]):Fi(V[ne]);if(pr(ue,le))p(ue,le,I,null,q,Z,oe,xe,ie);else break;z--,ne--}if(k>z){if(k<=ne){const ue=ne+1,le=ue<D?V[ue].el:re;for(;k<=ne;)p(null,V[k]=ie?ka(V[k]):Fi(V[k]),I,le,q,Z,oe,xe,ie),k++}}else if(k>ne)for(;k<=z;)te(N[k],q,Z,!0),k++;else{const ue=k,le=k,De=new Map;for(k=le;k<=ne;k++){const ke=V[k]=ie?ka(V[k]):Fi(V[k]);ke.key!=null&&De.set(ke.key,k)}let we,Le=0;const Qe=ne-le+1;let Ce=!1,Fe=0;const qe=new Array(Qe);for(k=0;k<Qe;k++)qe[k]=0;for(k=ue;k<=z;k++){const ke=N[k];if(Le>=Qe){te(ke,q,Z,!0);continue}let nt;if(ke.key!=null)nt=De.get(ke.key);else for(we=le;we<=ne;we++)if(qe[we-le]===0&&pr(ke,V[we])){nt=we;break}nt===void 0?te(ke,q,Z,!0):(qe[nt-le]=k+1,nt>=Fe?Fe=nt:Ce=!0,p(ke,V[nt],I,null,q,Z,oe,xe,ie),Le++)}const et=Ce?OM(qe):As;for(we=et.length-1,k=Qe-1;k>=0;k--){const ke=le+k,nt=V[ke],st=ke+1<D?V[ke+1].el:re;qe[k]===0?p(null,nt,I,st,q,Z,oe,xe,ie):Ce&&(we<0||k!==et[we]?H(nt,I,st,2):we--)}}},H=(N,V,I,re,q=null)=>{const{el:Z,type:oe,transition:xe,children:ie,shapeFlag:k}=N;if(k&6){H(N.component.subTree,V,I,re);return}if(k&128){N.suspense.move(V,I,re);return}if(k&64){oe.move(N,V,I,Ae);return}if(oe===Ne){i(Z,V,I);for(let z=0;z<ie.length;z++)H(ie[z],V,I,re);i(N.anchor,V,I);return}if(oe===ou){M(N,V,I);return}if(re!==2&&k&1&&xe)if(re===0)xe.beforeEnter(Z),i(Z,V,I),Vn(()=>xe.enter(Z),q);else{const{leave:z,delayLeave:ne,afterLeave:ue}=xe,le=()=>i(Z,V,I),De=()=>{z(Z,()=>{le(),ue&&ue()})};ne?ne(Z,le,De):De()}else i(Z,V,I)},te=(N,V,I,re=!1,q=!1)=>{const{type:Z,props:oe,ref:xe,children:ie,dynamicChildren:k,shapeFlag:D,patchFlag:z,dirs:ne,cacheIndex:ue}=N;if(z===-2&&(q=!1),xe!=null&&Mu(xe,null,I,N,!0),ue!=null&&(V.renderCache[ue]=void 0),D&256){V.ctx.deactivate(N);return}const le=D&1&&ne,De=!wo(N);let we;if(De&&(we=oe&&oe.onVnodeBeforeUnmount)&&Li(we,V,N),D&6)he(N.component,I,re);else{if(D&128){N.suspense.unmount(I,re);return}le&&nr(N,null,V,"beforeUnmount"),D&64?N.type.remove(N,V,I,Ae,re):k&&!k.hasOnce&&(Z!==Ne||z>0&&z&64)?ae(k,V,I,!1,!0):(Z===Ne&&z&384||!q&&D&16)&&ae(ie,V,I),re&&Se(N)}(De&&(we=oe&&oe.onVnodeUnmounted)||le)&&Vn(()=>{we&&Li(we,V,N),le&&nr(N,null,V,"unmounted")},I)},Se=N=>{const{type:V,el:I,anchor:re,transition:q}=N;if(V===Ne){$(I,re);return}if(V===ou){x(N);return}const Z=()=>{a(I),q&&!q.persisted&&q.afterLeave&&q.afterLeave()};if(N.shapeFlag&1&&q&&!q.persisted){const{leave:oe,delayLeave:xe}=q,ie=()=>oe(I,Z);xe?xe(N.el,Z,ie):ie()}else Z()},$=(N,V)=>{let I;for(;N!==V;)I=f(N),a(N),N=I;a(V)},he=(N,V,I)=>{const{bum:re,scope:q,job:Z,subTree:oe,um:xe,m:ie,a:k}=N;_v(ie),_v(k),re&&ru(re),q.stop(),Z&&(Z.flags|=8,te(oe,N,V,I)),xe&&Vn(xe,V),Vn(()=>{N.isUnmounted=!0},V),V&&V.pendingBranch&&!V.isUnmounted&&N.asyncDep&&!N.asyncResolved&&N.suspenseId===V.pendingId&&(V.deps--,V.deps===0&&V.resolve())},ae=(N,V,I,re=!1,q=!1,Z=0)=>{for(let oe=Z;oe<N.length;oe++)te(N[oe],V,I,re,q)},Q=N=>{if(N.shapeFlag&6)return Q(N.component.subTree);if(N.shapeFlag&128)return N.suspense.next();const V=f(N.anchor||N.el),I=V&&V[Ry];return I?f(I):V};let ve=!1;const Ge=(N,V,I)=>{N==null?V._vnode&&te(V._vnode,null,null,!0):p(V._vnode||null,N,V,null,null,null,I),V._vnode=N,ve||(ve=!0,lv(),Ty(),ve=!1)},Ae={p,um:te,m:H,r:Se,mt:O,mc:w,pc:B,pbc:S,n:Q,o:e};return{render:Ge,hydrate:void 0,createApp:AM(Ge)}}function Gc({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function ir({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function NM(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function zh(e,t,n=!1){const i=e.children,a=t.children;if(Ze(i)&&Ze(a))for(let r=0;r<i.length;r++){const s=i[r];let o=a[r];o.shapeFlag&1&&!o.dynamicChildren&&((o.patchFlag<=0||o.patchFlag===32)&&(o=a[r]=ka(a[r]),o.el=s.el),!n&&o.patchFlag!==-2&&zh(s,o)),o.type===Zo&&(o.el=s.el)}}function OM(e){const t=e.slice(),n=[0];let i,a,r,s,o;const l=e.length;for(i=0;i<l;i++){const u=e[i];if(u!==0){if(a=n[n.length-1],e[a]<u){t[i]=a,n.push(i);continue}for(r=0,s=n.length-1;r<s;)o=r+s>>1,e[n[o]]<u?r=o+1:s=o;u<e[n[r]]&&(r>0&&(t[i]=n[r-1]),n[r]=i)}}for(r=n.length,s=n[r-1];r-- >0;)n[r]=s,s=t[s];return n}function t_(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:t_(t)}function _v(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const UM=Symbol.for("v-scx"),BM=()=>ot(UM);function Bt(e,t){return Hh(e,null,t)}function Te(e,t,n){return Hh(e,t,n)}function Hh(e,t,n=At){const{immediate:i,deep:a,flush:r,once:s}=n,o=ln({},n),l=t&&i||!t&&r!=="post";let u;if(Vo){if(r==="sync"){const h=BM();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=Ti,h.resume=Ti,h.pause=Ti,h}}const c=mn;o.call=(h,g,p)=>Pi(h,c,g,p);let d=!1;r==="post"?o.scheduler=h=>{Vn(h,c&&c.suspense)}:r!=="sync"&&(d=!0,o.scheduler=(h,g)=>{g?h():Lh(h)}),o.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const f=iM(e,t,o);return Vo&&(u?u.push(f):l&&f()),f}function zM(e,t,n){const i=this.proxy,a=Wt(e)?e.includes(".")?n_(i,e):()=>i[e]:e.bind(i,i);let r;tt(t)?r=t:(r=t.handler,n=t);const s=Jo(this),o=Hh(a,r.bind(i),n);return s(),o}function n_(e,t){const n=t.split(".");return()=>{let i=e;for(let a=0;a<n.length&&i;a++)i=i[n[a]];return i}}const HM=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Xn(t)}Modifiers`]||e[`${Ya(t)}Modifiers`];function GM(e,t,...n){if(e.isUnmounted)return;const i=e.vnode.props||At;let a=n;const r=t.startsWith("update:"),s=r&&HM(i,t.slice(7));s&&(s.trim&&(a=n.map(c=>Wt(c)?c.trim():c)),s.number&&(a=n.map(Nd)));let o,l=i[o=Fc(t)]||i[o=Fc(Xn(t))];!l&&r&&(l=i[o=Fc(Ya(t))]),l&&Pi(l,e,6,a);const u=i[o+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[o])return;e.emitted[o]=!0,Pi(u,e,6,a)}}function i_(e,t,n=!1){const i=t.emitsCache,a=i.get(e);if(a!==void 0)return a;const r=e.emits;let s={},o=!1;if(!tt(e)){const l=u=>{const c=i_(u,t,!0);c&&(o=!0,ln(s,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!r&&!o?(Lt(e)&&i.set(e,null),null):(Ze(r)?r.forEach(l=>s[l]=null):ln(s,r),Lt(e)&&i.set(e,s),s)}function Zu(e,t){return!e||!Gu(t)?!1:(t=t.slice(2).replace(/Once$/,""),Et(e,t[0].toLowerCase()+t.slice(1))||Et(e,Ya(t))||Et(e,t))}function bv(e){const{type:t,vnode:n,proxy:i,withProxy:a,propsOptions:[r],slots:s,attrs:o,emit:l,render:u,renderCache:c,props:d,data:f,setupState:h,ctx:g,inheritAttrs:p}=e,m=Su(e);let v,_;try{if(n.shapeFlag&4){const x=a||i,C=x;v=Fi(u.call(C,x,c,d,h,f,g)),_=o}else{const x=t;v=Fi(x.length>1?x(d,{attrs:o,slots:s,emit:l}):x(d,null)),_=t.props?o:WM(o)}}catch(x){Co.length=0,qu(x,e,1),v=y(On)}let M=v;if(_&&p!==!1){const x=Object.keys(_),{shapeFlag:C}=M;x.length&&C&7&&(r&&x.some(Sh)&&(_=$M(_,r)),M=ua(M,_,!1,!0))}return n.dirs&&(M=ua(M,null,!1,!0),M.dirs=M.dirs?M.dirs.concat(n.dirs):n.dirs),n.transition&&Lr(M,n.transition),v=M,Su(m),v}const WM=e=>{let t;for(const n in e)(n==="class"||n==="style"||Gu(n))&&((t||(t={}))[n]=e[n]);return t},$M=(e,t)=>{const n={};for(const i in e)(!Sh(i)||!(i.slice(9)in t))&&(n[i]=e[i]);return n};function XM(e,t,n){const{props:i,children:a,component:r}=e,{props:s,children:o,patchFlag:l}=t,u=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return i?xv(i,s,u):!!s;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(s[f]!==i[f]&&!Zu(u,f))return!0}}}else return(a||o)&&(!o||!o.$stable)?!0:i===s?!1:i?s?xv(i,s,u):!0:!!s;return!1}function xv(e,t,n){const i=Object.keys(t);if(i.length!==Object.keys(e).length)return!0;for(let a=0;a<i.length;a++){const r=i[a];if(t[r]!==e[r]&&!Zu(n,r))return!0}return!1}function YM({vnode:e,parent:t},n){for(;t;){const i=t.subTree;if(i.suspense&&i.suspense.activeBranch===e&&(i.el=e.el),i===e)(e=t.vnode).el=n,t=t.parent;else break}}const a_=e=>e.__isSuspense;function qM(e,t){t&&t.pendingBranch?Ze(e)?t.effects.push(...e):t.effects.push(e):wy(e)}const Ne=Symbol.for("v-fgt"),Zo=Symbol.for("v-txt"),On=Symbol.for("v-cmt"),ou=Symbol.for("v-stc"),Co=[];let Qn=null;function Zn(e=!1){Co.push(Qn=e?null:[])}function jM(){Co.pop(),Qn=Co[Co.length-1]||null}let Lo=1;function Sv(e,t=!1){Lo+=e,e<0&&Qn&&t&&(Qn.hasOnce=!0)}function r_(e){return e.dynamicChildren=Lo>0?Qn||As:null,jM(),Lo>0&&Qn&&Qn.push(e),e}function Oi(e,t,n,i,a,r){return r_(Ft(e,t,n,i,a,r,!0))}function Gh(e,t,n,i,a){return r_(y(e,t,n,i,a,!0))}function ko(e){return e?e.__v_isVNode===!0:!1}function pr(e,t){return e.type===t.type&&e.key===t.key}const s_=({key:e})=>e??null,lu=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Wt(e)||Ut(e)||tt(e)?{i:Un,r:e,k:t,f:!!n}:e:null);function Ft(e,t=null,n=null,i=0,a=null,r=e===Ne?0:1,s=!1,o=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&s_(t),ref:t&&lu(t),scopeId:Ay,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:Un};return o?(Wh(l,n),r&128&&e.normalize(l)):n&&(l.shapeFlag|=Wt(n)?8:16),Lo>0&&!s&&Qn&&(l.patchFlag>0||r&6)&&l.patchFlag!==32&&Qn.push(l),l}const y=KM;function KM(e,t=null,n=null,i=0,a=null,r=!1){if((!e||e===yM)&&(e=On),ko(e)){const o=ua(e,t,!0);return n&&Wh(o,n),Lo>0&&!r&&Qn&&(o.shapeFlag&6?Qn[Qn.indexOf(e)]=o:Qn.push(o)),o.patchFlag=-2,o}if(sE(e)&&(e=e.__vccOpts),t){t=ZM(t);let{class:o,style:l}=t;o&&!Wt(o)&&(t.class=Ir(o)),Lt(l)&&(Dh(l)&&!Ze(l)&&(l=ln({},l)),t.style=Er(l))}const s=Wt(e)?1:a_(e)?128:Iy(e)?64:Lt(e)?4:tt(e)?2:0;return Ft(e,t,n,i,a,s,r,!0)}function ZM(e){return e?Dh(e)||qy(e)?ln({},e):e:null}function ua(e,t,n=!1,i=!1){const{props:a,ref:r,patchFlag:s,children:o,transition:l}=e,u=t?ge(a||{},t):a,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&s_(u),ref:t&&t.ref?n&&r?Ze(r)?r.concat(lu(t)):[r,lu(t)]:lu(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ne?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ua(e.ssContent),ssFallback:e.ssFallback&&ua(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&i&&Lr(c,l.clone(c)),c}function ca(e=" ",t=0){return y(Zo,null,e,t)}function yo(e="",t=!1){return t?(Zn(),Gh(On,null,e)):y(On,null,e)}function Fi(e){return e==null||typeof e=="boolean"?y(On):Ze(e)?y(Ne,null,e.slice()):ko(e)?ka(e):y(Zo,null,String(e))}function ka(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ua(e)}function Wh(e,t){let n=0;const{shapeFlag:i}=e;if(t==null)t=null;else if(Ze(t))n=16;else if(typeof t=="object")if(i&65){const a=t.default;a&&(a._c&&(a._d=!1),Wh(e,a()),a._c&&(a._d=!0));return}else{n=32;const a=t._;!a&&!qy(t)?t._ctx=Un:a===3&&Un&&(Un.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else tt(t)?(t={default:t,_ctx:Un},n=32):(t=String(t),i&64?(n=16,t=[ca(t)]):n=8);e.children=t,e.shapeFlag|=n}function ge(...e){const t={};for(let n=0;n<e.length;n++){const i=e[n];for(const a in i)if(a==="class")t.class!==i.class&&(t.class=Ir([t.class,i.class]));else if(a==="style")t.style=Er([t.style,i.style]);else if(Gu(a)){const r=t[a],s=i[a];s&&r!==s&&!(Ze(r)&&r.includes(s))&&(t[a]=r?[].concat(r,s):s)}else a!==""&&(t[a]=i[a])}return t}function Li(e,t,n,i=null){Pi(e,t,7,[n,i])}const JM=Wy();let QM=0;function eE(e,t,n){const i=e.type,a=(t?t.appContext:e.appContext)||JM,r={uid:QM++,vnode:e,type:i,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new iy(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Ky(i,a),emitsOptions:i_(i,a),emit:null,emitted:null,propsDefaults:At,inheritAttrs:i.inheritAttrs,ctx:At,data:At,props:At,attrs:At,slots:At,refs:At,setupState:At,setupContext: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 r.ctx={_:r},r.root=t?t.root:r,r.emit=GM.bind(null,r),e.ce&&e.ce(r),r}let mn=null;const Xr=()=>mn||Un;let wu,Yd;{const e=Xu(),t=(n,i)=>{let a;return(a=e[n])||(a=e[n]=[]),a.push(i),r=>{a.length>1?a.forEach(s=>s(r)):a[0](r)}};wu=t("__VUE_INSTANCE_SETTERS__",n=>mn=n),Yd=t("__VUE_SSR_SETTERS__",n=>Vo=n)}const Jo=e=>{const t=mn;return wu(e),e.scope.on(),()=>{e.scope.off(),wu(t)}},Mv=()=>{mn&&mn.scope.off(),wu(null)};function o_(e){return e.vnode.shapeFlag&4}let Vo=!1;function tE(e,t=!1,n=!1){t&&Yd(t);const{props:i,children:a}=e.vnode,r=o_(e);PM(e,i,r,t),LM(e,a,n);const s=r?nE(e,t):void 0;return t&&Yd(!1),s}function nE(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,xM);const{setup:i}=n;if(i){qa();const a=e.setupContext=i.length>1?aE(e):null,r=Jo(e),s=Ko(i,e,0,[e.props,a]),o=Kp(s);if(ja(),r(),(o||e.sp)&&!wo(e)&&Uy(e),o){if(s.then(Mv,Mv),t)return s.then(l=>{Ev(e,l)}).catch(l=>{qu(l,e,0)});e.asyncDep=s}else Ev(e,s)}else l_(e)}function Ev(e,t,n){tt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Lt(t)&&(e.setupState=xy(t)),l_(e)}function l_(e,t,n){const i=e.type;e.render||(e.render=i.render||Ti);{const a=Jo(e);qa();try{SM(e)}finally{ja(),a()}}}const iE={get(e,t){return Tn(e,"get",""),e[t]}};function aE(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,iE),slots:e.slots,emit:e.emit,expose:t}}function Ju(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(xy(_y(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in To)return To[n](e)},has(t,n){return n in t||n in To}})):e.proxy}function rE(e,t=!0){return tt(e)?e.displayName||e.name:e.name||t&&e.__name}function sE(e){return tt(e)&&"__vccOpts"in e}const A=(e,t)=>tM(e,t,Vo);function _a(e,t,n){const i=arguments.length;return i===2?Lt(t)&&!Ze(t)?ko(t)?y(e,null,[t]):y(e,t):y(e,null,t):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&ko(n)&&(n=[n]),y(e,t,n))}const oE="3.5.13";/**
* @vue/runtime-dom v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let qd;const wv=typeof window<"u"&&window.trustedTypes;if(wv)try{qd=wv.createPolicy("vue",{createHTML:e=>e})}catch{}const u_=qd?e=>qd.createHTML(e):e=>e,lE="http://www.w3.org/2000/svg",uE="http://www.w3.org/1998/Math/MathML",ea=typeof document<"u"?document:null,Tv=ea&&ea.createElement("template"),cE={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,i)=>{const a=t==="svg"?ea.createElementNS(lE,e):t==="mathml"?ea.createElementNS(uE,e):n?ea.createElement(e,{is:n}):ea.createElement(e);return e==="select"&&i&&i.multiple!=null&&a.setAttribute("multiple",i.multiple),a},createText:e=>ea.createTextNode(e),createComment:e=>ea.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ea.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,i,a,r){const s=n?n.previousSibling:t.lastChild;if(a&&(a===r||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),n),!(a===r||!(a=a.nextSibling)););else{Tv.innerHTML=u_(i==="svg"?`<svg>${e}</svg>`:i==="mathml"?`<math>${e}</math>`:e);const o=Tv.content;if(i==="svg"||i==="mathml"){const l=o.firstChild;for(;l.firstChild;)o.appendChild(l.firstChild);o.removeChild(l)}t.insertBefore(o,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ea="transition",so="animation",Vs=Symbol("_vtc"),c_={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},d_=ln({},Vy,c_),dE=e=>(e.displayName="Transition",e.props=d_,e),da=dE((e,{slots:t})=>_a(uM,f_(e),t)),ar=(e,t=[])=>{Ze(e)?e.forEach(n=>n(...t)):e&&e(...t)},Cv=e=>e?Ze(e)?e.some(t=>t.length>1):e.length>1:!1;function f_(e){const t={};for(const R in e)R in c_||(t[R]=e[R]);if(e.css===!1)return t;const{name:n="v",type:i,duration:a,enterFromClass:r=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:o=`${n}-enter-to`,appearFromClass:l=r,appearActiveClass:u=s,appearToClass:c=o,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,g=fE(a),p=g&&g[0],m=g&&g[1],{onBeforeEnter:v,onEnter:_,onEnterCancelled:M,onLeave:x,onLeaveCancelled:C,onBeforeAppear:T=v,onAppear:P=_,onAppearCancelled:w=M}=t,b=(R,L,O,G)=>{R._enterCancelled=G,Ia(R,L?c:o),Ia(R,L?u:s),O&&O()},S=(R,L)=>{R._isLeaving=!1,Ia(R,d),Ia(R,h),Ia(R,f),L&&L()},E=R=>(L,O)=>{const G=R?P:_,U=()=>b(L,R,O);ar(G,[L,U]),Av(()=>{Ia(L,R?l:r),ki(L,R?c:o),Cv(G)||Pv(L,i,p,U)})};return ln(t,{onBeforeEnter(R){ar(v,[R]),ki(R,r),ki(R,s)},onBeforeAppear(R){ar(T,[R]),ki(R,l),ki(R,u)},onEnter:E(!1),onAppear:E(!0),onLeave(R,L){R._isLeaving=!0;const O=()=>S(R,L);ki(R,d),R._enterCancelled?(ki(R,f),jd()):(jd(),ki(R,f)),Av(()=>{R._isLeaving&&(Ia(R,d),ki(R,h),Cv(x)||Pv(R,i,m,O))}),ar(x,[R,O])},onEnterCancelled(R){b(R,!1,void 0,!0),ar(M,[R])},onAppearCancelled(R){b(R,!0,void 0,!0),ar(w,[R])},onLeaveCancelled(R){S(R),ar(C,[R])}})}function fE(e){if(e==null)return null;if(Lt(e))return[Wc(e.enter),Wc(e.leave)];{const t=Wc(e);return[t,t]}}function Wc(e){return MS(e)}function ki(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Vs]||(e[Vs]=new Set)).add(t)}function Ia(e,t){t.split(/\s+/).forEach(i=>i&&e.classList.remove(i));const n=e[Vs];n&&(n.delete(t),n.size||(e[Vs]=void 0))}function Av(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let hE=0;function Pv(e,t,n,i){const a=e._endId=++hE,r=()=>{a===e._endId&&i()};if(n!=null)return setTimeout(r,n);const{type:s,timeout:o,propCount:l}=h_(e,t);if(!s)return i();const u=s+"end";let c=0;const d=()=>{e.removeEventListener(u,f),r()},f=h=>{h.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},o+1),e.addEventListener(u,f)}function h_(e,t){const n=window.getComputedStyle(e),i=g=>(n[g]||"").split(", "),a=i(`${Ea}Delay`),r=i(`${Ea}Duration`),s=Rv(a,r),o=i(`${so}Delay`),l=i(`${so}Duration`),u=Rv(o,l);let c=null,d=0,f=0;t===Ea?s>0&&(c=Ea,d=s,f=r.length):t===so?u>0&&(c=so,d=u,f=l.length):(d=Math.max(s,u),c=d>0?s>u?Ea:so:null,f=c?c===Ea?r.length:l.length:0);const h=c===Ea&&/\b(transform|all)(,|$)/.test(i(`${Ea}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:h}}function Rv(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,i)=>Iv(n)+Iv(e[i])))}function Iv(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function jd(){return document.body.offsetHeight}function mE(e,t,n){const i=e[Vs];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Tu=Symbol("_vod"),m_=Symbol("_vsh"),vi={beforeMount(e,{value:t},{transition:n}){e[Tu]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):oo(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:i}){!t!=!n&&(i?t?(i.beforeEnter(e),oo(e,!0),i.enter(e)):i.leave(e,()=>{oo(e,!1)}):oo(e,t))},beforeUnmount(e,{value:t}){oo(e,t)}};function oo(e,t){e.style.display=t?e[Tu]:"none",e[m_]=!t}const v_=Symbol("");function vE(e){const t=Xr();if(!t)return;const n=t.ut=(a=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(r=>Cu(r,a))},i=()=>{const a=e(t.proxy);t.ce?Cu(t.ce,a):Kd(t.subTree,a),n(a)};Fh(()=>{wy(i)}),Zt(()=>{Te(i,Ti,{flush:"post"});const a=new MutationObserver(i);a.observe(t.subTree.el.parentNode,{childList:!0}),$r(()=>a.disconnect())})}function Kd(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Kd(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Cu(e.el,t);else if(e.type===Ne)e.children.forEach(n=>Kd(n,t));else if(e.type===ou){let{el:n,anchor:i}=e;for(;n&&(Cu(n,t),n!==i);)n=n.nextSibling}}function Cu(e,t){if(e.nodeType===1){const n=e.style;let i="";for(const a in t)n.setProperty(`--${a}`,t[a]),i+=`--${a}: ${t[a]};`;n[v_]=i}}const gE=/(^|;)\s*display\s*:/;function pE(e,t,n){const i=e.style,a=Wt(n);let r=!1;if(n&&!a){if(t)if(Wt(t))for(const s of t.split(";")){const o=s.slice(0,s.indexOf(":")).trim();n[o]==null&&uu(i,o,"")}else for(const s in t)n[s]==null&&uu(i,s,"");for(const s in n)s==="display"&&(r=!0),uu(i,s,n[s])}else if(a){if(t!==n){const s=i[v_];s&&(n+=";"+s),i.cssText=n,r=gE.test(n)}}else t&&e.removeAttribute("style");Tu in e&&(e[Tu]=r?i.display:"",e[m_]&&(i.display="none"))}const Dv=/\s*!important$/;function uu(e,t,n){if(Ze(n))n.forEach(i=>uu(e,t,i));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const i=yE(e,t);Dv.test(n)?e.setProperty(Ya(i),n.replace(Dv,""),"important"):e[i]=n}}const Lv=["Webkit","Moz","ms"],$c={};function yE(e,t){const n=$c[t];if(n)return n;let i=Xn(t);if(i!=="filter"&&i in e)return $c[t]=i;i=Hi(i);for(let a=0;a<Lv.length;a++){const r=Lv[a]+i;if(r in e)return $c[t]=r}return t}const kv="http://www.w3.org/1999/xlink";function Vv(e,t,n,i,a,r=PS(t)){i&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(kv,t.slice(6,t.length)):e.setAttributeNS(kv,t,n):n==null||r&&!ey(n)?e.removeAttribute(t):e.setAttribute(t,r?"":Xa(n)?String(n):n)}function Fv(e,t,n,i,a){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?u_(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const o=r==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(o!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const o=typeof e[t];o==="boolean"?n=ey(n):n==null&&o==="string"?(n="",s=!0):o==="number"&&(n=0,s=!0)}try{e[t]=n}catch{}s&&e.removeAttribute(a||t)}function Es(e,t,n,i){e.addEventListener(t,n,i)}function _E(e,t,n,i){e.removeEventListener(t,n,i)}const Nv=Symbol("_vei");function bE(e,t,n,i,a=null){const r=e[Nv]||(e[Nv]={}),s=r[t];if(i&&s)s.value=i;else{const[o,l]=xE(t);if(i){const u=r[t]=EE(i,a);Es(e,o,u,l)}else s&&(_E(e,o,s,l),r[t]=void 0)}}const Ov=/(?:Once|Passive|Capture)$/;function xE(e){let t;if(Ov.test(e)){t={};let i;for(;i=e.match(Ov);)e=e.slice(0,e.length-i[0].length),t[i[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Ya(e.slice(2)),t]}let Xc=0;const SE=Promise.resolve(),ME=()=>Xc||(SE.then(()=>Xc=0),Xc=Date.now());function EE(e,t){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;Pi(wE(i,n.value),t,5,[i])};return n.value=e,n.attached=ME(),n}function wE(e,t){if(Ze(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(i=>a=>!a._stopped&&i&&i(a))}else return t}const Uv=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,TE=(e,t,n,i,a,r)=>{const s=a==="svg";t==="class"?mE(e,i,s):t==="style"?pE(e,n,i):Gu(t)?Sh(t)||bE(e,t,n,i,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):CE(e,t,i,s))?(Fv(e,t,i),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Vv(e,t,i,s,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Wt(i))?Fv(e,Xn(t),i,r,t):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),Vv(e,t,i,s))};function CE(e,t,n,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&Uv(t)&&tt(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const a=e.tagName;if(a==="IMG"||a==="VIDEO"||a==="CANVAS"||a==="SOURCE")return!1}return Uv(t)&&Wt(n)?!1:t in e}const g_=new WeakMap,p_=new WeakMap,Au=Symbol("_moveCb"),Bv=Symbol("_enterCb"),AE=e=>(delete e.props.mode,e),PE=AE({name:"TransitionGroup",props:ln({},d_,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Xr(),i=ky();let a,r;return Nh(()=>{if(!a.length)return;const s=e.moveClass||`${e.name||"v"}-move`;if(!LE(a[0].el,n.vnode.el,s))return;a.forEach(RE),a.forEach(IE);const o=a.filter(DE);jd(),o.forEach(l=>{const u=l.el,c=u.style;ki(u,s),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Au]=f=>{f&&f.target!==u||(!f||/transform$/.test(f.propertyName))&&(u.removeEventListener("transitionend",d),u[Au]=null,Ia(u,s))};u.addEventListener("transitionend",d)})}),()=>{const s=Ye(e),o=f_(s);let l=s.tag||Ne;if(a=[],r)for(let u=0;u<r.length;u++){const c=r[u];c.el&&c.el instanceof Element&&(a.push(c),Lr(c,Do(c,o,i,n)),g_.set(c,c.el.getBoundingClientRect()))}r=t.default?kh(t.default()):[];for(let u=0;u<r.length;u++){const c=r[u];c.key!=null&&Lr(c,Do(c,o,i,n))}return y(l,null,r)}}}),$h=PE;function RE(e){const t=e.el;t[Au]&&t[Au](),t[Bv]&&t[Bv]()}function IE(e){p_.set(e,e.el.getBoundingClientRect())}function DE(e){const t=g_.get(e),n=p_.get(e),i=t.left-n.left,a=t.top-n.top;if(i||a){const r=e.el.style;return r.transform=r.webkitTransform=`translate(${i}px,${a}px)`,r.transitionDuration="0s",e}}function LE(e,t,n){const i=e.cloneNode(),a=e[Vs];a&&a.forEach(o=>{o.split(/\s+/).forEach(l=>l&&i.classList.remove(l))}),n.split(/\s+/).forEach(o=>o&&i.classList.add(o)),i.style.display="none";const r=t.nodeType===1?t:t.parentNode;r.appendChild(i);const{hasTransform:s}=h_(i);return r.removeChild(i),s}const zv=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ze(t)?n=>ru(t,n):t};function kE(e){e.target.composing=!0}function Hv(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Yc=Symbol("_assign"),VE={created(e,{modifiers:{lazy:t,trim:n,number:i}},a){e[Yc]=zv(a);const r=i||a.props&&a.props.type==="number";Es(e,t?"change":"input",s=>{if(s.target.composing)return;let o=e.value;n&&(o=o.trim()),r&&(o=Nd(o)),e[Yc](o)}),n&&Es(e,"change",()=>{e.value=e.value.trim()}),t||(Es(e,"compositionstart",kE),Es(e,"compositionend",Hv),Es(e,"change",Hv))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:i,trim:a,number:r}},s){if(e[Yc]=zv(s),e.composing)return;const o=(r||e.type==="number")&&!/^0\d/.test(e.value)?Nd(e.value):e.value,l=t??"";o!==l&&(document.activeElement===e&&e.type!=="range"&&(i&&t===n||a&&e.value.trim()===l)||(e.value=l))}},FE=["ctrl","shift","alt","meta"],NE={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>FE.some(n=>e[`${n}Key`]&&!t.includes(n))},Gv=(e,t)=>{const n=e._withMods||(e._withMods={}),i=t.join(".");return n[i]||(n[i]=(a,...r)=>{for(let s=0;s<t.length;s++){const o=NE[t[s]];if(o&&o(a,t))return}return e(a,...r)})},OE={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},UE=(e,t)=>{const n=e._withKeys||(e._withKeys={}),i=t.join(".");return n[i]||(n[i]=a=>{if(!("key"in a))return;const r=Ya(a.key);if(t.some(s=>s===r||OE[s]===r))return e(a)})},BE=ln({patchProp:TE},cE);let Wv;function y_(){return Wv||(Wv=VM(BE))}const __=(...e)=>{y_().render(...e)},zE=(...e)=>{const t=y_().createApp(...e),{mount:n}=t;return t.mount=i=>{const a=GE(i);if(!a)return;const r=t._component;!tt(r)&&!r.render&&!r.template&&(r.template=a.innerHTML),a.nodeType===1&&(a.textContent="");const s=n(a,!1,HE(a));return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),s},t};function HE(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function GE(e){return Wt(e)?document.querySelector(e):e}const WE="/assets/images/logo.png";/**
* @license
* Copyright 2010-2025 Three.js Authors
* SPDX-License-Identifier: MIT
*/const Xh="174",$E=0,$v=1,XE=2,b_=1,YE=2,Qi=3,Ha=0,Wn=1,ia=2,Ba=0,Ds=1,Pu=2,Xv=3,Yv=4,qE=5,yr=100,jE=101,KE=102,ZE=103,JE=104,QE=200,ew=201,tw=202,nw=203,Zd=204,Jd=205,iw=206,aw=207,rw=208,sw=209,ow=210,lw=211,uw=212,cw=213,dw=214,Qd=0,ef=1,tf=2,Fs=3,nf=4,af=5,rf=6,sf=7,x_=0,fw=1,hw=2,za=0,mw=1,vw=2,gw=3,pw=4,yw=5,_w=6,bw=7,S_=300,Ns=301,Os=302,of=303,lf=304,Qu=306,uf=1e3,br=1001,cf=1002,Ai=1003,xw=1004,Cl=1005,Ui=1006,qc=1007,xr=1008,fa=1009,M_=1010,E_=1011,Fo=1012,Yh=1013,kr=1014,aa=1015,Qo=1016,qh=1017,jh=1018,Us=1020,w_=35902,T_=1021,C_=1022,wi=1023,A_=1024,P_=1025,Ls=1026,Bs=1027,R_=1028,Kh=1029,I_=1030,Zh=1031,Jh=1033,cu=33776,du=33777,fu=33778,hu=33779,df=35840,ff=35841,hf=35842,mf=35843,vf=36196,gf=37492,pf=37496,yf=37808,_f=37809,bf=37810,xf=37811,Sf=37812,Mf=37813,Ef=37814,wf=37815,Tf=37816,Cf=37817,Af=37818,Pf=37819,Rf=37820,If=37821,mu=36492,Df=36494,Lf=36495,D_=36283,kf=36284,Vf=36285,Ff=36286,Sw=3200,Mw=3201,Ew=0,ww=1,Va="",ci="srgb",zs="srgb-linear",Ru="linear",Ct="srgb",rs=7680,qv=519,Tw=512,Cw=513,Aw=514,L_=515,Pw=516,Rw=517,Iw=518,Dw=519,jv=35044,Kv="300 es",ra=2e3,Iu=2001;class Ks{addEventListener(t,n){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[t]===void 0&&(i[t]=[]),i[t].indexOf(n)===-1&&i[t].push(n)}hasEventListener(t,n){const i=this._listeners;return i===void 0?!1:i[t]!==void 0&&i[t].indexOf(n)!==-1}removeEventListener(t,n){const i=this._listeners;if(i===void 0)return;const a=i[t];if(a!==void 0){const r=a.indexOf(n);r!==-1&&a.splice(r,1)}}dispatchEvent(t){const n=this._listeners;if(n===void 0)return;const i=n[t.type];if(i!==void 0){t.target=this;const a=i.slice(0);for(let r=0,s=a.length;r<s;r++)a[r].call(this,t);t.target=null}}}const En=["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"],jc=Math.PI/180,Nf=180/Math.PI;function el(){const e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(En[e&255]+En[e>>8&255]+En[e>>16&255]+En[e>>24&255]+"-"+En[t&255]+En[t>>8&255]+"-"+En[t>>16&15|64]+En[t>>24&255]+"-"+En[n&63|128]+En[n>>8&255]+"-"+En[n>>16&255]+En[n>>24&255]+En[i&255]+En[i>>8&255]+En[i>>16&255]+En[i>>24&255]).toLowerCase()}function ht(e,t,n){return Math.max(t,Math.min(n,e))}function Lw(e,t){return(e%t+t)%t}function Kc(e,t,n){return(1-n)*e+n*t}function lo(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function Gn(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(e*4294967295);case Uint16Array:return Math.round(e*65535);case Uint8Array:return Math.round(e*255);case Int32Array:return Math.round(e*2147483647);case Int16Array:return Math.round(e*32767);case Int8Array:return Math.round(e*127);default:throw new Error("Invalid component type.")}}class Pt{constructor(t=0,n=0){Pt.prototype.isVector2=!0,this.x=t,this.y=n}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,n){return this.x=t,this.y=n,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,n){switch(t){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,n){return this.x=t.x+n.x,this.y=t.y+n.y,this}addScaledVector(t,n){return this.x+=t.x*n,this.y+=t.y*n,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,n){return this.x=t.x-n.x,this.y=t.y-n.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const n=this.x,i=this.y,a=t.elements;return this.x=a[0]*n+a[3]*i+a[6],this.y=a[1]*n+a[4]*i+a[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,n){return this.x=ht(this.x,t.x,n.x),this.y=ht(this.y,t.y,n.y),this}clampScalar(t,n){return this.x=ht(this.x,t,n),this.y=ht(this.y,t,n),this}clampLength(t,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(ht(i,t,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.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(t){const n=Math.sqrt(this.lengthSq()*t.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(t)/n;return Math.acos(ht(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const n=this.x-t.x,i=this.y-t.y;return n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,n){return this.x+=(t.x-this.x)*n,this.y+=(t.y-this.y)*n,this}lerpVectors(t,n,i){return this.x=t.x+(n.x-t.x)*i,this.y=t.y+(n.y-t.y)*i,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,n=0){return this.x=t[n],this.y=t[n+1],this}toArray(t=[],n=0){return t[n]=this.x,t[n+1]=this.y,t}fromBufferAttribute(t,n){return this.x=t.getX(n),this.y=t.getY(n),this}rotateAround(t,n){const i=Math.cos(n),a=Math.sin(n),r=this.x-t.x,s=this.y-t.y;return this.x=r*i-s*a+t.x,this.y=r*a+s*i+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class ut{constructor(t,n,i,a,r,s,o,l,u){ut.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,n,i,a,r,s,o,l,u)}set(t,n,i,a,r,s,o,l,u){const c=this.elements;return c[0]=t,c[1]=a,c[2]=o,c[3]=n,c[4]=r,c[5]=l,c[6]=i,c[7]=s,c[8]=u,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const n=this.elements,i=t.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(t,n,i){return t.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const n=t.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,n){const i=t.elements,a=n.elements,r=this.elements,s=i[0],o=i[3],l=i[6],u=i[1],c=i[4],d=i[7],f=i[2],h=i[5],g=i[8],p=a[0],m=a[3],v=a[6],_=a[1],M=a[4],x=a[7],C=a[2],T=a[5],P=a[8];return r[0]=s*p+o*_+l*C,r[3]=s*m+o*M+l*T,r[6]=s*v+o*x+l*P,r[1]=u*p+c*_+d*C,r[4]=u*m+c*M+d*T,r[7]=u*v+c*x+d*P,r[2]=f*p+h*_+g*C,r[5]=f*m+h*M+g*T,r[8]=f*v+h*x+g*P,this}multiplyScalar(t){const n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=t,n[4]*=t,n[7]*=t,n[2]*=t,n[5]*=t,n[8]*=t,this}determinant(){const t=this.elements,n=t[0],i=t[1],a=t[2],r=t[3],s=t[4],o=t[5],l=t[6],u=t[7],c=t[8];return n*s*c-n*o*u-i*r*c+i*o*l+a*r*u-a*s*l}invert(){const t=this.elements,n=t[0],i=t[1],a=t[2],r=t[3],s=t[4],o=t[5],l=t[6],u=t[7],c=t[8],d=c*s-o*u,f=o*l-c*r,h=u*r-s*l,g=n*d+i*f+a*h;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const p=1/g;return t[0]=d*p,t[1]=(a*u-c*i)*p,t[2]=(o*i-a*s)*p,t[3]=f*p,t[4]=(c*n-a*l)*p,t[5]=(a*r-o*n)*p,t[6]=h*p,t[7]=(i*l-u*n)*p,t[8]=(s*n-i*r)*p,this}transpose(){let t;const n=this.elements;return t=n[1],n[1]=n[3],n[3]=t,t=n[2],n[2]=n[6],n[6]=t,t=n[5],n[5]=n[7],n[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const n=this.elements;return t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8],this}setUvTransform(t,n,i,a,r,s,o){const l=Math.cos(r),u=Math.sin(r);return this.set(i*l,i*u,-i*(l*s+u*o)+s+t,-a*u,a*l,-a*(-u*s+l*o)+o+n,0,0,1),this}scale(t,n){return this.premultiply(Zc.makeScale(t,n)),this}rotate(t){return this.premultiply(Zc.makeRotation(-t)),this}translate(t,n){return this.premultiply(Zc.makeTranslation(t,n)),this}makeTranslation(t,n){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,n,0,0,1),this}makeRotation(t){const n=Math.cos(t),i=Math.sin(t);return this.set(n,-i,0,i,n,0,0,0,1),this}makeScale(t,n){return this.set(t,0,0,0,n,0,0,0,1),this}equals(t){const n=this.elements,i=t.elements;for(let a=0;a<9;a++)if(n[a]!==i[a])return!1;return!0}fromArray(t,n=0){for(let i=0;i<9;i++)this.elements[i]=t[i+n];return this}toArray(t=[],n=0){const i=this.elements;return t[n]=i[0],t[n+1]=i[1],t[n+2]=i[2],t[n+3]=i[3],t[n+4]=i[4],t[n+5]=i[5],t[n+6]=i[6],t[n+7]=i[7],t[n+8]=i[8],t}clone(){return new this.constructor().fromArray(this.elements)}}const Zc=new ut;function k_(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}function Du(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function kw(){const e=Du("canvas");return e.style.display="block",e}const Zv={};function mr(e){e in Zv||(Zv[e]=!0,console.warn(e))}function Vw(e,t,n){return new Promise(function(i,a){function r(){switch(e.clientWaitSync(t,e.SYNC_FLUSH_COMMANDS_BIT,0)){case e.WAIT_FAILED:a();break;case e.TIMEOUT_EXPIRED:setTimeout(r,n);break;default:i()}}setTimeout(r,n)})}function Fw(e){const t=e.elements;t[2]=.5*t[2]+.5*t[3],t[6]=.5*t[6]+.5*t[7],t[10]=.5*t[10]+.5*t[11],t[14]=.5*t[14]+.5*t[15]}function Nw(e){const t=e.elements;t[11]===-1?(t[10]=-t[10]-1,t[14]=-t[14]):(t[10]=-t[10],t[14]=-t[14]+1)}const Jv=new ut().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Qv=new ut().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function Ow(){const e={enabled:!0,workingColorSpace:zs,spaces:{},convert:function(a,r,s){return this.enabled===!1||r===s||!r||!s||(this.spaces[r].transfer===Ct&&(a.r=oa(a.r),a.g=oa(a.g),a.b=oa(a.b)),this.spaces[r].primaries!==this.spaces[s].primaries&&(a.applyMatrix3(this.spaces[r].toXYZ),a.applyMatrix3(this.spaces[s].fromXYZ)),this.spaces[s].transfer===Ct&&(a.r=ks(a.r),a.g=ks(a.g),a.b=ks(a.b))),a},fromWorkingColorSpace:function(a,r){return this.convert(a,this.workingColorSpace,r)},toWorkingColorSpace:function(a,r){return this.convert(a,r,this.workingColorSpace)},getPrimaries:function(a){return this.spaces[a].primaries},getTransfer:function(a){return a===Va?Ru:this.spaces[a].transfer},getLuminanceCoefficients:function(a,r=this.workingColorSpace){return a.fromArray(this.spaces[r].luminanceCoefficients)},define:function(a){Object.assign(this.spaces,a)},_getMatrix:function(a,r,s){return a.copy(this.spaces[r].toXYZ).multiply(this.spaces[s].fromXYZ)},_getDrawingBufferColorSpace:function(a){return this.spaces[a].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(a=this.workingColorSpace){return this.spaces[a].workingColorSpaceConfig.unpackColorSpace}},t=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],i=[.3127,.329];return e.define({[zs]:{primaries:t,whitePoint:i,transfer:Ru,toXYZ:Jv,fromXYZ:Qv,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:ci},outputColorSpaceConfig:{drawingBufferColorSpace:ci}},[ci]:{primaries:t,whitePoint:i,transfer:Ct,toXYZ:Jv,fromXYZ:Qv,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:ci}}}),e}const bt=Ow();function oa(e){return e<.04045?e*.0773993808:Math.pow(e*.9478672986+.0521327014,2.4)}function ks(e){return e<.0031308?e*12.92:1.055*Math.pow(e,.41666)-.055}let ss;class Uw{static getDataURL(t){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let n;if(t instanceof HTMLCanvasElement)n=t;else{ss===void 0&&(ss=Du("canvas")),ss.width=t.width,ss.height=t.height;const i=ss.getContext("2d");t instanceof ImageData?i.putImageData(t,0,0):i.drawImage(t,0,0,t.width,t.height),n=ss}return n.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){const n=Du("canvas");n.width=t.width,n.height=t.height;const i=n.getContext("2d");i.drawImage(t,0,0,t.width,t.height);const a=i.getImageData(0,0,t.width,t.height),r=a.data;for(let s=0;s<r.length;s++)r[s]=oa(r[s]/255)*255;return i.putImageData(a,0,0),n}else if(t.data){const n=t.data.slice(0);for(let i=0;i<n.length;i++)n instanceof Uint8Array||n instanceof Uint8ClampedArray?n[i]=Math.floor(oa(n[i]/255)*255):n[i]=oa(n[i]);return{data:n,width:t.width,height:t.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}}let Bw=0;class Qh{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:Bw++}),this.uuid=el(),this.data=t,this.dataReady=!0,this.version=0}set needsUpdate(t){t===!0&&this.version++}toJSON(t){const n=t===void 0||typeof t=="string";if(!n&&t.images[this.uuid]!==void 0)return t.images[this.uuid];const i={uuid:this.uuid,url:""},a=this.data;if(a!==null){let r;if(Array.isArray(a)){r=[];for(let s=0,o=a.length;s<o;s++)a[s].isDataTexture?r.push(Jc(a[s].image)):r.push(Jc(a[s]))}else r=Jc(a);i.url=r}return n||(t.images[this.uuid]=i),i}}function Jc(e){return typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap?Uw.getDataURL(e):e.data?{data:Array.from(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let zw=0;class $n extends Ks{constructor(t=$n.DEFAULT_IMAGE,n=$n.DEFAULT_MAPPING,i=br,a=br,r=Ui,s=xr,o=wi,l=fa,u=$n.DEFAULT_ANISOTROPY,c=Va){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:zw++}),this.uuid=el(),this.name="",this.source=new Qh(t),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=i,this.wrapT=a,this.magFilter=r,this.minFilter=s,this.anisotropy=u,this.format=o,this.internalFormat=null,this.type=l,this.offset=new Pt(0,0),this.repeat=new Pt(1,1),this.center=new Pt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new ut,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=c,this.userData={},this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.pmremVersion=0}get image(){return this.source.data}set image(t=null){this.source.data=t}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(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}toJSON(t){const n=t===void 0||typeof t=="string";if(!n&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];const i={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).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||(t.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==S_)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case uf:t.x=t.x-Math.floor(t.x);break;case br:t.x=t.x<0?0:1;break;case cf:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case uf:t.y=t.y-Math.floor(t.y);break;case br:t.y=t.y<0?0:1;break;case cf:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}}$n.DEFAULT_IMAGE=null;$n.DEFAULT_MAPPING=S_;$n.DEFAULT_ANISOTROPY=1;class Jt{constructor(t=0,n=0,i=0,a=1){Jt.prototype.isVector4=!0,this.x=t,this.y=n,this.z=i,this.w=a}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,n,i,a){return this.x=t,this.y=n,this.z=i,this.w=a,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,n){switch(t){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: "+t)}return this}getComponent(t){switch(t){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: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,n){return this.x=t.x+n.x,this.y=t.y+n.y,this.z=t.z+n.z,this.w=t.w+n.w,this}addScaledVector(t,n){return this.x+=t.x*n,this.y+=t.y*n,this.z+=t.z*n,this.w+=t.w*n,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,n){return this.x=t.x-n.x,this.y=t.y-n.y,this.z=t.z-n.z,this.w=t.w-n.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const n=this.x,i=this.y,a=this.z,r=this.w,s=t.elements;return this.x=s[0]*n+s[4]*i+s[8]*a+s[12]*r,this.y=s[1]*n+s[5]*i+s[9]*a+s[13]*r,this.z=s[2]*n+s[6]*i+s[10]*a+s[14]*r,this.w=s[3]*n+s[7]*i+s[11]*a+s[15]*r,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const n=Math.sqrt(1-t.w*t.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/n,this.y=t.y/n,this.z=t.z/n),this}setAxisAngleFromRotationMatrix(t){let n,i,a,r;const l=t.elements,u=l[0],c=l[4],d=l[8],f=l[1],h=l[5],g=l[9],p=l[2],m=l[6],v=l[10];if(Math.abs(c-f)<.01&&Math.abs(d-p)<.01&&Math.abs(g-m)<.01){if(Math.abs(c+f)<.1&&Math.abs(d+p)<.1&&Math.abs(g+m)<.1&&Math.abs(u+h+v-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const M=(u+1)/2,x=(h+1)/2,C=(v+1)/2,T=(c+f)/4,P=(d+p)/4,w=(g+m)/4;return M>x&&M>C?M<.01?(i=0,a=.707106781,r=.707106781):(i=Math.sqrt(M),a=T/i,r=P/i):x>C?x<.01?(i=.707106781,a=0,r=.707106781):(a=Math.sqrt(x),i=T/a,r=w/a):C<.01?(i=.707106781,a=.707106781,r=0):(r=Math.sqrt(C),i=P/r,a=w/r),this.set(i,a,r,n),this}let _=Math.sqrt((m-g)*(m-g)+(d-p)*(d-p)+(f-c)*(f-c));return Math.abs(_)<.001&&(_=1),this.x=(m-g)/_,this.y=(d-p)/_,this.z=(f-c)/_,this.w=Math.acos((u+h+v-1)/2),this}setFromMatrixPosition(t){const n=t.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this.w=n[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,n){return this.x=ht(this.x,t.x,n.x),this.y=ht(this.y,t.y,n.y),this.z=ht(this.z,t.z,n.z),this.w=ht(this.w,t.w,n.w),this}clampScalar(t,n){return this.x=ht(this.x,t,n),this.y=ht(this.y,t,n),this.z=ht(this.z,t,n),this.w=ht(this.w,t,n),this}clampLength(t,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(ht(i,t,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}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(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.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(t){return this.normalize().multiplyScalar(t)}lerp(t,n){return this.x+=(t.x-this.x)*n,this.y+=(t.y-this.y)*n,this.z+=(t.z-this.z)*n,this.w+=(t.w-this.w)*n,this}lerpVectors(t,n,i){return this.x=t.x+(n.x-t.x)*i,this.y=t.y+(n.y-t.y)*i,this.z=t.z+(n.z-t.z)*i,this.w=t.w+(n.w-t.w)*i,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,n=0){return this.x=t[n],this.y=t[n+1],this.z=t[n+2],this.w=t[n+3],this}toArray(t=[],n=0){return t[n]=this.x,t[n+1]=this.y,t[n+2]=this.z,t[n+3]=this.w,t}fromBufferAttribute(t,n){return this.x=t.getX(n),this.y=t.getY(n),this.z=t.getZ(n),this.w=t.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 Hw extends Ks{constructor(t=1,n=1,i={}){super(),this.isRenderTarget=!0,this.width=t,this.height=n,this.depth=1,this.scissor=new Jt(0,0,t,n),this.scissorTest=!1,this.viewport=new Jt(0,0,t,n);const a={width:t,height:n,depth:1};i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Ui,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},i);const r=new $n(a,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace);r.flipY=!1,r.generateMipmaps=i.generateMipmaps,r.internalFormat=i.internalFormat,this.textures=[];const s=i.count;for(let o=0;o<s;o++)this.textures[o]=r.clone(),this.textures[o].isRenderTargetTexture=!0,this.textures[o].renderTarget=this;this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.resolveDepthBuffer=i.resolveDepthBuffer,this.resolveStencilBuffer=i.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=i.depthTexture,this.samples=i.samples}get texture(){return this.textures[0]}set texture(t){this.textures[0]=t}set depthTexture(t){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),t!==null&&(t.renderTarget=this),this._depthTexture=t}get depthTexture(){return this._depthTexture}setSize(t,n,i=1){if(this.width!==t||this.height!==n||this.depth!==i){this.width=t,this.height=n,this.depth=i;for(let a=0,r=this.textures.length;a<r;a++)this.textures[a].image.width=t,this.textures[a].image.height=n,this.textures[a].image.depth=i;this.dispose()}this.viewport.set(0,0,t,n),this.scissor.set(0,0,t,n)}clone(){return new this.constructor().copy(this)}copy(t){this.width=t.width,this.height=t.height,this.depth=t.depth,this.scissor.copy(t.scissor),this.scissorTest=t.scissorTest,this.viewport.copy(t.viewport),this.textures.length=0;for(let n=0,i=t.textures.length;n<i;n++){this.textures[n]=t.textures[n].clone(),this.textures[n].isRenderTargetTexture=!0,this.textures[n].renderTarget=this;const a=Object.assign({},t.textures[n].image);this.textures[n].source=new Qh(a)}return this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.resolveDepthBuffer=t.resolveDepthBuffer,this.resolveStencilBuffer=t.resolveStencilBuffer,t.depthTexture!==null&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Vr extends Hw{constructor(t=1,n=1,i={}){super(t,n,i),this.isWebGLRenderTarget=!0}}class V_ extends $n{constructor(t=null,n=1,i=1,a=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:n,height:i,depth:a},this.magFilter=Ai,this.minFilter=Ai,this.wrapR=br,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(t){this.layerUpdates.add(t)}clearLayerUpdates(){this.layerUpdates.clear()}}class Gw extends $n{constructor(t=null,n=1,i=1,a=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:n,height:i,depth:a},this.magFilter=Ai,this.minFilter=Ai,this.wrapR=br,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class tl{constructor(t=0,n=0,i=0,a=1){this.isQuaternion=!0,this._x=t,this._y=n,this._z=i,this._w=a}static slerpFlat(t,n,i,a,r,s,o){let l=i[a+0],u=i[a+1],c=i[a+2],d=i[a+3];const f=r[s+0],h=r[s+1],g=r[s+2],p=r[s+3];if(o===0){t[n+0]=l,t[n+1]=u,t[n+2]=c,t[n+3]=d;return}if(o===1){t[n+0]=f,t[n+1]=h,t[n+2]=g,t[n+3]=p;return}if(d!==p||l!==f||u!==h||c!==g){let m=1-o;const v=l*f+u*h+c*g+d*p,_=v>=0?1:-1,M=1-v*v;if(M>Number.EPSILON){const C=Math.sqrt(M),T=Math.atan2(C,v*_);m=Math.sin(m*T)/C,o=Math.sin(o*T)/C}const x=o*_;if(l=l*m+f*x,u=u*m+h*x,c=c*m+g*x,d=d*m+p*x,m===1-o){const C=1/Math.sqrt(l*l+u*u+c*c+d*d);l*=C,u*=C,c*=C,d*=C}}t[n]=l,t[n+1]=u,t[n+2]=c,t[n+3]=d}static multiplyQuaternionsFlat(t,n,i,a,r,s){const o=i[a],l=i[a+1],u=i[a+2],c=i[a+3],d=r[s],f=r[s+1],h=r[s+2],g=r[s+3];return t[n]=o*g+c*d+l*h-u*f,t[n+1]=l*g+c*f+u*d-o*h,t[n+2]=u*g+c*h+o*f-l*d,t[n+3]=c*g-o*d-l*f-u*h,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,n,i,a){return this._x=t,this._y=n,this._z=i,this._w=a,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,n=!0){const i=t._x,a=t._y,r=t._z,s=t._order,o=Math.cos,l=Math.sin,u=o(i/2),c=o(a/2),d=o(r/2),f=l(i/2),h=l(a/2),g=l(r/2);switch(s){case"XYZ":this._x=f*c*d+u*h*g,this._y=u*h*d-f*c*g,this._z=u*c*g+f*h*d,this._w=u*c*d-f*h*g;break;case"YXZ":this._x=f*c*d+u*h*g,this._y=u*h*d-f*c*g,this._z=u*c*g-f*h*d,this._w=u*c*d+f*h*g;break;case"ZXY":this._x=f*c*d-u*h*g,this._y=u*h*d+f*c*g,this._z=u*c*g+f*h*d,this._w=u*c*d-f*h*g;break;case"ZYX":this._x=f*c*d-u*h*g,this._y=u*h*d+f*c*g,this._z=u*c*g-f*h*d,this._w=u*c*d+f*h*g;break;case"YZX":this._x=f*c*d+u*h*g,this._y=u*h*d+f*c*g,this._z=u*c*g-f*h*d,this._w=u*c*d-f*h*g;break;case"XZY":this._x=f*c*d-u*h*g,this._y=u*h*d-f*c*g,this._z=u*c*g+f*h*d,this._w=u*c*d+f*h*g;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return n===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,n){const i=n/2,a=Math.sin(i);return this._x=t.x*a,this._y=t.y*a,this._z=t.z*a,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(t){const n=t.elements,i=n[0],a=n[4],r=n[8],s=n[1],o=n[5],l=n[9],u=n[2],c=n[6],d=n[10],f=i+o+d;if(f>0){const h=.5/Math.sqrt(f+1);this._w=.25/h,this._x=(c-l)*h,this._y=(r-u)*h,this._z=(s-a)*h}else if(i>o&&i>d){const h=2*Math.sqrt(1+i-o-d);this._w=(c-l)/h,this._x=.25*h,this._y=(a+s)/h,this._z=(r+u)/h}else if(o>d){const h=2*Math.sqrt(1+o-i-d);this._w=(r-u)/h,this._x=(a+s)/h,this._y=.25*h,this._z=(l+c)/h}else{const h=2*Math.sqrt(1+d-i-o);this._w=(s-a)/h,this._x=(r+u)/h,this._y=(l+c)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(t,n){let i=t.dot(n)+1;return i<Number.EPSILON?(i=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=i):(this._x=0,this._y=-t.z,this._z=t.y,this._w=i)):(this._x=t.y*n.z-t.z*n.y,this._y=t.z*n.x-t.x*n.z,this._z=t.x*n.y-t.y*n.x,this._w=i),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(ht(this.dot(t),-1,1)))}rotateTowards(t,n){const i=this.angleTo(t);if(i===0)return this;const a=Math.min(1,n/i);return this.slerp(t,a),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(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._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 t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,n){const i=t._x,a=t._y,r=t._z,s=t._w,o=n._x,l=n._y,u=n._z,c=n._w;return this._x=i*c+s*o+a*u-r*l,this._y=a*c+s*l+r*o-i*u,this._z=r*c+s*u+i*l-a*o,this._w=s*c-i*o-a*l-r*u,this._onChangeCallback(),this}slerp(t,n){if(n===0)return this;if(n===1)return this.copy(t);const i=this._x,a=this._y,r=this._z,s=this._w;let o=s*t._w+i*t._x+a*t._y+r*t._z;if(o<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,o=-o):this.copy(t),o>=1)return this._w=s,this._x=i,this._y=a,this._z=r,this;const l=1-o*o;if(l<=Number.EPSILON){const h=1-n;return this._w=h*s+n*this._w,this._x=h*i+n*this._x,this._y=h*a+n*this._y,this._z=h*r+n*this._z,this.normalize(),this}const u=Math.sqrt(l),c=Math.atan2(u,o),d=Math.sin((1-n)*c)/u,f=Math.sin(n*c)/u;return this._w=s*d+this._w*f,this._x=i*d+this._x*f,this._y=a*d+this._y*f,this._z=r*d+this._z*f,this._onChangeCallback(),this}slerpQuaternions(t,n,i){return this.copy(t).slerp(n,i)}random(){const t=2*Math.PI*Math.random(),n=2*Math.PI*Math.random(),i=Math.random(),a=Math.sqrt(1-i),r=Math.sqrt(i);return this.set(a*Math.sin(t),a*Math.cos(t),r*Math.sin(n),r*Math.cos(n))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,n=0){return this._x=t[n],this._y=t[n+1],this._z=t[n+2],this._w=t[n+3],this._onChangeCallback(),this}toArray(t=[],n=0){return t[n]=this._x,t[n+1]=this._y,t[n+2]=this._z,t[n+3]=this._w,t}fromBufferAttribute(t,n){return this._x=t.getX(n),this._y=t.getY(n),this._z=t.getZ(n),this._w=t.getW(n),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class ce{constructor(t=0,n=0,i=0){ce.prototype.isVector3=!0,this.x=t,this.y=n,this.z=i}set(t,n,i){return i===void 0&&(i=this.z),this.x=t,this.y=n,this.z=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,n){switch(t){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: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,n){return this.x=t.x+n.x,this.y=t.y+n.y,this.z=t.z+n.z,this}addScaledVector(t,n){return this.x+=t.x*n,this.y+=t.y*n,this.z+=t.z*n,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,n){return this.x=t.x-n.x,this.y=t.y-n.y,this.z=t.z-n.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,n){return this.x=t.x*n.x,this.y=t.y*n.y,this.z=t.z*n.z,this}applyEuler(t){return this.applyQuaternion(eg.setFromEuler(t))}applyAxisAngle(t,n){return this.applyQuaternion(eg.setFromAxisAngle(t,n))}applyMatrix3(t){const n=this.x,i=this.y,a=this.z,r=t.elements;return this.x=r[0]*n+r[3]*i+r[6]*a,this.y=r[1]*n+r[4]*i+r[7]*a,this.z=r[2]*n+r[5]*i+r[8]*a,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const n=this.x,i=this.y,a=this.z,r=t.elements,s=1/(r[3]*n+r[7]*i+r[11]*a+r[15]);return this.x=(r[0]*n+r[4]*i+r[8]*a+r[12])*s,this.y=(r[1]*n+r[5]*i+r[9]*a+r[13])*s,this.z=(r[2]*n+r[6]*i+r[10]*a+r[14])*s,this}applyQuaternion(t){const n=this.x,i=this.y,a=this.z,r=t.x,s=t.y,o=t.z,l=t.w,u=2*(s*a-o*i),c=2*(o*n-r*a),d=2*(r*i-s*n);return this.x=n+l*u+s*d-o*c,this.y=i+l*c+o*u-r*d,this.z=a+l*d+r*c-s*u,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const n=this.x,i=this.y,a=this.z,r=t.elements;return this.x=r[0]*n+r[4]*i+r[8]*a,this.y=r[1]*n+r[5]*i+r[9]*a,this.z=r[2]*n+r[6]*i+r[10]*a,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,n){return this.x=ht(this.x,t.x,n.x),this.y=ht(this.y,t.y,n.y),this.z=ht(this.z,t.z,n.z),this}clampScalar(t,n){return this.x=ht(this.x,t,n),this.y=ht(this.y,t,n),this.z=ht(this.z,t,n),this}clampLength(t,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(ht(i,t,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.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(t){return this.normalize().multiplyScalar(t)}lerp(t,n){return this.x+=(t.x-this.x)*n,this.y+=(t.y-this.y)*n,this.z+=(t.z-this.z)*n,this}lerpVectors(t,n,i){return this.x=t.x+(n.x-t.x)*i,this.y=t.y+(n.y-t.y)*i,this.z=t.z+(n.z-t.z)*i,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,n){const i=t.x,a=t.y,r=t.z,s=n.x,o=n.y,l=n.z;return this.x=a*l-r*o,this.y=r*s-i*l,this.z=i*o-a*s,this}projectOnVector(t){const n=t.lengthSq();if(n===0)return this.set(0,0,0);const i=t.dot(this)/n;return this.copy(t).multiplyScalar(i)}projectOnPlane(t){return Qc.copy(this).projectOnVector(t),this.sub(Qc)}reflect(t){return this.sub(Qc.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const n=Math.sqrt(this.lengthSq()*t.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(t)/n;return Math.acos(ht(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const n=this.x-t.x,i=this.y-t.y,a=this.z-t.z;return n*n+i*i+a*a}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,n,i){const a=Math.sin(n)*t;return this.x=a*Math.sin(i),this.y=Math.cos(n)*t,this.z=a*Math.cos(i),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,n,i){return this.x=t*Math.sin(n),this.y=i,this.z=t*Math.cos(n),this}setFromMatrixPosition(t){const n=t.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(t){const n=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length(),a=this.setFromMatrixColumn(t,2).length();return this.x=n,this.y=i,this.z=a,this}setFromMatrixColumn(t,n){return this.fromArray(t.elements,n*4)}setFromMatrix3Column(t,n){return this.fromArray(t.elements,n*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,n=0){return this.x=t[n],this.y=t[n+1],this.z=t[n+2],this}toArray(t=[],n=0){return t[n]=this.x,t[n+1]=this.y,t[n+2]=this.z,t}fromBufferAttribute(t,n){return this.x=t.getX(n),this.y=t.getY(n),this.z=t.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,n=Math.random()*2-1,i=Math.sqrt(1-n*n);return this.x=i*Math.cos(t),this.y=n,this.z=i*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Qc=new ce,eg=new tl;class nl{constructor(t=new ce(1/0,1/0,1/0),n=new ce(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=n}set(t,n){return this.min.copy(t),this.max.copy(n),this}setFromArray(t){this.makeEmpty();for(let n=0,i=t.length;n<i;n+=3)this.expandByPoint(xi.fromArray(t,n));return this}setFromBufferAttribute(t){this.makeEmpty();for(let n=0,i=t.count;n<i;n++)this.expandByPoint(xi.fromBufferAttribute(t,n));return this}setFromPoints(t){this.makeEmpty();for(let n=0,i=t.length;n<i;n++)this.expandByPoint(t[n]);return this}setFromCenterAndSize(t,n){const i=xi.copy(n).multiplyScalar(.5);return this.min.copy(t).sub(i),this.max.copy(t).add(i),this}setFromObject(t,n=!1){return this.makeEmpty(),this.expandByObject(t,n)}clone(){return new this.constructor().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.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(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,n=!1){t.updateWorldMatrix(!1,!1);const i=t.geometry;if(i!==void 0){const r=i.getAttribute("position");if(n===!0&&r!==void 0&&t.isInstancedMesh!==!0)for(let s=0,o=r.count;s<o;s++)t.isMesh===!0?t.getVertexPosition(s,xi):xi.fromBufferAttribute(r,s),xi.applyMatrix4(t.matrixWorld),this.expandByPoint(xi);else t.boundingBox!==void 0?(t.boundingBox===null&&t.computeBoundingBox(),Al.copy(t.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),Al.copy(i.boundingBox)),Al.applyMatrix4(t.matrixWorld),this.union(Al)}const a=t.children;for(let r=0,s=a.length;r<s;r++)this.expandByObject(a[r],n);return this}containsPoint(t){return t.x>=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.max.z}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,n){return n.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return t.max.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,xi),xi.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let n,i;return t.normal.x>0?(n=t.normal.x*this.min.x,i=t.normal.x*this.max.x):(n=t.normal.x*this.max.x,i=t.normal.x*this.min.x),t.normal.y>0?(n+=t.normal.y*this.min.y,i+=t.normal.y*this.max.y):(n+=t.normal.y*this.max.y,i+=t.normal.y*this.min.y),t.normal.z>0?(n+=t.normal.z*this.min.z,i+=t.normal.z*this.max.z):(n+=t.normal.z*this.max.z,i+=t.normal.z*this.min.z),n<=-t.constant&&i>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(uo),Pl.subVectors(this.max,uo),os.subVectors(t.a,uo),ls.subVectors(t.b,uo),us.subVectors(t.c,uo),wa.subVectors(ls,os),Ta.subVectors(us,ls),rr.subVectors(os,us);let n=[0,-wa.z,wa.y,0,-Ta.z,Ta.y,0,-rr.z,rr.y,wa.z,0,-wa.x,Ta.z,0,-Ta.x,rr.z,0,-rr.x,-wa.y,wa.x,0,-Ta.y,Ta.x,0,-rr.y,rr.x,0];return!ed(n,os,ls,us,Pl)||(n=[1,0,0,0,1,0,0,0,1],!ed(n,os,ls,us,Pl))?!1:(Rl.crossVectors(wa,Ta),n=[Rl.x,Rl.y,Rl.z],ed(n,os,ls,us,Pl))}clampPoint(t,n){return n.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,xi).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize(xi).length()*.5),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(qi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),qi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),qi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),qi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),qi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),qi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),qi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),qi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(qi),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const qi=[new ce,new ce,new ce,new ce,new ce,new ce,new ce,new ce],xi=new ce,Al=new nl,os=new ce,ls=new ce,us=new ce,wa=new ce,Ta=new ce,rr=new ce,uo=new ce,Pl=new ce,Rl=new ce,sr=new ce;function ed(e,t,n,i,a){for(let r=0,s=e.length-3;r<=s;r+=3){sr.fromArray(e,r);const o=a.x*Math.abs(sr.x)+a.y*Math.abs(sr.y)+a.z*Math.abs(sr.z),l=t.dot(sr),u=n.dot(sr),c=i.dot(sr);if(Math.max(-Math.max(l,u,c),Math.min(l,u,c))>o)return!1}return!0}const Ww=new nl,co=new ce,td=new ce;class il{constructor(t=new ce,n=-1){this.isSphere=!0,this.center=t,this.radius=n}set(t,n){return this.center.copy(t),this.radius=n,this}setFromPoints(t,n){const i=this.center;n!==void 0?i.copy(n):Ww.setFromPoints(t).getCenter(i);let a=0;for(let r=0,s=t.length;r<s;r++)a=Math.max(a,i.distanceToSquared(t[r]));return this.radius=Math.sqrt(a),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){const n=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=n*n}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,n){const i=this.center.distanceToSquared(t);return n.copy(t),i>this.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;co.subVectors(t,this.center);const n=co.lengthSq();if(n>this.radius*this.radius){const i=Math.sqrt(n),a=(i-this.radius)*.5;this.center.addScaledVector(co,a/i),this.radius+=a}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(td.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(co.copy(t.center).add(td)),this.expandByPoint(co.copy(t.center).sub(td))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}}const ji=new ce,nd=new ce,Il=new ce,Ca=new ce,id=new ce,Dl=new ce,ad=new ce;class em{constructor(t=new ce,n=new ce(0,0,-1)){this.origin=t,this.direction=n}set(t,n){return this.origin.copy(t),this.direction.copy(n),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,n){return n.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,ji)),this}closestPointToPoint(t,n){n.subVectors(t,this.origin);const i=n.dot(this.direction);return i<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const n=ji.subVectors(t,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(t):(ji.copy(this.origin).addScaledVector(this.direction,n),ji.distanceToSquared(t))}distanceSqToSegment(t,n,i,a){nd.copy(t).add(n).multiplyScalar(.5),Il.copy(n).sub(t).normalize(),Ca.copy(this.origin).sub(nd);const r=t.distanceTo(n)*.5,s=-this.direction.dot(Il),o=Ca.dot(this.direction),l=-Ca.dot(Il),u=Ca.lengthSq(),c=Math.abs(1-s*s);let d,f,h,g;if(c>0)if(d=s*l-o,f=s*o-l,g=r*c,d>=0)if(f>=-g)if(f<=g){const p=1/c;d*=p,f*=p,h=d*(d+s*f+2*o)+f*(s*d+f+2*l)+u}else f=r,d=Math.max(0,-(s*f+o)),h=-d*d+f*(f+2*l)+u;else f=-r,d=Math.max(0,-(s*f+o)),h=-d*d+f*(f+2*l)+u;else f<=-g?(d=Math.max(0,-(-s*r+o)),f=d>0?-r:Math.min(Math.max(-r,-l),r),h=-d*d+f*(f+2*l)+u):f<=g?(d=0,f=Math.min(Math.max(-r,-l),r),h=f*(f+2*l)+u):(d=Math.max(0,-(s*r+o)),f=d>0?r:Math.min(Math.max(-r,-l),r),h=-d*d+f*(f+2*l)+u);else f=s>0?-r:r,d=Math.max(0,-(s*f+o)),h=-d*d+f*(f+2*l)+u;return i&&i.copy(this.origin).addScaledVector(this.direction,d),a&&a.copy(nd).addScaledVector(Il,f),h}intersectSphere(t,n){ji.subVectors(t.center,this.origin);const i=ji.dot(this.direction),a=ji.dot(ji)-i*i,r=t.radius*t.radius;if(a>r)return null;const s=Math.sqrt(r-a),o=i-s,l=i+s;return l<0?null:o<0?this.at(l,n):this.at(o,n)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const n=t.normal.dot(this.direction);if(n===0)return t.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(t.normal)+t.constant)/n;return i>=0?i:null}intersectPlane(t,n){const i=this.distanceToPlane(t);return i===null?null:this.at(i,n)}intersectsPlane(t){const n=t.distanceToPoint(this.origin);return n===0||t.normal.dot(this.direction)*n<0}intersectBox(t,n){let i,a,r,s,o,l;const u=1/this.direction.x,c=1/this.direction.y,d=1/this.direction.z,f=this.origin;return u>=0?(i=(t.min.x-f.x)*u,a=(t.max.x-f.x)*u):(i=(t.max.x-f.x)*u,a=(t.min.x-f.x)*u),c>=0?(r=(t.min.y-f.y)*c,s=(t.max.y-f.y)*c):(r=(t.max.y-f.y)*c,s=(t.min.y-f.y)*c),i>s||r>a||((r>i||isNaN(i))&&(i=r),(s<a||isNaN(a))&&(a=s),d>=0?(o=(t.min.z-f.z)*d,l=(t.max.z-f.z)*d):(o=(t.max.z-f.z)*d,l=(t.min.z-f.z)*d),i>l||o>a)||((o>i||i!==i)&&(i=o),(l<a||a!==a)&&(a=l),a<0)?null:this.at(i>=0?i:a,n)}intersectsBox(t){return this.intersectBox(t,ji)!==null}intersectTriangle(t,n,i,a,r){id.subVectors(n,t),Dl.subVectors(i,t),ad.crossVectors(id,Dl);let s=this.direction.dot(ad),o;if(s>0){if(a)return null;o=1}else if(s<0)o=-1,s=-s;else return null;Ca.subVectors(this.origin,t);const l=o*this.direction.dot(Dl.crossVectors(Ca,Dl));if(l<0)return null;const u=o*this.direction.dot(id.cross(Ca));if(u<0||l+u>s)return null;const c=-o*Ca.dot(ad);return c<0?null:this.at(c/s,r)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class jt{constructor(t,n,i,a,r,s,o,l,u,c,d,f,h,g,p,m){jt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,n,i,a,r,s,o,l,u,c,d,f,h,g,p,m)}set(t,n,i,a,r,s,o,l,u,c,d,f,h,g,p,m){const v=this.elements;return v[0]=t,v[4]=n,v[8]=i,v[12]=a,v[1]=r,v[5]=s,v[9]=o,v[13]=l,v[2]=u,v[6]=c,v[10]=d,v[14]=f,v[3]=h,v[7]=g,v[11]=p,v[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 jt().fromArray(this.elements)}copy(t){const n=this.elements,i=t.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(t){const n=this.elements,i=t.elements;return n[12]=i[12],n[13]=i[13],n[14]=i[14],this}setFromMatrix3(t){const n=t.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(t,n,i){return t.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(t,n,i){return this.set(t.x,n.x,i.x,0,t.y,n.y,i.y,0,t.z,n.z,i.z,0,0,0,0,1),this}extractRotation(t){const n=this.elements,i=t.elements,a=1/cs.setFromMatrixColumn(t,0).length(),r=1/cs.setFromMatrixColumn(t,1).length(),s=1/cs.setFromMatrixColumn(t,2).length();return n[0]=i[0]*a,n[1]=i[1]*a,n[2]=i[2]*a,n[3]=0,n[4]=i[4]*r,n[5]=i[5]*r,n[6]=i[6]*r,n[7]=0,n[8]=i[8]*s,n[9]=i[9]*s,n[10]=i[10]*s,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(t){const n=this.elements,i=t.x,a=t.y,r=t.z,s=Math.cos(i),o=Math.sin(i),l=Math.cos(a),u=Math.sin(a),c=Math.cos(r),d=Math.sin(r);if(t.order==="XYZ"){const f=s*c,h=s*d,g=o*c,p=o*d;n[0]=l*c,n[4]=-l*d,n[8]=u,n[1]=h+g*u,n[5]=f-p*u,n[9]=-o*l,n[2]=p-f*u,n[6]=g+h*u,n[10]=s*l}else if(t.order==="YXZ"){const f=l*c,h=l*d,g=u*c,p=u*d;n[0]=f+p*o,n[4]=g*o-h,n[8]=s*u,n[1]=s*d,n[5]=s*c,n[9]=-o,n[2]=h*o-g,n[6]=p+f*o,n[10]=s*l}else if(t.order==="ZXY"){const f=l*c,h=l*d,g=u*c,p=u*d;n[0]=f-p*o,n[4]=-s*d,n[8]=g+h*o,n[1]=h+g*o,n[5]=s*c,n[9]=p-f*o,n[2]=-s*u,n[6]=o,n[10]=s*l}else if(t.order==="ZYX"){const f=s*c,h=s*d,g=o*c,p=o*d;n[0]=l*c,n[4]=g*u-h,n[8]=f*u+p,n[1]=l*d,n[5]=p*u+f,n[9]=h*u-g,n[2]=-u,n[6]=o*l,n[10]=s*l}else if(t.order==="YZX"){const f=s*l,h=s*u,g=o*l,p=o*u;n[0]=l*c,n[4]=p-f*d,n[8]=g*d+h,n[1]=d,n[5]=s*c,n[9]=-o*c,n[2]=-u*c,n[6]=h*d+g,n[10]=f-p*d}else if(t.order==="XZY"){const f=s*l,h=s*u,g=o*l,p=o*u;n[0]=l*c,n[4]=-d,n[8]=u*c,n[1]=f*d+p,n[5]=s*c,n[9]=h*d-g,n[2]=g*d-h,n[6]=o*c,n[10]=p*d+f}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(t){return this.compose($w,t,Xw)}lookAt(t,n,i){const a=this.elements;return jn.subVectors(t,n),jn.lengthSq()===0&&(jn.z=1),jn.normalize(),Aa.crossVectors(i,jn),Aa.lengthSq()===0&&(Math.abs(i.z)===1?jn.x+=1e-4:jn.z+=1e-4,jn.normalize(),Aa.crossVectors(i,jn)),Aa.normalize(),Ll.crossVectors(jn,Aa),a[0]=Aa.x,a[4]=Ll.x,a[8]=jn.x,a[1]=Aa.y,a[5]=Ll.y,a[9]=jn.y,a[2]=Aa.z,a[6]=Ll.z,a[10]=jn.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,n){const i=t.elements,a=n.elements,r=this.elements,s=i[0],o=i[4],l=i[8],u=i[12],c=i[1],d=i[5],f=i[9],h=i[13],g=i[2],p=i[6],m=i[10],v=i[14],_=i[3],M=i[7],x=i[11],C=i[15],T=a[0],P=a[4],w=a[8],b=a[12],S=a[1],E=a[5],R=a[9],L=a[13],O=a[2],G=a[6],U=a[10],j=a[14],B=a[3],X=a[7],W=a[11],H=a[15];return r[0]=s*T+o*S+l*O+u*B,r[4]=s*P+o*E+l*G+u*X,r[8]=s*w+o*R+l*U+u*W,r[12]=s*b+o*L+l*j+u*H,r[1]=c*T+d*S+f*O+h*B,r[5]=c*P+d*E+f*G+h*X,r[9]=c*w+d*R+f*U+h*W,r[13]=c*b+d*L+f*j+h*H,r[2]=g*T+p*S+m*O+v*B,r[6]=g*P+p*E+m*G+v*X,r[10]=g*w+p*R+m*U+v*W,r[14]=g*b+p*L+m*j+v*H,r[3]=_*T+M*S+x*O+C*B,r[7]=_*P+M*E+x*G+C*X,r[11]=_*w+M*R+x*U+C*W,r[15]=_*b+M*L+x*j+C*H,this}multiplyScalar(t){const n=this.elements;return n[0]*=t,n[4]*=t,n[8]*=t,n[12]*=t,n[1]*=t,n[5]*=t,n[9]*=t,n[13]*=t,n[2]*=t,n[6]*=t,n[10]*=t,n[14]*=t,n[3]*=t,n[7]*=t,n[11]*=t,n[15]*=t,this}determinant(){const t=this.elements,n=t[0],i=t[4],a=t[8],r=t[12],s=t[1],o=t[5],l=t[9],u=t[13],c=t[2],d=t[6],f=t[10],h=t[14],g=t[3],p=t[7],m=t[11],v=t[15];return g*(+r*l*d-a*u*d-r*o*f+i*u*f+a*o*h-i*l*h)+p*(+n*l*h-n*u*f+r*s*f-a*s*h+a*u*c-r*l*c)+m*(+n*u*d-n*o*h-r*s*d+i*s*h+r*o*c-i*u*c)+v*(-a*o*c-n*l*d+n*o*f+a*s*d-i*s*f+i*l*c)}transpose(){const t=this.elements;let n;return n=t[1],t[1]=t[4],t[4]=n,n=t[2],t[2]=t[8],t[8]=n,n=t[6],t[6]=t[9],t[9]=n,n=t[3],t[3]=t[12],t[12]=n,n=t[7],t[7]=t[13],t[13]=n,n=t[11],t[11]=t[14],t[14]=n,this}setPosition(t,n,i){const a=this.elements;return t.isVector3?(a[12]=t.x,a[13]=t.y,a[14]=t.z):(a[12]=t,a[13]=n,a[14]=i),this}invert(){const t=this.elements,n=t[0],i=t[1],a=t[2],r=t[3],s=t[4],o=t[5],l=t[6],u=t[7],c=t[8],d=t[9],f=t[10],h=t[11],g=t[12],p=t[13],m=t[14],v=t[15],_=d*m*u-p*f*u+p*l*h-o*m*h-d*l*v+o*f*v,M=g*f*u-c*m*u-g*l*h+s*m*h+c*l*v-s*f*v,x=c*p*u-g*d*u+g*o*h-s*p*h-c*o*v+s*d*v,C=g*d*l-c*p*l-g*o*f+s*p*f+c*o*m-s*d*m,T=n*_+i*M+a*x+r*C;if(T===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const P=1/T;return t[0]=_*P,t[1]=(p*f*r-d*m*r-p*a*h+i*m*h+d*a*v-i*f*v)*P,t[2]=(o*m*r-p*l*r+p*a*u-i*m*u-o*a*v+i*l*v)*P,t[3]=(d*l*r-o*f*r-d*a*u+i*f*u+o*a*h-i*l*h)*P,t[4]=M*P,t[5]=(c*m*r-g*f*r+g*a*h-n*m*h-c*a*v+n*f*v)*P,t[6]=(g*l*r-s*m*r-g*a*u+n*m*u+s*a*v-n*l*v)*P,t[7]=(s*f*r-c*l*r+c*a*u-n*f*u-s*a*h+n*l*h)*P,t[8]=x*P,t[9]=(g*d*r-c*p*r-g*i*h+n*p*h+c*i*v-n*d*v)*P,t[10]=(s*p*r-g*o*r+g*i*u-n*p*u-s*i*v+n*o*v)*P,t[11]=(c*o*r-s*d*r-c*i*u+n*d*u+s*i*h-n*o*h)*P,t[12]=C*P,t[13]=(c*p*a-g*d*a+g*i*f-n*p*f-c*i*m+n*d*m)*P,t[14]=(g*o*a-s*p*a-g*i*l+n*p*l+s*i*m-n*o*m)*P,t[15]=(s*d*a-c*o*a+c*i*l-n*d*l-s*i*f+n*o*f)*P,this}scale(t){const n=this.elements,i=t.x,a=t.y,r=t.z;return n[0]*=i,n[4]*=a,n[8]*=r,n[1]*=i,n[5]*=a,n[9]*=r,n[2]*=i,n[6]*=a,n[10]*=r,n[3]*=i,n[7]*=a,n[11]*=r,this}getMaxScaleOnAxis(){const t=this.elements,n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],a=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(n,i,a))}makeTranslation(t,n,i){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,n,0,0,1,i,0,0,0,1),this}makeRotationX(t){const n=Math.cos(t),i=Math.sin(t);return this.set(1,0,0,0,0,n,-i,0,0,i,n,0,0,0,0,1),this}makeRotationY(t){const n=Math.cos(t),i=Math.sin(t);return this.set(n,0,i,0,0,1,0,0,-i,0,n,0,0,0,0,1),this}makeRotationZ(t){const n=Math.cos(t),i=Math.sin(t);return this.set(n,-i,0,0,i,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,n){const i=Math.cos(n),a=Math.sin(n),r=1-i,s=t.x,o=t.y,l=t.z,u=r*s,c=r*o;return this.set(u*s+i,u*o-a*l,u*l+a*o,0,u*o+a*l,c*o+i,c*l-a*s,0,u*l-a*o,c*l+a*s,r*l*l+i,0,0,0,0,1),this}makeScale(t,n,i){return this.set(t,0,0,0,0,n,0,0,0,0,i,0,0,0,0,1),this}makeShear(t,n,i,a,r,s){return this.set(1,i,r,0,t,1,s,0,n,a,1,0,0,0,0,1),this}compose(t,n,i){const a=this.elements,r=n._x,s=n._y,o=n._z,l=n._w,u=r+r,c=s+s,d=o+o,f=r*u,h=r*c,g=r*d,p=s*c,m=s*d,v=o*d,_=l*u,M=l*c,x=l*d,C=i.x,T=i.y,P=i.z;return a[0]=(1-(p+v))*C,a[1]=(h+x)*C,a[2]=(g-M)*C,a[3]=0,a[4]=(h-x)*T,a[5]=(1-(f+v))*T,a[6]=(m+_)*T,a[7]=0,a[8]=(g+M)*P,a[9]=(m-_)*P,a[10]=(1-(f+p))*P,a[11]=0,a[12]=t.x,a[13]=t.y,a[14]=t.z,a[15]=1,this}decompose(t,n,i){const a=this.elements;let r=cs.set(a[0],a[1],a[2]).length();const s=cs.set(a[4],a[5],a[6]).length(),o=cs.set(a[8],a[9],a[10]).length();this.determinant()<0&&(r=-r),t.x=a[12],t.y=a[13],t.z=a[14],Si.copy(this);const u=1/r,c=1/s,d=1/o;return Si.elements[0]*=u,Si.elements[1]*=u,Si.elements[2]*=u,Si.elements[4]*=c,Si.elements[5]*=c,Si.elements[6]*=c,Si.elements[8]*=d,Si.elements[9]*=d,Si.elements[10]*=d,n.setFromRotationMatrix(Si),i.x=r,i.y=s,i.z=o,this}makePerspective(t,n,i,a,r,s,o=ra){const l=this.elements,u=2*r/(n-t),c=2*r/(i-a),d=(n+t)/(n-t),f=(i+a)/(i-a);let h,g;if(o===ra)h=-(s+r)/(s-r),g=-2*s*r/(s-r);else if(o===Iu)h=-s/(s-r),g=-s*r/(s-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);return l[0]=u,l[4]=0,l[8]=d,l[12]=0,l[1]=0,l[5]=c,l[9]=f,l[13]=0,l[2]=0,l[6]=0,l[10]=h,l[14]=g,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(t,n,i,a,r,s,o=ra){const l=this.elements,u=1/(n-t),c=1/(i-a),d=1/(s-r),f=(n+t)*u,h=(i+a)*c;let g,p;if(o===ra)g=(s+r)*d,p=-2*d;else if(o===Iu)g=r*d,p=-1*d;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return l[0]=2*u,l[4]=0,l[8]=0,l[12]=-f,l[1]=0,l[5]=2*c,l[9]=0,l[13]=-h,l[2]=0,l[6]=0,l[10]=p,l[14]=-g,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(t){const n=this.elements,i=t.elements;for(let a=0;a<16;a++)if(n[a]!==i[a])return!1;return!0}fromArray(t,n=0){for(let i=0;i<16;i++)this.elements[i]=t[i+n];return this}toArray(t=[],n=0){const i=this.elements;return t[n]=i[0],t[n+1]=i[1],t[n+2]=i[2],t[n+3]=i[3],t[n+4]=i[4],t[n+5]=i[5],t[n+6]=i[6],t[n+7]=i[7],t[n+8]=i[8],t[n+9]=i[9],t[n+10]=i[10],t[n+11]=i[11],t[n+12]=i[12],t[n+13]=i[13],t[n+14]=i[14],t[n+15]=i[15],t}}const cs=new ce,Si=new jt,$w=new ce(0,0,0),Xw=new ce(1,1,1),Aa=new ce,Ll=new ce,jn=new ce,tg=new jt,ng=new tl;class ha{constructor(t=0,n=0,i=0,a=ha.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=n,this._z=i,this._order=a}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,n,i,a=this._order){return this._x=t,this._y=n,this._z=i,this._order=a,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,n=this._order,i=!0){const a=t.elements,r=a[0],s=a[4],o=a[8],l=a[1],u=a[5],c=a[9],d=a[2],f=a[6],h=a[10];switch(n){case"XYZ":this._y=Math.asin(ht(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,h),this._z=Math.atan2(-s,r)):(this._x=Math.atan2(f,u),this._z=0);break;case"YXZ":this._x=Math.asin(-ht(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(o,h),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-d,r),this._z=0);break;case"ZXY":this._x=Math.asin(ht(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-d,h),this._z=Math.atan2(-s,u)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-ht(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(f,h),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-s,u));break;case"YZX":this._z=Math.asin(ht(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-c,u),this._y=Math.atan2(-d,r)):(this._x=0,this._y=Math.atan2(o,h));break;case"XZY":this._z=Math.asin(-ht(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(f,u),this._y=Math.atan2(o,r)):(this._x=Math.atan2(-c,h),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(t,n,i){return tg.makeRotationFromQuaternion(t),this.setFromRotationMatrix(tg,n,i)}setFromVector3(t,n=this._order){return this.set(t.x,t.y,t.z,n)}reorder(t){return ng.setFromEuler(this),this.setFromQuaternion(ng,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],n=0){return t[n]=this._x,t[n+1]=this._y,t[n+2]=this._z,t[n+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}ha.DEFAULT_ORDER="XYZ";class F_{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return(this.mask&t.mask)!==0}isEnabled(t){return(this.mask&(1<<t|0))!==0}}let Yw=0;const ig=new ce,ds=new tl,Ki=new jt,kl=new ce,fo=new ce,qw=new ce,jw=new tl,ag=new ce(1,0,0),rg=new ce(0,1,0),sg=new ce(0,0,1),og={type:"added"},Kw={type:"removed"},fs={type:"childadded",child:null},rd={type:"childremoved",child:null};class Bn extends Ks{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:Yw++}),this.uuid=el(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Bn.DEFAULT_UP.clone();const t=new ce,n=new ha,i=new tl,a=new ce(1,1,1);function r(){i.setFromEuler(n,!1)}function s(){n.setFromQuaternion(i,void 0,!1)}n._onChange(r),i._onChange(s),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:a},modelViewMatrix:{value:new jt},normalMatrix:{value:new ut}}),this.matrix=new jt,this.matrixWorld=new jt,this.matrixAutoUpdate=Bn.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Bn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new F_,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,n){this.quaternion.setFromAxisAngle(t,n)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,n){return ds.setFromAxisAngle(t,n),this.quaternion.multiply(ds),this}rotateOnWorldAxis(t,n){return ds.setFromAxisAngle(t,n),this.quaternion.premultiply(ds),this}rotateX(t){return this.rotateOnAxis(ag,t)}rotateY(t){return this.rotateOnAxis(rg,t)}rotateZ(t){return this.rotateOnAxis(sg,t)}translateOnAxis(t,n){return ig.copy(t).applyQuaternion(this.quaternion),this.position.add(ig.multiplyScalar(n)),this}translateX(t){return this.translateOnAxis(ag,t)}translateY(t){return this.translateOnAxis(rg,t)}translateZ(t){return this.translateOnAxis(sg,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(Ki.copy(this.matrixWorld).invert())}lookAt(t,n,i){t.isVector3?kl.copy(t):kl.set(t,n,i);const a=this.parent;this.updateWorldMatrix(!0,!1),fo.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Ki.lookAt(fo,kl,this.up):Ki.lookAt(kl,fo,this.up),this.quaternion.setFromRotationMatrix(Ki),a&&(Ki.extractRotation(a.matrixWorld),ds.setFromRotationMatrix(Ki),this.quaternion.premultiply(ds.invert()))}add(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(og),fs.child=t,this.dispatchEvent(fs),fs.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const n=this.children.indexOf(t);return n!==-1&&(t.parent=null,this.children.splice(n,1),t.dispatchEvent(Kw),rd.child=t,this.dispatchEvent(rd),rd.child=null),this}removeFromParent(){const t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),Ki.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),Ki.multiply(t.parent.matrixWorld)),t.applyMatrix4(Ki),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(og),fs.child=t,this.dispatchEvent(fs),fs.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,n){if(this[t]===n)return this;for(let i=0,a=this.children.length;i<a;i++){const s=this.children[i].getObjectByProperty(t,n);if(s!==void 0)return s}}getObjectsByProperty(t,n,i=[]){this[t]===n&&i.push(this);const a=this.children;for(let r=0,s=a.length;r<s;r++)a[r].getObjectsByProperty(t,n,i);return i}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(fo,t,qw),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(fo,jw,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const n=this.matrixWorld.elements;return t.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(t){t(this);const n=this.children;for(let i=0,a=n.length;i<a;i++)n[i].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);const n=this.children;for(let i=0,a=n.length;i<a;i++)n[i].traverseVisible(t)}traverseAncestors(t){const n=this.parent;n!==null&&(t(n),n.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);const n=this.children;for(let i=0,a=n.length;i<a;i++)n[i].updateMatrixWorld(t)}updateWorldMatrix(t,n){const i=this.parent;if(t===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),n===!0){const a=this.children;for(let r=0,s=a.length;r<s;r++)a[r].updateWorldMatrix(!1,!0)}}toJSON(t){const n=t===void 0||typeof t=="string",i={};n&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});const a={};a.uuid=this.uuid,a.type=this.type,this.name!==""&&(a.name=this.name),this.castShadow===!0&&(a.castShadow=!0),this.receiveShadow===!0&&(a.receiveShadow=!0),this.visible===!1&&(a.visible=!1),this.frustumCulled===!1&&(a.frustumCulled=!1),this.renderOrder!==0&&(a.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(a.userData=this.userData),a.layers=this.layers.mask,a.matrix=this.matrix.toArray(),a.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(a.matrixAutoUpdate=!1),this.isInstancedMesh&&(a.type="InstancedMesh",a.count=this.count,a.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(a.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(a.type="BatchedMesh",a.perObjectFrustumCulled=this.perObjectFrustumCulled,a.sortObjects=this.sortObjects,a.drawRanges=this._drawRanges,a.reservedRanges=this._reservedRanges,a.visibility=this._visibility,a.active=this._active,a.bounds=this._bounds.map(o=>({boxInitialized:o.boxInitialized,boxMin:o.box.min.toArray(),boxMax:o.box.max.toArray(),sphereInitialized:o.sphereInitialized,sphereRadius:o.sphere.radius,sphereCenter:o.sphere.center.toArray()})),a.maxInstanceCount=this._maxInstanceCount,a.maxVertexCount=this._maxVertexCount,a.maxIndexCount=this._maxIndexCount,a.geometryInitialized=this._geometryInitialized,a.geometryCount=this._geometryCount,a.matricesTexture=this._matricesTexture.toJSON(t),this._colorsTexture!==null&&(a.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(a.boundingSphere={center:a.boundingSphere.center.toArray(),radius:a.boundingSphere.radius}),this.boundingBox!==null&&(a.boundingBox={min:a.boundingBox.min.toArray(),max:a.boundingBox.max.toArray()}));function r(o,l){return o[l.uuid]===void 0&&(o[l.uuid]=l.toJSON(t)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?a.background=this.background.toJSON():this.background.isTexture&&(a.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(a.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){a.geometry=r(t.geometries,this.geometry);const o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){const l=o.shapes;if(Array.isArray(l))for(let u=0,c=l.length;u<c;u++){const d=l[u];r(t.shapes,d)}else r(t.shapes,l)}}if(this.isSkinnedMesh&&(a.bindMode=this.bindMode,a.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(r(t.skeletons,this.skeleton),a.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const o=[];for(let l=0,u=this.material.length;l<u;l++)o.push(r(t.materials,this.material[l]));a.material=o}else a.material=r(t.materials,this.material);if(this.children.length>0){a.children=[];for(let o=0;o<this.children.length;o++)a.children.push(this.children[o].toJSON(t).object)}if(this.animations.length>0){a.animations=[];for(let o=0;o<this.animations.length;o++){const l=this.animations[o];a.animations.push(r(t.animations,l))}}if(n){const o=s(t.geometries),l=s(t.materials),u=s(t.textures),c=s(t.images),d=s(t.shapes),f=s(t.skeletons),h=s(t.animations),g=s(t.nodes);o.length>0&&(i.geometries=o),l.length>0&&(i.materials=l),u.length>0&&(i.textures=u),c.length>0&&(i.images=c),d.length>0&&(i.shapes=d),f.length>0&&(i.skeletons=f),h.length>0&&(i.animations=h),g.length>0&&(i.nodes=g)}return i.object=a,i;function s(o){const l=[];for(const u in o){const c=o[u];delete c.metadata,l.push(c)}return l}}clone(t){return new this.constructor().copy(this,t)}copy(t,n=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),n===!0)for(let i=0;i<t.children.length;i++){const a=t.children[i];this.add(a.clone())}return this}}Bn.DEFAULT_UP=new ce(0,1,0);Bn.DEFAULT_MATRIX_AUTO_UPDATE=!0;Bn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Mi=new ce,Zi=new ce,sd=new ce,Ji=new ce,hs=new ce,ms=new ce,lg=new ce,od=new ce,ld=new ce,ud=new ce,cd=new Jt,dd=new Jt,fd=new Jt;class Ei{constructor(t=new ce,n=new ce,i=new ce){this.a=t,this.b=n,this.c=i}static getNormal(t,n,i,a){a.subVectors(i,n),Mi.subVectors(t,n),a.cross(Mi);const r=a.lengthSq();return r>0?a.multiplyScalar(1/Math.sqrt(r)):a.set(0,0,0)}static getBarycoord(t,n,i,a,r){Mi.subVectors(a,n),Zi.subVectors(i,n),sd.subVectors(t,n);const s=Mi.dot(Mi),o=Mi.dot(Zi),l=Mi.dot(sd),u=Zi.dot(Zi),c=Zi.dot(sd),d=s*u-o*o;if(d===0)return r.set(0,0,0),null;const f=1/d,h=(u*l-o*c)*f,g=(s*c-o*l)*f;return r.set(1-h-g,g,h)}static containsPoint(t,n,i,a){return this.getBarycoord(t,n,i,a,Ji)===null?!1:Ji.x>=0&&Ji.y>=0&&Ji.x+Ji.y<=1}static getInterpolation(t,n,i,a,r,s,o,l){return this.getBarycoord(t,n,i,a,Ji)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(r,Ji.x),l.addScaledVector(s,Ji.y),l.addScaledVector(o,Ji.z),l)}static getInterpolatedAttribute(t,n,i,a,r,s){return cd.setScalar(0),dd.setScalar(0),fd.setScalar(0),cd.fromBufferAttribute(t,n),dd.fromBufferAttribute(t,i),fd.fromBufferAttribute(t,a),s.setScalar(0),s.addScaledVector(cd,r.x),s.addScaledVector(dd,r.y),s.addScaledVector(fd,r.z),s}static isFrontFacing(t,n,i,a){return Mi.subVectors(i,n),Zi.subVectors(t,n),Mi.cross(Zi).dot(a)<0}set(t,n,i){return this.a.copy(t),this.b.copy(n),this.c.copy(i),this}setFromPointsAndIndices(t,n,i,a){return this.a.copy(t[n]),this.b.copy(t[i]),this.c.copy(t[a]),this}setFromAttributeAndIndices(t,n,i,a){return this.a.fromBufferAttribute(t,n),this.b.fromBufferAttribute(t,i),this.c.fromBufferAttribute(t,a),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return Mi.subVectors(this.c,this.b),Zi.subVectors(this.a,this.b),Mi.cross(Zi).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Ei.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,n){return Ei.getBarycoord(t,this.a,this.b,this.c,n)}getInterpolation(t,n,i,a,r){return Ei.getInterpolation(t,this.a,this.b,this.c,n,i,a,r)}containsPoint(t){return Ei.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Ei.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,n){const i=this.a,a=this.b,r=this.c;let s,o;hs.subVectors(a,i),ms.subVectors(r,i),od.subVectors(t,i);const l=hs.dot(od),u=ms.dot(od);if(l<=0&&u<=0)return n.copy(i);ld.subVectors(t,a);const c=hs.dot(ld),d=ms.dot(ld);if(c>=0&&d<=c)return n.copy(a);const f=l*d-c*u;if(f<=0&&l>=0&&c<=0)return s=l/(l-c),n.copy(i).addScaledVector(hs,s);ud.subVectors(t,r);const h=hs.dot(ud),g=ms.dot(ud);if(g>=0&&h<=g)return n.copy(r);const p=h*u-l*g;if(p<=0&&u>=0&&g<=0)return o=u/(u-g),n.copy(i).addScaledVector(ms,o);const m=c*g-h*d;if(m<=0&&d-c>=0&&h-g>=0)return lg.subVectors(r,a),o=(d-c)/(d-c+(h-g)),n.copy(a).addScaledVector(lg,o);const v=1/(m+p+f);return s=p*v,o=f*v,n.copy(i).addScaledVector(hs,s).addScaledVector(ms,o)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const N_={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},Pa={h:0,s:0,l:0},Vl={h:0,s:0,l:0};function hd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*6*(2/3-n):e}class xt{constructor(t,n,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,n,i)}set(t,n,i){if(n===void 0&&i===void 0){const a=t;a&&a.isColor?this.copy(a):typeof a=="number"?this.setHex(a):typeof a=="string"&&this.setStyle(a)}else this.setRGB(t,n,i);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,n=ci){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,bt.toWorkingColorSpace(this,n),this}setRGB(t,n,i,a=bt.workingColorSpace){return this.r=t,this.g=n,this.b=i,bt.toWorkingColorSpace(this,a),this}setHSL(t,n,i,a=bt.workingColorSpace){if(t=Lw(t,1),n=ht(n,0,1),i=ht(i,0,1),n===0)this.r=this.g=this.b=i;else{const r=i<=.5?i*(1+n):i+n-i*n,s=2*i-r;this.r=hd(s,r,t+1/3),this.g=hd(s,r,t),this.b=hd(s,r,t-1/3)}return bt.toWorkingColorSpace(this,a),this}setStyle(t,n=ci){function i(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let a;if(a=/^(\w+)\(([^\)]*)\)/.exec(t)){let r;const s=a[1],o=a[2];switch(s){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,n);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,n);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(a=/^\#([A-Fa-f\d]+)$/.exec(t)){const r=a[1],s=r.length;if(s===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,n);if(s===6)return this.setHex(parseInt(r,16),n);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,n);return this}setColorName(t,n=ci){const i=N_[t.toLowerCase()];return i!==void 0?this.setHex(i,n):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=oa(t.r),this.g=oa(t.g),this.b=oa(t.b),this}copyLinearToSRGB(t){return this.r=ks(t.r),this.g=ks(t.g),this.b=ks(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=ci){return bt.fromWorkingColorSpace(wn.copy(this),t),Math.round(ht(wn.r*255,0,255))*65536+Math.round(ht(wn.g*255,0,255))*256+Math.round(ht(wn.b*255,0,255))}getHexString(t=ci){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,n=bt.workingColorSpace){bt.fromWorkingColorSpace(wn.copy(this),n);const i=wn.r,a=wn.g,r=wn.b,s=Math.max(i,a,r),o=Math.min(i,a,r);let l,u;const c=(o+s)/2;if(o===s)l=0,u=0;else{const d=s-o;switch(u=c<=.5?d/(s+o):d/(2-s-o),s){case i:l=(a-r)/d+(a<r?6:0);break;case a:l=(r-i)/d+2;break;case r:l=(i-a)/d+4;break}l/=6}return t.h=l,t.s=u,t.l=c,t}getRGB(t,n=bt.workingColorSpace){return bt.fromWorkingColorSpace(wn.copy(this),n),t.r=wn.r,t.g=wn.g,t.b=wn.b,t}getStyle(t=ci){bt.fromWorkingColorSpace(wn.copy(this),t);const n=wn.r,i=wn.g,a=wn.b;return t!==ci?`color(${t} ${n.toFixed(3)} ${i.toFixed(3)} ${a.toFixed(3)})`:`rgb(${Math.round(n*255)},${Math.round(i*255)},${Math.round(a*255)})`}offsetHSL(t,n,i){return this.getHSL(Pa),this.setHSL(Pa.h+t,Pa.s+n,Pa.l+i)}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,n){return this.r=t.r+n.r,this.g=t.g+n.g,this.b=t.b+n.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,n){return this.r+=(t.r-this.r)*n,this.g+=(t.g-this.g)*n,this.b+=(t.b-this.b)*n,this}lerpColors(t,n,i){return this.r=t.r+(n.r-t.r)*i,this.g=t.g+(n.g-t.g)*i,this.b=t.b+(n.b-t.b)*i,this}lerpHSL(t,n){this.getHSL(Pa),t.getHSL(Vl);const i=Kc(Pa.h,Vl.h,n),a=Kc(Pa.s,Vl.s,n),r=Kc(Pa.l,Vl.l,n);return this.setHSL(i,a,r),this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){const n=this.r,i=this.g,a=this.b,r=t.elements;return this.r=r[0]*n+r[3]*i+r[6]*a,this.g=r[1]*n+r[4]*i+r[7]*a,this.b=r[2]*n+r[5]*i+r[8]*a,this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,n=0){return this.r=t[n],this.g=t[n+1],this.b=t[n+2],this}toArray(t=[],n=0){return t[n]=this.r,t[n+1]=this.g,t[n+2]=this.b,t}fromBufferAttribute(t,n){return this.r=t.getX(n),this.g=t.getY(n),this.b=t.getZ(n),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const wn=new xt;xt.NAMES=N_;let Zw=0;class Zs extends Ks{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Zw++}),this.uuid=el(),this.name="",this.type="Material",this.blending=Ds,this.side=Ha,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Zd,this.blendDst=Jd,this.blendEquation=yr,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new xt(0,0,0),this.blendAlpha=0,this.depthFunc=Fs,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=qv,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=rs,this.stencilZFail=rs,this.stencilZPass=rs,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(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(const n in t){const i=t[n];if(i===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const a=this[n];if(a===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}a&&a.isColor?a.set(i):a&&a.isVector3&&i&&i.isVector3?a.copy(i):this[n]=i}}toJSON(t){const n=t===void 0||typeof t=="string";n&&(t={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!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).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(t).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(t).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(t).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(t).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(t).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(t).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(t).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!==Ds&&(i.blending=this.blending),this.side!==Ha&&(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!==Zd&&(i.blendSrc=this.blendSrc),this.blendDst!==Jd&&(i.blendDst=this.blendDst),this.blendEquation!==yr&&(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!==Fs&&(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!==qv&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==rs&&(i.stencilFail=this.stencilFail),this.stencilZFail!==rs&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==rs&&(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 a(r){const s=[];for(const o in r){const l=r[o];delete l.metadata,s.push(l)}return s}if(n){const r=a(t.textures),s=a(t.images);r.length>0&&(i.textures=r),s.length>0&&(i.images=s)}return i}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const n=t.clippingPlanes;let i=null;if(n!==null){const a=n.length;i=new Array(a);for(let r=0;r!==a;++r)i[r]=n[r].clone()}return this.clippingPlanes=i,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}onBuild(){console.warn("Material: onBuild() has been removed.")}}class O_ extends Zs{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new xt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ha,this.combine=x_,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const nn=new ce,Fl=new Pt;let Jw=0;class ti{constructor(t,n,i=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:Jw++}),this.name="",this.array=t,this.itemSize=n,this.count=t!==void 0?t.length/n:0,this.normalized=i,this.usage=jv,this.updateRanges=[],this.gpuType=aa,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,n){this.updateRanges.push({start:t,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,n,i){t*=this.itemSize,i*=n.itemSize;for(let a=0,r=this.itemSize;a<r;a++)this.array[t+a]=n.array[i+a];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let n=0,i=this.count;n<i;n++)Fl.fromBufferAttribute(this,n),Fl.applyMatrix3(t),this.setXY(n,Fl.x,Fl.y);else if(this.itemSize===3)for(let n=0,i=this.count;n<i;n++)nn.fromBufferAttribute(this,n),nn.applyMatrix3(t),this.setXYZ(n,nn.x,nn.y,nn.z);return this}applyMatrix4(t){for(let n=0,i=this.count;n<i;n++)nn.fromBufferAttribute(this,n),nn.applyMatrix4(t),this.setXYZ(n,nn.x,nn.y,nn.z);return this}applyNormalMatrix(t){for(let n=0,i=this.count;n<i;n++)nn.fromBufferAttribute(this,n),nn.applyNormalMatrix(t),this.setXYZ(n,nn.x,nn.y,nn.z);return this}transformDirection(t){for(let n=0,i=this.count;n<i;n++)nn.fromBufferAttribute(this,n),nn.transformDirection(t),this.setXYZ(n,nn.x,nn.y,nn.z);return this}set(t,n=0){return this.array.set(t,n),this}getComponent(t,n){let i=this.array[t*this.itemSize+n];return this.normalized&&(i=lo(i,this.array)),i}setComponent(t,n,i){return this.normalized&&(i=Gn(i,this.array)),this.array[t*this.itemSize+n]=i,this}getX(t){let n=this.array[t*this.itemSize];return this.normalized&&(n=lo(n,this.array)),n}setX(t,n){return this.normalized&&(n=Gn(n,this.array)),this.array[t*this.itemSize]=n,this}getY(t){let n=this.array[t*this.itemSize+1];return this.normalized&&(n=lo(n,this.array)),n}setY(t,n){return this.normalized&&(n=Gn(n,this.array)),this.array[t*this.itemSize+1]=n,this}getZ(t){let n=this.array[t*this.itemSize+2];return this.normalized&&(n=lo(n,this.array)),n}setZ(t,n){return this.normalized&&(n=Gn(n,this.array)),this.array[t*this.itemSize+2]=n,this}getW(t){let n=this.array[t*this.itemSize+3];return this.normalized&&(n=lo(n,this.array)),n}setW(t,n){return this.normalized&&(n=Gn(n,this.array)),this.array[t*this.itemSize+3]=n,this}setXY(t,n,i){return t*=this.itemSize,this.normalized&&(n=Gn(n,this.array),i=Gn(i,this.array)),this.array[t+0]=n,this.array[t+1]=i,this}setXYZ(t,n,i,a){return t*=this.itemSize,this.normalized&&(n=Gn(n,this.array),i=Gn(i,this.array),a=Gn(a,this.array)),this.array[t+0]=n,this.array[t+1]=i,this.array[t+2]=a,this}setXYZW(t,n,i,a,r){return t*=this.itemSize,this.normalized&&(n=Gn(n,this.array),i=Gn(i,this.array),a=Gn(a,this.array),r=Gn(r,this.array)),this.array[t+0]=n,this.array[t+1]=i,this.array[t+2]=a,this.array[t+3]=r,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(t.name=this.name),this.usage!==jv&&(t.usage=this.usage),t}}class U_ extends ti{constructor(t,n,i){super(new Uint16Array(t),n,i)}}class B_ extends ti{constructor(t,n,i){super(new Uint32Array(t),n,i)}}class la extends ti{constructor(t,n,i){super(new Float32Array(t),n,i)}}let Qw=0;const ui=new jt,md=new Bn,vs=new ce,Kn=new nl,ho=new nl,hn=new ce;class Ri extends Ks{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Qw++}),this.uuid=el(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(k_(t)?B_:U_)(t,1):this.index=t,this}setIndirect(t){return this.indirect=t,this}getIndirect(){return this.indirect}getAttribute(t){return this.attributes[t]}setAttribute(t,n){return this.attributes[t]=n,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return this.attributes[t]!==void 0}addGroup(t,n,i=0){this.groups.push({start:t,count:n,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(t,n){this.drawRange.start=t,this.drawRange.count=n}applyMatrix4(t){const n=this.attributes.position;n!==void 0&&(n.applyMatrix4(t),n.needsUpdate=!0);const i=this.attributes.normal;if(i!==void 0){const r=new ut().getNormalMatrix(t);i.applyNormalMatrix(r),i.needsUpdate=!0}const a=this.attributes.tangent;return a!==void 0&&(a.transformDirection(t),a.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(t){return ui.makeRotationFromQuaternion(t),this.applyMatrix4(ui),this}rotateX(t){return ui.makeRotationX(t),this.applyMatrix4(ui),this}rotateY(t){return ui.makeRotationY(t),this.applyMatrix4(ui),this}rotateZ(t){return ui.makeRotationZ(t),this.applyMatrix4(ui),this}translate(t,n,i){return ui.makeTranslation(t,n,i),this.applyMatrix4(ui),this}scale(t,n,i){return ui.makeScale(t,n,i),this.applyMatrix4(ui),this}lookAt(t){return md.lookAt(t),md.updateMatrix(),this.applyMatrix4(md.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(vs).negate(),this.translate(vs.x,vs.y,vs.z),this}setFromPoints(t){const n=this.getAttribute("position");if(n===void 0){const i=[];for(let a=0,r=t.length;a<r;a++){const s=t[a];i.push(s.x,s.y,s.z||0)}this.setAttribute("position",new la(i,3))}else{const i=Math.min(t.length,n.count);for(let a=0;a<i;a++){const r=t[a];n.setXYZ(a,r.x,r.y,r.z||0)}t.length>n.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),n.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new nl);const t=this.attributes.position,n=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new ce(-1/0,-1/0,-1/0),new ce(1/0,1/0,1/0));return}if(t!==void 0){if(this.boundingBox.setFromBufferAttribute(t),n)for(let i=0,a=n.length;i<a;i++){const r=n[i];Kn.setFromBufferAttribute(r),this.morphTargetsRelative?(hn.addVectors(this.boundingBox.min,Kn.min),this.boundingBox.expandByPoint(hn),hn.addVectors(this.boundingBox.max,Kn.max),this.boundingBox.expandByPoint(hn)):(this.boundingBox.expandByPoint(Kn.min),this.boundingBox.expandByPoint(Kn.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 il);const t=this.attributes.position,n=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new ce,1/0);return}if(t){const i=this.boundingSphere.center;if(Kn.setFromBufferAttribute(t),n)for(let r=0,s=n.length;r<s;r++){const o=n[r];ho.setFromBufferAttribute(o),this.morphTargetsRelative?(hn.addVectors(Kn.min,ho.min),Kn.expandByPoint(hn),hn.addVectors(Kn.max,ho.max),Kn.expandByPoint(hn)):(Kn.expandByPoint(ho.min),Kn.expandByPoint(ho.max))}Kn.getCenter(i);let a=0;for(let r=0,s=t.count;r<s;r++)hn.fromBufferAttribute(t,r),a=Math.max(a,i.distanceToSquared(hn));if(n)for(let r=0,s=n.length;r<s;r++){const o=n[r],l=this.morphTargetsRelative;for(let u=0,c=o.count;u<c;u++)hn.fromBufferAttribute(o,u),l&&(vs.fromBufferAttribute(t,u),hn.add(vs)),a=Math.max(a,i.distanceToSquared(hn))}this.boundingSphere.radius=Math.sqrt(a),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 t=this.index,n=this.attributes;if(t===null||n.position===void 0||n.normal===void 0||n.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const i=n.position,a=n.normal,r=n.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new ti(new Float32Array(4*i.count),4));const s=this.getAttribute("tangent"),o=[],l=[];for(let w=0;w<i.count;w++)o[w]=new ce,l[w]=new ce;const u=new ce,c=new ce,d=new ce,f=new Pt,h=new Pt,g=new Pt,p=new ce,m=new ce;function v(w,b,S){u.fromBufferAttribute(i,w),c.fromBufferAttribute(i,b),d.fromBufferAttribute(i,S),f.fromBufferAttribute(r,w),h.fromBufferAttribute(r,b),g.fromBufferAttribute(r,S),c.sub(u),d.sub(u),h.sub(f),g.sub(f);const E=1/(h.x*g.y-g.x*h.y);isFinite(E)&&(p.copy(c).multiplyScalar(g.y).addScaledVector(d,-h.y).multiplyScalar(E),m.copy(d).multiplyScalar(h.x).addScaledVector(c,-g.x).multiplyScalar(E),o[w].add(p),o[b].add(p),o[S].add(p),l[w].add(m),l[b].add(m),l[S].add(m))}let _=this.groups;_.length===0&&(_=[{start:0,count:t.count}]);for(let w=0,b=_.length;w<b;++w){const S=_[w],E=S.start,R=S.count;for(let L=E,O=E+R;L<O;L+=3)v(t.getX(L+0),t.getX(L+1),t.getX(L+2))}const M=new ce,x=new ce,C=new ce,T=new ce;function P(w){C.fromBufferAttribute(a,w),T.copy(C);const b=o[w];M.copy(b),M.sub(C.multiplyScalar(C.dot(b))).normalize(),x.crossVectors(T,b);const E=x.dot(l[w])<0?-1:1;s.setXYZW(w,M.x,M.y,M.z,E)}for(let w=0,b=_.length;w<b;++w){const S=_[w],E=S.start,R=S.count;for(let L=E,O=E+R;L<O;L+=3)P(t.getX(L+0)),P(t.getX(L+1)),P(t.getX(L+2))}}computeVertexNormals(){const t=this.index,n=this.getAttribute("position");if(n!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new ti(new Float32Array(n.count*3),3),this.setAttribute("normal",i);else for(let f=0,h=i.count;f<h;f++)i.setXYZ(f,0,0,0);const a=new ce,r=new ce,s=new ce,o=new ce,l=new ce,u=new ce,c=new ce,d=new ce;if(t)for(let f=0,h=t.count;f<h;f+=3){const g=t.getX(f+0),p=t.getX(f+1),m=t.getX(f+2);a.fromBufferAttribute(n,g),r.fromBufferAttribute(n,p),s.fromBufferAttribute(n,m),c.subVectors(s,r),d.subVectors(a,r),c.cross(d),o.fromBufferAttribute(i,g),l.fromBufferAttribute(i,p),u.fromBufferAttribute(i,m),o.add(c),l.add(c),u.add(c),i.setXYZ(g,o.x,o.y,o.z),i.setXYZ(p,l.x,l.y,l.z),i.setXYZ(m,u.x,u.y,u.z)}else for(let f=0,h=n.count;f<h;f+=3)a.fromBufferAttribute(n,f+0),r.fromBufferAttribute(n,f+1),s.fromBufferAttribute(n,f+2),c.subVectors(s,r),d.subVectors(a,r),c.cross(d),i.setXYZ(f+0,c.x,c.y,c.z),i.setXYZ(f+1,c.x,c.y,c.z),i.setXYZ(f+2,c.x,c.y,c.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const t=this.attributes.normal;for(let n=0,i=t.count;n<i;n++)hn.fromBufferAttribute(t,n),hn.normalize(),t.setXYZ(n,hn.x,hn.y,hn.z)}toNonIndexed(){function t(o,l){const u=o.array,c=o.itemSize,d=o.normalized,f=new u.constructor(l.length*c);let h=0,g=0;for(let p=0,m=l.length;p<m;p++){o.isInterleavedBufferAttribute?h=l[p]*o.data.stride+o.offset:h=l[p]*c;for(let v=0;v<c;v++)f[g++]=u[h++]}return new ti(f,c,d)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const n=new Ri,i=this.index.array,a=this.attributes;for(const o in a){const l=a[o],u=t(l,i);n.setAttribute(o,u)}const r=this.morphAttributes;for(const o in r){const l=[],u=r[o];for(let c=0,d=u.length;c<d;c++){const f=u[c],h=t(f,i);l.push(h)}n.morphAttributes[o]=l}n.morphTargetsRelative=this.morphTargetsRelative;const s=this.groups;for(let o=0,l=s.length;o<l;o++){const u=s[o];n.addGroup(u.start,u.count,u.materialIndex)}return n}toJSON(){const t={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const u in l)l[u]!==void 0&&(t[u]=l[u]);return t}t.data={attributes:{}};const n=this.index;n!==null&&(t.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const i=this.attributes;for(const l in i){const u=i[l];t.data.attributes[l]=u.toJSON(t.data)}const a={};let r=!1;for(const l in this.morphAttributes){const u=this.morphAttributes[l],c=[];for(let d=0,f=u.length;d<f;d++){const h=u[d];c.push(h.toJSON(t.data))}c.length>0&&(a[l]=c,r=!0)}r&&(t.data.morphAttributes=a,t.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));const o=this.boundingSphere;return o!==null&&(t.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=t.name;const i=t.index;i!==null&&this.setIndex(i.clone(n));const a=t.attributes;for(const u in a){const c=a[u];this.setAttribute(u,c.clone(n))}const r=t.morphAttributes;for(const u in r){const c=[],d=r[u];for(let f=0,h=d.length;f<h;f++)c.push(d[f].clone(n));this.morphAttributes[u]=c}this.morphTargetsRelative=t.morphTargetsRelative;const s=t.groups;for(let u=0,c=s.length;u<c;u++){const d=s[u];this.addGroup(d.start,d.count,d.materialIndex)}const o=t.boundingBox;o!==null&&(this.boundingBox=o.clone());const l=t.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const ug=new jt,or=new em,Nl=new il,cg=new ce,Ol=new ce,Ul=new ce,Bl=new ce,vd=new ce,zl=new ce,dg=new ce,Hl=new ce;class sa extends Bn{constructor(t=new Ri,n=new O_){super(),this.isMesh=!0,this.type="Mesh",this.geometry=t,this.material=n,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(t,n){return super.copy(t,n),t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}updateMorphTargets(){const n=this.geometry.morphAttributes,i=Object.keys(n);if(i.length>0){const a=n[i[0]];if(a!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,s=a.length;r<s;r++){const o=a[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=r}}}}getVertexPosition(t,n){const i=this.geometry,a=i.attributes.position,r=i.morphAttributes.position,s=i.morphTargetsRelative;n.fromBufferAttribute(a,t);const o=this.morphTargetInfluences;if(r&&o){zl.set(0,0,0);for(let l=0,u=r.length;l<u;l++){const c=o[l],d=r[l];c!==0&&(vd.fromBufferAttribute(d,t),s?zl.addScaledVector(vd,c):zl.addScaledVector(vd.sub(n),c))}n.add(zl)}return n}raycast(t,n){const i=this.geometry,a=this.material,r=this.matrixWorld;a!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),Nl.copy(i.boundingSphere),Nl.applyMatrix4(r),or.copy(t.ray).recast(t.near),!(Nl.containsPoint(or.origin)===!1&&(or.intersectSphere(Nl,cg)===null||or.origin.distanceToSquared(cg)>(t.far-t.near)**2))&&(ug.copy(r).invert(),or.copy(t.ray).applyMatrix4(ug),!(i.boundingBox!==null&&or.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(t,n,or)))}_computeIntersections(t,n,i){let a;const r=this.geometry,s=this.material,o=r.index,l=r.attributes.position,u=r.attributes.uv,c=r.attributes.uv1,d=r.attributes.normal,f=r.groups,h=r.drawRange;if(o!==null)if(Array.isArray(s))for(let g=0,p=f.length;g<p;g++){const m=f[g],v=s[m.materialIndex],_=Math.max(m.start,h.start),M=Math.min(o.count,Math.min(m.start+m.count,h.start+h.count));for(let x=_,C=M;x<C;x+=3){const T=o.getX(x),P=o.getX(x+1),w=o.getX(x+2);a=Gl(this,v,t,i,u,c,d,T,P,w),a&&(a.faceIndex=Math.floor(x/3),a.face.materialIndex=m.materialIndex,n.push(a))}}else{const g=Math.max(0,h.start),p=Math.min(o.count,h.start+h.count);for(let m=g,v=p;m<v;m+=3){const _=o.getX(m),M=o.getX(m+1),x=o.getX(m+2);a=Gl(this,s,t,i,u,c,d,_,M,x),a&&(a.faceIndex=Math.floor(m/3),n.push(a))}}else if(l!==void 0)if(Array.isArray(s))for(let g=0,p=f.length;g<p;g++){const m=f[g],v=s[m.materialIndex],_=Math.max(m.start,h.start),M=Math.min(l.count,Math.min(m.start+m.count,h.start+h.count));for(let x=_,C=M;x<C;x+=3){const T=x,P=x+1,w=x+2;a=Gl(this,v,t,i,u,c,d,T,P,w),a&&(a.faceIndex=Math.floor(x/3),a.face.materialIndex=m.materialIndex,n.push(a))}}else{const g=Math.max(0,h.start),p=Math.min(l.count,h.start+h.count);for(let m=g,v=p;m<v;m+=3){const _=m,M=m+1,x=m+2;a=Gl(this,s,t,i,u,c,d,_,M,x),a&&(a.faceIndex=Math.floor(m/3),n.push(a))}}}}function eT(e,t,n,i,a,r,s,o){let l;if(t.side===Wn?l=i.intersectTriangle(s,r,a,!0,o):l=i.intersectTriangle(a,r,s,t.side===Ha,o),l===null)return null;Hl.copy(o),Hl.applyMatrix4(e.matrixWorld);const u=n.ray.origin.distanceTo(Hl);return u<n.near||u>n.far?null:{distance:u,point:Hl.clone(),object:e}}function Gl(e,t,n,i,a,r,s,o,l,u){e.getVertexPosition(o,Ol),e.getVertexPosition(l,Ul),e.getVertexPosition(u,Bl);const c=eT(e,t,n,i,Ol,Ul,Bl,dg);if(c){const d=new ce;Ei.getBarycoord(dg,Ol,Ul,Bl,d),a&&(c.uv=Ei.getInterpolatedAttribute(a,o,l,u,d,new Pt)),r&&(c.uv1=Ei.getInterpolatedAttribute(r,o,l,u,d,new Pt)),s&&(c.normal=Ei.getInterpolatedAttribute(s,o,l,u,d,new ce),c.normal.dot(i.direction)>0&&c.normal.multiplyScalar(-1));const f={a:o,b:l,c:u,normal:new ce,materialIndex:0};Ei.getNormal(Ol,Ul,Bl,f.normal),c.face=f,c.barycoord=d}return c}class al extends Ri{constructor(t=1,n=1,i=1,a=1,r=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:n,depth:i,widthSegments:a,heightSegments:r,depthSegments:s};const o=this;a=Math.floor(a),r=Math.floor(r),s=Math.floor(s);const l=[],u=[],c=[],d=[];let f=0,h=0;g("z","y","x",-1,-1,i,n,t,s,r,0),g("z","y","x",1,-1,i,n,-t,s,r,1),g("x","z","y",1,1,t,i,n,a,s,2),g("x","z","y",1,-1,t,i,-n,a,s,3),g("x","y","z",1,-1,t,n,i,a,r,4),g("x","y","z",-1,-1,t,n,-i,a,r,5),this.setIndex(l),this.setAttribute("position",new la(u,3)),this.setAttribute("normal",new la(c,3)),this.setAttribute("uv",new la(d,2));function g(p,m,v,_,M,x,C,T,P,w,b){const S=x/P,E=C/w,R=x/2,L=C/2,O=T/2,G=P+1,U=w+1;let j=0,B=0;const X=new ce;for(let W=0;W<U;W++){const H=W*E-L;for(let te=0;te<G;te++){const Se=te*S-R;X[p]=Se*_,X[m]=H*M,X[v]=O,u.push(X.x,X.y,X.z),X[p]=0,X[m]=0,X[v]=T>0?1:-1,c.push(X.x,X.y,X.z),d.push(te/P),d.push(1-W/w),j+=1}}for(let W=0;W<w;W++)for(let H=0;H<P;H++){const te=f+H+G*W,Se=f+H+G*(W+1),$=f+(H+1)+G*(W+1),he=f+(H+1)+G*W;l.push(te,Se,he),l.push(Se,$,he),B+=6}o.addGroup(h,B,b),h+=B,f+=j}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new al(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}}function Hs(e){const t={};for(const n in e){t[n]={};for(const i in e[n]){const a=e[n][i];a&&(a.isColor||a.isMatrix3||a.isMatrix4||a.isVector2||a.isVector3||a.isVector4||a.isTexture||a.isQuaternion)?a.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[n][i]=null):t[n][i]=a.clone():Array.isArray(a)?t[n][i]=a.slice():t[n][i]=a}}return t}function kn(e){const t={};for(let n=0;n<e.length;n++){const i=Hs(e[n]);for(const a in i)t[a]=i[a]}return t}function tT(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].clone());return t}function z_(e){const t=e.getRenderTarget();return t===null?e.outputColorSpace:t.isXRRenderTarget===!0?t.texture.colorSpace:bt.workingColorSpace}const nT={clone:Hs,merge:kn};var iT=`void main() {
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}`,aT=`void main() {
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
}`;class Ga extends Zs{constructor(t){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=iT,this.fragmentShader=aT,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,t!==void 0&&this.setValues(t)}copy(t){return super.copy(t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=Hs(t.uniforms),this.uniformsGroups=tT(t.uniformsGroups),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.fog=t.fog,this.lights=t.lights,this.clipping=t.clipping,this.extensions=Object.assign({},t.extensions),this.glslVersion=t.glslVersion,this}toJSON(t){const n=super.toJSON(t);n.glslVersion=this.glslVersion,n.uniforms={};for(const a in this.uniforms){const s=this.uniforms[a].value;s&&s.isTexture?n.uniforms[a]={type:"t",value:s.toJSON(t).uuid}:s&&s.isColor?n.uniforms[a]={type:"c",value:s.getHex()}:s&&s.isVector2?n.uniforms[a]={type:"v2",value:s.toArray()}:s&&s.isVector3?n.uniforms[a]={type:"v3",value:s.toArray()}:s&&s.isVector4?n.uniforms[a]={type:"v4",value:s.toArray()}:s&&s.isMatrix3?n.uniforms[a]={type:"m3",value:s.toArray()}:s&&s.isMatrix4?n.uniforms[a]={type:"m4",value:s.toArray()}:n.uniforms[a]={value:s}}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 a in this.extensions)this.extensions[a]===!0&&(i[a]=!0);return Object.keys(i).length>0&&(n.extensions=i),n}}class H_ extends Bn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new jt,this.projectionMatrix=new jt,this.projectionMatrixInverse=new jt,this.coordinateSystem=ra}copy(t,n){return super.copy(t,n),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,n){super.updateWorldMatrix(t,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const Ra=new ce,fg=new Pt,hg=new Pt;class di extends H_{constructor(t=50,n=1,i=.1,a=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=i,this.far=a,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,n){return super.copy(t,n),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const n=.5*this.getFilmHeight()/t;this.fov=Nf*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(jc*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return Nf*2*Math.atan(Math.tan(jc*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(t,n,i){Ra.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Ra.x,Ra.y).multiplyScalar(-t/Ra.z),Ra.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(Ra.x,Ra.y).multiplyScalar(-t/Ra.z)}getViewSize(t,n){return this.getViewBounds(t,fg,hg),n.subVectors(hg,fg)}setViewOffset(t,n,i,a,r,s){this.aspect=t/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=t,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=a,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let n=t*Math.tan(jc*.5*this.fov)/this.zoom,i=2*n,a=this.aspect*i,r=-.5*a;const s=this.view;if(this.view!==null&&this.view.enabled){const l=s.fullWidth,u=s.fullHeight;r+=s.offsetX*a/l,n-=s.offsetY*i/u,a*=s.width/l,i*=s.height/u}const o=this.filmOffset;o!==0&&(r+=t*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+a,n,n-i,t,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const n=super.toJSON(t);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 gs=-90,ps=1;class rT extends Bn{constructor(t,n,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const a=new di(gs,ps,t,n);a.layers=this.layers,this.add(a);const r=new di(gs,ps,t,n);r.layers=this.layers,this.add(r);const s=new di(gs,ps,t,n);s.layers=this.layers,this.add(s);const o=new di(gs,ps,t,n);o.layers=this.layers,this.add(o);const l=new di(gs,ps,t,n);l.layers=this.layers,this.add(l);const u=new di(gs,ps,t,n);u.layers=this.layers,this.add(u)}updateCoordinateSystem(){const t=this.coordinateSystem,n=this.children.concat(),[i,a,r,s,o,l]=n;for(const u of n)this.remove(u);if(t===ra)i.up.set(0,1,0),i.lookAt(1,0,0),a.up.set(0,1,0),a.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),s.up.set(0,0,1),s.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(t===Iu)i.up.set(0,-1,0),i.lookAt(-1,0,0),a.up.set(0,-1,0),a.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),s.up.set(0,0,-1),s.lookAt(0,-1,0),o.up.set(0,-1,0),o.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: "+t);for(const u of n)this.add(u),u.updateMatrixWorld()}update(t,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:a}=this;this.coordinateSystem!==t.coordinateSystem&&(this.coordinateSystem=t.coordinateSystem,this.updateCoordinateSystem());const[r,s,o,l,u,c]=this.children,d=t.getRenderTarget(),f=t.getActiveCubeFace(),h=t.getActiveMipmapLevel(),g=t.xr.enabled;t.xr.enabled=!1;const p=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,t.setRenderTarget(i,0,a),t.render(n,r),t.setRenderTarget(i,1,a),t.render(n,s),t.setRenderTarget(i,2,a),t.render(n,o),t.setRenderTarget(i,3,a),t.render(n,l),t.setRenderTarget(i,4,a),t.render(n,u),i.texture.generateMipmaps=p,t.setRenderTarget(i,5,a),t.render(n,c),t.setRenderTarget(d,f,h),t.xr.enabled=g,i.texture.needsPMREMUpdate=!0}}class G_ extends $n{constructor(t,n,i,a,r,s,o,l,u,c){t=t!==void 0?t:[],n=n!==void 0?n:Ns,super(t,n,i,a,r,s,o,l,u,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class sT extends Vr{constructor(t=1,n={}){super(t,t,n),this.isWebGLCubeRenderTarget=!0;const i={width:t,height:t,depth:1},a=[i,i,i,i,i,i];this.texture=new G_(a,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:Ui}fromEquirectangularTexture(t,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 );
}
`},a=new al(5,5,5),r=new Ga({name:"CubemapFromEquirect",uniforms:Hs(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:Wn,blending:Ba});r.uniforms.tEquirect.value=n;const s=new sa(a,r),o=n.minFilter;return n.minFilter===xr&&(n.minFilter=Ui),new rT(1,10,this).update(t,s),n.minFilter=o,s.geometry.dispose(),s.material.dispose(),this}clear(t,n,i,a){const r=t.getRenderTarget();for(let s=0;s<6;s++)t.setRenderTarget(this,s),t.clear(n,i,a);t.setRenderTarget(r)}}class Wl extends Bn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const oT={type:"move"};class gd{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Wl,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 Wl,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new ce,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new ce),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Wl,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new ce,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new ce),this._grip}dispatchEvent(t){return this._targetRay!==null&&this._targetRay.dispatchEvent(t),this._grip!==null&&this._grip.dispatchEvent(t),this._hand!==null&&this._hand.dispatchEvent(t),this}connect(t){if(t&&t.hand){const n=this._hand;if(n)for(const i of t.hand.values())this._getHandJoint(n,i)}return this.dispatchEvent({type:"connected",data:t}),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(t,n,i){let a=null,r=null,s=null;const o=this._targetRay,l=this._grip,u=this._hand;if(t&&n.session.visibilityState!=="visible-blurred"){if(u&&t.hand){s=!0;for(const p of t.hand.values()){const m=n.getJointPose(p,i),v=this._getHandJoint(u,p);m!==null&&(v.matrix.fromArray(m.transform.matrix),v.matrix.decompose(v.position,v.rotation,v.scale),v.matrixWorldNeedsUpdate=!0,v.jointRadius=m.radius),v.visible=m!==null}const c=u.joints["index-finger-tip"],d=u.joints["thumb-tip"],f=c.position.distanceTo(d.position),h=.02,g=.005;u.inputState.pinching&&f>h+g?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!u.inputState.pinching&&f<=h-g&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else l!==null&&t.gripSpace&&(r=n.getPose(t.gripSpace,i),r!==null&&(l.matrix.fromArray(r.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,r.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(r.linearVelocity)):l.hasLinearVelocity=!1,r.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(r.angularVelocity)):l.hasAngularVelocity=!1));o!==null&&(a=n.getPose(t.targetRaySpace,i),a===null&&r!==null&&(a=r),a!==null&&(o.matrix.fromArray(a.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,a.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(a.linearVelocity)):o.hasLinearVelocity=!1,a.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(a.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(oT)))}return o!==null&&(o.visible=a!==null),l!==null&&(l.visible=r!==null),u!==null&&(u.visible=s!==null),this}_getHandJoint(t,n){if(t.joints[n.jointName]===void 0){const i=new Wl;i.matrixAutoUpdate=!1,i.visible=!1,t.joints[n.jointName]=i,t.add(i)}return t.joints[n.jointName]}}class tm{constructor(t,n=25e-5){this.isFogExp2=!0,this.name="",this.color=new xt(t),this.density=n}clone(){return new tm(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class lT extends Bn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new ha,this.environmentIntensity=1,this.environmentRotation=new ha,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,n){return super.copy(t,n),t.background!==null&&(this.background=t.background.clone()),t.environment!==null&&(this.environment=t.environment.clone()),t.fog!==null&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,this.backgroundRotation.copy(t.backgroundRotation),this.environmentIntensity=t.environmentIntensity,this.environmentRotation.copy(t.environmentRotation),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const n=super.toJSON(t);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(n.object.environmentIntensity=this.environmentIntensity),n.object.environmentRotation=this.environmentRotation.toArray(),n}}const pd=new ce,uT=new ce,cT=new ut;class vr{constructor(t=new ce(1,0,0),n=0){this.isPlane=!0,this.normal=t,this.constant=n}set(t,n){return this.normal.copy(t),this.constant=n,this}setComponents(t,n,i,a){return this.normal.set(t,n,i),this.constant=a,this}setFromNormalAndCoplanarPoint(t,n){return this.normal.copy(t),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(t,n,i){const a=pd.subVectors(i,n).cross(uT.subVectors(t,n)).normalize();return this.setFromNormalAndCoplanarPoint(a,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,n){return n.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,n){const i=t.delta(pd),a=this.normal.dot(i);if(a===0)return this.distanceToPoint(t.start)===0?n.copy(t.start):null;const r=-(t.start.dot(this.normal)+this.constant)/a;return r<0||r>1?null:n.copy(t.start).addScaledVector(i,r)}intersectsLine(t){const n=this.distanceToPoint(t.start),i=this.distanceToPoint(t.end);return n<0&&i>0||i<0&&n>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,n){const i=n||cT.getNormalMatrix(t),a=this.coplanarPoint(pd).applyMatrix4(t),r=this.normal.applyMatrix3(i).normalize();return this.constant=-a.dot(r),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}}const lr=new il,$l=new ce;class W_{constructor(t=new vr,n=new vr,i=new vr,a=new vr,r=new vr,s=new vr){this.planes=[t,n,i,a,r,s]}set(t,n,i,a,r,s){const o=this.planes;return o[0].copy(t),o[1].copy(n),o[2].copy(i),o[3].copy(a),o[4].copy(r),o[5].copy(s),this}copy(t){const n=this.planes;for(let i=0;i<6;i++)n[i].copy(t.planes[i]);return this}setFromProjectionMatrix(t,n=ra){const i=this.planes,a=t.elements,r=a[0],s=a[1],o=a[2],l=a[3],u=a[4],c=a[5],d=a[6],f=a[7],h=a[8],g=a[9],p=a[10],m=a[11],v=a[12],_=a[13],M=a[14],x=a[15];if(i[0].setComponents(l-r,f-u,m-h,x-v).normalize(),i[1].setComponents(l+r,f+u,m+h,x+v).normalize(),i[2].setComponents(l+s,f+c,m+g,x+_).normalize(),i[3].setComponents(l-s,f-c,m-g,x-_).normalize(),i[4].setComponents(l-o,f-d,m-p,x-M).normalize(),n===ra)i[5].setComponents(l+o,f+d,m+p,x+M).normalize();else if(n===Iu)i[5].setComponents(o,d,p,M).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(t){if(t.boundingSphere!==void 0)t.boundingSphere===null&&t.computeBoundingSphere(),lr.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const n=t.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),lr.copy(n.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(lr)}intersectsSprite(t){return lr.center.set(0,0,0),lr.radius=.7071067811865476,lr.applyMatrix4(t.matrixWorld),this.intersectsSphere(lr)}intersectsSphere(t){const n=this.planes,i=t.center,a=-t.radius;for(let r=0;r<6;r++)if(n[r].distanceToPoint(i)<a)return!1;return!0}intersectsBox(t){const n=this.planes;for(let i=0;i<6;i++){const a=n[i];if($l.x=a.normal.x>0?t.max.x:t.min.x,$l.y=a.normal.y>0?t.max.y:t.min.y,$l.z=a.normal.z>0?t.max.z:t.min.z,a.distanceToPoint($l)<0)return!1}return!0}containsPoint(t){const n=this.planes;for(let i=0;i<6;i++)if(n[i].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}class $_ extends Zs{constructor(t){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new xt(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this.fog=t.fog,this}}const Lu=new ce,ku=new ce,mg=new jt,mo=new em,Xl=new il,yd=new ce,vg=new ce;class dT extends Bn{constructor(t=new Ri,n=new $_){super(),this.isLine=!0,this.type="Line",this.geometry=t,this.material=n,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(t,n){return super.copy(t,n),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}computeLineDistances(){const t=this.geometry;if(t.index===null){const n=t.attributes.position,i=[0];for(let a=1,r=n.count;a<r;a++)Lu.fromBufferAttribute(n,a-1),ku.fromBufferAttribute(n,a),i[a]=i[a-1],i[a]+=Lu.distanceTo(ku);t.setAttribute("lineDistance",new la(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(t,n){const i=this.geometry,a=this.matrixWorld,r=t.params.Line.threshold,s=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),Xl.copy(i.boundingSphere),Xl.applyMatrix4(a),Xl.radius+=r,t.ray.intersectsSphere(Xl)===!1)return;mg.copy(a).invert(),mo.copy(t.ray).applyMatrix4(mg);const o=r/((this.scale.x+this.scale.y+this.scale.z)/3),l=o*o,u=this.isLineSegments?2:1,c=i.index,f=i.attributes.position;if(c!==null){const h=Math.max(0,s.start),g=Math.min(c.count,s.start+s.count);for(let p=h,m=g-1;p<m;p+=u){const v=c.getX(p),_=c.getX(p+1),M=Yl(this,t,mo,l,v,_,p);M&&n.push(M)}if(this.isLineLoop){const p=c.getX(g-1),m=c.getX(h),v=Yl(this,t,mo,l,p,m,g-1);v&&n.push(v)}}else{const h=Math.max(0,s.start),g=Math.min(f.count,s.start+s.count);for(let p=h,m=g-1;p<m;p+=u){const v=Yl(this,t,mo,l,p,p+1,p);v&&n.push(v)}if(this.isLineLoop){const p=Yl(this,t,mo,l,g-1,h,g-1);p&&n.push(p)}}}updateMorphTargets(){const n=this.geometry.morphAttributes,i=Object.keys(n);if(i.length>0){const a=n[i[0]];if(a!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,s=a.length;r<s;r++){const o=a[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=r}}}}}function Yl(e,t,n,i,a,r,s){const o=e.geometry.attributes.position;if(Lu.fromBufferAttribute(o,a),ku.fromBufferAttribute(o,r),n.distanceSqToSegment(Lu,ku,yd,vg)>i)return;yd.applyMatrix4(e.matrixWorld);const u=t.ray.origin.distanceTo(yd);if(!(u<t.near||u>t.far))return{distance:u,point:vg.clone().applyMatrix4(e.matrixWorld),index:s,face:null,faceIndex:null,barycoord:null,object:e}}const gg=new ce,pg=new ce;class fT extends dT{constructor(t,n){super(t,n),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(t.index===null){const n=t.attributes.position,i=[];for(let a=0,r=n.count;a<r;a+=2)gg.fromBufferAttribute(n,a),pg.fromBufferAttribute(n,a+1),i[a]=a===0?0:i[a-1],i[a+1]=i[a]+gg.distanceTo(pg);t.setAttribute("lineDistance",new la(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class X_ extends Zs{constructor(t){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new xt(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.fog=t.fog,this}}const yg=new jt,Of=new em,ql=new il,jl=new ce;class hT extends Bn{constructor(t=new Ri,n=new X_){super(),this.isPoints=!0,this.type="Points",this.geometry=t,this.material=n,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(t,n){return super.copy(t,n),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}raycast(t,n){const i=this.geometry,a=this.matrixWorld,r=t.params.Points.threshold,s=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),ql.copy(i.boundingSphere),ql.applyMatrix4(a),ql.radius+=r,t.ray.intersectsSphere(ql)===!1)return;yg.copy(a).invert(),Of.copy(t.ray).applyMatrix4(yg);const o=r/((this.scale.x+this.scale.y+this.scale.z)/3),l=o*o,u=i.index,d=i.attributes.position;if(u!==null){const f=Math.max(0,s.start),h=Math.min(u.count,s.start+s.count);for(let g=f,p=h;g<p;g++){const m=u.getX(g);jl.fromBufferAttribute(d,m),_g(jl,m,l,a,t,n,this)}}else{const f=Math.max(0,s.start),h=Math.min(d.count,s.start+s.count);for(let g=f,p=h;g<p;g++)jl.fromBufferAttribute(d,g),_g(jl,g,l,a,t,n,this)}}updateMorphTargets(){const n=this.geometry.morphAttributes,i=Object.keys(n);if(i.length>0){const a=n[i[0]];if(a!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,s=a.length;r<s;r++){const o=a[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=r}}}}}function _g(e,t,n,i,a,r,s){const o=Of.distanceSqToPoint(e);if(o<n){const l=new ce;Of.closestPointToPoint(e,l),l.applyMatrix4(i);const u=a.ray.origin.distanceTo(l);if(u<a.near||u>a.far)return;r.push({distance:u,distanceToRay:Math.sqrt(o),point:l,index:t,face:null,faceIndex:null,barycoord:null,object:s})}}class Y_ extends $n{constructor(t,n,i,a,r,s,o,l,u,c=Ls){if(c!==Ls&&c!==Bs)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&c===Ls&&(i=kr),i===void 0&&c===Bs&&(i=Us),super(null,a,r,s,o,l,c,i,u),this.isDepthTexture=!0,this.image={width:t,height:n},this.magFilter=o!==void 0?o:Ai,this.minFilter=l!==void 0?l:Ai,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(t){return super.copy(t),this.source=new Qh(Object.assign({},t.image)),this.compareFunction=t.compareFunction,this}toJSON(t){const n=super.toJSON(t);return this.compareFunction!==null&&(n.compareFunction=this.compareFunction),n}}class ec extends Ri{constructor(t=1,n=1,i=1,a=1){super(),this.type="PlaneGeometry",this.parameters={width:t,height:n,widthSegments:i,heightSegments:a};const r=t/2,s=n/2,o=Math.floor(i),l=Math.floor(a),u=o+1,c=l+1,d=t/o,f=n/l,h=[],g=[],p=[],m=[];for(let v=0;v<c;v++){const _=v*f-s;for(let M=0;M<u;M++){const x=M*d-r;g.push(x,-_,0),p.push(0,0,1),m.push(M/o),m.push(1-v/l)}}for(let v=0;v<l;v++)for(let _=0;_<o;_++){const M=_+u*v,x=_+u*(v+1),C=_+1+u*(v+1),T=_+1+u*v;h.push(M,x,T),h.push(x,C,T)}this.setIndex(h),this.setAttribute("position",new la(g,3)),this.setAttribute("normal",new la(p,3)),this.setAttribute("uv",new la(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new ec(t.width,t.height,t.widthSegments,t.heightSegments)}}class mT extends Zs{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Sw,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}class vT extends Zs{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}class gT extends H_{constructor(t=-1,n=1,i=1,a=-1,r=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=n,this.top=i,this.bottom=a,this.near=r,this.far=s,this.updateProjectionMatrix()}copy(t,n){return super.copy(t,n),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,n,i,a,r,s){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=t,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=a,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,a=(this.top+this.bottom)/2;let r=i-t,s=i+t,o=a+n,l=a-n;if(this.view!==null&&this.view.enabled){const u=(this.right-this.left)/this.view.fullWidth/this.zoom,c=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=u*this.view.offsetX,s=r+u*this.view.width,o-=c*this.view.offsetY,l=o-c*this.view.height}this.projectionMatrix.makeOrthographic(r,s,o,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const n=super.toJSON(t);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}class pT extends di{constructor(t=[]){super(),this.isArrayCamera=!0,this.cameras=t,this.index=0}}function bg(e,t,n,i){const a=yT(i);switch(n){case T_:return e*t;case A_:return e*t;case P_:return e*t*2;case R_:return e*t/a.components*a.byteLength;case Kh:return e*t/a.components*a.byteLength;case I_:return e*t*2/a.components*a.byteLength;case Zh:return e*t*2/a.components*a.byteLength;case C_:return e*t*3/a.components*a.byteLength;case wi:return e*t*4/a.components*a.byteLength;case Jh:return e*t*4/a.components*a.byteLength;case cu:case du:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case fu:case hu:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case ff:case mf:return Math.max(e,16)*Math.max(t,8)/4;case df:case hf:return Math.max(e,8)*Math.max(t,8)/2;case vf:case gf:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case pf:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case yf:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case _f:return Math.floor((e+4)/5)*Math.floor((t+3)/4)*16;case bf:return Math.floor((e+4)/5)*Math.floor((t+4)/5)*16;case xf:return Math.floor((e+5)/6)*Math.floor((t+4)/5)*16;case Sf:return Math.floor((e+5)/6)*Math.floor((t+5)/6)*16;case Mf:return Math.floor((e+7)/8)*Math.floor((t+4)/5)*16;case Ef:return Math.floor((e+7)/8)*Math.floor((t+5)/6)*16;case wf:return Math.floor((e+7)/8)*Math.floor((t+7)/8)*16;case Tf:return Math.floor((e+9)/10)*Math.floor((t+4)/5)*16;case Cf:return Math.floor((e+9)/10)*Math.floor((t+5)/6)*16;case Af:return Math.floor((e+9)/10)*Math.floor((t+7)/8)*16;case Pf:return Math.floor((e+9)/10)*Math.floor((t+9)/10)*16;case Rf:return Math.floor((e+11)/12)*Math.floor((t+9)/10)*16;case If:return Math.floor((e+11)/12)*Math.floor((t+11)/12)*16;case mu:case Df:case Lf:return Math.ceil(e/4)*Math.ceil(t/4)*16;case D_:case kf:return Math.ceil(e/4)*Math.ceil(t/4)*8;case Vf:case Ff:return Math.ceil(e/4)*Math.ceil(t/4)*16}throw new Error(`Unable to determine texture byte length for ${n} format.`)}function yT(e){switch(e){case fa:case M_:return{byteLength:1,components:1};case Fo:case E_:case Qo:return{byteLength:2,components:1};case qh:case jh:return{byteLength:2,components:4};case kr:case Yh:case aa:return{byteLength:4,components:1};case w_:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${e}.`)}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Xh}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Xh);/**
* @license
* Copyright 2010-2025 Three.js Authors
* SPDX-License-Identifier: MIT
*/function q_(){let e=null,t=!1,n=null,i=null;function a(r,s){n(r,s),i=e.requestAnimationFrame(a)}return{start:function(){t!==!0&&n!==null&&(i=e.requestAnimationFrame(a),t=!0)},stop:function(){e.cancelAnimationFrame(i),t=!1},setAnimationLoop:function(r){n=r},setContext:function(r){e=r}}}function _T(e){const t=new WeakMap;function n(o,l){const u=o.array,c=o.usage,d=u.byteLength,f=e.createBuffer();e.bindBuffer(l,f),e.bufferData(l,u,c),o.onUploadCallback();let h;if(u instanceof Float32Array)h=e.FLOAT;else if(u instanceof Uint16Array)o.isFloat16BufferAttribute?h=e.HALF_FLOAT:h=e.UNSIGNED_SHORT;else if(u instanceof Int16Array)h=e.SHORT;else if(u instanceof Uint32Array)h=e.UNSIGNED_INT;else if(u instanceof Int32Array)h=e.INT;else if(u instanceof Int8Array)h=e.BYTE;else if(u instanceof Uint8Array)h=e.UNSIGNED_BYTE;else if(u instanceof Uint8ClampedArray)h=e.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+u);return{buffer:f,type:h,bytesPerElement:u.BYTES_PER_ELEMENT,version:o.version,size:d}}function i(o,l,u){const c=l.array,d=l.updateRanges;if(e.bindBuffer(u,o),d.length===0)e.bufferSubData(u,0,c);else{d.sort((h,g)=>h.start-g.start);let f=0;for(let h=1;h<d.length;h++){const g=d[f],p=d[h];p.start<=g.start+g.count+1?g.count=Math.max(g.count,p.start+p.count-g.start):(++f,d[f]=p)}d.length=f+1;for(let h=0,g=d.length;h<g;h++){const p=d[h];e.bufferSubData(u,p.start*c.BYTES_PER_ELEMENT,c,p.start,p.count)}l.clearUpdateRanges()}l.onUploadCallback()}function a(o){return o.isInterleavedBufferAttribute&&(o=o.data),t.get(o)}function r(o){o.isInterleavedBufferAttribute&&(o=o.data);const l=t.get(o);l&&(e.deleteBuffer(l.buffer),t.delete(o))}function s(o,l){if(o.isInterleavedBufferAttribute&&(o=o.data),o.isGLBufferAttribute){const c=t.get(o);(!c||c.version<o.version)&&t.set(o,{buffer:o.buffer,type:o.type,bytesPerElement:o.elementSize,version:o.version});return}const u=t.get(o);if(u===void 0)t.set(o,n(o,l));else if(u.version<o.version){if(u.size!==o.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");i(u.buffer,o,l),u.version=o.version}}return{get:a,remove:r,update:s}}var bT=`#ifdef USE_ALPHAHASH
if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;
#endif`,xT=`#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`,ST=`#ifdef USE_ALPHAMAP
diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;
#endif`,MT=`#ifdef USE_ALPHAMAP
uniform sampler2D alphaMap;
#endif`,ET=`#ifdef USE_ALPHATEST
#ifdef ALPHA_TO_COVERAGE
diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );
if ( diffuseColor.a == 0.0 ) discard;
#else
if ( diffuseColor.a < alphaTest ) discard;
#endif
#endif`,wT=`#ifdef USE_ALPHATEST
uniform float alphaTest;
#endif`,TT=`#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`,CT=`#ifdef USE_AOMAP
uniform sampler2D aoMap;
uniform float aoMapIntensity;
#endif`,AT=`#ifdef USE_BATCHING
#if ! defined( GL_ANGLE_multi_draw )
#define gl_DrawID _gl_DrawID
uniform int _gl_DrawID;
#endif
uniform highp sampler2D batchingTexture;
uniform highp usampler2D batchingIdTexture;
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 );
}
float getIndirectIndex( const in int i ) {
int size = textureSize( batchingIdTexture, 0 ).x;
int x = i % size;
int y = i / size;
return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );
}
#endif
#ifdef USE_BATCHING_COLOR
uniform sampler2D batchingColorTexture;
vec3 getBatchingColor( const in float i ) {
int size = textureSize( batchingColorTexture, 0 ).x;
int j = int( i );
int x = j % size;
int y = j / size;
return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;
}
#endif`,PT=`#ifdef USE_BATCHING
mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );
#endif`,RT=`vec3 transformed = vec3( position );
#ifdef USE_ALPHAHASH
vPosition = vec3( position );
#endif`,IT=`vec3 objectNormal = vec3( normal );
#ifdef USE_TANGENT
vec3 objectTangent = vec3( tangent.xyz );
#endif`,DT=`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`,LT=`#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`,kT=`#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`,VT=`#if NUM_CLIPPING_PLANES > 0
vec4 plane;
#ifdef ALPHA_TO_COVERAGE
float distanceToPlane, distanceGradient;
float clipOpacity = 1.0;
#pragma unroll_loop_start
for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
plane = clippingPlanes[ i ];
distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
distanceGradient = fwidth( distanceToPlane ) / 2.0;
clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
if ( clipOpacity == 0.0 ) discard;
}
#pragma unroll_loop_end
#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
float unionClipOpacity = 1.0;
#pragma unroll_loop_start
for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
plane = clippingPlanes[ i ];
distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
distanceGradient = fwidth( distanceToPlane ) / 2.0;
unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
}
#pragma unroll_loop_end
clipOpacity *= 1.0 - unionClipOpacity;
#endif
diffuseColor.a *= clipOpacity;
if ( diffuseColor.a == 0.0 ) discard;
#else
#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
#endif`,FT=`#if NUM_CLIPPING_PLANES > 0
varying vec3 vClipPosition;
uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
#endif`,NT=`#if NUM_CLIPPING_PLANES > 0
varying vec3 vClipPosition;
#endif`,OT=`#if NUM_CLIPPING_PLANES > 0
vClipPosition = - mvPosition.xyz;
#endif`,UT=`#if defined( USE_COLOR_ALPHA )
diffuseColor *= vColor;
#elif defined( USE_COLOR )
diffuseColor.rgb *= vColor;
#endif`,BT=`#if defined( USE_COLOR_ALPHA )
varying vec4 vColor;
#elif defined( USE_COLOR )
varying vec3 vColor;
#endif`,zT=`#if defined( USE_COLOR_ALPHA )
varying vec4 vColor;
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
varying vec3 vColor;
#endif`,HT=`#if defined( USE_COLOR_ALPHA )
vColor = vec4( 1.0 );
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
vColor = vec3( 1.0 );
#endif
#ifdef USE_COLOR
vColor *= color;
#endif
#ifdef USE_INSTANCING_COLOR
vColor.xyz *= instanceColor.xyz;
#endif
#ifdef USE_BATCHING_COLOR
vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );
vColor.xyz *= batchingColor.xyz;
#endif`,GT=`#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;
}
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`,WT=`#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_m0 - 2.0
#define cubeUV_r1 0.8
#define cubeUV_m1 - 1.0
#define cubeUV_r4 0.4
#define cubeUV_m4 2.0
#define cubeUV_r5 0.305
#define cubeUV_m5 3.0
#define cubeUV_r6 0.21
#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`,$T=`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`,XT=`#ifdef USE_DISPLACEMENTMAP
uniform sampler2D displacementMap;
uniform float displacementScale;
uniform float displacementBias;
#endif`,YT=`#ifdef USE_DISPLACEMENTMAP
transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );
#endif`,qT=`#ifdef USE_EMISSIVEMAP
vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );
#ifdef DECODE_VIDEO_TEXTURE_EMISSIVE
emissiveColor = sRGBTransferEOTF( emissiveColor );
#endif
totalEmissiveRadiance *= emissiveColor.rgb;
#endif`,jT=`#ifdef USE_EMISSIVEMAP
uniform sampler2D emissiveMap;
#endif`,KT="gl_FragColor = linearToOutputTexel( gl_FragColor );",ZT=`vec4 LinearTransferOETF( in vec4 value ) {
return value;
}
vec4 sRGBTransferEOTF( in vec4 value ) {
return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );
}
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 );
}`,JT=`#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, envMapRotation * 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`,QT=`#ifdef USE_ENVMAP
uniform float envMapIntensity;
uniform float flipEnvMap;
uniform mat3 envMapRotation;
#ifdef ENVMAP_TYPE_CUBE
uniform samplerCube envMap;
#else
uniform sampler2D envMap;
#endif
#endif`,eC=`#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`,tC=`#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`,nC=`#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`,iC=`#ifdef USE_FOG
vFogDepth = - mvPosition.z;
#endif`,aC=`#ifdef USE_FOG
varying float vFogDepth;
#endif`,rC=`#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`,sC=`#ifdef USE_FOG
uniform vec3 fogColor;
varying float vFogDepth;
#ifdef FOG_EXP2
uniform float fogDensity;
#else
uniform float fogNear;
uniform float fogFar;
#endif
#endif`,oC=`#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
}`,lC=`#ifdef USE_LIGHTMAP
uniform sampler2D lightMap;
uniform float lightMapIntensity;
#endif`,uC=`LambertMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.specularStrength = specularStrength;`,cC=`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`,dC=`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 ) {
float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );
if ( cutoffDistance > 0.0 ) {
distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );
}
return distanceFalloff;
}
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`,fC=`#ifdef USE_ENVMAP
vec3 getIBLIrradiance( const in vec3 normal ) {
#ifdef ENVMAP_TYPE_CUBE_UV
vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
vec4 envMapColor = textureCubeUV( envMap, envMapRotation * 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, envMapRotation * 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`,hC=`ToonMaterial material;
material.diffuseColor = diffuseColor.rgb;`,mC=`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`,vC=`BlinnPhongMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.specularColor = specular;
material.specularShininess = shininess;
material.specularStrength = specularStrength;`,gC=`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`,pC=`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_DISPERSION
material.dispersion = dispersion;
#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`,yC=`struct PhysicalMaterial {
vec3 diffuseColor;
float roughness;
vec3 specularColor;
float specularF90;
float dispersion;
#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 );
}`,_C=`
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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, 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`,bC=`#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`,xC=`#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`,SC=`#if defined( USE_LOGDEPTHBUF )
gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
#endif`,MC=`#if defined( USE_LOGDEPTHBUF )
uniform float logDepthBufFC;
varying float vFragDepth;
varying float vIsPerspective;
#endif`,EC=`#ifdef USE_LOGDEPTHBUF
varying float vFragDepth;
varying float vIsPerspective;
#endif`,wC=`#ifdef USE_LOGDEPTHBUF
vFragDepth = 1.0 + gl_Position.w;
vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
#endif`,TC=`#ifdef USE_MAP
vec4 sampledDiffuseColor = texture2D( map, vMapUv );
#ifdef DECODE_VIDEO_TEXTURE
sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );
#endif
diffuseColor *= sampledDiffuseColor;
#endif`,CC=`#ifdef USE_MAP
uniform sampler2D map;
#endif`,AC=`#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`,PC=`#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`,RC=`float metalnessFactor = metalness;
#ifdef USE_METALNESSMAP
vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );
metalnessFactor *= texelMetalness.b;
#endif`,IC=`#ifdef USE_METALNESSMAP
uniform sampler2D metalnessMap;
#endif`,DC=`#ifdef USE_INSTANCING_MORPH
float morphTargetInfluences[ MORPHTARGETS_COUNT ];
float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;
}
#endif`,LC=`#if defined( USE_MORPHCOLORS )
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`,kC=`#ifdef USE_MORPHNORMALS
objectNormal *= morphTargetBaseInfluence;
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];
}
#endif`,VC=`#ifdef USE_MORPHTARGETS
#ifndef USE_INSTANCING_MORPH
uniform float morphTargetBaseInfluence;
uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];
#endif
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 );
}
#endif`,FC=`#ifdef USE_MORPHTARGETS
transformed *= morphTargetBaseInfluence;
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];
}
#endif`,NC=`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;`,OC=`#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`,UC=`#ifndef FLAT_SHADED
varying vec3 vNormal;
#ifdef USE_TANGENT
varying vec3 vTangent;
varying vec3 vBitangent;
#endif
#endif`,BC=`#ifndef FLAT_SHADED
varying vec3 vNormal;
#ifdef USE_TANGENT
varying vec3 vTangent;
varying vec3 vBitangent;
#endif
#endif`,zC=`#ifndef FLAT_SHADED
vNormal = normalize( transformedNormal );
#ifdef USE_TANGENT
vTangent = normalize( transformedTangent );
vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
#endif
#endif`,HC=`#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`,GC=`#ifdef USE_CLEARCOAT
vec3 clearcoatNormal = nonPerturbedNormal;
#endif`,WC=`#ifdef USE_CLEARCOAT_NORMALMAP
vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;
clearcoatMapN.xy *= clearcoatNormalScale;
clearcoatNormal = normalize( tbn2 * clearcoatMapN );
#endif`,$C=`#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`,XC=`#ifdef USE_IRIDESCENCEMAP
uniform sampler2D iridescenceMap;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
uniform sampler2D iridescenceThicknessMap;
#endif`,YC=`#ifdef OPAQUE
diffuseColor.a = 1.0;
#endif
#ifdef USE_TRANSMISSION
diffuseColor.a *= material.transmissionAlpha;
#endif
gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,qC=`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 float ShiftRight8 = 1. / 256.;
const float Inv255 = 1. / 255.;
const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );
const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );
const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );
const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );
vec4 packDepthToRGBA( const in float v ) {
if( v <= 0.0 )
return vec4( 0., 0., 0., 0. );
if( v >= 1.0 )
return vec4( 1., 1., 1., 1. );
float vuf;
float af = modf( v * PackFactors.a, vuf );
float bf = modf( vuf * ShiftRight8, vuf );
float gf = modf( vuf * ShiftRight8, vuf );
return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );
}
vec3 packDepthToRGB( const in float v ) {
if( v <= 0.0 )
return vec3( 0., 0., 0. );
if( v >= 1.0 )
return vec3( 1., 1., 1. );
float vuf;
float bf = modf( v * PackFactors.b, vuf );
float gf = modf( vuf * ShiftRight8, vuf );
return vec3( vuf * Inv255, gf * PackUpscale, bf );
}
vec2 packDepthToRG( const in float v ) {
if( v <= 0.0 )
return vec2( 0., 0. );
if( v >= 1.0 )
return vec2( 1., 1. );
float vuf;
float gf = modf( v * 256., vuf );
return vec2( vuf * Inv255, gf );
}
float unpackRGBAToDepth( const in vec4 v ) {
return dot( v, UnpackFactors4 );
}
float unpackRGBToDepth( const in vec3 v ) {
return dot( v, UnpackFactors3 );
}
float unpackRGToDepth( const in vec2 v ) {
return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;
}
vec4 pack2HalfToRGBA( const in 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( const in 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 );
}`,jC=`#ifdef PREMULTIPLIED_ALPHA
gl_FragColor.rgb *= gl_FragColor.a;
#endif`,KC=`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;`,ZC=`#ifdef DITHERING
gl_FragColor.rgb = dithering( gl_FragColor.rgb );
#endif`,JC=`#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`,QC=`float roughnessFactor = roughness;
#ifdef USE_ROUGHNESSMAP
vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
roughnessFactor *= texelRoughness.g;
#endif`,eA=`#ifdef USE_ROUGHNESSMAP
uniform sampler2D roughnessMap;
#endif`,tA=`#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 shadowIntensity;
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 shadowIntensity;
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 shadowIntensity;
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 shadowIntensity, 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 mix( 1.0, shadow, shadowIntensity );
}
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 shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
float shadow = 1.0;
vec3 lightToPosition = shadowCoord.xyz;
float lightToPositionLength = length( lightToPosition );
if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {
float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias;
vec3 bd3D = normalize( lightToPosition );
vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );
#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )
vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;
shadow = (
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
shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );
#endif
}
return mix( 1.0, shadow, shadowIntensity );
}
#endif`,nA=`#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 shadowIntensity;
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 shadowIntensity;
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 shadowIntensity;
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
float shadowCameraNear;
float shadowCameraFar;
};
uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
#endif
#endif`,iA=`#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`,aA=`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.shadowIntensity, 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.shadowIntensity, 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.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
}
#pragma unroll_loop_end
#endif
#endif
return shadow;
}`,rA=`#ifdef USE_SKINNING
mat4 boneMatX = getBoneMatrix( skinIndex.x );
mat4 boneMatY = getBoneMatrix( skinIndex.y );
mat4 boneMatZ = getBoneMatrix( skinIndex.z );
mat4 boneMatW = getBoneMatrix( skinIndex.w );
#endif`,sA=`#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`,oA=`#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`,lA=`#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`,uA=`float specularStrength;
#ifdef USE_SPECULARMAP
vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );
specularStrength = texelSpecular.r;
#else
specularStrength = 1.0;
#endif`,cA=`#ifdef USE_SPECULARMAP
uniform sampler2D specularMap;
#endif`,dA=`#if defined( TONE_MAPPING )
gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
#endif`,fA=`#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 CineonToneMapping( 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 );
}
const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(
vec3( 1.6605, - 0.1246, - 0.0182 ),
vec3( - 0.5876, 1.1329, - 0.1006 ),
vec3( - 0.0728, - 0.0083, 1.1187 )
);
const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(
vec3( 0.6274, 0.0691, 0.0164 ),
vec3( 0.3293, 0.9195, 0.0880 ),
vec3( 0.0433, 0.0113, 0.8956 )
);
vec3 agxDefaultContrastApprox( vec3 x ) {
vec3 x2 = x * x;
vec3 x4 = x2 * x2;
return + 15.5 * x4 * x2
- 40.14 * x4 * x
+ 31.96 * x4
- 6.868 * x2 * x
+ 0.4298 * x2
+ 0.1191 * x
- 0.00232;
}
vec3 AgXToneMapping( vec3 color ) {
const mat3 AgXInsetMatrix = mat3(
vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),
vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),
vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )
);
const mat3 AgXOutsetMatrix = mat3(
vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),
vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),
vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )
);
const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069;
color *= toneMappingExposure;
color = LINEAR_SRGB_TO_LINEAR_REC2020 * color;
color = AgXInsetMatrix * color;
color = max( color, 1e-10 ); color = log2( color );
color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );
color = clamp( color, 0.0, 1.0 );
color = agxDefaultContrastApprox( color );
color = AgXOutsetMatrix * color;
color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );
color = LINEAR_REC2020_TO_LINEAR_SRGB * color;
color = clamp( color, 0.0, 1.0 );
return color;
}
vec3 NeutralToneMapping( vec3 color ) {
const float StartCompression = 0.8 - 0.04;
const float Desaturation = 0.15;
color *= toneMappingExposure;
float x = min( color.r, min( color.g, color.b ) );
float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;
color -= offset;
float peak = max( color.r, max( color.g, color.b ) );
if ( peak < StartCompression ) return color;
float d = 1. - StartCompression;
float newPeak = 1. - d * d / ( peak + d - StartCompression );
color *= newPeak / peak;
float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );
return mix( color, vec3( newPeak ), g );
}
vec3 CustomToneMapping( vec3 color ) { return color; }`,hA=`#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.dispersion, 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`,mA=`#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 dispersion, const in float ior, const in float thickness,
const in vec3 attenuationColor, const in float attenuationDistance ) {
vec4 transmittedLight;
vec3 transmittance;
#ifdef USE_DISPERSION
float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;
vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );
for ( int i = 0; i < 3; i ++ ) {
vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], 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 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );
transmittedLight[ i ] = transmissionSample[ i ];
transmittedLight.a += transmissionSample.a;
transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];
}
transmittedLight.a /= 3.0;
#else
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;
transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );
transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );
#endif
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`,vA=`#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`,gA=`#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`,pA=`#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`,yA=`#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 _A=`varying vec2 vUv;
uniform mat3 uvTransform;
void main() {
vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
gl_Position = vec4( position.xy, 1.0, 1.0 );
}`,bA=`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>
}`,xA=`varying vec3 vWorldDirection;
#include <common>
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include <begin_vertex>
#include <project_vertex>
gl_Position.z = gl_Position.w;
}`,SA=`#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;
uniform mat3 backgroundRotation;
varying vec3 vWorldDirection;
#include <cube_uv_reflection_fragment>
void main() {
#ifdef ENVMAP_TYPE_CUBE
vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );
#elif defined( ENVMAP_TYPE_CUBE_UV )
vec4 texColor = textureCubeUV( envMap, backgroundRotation * 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>
}`,MA=`varying vec3 vWorldDirection;
#include <common>
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include <begin_vertex>
#include <project_vertex>
gl_Position.z = gl_Position.w;
}`,EA=`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>
}`,wA=`#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>
#include <morphinstance_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;
}`,TA=`#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() {
vec4 diffuseColor = vec4( 1.0 );
#include <clipping_planes_fragment>
#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 );
#elif DEPTH_PACKING == 3202
gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );
#elif DEPTH_PACKING == 3203
gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );
#endif
}`,CA=`#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>
#include <morphinstance_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;
}`,AA=`#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 () {
vec4 diffuseColor = vec4( 1.0 );
#include <clipping_planes_fragment>
#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 );
}`,PA=`varying vec3 vWorldDirection;
#include <common>
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include <begin_vertex>
#include <project_vertex>
}`,RA=`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>
}`,IA=`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 <morphinstance_vertex>
#include <morphcolor_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#include <fog_vertex>
}`,DA=`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() {
vec4 diffuseColor = vec4( diffuse, opacity );
#include <clipping_planes_fragment>
if ( mod( vLineDistance, totalSize ) > dashSize ) {
discard;
}
vec3 outgoingLight = vec3( 0.0 );
#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>
}`,LA=`#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 <morphinstance_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>
}`,kA=`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() {
vec4 diffuseColor = vec4( diffuse, opacity );
#include <clipping_planes_fragment>
#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>
}`,VA=`#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 <morphinstance_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>
}`,FA=`#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() {
vec4 diffuseColor = vec4( diffuse, opacity );
#include <clipping_planes_fragment>
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>
}`,NA=`#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 <morphinstance_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;
}`,OA=`#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() {
vec4 diffuseColor = vec4( diffuse, opacity );
#include <clipping_planes_fragment>
#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>
}`,UA=`#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 <morphinstance_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
}`,BA=`#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() {
vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );
#include <clipping_planes_fragment>
#include <logdepthbuf_fragment>
#include <normal_fragment_begin>
#include <normal_fragment_maps>
gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );
#ifdef OPAQUE
gl_FragColor.a = 1.0;
#endif
}`,zA=`#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 <morphinstance_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>
}`,HA=`#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() {
vec4 diffuseColor = vec4( diffuse, opacity );
#include <clipping_planes_fragment>
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>
}`,GA=`#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 <morphinstance_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
}`,WA=`#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_DISPERSION
uniform float dispersion;
#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() {
vec4 diffuseColor = vec4( diffuse, opacity );
#include <clipping_planes_fragment>
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>
}`,$A=`#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 <morphinstance_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>
}`,XA=`#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() {
vec4 diffuseColor = vec4( diffuse, opacity );
#include <clipping_planes_fragment>
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>
}`,YA=`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 <morphinstance_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>
}`,qA=`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() {
vec4 diffuseColor = vec4( diffuse, opacity );
#include <clipping_planes_fragment>
vec3 outgoingLight = vec3( 0.0 );
#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>
}`,jA=`#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 <morphinstance_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>
}`,KA=`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>
}`,ZA=`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[ 3 ];
vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );
#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>
}`,JA=`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() {
vec4 diffuseColor = vec4( diffuse, opacity );
#include <clipping_planes_fragment>
vec3 outgoingLight = vec3( 0.0 );
#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>
}`,ct={alphahash_fragment:bT,alphahash_pars_fragment:xT,alphamap_fragment:ST,alphamap_pars_fragment:MT,alphatest_fragment:ET,alphatest_pars_fragment:wT,aomap_fragment:TT,aomap_pars_fragment:CT,batching_pars_vertex:AT,batching_vertex:PT,begin_vertex:RT,beginnormal_vertex:IT,bsdfs:DT,iridescence_fragment:LT,bumpmap_pars_fragment:kT,clipping_planes_fragment:VT,clipping_planes_pars_fragment:FT,clipping_planes_pars_vertex:NT,clipping_planes_vertex:OT,color_fragment:UT,color_pars_fragment:BT,color_pars_vertex:zT,color_vertex:HT,common:GT,cube_uv_reflection_fragment:WT,defaultnormal_vertex:$T,displacementmap_pars_vertex:XT,displacementmap_vertex:YT,emissivemap_fragment:qT,emissivemap_pars_fragment:jT,colorspace_fragment:KT,colorspace_pars_fragment:ZT,envmap_fragment:JT,envmap_common_pars_fragment:QT,envmap_pars_fragment:eC,envmap_pars_vertex:tC,envmap_physical_pars_fragment:fC,envmap_vertex:nC,fog_vertex:iC,fog_pars_vertex:aC,fog_fragment:rC,fog_pars_fragment:sC,gradientmap_pars_fragment:oC,lightmap_pars_fragment:lC,lights_lambert_fragment:uC,lights_lambert_pars_fragment:cC,lights_pars_begin:dC,lights_toon_fragment:hC,lights_toon_pars_fragment:mC,lights_phong_fragment:vC,lights_phong_pars_fragment:gC,lights_physical_fragment:pC,lights_physical_pars_fragment:yC,lights_fragment_begin:_C,lights_fragment_maps:bC,lights_fragment_end:xC,logdepthbuf_fragment:SC,logdepthbuf_pars_fragment:MC,logdepthbuf_pars_vertex:EC,logdepthbuf_vertex:wC,map_fragment:TC,map_pars_fragment:CC,map_particle_fragment:AC,map_particle_pars_fragment:PC,metalnessmap_fragment:RC,metalnessmap_pars_fragment:IC,morphinstance_vertex:DC,morphcolor_vertex:LC,morphnormal_vertex:kC,morphtarget_pars_vertex:VC,morphtarget_vertex:FC,normal_fragment_begin:NC,normal_fragment_maps:OC,normal_pars_fragment:UC,normal_pars_vertex:BC,normal_vertex:zC,normalmap_pars_fragment:HC,clearcoat_normal_fragment_begin:GC,clearcoat_normal_fragment_maps:WC,clearcoat_pars_fragment:$C,iridescence_pars_fragment:XC,opaque_fragment:YC,packing:qC,premultiplied_alpha_fragment:jC,project_vertex:KC,dithering_fragment:ZC,dithering_pars_fragment:JC,roughnessmap_fragment:QC,roughnessmap_pars_fragment:eA,shadowmap_pars_fragment:tA,shadowmap_pars_vertex:nA,shadowmap_vertex:iA,shadowmask_pars_fragment:aA,skinbase_vertex:rA,skinning_pars_vertex:sA,skinning_vertex:oA,skinnormal_vertex:lA,specularmap_fragment:uA,specularmap_pars_fragment:cA,tonemapping_fragment:dA,tonemapping_pars_fragment:fA,transmission_fragment:hA,transmission_pars_fragment:mA,uv_pars_fragment:vA,uv_pars_vertex:gA,uv_vertex:pA,worldpos_vertex:yA,background_vert:_A,background_frag:bA,backgroundCube_vert:xA,backgroundCube_frag:SA,cube_vert:MA,cube_frag:EA,depth_vert:wA,depth_frag:TA,distanceRGBA_vert:CA,distanceRGBA_frag:AA,equirect_vert:PA,equirect_frag:RA,linedashed_vert:IA,linedashed_frag:DA,meshbasic_vert:LA,meshbasic_frag:kA,meshlambert_vert:VA,meshlambert_frag:FA,meshmatcap_vert:NA,meshmatcap_frag:OA,meshnormal_vert:UA,meshnormal_frag:BA,meshphong_vert:zA,meshphong_frag:HA,meshphysical_vert:GA,meshphysical_frag:WA,meshtoon_vert:$A,meshtoon_frag:XA,points_vert:YA,points_frag:qA,shadow_vert:jA,shadow_frag:KA,sprite_vert:ZA,sprite_frag:JA},Ve={common:{diffuse:{value:new xt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new ut},alphaMap:{value:null},alphaMapTransform:{value:new ut},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new ut}},envmap:{envMap:{value:null},envMapRotation:{value:new ut},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new ut}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new ut}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new ut},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new ut},normalScale:{value:new Pt(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new ut},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new ut}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new ut}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new ut}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new xt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new xt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new ut},alphaTest:{value:0},uvTransform:{value:new ut}},sprite:{diffuse:{value:new xt(16777215)},opacity:{value:1},center:{value:new Pt(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new ut},alphaMap:{value:null},alphaMapTransform:{value:new ut},alphaTest:{value:0}}},Ni={basic:{uniforms:kn([Ve.common,Ve.specularmap,Ve.envmap,Ve.aomap,Ve.lightmap,Ve.fog]),vertexShader:ct.meshbasic_vert,fragmentShader:ct.meshbasic_frag},lambert:{uniforms:kn([Ve.common,Ve.specularmap,Ve.envmap,Ve.aomap,Ve.lightmap,Ve.emissivemap,Ve.bumpmap,Ve.normalmap,Ve.displacementmap,Ve.fog,Ve.lights,{emissive:{value:new xt(0)}}]),vertexShader:ct.meshlambert_vert,fragmentShader:ct.meshlambert_frag},phong:{uniforms:kn([Ve.common,Ve.specularmap,Ve.envmap,Ve.aomap,Ve.lightmap,Ve.emissivemap,Ve.bumpmap,Ve.normalmap,Ve.displacementmap,Ve.fog,Ve.lights,{emissive:{value:new xt(0)},specular:{value:new xt(1118481)},shininess:{value:30}}]),vertexShader:ct.meshphong_vert,fragmentShader:ct.meshphong_frag},standard:{uniforms:kn([Ve.common,Ve.envmap,Ve.aomap,Ve.lightmap,Ve.emissivemap,Ve.bumpmap,Ve.normalmap,Ve.displacementmap,Ve.roughnessmap,Ve.metalnessmap,Ve.fog,Ve.lights,{emissive:{value:new xt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ct.meshphysical_vert,fragmentShader:ct.meshphysical_frag},toon:{uniforms:kn([Ve.common,Ve.aomap,Ve.lightmap,Ve.emissivemap,Ve.bumpmap,Ve.normalmap,Ve.displacementmap,Ve.gradientmap,Ve.fog,Ve.lights,{emissive:{value:new xt(0)}}]),vertexShader:ct.meshtoon_vert,fragmentShader:ct.meshtoon_frag},matcap:{uniforms:kn([Ve.common,Ve.bumpmap,Ve.normalmap,Ve.displacementmap,Ve.fog,{matcap:{value:null}}]),vertexShader:ct.meshmatcap_vert,fragmentShader:ct.meshmatcap_frag},points:{uniforms:kn([Ve.points,Ve.fog]),vertexShader:ct.points_vert,fragmentShader:ct.points_frag},dashed:{uniforms:kn([Ve.common,Ve.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ct.linedashed_vert,fragmentShader:ct.linedashed_frag},depth:{uniforms:kn([Ve.common,Ve.displacementmap]),vertexShader:ct.depth_vert,fragmentShader:ct.depth_frag},normal:{uniforms:kn([Ve.common,Ve.bumpmap,Ve.normalmap,Ve.displacementmap,{opacity:{value:1}}]),vertexShader:ct.meshnormal_vert,fragmentShader:ct.meshnormal_frag},sprite:{uniforms:kn([Ve.sprite,Ve.fog]),vertexShader:ct.sprite_vert,fragmentShader:ct.sprite_frag},background:{uniforms:{uvTransform:{value:new ut},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ct.background_vert,fragmentShader:ct.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new ut}},vertexShader:ct.backgroundCube_vert,fragmentShader:ct.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ct.cube_vert,fragmentShader:ct.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ct.equirect_vert,fragmentShader:ct.equirect_frag},distanceRGBA:{uniforms:kn([Ve.common,Ve.displacementmap,{referencePosition:{value:new ce},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ct.distanceRGBA_vert,fragmentShader:ct.distanceRGBA_frag},shadow:{uniforms:kn([Ve.lights,Ve.fog,{color:{value:new xt(0)},opacity:{value:1}}]),vertexShader:ct.shadow_vert,fragmentShader:ct.shadow_frag}};Ni.physical={uniforms:kn([Ni.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new ut},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new ut},clearcoatNormalScale:{value:new Pt(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new ut},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new ut},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new ut},sheen:{value:0},sheenColor:{value:new xt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new ut},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new ut},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new ut},transmissionSamplerSize:{value:new Pt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new ut},attenuationDistance:{value:0},attenuationColor:{value:new xt(0)},specularColor:{value:new xt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new ut},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new ut},anisotropyVector:{value:new Pt},anisotropyMap:{value:null},anisotropyMapTransform:{value:new ut}}]),vertexShader:ct.meshphysical_vert,fragmentShader:ct.meshphysical_frag};const Kl={r:0,b:0,g:0},ur=new ha,QA=new jt;function e1(e,t,n,i,a,r,s){const o=new xt(0);let l=r===!0?0:1,u,c,d=null,f=0,h=null;function g(M){let x=M.isScene===!0?M.background:null;return x&&x.isTexture&&(x=(M.backgroundBlurriness>0?n:t).get(x)),x}function p(M){let x=!1;const C=g(M);C===null?v(o,l):C&&C.isColor&&(v(C,1),x=!0);const T=e.xr.getEnvironmentBlendMode();T==="additive"?i.buffers.color.setClear(0,0,0,1,s):T==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,s),(e.autoClear||x)&&(i.buffers.depth.setTest(!0),i.buffers.depth.setMask(!0),i.buffers.color.setMask(!0),e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil))}function m(M,x){const C=g(x);C&&(C.isCubeTexture||C.mapping===Qu)?(c===void 0&&(c=new sa(new al(1,1,1),new Ga({name:"BackgroundCubeMaterial",uniforms:Hs(Ni.backgroundCube.uniforms),vertexShader:Ni.backgroundCube.vertexShader,fragmentShader:Ni.backgroundCube.fragmentShader,side:Wn,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(T,P,w){this.matrixWorld.copyPosition(w.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),a.update(c)),ur.copy(x.backgroundRotation),ur.x*=-1,ur.y*=-1,ur.z*=-1,C.isCubeTexture&&C.isRenderTargetTexture===!1&&(ur.y*=-1,ur.z*=-1),c.material.uniforms.envMap.value=C,c.material.uniforms.flipEnvMap.value=C.isCubeTexture&&C.isRenderTargetTexture===!1?-1:1,c.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.uniforms.backgroundRotation.value.setFromMatrix4(QA.makeRotationFromEuler(ur)),c.material.toneMapped=bt.getTransfer(C.colorSpace)!==Ct,(d!==C||f!==C.version||h!==e.toneMapping)&&(c.material.needsUpdate=!0,d=C,f=C.version,h=e.toneMapping),c.layers.enableAll(),M.unshift(c,c.geometry,c.material,0,0,null)):C&&C.isTexture&&(u===void 0&&(u=new sa(new ec(2,2),new Ga({name:"BackgroundMaterial",uniforms:Hs(Ni.background.uniforms),vertexShader:Ni.background.vertexShader,fragmentShader:Ni.background.fragmentShader,side:Ha,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),a.update(u)),u.material.uniforms.t2D.value=C,u.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,u.material.toneMapped=bt.getTransfer(C.colorSpace)!==Ct,C.matrixAutoUpdate===!0&&C.updateMatrix(),u.material.uniforms.uvTransform.value.copy(C.matrix),(d!==C||f!==C.version||h!==e.toneMapping)&&(u.material.needsUpdate=!0,d=C,f=C.version,h=e.toneMapping),u.layers.enableAll(),M.unshift(u,u.geometry,u.material,0,0,null))}function v(M,x){M.getRGB(Kl,z_(e)),i.buffers.color.setClear(Kl.r,Kl.g,Kl.b,x,s)}function _(){c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0),u!==void 0&&(u.geometry.dispose(),u.material.dispose(),u=void 0)}return{getClearColor:function(){return o},setClearColor:function(M,x=1){o.set(M),l=x,v(o,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,v(o,l)},render:p,addToRenderList:m,dispose:_}}function t1(e,t){const n=e.getParameter(e.MAX_VERTEX_ATTRIBS),i={},a=f(null);let r=a,s=!1;function o(S,E,R,L,O){let G=!1;const U=d(L,R,E);r!==U&&(r=U,u(r.object)),G=h(S,L,R,O),G&&g(S,L,R,O),O!==null&&t.update(O,e.ELEMENT_ARRAY_BUFFER),(G||s)&&(s=!1,x(S,E,R,L),O!==null&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.get(O).buffer))}function l(){return e.createVertexArray()}function u(S){return e.bindVertexArray(S)}function c(S){return e.deleteVertexArray(S)}function d(S,E,R){const L=R.wireframe===!0;let O=i[S.id];O===void 0&&(O={},i[S.id]=O);let G=O[E.id];G===void 0&&(G={},O[E.id]=G);let U=G[L];return U===void 0&&(U=f(l()),G[L]=U),U}function f(S){const E=[],R=[],L=[];for(let O=0;O<n;O++)E[O]=0,R[O]=0,L[O]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:E,enabledAttributes:R,attributeDivisors:L,object:S,attributes:{},index:null}}function h(S,E,R,L){const O=r.attributes,G=E.attributes;let U=0;const j=R.getAttributes();for(const B in j)if(j[B].location>=0){const W=O[B];let H=G[B];if(H===void 0&&(B==="instanceMatrix"&&S.instanceMatrix&&(H=S.instanceMatrix),B==="instanceColor"&&S.instanceColor&&(H=S.instanceColor)),W===void 0||W.attribute!==H||H&&W.data!==H.data)return!0;U++}return r.attributesNum!==U||r.index!==L}function g(S,E,R,L){const O={},G=E.attributes;let U=0;const j=R.getAttributes();for(const B in j)if(j[B].location>=0){let W=G[B];W===void 0&&(B==="instanceMatrix"&&S.instanceMatrix&&(W=S.instanceMatrix),B==="instanceColor"&&S.instanceColor&&(W=S.instanceColor));const H={};H.attribute=W,W&&W.data&&(H.data=W.data),O[B]=H,U++}r.attributes=O,r.attributesNum=U,r.index=L}function p(){const S=r.newAttributes;for(let E=0,R=S.length;E<R;E++)S[E]=0}function m(S){v(S,0)}function v(S,E){const R=r.newAttributes,L=r.enabledAttributes,O=r.attributeDivisors;R[S]=1,L[S]===0&&(e.enableVertexAttribArray(S),L[S]=1),O[S]!==E&&(e.vertexAttribDivisor(S,E),O[S]=E)}function _(){const S=r.newAttributes,E=r.enabledAttributes;for(let R=0,L=E.length;R<L;R++)E[R]!==S[R]&&(e.disableVertexAttribArray(R),E[R]=0)}function M(S,E,R,L,O,G,U){U===!0?e.vertexAttribIPointer(S,E,R,O,G):e.vertexAttribPointer(S,E,R,L,O,G)}function x(S,E,R,L){p();const O=L.attributes,G=R.getAttributes(),U=E.defaultAttributeValues;for(const j in G){const B=G[j];if(B.location>=0){let X=O[j];if(X===void 0&&(j==="instanceMatrix"&&S.instanceMatrix&&(X=S.instanceMatrix),j==="instanceColor"&&S.instanceColor&&(X=S.instanceColor)),X!==void 0){const W=X.normalized,H=X.itemSize,te=t.get(X);if(te===void 0)continue;const Se=te.buffer,$=te.type,he=te.bytesPerElement,ae=$===e.INT||$===e.UNSIGNED_INT||X.gpuType===Yh;if(X.isInterleavedBufferAttribute){const Q=X.data,ve=Q.stride,Ge=X.offset;if(Q.isInstancedInterleavedBuffer){for(let Ae=0;Ae<B.locationSize;Ae++)v(B.location+Ae,Q.meshPerAttribute);S.isInstancedMesh!==!0&&L._maxInstanceCount===void 0&&(L._maxInstanceCount=Q.meshPerAttribute*Q.count)}else for(let Ae=0;Ae<B.locationSize;Ae++)m(B.location+Ae);e.bindBuffer(e.ARRAY_BUFFER,Se);for(let Ae=0;Ae<B.locationSize;Ae++)M(B.location+Ae,H/B.locationSize,$,W,ve*he,(Ge+H/B.locationSize*Ae)*he,ae)}else{if(X.isInstancedBufferAttribute){for(let Q=0;Q<B.locationSize;Q++)v(B.location+Q,X.meshPerAttribute);S.isInstancedMesh!==!0&&L._maxInstanceCount===void 0&&(L._maxInstanceCount=X.meshPerAttribute*X.count)}else for(let Q=0;Q<B.locationSize;Q++)m(B.location+Q);e.bindBuffer(e.ARRAY_BUFFER,Se);for(let Q=0;Q<B.locationSize;Q++)M(B.location+Q,H/B.locationSize,$,W,H*he,H/B.locationSize*Q*he,ae)}}else if(U!==void 0){const W=U[j];if(W!==void 0)switch(W.length){case 2:e.vertexAttrib2fv(B.location,W);break;case 3:e.vertexAttrib3fv(B.location,W);break;case 4:e.vertexAttrib4fv(B.location,W);break;default:e.vertexAttrib1fv(B.location,W)}}}}_()}function C(){w();for(const S in i){const E=i[S];for(const R in E){const L=E[R];for(const O in L)c(L[O].object),delete L[O];delete E[R]}delete i[S]}}function T(S){if(i[S.id]===void 0)return;const E=i[S.id];for(const R in E){const L=E[R];for(const O in L)c(L[O].object),delete L[O];delete E[R]}delete i[S.id]}function P(S){for(const E in i){const R=i[E];if(R[S.id]===void 0)continue;const L=R[S.id];for(const O in L)c(L[O].object),delete L[O];delete R[S.id]}}function w(){b(),s=!0,r!==a&&(r=a,u(r.object))}function b(){a.geometry=null,a.program=null,a.wireframe=!1}return{setup:o,reset:w,resetDefaultState:b,dispose:C,releaseStatesOfGeometry:T,releaseStatesOfProgram:P,initAttributes:p,enableAttribute:m,disableUnusedAttributes:_}}function n1(e,t,n){let i;function a(u){i=u}function r(u,c){e.drawArrays(i,u,c),n.update(c,i,1)}function s(u,c,d){d!==0&&(e.drawArraysInstanced(i,u,c,d),n.update(c,i,d))}function o(u,c,d){if(d===0)return;t.get("WEBGL_multi_draw").multiDrawArraysWEBGL(i,u,0,c,0,d);let h=0;for(let g=0;g<d;g++)h+=c[g];n.update(h,i,1)}function l(u,c,d,f){if(d===0)return;const h=t.get("WEBGL_multi_draw");if(h===null)for(let g=0;g<u.length;g++)s(u[g],c[g],f[g]);else{h.multiDrawArraysInstancedWEBGL(i,u,0,c,0,f,0,d);let g=0;for(let p=0;p<d;p++)g+=c[p]*f[p];n.update(g,i,1)}}this.setMode=a,this.render=r,this.renderInstances=s,this.renderMultiDraw=o,this.renderMultiDrawInstances=l}function i1(e,t,n,i){let a;function r(){if(a!==void 0)return a;if(t.has("EXT_texture_filter_anisotropic")===!0){const P=t.get("EXT_texture_filter_anisotropic");a=e.getParameter(P.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else a=0;return a}function s(P){return!(P!==wi&&i.convert(P)!==e.getParameter(e.IMPLEMENTATION_COLOR_READ_FORMAT))}function o(P){const w=P===Qo&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(P!==fa&&i.convert(P)!==e.getParameter(e.IMPLEMENTATION_COLOR_READ_TYPE)&&P!==aa&&!w)}function l(P){if(P==="highp"){if(e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";P="mediump"}return P==="mediump"&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let u=n.precision!==void 0?n.precision:"highp";const c=l(u);c!==u&&(console.warn("THREE.WebGLRenderer:",u,"not supported, using",c,"instead."),u=c);const d=n.logarithmicDepthBuffer===!0,f=n.reverseDepthBuffer===!0&&t.has("EXT_clip_control"),h=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),g=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),p=e.getParameter(e.MAX_TEXTURE_SIZE),m=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),v=e.getParameter(e.MAX_VERTEX_ATTRIBS),_=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),M=e.getParameter(e.MAX_VARYING_VECTORS),x=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),C=g>0,T=e.getParameter(e.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:r,getMaxPrecision:l,textureFormatReadable:s,textureTypeReadable:o,precision:u,logarithmicDepthBuffer:d,reverseDepthBuffer:f,maxTextures:h,maxVertexTextures:g,maxTextureSize:p,maxCubemapSize:m,maxAttributes:v,maxVertexUniforms:_,maxVaryings:M,maxFragmentUniforms:x,vertexTextures:C,maxSamples:T}}function a1(e){const t=this;let n=null,i=0,a=!1,r=!1;const s=new vr,o=new ut,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,f){const h=d.length!==0||f||i!==0||a;return a=f,i=d.length,h},this.beginShadows=function(){r=!0,c(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(d,f){n=c(d,f,0)},this.setState=function(d,f,h){const g=d.clippingPlanes,p=d.clipIntersection,m=d.clipShadows,v=e.get(d);if(!a||g===null||g.length===0||r&&!m)r?c(null):u();else{const _=r?0:i,M=_*4;let x=v.clippingState||null;l.value=x,x=c(g,f,M,h);for(let C=0;C!==M;++C)x[C]=n[C];v.clippingState=x,this.numIntersection=p?this.numPlanes:0,this.numPlanes+=_}};function u(){l.value!==n&&(l.value=n,l.needsUpdate=i>0),t.numPlanes=i,t.numIntersection=0}function c(d,f,h,g){const p=d!==null?d.length:0;let m=null;if(p!==0){if(m=l.value,g!==!0||m===null){const v=h+p*4,_=f.matrixWorldInverse;o.getNormalMatrix(_),(m===null||m.length<v)&&(m=new Float32Array(v));for(let M=0,x=h;M!==p;++M,x+=4)s.copy(d[M]).applyMatrix4(_,o),s.normal.toArray(m,x),m[x+3]=s.constant}l.value=m,l.needsUpdate=!0}return t.numPlanes=p,t.numIntersection=0,m}}function r1(e){let t=new WeakMap;function n(s,o){return o===of?s.mapping=Ns:o===lf&&(s.mapping=Os),s}function i(s){if(s&&s.isTexture){const o=s.mapping;if(o===of||o===lf)if(t.has(s)){const l=t.get(s).texture;return n(l,s.mapping)}else{const l=s.image;if(l&&l.height>0){const u=new sT(l.height);return u.fromEquirectangularTexture(e,s),t.set(s,u),s.addEventListener("dispose",a),n(u.texture,s.mapping)}else return null}}return s}function a(s){const o=s.target;o.removeEventListener("dispose",a);const l=t.get(o);l!==void 0&&(t.delete(o),l.dispose())}function r(){t=new WeakMap}return{get:i,dispose:r}}const ws=4,xg=[.125,.215,.35,.446,.526,.582],_r=20,_d=new gT,Sg=new xt;let bd=null,xd=0,Sd=0,Md=!1;const gr=(1+Math.sqrt(5))/2,ys=1/gr,Mg=[new ce(-gr,ys,0),new ce(gr,ys,0),new ce(-ys,0,gr),new ce(ys,0,gr),new ce(0,gr,-ys),new ce(0,gr,ys),new ce(-1,1,-1),new ce(1,1,-1),new ce(-1,1,1),new ce(1,1,1)],s1=new ce;class Eg{constructor(t){this._renderer=t,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(t,n=0,i=.1,a=100,r={}){const{size:s=256,position:o=s1}=r;bd=this._renderer.getRenderTarget(),xd=this._renderer.getActiveCubeFace(),Sd=this._renderer.getActiveMipmapLevel(),Md=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(s);const l=this._allocateTargets();return l.depthBuffer=!0,this._sceneToCubeUV(t,i,a,l,o),n>0&&this._blur(l,0,0,n),this._applyPMREM(l),this._cleanup(l),l}fromEquirectangular(t,n=null){return this._fromTexture(t,n)}fromCubemap(t,n=null){return this._fromTexture(t,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=Cg(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Tg(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let t=0;t<this._lodPlanes.length;t++)this._lodPlanes[t].dispose()}_cleanup(t){this._renderer.setRenderTarget(bd,xd,Sd),this._renderer.xr.enabled=Md,t.scissorTest=!1,Zl(t,0,0,t.width,t.height)}_fromTexture(t,n){t.mapping===Ns||t.mapping===Os?this._setSize(t.image.length===0?16:t.image[0].width||t.image[0].image.width):this._setSize(t.image.width/4),bd=this._renderer.getRenderTarget(),xd=this._renderer.getActiveCubeFace(),Sd=this._renderer.getActiveMipmapLevel(),Md=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const i=n||this._allocateTargets();return this._textureToCubeUV(t,i),this._applyPMREM(i),this._cleanup(i),i}_allocateTargets(){const t=3*Math.max(this._cubeSize,112),n=4*this._cubeSize,i={magFilter:Ui,minFilter:Ui,generateMipmaps:!1,type:Qo,format:wi,colorSpace:zs,depthBuffer:!1},a=wg(t,n,i);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==t||this._pingPongRenderTarget.height!==n){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=wg(t,n,i);const{_lodMax:r}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=o1(r)),this._blurMaterial=l1(r,t,n)}return a}_compileMaterial(t){const n=new sa(this._lodPlanes[0],t);this._renderer.compile(n,_d)}_sceneToCubeUV(t,n,i,a,r){const l=new di(90,1,n,i),u=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,f=d.autoClear,h=d.toneMapping;d.getClearColor(Sg),d.toneMapping=za,d.autoClear=!1;const g=new O_({name:"PMREM.Background",side:Wn,depthWrite:!1,depthTest:!1}),p=new sa(new al,g);let m=!1;const v=t.background;v?v.isColor&&(g.color.copy(v),t.background=null,m=!0):(g.color.copy(Sg),m=!0);for(let _=0;_<6;_++){const M=_%3;M===0?(l.up.set(0,u[_],0),l.position.set(r.x,r.y,r.z),l.lookAt(r.x+c[_],r.y,r.z)):M===1?(l.up.set(0,0,u[_]),l.position.set(r.x,r.y,r.z),l.lookAt(r.x,r.y+c[_],r.z)):(l.up.set(0,u[_],0),l.position.set(r.x,r.y,r.z),l.lookAt(r.x,r.y,r.z+c[_]));const x=this._cubeSize;Zl(a,M*x,_>2?x:0,x,x),d.setRenderTarget(a),m&&d.render(p,l),d.render(t,l)}p.geometry.dispose(),p.material.dispose(),d.toneMapping=h,d.autoClear=f,t.background=v}_textureToCubeUV(t,n){const i=this._renderer,a=t.mapping===Ns||t.mapping===Os;a?(this._cubemapMaterial===null&&(this._cubemapMaterial=Cg()),this._cubemapMaterial.uniforms.flipEnvMap.value=t.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Tg());const r=a?this._cubemapMaterial:this._equirectMaterial,s=new sa(this._lodPlanes[0],r),o=r.uniforms;o.envMap.value=t;const l=this._cubeSize;Zl(n,0,0,3*l,2*l),i.setRenderTarget(n),i.render(s,_d)}_applyPMREM(t){const n=this._renderer,i=n.autoClear;n.autoClear=!1;const a=this._lodPlanes.length;for(let r=1;r<a;r++){const s=Math.sqrt(this._sigmas[r]*this._sigmas[r]-this._sigmas[r-1]*this._sigmas[r-1]),o=Mg[(a-r-1)%Mg.length];this._blur(t,r-1,r,s,o)}n.autoClear=i}_blur(t,n,i,a,r){const s=this._pingPongRenderTarget;this._halfBlur(t,s,n,i,a,"latitudinal",r),this._halfBlur(s,t,i,i,a,"longitudinal",r)}_halfBlur(t,n,i,a,r,s,o){const l=this._renderer,u=this._blurMaterial;s!=="latitudinal"&&s!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const c=3,d=new sa(this._lodPlanes[a],u),f=u.uniforms,h=this._sizeLods[i]-1,g=isFinite(r)?Math.PI/(2*h):2*Math.PI/(2*_r-1),p=r/g,m=isFinite(r)?1+Math.floor(c*p):_r;m>_r&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${_r}`);const v=[];let _=0;for(let P=0;P<_r;++P){const w=P/p,b=Math.exp(-w*w/2);v.push(b),P===0?_+=b:P<m&&(_+=2*b)}for(let P=0;P<v.length;P++)v[P]=v[P]/_;f.envMap.value=t.texture,f.samples.value=m,f.weights.value=v,f.latitudinal.value=s==="latitudinal",o&&(f.poleAxis.value=o);const{_lodMax:M}=this;f.dTheta.value=g,f.mipInt.value=M-i;const x=this._sizeLods[a],C=3*x*(a>M-ws?a-M+ws:0),T=4*(this._cubeSize-x);Zl(n,C,T,3*x,2*x),l.setRenderTarget(n),l.render(d,_d)}}function o1(e){const t=[],n=[],i=[];let a=e;const r=e-ws+1+xg.length;for(let s=0;s<r;s++){const o=Math.pow(2,a);n.push(o);let l=1/o;s>e-ws?l=xg[s-e+ws-1]:s===0&&(l=0),i.push(l);const u=1/(o-2),c=-u,d=1+u,f=[c,c,d,c,d,d,c,c,d,d,c,d],h=6,g=6,p=3,m=2,v=1,_=new Float32Array(p*g*h),M=new Float32Array(m*g*h),x=new Float32Array(v*g*h);for(let T=0;T<h;T++){const P=T%3*2/3-1,w=T>2?0:-1,b=[P,w,0,P+2/3,w,0,P+2/3,w+1,0,P,w,0,P+2/3,w+1,0,P,w+1,0];_.set(b,p*g*T),M.set(f,m*g*T);const S=[T,T,T,T,T,T];x.set(S,v*g*T)}const C=new Ri;C.setAttribute("position",new ti(_,p)),C.setAttribute("uv",new ti(M,m)),C.setAttribute("faceIndex",new ti(x,v)),t.push(C),a>ws&&a--}return{lodPlanes:t,sizeLods:n,sigmas:i}}function wg(e,t,n){const i=new Vr(e,t,n);return i.texture.mapping=Qu,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function Zl(e,t,n,i,a){e.viewport.set(t,n,i,a),e.scissor.set(t,n,i,a)}function l1(e,t,n){const i=new Float32Array(_r),a=new ce(0,1,0);return new Ga({name:"SphericalGaussianBlur",defines:{n:_r,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:a}},vertexShader:nm(),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:Ba,depthTest:!1,depthWrite:!1})}function Tg(){return new Ga({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:nm(),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:Ba,depthTest:!1,depthWrite:!1})}function Cg(){return new Ga({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:nm(),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:Ba,depthTest:!1,depthWrite:!1})}function nm(){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 u1(e){let t=new WeakMap,n=null;function i(o){if(o&&o.isTexture){const l=o.mapping,u=l===of||l===lf,c=l===Ns||l===Os;if(u||c){let d=t.get(o);const f=d!==void 0?d.texture.pmremVersion:0;if(o.isRenderTargetTexture&&o.pmremVersion!==f)return n===null&&(n=new Eg(e)),d=u?n.fromEquirectangular(o,d):n.fromCubemap(o,d),d.texture.pmremVersion=o.pmremVersion,t.set(o,d),d.texture;if(d!==void 0)return d.texture;{const h=o.image;return u&&h&&h.height>0||c&&h&&a(h)?(n===null&&(n=new Eg(e)),d=u?n.fromEquirectangular(o):n.fromCubemap(o),d.texture.pmremVersion=o.pmremVersion,t.set(o,d),o.addEventListener("dispose",r),d.texture):null}}}return o}function a(o){let l=0;const u=6;for(let c=0;c<u;c++)o[c]!==void 0&&l++;return l===u}function r(o){const l=o.target;l.removeEventListener("dispose",r);const u=t.get(l);u!==void 0&&(t.delete(l),u.dispose())}function s(){t=new WeakMap,n!==null&&(n.dispose(),n=null)}return{get:i,dispose:s}}function c1(e){const t={};function n(i){if(t[i]!==void 0)return t[i];let a;switch(i){case"WEBGL_depth_texture":a=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":a=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":a=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":a=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:a=e.getExtension(i)}return t[i]=a,a}return{has:function(i){return n(i)!==null},init:function(){n("EXT_color_buffer_float"),n("WEBGL_clip_cull_distance"),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture"),n("WEBGL_render_shared_exponent")},get:function(i){const a=n(i);return a===null&&mr("THREE.WebGLRenderer: "+i+" extension not supported."),a}}}function d1(e,t,n,i){const a={},r=new WeakMap;function s(d){const f=d.target;f.index!==null&&t.remove(f.index);for(const g in f.attributes)t.remove(f.attributes[g]);f.removeEventListener("dispose",s),delete a[f.id];const h=r.get(f);h&&(t.remove(h),r.delete(f)),i.releaseStatesOfGeometry(f),f.isInstancedBufferGeometry===!0&&delete f._maxInstanceCount,n.memory.geometries--}function o(d,f){return a[f.id]===!0||(f.addEventListener("dispose",s),a[f.id]=!0,n.memory.geometries++),f}function l(d){const f=d.attributes;for(const h in f)t.update(f[h],e.ARRAY_BUFFER)}function u(d){const f=[],h=d.index,g=d.attributes.position;let p=0;if(h!==null){const _=h.array;p=h.version;for(let M=0,x=_.length;M<x;M+=3){const C=_[M+0],T=_[M+1],P=_[M+2];f.push(C,T,T,P,P,C)}}else if(g!==void 0){const _=g.array;p=g.version;for(let M=0,x=_.length/3-1;M<x;M+=3){const C=M+0,T=M+1,P=M+2;f.push(C,T,T,P,P,C)}}else return;const m=new(k_(f)?B_:U_)(f,1);m.version=p;const v=r.get(d);v&&t.remove(v),r.set(d,m)}function c(d){const f=r.get(d);if(f){const h=d.index;h!==null&&f.version<h.version&&u(d)}else u(d);return r.get(d)}return{get:o,update:l,getWireframeAttribute:c}}function f1(e,t,n){let i;function a(f){i=f}let r,s;function o(f){r=f.type,s=f.bytesPerElement}function l(f,h){e.drawElements(i,h,r,f*s),n.update(h,i,1)}function u(f,h,g){g!==0&&(e.drawElementsInstanced(i,h,r,f*s,g),n.update(h,i,g))}function c(f,h,g){if(g===0)return;t.get("WEBGL_multi_draw").multiDrawElementsWEBGL(i,h,0,r,f,0,g);let m=0;for(let v=0;v<g;v++)m+=h[v];n.update(m,i,1)}function d(f,h,g,p){if(g===0)return;const m=t.get("WEBGL_multi_draw");if(m===null)for(let v=0;v<f.length;v++)u(f[v]/s,h[v],p[v]);else{m.multiDrawElementsInstancedWEBGL(i,h,0,r,f,0,p,0,g);let v=0;for(let _=0;_<g;_++)v+=h[_]*p[_];n.update(v,i,1)}}this.setMode=a,this.setIndex=o,this.render=l,this.renderInstances=u,this.renderMultiDraw=c,this.renderMultiDrawInstances=d}function h1(e){const t={geometries:0,textures:0},n={frame:0,calls:0,triangles:0,points:0,lines:0};function i(r,s,o){switch(n.calls++,s){case e.TRIANGLES:n.triangles+=o*(r/3);break;case e.LINES:n.lines+=o*(r/2);break;case e.LINE_STRIP:n.lines+=o*(r-1);break;case e.LINE_LOOP:n.lines+=o*r;break;case e.POINTS:n.points+=o*r;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",s);break}}function a(){n.calls=0,n.triangles=0,n.points=0,n.lines=0}return{memory:t,render:n,programs:null,autoReset:!0,reset:a,update:i}}function m1(e,t,n){const i=new WeakMap,a=new Jt;function r(s,o,l){const u=s.morphTargetInfluences,c=o.morphAttributes.position||o.morphAttributes.normal||o.morphAttributes.color,d=c!==void 0?c.length:0;let f=i.get(o);if(f===void 0||f.count!==d){let b=function(){P.dispose(),i.delete(o),o.removeEventListener("dispose",b)};f!==void 0&&f.texture.dispose();const h=o.morphAttributes.position!==void 0,g=o.morphAttributes.normal!==void 0,p=o.morphAttributes.color!==void 0,m=o.morphAttributes.position||[],v=o.morphAttributes.normal||[],_=o.morphAttributes.color||[];let M=0;h===!0&&(M=1),g===!0&&(M=2),p===!0&&(M=3);let x=o.attributes.position.count*M,C=1;x>t.maxTextureSize&&(C=Math.ceil(x/t.maxTextureSize),x=t.maxTextureSize);const T=new Float32Array(x*C*4*d),P=new V_(T,x,C,d);P.type=aa,P.needsUpdate=!0;const w=M*4;for(let S=0;S<d;S++){const E=m[S],R=v[S],L=_[S],O=x*C*4*S;for(let G=0;G<E.count;G++){const U=G*w;h===!0&&(a.fromBufferAttribute(E,G),T[O+U+0]=a.x,T[O+U+1]=a.y,T[O+U+2]=a.z,T[O+U+3]=0),g===!0&&(a.fromBufferAttribute(R,G),T[O+U+4]=a.x,T[O+U+5]=a.y,T[O+U+6]=a.z,T[O+U+7]=0),p===!0&&(a.fromBufferAttribute(L,G),T[O+U+8]=a.x,T[O+U+9]=a.y,T[O+U+10]=a.z,T[O+U+11]=L.itemSize===4?a.w:1)}}f={count:d,texture:P,size:new Pt(x,C)},i.set(o,f),o.addEventListener("dispose",b)}if(s.isInstancedMesh===!0&&s.morphTexture!==null)l.getUniforms().setValue(e,"morphTexture",s.morphTexture,n);else{let h=0;for(let p=0;p<u.length;p++)h+=u[p];const g=o.morphTargetsRelative?1:1-h;l.getUniforms().setValue(e,"morphTargetBaseInfluence",g),l.getUniforms().setValue(e,"morphTargetInfluences",u)}l.getUniforms().setValue(e,"morphTargetsTexture",f.texture,n),l.getUniforms().setValue(e,"morphTargetsTextureSize",f.size)}return{update:r}}function v1(e,t,n,i){let a=new WeakMap;function r(l){const u=i.render.frame,c=l.geometry,d=t.get(l,c);if(a.get(d)!==u&&(t.update(d),a.set(d,u)),l.isInstancedMesh&&(l.hasEventListener("dispose",o)===!1&&l.addEventListener("dispose",o),a.get(l)!==u&&(n.update(l.instanceMatrix,e.ARRAY_BUFFER),l.instanceColor!==null&&n.update(l.instanceColor,e.ARRAY_BUFFER),a.set(l,u))),l.isSkinnedMesh){const f=l.skeleton;a.get(f)!==u&&(f.update(),a.set(f,u))}return d}function s(){a=new WeakMap}function o(l){const u=l.target;u.removeEventListener("dispose",o),n.remove(u.instanceMatrix),u.instanceColor!==null&&n.remove(u.instanceColor)}return{update:r,dispose:s}}const j_=new $n,Ag=new Y_(1,1),K_=new V_,Z_=new Gw,J_=new G_,Pg=[],Rg=[],Ig=new Float32Array(16),Dg=new Float32Array(9),Lg=new Float32Array(4);function Js(e,t,n){const i=e[0];if(i<=0||i>0)return e;const a=t*n;let r=Pg[a];if(r===void 0&&(r=new Float32Array(a),Pg[a]=r),t!==0){i.toArray(r,0);for(let s=1,o=0;s!==t;++s)o+=n,e[s].toArray(r,o)}return r}function un(e,t){if(e.length!==t.length)return!1;for(let n=0,i=e.length;n<i;n++)if(e[n]!==t[n])return!1;return!0}function cn(e,t){for(let n=0,i=t.length;n<i;n++)e[n]=t[n]}function tc(e,t){let n=Rg[t];n===void 0&&(n=new Int32Array(t),Rg[t]=n);for(let i=0;i!==t;++i)n[i]=e.allocateTextureUnit();return n}function g1(e,t){const n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function p1(e,t){const n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y)&&(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(un(n,t))return;e.uniform2fv(this.addr,t),cn(n,t)}}function y1(e,t){const n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z)&&(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(t.r!==void 0)(n[0]!==t.r||n[1]!==t.g||n[2]!==t.b)&&(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(un(n,t))return;e.uniform3fv(this.addr,t),cn(n,t)}}function _1(e,t){const n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z||n[3]!==t.w)&&(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(un(n,t))return;e.uniform4fv(this.addr,t),cn(n,t)}}function b1(e,t){const n=this.cache,i=t.elements;if(i===void 0){if(un(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),cn(n,t)}else{if(un(n,i))return;Lg.set(i),e.uniformMatrix2fv(this.addr,!1,Lg),cn(n,i)}}function x1(e,t){const n=this.cache,i=t.elements;if(i===void 0){if(un(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),cn(n,t)}else{if(un(n,i))return;Dg.set(i),e.uniformMatrix3fv(this.addr,!1,Dg),cn(n,i)}}function S1(e,t){const n=this.cache,i=t.elements;if(i===void 0){if(un(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),cn(n,t)}else{if(un(n,i))return;Ig.set(i),e.uniformMatrix4fv(this.addr,!1,Ig),cn(n,i)}}function M1(e,t){const n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function E1(e,t){const n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y)&&(e.uniform2i(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(un(n,t))return;e.uniform2iv(this.addr,t),cn(n,t)}}function w1(e,t){const n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z)&&(e.uniform3i(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(un(n,t))return;e.uniform3iv(this.addr,t),cn(n,t)}}function T1(e,t){const n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z||n[3]!==t.w)&&(e.uniform4i(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(un(n,t))return;e.uniform4iv(this.addr,t),cn(n,t)}}function C1(e,t){const n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function A1(e,t){const n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y)&&(e.uniform2ui(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(un(n,t))return;e.uniform2uiv(this.addr,t),cn(n,t)}}function P1(e,t){const n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z)&&(e.uniform3ui(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(un(n,t))return;e.uniform3uiv(this.addr,t),cn(n,t)}}function R1(e,t){const n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z||n[3]!==t.w)&&(e.uniform4ui(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(un(n,t))return;e.uniform4uiv(this.addr,t),cn(n,t)}}function I1(e,t,n){const i=this.cache,a=n.allocateTextureUnit();i[0]!==a&&(e.uniform1i(this.addr,a),i[0]=a);let r;this.type===e.SAMPLER_2D_SHADOW?(Ag.compareFunction=L_,r=Ag):r=j_,n.setTexture2D(t||r,a)}function D1(e,t,n){const i=this.cache,a=n.allocateTextureUnit();i[0]!==a&&(e.uniform1i(this.addr,a),i[0]=a),n.setTexture3D(t||Z_,a)}function L1(e,t,n){const i=this.cache,a=n.allocateTextureUnit();i[0]!==a&&(e.uniform1i(this.addr,a),i[0]=a),n.setTextureCube(t||J_,a)}function k1(e,t,n){const i=this.cache,a=n.allocateTextureUnit();i[0]!==a&&(e.uniform1i(this.addr,a),i[0]=a),n.setTexture2DArray(t||K_,a)}function V1(e){switch(e){case 5126:return g1;case 35664:return p1;case 35665:return y1;case 35666:return _1;case 35674:return b1;case 35675:return x1;case 35676:return S1;case 5124:case 35670:return M1;case 35667:case 35671:return E1;case 35668:case 35672:return w1;case 35669:case 35673:return T1;case 5125:return C1;case 36294:return A1;case 36295:return P1;case 36296:return R1;case 35678:case 36198:case 36298:case 36306:case 35682:return I1;case 35679:case 36299:case 36307:return D1;case 35680:case 36300:case 36308:case 36293:return L1;case 36289:case 36303:case 36311:case 36292:return k1}}function F1(e,t){e.uniform1fv(this.addr,t)}function N1(e,t){const n=Js(t,this.size,2);e.uniform2fv(this.addr,n)}function O1(e,t){const n=Js(t,this.size,3);e.uniform3fv(this.addr,n)}function U1(e,t){const n=Js(t,this.size,4);e.uniform4fv(this.addr,n)}function B1(e,t){const n=Js(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function z1(e,t){const n=Js(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function H1(e,t){const n=Js(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function G1(e,t){e.uniform1iv(this.addr,t)}function W1(e,t){e.uniform2iv(this.addr,t)}function $1(e,t){e.uniform3iv(this.addr,t)}function X1(e,t){e.uniform4iv(this.addr,t)}function Y1(e,t){e.uniform1uiv(this.addr,t)}function q1(e,t){e.uniform2uiv(this.addr,t)}function j1(e,t){e.uniform3uiv(this.addr,t)}function K1(e,t){e.uniform4uiv(this.addr,t)}function Z1(e,t,n){const i=this.cache,a=t.length,r=tc(n,a);un(i,r)||(e.uniform1iv(this.addr,r),cn(i,r));for(let s=0;s!==a;++s)n.setTexture2D(t[s]||j_,r[s])}function J1(e,t,n){const i=this.cache,a=t.length,r=tc(n,a);un(i,r)||(e.uniform1iv(this.addr,r),cn(i,r));for(let s=0;s!==a;++s)n.setTexture3D(t[s]||Z_,r[s])}function Q1(e,t,n){const i=this.cache,a=t.length,r=tc(n,a);un(i,r)||(e.uniform1iv(this.addr,r),cn(i,r));for(let s=0;s!==a;++s)n.setTextureCube(t[s]||J_,r[s])}function eP(e,t,n){const i=this.cache,a=t.length,r=tc(n,a);un(i,r)||(e.uniform1iv(this.addr,r),cn(i,r));for(let s=0;s!==a;++s)n.setTexture2DArray(t[s]||K_,r[s])}function tP(e){switch(e){case 5126:return F1;case 35664:return N1;case 35665:return O1;case 35666:return U1;case 35674:return B1;case 35675:return z1;case 35676:return H1;case 5124:case 35670:return G1;case 35667:case 35671:return W1;case 35668:case 35672:return $1;case 35669:case 35673:return X1;case 5125:return Y1;case 36294:return q1;case 36295:return j1;case 36296:return K1;case 35678:case 36198:case 36298:case 36306:case 35682:return Z1;case 35679:case 36299:case 36307:return J1;case 35680:case 36300:case 36308:case 36293:return Q1;case 36289:case 36303:case 36311:case 36292:return eP}}class nP{constructor(t,n,i){this.id=t,this.addr=i,this.cache=[],this.type=n.type,this.setValue=V1(n.type)}}class iP{constructor(t,n,i){this.id=t,this.addr=i,this.cache=[],this.type=n.type,this.size=n.size,this.setValue=tP(n.type)}}class aP{constructor(t){this.id=t,this.seq=[],this.map={}}setValue(t,n,i){const a=this.seq;for(let r=0,s=a.length;r!==s;++r){const o=a[r];o.setValue(t,n[o.id],i)}}}const Ed=/(\w+)(\])?(\[|\.)?/g;function kg(e,t){e.seq.push(t),e.map[t.id]=t}function rP(e,t,n){const i=e.name,a=i.length;for(Ed.lastIndex=0;;){const r=Ed.exec(i),s=Ed.lastIndex;let o=r[1];const l=r[2]==="]",u=r[3];if(l&&(o=o|0),u===void 0||u==="["&&s+2===a){kg(n,u===void 0?new nP(o,e,t):new iP(o,e,t));break}else{let d=n.map[o];d===void 0&&(d=new aP(o),kg(n,d)),n=d}}}class vu{constructor(t,n){this.seq=[],this.map={};const i=t.getProgramParameter(n,t.ACTIVE_UNIFORMS);for(let a=0;a<i;++a){const r=t.getActiveUniform(n,a),s=t.getUniformLocation(n,r.name);rP(r,s,this)}}setValue(t,n,i,a){const r=this.map[n];r!==void 0&&r.setValue(t,i,a)}setOptional(t,n,i){const a=n[i];a!==void 0&&this.setValue(t,i,a)}static upload(t,n,i,a){for(let r=0,s=n.length;r!==s;++r){const o=n[r],l=i[o.id];l.needsUpdate!==!1&&o.setValue(t,l.value,a)}}static seqWithValue(t,n){const i=[];for(let a=0,r=t.length;a!==r;++a){const s=t[a];s.id in n&&i.push(s)}return i}}function Vg(e,t,n){const i=e.createShader(t);return e.shaderSource(i,n),e.compileShader(i),i}const sP=37297;let oP=0;function lP(e,t){const n=e.split(`
`),i=[],a=Math.max(t-6,0),r=Math.min(t+6,n.length);for(let s=a;s<r;s++){const o=s+1;i.push(`${o===t?">":" "} ${o}: ${n[s]}`)}return i.join(`
`)}const Fg=new ut;function uP(e){bt._getMatrix(Fg,bt.workingColorSpace,e);const t=`mat3( ${Fg.elements.map(n=>n.toFixed(4))} )`;switch(bt.getTransfer(e)){case Ru:return[t,"LinearTransferOETF"];case Ct:return[t,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",e),[t,"LinearTransferOETF"]}}function Ng(e,t,n){const i=e.getShaderParameter(t,e.COMPILE_STATUS),a=e.getShaderInfoLog(t).trim();if(i&&a==="")return"";const r=/ERROR: 0:(\d+)/.exec(a);if(r){const s=parseInt(r[1]);return n.toUpperCase()+`
`+a+`
`+lP(e.getShaderSource(t),s)}else return a}function cP(e,t){const n=uP(t);return[`vec4 ${e}( vec4 value ) {`,` return ${n[1]}( vec4( value.rgb * ${n[0]}, value.a ) );`,"}"].join(`
`)}function dP(e,t){let n;switch(t){case mw:n="Linear";break;case vw:n="Reinhard";break;case gw:n="Cineon";break;case pw:n="ACESFilmic";break;case _w:n="AgX";break;case bw:n="Neutral";break;case yw:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}const Jl=new ce;function fP(){bt.getLuminanceCoefficients(Jl);const e=Jl.x.toFixed(4),t=Jl.y.toFixed(4),n=Jl.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${e}, ${t}, ${n} );`," return dot( weights, rgb );","}"].join(`
`)}function hP(e){return[e.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",e.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(_o).join(`
`)}function mP(e){const t=[];for(const n in e){const i=e[n];i!==!1&&t.push("#define "+n+" "+i)}return t.join(`
`)}function vP(e,t){const n={},i=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let a=0;a<i;a++){const r=e.getActiveAttrib(t,a),s=r.name;let o=1;r.type===e.FLOAT_MAT2&&(o=2),r.type===e.FLOAT_MAT3&&(o=3),r.type===e.FLOAT_MAT4&&(o=4),n[s]={type:r.type,location:e.getAttribLocation(t,s),locationSize:o}}return n}function _o(e){return e!==""}function Og(e,t){const n=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function Ug(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const gP=/^[ \t]*#include +<([\w\d./]+)>/gm;function Uf(e){return e.replace(gP,yP)}const pP=new Map;function yP(e,t){let n=ct[t];if(n===void 0){const i=pP.get(t);if(i!==void 0)n=ct[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,i);else throw new Error("Can not resolve #include <"+t+">")}return Uf(n)}const _P=/#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 Bg(e){return e.replace(_P,bP)}function bP(e,t,n,i){let a="";for(let r=parseInt(t);r<parseInt(n);r++)a+=i.replace(/\[\s*i\s*\]/g,"[ "+r+" ]").replace(/UNROLLED_LOOP_INDEX/g,r);return a}function zg(e){let t=`precision ${e.precision} float;
precision ${e.precision} int;
precision ${e.precision} sampler2D;
precision ${e.precision} samplerCube;
precision ${e.precision} sampler3D;
precision ${e.precision} sampler2DArray;
precision ${e.precision} sampler2DShadow;
precision ${e.precision} samplerCubeShadow;
precision ${e.precision} sampler2DArrayShadow;
precision ${e.precision} isampler2D;
precision ${e.precision} isampler3D;
precision ${e.precision} isamplerCube;
precision ${e.precision} isampler2DArray;
precision ${e.precision} usampler2D;
precision ${e.precision} usampler3D;
precision ${e.precision} usamplerCube;
precision ${e.precision} usampler2DArray;
`;return e.precision==="highp"?t+=`
#define HIGH_PRECISION`:e.precision==="mediump"?t+=`
#define MEDIUM_PRECISION`:e.precision==="lowp"&&(t+=`
#define LOW_PRECISION`),t}function xP(e){let t="SHADOWMAP_TYPE_BASIC";return e.shadowMapType===b_?t="SHADOWMAP_TYPE_PCF":e.shadowMapType===YE?t="SHADOWMAP_TYPE_PCF_SOFT":e.shadowMapType===Qi&&(t="SHADOWMAP_TYPE_VSM"),t}function SP(e){let t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case Ns:case Os:t="ENVMAP_TYPE_CUBE";break;case Qu:t="ENVMAP_TYPE_CUBE_UV";break}return t}function MP(e){let t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case Os:t="ENVMAP_MODE_REFRACTION";break}return t}function EP(e){let t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case x_:t="ENVMAP_BLENDING_MULTIPLY";break;case fw:t="ENVMAP_BLENDING_MIX";break;case hw:t="ENVMAP_BLENDING_ADD";break}return t}function wP(e){const t=e.envMapCubeUVHeight;if(t===null)return null;const n=Math.log2(t)-2,i=1/t;return{texelWidth:1/(3*Math.max(Math.pow(2,n),7*16)),texelHeight:i,maxMip:n}}function TP(e,t,n,i){const a=e.getContext(),r=n.defines;let s=n.vertexShader,o=n.fragmentShader;const l=xP(n),u=SP(n),c=MP(n),d=EP(n),f=wP(n),h=hP(n),g=mP(r),p=a.createProgram();let m,v,_=n.glslVersion?"#version "+n.glslVersion+`
`:"";n.isRawShaderMaterial?(m=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,g].filter(_o).join(`
`),m.length>0&&(m+=`
`),v=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,g].filter(_o).join(`
`),v.length>0&&(v+=`
`)):(m=[zg(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,g,n.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.batchingColor?"#define USE_BATCHING_COLOR":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.instancingMorph?"#define USE_INSTANCING_MORPH":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.morphColors?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",`
`].filter(_o).join(`
`),v=[zg(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.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.envMap?"#define "+c:"",n.envMap?"#define "+d:"",f?"#define CUBEUV_TEXEL_WIDTH "+f.texelWidth:"",f?"#define CUBEUV_TEXEL_HEIGHT "+f.texelHeight:"",f?"#define CUBEUV_MAX_MIP "+f.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.dispersion?"#define USE_DISPERSION":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor||n.batchingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==za?"#define TONE_MAPPING":"",n.toneMapping!==za?ct.tonemapping_pars_fragment:"",n.toneMapping!==za?dP("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",ct.colorspace_pars_fragment,cP("linearToOutputTexel",n.outputColorSpace),fP(),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",`
`].filter(_o).join(`
`)),s=Uf(s),s=Og(s,n),s=Ug(s,n),o=Uf(o),o=Og(o,n),o=Ug(o,n),s=Bg(s),o=Bg(o),n.isRawShaderMaterial!==!0&&(_=`#version 300 es
`,m=[h,"#define attribute in","#define varying out","#define texture2D texture"].join(`
`)+`
`+m,v=["#define varying in",n.glslVersion===Kv?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===Kv?"":"#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(`
`)+`
`+v);const M=_+m+s,x=_+v+o,C=Vg(a,a.VERTEX_SHADER,M),T=Vg(a,a.FRAGMENT_SHADER,x);a.attachShader(p,C),a.attachShader(p,T),n.index0AttributeName!==void 0?a.bindAttribLocation(p,0,n.index0AttributeName):n.morphTargets===!0&&a.bindAttribLocation(p,0,"position"),a.linkProgram(p);function P(E){if(e.debug.checkShaderErrors){const R=a.getProgramInfoLog(p).trim(),L=a.getShaderInfoLog(C).trim(),O=a.getShaderInfoLog(T).trim();let G=!0,U=!0;if(a.getProgramParameter(p,a.LINK_STATUS)===!1)if(G=!1,typeof e.debug.onShaderError=="function")e.debug.onShaderError(a,p,C,T);else{const j=Ng(a,C,"vertex"),B=Ng(a,T,"fragment");console.error("THREE.WebGLProgram: Shader Error "+a.getError()+" - VALIDATE_STATUS "+a.getProgramParameter(p,a.VALIDATE_STATUS)+`
Material Name: `+E.name+`
Material Type: `+E.type+`
Program Info Log: `+R+`
`+j+`
`+B)}else R!==""?console.warn("THREE.WebGLProgram: Program Info Log:",R):(L===""||O==="")&&(U=!1);U&&(E.diagnostics={runnable:G,programLog:R,vertexShader:{log:L,prefix:m},fragmentShader:{log:O,prefix:v}})}a.deleteShader(C),a.deleteShader(T),w=new vu(a,p),b=vP(a,p)}let w;this.getUniforms=function(){return w===void 0&&P(this),w};let b;this.getAttributes=function(){return b===void 0&&P(this),b};let S=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return S===!1&&(S=a.getProgramParameter(p,sP)),S},this.destroy=function(){i.releaseStatesOfProgram(this),a.deleteProgram(p),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=oP++,this.cacheKey=t,this.usedTimes=1,this.program=p,this.vertexShader=C,this.fragmentShader=T,this}let CP=0;class AP{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){const n=t.vertexShader,i=t.fragmentShader,a=this._getShaderStage(n),r=this._getShaderStage(i),s=this._getShaderCacheForMaterial(t);return s.has(a)===!1&&(s.add(a),a.usedTimes++),s.has(r)===!1&&(s.add(r),r.usedTimes++),this}remove(t){const n=this.materialCache.get(t);for(const i of n)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){const n=this.materialCache;let i=n.get(t);return i===void 0&&(i=new Set,n.set(t,i)),i}_getShaderStage(t){const n=this.shaderCache;let i=n.get(t);return i===void 0&&(i=new PP(t),n.set(t,i)),i}}class PP{constructor(t){this.id=CP++,this.code=t,this.usedTimes=0}}function RP(e,t,n,i,a,r,s){const o=new F_,l=new AP,u=new Set,c=[],d=a.logarithmicDepthBuffer,f=a.vertexTextures;let h=a.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 p(b){return u.add(b),b===0?"uv":`uv${b}`}function m(b,S,E,R,L){const O=R.fog,G=L.geometry,U=b.isMeshStandardMaterial?R.environment:null,j=(b.isMeshStandardMaterial?n:t).get(b.envMap||U),B=j&&j.mapping===Qu?j.image.height:null,X=g[b.type];b.precision!==null&&(h=a.getMaxPrecision(b.precision),h!==b.precision&&console.warn("THREE.WebGLProgram.getParameters:",b.precision,"not supported, using",h,"instead."));const W=G.morphAttributes.position||G.morphAttributes.normal||G.morphAttributes.color,H=W!==void 0?W.length:0;let te=0;G.morphAttributes.position!==void 0&&(te=1),G.morphAttributes.normal!==void 0&&(te=2),G.morphAttributes.color!==void 0&&(te=3);let Se,$,he,ae;if(X){const Tt=Ni[X];Se=Tt.vertexShader,$=Tt.fragmentShader}else Se=b.vertexShader,$=b.fragmentShader,l.update(b),he=l.getVertexShaderID(b),ae=l.getFragmentShaderID(b);const Q=e.getRenderTarget(),ve=e.state.buffers.depth.getReversed(),Ge=L.isInstancedMesh===!0,Ae=L.isBatchedMesh===!0,be=!!b.map,N=!!b.matcap,V=!!j,I=!!b.aoMap,re=!!b.lightMap,q=!!b.bumpMap,Z=!!b.normalMap,oe=!!b.displacementMap,xe=!!b.emissiveMap,ie=!!b.metalnessMap,k=!!b.roughnessMap,D=b.anisotropy>0,z=b.clearcoat>0,ne=b.dispersion>0,ue=b.iridescence>0,le=b.sheen>0,De=b.transmission>0,we=D&&!!b.anisotropyMap,Le=z&&!!b.clearcoatMap,Qe=z&&!!b.clearcoatNormalMap,Ce=z&&!!b.clearcoatRoughnessMap,Fe=ue&&!!b.iridescenceMap,qe=ue&&!!b.iridescenceThicknessMap,et=le&&!!b.sheenColorMap,ke=le&&!!b.sheenRoughnessMap,nt=!!b.specularMap,st=!!b.specularColorMap,It=!!b.specularIntensityMap,K=De&&!!b.transmissionMap,Oe=De&&!!b.thicknessMap,ye=!!b.gradientMap,Ee=!!b.alphaMap,ze=b.alphaTest>0,Be=!!b.alphaHash,lt=!!b.extensions;let Xt=za;b.toneMapped&&(Q===null||Q.isXRRenderTarget===!0)&&(Xt=e.toneMapping);const Mn={shaderID:X,shaderType:b.type,shaderName:b.name,vertexShader:Se,fragmentShader:$,defines:b.defines,customVertexShaderID:he,customFragmentShaderID:ae,isRawShaderMaterial:b.isRawShaderMaterial===!0,glslVersion:b.glslVersion,precision:h,batching:Ae,batchingColor:Ae&&L._colorsTexture!==null,instancing:Ge,instancingColor:Ge&&L.instanceColor!==null,instancingMorph:Ge&&L.morphTexture!==null,supportsVertexTextures:f,outputColorSpace:Q===null?e.outputColorSpace:Q.isXRRenderTarget===!0?Q.texture.colorSpace:zs,alphaToCoverage:!!b.alphaToCoverage,map:be,matcap:N,envMap:V,envMapMode:V&&j.mapping,envMapCubeUVHeight:B,aoMap:I,lightMap:re,bumpMap:q,normalMap:Z,displacementMap:f&&oe,emissiveMap:xe,normalMapObjectSpace:Z&&b.normalMapType===ww,normalMapTangentSpace:Z&&b.normalMapType===Ew,metalnessMap:ie,roughnessMap:k,anisotropy:D,anisotropyMap:we,clearcoat:z,clearcoatMap:Le,clearcoatNormalMap:Qe,clearcoatRoughnessMap:Ce,dispersion:ne,iridescence:ue,iridescenceMap:Fe,iridescenceThicknessMap:qe,sheen:le,sheenColorMap:et,sheenRoughnessMap:ke,specularMap:nt,specularColorMap:st,specularIntensityMap:It,transmission:De,transmissionMap:K,thicknessMap:Oe,gradientMap:ye,opaque:b.transparent===!1&&b.blending===Ds&&b.alphaToCoverage===!1,alphaMap:Ee,alphaTest:ze,alphaHash:Be,combine:b.combine,mapUv:be&&p(b.map.channel),aoMapUv:I&&p(b.aoMap.channel),lightMapUv:re&&p(b.lightMap.channel),bumpMapUv:q&&p(b.bumpMap.channel),normalMapUv:Z&&p(b.normalMap.channel),displacementMapUv:oe&&p(b.displacementMap.channel),emissiveMapUv:xe&&p(b.emissiveMap.channel),metalnessMapUv:ie&&p(b.metalnessMap.channel),roughnessMapUv:k&&p(b.roughnessMap.channel),anisotropyMapUv:we&&p(b.anisotropyMap.channel),clearcoatMapUv:Le&&p(b.clearcoatMap.channel),clearcoatNormalMapUv:Qe&&p(b.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ce&&p(b.clearcoatRoughnessMap.channel),iridescenceMapUv:Fe&&p(b.iridescenceMap.channel),iridescenceThicknessMapUv:qe&&p(b.iridescenceThicknessMap.channel),sheenColorMapUv:et&&p(b.sheenColorMap.channel),sheenRoughnessMapUv:ke&&p(b.sheenRoughnessMap.channel),specularMapUv:nt&&p(b.specularMap.channel),specularColorMapUv:st&&p(b.specularColorMap.channel),specularIntensityMapUv:It&&p(b.specularIntensityMap.channel),transmissionMapUv:K&&p(b.transmissionMap.channel),thicknessMapUv:Oe&&p(b.thicknessMap.channel),alphaMapUv:Ee&&p(b.alphaMap.channel),vertexTangents:!!G.attributes.tangent&&(Z||D),vertexColors:b.vertexColors,vertexAlphas:b.vertexColors===!0&&!!G.attributes.color&&G.attributes.color.itemSize===4,pointsUvs:L.isPoints===!0&&!!G.attributes.uv&&(be||Ee),fog:!!O,useFog:b.fog===!0,fogExp2:!!O&&O.isFogExp2,flatShading:b.flatShading===!0,sizeAttenuation:b.sizeAttenuation===!0,logarithmicDepthBuffer:d,reverseDepthBuffer:ve,skinning:L.isSkinnedMesh===!0,morphTargets:G.morphAttributes.position!==void 0,morphNormals:G.morphAttributes.normal!==void 0,morphColors:G.morphAttributes.color!==void 0,morphTargetsCount:H,morphTextureStride:te,numDirLights:S.directional.length,numPointLights:S.point.length,numSpotLights:S.spot.length,numSpotLightMaps:S.spotLightMap.length,numRectAreaLights:S.rectArea.length,numHemiLights:S.hemi.length,numDirLightShadows:S.directionalShadowMap.length,numPointLightShadows:S.pointShadowMap.length,numSpotLightShadows:S.spotShadowMap.length,numSpotLightShadowsWithMaps:S.numSpotLightShadowsWithMaps,numLightProbes:S.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:b.dithering,shadowMapEnabled:e.shadowMap.enabled&&E.length>0,shadowMapType:e.shadowMap.type,toneMapping:Xt,decodeVideoTexture:be&&b.map.isVideoTexture===!0&&bt.getTransfer(b.map.colorSpace)===Ct,decodeVideoTextureEmissive:xe&&b.emissiveMap.isVideoTexture===!0&&bt.getTransfer(b.emissiveMap.colorSpace)===Ct,premultipliedAlpha:b.premultipliedAlpha,doubleSided:b.side===ia,flipSided:b.side===Wn,useDepthPacking:b.depthPacking>=0,depthPacking:b.depthPacking||0,index0AttributeName:b.index0AttributeName,extensionClipCullDistance:lt&&b.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(lt&&b.extensions.multiDraw===!0||Ae)&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:b.customProgramCacheKey()};return Mn.vertexUv1s=u.has(1),Mn.vertexUv2s=u.has(2),Mn.vertexUv3s=u.has(3),u.clear(),Mn}function v(b){const S=[];if(b.shaderID?S.push(b.shaderID):(S.push(b.customVertexShaderID),S.push(b.customFragmentShaderID)),b.defines!==void 0)for(const E in b.defines)S.push(E),S.push(b.defines[E]);return b.isRawShaderMaterial===!1&&(_(S,b),M(S,b),S.push(e.outputColorSpace)),S.push(b.customProgramCacheKey),S.join()}function _(b,S){b.push(S.precision),b.push(S.outputColorSpace),b.push(S.envMapMode),b.push(S.envMapCubeUVHeight),b.push(S.mapUv),b.push(S.alphaMapUv),b.push(S.lightMapUv),b.push(S.aoMapUv),b.push(S.bumpMapUv),b.push(S.normalMapUv),b.push(S.displacementMapUv),b.push(S.emissiveMapUv),b.push(S.metalnessMapUv),b.push(S.roughnessMapUv),b.push(S.anisotropyMapUv),b.push(S.clearcoatMapUv),b.push(S.clearcoatNormalMapUv),b.push(S.clearcoatRoughnessMapUv),b.push(S.iridescenceMapUv),b.push(S.iridescenceThicknessMapUv),b.push(S.sheenColorMapUv),b.push(S.sheenRoughnessMapUv),b.push(S.specularMapUv),b.push(S.specularColorMapUv),b.push(S.specularIntensityMapUv),b.push(S.transmissionMapUv),b.push(S.thicknessMapUv),b.push(S.combine),b.push(S.fogExp2),b.push(S.sizeAttenuation),b.push(S.morphTargetsCount),b.push(S.morphAttributeCount),b.push(S.numDirLights),b.push(S.numPointLights),b.push(S.numSpotLights),b.push(S.numSpotLightMaps),b.push(S.numHemiLights),b.push(S.numRectAreaLights),b.push(S.numDirLightShadows),b.push(S.numPointLightShadows),b.push(S.numSpotLightShadows),b.push(S.numSpotLightShadowsWithMaps),b.push(S.numLightProbes),b.push(S.shadowMapType),b.push(S.toneMapping),b.push(S.numClippingPlanes),b.push(S.numClipIntersection),b.push(S.depthPacking)}function M(b,S){o.disableAll(),S.supportsVertexTextures&&o.enable(0),S.instancing&&o.enable(1),S.instancingColor&&o.enable(2),S.instancingMorph&&o.enable(3),S.matcap&&o.enable(4),S.envMap&&o.enable(5),S.normalMapObjectSpace&&o.enable(6),S.normalMapTangentSpace&&o.enable(7),S.clearcoat&&o.enable(8),S.iridescence&&o.enable(9),S.alphaTest&&o.enable(10),S.vertexColors&&o.enable(11),S.vertexAlphas&&o.enable(12),S.vertexUv1s&&o.enable(13),S.vertexUv2s&&o.enable(14),S.vertexUv3s&&o.enable(15),S.vertexTangents&&o.enable(16),S.anisotropy&&o.enable(17),S.alphaHash&&o.enable(18),S.batching&&o.enable(19),S.dispersion&&o.enable(20),S.batchingColor&&o.enable(21),b.push(o.mask),o.disableAll(),S.fog&&o.enable(0),S.useFog&&o.enable(1),S.flatShading&&o.enable(2),S.logarithmicDepthBuffer&&o.enable(3),S.reverseDepthBuffer&&o.enable(4),S.skinning&&o.enable(5),S.morphTargets&&o.enable(6),S.morphNormals&&o.enable(7),S.morphColors&&o.enable(8),S.premultipliedAlpha&&o.enable(9),S.shadowMapEnabled&&o.enable(10),S.doubleSided&&o.enable(11),S.flipSided&&o.enable(12),S.useDepthPacking&&o.enable(13),S.dithering&&o.enable(14),S.transmission&&o.enable(15),S.sheen&&o.enable(16),S.opaque&&o.enable(17),S.pointsUvs&&o.enable(18),S.decodeVideoTexture&&o.enable(19),S.decodeVideoTextureEmissive&&o.enable(20),S.alphaToCoverage&&o.enable(21),b.push(o.mask)}function x(b){const S=g[b.type];let E;if(S){const R=Ni[S];E=nT.clone(R.uniforms)}else E=b.uniforms;return E}function C(b,S){let E;for(let R=0,L=c.length;R<L;R++){const O=c[R];if(O.cacheKey===S){E=O,++E.usedTimes;break}}return E===void 0&&(E=new TP(e,S,b,r),c.push(E)),E}function T(b){if(--b.usedTimes===0){const S=c.indexOf(b);c[S]=c[c.length-1],c.pop(),b.destroy()}}function P(b){l.remove(b)}function w(){l.dispose()}return{getParameters:m,getProgramCacheKey:v,getUniforms:x,acquireProgram:C,releaseProgram:T,releaseShaderCache:P,programs:c,dispose:w}}function IP(){let e=new WeakMap;function t(s){return e.has(s)}function n(s){let o=e.get(s);return o===void 0&&(o={},e.set(s,o)),o}function i(s){e.delete(s)}function a(s,o,l){e.get(s)[o]=l}function r(){e=new WeakMap}return{has:t,get:n,remove:i,update:a,dispose:r}}function DP(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function Hg(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function Gg(){const e=[];let t=0;const n=[],i=[],a=[];function r(){t=0,n.length=0,i.length=0,a.length=0}function s(d,f,h,g,p,m){let v=e[t];return v===void 0?(v={id:d.id,object:d,geometry:f,material:h,groupOrder:g,renderOrder:d.renderOrder,z:p,group:m},e[t]=v):(v.id=d.id,v.object=d,v.geometry=f,v.material=h,v.groupOrder=g,v.renderOrder=d.renderOrder,v.z=p,v.group=m),t++,v}function o(d,f,h,g,p,m){const v=s(d,f,h,g,p,m);h.transmission>0?i.push(v):h.transparent===!0?a.push(v):n.push(v)}function l(d,f,h,g,p,m){const v=s(d,f,h,g,p,m);h.transmission>0?i.unshift(v):h.transparent===!0?a.unshift(v):n.unshift(v)}function u(d,f){n.length>1&&n.sort(d||DP),i.length>1&&i.sort(f||Hg),a.length>1&&a.sort(f||Hg)}function c(){for(let d=t,f=e.length;d<f;d++){const h=e[d];if(h.id===null)break;h.id=null,h.object=null,h.geometry=null,h.material=null,h.group=null}}return{opaque:n,transmissive:i,transparent:a,init:r,push:o,unshift:l,finish:c,sort:u}}function LP(){let e=new WeakMap;function t(i,a){const r=e.get(i);let s;return r===void 0?(s=new Gg,e.set(i,[s])):a>=r.length?(s=new Gg,r.push(s)):s=r[a],s}function n(){e=new WeakMap}return{get:t,dispose:n}}function kP(){const e={};return{get:function(t){if(e[t.id]!==void 0)return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new ce,color:new xt};break;case"SpotLight":n={position:new ce,direction:new ce,color:new xt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new ce,color:new xt,distance:0,decay:0};break;case"HemisphereLight":n={direction:new ce,skyColor:new xt,groundColor:new xt};break;case"RectAreaLight":n={color:new xt,position:new ce,halfWidth:new ce,halfHeight:new ce};break}return e[t.id]=n,n}}}function VP(){const e={};return{get:function(t){if(e[t.id]!==void 0)return e[t.id];let n;switch(t.type){case"DirectionalLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Pt};break;case"SpotLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Pt};break;case"PointLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Pt,shadowCameraNear:1,shadowCameraFar:1e3};break}return e[t.id]=n,n}}}let FP=0;function NP(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function OP(e){const t=new kP,n=VP(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let u=0;u<9;u++)i.probe.push(new ce);const a=new ce,r=new jt,s=new jt;function o(u){let c=0,d=0,f=0;for(let b=0;b<9;b++)i.probe[b].set(0,0,0);let h=0,g=0,p=0,m=0,v=0,_=0,M=0,x=0,C=0,T=0,P=0;u.sort(NP);for(let b=0,S=u.length;b<S;b++){const E=u[b],R=E.color,L=E.intensity,O=E.distance,G=E.shadow&&E.shadow.map?E.shadow.map.texture:null;if(E.isAmbientLight)c+=R.r*L,d+=R.g*L,f+=R.b*L;else if(E.isLightProbe){for(let U=0;U<9;U++)i.probe[U].addScaledVector(E.sh.coefficients[U],L);P++}else if(E.isDirectionalLight){const U=t.get(E);if(U.color.copy(E.color).multiplyScalar(E.intensity),E.castShadow){const j=E.shadow,B=n.get(E);B.shadowIntensity=j.intensity,B.shadowBias=j.bias,B.shadowNormalBias=j.normalBias,B.shadowRadius=j.radius,B.shadowMapSize=j.mapSize,i.directionalShadow[h]=B,i.directionalShadowMap[h]=G,i.directionalShadowMatrix[h]=E.shadow.matrix,_++}i.directional[h]=U,h++}else if(E.isSpotLight){const U=t.get(E);U.position.setFromMatrixPosition(E.matrixWorld),U.color.copy(R).multiplyScalar(L),U.distance=O,U.coneCos=Math.cos(E.angle),U.penumbraCos=Math.cos(E.angle*(1-E.penumbra)),U.decay=E.decay,i.spot[p]=U;const j=E.shadow;if(E.map&&(i.spotLightMap[C]=E.map,C++,j.updateMatrices(E),E.castShadow&&T++),i.spotLightMatrix[p]=j.matrix,E.castShadow){const B=n.get(E);B.shadowIntensity=j.intensity,B.shadowBias=j.bias,B.shadowNormalBias=j.normalBias,B.shadowRadius=j.radius,B.shadowMapSize=j.mapSize,i.spotShadow[p]=B,i.spotShadowMap[p]=G,x++}p++}else if(E.isRectAreaLight){const U=t.get(E);U.color.copy(R).multiplyScalar(L),U.halfWidth.set(E.width*.5,0,0),U.halfHeight.set(0,E.height*.5,0),i.rectArea[m]=U,m++}else if(E.isPointLight){const U=t.get(E);if(U.color.copy(E.color).multiplyScalar(E.intensity),U.distance=E.distance,U.decay=E.decay,E.castShadow){const j=E.shadow,B=n.get(E);B.shadowIntensity=j.intensity,B.shadowBias=j.bias,B.shadowNormalBias=j.normalBias,B.shadowRadius=j.radius,B.shadowMapSize=j.mapSize,B.shadowCameraNear=j.camera.near,B.shadowCameraFar=j.camera.far,i.pointShadow[g]=B,i.pointShadowMap[g]=G,i.pointShadowMatrix[g]=E.shadow.matrix,M++}i.point[g]=U,g++}else if(E.isHemisphereLight){const U=t.get(E);U.skyColor.copy(E.color).multiplyScalar(L),U.groundColor.copy(E.groundColor).multiplyScalar(L),i.hemi[v]=U,v++}}m>0&&(e.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=Ve.LTC_FLOAT_1,i.rectAreaLTC2=Ve.LTC_FLOAT_2):(i.rectAreaLTC1=Ve.LTC_HALF_1,i.rectAreaLTC2=Ve.LTC_HALF_2)),i.ambient[0]=c,i.ambient[1]=d,i.ambient[2]=f;const w=i.hash;(w.directionalLength!==h||w.pointLength!==g||w.spotLength!==p||w.rectAreaLength!==m||w.hemiLength!==v||w.numDirectionalShadows!==_||w.numPointShadows!==M||w.numSpotShadows!==x||w.numSpotMaps!==C||w.numLightProbes!==P)&&(i.directional.length=h,i.spot.length=p,i.rectArea.length=m,i.point.length=g,i.hemi.length=v,i.directionalShadow.length=_,i.directionalShadowMap.length=_,i.pointShadow.length=M,i.pointShadowMap.length=M,i.spotShadow.length=x,i.spotShadowMap.length=x,i.directionalShadowMatrix.length=_,i.pointShadowMatrix.length=M,i.spotLightMatrix.length=x+C-T,i.spotLightMap.length=C,i.numSpotLightShadowsWithMaps=T,i.numLightProbes=P,w.directionalLength=h,w.pointLength=g,w.spotLength=p,w.rectAreaLength=m,w.hemiLength=v,w.numDirectionalShadows=_,w.numPointShadows=M,w.numSpotShadows=x,w.numSpotMaps=C,w.numLightProbes=P,i.version=FP++)}function l(u,c){let d=0,f=0,h=0,g=0,p=0;const m=c.matrixWorldInverse;for(let v=0,_=u.length;v<_;v++){const M=u[v];if(M.isDirectionalLight){const x=i.directional[d];x.direction.setFromMatrixPosition(M.matrixWorld),a.setFromMatrixPosition(M.target.matrixWorld),x.direction.sub(a),x.direction.transformDirection(m),d++}else if(M.isSpotLight){const x=i.spot[h];x.position.setFromMatrixPosition(M.matrixWorld),x.position.applyMatrix4(m),x.direction.setFromMatrixPosition(M.matrixWorld),a.setFromMatrixPosition(M.target.matrixWorld),x.direction.sub(a),x.direction.transformDirection(m),h++}else if(M.isRectAreaLight){const x=i.rectArea[g];x.position.setFromMatrixPosition(M.matrixWorld),x.position.applyMatrix4(m),s.identity(),r.copy(M.matrixWorld),r.premultiply(m),s.extractRotation(r),x.halfWidth.set(M.width*.5,0,0),x.halfHeight.set(0,M.height*.5,0),x.halfWidth.applyMatrix4(s),x.halfHeight.applyMatrix4(s),g++}else if(M.isPointLight){const x=i.point[f];x.position.setFromMatrixPosition(M.matrixWorld),x.position.applyMatrix4(m),f++}else if(M.isHemisphereLight){const x=i.hemi[p];x.direction.setFromMatrixPosition(M.matrixWorld),x.direction.transformDirection(m),p++}}}return{setup:o,setupView:l,state:i}}function Wg(e){const t=new OP(e),n=[],i=[];function a(c){u.camera=c,n.length=0,i.length=0}function r(c){n.push(c)}function s(c){i.push(c)}function o(){t.setup(n)}function l(c){t.setupView(n,c)}const u={lightsArray:n,shadowsArray:i,camera:null,lights:t,transmissionRenderTarget:{}};return{init:a,state:u,setupLights:o,setupLightsView:l,pushLight:r,pushShadow:s}}function UP(e){let t=new WeakMap;function n(a,r=0){const s=t.get(a);let o;return s===void 0?(o=new Wg(e),t.set(a,[o])):r>=s.length?(o=new Wg(e),s.push(o)):o=s[r],o}function i(){t=new WeakMap}return{get:n,dispose:i}}const BP=`void main() {
gl_Position = vec4( position, 1.0 );
}`,zP=`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 HP(e,t,n){let i=new W_;const a=new Pt,r=new Pt,s=new Jt,o=new mT({depthPacking:Mw}),l=new vT,u={},c=n.maxTextureSize,d={[Ha]:Wn,[Wn]:Ha,[ia]:ia},f=new Ga({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Pt},radius:{value:4}},vertexShader:BP,fragmentShader:zP}),h=f.clone();h.defines.HORIZONTAL_PASS=1;const g=new Ri;g.setAttribute("position",new ti(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const p=new sa(g,f),m=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=b_;let v=this.type;this.render=function(T,P,w){if(m.enabled===!1||m.autoUpdate===!1&&m.needsUpdate===!1||T.length===0)return;const b=e.getRenderTarget(),S=e.getActiveCubeFace(),E=e.getActiveMipmapLevel(),R=e.state;R.setBlending(Ba),R.buffers.color.setClear(1,1,1,1),R.buffers.depth.setTest(!0),R.setScissorTest(!1);const L=v!==Qi&&this.type===Qi,O=v===Qi&&this.type!==Qi;for(let G=0,U=T.length;G<U;G++){const j=T[G],B=j.shadow;if(B===void 0){console.warn("THREE.WebGLShadowMap:",j,"has no shadow.");continue}if(B.autoUpdate===!1&&B.needsUpdate===!1)continue;a.copy(B.mapSize);const X=B.getFrameExtents();if(a.multiply(X),r.copy(B.mapSize),(a.x>c||a.y>c)&&(a.x>c&&(r.x=Math.floor(c/X.x),a.x=r.x*X.x,B.mapSize.x=r.x),a.y>c&&(r.y=Math.floor(c/X.y),a.y=r.y*X.y,B.mapSize.y=r.y)),B.map===null||L===!0||O===!0){const H=this.type!==Qi?{minFilter:Ai,magFilter:Ai}:{};B.map!==null&&B.map.dispose(),B.map=new Vr(a.x,a.y,H),B.map.texture.name=j.name+".shadowMap",B.camera.updateProjectionMatrix()}e.setRenderTarget(B.map),e.clear();const W=B.getViewportCount();for(let H=0;H<W;H++){const te=B.getViewport(H);s.set(r.x*te.x,r.y*te.y,r.x*te.z,r.y*te.w),R.viewport(s),B.updateMatrices(j,H),i=B.getFrustum(),x(P,w,B.camera,j,this.type)}B.isPointLightShadow!==!0&&this.type===Qi&&_(B,w),B.needsUpdate=!1}v=this.type,m.needsUpdate=!1,e.setRenderTarget(b,S,E)};function _(T,P){const w=t.update(p);f.defines.VSM_SAMPLES!==T.blurSamples&&(f.defines.VSM_SAMPLES=T.blurSamples,h.defines.VSM_SAMPLES=T.blurSamples,f.needsUpdate=!0,h.needsUpdate=!0),T.mapPass===null&&(T.mapPass=new Vr(a.x,a.y)),f.uniforms.shadow_pass.value=T.map.texture,f.uniforms.resolution.value=T.mapSize,f.uniforms.radius.value=T.radius,e.setRenderTarget(T.mapPass),e.clear(),e.renderBufferDirect(P,null,w,f,p,null),h.uniforms.shadow_pass.value=T.mapPass.texture,h.uniforms.resolution.value=T.mapSize,h.uniforms.radius.value=T.radius,e.setRenderTarget(T.map),e.clear(),e.renderBufferDirect(P,null,w,h,p,null)}function M(T,P,w,b){let S=null;const E=w.isPointLight===!0?T.customDistanceMaterial:T.customDepthMaterial;if(E!==void 0)S=E;else if(S=w.isPointLight===!0?l:o,e.localClippingEnabled&&P.clipShadows===!0&&Array.isArray(P.clippingPlanes)&&P.clippingPlanes.length!==0||P.displacementMap&&P.displacementScale!==0||P.alphaMap&&P.alphaTest>0||P.map&&P.alphaTest>0){const R=S.uuid,L=P.uuid;let O=u[R];O===void 0&&(O={},u[R]=O);let G=O[L];G===void 0&&(G=S.clone(),O[L]=G,P.addEventListener("dispose",C)),S=G}if(S.visible=P.visible,S.wireframe=P.wireframe,b===Qi?S.side=P.shadowSide!==null?P.shadowSide:P.side:S.side=P.shadowSide!==null?P.shadowSide:d[P.side],S.alphaMap=P.alphaMap,S.alphaTest=P.alphaTest,S.map=P.map,S.clipShadows=P.clipShadows,S.clippingPlanes=P.clippingPlanes,S.clipIntersection=P.clipIntersection,S.displacementMap=P.displacementMap,S.displacementScale=P.displacementScale,S.displacementBias=P.displacementBias,S.wireframeLinewidth=P.wireframeLinewidth,S.linewidth=P.linewidth,w.isPointLight===!0&&S.isMeshDistanceMaterial===!0){const R=e.properties.get(S);R.light=w}return S}function x(T,P,w,b,S){if(T.visible===!1)return;if(T.layers.test(P.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&S===Qi)&&(!T.frustumCulled||i.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(w.matrixWorldInverse,T.matrixWorld);const L=t.update(T),O=T.material;if(Array.isArray(O)){const G=L.groups;for(let U=0,j=G.length;U<j;U++){const B=G[U],X=O[B.materialIndex];if(X&&X.visible){const W=M(T,X,b,S);T.onBeforeShadow(e,T,P,w,L,W,B),e.renderBufferDirect(w,null,L,W,T,B),T.onAfterShadow(e,T,P,w,L,W,B)}}}else if(O.visible){const G=M(T,O,b,S);T.onBeforeShadow(e,T,P,w,L,G,null),e.renderBufferDirect(w,null,L,G,T,null),T.onAfterShadow(e,T,P,w,L,G,null)}}const R=T.children;for(let L=0,O=R.length;L<O;L++)x(R[L],P,w,b,S)}function C(T){T.target.removeEventListener("dispose",C);for(const w in u){const b=u[w],S=T.target.uuid;S in b&&(b[S].dispose(),delete b[S])}}}const GP={[Qd]:ef,[tf]:rf,[nf]:sf,[Fs]:af,[ef]:Qd,[rf]:tf,[sf]:nf,[af]:Fs};function WP(e,t){function n(){let K=!1;const Oe=new Jt;let ye=null;const Ee=new Jt(0,0,0,0);return{setMask:function(ze){ye!==ze&&!K&&(e.colorMask(ze,ze,ze,ze),ye=ze)},setLocked:function(ze){K=ze},setClear:function(ze,Be,lt,Xt,Mn){Mn===!0&&(ze*=Xt,Be*=Xt,lt*=Xt),Oe.set(ze,Be,lt,Xt),Ee.equals(Oe)===!1&&(e.clearColor(ze,Be,lt,Xt),Ee.copy(Oe))},reset:function(){K=!1,ye=null,Ee.set(-1,0,0,0)}}}function i(){let K=!1,Oe=!1,ye=null,Ee=null,ze=null;return{setReversed:function(Be){if(Oe!==Be){const lt=t.get("EXT_clip_control");Oe?lt.clipControlEXT(lt.LOWER_LEFT_EXT,lt.ZERO_TO_ONE_EXT):lt.clipControlEXT(lt.LOWER_LEFT_EXT,lt.NEGATIVE_ONE_TO_ONE_EXT);const Xt=ze;ze=null,this.setClear(Xt)}Oe=Be},getReversed:function(){return Oe},setTest:function(Be){Be?Q(e.DEPTH_TEST):ve(e.DEPTH_TEST)},setMask:function(Be){ye!==Be&&!K&&(e.depthMask(Be),ye=Be)},setFunc:function(Be){if(Oe&&(Be=GP[Be]),Ee!==Be){switch(Be){case Qd:e.depthFunc(e.NEVER);break;case ef:e.depthFunc(e.ALWAYS);break;case tf:e.depthFunc(e.LESS);break;case Fs:e.depthFunc(e.LEQUAL);break;case nf:e.depthFunc(e.EQUAL);break;case af:e.depthFunc(e.GEQUAL);break;case rf:e.depthFunc(e.GREATER);break;case sf:e.depthFunc(e.NOTEQUAL);break;default:e.depthFunc(e.LEQUAL)}Ee=Be}},setLocked:function(Be){K=Be},setClear:function(Be){ze!==Be&&(Oe&&(Be=1-Be),e.clearDepth(Be),ze=Be)},reset:function(){K=!1,ye=null,Ee=null,ze=null,Oe=!1}}}function a(){let K=!1,Oe=null,ye=null,Ee=null,ze=null,Be=null,lt=null,Xt=null,Mn=null;return{setTest:function(Tt){K||(Tt?Q(e.STENCIL_TEST):ve(e.STENCIL_TEST))},setMask:function(Tt){Oe!==Tt&&!K&&(e.stencilMask(Tt),Oe=Tt)},setFunc:function(Tt,_i,Xi){(ye!==Tt||Ee!==_i||ze!==Xi)&&(e.stencilFunc(Tt,_i,Xi),ye=Tt,Ee=_i,ze=Xi)},setOp:function(Tt,_i,Xi){(Be!==Tt||lt!==_i||Xt!==Xi)&&(e.stencilOp(Tt,_i,Xi),Be=Tt,lt=_i,Xt=Xi)},setLocked:function(Tt){K=Tt},setClear:function(Tt){Mn!==Tt&&(e.clearStencil(Tt),Mn=Tt)},reset:function(){K=!1,Oe=null,ye=null,Ee=null,ze=null,Be=null,lt=null,Xt=null,Mn=null}}}const r=new n,s=new i,o=new a,l=new WeakMap,u=new WeakMap;let c={},d={},f=new WeakMap,h=[],g=null,p=!1,m=null,v=null,_=null,M=null,x=null,C=null,T=null,P=new xt(0,0,0),w=0,b=!1,S=null,E=null,R=null,L=null,O=null;const G=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let U=!1,j=0;const B=e.getParameter(e.VERSION);B.indexOf("WebGL")!==-1?(j=parseFloat(/^WebGL (\d)/.exec(B)[1]),U=j>=1):B.indexOf("OpenGL ES")!==-1&&(j=parseFloat(/^OpenGL ES (\d)/.exec(B)[1]),U=j>=2);let X=null,W={};const H=e.getParameter(e.SCISSOR_BOX),te=e.getParameter(e.VIEWPORT),Se=new Jt().fromArray(H),$=new Jt().fromArray(te);function he(K,Oe,ye,Ee){const ze=new Uint8Array(4),Be=e.createTexture();e.bindTexture(K,Be),e.texParameteri(K,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(K,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let lt=0;lt<ye;lt++)K===e.TEXTURE_3D||K===e.TEXTURE_2D_ARRAY?e.texImage3D(Oe,0,e.RGBA,1,1,Ee,0,e.RGBA,e.UNSIGNED_BYTE,ze):e.texImage2D(Oe+lt,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,ze);return Be}const ae={};ae[e.TEXTURE_2D]=he(e.TEXTURE_2D,e.TEXTURE_2D,1),ae[e.TEXTURE_CUBE_MAP]=he(e.TEXTURE_CUBE_MAP,e.TEXTURE_CUBE_MAP_POSITIVE_X,6),ae[e.TEXTURE_2D_ARRAY]=he(e.TEXTURE_2D_ARRAY,e.TEXTURE_2D_ARRAY,1,1),ae[e.TEXTURE_3D]=he(e.TEXTURE_3D,e.TEXTURE_3D,1,1),r.setClear(0,0,0,1),s.setClear(1),o.setClear(0),Q(e.DEPTH_TEST),s.setFunc(Fs),q(!1),Z($v),Q(e.CULL_FACE),I(Ba);function Q(K){c[K]!==!0&&(e.enable(K),c[K]=!0)}function ve(K){c[K]!==!1&&(e.disable(K),c[K]=!1)}function Ge(K,Oe){return d[K]!==Oe?(e.bindFramebuffer(K,Oe),d[K]=Oe,K===e.DRAW_FRAMEBUFFER&&(d[e.FRAMEBUFFER]=Oe),K===e.FRAMEBUFFER&&(d[e.DRAW_FRAMEBUFFER]=Oe),!0):!1}function Ae(K,Oe){let ye=h,Ee=!1;if(K){ye=f.get(Oe),ye===void 0&&(ye=[],f.set(Oe,ye));const ze=K.textures;if(ye.length!==ze.length||ye[0]!==e.COLOR_ATTACHMENT0){for(let Be=0,lt=ze.length;Be<lt;Be++)ye[Be]=e.COLOR_ATTACHMENT0+Be;ye.length=ze.length,Ee=!0}}else ye[0]!==e.BACK&&(ye[0]=e.BACK,Ee=!0);Ee&&e.drawBuffers(ye)}function be(K){return g!==K?(e.useProgram(K),g=K,!0):!1}const N={[yr]:e.FUNC_ADD,[jE]:e.FUNC_SUBTRACT,[KE]:e.FUNC_REVERSE_SUBTRACT};N[ZE]=e.MIN,N[JE]=e.MAX;const V={[QE]:e.ZERO,[ew]:e.ONE,[tw]:e.SRC_COLOR,[Zd]:e.SRC_ALPHA,[ow]:e.SRC_ALPHA_SATURATE,[rw]:e.DST_COLOR,[iw]:e.DST_ALPHA,[nw]:e.ONE_MINUS_SRC_COLOR,[Jd]:e.ONE_MINUS_SRC_ALPHA,[sw]:e.ONE_MINUS_DST_COLOR,[aw]:e.ONE_MINUS_DST_ALPHA,[lw]:e.CONSTANT_COLOR,[uw]:e.ONE_MINUS_CONSTANT_COLOR,[cw]:e.CONSTANT_ALPHA,[dw]:e.ONE_MINUS_CONSTANT_ALPHA};function I(K,Oe,ye,Ee,ze,Be,lt,Xt,Mn,Tt){if(K===Ba){p===!0&&(ve(e.BLEND),p=!1);return}if(p===!1&&(Q(e.BLEND),p=!0),K!==qE){if(K!==m||Tt!==b){if((v!==yr||x!==yr)&&(e.blendEquation(e.FUNC_ADD),v=yr,x=yr),Tt)switch(K){case Ds:e.blendFuncSeparate(e.ONE,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case Pu:e.blendFunc(e.ONE,e.ONE);break;case Xv:e.blendFuncSeparate(e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ZERO,e.ONE);break;case Yv:e.blendFuncSeparate(e.ZERO,e.SRC_COLOR,e.ZERO,e.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",K);break}else switch(K){case Ds:e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case Pu:e.blendFunc(e.SRC_ALPHA,e.ONE);break;case Xv:e.blendFuncSeparate(e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ZERO,e.ONE);break;case Yv:e.blendFunc(e.ZERO,e.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",K);break}_=null,M=null,C=null,T=null,P.set(0,0,0),w=0,m=K,b=Tt}return}ze=ze||Oe,Be=Be||ye,lt=lt||Ee,(Oe!==v||ze!==x)&&(e.blendEquationSeparate(N[Oe],N[ze]),v=Oe,x=ze),(ye!==_||Ee!==M||Be!==C||lt!==T)&&(e.blendFuncSeparate(V[ye],V[Ee],V[Be],V[lt]),_=ye,M=Ee,C=Be,T=lt),(Xt.equals(P)===!1||Mn!==w)&&(e.blendColor(Xt.r,Xt.g,Xt.b,Mn),P.copy(Xt),w=Mn),m=K,b=!1}function re(K,Oe){K.side===ia?ve(e.CULL_FACE):Q(e.CULL_FACE);let ye=K.side===Wn;Oe&&(ye=!ye),q(ye),K.blending===Ds&&K.transparent===!1?I(Ba):I(K.blending,K.blendEquation,K.blendSrc,K.blendDst,K.blendEquationAlpha,K.blendSrcAlpha,K.blendDstAlpha,K.blendColor,K.blendAlpha,K.premultipliedAlpha),s.setFunc(K.depthFunc),s.setTest(K.depthTest),s.setMask(K.depthWrite),r.setMask(K.colorWrite);const Ee=K.stencilWrite;o.setTest(Ee),Ee&&(o.setMask(K.stencilWriteMask),o.setFunc(K.stencilFunc,K.stencilRef,K.stencilFuncMask),o.setOp(K.stencilFail,K.stencilZFail,K.stencilZPass)),xe(K.polygonOffset,K.polygonOffsetFactor,K.polygonOffsetUnits),K.alphaToCoverage===!0?Q(e.SAMPLE_ALPHA_TO_COVERAGE):ve(e.SAMPLE_ALPHA_TO_COVERAGE)}function q(K){S!==K&&(K?e.frontFace(e.CW):e.frontFace(e.CCW),S=K)}function Z(K){K!==$E?(Q(e.CULL_FACE),K!==E&&(K===$v?e.cullFace(e.BACK):K===XE?e.cullFace(e.FRONT):e.cullFace(e.FRONT_AND_BACK))):ve(e.CULL_FACE),E=K}function oe(K){K!==R&&(U&&e.lineWidth(K),R=K)}function xe(K,Oe,ye){K?(Q(e.POLYGON_OFFSET_FILL),(L!==Oe||O!==ye)&&(e.polygonOffset(Oe,ye),L=Oe,O=ye)):ve(e.POLYGON_OFFSET_FILL)}function ie(K){K?Q(e.SCISSOR_TEST):ve(e.SCISSOR_TEST)}function k(K){K===void 0&&(K=e.TEXTURE0+G-1),X!==K&&(e.activeTexture(K),X=K)}function D(K,Oe,ye){ye===void 0&&(X===null?ye=e.TEXTURE0+G-1:ye=X);let Ee=W[ye];Ee===void 0&&(Ee={type:void 0,texture:void 0},W[ye]=Ee),(Ee.type!==K||Ee.texture!==Oe)&&(X!==ye&&(e.activeTexture(ye),X=ye),e.bindTexture(K,Oe||ae[K]),Ee.type=K,Ee.texture=Oe)}function z(){const K=W[X];K!==void 0&&K.type!==void 0&&(e.bindTexture(K.type,null),K.type=void 0,K.texture=void 0)}function ne(){try{e.compressedTexImage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function ue(){try{e.compressedTexImage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function le(){try{e.texSubImage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function De(){try{e.texSubImage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function we(){try{e.compressedTexSubImage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function Le(){try{e.compressedTexSubImage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function Qe(){try{e.texStorage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function Ce(){try{e.texStorage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function Fe(){try{e.texImage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function qe(){try{e.texImage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function et(K){Se.equals(K)===!1&&(e.scissor(K.x,K.y,K.z,K.w),Se.copy(K))}function ke(K){$.equals(K)===!1&&(e.viewport(K.x,K.y,K.z,K.w),$.copy(K))}function nt(K,Oe){let ye=u.get(Oe);ye===void 0&&(ye=new WeakMap,u.set(Oe,ye));let Ee=ye.get(K);Ee===void 0&&(Ee=e.getUniformBlockIndex(Oe,K.name),ye.set(K,Ee))}function st(K,Oe){const Ee=u.get(Oe).get(K);l.get(Oe)!==Ee&&(e.uniformBlockBinding(Oe,Ee,K.__bindingPointIndex),l.set(Oe,Ee))}function It(){e.disable(e.BLEND),e.disable(e.CULL_FACE),e.disable(e.DEPTH_TEST),e.disable(e.POLYGON_OFFSET_FILL),e.disable(e.SCISSOR_TEST),e.disable(e.STENCIL_TEST),e.disable(e.SAMPLE_ALPHA_TO_COVERAGE),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ZERO),e.blendFuncSeparate(e.ONE,e.ZERO,e.ONE,e.ZERO),e.blendColor(0,0,0,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(e.LESS),s.setReversed(!1),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(e.ALWAYS,0,4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),e.clearStencil(0),e.cullFace(e.BACK),e.frontFace(e.CCW),e.polygonOffset(0,0),e.activeTexture(e.TEXTURE0),e.bindFramebuffer(e.FRAMEBUFFER,null),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),e.bindFramebuffer(e.READ_FRAMEBUFFER,null),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),c={},X=null,W={},d={},f=new WeakMap,h=[],g=null,p=!1,m=null,v=null,_=null,M=null,x=null,C=null,T=null,P=new xt(0,0,0),w=0,b=!1,S=null,E=null,R=null,L=null,O=null,Se.set(0,0,e.canvas.width,e.canvas.height),$.set(0,0,e.canvas.width,e.canvas.height),r.reset(),s.reset(),o.reset()}return{buffers:{color:r,depth:s,stencil:o},enable:Q,disable:ve,bindFramebuffer:Ge,drawBuffers:Ae,useProgram:be,setBlending:I,setMaterial:re,setFlipSided:q,setCullFace:Z,setLineWidth:oe,setPolygonOffset:xe,setScissorTest:ie,activeTexture:k,bindTexture:D,unbindTexture:z,compressedTexImage2D:ne,compressedTexImage3D:ue,texImage2D:Fe,texImage3D:qe,updateUBOMapping:nt,uniformBlockBinding:st,texStorage2D:Qe,texStorage3D:Ce,texSubImage2D:le,texSubImage3D:De,compressedTexSubImage2D:we,compressedTexSubImage3D:Le,scissor:et,viewport:ke,reset:It}}function $P(e,t,n,i,a,r,s){const o=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,l=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),u=new Pt,c=new WeakMap;let d;const f=new WeakMap;let h=!1;try{h=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function g(k,D){return h?new OffscreenCanvas(k,D):Du("canvas")}function p(k,D,z){let ne=1;const ue=ie(k);if((ue.width>z||ue.height>z)&&(ne=z/Math.max(ue.width,ue.height)),ne<1)if(typeof HTMLImageElement<"u"&&k instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&k instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&k instanceof ImageBitmap||typeof VideoFrame<"u"&&k instanceof VideoFrame){const le=Math.floor(ne*ue.width),De=Math.floor(ne*ue.height);d===void 0&&(d=g(le,De));const we=D?g(le,De):d;return we.width=le,we.height=De,we.getContext("2d").drawImage(k,0,0,le,De),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+ue.width+"x"+ue.height+") to ("+le+"x"+De+")."),we}else return"data"in k&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+ue.width+"x"+ue.height+")."),k;return k}function m(k){return k.generateMipmaps}function v(k){e.generateMipmap(k)}function _(k){return k.isWebGLCubeRenderTarget?e.TEXTURE_CUBE_MAP:k.isWebGL3DRenderTarget?e.TEXTURE_3D:k.isWebGLArrayRenderTarget||k.isCompressedArrayTexture?e.TEXTURE_2D_ARRAY:e.TEXTURE_2D}function M(k,D,z,ne,ue=!1){if(k!==null){if(e[k]!==void 0)return e[k];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+k+"'")}let le=D;if(D===e.RED&&(z===e.FLOAT&&(le=e.R32F),z===e.HALF_FLOAT&&(le=e.R16F),z===e.UNSIGNED_BYTE&&(le=e.R8)),D===e.RED_INTEGER&&(z===e.UNSIGNED_BYTE&&(le=e.R8UI),z===e.UNSIGNED_SHORT&&(le=e.R16UI),z===e.UNSIGNED_INT&&(le=e.R32UI),z===e.BYTE&&(le=e.R8I),z===e.SHORT&&(le=e.R16I),z===e.INT&&(le=e.R32I)),D===e.RG&&(z===e.FLOAT&&(le=e.RG32F),z===e.HALF_FLOAT&&(le=e.RG16F),z===e.UNSIGNED_BYTE&&(le=e.RG8)),D===e.RG_INTEGER&&(z===e.UNSIGNED_BYTE&&(le=e.RG8UI),z===e.UNSIGNED_SHORT&&(le=e.RG16UI),z===e.UNSIGNED_INT&&(le=e.RG32UI),z===e.BYTE&&(le=e.RG8I),z===e.SHORT&&(le=e.RG16I),z===e.INT&&(le=e.RG32I)),D===e.RGB_INTEGER&&(z===e.UNSIGNED_BYTE&&(le=e.RGB8UI),z===e.UNSIGNED_SHORT&&(le=e.RGB16UI),z===e.UNSIGNED_INT&&(le=e.RGB32UI),z===e.BYTE&&(le=e.RGB8I),z===e.SHORT&&(le=e.RGB16I),z===e.INT&&(le=e.RGB32I)),D===e.RGBA_INTEGER&&(z===e.UNSIGNED_BYTE&&(le=e.RGBA8UI),z===e.UNSIGNED_SHORT&&(le=e.RGBA16UI),z===e.UNSIGNED_INT&&(le=e.RGBA32UI),z===e.BYTE&&(le=e.RGBA8I),z===e.SHORT&&(le=e.RGBA16I),z===e.INT&&(le=e.RGBA32I)),D===e.RGB&&z===e.UNSIGNED_INT_5_9_9_9_REV&&(le=e.RGB9_E5),D===e.RGBA){const De=ue?Ru:bt.getTransfer(ne);z===e.FLOAT&&(le=e.RGBA32F),z===e.HALF_FLOAT&&(le=e.RGBA16F),z===e.UNSIGNED_BYTE&&(le=De===Ct?e.SRGB8_ALPHA8:e.RGBA8),z===e.UNSIGNED_SHORT_4_4_4_4&&(le=e.RGBA4),z===e.UNSIGNED_SHORT_5_5_5_1&&(le=e.RGB5_A1)}return(le===e.R16F||le===e.R32F||le===e.RG16F||le===e.RG32F||le===e.RGBA16F||le===e.RGBA32F)&&t.get("EXT_color_buffer_float"),le}function x(k,D){let z;return k?D===null||D===kr||D===Us?z=e.DEPTH24_STENCIL8:D===aa?z=e.DEPTH32F_STENCIL8:D===Fo&&(z=e.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):D===null||D===kr||D===Us?z=e.DEPTH_COMPONENT24:D===aa?z=e.DEPTH_COMPONENT32F:D===Fo&&(z=e.DEPTH_COMPONENT16),z}function C(k,D){return m(k)===!0||k.isFramebufferTexture&&k.minFilter!==Ai&&k.minFilter!==Ui?Math.log2(Math.max(D.width,D.height))+1:k.mipmaps!==void 0&&k.mipmaps.length>0?k.mipmaps.length:k.isCompressedTexture&&Array.isArray(k.image)?D.mipmaps.length:1}function T(k){const D=k.target;D.removeEventListener("dispose",T),w(D),D.isVideoTexture&&c.delete(D)}function P(k){const D=k.target;D.removeEventListener("dispose",P),S(D)}function w(k){const D=i.get(k);if(D.__webglInit===void 0)return;const z=k.source,ne=f.get(z);if(ne){const ue=ne[D.__cacheKey];ue.usedTimes--,ue.usedTimes===0&&b(k),Object.keys(ne).length===0&&f.delete(z)}i.remove(k)}function b(k){const D=i.get(k);e.deleteTexture(D.__webglTexture);const z=k.source,ne=f.get(z);delete ne[D.__cacheKey],s.memory.textures--}function S(k){const D=i.get(k);if(k.depthTexture&&(k.depthTexture.dispose(),i.remove(k.depthTexture)),k.isWebGLCubeRenderTarget)for(let ne=0;ne<6;ne++){if(Array.isArray(D.__webglFramebuffer[ne]))for(let ue=0;ue<D.__webglFramebuffer[ne].length;ue++)e.deleteFramebuffer(D.__webglFramebuffer[ne][ue]);else e.deleteFramebuffer(D.__webglFramebuffer[ne]);D.__webglDepthbuffer&&e.deleteRenderbuffer(D.__webglDepthbuffer[ne])}else{if(Array.isArray(D.__webglFramebuffer))for(let ne=0;ne<D.__webglFramebuffer.length;ne++)e.deleteFramebuffer(D.__webglFramebuffer[ne]);else e.deleteFramebuffer(D.__webglFramebuffer);if(D.__webglDepthbuffer&&e.deleteRenderbuffer(D.__webglDepthbuffer),D.__webglMultisampledFramebuffer&&e.deleteFramebuffer(D.__webglMultisampledFramebuffer),D.__webglColorRenderbuffer)for(let ne=0;ne<D.__webglColorRenderbuffer.length;ne++)D.__webglColorRenderbuffer[ne]&&e.deleteRenderbuffer(D.__webglColorRenderbuffer[ne]);D.__webglDepthRenderbuffer&&e.deleteRenderbuffer(D.__webglDepthRenderbuffer)}const z=k.textures;for(let ne=0,ue=z.length;ne<ue;ne++){const le=i.get(z[ne]);le.__webglTexture&&(e.deleteTexture(le.__webglTexture),s.memory.textures--),i.remove(z[ne])}i.remove(k)}let E=0;function R(){E=0}function L(){const k=E;return k>=a.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+k+" texture units while this GPU supports only "+a.maxTextures),E+=1,k}function O(k){const D=[];return D.push(k.wrapS),D.push(k.wrapT),D.push(k.wrapR||0),D.push(k.magFilter),D.push(k.minFilter),D.push(k.anisotropy),D.push(k.internalFormat),D.push(k.format),D.push(k.type),D.push(k.generateMipmaps),D.push(k.premultiplyAlpha),D.push(k.flipY),D.push(k.unpackAlignment),D.push(k.colorSpace),D.join()}function G(k,D){const z=i.get(k);if(k.isVideoTexture&&oe(k),k.isRenderTargetTexture===!1&&k.version>0&&z.__version!==k.version){const ne=k.image;if(ne===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(ne.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{$(z,k,D);return}}n.bindTexture(e.TEXTURE_2D,z.__webglTexture,e.TEXTURE0+D)}function U(k,D){const z=i.get(k);if(k.version>0&&z.__version!==k.version){$(z,k,D);return}n.bindTexture(e.TEXTURE_2D_ARRAY,z.__webglTexture,e.TEXTURE0+D)}function j(k,D){const z=i.get(k);if(k.version>0&&z.__version!==k.version){$(z,k,D);return}n.bindTexture(e.TEXTURE_3D,z.__webglTexture,e.TEXTURE0+D)}function B(k,D){const z=i.get(k);if(k.version>0&&z.__version!==k.version){he(z,k,D);return}n.bindTexture(e.TEXTURE_CUBE_MAP,z.__webglTexture,e.TEXTURE0+D)}const X={[uf]:e.REPEAT,[br]:e.CLAMP_TO_EDGE,[cf]:e.MIRRORED_REPEAT},W={[Ai]:e.NEAREST,[xw]:e.NEAREST_MIPMAP_NEAREST,[Cl]:e.NEAREST_MIPMAP_LINEAR,[Ui]:e.LINEAR,[qc]:e.LINEAR_MIPMAP_NEAREST,[xr]:e.LINEAR_MIPMAP_LINEAR},H={[Tw]:e.NEVER,[Dw]:e.ALWAYS,[Cw]:e.LESS,[L_]:e.LEQUAL,[Aw]:e.EQUAL,[Iw]:e.GEQUAL,[Pw]:e.GREATER,[Rw]:e.NOTEQUAL};function te(k,D){if(D.type===aa&&t.has("OES_texture_float_linear")===!1&&(D.magFilter===Ui||D.magFilter===qc||D.magFilter===Cl||D.magFilter===xr||D.minFilter===Ui||D.minFilter===qc||D.minFilter===Cl||D.minFilter===xr)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),e.texParameteri(k,e.TEXTURE_WRAP_S,X[D.wrapS]),e.texParameteri(k,e.TEXTURE_WRAP_T,X[D.wrapT]),(k===e.TEXTURE_3D||k===e.TEXTURE_2D_ARRAY)&&e.texParameteri(k,e.TEXTURE_WRAP_R,X[D.wrapR]),e.texParameteri(k,e.TEXTURE_MAG_FILTER,W[D.magFilter]),e.texParameteri(k,e.TEXTURE_MIN_FILTER,W[D.minFilter]),D.compareFunction&&(e.texParameteri(k,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(k,e.TEXTURE_COMPARE_FUNC,H[D.compareFunction])),t.has("EXT_texture_filter_anisotropic")===!0){if(D.magFilter===Ai||D.minFilter!==Cl&&D.minFilter!==xr||D.type===aa&&t.has("OES_texture_float_linear")===!1)return;if(D.anisotropy>1||i.get(D).__currentAnisotropy){const z=t.get("EXT_texture_filter_anisotropic");e.texParameterf(k,z.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(D.anisotropy,a.getMaxAnisotropy())),i.get(D).__currentAnisotropy=D.anisotropy}}}function Se(k,D){let z=!1;k.__webglInit===void 0&&(k.__webglInit=!0,D.addEventListener("dispose",T));const ne=D.source;let ue=f.get(ne);ue===void 0&&(ue={},f.set(ne,ue));const le=O(D);if(le!==k.__cacheKey){ue[le]===void 0&&(ue[le]={texture:e.createTexture(),usedTimes:0},s.memory.textures++,z=!0),ue[le].usedTimes++;const De=ue[k.__cacheKey];De!==void 0&&(ue[k.__cacheKey].usedTimes--,De.usedTimes===0&&b(D)),k.__cacheKey=le,k.__webglTexture=ue[le].texture}return z}function $(k,D,z){let ne=e.TEXTURE_2D;(D.isDataArrayTexture||D.isCompressedArrayTexture)&&(ne=e.TEXTURE_2D_ARRAY),D.isData3DTexture&&(ne=e.TEXTURE_3D);const ue=Se(k,D),le=D.source;n.bindTexture(ne,k.__webglTexture,e.TEXTURE0+z);const De=i.get(le);if(le.version!==De.__version||ue===!0){n.activeTexture(e.TEXTURE0+z);const we=bt.getPrimaries(bt.workingColorSpace),Le=D.colorSpace===Va?null:bt.getPrimaries(D.colorSpace),Qe=D.colorSpace===Va||we===Le?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,D.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,D.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,D.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,Qe);let Ce=p(D.image,!1,a.maxTextureSize);Ce=xe(D,Ce);const Fe=r.convert(D.format,D.colorSpace),qe=r.convert(D.type);let et=M(D.internalFormat,Fe,qe,D.colorSpace,D.isVideoTexture);te(ne,D);let ke;const nt=D.mipmaps,st=D.isVideoTexture!==!0,It=De.__version===void 0||ue===!0,K=le.dataReady,Oe=C(D,Ce);if(D.isDepthTexture)et=x(D.format===Bs,D.type),It&&(st?n.texStorage2D(e.TEXTURE_2D,1,et,Ce.width,Ce.height):n.texImage2D(e.TEXTURE_2D,0,et,Ce.width,Ce.height,0,Fe,qe,null));else if(D.isDataTexture)if(nt.length>0){st&&It&&n.texStorage2D(e.TEXTURE_2D,Oe,et,nt[0].width,nt[0].height);for(let ye=0,Ee=nt.length;ye<Ee;ye++)ke=nt[ye],st?K&&n.texSubImage2D(e.TEXTURE_2D,ye,0,0,ke.width,ke.height,Fe,qe,ke.data):n.texImage2D(e.TEXTURE_2D,ye,et,ke.width,ke.height,0,Fe,qe,ke.data);D.generateMipmaps=!1}else st?(It&&n.texStorage2D(e.TEXTURE_2D,Oe,et,Ce.width,Ce.height),K&&n.texSubImage2D(e.TEXTURE_2D,0,0,0,Ce.width,Ce.height,Fe,qe,Ce.data)):n.texImage2D(e.TEXTURE_2D,0,et,Ce.width,Ce.height,0,Fe,qe,Ce.data);else if(D.isCompressedTexture)if(D.isCompressedArrayTexture){st&&It&&n.texStorage3D(e.TEXTURE_2D_ARRAY,Oe,et,nt[0].width,nt[0].height,Ce.depth);for(let ye=0,Ee=nt.length;ye<Ee;ye++)if(ke=nt[ye],D.format!==wi)if(Fe!==null)if(st){if(K)if(D.layerUpdates.size>0){const ze=bg(ke.width,ke.height,D.format,D.type);for(const Be of D.layerUpdates){const lt=ke.data.subarray(Be*ze/ke.data.BYTES_PER_ELEMENT,(Be+1)*ze/ke.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,ye,0,0,Be,ke.width,ke.height,1,Fe,lt)}D.clearLayerUpdates()}else n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,ye,0,0,0,ke.width,ke.height,Ce.depth,Fe,ke.data)}else n.compressedTexImage3D(e.TEXTURE_2D_ARRAY,ye,et,ke.width,ke.height,Ce.depth,0,ke.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else st?K&&n.texSubImage3D(e.TEXTURE_2D_ARRAY,ye,0,0,0,ke.width,ke.height,Ce.depth,Fe,qe,ke.data):n.texImage3D(e.TEXTURE_2D_ARRAY,ye,et,ke.width,ke.height,Ce.depth,0,Fe,qe,ke.data)}else{st&&It&&n.texStorage2D(e.TEXTURE_2D,Oe,et,nt[0].width,nt[0].height);for(let ye=0,Ee=nt.length;ye<Ee;ye++)ke=nt[ye],D.format!==wi?Fe!==null?st?K&&n.compressedTexSubImage2D(e.TEXTURE_2D,ye,0,0,ke.width,ke.height,Fe,ke.data):n.compressedTexImage2D(e.TEXTURE_2D,ye,et,ke.width,ke.height,0,ke.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):st?K&&n.texSubImage2D(e.TEXTURE_2D,ye,0,0,ke.width,ke.height,Fe,qe,ke.data):n.texImage2D(e.TEXTURE_2D,ye,et,ke.width,ke.height,0,Fe,qe,ke.data)}else if(D.isDataArrayTexture)if(st){if(It&&n.texStorage3D(e.TEXTURE_2D_ARRAY,Oe,et,Ce.width,Ce.height,Ce.depth),K)if(D.layerUpdates.size>0){const ye=bg(Ce.width,Ce.height,D.format,D.type);for(const Ee of D.layerUpdates){const ze=Ce.data.subarray(Ee*ye/Ce.data.BYTES_PER_ELEMENT,(Ee+1)*ye/Ce.data.BYTES_PER_ELEMENT);n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,Ee,Ce.width,Ce.height,1,Fe,qe,ze)}D.clearLayerUpdates()}else n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,0,Ce.width,Ce.height,Ce.depth,Fe,qe,Ce.data)}else n.texImage3D(e.TEXTURE_2D_ARRAY,0,et,Ce.width,Ce.height,Ce.depth,0,Fe,qe,Ce.data);else if(D.isData3DTexture)st?(It&&n.texStorage3D(e.TEXTURE_3D,Oe,et,Ce.width,Ce.height,Ce.depth),K&&n.texSubImage3D(e.TEXTURE_3D,0,0,0,0,Ce.width,Ce.height,Ce.depth,Fe,qe,Ce.data)):n.texImage3D(e.TEXTURE_3D,0,et,Ce.width,Ce.height,Ce.depth,0,Fe,qe,Ce.data);else if(D.isFramebufferTexture){if(It)if(st)n.texStorage2D(e.TEXTURE_2D,Oe,et,Ce.width,Ce.height);else{let ye=Ce.width,Ee=Ce.height;for(let ze=0;ze<Oe;ze++)n.texImage2D(e.TEXTURE_2D,ze,et,ye,Ee,0,Fe,qe,null),ye>>=1,Ee>>=1}}else if(nt.length>0){if(st&&It){const ye=ie(nt[0]);n.texStorage2D(e.TEXTURE_2D,Oe,et,ye.width,ye.height)}for(let ye=0,Ee=nt.length;ye<Ee;ye++)ke=nt[ye],st?K&&n.texSubImage2D(e.TEXTURE_2D,ye,0,0,Fe,qe,ke):n.texImage2D(e.TEXTURE_2D,ye,et,Fe,qe,ke);D.generateMipmaps=!1}else if(st){if(It){const ye=ie(Ce);n.texStorage2D(e.TEXTURE_2D,Oe,et,ye.width,ye.height)}K&&n.texSubImage2D(e.TEXTURE_2D,0,0,0,Fe,qe,Ce)}else n.texImage2D(e.TEXTURE_2D,0,et,Fe,qe,Ce);m(D)&&v(ne),De.__version=le.version,D.onUpdate&&D.onUpdate(D)}k.__version=D.version}function he(k,D,z){if(D.image.length!==6)return;const ne=Se(k,D),ue=D.source;n.bindTexture(e.TEXTURE_CUBE_MAP,k.__webglTexture,e.TEXTURE0+z);const le=i.get(ue);if(ue.version!==le.__version||ne===!0){n.activeTexture(e.TEXTURE0+z);const De=bt.getPrimaries(bt.workingColorSpace),we=D.colorSpace===Va?null:bt.getPrimaries(D.colorSpace),Le=D.colorSpace===Va||De===we?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,D.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,D.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,D.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,Le);const Qe=D.isCompressedTexture||D.image[0].isCompressedTexture,Ce=D.image[0]&&D.image[0].isDataTexture,Fe=[];for(let Ee=0;Ee<6;Ee++)!Qe&&!Ce?Fe[Ee]=p(D.image[Ee],!0,a.maxCubemapSize):Fe[Ee]=Ce?D.image[Ee].image:D.image[Ee],Fe[Ee]=xe(D,Fe[Ee]);const qe=Fe[0],et=r.convert(D.format,D.colorSpace),ke=r.convert(D.type),nt=M(D.internalFormat,et,ke,D.colorSpace),st=D.isVideoTexture!==!0,It=le.__version===void 0||ne===!0,K=ue.dataReady;let Oe=C(D,qe);te(e.TEXTURE_CUBE_MAP,D);let ye;if(Qe){st&&It&&n.texStorage2D(e.TEXTURE_CUBE_MAP,Oe,nt,qe.width,qe.height);for(let Ee=0;Ee<6;Ee++){ye=Fe[Ee].mipmaps;for(let ze=0;ze<ye.length;ze++){const Be=ye[ze];D.format!==wi?et!==null?st?K&&n.compressedTexSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,ze,0,0,Be.width,Be.height,et,Be.data):n.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,ze,nt,Be.width,Be.height,0,Be.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):st?K&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,ze,0,0,Be.width,Be.height,et,ke,Be.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,ze,nt,Be.width,Be.height,0,et,ke,Be.data)}}}else{if(ye=D.mipmaps,st&&It){ye.length>0&&Oe++;const Ee=ie(Fe[0]);n.texStorage2D(e.TEXTURE_CUBE_MAP,Oe,nt,Ee.width,Ee.height)}for(let Ee=0;Ee<6;Ee++)if(Ce){st?K&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,Fe[Ee].width,Fe[Ee].height,et,ke,Fe[Ee].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,nt,Fe[Ee].width,Fe[Ee].height,0,et,ke,Fe[Ee].data);for(let ze=0;ze<ye.length;ze++){const lt=ye[ze].image[Ee].image;st?K&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,ze+1,0,0,lt.width,lt.height,et,ke,lt.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,ze+1,nt,lt.width,lt.height,0,et,ke,lt.data)}}else{st?K&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,0,0,et,ke,Fe[Ee]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0,nt,et,ke,Fe[Ee]);for(let ze=0;ze<ye.length;ze++){const Be=ye[ze];st?K&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,ze+1,0,0,et,ke,Be.image[Ee]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,ze+1,nt,et,ke,Be.image[Ee])}}}m(D)&&v(e.TEXTURE_CUBE_MAP),le.__version=ue.version,D.onUpdate&&D.onUpdate(D)}k.__version=D.version}function ae(k,D,z,ne,ue,le){const De=r.convert(z.format,z.colorSpace),we=r.convert(z.type),Le=M(z.internalFormat,De,we,z.colorSpace),Qe=i.get(D),Ce=i.get(z);if(Ce.__renderTarget=D,!Qe.__hasExternalTextures){const Fe=Math.max(1,D.width>>le),qe=Math.max(1,D.height>>le);ue===e.TEXTURE_3D||ue===e.TEXTURE_2D_ARRAY?n.texImage3D(ue,le,Le,Fe,qe,D.depth,0,De,we,null):n.texImage2D(ue,le,Le,Fe,qe,0,De,we,null)}n.bindFramebuffer(e.FRAMEBUFFER,k),Z(D)?o.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,ne,ue,Ce.__webglTexture,0,q(D)):(ue===e.TEXTURE_2D||ue>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&ue<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,ne,ue,Ce.__webglTexture,le),n.bindFramebuffer(e.FRAMEBUFFER,null)}function Q(k,D,z){if(e.bindRenderbuffer(e.RENDERBUFFER,k),D.depthBuffer){const ne=D.depthTexture,ue=ne&&ne.isDepthTexture?ne.type:null,le=x(D.stencilBuffer,ue),De=D.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,we=q(D);Z(D)?o.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,we,le,D.width,D.height):z?e.renderbufferStorageMultisample(e.RENDERBUFFER,we,le,D.width,D.height):e.renderbufferStorage(e.RENDERBUFFER,le,D.width,D.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,De,e.RENDERBUFFER,k)}else{const ne=D.textures;for(let ue=0;ue<ne.length;ue++){const le=ne[ue],De=r.convert(le.format,le.colorSpace),we=r.convert(le.type),Le=M(le.internalFormat,De,we,le.colorSpace),Qe=q(D);z&&Z(D)===!1?e.renderbufferStorageMultisample(e.RENDERBUFFER,Qe,Le,D.width,D.height):Z(D)?o.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,Qe,Le,D.width,D.height):e.renderbufferStorage(e.RENDERBUFFER,Le,D.width,D.height)}}e.bindRenderbuffer(e.RENDERBUFFER,null)}function ve(k,D){if(D&&D.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(e.FRAMEBUFFER,k),!(D.depthTexture&&D.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const ne=i.get(D.depthTexture);ne.__renderTarget=D,(!ne.__webglTexture||D.depthTexture.image.width!==D.width||D.depthTexture.image.height!==D.height)&&(D.depthTexture.image.width=D.width,D.depthTexture.image.height=D.height,D.depthTexture.needsUpdate=!0),G(D.depthTexture,0);const ue=ne.__webglTexture,le=q(D);if(D.depthTexture.format===Ls)Z(D)?o.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,ue,0,le):e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,ue,0);else if(D.depthTexture.format===Bs)Z(D)?o.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,ue,0,le):e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,ue,0);else throw new Error("Unknown depthTexture format")}function Ge(k){const D=i.get(k),z=k.isWebGLCubeRenderTarget===!0;if(D.__boundDepthTexture!==k.depthTexture){const ne=k.depthTexture;if(D.__depthDisposeCallback&&D.__depthDisposeCallback(),ne){const ue=()=>{delete D.__boundDepthTexture,delete D.__depthDisposeCallback,ne.removeEventListener("dispose",ue)};ne.addEventListener("dispose",ue),D.__depthDisposeCallback=ue}D.__boundDepthTexture=ne}if(k.depthTexture&&!D.__autoAllocateDepthBuffer){if(z)throw new Error("target.depthTexture not supported in Cube render targets");ve(D.__webglFramebuffer,k)}else if(z){D.__webglDepthbuffer=[];for(let ne=0;ne<6;ne++)if(n.bindFramebuffer(e.FRAMEBUFFER,D.__webglFramebuffer[ne]),D.__webglDepthbuffer[ne]===void 0)D.__webglDepthbuffer[ne]=e.createRenderbuffer(),Q(D.__webglDepthbuffer[ne],k,!1);else{const ue=k.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,le=D.__webglDepthbuffer[ne];e.bindRenderbuffer(e.RENDERBUFFER,le),e.framebufferRenderbuffer(e.FRAMEBUFFER,ue,e.RENDERBUFFER,le)}}else if(n.bindFramebuffer(e.FRAMEBUFFER,D.__webglFramebuffer),D.__webglDepthbuffer===void 0)D.__webglDepthbuffer=e.createRenderbuffer(),Q(D.__webglDepthbuffer,k,!1);else{const ne=k.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,ue=D.__webglDepthbuffer;e.bindRenderbuffer(e.RENDERBUFFER,ue),e.framebufferRenderbuffer(e.FRAMEBUFFER,ne,e.RENDERBUFFER,ue)}n.bindFramebuffer(e.FRAMEBUFFER,null)}function Ae(k,D,z){const ne=i.get(k);D!==void 0&&ae(ne.__webglFramebuffer,k,k.texture,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,0),z!==void 0&&Ge(k)}function be(k){const D=k.texture,z=i.get(k),ne=i.get(D);k.addEventListener("dispose",P);const ue=k.textures,le=k.isWebGLCubeRenderTarget===!0,De=ue.length>1;if(De||(ne.__webglTexture===void 0&&(ne.__webglTexture=e.createTexture()),ne.__version=D.version,s.memory.textures++),le){z.__webglFramebuffer=[];for(let we=0;we<6;we++)if(D.mipmaps&&D.mipmaps.length>0){z.__webglFramebuffer[we]=[];for(let Le=0;Le<D.mipmaps.length;Le++)z.__webglFramebuffer[we][Le]=e.createFramebuffer()}else z.__webglFramebuffer[we]=e.createFramebuffer()}else{if(D.mipmaps&&D.mipmaps.length>0){z.__webglFramebuffer=[];for(let we=0;we<D.mipmaps.length;we++)z.__webglFramebuffer[we]=e.createFramebuffer()}else z.__webglFramebuffer=e.createFramebuffer();if(De)for(let we=0,Le=ue.length;we<Le;we++){const Qe=i.get(ue[we]);Qe.__webglTexture===void 0&&(Qe.__webglTexture=e.createTexture(),s.memory.textures++)}if(k.samples>0&&Z(k)===!1){z.__webglMultisampledFramebuffer=e.createFramebuffer(),z.__webglColorRenderbuffer=[],n.bindFramebuffer(e.FRAMEBUFFER,z.__webglMultisampledFramebuffer);for(let we=0;we<ue.length;we++){const Le=ue[we];z.__webglColorRenderbuffer[we]=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,z.__webglColorRenderbuffer[we]);const Qe=r.convert(Le.format,Le.colorSpace),Ce=r.convert(Le.type),Fe=M(Le.internalFormat,Qe,Ce,Le.colorSpace,k.isXRRenderTarget===!0),qe=q(k);e.renderbufferStorageMultisample(e.RENDERBUFFER,qe,Fe,k.width,k.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+we,e.RENDERBUFFER,z.__webglColorRenderbuffer[we])}e.bindRenderbuffer(e.RENDERBUFFER,null),k.depthBuffer&&(z.__webglDepthRenderbuffer=e.createRenderbuffer(),Q(z.__webglDepthRenderbuffer,k,!0)),n.bindFramebuffer(e.FRAMEBUFFER,null)}}if(le){n.bindTexture(e.TEXTURE_CUBE_MAP,ne.__webglTexture),te(e.TEXTURE_CUBE_MAP,D);for(let we=0;we<6;we++)if(D.mipmaps&&D.mipmaps.length>0)for(let Le=0;Le<D.mipmaps.length;Le++)ae(z.__webglFramebuffer[we][Le],k,D,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+we,Le);else ae(z.__webglFramebuffer[we],k,D,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+we,0);m(D)&&v(e.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(De){for(let we=0,Le=ue.length;we<Le;we++){const Qe=ue[we],Ce=i.get(Qe);n.bindTexture(e.TEXTURE_2D,Ce.__webglTexture),te(e.TEXTURE_2D,Qe),ae(z.__webglFramebuffer,k,Qe,e.COLOR_ATTACHMENT0+we,e.TEXTURE_2D,0),m(Qe)&&v(e.TEXTURE_2D)}n.unbindTexture()}else{let we=e.TEXTURE_2D;if((k.isWebGL3DRenderTarget||k.isWebGLArrayRenderTarget)&&(we=k.isWebGL3DRenderTarget?e.TEXTURE_3D:e.TEXTURE_2D_ARRAY),n.bindTexture(we,ne.__webglTexture),te(we,D),D.mipmaps&&D.mipmaps.length>0)for(let Le=0;Le<D.mipmaps.length;Le++)ae(z.__webglFramebuffer[Le],k,D,e.COLOR_ATTACHMENT0,we,Le);else ae(z.__webglFramebuffer,k,D,e.COLOR_ATTACHMENT0,we,0);m(D)&&v(we),n.unbindTexture()}k.depthBuffer&&Ge(k)}function N(k){const D=k.textures;for(let z=0,ne=D.length;z<ne;z++){const ue=D[z];if(m(ue)){const le=_(k),De=i.get(ue).__webglTexture;n.bindTexture(le,De),v(le),n.unbindTexture()}}}const V=[],I=[];function re(k){if(k.samples>0){if(Z(k)===!1){const D=k.textures,z=k.width,ne=k.height;let ue=e.COLOR_BUFFER_BIT;const le=k.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,De=i.get(k),we=D.length>1;if(we)for(let Le=0;Le<D.length;Le++)n.bindFramebuffer(e.FRAMEBUFFER,De.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+Le,e.RENDERBUFFER,null),n.bindFramebuffer(e.FRAMEBUFFER,De.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+Le,e.TEXTURE_2D,null,0);n.bindFramebuffer(e.READ_FRAMEBUFFER,De.__webglMultisampledFramebuffer),n.bindFramebuffer(e.DRAW_FRAMEBUFFER,De.__webglFramebuffer);for(let Le=0;Le<D.length;Le++){if(k.resolveDepthBuffer&&(k.depthBuffer&&(ue|=e.DEPTH_BUFFER_BIT),k.stencilBuffer&&k.resolveStencilBuffer&&(ue|=e.STENCIL_BUFFER_BIT)),we){e.framebufferRenderbuffer(e.READ_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,De.__webglColorRenderbuffer[Le]);const Qe=i.get(D[Le]).__webglTexture;e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,Qe,0)}e.blitFramebuffer(0,0,z,ne,0,0,z,ne,ue,e.NEAREST),l===!0&&(V.length=0,I.length=0,V.push(e.COLOR_ATTACHMENT0+Le),k.depthBuffer&&k.resolveDepthBuffer===!1&&(V.push(le),I.push(le),e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,I)),e.invalidateFramebuffer(e.READ_FRAMEBUFFER,V))}if(n.bindFramebuffer(e.READ_FRAMEBUFFER,null),n.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),we)for(let Le=0;Le<D.length;Le++){n.bindFramebuffer(e.FRAMEBUFFER,De.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+Le,e.RENDERBUFFER,De.__webglColorRenderbuffer[Le]);const Qe=i.get(D[Le]).__webglTexture;n.bindFramebuffer(e.FRAMEBUFFER,De.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+Le,e.TEXTURE_2D,Qe,0)}n.bindFramebuffer(e.DRAW_FRAMEBUFFER,De.__webglMultisampledFramebuffer)}else if(k.depthBuffer&&k.resolveDepthBuffer===!1&&l){const D=k.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,[D])}}}function q(k){return Math.min(a.maxSamples,k.samples)}function Z(k){const D=i.get(k);return k.samples>0&&t.has("WEBGL_multisampled_render_to_texture")===!0&&D.__useRenderToTexture!==!1}function oe(k){const D=s.render.frame;c.get(k)!==D&&(c.set(k,D),k.update())}function xe(k,D){const z=k.colorSpace,ne=k.format,ue=k.type;return k.isCompressedTexture===!0||k.isVideoTexture===!0||z!==zs&&z!==Va&&(bt.getTransfer(z)===Ct?(ne!==wi||ue!==fa)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",z)),D}function ie(k){return typeof HTMLImageElement<"u"&&k instanceof HTMLImageElement?(u.width=k.naturalWidth||k.width,u.height=k.naturalHeight||k.height):typeof VideoFrame<"u"&&k instanceof VideoFrame?(u.width=k.displayWidth,u.height=k.displayHeight):(u.width=k.width,u.height=k.height),u}this.allocateTextureUnit=L,this.resetTextureUnits=R,this.setTexture2D=G,this.setTexture2DArray=U,this.setTexture3D=j,this.setTextureCube=B,this.rebindTextures=Ae,this.setupRenderTarget=be,this.updateRenderTargetMipmap=N,this.updateMultisampleRenderTarget=re,this.setupDepthRenderbuffer=Ge,this.setupFrameBufferTexture=ae,this.useMultisampledRTT=Z}function XP(e,t){function n(i,a=Va){let r;const s=bt.getTransfer(a);if(i===fa)return e.UNSIGNED_BYTE;if(i===qh)return e.UNSIGNED_SHORT_4_4_4_4;if(i===jh)return e.UNSIGNED_SHORT_5_5_5_1;if(i===w_)return e.UNSIGNED_INT_5_9_9_9_REV;if(i===M_)return e.BYTE;if(i===E_)return e.SHORT;if(i===Fo)return e.UNSIGNED_SHORT;if(i===Yh)return e.INT;if(i===kr)return e.UNSIGNED_INT;if(i===aa)return e.FLOAT;if(i===Qo)return e.HALF_FLOAT;if(i===T_)return e.ALPHA;if(i===C_)return e.RGB;if(i===wi)return e.RGBA;if(i===A_)return e.LUMINANCE;if(i===P_)return e.LUMINANCE_ALPHA;if(i===Ls)return e.DEPTH_COMPONENT;if(i===Bs)return e.DEPTH_STENCIL;if(i===R_)return e.RED;if(i===Kh)return e.RED_INTEGER;if(i===I_)return e.RG;if(i===Zh)return e.RG_INTEGER;if(i===Jh)return e.RGBA_INTEGER;if(i===cu||i===du||i===fu||i===hu)if(s===Ct)if(r=t.get("WEBGL_compressed_texture_s3tc_srgb"),r!==null){if(i===cu)return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===du)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===fu)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===hu)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(r=t.get("WEBGL_compressed_texture_s3tc"),r!==null){if(i===cu)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===du)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===fu)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===hu)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===df||i===ff||i===hf||i===mf)if(r=t.get("WEBGL_compressed_texture_pvrtc"),r!==null){if(i===df)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===ff)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===hf)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===mf)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===vf||i===gf||i===pf)if(r=t.get("WEBGL_compressed_texture_etc"),r!==null){if(i===vf||i===gf)return s===Ct?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(i===pf)return s===Ct?r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(i===yf||i===_f||i===bf||i===xf||i===Sf||i===Mf||i===Ef||i===wf||i===Tf||i===Cf||i===Af||i===Pf||i===Rf||i===If)if(r=t.get("WEBGL_compressed_texture_astc"),r!==null){if(i===yf)return s===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===_f)return s===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===bf)return s===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===xf)return s===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===Sf)return s===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===Mf)return s===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===Ef)return s===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===wf)return s===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===Tf)return s===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===Cf)return s===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===Af)return s===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===Pf)return s===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===Rf)return s===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===If)return s===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:r.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===mu||i===Df||i===Lf)if(r=t.get("EXT_texture_compression_bptc"),r!==null){if(i===mu)return s===Ct?r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:r.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===Df)return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===Lf)return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===D_||i===kf||i===Vf||i===Ff)if(r=t.get("EXT_texture_compression_rgtc"),r!==null){if(i===mu)return r.COMPRESSED_RED_RGTC1_EXT;if(i===kf)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===Vf)return r.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===Ff)return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===Us?e.UNSIGNED_INT_24_8:e[i]!==void 0?e[i]:null}return{convert:n}}const YP=`
void main() {
gl_Position = vec4( position, 1.0 );
}`,qP=`
uniform sampler2DArray depthColor;
uniform float depthWidth;
uniform float depthHeight;
void main() {
vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );
if ( coord.x >= 1.0 ) {
gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;
} else {
gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;
}
}`;class jP{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,n,i){if(this.texture===null){const a=new $n,r=t.properties.get(a);r.__webglTexture=n.texture,(n.depthNear!==i.depthNear||n.depthFar!==i.depthFar)&&(this.depthNear=n.depthNear,this.depthFar=n.depthFar),this.texture=a}}getMesh(t){if(this.texture!==null&&this.mesh===null){const n=t.cameras[0].viewport,i=new Ga({vertexShader:YP,fragmentShader:qP,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new sa(new ec(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class KP extends Ks{constructor(t,n){super();const i=this;let a=null,r=1,s=null,o="local-floor",l=1,u=null,c=null,d=null,f=null,h=null,g=null;const p=new jP,m=n.getContextAttributes();let v=null,_=null;const M=[],x=[],C=new Pt;let T=null;const P=new di;P.viewport=new Jt;const w=new di;w.viewport=new Jt;const b=[P,w],S=new pT;let E=null,R=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function($){let he=M[$];return he===void 0&&(he=new gd,M[$]=he),he.getTargetRaySpace()},this.getControllerGrip=function($){let he=M[$];return he===void 0&&(he=new gd,M[$]=he),he.getGripSpace()},this.getHand=function($){let he=M[$];return he===void 0&&(he=new gd,M[$]=he),he.getHandSpace()};function L($){const he=x.indexOf($.inputSource);if(he===-1)return;const ae=M[he];ae!==void 0&&(ae.update($.inputSource,$.frame,u||s),ae.dispatchEvent({type:$.type,data:$.inputSource}))}function O(){a.removeEventListener("select",L),a.removeEventListener("selectstart",L),a.removeEventListener("selectend",L),a.removeEventListener("squeeze",L),a.removeEventListener("squeezestart",L),a.removeEventListener("squeezeend",L),a.removeEventListener("end",O),a.removeEventListener("inputsourceschange",G);for(let $=0;$<M.length;$++){const he=x[$];he!==null&&(x[$]=null,M[$].disconnect(he))}E=null,R=null,p.reset(),t.setRenderTarget(v),h=null,f=null,d=null,a=null,_=null,Se.stop(),i.isPresenting=!1,t.setPixelRatio(T),t.setSize(C.width,C.height,!1),i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function($){r=$,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function($){o=$,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return u||s},this.setReferenceSpace=function($){u=$},this.getBaseLayer=function(){return f!==null?f:h},this.getBinding=function(){return d},this.getFrame=function(){return g},this.getSession=function(){return a},this.setSession=async function($){if(a=$,a!==null){if(v=t.getRenderTarget(),a.addEventListener("select",L),a.addEventListener("selectstart",L),a.addEventListener("selectend",L),a.addEventListener("squeeze",L),a.addEventListener("squeezestart",L),a.addEventListener("squeezeend",L),a.addEventListener("end",O),a.addEventListener("inputsourceschange",G),m.xrCompatible!==!0&&await n.makeXRCompatible(),T=t.getPixelRatio(),t.getSize(C),typeof XRWebGLBinding<"u"&&"createProjectionLayer"in XRWebGLBinding.prototype){let ae=null,Q=null,ve=null;m.depth&&(ve=m.stencil?n.DEPTH24_STENCIL8:n.DEPTH_COMPONENT24,ae=m.stencil?Bs:Ls,Q=m.stencil?Us:kr);const Ge={colorFormat:n.RGBA8,depthFormat:ve,scaleFactor:r};d=new XRWebGLBinding(a,n),f=d.createProjectionLayer(Ge),a.updateRenderState({layers:[f]}),t.setPixelRatio(1),t.setSize(f.textureWidth,f.textureHeight,!1),_=new Vr(f.textureWidth,f.textureHeight,{format:wi,type:fa,depthTexture:new Y_(f.textureWidth,f.textureHeight,Q,void 0,void 0,void 0,void 0,void 0,void 0,ae),stencilBuffer:m.stencil,colorSpace:t.outputColorSpace,samples:m.antialias?4:0,resolveDepthBuffer:f.ignoreDepthValues===!1,resolveStencilBuffer:f.ignoreDepthValues===!1})}else{const ae={antialias:m.antialias,alpha:!0,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:r};h=new XRWebGLLayer(a,n,ae),a.updateRenderState({baseLayer:h}),t.setPixelRatio(1),t.setSize(h.framebufferWidth,h.framebufferHeight,!1),_=new Vr(h.framebufferWidth,h.framebufferHeight,{format:wi,type:fa,colorSpace:t.outputColorSpace,stencilBuffer:m.stencil,resolveDepthBuffer:h.ignoreDepthValues===!1,resolveStencilBuffer:h.ignoreDepthValues===!1})}_.isXRRenderTarget=!0,this.setFoveation(l),u=null,s=await a.requestReferenceSpace(o),Se.setContext(a),Se.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(a!==null)return a.environmentBlendMode},this.getDepthTexture=function(){return p.getDepthTexture()};function G($){for(let he=0;he<$.removed.length;he++){const ae=$.removed[he],Q=x.indexOf(ae);Q>=0&&(x[Q]=null,M[Q].disconnect(ae))}for(let he=0;he<$.added.length;he++){const ae=$.added[he];let Q=x.indexOf(ae);if(Q===-1){for(let Ge=0;Ge<M.length;Ge++)if(Ge>=x.length){x.push(ae),Q=Ge;break}else if(x[Ge]===null){x[Ge]=ae,Q=Ge;break}if(Q===-1)break}const ve=M[Q];ve&&ve.connect(ae)}}const U=new ce,j=new ce;function B($,he,ae){U.setFromMatrixPosition(he.matrixWorld),j.setFromMatrixPosition(ae.matrixWorld);const Q=U.distanceTo(j),ve=he.projectionMatrix.elements,Ge=ae.projectionMatrix.elements,Ae=ve[14]/(ve[10]-1),be=ve[14]/(ve[10]+1),N=(ve[9]+1)/ve[5],V=(ve[9]-1)/ve[5],I=(ve[8]-1)/ve[0],re=(Ge[8]+1)/Ge[0],q=Ae*I,Z=Ae*re,oe=Q/(-I+re),xe=oe*-I;if(he.matrixWorld.decompose($.position,$.quaternion,$.scale),$.translateX(xe),$.translateZ(oe),$.matrixWorld.compose($.position,$.quaternion,$.scale),$.matrixWorldInverse.copy($.matrixWorld).invert(),ve[10]===-1)$.projectionMatrix.copy(he.projectionMatrix),$.projectionMatrixInverse.copy(he.projectionMatrixInverse);else{const ie=Ae+oe,k=be+oe,D=q-xe,z=Z+(Q-xe),ne=N*be/k*ie,ue=V*be/k*ie;$.projectionMatrix.makePerspective(D,z,ne,ue,ie,k),$.projectionMatrixInverse.copy($.projectionMatrix).invert()}}function X($,he){he===null?$.matrixWorld.copy($.matrix):$.matrixWorld.multiplyMatrices(he.matrixWorld,$.matrix),$.matrixWorldInverse.copy($.matrixWorld).invert()}this.updateCamera=function($){if(a===null)return;let he=$.near,ae=$.far;p.texture!==null&&(p.depthNear>0&&(he=p.depthNear),p.depthFar>0&&(ae=p.depthFar)),S.near=w.near=P.near=he,S.far=w.far=P.far=ae,(E!==S.near||R!==S.far)&&(a.updateRenderState({depthNear:S.near,depthFar:S.far}),E=S.near,R=S.far),P.layers.mask=$.layers.mask|2,w.layers.mask=$.layers.mask|4,S.layers.mask=P.layers.mask|w.layers.mask;const Q=$.parent,ve=S.cameras;X(S,Q);for(let Ge=0;Ge<ve.length;Ge++)X(ve[Ge],Q);ve.length===2?B(S,P,w):S.projectionMatrix.copy(P.projectionMatrix),W($,S,Q)};function W($,he,ae){ae===null?$.matrix.copy(he.matrixWorld):($.matrix.copy(ae.matrixWorld),$.matrix.invert(),$.matrix.multiply(he.matrixWorld)),$.matrix.decompose($.position,$.quaternion,$.scale),$.updateMatrixWorld(!0),$.projectionMatrix.copy(he.projectionMatrix),$.projectionMatrixInverse.copy(he.projectionMatrixInverse),$.isPerspectiveCamera&&($.fov=Nf*2*Math.atan(1/$.projectionMatrix.elements[5]),$.zoom=1)}this.getCamera=function(){return S},this.getFoveation=function(){if(!(f===null&&h===null))return l},this.setFoveation=function($){l=$,f!==null&&(f.fixedFoveation=$),h!==null&&h.fixedFoveation!==void 0&&(h.fixedFoveation=$)},this.hasDepthSensing=function(){return p.texture!==null},this.getDepthSensingMesh=function(){return p.getMesh(S)};let H=null;function te($,he){if(c=he.getViewerPose(u||s),g=he,c!==null){const ae=c.views;h!==null&&(t.setRenderTargetFramebuffer(_,h.framebuffer),t.setRenderTarget(_));let Q=!1;ae.length!==S.cameras.length&&(S.cameras.length=0,Q=!0);for(let Ae=0;Ae<ae.length;Ae++){const be=ae[Ae];let N=null;if(h!==null)N=h.getViewport(be);else{const I=d.getViewSubImage(f,be);N=I.viewport,Ae===0&&(t.setRenderTargetTextures(_,I.colorTexture,f.ignoreDepthValues?void 0:I.depthStencilTexture),t.setRenderTarget(_))}let V=b[Ae];V===void 0&&(V=new di,V.layers.enable(Ae),V.viewport=new Jt,b[Ae]=V),V.matrix.fromArray(be.transform.matrix),V.matrix.decompose(V.position,V.quaternion,V.scale),V.projectionMatrix.fromArray(be.projectionMatrix),V.projectionMatrixInverse.copy(V.projectionMatrix).invert(),V.viewport.set(N.x,N.y,N.width,N.height),Ae===0&&(S.matrix.copy(V.matrix),S.matrix.decompose(S.position,S.quaternion,S.scale)),Q===!0&&S.cameras.push(V)}const ve=a.enabledFeatures;if(ve&&ve.includes("depth-sensing")&&a.depthUsage=="gpu-optimized"&&d){const Ae=d.getDepthInformation(ae[0]);Ae&&Ae.isValid&&Ae.texture&&p.init(t,Ae,a.renderState)}}for(let ae=0;ae<M.length;ae++){const Q=x[ae],ve=M[ae];Q!==null&&ve!==void 0&&ve.update(Q,he,u||s)}H&&H($,he),he.detectedPlanes&&i.dispatchEvent({type:"planesdetected",data:he}),g=null}const Se=new q_;Se.setAnimationLoop(te),this.setAnimationLoop=function($){H=$},this.dispose=function(){}}}const cr=new ha,ZP=new jt;function JP(e,t){function n(m,v){m.matrixAutoUpdate===!0&&m.updateMatrix(),v.value.copy(m.matrix)}function i(m,v){v.color.getRGB(m.fogColor.value,z_(e)),v.isFog?(m.fogNear.value=v.near,m.fogFar.value=v.far):v.isFogExp2&&(m.fogDensity.value=v.density)}function a(m,v,_,M,x){v.isMeshBasicMaterial||v.isMeshLambertMaterial?r(m,v):v.isMeshToonMaterial?(r(m,v),d(m,v)):v.isMeshPhongMaterial?(r(m,v),c(m,v)):v.isMeshStandardMaterial?(r(m,v),f(m,v),v.isMeshPhysicalMaterial&&h(m,v,x)):v.isMeshMatcapMaterial?(r(m,v),g(m,v)):v.isMeshDepthMaterial?r(m,v):v.isMeshDistanceMaterial?(r(m,v),p(m,v)):v.isMeshNormalMaterial?r(m,v):v.isLineBasicMaterial?(s(m,v),v.isLineDashedMaterial&&o(m,v)):v.isPointsMaterial?l(m,v,_,M):v.isSpriteMaterial?u(m,v):v.isShadowMaterial?(m.color.value.copy(v.color),m.opacity.value=v.opacity):v.isShaderMaterial&&(v.uniformsNeedUpdate=!1)}function r(m,v){m.opacity.value=v.opacity,v.color&&m.diffuse.value.copy(v.color),v.emissive&&m.emissive.value.copy(v.emissive).multiplyScalar(v.emissiveIntensity),v.map&&(m.map.value=v.map,n(v.map,m.mapTransform)),v.alphaMap&&(m.alphaMap.value=v.alphaMap,n(v.alphaMap,m.alphaMapTransform)),v.bumpMap&&(m.bumpMap.value=v.bumpMap,n(v.bumpMap,m.bumpMapTransform),m.bumpScale.value=v.bumpScale,v.side===Wn&&(m.bumpScale.value*=-1)),v.normalMap&&(m.normalMap.value=v.normalMap,n(v.normalMap,m.normalMapTransform),m.normalScale.value.copy(v.normalScale),v.side===Wn&&m.normalScale.value.negate()),v.displacementMap&&(m.displacementMap.value=v.displacementMap,n(v.displacementMap,m.displacementMapTransform),m.displacementScale.value=v.displacementScale,m.displacementBias.value=v.displacementBias),v.emissiveMap&&(m.emissiveMap.value=v.emissiveMap,n(v.emissiveMap,m.emissiveMapTransform)),v.specularMap&&(m.specularMap.value=v.specularMap,n(v.specularMap,m.specularMapTransform)),v.alphaTest>0&&(m.alphaTest.value=v.alphaTest);const _=t.get(v),M=_.envMap,x=_.envMapRotation;M&&(m.envMap.value=M,cr.copy(x),cr.x*=-1,cr.y*=-1,cr.z*=-1,M.isCubeTexture&&M.isRenderTargetTexture===!1&&(cr.y*=-1,cr.z*=-1),m.envMapRotation.value.setFromMatrix4(ZP.makeRotationFromEuler(cr)),m.flipEnvMap.value=M.isCubeTexture&&M.isRenderTargetTexture===!1?-1:1,m.reflectivity.value=v.reflectivity,m.ior.value=v.ior,m.refractionRatio.value=v.refractionRatio),v.lightMap&&(m.lightMap.value=v.lightMap,m.lightMapIntensity.value=v.lightMapIntensity,n(v.lightMap,m.lightMapTransform)),v.aoMap&&(m.aoMap.value=v.aoMap,m.aoMapIntensity.value=v.aoMapIntensity,n(v.aoMap,m.aoMapTransform))}function s(m,v){m.diffuse.value.copy(v.color),m.opacity.value=v.opacity,v.map&&(m.map.value=v.map,n(v.map,m.mapTransform))}function o(m,v){m.dashSize.value=v.dashSize,m.totalSize.value=v.dashSize+v.gapSize,m.scale.value=v.scale}function l(m,v,_,M){m.diffuse.value.copy(v.color),m.opacity.value=v.opacity,m.size.value=v.size*_,m.scale.value=M*.5,v.map&&(m.map.value=v.map,n(v.map,m.uvTransform)),v.alphaMap&&(m.alphaMap.value=v.alphaMap,n(v.alphaMap,m.alphaMapTransform)),v.alphaTest>0&&(m.alphaTest.value=v.alphaTest)}function u(m,v){m.diffuse.value.copy(v.color),m.opacity.value=v.opacity,m.rotation.value=v.rotation,v.map&&(m.map.value=v.map,n(v.map,m.mapTransform)),v.alphaMap&&(m.alphaMap.value=v.alphaMap,n(v.alphaMap,m.alphaMapTransform)),v.alphaTest>0&&(m.alphaTest.value=v.alphaTest)}function c(m,v){m.specular.value.copy(v.specular),m.shininess.value=Math.max(v.shininess,1e-4)}function d(m,v){v.gradientMap&&(m.gradientMap.value=v.gradientMap)}function f(m,v){m.metalness.value=v.metalness,v.metalnessMap&&(m.metalnessMap.value=v.metalnessMap,n(v.metalnessMap,m.metalnessMapTransform)),m.roughness.value=v.roughness,v.roughnessMap&&(m.roughnessMap.value=v.roughnessMap,n(v.roughnessMap,m.roughnessMapTransform)),v.envMap&&(m.envMapIntensity.value=v.envMapIntensity)}function h(m,v,_){m.ior.value=v.ior,v.sheen>0&&(m.sheenColor.value.copy(v.sheenColor).multiplyScalar(v.sheen),m.sheenRoughness.value=v.sheenRoughness,v.sheenColorMap&&(m.sheenColorMap.value=v.sheenColorMap,n(v.sheenColorMap,m.sheenColorMapTransform)),v.sheenRoughnessMap&&(m.sheenRoughnessMap.value=v.sheenRoughnessMap,n(v.sheenRoughnessMap,m.sheenRoughnessMapTransform))),v.clearcoat>0&&(m.clearcoat.value=v.clearcoat,m.clearcoatRoughness.value=v.clearcoatRoughness,v.clearcoatMap&&(m.clearcoatMap.value=v.clearcoatMap,n(v.clearcoatMap,m.clearcoatMapTransform)),v.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=v.clearcoatRoughnessMap,n(v.clearcoatRoughnessMap,m.clearcoatRoughnessMapTransform)),v.clearcoatNormalMap&&(m.clearcoatNormalMap.value=v.clearcoatNormalMap,n(v.clearcoatNormalMap,m.clearcoatNormalMapTransform),m.clearcoatNormalScale.value.copy(v.clearcoatNormalScale),v.side===Wn&&m.clearcoatNormalScale.value.negate())),v.dispersion>0&&(m.dispersion.value=v.dispersion),v.iridescence>0&&(m.iridescence.value=v.iridescence,m.iridescenceIOR.value=v.iridescenceIOR,m.iridescenceThicknessMinimum.value=v.iridescenceThicknessRange[0],m.iridescenceThicknessMaximum.value=v.iridescenceThicknessRange[1],v.iridescenceMap&&(m.iridescenceMap.value=v.iridescenceMap,n(v.iridescenceMap,m.iridescenceMapTransform)),v.iridescenceThicknessMap&&(m.iridescenceThicknessMap.value=v.iridescenceThicknessMap,n(v.iridescenceThicknessMap,m.iridescenceThicknessMapTransform))),v.transmission>0&&(m.transmission.value=v.transmission,m.transmissionSamplerMap.value=_.texture,m.transmissionSamplerSize.value.set(_.width,_.height),v.transmissionMap&&(m.transmissionMap.value=v.transmissionMap,n(v.transmissionMap,m.transmissionMapTransform)),m.thickness.value=v.thickness,v.thicknessMap&&(m.thicknessMap.value=v.thicknessMap,n(v.thicknessMap,m.thicknessMapTransform)),m.attenuationDistance.value=v.attenuationDistance,m.attenuationColor.value.copy(v.attenuationColor)),v.anisotropy>0&&(m.anisotropyVector.value.set(v.anisotropy*Math.cos(v.anisotropyRotation),v.anisotropy*Math.sin(v.anisotropyRotation)),v.anisotropyMap&&(m.anisotropyMap.value=v.anisotropyMap,n(v.anisotropyMap,m.anisotropyMapTransform))),m.specularIntensity.value=v.specularIntensity,m.specularColor.value.copy(v.specularColor),v.specularColorMap&&(m.specularColorMap.value=v.specularColorMap,n(v.specularColorMap,m.specularColorMapTransform)),v.specularIntensityMap&&(m.specularIntensityMap.value=v.specularIntensityMap,n(v.specularIntensityMap,m.specularIntensityMapTransform))}function g(m,v){v.matcap&&(m.matcap.value=v.matcap)}function p(m,v){const _=t.get(v).light;m.referencePosition.value.setFromMatrixPosition(_.matrixWorld),m.nearDistance.value=_.shadow.camera.near,m.farDistance.value=_.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:a}}function QP(e,t,n,i){let a={},r={},s=[];const o=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS);function l(_,M){const x=M.program;i.uniformBlockBinding(_,x)}function u(_,M){let x=a[_.id];x===void 0&&(g(_),x=c(_),a[_.id]=x,_.addEventListener("dispose",m));const C=M.program;i.updateUBOMapping(_,C);const T=t.render.frame;r[_.id]!==T&&(f(_),r[_.id]=T)}function c(_){const M=d();_.__bindingPointIndex=M;const x=e.createBuffer(),C=_.__size,T=_.usage;return e.bindBuffer(e.UNIFORM_BUFFER,x),e.bufferData(e.UNIFORM_BUFFER,C,T),e.bindBuffer(e.UNIFORM_BUFFER,null),e.bindBufferBase(e.UNIFORM_BUFFER,M,x),x}function d(){for(let _=0;_<o;_++)if(s.indexOf(_)===-1)return s.push(_),_;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function f(_){const M=a[_.id],x=_.uniforms,C=_.__cache;e.bindBuffer(e.UNIFORM_BUFFER,M);for(let T=0,P=x.length;T<P;T++){const w=Array.isArray(x[T])?x[T]:[x[T]];for(let b=0,S=w.length;b<S;b++){const E=w[b];if(h(E,T,b,C)===!0){const R=E.__offset,L=Array.isArray(E.value)?E.value:[E.value];let O=0;for(let G=0;G<L.length;G++){const U=L[G],j=p(U);typeof U=="number"||typeof U=="boolean"?(E.__data[0]=U,e.bufferSubData(e.UNIFORM_BUFFER,R+O,E.__data)):U.isMatrix3?(E.__data[0]=U.elements[0],E.__data[1]=U.elements[1],E.__data[2]=U.elements[2],E.__data[3]=0,E.__data[4]=U.elements[3],E.__data[5]=U.elements[4],E.__data[6]=U.elements[5],E.__data[7]=0,E.__data[8]=U.elements[6],E.__data[9]=U.elements[7],E.__data[10]=U.elements[8],E.__data[11]=0):(U.toArray(E.__data,O),O+=j.storage/Float32Array.BYTES_PER_ELEMENT)}e.bufferSubData(e.UNIFORM_BUFFER,R,E.__data)}}}e.bindBuffer(e.UNIFORM_BUFFER,null)}function h(_,M,x,C){const T=_.value,P=M+"_"+x;if(C[P]===void 0)return typeof T=="number"||typeof T=="boolean"?C[P]=T:C[P]=T.clone(),!0;{const w=C[P];if(typeof T=="number"||typeof T=="boolean"){if(w!==T)return C[P]=T,!0}else if(w.equals(T)===!1)return w.copy(T),!0}return!1}function g(_){const M=_.uniforms;let x=0;const C=16;for(let P=0,w=M.length;P<w;P++){const b=Array.isArray(M[P])?M[P]:[M[P]];for(let S=0,E=b.length;S<E;S++){const R=b[S],L=Array.isArray(R.value)?R.value:[R.value];for(let O=0,G=L.length;O<G;O++){const U=L[O],j=p(U),B=x%C,X=B%j.boundary,W=B+X;x+=X,W!==0&&C-W<j.storage&&(x+=C-W),R.__data=new Float32Array(j.storage/Float32Array.BYTES_PER_ELEMENT),R.__offset=x,x+=j.storage}}}const T=x%C;return T>0&&(x+=C-T),_.__size=x,_.__cache={},this}function p(_){const M={boundary:0,storage:0};return typeof _=="number"||typeof _=="boolean"?(M.boundary=4,M.storage=4):_.isVector2?(M.boundary=8,M.storage=8):_.isVector3||_.isColor?(M.boundary=16,M.storage=12):_.isVector4?(M.boundary=16,M.storage=16):_.isMatrix3?(M.boundary=48,M.storage=48):_.isMatrix4?(M.boundary=64,M.storage=64):_.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",_),M}function m(_){const M=_.target;M.removeEventListener("dispose",m);const x=s.indexOf(M.__bindingPointIndex);s.splice(x,1),e.deleteBuffer(a[M.id]),delete a[M.id],delete r[M.id]}function v(){for(const _ in a)e.deleteBuffer(a[_]);s=[],a={},r={}}return{bind:l,update:u,dispose:v}}class eR{constructor(t={}){const{canvas:n=kw(),context:i=null,depth:a=!0,stencil:r=!1,alpha:s=!1,antialias:o=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:u=!1,powerPreference:c="default",failIfMajorPerformanceCaveat:d=!1,reverseDepthBuffer:f=!1}=t;this.isWebGLRenderer=!0;let h;if(i!==null){if(typeof WebGLRenderingContext<"u"&&i instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");h=i.getContextAttributes().alpha}else h=s;const g=new Uint32Array(4),p=new Int32Array(4);let m=null,v=null;const _=[],M=[];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=ci,this.toneMapping=za,this.toneMappingExposure=1;const x=this;let C=!1,T=0,P=0,w=null,b=-1,S=null;const E=new Jt,R=new Jt;let L=null;const O=new xt(0);let G=0,U=n.width,j=n.height,B=1,X=null,W=null;const H=new Jt(0,0,U,j),te=new Jt(0,0,U,j);let Se=!1;const $=new W_;let he=!1,ae=!1;this.transmissionResolutionScale=1;const Q=new jt,ve=new jt,Ge=new ce,Ae=new Jt,be={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let N=!1;function V(){return w===null?B:1}let I=i;function re(F,J){return n.getContext(F,J)}try{const F={alpha:!0,depth:a,stencil:r,antialias:o,premultipliedAlpha:l,preserveDrawingBuffer:u,powerPreference:c,failIfMajorPerformanceCaveat:d};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${Xh}`),n.addEventListener("webglcontextlost",Ee,!1),n.addEventListener("webglcontextrestored",ze,!1),n.addEventListener("webglcontextcreationerror",Be,!1),I===null){const J="webgl2";if(I=re(J,F),I===null)throw re(J)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(F){throw console.error("THREE.WebGLRenderer: "+F.message),F}let q,Z,oe,xe,ie,k,D,z,ne,ue,le,De,we,Le,Qe,Ce,Fe,qe,et,ke,nt,st,It,K;function Oe(){q=new c1(I),q.init(),st=new XP(I,q),Z=new i1(I,q,t,st),oe=new WP(I,q),Z.reverseDepthBuffer&&f&&oe.buffers.depth.setReversed(!0),xe=new h1(I),ie=new IP,k=new $P(I,q,oe,ie,Z,st,xe),D=new r1(x),z=new u1(x),ne=new _T(I),It=new t1(I,ne),ue=new d1(I,ne,xe,It),le=new v1(I,ue,ne,xe),et=new m1(I,Z,k),Ce=new a1(ie),De=new RP(x,D,z,q,Z,It,Ce),we=new JP(x,ie),Le=new LP,Qe=new UP(q),qe=new e1(x,D,z,oe,le,h,l),Fe=new HP(x,le,Z),K=new QP(I,xe,Z,oe),ke=new n1(I,q,xe),nt=new f1(I,q,xe),xe.programs=De.programs,x.capabilities=Z,x.extensions=q,x.properties=ie,x.renderLists=Le,x.shadowMap=Fe,x.state=oe,x.info=xe}Oe();const ye=new KP(x,I);this.xr=ye,this.getContext=function(){return I},this.getContextAttributes=function(){return I.getContextAttributes()},this.forceContextLoss=function(){const F=q.get("WEBGL_lose_context");F&&F.loseContext()},this.forceContextRestore=function(){const F=q.get("WEBGL_lose_context");F&&F.restoreContext()},this.getPixelRatio=function(){return B},this.setPixelRatio=function(F){F!==void 0&&(B=F,this.setSize(U,j,!1))},this.getSize=function(F){return F.set(U,j)},this.setSize=function(F,J,fe=!0){if(ye.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}U=F,j=J,n.width=Math.floor(F*B),n.height=Math.floor(J*B),fe===!0&&(n.style.width=F+"px",n.style.height=J+"px"),this.setViewport(0,0,F,J)},this.getDrawingBufferSize=function(F){return F.set(U*B,j*B).floor()},this.setDrawingBufferSize=function(F,J,fe){U=F,j=J,B=fe,n.width=Math.floor(F*fe),n.height=Math.floor(J*fe),this.setViewport(0,0,F,J)},this.getCurrentViewport=function(F){return F.copy(E)},this.getViewport=function(F){return F.copy(H)},this.setViewport=function(F,J,fe,me){F.isVector4?H.set(F.x,F.y,F.z,F.w):H.set(F,J,fe,me),oe.viewport(E.copy(H).multiplyScalar(B).round())},this.getScissor=function(F){return F.copy(te)},this.setScissor=function(F,J,fe,me){F.isVector4?te.set(F.x,F.y,F.z,F.w):te.set(F,J,fe,me),oe.scissor(R.copy(te).multiplyScalar(B).round())},this.getScissorTest=function(){return Se},this.setScissorTest=function(F){oe.setScissorTest(Se=F)},this.setOpaqueSort=function(F){X=F},this.setTransparentSort=function(F){W=F},this.getClearColor=function(F){return F.copy(qe.getClearColor())},this.setClearColor=function(){qe.setClearColor(...arguments)},this.getClearAlpha=function(){return qe.getClearAlpha()},this.setClearAlpha=function(){qe.setClearAlpha(...arguments)},this.clear=function(F=!0,J=!0,fe=!0){let me=0;if(F){let ee=!1;if(w!==null){const Pe=w.texture.format;ee=Pe===Jh||Pe===Zh||Pe===Kh}if(ee){const Pe=w.texture.type,Ue=Pe===fa||Pe===kr||Pe===Fo||Pe===Us||Pe===qh||Pe===jh,$e=qe.getClearColor(),Xe=qe.getClearAlpha(),it=$e.r,at=$e.g,je=$e.b;Ue?(g[0]=it,g[1]=at,g[2]=je,g[3]=Xe,I.clearBufferuiv(I.COLOR,0,g)):(p[0]=it,p[1]=at,p[2]=je,p[3]=Xe,I.clearBufferiv(I.COLOR,0,p))}else me|=I.COLOR_BUFFER_BIT}J&&(me|=I.DEPTH_BUFFER_BIT),fe&&(me|=I.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),I.clear(me)},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",Ee,!1),n.removeEventListener("webglcontextrestored",ze,!1),n.removeEventListener("webglcontextcreationerror",Be,!1),qe.dispose(),Le.dispose(),Qe.dispose(),ie.dispose(),D.dispose(),z.dispose(),le.dispose(),It.dispose(),K.dispose(),De.dispose(),ye.dispose(),ye.removeEventListener("sessionstart",Jm),ye.removeEventListener("sessionend",Qm),er.stop()};function Ee(F){F.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),C=!0}function ze(){console.log("THREE.WebGLRenderer: Context Restored."),C=!1;const F=xe.autoReset,J=Fe.enabled,fe=Fe.autoUpdate,me=Fe.needsUpdate,ee=Fe.type;Oe(),xe.autoReset=F,Fe.enabled=J,Fe.autoUpdate=fe,Fe.needsUpdate=me,Fe.type=ee}function Be(F){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",F.statusMessage)}function lt(F){const J=F.target;J.removeEventListener("dispose",lt),Xt(J)}function Xt(F){Mn(F),ie.remove(F)}function Mn(F){const J=ie.get(F).programs;J!==void 0&&(J.forEach(function(fe){De.releaseProgram(fe)}),F.isShaderMaterial&&De.releaseShaderCache(F))}this.renderBufferDirect=function(F,J,fe,me,ee,Pe){J===null&&(J=be);const Ue=ee.isMesh&&ee.matrixWorld.determinant()<0,$e=fS(F,J,fe,me,ee);oe.setMaterial(me,Ue);let Xe=fe.index,it=1;if(me.wireframe===!0){if(Xe=ue.getWireframeAttribute(fe),Xe===void 0)return;it=2}const at=fe.drawRange,je=fe.attributes.position;let yt=at.start*it,St=(at.start+at.count)*it;Pe!==null&&(yt=Math.max(yt,Pe.start*it),St=Math.min(St,(Pe.start+Pe.count)*it)),Xe!==null?(yt=Math.max(yt,0),St=Math.min(St,Xe.count)):je!=null&&(yt=Math.max(yt,0),St=Math.min(St,je.count));const tn=St-yt;if(tn<0||tn===1/0)return;It.setup(ee,me,$e,fe,Xe);let Yt,_t=ke;if(Xe!==null&&(Yt=ne.get(Xe),_t=nt,_t.setIndex(Yt)),ee.isMesh)me.wireframe===!0?(oe.setLineWidth(me.wireframeLinewidth*V()),_t.setMode(I.LINES)):_t.setMode(I.TRIANGLES);else if(ee.isLine){let Ke=me.linewidth;Ke===void 0&&(Ke=1),oe.setLineWidth(Ke*V()),ee.isLineSegments?_t.setMode(I.LINES):ee.isLineLoop?_t.setMode(I.LINE_LOOP):_t.setMode(I.LINE_STRIP)}else ee.isPoints?_t.setMode(I.POINTS):ee.isSprite&&_t.setMode(I.TRIANGLES);if(ee.isBatchedMesh)if(ee._multiDrawInstances!==null)mr("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),_t.renderMultiDrawInstances(ee._multiDrawStarts,ee._multiDrawCounts,ee._multiDrawCount,ee._multiDrawInstances);else if(q.get("WEBGL_multi_draw"))_t.renderMultiDraw(ee._multiDrawStarts,ee._multiDrawCounts,ee._multiDrawCount);else{const Ke=ee._multiDrawStarts,yn=ee._multiDrawCounts,Mt=ee._multiDrawCount,bi=Xe?ne.get(Xe).bytesPerElement:1,is=ie.get(me).currentProgram.getUniforms();for(let qn=0;qn<Mt;qn++)is.setValue(I,"_gl_DrawID",qn),_t.render(Ke[qn]/bi,yn[qn])}else if(ee.isInstancedMesh)_t.renderInstances(yt,tn,ee.count);else if(fe.isInstancedBufferGeometry){const Ke=fe._maxInstanceCount!==void 0?fe._maxInstanceCount:1/0,yn=Math.min(fe.instanceCount,Ke);_t.renderInstances(yt,tn,yn)}else _t.render(yt,tn)};function Tt(F,J,fe){F.transparent===!0&&F.side===ia&&F.forceSinglePass===!1?(F.side=Wn,F.needsUpdate=!0,xl(F,J,fe),F.side=Ha,F.needsUpdate=!0,xl(F,J,fe),F.side=ia):xl(F,J,fe)}this.compile=function(F,J,fe=null){fe===null&&(fe=F),v=Qe.get(fe),v.init(J),M.push(v),fe.traverseVisible(function(ee){ee.isLight&&ee.layers.test(J.layers)&&(v.pushLight(ee),ee.castShadow&&v.pushShadow(ee))}),F!==fe&&F.traverseVisible(function(ee){ee.isLight&&ee.layers.test(J.layers)&&(v.pushLight(ee),ee.castShadow&&v.pushShadow(ee))}),v.setupLights();const me=new Set;return F.traverse(function(ee){if(!(ee.isMesh||ee.isPoints||ee.isLine||ee.isSprite))return;const Pe=ee.material;if(Pe)if(Array.isArray(Pe))for(let Ue=0;Ue<Pe.length;Ue++){const $e=Pe[Ue];Tt($e,fe,ee),me.add($e)}else Tt(Pe,fe,ee),me.add(Pe)}),v=M.pop(),me},this.compileAsync=function(F,J,fe=null){const me=this.compile(F,J,fe);return new Promise(ee=>{function Pe(){if(me.forEach(function(Ue){ie.get(Ue).currentProgram.isReady()&&me.delete(Ue)}),me.size===0){ee(F);return}setTimeout(Pe,10)}q.get("KHR_parallel_shader_compile")!==null?Pe():setTimeout(Pe,10)})};let _i=null;function Xi(F){_i&&_i(F)}function Jm(){er.stop()}function Qm(){er.start()}const er=new q_;er.setAnimationLoop(Xi),typeof self<"u"&&er.setContext(self),this.setAnimationLoop=function(F){_i=F,ye.setAnimationLoop(F),F===null?er.stop():er.start()},ye.addEventListener("sessionstart",Jm),ye.addEventListener("sessionend",Qm),this.render=function(F,J){if(J!==void 0&&J.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(C===!0)return;if(F.matrixWorldAutoUpdate===!0&&F.updateMatrixWorld(),J.parent===null&&J.matrixWorldAutoUpdate===!0&&J.updateMatrixWorld(),ye.enabled===!0&&ye.isPresenting===!0&&(ye.cameraAutoUpdate===!0&&ye.updateCamera(J),J=ye.getCamera()),F.isScene===!0&&F.onBeforeRender(x,F,J,w),v=Qe.get(F,M.length),v.init(J),M.push(v),ve.multiplyMatrices(J.projectionMatrix,J.matrixWorldInverse),$.setFromProjectionMatrix(ve),ae=this.localClippingEnabled,he=Ce.init(this.clippingPlanes,ae),m=Le.get(F,_.length),m.init(),_.push(m),ye.enabled===!0&&ye.isPresenting===!0){const Pe=x.xr.getDepthSensingMesh();Pe!==null&&kc(Pe,J,-1/0,x.sortObjects)}kc(F,J,0,x.sortObjects),m.finish(),x.sortObjects===!0&&m.sort(X,W),N=ye.enabled===!1||ye.isPresenting===!1||ye.hasDepthSensing()===!1,N&&qe.addToRenderList(m,F),this.info.render.frame++,he===!0&&Ce.beginShadows();const fe=v.state.shadowsArray;Fe.render(fe,F,J),he===!0&&Ce.endShadows(),this.info.autoReset===!0&&this.info.reset();const me=m.opaque,ee=m.transmissive;if(v.setupLights(),J.isArrayCamera){const Pe=J.cameras;if(ee.length>0)for(let Ue=0,$e=Pe.length;Ue<$e;Ue++){const Xe=Pe[Ue];tv(me,ee,F,Xe)}N&&qe.render(F);for(let Ue=0,$e=Pe.length;Ue<$e;Ue++){const Xe=Pe[Ue];ev(m,F,Xe,Xe.viewport)}}else ee.length>0&&tv(me,ee,F,J),N&&qe.render(F),ev(m,F,J);w!==null&&P===0&&(k.updateMultisampleRenderTarget(w),k.updateRenderTargetMipmap(w)),F.isScene===!0&&F.onAfterRender(x,F,J),It.resetDefaultState(),b=-1,S=null,M.pop(),M.length>0?(v=M[M.length-1],he===!0&&Ce.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,_.pop(),_.length>0?m=_[_.length-1]:m=null};function kc(F,J,fe,me){if(F.visible===!1)return;if(F.layers.test(J.layers)){if(F.isGroup)fe=F.renderOrder;else if(F.isLOD)F.autoUpdate===!0&&F.update(J);else if(F.isLight)v.pushLight(F),F.castShadow&&v.pushShadow(F);else if(F.isSprite){if(!F.frustumCulled||$.intersectsSprite(F)){me&&Ae.setFromMatrixPosition(F.matrixWorld).applyMatrix4(ve);const Ue=le.update(F),$e=F.material;$e.visible&&m.push(F,Ue,$e,fe,Ae.z,null)}}else if((F.isMesh||F.isLine||F.isPoints)&&(!F.frustumCulled||$.intersectsObject(F))){const Ue=le.update(F),$e=F.material;if(me&&(F.boundingSphere!==void 0?(F.boundingSphere===null&&F.computeBoundingSphere(),Ae.copy(F.boundingSphere.center)):(Ue.boundingSphere===null&&Ue.computeBoundingSphere(),Ae.copy(Ue.boundingSphere.center)),Ae.applyMatrix4(F.matrixWorld).applyMatrix4(ve)),Array.isArray($e)){const Xe=Ue.groups;for(let it=0,at=Xe.length;it<at;it++){const je=Xe[it],yt=$e[je.materialIndex];yt&&yt.visible&&m.push(F,Ue,yt,fe,Ae.z,je)}}else $e.visible&&m.push(F,Ue,$e,fe,Ae.z,null)}}const Pe=F.children;for(let Ue=0,$e=Pe.length;Ue<$e;Ue++)kc(Pe[Ue],J,fe,me)}function ev(F,J,fe,me){const ee=F.opaque,Pe=F.transmissive,Ue=F.transparent;v.setupLightsView(fe),he===!0&&Ce.setGlobalState(x.clippingPlanes,fe),me&&oe.viewport(E.copy(me)),ee.length>0&&bl(ee,J,fe),Pe.length>0&&bl(Pe,J,fe),Ue.length>0&&bl(Ue,J,fe),oe.buffers.depth.setTest(!0),oe.buffers.depth.setMask(!0),oe.buffers.color.setMask(!0),oe.setPolygonOffset(!1)}function tv(F,J,fe,me){if((fe.isScene===!0?fe.overrideMaterial:null)!==null)return;v.state.transmissionRenderTarget[me.id]===void 0&&(v.state.transmissionRenderTarget[me.id]=new Vr(1,1,{generateMipmaps:!0,type:q.has("EXT_color_buffer_half_float")||q.has("EXT_color_buffer_float")?Qo:fa,minFilter:xr,samples:4,stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:bt.workingColorSpace}));const Pe=v.state.transmissionRenderTarget[me.id],Ue=me.viewport||E;Pe.setSize(Ue.z*x.transmissionResolutionScale,Ue.w*x.transmissionResolutionScale);const $e=x.getRenderTarget();x.setRenderTarget(Pe),x.getClearColor(O),G=x.getClearAlpha(),G<1&&x.setClearColor(16777215,.5),x.clear(),N&&qe.render(fe);const Xe=x.toneMapping;x.toneMapping=za;const it=me.viewport;if(me.viewport!==void 0&&(me.viewport=void 0),v.setupLightsView(me),he===!0&&Ce.setGlobalState(x.clippingPlanes,me),bl(F,fe,me),k.updateMultisampleRenderTarget(Pe),k.updateRenderTargetMipmap(Pe),q.has("WEBGL_multisampled_render_to_texture")===!1){let at=!1;for(let je=0,yt=J.length;je<yt;je++){const St=J[je],tn=St.object,Yt=St.geometry,_t=St.material,Ke=St.group;if(_t.side===ia&&tn.layers.test(me.layers)){const yn=_t.side;_t.side=Wn,_t.needsUpdate=!0,nv(tn,fe,me,Yt,_t,Ke),_t.side=yn,_t.needsUpdate=!0,at=!0}}at===!0&&(k.updateMultisampleRenderTarget(Pe),k.updateRenderTargetMipmap(Pe))}x.setRenderTarget($e),x.setClearColor(O,G),it!==void 0&&(me.viewport=it),x.toneMapping=Xe}function bl(F,J,fe){const me=J.isScene===!0?J.overrideMaterial:null;for(let ee=0,Pe=F.length;ee<Pe;ee++){const Ue=F[ee],$e=Ue.object,Xe=Ue.geometry,it=me===null?Ue.material:me,at=Ue.group;$e.layers.test(fe.layers)&&nv($e,J,fe,Xe,it,at)}}function nv(F,J,fe,me,ee,Pe){F.onBeforeRender(x,J,fe,me,ee,Pe),F.modelViewMatrix.multiplyMatrices(fe.matrixWorldInverse,F.matrixWorld),F.normalMatrix.getNormalMatrix(F.modelViewMatrix),ee.onBeforeRender(x,J,fe,me,F,Pe),ee.transparent===!0&&ee.side===ia&&ee.forceSinglePass===!1?(ee.side=Wn,ee.needsUpdate=!0,x.renderBufferDirect(fe,J,me,ee,F,Pe),ee.side=Ha,ee.needsUpdate=!0,x.renderBufferDirect(fe,J,me,ee,F,Pe),ee.side=ia):x.renderBufferDirect(fe,J,me,ee,F,Pe),F.onAfterRender(x,J,fe,me,ee,Pe)}function xl(F,J,fe){J.isScene!==!0&&(J=be);const me=ie.get(F),ee=v.state.lights,Pe=v.state.shadowsArray,Ue=ee.state.version,$e=De.getParameters(F,ee.state,Pe,J,fe),Xe=De.getProgramCacheKey($e);let it=me.programs;me.environment=F.isMeshStandardMaterial?J.environment:null,me.fog=J.fog,me.envMap=(F.isMeshStandardMaterial?z:D).get(F.envMap||me.environment),me.envMapRotation=me.environment!==null&&F.envMap===null?J.environmentRotation:F.envMapRotation,it===void 0&&(F.addEventListener("dispose",lt),it=new Map,me.programs=it);let at=it.get(Xe);if(at!==void 0){if(me.currentProgram===at&&me.lightsStateVersion===Ue)return av(F,$e),at}else $e.uniforms=De.getUniforms(F),F.onBeforeCompile($e,x),at=De.acquireProgram($e,Xe),it.set(Xe,at),me.uniforms=$e.uniforms;const je=me.uniforms;return(!F.isShaderMaterial&&!F.isRawShaderMaterial||F.clipping===!0)&&(je.clippingPlanes=Ce.uniform),av(F,$e),me.needsLights=mS(F),me.lightsStateVersion=Ue,me.needsLights&&(je.ambientLightColor.value=ee.state.ambient,je.lightProbe.value=ee.state.probe,je.directionalLights.value=ee.state.directional,je.directionalLightShadows.value=ee.state.directionalShadow,je.spotLights.value=ee.state.spot,je.spotLightShadows.value=ee.state.spotShadow,je.rectAreaLights.value=ee.state.rectArea,je.ltc_1.value=ee.state.rectAreaLTC1,je.ltc_2.value=ee.state.rectAreaLTC2,je.pointLights.value=ee.state.point,je.pointLightShadows.value=ee.state.pointShadow,je.hemisphereLights.value=ee.state.hemi,je.directionalShadowMap.value=ee.state.directionalShadowMap,je.directionalShadowMatrix.value=ee.state.directionalShadowMatrix,je.spotShadowMap.value=ee.state.spotShadowMap,je.spotLightMatrix.value=ee.state.spotLightMatrix,je.spotLightMap.value=ee.state.spotLightMap,je.pointShadowMap.value=ee.state.pointShadowMap,je.pointShadowMatrix.value=ee.state.pointShadowMatrix),me.currentProgram=at,me.uniformsList=null,at}function iv(F){if(F.uniformsList===null){const J=F.currentProgram.getUniforms();F.uniformsList=vu.seqWithValue(J.seq,F.uniforms)}return F.uniformsList}function av(F,J){const fe=ie.get(F);fe.outputColorSpace=J.outputColorSpace,fe.batching=J.batching,fe.batchingColor=J.batchingColor,fe.instancing=J.instancing,fe.instancingColor=J.instancingColor,fe.instancingMorph=J.instancingMorph,fe.skinning=J.skinning,fe.morphTargets=J.morphTargets,fe.morphNormals=J.morphNormals,fe.morphColors=J.morphColors,fe.morphTargetsCount=J.morphTargetsCount,fe.numClippingPlanes=J.numClippingPlanes,fe.numIntersection=J.numClipIntersection,fe.vertexAlphas=J.vertexAlphas,fe.vertexTangents=J.vertexTangents,fe.toneMapping=J.toneMapping}function fS(F,J,fe,me,ee){J.isScene!==!0&&(J=be),k.resetTextureUnits();const Pe=J.fog,Ue=me.isMeshStandardMaterial?J.environment:null,$e=w===null?x.outputColorSpace:w.isXRRenderTarget===!0?w.texture.colorSpace:zs,Xe=(me.isMeshStandardMaterial?z:D).get(me.envMap||Ue),it=me.vertexColors===!0&&!!fe.attributes.color&&fe.attributes.color.itemSize===4,at=!!fe.attributes.tangent&&(!!me.normalMap||me.anisotropy>0),je=!!fe.morphAttributes.position,yt=!!fe.morphAttributes.normal,St=!!fe.morphAttributes.color;let tn=za;me.toneMapped&&(w===null||w.isXRRenderTarget===!0)&&(tn=x.toneMapping);const Yt=fe.morphAttributes.position||fe.morphAttributes.normal||fe.morphAttributes.color,_t=Yt!==void 0?Yt.length:0,Ke=ie.get(me),yn=v.state.lights;if(he===!0&&(ae===!0||F!==S)){const Dn=F===S&&me.id===b;Ce.setState(me,F,Dn)}let Mt=!1;me.version===Ke.__version?(Ke.needsLights&&Ke.lightsStateVersion!==yn.state.version||Ke.outputColorSpace!==$e||ee.isBatchedMesh&&Ke.batching===!1||!ee.isBatchedMesh&&Ke.batching===!0||ee.isBatchedMesh&&Ke.batchingColor===!0&&ee.colorTexture===null||ee.isBatchedMesh&&Ke.batchingColor===!1&&ee.colorTexture!==null||ee.isInstancedMesh&&Ke.instancing===!1||!ee.isInstancedMesh&&Ke.instancing===!0||ee.isSkinnedMesh&&Ke.skinning===!1||!ee.isSkinnedMesh&&Ke.skinning===!0||ee.isInstancedMesh&&Ke.instancingColor===!0&&ee.instanceColor===null||ee.isInstancedMesh&&Ke.instancingColor===!1&&ee.instanceColor!==null||ee.isInstancedMesh&&Ke.instancingMorph===!0&&ee.morphTexture===null||ee.isInstancedMesh&&Ke.instancingMorph===!1&&ee.morphTexture!==null||Ke.envMap!==Xe||me.fog===!0&&Ke.fog!==Pe||Ke.numClippingPlanes!==void 0&&(Ke.numClippingPlanes!==Ce.numPlanes||Ke.numIntersection!==Ce.numIntersection)||Ke.vertexAlphas!==it||Ke.vertexTangents!==at||Ke.morphTargets!==je||Ke.morphNormals!==yt||Ke.morphColors!==St||Ke.toneMapping!==tn||Ke.morphTargetsCount!==_t)&&(Mt=!0):(Mt=!0,Ke.__version=me.version);let bi=Ke.currentProgram;Mt===!0&&(bi=xl(me,J,ee));let is=!1,qn=!1,ao=!1;const Ot=bi.getUniforms(),si=Ke.uniforms;if(oe.useProgram(bi.program)&&(is=!0,qn=!0,ao=!0),me.id!==b&&(b=me.id,qn=!0),is||S!==F){oe.buffers.depth.getReversed()?(Q.copy(F.projectionMatrix),Fw(Q),Nw(Q),Ot.setValue(I,"projectionMatrix",Q)):Ot.setValue(I,"projectionMatrix",F.projectionMatrix),Ot.setValue(I,"viewMatrix",F.matrixWorldInverse);const Hn=Ot.map.cameraPosition;Hn!==void 0&&Hn.setValue(I,Ge.setFromMatrixPosition(F.matrixWorld)),Z.logarithmicDepthBuffer&&Ot.setValue(I,"logDepthBufFC",2/(Math.log(F.far+1)/Math.LN2)),(me.isMeshPhongMaterial||me.isMeshToonMaterial||me.isMeshLambertMaterial||me.isMeshBasicMaterial||me.isMeshStandardMaterial||me.isShaderMaterial)&&Ot.setValue(I,"isOrthographic",F.isOrthographicCamera===!0),S!==F&&(S=F,qn=!0,ao=!0)}if(ee.isSkinnedMesh){Ot.setOptional(I,ee,"bindMatrix"),Ot.setOptional(I,ee,"bindMatrixInverse");const Dn=ee.skeleton;Dn&&(Dn.boneTexture===null&&Dn.computeBoneTexture(),Ot.setValue(I,"boneTexture",Dn.boneTexture,k))}ee.isBatchedMesh&&(Ot.setOptional(I,ee,"batchingTexture"),Ot.setValue(I,"batchingTexture",ee._matricesTexture,k),Ot.setOptional(I,ee,"batchingIdTexture"),Ot.setValue(I,"batchingIdTexture",ee._indirectTexture,k),Ot.setOptional(I,ee,"batchingColorTexture"),ee._colorsTexture!==null&&Ot.setValue(I,"batchingColorTexture",ee._colorsTexture,k));const oi=fe.morphAttributes;if((oi.position!==void 0||oi.normal!==void 0||oi.color!==void 0)&&et.update(ee,fe,bi),(qn||Ke.receiveShadow!==ee.receiveShadow)&&(Ke.receiveShadow=ee.receiveShadow,Ot.setValue(I,"receiveShadow",ee.receiveShadow)),me.isMeshGouraudMaterial&&me.envMap!==null&&(si.envMap.value=Xe,si.flipEnvMap.value=Xe.isCubeTexture&&Xe.isRenderTargetTexture===!1?-1:1),me.isMeshStandardMaterial&&me.envMap===null&&J.environment!==null&&(si.envMapIntensity.value=J.environmentIntensity),qn&&(Ot.setValue(I,"toneMappingExposure",x.toneMappingExposure),Ke.needsLights&&hS(si,ao),Pe&&me.fog===!0&&we.refreshFogUniforms(si,Pe),we.refreshMaterialUniforms(si,me,B,j,v.state.transmissionRenderTarget[F.id]),vu.upload(I,iv(Ke),si,k)),me.isShaderMaterial&&me.uniformsNeedUpdate===!0&&(vu.upload(I,iv(Ke),si,k),me.uniformsNeedUpdate=!1),me.isSpriteMaterial&&Ot.setValue(I,"center",ee.center),Ot.setValue(I,"modelViewMatrix",ee.modelViewMatrix),Ot.setValue(I,"normalMatrix",ee.normalMatrix),Ot.setValue(I,"modelMatrix",ee.matrixWorld),me.isShaderMaterial||me.isRawShaderMaterial){const Dn=me.uniformsGroups;for(let Hn=0,Vc=Dn.length;Hn<Vc;Hn++){const tr=Dn[Hn];K.update(tr,bi),K.bind(tr,bi)}}return bi}function hS(F,J){F.ambientLightColor.needsUpdate=J,F.lightProbe.needsUpdate=J,F.directionalLights.needsUpdate=J,F.directionalLightShadows.needsUpdate=J,F.pointLights.needsUpdate=J,F.pointLightShadows.needsUpdate=J,F.spotLights.needsUpdate=J,F.spotLightShadows.needsUpdate=J,F.rectAreaLights.needsUpdate=J,F.hemisphereLights.needsUpdate=J}function mS(F){return F.isMeshLambertMaterial||F.isMeshToonMaterial||F.isMeshPhongMaterial||F.isMeshStandardMaterial||F.isShadowMaterial||F.isShaderMaterial&&F.lights===!0}this.getActiveCubeFace=function(){return T},this.getActiveMipmapLevel=function(){return P},this.getRenderTarget=function(){return w},this.setRenderTargetTextures=function(F,J,fe){ie.get(F.texture).__webglTexture=J,ie.get(F.depthTexture).__webglTexture=fe;const me=ie.get(F);me.__hasExternalTextures=!0,me.__autoAllocateDepthBuffer=fe===void 0,me.__autoAllocateDepthBuffer||q.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),me.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(F,J){const fe=ie.get(F);fe.__webglFramebuffer=J,fe.__useDefaultFramebuffer=J===void 0};const vS=I.createFramebuffer();this.setRenderTarget=function(F,J=0,fe=0){w=F,T=J,P=fe;let me=!0,ee=null,Pe=!1,Ue=!1;if(F){const Xe=ie.get(F);if(Xe.__useDefaultFramebuffer!==void 0)oe.bindFramebuffer(I.FRAMEBUFFER,null),me=!1;else if(Xe.__webglFramebuffer===void 0)k.setupRenderTarget(F);else if(Xe.__hasExternalTextures)k.rebindTextures(F,ie.get(F.texture).__webglTexture,ie.get(F.depthTexture).__webglTexture);else if(F.depthBuffer){const je=F.depthTexture;if(Xe.__boundDepthTexture!==je){if(je!==null&&ie.has(je)&&(F.width!==je.image.width||F.height!==je.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");k.setupDepthRenderbuffer(F)}}const it=F.texture;(it.isData3DTexture||it.isDataArrayTexture||it.isCompressedArrayTexture)&&(Ue=!0);const at=ie.get(F).__webglFramebuffer;F.isWebGLCubeRenderTarget?(Array.isArray(at[J])?ee=at[J][fe]:ee=at[J],Pe=!0):F.samples>0&&k.useMultisampledRTT(F)===!1?ee=ie.get(F).__webglMultisampledFramebuffer:Array.isArray(at)?ee=at[fe]:ee=at,E.copy(F.viewport),R.copy(F.scissor),L=F.scissorTest}else E.copy(H).multiplyScalar(B).floor(),R.copy(te).multiplyScalar(B).floor(),L=Se;if(fe!==0&&(ee=vS),oe.bindFramebuffer(I.FRAMEBUFFER,ee)&&me&&oe.drawBuffers(F,ee),oe.viewport(E),oe.scissor(R),oe.setScissorTest(L),Pe){const Xe=ie.get(F.texture);I.framebufferTexture2D(I.FRAMEBUFFER,I.COLOR_ATTACHMENT0,I.TEXTURE_CUBE_MAP_POSITIVE_X+J,Xe.__webglTexture,fe)}else if(Ue){const Xe=ie.get(F.texture),it=J;I.framebufferTextureLayer(I.FRAMEBUFFER,I.COLOR_ATTACHMENT0,Xe.__webglTexture,fe,it)}else if(F!==null&&fe!==0){const Xe=ie.get(F.texture);I.framebufferTexture2D(I.FRAMEBUFFER,I.COLOR_ATTACHMENT0,I.TEXTURE_2D,Xe.__webglTexture,fe)}b=-1},this.readRenderTargetPixels=function(F,J,fe,me,ee,Pe,Ue){if(!(F&&F.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let $e=ie.get(F).__webglFramebuffer;if(F.isWebGLCubeRenderTarget&&Ue!==void 0&&($e=$e[Ue]),$e){oe.bindFramebuffer(I.FRAMEBUFFER,$e);try{const Xe=F.texture,it=Xe.format,at=Xe.type;if(!Z.textureFormatReadable(it)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Z.textureTypeReadable(at)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}J>=0&&J<=F.width-me&&fe>=0&&fe<=F.height-ee&&I.readPixels(J,fe,me,ee,st.convert(it),st.convert(at),Pe)}finally{const Xe=w!==null?ie.get(w).__webglFramebuffer:null;oe.bindFramebuffer(I.FRAMEBUFFER,Xe)}}},this.readRenderTargetPixelsAsync=async function(F,J,fe,me,ee,Pe,Ue){if(!(F&&F.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let $e=ie.get(F).__webglFramebuffer;if(F.isWebGLCubeRenderTarget&&Ue!==void 0&&($e=$e[Ue]),$e){const Xe=F.texture,it=Xe.format,at=Xe.type;if(!Z.textureFormatReadable(it))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Z.textureTypeReadable(at))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(J>=0&&J<=F.width-me&&fe>=0&&fe<=F.height-ee){oe.bindFramebuffer(I.FRAMEBUFFER,$e);const je=I.createBuffer();I.bindBuffer(I.PIXEL_PACK_BUFFER,je),I.bufferData(I.PIXEL_PACK_BUFFER,Pe.byteLength,I.STREAM_READ),I.readPixels(J,fe,me,ee,st.convert(it),st.convert(at),0);const yt=w!==null?ie.get(w).__webglFramebuffer:null;oe.bindFramebuffer(I.FRAMEBUFFER,yt);const St=I.fenceSync(I.SYNC_GPU_COMMANDS_COMPLETE,0);return I.flush(),await Vw(I,St,4),I.bindBuffer(I.PIXEL_PACK_BUFFER,je),I.getBufferSubData(I.PIXEL_PACK_BUFFER,0,Pe),I.deleteBuffer(je),I.deleteSync(St),Pe}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(F,J=null,fe=0){F.isTexture!==!0&&(mr("WebGLRenderer: copyFramebufferToTexture function signature has changed."),J=arguments[0]||null,F=arguments[1]);const me=Math.pow(2,-fe),ee=Math.floor(F.image.width*me),Pe=Math.floor(F.image.height*me),Ue=J!==null?J.x:0,$e=J!==null?J.y:0;k.setTexture2D(F,0),I.copyTexSubImage2D(I.TEXTURE_2D,fe,0,0,Ue,$e,ee,Pe),oe.unbindTexture()};const gS=I.createFramebuffer(),pS=I.createFramebuffer();this.copyTextureToTexture=function(F,J,fe=null,me=null,ee=0,Pe=null){F.isTexture!==!0&&(mr("WebGLRenderer: copyTextureToTexture function signature has changed."),me=arguments[0]||null,F=arguments[1],J=arguments[2],Pe=arguments[3]||0,fe=null),Pe===null&&(ee!==0?(mr("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),Pe=ee,ee=0):Pe=0);let Ue,$e,Xe,it,at,je,yt,St,tn;const Yt=F.isCompressedTexture?F.mipmaps[Pe]:F.image;if(fe!==null)Ue=fe.max.x-fe.min.x,$e=fe.max.y-fe.min.y,Xe=fe.isBox3?fe.max.z-fe.min.z:1,it=fe.min.x,at=fe.min.y,je=fe.isBox3?fe.min.z:0;else{const oi=Math.pow(2,-ee);Ue=Math.floor(Yt.width*oi),$e=Math.floor(Yt.height*oi),F.isDataArrayTexture?Xe=Yt.depth:F.isData3DTexture?Xe=Math.floor(Yt.depth*oi):Xe=1,it=0,at=0,je=0}me!==null?(yt=me.x,St=me.y,tn=me.z):(yt=0,St=0,tn=0);const _t=st.convert(J.format),Ke=st.convert(J.type);let yn;J.isData3DTexture?(k.setTexture3D(J,0),yn=I.TEXTURE_3D):J.isDataArrayTexture||J.isCompressedArrayTexture?(k.setTexture2DArray(J,0),yn=I.TEXTURE_2D_ARRAY):(k.setTexture2D(J,0),yn=I.TEXTURE_2D),I.pixelStorei(I.UNPACK_FLIP_Y_WEBGL,J.flipY),I.pixelStorei(I.UNPACK_PREMULTIPLY_ALPHA_WEBGL,J.premultiplyAlpha),I.pixelStorei(I.UNPACK_ALIGNMENT,J.unpackAlignment);const Mt=I.getParameter(I.UNPACK_ROW_LENGTH),bi=I.getParameter(I.UNPACK_IMAGE_HEIGHT),is=I.getParameter(I.UNPACK_SKIP_PIXELS),qn=I.getParameter(I.UNPACK_SKIP_ROWS),ao=I.getParameter(I.UNPACK_SKIP_IMAGES);I.pixelStorei(I.UNPACK_ROW_LENGTH,Yt.width),I.pixelStorei(I.UNPACK_IMAGE_HEIGHT,Yt.height),I.pixelStorei(I.UNPACK_SKIP_PIXELS,it),I.pixelStorei(I.UNPACK_SKIP_ROWS,at),I.pixelStorei(I.UNPACK_SKIP_IMAGES,je);const Ot=F.isDataArrayTexture||F.isData3DTexture,si=J.isDataArrayTexture||J.isData3DTexture;if(F.isDepthTexture){const oi=ie.get(F),Dn=ie.get(J),Hn=ie.get(oi.__renderTarget),Vc=ie.get(Dn.__renderTarget);oe.bindFramebuffer(I.READ_FRAMEBUFFER,Hn.__webglFramebuffer),oe.bindFramebuffer(I.DRAW_FRAMEBUFFER,Vc.__webglFramebuffer);for(let tr=0;tr<Xe;tr++)Ot&&(I.framebufferTextureLayer(I.READ_FRAMEBUFFER,I.COLOR_ATTACHMENT0,ie.get(F).__webglTexture,ee,je+tr),I.framebufferTextureLayer(I.DRAW_FRAMEBUFFER,I.COLOR_ATTACHMENT0,ie.get(J).__webglTexture,Pe,tn+tr)),I.blitFramebuffer(it,at,Ue,$e,yt,St,Ue,$e,I.DEPTH_BUFFER_BIT,I.NEAREST);oe.bindFramebuffer(I.READ_FRAMEBUFFER,null),oe.bindFramebuffer(I.DRAW_FRAMEBUFFER,null)}else if(ee!==0||F.isRenderTargetTexture||ie.has(F)){const oi=ie.get(F),Dn=ie.get(J);oe.bindFramebuffer(I.READ_FRAMEBUFFER,gS),oe.bindFramebuffer(I.DRAW_FRAMEBUFFER,pS);for(let Hn=0;Hn<Xe;Hn++)Ot?I.framebufferTextureLayer(I.READ_FRAMEBUFFER,I.COLOR_ATTACHMENT0,oi.__webglTexture,ee,je+Hn):I.framebufferTexture2D(I.READ_FRAMEBUFFER,I.COLOR_ATTACHMENT0,I.TEXTURE_2D,oi.__webglTexture,ee),si?I.framebufferTextureLayer(I.DRAW_FRAMEBUFFER,I.COLOR_ATTACHMENT0,Dn.__webglTexture,Pe,tn+Hn):I.framebufferTexture2D(I.DRAW_FRAMEBUFFER,I.COLOR_ATTACHMENT0,I.TEXTURE_2D,Dn.__webglTexture,Pe),ee!==0?I.blitFramebuffer(it,at,Ue,$e,yt,St,Ue,$e,I.COLOR_BUFFER_BIT,I.NEAREST):si?I.copyTexSubImage3D(yn,Pe,yt,St,tn+Hn,it,at,Ue,$e):I.copyTexSubImage2D(yn,Pe,yt,St,it,at,Ue,$e);oe.bindFramebuffer(I.READ_FRAMEBUFFER,null),oe.bindFramebuffer(I.DRAW_FRAMEBUFFER,null)}else si?F.isDataTexture||F.isData3DTexture?I.texSubImage3D(yn,Pe,yt,St,tn,Ue,$e,Xe,_t,Ke,Yt.data):J.isCompressedArrayTexture?I.compressedTexSubImage3D(yn,Pe,yt,St,tn,Ue,$e,Xe,_t,Yt.data):I.texSubImage3D(yn,Pe,yt,St,tn,Ue,$e,Xe,_t,Ke,Yt):F.isDataTexture?I.texSubImage2D(I.TEXTURE_2D,Pe,yt,St,Ue,$e,_t,Ke,Yt.data):F.isCompressedTexture?I.compressedTexSubImage2D(I.TEXTURE_2D,Pe,yt,St,Yt.width,Yt.height,_t,Yt.data):I.texSubImage2D(I.TEXTURE_2D,Pe,yt,St,Ue,$e,_t,Ke,Yt);I.pixelStorei(I.UNPACK_ROW_LENGTH,Mt),I.pixelStorei(I.UNPACK_IMAGE_HEIGHT,bi),I.pixelStorei(I.UNPACK_SKIP_PIXELS,is),I.pixelStorei(I.UNPACK_SKIP_ROWS,qn),I.pixelStorei(I.UNPACK_SKIP_IMAGES,ao),Pe===0&&J.generateMipmaps&&I.generateMipmap(yn),oe.unbindTexture()},this.copyTextureToTexture3D=function(F,J,fe=null,me=null,ee=0){return F.isTexture!==!0&&(mr("WebGLRenderer: copyTextureToTexture3D function signature has changed."),fe=arguments[0]||null,me=arguments[1]||null,F=arguments[2],J=arguments[3],ee=arguments[4]||0),mr('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(F,J,fe,me,ee)},this.initRenderTarget=function(F){ie.get(F).__webglFramebuffer===void 0&&k.setupRenderTarget(F)},this.initTexture=function(F){F.isCubeTexture?k.setTextureCube(F,0):F.isData3DTexture?k.setTexture3D(F,0):F.isDataArrayTexture||F.isCompressedArrayTexture?k.setTexture2DArray(F,0):k.setTexture2D(F,0),oe.unbindTexture()},this.resetState=function(){T=0,P=0,w=null,oe.reset(),It.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return ra}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const n=this.getContext();n.drawingBufferColorspace=bt._getDrawingBufferColorSpace(t),n.unpackColorSpace=bt._getUnpackColorSpace()}}function tR(e){return ay()?(Sn(e),!0):!1}const wd=new WeakMap,nR=(...e)=>{var t;const n=e[0],i=(t=Xr())==null?void 0:t.proxy;if(i==null&&!$y())throw new Error("injectLocal must be called in setup");return i&&wd.has(i)&&n in wd.get(i)?wd.get(i)[n]:ot(...e)},iR=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const aR=Object.prototype.toString,rR=e=>aR.call(e)==="[object Object]";function sR(e,t){var n;if(typeof e=="number")return e+t;const i=((n=e.match(/^-?\d+\.?\d*/))==null?void 0:n[0])||"",a=e.slice(i.length),r=Number.parseFloat(i)+t;return Number.isNaN(r)?e:r+a}function Ao(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function Td(e){return Array.isArray(e)?e:[e]}function oR(e){return Xr()}function lR(e,t=!0,n){oR()?Zt(e,n):t?e():ft(e)}function uR(e,t,n){return Te(e,t,{...n,immediate:!0})}const rl=iR?window:void 0;function Q_(e){var t;const n=Ua(e);return(t=n==null?void 0:n.$el)!=null?t:n}function Na(...e){const t=[],n=()=>{t.forEach(o=>o()),t.length=0},i=(o,l,u,c)=>(o.addEventListener(l,u,c),()=>o.removeEventListener(l,u,c)),a=A(()=>{const o=Td(Ua(e[0])).filter(l=>l!=null);return o.every(l=>typeof l!="string")?o:void 0}),r=uR(()=>{var o,l;return[(l=(o=a.value)==null?void 0:o.map(u=>Q_(u)))!=null?l:[rl].filter(u=>u!=null),Td(Ua(a.value?e[1]:e[0])),Td(on(a.value?e[2]:e[1])),Ua(a.value?e[3]:e[2])]},([o,l,u,c])=>{if(n(),!(o!=null&&o.length)||!(l!=null&&l.length)||!(u!=null&&u.length))return;const d=rR(c)?{...c}:c;t.push(...o.flatMap(f=>l.flatMap(h=>u.map(g=>i(f,h,g,d)))))},{flush:"post"}),s=()=>{r(),n()};return tR(n),s}function cR(){const e=Me(!1),t=Xr();return t&&Zt(()=>{e.value=!0},t),e}function dR(e){const t=cR();return A(()=>(t.value,!!e()))}const fR=Symbol("vueuse-ssr-width");function eb(){const e=$y()?nR(fR,null):null;return typeof e=="number"?e:void 0}function vo(e,t={}){const{window:n=rl,ssrWidth:i=eb()}=t,a=dR(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),r=Me(typeof i=="number"),s=Me(),o=Me(!1),l=u=>{o.value=u.matches};return Bt(()=>{if(r.value){r.value=!a.value;const u=Ua(e).split(",");o.value=u.some(c=>{const d=c.includes("not all"),f=c.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),h=c.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let g=!!(f||h);return f&&g&&(g=i>=Ao(f[1])),h&&g&&(g=i<=Ao(h[1])),d?!g:g});return}a.value&&(s.value=n.matchMedia(Ua(e)),o.value=s.value.matches)}),Na(s,"change",l,{passive:!0}),A(()=>o.value)}function hR(e,t={}){function n(h,g){let p=Ua(e[Ua(h)]);return g!=null&&(p=sR(p,g)),typeof p=="number"&&(p=`${p}px`),p}const{window:i=rl,strategy:a="min-width",ssrWidth:r=eb()}=t,s=typeof r=="number",o=s?Me(!1):{value:!0};s&&lR(()=>o.value=!!i);function l(h,g){return!o.value&&s?h==="min"?r>=Ao(g):r<=Ao(g):i?i.matchMedia(`(${h}-width: ${g})`).matches:!1}const u=h=>vo(()=>`(min-width: ${n(h)})`,t),c=h=>vo(()=>`(max-width: ${n(h)})`,t),d=Object.keys(e).reduce((h,g)=>(Object.defineProperty(h,g,{get:()=>a==="min-width"?u(g):c(g),enumerable:!0,configurable:!0}),h),{});function f(){const h=Object.keys(e).map(g=>[g,d[g],Ao(n(g))]).sort((g,p)=>g[2]-p[2]);return A(()=>h.filter(([,g])=>g.value).map(([g])=>g))}return Object.assign(d,{greaterOrEqual:u,smallerOrEqual:c,greater(h){return vo(()=>`(min-width: ${n(h,.1)})`,t)},smaller(h){return vo(()=>`(max-width: ${n(h,-.1)})`,t)},between(h,g){return vo(()=>`(min-width: ${n(h)}) and (max-width: ${n(g,-.1)})`,t)},isGreater(h){return l("min",n(h,.1))},isGreaterOrEqual(h){return l("min",n(h))},isSmaller(h){return l("max",n(h,-.1))},isSmallerOrEqual(h){return l("max",n(h))},isInBetween(h,g){return l("min",n(h))&&l("max",n(g,-.1))},current:f,active(){const h=f();return A(()=>h.value.length===0?"":h.value.at(a==="min-width"?-1:0))}})}const mR={page:e=>[e.pageX,e.pageY],client:e=>[e.clientX,e.clientY],screen:e=>[e.screenX,e.screenY],movement:e=>e instanceof MouseEvent?[e.movementX,e.movementY]:null};function vR(e={}){const{type:t="page",touch:n=!0,resetOnTouchEnds:i=!1,initialValue:a={x:0,y:0},window:r=rl,target:s=r,scroll:o=!0,eventFilter:l}=e;let u=null,c=0,d=0;const f=Me(a.x),h=Me(a.y),g=Me(null),p=typeof t=="function"?t:mR[t],m=P=>{const w=p(P);u=P,w&&([f.value,h.value]=w,g.value="mouse"),r&&(c=r.scrollX,d=r.scrollY)},v=P=>{if(P.touches.length>0){const w=p(P.touches[0]);w&&([f.value,h.value]=w,g.value="touch")}},_=()=>{if(!u||!r)return;const P=p(u);u instanceof MouseEvent&&P&&(f.value=P[0]+r.scrollX-c,h.value=P[1]+r.scrollY-d)},M=()=>{f.value=a.x,h.value=a.y},x=l?P=>l(()=>m(P),{}):P=>m(P),C=l?P=>l(()=>v(P),{}):P=>v(P),T=l?()=>l(()=>_(),{}):()=>_();if(s){const P={passive:!0};Na(s,["mousemove","dragover"],x,P),n&&t!=="movement"&&(Na(s,["touchstart","touchmove"],C,P),i&&Na(s,"touchend",M,P)),o&&t==="page"&&Na(r,"scroll",T,P)}return{x:f,y:h,sourceType:g}}function gR(e,t={}){const{handleOutside:n=!0,window:i=rl}=t,a=t.type||"page",{x:r,y:s,sourceType:o}=vR(t),l=Me(e??(i==null?void 0:i.document.body)),u=Me(0),c=Me(0),d=Me(0),f=Me(0),h=Me(0),g=Me(0),p=Me(!0);let m=()=>{};return i&&(m=Te([l,r,s],()=>{const v=Q_(l);if(!v||!(v instanceof Element))return;const{left:_,top:M,width:x,height:C}=v.getBoundingClientRect();d.value=_+(a==="page"?i.pageXOffset:0),f.value=M+(a==="page"?i.pageYOffset:0),h.value=C,g.value=x;const T=r.value-d.value,P=s.value-f.value;p.value=x===0||C===0||T<0||P<0||T>x||P>C,(n||!p.value)&&(u.value=T,c.value=P)},{immediate:!0}),Na(document,"mouseleave",()=>p.value=!0,{passive:!0})),{x:r,y:s,sourceType:o,elementX:u,elementY:c,elementPositionX:d,elementPositionY:f,elementHeight:h,elementWidth:g,isOutside:p,stop:m}}const sl=(e,t)=>{const n=e.__vccOpts||e;for(const[i,a]of t)n[i]=a;return n},pR={__name:"ParticleBackground",setup(e){const t=_e(null),a=hR({mobile:640,tablet:1024}).smaller("tablet").value?800:1500,r={particleSize:1.5,systemRadius:15,baseSpeed:.2,hoverRadius:3,color:8046056,lineColor:5943510,lineDistance:2.5};let s,o,l,u,c,d={x:0,y:0};const f=()=>{s=new lT,s.background=new xt(0),s.fog=new tm(0,.001),o=new di(75,window.innerWidth/window.innerHeight,.1,1e3),o.position.z=25,l=new eR({canvas:t.value,antialias:!0,alpha:!0}),l.setPixelRatio(Math.min(window.devicePixelRatio,2)),l.setSize(window.innerWidth,window.innerHeight),h(),p()},h=()=>{const _=new Ri,M=new Float32Array(a*3),x=new Float32Array(a);for(let T=0;T<a;T++){const P=T*3,w=r.systemRadius*Math.random(),b=Math.random()*Math.PI*2,S=Math.acos(2*Math.random()-1);M[P]=w*Math.sin(S)*Math.cos(b),M[P+1]=w*Math.sin(S)*Math.sin(b),M[P+2]=w*Math.cos(S),x[T]=r.particleSize*(.5+Math.random()*.5)}_.setAttribute("position",new ti(M,3)),_.setAttribute("size",new ti(x,1));const C=new X_({color:r.color,size:r.particleSize,sizeAttenuation:!0,transparent:!0,opacity:.8,blending:Pu});u=new hT(_,C),s.add(u),g(M)},g=_=>{const M=new Ri,x=new Float32Array(a*3*2);let C=0;for(let P=0;P<a;P++){const w=P*3,b=new ce(_[w],_[w+1],_[w+2]);for(let S=P+1;S<Math.min(P+20,a);S++){const E=S*3,R=new ce(_[E],_[E+1],_[E+2]);b.distanceTo(R)<r.lineDistance&&(x[C++]=b.x,x[C++]=b.y,x[C++]=b.z,x[C++]=R.x,x[C++]=R.y,x[C++]=R.z)}}M.setAttribute("position",new ti(x,3));const T=new $_({color:r.lineColor,transparent:!0,opacity:.15,blending:Pu});c=new fT(M,T),s.add(c)},p=()=>{requestAnimationFrame(p);const _=u.geometry.attributes.position.array,M=Date.now()*1e-4*r.baseSpeed;for(let x=0;x<a;x++){const C=x*3;_[C]+=Math.sin(M+x)*.01,_[C+1]+=Math.cos(M+x*.5)*.01,_[C+2]+=Math.sin(M*.5+x)*.01;const T=_[C]-d.x*20,P=_[C+1]-d.y*20;Math.sqrt(T*T+P*P)<r.hoverRadius&&(_[C]+=T*.05,_[C+1]+=P*.05)}u.geometry.attributes.position.needsUpdate=!0,l.render(s,o)},m=()=>{o.aspect=window.innerWidth/window.innerHeight,o.updateProjectionMatrix(),l.setSize(window.innerWidth,window.innerHeight)},v=_=>{d.x=_.clientX/window.innerWidth*2-1,d.y=-(_.clientY/window.innerHeight)*2+1};return Zt(()=>{f(),window.addEventListener("resize",m),window.addEventListener("mousemove",v)}),$r(()=>{window.removeEventListener("resize",m),window.removeEventListener("mousemove",v),l&&l.dispose()}),(_,M)=>(Zn(),Oi("canvas",{ref_key:"canvasRef",ref:t,class:"particle-canvas","aria-hidden":"true"},null,512))}},yR=sl(pR,[["__scopeId","data-v-35817899"]]);function zn(e,t){let n;function i(){n=wh(),n.run(()=>t.length?t(()=>{n==null||n.stop(),i()}):t())}Te(e,a=>{a&&!n?i():a||(n==null||n.stop(),n=void 0)},{immediate:!0}),Sn(()=>{n==null||n.stop()})}const mt=typeof window<"u",im=mt&&"IntersectionObserver"in window,_R=mt&&("ontouchstart"in window||window.navigator.maxTouchPoints>0),$g=mt&&"EyeDropper"in window;function Xg(e,t,n){bR(e,t),t.set(e,n)}function bR(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function xR(e,t,n){return e.set(tb(e,t),n),n}function dr(e,t){return e.get(tb(e,t))}function tb(e,t,n){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function nb(e,t,n){const i=t.length-1;if(i<0)return e===void 0?n:e;for(let a=0;a<i;a++){if(e==null)return n;e=e[t[a]]}return e==null||e[t[i]]===void 0?n:e[t[i]]}function Rn(e,t){if(e===t)return!0;if(e instanceof Date&&t instanceof Date&&e.getTime()!==t.getTime()||e!==Object(e)||t!==Object(t))return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(i=>Rn(e[i],t[i]))}function Fr(e,t,n){return e==null||!t||typeof t!="string"?n:e[t]!==void 0?e[t]:(t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,""),nb(e,t.split("."),n))}function an(e,t,n){if(t===!0)return e===void 0?n:e;if(t==null||typeof t=="boolean")return n;if(e!==Object(e)){if(typeof t!="function")return n;const a=t(e,n);return typeof a>"u"?n:a}if(typeof t=="string")return Fr(e,t,n);if(Array.isArray(t))return nb(e,t,n);if(typeof t!="function")return n;const i=t(e,n);return typeof i>"u"?n:i}function Bi(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.from({length:e},(n,i)=>t+i)}function Re(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"px";if(e==null||e==="")return;const n=Number(e);return isNaN(n)?String(e):isFinite(n)?`${n}${t}`:void 0}function nc(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Yg(e){let t;return e!==null&&typeof e=="object"&&((t=Object.getPrototypeOf(e))===Object.prototype||t===null)}function am(e){if(e&&"$el"in e){const t=e.$el;return(t==null?void 0:t.nodeType)===Node.TEXT_NODE?t.nextElementSibling:t}return e}const qg=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34,shift:16}),Bf=Object.freeze({enter:"Enter",tab:"Tab",delete:"Delete",esc:"Escape",space:"Space",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",end:"End",home:"Home",del:"Delete",backspace:"Backspace",insert:"Insert",pageup:"PageUp",pagedown:"PageDown",shift:"Shift"});function ib(e){return Object.keys(e)}function Sr(e,t){return t.every(n=>e.hasOwnProperty(n))}function Ka(e,t){const n={};for(const i of t)Object.hasOwn(e,i)&&(n[i]=e[i]);return n}function zf(e,t,n){const i=Object.create(null),a=Object.create(null);for(const r in e)t.some(s=>s instanceof RegExp?s.test(r):s===r)?i[r]=e[r]:a[r]=e[r];return[i,a]}function Kt(e,t){const n={...e};return t.forEach(i=>delete n[i]),n}const ab=/^on[^a-z]/,rm=e=>ab.test(e),SR=["onAfterscriptexecute","onAnimationcancel","onAnimationend","onAnimationiteration","onAnimationstart","onAuxclick","onBeforeinput","onBeforescriptexecute","onChange","onClick","onCompositionend","onCompositionstart","onCompositionupdate","onContextmenu","onCopy","onCut","onDblclick","onFocusin","onFocusout","onFullscreenchange","onFullscreenerror","onGesturechange","onGestureend","onGesturestart","onGotpointercapture","onInput","onKeydown","onKeypress","onKeyup","onLostpointercapture","onMousedown","onMousemove","onMouseout","onMouseover","onMouseup","onMousewheel","onPaste","onPointercancel","onPointerdown","onPointerenter","onPointerleave","onPointermove","onPointerout","onPointerover","onPointerup","onReset","onSelect","onSubmit","onTouchcancel","onTouchend","onTouchmove","onTouchstart","onTransitioncancel","onTransitionend","onTransitionrun","onTransitionstart","onWheel"],MR=["ArrowUp","ArrowDown","ArrowRight","ArrowLeft","Enter","Escape","Tab"," "];function ER(e){return e.isComposing&&MR.includes(e.key)}function Za(e){const[t,n]=zf(e,[ab]),i=Kt(t,SR),[a,r]=zf(n,["class","style","id",/^data-/]);return Object.assign(a,t),Object.assign(r,i),[a,r]}function Nt(e){return e==null?[]:Array.isArray(e)?e:[e]}function wR(e,t){let n=0;const i=function(){for(var a=arguments.length,r=new Array(a),s=0;s<a;s++)r[s]=arguments[s];clearTimeout(n),n=setTimeout(()=>e(...r),on(t))};return i.clear=()=>{clearTimeout(n)},i.immediate=e,i}function qt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.max(t,Math.min(n,e))}function jg(e){const t=e.toString().trim();return t.includes(".")?t.length-t.indexOf(".")-1:0}function Kg(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0";return e+n.repeat(Math.max(0,t-e.length))}function Zg(e,t){return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0").repeat(Math.max(0,t-e.length))+e}function TR(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const n=[];let i=0;for(;i<e.length;)n.push(e.substr(i,t)),i+=t;return n}function Jg(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e3;if(e<t)return`${e} B`;const n=t===1024?["Ki","Mi","Gi"]:["k","M","G"];let i=-1;for(;Math.abs(e)>=t&&i<n.length-1;)e/=t,++i;return`${e.toFixed(1)} ${n[i]}B`}function An(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const i={};for(const a in e)i[a]=e[a];for(const a in t){const r=e[a],s=t[a];if(Yg(r)&&Yg(s)){i[a]=An(r,s,n);continue}if(n&&Array.isArray(r)&&Array.isArray(s)){i[a]=n(r,s);continue}i[a]=s}return i}function rb(e){return e.map(t=>t.type===Ne?rb(t.children):t).flat()}function Cr(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Cr.cache.has(e))return Cr.cache.get(e);const t=e.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Cr.cache.set(e,t),t}Cr.cache=new Map;function Ts(e,t){if(!t||typeof t!="object")return[];if(Array.isArray(t))return t.map(n=>Ts(e,n)).flat(1);if(t.suspense)return Ts(e,t.ssContent);if(Array.isArray(t.children))return t.children.map(n=>Ts(e,n)).flat(1);if(t.component){if(Object.getOwnPropertySymbols(t.component.provides).includes(e))return[t.component];if(t.component.subTree)return Ts(e,t.component.subTree).flat(1)}return[]}var Ql=new WeakMap,_s=new WeakMap;class CR{constructor(t){Xg(this,Ql,[]),Xg(this,_s,0),this.size=t}push(t){dr(Ql,this)[dr(_s,this)]=t,xR(_s,this,(dr(_s,this)+1)%this.size)}values(){return dr(Ql,this).slice(dr(_s,this)).concat(dr(Ql,this).slice(0,dr(_s,this)))}}function AR(e){return"touches"in e?{clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}:{clientX:e.clientX,clientY:e.clientY}}function sm(e){const t=_n({}),n=A(e);return Bt(()=>{for(const i in n.value)t[i]=n.value[i]},{flush:"sync"}),Wr(t)}function Vu(e,t){return e.includes(t)}function sb(e){return e[2].toLowerCase()+e.slice(3)}const vn=()=>[Function,Array];function Qg(e,t){return t="on"+Hi(t),!!(e[t]||e[`${t}Once`]||e[`${t}Capture`]||e[`${t}OnceCapture`]||e[`${t}CaptureOnce`])}function ic(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(Array.isArray(e))for(const a of e)a(...n);else typeof e=="function"&&e(...n)}function No(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=["button","[href]",'input:not([type="hidden"])',"select","textarea","[tabindex]"].map(i=>`${i}${t?':not([tabindex="-1"])':""}:not([disabled])`).join(", ");return[...e.querySelectorAll(n)]}function ob(e,t,n){let i,a=e.indexOf(document.activeElement);const r=t==="next"?1:-1;do a+=r,i=e[a];while((!i||i.offsetParent==null||!((n==null?void 0:n(i))??!0))&&a<e.length&&a>=0);return i}function Ar(e,t){var i,a,r,s;const n=No(e);if(!t)(e===document.activeElement||!e.contains(document.activeElement))&&((i=n[0])==null||i.focus());else if(t==="first")(a=n[0])==null||a.focus();else if(t==="last")(r=n.at(-1))==null||r.focus();else if(typeof t=="number")(s=n[t])==null||s.focus();else{const o=ob(n,t);o?o.focus():Ar(e,t==="next"?"first":"last")}}function eu(e){return e==null||typeof e=="string"&&e.trim()===""}function lb(){}function Gs(e,t){if(!(mt&&typeof CSS<"u"&&typeof CSS.supports<"u"&&CSS.supports(`selector(${t})`)))return null;try{return!!e&&e.matches(t)}catch{return null}}function ac(e){return e.some(t=>ko(t)?t.type===On?!1:t.type!==Ne||ac(t.children):!0)?e:null}function PR(e,t){if(!mt||e===0)return t(),()=>{};const n=window.setTimeout(t,e);return()=>window.clearTimeout(n)}function RR(e,t){const n=e.clientX,i=e.clientY,a=t.getBoundingClientRect(),r=a.left,s=a.top,o=a.right,l=a.bottom;return n>=r&&n<=o&&i>=s&&i<=l}function Fu(){const e=Me(),t=n=>{e.value=n};return Object.defineProperty(t,"value",{enumerable:!0,get:()=>e.value,set:n=>e.value=n}),Object.defineProperty(t,"el",{enumerable:!0,get:()=>am(e.value)}),t}function Ws(e){const t=e.key.length===1,n=!e.ctrlKey&&!e.metaKey&&!e.altKey;return t&&n}function ub(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"}const cb=["top","bottom"],IR=["start","end","left","right"];function Hf(e,t){let[n,i]=e.split(" ");return i||(i=Vu(cb,n)?"start":Vu(IR,n)?"top":"center"),{side:Gf(n,t),align:Gf(i,t)}}function Gf(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function Cd(e){return{side:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.side],align:e.align}}function Ad(e){return{side:e.side,align:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.align]}}function ep(e){return{side:e.align,align:e.side}}function tp(e){return Vu(cb,e.side)?"y":"x"}class Pr{constructor(t){let{x:n,y:i,width:a,height:r}=t;this.x=n,this.y=i,this.width=a,this.height=r}get top(){return this.y}get bottom(){return this.y+this.height}get left(){return this.x}get right(){return this.x+this.width}}function np(e,t){return{x:{before:Math.max(0,t.left-e.left),after:Math.max(0,e.right-t.right)},y:{before:Math.max(0,t.top-e.top),after:Math.max(0,e.bottom-t.bottom)}}}function db(e){return Array.isArray(e)?new Pr({x:e[0],y:e[1],width:0,height:0}):e.getBoundingClientRect()}function om(e){const t=e.getBoundingClientRect(),n=getComputedStyle(e),i=n.transform;if(i){let a,r,s,o,l;if(i.startsWith("matrix3d("))a=i.slice(9,-1).split(/, /),r=Number(a[0]),s=Number(a[5]),o=Number(a[12]),l=Number(a[13]);else if(i.startsWith("matrix("))a=i.slice(7,-1).split(/, /),r=Number(a[0]),s=Number(a[3]),o=Number(a[4]),l=Number(a[5]);else return new Pr(t);const u=n.transformOrigin,c=t.x-o-(1-r)*parseFloat(u),d=t.y-l-(1-s)*parseFloat(u.slice(u.indexOf(" ")+1)),f=r?t.width/r:e.offsetWidth+1,h=s?t.height/s:e.offsetHeight+1;return new Pr({x:c,y:d,width:f,height:h})}else return new Pr(t)}function Mr(e,t,n){if(typeof e.animate>"u")return{finished:Promise.resolve()};let i;try{i=e.animate(t,n)}catch{return{finished:Promise.resolve()}}return typeof i.finished>"u"&&(i.finished=new Promise(a=>{i.onfinish=()=>{a(i)}})),i}const gu=new WeakMap;function DR(e,t){Object.keys(t).forEach(n=>{if(rm(n)){const i=sb(n),a=gu.get(e);if(t[n]==null)a==null||a.forEach(r=>{const[s,o]=r;s===i&&(e.removeEventListener(i,o),a.delete(r))});else if(!a||![...a].some(r=>r[0]===i&&r[1]===t[n])){e.addEventListener(i,t[n]);const r=a||new Set;r.add([i,t[n]]),gu.has(e)||gu.set(e,r)}}else t[n]==null?e.removeAttribute(n):e.setAttribute(n,t[n])})}function LR(e,t){Object.keys(t).forEach(n=>{if(rm(n)){const i=sb(n),a=gu.get(e);a==null||a.forEach(r=>{const[s,o]=r;s===i&&(e.removeEventListener(i,o),a.delete(r))})}else e.removeAttribute(n)})}const bs=2.4,ip=.2126729,ap=.7151522,rp=.072175,kR=.55,VR=.58,FR=.57,NR=.62,tu=.03,sp=1.45,OR=5e-4,UR=1.25,BR=1.25,zR=.078,op=12.82051282051282,nu=.06,HR=.001;function lp(e,t){const n=(e.r/255)**bs,i=(e.g/255)**bs,a=(e.b/255)**bs,r=(t.r/255)**bs,s=(t.g/255)**bs,o=(t.b/255)**bs;let l=n*ip+i*ap+a*rp,u=r*ip+s*ap+o*rp;if(l<=tu&&(l+=(tu-l)**sp),u<=tu&&(u+=(tu-u)**sp),Math.abs(u-l)<OR)return 0;let c;if(u>l){const d=(u**kR-l**VR)*UR;c=d<HR?0:d<zR?d-d*op*nu:d-nu}else{const d=(u**NR-l**FR)*BR;c=d>-.001?0:d>-.078?d-d*op*nu:d+nu}return c*100}function GR(e,t){t=Array.isArray(t)?t.slice(0,-1).map(n=>`'${n}'`).join(", ")+` or '${t.at(-1)}'`:`'${t}'`}const Nu=.20689655172413793,WR=e=>e>Nu**3?Math.cbrt(e):e/(3*Nu**2)+4/29,$R=e=>e>Nu?e**3:3*Nu**2*(e-4/29);function fb(e){const t=WR,n=t(e[1]);return[116*n-16,500*(t(e[0]/.95047)-n),200*(n-t(e[2]/1.08883))]}function hb(e){const t=$R,n=(e[0]+16)/116;return[t(n+e[1]/500)*.95047,t(n),t(n-e[2]/200)*1.08883]}const XR=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],YR=e=>e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055,qR=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],jR=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function mb(e){const t=Array(3),n=YR,i=XR;for(let a=0;a<3;++a)t[a]=Math.round(qt(n(i[a][0]*e[0]+i[a][1]*e[1]+i[a][2]*e[2]))*255);return{r:t[0],g:t[1],b:t[2]}}function lm(e){let{r:t,g:n,b:i}=e;const a=[0,0,0],r=jR,s=qR;t=r(t/255),n=r(n/255),i=r(i/255);for(let o=0;o<3;++o)a[o]=s[o][0]*t+s[o][1]*n+s[o][2]*i;return a}function Wf(e){return!!e&&/^(#|var\(--|(rgb|hsl)a?\()/.test(e)}function KR(e){return Wf(e)&&!/^((rgb|hsl)a?\()?var\(--/.test(e)}const up=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,ZR={rgb:(e,t,n,i)=>({r:e,g:t,b:n,a:i}),rgba:(e,t,n,i)=>({r:e,g:t,b:n,a:i}),hsl:(e,t,n,i)=>cp({h:e,s:t,l:n,a:i}),hsla:(e,t,n,i)=>cp({h:e,s:t,l:n,a:i}),hsv:(e,t,n,i)=>ma({h:e,s:t,v:n,a:i}),hsva:(e,t,n,i)=>ma({h:e,s:t,v:n,a:i})};function ei(e){if(typeof e=="number")return{r:(e&16711680)>>16,g:(e&65280)>>8,b:e&255};if(typeof e=="string"&&up.test(e)){const{groups:t}=e.match(up),{fn:n,values:i}=t,a=i.split(/,\s*/).map(r=>r.endsWith("%")&&["hsl","hsla","hsv","hsva"].includes(n)?parseFloat(r)/100:parseFloat(r));return ZR[n](...a)}else if(typeof e=="string"){let t=e.startsWith("#")?e.slice(1):e;return[3,4].includes(t.length)?t=t.split("").map(n=>n+n).join(""):[6,8].includes(t.length),_b(t)}else if(typeof e=="object"){if(Sr(e,["r","g","b"]))return e;if(Sr(e,["h","s","l"]))return ma(um(e));if(Sr(e,["h","s","v"]))return ma(e)}throw new TypeError(`Invalid color: ${e==null?e:String(e)||e.constructor.name}
Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function ma(e){const{h:t,s:n,v:i,a}=e,r=o=>{const l=(o+t/60)%6;return i-i*n*Math.max(Math.min(l,4-l,1),0)},s=[r(5),r(3),r(1)].map(o=>Math.round(o*255));return{r:s[0],g:s[1],b:s[2],a}}function cp(e){return ma(um(e))}function ol(e){if(!e)return{h:0,s:1,v:1,a:1};const t=e.r/255,n=e.g/255,i=e.b/255,a=Math.max(t,n,i),r=Math.min(t,n,i);let s=0;a!==r&&(a===t?s=60*(0+(n-i)/(a-r)):a===n?s=60*(2+(i-t)/(a-r)):a===i&&(s=60*(4+(t-n)/(a-r)))),s<0&&(s=s+360);const o=a===0?0:(a-r)/a,l=[s,o,a];return{h:l[0],s:l[1],v:l[2],a:e.a}}function vb(e){const{h:t,s:n,v:i,a}=e,r=i-i*n/2,s=r===1||r===0?0:(i-r)/Math.min(r,1-r);return{h:t,s,l:r,a}}function um(e){const{h:t,s:n,l:i,a}=e,r=i+n*Math.min(i,1-i),s=r===0?0:2-2*i/r;return{h:t,s,v:r,a}}function gb(e){let{r:t,g:n,b:i,a}=e;return a===void 0?`rgb(${t}, ${n}, ${i})`:`rgba(${t}, ${n}, ${i}, ${a})`}function pb(e){return gb(ma(e))}function iu(e){const t=Math.round(e).toString(16);return("00".substr(0,2-t.length)+t).toUpperCase()}function yb(e){let{r:t,g:n,b:i,a}=e;return`#${[iu(t),iu(n),iu(i),a!==void 0?iu(Math.round(a*255)):""].join("")}`}function _b(e){e=QR(e);let[t,n,i,a]=TR(e,2).map(r=>parseInt(r,16));return a=a===void 0?a:a/255,{r:t,g:n,b:i,a}}function JR(e){const t=_b(e);return ol(t)}function bb(e){return yb(ma(e))}function QR(e){return e.startsWith("#")&&(e=e.slice(1)),e=e.replace(/([^0-9a-f])/gi,"F"),(e.length===3||e.length===4)&&(e=e.split("").map(t=>t+t).join("")),e.length!==6&&(e=Kg(Kg(e,6),8,"F")),e}function eI(e,t){const n=fb(lm(e));return n[0]=n[0]+t*10,mb(hb(n))}function tI(e,t){const n=fb(lm(e));return n[0]=n[0]-t*10,mb(hb(n))}function $f(e){const t=ei(e);return lm(t)[1]}function nI(e,t){const n=$f(e),i=$f(t),a=Math.max(n,i),r=Math.min(n,i);return(a+.05)/(r+.05)}function xb(e){const t=Math.abs(lp(ei(0),ei(e)));return Math.abs(lp(ei(16777215),ei(e)))>Math.min(t,50)?"#fff":"#000"}function Y(e,t){return n=>Object.keys(e).reduce((i,a)=>{const s=typeof e[a]=="object"&&e[a]!=null&&!Array.isArray(e[a])?e[a]:{type:e[a]};return n&&a in n?i[a]={...s,default:n[a]}:i[a]=s,t&&!i[a].source&&(i[a].source=t),i},{})}const Ie=Y({class:[String,Array,Object],style:{type:[String,Array,Object],default:null}},"component");function Ht(e,t){const n=Xr();if(!n)throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);return n}function Gi(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"composables";const t=Ht(e).type;return Cr((t==null?void 0:t.aliasName)||(t==null?void 0:t.name))}let Sb=0,pu=new WeakMap;function gn(){const e=Ht("getUid");if(pu.has(e))return pu.get(e);{const t=Sb++;return pu.set(e,t),t}}gn.reset=()=>{Sb=0,pu=new WeakMap};function iI(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ht("injectSelf");const{provides:n}=t;if(n&&e in n)return n[e]}const $s=Symbol.for("vuetify:defaults");function aI(e){return _e(e)}function cm(){const e=ot($s);if(!e)throw new Error("[Vuetify] Could not find defaults instance");return e}function zt(e,t){const n=cm(),i=_e(e),a=A(()=>{if(on(t==null?void 0:t.disabled))return n.value;const s=on(t==null?void 0:t.scoped),o=on(t==null?void 0:t.reset),l=on(t==null?void 0:t.root);if(i.value==null&&!(s||o||l))return n.value;let u=An(i.value,{prev:n.value});if(s)return u;if(o||l){const c=Number(o||1/0);for(let d=0;d<=c&&!(!u||!("prev"in u));d++)u=u.prev;return u&&typeof l=="string"&&l in u&&(u=An(An(u,{prev:u}),u[l])),u}return u.prev?An(u.prev,u):u});return Rt($s,a),a}function rI(e,t){var n,i;return typeof((n=e.props)==null?void 0:n[t])<"u"||typeof((i=e.props)==null?void 0:i[Cr(t)])<"u"}function sI(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:cm();const i=Ht("useDefaults");if(t=t??i.type.name??i.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const a=A(()=>{var l;return(l=n.value)==null?void 0:l[e._as??t]}),r=new Proxy(e,{get(l,u){var d,f,h,g,p,m,v;const c=Reflect.get(l,u);return u==="class"||u==="style"?[(d=a.value)==null?void 0:d[u],c].filter(_=>_!=null):typeof u=="string"&&!rI(i.vnode,u)?((f=a.value)==null?void 0:f[u])!==void 0?(h=a.value)==null?void 0:h[u]:((p=(g=n.value)==null?void 0:g.global)==null?void 0:p[u])!==void 0?(v=(m=n.value)==null?void 0:m.global)==null?void 0:v[u]:c:c}}),s=Me();Bt(()=>{if(a.value){const l=Object.entries(a.value).filter(u=>{let[c]=u;return c.startsWith(c[0].toUpperCase())});s.value=l.length?Object.fromEntries(l):void 0}else s.value=void 0});function o(){const l=iI($s,i);Rt($s,A(()=>s.value?An((l==null?void 0:l.value)??{},s.value):l==null?void 0:l.value))}return{props:r,provideSubDefaults:o}}function ii(e){if(e._setup=e._setup??e.setup,!e.name)return e;if(e._setup){e.props=Y(e.props??{},e.name)();const t=Object.keys(e.props).filter(n=>n!=="class"&&n!=="style");e.filterProps=function(i){return Ka(i,t)},e.props._as=String,e.setup=function(i,a){const r=cm();if(!r.value)return e._setup(i,a);const{props:s,provideSubDefaults:o}=sI(i,i._as??e.name,r),l=e._setup(s,a);return o(),l}}return e}function de(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(e?ii:cM)(t)}function oI(e,t){return t.props=e,t}function Wi(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",n=arguments.length>2?arguments[2]:void 0;return de()({name:n??Hi(Xn(e.replace(/__/g,"-"))),props:{tag:{type:String,default:t},...Ie()},setup(i,a){let{slots:r}=a;return()=>{var s;return _a(i.tag,{class:[e,i.class],style:i.style},(s=r.default)==null?void 0:s.call(r))}}})}function Mb(e){if(typeof e.getRootNode!="function"){for(;e.parentNode;)e=e.parentNode;return e!==document?null:document}const t=e.getRootNode();return t!==document&&t.getRootNode({composed:!0})!==document?null:t}const Oo="cubic-bezier(0.4, 0, 0.2, 1)",lI="cubic-bezier(0.0, 0, 0.2, 1)",uI="cubic-bezier(0.4, 0, 1, 1)";function dp(e,t,n){return Object.keys(e).filter(i=>rm(i)&&i.endsWith(t)).reduce((i,a)=>(i[a.slice(0,-t.length)]=r=>e[a](r,n(r)),i),{})}function dm(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(;e;){if(t?cI(e):fm(e))return e;e=e.parentElement}return document.scrollingElement}function Ou(e,t){const n=[];if(t&&e&&!t.contains(e))return n;for(;e&&(fm(e)&&n.push(e),e!==t);)e=e.parentElement;return n}function fm(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"&&e.scrollHeight>e.clientHeight}function cI(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return["scroll","auto"].includes(t.overflowY)}function dI(e){for(;e;){if(window.getComputedStyle(e).position==="fixed")return!0;e=e.offsetParent}return!1}function pe(e){const t=Ht("useRender");t.render=e}function He(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:d=>d,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:d=>d;const r=Ht("useProxiedModel"),s=_e(e[t]!==void 0?e[t]:n),o=Cr(t),u=A(o!==t?()=>{var d,f,h,g;return e[t],!!(((d=r.vnode.props)!=null&&d.hasOwnProperty(t)||(f=r.vnode.props)!=null&&f.hasOwnProperty(o))&&((h=r.vnode.props)!=null&&h.hasOwnProperty(`onUpdate:${t}`)||(g=r.vnode.props)!=null&&g.hasOwnProperty(`onUpdate:${o}`)))}:()=>{var d,f;return e[t],!!((d=r.vnode.props)!=null&&d.hasOwnProperty(t)&&((f=r.vnode.props)!=null&&f.hasOwnProperty(`onUpdate:${t}`)))});zn(()=>!u.value,()=>{Te(()=>e[t],d=>{s.value=d})});const c=A({get(){const d=e[t];return i(u.value?d:s.value)},set(d){const f=a(d),h=Ye(u.value?e[t]:s.value);h===f||i(h)===d||(s.value=f,r==null||r.emit(`update:${t}`,f))}});return Object.defineProperty(c,"externalValue",{get:()=>u.value?e[t]:s.value}),c}const fI={badge:"Badge",open:"Open",close:"Close",dismiss:"Dismiss",confirmEdit:{ok:"OK",cancel:"Cancel"},dataIterator:{noResultsText:"No matching records found",loadingText:"Loading items..."},dataTable:{itemsPerPageText:"Rows per page:",ariaLabel:{sortDescending:"Sorted descending.",sortAscending:"Sorted ascending.",sortNone:"Not sorted.",activateNone:"Activate to remove sorting.",activateDescending:"Activate to sort descending.",activateAscending:"Activate to sort ascending."},sortBy:"Sort by"},dataFooter:{itemsPerPageText:"Items per page:",itemsPerPageAll:"All",nextPage:"Next page",prevPage:"Previous page",firstPage:"First page",lastPage:"Last page",pageText:"{0}-{1} of {2}"},dateRangeInput:{divider:"to"},datePicker:{itemsSelected:"{0} selected",range:{title:"Select dates",header:"Enter dates"},title:"Select date",header:"Enter date",input:{placeholder:"Enter date"}},noDataText:"No data available",carousel:{prev:"Previous visual",next:"Next visual",ariaLabel:{delimiter:"Carousel slide {0} of {1}"}},calendar:{moreEvents:"{0} more",today:"Today"},input:{clear:"Clear {0}",prependAction:"{0} prepended action",appendAction:"{0} appended action",otp:"Please enter OTP character {0}"},fileInput:{counter:"{0} files",counterSize:"{0} files ({1} in total)"},fileUpload:{title:"Drag and drop files here",divider:"or",browse:"Browse Files"},timePicker:{am:"AM",pm:"PM",title:"Select Time"},pagination:{ariaLabel:{root:"Pagination Navigation",next:"Next page",previous:"Previous page",page:"Go to page {0}",currentPage:"Page {0}, Current page",first:"First page",last:"Last page"}},stepper:{next:"Next",prev:"Previous"},rating:{ariaLabel:{item:"Rating {0} of {1}"}},loading:"Loading...",infiniteScroll:{loadMore:"Load more",empty:"No more"}},fp="$vuetify.",hp=(e,t)=>e.replace(/\{(\d+)\}/g,(n,i)=>String(t[Number(i)])),Eb=(e,t,n)=>function(i){for(var a=arguments.length,r=new Array(a>1?a-1:0),s=1;s<a;s++)r[s-1]=arguments[s];if(!i.startsWith(fp))return hp(i,r);const o=i.replace(fp,""),l=e.value&&n.value[e.value],u=t.value&&n.value[t.value];let c=Fr(l,o,null);return c||(`${i}${e.value}`,c=Fr(u,o,null)),c||(c=i),typeof c!="string"&&(c=i),hp(c,r)};function wb(e,t){return(n,i)=>new Intl.NumberFormat([e.value,t.value],i).format(n)}function Pd(e,t,n){const i=He(e,t,e[t]??n.value);return i.value=e[t]??n.value,Te(n,a=>{e[t]==null&&(i.value=n.value)}),i}function Tb(e){return t=>{const n=Pd(t,"locale",e.current),i=Pd(t,"fallback",e.fallback),a=Pd(t,"messages",e.messages);return{name:"vuetify",current:n,fallback:i,messages:a,t:Eb(n,i,a),n:wb(n,i),provide:Tb({current:n,fallback:i,messages:a})}}}function hI(e){const t=Me((e==null?void 0:e.locale)??"en"),n=Me((e==null?void 0:e.fallback)??"en"),i=_e({en:fI,...e==null?void 0:e.messages});return{name:"vuetify",current:t,fallback:n,messages:i,t:Eb(t,n,i),n:wb(t,n),provide:Tb({current:t,fallback:n,messages:i})}}const Xs=Symbol.for("vuetify:locale");function mI(e){return e.name!=null}function vI(e){const t=e!=null&&e.adapter&&mI(e==null?void 0:e.adapter)?e==null?void 0:e.adapter:hI(e),n=yI(t,e);return{...t,...n}}function $t(){const e=ot(Xs);if(!e)throw new Error("[Vuetify] Could not find injected locale instance");return e}function gI(e){const t=ot(Xs);if(!t)throw new Error("[Vuetify] Could not find injected locale instance");const n=t.provide(e),i=_I(n,t.rtl,e),a={...n,...i};return Rt(Xs,a),a}function pI(){return{af:!1,ar:!0,bg:!1,ca:!1,ckb:!1,cs:!1,de:!1,el:!1,en:!1,es:!1,et:!1,fa:!0,fi:!1,fr:!1,hr:!1,hu:!1,he:!0,id:!1,it:!1,ja:!1,km:!1,ko:!1,lv:!1,lt:!1,nl:!1,no:!1,pl:!1,pt:!1,ro:!1,ru:!1,sk:!1,sl:!1,srCyrl:!1,srLatn:!1,sv:!1,th:!1,tr:!1,az:!1,uk:!1,vi:!1,zhHans:!1,zhHant:!1}}function yI(e,t){const n=_e((t==null?void 0:t.rtl)??pI()),i=A(()=>n.value[e.current.value]??!1);return{isRtl:i,rtl:n,rtlClasses:A(()=>`v-locale--is-${i.value?"rtl":"ltr"}`)}}function _I(e,t,n){const i=A(()=>n.rtl??t.value[e.current.value]??!1);return{isRtl:i,rtl:t,rtlClasses:A(()=>`v-locale--is-${i.value?"rtl":"ltr"}`)}}function rn(){const e=ot(Xs);if(!e)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:e.isRtl,rtlClasses:e.rtlClasses}}const rc={"001":1,AD:1,AE:6,AF:6,AG:0,AI:1,AL:1,AM:1,AN:1,AR:1,AS:0,AT:1,AU:1,AX:1,AZ:1,BA:1,BD:0,BE:1,BG:1,BH:6,BM:1,BN:1,BR:0,BS:0,BT:0,BW:0,BY:1,BZ:0,CA:0,CH:1,CL:1,CM:1,CN:1,CO:0,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DM:0,DO:0,DZ:6,EC:1,EE:1,EG:6,ES:1,ET:0,FI:1,FJ:1,FO:1,FR:1,GB:1,"GB-alt-variant":0,GE:1,GF:1,GP:1,GR:1,GT:0,GU:0,HK:0,HN:0,HR:1,HU:1,ID:0,IE:1,IL:0,IN:0,IQ:6,IR:6,IS:1,IT:1,JM:0,JO:6,JP:0,KE:0,KG:1,KH:0,KR:0,KW:6,KZ:1,LA:0,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MH:0,MK:1,MM:0,MN:1,MO:0,MQ:1,MT:0,MV:5,MX:0,MY:1,MZ:0,NI:0,NL:1,NO:1,NP:0,NZ:1,OM:6,PA:0,PE:0,PH:0,PK:0,PL:1,PR:0,PT:0,PY:0,QA:6,RE:1,RO:1,RS:1,RU:1,SA:0,SD:6,SE:1,SG:0,SI:1,SK:1,SM:1,SV:0,SY:6,TH:0,TJ:1,TM:1,TR:1,TT:0,TW:0,UA:1,UM:0,US:0,UY:1,UZ:1,VA:1,VE:0,VI:0,VN:1,WS:0,XK:1,YE:0,ZA:0,ZW:0};function bI(e,t,n){const i=[];let a=[];const r=Cb(e),s=Ab(e),o=n??rc[t.slice(-2).toUpperCase()]??0,l=(r.getDay()-o+7)%7,u=(s.getDay()-o+7)%7;for(let c=0;c<l;c++){const d=new Date(r);d.setDate(d.getDate()-(l-c)),a.push(d)}for(let c=1;c<=s.getDate();c++){const d=new Date(e.getFullYear(),e.getMonth(),c);a.push(d),a.length===7&&(i.push(a),a=[])}for(let c=1;c<7-u;c++){const d=new Date(s);d.setDate(d.getDate()+c),a.push(d)}return a.length>0&&i.push(a),i}function xI(e,t,n){const i=n??rc[t.slice(-2).toUpperCase()]??0,a=new Date(e);for(;a.getDay()!==i;)a.setDate(a.getDate()-1);return a}function SI(e,t){const n=new Date(e),i=((rc[t.slice(-2).toUpperCase()]??0)+6)%7;for(;n.getDay()!==i;)n.setDate(n.getDate()+1);return n}function Cb(e){return new Date(e.getFullYear(),e.getMonth(),1)}function Ab(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function MI(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}const EI=/^([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))$/;function Pb(e){if(e==null)return new Date;if(e instanceof Date)return e;if(typeof e=="string"){let t;if(EI.test(e))return MI(e);if(t=Date.parse(e),!isNaN(t))return new Date(t)}return null}const mp=new Date(2e3,0,2);function wI(e,t){const n=t??rc[e.slice(-2).toUpperCase()]??0;return Bi(7).map(i=>{const a=new Date(mp);return a.setDate(mp.getDate()+n+i),new Intl.DateTimeFormat(e,{weekday:"narrow"}).format(a)})}function TI(e,t,n,i){const a=Pb(e)??new Date,r=i==null?void 0:i[t];if(typeof r=="function")return r(a,t,n);let s={};switch(t){case"fullDate":s={year:"numeric",month:"long",day:"numeric"};break;case"fullDateWithWeekday":s={weekday:"long",year:"numeric",month:"long",day:"numeric"};break;case"normalDate":const o=a.getDate(),l=new Intl.DateTimeFormat(n,{month:"long"}).format(a);return`${o} ${l}`;case"normalDateWithWeekday":s={weekday:"short",day:"numeric",month:"short"};break;case"shortDate":s={month:"short",day:"numeric"};break;case"year":s={year:"numeric"};break;case"month":s={month:"long"};break;case"monthShort":s={month:"short"};break;case"monthAndYear":s={month:"long",year:"numeric"};break;case"monthAndDate":s={month:"long",day:"numeric"};break;case"weekday":s={weekday:"long"};break;case"weekdayShort":s={weekday:"short"};break;case"dayOfMonth":return new Intl.NumberFormat(n).format(a.getDate());case"hours12h":s={hour:"numeric",hour12:!0};break;case"hours24h":s={hour:"numeric",hour12:!1};break;case"minutes":s={minute:"numeric"};break;case"seconds":s={second:"numeric"};break;case"fullTime":s={hour:"numeric",minute:"numeric"};break;case"fullTime12h":s={hour:"numeric",minute:"numeric",hour12:!0};break;case"fullTime24h":s={hour:"numeric",minute:"numeric",hour12:!1};break;case"fullDateTime":s={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"};break;case"fullDateTime12h":s={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",hour12:!0};break;case"fullDateTime24h":s={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",hour12:!1};break;case"keyboardDate":s={year:"numeric",month:"2-digit",day:"2-digit"};break;case"keyboardDateTime":return s={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric"},new Intl.DateTimeFormat(n,s).format(a).replace(/, /g," ");case"keyboardDateTime12h":return s={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",hour12:!0},new Intl.DateTimeFormat(n,s).format(a).replace(/, /g," ");case"keyboardDateTime24h":return s={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",hour12:!1},new Intl.DateTimeFormat(n,s).format(a).replace(/, /g," ");default:s=r??{timeZone:"UTC",timeZoneName:"short"}}return new Intl.DateTimeFormat(n,s).format(a)}function CI(e,t){const n=e.toJsDate(t),i=n.getFullYear(),a=Zg(String(n.getMonth()+1),2,"0"),r=Zg(String(n.getDate()),2,"0");return`${i}-${a}-${r}`}function AI(e){const[t,n,i]=e.split("-").map(Number);return new Date(t,n-1,i)}function PI(e,t){const n=new Date(e);return n.setMinutes(n.getMinutes()+t),n}function RI(e,t){const n=new Date(e);return n.setHours(n.getHours()+t),n}function II(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function DI(e,t){const n=new Date(e);return n.setDate(n.getDate()+t*7),n}function LI(e,t){const n=new Date(e);return n.setDate(1),n.setMonth(n.getMonth()+t),n}function kI(e){return e.getFullYear()}function VI(e){return e.getMonth()}function FI(e){return e.getDate()}function NI(e){return new Date(e.getFullYear(),e.getMonth()+1,1)}function OI(e){return new Date(e.getFullYear(),e.getMonth()-1,1)}function UI(e){return e.getHours()}function BI(e){return e.getMinutes()}function zI(e){return new Date(e.getFullYear(),0,1)}function HI(e){return new Date(e.getFullYear(),11,31)}function GI(e,t){return Uu(e,t[0])&&XI(e,t[1])}function WI(e){const t=new Date(e);return t instanceof Date&&!isNaN(t.getTime())}function Uu(e,t){return e.getTime()>t.getTime()}function $I(e,t){return Uu(Xf(e),Xf(t))}function XI(e,t){return e.getTime()<t.getTime()}function vp(e,t){return e.getTime()===t.getTime()}function YI(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function qI(e,t){return e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function jI(e,t){return e.getFullYear()===t.getFullYear()}function KI(e,t,n){const i=new Date(e),a=new Date(t);switch(n){case"years":return i.getFullYear()-a.getFullYear();case"quarters":return Math.floor((i.getMonth()-a.getMonth()+(i.getFullYear()-a.getFullYear())*12)/4);case"months":return i.getMonth()-a.getMonth()+(i.getFullYear()-a.getFullYear())*12;case"weeks":return Math.floor((i.getTime()-a.getTime())/(1e3*60*60*24*7));case"days":return Math.floor((i.getTime()-a.getTime())/(1e3*60*60*24));case"hours":return Math.floor((i.getTime()-a.getTime())/(1e3*60*60));case"minutes":return Math.floor((i.getTime()-a.getTime())/(1e3*60));case"seconds":return Math.floor((i.getTime()-a.getTime())/1e3);default:return i.getTime()-a.getTime()}}function ZI(e,t){const n=new Date(e);return n.setHours(t),n}function JI(e,t){const n=new Date(e);return n.setMinutes(t),n}function QI(e,t){const n=new Date(e);return n.setMonth(t),n}function eD(e,t){const n=new Date(e);return n.setDate(t),n}function tD(e,t){const n=new Date(e);return n.setFullYear(t),n}function Xf(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0)}function nD(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999)}class iD{constructor(t){this.locale=t.locale,this.formats=t.formats}date(t){return Pb(t)}toJsDate(t){return t}toISO(t){return CI(this,t)}parseISO(t){return AI(t)}addMinutes(t,n){return PI(t,n)}addHours(t,n){return RI(t,n)}addDays(t,n){return II(t,n)}addWeeks(t,n){return DI(t,n)}addMonths(t,n){return LI(t,n)}getWeekArray(t,n){return bI(t,this.locale,n?Number(n):void 0)}startOfWeek(t,n){return xI(t,this.locale,n?Number(n):void 0)}endOfWeek(t){return SI(t,this.locale)}startOfMonth(t){return Cb(t)}endOfMonth(t){return Ab(t)}format(t,n){return TI(t,n,this.locale,this.formats)}isEqual(t,n){return vp(t,n)}isValid(t){return WI(t)}isWithinRange(t,n){return GI(t,n)}isAfter(t,n){return Uu(t,n)}isAfterDay(t,n){return $I(t,n)}isBefore(t,n){return!Uu(t,n)&&!vp(t,n)}isSameDay(t,n){return YI(t,n)}isSameMonth(t,n){return qI(t,n)}isSameYear(t,n){return jI(t,n)}setMinutes(t,n){return JI(t,n)}setHours(t,n){return ZI(t,n)}setMonth(t,n){return QI(t,n)}setDate(t,n){return eD(t,n)}setYear(t,n){return tD(t,n)}getDiff(t,n,i){return KI(t,n,i)}getWeekdays(t){return wI(this.locale,t?Number(t):void 0)}getYear(t){return kI(t)}getMonth(t){return VI(t)}getDate(t){return FI(t)}getNextMonth(t){return NI(t)}getPreviousMonth(t){return OI(t)}getHours(t){return UI(t)}getMinutes(t){return BI(t)}startOfDay(t){return Xf(t)}endOfDay(t){return nD(t)}startOfYear(t){return zI(t)}endOfYear(t){return HI(t)}}const Rb=Symbol.for("vuetify:date-options"),gp=Symbol.for("vuetify:date-adapter");function aD(e,t){const n=An({adapter:iD,locale:{af:"af-ZA",bg:"bg-BG",ca:"ca-ES",ckb:"",cs:"cs-CZ",de:"de-DE",el:"el-GR",en:"en-US",et:"et-EE",fa:"fa-IR",fi:"fi-FI",hr:"hr-HR",hu:"hu-HU",he:"he-IL",id:"id-ID",it:"it-IT",ja:"ja-JP",ko:"ko-KR",lv:"lv-LV",lt:"lt-LT",nl:"nl-NL",no:"no-NO",pl:"pl-PL",pt:"pt-PT",ro:"ro-RO",ru:"ru-RU",sk:"sk-SK",sl:"sl-SI",srCyrl:"sr-SP",srLatn:"sr-SP",sv:"sv-SE",th:"th-TH",tr:"tr-TR",az:"az-AZ",uk:"uk-UA",vi:"vi-VN",zhHans:"zh-CN",zhHant:"zh-TW"}},e);return{options:n,instance:Ib(n,t)}}function Ib(e,t){const n=_n(typeof e.adapter=="function"?new e.adapter({locale:e.locale[t.current.value]??t.current.value,formats:e.formats}):e.adapter);return Te(t.current,i=>{n.locale=e.locale[i]??i??n.locale}),n}function ll(){const e=ot(Rb);if(!e)throw new Error("[Vuetify] Could not find injected date options");const t=$t();return Ib(e,t)}function rD(e,t){const n=e.toJsDate(t);let i=n.getFullYear(),a=new Date(i,0,1);if(n<a)i=i-1,a=new Date(i,0,1);else{const o=new Date(i+1,0,1);n>=o&&(i=i+1,a=o)}const r=Math.abs(n.getTime()-a.getTime()),s=Math.ceil(r/(1e3*60*60*24));return Math.floor(s/7)+1}const sc=["sm","md","lg","xl","xxl"],Yf=Symbol.for("vuetify:display"),pp={mobileBreakpoint:"lg",thresholds:{xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560}},sD=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pp;return An(pp,e)};function yp(e){return mt&&!e?window.innerWidth:typeof e=="object"&&e.clientWidth||0}function _p(e){return mt&&!e?window.innerHeight:typeof e=="object"&&e.clientHeight||0}function bp(e){const t=mt&&!e?window.navigator.userAgent:"ssr";function n(g){return!!t.match(g)}const i=n(/android/i),a=n(/iphone|ipad|ipod/i),r=n(/cordova/i),s=n(/electron/i),o=n(/chrome/i),l=n(/edge/i),u=n(/firefox/i),c=n(/opera/i),d=n(/win/i),f=n(/mac/i),h=n(/linux/i);return{android:i,ios:a,cordova:r,electron:s,chrome:o,edge:l,firefox:u,opera:c,win:d,mac:f,linux:h,touch:_R,ssr:t==="ssr"}}function oD(e,t){const{thresholds:n,mobileBreakpoint:i}=sD(e),a=Me(_p(t)),r=Me(bp(t)),s=_n({}),o=Me(yp(t));function l(){a.value=_p(),o.value=yp()}function u(){l(),r.value=bp()}return Bt(()=>{const c=o.value<n.sm,d=o.value<n.md&&!c,f=o.value<n.lg&&!(d||c),h=o.value<n.xl&&!(f||d||c),g=o.value<n.xxl&&!(h||f||d||c),p=o.value>=n.xxl,m=c?"xs":d?"sm":f?"md":h?"lg":g?"xl":"xxl",v=typeof i=="number"?i:n[i],_=o.value<v;s.xs=c,s.sm=d,s.md=f,s.lg=h,s.xl=g,s.xxl=p,s.smAndUp=!c,s.mdAndUp=!(c||d),s.lgAndUp=!(c||d||f),s.xlAndUp=!(c||d||f||h),s.smAndDown=!(f||h||g||p),s.mdAndDown=!(h||g||p),s.lgAndDown=!(g||p),s.xlAndDown=!p,s.name=m,s.height=a.value,s.width=o.value,s.mobile=_,s.mobileBreakpoint=i,s.platform=r.value,s.thresholds=n}),mt&&window.addEventListener("resize",l,{passive:!0}),{...Wr(s),update:u,ssr:!!t}}const Yr=Y({mobile:{type:Boolean,default:!1},mobileBreakpoint:[Number,String]},"display");function gi(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{mobile:null},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Gi();const n=ot(Yf);if(!n)throw new Error("Could not find Vuetify display injection");const i=A(()=>e.mobile?!0:typeof e.mobileBreakpoint=="number"?n.width.value<e.mobileBreakpoint:e.mobileBreakpoint?n.width.value<n.thresholds.value[e.mobileBreakpoint]:e.mobile===null?n.mobile.value:!1),a=A(()=>t?{[`${t}--mobile`]:i.value}:{});return{...n,displayClasses:a,mobile:i}}const Db=Symbol.for("vuetify:goto");function Lb(){return{container:void 0,duration:300,layout:!1,offset:0,easing:"easeInOutCubic",patterns:{linear:e=>e,easeInQuad:e=>e**2,easeOutQuad:e=>e*(2-e),easeInOutQuad:e=>e<.5?2*e**2:-1+(4-2*e)*e,easeInCubic:e=>e**3,easeOutCubic:e=>--e**3+1,easeInOutCubic:e=>e<.5?4*e**3:(e-1)*(2*e-2)*(2*e-2)+1,easeInQuart:e=>e**4,easeOutQuart:e=>1- --e**4,easeInOutQuart:e=>e<.5?8*e**4:1-8*--e**4,easeInQuint:e=>e**5,easeOutQuint:e=>1+--e**5,easeInOutQuint:e=>e<.5?16*e**5:1+16*--e**5}}}function lD(e){return hm(e)??(document.scrollingElement||document.body)}function hm(e){return typeof e=="string"?document.querySelector(e):am(e)}function Rd(e,t,n){if(typeof e=="number")return t&&n?-e:e;let i=hm(e),a=0;for(;i;)a+=t?i.offsetLeft:i.offsetTop,i=i.offsetParent;return a}function uD(e,t){return{rtl:t.isRtl,options:An(Lb(),e)}}async function xp(e,t,n,i){const a=n?"scrollLeft":"scrollTop",r=An((i==null?void 0:i.options)??Lb(),t),s=i==null?void 0:i.rtl.value,o=(typeof e=="number"?e:hm(e))??0,l=r.container==="parent"&&o instanceof HTMLElement?o.parentElement:lD(r.container),u=typeof r.easing=="function"?r.easing:r.patterns[r.easing];if(!u)throw new TypeError(`Easing function "${r.easing}" not found.`);let c;if(typeof o=="number")c=Rd(o,n,s);else if(c=Rd(o,n,s)-Rd(l,n,s),r.layout){const g=window.getComputedStyle(o).getPropertyValue("--v-layout-top");g&&(c-=parseInt(g,10))}c+=r.offset,c=dD(l,c,!!s,!!n);const d=l[a]??0;if(c===d)return Promise.resolve(c);const f=performance.now();return new Promise(h=>requestAnimationFrame(function g(p){const v=(p-f)/r.duration,_=Math.floor(d+(c-d)*u(qt(v,0,1)));if(l[a]=_,v>=1&&Math.abs(_-l[a])<10)return h(c);if(v>2)return h(l[a]);requestAnimationFrame(g)}))}function cD(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=ot(Db),{isRtl:n}=rn();if(!t)throw new Error("[Vuetify] Could not find injected goto instance");const i={...t,rtl:A(()=>t.rtl.value||n.value)};async function a(r,s){return xp(r,An(e,s),!1,i)}return a.horizontal=async(r,s)=>xp(r,An(e,s),!0,i),a}function dD(e,t,n,i){const{scrollWidth:a,scrollHeight:r}=e,[s,o]=e===document.scrollingElement?[window.innerWidth,window.innerHeight]:[e.offsetWidth,e.offsetHeight];let l,u;return i?n?(l=-(a-s),u=0):(l=0,u=a-s):(l=0,u=r+-o),Math.max(Math.min(t,u),l)}const fD={collapse:"mdi-chevron-up",complete:"mdi-check",cancel:"mdi-close-circle",close:"mdi-close",delete:"mdi-close-circle",clear:"mdi-close-circle",success:"mdi-check-circle",info:"mdi-information",warning:"mdi-alert-circle",error:"mdi-close-circle",prev:"mdi-chevron-left",next:"mdi-chevron-right",checkboxOn:"mdi-checkbox-marked",checkboxOff:"mdi-checkbox-blank-outline",checkboxIndeterminate:"mdi-minus-box",delimiter:"mdi-circle",sortAsc:"mdi-arrow-up",sortDesc:"mdi-arrow-down",expand:"mdi-chevron-down",menu:"mdi-menu",subgroup:"mdi-menu-down",dropdown:"mdi-menu-down",radioOn:"mdi-radiobox-marked",radioOff:"mdi-radiobox-blank",edit:"mdi-pencil",ratingEmpty:"mdi-star-outline",ratingFull:"mdi-star",ratingHalf:"mdi-star-half-full",loading:"mdi-cached",first:"mdi-page-first",last:"mdi-page-last",unfold:"mdi-unfold-more-horizontal",file:"mdi-paperclip",plus:"mdi-plus",minus:"mdi-minus",calendar:"mdi-calendar",treeviewCollapse:"mdi-menu-down",treeviewExpand:"mdi-menu-right",eyeDropper:"mdi-eyedropper",upload:"mdi-cloud-upload"},hD={component:e=>_a(vm,{...e,class:"mdi"})},We=[String,Function,Object,Array],qf=Symbol.for("vuetify:icons"),oc=Y({icon:{type:We},tag:{type:String,required:!0}},"icon"),jf=de()({name:"VComponentIcon",props:oc(),setup(e,t){let{slots:n}=t;return()=>{const i=e.icon;return y(e.tag,null,{default:()=>{var a;return[e.icon?y(i,null,null):(a=n.default)==null?void 0:a.call(n)]}})}}}),mm=ii({name:"VSvgIcon",inheritAttrs:!1,props:oc(),setup(e,t){let{attrs:n}=t;return()=>y(e.tag,ge(n,{style:null}),{default:()=>[y("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(e.icon)?e.icon.map(i=>Array.isArray(i)?y("path",{d:i[0],"fill-opacity":i[1]},null):y("path",{d:i},null)):y("path",{d:e.icon},null)])]})}}),mD=ii({name:"VLigatureIcon",props:oc(),setup(e){return()=>y(e.tag,null,{default:()=>[e.icon]})}}),vm=ii({name:"VClassIcon",props:oc(),setup(e){return()=>y(e.tag,{class:e.icon},null)}});function vD(){return{svg:{component:mm},class:{component:vm}}}function gD(e){const t=vD(),n=(e==null?void 0:e.defaultSet)??"mdi";return n==="mdi"&&!t.mdi&&(t.mdi=hD),An({defaultSet:n,sets:t,aliases:{...fD,vuetify:["M8.2241 14.2009L12 21L22 3H14.4459L8.2241 14.2009Z",["M7.26303 12.4733L7.00113 12L2 3H12.5261C12.5261 3 12.5261 3 12.5261 3L7.26303 12.4733Z",.6]],"vuetify-outline":"svg:M7.26 12.47 12.53 3H2L7.26 12.47ZM14.45 3 8.22 14.2 12 21 22 3H14.45ZM18.6 5 12 16.88 10.51 14.2 15.62 5ZM7.26 8.35 5.4 5H9.13L7.26 8.35Z","vuetify-play":["m6.376 13.184-4.11-7.192C1.505 4.66 2.467 3 4.003 3h8.532l-.953 1.576-.006.01-.396.677c-.429.732-.214 1.507.194 2.015.404.503 1.092.878 1.869.806a3.72 3.72 0 0 1 1.005.022c.276.053.434.143.523.237.138.146.38.635-.25 2.09-.893 1.63-1.553 1.722-1.847 1.677-.213-.033-.468-.158-.756-.406a4.95 4.95 0 0 1-.8-.927c-.39-.564-1.04-.84-1.66-.846-.625-.006-1.316.27-1.693.921l-.478.826-.911 1.506Z",["M9.093 11.552c.046-.079.144-.15.32-.148a.53.53 0 0 1 .43.207c.285.414.636.847 1.046 1.2.405.35.914.662 1.516.754 1.334.205 2.502-.698 3.48-2.495l.014-.028.013-.03c.687-1.574.774-2.852-.005-3.675-.37-.391-.861-.586-1.333-.676a5.243 5.243 0 0 0-1.447-.044c-.173.016-.393-.073-.54-.257-.145-.18-.127-.316-.082-.392l.393-.672L14.287 3h5.71c1.536 0 2.499 1.659 1.737 2.992l-7.997 13.996c-.768 1.344-2.706 1.344-3.473 0l-3.037-5.314 1.377-2.278.004-.006.004-.007.481-.831Z",.6]]}},e)}const pD=e=>{const t=ot(qf);if(!t)throw new Error("Missing Vuetify Icons provide!");return{iconData:A(()=>{var l;const i=on(e);if(!i)return{component:jf};let a=i;if(typeof a=="string"&&(a=a.trim(),a.startsWith("$")&&(a=(l=t.aliases)==null?void 0:l[a.slice(1)])),Array.isArray(a))return{component:mm,icon:a};if(typeof a!="string")return{component:jf,icon:a};const r=Object.keys(t.sets).find(u=>typeof a=="string"&&a.startsWith(`${u}:`)),s=r?a.slice(r.length+1):a;return{component:t.sets[r??t.defaultSet].component,icon:s}})}},Uo=Symbol.for("vuetify:theme"),dt=Y({theme:String},"theme");function Sp(){return{defaultTheme:"light",variations:{colors:[],lighten:0,darken:0},themes:{light:{dark:!1,colors:{background:"#FFFFFF",surface:"#FFFFFF","surface-bright":"#FFFFFF","surface-light":"#EEEEEE","surface-variant":"#424242","on-surface-variant":"#EEEEEE",primary:"#1867C0","primary-darken-1":"#1F5592",secondary:"#48A9A6","secondary-darken-1":"#018786",error:"#B00020",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#000000","border-opacity":.12,"high-emphasis-opacity":.87,"medium-emphasis-opacity":.6,"disabled-opacity":.38,"idle-opacity":.04,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.12,"dragged-opacity":.08,"theme-kbd":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#F5F5F5","theme-on-code":"#000000"}},dark:{dark:!0,colors:{background:"#121212",surface:"#212121","surface-bright":"#ccbfd6","surface-light":"#424242","surface-variant":"#a3a3a3","on-surface-variant":"#424242",primary:"#2196F3","primary-darken-1":"#277CC1",secondary:"#54B6B2","secondary-darken-1":"#48A9A6",error:"#CF6679",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#FFFFFF","border-opacity":.12,"high-emphasis-opacity":1,"medium-emphasis-opacity":.7,"disabled-opacity":.5,"idle-opacity":.1,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.16,"dragged-opacity":.08,"theme-kbd":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#343434","theme-on-code":"#CCCCCC"}}}}}function yD(){var i,a;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Sp();const t=Sp();if(!e)return{...t,isDisabled:!0};const n={};for(const[r,s]of Object.entries(e.themes??{})){const o=s.dark||r==="dark"?(i=t.themes)==null?void 0:i.dark:(a=t.themes)==null?void 0:a.light;n[r]=An(o,s)}return An(t,{...e,themes:n})}function _D(e){const t=yD(e),n=_e(t.defaultTheme),i=_e(t.themes),a=A(()=>{const c={};for(const[d,f]of Object.entries(i.value)){const h=c[d]={...f,colors:{...f.colors}};if(t.variations)for(const g of t.variations.colors){const p=h.colors[g];if(p)for(const m of["lighten","darken"]){const v=m==="lighten"?eI:tI;for(const _ of Bi(t.variations[m],1))h.colors[`${g}-${m}-${_}`]=yb(v(ei(p),_))}}for(const g of Object.keys(h.colors)){if(/^on-[a-z]/.test(g)||h.colors[`on-${g}`])continue;const p=`on-${g}`,m=ei(h.colors[g]);h.colors[p]=xb(m)}}return c}),r=A(()=>a.value[n.value]),s=A(()=>{var g;const c=[];(g=r.value)!=null&&g.dark&&fr(c,":root",["color-scheme: dark"]),fr(c,":root",Mp(r.value));for(const[p,m]of Object.entries(a.value))fr(c,`.v-theme--${p}`,[`color-scheme: ${m.dark?"dark":"normal"}`,...Mp(m)]);const d=[],f=[],h=new Set(Object.values(a.value).flatMap(p=>Object.keys(p.colors)));for(const p of h)/^on-[a-z]/.test(p)?fr(f,`.${p}`,[`color: rgb(var(--v-theme-${p})) !important`]):(fr(d,`.bg-${p}`,[`--v-theme-overlay-multiplier: var(--v-theme-${p}-overlay-multiplier)`,`background-color: rgb(var(--v-theme-${p})) !important`,`color: rgb(var(--v-theme-on-${p})) !important`]),fr(f,`.text-${p}`,[`color: rgb(var(--v-theme-${p})) !important`]),fr(f,`.border-${p}`,[`--v-border-color: var(--v-theme-${p})`]));return c.push(...d,...f),c.map((p,m)=>m===0?p:` ${p}`).join("")});function o(){return{style:[{textContent:s.value,id:"vuetify-theme-stylesheet",nonce:t.cspNonce||!1}]}}function l(c){if(t.isDisabled)return;const d=c._context.provides.usehead;if(d)if(d.push){const f=d.push(o);mt&&Te(s,()=>{f.patch(o)})}else mt?(d.addHeadObjs(A(o)),Bt(()=>d.updateDOM())):d.addHeadObjs(o());else{let h=function(){if(typeof document<"u"&&!f){const g=document.createElement("style");g.type="text/css",g.id="vuetify-theme-stylesheet",t.cspNonce&&g.setAttribute("nonce",t.cspNonce),f=g,document.head.appendChild(f)}f&&(f.innerHTML=s.value)},f=mt?document.getElementById("vuetify-theme-stylesheet"):null;mt?Te(s,h,{immediate:!0}):h()}}const u=A(()=>t.isDisabled?void 0:`v-theme--${n.value}`);return{install:l,isDisabled:t.isDisabled,name:n,themes:i,current:r,computedThemes:a,themeClasses:u,styles:s,global:{name:n,current:r}}}function pt(e){Ht("provideTheme");const t=ot(Uo,null);if(!t)throw new Error("Could not find Vuetify theme injection");const n=A(()=>e.theme??t.name.value),i=A(()=>t.themes.value[n.value]),a=A(()=>t.isDisabled?void 0:`v-theme--${n.value}`),r={...t,name:n,current:i,themeClasses:a};return Rt(Uo,r),r}function lc(){Ht("useTheme");const e=ot(Uo,null);if(!e)throw new Error("Could not find Vuetify theme injection");return e}function fr(e,t,n){e.push(`${t} {
`,...n.map(i=>` ${i};
`),`}
`)}function Mp(e){const t=e.dark?2:1,n=e.dark?1:2,i=[];for(const[a,r]of Object.entries(e.colors)){const s=ei(r);i.push(`--v-theme-${a}: ${s.r},${s.g},${s.b}`),a.startsWith("on-")||i.push(`--v-theme-${a}-overlay-multiplier: ${$f(r)>.18?t:n}`)}for(const[a,r]of Object.entries(e.variables)){const s=typeof r=="string"&&r.startsWith("#")?ei(r):void 0,o=s?`${s.r}, ${s.g}, ${s.b}`:void 0;i.push(`--v-${a}: ${o??r}`)}return i}function Ii(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"content";const n=Fu(),i=_e();if(mt){const a=new ResizeObserver(r=>{e==null||e(r,a),r.length&&(t==="content"?i.value=r[0].contentRect:i.value=r[0].target.getBoundingClientRect())});dn(()=>{a.disconnect()}),Te(()=>n.el,(r,s)=>{s&&(a.unobserve(s),i.value=void 0),r&&a.observe(r)},{flush:"post"})}return{resizeRef:n,contentRect:jo(i)}}const Bo=Symbol.for("vuetify:layout"),kb=Symbol.for("vuetify:layout-item"),Ep=1e3,Vb=Y({overlaps:{type:Array,default:()=>[]},fullHeight:Boolean},"layout"),qr=Y({name:{type:String},order:{type:[Number,String],default:0},absolute:Boolean},"layout-item");function Fb(){const e=ot(Bo);if(!e)throw new Error("[Vuetify] Could not find injected layout");return{getLayoutItem:e.getLayoutItem,mainRect:e.mainRect,mainStyles:e.mainStyles}}function jr(e){const t=ot(Bo);if(!t)throw new Error("[Vuetify] Could not find injected layout");const n=e.id??`layout-item-${gn()}`,i=Ht("useLayoutItem");Rt(kb,{id:n});const a=Me(!1);Vh(()=>a.value=!0),By(()=>a.value=!1);const{layoutItemStyles:r,layoutItemScrimStyles:s}=t.register(i,{...e,active:A(()=>a.value?!1:e.active.value),id:n});return dn(()=>t.unregister(n)),{layoutItemStyles:r,layoutRect:t.layoutRect,layoutItemScrimStyles:s}}const bD=(e,t,n,i)=>{let a={top:0,left:0,right:0,bottom:0};const r=[{id:"",layer:{...a}}];for(const s of e){const o=t.get(s),l=n.get(s),u=i.get(s);if(!o||!l||!u)continue;const c={...a,[o.value]:parseInt(a[o.value],10)+(u.value?parseInt(l.value,10):0)};r.push({id:s,layer:c}),a=c}return r};function Nb(e){const t=ot(Bo,null),n=A(()=>t?t.rootZIndex.value-100:Ep),i=_e([]),a=_n(new Map),r=_n(new Map),s=_n(new Map),o=_n(new Map),l=_n(new Map),{resizeRef:u,contentRect:c}=Ii(),d=A(()=>{const T=new Map,P=e.overlaps??[];for(const w of P.filter(b=>b.includes(":"))){const[b,S]=w.split(":");if(!i.value.includes(b)||!i.value.includes(S))continue;const E=a.get(b),R=a.get(S),L=r.get(b),O=r.get(S);!E||!R||!L||!O||(T.set(S,{position:E.value,amount:parseInt(L.value,10)}),T.set(b,{position:R.value,amount:-parseInt(O.value,10)}))}return T}),f=A(()=>{const T=[...new Set([...s.values()].map(w=>w.value))].sort((w,b)=>w-b),P=[];for(const w of T){const b=i.value.filter(S=>{var E;return((E=s.get(S))==null?void 0:E.value)===w});P.push(...b)}return bD(P,a,r,o)}),h=A(()=>!Array.from(l.values()).some(T=>T.value)),g=A(()=>f.value[f.value.length-1].layer),p=A(()=>({"--v-layout-left":Re(g.value.left),"--v-layout-right":Re(g.value.right),"--v-layout-top":Re(g.value.top),"--v-layout-bottom":Re(g.value.bottom),...h.value?void 0:{transition:"none"}})),m=A(()=>f.value.slice(1).map((T,P)=>{let{id:w}=T;const{layer:b}=f.value[P],S=r.get(w),E=a.get(w);return{id:w,...b,size:Number(S.value),position:E.value}})),v=T=>m.value.find(P=>P.id===T),_=Ht("createLayout"),M=Me(!1);Zt(()=>{M.value=!0}),Rt(Bo,{register:(T,P)=>{let{id:w,order:b,position:S,layoutSize:E,elementSize:R,active:L,disableTransitions:O,absolute:G}=P;s.set(w,b),a.set(w,S),r.set(w,E),o.set(w,L),O&&l.set(w,O);const j=Ts(kb,_==null?void 0:_.vnode).indexOf(T);j>-1?i.value.splice(j,0,w):i.value.push(w);const B=A(()=>m.value.findIndex(te=>te.id===w)),X=A(()=>n.value+f.value.length*2-B.value*2),W=A(()=>{const te=S.value==="left"||S.value==="right",Se=S.value==="right",$=S.value==="bottom",he=R.value??E.value,ae=he===0?"%":"px",Q={[S.value]:0,zIndex:X.value,transform:`translate${te?"X":"Y"}(${(L.value?0:-(he===0?100:he))*(Se||$?-1:1)}${ae})`,position:G.value||n.value!==Ep?"absolute":"fixed",...h.value?void 0:{transition:"none"}};if(!M.value)return Q;const ve=m.value[B.value];if(!ve)throw new Error(`[Vuetify] Could not find layout item "${w}"`);const Ge=d.value.get(w);return Ge&&(ve[Ge.position]+=Ge.amount),{...Q,height:te?`calc(100% - ${ve.top}px - ${ve.bottom}px)`:R.value?`${R.value}px`:void 0,left:Se?void 0:`${ve.left}px`,right:Se?`${ve.right}px`:void 0,top:S.value!=="bottom"?`${ve.top}px`:void 0,bottom:S.value!=="top"?`${ve.bottom}px`:void 0,width:te?R.value?`${R.value}px`:void 0:`calc(100% - ${ve.left}px - ${ve.right}px)`}}),H=A(()=>({zIndex:X.value-1}));return{layoutItemStyles:W,layoutItemScrimStyles:H,zIndex:X}},unregister:T=>{s.delete(T),a.delete(T),r.delete(T),o.delete(T),l.delete(T),i.value=i.value.filter(P=>P!==T)},mainRect:g,mainStyles:p,getLayoutItem:v,items:m,layoutRect:c,rootZIndex:n});const x=A(()=>["v-layout",{"v-layout--full-height":e.fullHeight}]),C=A(()=>({zIndex:t?n.value:void 0,position:t?"relative":void 0,overflow:t?"hidden":void 0}));return{layoutClasses:x,layoutStyles:C,getLayoutItem:v,items:m,layoutRect:c,layoutRef:u}}function Ob(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{blueprint:t,...n}=e,i=An(t,n),{aliases:a={},components:r={},directives:s={}}=i,o=aI(i.defaults),l=oD(i.display,i.ssr),u=_D(i.theme),c=gD(i.icons),d=vI(i.locale),f=aD(i.date,d),h=uD(i.goTo,d);return{install:p=>{for(const m in s)p.directive(m,s[m]);for(const m in r)p.component(m,r[m]);for(const m in a)p.component(m,ii({...a[m],name:m,aliasName:a[m].name}));if(u.install(p),p.provide($s,o),p.provide(Yf,l),p.provide(Uo,u),p.provide(qf,c),p.provide(Xs,d),p.provide(Rb,f.options),p.provide(gp,f.instance),p.provide(Db,h),mt&&i.ssr)if(p.$nuxt)p.$nuxt.hook("app:suspense:resolve",()=>{l.update()});else{const{mount:m}=p;p.mount=function(){const v=m(...arguments);return ft(()=>l.update()),p.mount=m,v}}gn.reset(),p.mixin({computed:{$vuetify(){return _n({defaults:xs.call(this,$s),display:xs.call(this,Yf),theme:xs.call(this,Uo),icons:xs.call(this,qf),locale:xs.call(this,Xs),date:xs.call(this,gp)})}}})},defaults:o,display:l,theme:u,icons:c,locale:d,date:f,goTo:h}}const xD="3.7.18";Ob.version=xD;function xs(e){var i,a;const t=this.$,n=((i=t.parent)==null?void 0:i.provides)??((a=t.vnode.appContext)==null?void 0:a.provides);if(n&&e in n)return n[e]}const SD=["aria-label"],MD={class:"wechat-modal-header"},ED={class:"modal-title"},wD={class:"wechat-modal-body"},TD={class:"qr-code-wrapper"},CD=["src"],AD={key:0,class:"qr-code-loader"},PD={class:"qr-hint"},RD={class:"wechat-modal-footer"},ID={key:0,class:"scan-animation"},DD={__name:"WechatModal",props:{modelValue:{type:Boolean,required:!0},qrCode:{type:String,required:!0,validator:e=>e?e.startsWith("/")||e.startsWith("http")||e.startsWith("data:image")||e.startsWith("@/"):!1},title:{type:String,default:"微信扫码添加"},hint:{type:String,default:"打开微信扫一扫,添加我为好友"},duration:{type:Number,default:0,validator:e=>e>=0},closeOnClickOutside:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},zIndex:{type:Number,default:9999}},emits:["update:modelValue","closed","opened","qr-loaded","qr-error"],setup(e,{emit:t}){vE(p=>({a115c844:e.zIndex}));const n=e,i=t,a=lc(),r=_e(null),s=_e(!1);let o=null;const l=A(()=>({zIndex:n.zIndex})),u=()=>{clearTimeout(o),i("update:modelValue",!1),i("closed")},c=p=>{n.closeOnClickOutside&&r.value&&!r.value.contains(p.target)&&u()},d=p=>{n.closeOnEsc&&p.key==="Escape"&&u()},f=()=>{n.duration>0&&(o=setTimeout(()=>{u()},n.duration))},h=()=>{s.value=!0,i("qr-loaded"),f()},g=()=>{console.error("微信二维码加载失败"),i("qr-error")};return Te(()=>n.modelValue,p=>{p?(s.value=!1,i("opened"),document.body.style.overflow="hidden",document.documentElement.style.paddingRight=window.innerWidth-document.documentElement.clientWidth+"px"):(document.body.style.overflow="",document.documentElement.style.paddingRight="")},{immediate:!0}),Na(document,"mousedown",c),Na(document,"keydown",d),$r(()=>{clearTimeout(o),document.body.style.overflow="",document.documentElement.style.paddingRight=""}),(p,m)=>(Zn(),Gh(da,{name:"wechat-modal"},{default:Py(()=>[e.modelValue?(Zn(),Oi("div",{key:0,class:Ir(["wechat-modal-mask",{"dark-mode":on(a).global.name.value==="dark"}]),style:Er(l.value)},[Ft("div",{ref_key:"modalRef",ref:r,class:"wechat-modal-container",role:"dialog","aria-modal":"true","aria-label":e.title},[Ft("div",MD,[Ft("h3",ED,hi(e.title),1),e.showCloseButton?(Zn(),Oi("button",{key:0,class:"modal-close-btn",onClick:u,"aria-label":"关闭微信二维码弹窗"},m[0]||(m[0]=[Ft("i",{class:"ri-close-line"},null,-1)]))):yo("",!0)]),Ft("div",wD,[Ft("div",TD,[Ft("img",{src:e.qrCode,alt:"微信二维码",class:Ir(["qr-code-image",{loaded:s.value}]),loading:"lazy",onLoad:h,onError:g},null,42,CD),s.value?yo("",!0):(Zn(),Oi("div",AD,m[1]||(m[1]=[Ft("div",{class:"loader-spinner"},null,-1)])))]),Ft("p",PD,hi(e.hint),1)]),Ft("div",RD,[s.value?(Zn(),Oi("div",ID)):yo("",!0),m[2]||(m[2]=Ft("p",{class:"footer-text"},"长按识别二维码",-1))])],8,SD)],6)):yo("",!0)]),_:1}))}},Ub=sl(DD,[["__scopeId","data-v-6fd674b3"]]),LD={class:"social-grid"},kD=["onClick","aria-label","onKeydown"],VD={class:"social-icon-wrapper"},FD={class:"social-name"},ND={__name:"SocialLinks",props:{socialPlatforms:{type:Array,required:!1,default:()=>[{name:"GitHub",icon:"ri-github-fill",url:"https://github.com/cattom",color:"#181717",hoverColor:"#6e5494",ariaLabel:"访问我的GitHub主页"},{name:"Twitter",icon:"ri-twitter-x-fill",url:"https://twitter.com/cattom",color:"#000000",hoverColor:"#1DA1F2",ariaLabel:"在Twitter上关注我"},{name:"LinkedIn",icon:"ri-linkedin-fill",url:"https://linkedin.com/in/cattom",color:"#0A66C2",hoverColor:"#0077B5",ariaLabel:"查看我的LinkedIn资料"},{name:"Email",icon:"ri-mail-fill",url:"mailto:hi@cattom.me",color:"#D44638",hoverColor:"#EA4335",ariaLabel:"发送电子邮件给我"},{name:"WeChat",icon:"ri-wechat-fill",color:"#07C160",hoverColor:"#2DC100",ariaLabel:"扫描我的微信二维码",qrCode:new URL("/assets/images/wechat-qr.png",import.meta.url).href}],validator:e=>Array.isArray(e)&&e.every(t=>typeof t=="object"&&t!==null&&t.name&&typeof t.name=="string")}},setup(e){lc();const t=_e(null),{elementX:n,elementY:i}=gR(t),a=e,r=_e(!1),s=_e(""),o=c=>{c.qrCode&&(s.value=c.qrCode,r.value=!r.value)};A(()=>a.socialPlatforms.filter(c=>c.qrCode));const l=A(()=>{var h,g;const d=(n.value-(((h=t.value)==null?void 0:h.offsetWidth)/2||0))/20,f=((((g=t.value)==null?void 0:g.offsetHeight)/2||0)-i.value)/20;return{transform:`
perspective(1000px)
rotateX(${Math.min(Math.max(-f,-8),8)}deg)
rotateY(${Math.min(Math.max(d,-8),8)}deg)
`,transition:"transform 0.5s cubic-bezier(0.03, 0.98, 0.52, 0.99)"}}),u=c=>{c&&window.open(c,"_blank","noopener,noreferrer")};return(c,d)=>(Zn(),Oi("div",{ref_key:"cardRef",ref:t,class:"social-links-card",style:Er(l.value)},[y(Ub,{modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=f=>r.value=f),"qr-code":s.value,title:"微信扫码添加",hint:"打开微信扫一扫,添加我为好友",onClosed:d[1]||(d[1]=f=>s.value="")},null,8,["modelValue","qr-code"]),Ft("div",LD,[(Zn(!0),Oi(Ne,null,bM(a.socialPlatforms,(f,h)=>(Zn(),Oi("div",{key:h,class:"social-item",style:Er({"--hover-color":f.hoverColor||f.color}),onClick:g=>f.qrCode?o(f):u(f.url),role:"button","aria-label":f.ariaLabel||`${f.name}链接`,tabindex:"0",onKeydown:UE(g=>f.qrCode?o(f):u(f.url),["enter"])},[Ft("div",VD,[Ft("i",{class:Ir([f.icon,"social-icon"]),style:Er({color:f.color})},null,6)]),Ft("span",FD,hi(f.name),1),d[2]||(d[2]=Ft("div",{class:"hover-light"},null,-1))],44,kD))),128))])],4))}},OD=sl(ND,[["__scopeId","data-v-bc39773d"]]),UD={class:"typewriter-container","aria-live":"polite"},BD={class:"typewriter-text"},zD={__name:"Typewriter",props:{texts:{type:Array,required:!0,validator:e=>Array.isArray(e)&&e.length>0&&e.every(t=>typeof t=="string"&&t.length>0)},typingSpeed:{type:Number,default:100,validator:e=>e>0},deletingSpeed:{type:Number,default:50,validator:e=>e>0},delayBetweenTexts:{type:Number,default:1500,validator:e=>e>=0},cursorBlinkSpeed:{type:Number,default:500,validator:e=>e>0},loop:{type:Boolean,default:!0}},emits:["cycle-complete"],setup(e,{emit:t}){const n=e,i=t,a=_e(""),r=_e("typing"),s=_e(0),o=_e(!0),l=_e(!1),u=A(()=>n.texts[s.value]||"");let c=[];const d=()=>{c.forEach(_=>clearTimeout(_)),c=[]},f=(_,M)=>{const x=setTimeout(()=>{try{_()}catch(C){console.error("Typewriter error:",C),p()}},M);return c.push(x),x};let h;const g=()=>{h=setInterval(()=>{o.value=!o.value},n.cursorBlinkSpeed)},p=()=>{d(),a.value="",s.value=0,r.value="typing",l.value=!1},m=()=>{if(l.value)switch(r.value){case"typing":a.value.length<u.value.length?(a.value=u.value.substring(0,a.value.length+1),f(m,n.typingSpeed)):(r.value="pausing",f(()=>{r.value="deleting",m()},n.delayBetweenTexts));break;case"deleting":a.value.length>0?(a.value=u.value.substring(0,a.value.length-1),f(m,n.deletingSpeed)):n.loop||s.value<n.texts.length-1?(s.value=(s.value+1)%n.texts.length,i("cycle-complete",s.value),r.value="typing",f(m,n.delayBetweenTexts/2)):l.value=!1;break}},v=()=>{l.value||n.texts.length!==0&&(l.value=!0,s.value=0,r.value="typing",a.value="",m())};return Zt(()=>{g(),v()}),$r(()=>{clearInterval(h),d()}),Te(()=>n.texts,(_,M)=>{JSON.stringify(_)!==JSON.stringify(M)&&(p(),v())},{deep:!0}),(_,M)=>(Zn(),Oi("div",UD,[Ft("span",BD,hi(a.value),1),kt(Ft("span",{class:Ir(["typewriter-cursor",{"cursor-visible":o.value}]),"aria-hidden":"true"},"|",2),[[vi,l.value]])]))}},HD=sl(zD,[["__scopeId","data-v-5a34922f"]]),GD={class:"app-container"},WD={class:"content"},$D={class:"profile-section"},XD={__name:"App",setup(e){const t=_e(!1);return(n,i)=>(Zn(),Oi("div",GD,[y(yR),Ft("main",WD,[Ft("div",$D,[i[2]||(i[2]=Ft("div",{class:"avatar-wrapper"},[Ft("img",{src:WE,alt:"Cat Tom Avatar",class:"avatar"})],-1)),y(HD,{texts:["你好我是Cat Tom","Web全栈开发者","开源爱好者"],speed:100,class:"title"}),i[3]||(i[3]=Ft("p",{class:"description"}," 专注于现代Web技术栈擅长Vue/React全栈开发开源项目贡献者 ",-1)),y(OD,{onShowWechat:i[0]||(i[0]=a=>t.value=!0)})])]),t.value?(Zn(),Gh(Ub,{key:0,onClose:i[1]||(i[1]=a=>t.value=!1)})):yo("",!0)]))}},YD=sl(XD,[["__scopeId","data-v-96b51bfc"]]),qD=Y({...Ie(),...Vb({fullHeight:!0}),...dt()},"VApp"),jD=de()({name:"VApp",props:qD(),setup(e,t){let{slots:n}=t;const i=pt(e),{layoutClasses:a,getLayoutItem:r,items:s,layoutRef:o}=Nb(e),{rtlClasses:l}=rn();return pe(()=>{var u;return y("div",{ref:o,class:["v-application",i.themeClasses.value,a.value,l.value,e.class],style:[e.style]},[y("div",{class:"v-application__wrap"},[(u=n.default)==null?void 0:u.call(n)])])}),{getLayoutItem:r,items:s,theme:i}}}),Je=Y({tag:{type:String,default:"div"}},"tag"),Bb=Y({text:String,...Ie(),...Je()},"VToolbarTitle"),gm=de()({name:"VToolbarTitle",props:Bb(),setup(e,t){let{slots:n}=t;return pe(()=>{const i=!!(n.default||n.text||e.text);return y(e.tag,{class:["v-toolbar-title",e.class],style:e.style},{default:()=>{var a;return[i&&y("div",{class:"v-toolbar-title__placeholder"},[n.text?n.text():e.text,(a=n.default)==null?void 0:a.call(n)])]}})}),{}}}),KD=Y({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},"transition");function ai(e,t,n){return de()({name:e,props:KD({mode:n,origin:t}),setup(i,a){let{slots:r}=a;const s={onBeforeEnter(o){i.origin&&(o.style.transformOrigin=i.origin)},onLeave(o){if(i.leaveAbsolute){const{offsetTop:l,offsetLeft:u,offsetWidth:c,offsetHeight:d}=o;o._transitionInitialStyles={position:o.style.position,top:o.style.top,left:o.style.left,width:o.style.width,height:o.style.height},o.style.position="absolute",o.style.top=`${l}px`,o.style.left=`${u}px`,o.style.width=`${c}px`,o.style.height=`${d}px`}i.hideOnLeave&&o.style.setProperty("display","none","important")},onAfterLeave(o){if(i.leaveAbsolute&&(o!=null&&o._transitionInitialStyles)){const{position:l,top:u,left:c,width:d,height:f}=o._transitionInitialStyles;delete o._transitionInitialStyles,o.style.position=l||"",o.style.top=u||"",o.style.left=c||"",o.style.width=d||"",o.style.height=f||""}}};return()=>{const o=i.group?$h:da;return _a(o,{name:i.disabled?"":e,css:!i.disabled,...i.group?void 0:{mode:i.mode},...i.disabled?{}:s},r.default)}}})}function zb(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"in-out";return de()({name:e,props:{mode:{type:String,default:n},disabled:Boolean,group:Boolean},setup(i,a){let{slots:r}=a;const s=i.group?$h:da;return()=>_a(s,{name:i.disabled?"":e,css:!i.disabled,...i.disabled?{}:t},r.default)}})}function Hb(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";const n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)?"width":"height",i=Xn(`offset-${n}`);return{onBeforeEnter(s){s._parent=s.parentNode,s._initialStyle={transition:s.style.transition,overflow:s.style.overflow,[n]:s.style[n]}},onEnter(s){const o=s._initialStyle;if(!o)return;s.style.setProperty("transition","none","important"),s.style.overflow="hidden";const l=`${s[i]}px`;s.style[n]="0",s.offsetHeight,s.style.transition=o.transition,e&&s._parent&&s._parent.classList.add(e),requestAnimationFrame(()=>{s.style[n]=l})},onAfterEnter:r,onEnterCancelled:r,onLeave(s){s._initialStyle={transition:"",overflow:s.style.overflow,[n]:s.style[n]},s.style.overflow="hidden",s.style[n]=`${s[i]}px`,s.offsetHeight,requestAnimationFrame(()=>s.style[n]="0")},onAfterLeave:a,onLeaveCancelled:a};function a(s){e&&s._parent&&s._parent.classList.remove(e),r(s)}function r(s){if(!s._initialStyle)return;const o=s._initialStyle[n];s.style.overflow=s._initialStyle.overflow,o!=null&&(s.style[n]=o),delete s._initialStyle}}const ZD=Y({target:[Object,Array]},"v-dialog-transition"),uc=de()({name:"VDialogTransition",props:ZD(),setup(e,t){let{slots:n}=t;const i={onBeforeEnter(a){a.style.pointerEvents="none",a.style.visibility="hidden"},async onEnter(a,r){var f;await new Promise(h=>requestAnimationFrame(h)),await new Promise(h=>requestAnimationFrame(h)),a.style.visibility="";const{x:s,y:o,sx:l,sy:u,speed:c}=Tp(e.target,a),d=Mr(a,[{transform:`translate(${s}px, ${o}px) scale(${l}, ${u})`,opacity:0},{}],{duration:225*c,easing:lI});(f=wp(a))==null||f.forEach(h=>{Mr(h,[{opacity:0},{opacity:0,offset:.33},{}],{duration:225*2*c,easing:Oo})}),d.finished.then(()=>r())},onAfterEnter(a){a.style.removeProperty("pointer-events")},onBeforeLeave(a){a.style.pointerEvents="none"},async onLeave(a,r){var f;await new Promise(h=>requestAnimationFrame(h));const{x:s,y:o,sx:l,sy:u,speed:c}=Tp(e.target,a);Mr(a,[{},{transform:`translate(${s}px, ${o}px) scale(${l}, ${u})`,opacity:0}],{duration:125*c,easing:uI}).finished.then(()=>r()),(f=wp(a))==null||f.forEach(h=>{Mr(h,[{},{opacity:0,offset:.2},{opacity:0}],{duration:125*2*c,easing:Oo})})},onAfterLeave(a){a.style.removeProperty("pointer-events")}};return()=>e.target?y(da,ge({name:"dialog-transition"},i,{css:!1}),n):y(da,{name:"dialog-transition"},n)}});function wp(e){var n;const t=(n=e.querySelector(":scope > .v-card, :scope > .v-sheet, :scope > .v-list"))==null?void 0:n.children;return t&&[...t]}function Tp(e,t){const n=db(e),i=om(t),[a,r]=getComputedStyle(t).transformOrigin.split(" ").map(v=>parseFloat(v)),[s,o]=getComputedStyle(t).getPropertyValue("--v-overlay-anchor-origin").split(" ");let l=n.left+n.width/2;s==="left"||o==="left"?l-=n.width/2:(s==="right"||o==="right")&&(l+=n.width/2);let u=n.top+n.height/2;s==="top"||o==="top"?u-=n.height/2:(s==="bottom"||o==="bottom")&&(u+=n.height/2);const c=n.width/i.width,d=n.height/i.height,f=Math.max(1,c,d),h=c/f||0,g=d/f||0,p=i.width*i.height/(window.innerWidth*window.innerHeight),m=p>.12?Math.min(1.5,(p-.12)*10+1):1;return{x:l-(a+i.left),y:u-(r+i.top),sx:h,sy:g,speed:m}}const JD=ai("fab-transition","center center","out-in"),QD=ai("dialog-bottom-transition"),eL=ai("dialog-top-transition"),zo=ai("fade-transition"),pm=ai("scale-transition"),tL=ai("scroll-x-transition"),nL=ai("scroll-x-reverse-transition"),iL=ai("scroll-y-transition"),aL=ai("scroll-y-reverse-transition"),rL=ai("slide-x-transition"),sL=ai("slide-x-reverse-transition"),ym=ai("slide-y-transition"),oL=ai("slide-y-reverse-transition"),cc=zb("expand-transition",Hb()),_m=zb("expand-x-transition",Hb("",!0)),lL=Y({defaults:Object,disabled:Boolean,reset:[Number,String],root:[Boolean,String],scoped:Boolean},"VDefaultsProvider"),rt=de(!1)({name:"VDefaultsProvider",props:lL(),setup(e,t){let{slots:n}=t;const{defaults:i,disabled:a,reset:r,root:s,scoped:o}=Wr(e);return zt(i,{reset:r,root:s,scoped:o,disabled:a}),()=>{var l;return(l=n.default)==null?void 0:l.call(n)}}}),Qt=Y({height:[Number,String],maxHeight:[Number,String],maxWidth:[Number,String],minHeight:[Number,String],minWidth:[Number,String],width:[Number,String]},"dimension");function en(e){return{dimensionStyles:A(()=>{const n={},i=Re(e.height),a=Re(e.maxHeight),r=Re(e.maxWidth),s=Re(e.minHeight),o=Re(e.minWidth),l=Re(e.width);return i!=null&&(n.height=i),a!=null&&(n.maxHeight=a),r!=null&&(n.maxWidth=r),s!=null&&(n.minHeight=s),o!=null&&(n.minWidth=o),l!=null&&(n.width=l),n})}}function uL(e){return{aspectStyles:A(()=>{const t=Number(e.aspectRatio);return t?{paddingBottom:String(1/t*100)+"%"}:void 0})}}const Gb=Y({aspectRatio:[String,Number],contentClass:null,inline:Boolean,...Ie(),...Qt()},"VResponsive"),Kf=de()({name:"VResponsive",props:Gb(),setup(e,t){let{slots:n}=t;const{aspectStyles:i}=uL(e),{dimensionStyles:a}=en(e);return pe(()=>{var r;return y("div",{class:["v-responsive",{"v-responsive--inline":e.inline},e.class],style:[a.value,e.style]},[y("div",{class:"v-responsive__sizer",style:i.value},null),(r=n.additional)==null?void 0:r.call(n),n.default&&y("div",{class:["v-responsive__content",e.contentClass]},[n.default()])])}),{}}});function bm(e){return sm(()=>{const t=[],n={};if(e.value.background)if(Wf(e.value.background)){if(n.backgroundColor=e.value.background,!e.value.text&&KR(e.value.background)){const i=ei(e.value.background);if(i.a==null||i.a===1){const a=xb(i);n.color=a,n.caretColor=a}}}else t.push(`bg-${e.value.background}`);return e.value.text&&(Wf(e.value.text)?(n.color=e.value.text,n.caretColor=e.value.text):t.push(`text-${e.value.text}`)),{colorClasses:t,colorStyles:n}})}function bn(e,t){const n=A(()=>({text:Ut(e)?e.value:t?e[t]:null})),{colorClasses:i,colorStyles:a}=bm(n);return{textColorClasses:i,textColorStyles:a}}function wt(e,t){const n=A(()=>({background:Ut(e)?e.value:t?e[t]:null})),{colorClasses:i,colorStyles:a}=bm(n);return{backgroundColorClasses:i,backgroundColorStyles:a}}const Vt=Y({rounded:{type:[Boolean,Number,String],default:void 0},tile:Boolean},"rounded");function Gt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Gi();return{roundedClasses:A(()=>{const i=Ut(e)?e.value:e.rounded,a=Ut(e)?e.value:e.tile,r=[];if(i===!0||i==="")r.push(`${t}--rounded`);else if(typeof i=="string"||i===0)for(const s of String(i).split(" "))r.push(`rounded-${s}`);else(a||i===!1)&&r.push("rounded-0");return r})}}const Di=Y({transition:{type:[Boolean,String,Object],default:"fade-transition",validator:e=>e!==!0}},"transition"),Pn=(e,t)=>{let{slots:n}=t;const{transition:i,disabled:a,group:r,...s}=e,{component:o=r?$h:da,...l}=typeof i=="object"?i:{};return _a(o,ge(typeof i=="string"?{name:a?"":i}:l,typeof i=="string"?{}:Object.fromEntries(Object.entries({disabled:a,group:r}).filter(u=>{let[c,d]=u;return d!==void 0})),s),n)};function cL(e,t){if(!im)return;const n=t.modifiers||{},i=t.value,{handler:a,options:r}=typeof i=="object"?i:{handler:i,options:{}},s=new IntersectionObserver(function(){var d;let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1?arguments[1]:void 0;const u=(d=e._observe)==null?void 0:d[t.instance.$.uid];if(!u)return;const c=o.some(f=>f.isIntersecting);a&&(!n.quiet||u.init)&&(!n.once||c||u.init)&&a(c,o,l),c&&n.once?Wb(e,t):u.init=!0},r);e._observe=Object(e._observe),e._observe[t.instance.$.uid]={init:!1,observer:s},s.observe(e)}function Wb(e,t){var i;const n=(i=e._observe)==null?void 0:i[t.instance.$.uid];n&&(n.observer.unobserve(e),delete e._observe[t.instance.$.uid])}const ul={mounted:cL,unmounted:Wb},$b=Y({absolute:Boolean,alt:String,cover:Boolean,color:String,draggable:{type:[Boolean,String],default:void 0},eager:Boolean,gradient:String,lazySrc:String,options:{type:Object,default:()=>({root:void 0,rootMargin:void 0,threshold:void 0})},sizes:String,src:{type:[String,Object],default:""},crossorigin:String,referrerpolicy:String,srcset:String,position:String,...Gb(),...Ie(),...Vt(),...Di()},"VImg"),va=de()({name:"VImg",directives:{intersect:ul},props:$b(),emits:{loadstart:e=>!0,load:e=>!0,error:e=>!0},setup(e,t){let{emit:n,slots:i}=t;const{backgroundColorClasses:a,backgroundColorStyles:r}=wt(se(e,"color")),{roundedClasses:s}=Gt(e),o=Ht("VImg"),l=Me(""),u=_e(),c=Me(e.eager?"loading":"idle"),d=Me(),f=Me(),h=A(()=>e.src&&typeof e.src=="object"?{src:e.src.src,srcset:e.srcset||e.src.srcset,lazySrc:e.lazySrc||e.src.lazySrc,aspect:Number(e.aspectRatio||e.src.aspect||0)}:{src:e.src,srcset:e.srcset,lazySrc:e.lazySrc,aspect:Number(e.aspectRatio||0)}),g=A(()=>h.value.aspect||d.value/f.value||0);Te(()=>e.src,()=>{p(c.value!=="idle")}),Te(g,(R,L)=>{!R&&L&&u.value&&x(u.value)}),js(()=>p());function p(R){if(!(e.eager&&R)&&!(im&&!R&&!e.eager)){if(c.value="loading",h.value.lazySrc){const L=new Image;L.src=h.value.lazySrc,x(L,null)}h.value.src&&ft(()=>{var L;n("loadstart",((L=u.value)==null?void 0:L.currentSrc)||h.value.src),setTimeout(()=>{var O;if(!o.isUnmounted)if((O=u.value)!=null&&O.complete){if(u.value.naturalWidth||v(),c.value==="error")return;g.value||x(u.value,null),c.value==="loading"&&m()}else g.value||x(u.value),_()})})}}function m(){var R;o.isUnmounted||(_(),x(u.value),c.value="loaded",n("load",((R=u.value)==null?void 0:R.currentSrc)||h.value.src))}function v(){var R;o.isUnmounted||(c.value="error",n("error",((R=u.value)==null?void 0:R.currentSrc)||h.value.src))}function _(){const R=u.value;R&&(l.value=R.currentSrc||R.src)}let M=-1;dn(()=>{clearTimeout(M)});function x(R){let L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;const O=()=>{if(clearTimeout(M),o.isUnmounted)return;const{naturalHeight:G,naturalWidth:U}=R;G||U?(d.value=U,f.value=G):!R.complete&&c.value==="loading"&&L!=null?M=window.setTimeout(O,L):(R.currentSrc.endsWith(".svg")||R.currentSrc.startsWith("data:image/svg+xml"))&&(d.value=1,f.value=1)};O()}const C=A(()=>({"v-img__img--cover":e.cover,"v-img__img--contain":!e.cover})),T=()=>{var O;if(!h.value.src||c.value==="idle")return null;const R=y("img",{class:["v-img__img",C.value],style:{objectPosition:e.position},crossorigin:e.crossorigin,src:h.value.src,srcset:h.value.srcset,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable,sizes:e.sizes,ref:u,onLoad:m,onError:v},null),L=(O=i.sources)==null?void 0:O.call(i);return y(Pn,{transition:e.transition,appear:!0},{default:()=>[kt(L?y("picture",{class:"v-img__picture"},[L,R]):R,[[vi,c.value==="loaded"]])]})},P=()=>y(Pn,{transition:e.transition},{default:()=>[h.value.lazySrc&&c.value!=="loaded"&&y("img",{class:["v-img__img","v-img__img--preload",C.value],style:{objectPosition:e.position},crossorigin:e.crossorigin,src:h.value.lazySrc,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable},null)]}),w=()=>i.placeholder?y(Pn,{transition:e.transition,appear:!0},{default:()=>[(c.value==="loading"||c.value==="error"&&!i.error)&&y("div",{class:"v-img__placeholder"},[i.placeholder()])]}):null,b=()=>i.error?y(Pn,{transition:e.transition,appear:!0},{default:()=>[c.value==="error"&&y("div",{class:"v-img__error"},[i.error()])]}):null,S=()=>e.gradient?y("div",{class:"v-img__gradient",style:{backgroundImage:`linear-gradient(${e.gradient})`}},null):null,E=Me(!1);{const R=Te(g,L=>{L&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{E.value=!0})}),R())})}return pe(()=>{const R=Kf.filterProps(e);return kt(y(Kf,ge({class:["v-img",{"v-img--absolute":e.absolute,"v-img--booting":!E.value},a.value,s.value,e.class],style:[{width:Re(e.width==="auto"?d.value:e.width)},r.value,e.style]},R,{aspectRatio:g.value,"aria-label":e.alt,role:e.alt?"img":void 0}),{additional:()=>y(Ne,null,[y(T,null,null),y(P,null,null),y(S,null,null),y(w,null,null),y(b,null,null)]),default:i.default}),[[ni("intersect"),{handler:p,options:e.options},null,{once:!0}]])}),{currentSrc:l,image:u,state:c,naturalWidth:d,naturalHeight:f}}}),Yn=Y({border:[Boolean,Number,String]},"border");function ri(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Gi();return{borderClasses:A(()=>{const i=Ut(e)?e.value:e.border,a=[];if(i===!0||i==="")a.push(`${t}--border`);else if(typeof i=="string"||i===0)for(const r of String(i).split(" "))a.push(`border-${r}`);return a})}}const sn=Y({elevation:{type:[Number,String],validator(e){const t=parseInt(e);return!isNaN(t)&&t>=0&&t<=24}}},"elevation");function pn(e){return{elevationClasses:A(()=>{const n=Ut(e)?e.value:e.elevation,i=[];return n==null||i.push(`elevation-${n}`),i})}}const dL=[null,"prominent","default","comfortable","compact"],Xb=Y({absolute:Boolean,collapse:Boolean,color:String,density:{type:String,default:"default",validator:e=>dL.includes(e)},extended:Boolean,extensionHeight:{type:[Number,String],default:48},flat:Boolean,floating:Boolean,height:{type:[Number,String],default:64},image:String,title:String,...Yn(),...Ie(),...sn(),...Vt(),...Je({tag:"header"}),...dt()},"VToolbar"),Zf=de()({name:"VToolbar",props:Xb(),setup(e,t){var h;let{slots:n}=t;const{backgroundColorClasses:i,backgroundColorStyles:a}=wt(se(e,"color")),{borderClasses:r}=ri(e),{elevationClasses:s}=pn(e),{roundedClasses:o}=Gt(e),{themeClasses:l}=pt(e),{rtlClasses:u}=rn(),c=Me(!!(e.extended||(h=n.extension)!=null&&h.call(n))),d=A(()=>parseInt(Number(e.height)+(e.density==="prominent"?Number(e.height):0)-(e.density==="comfortable"?8:0)-(e.density==="compact"?16:0),10)),f=A(()=>c.value?parseInt(Number(e.extensionHeight)+(e.density==="prominent"?Number(e.extensionHeight):0)-(e.density==="comfortable"?4:0)-(e.density==="compact"?8:0),10):0);return zt({VBtn:{variant:"text"}}),pe(()=>{var v;const g=!!(e.title||n.title),p=!!(n.image||e.image),m=(v=n.extension)==null?void 0:v.call(n);return c.value=!!(e.extended||m),y(e.tag,{class:["v-toolbar",{"v-toolbar--absolute":e.absolute,"v-toolbar--collapse":e.collapse,"v-toolbar--flat":e.flat,"v-toolbar--floating":e.floating,[`v-toolbar--density-${e.density}`]:!0},i.value,r.value,s.value,o.value,l.value,u.value,e.class],style:[a.value,e.style]},{default:()=>[p&&y("div",{key:"image",class:"v-toolbar__image"},[n.image?y(rt,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},n.image):y(va,{key:"image-img",cover:!0,src:e.image},null)]),y(rt,{defaults:{VTabs:{height:Re(d.value)}}},{default:()=>{var _,M,x;return[y("div",{class:"v-toolbar__content",style:{height:Re(d.value)}},[n.prepend&&y("div",{class:"v-toolbar__prepend"},[(_=n.prepend)==null?void 0:_.call(n)]),g&&y(gm,{key:"title",text:e.title},{text:n.title}),(M=n.default)==null?void 0:M.call(n),n.append&&y("div",{class:"v-toolbar__append"},[(x=n.append)==null?void 0:x.call(n)])])]}}),y(rt,{defaults:{VTabs:{height:Re(f.value)}}},{default:()=>[y(cc,null,{default:()=>[c.value&&y("div",{class:"v-toolbar__extension",style:{height:Re(f.value)}},[m])]})]})]})}),{contentHeight:d,extensionHeight:f}}}),fL=Y({scrollTarget:{type:String},scrollThreshold:{type:[String,Number],default:300}},"scroll");function hL(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{canScroll:n}=t;let i=0,a=0;const r=_e(null),s=Me(0),o=Me(0),l=Me(0),u=Me(!1),c=Me(!1),d=A(()=>Number(e.scrollThreshold)),f=A(()=>qt((d.value-s.value)/d.value||0)),h=()=>{const g=r.value;if(!g||n&&!n.value)return;i=s.value,s.value="window"in g?g.pageYOffset:g.scrollTop;const p=g instanceof Window?document.documentElement.scrollHeight:g.scrollHeight;if(a!==p){a=p;return}c.value=s.value<i,l.value=Math.abs(s.value-d.value)};return Te(c,()=>{o.value=o.value||s.value}),Te(u,()=>{o.value=0}),Zt(()=>{Te(()=>e.scrollTarget,g=>{var m;const p=g?document.querySelector(g):window;p&&p!==r.value&&((m=r.value)==null||m.removeEventListener("scroll",h),r.value=p,r.value.addEventListener("scroll",h,{passive:!0}))},{immediate:!0})}),dn(()=>{var g;(g=r.value)==null||g.removeEventListener("scroll",h)}),n&&Te(n,h,{immediate:!0}),{scrollThreshold:d,currentScroll:s,currentThreshold:l,isScrollActive:u,scrollRatio:f,isScrollingUp:c,savedScroll:o}}function Kr(){const e=Me(!1);return Zt(()=>{window.requestAnimationFrame(()=>{e.value=!0})}),{ssrBootStyles:A(()=>e.value?void 0:{transition:"none !important"}),isBooted:jo(e)}}const mL=Y({scrollBehavior:String,modelValue:{type:Boolean,default:!0},location:{type:String,default:"top",validator:e=>["top","bottom"].includes(e)},...Xb(),...qr(),...fL(),height:{type:[Number,String],default:64}},"VAppBar"),vL=de()({name:"VAppBar",props:mL(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const i=_e(),a=He(e,"modelValue"),r=A(()=>{var M;const _=new Set(((M=e.scrollBehavior)==null?void 0:M.split(" "))??[]);return{hide:_.has("hide"),fullyHide:_.has("fully-hide"),inverted:_.has("inverted"),collapse:_.has("collapse"),elevate:_.has("elevate"),fadeImage:_.has("fade-image")}}),s=A(()=>{const _=r.value;return _.hide||_.fullyHide||_.inverted||_.collapse||_.elevate||_.fadeImage||!a.value}),{currentScroll:o,scrollThreshold:l,isScrollingUp:u,scrollRatio:c}=hL(e,{canScroll:s}),d=A(()=>r.value.hide||r.value.fullyHide),f=A(()=>e.collapse||r.value.collapse&&(r.value.inverted?c.value>0:c.value===0)),h=A(()=>e.flat||r.value.fullyHide&&!a.value||r.value.elevate&&(r.value.inverted?o.value>0:o.value===0)),g=A(()=>r.value.fadeImage?r.value.inverted?1-c.value:c.value:void 0),p=A(()=>{var x,C;if(r.value.hide&&r.value.inverted)return 0;const _=((x=i.value)==null?void 0:x.contentHeight)??0,M=((C=i.value)==null?void 0:C.extensionHeight)??0;return d.value?o.value<l.value||r.value.fullyHide?_+M:_:_+M});zn(A(()=>!!e.scrollBehavior),()=>{Bt(()=>{d.value?r.value.inverted?a.value=o.value>l.value:a.value=u.value||o.value<l.value:a.value=!0})});const{ssrBootStyles:m}=Kr(),{layoutItemStyles:v}=jr({id:e.name,order:A(()=>parseInt(e.order,10)),position:se(e,"location"),layoutSize:p,elementSize:Me(void 0),active:a,absolute:se(e,"absolute")});return pe(()=>{const _=Zf.filterProps(e);return y(Zf,ge({ref:i,class:["v-app-bar",{"v-app-bar--bottom":e.location==="bottom"},e.class],style:[{...v.value,"--v-toolbar-image-opacity":g.value,height:void 0,...m.value},e.style]},_,{collapse:f.value,flat:h.value}),n)}),{}}}),gL=[null,"default","comfortable","compact"],fn=Y({density:{type:String,default:"default",validator:e=>gL.includes(e)}},"density");function In(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Gi();return{densityClasses:A(()=>`${t}--density-${e.density}`)}}const pL=["elevated","flat","tonal","outlined","text","plain"];function Ja(e,t){return y(Ne,null,[e&&y("span",{key:"overlay",class:`${t}__overlay`},null),y("span",{key:"underlay",class:`${t}__underlay`},null)])}const pi=Y({color:String,variant:{type:String,default:"elevated",validator:e=>pL.includes(e)}},"variant");function Zr(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Gi();const n=A(()=>{const{variant:r}=on(e);return`${t}--variant-${r}`}),{colorClasses:i,colorStyles:a}=bm(A(()=>{const{variant:r,color:s}=on(e);return{[["elevated","flat"].includes(r)?"background":"text"]:s}}));return{colorClasses:i,colorStyles:a,variantClasses:n}}const Yb=Y({baseColor:String,divided:Boolean,...Yn(),...Ie(),...fn(),...sn(),...Vt(),...Je(),...dt(),...pi()},"VBtnGroup"),Jf=de()({name:"VBtnGroup",props:Yb(),setup(e,t){let{slots:n}=t;const{themeClasses:i}=pt(e),{densityClasses:a}=In(e),{borderClasses:r}=ri(e),{elevationClasses:s}=pn(e),{roundedClasses:o}=Gt(e);zt({VBtn:{height:"auto",baseColor:se(e,"baseColor"),color:se(e,"color"),density:se(e,"density"),flat:!0,variant:se(e,"variant")}}),pe(()=>y(e.tag,{class:["v-btn-group",{"v-btn-group--divided":e.divided},i.value,r.value,a.value,s.value,o.value,e.class],style:e.style},n))}}),Jr=Y({modelValue:{type:null,default:void 0},multiple:Boolean,mandatory:[Boolean,String],max:Number,selectedClass:String,disabled:Boolean},"group"),Qr=Y({value:null,disabled:Boolean,selectedClass:String},"group-item");function es(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const i=Ht("useGroupItem");if(!i)throw new Error("[Vuetify] useGroupItem composable must be used inside a component setup function");const a=gn();Rt(Symbol.for(`${t.description}:id`),a);const r=ot(t,null);if(!r){if(!n)return r;throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${t.description}`)}const s=se(e,"value"),o=A(()=>!!(r.disabled.value||e.disabled));r.register({id:a,value:s,disabled:o},i),dn(()=>{r.unregister(a)});const l=A(()=>r.isSelected(a)),u=A(()=>r.items.value[0].id===a),c=A(()=>r.items.value[r.items.value.length-1].id===a),d=A(()=>l.value&&[r.selectedClass.value,e.selectedClass]);return Te(l,f=>{i.emit("group:selected",{value:f})},{flush:"sync"}),{id:a,isSelected:l,isFirst:u,isLast:c,toggle:()=>r.select(a,!l.value),select:f=>r.select(a,f),selectedClass:d,value:s,disabled:o,group:r}}function Qa(e,t){let n=!1;const i=_n([]),a=He(e,"modelValue",[],f=>f==null?[]:qb(i,Nt(f)),f=>{const h=_L(i,f);return e.multiple?h:h[0]}),r=Ht("useGroup");function s(f,h){const g=f,p=Symbol.for(`${t.description}:id`),v=Ts(p,r==null?void 0:r.vnode).indexOf(h);on(g.value)==null&&(g.value=v,g.useIndexAsValue=!0),v>-1?i.splice(v,0,g):i.push(g)}function o(f){if(n)return;l();const h=i.findIndex(g=>g.id===f);i.splice(h,1)}function l(){const f=i.find(h=>!h.disabled);f&&e.mandatory==="force"&&!a.value.length&&(a.value=[f.id])}Zt(()=>{l()}),dn(()=>{n=!0}),Nh(()=>{for(let f=0;f<i.length;f++)i[f].useIndexAsValue&&(i[f].value=f)});function u(f,h){const g=i.find(p=>p.id===f);if(!(h&&(g!=null&&g.disabled)))if(e.multiple){const p=a.value.slice(),m=p.findIndex(_=>_===f),v=~m;if(h=h??!v,v&&e.mandatory&&p.length<=1||!v&&e.max!=null&&p.length+1>e.max)return;m<0&&h?p.push(f):m>=0&&!h&&p.splice(m,1),a.value=p}else{const p=a.value.includes(f);if(e.mandatory&&p)return;a.value=h??!p?[f]:[]}}function c(f){if(e.multiple,a.value.length){const h=a.value[0],g=i.findIndex(v=>v.id===h);let p=(g+f)%i.length,m=i[p];for(;m.disabled&&p!==g;)p=(p+f)%i.length,m=i[p];if(m.disabled)return;a.value=[i[p].id]}else{const h=i.find(g=>!g.disabled);h&&(a.value=[h.id])}}const d={register:s,unregister:o,selected:a,select:u,disabled:se(e,"disabled"),prev:()=>c(i.length-1),next:()=>c(1),isSelected:f=>a.value.includes(f),selectedClass:A(()=>e.selectedClass),items:A(()=>i),getItemIndex:f=>yL(i,f)};return Rt(t,d),d}function yL(e,t){const n=qb(e,[t]);return n.length?e.findIndex(i=>i.id===n[0]):-1}function qb(e,t){const n=[];return t.forEach(i=>{const a=e.find(s=>Rn(i,s.value)),r=e[i];(a==null?void 0:a.value)!=null?n.push(a.id):r!=null&&n.push(r.id)}),n}function _L(e,t){const n=[];return t.forEach(i=>{const a=e.findIndex(r=>r.id===i);if(~a){const r=e[a];n.push(r.value!=null?r.value:a)}}),n}const xm=Symbol.for("vuetify:v-btn-toggle"),bL=Y({...Yb(),...Jr()},"VBtnToggle"),xL=de()({name:"VBtnToggle",props:bL(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{isSelected:i,next:a,prev:r,select:s,selected:o}=Qa(e,xm);return pe(()=>{const l=Jf.filterProps(e);return y(Jf,ge({class:["v-btn-toggle",e.class]},l,{style:e.style}),{default:()=>{var u;return[(u=n.default)==null?void 0:u.call(n,{isSelected:i,next:a,prev:r,select:s,selected:o})]}})}),{next:a,prev:r,select:s}}}),SL=["x-small","small","default","large","x-large"],$i=Y({size:{type:[String,Number],default:"default"}},"size");function Qs(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Gi();return sm(()=>{let n,i;return Vu(SL,e.size)?n=`${t}--size-${e.size}`:e.size&&(i={width:Re(e.size),height:Re(e.size)}),{sizeClasses:n,sizeStyles:i}})}const ML=Y({color:String,disabled:Boolean,start:Boolean,end:Boolean,icon:We,...Ie(),...$i(),...Je({tag:"i"}),...dt()},"VIcon"),gt=de()({name:"VIcon",props:ML(),setup(e,t){let{attrs:n,slots:i}=t;const a=_e(),{themeClasses:r}=pt(e),{iconData:s}=pD(A(()=>a.value||e.icon)),{sizeClasses:o}=Qs(e),{textColorClasses:l,textColorStyles:u}=bn(se(e,"color"));return pe(()=>{var f,h;const c=(f=i.default)==null?void 0:f.call(i);c&&(a.value=(h=rb(c).filter(g=>g.type===Zo&&g.children&&typeof g.children=="string")[0])==null?void 0:h.children);const d=!!(n.onClick||n.onClickOnce);return y(s.value.component,{tag:e.tag,icon:s.value.icon,class:["v-icon","notranslate",r.value,o.value,l.value,{"v-icon--clickable":d,"v-icon--disabled":e.disabled,"v-icon--start":e.start,"v-icon--end":e.end},e.class],style:[o.value?void 0:{fontSize:Re(e.size),height:Re(e.size),width:Re(e.size)},u.value,e.style],role:d?"button":void 0,"aria-hidden":!d,tabindex:d?e.disabled?-1:0:void 0},{default:()=>[c]})}),{}}});function dc(e,t){const n=_e(),i=Me(!1);if(im){const a=new IntersectionObserver(r=>{i.value=!!r.find(s=>s.isIntersecting)},t);dn(()=>{a.disconnect()}),Te(n,(r,s)=>{s&&(a.unobserve(s),i.value=!1),r&&a.observe(r)},{flush:"post"})}return{intersectionRef:n,isIntersecting:i}}const EL=Y({bgColor:String,color:String,indeterminate:[Boolean,String],modelValue:{type:[Number,String],default:0},rotate:{type:[Number,String],default:0},width:{type:[Number,String],default:4},...Ie(),...$i(),...Je({tag:"div"}),...dt()},"VProgressCircular"),Ys=de()({name:"VProgressCircular",props:EL(),setup(e,t){let{slots:n}=t;const i=20,a=2*Math.PI*i,r=_e(),{themeClasses:s}=pt(e),{sizeClasses:o,sizeStyles:l}=Qs(e),{textColorClasses:u,textColorStyles:c}=bn(se(e,"color")),{textColorClasses:d,textColorStyles:f}=bn(se(e,"bgColor")),{intersectionRef:h,isIntersecting:g}=dc(),{resizeRef:p,contentRect:m}=Ii(),v=A(()=>Math.max(0,Math.min(100,parseFloat(e.modelValue)))),_=A(()=>Number(e.width)),M=A(()=>l.value?Number(e.size):m.value?m.value.width:Math.max(_.value,32)),x=A(()=>i/(1-_.value/M.value)*2),C=A(()=>_.value/M.value*x.value),T=A(()=>Re((100-v.value)/100*a));return Bt(()=>{h.value=r.value,p.value=r.value}),pe(()=>y(e.tag,{ref:r,class:["v-progress-circular",{"v-progress-circular--indeterminate":!!e.indeterminate,"v-progress-circular--visible":g.value,"v-progress-circular--disable-shrink":e.indeterminate==="disable-shrink"},s.value,o.value,u.value,e.class],style:[l.value,c.value,e.style],role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.indeterminate?void 0:v.value},{default:()=>[y("svg",{style:{transform:`rotate(calc(-90deg + ${Number(e.rotate)}deg))`},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${x.value} ${x.value}`},[y("circle",{class:["v-progress-circular__underlay",d.value],style:f.value,fill:"transparent",cx:"50%",cy:"50%",r:i,"stroke-width":C.value,"stroke-dasharray":a,"stroke-dashoffset":0},null),y("circle",{class:"v-progress-circular__overlay",fill:"transparent",cx:"50%",cy:"50%",r:i,"stroke-width":C.value,"stroke-dasharray":a,"stroke-dashoffset":T.value},null)]),n.default&&y("div",{class:"v-progress-circular__content"},[n.default({value:v.value})])]})),{}}}),Cp={center:"center",top:"bottom",bottom:"top",left:"right",right:"left"},ba=Y({location:String},"location");function ts(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2?arguments[2]:void 0;const{isRtl:i}=rn();return{locationStyles:A(()=>{if(!e.location)return{};const{side:r,align:s}=Hf(e.location.split(" ").length>1?e.location:`${e.location} center`,i.value);function o(u){return n?n(u):0}const l={};return r!=="center"&&(t?l[Cp[r]]=`calc(100% - ${o(r)}px)`:l[r]=0),s!=="center"?t?l[Cp[s]]=`calc(100% - ${o(s)}px)`:l[s]=0:(r==="center"?l.top=l.left="50%":l[{top:"left",bottom:"left",left:"top",right:"top"}[r]]="50%",l.transform={top:"translateX(-50%)",bottom:"translateX(-50%)",left:"translateY(-50%)",right:"translateY(-50%)",center:"translate(-50%, -50%)"}[r]),l})}}const wL=Y({absolute:Boolean,active:{type:Boolean,default:!0},bgColor:String,bgOpacity:[Number,String],bufferValue:{type:[Number,String],default:0},bufferColor:String,bufferOpacity:[Number,String],clickable:Boolean,color:String,height:{type:[Number,String],default:4},indeterminate:Boolean,max:{type:[Number,String],default:100},modelValue:{type:[Number,String],default:0},opacity:[Number,String],reverse:Boolean,stream:Boolean,striped:Boolean,roundedBar:Boolean,...Ie(),...ba({location:"top"}),...Vt(),...Je(),...dt()},"VProgressLinear"),fc=de()({name:"VProgressLinear",props:wL(),emits:{"update:modelValue":e=>!0},setup(e,t){var E;let{slots:n}=t;const i=He(e,"modelValue"),{isRtl:a,rtlClasses:r}=rn(),{themeClasses:s}=pt(e),{locationStyles:o}=ts(e),{textColorClasses:l,textColorStyles:u}=bn(e,"color"),{backgroundColorClasses:c,backgroundColorStyles:d}=wt(A(()=>e.bgColor||e.color)),{backgroundColorClasses:f,backgroundColorStyles:h}=wt(A(()=>e.bufferColor||e.bgColor||e.color)),{backgroundColorClasses:g,backgroundColorStyles:p}=wt(e,"color"),{roundedClasses:m}=Gt(e),{intersectionRef:v,isIntersecting:_}=dc(),M=A(()=>parseFloat(e.max)),x=A(()=>parseFloat(e.height)),C=A(()=>qt(parseFloat(e.bufferValue)/M.value*100,0,100)),T=A(()=>qt(parseFloat(i.value)/M.value*100,0,100)),P=A(()=>a.value!==e.reverse),w=A(()=>e.indeterminate?"fade-transition":"slide-x-transition"),b=mt&&((E=window.matchMedia)==null?void 0:E.call(window,"(forced-colors: active)").matches);function S(R){if(!v.value)return;const{left:L,right:O,width:G}=v.value.getBoundingClientRect(),U=P.value?G-R.clientX+(O-G):R.clientX-L;i.value=Math.round(U/G*M.value)}return pe(()=>y(e.tag,{ref:v,class:["v-progress-linear",{"v-progress-linear--absolute":e.absolute,"v-progress-linear--active":e.active&&_.value,"v-progress-linear--reverse":P.value,"v-progress-linear--rounded":e.rounded,"v-progress-linear--rounded-bar":e.roundedBar,"v-progress-linear--striped":e.striped},m.value,s.value,r.value,e.class],style:[{bottom:e.location==="bottom"?0:void 0,top:e.location==="top"?0:void 0,height:e.active?Re(x.value):0,"--v-progress-linear-height":Re(x.value),...e.absolute?o.value:{}},e.style],role:"progressbar","aria-hidden":e.active?"false":"true","aria-valuemin":"0","aria-valuemax":e.max,"aria-valuenow":e.indeterminate?void 0:Math.min(parseFloat(i.value),M.value),onClick:e.clickable&&S},{default:()=>[e.stream&&y("div",{key:"stream",class:["v-progress-linear__stream",l.value],style:{...u.value,[P.value?"left":"right"]:Re(-x.value),borderTop:`${Re(x.value/2)} dotted`,opacity:parseFloat(e.bufferOpacity),top:`calc(50% - ${Re(x.value/4)})`,width:Re(100-C.value,"%"),"--v-progress-linear-stream-to":Re(x.value*(P.value?1:-1))}},null),y("div",{class:["v-progress-linear__background",b?void 0:c.value],style:[d.value,{opacity:parseFloat(e.bgOpacity),width:e.stream?0:void 0}]},null),y("div",{class:["v-progress-linear__buffer",b?void 0:f.value],style:[h.value,{opacity:parseFloat(e.bufferOpacity),width:Re(C.value,"%")}]},null),y(da,{name:w.value},{default:()=>[e.indeterminate?y("div",{class:"v-progress-linear__indeterminate"},[["long","short"].map(R=>y("div",{key:R,class:["v-progress-linear__indeterminate",R,b?void 0:g.value],style:p.value},null))]):y("div",{class:["v-progress-linear__determinate",b?void 0:g.value],style:[p.value,{width:Re(T.value,"%")}]},null)]}),n.default&&y("div",{class:"v-progress-linear__content"},[n.default({value:T.value,buffer:C.value})])]})),{}}}),hc=Y({loading:[Boolean,String]},"loader");function cl(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Gi();return{loaderClasses:A(()=>({[`${t}--loading`]:e.loading}))}}function dl(e,t){var i;let{slots:n}=t;return y("div",{class:`${e.name}__loader`},[((i=n.default)==null?void 0:i.call(n,{color:e.color,isActive:e.active}))||y(fc,{absolute:e.absolute,active:e.active,color:e.color,height:"2",indeterminate:!0},null)])}const TL=["static","relative","fixed","absolute","sticky"],eo=Y({position:{type:String,validator:e=>TL.includes(e)}},"position");function to(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Gi();return{positionClasses:A(()=>e.position?`${t}--${e.position}`:void 0)}}function CL(){const e=Ht("useRoute");return A(()=>{var t;return(t=e==null?void 0:e.proxy)==null?void 0:t.$route})}function jb(){var e,t;return(t=(e=Ht("useRouter"))==null?void 0:e.proxy)==null?void 0:t.$router}function fl(e,t){var d,f;const n=_M("RouterLink"),i=A(()=>!!(e.href||e.to)),a=A(()=>(i==null?void 0:i.value)||Qg(t,"click")||Qg(e,"click"));if(typeof n=="string"||!("useLink"in n)){const h=se(e,"href");return{isLink:i,isClickable:a,href:h,linkProps:_n({href:h})}}const r=A(()=>({...e,to:se(()=>e.to||"")})),s=n.useLink(r.value),o=A(()=>e.to?s:void 0),l=CL(),u=A(()=>{var h,g,p;return o.value?e.exact?l.value?((p=o.value.isExactActive)==null?void 0:p.value)&&Rn(o.value.route.value.query,l.value.query):((g=o.value.isExactActive)==null?void 0:g.value)??!1:((h=o.value.isActive)==null?void 0:h.value)??!1:!1}),c=A(()=>{var h;return e.to?(h=o.value)==null?void 0:h.route.value.href:e.href});return{isLink:i,isClickable:a,isActive:u,route:(d=o.value)==null?void 0:d.route,navigate:(f=o.value)==null?void 0:f.navigate,href:c,linkProps:_n({href:c,"aria-current":A(()=>u.value?"page":void 0)})}}const hl=Y({href:String,replace:Boolean,to:[String,Object],exact:Boolean},"router");let Id=!1;function AL(e,t){let n=!1,i,a;mt&&(e!=null&&e.beforeEach)&&(ft(()=>{window.addEventListener("popstate",r),i=e.beforeEach((s,o,l)=>{Id?n?t(l):l():setTimeout(()=>n?t(l):l()),Id=!0}),a=e==null?void 0:e.afterEach(()=>{Id=!1})}),Sn(()=>{window.removeEventListener("popstate",r),i==null||i(),a==null||a()}));function r(s){var o;(o=s.state)!=null&&o.replaced||(n=!0,setTimeout(()=>n=!1))}}function PL(e,t){Te(()=>{var n;return(n=e.isActive)==null?void 0:n.value},n=>{e.isLink.value&&n&&t&&ft(()=>{t(!0)})},{immediate:!0})}const Qf=Symbol("rippleStop"),RL=80;function Ap(e,t){e.style.transform=t,e.style.webkitTransform=t}function eh(e){return e.constructor.name==="TouchEvent"}function Kb(e){return e.constructor.name==="KeyboardEvent"}const IL=function(e,t){var d;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=0,a=0;if(!Kb(e)){const f=t.getBoundingClientRect(),h=eh(e)?e.touches[e.touches.length-1]:e;i=h.clientX-f.left,a=h.clientY-f.top}let r=0,s=.3;(d=t._ripple)!=null&&d.circle?(s=.15,r=t.clientWidth/2,r=n.center?r:r+Math.sqrt((i-r)**2+(a-r)**2)/4):r=Math.sqrt(t.clientWidth**2+t.clientHeight**2)/2;const o=`${(t.clientWidth-r*2)/2}px`,l=`${(t.clientHeight-r*2)/2}px`,u=n.center?o:`${i-r}px`,c=n.center?l:`${a-r}px`;return{radius:r,scale:s,x:u,y:c,centerX:o,centerY:l}},Bu={show(e,t){var h;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!((h=t==null?void 0:t._ripple)!=null&&h.enabled))return;const i=document.createElement("span"),a=document.createElement("span");i.appendChild(a),i.className="v-ripple__container",n.class&&(i.className+=` ${n.class}`);const{radius:r,scale:s,x:o,y:l,centerX:u,centerY:c}=IL(e,t,n),d=`${r*2}px`;a.className="v-ripple__animation",a.style.width=d,a.style.height=d,t.appendChild(i);const f=window.getComputedStyle(t);f&&f.position==="static"&&(t.style.position="relative",t.dataset.previousPosition="static"),a.classList.add("v-ripple__animation--enter"),a.classList.add("v-ripple__animation--visible"),Ap(a,`translate(${o}, ${l}) scale3d(${s},${s},${s})`),a.dataset.activated=String(performance.now()),requestAnimationFrame(()=>{requestAnimationFrame(()=>{a.classList.remove("v-ripple__animation--enter"),a.classList.add("v-ripple__animation--in"),Ap(a,`translate(${u}, ${c}) scale3d(1,1,1)`)})})},hide(e){var r;if(!((r=e==null?void 0:e._ripple)!=null&&r.enabled))return;const t=e.getElementsByClassName("v-ripple__animation");if(t.length===0)return;const n=t[t.length-1];if(n.dataset.isHiding)return;n.dataset.isHiding="true";const i=performance.now()-Number(n.dataset.activated),a=Math.max(250-i,0);setTimeout(()=>{n.classList.remove("v-ripple__animation--in"),n.classList.add("v-ripple__animation--out"),setTimeout(()=>{var o;e.getElementsByClassName("v-ripple__animation").length===1&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),((o=n.parentNode)==null?void 0:o.parentNode)===e&&e.removeChild(n.parentNode)},300)},a)}};function Zb(e){return typeof e>"u"||!!e}function Ho(e){const t={},n=e.currentTarget;if(!(!(n!=null&&n._ripple)||n._ripple.touched||e[Qf])){if(e[Qf]=!0,eh(e))n._ripple.touched=!0,n._ripple.isTouch=!0;else if(n._ripple.isTouch)return;if(t.center=n._ripple.centered||Kb(e),n._ripple.class&&(t.class=n._ripple.class),eh(e)){if(n._ripple.showTimerCommit)return;n._ripple.showTimerCommit=()=>{Bu.show(e,n,t)},n._ripple.showTimer=window.setTimeout(()=>{var i;(i=n==null?void 0:n._ripple)!=null&&i.showTimerCommit&&(n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null)},RL)}else Bu.show(e,n,t)}}function Pp(e){e[Qf]=!0}function Jn(e){const t=e.currentTarget;if(t!=null&&t._ripple){if(window.clearTimeout(t._ripple.showTimer),e.type==="touchend"&&t._ripple.showTimerCommit){t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null,t._ripple.showTimer=window.setTimeout(()=>{Jn(e)});return}window.setTimeout(()=>{t._ripple&&(t._ripple.touched=!1)}),Bu.hide(t)}}function Jb(e){const t=e.currentTarget;t!=null&&t._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}let Go=!1;function Qb(e){!Go&&(e.keyCode===qg.enter||e.keyCode===qg.space)&&(Go=!0,Ho(e))}function e0(e){Go=!1,Jn(e)}function t0(e){Go&&(Go=!1,Jn(e))}function n0(e,t,n){const{value:i,modifiers:a}=t,r=Zb(i);if(r||Bu.hide(e),e._ripple=e._ripple??{},e._ripple.enabled=r,e._ripple.centered=a.center,e._ripple.circle=a.circle,nc(i)&&i.class&&(e._ripple.class=i.class),r&&!n){if(a.stop){e.addEventListener("touchstart",Pp,{passive:!0}),e.addEventListener("mousedown",Pp);return}e.addEventListener("touchstart",Ho,{passive:!0}),e.addEventListener("touchend",Jn,{passive:!0}),e.addEventListener("touchmove",Jb,{passive:!0}),e.addEventListener("touchcancel",Jn),e.addEventListener("mousedown",Ho),e.addEventListener("mouseup",Jn),e.addEventListener("mouseleave",Jn),e.addEventListener("keydown",Qb),e.addEventListener("keyup",e0),e.addEventListener("blur",t0),e.addEventListener("dragstart",Jn,{passive:!0})}else!r&&n&&i0(e)}function i0(e){e.removeEventListener("mousedown",Ho),e.removeEventListener("touchstart",Ho),e.removeEventListener("touchend",Jn),e.removeEventListener("touchmove",Jb),e.removeEventListener("touchcancel",Jn),e.removeEventListener("mouseup",Jn),e.removeEventListener("mouseleave",Jn),e.removeEventListener("keydown",Qb),e.removeEventListener("keyup",e0),e.removeEventListener("dragstart",Jn),e.removeEventListener("blur",t0)}function DL(e,t){n0(e,t,!1)}function LL(e){delete e._ripple,i0(e)}function kL(e,t){if(t.value===t.oldValue)return;const n=Zb(t.oldValue);n0(e,t,n)}const xa={mounted:DL,unmounted:LL,updated:kL},mc=Y({active:{type:Boolean,default:void 0},activeColor:String,baseColor:String,symbol:{type:null,default:xm},flat:Boolean,icon:[Boolean,String,Function,Object],prependIcon:We,appendIcon:We,block:Boolean,readonly:Boolean,slim:Boolean,stacked:Boolean,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},...Yn(),...Ie(),...fn(),...Qt(),...sn(),...Qr(),...hc(),...ba(),...eo(),...Vt(),...hl(),...$i(),...Je({tag:"button"}),...dt(),...pi({variant:"elevated"})},"VBtn"),vt=de()({name:"VBtn",props:mc(),emits:{"group:selected":e=>!0},setup(e,t){let{attrs:n,slots:i}=t;const{themeClasses:a}=pt(e),{borderClasses:r}=ri(e),{densityClasses:s}=In(e),{dimensionStyles:o}=en(e),{elevationClasses:l}=pn(e),{loaderClasses:u}=cl(e),{locationStyles:c}=ts(e),{positionClasses:d}=to(e),{roundedClasses:f}=Gt(e),{sizeClasses:h,sizeStyles:g}=Qs(e),p=es(e,e.symbol,!1),m=fl(e,n),v=A(()=>{var E;return e.active!==void 0?e.active:m.isLink.value?(E=m.isActive)==null?void 0:E.value:p==null?void 0:p.isSelected.value}),_=A(()=>v.value?e.activeColor??e.color:e.color),M=A(()=>{var R,L;return{color:(p==null?void 0:p.isSelected.value)&&(!m.isLink.value||((R=m.isActive)==null?void 0:R.value))||!p||((L=m.isActive)==null?void 0:L.value)?_.value??e.baseColor:e.baseColor,variant:e.variant}}),{colorClasses:x,colorStyles:C,variantClasses:T}=Zr(M),P=A(()=>(p==null?void 0:p.disabled.value)||e.disabled),w=A(()=>e.variant==="elevated"&&!(e.disabled||e.flat||e.border)),b=A(()=>{if(!(e.value===void 0||typeof e.value=="symbol"))return Object(e.value)===e.value?JSON.stringify(e.value,null,0):e.value});function S(E){var R;P.value||m.isLink.value&&(E.metaKey||E.ctrlKey||E.shiftKey||E.button!==0||n.target==="_blank")||((R=m.navigate)==null||R.call(m,E),p==null||p.toggle())}return PL(m,p==null?void 0:p.select),pe(()=>{const E=m.isLink.value?"a":e.tag,R=!!(e.prependIcon||i.prepend),L=!!(e.appendIcon||i.append),O=!!(e.icon&&e.icon!==!0);return kt(y(E,ge({type:E==="a"?void 0:"button",class:["v-btn",p==null?void 0:p.selectedClass.value,{"v-btn--active":v.value,"v-btn--block":e.block,"v-btn--disabled":P.value,"v-btn--elevated":w.value,"v-btn--flat":e.flat,"v-btn--icon":!!e.icon,"v-btn--loading":e.loading,"v-btn--readonly":e.readonly,"v-btn--slim":e.slim,"v-btn--stacked":e.stacked},a.value,r.value,x.value,s.value,l.value,u.value,d.value,f.value,h.value,T.value,e.class],style:[C.value,o.value,c.value,g.value,e.style],"aria-busy":e.loading?!0:void 0,disabled:P.value||void 0,tabindex:e.loading||e.readonly?-1:void 0,onClick:S,value:b.value},m.linkProps),{default:()=>{var G;return[Ja(!0,"v-btn"),!e.icon&&R&&y("span",{key:"prepend",class:"v-btn__prepend"},[i.prepend?y(rt,{key:"prepend-defaults",disabled:!e.prependIcon,defaults:{VIcon:{icon:e.prependIcon}}},i.prepend):y(gt,{key:"prepend-icon",icon:e.prependIcon},null)]),y("span",{class:"v-btn__content","data-no-activator":""},[!i.default&&O?y(gt,{key:"content-icon",icon:e.icon},null):y(rt,{key:"content-defaults",disabled:!O,defaults:{VIcon:{icon:e.icon}}},{default:()=>{var U;return[((U=i.default)==null?void 0:U.call(i))??hi(e.text)]}})]),!e.icon&&L&&y("span",{key:"append",class:"v-btn__append"},[i.append?y(rt,{key:"append-defaults",disabled:!e.appendIcon,defaults:{VIcon:{icon:e.appendIcon}}},i.append):y(gt,{key:"append-icon",icon:e.appendIcon},null)]),!!e.loading&&y("span",{key:"loader",class:"v-btn__loader"},[((G=i.loader)==null?void 0:G.call(i))??y(Ys,{color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0,width:"2"},null)])]}}),[[xa,!P.value&&e.ripple,"",{center:!!e.icon}]])}),{group:p}}}),VL=Y({...mc({icon:"$menu",variant:"text"})},"VAppBarNavIcon"),FL=de()({name:"VAppBarNavIcon",props:VL(),setup(e,t){let{slots:n}=t;return pe(()=>y(vt,ge(e,{class:["v-app-bar-nav-icon"]}),n)),{}}}),NL=de()({name:"VAppBarTitle",props:Bb(),setup(e,t){let{slots:n}=t;return pe(()=>y(gm,ge(e,{class:"v-app-bar-title"}),n)),{}}}),a0=Wi("v-alert-title"),OL=["success","info","warning","error"],UL=Y({border:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["top","end","bottom","start"].includes(e)},borderColor:String,closable:Boolean,closeIcon:{type:We,default:"$close"},closeLabel:{type:String,default:"$vuetify.close"},icon:{type:[Boolean,String,Function,Object],default:null},modelValue:{type:Boolean,default:!0},prominent:Boolean,title:String,text:String,type:{type:String,validator:e=>OL.includes(e)},...Ie(),...fn(),...Qt(),...sn(),...ba(),...eo(),...Vt(),...Je(),...dt(),...pi({variant:"flat"})},"VAlert"),BL=de()({name:"VAlert",props:UL(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{emit:n,slots:i}=t;const a=He(e,"modelValue"),r=A(()=>{if(e.icon!==!1)return e.type?e.icon??`$${e.type}`:e.icon}),s=A(()=>({color:e.color??e.type,variant:e.variant})),{themeClasses:o}=pt(e),{colorClasses:l,colorStyles:u,variantClasses:c}=Zr(s),{densityClasses:d}=In(e),{dimensionStyles:f}=en(e),{elevationClasses:h}=pn(e),{locationStyles:g}=ts(e),{positionClasses:p}=to(e),{roundedClasses:m}=Gt(e),{textColorClasses:v,textColorStyles:_}=bn(se(e,"borderColor")),{t:M}=$t(),x=A(()=>({"aria-label":M(e.closeLabel),onClick(C){a.value=!1,n("click:close",C)}}));return()=>{const C=!!(i.prepend||r.value),T=!!(i.title||e.title),P=!!(i.close||e.closable);return a.value&&y(e.tag,{class:["v-alert",e.border&&{"v-alert--border":!!e.border,[`v-alert--border-${e.border===!0?"start":e.border}`]:!0},{"v-alert--prominent":e.prominent},o.value,l.value,d.value,h.value,p.value,m.value,c.value,e.class],style:[u.value,f.value,g.value,e.style],role:"alert"},{default:()=>{var w,b;return[Ja(!1,"v-alert"),e.border&&y("div",{key:"border",class:["v-alert__border",v.value],style:_.value},null),C&&y("div",{key:"prepend",class:"v-alert__prepend"},[i.prepend?y(rt,{key:"prepend-defaults",disabled:!r.value,defaults:{VIcon:{density:e.density,icon:r.value,size:e.prominent?44:28}}},i.prepend):y(gt,{key:"prepend-icon",density:e.density,icon:r.value,size:e.prominent?44:28},null)]),y("div",{class:"v-alert__content"},[T&&y(a0,{key:"title"},{default:()=>{var S;return[((S=i.title)==null?void 0:S.call(i))??e.title]}}),((w=i.text)==null?void 0:w.call(i))??e.text,(b=i.default)==null?void 0:b.call(i)]),i.append&&y("div",{key:"append",class:"v-alert__append"},[i.append()]),P&&y("div",{key:"close",class:"v-alert__close"},[i.close?y(rt,{key:"close-defaults",defaults:{VBtn:{icon:e.closeIcon,size:"x-small",variant:"text"}}},{default:()=>{var S;return[(S=i.close)==null?void 0:S.call(i,{props:x.value})]}}):y(vt,ge({key:"close-btn",icon:e.closeIcon,size:"x-small",variant:"text"},x.value),null)])]}})}}}),zL=Y({start:Boolean,end:Boolean,icon:We,image:String,text:String,...Yn(),...Ie(),...fn(),...Vt(),...$i(),...Je(),...dt(),...pi({variant:"flat"})},"VAvatar"),mi=de()({name:"VAvatar",props:zL(),setup(e,t){let{slots:n}=t;const{themeClasses:i}=pt(e),{borderClasses:a}=ri(e),{colorClasses:r,colorStyles:s,variantClasses:o}=Zr(e),{densityClasses:l}=In(e),{roundedClasses:u}=Gt(e),{sizeClasses:c,sizeStyles:d}=Qs(e);return pe(()=>y(e.tag,{class:["v-avatar",{"v-avatar--start":e.start,"v-avatar--end":e.end},i.value,a.value,r.value,l.value,u.value,c.value,o.value,e.class],style:[s.value,d.value,e.style]},{default:()=>[n.default?y(rt,{key:"content-defaults",defaults:{VImg:{cover:!0,src:e.image},VIcon:{icon:e.icon}}},{default:()=>[n.default()]}):e.image?y(va,{key:"image",src:e.image,alt:"",cover:!0},null):e.icon?y(gt,{key:"icon",icon:e.icon},null):e.text,Ja(!1,"v-avatar")]})),{}}}),HL=Y({text:String,onClick:vn(),...Ie(),...dt()},"VLabel"),no=de()({name:"VLabel",props:HL(),setup(e,t){let{slots:n}=t;return pe(()=>{var i;return y("label",{class:["v-label",{"v-label--clickable":!!e.onClick},e.class],style:e.style,onClick:e.onClick},[e.text,(i=n.default)==null?void 0:i.call(n)])}),{}}}),r0=Symbol.for("vuetify:selection-control-group"),Sm=Y({color:String,disabled:{type:Boolean,default:null},defaultsTarget:String,error:Boolean,id:String,inline:Boolean,falseIcon:We,trueIcon:We,ripple:{type:[Boolean,Object],default:!0},multiple:{type:Boolean,default:null},name:String,readonly:{type:Boolean,default:null},modelValue:null,type:String,valueComparator:{type:Function,default:Rn},...Ie(),...fn(),...dt()},"SelectionControlGroup"),GL=Y({...Sm({defaultsTarget:"VSelectionControl"})},"VSelectionControlGroup"),s0=de()({name:"VSelectionControlGroup",props:GL(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const i=He(e,"modelValue"),a=gn(),r=A(()=>e.id||`v-selection-control-group-${a}`),s=A(()=>e.name||r.value),o=new Set;return Rt(r0,{modelValue:i,forceUpdate:()=>{o.forEach(l=>l())},onForceUpdate:l=>{o.add(l),Sn(()=>{o.delete(l)})}}),zt({[e.defaultsTarget]:{color:se(e,"color"),disabled:se(e,"disabled"),density:se(e,"density"),error:se(e,"error"),inline:se(e,"inline"),modelValue:i,multiple:A(()=>!!e.multiple||e.multiple==null&&Array.isArray(i.value)),name:s,falseIcon:se(e,"falseIcon"),trueIcon:se(e,"trueIcon"),readonly:se(e,"readonly"),ripple:se(e,"ripple"),type:se(e,"type"),valueComparator:se(e,"valueComparator")}}),pe(()=>{var l;return y("div",{class:["v-selection-control-group",{"v-selection-control-group--inline":e.inline},e.class],style:e.style,role:e.type==="radio"?"radiogroup":void 0},[(l=n.default)==null?void 0:l.call(n)])}),{}}}),vc=Y({label:String,baseColor:String,trueValue:null,falseValue:null,value:null,...Ie(),...Sm()},"VSelectionControl");function WL(e){const t=ot(r0,void 0),{densityClasses:n}=In(e),i=He(e,"modelValue"),a=A(()=>e.trueValue!==void 0?e.trueValue:e.value!==void 0?e.value:!0),r=A(()=>e.falseValue!==void 0?e.falseValue:!1),s=A(()=>!!e.multiple||e.multiple==null&&Array.isArray(i.value)),o=A({get(){const h=t?t.modelValue.value:i.value;return s.value?Nt(h).some(g=>e.valueComparator(g,a.value)):e.valueComparator(h,a.value)},set(h){if(e.readonly)return;const g=h?a.value:r.value;let p=g;s.value&&(p=h?[...Nt(i.value),g]:Nt(i.value).filter(m=>!e.valueComparator(m,a.value))),t?t.modelValue.value=p:i.value=p}}),{textColorClasses:l,textColorStyles:u}=bn(A(()=>{if(!(e.error||e.disabled))return o.value?e.color:e.baseColor})),{backgroundColorClasses:c,backgroundColorStyles:d}=wt(A(()=>o.value&&!e.error&&!e.disabled?e.color:e.baseColor)),f=A(()=>o.value?e.trueIcon:e.falseIcon);return{group:t,densityClasses:n,trueValue:a,falseValue:r,model:o,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,icon:f}}const Wa=de()({name:"VSelectionControl",directives:{Ripple:xa},inheritAttrs:!1,props:vc(),emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:i}=t;const{group:a,densityClasses:r,icon:s,model:o,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,trueValue:f}=WL(e),h=gn(),g=Me(!1),p=Me(!1),m=_e(),v=A(()=>e.id||`input-${h}`),_=A(()=>!e.disabled&&!e.readonly);a==null||a.onForceUpdate(()=>{m.value&&(m.value.checked=o.value)});function M(P){_.value&&(g.value=!0,Gs(P.target,":focus-visible")!==!1&&(p.value=!0))}function x(){g.value=!1,p.value=!1}function C(P){P.stopPropagation()}function T(P){if(!_.value){m.value&&(m.value.checked=o.value);return}e.readonly&&a&&ft(()=>a.forceUpdate()),o.value=P.target.checked}return pe(()=>{var E,R;const P=i.label?i.label({label:e.label,props:{for:v.value}}):e.label,[w,b]=Za(n),S=y("input",ge({ref:m,checked:o.value,disabled:!!e.disabled,id:v.value,onBlur:x,onFocus:M,onInput:T,"aria-disabled":!!e.disabled,"aria-label":e.label,type:e.type,value:f.value,name:e.name,"aria-checked":e.type==="checkbox"?o.value:void 0},b),null);return y("div",ge({class:["v-selection-control",{"v-selection-control--dirty":o.value,"v-selection-control--disabled":e.disabled,"v-selection-control--error":e.error,"v-selection-control--focused":g.value,"v-selection-control--focus-visible":p.value,"v-selection-control--inline":e.inline},r.value,e.class]},w,{style:e.style}),[y("div",{class:["v-selection-control__wrapper",l.value],style:u.value},[(E=i.default)==null?void 0:E.call(i,{backgroundColorClasses:c,backgroundColorStyles:d}),kt(y("div",{class:["v-selection-control__input"]},[((R=i.input)==null?void 0:R.call(i,{model:o,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,inputNode:S,icon:s.value,props:{onFocus:M,onBlur:x,id:v.value}}))??y(Ne,null,[s.value&&y(gt,{key:"icon",icon:s.value},null),S])]),[[ni("ripple"),e.ripple&&[!e.disabled&&!e.readonly,null,["center","circle"]]]])]),P&&y(no,{for:v.value,onClick:C},{default:()=>[P]})])}),{isFocused:g,input:m}}}),o0=Y({indeterminate:Boolean,indeterminateIcon:{type:We,default:"$checkboxIndeterminate"},...vc({falseIcon:"$checkboxOff",trueIcon:"$checkboxOn"})},"VCheckboxBtn"),ga=de()({name:"VCheckboxBtn",props:o0(),emits:{"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,t){let{slots:n}=t;const i=He(e,"indeterminate"),a=He(e,"modelValue");function r(l){i.value&&(i.value=!1)}const s=A(()=>i.value?e.indeterminateIcon:e.falseIcon),o=A(()=>i.value?e.indeterminateIcon:e.trueIcon);return pe(()=>{const l=Kt(Wa.filterProps(e),["modelValue"]);return y(Wa,ge(l,{modelValue:a.value,"onUpdate:modelValue":[u=>a.value=u,r],class:["v-checkbox-btn",e.class],style:e.style,type:"checkbox",falseIcon:s.value,trueIcon:o.value,"aria-checked":i.value?"mixed":void 0}),n)}),{}}});function l0(e){const{t}=$t();function n(i){let{name:a}=i;const r={prepend:"prependAction",prependInner:"prependAction",append:"appendAction",appendInner:"appendAction",clear:"clear"}[a],s=e[`onClick:${a}`];function o(u){u.key!=="Enter"&&u.key!==" "||(u.preventDefault(),u.stopPropagation(),ic(s,new PointerEvent("click",u)))}const l=s&&r?t(`$vuetify.input.${r}`,e.label??""):void 0;return y(gt,{icon:e[`${a}Icon`],"aria-label":l,onClick:s,onKeydown:o},null)}return{InputIcon:n}}const $L=Y({active:Boolean,color:String,messages:{type:[Array,String],default:()=>[]},...Ie(),...Di({transition:{component:ym,leaveAbsolute:!0,group:!0}})},"VMessages"),u0=de()({name:"VMessages",props:$L(),setup(e,t){let{slots:n}=t;const i=A(()=>Nt(e.messages)),{textColorClasses:a,textColorStyles:r}=bn(A(()=>e.color));return pe(()=>y(Pn,{transition:e.transition,tag:"div",class:["v-messages",a.value,e.class],style:[r.value,e.style]},{default:()=>[e.active&&i.value.map((s,o)=>y("div",{class:"v-messages__message",key:`${o}-${i.value}`},[n.message?n.message({message:s}):s]))]})),{}}}),ml=Y({focused:Boolean,"onUpdate:focused":vn()},"focus");function Sa(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Gi();const n=He(e,"focused"),i=A(()=>({[`${t}--focused`]:n.value}));function a(){n.value=!0}function r(){n.value=!1}return{focusClasses:i,isFocused:n,focus:a,blur:r}}const c0=Symbol.for("vuetify:form"),XL=Y({disabled:Boolean,fastFail:Boolean,readonly:Boolean,modelValue:{type:Boolean,default:null},validateOn:{type:String,default:"input"}},"form");function YL(e){const t=He(e,"modelValue"),n=A(()=>e.disabled),i=A(()=>e.readonly),a=Me(!1),r=_e([]),s=_e([]);async function o(){const c=[];let d=!0;s.value=[],a.value=!0;for(const f of r.value){const h=await f.validate();if(h.length>0&&(d=!1,c.push({id:f.id,errorMessages:h})),!d&&e.fastFail)break}return s.value=c,a.value=!1,{valid:d,errors:s.value}}function l(){r.value.forEach(c=>c.reset())}function u(){r.value.forEach(c=>c.resetValidation())}return Te(r,()=>{let c=0,d=0;const f=[];for(const h of r.value)h.isValid===!1?(d++,f.push({id:h.id,errorMessages:h.errorMessages})):h.isValid===!0&&c++;s.value=f,t.value=d>0?!1:c===r.value.length?!0:null},{deep:!0,flush:"post"}),Rt(c0,{register:c=>{let{id:d,vm:f,validate:h,reset:g,resetValidation:p}=c;r.value.some(m=>m.id===d),r.value.push({id:d,validate:h,reset:g,resetValidation:p,vm:_y(f),isValid:null,errorMessages:[]})},unregister:c=>{r.value=r.value.filter(d=>d.id!==c)},update:(c,d,f)=>{const h=r.value.find(g=>g.id===c);h&&(h.isValid=d,h.errorMessages=f)},isDisabled:n,isReadonly:i,isValidating:a,isValid:t,items:r,validateOn:se(e,"validateOn")}),{errors:s,isDisabled:n,isReadonly:i,isValidating:a,isValid:t,items:r,validate:o,reset:l,resetValidation:u}}function gc(e){const t=ot(c0,null);return{...t,isReadonly:A(()=>!!((e==null?void 0:e.readonly)??(t==null?void 0:t.isReadonly.value))),isDisabled:A(()=>!!((e==null?void 0:e.disabled)??(t==null?void 0:t.isDisabled.value)))}}const d0=Y({disabled:{type:Boolean,default:null},error:Boolean,errorMessages:{type:[Array,String],default:()=>[]},maxErrors:{type:[Number,String],default:1},name:String,label:String,readonly:{type:Boolean,default:null},rules:{type:Array,default:()=>[]},modelValue:null,validateOn:String,validationValue:null,...ml()},"validation");function f0(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Gi(),n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:gn();const i=He(e,"modelValue"),a=A(()=>e.validationValue===void 0?i.value:e.validationValue),r=gc(e),s=_e([]),o=Me(!0),l=A(()=>!!(Nt(i.value===""?null:i.value).length||Nt(a.value===""?null:a.value).length)),u=A(()=>{var M;return(M=e.errorMessages)!=null&&M.length?Nt(e.errorMessages).concat(s.value).slice(0,Math.max(0,Number(e.maxErrors))):s.value}),c=A(()=>{var C;let M=(e.validateOn??((C=r.validateOn)==null?void 0:C.value))||"input";M==="lazy"&&(M="input lazy"),M==="eager"&&(M="input eager");const x=new Set((M==null?void 0:M.split(" "))??[]);return{input:x.has("input"),blur:x.has("blur")||x.has("input")||x.has("invalid-input"),invalidInput:x.has("invalid-input"),lazy:x.has("lazy"),eager:x.has("eager")}}),d=A(()=>{var M;return e.error||(M=e.errorMessages)!=null&&M.length?!1:e.rules.length?o.value?s.value.length||c.value.lazy?null:!0:!s.value.length:!0}),f=Me(!1),h=A(()=>({[`${t}--error`]:d.value===!1,[`${t}--dirty`]:l.value,[`${t}--disabled`]:r.isDisabled.value,[`${t}--readonly`]:r.isReadonly.value})),g=Ht("validation"),p=A(()=>e.name??on(n));js(()=>{var M;(M=r.register)==null||M.call(r,{id:p.value,vm:g,validate:_,reset:m,resetValidation:v})}),dn(()=>{var M;(M=r.unregister)==null||M.call(r,p.value)}),Zt(async()=>{var M;c.value.lazy||await _(!c.value.eager),(M=r.update)==null||M.call(r,p.value,d.value,u.value)}),zn(()=>c.value.input||c.value.invalidInput&&d.value===!1,()=>{Te(a,()=>{if(a.value!=null)_();else if(e.focused){const M=Te(()=>e.focused,x=>{x||_(),M()})}})}),zn(()=>c.value.blur,()=>{Te(()=>e.focused,M=>{M||_()})}),Te([d,u],()=>{var M;(M=r.update)==null||M.call(r,p.value,d.value,u.value)});async function m(){i.value=null,await ft(),await v()}async function v(){o.value=!0,c.value.lazy?s.value=[]:await _(!c.value.eager)}async function _(){let M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const x=[];f.value=!0;for(const C of e.rules){if(x.length>=Number(e.maxErrors??1))break;const P=await(typeof C=="function"?C:()=>C)(a.value);if(P!==!0){if(P!==!1&&typeof P!="string"){console.warn(`${P} is not a valid value. Rule functions must return boolean true or a string.`);continue}x.push(P||"")}}return s.value=x,f.value=!1,o.value=M,s.value}return{errorMessages:u,isDirty:l,isDisabled:r.isDisabled,isReadonly:r.isReadonly,isPristine:o,isValid:d,isValidating:f,reset:m,resetValidation:v,validate:_,validationClasses:h}}const Ma=Y({id:String,appendIcon:We,centerAffix:{type:Boolean,default:!0},prependIcon:We,hideDetails:[Boolean,String],hideSpinButtons:Boolean,hint:String,persistentHint:Boolean,messages:{type:[Array,String],default:()=>[]},direction:{type:String,default:"horizontal",validator:e=>["horizontal","vertical"].includes(e)},"onClick:prepend":vn(),"onClick:append":vn(),...Ie(),...fn(),...Ka(Qt(),["maxWidth","minWidth","width"]),...dt(),...d0()},"VInput"),xn=de()({name:"VInput",props:{...Ma()},emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:i,emit:a}=t;const{densityClasses:r}=In(e),{dimensionStyles:s}=en(e),{themeClasses:o}=pt(e),{rtlClasses:l}=rn(),{InputIcon:u}=l0(e),c=gn(),d=A(()=>e.id||`input-${c}`),f=A(()=>`${d.value}-messages`),{errorMessages:h,isDirty:g,isDisabled:p,isReadonly:m,isPristine:v,isValid:_,isValidating:M,reset:x,resetValidation:C,validate:T,validationClasses:P}=f0(e,"v-input",d),w=A(()=>({id:d,messagesId:f,isDirty:g,isDisabled:p,isReadonly:m,isPristine:v,isValid:_,isValidating:M,reset:x,resetValidation:C,validate:T})),b=A(()=>{var S;return(S=e.errorMessages)!=null&&S.length||!v.value&&h.value.length?h.value:e.hint&&(e.persistentHint||e.focused)?e.hint:e.messages});return pe(()=>{var O,G,U,j;const S=!!(i.prepend||e.prependIcon),E=!!(i.append||e.appendIcon),R=b.value.length>0,L=!e.hideDetails||e.hideDetails==="auto"&&(R||!!i.details);return y("div",{class:["v-input",`v-input--${e.direction}`,{"v-input--center-affix":e.centerAffix,"v-input--hide-spin-buttons":e.hideSpinButtons},r.value,o.value,l.value,P.value,e.class],style:[s.value,e.style]},[S&&y("div",{key:"prepend",class:"v-input__prepend"},[(O=i.prepend)==null?void 0:O.call(i,w.value),e.prependIcon&&y(u,{key:"prepend-icon",name:"prepend"},null)]),i.default&&y("div",{class:"v-input__control"},[(G=i.default)==null?void 0:G.call(i,w.value)]),E&&y("div",{key:"append",class:"v-input__append"},[e.appendIcon&&y(u,{key:"append-icon",name:"append"},null),(U=i.append)==null?void 0:U.call(i,w.value)]),L&&y("div",{id:f.value,class:"v-input__details",role:"alert","aria-live":"polite"},[y(u0,{active:R,messages:b.value},{message:i.message}),(j=i.details)==null?void 0:j.call(i,w.value)])])}),{reset:x,resetValidation:C,validate:T,isValid:_,errorMessages:h}}}),qL=Y({...Ma(),...Kt(o0(),["inline"])},"VCheckbox"),jL=de()({name:"VCheckbox",inheritAttrs:!1,props:qL(),emits:{"update:modelValue":e=>!0,"update:focused":e=>!0},setup(e,t){let{attrs:n,slots:i}=t;const a=He(e,"modelValue"),{isFocused:r,focus:s,blur:o}=Sa(e),l=gn(),u=A(()=>e.id||`checkbox-${l}`);return pe(()=>{const[c,d]=Za(n),f=xn.filterProps(e),h=ga.filterProps(e);return y(xn,ge({class:["v-checkbox",e.class]},c,f,{modelValue:a.value,"onUpdate:modelValue":g=>a.value=g,id:u.value,focused:r.value,style:e.style}),{...i,default:g=>{let{id:p,messagesId:m,isDisabled:v,isReadonly:_,isValid:M}=g;return y(ga,ge(h,{id:p.value,"aria-describedby":m.value,disabled:v.value,readonly:_.value},d,{error:M.value===!1,modelValue:a.value,"onUpdate:modelValue":x=>a.value=x,onFocus:s,onBlur:o}),i)}})}),{}}});function KL(e){let{selectedElement:t,containerElement:n,isRtl:i,isHorizontal:a}=e;const r=Wo(a,n),s=h0(a,i,n),o=Wo(a,t),l=m0(a,t),u=o*.4;return s>l?l-u:s+r<l+o?l-r+o+u:s}function ZL(e){let{selectedElement:t,containerElement:n,isHorizontal:i}=e;const a=Wo(i,n),r=m0(i,t),s=Wo(i,t);return r-a/2+s/2}function Rp(e,t){const n=e?"scrollWidth":"scrollHeight";return(t==null?void 0:t[n])||0}function JL(e,t){const n=e?"clientWidth":"clientHeight";return(t==null?void 0:t[n])||0}function h0(e,t,n){if(!n)return 0;const{scrollLeft:i,offsetWidth:a,scrollWidth:r}=n;return e?t?r-a+i:i:n.scrollTop}function Wo(e,t){const n=e?"offsetWidth":"offsetHeight";return(t==null?void 0:t[n])||0}function m0(e,t){const n=e?"offsetLeft":"offsetTop";return(t==null?void 0:t[n])||0}const v0=Symbol.for("vuetify:v-slide-group"),Mm=Y({centerActive:Boolean,direction:{type:String,default:"horizontal"},symbol:{type:null,default:v0},nextIcon:{type:We,default:"$next"},prevIcon:{type:We,default:"$prev"},showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["always","desktop","mobile"].includes(e)},...Ie(),...Yr({mobile:null}),...Je(),...Jr({selectedClass:"v-slide-group-item--active"})},"VSlideGroup"),$o=de()({name:"VSlideGroup",props:Mm(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{isRtl:i}=rn(),{displayClasses:a,mobile:r}=gi(e),s=Qa(e,e.symbol),o=Me(!1),l=Me(0),u=Me(0),c=Me(0),d=A(()=>e.direction==="horizontal"),{resizeRef:f,contentRect:h}=Ii(),{resizeRef:g,contentRect:p}=Ii(),m=cD(),v=A(()=>({container:f.el,duration:200,easing:"easeOutQuart"})),_=A(()=>s.selected.value.length?s.items.value.findIndex(H=>H.id===s.selected.value[0]):-1),M=A(()=>s.selected.value.length?s.items.value.findIndex(H=>H.id===s.selected.value[s.selected.value.length-1]):-1);if(mt){let H=-1;Te(()=>[s.selected.value,h.value,p.value,d.value],()=>{cancelAnimationFrame(H),H=requestAnimationFrame(()=>{if(h.value&&p.value){const te=d.value?"width":"height";u.value=h.value[te],c.value=p.value[te],o.value=u.value+1<c.value}if(_.value>=0&&g.el){const te=g.el.children[M.value];C(te,e.centerActive)}})})}const x=Me(!1);function C(H,te){let Se=0;te?Se=ZL({containerElement:f.el,isHorizontal:d.value,selectedElement:H}):Se=KL({containerElement:f.el,isHorizontal:d.value,isRtl:i.value,selectedElement:H}),T(Se)}function T(H){if(!mt||!f.el)return;const te=Wo(d.value,f.el),Se=h0(d.value,i.value,f.el);if(!(Rp(d.value,f.el)<=te||Math.abs(H-Se)<16)){if(d.value&&i.value&&f.el){const{scrollWidth:he,offsetWidth:ae}=f.el;H=he-ae-H}d.value?m.horizontal(H,v.value):m(H,v.value)}}function P(H){const{scrollTop:te,scrollLeft:Se}=H.target;l.value=d.value?Se:te}function w(H){if(x.value=!0,!(!o.value||!g.el)){for(const te of H.composedPath())for(const Se of g.el.children)if(Se===te){C(Se);return}}}function b(H){x.value=!1}let S=!1;function E(H){var te;!S&&!x.value&&!(H.relatedTarget&&((te=g.el)!=null&&te.contains(H.relatedTarget)))&&G(),S=!1}function R(){S=!0}function L(H){if(!g.el)return;function te(Se){H.preventDefault(),G(Se)}d.value?H.key==="ArrowRight"?te(i.value?"prev":"next"):H.key==="ArrowLeft"&&te(i.value?"next":"prev"):H.key==="ArrowDown"?te("next"):H.key==="ArrowUp"&&te("prev"),H.key==="Home"?te("first"):H.key==="End"&&te("last")}function O(H,te){if(!H)return;let Se=H;do Se=Se==null?void 0:Se[te==="next"?"nextElementSibling":"previousElementSibling"];while(Se!=null&&Se.hasAttribute("disabled"));return Se}function G(H){if(!g.el)return;let te;if(!H)te=No(g.el)[0];else if(H==="next"){if(te=O(g.el.querySelector(":focus"),H),!te)return G("first")}else if(H==="prev"){if(te=O(g.el.querySelector(":focus"),H),!te)return G("last")}else H==="first"?(te=g.el.firstElementChild,te!=null&&te.hasAttribute("disabled")&&(te=O(te,"next"))):H==="last"&&(te=g.el.lastElementChild,te!=null&&te.hasAttribute("disabled")&&(te=O(te,"prev")));te&&te.focus({preventScroll:!0})}function U(H){const te=d.value&&i.value?-1:1,Se=(H==="prev"?-te:te)*u.value;let $=l.value+Se;if(d.value&&i.value&&f.el){const{scrollWidth:he,offsetWidth:ae}=f.el;$+=he-ae}T($)}const j=A(()=>({next:s.next,prev:s.prev,select:s.select,isSelected:s.isSelected})),B=A(()=>{switch(e.showArrows){case"always":return!0;case"desktop":return!r.value;case!0:return o.value||Math.abs(l.value)>0;case"mobile":return r.value||o.value||Math.abs(l.value)>0;default:return!r.value&&(o.value||Math.abs(l.value)>0)}}),X=A(()=>Math.abs(l.value)>1),W=A(()=>{if(!f.value)return!1;const H=Rp(d.value,f.el),te=JL(d.value,f.el);return H-te-Math.abs(l.value)>1});return pe(()=>y(e.tag,{class:["v-slide-group",{"v-slide-group--vertical":!d.value,"v-slide-group--has-affixes":B.value,"v-slide-group--is-overflowing":o.value},a.value,e.class],style:e.style,tabindex:x.value||s.selected.value.length?-1:0,onFocus:E},{default:()=>{var H,te,Se;return[B.value&&y("div",{key:"prev",class:["v-slide-group__prev",{"v-slide-group__prev--disabled":!X.value}],onMousedown:R,onClick:()=>X.value&&U("prev")},[((H=n.prev)==null?void 0:H.call(n,j.value))??y(zo,null,{default:()=>[y(gt,{icon:i.value?e.nextIcon:e.prevIcon},null)]})]),y("div",{key:"container",ref:f,class:"v-slide-group__container",onScroll:P},[y("div",{ref:g,class:"v-slide-group__content",onFocusin:w,onFocusout:b,onKeydown:L},[(te=n.default)==null?void 0:te.call(n,j.value)])]),B.value&&y("div",{key:"next",class:["v-slide-group__next",{"v-slide-group__next--disabled":!W.value}],onMousedown:R,onClick:()=>W.value&&U("next")},[((Se=n.next)==null?void 0:Se.call(n,j.value))??y(zo,null,{default:()=>[y(gt,{icon:i.value?e.prevIcon:e.nextIcon},null)]})])]}})),{selected:s.selected,scrollTo:U,scrollOffset:l,focus:G,hasPrev:X,hasNext:W}}}),g0=Symbol.for("vuetify:v-chip-group"),QL=Y({column:Boolean,filter:Boolean,valueComparator:{type:Function,default:Rn},...Mm(),...Ie(),...Jr({selectedClass:"v-chip--selected"}),...Je(),...dt(),...pi({variant:"tonal"})},"VChipGroup"),ek=de()({name:"VChipGroup",props:QL(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:i}=pt(e),{isSelected:a,select:r,next:s,prev:o,selected:l}=Qa(e,g0);return zt({VChip:{color:se(e,"color"),disabled:se(e,"disabled"),filter:se(e,"filter"),variant:se(e,"variant")}}),pe(()=>{const u=$o.filterProps(e);return y($o,ge(u,{class:["v-chip-group",{"v-chip-group--column":e.column},i.value,e.class],style:e.style}),{default:()=>{var c;return[(c=n.default)==null?void 0:c.call(n,{isSelected:a,select:r,next:s,prev:o,selected:l.value})]}})}),{}}}),tk=Y({activeClass:String,appendAvatar:String,appendIcon:We,closable:Boolean,closeIcon:{type:We,default:"$delete"},closeLabel:{type:String,default:"$vuetify.close"},draggable:Boolean,filter:Boolean,filterIcon:{type:We,default:"$complete"},label:Boolean,link:{type:Boolean,default:void 0},pill:Boolean,prependAvatar:String,prependIcon:We,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},modelValue:{type:Boolean,default:!0},onClick:vn(),onClickOnce:vn(),...Yn(),...Ie(),...fn(),...sn(),...Qr(),...Vt(),...hl(),...$i(),...Je({tag:"span"}),...dt(),...pi({variant:"tonal"})},"VChip"),io=de()({name:"VChip",directives:{Ripple:xa},props:tk(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0,"group:selected":e=>!0,click:e=>!0},setup(e,t){let{attrs:n,emit:i,slots:a}=t;const{t:r}=$t(),{borderClasses:s}=ri(e),{colorClasses:o,colorStyles:l,variantClasses:u}=Zr(e),{densityClasses:c}=In(e),{elevationClasses:d}=pn(e),{roundedClasses:f}=Gt(e),{sizeClasses:h}=Qs(e),{themeClasses:g}=pt(e),p=He(e,"modelValue"),m=es(e,g0,!1),v=fl(e,n),_=A(()=>e.link!==!1&&v.isLink.value),M=A(()=>!e.disabled&&e.link!==!1&&(!!m||e.link||v.isClickable.value)),x=A(()=>({"aria-label":r(e.closeLabel),onClick(P){P.preventDefault(),P.stopPropagation(),p.value=!1,i("click:close",P)}}));function C(P){var w;i("click",P),M.value&&((w=v.navigate)==null||w.call(v,P),m==null||m.toggle())}function T(P){(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),C(P))}return()=>{var G;const P=v.isLink.value?"a":e.tag,w=!!(e.appendIcon||e.appendAvatar),b=!!(w||a.append),S=!!(a.close||e.closable),E=!!(a.filter||e.filter)&&m,R=!!(e.prependIcon||e.prependAvatar),L=!!(R||a.prepend),O=!m||m.isSelected.value;return p.value&&kt(y(P,ge({class:["v-chip",{"v-chip--disabled":e.disabled,"v-chip--label":e.label,"v-chip--link":M.value,"v-chip--filter":E,"v-chip--pill":e.pill,[`${e.activeClass}`]:e.activeClass&&((G=v.isActive)==null?void 0:G.value)},g.value,s.value,O?o.value:void 0,c.value,d.value,f.value,h.value,u.value,m==null?void 0:m.selectedClass.value,e.class],style:[O?l.value:void 0,e.style],disabled:e.disabled||void 0,draggable:e.draggable,tabindex:M.value?0:void 0,onClick:C,onKeydown:M.value&&!_.value&&T},v.linkProps),{default:()=>{var U;return[Ja(M.value,"v-chip"),E&&y(_m,{key:"filter"},{default:()=>[kt(y("div",{class:"v-chip__filter"},[a.filter?y(rt,{key:"filter-defaults",disabled:!e.filterIcon,defaults:{VIcon:{icon:e.filterIcon}}},a.filter):y(gt,{key:"filter-icon",icon:e.filterIcon},null)]),[[vi,m.isSelected.value]])]}),L&&y("div",{key:"prepend",class:"v-chip__prepend"},[a.prepend?y(rt,{key:"prepend-defaults",disabled:!R,defaults:{VAvatar:{image:e.prependAvatar,start:!0},VIcon:{icon:e.prependIcon,start:!0}}},a.prepend):y(Ne,null,[e.prependIcon&&y(gt,{key:"prepend-icon",icon:e.prependIcon,start:!0},null),e.prependAvatar&&y(mi,{key:"prepend-avatar",image:e.prependAvatar,start:!0},null)])]),y("div",{class:"v-chip__content","data-no-activator":""},[((U=a.default)==null?void 0:U.call(a,{isSelected:m==null?void 0:m.isSelected.value,selectedClass:m==null?void 0:m.selectedClass.value,select:m==null?void 0:m.select,toggle:m==null?void 0:m.toggle,value:m==null?void 0:m.value.value,disabled:e.disabled}))??hi(e.text)]),b&&y("div",{key:"append",class:"v-chip__append"},[a.append?y(rt,{key:"append-defaults",disabled:!w,defaults:{VAvatar:{end:!0,image:e.appendAvatar},VIcon:{end:!0,icon:e.appendIcon}}},a.append):y(Ne,null,[e.appendIcon&&y(gt,{key:"append-icon",end:!0,icon:e.appendIcon},null),e.appendAvatar&&y(mi,{key:"append-avatar",end:!0,image:e.appendAvatar},null)])]),S&&y("button",ge({key:"close",class:"v-chip__close",type:"button","data-testid":"close-chip"},x.value),[a.close?y(rt,{key:"close-defaults",defaults:{VIcon:{icon:e.closeIcon,size:"x-small"}}},a.close):y(gt,{key:"close-icon",icon:e.closeIcon,size:"x-small"},null)])]}}),[[ni("ripple"),M.value&&e.ripple,null]])}}}),th=Symbol.for("vuetify:list");function p0(){const e=ot(th,{hasPrepend:Me(!1),updateHasPrepend:()=>null}),t={hasPrepend:Me(!1),updateHasPrepend:n=>{n&&(t.hasPrepend.value=n)}};return Rt(th,t),e}function y0(){return ot(th,null)}const Em=e=>{const t={activate:n=>{let{id:i,value:a,activated:r}=n;return i=Ye(i),e&&!a&&r.size===1&&r.has(i)||(a?r.add(i):r.delete(i)),r},in:(n,i,a)=>{let r=new Set;if(n!=null)for(const s of Nt(n))r=t.activate({id:s,value:!0,activated:new Set(r),children:i,parents:a});return r},out:n=>Array.from(n)};return t},_0=e=>{const t=Em(e);return{activate:i=>{let{activated:a,id:r,...s}=i;r=Ye(r);const o=a.has(r)?new Set([r]):new Set;return t.activate({...s,id:r,activated:o})},in:(i,a,r)=>{let s=new Set;if(i!=null){const o=Nt(i);o.length&&(s=t.in(o.slice(0,1),a,r))}return s},out:(i,a,r)=>t.out(i,a,r)}},nk=e=>{const t=Em(e);return{activate:i=>{let{id:a,activated:r,children:s,...o}=i;return a=Ye(a),s.has(a)?r:t.activate({id:a,activated:r,children:s,...o})},in:t.in,out:t.out}},ik=e=>{const t=_0(e);return{activate:i=>{let{id:a,activated:r,children:s,...o}=i;return a=Ye(a),s.has(a)?r:t.activate({id:a,activated:r,children:s,...o})},in:t.in,out:t.out}},ak={open:e=>{let{id:t,value:n,opened:i,parents:a}=e;if(n){const r=new Set;r.add(t);let s=a.get(t);for(;s!=null;)r.add(s),s=a.get(s);return r}else return i.delete(t),i},select:()=>null},b0={open:e=>{let{id:t,value:n,opened:i,parents:a}=e;if(n){let r=a.get(t);for(i.add(t);r!=null&&r!==t;)i.add(r),r=a.get(r);return i}else i.delete(t);return i},select:()=>null},rk={open:b0.open,select:e=>{let{id:t,value:n,opened:i,parents:a}=e;if(!n)return i;const r=[];let s=a.get(t);for(;s!=null;)r.push(s),s=a.get(s);return new Set(r)}},wm=e=>{const t={select:n=>{let{id:i,value:a,selected:r}=n;if(i=Ye(i),e&&!a){const s=Array.from(r.entries()).reduce((o,l)=>{let[u,c]=l;return c==="on"&&o.push(u),o},[]);if(s.length===1&&s[0]===i)return r}return r.set(i,a?"on":"off"),r},in:(n,i,a)=>{const r=new Map;for(const s of n||[])t.select({id:s,value:!0,selected:r,children:i,parents:a});return r},out:n=>{const i=[];for(const[a,r]of n.entries())r==="on"&&i.push(a);return i}};return t},x0=e=>{const t=wm(e);return{select:i=>{let{selected:a,id:r,...s}=i;r=Ye(r);const o=a.has(r)?new Map([[r,a.get(r)]]):new Map;return t.select({...s,id:r,selected:o})},in:(i,a,r)=>i!=null&&i.length?t.in(i.slice(0,1),a,r):new Map,out:(i,a,r)=>t.out(i,a,r)}},sk=e=>{const t=wm(e);return{select:i=>{let{id:a,selected:r,children:s,...o}=i;return a=Ye(a),s.has(a)?r:t.select({id:a,selected:r,children:s,...o})},in:t.in,out:t.out}},ok=e=>{const t=x0(e);return{select:i=>{let{id:a,selected:r,children:s,...o}=i;return a=Ye(a),s.has(a)?r:t.select({id:a,selected:r,children:s,...o})},in:t.in,out:t.out}},lk=e=>{const t={select:n=>{let{id:i,value:a,selected:r,children:s,parents:o}=n;i=Ye(i);const l=new Map(r),u=[i];for(;u.length;){const d=u.shift();r.set(Ye(d),a?"on":"off"),s.has(d)&&u.push(...s.get(d))}let c=Ye(o.get(i));for(;c;){const d=s.get(c),f=d.every(g=>r.get(Ye(g))==="on"),h=d.every(g=>!r.has(Ye(g))||r.get(Ye(g))==="off");r.set(c,f?"on":h?"off":"indeterminate"),c=Ye(o.get(c))}return e&&!a&&Array.from(r.entries()).reduce((f,h)=>{let[g,p]=h;return p==="on"&&f.push(g),f},[]).length===0?l:r},in:(n,i,a)=>{let r=new Map;for(const s of n||[])r=t.select({id:s,value:!0,selected:r,children:i,parents:a});return r},out:(n,i)=>{const a=[];for(const[r,s]of n.entries())s==="on"&&!i.has(r)&&a.push(r);return a}};return t},Xo=Symbol.for("vuetify:nested"),S0={id:Me(),root:{register:()=>null,unregister:()=>null,parents:_e(new Map),children:_e(new Map),open:()=>null,openOnSelect:()=>null,activate:()=>null,select:()=>null,activatable:_e(!1),selectable:_e(!1),opened:_e(new Set),activated:_e(new Set),selected:_e(new Map),selectedValues:_e([]),getPath:()=>[]}},uk=Y({activatable:Boolean,selectable:Boolean,activeStrategy:[String,Function,Object],selectStrategy:[String,Function,Object],openStrategy:[String,Object],opened:null,activated:null,selected:null,mandatory:Boolean},"nested"),ck=e=>{let t=!1;const n=_e(new Map),i=_e(new Map),a=He(e,"opened",e.opened,g=>new Set(g),g=>[...g.values()]),r=A(()=>{if(typeof e.activeStrategy=="object")return e.activeStrategy;if(typeof e.activeStrategy=="function")return e.activeStrategy(e.mandatory);switch(e.activeStrategy){case"leaf":return nk(e.mandatory);case"single-leaf":return ik(e.mandatory);case"independent":return Em(e.mandatory);case"single-independent":default:return _0(e.mandatory)}}),s=A(()=>{if(typeof e.selectStrategy=="object")return e.selectStrategy;if(typeof e.selectStrategy=="function")return e.selectStrategy(e.mandatory);switch(e.selectStrategy){case"single-leaf":return ok(e.mandatory);case"leaf":return sk(e.mandatory);case"independent":return wm(e.mandatory);case"single-independent":return x0(e.mandatory);case"classic":default:return lk(e.mandatory)}}),o=A(()=>{if(typeof e.openStrategy=="object")return e.openStrategy;switch(e.openStrategy){case"list":return rk;case"single":return ak;case"multiple":default:return b0}}),l=He(e,"activated",e.activated,g=>r.value.in(g,n.value,i.value),g=>r.value.out(g,n.value,i.value)),u=He(e,"selected",e.selected,g=>s.value.in(g,n.value,i.value),g=>s.value.out(g,n.value,i.value));dn(()=>{t=!0});function c(g){const p=[];let m=g;for(;m!=null;)p.unshift(m),m=i.value.get(m);return p}const d=Ht("nested"),f=new Set,h={id:Me(),root:{opened:a,activatable:se(e,"activatable"),selectable:se(e,"selectable"),activated:l,selected:u,selectedValues:A(()=>{const g=[];for(const[p,m]of u.value.entries())m==="on"&&g.push(p);return g}),register:(g,p,m)=>{if(f.has(g)){c(g).map(String).join(" -> "),c(p).concat(g).map(String).join(" -> ");return}else f.add(g);p&&g!==p&&i.value.set(g,p),m&&n.value.set(g,[]),p!=null&&n.value.set(p,[...n.value.get(p)||[],g])},unregister:g=>{if(t)return;f.delete(g),n.value.delete(g);const p=i.value.get(g);if(p){const m=n.value.get(p)??[];n.value.set(p,m.filter(v=>v!==g))}i.value.delete(g)},open:(g,p,m)=>{d.emit("click:open",{id:g,value:p,path:c(g),event:m});const v=o.value.open({id:g,value:p,opened:new Set(a.value),children:n.value,parents:i.value,event:m});v&&(a.value=v)},openOnSelect:(g,p,m)=>{const v=o.value.select({id:g,value:p,selected:new Map(u.value),opened:new Set(a.value),children:n.value,parents:i.value,event:m});v&&(a.value=v)},select:(g,p,m)=>{d.emit("click:select",{id:g,value:p,path:c(g),event:m});const v=s.value.select({id:g,value:p,selected:new Map(u.value),children:n.value,parents:i.value,event:m});v&&(u.value=v),h.root.openOnSelect(g,p,m)},activate:(g,p,m)=>{if(!e.activatable)return h.root.select(g,!0,m);d.emit("click:activate",{id:g,value:p,path:c(g),event:m});const v=r.value.activate({id:g,value:p,activated:new Set(l.value),children:n.value,parents:i.value,event:m});if(v.size!==l.value.size)l.value=v;else{for(const _ of v)if(!l.value.has(_)){l.value=v;return}for(const _ of l.value)if(!v.has(_)){l.value=v;return}}},children:n,parents:i,getPath:c}};return Rt(Xo,h),h.root},M0=(e,t)=>{const n=ot(Xo,S0),i=Symbol(gn()),a=A(()=>e.value!==void 0?e.value:i),r={...n,id:a,open:(s,o)=>n.root.open(a.value,s,o),openOnSelect:(s,o)=>n.root.openOnSelect(a.value,s,o),isOpen:A(()=>n.root.opened.value.has(a.value)),parent:A(()=>n.root.parents.value.get(a.value)),activate:(s,o)=>n.root.activate(a.value,s,o),isActivated:A(()=>n.root.activated.value.has(Ye(a.value))),select:(s,o)=>n.root.select(a.value,s,o),isSelected:A(()=>n.root.selected.value.get(Ye(a.value))==="on"),isIndeterminate:A(()=>n.root.selected.value.get(Ye(a.value))==="indeterminate"),isLeaf:A(()=>!n.root.children.value.get(a.value)),isGroupActivator:n.isGroupActivator};return js(()=>{!n.isGroupActivator&&n.root.register(a.value,n.id.value,t)}),dn(()=>{!n.isGroupActivator&&n.root.unregister(a.value)}),t&&Rt(Xo,r),r},dk=()=>{const e=ot(Xo,S0);Rt(Xo,{...e,isGroupActivator:!0})},fk=ii({name:"VListGroupActivator",setup(e,t){let{slots:n}=t;return dk(),()=>{var i;return(i=n.default)==null?void 0:i.call(n)}}}),hk=Y({activeColor:String,baseColor:String,color:String,collapseIcon:{type:We,default:"$collapse"},expandIcon:{type:We,default:"$expand"},prependIcon:We,appendIcon:We,fluid:Boolean,subgroup:Boolean,title:String,value:null,...Ie(),...Je()},"VListGroup"),nh=de()({name:"VListGroup",props:hk(),setup(e,t){let{slots:n}=t;const{isOpen:i,open:a,id:r}=M0(se(e,"value"),!0),s=A(()=>`v-list-group--id-${String(r.value)}`),o=y0(),{isBooted:l}=Kr();function u(h){h.stopPropagation(),a(!i.value,h)}const c=A(()=>({onClick:u,class:"v-list-group__header",id:s.value})),d=A(()=>i.value?e.collapseIcon:e.expandIcon),f=A(()=>({VListItem:{active:i.value,activeColor:e.activeColor,baseColor:e.baseColor,color:e.color,prependIcon:e.prependIcon||e.subgroup&&d.value,appendIcon:e.appendIcon||!e.subgroup&&d.value,title:e.title,value:e.value}}));return pe(()=>y(e.tag,{class:["v-list-group",{"v-list-group--prepend":o==null?void 0:o.hasPrepend.value,"v-list-group--fluid":e.fluid,"v-list-group--subgroup":e.subgroup,"v-list-group--open":i.value},e.class],style:e.style},{default:()=>[n.activator&&y(rt,{defaults:f.value},{default:()=>[y(fk,null,{default:()=>[n.activator({props:c.value,isOpen:i.value})]})]}),y(Pn,{transition:{component:cc},disabled:!l.value},{default:()=>{var h;return[kt(y("div",{class:"v-list-group__items",role:"group","aria-labelledby":s.value},[(h=n.default)==null?void 0:h.call(n)]),[[vi,i.value]])]}})]})),{isOpen:i}}}),mk=Y({opacity:[Number,String],...Ie(),...Je()},"VListItemSubtitle"),E0=de()({name:"VListItemSubtitle",props:mk(),setup(e,t){let{slots:n}=t;return pe(()=>y(e.tag,{class:["v-list-item-subtitle",e.class],style:[{"--v-list-item-subtitle-opacity":e.opacity},e.style]},n)),{}}}),w0=Wi("v-list-item-title"),vk=Y({active:{type:Boolean,default:void 0},activeClass:String,activeColor:String,appendAvatar:String,appendIcon:We,baseColor:String,disabled:Boolean,lines:[Boolean,String],link:{type:Boolean,default:void 0},nav:Boolean,prependAvatar:String,prependIcon:We,ripple:{type:[Boolean,Object],default:!0},slim:Boolean,subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},value:null,onClick:vn(),onClickOnce:vn(),...Yn(),...Ie(),...fn(),...Qt(),...sn(),...Vt(),...hl(),...Je(),...dt(),...pi({variant:"text"})},"VListItem"),pa=de()({name:"VListItem",directives:{Ripple:xa},props:vk(),emits:{click:e=>!0},setup(e,t){let{attrs:n,slots:i,emit:a}=t;const r=fl(e,n),s=A(()=>e.value===void 0?r.href.value:e.value),{activate:o,isActivated:l,select:u,isOpen:c,isSelected:d,isIndeterminate:f,isGroupActivator:h,root:g,parent:p,openOnSelect:m,id:v}=M0(s,!1),_=y0(),M=A(()=>{var $;return e.active!==!1&&(e.active||(($=r.isActive)==null?void 0:$.value)||(g.activatable.value?l.value:d.value))}),x=A(()=>e.link!==!1&&r.isLink.value),C=A(()=>!!_&&(g.selectable.value||g.activatable.value||e.value!=null)),T=A(()=>!e.disabled&&e.link!==!1&&(e.link||r.isClickable.value||C.value)),P=A(()=>e.rounded||e.nav),w=A(()=>e.color??e.activeColor),b=A(()=>({color:M.value?w.value??e.baseColor:e.baseColor,variant:e.variant}));Te(()=>{var $;return($=r.isActive)==null?void 0:$.value},$=>{$&&S()}),js(()=>{var $;($=r.isActive)!=null&&$.value&&S()});function S(){p.value!=null&&g.open(p.value,!0),m(!0)}const{themeClasses:E}=pt(e),{borderClasses:R}=ri(e),{colorClasses:L,colorStyles:O,variantClasses:G}=Zr(b),{densityClasses:U}=In(e),{dimensionStyles:j}=en(e),{elevationClasses:B}=pn(e),{roundedClasses:X}=Gt(P),W=A(()=>e.lines?`v-list-item--${e.lines}-line`:void 0),H=A(()=>({isActive:M.value,select:u,isOpen:c.value,isSelected:d.value,isIndeterminate:f.value}));function te($){var he;a("click",$),T.value&&((he=r.navigate)==null||he.call(r,$),!h&&(g.activatable.value?o(!l.value,$):(g.selectable.value||e.value!=null)&&u(!d.value,$)))}function Se($){const he=$.target;["INPUT","TEXTAREA"].includes(he.tagName)||($.key==="Enter"||$.key===" ")&&($.preventDefault(),$.target.dispatchEvent(new MouseEvent("click",$)))}return pe(()=>{const $=x.value?"a":e.tag,he=i.title||e.title!=null,ae=i.subtitle||e.subtitle!=null,Q=!!(e.appendAvatar||e.appendIcon),ve=!!(Q||i.append),Ge=!!(e.prependAvatar||e.prependIcon),Ae=!!(Ge||i.prepend);return _==null||_.updateHasPrepend(Ae),e.activeColor&&GR("active-color",["color","base-color"]),kt(y($,ge({class:["v-list-item",{"v-list-item--active":M.value,"v-list-item--disabled":e.disabled,"v-list-item--link":T.value,"v-list-item--nav":e.nav,"v-list-item--prepend":!Ae&&(_==null?void 0:_.hasPrepend.value),"v-list-item--slim":e.slim,[`${e.activeClass}`]:e.activeClass&&M.value},E.value,R.value,L.value,U.value,B.value,W.value,X.value,G.value,e.class],style:[O.value,j.value,e.style],tabindex:T.value?_?-2:0:void 0,"aria-selected":C.value?g.activatable.value?l.value:g.selectable.value?d.value:M.value:void 0,onClick:te,onKeydown:T.value&&!x.value&&Se},r.linkProps),{default:()=>{var be;return[Ja(T.value||M.value,"v-list-item"),Ae&&y("div",{key:"prepend",class:"v-list-item__prepend"},[i.prepend?y(rt,{key:"prepend-defaults",disabled:!Ge,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon},VListItemAction:{start:!0}}},{default:()=>{var N;return[(N=i.prepend)==null?void 0:N.call(i,H.value)]}}):y(Ne,null,[e.prependAvatar&&y(mi,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&y(gt,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)]),y("div",{class:"v-list-item__spacer"},null)]),y("div",{class:"v-list-item__content","data-no-activator":""},[he&&y(w0,{key:"title"},{default:()=>{var N;return[((N=i.title)==null?void 0:N.call(i,{title:e.title}))??hi(e.title)]}}),ae&&y(E0,{key:"subtitle"},{default:()=>{var N;return[((N=i.subtitle)==null?void 0:N.call(i,{subtitle:e.subtitle}))??hi(e.subtitle)]}}),(be=i.default)==null?void 0:be.call(i,H.value)]),ve&&y("div",{key:"append",class:"v-list-item__append"},[i.append?y(rt,{key:"append-defaults",disabled:!Q,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon},VListItemAction:{end:!0}}},{default:()=>{var N;return[(N=i.append)==null?void 0:N.call(i,H.value)]}}):y(Ne,null,[e.appendIcon&&y(gt,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&y(mi,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)]),y("div",{class:"v-list-item__spacer"},null)])]}}),[[ni("ripple"),T.value&&e.ripple]])}),{activate:o,isActivated:l,isGroupActivator:h,isSelected:d,list:_,select:u,root:g,id:v,link:r}}}),gk=Y({color:String,inset:Boolean,sticky:Boolean,title:String,...Ie(),...Je()},"VListSubheader"),T0=de()({name:"VListSubheader",props:gk(),setup(e,t){let{slots:n}=t;const{textColorClasses:i,textColorStyles:a}=bn(se(e,"color"));return pe(()=>{const r=!!(n.default||e.title);return y(e.tag,{class:["v-list-subheader",{"v-list-subheader--inset":e.inset,"v-list-subheader--sticky":e.sticky},i.value,e.class],style:[{textColorStyles:a},e.style]},{default:()=>{var s;return[r&&y("div",{class:"v-list-subheader__text"},[((s=n.default)==null?void 0:s.call(n))??e.title])]}})}),{}}}),pk=Y({color:String,inset:Boolean,length:[Number,String],opacity:[Number,String],thickness:[Number,String],vertical:Boolean,...Ie(),...dt()},"VDivider"),vl=de()({name:"VDivider",props:pk(),setup(e,t){let{attrs:n,slots:i}=t;const{themeClasses:a}=pt(e),{textColorClasses:r,textColorStyles:s}=bn(se(e,"color")),o=A(()=>{const l={};return e.length&&(l[e.vertical?"height":"width"]=Re(e.length)),e.thickness&&(l[e.vertical?"borderRightWidth":"borderTopWidth"]=Re(e.thickness)),l});return pe(()=>{const l=y("hr",{class:[{"v-divider":!0,"v-divider--inset":e.inset,"v-divider--vertical":e.vertical},a.value,r.value,e.class],style:[o.value,s.value,{"--v-border-opacity":e.opacity},e.style],"aria-orientation":!n.role||n.role==="separator"?e.vertical?"vertical":"horizontal":void 0,role:`${n.role||"separator"}`},null);return i.default?y("div",{class:["v-divider__wrapper",{"v-divider__wrapper--vertical":e.vertical,"v-divider__wrapper--inset":e.inset}]},[l,y("div",{class:"v-divider__content"},[i.default()]),l]):l}),{}}}),yk=Y({items:Array,returnObject:Boolean},"VListChildren"),C0=de()({name:"VListChildren",props:yk(),setup(e,t){let{slots:n}=t;return p0(),()=>{var i,a;return((i=n.default)==null?void 0:i.call(n))??((a=e.items)==null?void 0:a.map(r=>{var f,h;let{children:s,props:o,type:l,raw:u}=r;if(l==="divider")return((f=n.divider)==null?void 0:f.call(n,{props:o}))??y(vl,o,null);if(l==="subheader")return((h=n.subheader)==null?void 0:h.call(n,{props:o}))??y(T0,o,null);const c={subtitle:n.subtitle?g=>{var p;return(p=n.subtitle)==null?void 0:p.call(n,{...g,item:u})}:void 0,prepend:n.prepend?g=>{var p;return(p=n.prepend)==null?void 0:p.call(n,{...g,item:u})}:void 0,append:n.append?g=>{var p;return(p=n.append)==null?void 0:p.call(n,{...g,item:u})}:void 0,title:n.title?g=>{var p;return(p=n.title)==null?void 0:p.call(n,{...g,item:u})}:void 0},d=nh.filterProps(o);return s?y(nh,ge({value:o==null?void 0:o.value},d),{activator:g=>{let{props:p}=g;const m={...o,...p,value:e.returnObject?u:o.value};return n.header?n.header({props:m}):y(pa,m,c)},default:()=>y(C0,{items:s,returnObject:e.returnObject},n)}):n.item?n.item({props:o}):y(pa,ge(o,{value:e.returnObject?u:o.value}),c)}))}}}),A0=Y({items:{type:Array,default:()=>[]},itemTitle:{type:[String,Array,Function],default:"title"},itemValue:{type:[String,Array,Function],default:"value"},itemChildren:{type:[Boolean,String,Array,Function],default:"children"},itemProps:{type:[Boolean,String,Array,Function],default:"props"},returnObject:Boolean,valueComparator:Function},"list-items");function Fa(e,t){const n=an(t,e.itemTitle,t),i=an(t,e.itemValue,n),a=an(t,e.itemChildren),r=e.itemProps===!0?typeof t=="object"&&t!=null&&!Array.isArray(t)?"children"in t?Kt(t,["children"]):t:void 0:an(t,e.itemProps),s={title:n,value:i,...r};return{title:String(s.title??""),value:s.value,props:s,children:Array.isArray(a)?P0(e,a):void 0,raw:t}}function P0(e,t){const n=Ka(e,["itemTitle","itemValue","itemChildren","itemProps","returnObject","valueComparator"]),i=[];for(const a of t)i.push(Fa(n,a));return i}function Tm(e){const t=A(()=>P0(e,e.items)),n=A(()=>t.value.some(o=>o.value===null)),i=Me(new Map),a=Me([]);Bt(()=>{const o=t.value,l=new Map,u=[];for(let c=0;c<o.length;c++){const d=o[c];if(ub(d.value)||d.value===null){let f=l.get(d.value);f||(f=[],l.set(d.value,f)),f.push(d)}else u.push(d)}i.value=l,a.value=u});function r(o){const l=i.value,u=t.value,c=a.value,d=n.value,f=e.returnObject,h=!!e.valueComparator,g=e.valueComparator||Rn,p=Ka(e,["itemTitle","itemValue","itemChildren","itemProps","returnObject","valueComparator"]),m=[];e:for(const v of o){if(!d&&v===null)continue;if(f&&typeof v=="string"){m.push(Fa(p,v));continue}const _=l.get(v);if(h||!_){for(const M of h?u:c)if(g(v,M.value)){m.push(M);continue e}m.push(Fa(p,v));continue}m.push(..._)}return m}function s(o){return e.returnObject?o.map(l=>{let{raw:u}=l;return u}):o.map(l=>{let{value:u}=l;return u})}return{items:t,transformIn:r,transformOut:s}}function _k(e,t){const n=an(t,e.itemType,"item"),i=ub(t)?t:an(t,e.itemTitle),a=an(t,e.itemValue,void 0),r=an(t,e.itemChildren),s=e.itemProps===!0?Kt(t,["children"]):an(t,e.itemProps),o={title:i,value:a,...s};return{type:n,title:o.title,value:o.value,props:o,children:n==="item"&&r?R0(e,r):void 0,raw:t}}function R0(e,t){const n=[];for(const i of t)n.push(_k(e,i));return n}function bk(e){return{items:A(()=>R0(e,e.items))}}const xk=Y({baseColor:String,activeColor:String,activeClass:String,bgColor:String,disabled:Boolean,expandIcon:We,collapseIcon:We,lines:{type:[Boolean,String],default:"one"},slim:Boolean,nav:Boolean,"onClick:open":vn(),"onClick:select":vn(),"onUpdate:opened":vn(),...uk({selectStrategy:"single-leaf",openStrategy:"list"}),...Yn(),...Ie(),...fn(),...Qt(),...sn(),itemType:{type:String,default:"type"},...A0(),...Vt(),...Je(),...dt(),...pi({variant:"text"})},"VList"),pc=de()({name:"VList",props:xk(),emits:{"update:selected":e=>!0,"update:activated":e=>!0,"update:opened":e=>!0,"click:open":e=>!0,"click:activate":e=>!0,"click:select":e=>!0},setup(e,t){let{slots:n}=t;const{items:i}=bk(e),{themeClasses:a}=pt(e),{backgroundColorClasses:r,backgroundColorStyles:s}=wt(se(e,"bgColor")),{borderClasses:o}=ri(e),{densityClasses:l}=In(e),{dimensionStyles:u}=en(e),{elevationClasses:c}=pn(e),{roundedClasses:d}=Gt(e),{children:f,open:h,parents:g,select:p,getPath:m}=ck(e),v=A(()=>e.lines?`v-list--${e.lines}-line`:void 0),_=se(e,"activeColor"),M=se(e,"baseColor"),x=se(e,"color");p0(),zt({VListGroup:{activeColor:_,baseColor:M,color:x,expandIcon:se(e,"expandIcon"),collapseIcon:se(e,"collapseIcon")},VListItem:{activeClass:se(e,"activeClass"),activeColor:_,baseColor:M,color:x,density:se(e,"density"),disabled:se(e,"disabled"),lines:se(e,"lines"),nav:se(e,"nav"),slim:se(e,"slim"),variant:se(e,"variant")}});const C=Me(!1),T=_e();function P(L){C.value=!0}function w(L){C.value=!1}function b(L){var O;!C.value&&!(L.relatedTarget&&((O=T.value)!=null&&O.contains(L.relatedTarget)))&&R()}function S(L){const O=L.target;if(!(!T.value||["INPUT","TEXTAREA"].includes(O.tagName))){if(L.key==="ArrowDown")R("next");else if(L.key==="ArrowUp")R("prev");else if(L.key==="Home")R("first");else if(L.key==="End")R("last");else return;L.preventDefault()}}function E(L){C.value=!0}function R(L){if(T.value)return Ar(T.value,L)}return pe(()=>y(e.tag,{ref:T,class:["v-list",{"v-list--disabled":e.disabled,"v-list--nav":e.nav,"v-list--slim":e.slim},a.value,r.value,o.value,l.value,c.value,v.value,d.value,e.class],style:[s.value,u.value,e.style],tabindex:e.disabled?-1:0,role:"listbox","aria-activedescendant":void 0,onFocusin:P,onFocusout:w,onFocus:b,onKeydown:S,onMousedown:E},{default:()=>[y(C0,{items:i.value,returnObject:e.returnObject},n)]})),{open:h,select:p,focus:R,children:f,parents:g,getPath:m}}}),Sk=Wi("v-list-img"),Mk=Y({start:Boolean,end:Boolean,...Ie(),...Je()},"VListItemAction"),Ek=de()({name:"VListItemAction",props:Mk(),setup(e,t){let{slots:n}=t;return pe(()=>y(e.tag,{class:["v-list-item-action",{"v-list-item-action--start":e.start,"v-list-item-action--end":e.end},e.class],style:e.style},n)),{}}}),wk=Y({start:Boolean,end:Boolean,...Ie(),...Je()},"VListItemMedia"),Tk=de()({name:"VListItemMedia",props:wk(),setup(e,t){let{slots:n}=t;return pe(()=>y(e.tag,{class:["v-list-item-media",{"v-list-item-media--start":e.start,"v-list-item-media--end":e.end},e.class],style:e.style},n)),{}}});function Dd(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ck(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ip(e,t){if(e.side==="top"||e.side==="bottom"){const{side:n,align:i}=e,a=i==="left"?0:i==="center"?t.width/2:i==="right"?t.width:i,r=n==="top"?0:n==="bottom"?t.height:n;return Dd({x:a,y:r},t)}else if(e.side==="left"||e.side==="right"){const{side:n,align:i}=e,a=n==="left"?0:n==="right"?t.width:n,r=i==="top"?0:i==="center"?t.height/2:i==="bottom"?t.height:i;return Dd({x:a,y:r},t)}return Dd({x:t.width/2,y:t.height/2},t)}const I0={static:Rk,connected:Dk},Ak=Y({locationStrategy:{type:[String,Function],default:"static",validator:e=>typeof e=="function"||e in I0},location:{type:String,default:"bottom"},origin:{type:String,default:"auto"},offset:[Number,String,Array]},"VOverlay-location-strategies");function Pk(e,t){const n=_e({}),i=_e();mt&&zn(()=>!!(t.isActive.value&&e.locationStrategy),r=>{var s,o;Te(()=>e.locationStrategy,r),Sn(()=>{window.removeEventListener("resize",a),i.value=void 0}),window.addEventListener("resize",a,{passive:!0}),typeof e.locationStrategy=="function"?i.value=(s=e.locationStrategy(t,e,n))==null?void 0:s.updateLocation:i.value=(o=I0[e.locationStrategy](t,e,n))==null?void 0:o.updateLocation});function a(r){var s;(s=i.value)==null||s.call(i,r)}return{contentStyles:n,updateLocation:i}}function Rk(){}function Ik(e,t){const n=om(e);return t?n.x+=parseFloat(e.style.right||0):n.x-=parseFloat(e.style.left||0),n.y-=parseFloat(e.style.top||0),n}function Dk(e,t,n){(Array.isArray(e.target.value)||dI(e.target.value))&&Object.assign(n.value,{position:"fixed",top:0,[e.isRtl.value?"right":"left"]:0});const{preferredAnchor:a,preferredOrigin:r}=sm(()=>{const g=Hf(t.location,e.isRtl.value),p=t.origin==="overlap"?g:t.origin==="auto"?Cd(g):Hf(t.origin,e.isRtl.value);return g.side===p.side&&g.align===Ad(p).align?{preferredAnchor:ep(g),preferredOrigin:ep(p)}:{preferredAnchor:g,preferredOrigin:p}}),[s,o,l,u]=["minWidth","minHeight","maxWidth","maxHeight"].map(g=>A(()=>{const p=parseFloat(t[g]);return isNaN(p)?1/0:p})),c=A(()=>{if(Array.isArray(t.offset))return t.offset;if(typeof t.offset=="string"){const g=t.offset.split(" ").map(parseFloat);return g.length<2&&g.push(0),g}return typeof t.offset=="number"?[t.offset,0]:[0,0]});let d=!1;const f=new ResizeObserver(()=>{d&&h()});Te([e.target,e.contentEl],(g,p)=>{let[m,v]=g,[_,M]=p;_&&!Array.isArray(_)&&f.unobserve(_),m&&!Array.isArray(m)&&f.observe(m),M&&f.unobserve(M),v&&f.observe(v)},{immediate:!0}),Sn(()=>{f.disconnect()});function h(){if(d=!1,requestAnimationFrame(()=>d=!0),!e.target.value||!e.contentEl.value)return;const g=db(e.target.value),p=Ik(e.contentEl.value,e.isRtl.value),m=Ou(e.contentEl.value),v=12;m.length||(m.push(document.documentElement),e.contentEl.value.style.top&&e.contentEl.value.style.left||(p.x-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-x")||0),p.y-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-y")||0)));const _=m.reduce((E,R)=>{const L=R.getBoundingClientRect(),O=new Pr({x:R===document.documentElement?0:L.x,y:R===document.documentElement?0:L.y,width:R.clientWidth,height:R.clientHeight});return E?new Pr({x:Math.max(E.left,O.left),y:Math.max(E.top,O.top),width:Math.min(E.right,O.right)-Math.max(E.left,O.left),height:Math.min(E.bottom,O.bottom)-Math.max(E.top,O.top)}):O},void 0);_.x+=v,_.y+=v,_.width-=v*2,_.height-=v*2;let M={anchor:a.value,origin:r.value};function x(E){const R=new Pr(p),L=Ip(E.anchor,g),O=Ip(E.origin,R);let{x:G,y:U}=Ck(L,O);switch(E.anchor.side){case"top":U-=c.value[0];break;case"bottom":U+=c.value[0];break;case"left":G-=c.value[0];break;case"right":G+=c.value[0];break}switch(E.anchor.align){case"top":U-=c.value[1];break;case"bottom":U+=c.value[1];break;case"left":G-=c.value[1];break;case"right":G+=c.value[1];break}return R.x+=G,R.y+=U,R.width=Math.min(R.width,l.value),R.height=Math.min(R.height,u.value),{overflows:np(R,_),x:G,y:U}}let C=0,T=0;const P={x:0,y:0},w={x:!1,y:!1};let b=-1;for(;!(b++>10);){const{x:E,y:R,overflows:L}=x(M);C+=E,T+=R,p.x+=E,p.y+=R;{const O=tp(M.anchor),G=L.x.before||L.x.after,U=L.y.before||L.y.after;let j=!1;if(["x","y"].forEach(B=>{if(B==="x"&&G&&!w.x||B==="y"&&U&&!w.y){const X={anchor:{...M.anchor},origin:{...M.origin}},W=B==="x"?O==="y"?Ad:Cd:O==="y"?Cd:Ad;X.anchor=W(X.anchor),X.origin=W(X.origin);const{overflows:H}=x(X);(H[B].before<=L[B].before&&H[B].after<=L[B].after||H[B].before+H[B].after<(L[B].before+L[B].after)/2)&&(M=X,j=w[B]=!0)}}),j)continue}L.x.before&&(C+=L.x.before,p.x+=L.x.before),L.x.after&&(C-=L.x.after,p.x-=L.x.after),L.y.before&&(T+=L.y.before,p.y+=L.y.before),L.y.after&&(T-=L.y.after,p.y-=L.y.after);{const O=np(p,_);P.x=_.width-O.x.before-O.x.after,P.y=_.height-O.y.before-O.y.after,C+=O.x.before,p.x+=O.x.before,T+=O.y.before,p.y+=O.y.before}break}const S=tp(M.anchor);return Object.assign(n.value,{"--v-overlay-anchor-origin":`${M.anchor.side} ${M.anchor.align}`,transformOrigin:`${M.origin.side} ${M.origin.align}`,top:Re(Ld(T)),left:e.isRtl.value?void 0:Re(Ld(C)),right:e.isRtl.value?Re(Ld(-C)):void 0,minWidth:Re(S==="y"?Math.min(s.value,g.width):s.value),maxWidth:Re(Dp(qt(P.x,s.value===1/0?0:s.value,l.value))),maxHeight:Re(Dp(qt(P.y,o.value===1/0?0:o.value,u.value)))}),{available:P,contentBox:p}}return Te(()=>[a.value,r.value,t.offset,t.minWidth,t.minHeight,t.maxWidth,t.maxHeight],()=>h()),ft(()=>{const g=h();if(!g)return;const{available:p,contentBox:m}=g;m.height>p.y&&requestAnimationFrame(()=>{h(),requestAnimationFrame(()=>{h()})})}),{updateLocation:h}}function Ld(e){return Math.round(e*devicePixelRatio)/devicePixelRatio}function Dp(e){return Math.ceil(e*devicePixelRatio)/devicePixelRatio}let ih=!0;const zu=[];function Lk(e){!ih||zu.length?(zu.push(e),ah()):(ih=!1,e(),ah())}let Lp=-1;function ah(){cancelAnimationFrame(Lp),Lp=requestAnimationFrame(()=>{const e=zu.shift();e&&e(),zu.length?ah():ih=!0})}const yu={none:null,close:Fk,block:Nk,reposition:Ok},kk=Y({scrollStrategy:{type:[String,Function],default:"block",validator:e=>typeof e=="function"||e in yu}},"VOverlay-scroll-strategies");function Vk(e,t){if(!mt)return;let n;Bt(async()=>{n==null||n.stop(),t.isActive.value&&e.scrollStrategy&&(n=wh(),await new Promise(i=>setTimeout(i)),n.active&&n.run(()=>{var i;typeof e.scrollStrategy=="function"?e.scrollStrategy(t,e,n):(i=yu[e.scrollStrategy])==null||i.call(yu,t,e,n)}))}),Sn(()=>{n==null||n.stop()})}function Fk(e){function t(n){e.isActive.value=!1}D0(e.targetEl.value??e.contentEl.value,t)}function Nk(e,t){var s;const n=(s=e.root.value)==null?void 0:s.offsetParent,i=[...new Set([...Ou(e.targetEl.value,t.contained?n:void 0),...Ou(e.contentEl.value,t.contained?n:void 0)])].filter(o=>!o.classList.contains("v-overlay-scroll-blocked")),a=window.innerWidth-document.documentElement.offsetWidth,r=(o=>fm(o)&&o)(n||document.documentElement);r&&e.root.value.classList.add("v-overlay--scroll-blocked"),i.forEach((o,l)=>{o.style.setProperty("--v-body-scroll-x",Re(-o.scrollLeft)),o.style.setProperty("--v-body-scroll-y",Re(-o.scrollTop)),o!==document.documentElement&&o.style.setProperty("--v-scrollbar-offset",Re(a)),o.classList.add("v-overlay-scroll-blocked")}),Sn(()=>{i.forEach((o,l)=>{const u=parseFloat(o.style.getPropertyValue("--v-body-scroll-x")),c=parseFloat(o.style.getPropertyValue("--v-body-scroll-y")),d=o.style.scrollBehavior;o.style.scrollBehavior="auto",o.style.removeProperty("--v-body-scroll-x"),o.style.removeProperty("--v-body-scroll-y"),o.style.removeProperty("--v-scrollbar-offset"),o.classList.remove("v-overlay-scroll-blocked"),o.scrollLeft=-u,o.scrollTop=-c,o.style.scrollBehavior=d}),r&&e.root.value.classList.remove("v-overlay--scroll-blocked")})}function Ok(e,t,n){let i=!1,a=-1,r=-1;function s(o){Lk(()=>{var c,d;const l=performance.now();(d=(c=e.updateLocation).value)==null||d.call(c,o),i=(performance.now()-l)/(1e3/60)>2})}r=(typeof requestIdleCallback>"u"?o=>o():requestIdleCallback)(()=>{n.run(()=>{D0(e.targetEl.value??e.contentEl.value,o=>{i?(cancelAnimationFrame(a),a=requestAnimationFrame(()=>{a=requestAnimationFrame(()=>{s(o)})})):s(o)})})}),Sn(()=>{typeof cancelIdleCallback<"u"&&cancelIdleCallback(r),cancelAnimationFrame(a)})}function D0(e,t){const n=[document,...Ou(e)];n.forEach(i=>{i.addEventListener("scroll",t,{passive:!0})}),Sn(()=>{n.forEach(i=>{i.removeEventListener("scroll",t)})})}const rh=Symbol.for("vuetify:v-menu"),Cm=Y({closeDelay:[Number,String],openDelay:[Number,String]},"delay");function Am(e,t){let n=()=>{};function i(s){n==null||n();const o=Number(s?e.openDelay:e.closeDelay);return new Promise(l=>{n=PR(o,()=>{t==null||t(s),l(s)})})}function a(){return i(!0)}function r(){return i(!1)}return{clearDelay:n,runOpenDelay:a,runCloseDelay:r}}const Uk=Y({target:[String,Object],activator:[String,Object],activatorProps:{type:Object,default:()=>({})},openOnClick:{type:Boolean,default:void 0},openOnHover:Boolean,openOnFocus:{type:Boolean,default:void 0},closeOnContentClick:Boolean,...Cm()},"VOverlay-activator");function Bk(e,t){let{isActive:n,isTop:i,contentEl:a}=t;const r=Ht("useActivator"),s=_e();let o=!1,l=!1,u=!0;const c=A(()=>e.openOnFocus||e.openOnFocus==null&&e.openOnHover),d=A(()=>e.openOnClick||e.openOnClick==null&&!e.openOnHover&&!c.value),{runOpenDelay:f,runCloseDelay:h}=Am(e,w=>{w===(e.openOnHover&&o||c.value&&l)&&!(e.openOnHover&&n.value&&!i.value)&&(n.value!==w&&(u=!0),n.value=w)}),g=_e(),p={onClick:w=>{w.stopPropagation(),s.value=w.currentTarget||w.target,n.value||(g.value=[w.clientX,w.clientY]),n.value=!n.value},onMouseenter:w=>{var b;(b=w.sourceCapabilities)!=null&&b.firesTouchEvents||(o=!0,s.value=w.currentTarget||w.target,f())},onMouseleave:w=>{o=!1,h()},onFocus:w=>{Gs(w.target,":focus-visible")!==!1&&(l=!0,w.stopPropagation(),s.value=w.currentTarget||w.target,f())},onBlur:w=>{l=!1,w.stopPropagation(),h()}},m=A(()=>{const w={};return d.value&&(w.onClick=p.onClick),e.openOnHover&&(w.onMouseenter=p.onMouseenter,w.onMouseleave=p.onMouseleave),c.value&&(w.onFocus=p.onFocus,w.onBlur=p.onBlur),w}),v=A(()=>{const w={};if(e.openOnHover&&(w.onMouseenter=()=>{o=!0,f()},w.onMouseleave=()=>{o=!1,h()}),c.value&&(w.onFocusin=()=>{l=!0,f()},w.onFocusout=()=>{l=!1,h()}),e.closeOnContentClick){const b=ot(rh,null);w.onClick=()=>{n.value=!1,b==null||b.closeParents()}}return w}),_=A(()=>{const w={};return e.openOnHover&&(w.onMouseenter=()=>{u&&(o=!0,u=!1,f())},w.onMouseleave=()=>{o=!1,h()}),w});Te(i,w=>{var b;w&&(e.openOnHover&&!o&&(!c.value||!l)||c.value&&!l&&(!e.openOnHover||!o))&&!((b=a.value)!=null&&b.contains(document.activeElement))&&(n.value=!1)}),Te(n,w=>{w||setTimeout(()=>{g.value=void 0})},{flush:"post"});const M=Fu();Bt(()=>{M.value&&ft(()=>{s.value=M.el})});const x=Fu(),C=A(()=>e.target==="cursor"&&g.value?g.value:x.value?x.el:L0(e.target,r)||s.value),T=A(()=>Array.isArray(C.value)?void 0:C.value);let P;return Te(()=>!!e.activator,w=>{w&&mt?(P=wh(),P.run(()=>{zk(e,r,{activatorEl:s,activatorEvents:m})})):P&&P.stop()},{flush:"post",immediate:!0}),Sn(()=>{P==null||P.stop()}),{activatorEl:s,activatorRef:M,target:C,targetEl:T,targetRef:x,activatorEvents:m,contentEvents:v,scrimEvents:_}}function zk(e,t,n){let{activatorEl:i,activatorEvents:a}=n;Te(()=>e.activator,(l,u)=>{if(u&&l!==u){const c=o(u);c&&s(c)}l&&ft(()=>r())},{immediate:!0}),Te(()=>e.activatorProps,()=>{r()}),Sn(()=>{s()});function r(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:o(),u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.activatorProps;l&&DR(l,ge(a.value,u))}function s(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:o(),u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.activatorProps;l&&LR(l,ge(a.value,u))}function o(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activator;const u=L0(l,t);return i.value=(u==null?void 0:u.nodeType)===Node.ELEMENT_NODE?u:void 0,i.value}}function L0(e,t){var i,a;if(!e)return;let n;if(e==="parent"){let r=(a=(i=t==null?void 0:t.proxy)==null?void 0:i.$el)==null?void 0:a.parentNode;for(;r!=null&&r.hasAttribute("data-no-activator");)r=r.parentNode;n=r}else typeof e=="string"?n=document.querySelector(e):"$el"in e?n=e.$el:n=e;return n}function k0(){if(!mt)return Me(!1);const{ssr:e}=gi();if(e){const t=Me(!1);return Zt(()=>{t.value=!0}),t}else return Me(!0)}const Pm=Y({eager:Boolean},"lazy");function Rm(e,t){const n=Me(!1),i=A(()=>n.value||e.eager||t.value);Te(t,()=>n.value=!0);function a(){e.eager||(n.value=!1)}return{isBooted:n,hasContent:i,onAfterLeave:a}}function ns(){const t=Ht("useScopeId").vnode.scopeId;return{scopeId:t?{[t]:""}:void 0}}const kp=Symbol.for("vuetify:stack"),go=_n([]);function Hk(e,t,n){const i=Ht("useStack"),a=!n,r=ot(kp,void 0),s=_n({activeChildren:new Set});Rt(kp,s);const o=Me(Number(t.value));zn(e,()=>{var d;const c=(d=go.at(-1))==null?void 0:d[1];o.value=c?c+10:Number(t.value),a&&go.push([i.uid,o.value]),r==null||r.activeChildren.add(i.uid),Sn(()=>{if(a){const f=Ye(go).findIndex(h=>h[0]===i.uid);go.splice(f,1)}r==null||r.activeChildren.delete(i.uid)})});const l=Me(!0);a&&Bt(()=>{var d;const c=((d=go.at(-1))==null?void 0:d[0])===i.uid;setTimeout(()=>l.value=c)});const u=A(()=>!s.activeChildren.size);return{globalTop:jo(l),localTop:u,stackStyles:A(()=>({zIndex:o.value}))}}function Gk(e){return{teleportTarget:A(()=>{const n=e();if(n===!0||!mt)return;const i=n===!1?document.body:typeof n=="string"?document.querySelector(n):n;if(i==null)return;let a=[...i.children].find(r=>r.matches(".v-overlay-container"));return a||(a=document.createElement("div"),a.className="v-overlay-container",i.appendChild(a)),a})}}function Wk(){return!0}function V0(e,t,n){if(!e||F0(e,n)===!1)return!1;const i=Mb(t);if(typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&i.host===e.target)return!1;const a=(typeof n.value=="object"&&n.value.include||(()=>[]))();return a.push(t),!a.some(r=>r==null?void 0:r.contains(e.target))}function F0(e,t){return(typeof t.value=="object"&&t.value.closeConditional||Wk)(e)}function $k(e,t,n){const i=typeof n.value=="function"?n.value:n.value.handler;e.shadowTarget=e.target,t._clickOutside.lastMousedownWasOutside&&V0(e,t,n)&&setTimeout(()=>{F0(e,n)&&i&&i(e)},0)}function Vp(e,t){const n=Mb(e);t(document),typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&t(n)}const N0={mounted(e,t){const n=a=>$k(a,e,t),i=a=>{e._clickOutside.lastMousedownWasOutside=V0(a,e,t)};Vp(e,a=>{a.addEventListener("click",n,!0),a.addEventListener("mousedown",i,!0)}),e._clickOutside||(e._clickOutside={lastMousedownWasOutside:!1}),e._clickOutside[t.instance.$.uid]={onClick:n,onMousedown:i}},beforeUnmount(e,t){e._clickOutside&&(Vp(e,n=>{var r;if(!n||!((r=e._clickOutside)!=null&&r[t.instance.$.uid]))return;const{onClick:i,onMousedown:a}=e._clickOutside[t.instance.$.uid];n.removeEventListener("click",i,!0),n.removeEventListener("mousedown",a,!0)}),delete e._clickOutside[t.instance.$.uid])}};function Xk(e){const{modelValue:t,color:n,...i}=e;return y(da,{name:"fade-transition",appear:!0},{default:()=>[e.modelValue&&y("div",ge({class:["v-overlay__scrim",e.color.backgroundColorClasses.value],style:e.color.backgroundColorStyles.value},i),null)]})}const gl=Y({absolute:Boolean,attach:[Boolean,String,Object],closeOnBack:{type:Boolean,default:!0},contained:Boolean,contentClass:null,contentProps:null,disabled:Boolean,opacity:[Number,String],noClickAnimation:Boolean,modelValue:Boolean,persistent:Boolean,scrim:{type:[Boolean,String],default:!0},zIndex:{type:[Number,String],default:2e3},...Uk(),...Ie(),...Qt(),...Pm(),...Ak(),...kk(),...dt(),...Di()},"VOverlay"),zi=de()({name:"VOverlay",directives:{ClickOutside:N0},inheritAttrs:!1,props:{_disableGlobalStack:Boolean,...gl()},emits:{"click:outside":e=>!0,"update:modelValue":e=>!0,keydown:e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(e,t){let{slots:n,attrs:i,emit:a}=t;const r=Ht("VOverlay"),s=_e(),o=_e(),l=_e(),u=He(e,"modelValue"),c=A({get:()=>u.value,set:Q=>{Q&&e.disabled||(u.value=Q)}}),{themeClasses:d}=pt(e),{rtlClasses:f,isRtl:h}=rn(),{hasContent:g,onAfterLeave:p}=Rm(e,c),m=wt(A(()=>typeof e.scrim=="string"?e.scrim:null)),{globalTop:v,localTop:_,stackStyles:M}=Hk(c,se(e,"zIndex"),e._disableGlobalStack),{activatorEl:x,activatorRef:C,target:T,targetEl:P,targetRef:w,activatorEvents:b,contentEvents:S,scrimEvents:E}=Bk(e,{isActive:c,isTop:_,contentEl:l}),{teleportTarget:R}=Gk(()=>{var Ge,Ae,be;const Q=e.attach||e.contained;if(Q)return Q;const ve=((Ge=x==null?void 0:x.value)==null?void 0:Ge.getRootNode())||((be=(Ae=r.proxy)==null?void 0:Ae.$el)==null?void 0:be.getRootNode());return ve instanceof ShadowRoot?ve:!1}),{dimensionStyles:L}=en(e),O=k0(),{scopeId:G}=ns();Te(()=>e.disabled,Q=>{Q&&(c.value=!1)});const{contentStyles:U,updateLocation:j}=Pk(e,{isRtl:h,contentEl:l,target:T,isActive:c});Vk(e,{root:s,contentEl:l,targetEl:P,isActive:c,updateLocation:j});function B(Q){a("click:outside",Q),e.persistent?$():c.value=!1}function X(Q){return c.value&&v.value&&(!e.scrim||Q.target===o.value||Q instanceof MouseEvent&&Q.shadowTarget===o.value)}mt&&Te(c,Q=>{Q?window.addEventListener("keydown",W):window.removeEventListener("keydown",W)},{immediate:!0}),dn(()=>{mt&&window.removeEventListener("keydown",W)});function W(Q){var ve,Ge,Ae;Q.key==="Escape"&&v.value&&((ve=l.value)!=null&&ve.contains(document.activeElement)||a("keydown",Q),e.persistent?$():(c.value=!1,(Ge=l.value)!=null&&Ge.contains(document.activeElement)&&((Ae=x.value)==null||Ae.focus())))}function H(Q){Q.key==="Escape"&&!v.value||a("keydown",Q)}const te=jb();zn(()=>e.closeOnBack,()=>{AL(te,Q=>{v.value&&c.value?(Q(!1),e.persistent?$():c.value=!1):Q()})});const Se=_e();Te(()=>c.value&&(e.absolute||e.contained)&&R.value==null,Q=>{if(Q){const ve=dm(s.value);ve&&ve!==document.scrollingElement&&(Se.value=ve.scrollTop)}});function $(){e.noClickAnimation||l.value&&Mr(l.value,[{transformOrigin:"center"},{transform:"scale(1.03)"},{transformOrigin:"center"}],{duration:150,easing:Oo})}function he(){a("afterEnter")}function ae(){p(),a("afterLeave")}return pe(()=>{var Q;return y(Ne,null,[(Q=n.activator)==null?void 0:Q.call(n,{isActive:c.value,targetRef:w,props:ge({ref:C},b.value,e.activatorProps)}),O.value&&g.value&&y(oM,{disabled:!R.value,to:R.value},{default:()=>[y("div",ge({class:["v-overlay",{"v-overlay--absolute":e.absolute||e.contained,"v-overlay--active":c.value,"v-overlay--contained":e.contained},d.value,f.value,e.class],style:[M.value,{"--v-overlay-opacity":e.opacity,top:Re(Se.value)},e.style],ref:s,onKeydown:H},G,i),[y(Xk,ge({color:m,modelValue:c.value&&!!e.scrim,ref:o},E.value),null),y(Pn,{appear:!0,persisted:!0,transition:e.transition,target:T.value,onAfterEnter:he,onAfterLeave:ae},{default:()=>{var ve;return[kt(y("div",ge({ref:l,class:["v-overlay__content",e.contentClass],style:[L.value,U.value]},S.value,e.contentProps),[(ve=n.default)==null?void 0:ve.call(n,{isActive:c})]),[[vi,c.value],[ni("click-outside"),{handler:B,closeConditional:X,include:()=>[x.value]}]])]}})])]})])}),{activatorEl:x,scrimEl:o,target:T,animateClick:$,contentEl:l,globalTop:v,localTop:_,updateLocation:j}}}),kd=Symbol("Forwarded refs");function Vd(e,t){let n=e;for(;n;){const i=Reflect.getOwnPropertyDescriptor(n,t);if(i)return i;n=Object.getPrototypeOf(n)}}function yi(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return e[kd]=n,new Proxy(e,{get(a,r){if(Reflect.has(a,r))return Reflect.get(a,r);if(!(typeof r=="symbol"||r.startsWith("$")||r.startsWith("__"))){for(const s of n)if(s.value&&Reflect.has(s.value,r)){const o=Reflect.get(s.value,r);return typeof o=="function"?o.bind(s.value):o}}},has(a,r){if(Reflect.has(a,r))return!0;if(typeof r=="symbol"||r.startsWith("$")||r.startsWith("__"))return!1;for(const s of n)if(s.value&&Reflect.has(s.value,r))return!0;return!1},set(a,r,s){if(Reflect.has(a,r))return Reflect.set(a,r,s);if(typeof r=="symbol"||r.startsWith("$")||r.startsWith("__"))return!1;for(const o of n)if(o.value&&Reflect.has(o.value,r))return Reflect.set(o.value,r,s);return!1},getOwnPropertyDescriptor(a,r){var o;const s=Reflect.getOwnPropertyDescriptor(a,r);if(s)return s;if(!(typeof r=="symbol"||r.startsWith("$")||r.startsWith("__"))){for(const l of n){if(!l.value)continue;const u=Vd(l.value,r)??("_"in l.value?Vd((o=l.value._)==null?void 0:o.setupState,r):void 0);if(u)return u}for(const l of n){const u=l.value&&l.value[kd];if(!u)continue;const c=u.slice();for(;c.length;){const d=c.shift(),f=Vd(d.value,r);if(f)return f;const h=d.value&&d.value[kd];h&&c.push(...h)}}}}})}const O0=Y({id:String,submenu:Boolean,...Kt(gl({closeDelay:250,closeOnContentClick:!0,locationStrategy:"connected",location:void 0,openDelay:300,scrim:!1,scrollStrategy:"reposition",transition:{component:uc}}),["absolute"])},"VMenu"),qs=de()({name:"VMenu",props:O0(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const i=He(e,"modelValue"),{scopeId:a}=ns(),{isRtl:r}=rn(),s=gn(),o=A(()=>e.id||`v-menu-${s}`),l=_e(),u=ot(rh,null),c=Me(new Set);Rt(rh,{register(){c.value.add(s)},unregister(){c.value.delete(s)},closeParents(m){setTimeout(()=>{var v;!c.value.size&&!e.persistent&&(m==null||(v=l.value)!=null&&v.contentEl&&!RR(m,l.value.contentEl))&&(i.value=!1,u==null||u.closeParents())},40)}}),dn(()=>{u==null||u.unregister(),document.removeEventListener("focusin",d)}),Vh(()=>i.value=!1);async function d(m){var M,x,C;const v=m.relatedTarget,_=m.target;await ft(),i.value&&v!==_&&((M=l.value)!=null&&M.contentEl)&&((x=l.value)!=null&&x.globalTop)&&![document,l.value.contentEl].includes(_)&&!l.value.contentEl.contains(_)&&((C=No(l.value.contentEl)[0])==null||C.focus())}Te(i,m=>{m?(u==null||u.register(),mt&&document.addEventListener("focusin",d,{once:!0})):(u==null||u.unregister(),mt&&document.removeEventListener("focusin",d))},{immediate:!0});function f(m){u==null||u.closeParents(m)}function h(m){var v,_,M,x,C;if(!e.disabled)if(m.key==="Tab"||m.key==="Enter"&&!e.closeOnContentClick){if(m.key==="Enter"&&(m.target instanceof HTMLTextAreaElement||m.target instanceof HTMLInputElement&&m.target.closest("form")))return;m.key==="Enter"&&m.preventDefault(),ob(No((v=l.value)==null?void 0:v.contentEl,!1),m.shiftKey?"prev":"next",P=>P.tabIndex>=0)||(i.value=!1,(M=(_=l.value)==null?void 0:_.activatorEl)==null||M.focus())}else e.submenu&&m.key===(r.value?"ArrowRight":"ArrowLeft")&&(i.value=!1,(C=(x=l.value)==null?void 0:x.activatorEl)==null||C.focus())}function g(m){var _;if(e.disabled)return;const v=(_=l.value)==null?void 0:_.contentEl;v&&i.value?m.key==="ArrowDown"?(m.preventDefault(),m.stopImmediatePropagation(),Ar(v,"next")):m.key==="ArrowUp"?(m.preventDefault(),m.stopImmediatePropagation(),Ar(v,"prev")):e.submenu&&(m.key===(r.value?"ArrowRight":"ArrowLeft")?i.value=!1:m.key===(r.value?"ArrowLeft":"ArrowRight")&&(m.preventDefault(),Ar(v,"first"))):(e.submenu?m.key===(r.value?"ArrowLeft":"ArrowRight"):["ArrowDown","ArrowUp"].includes(m.key))&&(i.value=!0,m.preventDefault(),setTimeout(()=>setTimeout(()=>g(m))))}const p=A(()=>ge({"aria-haspopup":"menu","aria-expanded":String(i.value),"aria-controls":o.value,onKeydown:g},e.activatorProps));return pe(()=>{const m=zi.filterProps(e);return y(zi,ge({ref:l,id:o.value,class:["v-menu",e.class],style:e.style},m,{modelValue:i.value,"onUpdate:modelValue":v=>i.value=v,absolute:!0,activatorProps:p.value,location:e.location??(e.submenu?"end":"bottom"),"onClick:outside":f,onKeydown:h},a),{activator:n.activator,default:function(){for(var v=arguments.length,_=new Array(v),M=0;M<v;M++)_[M]=arguments[M];return y(rt,{root:"VMenu"},{default:()=>{var x;return[(x=n.default)==null?void 0:x.call(n,..._)]}})}})}),yi({id:o,ΨopenChildren:c},l)}}),Yk=Y({active:Boolean,disabled:Boolean,max:[Number,String],value:{type:[Number,String],default:0},...Ie(),...Di({transition:{component:ym}})},"VCounter"),yc=de()({name:"VCounter",functional:!0,props:Yk(),setup(e,t){let{slots:n}=t;const i=A(()=>e.max?`${e.value} / ${e.max}`:String(e.value));return pe(()=>y(Pn,{transition:e.transition},{default:()=>[kt(y("div",{class:["v-counter",{"text-error":e.max&&!e.disabled&&parseFloat(e.value)>parseFloat(e.max)},e.class],style:e.style},[n.default?n.default({counter:i.value,max:e.max,value:e.value}):i.value]),[[vi,e.active]])]})),{}}}),qk=Y({floating:Boolean,...Ie()},"VFieldLabel"),bo=de()({name:"VFieldLabel",props:qk(),setup(e,t){let{slots:n}=t;return pe(()=>y(no,{class:["v-field-label",{"v-field-label--floating":e.floating},e.class],style:e.style,"aria-hidden":e.floating||void 0},n)),{}}}),jk=["underlined","outlined","filled","solo","solo-inverted","solo-filled","plain"],pl=Y({appendInnerIcon:We,bgColor:String,clearable:Boolean,clearIcon:{type:We,default:"$clear"},active:Boolean,centerAffix:{type:Boolean,default:void 0},color:String,baseColor:String,dirty:Boolean,disabled:{type:Boolean,default:null},error:Boolean,flat:Boolean,label:String,persistentClear:Boolean,prependInnerIcon:We,reverse:Boolean,singleLine:Boolean,variant:{type:String,default:"filled",validator:e=>jk.includes(e)},"onClick:clear":vn(),"onClick:appendInner":vn(),"onClick:prependInner":vn(),...Ie(),...hc(),...Vt(),...dt()},"VField"),$a=de()({name:"VField",inheritAttrs:!1,props:{id:String,...ml(),...pl()},emits:{"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:n,emit:i,slots:a}=t;const{themeClasses:r}=pt(e),{loaderClasses:s}=cl(e),{focusClasses:o,isFocused:l,focus:u,blur:c}=Sa(e),{InputIcon:d}=l0(e),{roundedClasses:f}=Gt(e),{rtlClasses:h}=rn(),g=A(()=>e.dirty||e.active),p=A(()=>!!(e.label||a.label)),m=A(()=>!e.singleLine&&p.value),v=gn(),_=A(()=>e.id||`input-${v}`),M=A(()=>`${_.value}-messages`),x=_e(),C=_e(),T=_e(),P=A(()=>["plain","underlined"].includes(e.variant)),{backgroundColorClasses:w,backgroundColorStyles:b}=wt(se(e,"bgColor")),{textColorClasses:S,textColorStyles:E}=bn(A(()=>e.error||e.disabled?void 0:g.value&&l.value?e.color:e.baseColor));Te(g,O=>{if(m.value){const G=x.value.$el,U=C.value.$el;requestAnimationFrame(()=>{const j=om(G),B=U.getBoundingClientRect(),X=B.x-j.x,W=B.y-j.y-(j.height/2-B.height/2),H=B.width/.75,te=Math.abs(H-j.width)>1?{maxWidth:Re(H)}:void 0,Se=getComputedStyle(G),$=getComputedStyle(U),he=parseFloat(Se.transitionDuration)*1e3||150,ae=parseFloat($.getPropertyValue("--v-field-label-scale")),Q=$.getPropertyValue("color");G.style.visibility="visible",U.style.visibility="hidden",Mr(G,{transform:`translate(${X}px, ${W}px) scale(${ae})`,color:Q,...te},{duration:he,easing:Oo,direction:O?"normal":"reverse"}).finished.then(()=>{G.style.removeProperty("visibility"),U.style.removeProperty("visibility")})})}},{flush:"post"});const R=A(()=>({isActive:g,isFocused:l,controlRef:T,blur:c,focus:u}));function L(O){O.target!==document.activeElement&&O.preventDefault()}return pe(()=>{var X,W,H;const O=e.variant==="outlined",G=!!(a["prepend-inner"]||e.prependInnerIcon),U=!!(e.clearable||a.clear)&&!e.disabled,j=!!(a["append-inner"]||e.appendInnerIcon||U),B=()=>a.label?a.label({...R.value,label:e.label,props:{for:_.value}}):e.label;return y("div",ge({class:["v-field",{"v-field--active":g.value,"v-field--appended":j,"v-field--center-affix":e.centerAffix??!P.value,"v-field--disabled":e.disabled,"v-field--dirty":e.dirty,"v-field--error":e.error,"v-field--flat":e.flat,"v-field--has-background":!!e.bgColor,"v-field--persistent-clear":e.persistentClear,"v-field--prepended":G,"v-field--reverse":e.reverse,"v-field--single-line":e.singleLine,"v-field--no-label":!B(),[`v-field--variant-${e.variant}`]:!0},r.value,w.value,o.value,s.value,f.value,h.value,e.class],style:[b.value,e.style],onClick:L},n),[y("div",{class:"v-field__overlay"},null),y(dl,{name:"v-field",active:!!e.loading,color:e.error?"error":typeof e.loading=="string"?e.loading:e.color},{default:a.loader}),G&&y("div",{key:"prepend",class:"v-field__prepend-inner"},[e.prependInnerIcon&&y(d,{key:"prepend-icon",name:"prependInner"},null),(X=a["prepend-inner"])==null?void 0:X.call(a,R.value)]),y("div",{class:"v-field__field","data-no-activator":""},[["filled","solo","solo-inverted","solo-filled"].includes(e.variant)&&m.value&&y(bo,{key:"floating-label",ref:C,class:[S.value],floating:!0,for:_.value,style:E.value},{default:()=>[B()]}),p.value&&y(bo,{key:"label",ref:x,for:_.value},{default:()=>[B()]}),(W=a.default)==null?void 0:W.call(a,{...R.value,props:{id:_.value,class:"v-field__input","aria-describedby":M.value},focus:u,blur:c})]),U&&y(_m,{key:"clear"},{default:()=>[kt(y("div",{class:"v-field__clearable",onMousedown:te=>{te.preventDefault(),te.stopPropagation()}},[y(rt,{defaults:{VIcon:{icon:e.clearIcon}}},{default:()=>[a.clear?a.clear({...R.value,props:{onFocus:u,onBlur:c,onClick:e["onClick:clear"]}}):y(d,{name:"clear",onFocus:u,onBlur:c},null)]})]),[[vi,e.dirty]])]}),j&&y("div",{key:"append",class:"v-field__append-inner"},[(H=a["append-inner"])==null?void 0:H.call(a,R.value),e.appendInnerIcon&&y(d,{key:"append-icon",name:"appendInner"},null)]),y("div",{class:["v-field__outline",S.value],style:E.value},[O&&y(Ne,null,[y("div",{class:"v-field__outline__start"},null),m.value&&y("div",{class:"v-field__outline__notch"},[y(bo,{ref:C,floating:!0,for:_.value},{default:()=>[B()]})]),y("div",{class:"v-field__outline__end"},null)]),P.value&&m.value&&y(bo,{ref:C,floating:!0,for:_.value},{default:()=>[B()]})])])}),{controlRef:T}}}),Kk=["color","file","time","date","datetime-local","week","month"],_c=Y({autofocus:Boolean,counter:[Boolean,Number,String],counterValue:[Number,Function],prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,suffix:String,role:String,type:{type:String,default:"text"},modelModifiers:Object,...Ma(),...pl()},"VTextField"),Nr=de()({name:"VTextField",directives:{Intersect:ul},inheritAttrs:!1,props:_c(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:n,emit:i,slots:a}=t;const r=He(e,"modelValue"),{isFocused:s,focus:o,blur:l}=Sa(e),u=A(()=>typeof e.counterValue=="function"?e.counterValue(r.value):typeof e.counterValue=="number"?e.counterValue:(r.value??"").toString().length),c=A(()=>{if(n.maxlength)return n.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter}),d=A(()=>["plain","underlined"].includes(e.variant));function f(T,P){var w,b;!e.autofocus||!T||(b=(w=P[0].target)==null?void 0:w.focus)==null||b.call(w)}const h=_e(),g=_e(),p=_e(),m=A(()=>Kk.includes(e.type)||e.persistentPlaceholder||s.value||e.active);function v(){var T;p.value!==document.activeElement&&((T=p.value)==null||T.focus()),s.value||o()}function _(T){i("mousedown:control",T),T.target!==p.value&&(v(),T.preventDefault())}function M(T){v(),i("click:control",T)}function x(T){T.stopPropagation(),v(),ft(()=>{r.value=null,ic(e["onClick:clear"],T)})}function C(T){var w;const P=T.target;if(r.value=P.value,(w=e.modelModifiers)!=null&&w.trim&&["text","search","password","tel","url"].includes(e.type)){const b=[P.selectionStart,P.selectionEnd];ft(()=>{P.selectionStart=b[0],P.selectionEnd=b[1]})}}return pe(()=>{const T=!!(a.counter||e.counter!==!1&&e.counter!=null),P=!!(T||a.details),[w,b]=Za(n),{modelValue:S,...E}=xn.filterProps(e),R=$a.filterProps(e);return y(xn,ge({ref:h,modelValue:r.value,"onUpdate:modelValue":L=>r.value=L,class:["v-text-field",{"v-text-field--prefixed":e.prefix,"v-text-field--suffixed":e.suffix,"v-input--plain-underlined":d.value},e.class],style:e.style},w,E,{centerAffix:!d.value,focused:s.value}),{...a,default:L=>{let{id:O,isDisabled:G,isDirty:U,isReadonly:j,isValid:B}=L;return y($a,ge({ref:g,onMousedown:_,onClick:M,"onClick:clear":x,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"],role:e.role},R,{id:O.value,active:m.value||U.value,dirty:U.value||e.dirty,disabled:G.value,focused:s.value,error:B.value===!1}),{...a,default:X=>{let{props:{class:W,...H}}=X;const te=kt(y("input",ge({ref:p,value:r.value,onInput:C,autofocus:e.autofocus,readonly:j.value,disabled:G.value,name:e.name,placeholder:e.placeholder,size:1,type:e.type,onFocus:v,onBlur:l},H,b),null),[[ni("intersect"),{handler:f},null,{once:!0}]]);return y(Ne,null,[e.prefix&&y("span",{class:"v-text-field__prefix"},[y("span",{class:"v-text-field__prefix__text"},[e.prefix])]),a.default?y("div",{class:W,"data-no-activator":""},[a.default(),te]):ua(te,{class:W}),e.suffix&&y("span",{class:"v-text-field__suffix"},[y("span",{class:"v-text-field__suffix__text"},[e.suffix])])])}})},details:P?L=>{var O;return y(Ne,null,[(O=a.details)==null?void 0:O.call(a,L),T&&y(Ne,null,[y("span",null,null),y(yc,{active:e.persistentCounter||s.value,value:u.value,max:c.value,disabled:e.disabled},a.counter)])])}:void 0})}),yi({},h,g,p)}}),Zk=Y({renderless:Boolean,...Ie()},"VVirtualScrollItem"),U0=de()({name:"VVirtualScrollItem",inheritAttrs:!1,props:Zk(),emits:{"update:height":e=>!0},setup(e,t){let{attrs:n,emit:i,slots:a}=t;const{resizeRef:r,contentRect:s}=Ii(void 0,"border");Te(()=>{var o;return(o=s.value)==null?void 0:o.height},o=>{o!=null&&i("update:height",o)}),pe(()=>{var o,l;return e.renderless?y(Ne,null,[(o=a.default)==null?void 0:o.call(a,{itemRef:r})]):y("div",ge({ref:r,class:["v-virtual-scroll__item",e.class],style:e.style},n),[(l=a.default)==null?void 0:l.call(a)])})}}),Jk=-1,Qk=1,Fd=100,B0=Y({itemHeight:{type:[Number,String],default:null},height:[Number,String]},"virtual");function z0(e,t){const n=gi(),i=Me(0);Bt(()=>{i.value=parseFloat(e.itemHeight||0)});const a=Me(0),r=Me(Math.ceil((parseInt(e.height)||n.height.value)/(i.value||16))||1),s=Me(0),o=Me(0),l=_e(),u=_e();let c=0;const{resizeRef:d,contentRect:f}=Ii();Bt(()=>{d.value=l.value});const h=A(()=>{var W;return l.value===document.documentElement?n.height.value:((W=f.value)==null?void 0:W.height)||parseInt(e.height)||0}),g=A(()=>!!(l.value&&u.value&&h.value&&i.value));let p=Array.from({length:t.value.length}),m=Array.from({length:t.value.length});const v=Me(0);let _=-1;function M(W){return p[W]||i.value}const x=wR(()=>{const W=performance.now();m[0]=0;const H=t.value.length;for(let te=1;te<=H-1;te++)m[te]=(m[te-1]||0)+M(te-1);v.value=Math.max(v.value,performance.now()-W)},v),C=Te(g,W=>{W&&(C(),c=u.value.offsetTop,x.immediate(),U(),~_&&ft(()=>{mt&&window.requestAnimationFrame(()=>{B(_),_=-1})}))});Sn(()=>{x.clear()});function T(W,H){const te=p[W],Se=i.value;i.value=Se?Math.min(i.value,H):H,(te!==H||Se!==i.value)&&(p[W]=H,x())}function P(W){return W=qt(W,0,t.value.length-1),m[W]||0}function w(W){return e2(m,W)}let b=0,S=0,E=0;Te(h,(W,H)=>{H&&(U(),W<H&&requestAnimationFrame(()=>{S=0,U()}))});let R=-1;function L(){if(!l.value||!u.value)return;const W=l.value.scrollTop,H=performance.now();H-E>500?(S=Math.sign(W-b),c=u.value.offsetTop):S=W-b,b=W,E=H,window.clearTimeout(R),R=window.setTimeout(O,500),U()}function O(){!l.value||!u.value||(S=0,E=0,window.clearTimeout(R),U())}let G=-1;function U(){cancelAnimationFrame(G),G=requestAnimationFrame(j)}function j(){if(!l.value||!h.value)return;const W=b-c,H=Math.sign(S),te=Math.max(0,W-Fd),Se=qt(w(te),0,t.value.length),$=W+h.value+Fd,he=qt(w($)+1,Se+1,t.value.length);if((H!==Jk||Se<a.value)&&(H!==Qk||he>r.value)){const ae=P(a.value)-P(Se),Q=P(he)-P(r.value);Math.max(ae,Q)>Fd?(a.value=Se,r.value=he):(Se<=0&&(a.value=Se),he>=t.value.length&&(r.value=he))}s.value=P(a.value),o.value=P(t.value.length)-P(r.value)}function B(W){const H=P(W);!l.value||W&&!H?_=W:l.value.scrollTop=H}const X=A(()=>t.value.slice(a.value,r.value).map((W,H)=>({raw:W,index:H+a.value,key:nc(W)&&"value"in W?W.value:H+a.value})));return Te(t,()=>{p=Array.from({length:t.value.length}),m=Array.from({length:t.value.length}),x.immediate(),U()},{deep:!0}),{calculateVisibleItems:U,containerRef:l,markerRef:u,computedItems:X,paddingTop:s,paddingBottom:o,scrollToIndex:B,handleScroll:L,handleScrollend:O,handleItemResize:T}}function e2(e,t){let n=e.length-1,i=0,a=0,r=null,s=-1;if(e[n]<t)return n;for(;i<=n;)if(a=i+n>>1,r=e[a],r>t)n=a-1;else if(r<t)s=a,i=a+1;else return r===t?a:i;return s}const t2=Y({items:{type:Array,default:()=>[]},renderless:Boolean,...B0(),...Ie(),...Qt()},"VVirtualScroll"),bc=de()({name:"VVirtualScroll",props:t2(),setup(e,t){let{slots:n}=t;const i=Ht("VVirtualScroll"),{dimensionStyles:a}=en(e),{calculateVisibleItems:r,containerRef:s,markerRef:o,handleScroll:l,handleScrollend:u,handleItemResize:c,scrollToIndex:d,paddingTop:f,paddingBottom:h,computedItems:g}=z0(e,se(e,"items"));return zn(()=>e.renderless,()=>{function p(){var _,M;const v=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)?"addEventListener":"removeEventListener";s.value===document.documentElement?(document[v]("scroll",l,{passive:!0}),document[v]("scrollend",u)):((_=s.value)==null||_[v]("scroll",l,{passive:!0}),(M=s.value)==null||M[v]("scrollend",u))}Zt(()=>{s.value=dm(i.vnode.el,!0),p(!0)}),Sn(p)}),pe(()=>{const p=g.value.map(m=>y(U0,{key:m.key,renderless:e.renderless,"onUpdate:height":v=>c(m.index,v)},{default:v=>{var _;return(_=n.default)==null?void 0:_.call(n,{item:m.raw,index:m.index,...v})}}));return e.renderless?y(Ne,null,[y("div",{ref:o,class:"v-virtual-scroll__spacer",style:{paddingTop:Re(f.value)}},null),p,y("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:Re(h.value)}},null)]):y("div",{ref:s,class:["v-virtual-scroll",e.class],onScrollPassive:l,onScrollend:u,style:[a.value,e.style]},[y("div",{ref:o,class:"v-virtual-scroll__container",style:{paddingTop:Re(f.value),paddingBottom:Re(h.value)}},[p])])}),{calculateVisibleItems:r,scrollToIndex:d}}});function Im(e,t){const n=Me(!1);let i;function a(o){cancelAnimationFrame(i),n.value=!0,i=requestAnimationFrame(()=>{i=requestAnimationFrame(()=>{n.value=!1})})}async function r(){await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>{if(n.value){const l=Te(n,()=>{l(),o()})}else o()})}async function s(o){var c,d;if(o.key==="Tab"&&((c=t.value)==null||c.focus()),!["PageDown","PageUp","Home","End"].includes(o.key))return;const l=(d=e.value)==null?void 0:d.$el;if(!l)return;(o.key==="Home"||o.key==="End")&&l.scrollTo({top:o.key==="Home"?0:l.scrollHeight,behavior:"smooth"}),await r();const u=l.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");if(o.key==="PageDown"||o.key==="Home"){const f=l.getBoundingClientRect().top;for(const h of u)if(h.getBoundingClientRect().top>=f){h.focus();break}}else{const f=l.getBoundingClientRect().bottom;for(const h of[...u].reverse())if(h.getBoundingClientRect().bottom<=f){h.focus();break}}}return{onScrollPassive:a,onKeydown:s}}const Dm=Y({chips:Boolean,closableChips:Boolean,closeText:{type:String,default:"$vuetify.close"},openText:{type:String,default:"$vuetify.open"},eager:Boolean,hideNoData:Boolean,hideSelected:Boolean,listProps:{type:Object},menu:Boolean,menuIcon:{type:We,default:"$dropdown"},menuProps:{type:Object},multiple:Boolean,noDataText:{type:String,default:"$vuetify.noDataText"},openOnClear:Boolean,itemColor:String,...A0({itemChildren:!1})},"Select"),n2=Y({...Dm(),...Kt(_c({modelValue:null,role:"combobox"}),["validationValue","dirty","appendInnerIcon"]),...Di({transition:{component:uc}})},"VSelect"),Lm=de()({name:"VSelect",props:n2(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:menu":e=>!0},setup(e,t){let{slots:n}=t;const{t:i}=$t(),a=_e(),r=_e(),s=_e(),o=He(e,"menu"),l=A({get:()=>o.value,set:X=>{var W;o.value&&!X&&((W=r.value)!=null&&W.ΨopenChildren.size)||(o.value=X)}}),{items:u,transformIn:c,transformOut:d}=Tm(e),f=He(e,"modelValue",[],X=>c(X===null?[null]:Nt(X)),X=>{const W=d(X);return e.multiple?W:W[0]??null}),h=A(()=>typeof e.counterValue=="function"?e.counterValue(f.value):typeof e.counterValue=="number"?e.counterValue:f.value.length),g=gc(e),p=A(()=>f.value.map(X=>X.value)),m=Me(!1),v=A(()=>l.value?e.closeText:e.openText);let _="",M;const x=A(()=>e.hideSelected?u.value.filter(X=>!f.value.some(W=>(e.valueComparator||Rn)(W,X))):u.value),C=A(()=>e.hideNoData&&!x.value.length||g.isReadonly.value||g.isDisabled.value),T=A(()=>{var X;return{...e.menuProps,activatorProps:{...((X=e.menuProps)==null?void 0:X.activatorProps)||{},"aria-haspopup":"listbox"}}}),P=_e(),w=Im(P,a);function b(X){e.openOnClear&&(l.value=!0)}function S(){C.value||(l.value=!l.value)}function E(X){Ws(X)&&R(X)}function R(X){var Se,$;if(!X.key||g.isReadonly.value)return;["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(X.key)&&X.preventDefault(),["Enter","ArrowDown"," "].includes(X.key)&&(l.value=!0),["Escape","Tab"].includes(X.key)&&(l.value=!1),X.key==="Home"?(Se=P.value)==null||Se.focus("first"):X.key==="End"&&(($=P.value)==null||$.focus("last"));const W=1e3;if(!Ws(X))return;const H=performance.now();H-M>W&&(_=""),_+=X.key.toLowerCase(),M=H;const te=u.value.find(he=>he.title.toLowerCase().startsWith(_));if(te!==void 0){f.value=[te];const he=x.value.indexOf(te);mt&&window.requestAnimationFrame(()=>{var ae;he>=0&&((ae=s.value)==null||ae.scrollToIndex(he))})}}function L(X){let W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!X.props.disabled)if(e.multiple){const H=f.value.findIndex(Se=>(e.valueComparator||Rn)(Se.value,X.value)),te=W??!~H;if(~H){const Se=te?[...f.value,X]:[...f.value];Se.splice(H,1),f.value=Se}else te&&(f.value=[...f.value,X])}else{const H=W!==!1;f.value=H?[X]:[],ft(()=>{l.value=!1})}}function O(X){var W;(W=P.value)!=null&&W.$el.contains(X.relatedTarget)||(l.value=!1)}function G(){var X;e.eager&&((X=s.value)==null||X.calculateVisibleItems())}function U(){var X;m.value&&((X=a.value)==null||X.focus())}function j(X){m.value=!0}function B(X){if(X==null)f.value=[];else if(Gs(a.value,":autofill")||Gs(a.value,":-webkit-autofill")){const W=u.value.find(H=>H.title===X);W&&L(W)}else a.value&&(a.value.value="")}return Te(l,()=>{if(!e.hideSelected&&l.value&&f.value.length){const X=x.value.findIndex(W=>f.value.some(H=>(e.valueComparator||Rn)(H.value,W.value)));mt&&window.requestAnimationFrame(()=>{var W;X>=0&&((W=s.value)==null||W.scrollToIndex(X))})}}),Te(()=>e.items,(X,W)=>{l.value||m.value&&!W.length&&X.length&&(l.value=!0)}),pe(()=>{const X=!!(e.chips||n.chip),W=!!(!e.hideNoData||x.value.length||n["prepend-item"]||n["append-item"]||n["no-data"]),H=f.value.length>0,te=Nr.filterProps(e),Se=H||!m.value&&e.label&&!e.persistentPlaceholder?void 0:e.placeholder;return y(Nr,ge({ref:a},te,{modelValue:f.value.map($=>$.props.value).join(", "),"onUpdate:modelValue":B,focused:m.value,"onUpdate:focused":$=>m.value=$,validationValue:f.externalValue,counterValue:h.value,dirty:H,class:["v-select",{"v-select--active-menu":l.value,"v-select--chips":!!e.chips,[`v-select--${e.multiple?"multiple":"single"}`]:!0,"v-select--selected":f.value.length,"v-select--selection-slot":!!n.selection},e.class],style:e.style,inputmode:"none",placeholder:Se,"onClick:clear":b,"onMousedown:control":S,onBlur:O,onKeydown:R,"aria-label":i(v.value),title:i(v.value)}),{...n,default:()=>y(Ne,null,[y(qs,ge({ref:r,modelValue:l.value,"onUpdate:modelValue":$=>l.value=$,activator:"parent",contentClass:"v-select__content",disabled:C.value,eager:e.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:e.transition,onAfterEnter:G,onAfterLeave:U},T.value),{default:()=>[W&&y(pc,ge({ref:P,selected:p.value,selectStrategy:e.multiple?"independent":"single-independent",onMousedown:$=>$.preventDefault(),onKeydown:E,onFocusin:j,tabindex:"-1","aria-live":"polite",color:e.itemColor??e.color},w,e.listProps),{default:()=>{var $,he,ae;return[($=n["prepend-item"])==null?void 0:$.call(n),!x.value.length&&!e.hideNoData&&(((he=n["no-data"])==null?void 0:he.call(n))??y(pa,{key:"no-data",title:i(e.noDataText)},null)),y(bc,{ref:s,renderless:!0,items:x.value},{default:Q=>{var N;let{item:ve,index:Ge,itemRef:Ae}=Q;const be=ge(ve.props,{ref:Ae,key:ve.value,onClick:()=>L(ve,null)});return((N=n.item)==null?void 0:N.call(n,{item:ve,index:Ge,props:be}))??y(pa,ge(be,{role:"option"}),{prepend:V=>{let{isSelected:I}=V;return y(Ne,null,[e.multiple&&!e.hideSelected?y(ga,{key:ve.value,modelValue:I,ripple:!1,tabindex:"-1"},null):void 0,ve.props.prependAvatar&&y(mi,{image:ve.props.prependAvatar},null),ve.props.prependIcon&&y(gt,{icon:ve.props.prependIcon},null)])}})}}),(ae=n["append-item"])==null?void 0:ae.call(n)]}})]}),f.value.map(($,he)=>{function ae(Ae){Ae.stopPropagation(),Ae.preventDefault(),L($,!1)}const Q={"onClick:close":ae,onKeydown(Ae){Ae.key!=="Enter"&&Ae.key!==" "||(Ae.preventDefault(),Ae.stopPropagation(),ae(Ae))},onMousedown(Ae){Ae.preventDefault(),Ae.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0},ve=X?!!n.chip:!!n.selection,Ge=ve?ac(X?n.chip({item:$,index:he,props:Q}):n.selection({item:$,index:he})):void 0;if(!(ve&&!Ge))return y("div",{key:$.value,class:"v-select__selection"},[X?n.chip?y(rt,{key:"chip-defaults",defaults:{VChip:{closable:e.closableChips,size:"small",text:$.title}}},{default:()=>[Ge]}):y(io,ge({key:"chip",closable:e.closableChips,size:"small",text:$.title,disabled:$.props.disabled},Q),null):Ge??y("span",{class:"v-select__selection-text"},[$.title,e.multiple&&he<f.value.length-1&&y("span",{class:"v-select__selection-comma"},[ca(",")])])])})]),"append-inner":function(){var Q;for(var $=arguments.length,he=new Array($),ae=0;ae<$;ae++)he[ae]=arguments[ae];return y(Ne,null,[(Q=n["append-inner"])==null?void 0:Q.call(n,...he),e.menuIcon?y(gt,{class:"v-select__menu-icon",icon:e.menuIcon},null):void 0])}})}),yi({isFocused:m,menu:l,select:L},a)}}),i2=(e,t,n)=>e==null||t==null?-1:e.toString().toLocaleLowerCase().indexOf(t.toString().toLocaleLowerCase()),yl=Y({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function a2(e,t,n){var o;const i=[],a=(n==null?void 0:n.default)??i2,r=n!=null&&n.filterKeys?Nt(n.filterKeys):!1,s=Object.keys((n==null?void 0:n.customKeyFilter)??{}).length;if(!(e!=null&&e.length))return i;e:for(let l=0;l<e.length;l++){const[u,c=u]=Nt(e[l]),d={},f={};let h=-1;if((t||s>0)&&!(n!=null&&n.noFilter)){if(typeof u=="object"){const m=r||Object.keys(c);for(const v of m){const _=an(c,v),M=(o=n==null?void 0:n.customKeyFilter)==null?void 0:o[v];if(h=M?M(_,t,u):a(_,t,u),h!==-1&&h!==!1)M?d[v]=h:f[v]=h;else if((n==null?void 0:n.filterMode)==="every")continue e}}else h=a(u,t,u),h!==-1&&h!==!1&&(f.title=h);const g=Object.keys(f).length,p=Object.keys(d).length;if(!g&&!p||(n==null?void 0:n.filterMode)==="union"&&p!==s&&!g||(n==null?void 0:n.filterMode)==="intersection"&&(p!==s||!g))continue}i.push({index:l,matches:{...f,...d}})}return i}function _l(e,t,n,i){const a=Me([]),r=Me(new Map),s=A(()=>i!=null&&i.transform?on(t).map(l=>[l,i.transform(l)]):on(t));Bt(()=>{const l=typeof n=="function"?n():on(n),u=typeof l!="string"&&typeof l!="number"?"":String(l),c=a2(s.value,u,{customKeyFilter:{...e.customKeyFilter,...on(i==null?void 0:i.customKeyFilter)},default:e.customFilter,filterKeys:e.filterKeys,filterMode:e.filterMode,noFilter:e.noFilter}),d=on(t),f=[],h=new Map;c.forEach(g=>{let{index:p,matches:m}=g;const v=d[p];f.push(v),h.set(v.value,m)}),a.value=f,r.value=h});function o(l){return r.value.get(l.value)}return{filteredItems:a,filteredMatches:r,getMatches:o}}function r2(e,t,n){if(t==null)return e;if(Array.isArray(t))throw new Error("Multiple matches is not implemented");return typeof t=="number"&&~t?y(Ne,null,[y("span",{class:"v-autocomplete__unmask"},[e.substr(0,t)]),y("span",{class:"v-autocomplete__mask"},[e.substr(t,n)]),y("span",{class:"v-autocomplete__unmask"},[e.substr(t+n)])]):e}const s2=Y({autoSelectFirst:{type:[Boolean,String]},clearOnSelect:Boolean,search:String,...yl({filterKeys:["title"]}),...Dm(),...Kt(_c({modelValue:null,role:"combobox"}),["validationValue","dirty","appendInnerIcon"]),...Di({transition:!1})},"VAutocomplete"),o2=de()({name:"VAutocomplete",props:s2(),emits:{"update:focused":e=>!0,"update:search":e=>!0,"update:modelValue":e=>!0,"update:menu":e=>!0},setup(e,t){let{slots:n}=t;const{t:i}=$t(),a=_e(),r=Me(!1),s=Me(!0),o=Me(!1),l=_e(),u=_e(),c=He(e,"menu"),d=A({get:()=>c.value,set:be=>{var N;c.value&&!be&&((N=l.value)!=null&&N.ΨopenChildren.size)||(c.value=be)}}),f=Me(-1),h=A(()=>{var be;return(be=a.value)==null?void 0:be.color}),g=A(()=>d.value?e.closeText:e.openText),{items:p,transformIn:m,transformOut:v}=Tm(e),{textColorClasses:_,textColorStyles:M}=bn(h),x=He(e,"search",""),C=He(e,"modelValue",[],be=>m(be===null?[null]:Nt(be)),be=>{const N=v(be);return e.multiple?N:N[0]??null}),T=A(()=>typeof e.counterValue=="function"?e.counterValue(C.value):typeof e.counterValue=="number"?e.counterValue:C.value.length),P=gc(e),{filteredItems:w,getMatches:b}=_l(e,p,()=>s.value?"":x.value),S=A(()=>e.hideSelected?w.value.filter(be=>!C.value.some(N=>N.value===be.value)):w.value),E=A(()=>!!(e.chips||n.chip)),R=A(()=>E.value||!!n.selection),L=A(()=>C.value.map(be=>be.props.value)),O=A(()=>{var N;return(e.autoSelectFirst===!0||e.autoSelectFirst==="exact"&&x.value===((N=S.value[0])==null?void 0:N.title))&&S.value.length>0&&!s.value&&!o.value}),G=A(()=>e.hideNoData&&!S.value.length||P.isReadonly.value||P.isDisabled.value),U=_e(),j=Im(U,a);function B(be){e.openOnClear&&(d.value=!0),x.value=""}function X(){G.value||(d.value=!0)}function W(be){G.value||(r.value&&(be.preventDefault(),be.stopPropagation()),d.value=!d.value)}function H(be){var N;be.key!==" "&&Ws(be)&&((N=a.value)==null||N.focus())}function te(be){var I,re,q;if(P.isReadonly.value)return;const N=a.value.selectionStart,V=C.value.length;if(["Enter","ArrowDown","ArrowUp"].includes(be.key)&&be.preventDefault(),["Enter","ArrowDown"].includes(be.key)&&(d.value=!0),["Escape"].includes(be.key)&&(d.value=!1),O.value&&["Enter","Tab"].includes(be.key)&&!C.value.some(Z=>{let{value:oe}=Z;return oe===S.value[0].value})&&Ae(S.value[0]),be.key==="ArrowDown"&&O.value&&((I=U.value)==null||I.focus("next")),["Backspace","Delete"].includes(be.key)){if(!e.multiple&&R.value&&C.value.length>0&&!x.value)return Ae(C.value[0],!1);if(~f.value){be.preventDefault();const Z=f.value;Ae(C.value[f.value],!1),f.value=Z>=V-1?V-2:Z}else be.key==="Backspace"&&!x.value&&(f.value=V-1);return}if(e.multiple)if(be.key==="ArrowLeft"){if(f.value<0&&N>0)return;const Z=f.value>-1?f.value-1:V-1;C.value[Z]?f.value=Z:(f.value=-1,a.value.setSelectionRange((re=x.value)==null?void 0:re.length,(q=x.value)==null?void 0:q.length))}else if(be.key==="ArrowRight"){if(f.value<0)return;const Z=f.value+1;C.value[Z]?f.value=Z:(f.value=-1,a.value.setSelectionRange(0,0))}else~f.value&&Ws(be)&&(f.value=-1)}function Se(be){if(Gs(a.value,":autofill")||Gs(a.value,":-webkit-autofill")){const N=p.value.find(V=>V.title===be.target.value);N&&Ae(N)}}function $(){var be;e.eager&&((be=u.value)==null||be.calculateVisibleItems())}function he(){var be;r.value&&(s.value=!0,(be=a.value)==null||be.focus())}function ae(be){r.value=!0,setTimeout(()=>{o.value=!0})}function Q(be){o.value=!1}function ve(be){(be==null||be===""&&!e.multiple&&!R.value)&&(C.value=[])}const Ge=Me(!1);function Ae(be){let N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!(!be||be.props.disabled))if(e.multiple){const V=C.value.findIndex(re=>(e.valueComparator||Rn)(re.value,be.value)),I=N??!~V;if(~V){const re=I?[...C.value,be]:[...C.value];re.splice(V,1),C.value=re}else I&&(C.value=[...C.value,be]);e.clearOnSelect&&(x.value="")}else{const V=N!==!1;C.value=V?[be]:[],x.value=V&&!R.value?be.title:"",ft(()=>{d.value=!1,s.value=!0})}}return Te(r,(be,N)=>{var V;be!==N&&(be?(Ge.value=!0,x.value=e.multiple||R.value?"":String(((V=C.value.at(-1))==null?void 0:V.props.title)??""),s.value=!0,ft(()=>Ge.value=!1)):(!e.multiple&&x.value==null&&(C.value=[]),d.value=!1,C.value.some(I=>{let{title:re}=I;return re===x.value})||(x.value=""),f.value=-1))}),Te(x,be=>{!r.value||Ge.value||(be&&(d.value=!0),s.value=!be)}),Te(d,()=>{if(!e.hideSelected&&d.value&&C.value.length){const be=S.value.findIndex(N=>C.value.some(V=>N.value===V.value));mt&&window.requestAnimationFrame(()=>{var N;be>=0&&((N=u.value)==null||N.scrollToIndex(be))})}}),Te(()=>e.items,(be,N)=>{d.value||r.value&&!N.length&&be.length&&(d.value=!0)}),pe(()=>{const be=!!(!e.hideNoData||S.value.length||n["prepend-item"]||n["append-item"]||n["no-data"]),N=C.value.length>0,V=Nr.filterProps(e);return y(Nr,ge({ref:a},V,{modelValue:x.value,"onUpdate:modelValue":[I=>x.value=I,ve],focused:r.value,"onUpdate:focused":I=>r.value=I,validationValue:C.externalValue,counterValue:T.value,dirty:N,onChange:Se,class:["v-autocomplete",`v-autocomplete--${e.multiple?"multiple":"single"}`,{"v-autocomplete--active-menu":d.value,"v-autocomplete--chips":!!e.chips,"v-autocomplete--selection-slot":!!R.value,"v-autocomplete--selecting-index":f.value>-1},e.class],style:e.style,readonly:P.isReadonly.value,placeholder:N?void 0:e.placeholder,"onClick:clear":B,"onMousedown:control":X,onKeydown:te}),{...n,default:()=>y(Ne,null,[y(qs,ge({ref:l,modelValue:d.value,"onUpdate:modelValue":I=>d.value=I,activator:"parent",contentClass:"v-autocomplete__content",disabled:G.value,eager:e.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:e.transition,onAfterEnter:$,onAfterLeave:he},e.menuProps),{default:()=>[be&&y(pc,ge({ref:U,selected:L.value,selectStrategy:e.multiple?"independent":"single-independent",onMousedown:I=>I.preventDefault(),onKeydown:H,onFocusin:ae,onFocusout:Q,tabindex:"-1","aria-live":"polite",color:e.itemColor??e.color},j,e.listProps),{default:()=>{var I,re,q;return[(I=n["prepend-item"])==null?void 0:I.call(n),!S.value.length&&!e.hideNoData&&(((re=n["no-data"])==null?void 0:re.call(n))??y(pa,{key:"no-data",title:i(e.noDataText)},null)),y(bc,{ref:u,renderless:!0,items:S.value},{default:Z=>{var D;let{item:oe,index:xe,itemRef:ie}=Z;const k=ge(oe.props,{ref:ie,key:oe.value,active:O.value&&xe===0?!0:void 0,onClick:()=>Ae(oe,null)});return((D=n.item)==null?void 0:D.call(n,{item:oe,index:xe,props:k}))??y(pa,ge(k,{role:"option"}),{prepend:z=>{let{isSelected:ne}=z;return y(Ne,null,[e.multiple&&!e.hideSelected?y(ga,{key:oe.value,modelValue:ne,ripple:!1,tabindex:"-1"},null):void 0,oe.props.prependAvatar&&y(mi,{image:oe.props.prependAvatar},null),oe.props.prependIcon&&y(gt,{icon:oe.props.prependIcon},null)])},title:()=>{var z,ne;return s.value?oe.title:r2(oe.title,(z=b(oe))==null?void 0:z.title,((ne=x.value)==null?void 0:ne.length)??0)}})}}),(q=n["append-item"])==null?void 0:q.call(n)]}})]}),C.value.map((I,re)=>{function q(ie){ie.stopPropagation(),ie.preventDefault(),Ae(I,!1)}const Z={"onClick:close":q,onKeydown(ie){ie.key!=="Enter"&&ie.key!==" "||(ie.preventDefault(),ie.stopPropagation(),q(ie))},onMousedown(ie){ie.preventDefault(),ie.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0},oe=E.value?!!n.chip:!!n.selection,xe=oe?ac(E.value?n.chip({item:I,index:re,props:Z}):n.selection({item:I,index:re})):void 0;if(!(oe&&!xe))return y("div",{key:I.value,class:["v-autocomplete__selection",re===f.value&&["v-autocomplete__selection--selected",_.value]],style:re===f.value?M.value:{}},[E.value?n.chip?y(rt,{key:"chip-defaults",defaults:{VChip:{closable:e.closableChips,size:"small",text:I.title}}},{default:()=>[xe]}):y(io,ge({key:"chip",closable:e.closableChips,size:"small",text:I.title,disabled:I.props.disabled},Z),null):xe??y("span",{class:"v-autocomplete__selection-text"},[I.title,e.multiple&&re<C.value.length-1&&y("span",{class:"v-autocomplete__selection-comma"},[ca(",")])])])})]),"append-inner":function(){var Z;for(var I=arguments.length,re=new Array(I),q=0;q<I;q++)re[q]=arguments[q];return y(Ne,null,[(Z=n["append-inner"])==null?void 0:Z.call(n,...re),e.menuIcon?y(gt,{class:"v-autocomplete__menu-icon",icon:e.menuIcon,onMousedown:W,onClick:lb,"aria-label":i(g.value),title:i(g.value),tabindex:"-1"},null):void 0])}})}),yi({isFocused:r,isPristine:s,menu:d,search:x,filteredItems:w,select:Ae},a)}}),l2=Y({bordered:Boolean,color:String,content:[Number,String],dot:Boolean,floating:Boolean,icon:We,inline:Boolean,label:{type:String,default:"$vuetify.badge"},max:[Number,String],modelValue:{type:Boolean,default:!0},offsetX:[Number,String],offsetY:[Number,String],textColor:String,...Ie(),...ba({location:"top end"}),...Vt(),...Je(),...dt(),...Di({transition:"scale-rotate-transition"})},"VBadge"),u2=de()({name:"VBadge",inheritAttrs:!1,props:l2(),setup(e,t){const{backgroundColorClasses:n,backgroundColorStyles:i}=wt(se(e,"color")),{roundedClasses:a}=Gt(e),{t:r}=$t(),{textColorClasses:s,textColorStyles:o}=bn(se(e,"textColor")),{themeClasses:l}=lc(),{locationStyles:u}=ts(e,!0,c=>(e.floating?e.dot?2:4:e.dot?8:12)+(["top","bottom"].includes(c)?Number(e.offsetY??0):["left","right"].includes(c)?Number(e.offsetX??0):0));return pe(()=>{const c=Number(e.content),d=!e.max||isNaN(c)?e.content:c<=Number(e.max)?c:`${e.max}+`,[f,h]=zf(t.attrs,["aria-atomic","aria-label","aria-live","role","title"]);return y(e.tag,ge({class:["v-badge",{"v-badge--bordered":e.bordered,"v-badge--dot":e.dot,"v-badge--floating":e.floating,"v-badge--inline":e.inline},e.class]},h,{style:e.style}),{default:()=>{var g,p;return[y("div",{class:"v-badge__wrapper"},[(p=(g=t.slots).default)==null?void 0:p.call(g),y(Pn,{transition:e.transition},{default:()=>{var m,v;return[kt(y("span",ge({class:["v-badge__badge",l.value,n.value,a.value,s.value],style:[i.value,o.value,e.inline?{}:u.value],"aria-atomic":"true","aria-label":r(e.label,c),"aria-live":"polite",role:"status"},f),[e.dot?void 0:t.slots.badge?(v=(m=t.slots).badge)==null?void 0:v.call(m):e.icon?y(gt,{icon:e.icon},null):d]),[[vi,e.modelValue]])]}})])]}})}),{}}}),c2=Y({color:String,density:String,...Ie()},"VBannerActions"),H0=de()({name:"VBannerActions",props:c2(),setup(e,t){let{slots:n}=t;return zt({VBtn:{color:e.color,density:e.density,slim:!0,variant:"text"}}),pe(()=>{var i;return y("div",{class:["v-banner-actions",e.class],style:e.style},[(i=n.default)==null?void 0:i.call(n)])}),{}}}),G0=Wi("v-banner-text"),d2=Y({avatar:String,bgColor:String,color:String,icon:We,lines:String,stacked:Boolean,sticky:Boolean,text:String,...Yn(),...Ie(),...fn(),...Qt(),...Yr({mobile:null}),...sn(),...ba(),...eo(),...Vt(),...Je(),...dt()},"VBanner"),f2=de()({name:"VBanner",props:d2(),setup(e,t){let{slots:n}=t;const{backgroundColorClasses:i,backgroundColorStyles:a}=wt(e,"bgColor"),{borderClasses:r}=ri(e),{densityClasses:s}=In(e),{displayClasses:o,mobile:l}=gi(e),{dimensionStyles:u}=en(e),{elevationClasses:c}=pn(e),{locationStyles:d}=ts(e),{positionClasses:f}=to(e),{roundedClasses:h}=Gt(e),{themeClasses:g}=pt(e),p=se(e,"color"),m=se(e,"density");zt({VBannerActions:{color:p,density:m}}),pe(()=>{const v=!!(e.text||n.text),_=!!(e.avatar||e.icon),M=!!(_||n.prepend);return y(e.tag,{class:["v-banner",{"v-banner--stacked":e.stacked||l.value,"v-banner--sticky":e.sticky,[`v-banner--${e.lines}-line`]:!!e.lines},g.value,i.value,r.value,s.value,o.value,c.value,f.value,h.value,e.class],style:[a.value,u.value,d.value,e.style],role:"banner"},{default:()=>{var x;return[M&&y("div",{key:"prepend",class:"v-banner__prepend"},[n.prepend?y(rt,{key:"prepend-defaults",disabled:!_,defaults:{VAvatar:{color:p.value,density:m.value,icon:e.icon,image:e.avatar}}},n.prepend):y(mi,{key:"prepend-avatar",color:p.value,density:m.value,icon:e.icon,image:e.avatar},null)]),y("div",{class:"v-banner__content"},[v&&y(G0,{key:"text"},{default:()=>{var C;return[((C=n.text)==null?void 0:C.call(n))??e.text]}}),(x=n.default)==null?void 0:x.call(n)]),n.actions&&y(H0,{key:"actions"},n.actions)]}})})}}),h2=Y({baseColor:String,bgColor:String,color:String,grow:Boolean,mode:{type:String,validator:e=>!e||["horizontal","shift"].includes(e)},height:{type:[Number,String],default:56},active:{type:Boolean,default:!0},...Yn(),...Ie(),...fn(),...sn(),...Vt(),...qr({name:"bottom-navigation"}),...Je({tag:"header"}),...Jr({selectedClass:"v-btn--selected"}),...dt()},"VBottomNavigation"),m2=de()({name:"VBottomNavigation",props:h2(),emits:{"update:active":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:i}=lc(),{borderClasses:a}=ri(e),{backgroundColorClasses:r,backgroundColorStyles:s}=wt(se(e,"bgColor")),{densityClasses:o}=In(e),{elevationClasses:l}=pn(e),{roundedClasses:u}=Gt(e),{ssrBootStyles:c}=Kr(),d=A(()=>Number(e.height)-(e.density==="comfortable"?8:0)-(e.density==="compact"?16:0)),f=He(e,"active",e.active),{layoutItemStyles:h}=jr({id:e.name,order:A(()=>parseInt(e.order,10)),position:A(()=>"bottom"),layoutSize:A(()=>f.value?d.value:0),elementSize:d,active:f,absolute:se(e,"absolute")});return Qa(e,xm),zt({VBtn:{baseColor:se(e,"baseColor"),color:se(e,"color"),density:se(e,"density"),stacked:A(()=>e.mode!=="horizontal"),variant:"text"}},{scoped:!0}),pe(()=>y(e.tag,{class:["v-bottom-navigation",{"v-bottom-navigation--active":f.value,"v-bottom-navigation--grow":e.grow,"v-bottom-navigation--shift":e.mode==="shift"},i.value,r.value,a.value,o.value,l.value,u.value,e.class],style:[s.value,h.value,{height:Re(d.value)},c.value,e.style]},{default:()=>[n.default&&y("div",{class:"v-bottom-navigation__content"},[n.default()])]})),{}}}),W0=Y({fullscreen:Boolean,retainFocus:{type:Boolean,default:!0},scrollable:Boolean,...gl({origin:"center center",scrollStrategy:"block",transition:{component:uc},zIndex:2400})},"VDialog"),sh=de()({name:"VDialog",props:W0(),emits:{"update:modelValue":e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(e,t){let{emit:n,slots:i}=t;const a=He(e,"modelValue"),{scopeId:r}=ns(),s=_e();function o(c){var h,g;const d=c.relatedTarget,f=c.target;if(d!==f&&((h=s.value)!=null&&h.contentEl)&&((g=s.value)!=null&&g.globalTop)&&![document,s.value.contentEl].includes(f)&&!s.value.contentEl.contains(f)){const p=No(s.value.contentEl);if(!p.length)return;const m=p[0],v=p[p.length-1];d===m?v.focus():m.focus()}}dn(()=>{document.removeEventListener("focusin",o)}),mt&&Te(()=>a.value&&e.retainFocus,c=>{c?document.addEventListener("focusin",o):document.removeEventListener("focusin",o)},{immediate:!0});function l(){var c;n("afterEnter"),(c=s.value)!=null&&c.contentEl&&!s.value.contentEl.contains(document.activeElement)&&s.value.contentEl.focus({preventScroll:!0})}function u(){n("afterLeave")}return Te(a,async c=>{var d;c||(await ft(),(d=s.value.activatorEl)==null||d.focus({preventScroll:!0}))}),pe(()=>{const c=zi.filterProps(e),d=ge({"aria-haspopup":"dialog"},e.activatorProps),f=ge({tabindex:-1},e.contentProps);return y(zi,ge({ref:s,class:["v-dialog",{"v-dialog--fullscreen":e.fullscreen,"v-dialog--scrollable":e.scrollable},e.class],style:e.style},c,{modelValue:a.value,"onUpdate:modelValue":h=>a.value=h,"aria-modal":"true",activatorProps:d,contentProps:f,height:e.fullscreen?void 0:e.height,width:e.fullscreen?void 0:e.width,maxHeight:e.fullscreen?void 0:e.maxHeight,maxWidth:e.fullscreen?void 0:e.maxWidth,role:"dialog",onAfterEnter:l,onAfterLeave:u},r),{activator:i.activator,default:function(){for(var h=arguments.length,g=new Array(h),p=0;p<h;p++)g[p]=arguments[p];return y(rt,{root:"VDialog"},{default:()=>{var m;return[(m=i.default)==null?void 0:m.call(i,...g)]}})}})}),yi({},s)}}),v2=Y({inset:Boolean,...W0({transition:"bottom-sheet-transition"})},"VBottomSheet"),g2=de()({name:"VBottomSheet",props:v2(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const i=He(e,"modelValue");return pe(()=>{const a=sh.filterProps(e);return y(sh,ge(a,{contentClass:["v-bottom-sheet__content",e.contentClass],modelValue:i.value,"onUpdate:modelValue":r=>i.value=r,class:["v-bottom-sheet",{"v-bottom-sheet--inset":e.inset},e.class],style:e.style}),n)}),{}}}),p2=Y({divider:[Number,String],...Ie()},"VBreadcrumbsDivider"),$0=de()({name:"VBreadcrumbsDivider",props:p2(),setup(e,t){let{slots:n}=t;return pe(()=>{var i;return y("li",{"aria-hidden":"true",class:["v-breadcrumbs-divider",e.class],style:e.style},[((i=n==null?void 0:n.default)==null?void 0:i.call(n))??e.divider])}),{}}}),y2=Y({active:Boolean,activeClass:String,activeColor:String,color:String,disabled:Boolean,title:String,...Ie(),...hl(),...Je({tag:"li"})},"VBreadcrumbsItem"),X0=de()({name:"VBreadcrumbsItem",props:y2(),setup(e,t){let{slots:n,attrs:i}=t;const a=fl(e,i),r=A(()=>{var u;return e.active||((u=a.isActive)==null?void 0:u.value)}),s=A(()=>r.value?e.activeColor:e.color),{textColorClasses:o,textColorStyles:l}=bn(s);return pe(()=>y(e.tag,{class:["v-breadcrumbs-item",{"v-breadcrumbs-item--active":r.value,"v-breadcrumbs-item--disabled":e.disabled,[`${e.activeClass}`]:r.value&&e.activeClass},o.value,e.class],style:[l.value,e.style],"aria-current":r.value?"page":void 0},{default:()=>{var u,c;return[a.isLink.value?y("a",ge({class:"v-breadcrumbs-item--link",onClick:a.navigate},a.linkProps),[((c=n.default)==null?void 0:c.call(n))??e.title]):((u=n.default)==null?void 0:u.call(n))??e.title]}})),{}}}),_2=Y({activeClass:String,activeColor:String,bgColor:String,color:String,disabled:Boolean,divider:{type:String,default:"/"},icon:We,items:{type:Array,default:()=>[]},...Ie(),...fn(),...Vt(),...Je({tag:"ul"})},"VBreadcrumbs"),b2=de()({name:"VBreadcrumbs",props:_2(),setup(e,t){let{slots:n}=t;const{backgroundColorClasses:i,backgroundColorStyles:a}=wt(se(e,"bgColor")),{densityClasses:r}=In(e),{roundedClasses:s}=Gt(e);zt({VBreadcrumbsDivider:{divider:se(e,"divider")},VBreadcrumbsItem:{activeClass:se(e,"activeClass"),activeColor:se(e,"activeColor"),color:se(e,"color"),disabled:se(e,"disabled")}});const o=A(()=>e.items.map(l=>typeof l=="string"?{item:{title:l},raw:l}:{item:l,raw:l}));return pe(()=>{const l=!!(n.prepend||e.icon);return y(e.tag,{class:["v-breadcrumbs",i.value,r.value,s.value,e.class],style:[a.value,e.style]},{default:()=>{var u;return[l&&y("li",{key:"prepend",class:"v-breadcrumbs__prepend"},[n.prepend?y(rt,{key:"prepend-defaults",disabled:!e.icon,defaults:{VIcon:{icon:e.icon,start:!0}}},n.prepend):y(gt,{key:"prepend-icon",start:!0,icon:e.icon},null)]),o.value.map((c,d,f)=>{var p;let{item:h,raw:g}=c;return y(Ne,null,[((p=n.item)==null?void 0:p.call(n,{item:h,index:d}))??y(X0,ge({key:d,disabled:d>=f.length-1},typeof h=="string"?{title:h}:h),{default:n.title?()=>{var m;return(m=n.title)==null?void 0:m.call(n,{item:h,index:d})}:void 0}),d<f.length-1&&y($0,null,{default:n.divider?()=>{var m;return(m=n.divider)==null?void 0:m.call(n,{item:g,index:d})}:void 0})])}),(u=n.default)==null?void 0:u.call(n)]}})}),{}}}),Y0=de()({name:"VCardActions",props:Ie(),setup(e,t){let{slots:n}=t;return zt({VBtn:{slim:!0,variant:"text"}}),pe(()=>{var i;return y("div",{class:["v-card-actions",e.class],style:e.style},[(i=n.default)==null?void 0:i.call(n)])}),{}}}),x2=Y({opacity:[Number,String],...Ie(),...Je()},"VCardSubtitle"),q0=de()({name:"VCardSubtitle",props:x2(),setup(e,t){let{slots:n}=t;return pe(()=>y(e.tag,{class:["v-card-subtitle",e.class],style:[{"--v-card-subtitle-opacity":e.opacity},e.style]},n)),{}}}),j0=Wi("v-card-title"),S2=Y({appendAvatar:String,appendIcon:We,prependAvatar:String,prependIcon:We,subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...Ie(),...fn()},"VCardItem"),K0=de()({name:"VCardItem",props:S2(),setup(e,t){let{slots:n}=t;return pe(()=>{var u;const i=!!(e.prependAvatar||e.prependIcon),a=!!(i||n.prepend),r=!!(e.appendAvatar||e.appendIcon),s=!!(r||n.append),o=!!(e.title!=null||n.title),l=!!(e.subtitle!=null||n.subtitle);return y("div",{class:["v-card-item",e.class],style:e.style},[a&&y("div",{key:"prepend",class:"v-card-item__prepend"},[n.prepend?y(rt,{key:"prepend-defaults",disabled:!i,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon}}},n.prepend):y(Ne,null,[e.prependAvatar&&y(mi,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&y(gt,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)])]),y("div",{class:"v-card-item__content"},[o&&y(j0,{key:"title"},{default:()=>{var c;return[((c=n.title)==null?void 0:c.call(n))??hi(e.title)]}}),l&&y(q0,{key:"subtitle"},{default:()=>{var c;return[((c=n.subtitle)==null?void 0:c.call(n))??hi(e.subtitle)]}}),(u=n.default)==null?void 0:u.call(n)]),s&&y("div",{key:"append",class:"v-card-item__append"},[n.append?y(rt,{key:"append-defaults",disabled:!r,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon}}},n.append):y(Ne,null,[e.appendIcon&&y(gt,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&y(mi,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)])])])}),{}}}),M2=Y({opacity:[Number,String],...Ie(),...Je()},"VCardText"),Z0=de()({name:"VCardText",props:M2(),setup(e,t){let{slots:n}=t;return pe(()=>y(e.tag,{class:["v-card-text",e.class],style:[{"--v-card-text-opacity":e.opacity},e.style]},n)),{}}}),E2=Y({appendAvatar:String,appendIcon:We,disabled:Boolean,flat:Boolean,hover:Boolean,image:String,link:{type:Boolean,default:void 0},prependAvatar:String,prependIcon:We,ripple:{type:[Boolean,Object],default:!0},subtitle:{type:[String,Number,Boolean],default:void 0},text:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...Yn(),...Ie(),...fn(),...Qt(),...sn(),...hc(),...ba(),...eo(),...Vt(),...hl(),...Je(),...dt(),...pi({variant:"elevated"})},"VCard"),w2=de()({name:"VCard",directives:{Ripple:xa},props:E2(),setup(e,t){let{attrs:n,slots:i}=t;const{themeClasses:a}=pt(e),{borderClasses:r}=ri(e),{colorClasses:s,colorStyles:o,variantClasses:l}=Zr(e),{densityClasses:u}=In(e),{dimensionStyles:c}=en(e),{elevationClasses:d}=pn(e),{loaderClasses:f}=cl(e),{locationStyles:h}=ts(e),{positionClasses:g}=to(e),{roundedClasses:p}=Gt(e),m=fl(e,n),v=A(()=>e.link!==!1&&m.isLink.value),_=A(()=>!e.disabled&&e.link!==!1&&(e.link||m.isClickable.value));return pe(()=>{const M=v.value?"a":e.tag,x=!!(i.title||e.title!=null),C=!!(i.subtitle||e.subtitle!=null),T=x||C,P=!!(i.append||e.appendAvatar||e.appendIcon),w=!!(i.prepend||e.prependAvatar||e.prependIcon),b=!!(i.image||e.image),S=T||w||P,E=!!(i.text||e.text!=null);return kt(y(M,ge({class:["v-card",{"v-card--disabled":e.disabled,"v-card--flat":e.flat,"v-card--hover":e.hover&&!(e.disabled||e.flat),"v-card--link":_.value},a.value,r.value,s.value,u.value,d.value,f.value,g.value,p.value,l.value,e.class],style:[o.value,c.value,h.value,e.style],onClick:_.value&&m.navigate,tabindex:e.disabled?-1:void 0},m.linkProps),{default:()=>{var R;return[b&&y("div",{key:"image",class:"v-card__image"},[i.image?y(rt,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},i.image):y(va,{key:"image-img",cover:!0,src:e.image},null)]),y(dl,{name:"v-card",active:!!e.loading,color:typeof e.loading=="boolean"?void 0:e.loading},{default:i.loader}),S&&y(K0,{key:"item",prependAvatar:e.prependAvatar,prependIcon:e.prependIcon,title:e.title,subtitle:e.subtitle,appendAvatar:e.appendAvatar,appendIcon:e.appendIcon},{default:i.item,prepend:i.prepend,title:i.title,subtitle:i.subtitle,append:i.append}),E&&y(Z0,{key:"text"},{default:()=>{var L;return[((L=i.text)==null?void 0:L.call(i))??e.text]}}),(R=i.default)==null?void 0:R.call(i),i.actions&&y(Y0,null,{default:i.actions}),Ja(_.value,"v-card")]}}),[[ni("ripple"),_.value&&e.ripple]])}),{}}}),T2=e=>{const{touchstartX:t,touchendX:n,touchstartY:i,touchendY:a}=e,r=.5,s=16;e.offsetX=n-t,e.offsetY=a-i,Math.abs(e.offsetY)<r*Math.abs(e.offsetX)&&(e.left&&n<t-s&&e.left(e),e.right&&n>t+s&&e.right(e)),Math.abs(e.offsetX)<r*Math.abs(e.offsetY)&&(e.up&&a<i-s&&e.up(e),e.down&&a>i+s&&e.down(e))};function C2(e,t){var i;const n=e.changedTouches[0];t.touchstartX=n.clientX,t.touchstartY=n.clientY,(i=t.start)==null||i.call(t,{originalEvent:e,...t})}function A2(e,t){var i;const n=e.changedTouches[0];t.touchendX=n.clientX,t.touchendY=n.clientY,(i=t.end)==null||i.call(t,{originalEvent:e,...t}),T2(t)}function P2(e,t){var i;const n=e.changedTouches[0];t.touchmoveX=n.clientX,t.touchmoveY=n.clientY,(i=t.move)==null||i.call(t,{originalEvent:e,...t})}function R2(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t={touchstartX:0,touchstartY:0,touchendX:0,touchendY:0,touchmoveX:0,touchmoveY:0,offsetX:0,offsetY:0,left:e.left,right:e.right,up:e.up,down:e.down,start:e.start,move:e.move,end:e.end};return{touchstart:n=>C2(n,t),touchend:n=>A2(n,t),touchmove:n=>P2(n,t)}}function I2(e,t){var o;const n=t.value,i=n!=null&&n.parent?e.parentElement:e,a=(n==null?void 0:n.options)??{passive:!0},r=(o=t.instance)==null?void 0:o.$.uid;if(!i||!r)return;const s=R2(t.value);i._touchHandlers=i._touchHandlers??Object.create(null),i._touchHandlers[r]=s,ib(s).forEach(l=>{i.addEventListener(l,s[l],a)})}function D2(e,t){var r,s;const n=(r=t.value)!=null&&r.parent?e.parentElement:e,i=(s=t.instance)==null?void 0:s.$.uid;if(!(n!=null&&n._touchHandlers)||!i)return;const a=n._touchHandlers[i];ib(a).forEach(o=>{n.removeEventListener(o,a[o])}),delete n._touchHandlers[i]}const km={mounted:I2,unmounted:D2},J0=Symbol.for("vuetify:v-window"),Q0=Symbol.for("vuetify:v-window-group"),xc=Y({continuous:Boolean,nextIcon:{type:[Boolean,String,Function,Object],default:"$next"},prevIcon:{type:[Boolean,String,Function,Object],default:"$prev"},reverse:Boolean,showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||e==="hover"},touch:{type:[Object,Boolean],default:void 0},direction:{type:String,default:"horizontal"},modelValue:null,disabled:Boolean,selectedClass:{type:String,default:"v-window-item--active"},mandatory:{type:[Boolean,String],default:"force"},...Ie(),...Je(),...dt()},"VWindow"),Or=de()({name:"VWindow",directives:{Touch:km},props:xc(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:i}=pt(e),{isRtl:a}=rn(),{t:r}=$t(),s=Qa(e,Q0),o=_e(),l=A(()=>a.value?!e.reverse:e.reverse),u=Me(!1),c=A(()=>{const x=e.direction==="vertical"?"y":"x",T=(l.value?!u.value:u.value)?"-reverse":"";return`v-window-${x}${T}-transition`}),d=Me(0),f=_e(void 0),h=A(()=>s.items.value.findIndex(x=>s.selected.value.includes(x.id)));Te(h,(x,C)=>{const T=s.items.value.length,P=T-1;T<=2?u.value=x<C:x===P&&C===0?u.value=!0:x===0&&C===P?u.value=!1:u.value=x<C}),Rt(J0,{transition:c,isReversed:u,transitionCount:d,transitionHeight:f,rootRef:o});const g=A(()=>e.continuous||h.value!==0),p=A(()=>e.continuous||h.value!==s.items.value.length-1);function m(){g.value&&s.prev()}function v(){p.value&&s.next()}const _=A(()=>{const x=[],C={icon:a.value?e.nextIcon:e.prevIcon,class:`v-window__${l.value?"right":"left"}`,onClick:s.prev,"aria-label":r("$vuetify.carousel.prev")};x.push(g.value?n.prev?n.prev({props:C}):y(vt,C,null):y("div",null,null));const T={icon:a.value?e.prevIcon:e.nextIcon,class:`v-window__${l.value?"left":"right"}`,onClick:s.next,"aria-label":r("$vuetify.carousel.next")};return x.push(p.value?n.next?n.next({props:T}):y(vt,T,null):y("div",null,null)),x}),M=A(()=>e.touch===!1?e.touch:{...{left:()=>{l.value?m():v()},right:()=>{l.value?v():m()},start:C=>{let{originalEvent:T}=C;T.stopPropagation()}},...e.touch===!0?{}:e.touch});return pe(()=>kt(y(e.tag,{ref:o,class:["v-window",{"v-window--show-arrows-on-hover":e.showArrows==="hover"},i.value,e.class],style:e.style},{default:()=>{var x,C;return[y("div",{class:"v-window__container",style:{height:f.value}},[(x=n.default)==null?void 0:x.call(n,{group:s}),e.showArrows!==!1&&y("div",{class:"v-window__controls"},[_.value])]),(C=n.additional)==null?void 0:C.call(n,{group:s})]}}),[[ni("touch"),M.value]])),{group:s}}}),L2=Y({color:String,cycle:Boolean,delimiterIcon:{type:We,default:"$delimiter"},height:{type:[Number,String],default:500},hideDelimiters:Boolean,hideDelimiterBackground:Boolean,interval:{type:[Number,String],default:6e3,validator:e=>Number(e)>0},progress:[Boolean,String],verticalDelimiters:[Boolean,String],...xc({continuous:!0,mandatory:"force",showArrows:!0})},"VCarousel"),k2=de()({name:"VCarousel",props:L2(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const i=He(e,"modelValue"),{t:a}=$t(),r=_e();let s=-1;Te(i,l),Te(()=>e.interval,l),Te(()=>e.cycle,u=>{u?l():window.clearTimeout(s)}),Zt(o);function o(){!e.cycle||!r.value||(s=window.setTimeout(r.value.group.next,Number(e.interval)>0?Number(e.interval):6e3))}function l(){window.clearTimeout(s),window.requestAnimationFrame(o)}return pe(()=>{const u=Or.filterProps(e);return y(Or,ge({ref:r},u,{modelValue:i.value,"onUpdate:modelValue":c=>i.value=c,class:["v-carousel",{"v-carousel--hide-delimiter-background":e.hideDelimiterBackground,"v-carousel--vertical-delimiters":e.verticalDelimiters},e.class],style:[{height:Re(e.height)},e.style]}),{default:n.default,additional:c=>{let{group:d}=c;return y(Ne,null,[!e.hideDelimiters&&y("div",{class:"v-carousel__controls",style:{left:e.verticalDelimiters==="left"&&e.verticalDelimiters?0:"auto",right:e.verticalDelimiters==="right"?0:"auto"}},[d.items.value.length>0&&y(rt,{defaults:{VBtn:{color:e.color,icon:e.delimiterIcon,size:"x-small",variant:"text"}},scoped:!0},{default:()=>[d.items.value.map((f,h)=>{const g={id:`carousel-item-${f.id}`,"aria-label":a("$vuetify.carousel.ariaLabel.delimiter",h+1,d.items.value.length),class:["v-carousel__controls__item",d.isSelected(f.id)&&"v-btn--active"],onClick:()=>d.select(f.id,!0)};return n.item?n.item({props:g,item:f}):y(vt,ge(f,g),null)})]})]),e.progress&&y(fc,{class:"v-carousel__progress",color:typeof e.progress=="string"?e.progress:void 0,modelValue:(d.getItemIndex(i.value)+1)/d.items.value.length*100},null)])},prev:n.prev,next:n.next})}),{}}}),Sc=Y({reverseTransition:{type:[Boolean,String],default:void 0},transition:{type:[Boolean,String],default:void 0},...Ie(),...Qr(),...Pm()},"VWindowItem"),Ur=de()({name:"VWindowItem",directives:{Touch:km},props:Sc(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const i=ot(J0),a=es(e,Q0),{isBooted:r}=Kr();if(!i||!a)throw new Error("[Vuetify] VWindowItem must be used inside VWindow");const s=Me(!1),o=A(()=>r.value&&(i.isReversed.value?e.reverseTransition!==!1:e.transition!==!1));function l(){!s.value||!i||(s.value=!1,i.transitionCount.value>0&&(i.transitionCount.value-=1,i.transitionCount.value===0&&(i.transitionHeight.value=void 0)))}function u(){var g;s.value||!i||(s.value=!0,i.transitionCount.value===0&&(i.transitionHeight.value=Re((g=i.rootRef.value)==null?void 0:g.clientHeight)),i.transitionCount.value+=1)}function c(){l()}function d(g){s.value&&ft(()=>{!o.value||!s.value||!i||(i.transitionHeight.value=Re(g.clientHeight))})}const f=A(()=>{const g=i.isReversed.value?e.reverseTransition:e.transition;return o.value?{name:typeof g!="string"?i.transition.value:g,onBeforeEnter:u,onAfterEnter:l,onEnterCancelled:c,onBeforeLeave:u,onAfterLeave:l,onLeaveCancelled:c,onEnter:d}:!1}),{hasContent:h}=Rm(e,a.isSelected);return pe(()=>y(Pn,{transition:f.value,disabled:!r.value},{default:()=>{var g;return[kt(y("div",{class:["v-window-item",a.selectedClass.value,e.class],style:e.style},[h.value&&((g=n.default)==null?void 0:g.call(n))]),[[vi,a.isSelected.value]])]}})),{groupItem:a}}}),V2=Y({...$b(),...Sc()},"VCarouselItem"),F2=de()({name:"VCarouselItem",inheritAttrs:!1,props:V2(),setup(e,t){let{slots:n,attrs:i}=t;pe(()=>{const a=va.filterProps(e),r=Ur.filterProps(e);return y(Ur,ge({class:["v-carousel-item",e.class]},r),{default:()=>[y(va,ge(i,a),n)]})})}}),N2=Wi("v-code","code"),O2=Y({color:{type:Object},disabled:Boolean,dotSize:{type:[Number,String],default:10},height:{type:[Number,String],default:150},width:{type:[Number,String],default:300},...Ie()},"VColorPickerCanvas"),U2=ii({name:"VColorPickerCanvas",props:O2(),emits:{"update:color":e=>!0,"update:position":e=>!0},setup(e,t){let{emit:n}=t;const i=Me(!1),a=_e(),r=Me(parseFloat(e.width)),s=Me(parseFloat(e.height)),o=_e({x:0,y:0}),l=A({get:()=>o.value,set(m){var M,x;if(!a.value)return;const{x:v,y:_}=m;o.value=m,n("update:color",{h:((M=e.color)==null?void 0:M.h)??0,s:qt(v,0,r.value)/r.value,v:1-qt(_,0,s.value)/s.value,a:((x=e.color)==null?void 0:x.a)??1})}}),u=A(()=>{const{x:m,y:v}=l.value,_=parseInt(e.dotSize,10)/2;return{width:Re(e.dotSize),height:Re(e.dotSize),transform:`translate(${Re(m-_)}, ${Re(v-_)})`}}),{resizeRef:c}=Ii(m=>{var M;if(!((M=c.el)!=null&&M.offsetParent))return;const{width:v,height:_}=m[0].contentRect;r.value=v,s.value=_});function d(m,v,_){const{left:M,top:x,width:C,height:T}=_;l.value={x:qt(m-M,0,C),y:qt(v-x,0,T)}}function f(m){m.type==="mousedown"&&m.preventDefault(),!e.disabled&&(h(m),window.addEventListener("mousemove",h),window.addEventListener("mouseup",g),window.addEventListener("touchmove",h),window.addEventListener("touchend",g))}function h(m){if(e.disabled||!a.value)return;i.value=!0;const v=AR(m);d(v.clientX,v.clientY,a.value.getBoundingClientRect())}function g(){window.removeEventListener("mousemove",h),window.removeEventListener("mouseup",g),window.removeEventListener("touchmove",h),window.removeEventListener("touchend",g)}function p(){var x;if(!a.value)return;const m=a.value,v=m.getContext("2d");if(!v)return;const _=v.createLinearGradient(0,0,m.width,0);_.addColorStop(0,"hsla(0, 0%, 100%, 1)"),_.addColorStop(1,`hsla(${((x=e.color)==null?void 0:x.h)??0}, 100%, 50%, 1)`),v.fillStyle=_,v.fillRect(0,0,m.width,m.height);const M=v.createLinearGradient(0,0,0,m.height);M.addColorStop(0,"hsla(0, 0%, 0%, 0)"),M.addColorStop(1,"hsla(0, 0%, 0%, 1)"),v.fillStyle=M,v.fillRect(0,0,m.width,m.height)}return Te(()=>{var m;return(m=e.color)==null?void 0:m.h},p,{immediate:!0}),Te(()=>[r.value,s.value],(m,v)=>{p(),o.value={x:l.value.x*m[0]/v[0],y:l.value.y*m[1]/v[1]}},{flush:"post"}),Te(()=>e.color,()=>{if(i.value){i.value=!1;return}o.value=e.color?{x:e.color.s*r.value,y:(1-e.color.v)*s.value}:{x:0,y:0}},{deep:!0,immediate:!0}),Zt(()=>p()),pe(()=>y("div",{ref:c,class:["v-color-picker-canvas",e.class],style:e.style,onMousedown:f,onTouchstartPassive:f},[y("canvas",{ref:a,width:r.value,height:s.value},null),e.color&&y("div",{class:["v-color-picker-canvas__dot",{"v-color-picker-canvas__dot--disabled":e.disabled}],style:u.value},null)])),{}}});function B2(e,t){if(t){const{a:n,...i}=e;return i}return e}function z2(e,t){if(t==null||typeof t=="string"){const n=bb(e);return e.a===1?n.slice(0,7):n}if(typeof t=="object"){let n;return Sr(t,["r","g","b"])?n=ma(e):Sr(t,["h","s","l"])?n=vb(e):Sr(t,["h","s","v"])&&(n=e),B2(n,!Sr(t,["a"])&&e.a===1)}return e}const Cs={h:0,s:0,v:0,a:1},oh={inputProps:{type:"number",min:0},inputs:[{label:"R",max:255,step:1,getValue:e=>Math.round(e.r),getColor:(e,t)=>({...e,r:Number(t)})},{label:"G",max:255,step:1,getValue:e=>Math.round(e.g),getColor:(e,t)=>({...e,g:Number(t)})},{label:"B",max:255,step:1,getValue:e=>Math.round(e.b),getColor:(e,t)=>({...e,b:Number(t)})},{label:"A",max:1,step:.01,getValue:e=>{let{a:t}=e;return t!=null?Math.round(t*100)/100:1},getColor:(e,t)=>({...e,a:Number(t)})}],to:ma,from:ol};var qp;const H2={...oh,inputs:(qp=oh.inputs)==null?void 0:qp.slice(0,3)},lh={inputProps:{type:"number",min:0},inputs:[{label:"H",max:360,step:1,getValue:e=>Math.round(e.h),getColor:(e,t)=>({...e,h:Number(t)})},{label:"S",max:1,step:.01,getValue:e=>Math.round(e.s*100)/100,getColor:(e,t)=>({...e,s:Number(t)})},{label:"L",max:1,step:.01,getValue:e=>Math.round(e.l*100)/100,getColor:(e,t)=>({...e,l:Number(t)})},{label:"A",max:1,step:.01,getValue:e=>{let{a:t}=e;return t!=null?Math.round(t*100)/100:1},getColor:(e,t)=>({...e,a:Number(t)})}],to:vb,from:um},G2={...lh,inputs:lh.inputs.slice(0,3)},ex={inputProps:{type:"text"},inputs:[{label:"HEXA",getValue:e=>e,getColor:(e,t)=>t}],to:bb,from:JR},W2={...ex,inputs:[{label:"HEX",getValue:e=>e.slice(0,7),getColor:(e,t)=>t}]},Rr={rgb:H2,rgba:oh,hsl:G2,hsla:lh,hex:W2,hexa:ex},$2=e=>{let{label:t,...n}=e;return y("div",{class:"v-color-picker-edit__input"},[y("input",n,null),y("span",null,[t])])},X2=Y({color:Object,disabled:Boolean,mode:{type:String,default:"rgba",validator:e=>Object.keys(Rr).includes(e)},modes:{type:Array,default:()=>Object.keys(Rr),validator:e=>Array.isArray(e)&&e.every(t=>Object.keys(Rr).includes(t))},...Ie()},"VColorPickerEdit"),Y2=ii({name:"VColorPickerEdit",props:X2(),emits:{"update:color":e=>!0,"update:mode":e=>!0},setup(e,t){let{emit:n}=t;const i=A(()=>e.modes.map(r=>({...Rr[r],name:r}))),a=A(()=>{var o;const r=i.value.find(l=>l.name===e.mode);if(!r)return[];const s=e.color?r.to(e.color):null;return(o=r.inputs)==null?void 0:o.map(l=>{let{getValue:u,getColor:c,...d}=l;return{...r.inputProps,...d,disabled:e.disabled,value:s&&u(s),onChange:f=>{const h=f.target;h&&n("update:color",r.from(c(s??r.to(Cs),h.value)))}}})});return pe(()=>{var r;return y("div",{class:["v-color-picker-edit",e.class],style:e.style},[(r=a.value)==null?void 0:r.map(s=>y($2,s,null)),i.value.length>1&&y(vt,{icon:"$unfold",size:"x-small",variant:"plain",onClick:()=>{const s=i.value.findIndex(o=>o.name===e.mode);n("update:mode",i.value[(s+1)%i.value.length].name)}},null)])}),{}}}),Vm=Symbol.for("vuetify:v-slider");function uh(e,t,n){const i=n==="vertical",a=t.getBoundingClientRect(),r="touches"in e?e.touches[0]:e;return i?r.clientY-(a.top+a.height/2):r.clientX-(a.left+a.width/2)}function q2(e,t){return"touches"in e&&e.touches.length?e.touches[0][t]:"changedTouches"in e&&e.changedTouches.length?e.changedTouches[0][t]:e[t]}const tx=Y({disabled:{type:Boolean,default:null},error:Boolean,readonly:{type:Boolean,default:null},max:{type:[Number,String],default:100},min:{type:[Number,String],default:0},step:{type:[Number,String],default:0},thumbColor:String,thumbLabel:{type:[Boolean,String],default:void 0,validator:e=>typeof e=="boolean"||e==="always"},thumbSize:{type:[Number,String],default:20},showTicks:{type:[Boolean,String],default:!1,validator:e=>typeof e=="boolean"||e==="always"},ticks:{type:[Array,Object]},tickSize:{type:[Number,String],default:2},color:String,trackColor:String,trackFillColor:String,trackSize:{type:[Number,String],default:4},direction:{type:String,default:"horizontal",validator:e=>["vertical","horizontal"].includes(e)},reverse:Boolean,...Vt(),...sn({elevation:2}),ripple:{type:Boolean,default:!0}},"Slider"),nx=e=>{const t=A(()=>parseFloat(e.min)),n=A(()=>parseFloat(e.max)),i=A(()=>Number(e.step)>0?parseFloat(e.step):0),a=A(()=>Math.max(jg(i.value),jg(t.value)));function r(s){if(s=parseFloat(s),i.value<=0)return s;const o=qt(s,t.value,n.value),l=t.value%i.value,u=Math.round((o-l)/i.value)*i.value+l;return parseFloat(Math.min(u,n.value).toFixed(a.value))}return{min:t,max:n,step:i,decimals:a,roundValue:r}},ix=e=>{let{props:t,steps:n,onSliderStart:i,onSliderMove:a,onSliderEnd:r,getActiveThumb:s}=e;const{isRtl:o}=rn(),l=se(t,"reverse"),u=A(()=>t.direction==="vertical"),c=A(()=>u.value!==l.value),{min:d,max:f,step:h,decimals:g,roundValue:p}=n,m=A(()=>parseInt(t.thumbSize,10)),v=A(()=>parseInt(t.tickSize,10)),_=A(()=>parseInt(t.trackSize,10)),M=A(()=>(f.value-d.value)/h.value),x=se(t,"disabled"),C=A(()=>t.error||t.disabled?void 0:t.thumbColor??t.color),T=A(()=>t.error||t.disabled?void 0:t.trackColor??t.color),P=A(()=>t.error||t.disabled?void 0:t.trackFillColor??t.color),w=Me(!1),b=Me(0),S=_e(),E=_e();function R(ae){var q;const Q=(q=S.value)==null?void 0:q.$el;if(!Q)return;const ve=t.direction==="vertical",Ge=ve?"top":"left",Ae=ve?"height":"width",be=ve?"clientY":"clientX",{[Ge]:N,[Ae]:V}=Q.getBoundingClientRect(),I=q2(ae,be);let re=Math.min(Math.max((I-N-b.value)/V,0),1)||0;return(ve?c.value:c.value!==o.value)&&(re=1-re),p(d.value+re*(f.value-d.value))}const L=ae=>{const Q=R(ae);Q!=null&&r({value:Q}),w.value=!1,b.value=0},O=ae=>{const Q=R(ae);E.value=s(ae),E.value&&(w.value=!0,E.value.contains(ae.target)?b.value=uh(ae,E.value,t.direction):(b.value=0,Q!=null&&a({value:Q})),Q!=null&&i({value:Q}),ft(()=>{var ve;return(ve=E.value)==null?void 0:ve.focus()}))},G={passive:!0,capture:!0};function U(ae){const Q=R(ae);Q!=null&&a({value:Q})}function j(ae){ae.stopPropagation(),ae.preventDefault(),L(ae),window.removeEventListener("mousemove",U,G),window.removeEventListener("mouseup",j)}function B(ae){var Q;L(ae),window.removeEventListener("touchmove",U,G),(Q=ae.target)==null||Q.removeEventListener("touchend",B)}function X(ae){var Q;O(ae),window.addEventListener("touchmove",U,G),(Q=ae.target)==null||Q.addEventListener("touchend",B,{passive:!1})}function W(ae){ae.button===0&&(ae.preventDefault(),O(ae),window.addEventListener("mousemove",U,G),window.addEventListener("mouseup",j,{passive:!1}))}const H=ae=>{const Q=(ae-d.value)/(f.value-d.value)*100;return qt(isNaN(Q)?0:Q,0,100)},te=se(t,"showTicks"),Se=A(()=>te.value?t.ticks?Array.isArray(t.ticks)?t.ticks.map(ae=>({value:ae,position:H(ae),label:ae.toString()})):Object.keys(t.ticks).map(ae=>({value:parseFloat(ae),position:H(parseFloat(ae)),label:t.ticks[ae]})):M.value!==1/0?Bi(M.value+1).map(ae=>{const Q=d.value+ae*h.value;return{value:Q,position:H(Q)}}):[]:[]),$=A(()=>Se.value.some(ae=>{let{label:Q}=ae;return!!Q})),he={activeThumbRef:E,color:se(t,"color"),decimals:g,disabled:x,direction:se(t,"direction"),elevation:se(t,"elevation"),hasLabels:$,isReversed:l,indexFromEnd:c,min:d,max:f,mousePressed:w,numTicks:M,onSliderMousedown:W,onSliderTouchstart:X,parsedTicks:Se,parseMouseMove:R,position:H,readonly:se(t,"readonly"),rounded:se(t,"rounded"),roundValue:p,showTicks:te,startOffset:b,step:h,thumbSize:m,thumbColor:C,thumbLabel:se(t,"thumbLabel"),ticks:se(t,"ticks"),tickSize:v,trackColor:T,trackContainerRef:S,trackFillColor:P,trackSize:_,vertical:u};return Rt(Vm,he),he},j2=Y({focused:Boolean,max:{type:Number,required:!0},min:{type:Number,required:!0},modelValue:{type:Number,required:!0},position:{type:Number,required:!0},ripple:{type:[Boolean,Object],default:!0},name:String,...Ie()},"VSliderThumb"),ch=de()({name:"VSliderThumb",directives:{Ripple:xa},props:j2(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n,emit:i}=t;const a=ot(Vm),{isRtl:r,rtlClasses:s}=rn();if(!a)throw new Error("[Vuetify] v-slider-thumb must be used inside v-slider or v-range-slider");const{thumbColor:o,step:l,disabled:u,thumbSize:c,thumbLabel:d,direction:f,isReversed:h,vertical:g,readonly:p,elevation:m,mousePressed:v,decimals:_,indexFromEnd:M}=a,x=A(()=>u.value?void 0:m.value),{elevationClasses:C}=pn(x),{textColorClasses:T,textColorStyles:P}=bn(o),{pageup:w,pagedown:b,end:S,home:E,left:R,right:L,down:O,up:G}=Bf,U=[w,b,S,E,R,L,O,G],j=A(()=>l.value?[1,2,3]:[1,5,10]);function B(W,H){if(!U.includes(W.key))return;W.preventDefault();const te=l.value||.1,Se=(e.max-e.min)/te;if([R,L,O,G].includes(W.key)){const he=(g.value?[r.value?R:L,h.value?O:G]:M.value!==r.value?[R,G]:[L,G]).includes(W.key)?1:-1,ae=W.shiftKey?2:W.ctrlKey?1:0;H=H+he*te*j.value[ae]}else if(W.key===E)H=e.min;else if(W.key===S)H=e.max;else{const $=W.key===b?1:-1;H=H-$*te*(Se>100?Se/10:10)}return Math.max(e.min,Math.min(e.max,H))}function X(W){const H=B(W,e.modelValue);H!=null&&i("update:modelValue",H)}return pe(()=>{const W=Re(M.value?100-e.position:e.position,"%");return y("div",{class:["v-slider-thumb",{"v-slider-thumb--focused":e.focused,"v-slider-thumb--pressed":e.focused&&v.value},e.class,s.value],style:[{"--v-slider-thumb-position":W,"--v-slider-thumb-size":Re(c.value)},e.style],role:"slider",tabindex:u.value?-1:0,"aria-label":e.name,"aria-valuemin":e.min,"aria-valuemax":e.max,"aria-valuenow":e.modelValue,"aria-readonly":!!p.value,"aria-orientation":f.value,onKeydown:p.value?void 0:X},[y("div",{class:["v-slider-thumb__surface",T.value,C.value],style:{...P.value}},null),kt(y("div",{class:["v-slider-thumb__ripple",T.value],style:P.value},null),[[ni("ripple"),e.ripple,null,{circle:!0,center:!0}]]),y(pm,{origin:"bottom center"},{default:()=>{var H;return[kt(y("div",{class:"v-slider-thumb__label-container"},[y("div",{class:["v-slider-thumb__label"]},[y("div",null,[((H=n["thumb-label"])==null?void 0:H.call(n,{modelValue:e.modelValue}))??e.modelValue.toFixed(l.value?_.value:1)])])]),[[vi,d.value&&e.focused||d.value==="always"]])]}})])}),{}}}),K2=Y({start:{type:Number,required:!0},stop:{type:Number,required:!0},...Ie()},"VSliderTrack"),ax=de()({name:"VSliderTrack",props:K2(),emits:{},setup(e,t){let{slots:n}=t;const i=ot(Vm);if(!i)throw new Error("[Vuetify] v-slider-track must be inside v-slider or v-range-slider");const{color:a,parsedTicks:r,rounded:s,showTicks:o,tickSize:l,trackColor:u,trackFillColor:c,trackSize:d,vertical:f,min:h,max:g,indexFromEnd:p}=i,{roundedClasses:m}=Gt(s),{backgroundColorClasses:v,backgroundColorStyles:_}=wt(c),{backgroundColorClasses:M,backgroundColorStyles:x}=wt(u),C=A(()=>`inset-${f.value?"block":"inline"}-${p.value?"end":"start"}`),T=A(()=>f.value?"height":"width"),P=A(()=>({[C.value]:"0%",[T.value]:"100%"})),w=A(()=>e.stop-e.start),b=A(()=>({[C.value]:Re(e.start,"%"),[T.value]:Re(w.value,"%")})),S=A(()=>o.value?(f.value?r.value.slice().reverse():r.value).map((R,L)=>{var G;const O=R.value!==h.value&&R.value!==g.value?Re(R.position,"%"):void 0;return y("div",{key:R.value,class:["v-slider-track__tick",{"v-slider-track__tick--filled":R.position>=e.start&&R.position<=e.stop,"v-slider-track__tick--first":R.value===h.value,"v-slider-track__tick--last":R.value===g.value}],style:{[C.value]:O}},[(R.label||n["tick-label"])&&y("div",{class:"v-slider-track__tick-label"},[((G=n["tick-label"])==null?void 0:G.call(n,{tick:R,index:L}))??R.label])])}):[]);return pe(()=>y("div",{class:["v-slider-track",m.value,e.class],style:[{"--v-slider-track-size":Re(d.value),"--v-slider-tick-size":Re(l.value)},e.style]},[y("div",{class:["v-slider-track__background",M.value,{"v-slider-track__background--opacity":!!a.value||!c.value}],style:{...P.value,...x.value}},null),y("div",{class:["v-slider-track__fill",v.value],style:{...b.value,..._.value}},null),o.value&&y("div",{class:["v-slider-track__ticks",{"v-slider-track__ticks--always-show":o.value==="always"}]},[S.value])])),{}}}),Z2=Y({...ml(),...tx(),...Ma(),modelValue:{type:[Number,String],default:0}},"VSlider"),dh=de()({name:"VSlider",props:Z2(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,start:e=>!0,end:e=>!0},setup(e,t){let{slots:n,emit:i}=t;const a=_e(),{rtlClasses:r}=rn(),s=nx(e),o=He(e,"modelValue",void 0,T=>s.roundValue(T??s.min.value)),{min:l,max:u,mousePressed:c,roundValue:d,onSliderMousedown:f,onSliderTouchstart:h,trackContainerRef:g,position:p,hasLabels:m,readonly:v}=ix({props:e,steps:s,onSliderStart:()=>{i("start",o.value)},onSliderEnd:T=>{let{value:P}=T;const w=d(P);o.value=w,i("end",w)},onSliderMove:T=>{let{value:P}=T;return o.value=d(P)},getActiveThumb:()=>{var T;return(T=a.value)==null?void 0:T.$el}}),{isFocused:_,focus:M,blur:x}=Sa(e),C=A(()=>p(o.value));return pe(()=>{const T=xn.filterProps(e),P=!!(e.label||n.label||n.prepend);return y(xn,ge({class:["v-slider",{"v-slider--has-labels":!!n["tick-label"]||m.value,"v-slider--focused":_.value,"v-slider--pressed":c.value,"v-slider--disabled":e.disabled},r.value,e.class],style:e.style},T,{focused:_.value}),{...n,prepend:P?w=>{var b,S;return y(Ne,null,[((b=n.label)==null?void 0:b.call(n,w))??(e.label?y(no,{id:w.id.value,class:"v-slider__label",text:e.label},null):void 0),(S=n.prepend)==null?void 0:S.call(n,w)])}:void 0,default:w=>{let{id:b,messagesId:S}=w;return y("div",{class:"v-slider__container",onMousedown:v.value?void 0:f,onTouchstartPassive:v.value?void 0:h},[y("input",{id:b.value,name:e.name||b.value,disabled:!!e.disabled,readonly:!!e.readonly,tabindex:"-1",value:o.value},null),y(ax,{ref:g,start:0,stop:C.value},{"tick-label":n["tick-label"]}),y(ch,{ref:a,"aria-describedby":S.value,focused:_.value,min:l.value,max:u.value,modelValue:o.value,"onUpdate:modelValue":E=>o.value=E,position:C.value,elevation:e.elevation,onFocus:M,onBlur:x,ripple:e.ripple,name:e.name},{"thumb-label":n["thumb-label"]})])}})}),{}}}),J2=Y({color:{type:Object},disabled:Boolean,hideAlpha:Boolean,...Ie()},"VColorPickerPreview"),Q2=ii({name:"VColorPickerPreview",props:J2(),emits:{"update:color":e=>!0},setup(e,t){let{emit:n}=t;const i=new AbortController;$r(()=>i.abort());async function a(){if(!$g)return;const r=new window.EyeDropper;try{const s=await r.open({signal:i.signal}),o=ol(ei(s.sRGBHex));n("update:color",{...e.color??Cs,...o})}catch{}}return pe(()=>{var r,s;return y("div",{class:["v-color-picker-preview",{"v-color-picker-preview--hide-alpha":e.hideAlpha},e.class],style:e.style},[$g&&y("div",{class:"v-color-picker-preview__eye-dropper",key:"eyeDropper"},[y(vt,{onClick:a,icon:"$eyeDropper",variant:"plain",density:"comfortable"},null)]),y("div",{class:"v-color-picker-preview__dot"},[y("div",{style:{background:pb(e.color??Cs)}},null)]),y("div",{class:"v-color-picker-preview__sliders"},[y(dh,{class:"v-color-picker-preview__track v-color-picker-preview__hue",modelValue:(r=e.color)==null?void 0:r.h,"onUpdate:modelValue":o=>n("update:color",{...e.color??Cs,h:o}),step:0,min:0,max:360,disabled:e.disabled,thumbSize:14,trackSize:8,trackFillColor:"white",hideDetails:!0},null),!e.hideAlpha&&y(dh,{class:"v-color-picker-preview__track v-color-picker-preview__alpha",modelValue:((s=e.color)==null?void 0:s.a)??1,"onUpdate:modelValue":o=>n("update:color",{...e.color??Cs,a:o}),step:1/256,min:0,max:1,disabled:e.disabled,thumbSize:14,trackSize:8,trackFillColor:"white",hideDetails:!0},null)])])}),{}}}),eV={base:"#f44336",lighten5:"#ffebee",lighten4:"#ffcdd2",lighten3:"#ef9a9a",lighten2:"#e57373",lighten1:"#ef5350",darken1:"#e53935",darken2:"#d32f2f",darken3:"#c62828",darken4:"#b71c1c",accent1:"#ff8a80",accent2:"#ff5252",accent3:"#ff1744",accent4:"#d50000"},tV={base:"#e91e63",lighten5:"#fce4ec",lighten4:"#f8bbd0",lighten3:"#f48fb1",lighten2:"#f06292",lighten1:"#ec407a",darken1:"#d81b60",darken2:"#c2185b",darken3:"#ad1457",darken4:"#880e4f",accent1:"#ff80ab",accent2:"#ff4081",accent3:"#f50057",accent4:"#c51162"},nV={base:"#9c27b0",lighten5:"#f3e5f5",lighten4:"#e1bee7",lighten3:"#ce93d8",lighten2:"#ba68c8",lighten1:"#ab47bc",darken1:"#8e24aa",darken2:"#7b1fa2",darken3:"#6a1b9a",darken4:"#4a148c",accent1:"#ea80fc",accent2:"#e040fb",accent3:"#d500f9",accent4:"#aa00ff"},iV={base:"#673ab7",lighten5:"#ede7f6",lighten4:"#d1c4e9",lighten3:"#b39ddb",lighten2:"#9575cd",lighten1:"#7e57c2",darken1:"#5e35b1",darken2:"#512da8",darken3:"#4527a0",darken4:"#311b92",accent1:"#b388ff",accent2:"#7c4dff",accent3:"#651fff",accent4:"#6200ea"},aV={base:"#3f51b5",lighten5:"#e8eaf6",lighten4:"#c5cae9",lighten3:"#9fa8da",lighten2:"#7986cb",lighten1:"#5c6bc0",darken1:"#3949ab",darken2:"#303f9f",darken3:"#283593",darken4:"#1a237e",accent1:"#8c9eff",accent2:"#536dfe",accent3:"#3d5afe",accent4:"#304ffe"},rV={base:"#2196f3",lighten5:"#e3f2fd",lighten4:"#bbdefb",lighten3:"#90caf9",lighten2:"#64b5f6",lighten1:"#42a5f5",darken1:"#1e88e5",darken2:"#1976d2",darken3:"#1565c0",darken4:"#0d47a1",accent1:"#82b1ff",accent2:"#448aff",accent3:"#2979ff",accent4:"#2962ff"},sV={base:"#03a9f4",lighten5:"#e1f5fe",lighten4:"#b3e5fc",lighten3:"#81d4fa",lighten2:"#4fc3f7",lighten1:"#29b6f6",darken1:"#039be5",darken2:"#0288d1",darken3:"#0277bd",darken4:"#01579b",accent1:"#80d8ff",accent2:"#40c4ff",accent3:"#00b0ff",accent4:"#0091ea"},oV={base:"#00bcd4",lighten5:"#e0f7fa",lighten4:"#b2ebf2",lighten3:"#80deea",lighten2:"#4dd0e1",lighten1:"#26c6da",darken1:"#00acc1",darken2:"#0097a7",darken3:"#00838f",darken4:"#006064",accent1:"#84ffff",accent2:"#18ffff",accent3:"#00e5ff",accent4:"#00b8d4"},lV={base:"#009688",lighten5:"#e0f2f1",lighten4:"#b2dfdb",lighten3:"#80cbc4",lighten2:"#4db6ac",lighten1:"#26a69a",darken1:"#00897b",darken2:"#00796b",darken3:"#00695c",darken4:"#004d40",accent1:"#a7ffeb",accent2:"#64ffda",accent3:"#1de9b6",accent4:"#00bfa5"},uV={base:"#4caf50",lighten5:"#e8f5e9",lighten4:"#c8e6c9",lighten3:"#a5d6a7",lighten2:"#81c784",lighten1:"#66bb6a",darken1:"#43a047",darken2:"#388e3c",darken3:"#2e7d32",darken4:"#1b5e20",accent1:"#b9f6ca",accent2:"#69f0ae",accent3:"#00e676",accent4:"#00c853"},cV={base:"#8bc34a",lighten5:"#f1f8e9",lighten4:"#dcedc8",lighten3:"#c5e1a5",lighten2:"#aed581",lighten1:"#9ccc65",darken1:"#7cb342",darken2:"#689f38",darken3:"#558b2f",darken4:"#33691e",accent1:"#ccff90",accent2:"#b2ff59",accent3:"#76ff03",accent4:"#64dd17"},dV={base:"#cddc39",lighten5:"#f9fbe7",lighten4:"#f0f4c3",lighten3:"#e6ee9c",lighten2:"#dce775",lighten1:"#d4e157",darken1:"#c0ca33",darken2:"#afb42b",darken3:"#9e9d24",darken4:"#827717",accent1:"#f4ff81",accent2:"#eeff41",accent3:"#c6ff00",accent4:"#aeea00"},fV={base:"#ffeb3b",lighten5:"#fffde7",lighten4:"#fff9c4",lighten3:"#fff59d",lighten2:"#fff176",lighten1:"#ffee58",darken1:"#fdd835",darken2:"#fbc02d",darken3:"#f9a825",darken4:"#f57f17",accent1:"#ffff8d",accent2:"#ffff00",accent3:"#ffea00",accent4:"#ffd600"},hV={base:"#ffc107",lighten5:"#fff8e1",lighten4:"#ffecb3",lighten3:"#ffe082",lighten2:"#ffd54f",lighten1:"#ffca28",darken1:"#ffb300",darken2:"#ffa000",darken3:"#ff8f00",darken4:"#ff6f00",accent1:"#ffe57f",accent2:"#ffd740",accent3:"#ffc400",accent4:"#ffab00"},mV={base:"#ff9800",lighten5:"#fff3e0",lighten4:"#ffe0b2",lighten3:"#ffcc80",lighten2:"#ffb74d",lighten1:"#ffa726",darken1:"#fb8c00",darken2:"#f57c00",darken3:"#ef6c00",darken4:"#e65100",accent1:"#ffd180",accent2:"#ffab40",accent3:"#ff9100",accent4:"#ff6d00"},vV={base:"#ff5722",lighten5:"#fbe9e7",lighten4:"#ffccbc",lighten3:"#ffab91",lighten2:"#ff8a65",lighten1:"#ff7043",darken1:"#f4511e",darken2:"#e64a19",darken3:"#d84315",darken4:"#bf360c",accent1:"#ff9e80",accent2:"#ff6e40",accent3:"#ff3d00",accent4:"#dd2c00"},gV={base:"#795548",lighten5:"#efebe9",lighten4:"#d7ccc8",lighten3:"#bcaaa4",lighten2:"#a1887f",lighten1:"#8d6e63",darken1:"#6d4c41",darken2:"#5d4037",darken3:"#4e342e",darken4:"#3e2723"},pV={base:"#607d8b",lighten5:"#eceff1",lighten4:"#cfd8dc",lighten3:"#b0bec5",lighten2:"#90a4ae",lighten1:"#78909c",darken1:"#546e7a",darken2:"#455a64",darken3:"#37474f",darken4:"#263238"},yV={base:"#9e9e9e",lighten5:"#fafafa",lighten4:"#f5f5f5",lighten3:"#eeeeee",lighten2:"#e0e0e0",lighten1:"#bdbdbd",darken1:"#757575",darken2:"#616161",darken3:"#424242",darken4:"#212121"},_V={black:"#000000",white:"#ffffff",transparent:"#ffffff00"},bV={red:eV,pink:tV,purple:nV,deepPurple:iV,indigo:aV,blue:rV,lightBlue:sV,cyan:oV,teal:lV,green:uV,lightGreen:cV,lime:dV,yellow:fV,amber:hV,orange:mV,deepOrange:vV,brown:gV,blueGrey:pV,grey:yV,shades:_V},xV=Y({swatches:{type:Array,default:()=>SV(bV)},disabled:Boolean,color:Object,maxHeight:[Number,String],...Ie()},"VColorPickerSwatches");function SV(e){return Object.keys(e).map(t=>{const n=e[t];return n.base?[n.base,n.darken4,n.darken3,n.darken2,n.darken1,n.lighten1,n.lighten2,n.lighten3,n.lighten4,n.lighten5]:[n.black,n.white,n.transparent]})}const MV=ii({name:"VColorPickerSwatches",props:xV(),emits:{"update:color":e=>!0},setup(e,t){let{emit:n}=t;return pe(()=>y("div",{class:["v-color-picker-swatches",e.class],style:[{maxHeight:Re(e.maxHeight)},e.style]},[y("div",null,[e.swatches.map(i=>y("div",{class:"v-color-picker-swatches__swatch"},[i.map(a=>{const r=ei(a),s=ol(r),o=gb(r);return y("div",{class:"v-color-picker-swatches__color",onClick:()=>s&&n("update:color",s)},[y("div",{style:{background:o}},[e.color&&Rn(e.color,s)?y(gt,{size:"x-small",icon:"$success",color:nI(a,"#FFFFFF")>2?"white":"black"},null):void 0])])})]))])])),{}}}),Mc=Y({color:String,...Yn(),...Ie(),...Qt(),...sn(),...ba(),...eo(),...Vt(),...Je(),...dt()},"VSheet"),Br=de()({name:"VSheet",props:Mc(),setup(e,t){let{slots:n}=t;const{themeClasses:i}=pt(e),{backgroundColorClasses:a,backgroundColorStyles:r}=wt(se(e,"color")),{borderClasses:s}=ri(e),{dimensionStyles:o}=en(e),{elevationClasses:l}=pn(e),{locationStyles:u}=ts(e),{positionClasses:c}=to(e),{roundedClasses:d}=Gt(e);return pe(()=>y(e.tag,{class:["v-sheet",i.value,a.value,s.value,l.value,c.value,d.value,e.class],style:[r.value,o.value,u.value,e.style]},n)),{}}}),EV=Y({canvasHeight:{type:[String,Number],default:150},disabled:Boolean,dotSize:{type:[Number,String],default:10},hideCanvas:Boolean,hideSliders:Boolean,hideInputs:Boolean,mode:{type:String,default:"rgba",validator:e=>Object.keys(Rr).includes(e)},modes:{type:Array,default:()=>Object.keys(Rr),validator:e=>Array.isArray(e)&&e.every(t=>Object.keys(Rr).includes(t))},showSwatches:Boolean,swatches:Array,swatchesMaxHeight:{type:[Number,String],default:150},modelValue:{type:[Object,String]},...Kt(Mc({width:300}),["height","location","minHeight","maxHeight","minWidth","maxWidth"])},"VColorPicker"),wV=ii({name:"VColorPicker",props:EV(),emits:{"update:modelValue":e=>!0,"update:mode":e=>!0},setup(e){const t=He(e,"mode"),n=_e(null),i=He(e,"modelValue",void 0,l=>{if(l==null||l==="")return null;let u;try{u=ol(ei(l))}catch{return null}return u},l=>l?z2(l,e.modelValue):null),a=A(()=>i.value?{...i.value,h:n.value??i.value.h}:null),{rtlClasses:r}=rn();let s=!0;Te(i,l=>{if(!s){s=!0;return}l&&(n.value=l.h)},{immediate:!0});const o=l=>{s=!1,n.value=l.h,i.value=l};return js(()=>{e.modes.includes(t.value)||(t.value=e.modes[0])}),zt({VSlider:{color:void 0,trackColor:void 0,trackFillColor:void 0}}),pe(()=>{const l=Br.filterProps(e);return y(Br,ge({rounded:e.rounded,elevation:e.elevation,theme:e.theme,class:["v-color-picker",r.value,e.class],style:[{"--v-color-picker-color-hsv":pb({...a.value??Cs,a:1})},e.style]},l,{maxWidth:e.width}),{default:()=>[!e.hideCanvas&&y(U2,{key:"canvas",color:a.value,"onUpdate:color":o,disabled:e.disabled,dotSize:e.dotSize,width:e.width,height:e.canvasHeight},null),(!e.hideSliders||!e.hideInputs)&&y("div",{key:"controls",class:"v-color-picker__controls"},[!e.hideSliders&&y(Q2,{key:"preview",color:a.value,"onUpdate:color":o,hideAlpha:!t.value.endsWith("a"),disabled:e.disabled},null),!e.hideInputs&&y(Y2,{key:"edit",modes:e.modes,mode:t.value,"onUpdate:mode":u=>t.value=u,color:a.value,"onUpdate:color":o,disabled:e.disabled},null)]),e.showSwatches&&y(MV,{key:"swatches",color:a.value,"onUpdate:color":o,maxHeight:e.swatchesMaxHeight,swatches:e.swatches,disabled:e.disabled},null)]})}),{}}});function TV(e,t,n){if(t==null)return e;if(Array.isArray(t))throw new Error("Multiple matches is not implemented");return typeof t=="number"&&~t?y(Ne,null,[y("span",{class:"v-combobox__unmask"},[e.substr(0,t)]),y("span",{class:"v-combobox__mask"},[e.substr(t,n)]),y("span",{class:"v-combobox__unmask"},[e.substr(t+n)])]):e}const CV=Y({autoSelectFirst:{type:[Boolean,String]},clearOnSelect:{type:Boolean,default:!0},delimiters:Array,...yl({filterKeys:["title"]}),...Dm({hideNoData:!0,returnObject:!0}),...Kt(_c({modelValue:null,role:"combobox"}),["validationValue","dirty","appendInnerIcon"]),...Di({transition:!1})},"VCombobox"),AV=de()({name:"VCombobox",props:CV(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:search":e=>!0,"update:menu":e=>!0},setup(e,t){var N;let{emit:n,slots:i}=t;const{t:a}=$t(),r=_e(),s=Me(!1),o=Me(!0),l=Me(!1),u=_e(),c=_e(),d=He(e,"menu"),f=A({get:()=>d.value,set:V=>{var I;d.value&&!V&&((I=u.value)!=null&&I.ΨopenChildren.size)||(d.value=V)}}),h=Me(-1);let g=!1;const p=A(()=>{var V;return(V=r.value)==null?void 0:V.color}),m=A(()=>f.value?e.closeText:e.openText),{items:v,transformIn:_,transformOut:M}=Tm(e),{textColorClasses:x,textColorStyles:C}=bn(p),T=He(e,"modelValue",[],V=>_(Nt(V)),V=>{const I=M(V);return e.multiple?I:I[0]??null}),P=gc(e),w=A(()=>!!(e.chips||i.chip)),b=A(()=>w.value||!!i.selection),S=Me(!e.multiple&&!b.value?((N=T.value[0])==null?void 0:N.title)??"":""),E=A({get:()=>S.value,set:V=>{var I;if(S.value=V??"",!e.multiple&&!b.value&&(T.value=[Fa(e,V)]),V&&e.multiple&&((I=e.delimiters)!=null&&I.length)){const re=V.split(new RegExp(`(?:${e.delimiters.join("|")})+`));re.length>1&&(re.forEach(q=>{q=q.trim(),q&&ve(Fa(e,q))}),S.value="")}V||(h.value=-1),o.value=!V}}),R=A(()=>typeof e.counterValue=="function"?e.counterValue(T.value):typeof e.counterValue=="number"?e.counterValue:e.multiple?T.value.length:E.value.length);Te(S,V=>{g?ft(()=>g=!1):s.value&&!f.value&&(f.value=!0),n("update:search",V)}),Te(T,V=>{var I;!e.multiple&&!b.value&&(S.value=((I=V[0])==null?void 0:I.title)??"")});const{filteredItems:L,getMatches:O}=_l(e,v,()=>o.value?"":E.value),G=A(()=>e.hideSelected?L.value.filter(V=>!T.value.some(I=>I.value===V.value)):L.value),U=A(()=>T.value.map(V=>V.value)),j=A(()=>{var I;return(e.autoSelectFirst===!0||e.autoSelectFirst==="exact"&&E.value===((I=G.value[0])==null?void 0:I.title))&&G.value.length>0&&!o.value&&!l.value}),B=A(()=>e.hideNoData&&!G.value.length||P.isReadonly.value||P.isDisabled.value),X=_e(),W=Im(X,r);function H(V){g=!0,e.openOnClear&&(f.value=!0)}function te(){B.value||(f.value=!0)}function Se(V){B.value||(s.value&&(V.preventDefault(),V.stopPropagation()),f.value=!f.value)}function $(V){var I;V.key!==" "&&Ws(V)&&((I=r.value)==null||I.focus())}function he(V){var q;if(ER(V)||P.isReadonly.value)return;const I=r.value.selectionStart,re=T.value.length;if(["Enter","ArrowDown","ArrowUp"].includes(V.key)&&V.preventDefault(),["Enter","ArrowDown"].includes(V.key)&&(f.value=!0),["Escape"].includes(V.key)&&(f.value=!1),["Enter","Escape","Tab"].includes(V.key)&&(j.value&&["Enter","Tab"].includes(V.key)&&!T.value.some(Z=>{let{value:oe}=Z;return oe===G.value[0].value})&&ve(L.value[0]),o.value=!0),V.key==="ArrowDown"&&j.value&&((q=X.value)==null||q.focus("next")),V.key==="Enter"&&E.value&&(ve(Fa(e,E.value)),b.value&&(S.value="")),["Backspace","Delete"].includes(V.key)){if(!e.multiple&&b.value&&T.value.length>0&&!E.value)return ve(T.value[0],!1);if(~h.value){V.preventDefault();const Z=h.value;ve(T.value[h.value],!1),h.value=Z>=re-1?re-2:Z}else V.key==="Backspace"&&!E.value&&(h.value=re-1);return}if(e.multiple)if(V.key==="ArrowLeft"){if(h.value<0&&I>0)return;const Z=h.value>-1?h.value-1:re-1;T.value[Z]?h.value=Z:(h.value=-1,r.value.setSelectionRange(E.value.length,E.value.length))}else if(V.key==="ArrowRight"){if(h.value<0)return;const Z=h.value+1;T.value[Z]?h.value=Z:(h.value=-1,r.value.setSelectionRange(0,0))}else~h.value&&Ws(V)&&(h.value=-1)}function ae(){var V;e.eager&&((V=c.value)==null||V.calculateVisibleItems())}function Q(){var V;s.value&&(o.value=!0,(V=r.value)==null||V.focus())}function ve(V){let I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!(!V||V.props.disabled))if(e.multiple){const re=T.value.findIndex(Z=>(e.valueComparator||Rn)(Z.value,V.value)),q=I??!~re;if(~re){const Z=q?[...T.value,V]:[...T.value];Z.splice(re,1),T.value=Z}else q&&(T.value=[...T.value,V]);e.clearOnSelect&&(E.value="")}else{const re=I!==!1;T.value=re?[V]:[],S.value=re&&!b.value?V.title:"",ft(()=>{f.value=!1,o.value=!0})}}function Ge(V){s.value=!0,setTimeout(()=>{l.value=!0})}function Ae(V){l.value=!1}function be(V){(V==null||V===""&&!e.multiple&&!b.value)&&(T.value=[])}return Te(s,(V,I)=>{if(!(V||V===I)&&(h.value=-1,f.value=!1,E.value)){if(e.multiple){ve(Fa(e,E.value));return}if(!b.value)return;T.value.some(re=>{let{title:q}=re;return q===E.value})?S.value="":ve(Fa(e,E.value))}}),Te(f,()=>{if(!e.hideSelected&&f.value&&T.value.length){const V=G.value.findIndex(I=>T.value.some(re=>(e.valueComparator||Rn)(re.value,I.value)));mt&&window.requestAnimationFrame(()=>{var I;V>=0&&((I=c.value)==null||I.scrollToIndex(V))})}}),Te(()=>e.items,(V,I)=>{f.value||s.value&&!I.length&&V.length&&(f.value=!0)}),pe(()=>{const V=!!(!e.hideNoData||G.value.length||i["prepend-item"]||i["append-item"]||i["no-data"]),I=T.value.length>0,re=Nr.filterProps(e);return y(Nr,ge({ref:r},re,{modelValue:E.value,"onUpdate:modelValue":[q=>E.value=q,be],focused:s.value,"onUpdate:focused":q=>s.value=q,validationValue:T.externalValue,counterValue:R.value,dirty:I,class:["v-combobox",{"v-combobox--active-menu":f.value,"v-combobox--chips":!!e.chips,"v-combobox--selection-slot":!!b.value,"v-combobox--selecting-index":h.value>-1,[`v-combobox--${e.multiple?"multiple":"single"}`]:!0},e.class],style:e.style,readonly:P.isReadonly.value,placeholder:I?void 0:e.placeholder,"onClick:clear":H,"onMousedown:control":te,onKeydown:he}),{...i,default:()=>y(Ne,null,[y(qs,ge({ref:u,modelValue:f.value,"onUpdate:modelValue":q=>f.value=q,activator:"parent",contentClass:"v-combobox__content",disabled:B.value,eager:e.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:e.transition,onAfterEnter:ae,onAfterLeave:Q},e.menuProps),{default:()=>[V&&y(pc,ge({ref:X,selected:U.value,selectStrategy:e.multiple?"independent":"single-independent",onMousedown:q=>q.preventDefault(),onKeydown:$,onFocusin:Ge,onFocusout:Ae,tabindex:"-1","aria-live":"polite",color:e.itemColor??e.color},W,e.listProps),{default:()=>{var q,Z,oe;return[(q=i["prepend-item"])==null?void 0:q.call(i),!G.value.length&&!e.hideNoData&&(((Z=i["no-data"])==null?void 0:Z.call(i))??y(pa,{key:"no-data",title:a(e.noDataText)},null)),y(bc,{ref:c,renderless:!0,items:G.value},{default:xe=>{var ne;let{item:ie,index:k,itemRef:D}=xe;const z=ge(ie.props,{ref:D,key:ie.value,active:j.value&&k===0?!0:void 0,onClick:()=>ve(ie,null)});return((ne=i.item)==null?void 0:ne.call(i,{item:ie,index:k,props:z}))??y(pa,ge(z,{role:"option"}),{prepend:ue=>{let{isSelected:le}=ue;return y(Ne,null,[e.multiple&&!e.hideSelected?y(ga,{key:ie.value,modelValue:le,ripple:!1,tabindex:"-1"},null):void 0,ie.props.prependAvatar&&y(mi,{image:ie.props.prependAvatar},null),ie.props.prependIcon&&y(gt,{icon:ie.props.prependIcon},null)])},title:()=>{var ue,le;return o.value?ie.title:TV(ie.title,(ue=O(ie))==null?void 0:ue.title,((le=E.value)==null?void 0:le.length)??0)}})}}),(oe=i["append-item"])==null?void 0:oe.call(i)]}})]}),T.value.map((q,Z)=>{function oe(D){D.stopPropagation(),D.preventDefault(),ve(q,!1)}const xe={"onClick:close":oe,onKeydown(D){D.key!=="Enter"&&D.key!==" "||(D.preventDefault(),D.stopPropagation(),oe(D))},onMousedown(D){D.preventDefault(),D.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0},ie=w.value?!!i.chip:!!i.selection,k=ie?ac(w.value?i.chip({item:q,index:Z,props:xe}):i.selection({item:q,index:Z})):void 0;if(!(ie&&!k))return y("div",{key:q.value,class:["v-combobox__selection",Z===h.value&&["v-combobox__selection--selected",x.value]],style:Z===h.value?C.value:{}},[w.value?i.chip?y(rt,{key:"chip-defaults",defaults:{VChip:{closable:e.closableChips,size:"small",text:q.title}}},{default:()=>[k]}):y(io,ge({key:"chip",closable:e.closableChips,size:"small",text:q.title,disabled:q.props.disabled},xe),null):k??y("span",{class:"v-combobox__selection-text"},[q.title,e.multiple&&Z<T.value.length-1&&y("span",{class:"v-combobox__selection-comma"},[ca(",")])])])})]),"append-inner":function(){var xe;for(var q=arguments.length,Z=new Array(q),oe=0;oe<q;oe++)Z[oe]=arguments[oe];return y(Ne,null,[(xe=i["append-inner"])==null?void 0:xe.call(i,...Z),(!e.hideNoData||e.items.length)&&e.menuIcon?y(gt,{class:"v-combobox__menu-icon",icon:e.menuIcon,onMousedown:Se,onClick:lb,"aria-label":a(m.value),title:a(m.value),tabindex:"-1"},null):void 0])}})}),yi({isFocused:s,isPristine:o,menu:f,search:E,selectionIndex:h,filteredItems:L,select:ve},r)}}),PV=Y({modelValue:null,color:String,cancelText:{type:String,default:"$vuetify.confirmEdit.cancel"},okText:{type:String,default:"$vuetify.confirmEdit.ok"}},"VConfirmEdit"),RV=de()({name:"VConfirmEdit",props:PV(),emits:{cancel:()=>!0,save:e=>!0,"update:modelValue":e=>!0},setup(e,t){let{emit:n,slots:i}=t;const a=He(e,"modelValue"),r=_e();Bt(()=>{r.value=structuredClone(Ye(a.value))});const{t:s}=$t(),o=A(()=>Rn(a.value,r.value));function l(){a.value=r.value,n("save",r.value)}function u(){r.value=structuredClone(Ye(a.value)),n("cancel")}function c(f){return y(Ne,null,[y(vt,ge({disabled:o.value,variant:"text",color:e.color,onClick:u,text:s(e.cancelText)},f),null),y(vt,ge({disabled:o.value,variant:"text",color:e.color,onClick:l,text:s(e.okText)},f),null)])}let d=!1;return pe(()=>{var f;return y(Ne,null,[(f=i.default)==null?void 0:f.call(i,{model:r,save:l,cancel:u,isPristine:o.value,get actions(){return d=!0,c}}),!d&&c()])}),{save:l,cancel:u,isPristine:o}}}),rx=Y({expandOnClick:Boolean,showExpand:Boolean,expanded:{type:Array,default:()=>[]}},"DataTable-expand"),sx=Symbol.for("vuetify:datatable:expanded");function Ec(e){const t=se(e,"expandOnClick"),n=He(e,"expanded",e.expanded,o=>new Set(o),o=>[...o.values()]);function i(o,l){const u=new Set(n.value);l?u.add(o.value):u.delete(o.value),n.value=u}function a(o){return n.value.has(o.value)}function r(o){i(o,!a(o))}const s={expand:i,expanded:n,expandOnClick:t,isExpanded:a,toggleExpand:r};return Rt(sx,s),s}function ox(){const e=ot(sx);if(!e)throw new Error("foo");return e}const Fm=Y({groupBy:{type:Array,default:()=>[]}},"DataTable-group"),lx=Symbol.for("vuetify:data-table-group");function Nm(e){return{groupBy:He(e,"groupBy")}}function wc(e){const{disableSort:t,groupBy:n,sortBy:i}=e,a=_e(new Set),r=A(()=>n.value.map(c=>({...c,order:c.order??!1})).concat(t!=null&&t.value?[]:i.value));function s(c){return a.value.has(c.id)}function o(c){const d=new Set(a.value);s(c)?d.delete(c.id):d.add(c.id),a.value=d}function l(c){function d(f){const h=[];for(const g of f.items)"type"in g&&g.type==="group"?h.push(...d(g)):h.push(g);return[...new Set(h)]}return d({items:c})}const u={sortByWithGroups:r,toggleGroup:o,opened:a,groupBy:n,extractRows:l,isGroupOpen:s};return Rt(lx,u),u}function ux(){const e=ot(lx);if(!e)throw new Error("Missing group!");return e}function IV(e,t){if(!e.length)return[];const n=new Map;for(const i of e){const a=Fr(i.raw,t);n.has(a)||n.set(a,[]),n.get(a).push(i)}return n}function cx(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"root";if(!t.length)return[];const a=IV(e,t[0]),r=[],s=t.slice(1);return a.forEach((o,l)=>{const u=t[0],c=`${i}_${u}_${l}`;r.push({depth:n,id:c,key:u,value:l,items:s.length?cx(o,s,n+1,c):o,type:"group"})}),r}function dx(e,t){const n=[];for(const i of e)"type"in i&&i.type==="group"?(i.value!=null&&n.push(i),(t.has(i.id)||i.value==null)&&n.push(...dx(i.items,t))):n.push(i);return n}function Tc(e,t,n){return{flatItems:A(()=>{if(!t.value.length)return e.value;const a=cx(e.value,t.value.map(r=>r.key));return dx(a,n.value)})}}function Cc(e){let{page:t,itemsPerPage:n,sortBy:i,groupBy:a,search:r}=e;const s=Ht("VDataTable"),o=A(()=>({page:t.value,itemsPerPage:n.value,sortBy:i.value,groupBy:a.value,search:r.value}));let l=null;Te(o,()=>{Rn(l,o.value)||(l&&l.search!==o.value.search&&(t.value=1),s.emit("update:options",o.value),l=o.value)},{deep:!0,immediate:!0})}const Om=Y({page:{type:[Number,String],default:1},itemsPerPage:{type:[Number,String],default:10}},"DataTable-paginate"),fx=Symbol.for("vuetify:data-table-pagination");function Um(e){const t=He(e,"page",void 0,i=>Number(i??1)),n=He(e,"itemsPerPage",void 0,i=>Number(i??10));return{page:t,itemsPerPage:n}}function Bm(e){const{page:t,itemsPerPage:n,itemsLength:i}=e,a=A(()=>n.value===-1?0:n.value*(t.value-1)),r=A(()=>n.value===-1?i.value:Math.min(i.value,a.value+n.value)),s=A(()=>n.value===-1||i.value===0?1:Math.ceil(i.value/n.value));Te([t,s],()=>{t.value>s.value&&(t.value=s.value)});function o(f){n.value=f,t.value=1}function l(){t.value=qt(t.value+1,1,s.value)}function u(){t.value=qt(t.value-1,1,s.value)}function c(f){t.value=qt(f,1,s.value)}const d={page:t,itemsPerPage:n,startIndex:a,stopIndex:r,pageCount:s,itemsLength:i,nextPage:l,prevPage:u,setPage:c,setItemsPerPage:o};return Rt(fx,d),d}function DV(){const e=ot(fx);if(!e)throw new Error("Missing pagination!");return e}function hx(e){const t=Ht("usePaginatedItems"),{items:n,startIndex:i,stopIndex:a,itemsPerPage:r}=e,s=A(()=>r.value<=0?n.value:n.value.slice(i.value,a.value));return Te(s,o=>{t.emit("update:currentItems",o)},{immediate:!0}),{paginatedItems:s}}const LV={showSelectAll:!1,allSelected:()=>[],select:e=>{var i;let{items:t,value:n}=e;return new Set(n?[(i=t[0])==null?void 0:i.value]:[])},selectAll:e=>{let{selected:t}=e;return t}},mx={showSelectAll:!0,allSelected:e=>{let{currentPage:t}=e;return t},select:e=>{let{items:t,value:n,selected:i}=e;for(const a of t)n?i.add(a.value):i.delete(a.value);return i},selectAll:e=>{let{value:t,currentPage:n,selected:i}=e;return mx.select({items:n,value:t,selected:i})}},vx={showSelectAll:!0,allSelected:e=>{let{allItems:t}=e;return t},select:e=>{let{items:t,value:n,selected:i}=e;for(const a of t)n?i.add(a.value):i.delete(a.value);return i},selectAll:e=>{let{value:t,allItems:n,selected:i}=e;return vx.select({items:n,value:t,selected:i})}},gx=Y({showSelect:Boolean,selectStrategy:{type:[String,Object],default:"page"},modelValue:{type:Array,default:()=>[]},valueComparator:{type:Function,default:Rn}},"DataTable-select"),px=Symbol.for("vuetify:data-table-selection");function Ac(e,t){let{allItems:n,currentPage:i}=t;const a=He(e,"modelValue",e.modelValue,v=>new Set(Nt(v).map(_=>{var M;return((M=n.value.find(x=>e.valueComparator(_,x.value)))==null?void 0:M.value)??_})),v=>[...v.values()]),r=A(()=>n.value.filter(v=>v.selectable)),s=A(()=>i.value.filter(v=>v.selectable)),o=A(()=>{if(typeof e.selectStrategy=="object")return e.selectStrategy;switch(e.selectStrategy){case"single":return LV;case"all":return vx;case"page":default:return mx}});function l(v){return Nt(v).every(_=>a.value.has(_.value))}function u(v){return Nt(v).some(_=>a.value.has(_.value))}function c(v,_){const M=o.value.select({items:v,value:_,selected:new Set(a.value)});a.value=M}function d(v){c([v],!l([v]))}function f(v){const _=o.value.selectAll({value:v,allItems:r.value,currentPage:s.value,selected:new Set(a.value)});a.value=_}const h=A(()=>a.value.size>0),g=A(()=>{const v=o.value.allSelected({allItems:r.value,currentPage:s.value});return!!v.length&&l(v)}),p=A(()=>o.value.showSelectAll),m={toggleSelect:d,select:c,selectAll:f,isSelected:l,isSomeSelected:u,someSelected:h,allSelected:g,showSelectAll:p};return Rt(px,m),m}function Pc(){const e=ot(px);if(!e)throw new Error("Missing selection!");return e}const yx=Y({sortBy:{type:Array,default:()=>[]},customKeySort:Object,multiSort:Boolean,mustSort:Boolean},"DataTable-sort"),_x=Symbol.for("vuetify:data-table-sort");function Rc(e){const t=He(e,"sortBy"),n=se(e,"mustSort"),i=se(e,"multiSort");return{sortBy:t,mustSort:n,multiSort:i}}function Ic(e){const{sortBy:t,mustSort:n,multiSort:i,page:a}=e,r=l=>{if(l.key==null)return;let u=t.value.map(d=>({...d}))??[];const c=u.find(d=>d.key===l.key);c?c.order==="desc"?n.value&&u.length===1?c.order="asc":u=u.filter(d=>d.key!==l.key):c.order="desc":i.value?u.push({key:l.key,order:"asc"}):u=[{key:l.key,order:"asc"}],t.value=u,a&&(a.value=1)};function s(l){return!!t.value.find(u=>u.key===l.key)}const o={sortBy:t,toggleSort:r,isSorted:s};return Rt(_x,o),o}function bx(){const e=ot(_x);if(!e)throw new Error("Missing sort!");return e}function zm(e,t,n,i){const a=$t();return{sortedItems:A(()=>{var s,o;return n.value.length?kV(t.value,n.value,a.current.value,{transform:i==null?void 0:i.transform,sortFunctions:{...e.customKeySort,...(s=i==null?void 0:i.sortFunctions)==null?void 0:s.value},sortRawFunctions:(o=i==null?void 0:i.sortRawFunctions)==null?void 0:o.value}):t.value})}}function kV(e,t,n,i){const a=new Intl.Collator(n,{sensitivity:"accent",usage:"sort"});return e.map(s=>[s,i!=null&&i.transform?i.transform(s):s]).sort((s,o)=>{var l,u;for(let c=0;c<t.length;c++){let d=!1;const f=t[c].key,h=t[c].order??"asc";if(h===!1)continue;let g=Fr(s[1],f),p=Fr(o[1],f),m=s[0].raw,v=o[0].raw;if(h==="desc"&&([g,p]=[p,g],[m,v]=[v,m]),(l=i==null?void 0:i.sortRawFunctions)!=null&&l[f]){const _=i.sortRawFunctions[f](m,v);if(_==null)continue;if(d=!0,_)return _}if((u=i==null?void 0:i.sortFunctions)!=null&&u[f]){const _=i.sortFunctions[f](g,p);if(_==null)continue;if(d=!0,_)return _}if(!d){if(g instanceof Date&&p instanceof Date)return g.getTime()-p.getTime();if([g,p]=[g,p].map(_=>_!=null?_.toString().toLocaleLowerCase():_),g!==p)return eu(g)&&eu(p)?0:eu(g)?-1:eu(p)?1:!isNaN(g)&&!isNaN(p)?Number(g)-Number(p):a.compare(g,p)}}return 0}).map(s=>{let[o]=s;return o})}const VV=Y({items:{type:Array,default:()=>[]},itemValue:{type:[String,Array,Function],default:"id"},itemSelectable:{type:[String,Array,Function],default:null},returnObject:Boolean},"DataIterator-items");function FV(e,t){const n=e.returnObject?t:an(t,e.itemValue),i=an(t,e.itemSelectable,!0);return{type:"item",value:n,selectable:i,raw:t}}function NV(e,t){const n=[];for(const i of t)n.push(FV(e,i));return n}function OV(e){return{items:A(()=>NV(e,e.items))}}const UV=Y({search:String,loading:Boolean,...Ie(),...VV(),...gx(),...yx(),...Om({itemsPerPage:5}),...rx(),...Fm(),...yl(),...Je(),...Di({transition:{component:zo,hideOnLeave:!0}})},"VDataIterator"),BV=de()({name:"VDataIterator",props:UV(),emits:{"update:modelValue":e=>!0,"update:groupBy":e=>!0,"update:page":e=>!0,"update:itemsPerPage":e=>!0,"update:sortBy":e=>!0,"update:options":e=>!0,"update:expanded":e=>!0,"update:currentItems":e=>!0},setup(e,t){let{slots:n}=t;const i=He(e,"groupBy"),a=se(e,"search"),{items:r}=OV(e),{filteredItems:s}=_l(e,r,a,{transform:H=>H.raw}),{sortBy:o,multiSort:l,mustSort:u}=Rc(e),{page:c,itemsPerPage:d}=Um(e),{toggleSort:f}=Ic({sortBy:o,multiSort:l,mustSort:u,page:c}),{sortByWithGroups:h,opened:g,extractRows:p,isGroupOpen:m,toggleGroup:v}=wc({groupBy:i,sortBy:o}),{sortedItems:_}=zm(e,s,h,{transform:H=>H.raw}),{flatItems:M}=Tc(_,i,g),x=A(()=>M.value.length),{startIndex:C,stopIndex:T,pageCount:P,prevPage:w,nextPage:b,setItemsPerPage:S,setPage:E}=Bm({page:c,itemsPerPage:d,itemsLength:x}),{paginatedItems:R}=hx({items:M,startIndex:C,stopIndex:T,itemsPerPage:d}),L=A(()=>p(R.value)),{isSelected:O,select:G,selectAll:U,toggleSelect:j}=Ac(e,{allItems:r,currentPage:L}),{isExpanded:B,toggleExpand:X}=Ec(e);Cc({page:c,itemsPerPage:d,sortBy:o,groupBy:i,search:a});const W=A(()=>({page:c.value,itemsPerPage:d.value,sortBy:o.value,pageCount:P.value,toggleSort:f,prevPage:w,nextPage:b,setPage:E,setItemsPerPage:S,isSelected:O,select:G,selectAll:U,toggleSelect:j,isExpanded:B,toggleExpand:X,isGroupOpen:m,toggleGroup:v,items:L.value,groupedItems:R.value}));return pe(()=>y(e.tag,{class:["v-data-iterator",{"v-data-iterator--loading":e.loading},e.class],style:e.style},{default:()=>{var H,te;return[(H=n.header)==null?void 0:H.call(n,W.value),y(Pn,{transition:e.transition},{default:()=>{var Se,$;return[e.loading?y(dl,{key:"loader",name:"v-data-iterator",active:!0},{default:he=>{var ae;return(ae=n.loader)==null?void 0:ae.call(n,he)}}):y("div",{key:"items"},[R.value.length?($=n.default)==null?void 0:$.call(n,W.value):(Se=n["no-data"])==null?void 0:Se.call(n)])]}}),(te=n.footer)==null?void 0:te.call(n,W.value)]}})),{}}});function zV(){const e=_e([]);Fh(()=>e.value=[]);function t(n,i){e.value[i]=n}return{refs:e,updateRef:t}}const HV=Y({activeColor:String,start:{type:[Number,String],default:1},modelValue:{type:Number,default:e=>e.start},disabled:Boolean,length:{type:[Number,String],default:1,validator:e=>e%1===0},totalVisible:[Number,String],firstIcon:{type:We,default:"$first"},prevIcon:{type:We,default:"$prev"},nextIcon:{type:We,default:"$next"},lastIcon:{type:We,default:"$last"},ariaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.root"},pageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.page"},currentPageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.currentPage"},firstAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.first"},previousAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.previous"},nextAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.next"},lastAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.last"},ellipsis:{type:String,default:"..."},showFirstLastPage:Boolean,...Yn(),...Ie(),...fn(),...sn(),...Vt(),...$i(),...Je({tag:"nav"}),...dt(),...pi({variant:"text"})},"VPagination"),fh=de()({name:"VPagination",props:HV(),emits:{"update:modelValue":e=>!0,first:e=>!0,prev:e=>!0,next:e=>!0,last:e=>!0},setup(e,t){let{slots:n,emit:i}=t;const a=He(e,"modelValue"),{t:r,n:s}=$t(),{isRtl:o}=rn(),{themeClasses:l}=pt(e),{width:u}=gi(),c=Me(-1);zt(void 0,{scoped:!0});const{resizeRef:d}=Ii(w=>{if(!w.length)return;const{target:b,contentRect:S}=w[0],E=b.querySelector(".v-pagination__list > *");if(!E)return;const R=S.width,L=E.offsetWidth+parseFloat(getComputedStyle(E).marginRight)*2;c.value=p(R,L)}),f=A(()=>parseInt(e.length,10)),h=A(()=>parseInt(e.start,10)),g=A(()=>e.totalVisible!=null?parseInt(e.totalVisible,10):c.value>=0?c.value:p(u.value,58));function p(w,b){const S=e.showFirstLastPage?5:3;return Math.max(0,Math.floor(Number(((w-b*S)/b).toFixed(2))))}const m=A(()=>{if(f.value<=0||isNaN(f.value)||f.value>Number.MAX_SAFE_INTEGER)return[];if(g.value<=0)return[];if(g.value===1)return[a.value];if(f.value<=g.value)return Bi(f.value,h.value);const w=g.value%2===0,b=w?g.value/2:Math.floor(g.value/2),S=w?b:b+1,E=f.value-b;if(S-a.value>=0)return[...Bi(Math.max(1,g.value-1),h.value),e.ellipsis,f.value];if(a.value-E>=(w?1:0)){const R=g.value-1,L=f.value-R+h.value;return[h.value,e.ellipsis,...Bi(R,L)]}else{const R=Math.max(1,g.value-2),L=R===1?a.value:a.value-Math.ceil(R/2)+h.value;return[h.value,e.ellipsis,...Bi(R,L),e.ellipsis,f.value]}});function v(w,b,S){w.preventDefault(),a.value=b,S&&i(S,b)}const{refs:_,updateRef:M}=zV();zt({VPaginationBtn:{color:se(e,"color"),border:se(e,"border"),density:se(e,"density"),size:se(e,"size"),variant:se(e,"variant"),rounded:se(e,"rounded"),elevation:se(e,"elevation")}});const x=A(()=>m.value.map((w,b)=>{const S=E=>M(E,b);if(typeof w=="string")return{isActive:!1,key:`ellipsis-${b}`,page:w,props:{ref:S,ellipsis:!0,icon:!0,disabled:!0}};{const E=w===a.value;return{isActive:E,key:w,page:s(w),props:{ref:S,ellipsis:!1,icon:!0,disabled:!!e.disabled||Number(e.length)<2,color:E?e.activeColor:e.color,"aria-current":E,"aria-label":r(E?e.currentPageAriaLabel:e.pageAriaLabel,w),onClick:R=>v(R,w)}}}})),C=A(()=>{const w=!!e.disabled||a.value<=h.value,b=!!e.disabled||a.value>=h.value+f.value-1;return{first:e.showFirstLastPage?{icon:o.value?e.lastIcon:e.firstIcon,onClick:S=>v(S,h.value,"first"),disabled:w,"aria-label":r(e.firstAriaLabel),"aria-disabled":w}:void 0,prev:{icon:o.value?e.nextIcon:e.prevIcon,onClick:S=>v(S,a.value-1,"prev"),disabled:w,"aria-label":r(e.previousAriaLabel),"aria-disabled":w},next:{icon:o.value?e.prevIcon:e.nextIcon,onClick:S=>v(S,a.value+1,"next"),disabled:b,"aria-label":r(e.nextAriaLabel),"aria-disabled":b},last:e.showFirstLastPage?{icon:o.value?e.firstIcon:e.lastIcon,onClick:S=>v(S,h.value+f.value-1,"last"),disabled:b,"aria-label":r(e.lastAriaLabel),"aria-disabled":b}:void 0}});function T(){var b;const w=a.value-h.value;(b=_.value[w])==null||b.$el.focus()}function P(w){w.key===Bf.left&&!e.disabled&&a.value>Number(e.start)?(a.value=a.value-1,ft(T)):w.key===Bf.right&&!e.disabled&&a.value<h.value+f.value-1&&(a.value=a.value+1,ft(T))}return pe(()=>y(e.tag,{ref:d,class:["v-pagination",l.value,e.class],style:e.style,role:"navigation","aria-label":r(e.ariaLabel),onKeydown:P,"data-test":"v-pagination-root"},{default:()=>[y("ul",{class:"v-pagination__list"},[e.showFirstLastPage&&y("li",{key:"first",class:"v-pagination__first","data-test":"v-pagination-first"},[n.first?n.first(C.value.first):y(vt,ge({_as:"VPaginationBtn"},C.value.first),null)]),y("li",{key:"prev",class:"v-pagination__prev","data-test":"v-pagination-prev"},[n.prev?n.prev(C.value.prev):y(vt,ge({_as:"VPaginationBtn"},C.value.prev),null)]),x.value.map((w,b)=>y("li",{key:w.key,class:["v-pagination__item",{"v-pagination__item--is-active":w.isActive}],"data-test":"v-pagination-item"},[n.item?n.item(w):y(vt,ge({_as:"VPaginationBtn"},w.props),{default:()=>[w.page]})])),y("li",{key:"next",class:"v-pagination__next","data-test":"v-pagination-next"},[n.next?n.next(C.value.next):y(vt,ge({_as:"VPaginationBtn"},C.value.next),null)]),e.showFirstLastPage&&y("li",{key:"last",class:"v-pagination__last","data-test":"v-pagination-last"},[n.last?n.last(C.value.last):y(vt,ge({_as:"VPaginationBtn"},C.value.last),null)])])]})),{}}}),Hm=Y({prevIcon:{type:We,default:"$prev"},nextIcon:{type:We,default:"$next"},firstIcon:{type:We,default:"$first"},lastIcon:{type:We,default:"$last"},itemsPerPageText:{type:String,default:"$vuetify.dataFooter.itemsPerPageText"},pageText:{type:String,default:"$vuetify.dataFooter.pageText"},firstPageLabel:{type:String,default:"$vuetify.dataFooter.firstPage"},prevPageLabel:{type:String,default:"$vuetify.dataFooter.prevPage"},nextPageLabel:{type:String,default:"$vuetify.dataFooter.nextPage"},lastPageLabel:{type:String,default:"$vuetify.dataFooter.lastPage"},itemsPerPageOptions:{type:Array,default:()=>[{value:10,title:"10"},{value:25,title:"25"},{value:50,title:"50"},{value:100,title:"100"},{value:-1,title:"$vuetify.dataFooter.itemsPerPageAll"}]},showCurrentPage:Boolean},"VDataTableFooter"),Yo=de()({name:"VDataTableFooter",props:Hm(),setup(e,t){let{slots:n}=t;const{t:i}=$t(),{page:a,pageCount:r,startIndex:s,stopIndex:o,itemsLength:l,itemsPerPage:u,setItemsPerPage:c}=DV(),d=A(()=>e.itemsPerPageOptions.map(f=>typeof f=="number"?{value:f,title:f===-1?i("$vuetify.dataFooter.itemsPerPageAll"):String(f)}:{...f,title:isNaN(Number(f.title))?i(f.title):f.title}));return pe(()=>{var h;const f=fh.filterProps(e);return y("div",{class:"v-data-table-footer"},[(h=n.prepend)==null?void 0:h.call(n),y("div",{class:"v-data-table-footer__items-per-page"},[y("span",null,[i(e.itemsPerPageText)]),y(Lm,{items:d.value,modelValue:u.value,"onUpdate:modelValue":g=>c(Number(g)),density:"compact",variant:"outlined","hide-details":!0},null)]),y("div",{class:"v-data-table-footer__info"},[y("div",null,[i(e.pageText,l.value?s.value+1:0,o.value,l.value)])]),y("div",{class:"v-data-table-footer__pagination"},[y(fh,ge({modelValue:a.value,"onUpdate:modelValue":g=>a.value=g,density:"comfortable","first-aria-label":e.firstPageLabel,"last-aria-label":e.lastPageLabel,length:r.value,"next-aria-label":e.nextPageLabel,"previous-aria-label":e.prevPageLabel,rounded:!0,"show-first-last-page":!0,"total-visible":e.showCurrentPage?1:0,variant:"plain"},f),null)])])}),{}}}),Hu=oI({align:{type:String,default:"start"},fixed:Boolean,fixedOffset:[Number,String],height:[Number,String],lastFixed:Boolean,noPadding:Boolean,tag:String,width:[Number,String],maxWidth:[Number,String],nowrap:Boolean},(e,t)=>{let{slots:n}=t;const i=e.tag??"td";return y(i,{class:["v-data-table__td",{"v-data-table-column--fixed":e.fixed,"v-data-table-column--last-fixed":e.lastFixed,"v-data-table-column--no-padding":e.noPadding,"v-data-table-column--nowrap":e.nowrap},`v-data-table-column--align-${e.align}`],style:{height:Re(e.height),width:Re(e.width),maxWidth:Re(e.maxWidth),left:Re(e.fixedOffset||null)}},{default:()=>{var a;return[(a=n.default)==null?void 0:a.call(n)]}})}),GV=Y({headers:Array},"DataTable-header"),xx=Symbol.for("vuetify:data-table-headers"),Sx={title:"",sortable:!1},WV={...Sx,width:48};function $V(){const t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).map(n=>({element:n,priority:0}));return{enqueue:(n,i)=>{let a=!1;for(let r=0;r<t.length;r++)if(t[r].priority>i){t.splice(r,0,{element:n,priority:i}),a=!0;break}a||t.push({element:n,priority:i})},size:()=>t.length,count:()=>{let n=0;if(!t.length)return 0;const i=Math.floor(t[0].priority);for(let a=0;a<t.length;a++)Math.floor(t[a].priority)===i&&(n+=1);return n},dequeue:()=>t.shift()}}function hh(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(!e.children)t.push(e);else for(const n of e.children)hh(n,t);return t}function Mx(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Set;for(const n of e)n.key&&t.add(n.key),n.children&&Mx(n.children,t);return t}function XV(e){if(e.key){if(e.key==="data-table-group")return Sx;if(["data-table-expand","data-table-select"].includes(e.key))return WV}}function Gm(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.children?Math.max(t,...e.children.map(n=>Gm(n,t+1))):t}function YV(e){let t=!1;function n(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r)if(s&&(r.fixed=!0),r.fixed)if(r.children)for(let o=r.children.length-1;o>=0;o--)n(r.children[o],!0);else t?isNaN(Number(r.width))?(`${r.key}`,void 0):r.minWidth=Math.max(Number(r.width)||0,Number(r.minWidth)||0):r.lastFixed=!0,t=!0;else if(r.children)for(let o=r.children.length-1;o>=0;o--)n(r.children[o]);else t=!1}for(let r=e.length-1;r>=0;r--)n(e[r]);function i(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!r)return s;if(r.children){r.fixedOffset=s;for(const o of r.children)s=i(o,s)}else r.fixed&&(r.fixedOffset=s,s+=parseFloat(r.width||"0")||0);return s}let a=0;for(const r of e)a=i(r,a)}function qV(e,t){const n=[];let i=0;const a=$V(e);for(;a.size()>0;){let s=a.count();const o=[];let l=1;for(;s>0;){const{element:u,priority:c}=a.dequeue(),d=t-i-Gm(u);if(o.push({...u,rowspan:d??1,colspan:u.children?hh(u).length:1}),u.children)for(const f of u.children){const h=c%1+l/Math.pow(10,i+2);a.enqueue(f,i+d+h)}l+=1,s-=1}i+=1,n.push(o)}return{columns:e.map(s=>hh(s)).flat(),headers:n}}function Ex(e){const t=[];for(const n of e){const i={...XV(n),...n},a=i.key??(typeof i.value=="string"?i.value:null),r=i.value??a??null,s={...i,key:a,value:r,sortable:i.sortable??(i.key!=null||!!i.sort),children:i.children?Ex(i.children):void 0};t.push(s)}return t}function Wm(e,t){const n=_e([]),i=_e([]),a=_e({}),r=_e({}),s=_e({});Bt(()=>{var p,m,v;const u=(e.headers||Object.keys(e.items[0]??{}).map(_=>({key:_,title:Hi(_)}))).slice(),c=Mx(u);(p=t==null?void 0:t.groupBy)!=null&&p.value.length&&!c.has("data-table-group")&&u.unshift({key:"data-table-group",title:"Group"}),(m=t==null?void 0:t.showSelect)!=null&&m.value&&!c.has("data-table-select")&&u.unshift({key:"data-table-select"}),(v=t==null?void 0:t.showExpand)!=null&&v.value&&!c.has("data-table-expand")&&u.push({key:"data-table-expand"});const d=Ex(u);YV(d);const f=Math.max(...d.map(_=>Gm(_)))+1,h=qV(d,f);n.value=h.headers,i.value=h.columns;const g=h.headers.flat(1);for(const _ of g)_.key&&(_.sortable&&(_.sort&&(a.value[_.key]=_.sort),_.sortRaw&&(r.value[_.key]=_.sortRaw)),_.filter&&(s.value[_.key]=_.filter))});const o={headers:n,columns:i,sortFunctions:a,sortRawFunctions:r,filterFunctions:s};return Rt(xx,o),o}function Dc(){const e=ot(xx);if(!e)throw new Error("Missing headers!");return e}const wx=Y({color:String,disableSort:Boolean,fixedHeader:Boolean,multiSort:Boolean,sortAscIcon:{type:We,default:"$sortAsc"},sortDescIcon:{type:We,default:"$sortDesc"},headerProps:{type:Object},sticky:Boolean,...Yr(),...hc()},"VDataTableHeaders"),zr=de()({name:"VDataTableHeaders",props:wx(),setup(e,t){let{slots:n}=t;const{t:i}=$t(),{toggleSort:a,sortBy:r,isSorted:s}=bx(),{someSelected:o,allSelected:l,selectAll:u,showSelectAll:c}=Pc(),{columns:d,headers:f}=Dc(),{loaderClasses:h}=cl(e);function g(w,b){if(!(!(e.sticky||e.fixedHeader)&&!w.fixed))return{position:"sticky",left:w.fixed?Re(w.fixedOffset):void 0,top:e.sticky||e.fixedHeader?`calc(var(--v-table-header-height) * ${b})`:void 0}}function p(w){const b=r.value.find(S=>S.key===w.key);return b?b.order==="asc"?e.sortAscIcon:e.sortDescIcon:e.sortAscIcon}const{backgroundColorClasses:m,backgroundColorStyles:v}=wt(e,"color"),{displayClasses:_,mobile:M}=gi(e),x=A(()=>({headers:f.value,columns:d.value,toggleSort:a,isSorted:s,sortBy:r.value,someSelected:o.value,allSelected:l.value,selectAll:u,getSortIcon:p})),C=A(()=>["v-data-table__th",{"v-data-table__th--sticky":e.sticky||e.fixedHeader},_.value,h.value]),T=w=>{let{column:b,x:S,y:E}=w;const R=b.key==="data-table-select"||b.key==="data-table-expand",L=ge(e.headerProps??{},b.headerProps??{});return y(Hu,ge({tag:"th",align:b.align,class:[{"v-data-table__th--sortable":b.sortable&&!e.disableSort,"v-data-table__th--sorted":s(b),"v-data-table__th--fixed":b.fixed},...C.value],style:{width:Re(b.width),minWidth:Re(b.minWidth),maxWidth:Re(b.maxWidth),...g(b,E)},colspan:b.colspan,rowspan:b.rowspan,onClick:b.sortable?()=>a(b):void 0,fixed:b.fixed,nowrap:b.nowrap,lastFixed:b.lastFixed,noPadding:R},L),{default:()=>{var U;const O=`header.${b.key}`,G={column:b,selectAll:u,isSorted:s,toggleSort:a,sortBy:r.value,someSelected:o.value,allSelected:l.value,getSortIcon:p};return n[O]?n[O](G):b.key==="data-table-select"?((U=n["header.data-table-select"])==null?void 0:U.call(n,G))??(c.value&&y(ga,{modelValue:l.value,indeterminate:o.value&&!l.value,"onUpdate:modelValue":u},null)):y("div",{class:"v-data-table-header__content"},[y("span",null,[b.title]),b.sortable&&!e.disableSort&&y(gt,{key:"icon",class:"v-data-table-header__sort-icon",icon:p(b)},null),e.multiSort&&s(b)&&y("div",{key:"badge",class:["v-data-table-header__sort-badge",...m.value],style:v.value},[r.value.findIndex(j=>j.key===b.key)+1])])}})},P=()=>{const w=ge(e.headerProps??{}??{}),b=A(()=>d.value.filter(E=>(E==null?void 0:E.sortable)&&!e.disableSort)),S=A(()=>{if(d.value.find(R=>R.key==="data-table-select")!=null)return l.value?"$checkboxOn":o.value?"$checkboxIndeterminate":"$checkboxOff"});return y(Hu,ge({tag:"th",class:[...C.value],colspan:f.value.length+1},w),{default:()=>[y("div",{class:"v-data-table-header__content"},[y(Lm,{chips:!0,class:"v-data-table__td-sort-select",clearable:!0,density:"default",items:b.value,label:i("$vuetify.dataTable.sortBy"),multiple:e.multiSort,variant:"underlined","onClick:clear":()=>r.value=[],appendIcon:S.value,"onClick:append":()=>u(!l.value)},{...n,chip:E=>{var R;return y(io,{onClick:(R=E.item.raw)!=null&&R.sortable?()=>a(E.item.raw):void 0,onMousedown:L=>{L.preventDefault(),L.stopPropagation()}},{default:()=>[E.item.title,y(gt,{class:["v-data-table__td-sort-icon",s(E.item.raw)&&"v-data-table__td-sort-icon-active"],icon:p(E.item.raw),size:"small"},null)]})}})])]})};pe(()=>M.value?y("tr",null,[y(P,null,null)]):y(Ne,null,[n.headers?n.headers(x.value):f.value.map((w,b)=>y("tr",null,[w.map((S,E)=>y(T,{column:S,x:E,y:b},null))])),e.loading&&y("tr",{class:"v-data-table-progress"},[y("th",{colspan:d.value.length},[y(dl,{name:"v-data-table-progress",absolute:!0,active:!0,color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0},{default:n.loader})])])]))}}),jV=Y({item:{type:Object,required:!0}},"VDataTableGroupHeaderRow"),KV=de()({name:"VDataTableGroupHeaderRow",props:jV(),setup(e,t){let{slots:n}=t;const{isGroupOpen:i,toggleGroup:a,extractRows:r}=ux(),{isSelected:s,isSomeSelected:o,select:l}=Pc(),{columns:u}=Dc(),c=A(()=>r([e.item]));return()=>y("tr",{class:"v-data-table-group-header-row",style:{"--v-data-table-group-header-row-depth":e.item.depth}},[u.value.map(d=>{var f,h;if(d.key==="data-table-group"){const g=i(e.item)?"$expand":"$next",p=()=>a(e.item);return((f=n["data-table-group"])==null?void 0:f.call(n,{item:e.item,count:c.value.length,props:{icon:g,onClick:p}}))??y(Hu,{class:"v-data-table-group-header-row__column"},{default:()=>[y(vt,{size:"small",variant:"text",icon:g,onClick:p},null),y("span",null,[e.item.value]),y("span",null,[ca("("),c.value.length,ca(")")])]})}if(d.key==="data-table-select"){const g=s(c.value),p=o(c.value)&&!g,m=v=>l(c.value,v);return((h=n["data-table-select"])==null?void 0:h.call(n,{props:{modelValue:g,indeterminate:p,"onUpdate:modelValue":m}}))??y("td",null,[y(ga,{modelValue:g,indeterminate:p,"onUpdate:modelValue":m},null)])}return y("td",null,null)})])}}),ZV=Y({index:Number,item:Object,cellProps:[Object,Function],onClick:vn(),onContextmenu:vn(),onDblclick:vn(),...Yr()},"VDataTableRow"),$m=de()({name:"VDataTableRow",props:ZV(),setup(e,t){let{slots:n}=t;const{displayClasses:i,mobile:a}=gi(e,"v-data-table__tr"),{isSelected:r,toggleSelect:s,someSelected:o,allSelected:l,selectAll:u}=Pc(),{isExpanded:c,toggleExpand:d}=ox(),{toggleSort:f,sortBy:h,isSorted:g}=bx(),{columns:p}=Dc();pe(()=>y("tr",{class:["v-data-table__tr",{"v-data-table__tr--clickable":!!(e.onClick||e.onContextmenu||e.onDblclick)},i.value],onClick:e.onClick,onContextmenu:e.onContextmenu,onDblclick:e.onDblclick},[e.item&&p.value.map((m,v)=>{const _=e.item,M=`item.${m.key}`,x=`header.${m.key}`,C={index:e.index,item:_.raw,internalItem:_,value:Fr(_.columns,m.key),column:m,isSelected:r,toggleSelect:s,isExpanded:c,toggleExpand:d},T={column:m,selectAll:u,isSorted:g,toggleSort:f,sortBy:h.value,someSelected:o.value,allSelected:l.value,getSortIcon:()=>""},P=typeof e.cellProps=="function"?e.cellProps({index:C.index,item:C.item,internalItem:C.internalItem,value:C.value,column:m}):e.cellProps,w=typeof m.cellProps=="function"?m.cellProps({index:C.index,item:C.item,internalItem:C.internalItem,value:C.value}):m.cellProps;return y(Hu,ge({align:m.align,class:{"v-data-table__td--expanded-row":m.key==="data-table-expand","v-data-table__td--select-row":m.key==="data-table-select"},fixed:m.fixed,fixedOffset:m.fixedOffset,lastFixed:m.lastFixed,maxWidth:a.value?void 0:m.maxWidth,noPadding:m.key==="data-table-select"||m.key==="data-table-expand",nowrap:m.nowrap,width:a.value?void 0:m.width},P,w),{default:()=>{var S,E,R,L,O;if(n[M]&&!a.value)return(S=n[M])==null?void 0:S.call(n,C);if(m.key==="data-table-select")return((E=n["item.data-table-select"])==null?void 0:E.call(n,C))??y(ga,{disabled:!_.selectable,modelValue:r([_]),onClick:Gv(()=>s(_),["stop"])},null);if(m.key==="data-table-expand")return((R=n["item.data-table-expand"])==null?void 0:R.call(n,C))??y(vt,{icon:c(_)?"$collapse":"$expand",size:"small",variant:"text",onClick:Gv(()=>d(_),["stop"])},null);const b=hi(C.value);return a.value?y(Ne,null,[y("div",{class:"v-data-table__td-title"},[((L=n[x])==null?void 0:L.call(n,T))??m.title]),y("div",{class:"v-data-table__td-value"},[((O=n[M])==null?void 0:O.call(n,C))??b])]):b}})})]))}}),Tx=Y({loading:[Boolean,String],loadingText:{type:String,default:"$vuetify.dataIterator.loadingText"},hideNoData:Boolean,items:{type:Array,default:()=>[]},noDataText:{type:String,default:"$vuetify.noDataText"},rowProps:[Object,Function],cellProps:[Object,Function],...Yr()},"VDataTableRows"),Hr=de()({name:"VDataTableRows",inheritAttrs:!1,props:Tx(),setup(e,t){let{attrs:n,slots:i}=t;const{columns:a}=Dc(),{expandOnClick:r,toggleExpand:s,isExpanded:o}=ox(),{isSelected:l,toggleSelect:u}=Pc(),{toggleGroup:c,isGroupOpen:d}=ux(),{t:f}=$t(),{mobile:h}=gi(e);return pe(()=>{var g,p;return e.loading&&(!e.items.length||i.loading)?y("tr",{class:"v-data-table-rows-loading",key:"loading"},[y("td",{colspan:a.value.length},[((g=i.loading)==null?void 0:g.call(i))??f(e.loadingText)])]):!e.loading&&!e.items.length&&!e.hideNoData?y("tr",{class:"v-data-table-rows-no-data",key:"no-data"},[y("td",{colspan:a.value.length},[((p=i["no-data"])==null?void 0:p.call(i))??f(e.noDataText)])]):y(Ne,null,[e.items.map((m,v)=>{var x;if(m.type==="group"){const C={index:v,item:m,columns:a.value,isExpanded:o,toggleExpand:s,isSelected:l,toggleSelect:u,toggleGroup:c,isGroupOpen:d};return i["group-header"]?i["group-header"](C):y(KV,ge({key:`group-header_${m.id}`,item:m},dp(n,":group-header",()=>C)),i)}const _={index:v,item:m.raw,internalItem:m,columns:a.value,isExpanded:o,toggleExpand:s,isSelected:l,toggleSelect:u},M={..._,props:ge({key:`item_${m.key??m.index}`,onClick:r.value?()=>{s(m)}:void 0,index:v,item:m,cellProps:e.cellProps,mobile:h.value},dp(n,":row",()=>_),typeof e.rowProps=="function"?e.rowProps({item:_.item,index:_.index,internalItem:_.internalItem}):e.rowProps)};return y(Ne,{key:M.props.key},[i.item?i.item(M):y($m,M.props,i),o(m)&&((x=i["expanded-row"])==null?void 0:x.call(i,_))])})])}),{}}}),Cx=Y({fixedHeader:Boolean,fixedFooter:Boolean,height:[Number,String],hover:Boolean,...Ie(),...fn(),...Je(),...dt()},"VTable"),Gr=de()({name:"VTable",props:Cx(),setup(e,t){let{slots:n,emit:i}=t;const{themeClasses:a}=pt(e),{densityClasses:r}=In(e);return pe(()=>y(e.tag,{class:["v-table",{"v-table--fixed-height":!!e.height,"v-table--fixed-header":e.fixedHeader,"v-table--fixed-footer":e.fixedFooter,"v-table--has-top":!!n.top,"v-table--has-bottom":!!n.bottom,"v-table--hover":e.hover},a.value,r.value,e.class],style:e.style},{default:()=>{var s,o,l;return[(s=n.top)==null?void 0:s.call(n),n.default?y("div",{class:"v-table__wrapper",style:{height:Re(e.height)}},[y("table",null,[n.default()])]):(o=n.wrapper)==null?void 0:o.call(n),(l=n.bottom)==null?void 0:l.call(n)]}})),{}}}),JV=Y({items:{type:Array,default:()=>[]},itemValue:{type:[String,Array,Function],default:"id"},itemSelectable:{type:[String,Array,Function],default:null},rowProps:[Object,Function],cellProps:[Object,Function],returnObject:Boolean},"DataTable-items");function QV(e,t,n,i){const a=e.returnObject?t:an(t,e.itemValue),r=an(t,e.itemSelectable,!0),s=i.reduce((o,l)=>(l.key!=null&&(o[l.key]=an(t,l.value)),o),{});return{type:"item",key:e.returnObject?an(t,e.itemValue):a,index:n,value:a,selectable:r,columns:s,raw:t}}function eF(e,t,n){return t.map((i,a)=>QV(e,i,a,n))}function Xm(e,t){return{items:A(()=>eF(e,e.items,t.value))}}const Ym=Y({...Tx(),hideDefaultBody:Boolean,hideDefaultFooter:Boolean,hideDefaultHeader:Boolean,width:[String,Number],search:String,...rx(),...Fm(),...GV(),...JV(),...gx(),...yx(),...wx(),...Cx()},"DataTable"),tF=Y({...Om(),...Ym(),...yl(),...Hm()},"VDataTable"),nF=de()({name:"VDataTable",props:tF(),emits:{"update:modelValue":e=>!0,"update:page":e=>!0,"update:itemsPerPage":e=>!0,"update:sortBy":e=>!0,"update:options":e=>!0,"update:groupBy":e=>!0,"update:expanded":e=>!0,"update:currentItems":e=>!0},setup(e,t){let{attrs:n,slots:i}=t;const{groupBy:a}=Nm(e),{sortBy:r,multiSort:s,mustSort:o}=Rc(e),{page:l,itemsPerPage:u}=Um(e),{disableSort:c}=Wr(e),{columns:d,headers:f,sortFunctions:h,sortRawFunctions:g,filterFunctions:p}=Wm(e,{groupBy:a,showSelect:se(e,"showSelect"),showExpand:se(e,"showExpand")}),{items:m}=Xm(e,d),v=se(e,"search"),{filteredItems:_}=_l(e,m,v,{transform:Q=>Q.columns,customKeyFilter:p}),{toggleSort:M}=Ic({sortBy:r,multiSort:s,mustSort:o,page:l}),{sortByWithGroups:x,opened:C,extractRows:T,isGroupOpen:P,toggleGroup:w}=wc({groupBy:a,sortBy:r,disableSort:c}),{sortedItems:b}=zm(e,_,x,{transform:Q=>({...Q.raw,...Q.columns}),sortFunctions:h,sortRawFunctions:g}),{flatItems:S}=Tc(b,a,C),E=A(()=>S.value.length),{startIndex:R,stopIndex:L,pageCount:O,setItemsPerPage:G}=Bm({page:l,itemsPerPage:u,itemsLength:E}),{paginatedItems:U}=hx({items:S,startIndex:R,stopIndex:L,itemsPerPage:u}),j=A(()=>T(U.value)),{isSelected:B,select:X,selectAll:W,toggleSelect:H,someSelected:te,allSelected:Se}=Ac(e,{allItems:m,currentPage:j}),{isExpanded:$,toggleExpand:he}=Ec(e);Cc({page:l,itemsPerPage:u,sortBy:r,groupBy:a,search:v}),zt({VDataTableRows:{hideNoData:se(e,"hideNoData"),noDataText:se(e,"noDataText"),loading:se(e,"loading"),loadingText:se(e,"loadingText")}});const ae=A(()=>({page:l.value,itemsPerPage:u.value,sortBy:r.value,pageCount:O.value,toggleSort:M,setItemsPerPage:G,someSelected:te.value,allSelected:Se.value,isSelected:B,select:X,selectAll:W,toggleSelect:H,isExpanded:$,toggleExpand:he,isGroupOpen:P,toggleGroup:w,items:j.value.map(Q=>Q.raw),internalItems:j.value,groupedItems:U.value,columns:d.value,headers:f.value}));return pe(()=>{const Q=Yo.filterProps(e),ve=zr.filterProps(e),Ge=Hr.filterProps(e),Ae=Gr.filterProps(e);return y(Gr,ge({class:["v-data-table",{"v-data-table--show-select":e.showSelect,"v-data-table--loading":e.loading},e.class],style:e.style},Ae,{fixedHeader:e.fixedHeader||e.sticky}),{top:()=>{var be;return(be=i.top)==null?void 0:be.call(i,ae.value)},default:()=>{var be,N,V,I,re,q;return i.default?i.default(ae.value):y(Ne,null,[(be=i.colgroup)==null?void 0:be.call(i,ae.value),!e.hideDefaultHeader&&y("thead",{key:"thead"},[y(zr,ve,i)]),(N=i.thead)==null?void 0:N.call(i,ae.value),!e.hideDefaultBody&&y("tbody",null,[(V=i["body.prepend"])==null?void 0:V.call(i,ae.value),i.body?i.body(ae.value):y(Hr,ge(n,Ge,{items:U.value}),i),(I=i["body.append"])==null?void 0:I.call(i,ae.value)]),(re=i.tbody)==null?void 0:re.call(i,ae.value),(q=i.tfoot)==null?void 0:q.call(i,ae.value)])},bottom:()=>i.bottom?i.bottom(ae.value):!e.hideDefaultFooter&&y(Ne,null,[y(vl,null,null),y(Yo,Q,{prepend:i["footer.prepend"]})])})}),{}}}),iF=Y({...Ym(),...Fm(),...B0(),...yl()},"VDataTableVirtual"),aF=de()({name:"VDataTableVirtual",props:iF(),emits:{"update:modelValue":e=>!0,"update:sortBy":e=>!0,"update:options":e=>!0,"update:groupBy":e=>!0,"update:expanded":e=>!0},setup(e,t){let{attrs:n,slots:i}=t;const{groupBy:a}=Nm(e),{sortBy:r,multiSort:s,mustSort:o}=Rc(e),{disableSort:l}=Wr(e),{columns:u,headers:c,filterFunctions:d,sortFunctions:f,sortRawFunctions:h}=Wm(e,{groupBy:a,showSelect:se(e,"showSelect"),showExpand:se(e,"showExpand")}),{items:g}=Xm(e,u),p=se(e,"search"),{filteredItems:m}=_l(e,g,p,{transform:ve=>ve.columns,customKeyFilter:d}),{toggleSort:v}=Ic({sortBy:r,multiSort:s,mustSort:o}),{sortByWithGroups:_,opened:M,extractRows:x,isGroupOpen:C,toggleGroup:T}=wc({groupBy:a,sortBy:r,disableSort:l}),{sortedItems:P}=zm(e,m,_,{transform:ve=>({...ve.raw,...ve.columns}),sortFunctions:f,sortRawFunctions:h}),{flatItems:w}=Tc(P,a,M),b=A(()=>x(w.value)),{isSelected:S,select:E,selectAll:R,toggleSelect:L,someSelected:O,allSelected:G}=Ac(e,{allItems:b,currentPage:b}),{isExpanded:U,toggleExpand:j}=Ec(e),{containerRef:B,markerRef:X,paddingTop:W,paddingBottom:H,computedItems:te,handleItemResize:Se,handleScroll:$,handleScrollend:he}=z0(e,w),ae=A(()=>te.value.map(ve=>ve.raw));Cc({sortBy:r,page:Me(1),itemsPerPage:Me(-1),groupBy:a,search:p}),zt({VDataTableRows:{hideNoData:se(e,"hideNoData"),noDataText:se(e,"noDataText"),loading:se(e,"loading"),loadingText:se(e,"loadingText")}});const Q=A(()=>({sortBy:r.value,toggleSort:v,someSelected:O.value,allSelected:G.value,isSelected:S,select:E,selectAll:R,toggleSelect:L,isExpanded:U,toggleExpand:j,isGroupOpen:C,toggleGroup:T,items:b.value.map(ve=>ve.raw),internalItems:b.value,groupedItems:w.value,columns:u.value,headers:c.value}));pe(()=>{const ve=zr.filterProps(e),Ge=Hr.filterProps(e),Ae=Gr.filterProps(e);return y(Gr,ge({class:["v-data-table",{"v-data-table--loading":e.loading},e.class],style:e.style},Ae,{fixedHeader:e.fixedHeader||e.sticky}),{top:()=>{var be;return(be=i.top)==null?void 0:be.call(i,Q.value)},wrapper:()=>{var be,N,V;return y("div",{ref:B,onScrollPassive:$,onScrollend:he,class:"v-table__wrapper",style:{height:Re(e.height)}},[y("table",null,[(be=i.colgroup)==null?void 0:be.call(i,Q.value),!e.hideDefaultHeader&&y("thead",{key:"thead"},[y(zr,ve,i)]),!e.hideDefaultBody&&y("tbody",null,[y("tr",{ref:X,style:{height:Re(W.value),border:0}},[y("td",{colspan:u.value.length,style:{height:0,border:0}},null)]),(N=i["body.prepend"])==null?void 0:N.call(i,Q.value),y(Hr,ge(n,Ge,{items:ae.value}),{...i,item:I=>y(U0,{key:I.internalItem.index,renderless:!0,"onUpdate:height":re=>Se(I.internalItem.index,re)},{default:re=>{var Z;let{itemRef:q}=re;return((Z=i.item)==null?void 0:Z.call(i,{...I,itemRef:q}))??y($m,ge(I.props,{ref:q,key:I.internalItem.index,index:I.internalItem.index}),i)}})}),(V=i["body.append"])==null?void 0:V.call(i,Q.value),y("tr",{style:{height:Re(H.value),border:0}},[y("td",{colspan:u.value.length,style:{height:0,border:0}},null)])])])])},bottom:()=>{var be;return(be=i.bottom)==null?void 0:be.call(i,Q.value)}})})}}),rF=Y({itemsLength:{type:[Number,String],required:!0},...Om(),...Ym(),...Hm()},"VDataTableServer"),sF=de()({name:"VDataTableServer",props:rF(),emits:{"update:modelValue":e=>!0,"update:page":e=>!0,"update:itemsPerPage":e=>!0,"update:sortBy":e=>!0,"update:options":e=>!0,"update:expanded":e=>!0,"update:groupBy":e=>!0},setup(e,t){let{attrs:n,slots:i}=t;const{groupBy:a}=Nm(e),{sortBy:r,multiSort:s,mustSort:o}=Rc(e),{page:l,itemsPerPage:u}=Um(e),{disableSort:c}=Wr(e),d=A(()=>parseInt(e.itemsLength,10)),{columns:f,headers:h}=Wm(e,{groupBy:a,showSelect:se(e,"showSelect"),showExpand:se(e,"showExpand")}),{items:g}=Xm(e,f),{toggleSort:p}=Ic({sortBy:r,multiSort:s,mustSort:o,page:l}),{opened:m,isGroupOpen:v,toggleGroup:_,extractRows:M}=wc({groupBy:a,sortBy:r,disableSort:c}),{pageCount:x,setItemsPerPage:C}=Bm({page:l,itemsPerPage:u,itemsLength:d}),{flatItems:T}=Tc(g,a,m),{isSelected:P,select:w,selectAll:b,toggleSelect:S,someSelected:E,allSelected:R}=Ac(e,{allItems:g,currentPage:g}),{isExpanded:L,toggleExpand:O}=Ec(e),G=A(()=>M(g.value));Cc({page:l,itemsPerPage:u,sortBy:r,groupBy:a,search:se(e,"search")}),Rt("v-data-table",{toggleSort:p,sortBy:r}),zt({VDataTableRows:{hideNoData:se(e,"hideNoData"),noDataText:se(e,"noDataText"),loading:se(e,"loading"),loadingText:se(e,"loadingText")}});const U=A(()=>({page:l.value,itemsPerPage:u.value,sortBy:r.value,pageCount:x.value,toggleSort:p,setItemsPerPage:C,someSelected:E.value,allSelected:R.value,isSelected:P,select:w,selectAll:b,toggleSelect:S,isExpanded:L,toggleExpand:O,isGroupOpen:v,toggleGroup:_,items:G.value.map(j=>j.raw),internalItems:G.value,groupedItems:T.value,columns:f.value,headers:h.value}));pe(()=>{const j=Yo.filterProps(e),B=zr.filterProps(e),X=Hr.filterProps(e),W=Gr.filterProps(e);return y(Gr,ge({class:["v-data-table",{"v-data-table--loading":e.loading},e.class],style:e.style},W,{fixedHeader:e.fixedHeader||e.sticky}),{top:()=>{var H;return(H=i.top)==null?void 0:H.call(i,U.value)},default:()=>{var H,te,Se,$,he,ae;return i.default?i.default(U.value):y(Ne,null,[(H=i.colgroup)==null?void 0:H.call(i,U.value),!e.hideDefaultHeader&&y("thead",{key:"thead",class:"v-data-table__thead",role:"rowgroup"},[y(zr,B,i)]),(te=i.thead)==null?void 0:te.call(i,U.value),!e.hideDefaultBody&&y("tbody",{class:"v-data-table__tbody",role:"rowgroup"},[(Se=i["body.prepend"])==null?void 0:Se.call(i,U.value),i.body?i.body(U.value):y(Hr,ge(n,X,{items:T.value}),i),($=i["body.append"])==null?void 0:$.call(i,U.value)]),(he=i.tbody)==null?void 0:he.call(i,U.value),(ae=i.tfoot)==null?void 0:ae.call(i,U.value)])},bottom:()=>i.bottom?i.bottom(U.value):!e.hideDefaultFooter&&y(Ne,null,[y(vl,null,null),y(Yo,j,{prepend:i["footer.prepend"]})])})})}}),oF=Y({fluid:{type:Boolean,default:!1},...Ie(),...Qt(),...Je()},"VContainer"),lF=de()({name:"VContainer",props:oF(),setup(e,t){let{slots:n}=t;const{rtlClasses:i}=rn(),{dimensionStyles:a}=en(e);return pe(()=>y(e.tag,{class:["v-container",{"v-container--fluid":e.fluid},i.value,e.class],style:[a.value,e.style]},n)),{}}}),Ax=sc.reduce((e,t)=>(e[t]={type:[Boolean,String,Number],default:!1},e),{}),Px=sc.reduce((e,t)=>{const n="offset"+Hi(t);return e[n]={type:[String,Number],default:null},e},{}),Rx=sc.reduce((e,t)=>{const n="order"+Hi(t);return e[n]={type:[String,Number],default:null},e},{}),Fp={col:Object.keys(Ax),offset:Object.keys(Px),order:Object.keys(Rx)};function uF(e,t,n){let i=e;if(!(n==null||n===!1)){if(t){const a=t.replace(e,"");i+=`-${a}`}return e==="col"&&(i="v-"+i),e==="col"&&(n===""||n===!0)||(i+=`-${n}`),i.toLowerCase()}}const cF=["auto","start","end","center","baseline","stretch"],dF=Y({cols:{type:[Boolean,String,Number],default:!1},...Ax,offset:{type:[String,Number],default:null},...Px,order:{type:[String,Number],default:null},...Rx,alignSelf:{type:String,default:null,validator:e=>cF.includes(e)},...Ie(),...Je()},"VCol"),fF=de()({name:"VCol",props:dF(),setup(e,t){let{slots:n}=t;const i=A(()=>{const a=[];let r;for(r in Fp)Fp[r].forEach(o=>{const l=e[o],u=uF(r,o,l);u&&a.push(u)});const s=a.some(o=>o.startsWith("v-col-"));return a.push({"v-col":!s||!e.cols,[`v-col-${e.cols}`]:e.cols,[`offset-${e.offset}`]:e.offset,[`order-${e.order}`]:e.order,[`align-self-${e.alignSelf}`]:e.alignSelf}),a});return()=>{var a;return _a(e.tag,{class:[i.value,e.class],style:e.style},(a=n.default)==null?void 0:a.call(n))}}}),qm=["start","end","center"],Ix=["space-between","space-around","space-evenly"];function jm(e,t){return sc.reduce((n,i)=>{const a=e+Hi(i);return n[a]=t(),n},{})}const hF=[...qm,"baseline","stretch"],Dx=e=>hF.includes(e),Lx=jm("align",()=>({type:String,default:null,validator:Dx})),mF=[...qm,...Ix],kx=e=>mF.includes(e),Vx=jm("justify",()=>({type:String,default:null,validator:kx})),vF=[...qm,...Ix,"stretch"],Fx=e=>vF.includes(e),Nx=jm("alignContent",()=>({type:String,default:null,validator:Fx})),Np={align:Object.keys(Lx),justify:Object.keys(Vx),alignContent:Object.keys(Nx)},gF={align:"align",justify:"justify",alignContent:"align-content"};function pF(e,t,n){let i=gF[e];if(n!=null){if(t){const a=t.replace(e,"");i+=`-${a}`}return i+=`-${n}`,i.toLowerCase()}}const yF=Y({dense:Boolean,noGutters:Boolean,align:{type:String,default:null,validator:Dx},...Lx,justify:{type:String,default:null,validator:kx},...Vx,alignContent:{type:String,default:null,validator:Fx},...Nx,...Ie(),...Je()},"VRow"),_F=de()({name:"VRow",props:yF(),setup(e,t){let{slots:n}=t;const i=A(()=>{const a=[];let r;for(r in Np)Np[r].forEach(s=>{const o=e[s],l=pF(r,s,o);l&&a.push(l)});return a.push({"v-row--no-gutters":e.noGutters,"v-row--dense":e.dense,[`align-${e.align}`]:e.align,[`justify-${e.justify}`]:e.justify,[`align-content-${e.alignContent}`]:e.alignContent}),a});return()=>{var a;return _a(e.tag,{class:["v-row",i.value,e.class],style:e.style},(a=n.default)==null?void 0:a.call(n))}}}),Ox=Wi("v-spacer","div","VSpacer"),Ux=Y({active:{type:[String,Array],default:void 0},disabled:{type:[Boolean,String,Array],default:null},nextIcon:{type:We,default:"$next"},prevIcon:{type:We,default:"$prev"},modeIcon:{type:We,default:"$subgroup"},text:String,viewMode:{type:String,default:"month"}},"VDatePickerControls"),mh=de()({name:"VDatePickerControls",props:Ux(),emits:{"click:year":()=>!0,"click:month":()=>!0,"click:prev":()=>!0,"click:next":()=>!0,"click:text":()=>!0},setup(e,t){let{emit:n}=t;const i=A(()=>Array.isArray(e.disabled)?e.disabled.includes("text"):!!e.disabled),a=A(()=>Array.isArray(e.disabled)?e.disabled.includes("mode"):!!e.disabled),r=A(()=>Array.isArray(e.disabled)?e.disabled.includes("prev"):!!e.disabled),s=A(()=>Array.isArray(e.disabled)?e.disabled.includes("next"):!!e.disabled);function o(){n("click:prev")}function l(){n("click:next")}function u(){n("click:year")}function c(){n("click:month")}return pe(()=>y("div",{class:["v-date-picker-controls"]},[y(vt,{class:"v-date-picker-controls__month-btn","data-testid":"month-btn",disabled:i.value,text:e.text,variant:"text",rounded:!0,onClick:c},null),y(vt,{class:"v-date-picker-controls__mode-btn","data-testid":"year-btn",disabled:a.value,density:"comfortable",icon:e.modeIcon,variant:"text",onClick:u},null),y(Ox,null,null),y("div",{class:"v-date-picker-controls__month"},[y(vt,{"data-testid":"prev-month",disabled:r.value,icon:e.prevIcon,variant:"text",onClick:o},null),y(vt,{"data-testid":"next-month",disabled:s.value,icon:e.nextIcon,variant:"text",onClick:l},null)])])),{}}}),bF=Y({appendIcon:We,color:String,header:String,transition:String,onClick:vn()},"VDatePickerHeader"),vh=de()({name:"VDatePickerHeader",props:bF(),emits:{click:()=>!0,"click:append":()=>!0},setup(e,t){let{emit:n,slots:i}=t;const{backgroundColorClasses:a,backgroundColorStyles:r}=wt(e,"color");function s(){n("click")}function o(){n("click:append")}return pe(()=>{const l=!!(i.default||e.header),u=!!(i.append||e.appendIcon);return y("div",{class:["v-date-picker-header",{"v-date-picker-header--clickable":!!e.onClick},a.value],style:r.value,onClick:s},[i.prepend&&y("div",{key:"prepend",class:"v-date-picker-header__prepend"},[i.prepend()]),l&&y(Pn,{key:"content",name:e.transition},{default:()=>{var c;return[y("div",{key:e.header,class:"v-date-picker-header__content"},[((c=i.default)==null?void 0:c.call(i))??e.header])]}}),u&&y("div",{class:"v-date-picker-header__append"},[i.append?y(rt,{key:"append-defaults",disabled:!e.appendIcon,defaults:{VBtn:{icon:e.appendIcon,variant:"text"}}},{default:()=>{var c;return[(c=i.append)==null?void 0:c.call(i)]}}):y(vt,{key:"append-btn",icon:e.appendIcon,variant:"text",onClick:o},null)])])}),{}}}),xF=Y({allowedDates:[Array,Function],disabled:{type:Boolean,default:null},displayValue:null,modelValue:Array,month:[Number,String],max:null,min:null,showAdjacentMonths:Boolean,year:[Number,String],weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},weeksInMonth:{type:String,default:"dynamic"},firstDayOfWeek:[Number,String]},"calendar");function SF(e){const t=ll(),n=He(e,"modelValue",[],g=>Nt(g)),i=A(()=>e.displayValue?t.date(e.displayValue):n.value.length>0?t.date(n.value[0]):e.min?t.date(e.min):Array.isArray(e.allowedDates)?t.date(e.allowedDates[0]):t.date()),a=He(e,"year",void 0,g=>{const p=g!=null?Number(g):t.getYear(i.value);return t.startOfYear(t.setYear(t.date(),p))},g=>t.getYear(g)),r=He(e,"month",void 0,g=>{const p=g!=null?Number(g):t.getMonth(i.value),m=t.setYear(t.startOfMonth(t.date()),t.getYear(a.value));return t.setMonth(m,p)},g=>t.getMonth(g)),s=A(()=>e.firstDayOfWeek??e.weekdays[0]),o=A(()=>{const g=Number(e.firstDayOfWeek??0);return e.weekdays.map(p=>(p+g)%7)}),l=A(()=>{const g=t.getWeekArray(r.value,s.value),p=g.flat(),m=6*7;if(e.weeksInMonth==="static"&&p.length<m){const v=p[p.length-1];let _=[];for(let M=1;M<=m-p.length;M++)_.push(t.addDays(v,M)),M%7===0&&(g.push(_),_=[])}return g});function u(g,p){return g.filter(m=>o.value.includes(t.toJsDate(m).getDay())).map((m,v)=>{const _=t.toISO(m),M=!t.isSameMonth(m,r.value),x=t.isSameDay(m,t.startOfMonth(r.value)),C=t.isSameDay(m,t.endOfMonth(r.value)),T=t.isSameDay(m,r.value);return{date:m,isoDate:_,formatted:t.format(m,"keyboardDate"),year:t.getYear(m),month:t.getMonth(m),isDisabled:h(m),isWeekStart:v%7===0,isWeekEnd:v%7===6,isToday:t.isSameDay(m,p),isAdjacent:M,isHidden:M&&!e.showAdjacentMonths,isStart:x,isSelected:n.value.some(P=>t.isSameDay(m,P)),isEnd:C,isSame:T,localized:t.format(m,"dayOfMonth")}})}const c=A(()=>{const g=t.startOfWeek(i.value,e.firstDayOfWeek),p=[];for(let v=0;v<=6;v++)p.push(t.addDays(g,v));const m=t.date();return u(p,m)}),d=A(()=>{const g=l.value.flat(),p=t.date();return u(g,p)}),f=A(()=>l.value.map(g=>g.length?rD(t,g[0]):null));function h(g){if(e.disabled)return!0;const p=t.date(g);return e.min&&t.isAfter(t.date(e.min),p)||e.max&&t.isAfter(p,t.date(e.max))?!0:Array.isArray(e.allowedDates)&&e.allowedDates.length>0?!e.allowedDates.some(m=>t.isSameDay(t.date(m),p)):typeof e.allowedDates=="function"?!e.allowedDates(p):!1}return{displayValue:i,daysInMonth:d,daysInWeek:c,genDays:u,model:n,weeksInMonth:l,weekDays:o,weekNumbers:f}}const Bx=Y({color:String,hideWeekdays:Boolean,multiple:[Boolean,Number,String],showWeek:Boolean,transition:{type:String,default:"picker-transition"},reverseTransition:{type:String,default:"picker-reverse-transition"},...Kt(xF(),["displayValue"])},"VDatePickerMonth"),gh=de()({name:"VDatePickerMonth",props:Bx(),emits:{"update:modelValue":e=>!0,"update:month":e=>!0,"update:year":e=>!0},setup(e,t){let{emit:n,slots:i}=t;const a=_e(),{daysInMonth:r,model:s,weekNumbers:o}=SF(e),l=ll(),u=Me(),c=Me(),d=Me(!1),f=A(()=>d.value?e.reverseTransition:e.transition);e.multiple==="range"&&s.value.length>0&&(u.value=s.value[0],s.value.length>1&&(c.value=s.value[s.value.length-1]));const h=A(()=>{const v=["number","string"].includes(typeof e.multiple)?Number(e.multiple):1/0;return s.value.length>=v});Te(r,(v,_)=>{_&&(d.value=l.isBefore(v[0].date,_[0].date))});function g(v){const _=l.startOfDay(v);if(s.value.length===0?u.value=void 0:s.value.length===1&&(u.value=s.value[0],c.value=void 0),!u.value)u.value=_,s.value=[u.value];else if(c.value)u.value=v,c.value=void 0,s.value=[u.value];else{if(l.isSameDay(_,u.value)){u.value=void 0,s.value=[];return}else l.isBefore(_,u.value)?(c.value=l.endOfDay(u.value),u.value=_):c.value=l.endOfDay(_);const M=l.getDiff(c.value,u.value,"days"),x=[u.value];for(let C=1;C<M;C++){const T=l.addDays(u.value,C);x.push(T)}x.push(c.value),s.value=x}}function p(v){const _=s.value.findIndex(M=>l.isSameDay(M,v));if(_===-1)s.value=[...s.value,v];else{const M=[...s.value];M.splice(_,1),s.value=M}}function m(v){e.multiple==="range"?g(v):e.multiple?p(v):s.value=[v]}return()=>y("div",{class:"v-date-picker-month"},[e.showWeek&&y("div",{key:"weeks",class:"v-date-picker-month__weeks"},[!e.hideWeekdays&&y("div",{key:"hide-week-days",class:"v-date-picker-month__day"},[ca(" ")]),o.value.map(v=>y("div",{class:["v-date-picker-month__day","v-date-picker-month__day--adjacent"]},[v]))]),y(Pn,{name:f.value},{default:()=>{var v;return[y("div",{ref:a,key:(v=r.value[0].date)==null?void 0:v.toString(),class:"v-date-picker-month__days"},[!e.hideWeekdays&&l.getWeekdays(e.firstDayOfWeek).map(_=>y("div",{class:["v-date-picker-month__day","v-date-picker-month__weekday"]},[_])),r.value.map((_,M)=>{const x={props:{onClick:()=>m(_.date)},item:_,i:M};return h.value&&!_.isSelected&&(_.isDisabled=!0),y("div",{class:["v-date-picker-month__day",{"v-date-picker-month__day--adjacent":_.isAdjacent,"v-date-picker-month__day--hide-adjacent":_.isHidden,"v-date-picker-month__day--selected":_.isSelected,"v-date-picker-month__day--week-end":_.isWeekEnd,"v-date-picker-month__day--week-start":_.isWeekStart}],"data-v-date":_.isDisabled?void 0:_.isoDate},[(e.showAdjacentMonths||!_.isAdjacent)&&y(rt,{defaults:{VBtn:{class:"v-date-picker-month__day-btn",color:(_.isSelected||_.isToday)&&!_.isDisabled?e.color:void 0,disabled:_.isDisabled,icon:!0,ripple:!1,text:_.localized,variant:_.isDisabled?_.isToday?"outlined":"text":_.isToday&&!_.isSelected?"outlined":"flat",onClick:()=>m(_.date)}}},{default:()=>{var C;return[((C=i.day)==null?void 0:C.call(i,x))??y(vt,x.props,null)]}})])})])]}})])}}),zx=Y({color:String,height:[String,Number],min:null,max:null,modelValue:Number,year:Number},"VDatePickerMonths"),ph=de()({name:"VDatePickerMonths",props:zx(),emits:{"update:modelValue":e=>!0},setup(e,t){let{emit:n,slots:i}=t;const a=ll(),r=He(e,"modelValue"),s=A(()=>{let o=a.startOfYear(a.date());return e.year&&(o=a.setYear(o,e.year)),Bi(12).map(l=>{const u=a.format(o,"monthShort"),c=!!(e.min&&a.isAfter(a.startOfMonth(a.date(e.min)),o)||e.max&&a.isAfter(o,a.startOfMonth(a.date(e.max))));return o=a.getNextMonth(o),{isDisabled:c,text:u,value:l}})});return Bt(()=>{r.value=r.value??a.getMonth(a.date())}),pe(()=>y("div",{class:"v-date-picker-months",style:{height:Re(e.height)}},[y("div",{class:"v-date-picker-months__content"},[s.value.map((o,l)=>{var d;const u={active:r.value===l,color:r.value===l?e.color:void 0,disabled:o.isDisabled,rounded:!0,text:o.text,variant:r.value===o.value?"flat":"text",onClick:()=>c(l)};function c(f){if(r.value===f){n("update:modelValue",r.value);return}r.value=f}return((d=i.month)==null?void 0:d.call(i,{month:o,i:l,props:u}))??y(vt,ge({key:"month"},u),null)})])])),{}}}),Hx=Y({color:String,height:[String,Number],min:null,max:null,modelValue:Number},"VDatePickerYears"),yh=de()({name:"VDatePickerYears",props:Hx(),emits:{"update:modelValue":e=>!0},setup(e,t){let{emit:n,slots:i}=t;const a=ll(),r=He(e,"modelValue"),s=A(()=>{const l=a.getYear(a.date());let u=l-100,c=l+52;e.min&&(u=a.getYear(a.date(e.min))),e.max&&(c=a.getYear(a.date(e.max)));let d=a.startOfYear(a.date());return d=a.setYear(d,u),Bi(c-u+1,u).map(f=>{const h=a.format(d,"year");return d=a.setYear(d,a.getYear(d)+1),{text:h,value:f}})});Bt(()=>{r.value=r.value??a.getYear(a.date())});const o=Fu();return Zt(async()=>{var l;await ft(),(l=o.el)==null||l.scrollIntoView({block:"center"})}),pe(()=>y("div",{class:"v-date-picker-years",style:{height:Re(e.height)}},[y("div",{class:"v-date-picker-years__content"},[s.value.map((l,u)=>{var d;const c={ref:r.value===l.value?o:void 0,active:r.value===l.value,color:r.value===l.value?e.color:void 0,rounded:!0,text:l.text,variant:r.value===l.value?"flat":"text",onClick:()=>{if(r.value===l.value){n("update:modelValue",r.value);return}r.value=l.value}};return((d=i.year)==null?void 0:d.call(i,{year:l,i:u,props:c}))??y(vt,ge({key:"month"},c),null)})])])),{}}}),MF=Wi("v-picker-title"),Gx=Y({bgColor:String,landscape:Boolean,title:String,hideHeader:Boolean,...Mc()},"VPicker"),Op=de()({name:"VPicker",props:Gx(),setup(e,t){let{slots:n}=t;const{backgroundColorClasses:i,backgroundColorStyles:a}=wt(se(e,"color"));return pe(()=>{const r=Br.filterProps(e),s=!!(e.title||n.title);return y(Br,ge(r,{color:e.bgColor,class:["v-picker",{"v-picker--landscape":e.landscape,"v-picker--with-actions":!!n.actions},e.class],style:e.style}),{default:()=>{var o;return[!e.hideHeader&&y("div",{key:"header",class:[i.value],style:[a.value]},[s&&y(MF,{key:"picker-title"},{default:()=>{var l;return[((l=n.title)==null?void 0:l.call(n))??e.title]}}),n.header&&y("div",{class:"v-picker__header"},[n.header()])]),y("div",{class:"v-picker__body"},[(o=n.default)==null?void 0:o.call(n)]),n.actions&&y(rt,{defaults:{VBtn:{slim:!0,variant:"text"}}},{default:()=>[y("div",{class:"v-picker__actions"},[n.actions()])]})]}})}),{}}}),EF=Y({header:{type:String,default:"$vuetify.datePicker.header"},...Ux(),...Bx({weeksInMonth:"static"}),...Kt(zx(),["modelValue"]),...Kt(Hx(),["modelValue"]),...Gx({title:"$vuetify.datePicker.title"}),modelValue:null},"VDatePicker"),wF=de()({name:"VDatePicker",props:EF(),emits:{"update:modelValue":e=>!0,"update:month":e=>!0,"update:year":e=>!0,"update:viewMode":e=>!0},setup(e,t){let{emit:n,slots:i}=t;const a=ll(),{t:r}=$t(),s=He(e,"modelValue",void 0,b=>Nt(b),b=>e.multiple?b:b[0]),o=He(e,"viewMode"),l=A(()=>{const b=a.date(e.min);return e.min&&a.isValid(b)?b:null}),u=A(()=>{const b=a.date(e.max);return e.max&&a.isValid(b)?b:null}),c=A(()=>{var E;const b=a.date();let S=b;return(E=s.value)!=null&&E[0]?S=a.date(s.value[0]):l.value&&a.isBefore(b,l.value)?S=l.value:u.value&&a.isAfter(b,u.value)&&(S=u.value),S&&a.isValid(S)?S:b}),d=_e(Number(e.month??a.getMonth(a.startOfMonth(c.value)))),f=_e(Number(e.year??a.getYear(a.startOfYear(a.setMonth(c.value,d.value))))),h=Me(!1),g=A(()=>e.multiple&&s.value.length>1?r("$vuetify.datePicker.itemsSelected",s.value.length):s.value[0]&&a.isValid(s.value[0])?a.format(a.date(s.value[0]),"normalDateWithWeekday"):r(e.header)),p=A(()=>{let b=a.date();return b=a.setDate(b,1),b=a.setMonth(b,d.value),b=a.setYear(b,f.value),a.format(b,"monthAndYear")}),m=A(()=>`date-picker-header${h.value?"-reverse":""}-transition`),v=A(()=>{if(e.disabled)return!0;const b=[];if(o.value!=="month")b.push("prev","next");else{let S=a.date();if(S=a.startOfMonth(S),S=a.setMonth(S,d.value),S=a.setYear(S,f.value),l.value){const E=a.addDays(a.startOfMonth(S),-1);a.isAfter(l.value,E)&&b.push("prev")}if(u.value){const E=a.addDays(a.endOfMonth(S),1);a.isAfter(E,u.value)&&b.push("next")}}return b});function _(){d.value<11?d.value++:(f.value++,d.value=0,w(f.value)),P(d.value)}function M(){d.value>0?d.value--:(f.value--,d.value=11,w(f.value)),P(d.value)}function x(){o.value="month"}function C(){o.value=o.value==="months"?"month":"months"}function T(){o.value=o.value==="year"?"month":"year"}function P(b){o.value==="months"&&C(),n("update:month",b)}function w(b){o.value==="year"&&T(),n("update:year",b)}return Te(s,(b,S)=>{const E=Nt(S),R=Nt(b);if(!R.length)return;const L=a.date(E[E.length-1]),O=a.date(R[R.length-1]),G=a.getMonth(O),U=a.getYear(O);G!==d.value&&(d.value=G,P(d.value)),U!==f.value&&(f.value=U,w(f.value)),h.value=a.isBefore(L,O)}),pe(()=>{const b=Op.filterProps(e),S=mh.filterProps(e),E=vh.filterProps(e),R=gh.filterProps(e),L=Kt(ph.filterProps(e),["modelValue"]),O=Kt(yh.filterProps(e),["modelValue"]),G={header:g.value,transition:m.value};return y(Op,ge(b,{class:["v-date-picker",`v-date-picker--${o.value}`,{"v-date-picker--show-week":e.showWeek},e.class],style:e.style}),{title:()=>{var U;return((U=i.title)==null?void 0:U.call(i))??y("div",{class:"v-date-picker__title"},[r(e.title)])},header:()=>i.header?y(rt,{defaults:{VDatePickerHeader:{...G}}},{default:()=>{var U;return[(U=i.header)==null?void 0:U.call(i,G)]}}):y(vh,ge({key:"header"},E,G,{onClick:o.value!=="month"?x:void 0}),{...i,default:void 0}),default:()=>y(Ne,null,[y(mh,ge(S,{disabled:v.value,text:p.value,"onClick:next":_,"onClick:prev":M,"onClick:month":C,"onClick:year":T}),null),y(zo,{hideOnLeave:!0},{default:()=>[o.value==="months"?y(ph,ge({key:"date-picker-months"},L,{modelValue:d.value,"onUpdate:modelValue":[U=>d.value=U,P],min:l.value,max:u.value,year:f.value}),null):o.value==="year"?y(yh,ge({key:"date-picker-years"},O,{modelValue:f.value,"onUpdate:modelValue":[U=>f.value=U,w],min:l.value,max:u.value}),null):y(gh,ge({key:"date-picker-month"},R,{modelValue:s.value,"onUpdate:modelValue":U=>s.value=U,month:d.value,"onUpdate:month":[U=>d.value=U,P],year:f.value,"onUpdate:year":[U=>f.value=U,w],min:l.value,max:u.value}),null)]})]),actions:i.actions})}),{}}}),TF=Y({actionText:String,bgColor:String,color:String,icon:We,image:String,justify:{type:String,default:"center"},headline:String,title:String,text:String,textWidth:{type:[Number,String],default:500},href:String,to:String,...Ie(),...Qt(),...$i({size:void 0}),...dt()},"VEmptyState"),CF=de()({name:"VEmptyState",props:TF(),emits:{"click:action":e=>!0},setup(e,t){let{emit:n,slots:i}=t;const{themeClasses:a}=pt(e),{backgroundColorClasses:r,backgroundColorStyles:s}=wt(se(e,"bgColor")),{dimensionStyles:o}=en(e),{displayClasses:l}=gi();function u(c){n("click:action",c)}return pe(()=>{var m,v,_;const c=!!(i.actions||e.actionText),d=!!(i.headline||e.headline),f=!!(i.title||e.title),h=!!(i.text||e.text),g=!!(i.media||e.image||e.icon),p=e.size||(e.image?200:96);return y("div",{class:["v-empty-state",{[`v-empty-state--${e.justify}`]:!0},a.value,r.value,l.value,e.class],style:[s.value,o.value,e.style]},[g&&y("div",{key:"media",class:"v-empty-state__media"},[i.media?y(rt,{key:"media-defaults",defaults:{VImg:{src:e.image,height:p},VIcon:{size:p,icon:e.icon}}},{default:()=>[i.media()]}):y(Ne,null,[e.image?y(va,{key:"image",src:e.image,height:p},null):e.icon?y(gt,{key:"icon",color:e.color,size:p,icon:e.icon},null):void 0])]),d&&y("div",{key:"headline",class:"v-empty-state__headline"},[((m=i.headline)==null?void 0:m.call(i))??e.headline]),f&&y("div",{key:"title",class:"v-empty-state__title"},[((v=i.title)==null?void 0:v.call(i))??e.title]),h&&y("div",{key:"text",class:"v-empty-state__text",style:{maxWidth:Re(e.textWidth)}},[((_=i.text)==null?void 0:_.call(i))??e.text]),i.default&&y("div",{key:"content",class:"v-empty-state__content"},[i.default()]),c&&y("div",{key:"actions",class:"v-empty-state__actions"},[y(rt,{defaults:{VBtn:{class:"v-empty-state__action-btn",color:e.color??"surface-variant",text:e.actionText}}},{default:()=>{var M;return[((M=i.actions)==null?void 0:M.call(i,{props:{onClick:u}}))??y(vt,{onClick:u},null)]}})])])}),{}}}),qo=Symbol.for("vuetify:v-expansion-panel"),Wx=Y({...Ie(),...Pm()},"VExpansionPanelText"),_h=de()({name:"VExpansionPanelText",props:Wx(),setup(e,t){let{slots:n}=t;const i=ot(qo);if(!i)throw new Error("[Vuetify] v-expansion-panel-text needs to be placed inside v-expansion-panel");const{hasContent:a,onAfterLeave:r}=Rm(e,i.isSelected);return pe(()=>y(cc,{onAfterLeave:r},{default:()=>{var s;return[kt(y("div",{class:["v-expansion-panel-text",e.class],style:e.style},[n.default&&a.value&&y("div",{class:"v-expansion-panel-text__wrapper"},[(s=n.default)==null?void 0:s.call(n)])]),[[vi,i.isSelected.value]])]}})),{}}}),$x=Y({color:String,expandIcon:{type:We,default:"$expand"},collapseIcon:{type:We,default:"$collapse"},hideActions:Boolean,focusable:Boolean,static:Boolean,ripple:{type:[Boolean,Object],default:!1},readonly:Boolean,...Ie(),...Qt()},"VExpansionPanelTitle"),bh=de()({name:"VExpansionPanelTitle",directives:{Ripple:xa},props:$x(),setup(e,t){let{slots:n}=t;const i=ot(qo);if(!i)throw new Error("[Vuetify] v-expansion-panel-title needs to be placed inside v-expansion-panel");const{backgroundColorClasses:a,backgroundColorStyles:r}=wt(e,"color"),{dimensionStyles:s}=en(e),o=A(()=>({collapseIcon:e.collapseIcon,disabled:i.disabled.value,expanded:i.isSelected.value,expandIcon:e.expandIcon,readonly:e.readonly})),l=A(()=>i.isSelected.value?e.collapseIcon:e.expandIcon);return pe(()=>{var u;return kt(y("button",{class:["v-expansion-panel-title",{"v-expansion-panel-title--active":i.isSelected.value,"v-expansion-panel-title--focusable":e.focusable,"v-expansion-panel-title--static":e.static},a.value,e.class],style:[r.value,s.value,e.style],type:"button",tabindex:i.disabled.value?-1:void 0,disabled:i.disabled.value,"aria-expanded":i.isSelected.value,onClick:e.readonly?void 0:i.toggle},[y("span",{class:"v-expansion-panel-title__overlay"},null),(u=n.default)==null?void 0:u.call(n,o.value),!e.hideActions&&y(rt,{defaults:{VIcon:{icon:l.value}}},{default:()=>{var c;return[y("span",{class:"v-expansion-panel-title__icon"},[((c=n.actions)==null?void 0:c.call(n,o.value))??y(gt,null,null)])]}})]),[[ni("ripple"),e.ripple]])}),{}}}),Xx=Y({title:String,text:String,bgColor:String,...sn(),...Qr(),...Vt(),...Je(),...$x(),...Wx()},"VExpansionPanel"),AF=de()({name:"VExpansionPanel",props:Xx(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const i=es(e,qo),{backgroundColorClasses:a,backgroundColorStyles:r}=wt(e,"bgColor"),{elevationClasses:s}=pn(e),{roundedClasses:o}=Gt(e),l=A(()=>(i==null?void 0:i.disabled.value)||e.disabled),u=A(()=>i.group.items.value.reduce((f,h,g)=>(i.group.selected.value.includes(h.id)&&f.push(g),f),[])),c=A(()=>{const f=i.group.items.value.findIndex(h=>h.id===i.id);return!i.isSelected.value&&u.value.some(h=>h-f===1)}),d=A(()=>{const f=i.group.items.value.findIndex(h=>h.id===i.id);return!i.isSelected.value&&u.value.some(h=>h-f===-1)});return Rt(qo,i),pe(()=>{const f=!!(n.text||e.text),h=!!(n.title||e.title),g=bh.filterProps(e),p=_h.filterProps(e);return y(e.tag,{class:["v-expansion-panel",{"v-expansion-panel--active":i.isSelected.value,"v-expansion-panel--before-active":c.value,"v-expansion-panel--after-active":d.value,"v-expansion-panel--disabled":l.value},o.value,a.value,e.class],style:[r.value,e.style]},{default:()=>[y("div",{class:["v-expansion-panel__shadow",...s.value]},null),y(rt,{defaults:{VExpansionPanelTitle:{...g},VExpansionPanelText:{...p}}},{default:()=>{var m;return[h&&y(bh,{key:"title"},{default:()=>[n.title?n.title():e.title]}),f&&y(_h,{key:"text"},{default:()=>[n.text?n.text():e.text]}),(m=n.default)==null?void 0:m.call(n)]}})]})}),{groupItem:i}}}),PF=["default","accordion","inset","popout"],RF=Y({flat:Boolean,...Jr(),...Ka(Xx(),["bgColor","collapseIcon","color","eager","elevation","expandIcon","focusable","hideActions","readonly","ripple","rounded","tile","static"]),...dt(),...Ie(),...Je(),variant:{type:String,default:"default",validator:e=>PF.includes(e)}},"VExpansionPanels"),IF=de()({name:"VExpansionPanels",props:RF(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{next:i,prev:a}=Qa(e,qo),{themeClasses:r}=pt(e),s=A(()=>e.variant&&`v-expansion-panels--variant-${e.variant}`);return zt({VExpansionPanel:{bgColor:se(e,"bgColor"),collapseIcon:se(e,"collapseIcon"),color:se(e,"color"),eager:se(e,"eager"),elevation:se(e,"elevation"),expandIcon:se(e,"expandIcon"),focusable:se(e,"focusable"),hideActions:se(e,"hideActions"),readonly:se(e,"readonly"),ripple:se(e,"ripple"),rounded:se(e,"rounded"),static:se(e,"static")}}),pe(()=>y(e.tag,{class:["v-expansion-panels",{"v-expansion-panels--flat":e.flat,"v-expansion-panels--tile":e.tile},r.value,s.value,e.class],style:e.style},{default:()=>{var o;return[(o=n.default)==null?void 0:o.call(n,{prev:a,next:i})]}})),{next:i,prev:a}}}),DF=Y({app:Boolean,appear:Boolean,extended:Boolean,layout:Boolean,offset:Boolean,modelValue:{type:Boolean,default:!0},...Kt(mc({active:!0}),["location"]),...qr(),...ba(),...Di({transition:"fab-transition"})},"VFab"),LF=de()({name:"VFab",props:DF(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const i=He(e,"modelValue"),a=Me(56),r=_e(),{resizeRef:s}=Ii(d=>{d.length&&(a.value=d[0].target.clientHeight)}),o=A(()=>e.app||e.absolute),l=A(()=>{var d;return o.value?((d=e.location)==null?void 0:d.split(" ").shift())??"bottom":!1}),u=A(()=>{var d;return o.value?((d=e.location)==null?void 0:d.split(" ")[1])??"end":!1});zn(()=>e.app,()=>{const d=jr({id:e.name,order:A(()=>parseInt(e.order,10)),position:l,layoutSize:A(()=>e.layout?a.value+24:0),elementSize:A(()=>a.value+24),active:A(()=>e.app&&i.value),absolute:se(e,"absolute")});Bt(()=>{r.value=d.layoutItemStyles.value})});const c=_e();return pe(()=>{const d=vt.filterProps(e);return y("div",{ref:c,class:["v-fab",{"v-fab--absolute":e.absolute,"v-fab--app":!!e.app,"v-fab--extended":e.extended,"v-fab--offset":e.offset,[`v-fab--${l.value}`]:o.value,[`v-fab--${u.value}`]:o.value},e.class],style:[e.app?{...r.value}:{height:e.absolute?"100%":"inherit"},e.style]},[y("div",{class:"v-fab__container"},[y(Pn,{appear:e.appear,transition:e.transition},{default:()=>[kt(y(vt,ge({ref:s},d,{active:void 0,location:void 0}),n),[[vi,e.active]])]})])])}),{}}}),kF=Y({chips:Boolean,counter:Boolean,counterSizeString:{type:String,default:"$vuetify.fileInput.counterSize"},counterString:{type:String,default:"$vuetify.fileInput.counter"},hideInput:Boolean,multiple:Boolean,showSize:{type:[Boolean,Number,String],default:!1,validator:e=>typeof e=="boolean"||[1e3,1024].includes(Number(e))},...Ma({prependIcon:"$file"}),modelValue:{type:[Array,Object],default:e=>e.multiple?[]:null,validator:e=>Nt(e).every(t=>t!=null&&typeof t=="object")},...pl({clearable:!0})},"VFileInput"),VF=de()({name:"VFileInput",inheritAttrs:!1,props:kF(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:n,emit:i,slots:a}=t;const{t:r}=$t(),s=He(e,"modelValue",e.modelValue,E=>Nt(E),E=>!e.multiple&&Array.isArray(E)?E[0]:E),{isFocused:o,focus:l,blur:u}=Sa(e),c=A(()=>typeof e.showSize!="boolean"?e.showSize:void 0),d=A(()=>(s.value??[]).reduce((E,R)=>{let{size:L=0}=R;return E+L},0)),f=A(()=>Jg(d.value,c.value)),h=A(()=>(s.value??[]).map(E=>{const{name:R="",size:L=0}=E;return e.showSize?`${R} (${Jg(L,c.value)})`:R})),g=A(()=>{var R;const E=((R=s.value)==null?void 0:R.length)??0;return e.showSize?r(e.counterSizeString,E,f.value):r(e.counterString,E)}),p=_e(),m=_e(),v=_e(),_=A(()=>o.value||e.active),M=A(()=>["plain","underlined"].includes(e.variant));function x(){var E;v.value!==document.activeElement&&((E=v.value)==null||E.focus()),o.value||l()}function C(E){var R;(R=v.value)==null||R.click()}function T(E){i("mousedown:control",E)}function P(E){var R;(R=v.value)==null||R.click(),i("click:control",E)}function w(E){E.stopPropagation(),x(),ft(()=>{s.value=[],ic(e["onClick:clear"],E)})}function b(E){E.preventDefault()}function S(E){E.preventDefault(),E.dataTransfer&&(s.value=[...E.dataTransfer.files??[]])}return Te(s,E=>{(!Array.isArray(E)||!E.length)&&v.value&&(v.value.value="")}),pe(()=>{const E=!!(a.counter||e.counter),R=!!(E||a.details),[L,O]=Za(n),{modelValue:G,...U}=xn.filterProps(e),j=$a.filterProps(e);return y(xn,ge({ref:p,modelValue:e.multiple?s.value:s.value[0],class:["v-file-input",{"v-file-input--chips":!!e.chips,"v-file-input--hide":e.hideInput,"v-input--plain-underlined":M.value},e.class],style:e.style,"onClick:prepend":C},L,U,{centerAffix:!M.value,focused:o.value}),{...a,default:B=>{let{id:X,isDisabled:W,isDirty:H,isReadonly:te,isValid:Se}=B;return y($a,ge({ref:m,"prepend-icon":e.prependIcon,onMousedown:T,onClick:P,"onClick:clear":w,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},j,{id:X.value,active:_.value||H.value,dirty:H.value||e.dirty,disabled:W.value,focused:o.value,error:Se.value===!1,onDragover:b,onDrop:S}),{...a,default:$=>{var Q;let{props:{class:he,...ae}}=$;return y(Ne,null,[y("input",ge({ref:v,type:"file",readonly:te.value,disabled:W.value,multiple:e.multiple,name:e.name,onClick:ve=>{ve.stopPropagation(),te.value&&ve.preventDefault(),x()},onChange:ve=>{if(!ve.target)return;const Ge=ve.target;s.value=[...Ge.files??[]]},onFocus:x,onBlur:u},ae,O),null),y("div",{class:he},[!!((Q=s.value)!=null&&Q.length)&&!e.hideInput&&(a.selection?a.selection({fileNames:h.value,totalBytes:d.value,totalBytesReadable:f.value}):e.chips?h.value.map(ve=>y(io,{key:ve,size:"small",text:ve},null)):h.value.join(", "))])])}})},details:R?B=>{var X,W;return y(Ne,null,[(X=a.details)==null?void 0:X.call(a,B),E&&y(Ne,null,[y("span",null,null),y(yc,{active:!!((W=s.value)!=null&&W.length),value:g.value,disabled:e.disabled},a.counter)])])}:void 0})}),yi({},p,m,v)}}),FF=Y({app:Boolean,color:String,height:{type:[Number,String],default:"auto"},...Yn(),...Ie(),...sn(),...qr(),...Vt(),...Je({tag:"footer"}),...dt()},"VFooter"),NF=de()({name:"VFooter",props:FF(),setup(e,t){let{slots:n}=t;const i=_e(),{themeClasses:a}=pt(e),{backgroundColorClasses:r,backgroundColorStyles:s}=wt(se(e,"color")),{borderClasses:o}=ri(e),{elevationClasses:l}=pn(e),{roundedClasses:u}=Gt(e),c=Me(32),{resizeRef:d}=Ii(h=>{h.length&&(c.value=h[0].target.clientHeight)}),f=A(()=>e.height==="auto"?c.value:parseInt(e.height,10));return zn(()=>e.app,()=>{const h=jr({id:e.name,order:A(()=>parseInt(e.order,10)),position:A(()=>"bottom"),layoutSize:f,elementSize:A(()=>e.height==="auto"?void 0:f.value),active:A(()=>e.app),absolute:se(e,"absolute")});Bt(()=>{i.value=h.layoutItemStyles.value})}),pe(()=>y(e.tag,{ref:d,class:["v-footer",a.value,r.value,o.value,l.value,u.value,e.class],style:[s.value,e.app?i.value:{height:Re(e.height)},e.style]},n)),{}}}),OF=Y({...Ie(),...XL()},"VForm"),UF=de()({name:"VForm",props:OF(),emits:{"update:modelValue":e=>!0,submit:e=>!0},setup(e,t){let{slots:n,emit:i}=t;const a=YL(e),r=_e();function s(l){l.preventDefault(),a.reset()}function o(l){const u=l,c=a.validate();u.then=c.then.bind(c),u.catch=c.catch.bind(c),u.finally=c.finally.bind(c),i("submit",u),u.defaultPrevented||c.then(d=>{var h;let{valid:f}=d;f&&((h=r.value)==null||h.submit())}),u.preventDefault()}return pe(()=>{var l;return y("form",{ref:r,class:["v-form",e.class],style:e.style,novalidate:!0,onReset:s,onSubmit:o},[(l=n.default)==null?void 0:l.call(n,a)])}),yi(a,r)}}),BF=Y({disabled:Boolean,modelValue:{type:Boolean,default:null},...Cm()},"VHover"),zF=de()({name:"VHover",props:BF(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const i=He(e,"modelValue"),{runOpenDelay:a,runCloseDelay:r}=Am(e,s=>!e.disabled&&(i.value=s));return()=>{var s;return(s=n.default)==null?void 0:s.call(n,{isHovering:i.value,props:{onMouseenter:a,onMouseleave:r}})}}}),HF=Y({color:String,direction:{type:String,default:"vertical",validator:e=>["vertical","horizontal"].includes(e)},side:{type:String,default:"end",validator:e=>["start","end","both"].includes(e)},mode:{type:String,default:"intersect",validator:e=>["intersect","manual"].includes(e)},margin:[Number,String],loadMoreText:{type:String,default:"$vuetify.infiniteScroll.loadMore"},emptyText:{type:String,default:"$vuetify.infiniteScroll.empty"},...Qt(),...Je()},"VInfiniteScroll"),Up=ii({name:"VInfiniteScrollIntersect",props:{side:{type:String,required:!0},rootMargin:String},emits:{intersect:(e,t)=>!0},setup(e,t){let{emit:n}=t;const{intersectionRef:i,isIntersecting:a}=dc();return Te(a,async r=>{n("intersect",e.side,r)}),pe(()=>y("div",{class:"v-infinite-scroll-intersect",style:{"--v-infinite-margin-size":e.rootMargin},ref:i},[ca(" ")])),{}}}),GF=de()({name:"VInfiniteScroll",props:HF(),emits:{load:e=>!0},setup(e,t){let{slots:n,emit:i}=t;const a=_e(),r=Me("ok"),s=Me("ok"),o=A(()=>Re(e.margin)),l=Me(!1);function u(C){if(!a.value)return;const T=e.direction==="vertical"?"scrollTop":"scrollLeft";a.value[T]=C}function c(){if(!a.value)return 0;const C=e.direction==="vertical"?"scrollTop":"scrollLeft";return a.value[C]}function d(){if(!a.value)return 0;const C=e.direction==="vertical"?"scrollHeight":"scrollWidth";return a.value[C]}function f(){if(!a.value)return 0;const C=e.direction==="vertical"?"clientHeight":"clientWidth";return a.value[C]}Zt(()=>{a.value&&(e.side==="start"?u(d()):e.side==="both"&&u(d()/2-f()/2))});function h(C,T){C==="start"?r.value=T:C==="end"&&(s.value=T)}function g(C){return C==="start"?r.value:s.value}let p=0;function m(C,T){l.value=T,l.value&&v(C)}function v(C){if(e.mode!=="manual"&&!l.value)return;const T=g(C);if(!a.value||["empty","loading"].includes(T))return;p=d(),h(C,"loading");function P(w){h(C,w),ft(()=>{w==="empty"||w==="error"||(w==="ok"&&C==="start"&&u(d()-p+c()),e.mode!=="manual"&&ft(()=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{v(C)})})})}))})}i("load",{side:C,done:P})}const{t:_}=$t();function M(C,T){var b,S,E,R,L;if(e.side!==C&&e.side!=="both")return;const P=()=>v(C),w={side:C,props:{onClick:P,color:e.color}};return T==="error"?(b=n.error)==null?void 0:b.call(n,w):T==="empty"?((S=n.empty)==null?void 0:S.call(n,w))??y("div",null,[_(e.emptyText)]):e.mode==="manual"?T==="loading"?((E=n.loading)==null?void 0:E.call(n,w))??y(Ys,{indeterminate:!0,color:e.color},null):((R=n["load-more"])==null?void 0:R.call(n,w))??y(vt,{variant:"outlined",color:e.color,onClick:P},{default:()=>[_(e.loadMoreText)]}):((L=n.loading)==null?void 0:L.call(n,w))??y(Ys,{indeterminate:!0,color:e.color},null)}const{dimensionStyles:x}=en(e);pe(()=>{const C=e.tag,T=e.side==="start"||e.side==="both",P=e.side==="end"||e.side==="both",w=e.mode==="intersect";return y(C,{ref:a,class:["v-infinite-scroll",`v-infinite-scroll--${e.direction}`,{"v-infinite-scroll--start":T,"v-infinite-scroll--end":P}],style:x.value},{default:()=>{var b;return[y("div",{class:"v-infinite-scroll__side"},[M("start",r.value)]),T&&w&&y(Up,{key:"start",side:"start",onIntersect:m,rootMargin:o.value},null),(b=n.default)==null?void 0:b.call(n),P&&w&&y(Up,{key:"end",side:"end",onIntersect:m,rootMargin:o.value},null),y("div",{class:"v-infinite-scroll__side"},[M("end",s.value)])]}})})}}),Yx=Symbol.for("vuetify:v-item-group"),WF=Y({...Ie(),...Jr({selectedClass:"v-item--selected"}),...Je(),...dt()},"VItemGroup"),$F=de()({name:"VItemGroup",props:WF(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:i}=pt(e),{isSelected:a,select:r,next:s,prev:o,selected:l}=Qa(e,Yx);return()=>y(e.tag,{class:["v-item-group",i.value,e.class],style:e.style},{default:()=>{var u;return[(u=n.default)==null?void 0:u.call(n,{isSelected:a,select:r,next:s,prev:o,selected:l.value})]}})}}),XF=de()({name:"VItem",props:Qr(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const{isSelected:i,select:a,toggle:r,selectedClass:s,value:o,disabled:l}=es(e,Yx);return()=>{var u;return(u=n.default)==null?void 0:u.call(n,{isSelected:i.value,selectedClass:s.value,select:a,toggle:r,value:o.value,disabled:l.value})}}}),YF=Wi("v-kbd","kbd"),qF=Y({...Ie(),...Qt(),...Vb()},"VLayout"),jF=de()({name:"VLayout",props:qF(),setup(e,t){let{slots:n}=t;const{layoutClasses:i,layoutStyles:a,getLayoutItem:r,items:s,layoutRef:o}=Nb(e),{dimensionStyles:l}=en(e);return pe(()=>{var u;return y("div",{ref:o,class:[i.value,e.class],style:[l.value,a.value,e.style]},[(u=n.default)==null?void 0:u.call(n)])}),{getLayoutItem:r,items:s}}}),KF=Y({position:{type:String,required:!0},size:{type:[Number,String],default:300},modelValue:Boolean,...Ie(),...qr()},"VLayoutItem"),ZF=de()({name:"VLayoutItem",props:KF(),setup(e,t){let{slots:n}=t;const{layoutItemStyles:i}=jr({id:e.name,order:A(()=>parseInt(e.order,10)),position:se(e,"position"),elementSize:se(e,"size"),layoutSize:se(e,"size"),active:se(e,"modelValue"),absolute:se(e,"absolute")});return()=>{var a;return y("div",{class:["v-layout-item",e.class],style:[i.value,e.style]},[(a=n.default)==null?void 0:a.call(n)])}}}),JF=Y({modelValue:Boolean,options:{type:Object,default:()=>({root:void 0,rootMargin:void 0,threshold:void 0})},...Ie(),...Qt(),...Je(),...Di({transition:"fade-transition"})},"VLazy"),QF=de()({name:"VLazy",directives:{intersect:ul},props:JF(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{dimensionStyles:i}=en(e),a=He(e,"modelValue");function r(s){a.value||(a.value=s)}return pe(()=>kt(y(e.tag,{class:["v-lazy",e.class],style:[i.value,e.style]},{default:()=>[a.value&&y(Pn,{transition:e.transition,appear:!0},{default:()=>{var s;return[(s=n.default)==null?void 0:s.call(n)]}})]}),[[ni("intersect"),{handler:r,options:e.options},null]])),{}}}),eN=Y({locale:String,fallbackLocale:String,messages:Object,rtl:{type:Boolean,default:void 0},...Ie()},"VLocaleProvider"),tN=de()({name:"VLocaleProvider",props:eN(),setup(e,t){let{slots:n}=t;const{rtlClasses:i}=gI(e);return pe(()=>{var a;return y("div",{class:["v-locale-provider",i.value,e.class],style:e.style},[(a=n.default)==null?void 0:a.call(n)])}),{}}}),nN=Y({scrollable:Boolean,...Ie(),...Qt(),...Je({tag:"main"})},"VMain"),iN=de()({name:"VMain",props:nN(),setup(e,t){let{slots:n}=t;const{dimensionStyles:i}=en(e),{mainStyles:a}=Fb(),{ssrBootStyles:r}=Kr();return pe(()=>y(e.tag,{class:["v-main",{"v-main--scrollable":e.scrollable},e.class],style:[a.value,r.value,i.value,e.style]},{default:()=>{var s,o;return[e.scrollable?y("div",{class:"v-main__scroller"},[(s=n.default)==null?void 0:s.call(n)]):(o=n.default)==null?void 0:o.call(n)]}})),{}}});function aN(e){let{rootEl:t,isSticky:n,layoutItemStyles:i}=e;const a=Me(!1),r=Me(0),s=A(()=>{const u=typeof a.value=="boolean"?"top":a.value;return[n.value?{top:"auto",bottom:"auto",height:void 0}:void 0,a.value?{[u]:Re(r.value)}:{top:i.value.top}]});Zt(()=>{Te(n,u=>{u?window.addEventListener("scroll",l,{passive:!0}):window.removeEventListener("scroll",l)},{immediate:!0})}),dn(()=>{window.removeEventListener("scroll",l)});let o=0;function l(){const u=o>window.scrollY?"up":"down",c=t.value.getBoundingClientRect(),d=parseFloat(i.value.top??0),f=window.scrollY-Math.max(0,r.value-d),h=c.height+Math.max(r.value,d)-window.scrollY-window.innerHeight,g=parseFloat(getComputedStyle(t.value).getPropertyValue("--v-body-scroll-y"))||0;c.height<window.innerHeight-d?(a.value="top",r.value=d):u==="up"&&a.value==="bottom"||u==="down"&&a.value==="top"?(r.value=window.scrollY+c.top-g,a.value=!0):u==="down"&&h<=0?(r.value=0,a.value="bottom"):u==="up"&&f<=0&&(g?a.value!=="top"&&(r.value=-f+g+d,a.value="top"):(r.value=c.top+f,a.value="top")),o=window.scrollY}return{isStuck:a,stickyStyles:s}}const rN=100,sN=20;function Bp(e){return(e<0?-1:1)*Math.sqrt(Math.abs(e))*1.41421356237}function zp(e){if(e.length<2)return 0;if(e.length===2)return e[1].t===e[0].t?0:(e[1].d-e[0].d)/(e[1].t-e[0].t);let t=0;for(let n=e.length-1;n>0;n--){if(e[n].t===e[n-1].t)continue;const i=Bp(t),a=(e[n].d-e[n-1].d)/(e[n].t-e[n-1].t);t+=(a-i)*Math.abs(a),n===e.length-1&&(t*=.5)}return Bp(t)*1e3}function oN(){const e={};function t(a){Array.from(a.changedTouches).forEach(r=>{(e[r.identifier]??(e[r.identifier]=new CR(sN))).push([a.timeStamp,r])})}function n(a){Array.from(a.changedTouches).forEach(r=>{delete e[r.identifier]})}function i(a){var u;const r=(u=e[a])==null?void 0:u.values().reverse();if(!r)throw new Error(`No samples for touch id ${a}`);const s=r[0],o=[],l=[];for(const c of r){if(s[0]-c[0]>rN)break;o.push({t:c[0],d:c[1].clientX}),l.push({t:c[0],d:c[1].clientY})}return{x:zp(o),y:zp(l),get direction(){const{x:c,y:d}=this,[f,h]=[Math.abs(c),Math.abs(d)];return f>h&&c>=0?"right":f>h&&c<=0?"left":h>f&&d>=0?"down":h>f&&d<=0?"up":lN()}}}return{addMovement:t,endTouch:n,getVelocity:i}}function lN(){throw new Error}function uN(e){let{el:t,isActive:n,isTemporary:i,width:a,touchless:r,position:s}=e;Zt(()=>{window.addEventListener("touchstart",_,{passive:!0}),window.addEventListener("touchmove",M,{passive:!1}),window.addEventListener("touchend",x,{passive:!0})}),dn(()=>{window.removeEventListener("touchstart",_),window.removeEventListener("touchmove",M),window.removeEventListener("touchend",x)});const o=A(()=>["left","right"].includes(s.value)),{addMovement:l,endTouch:u,getVelocity:c}=oN();let d=!1;const f=Me(!1),h=Me(0),g=Me(0);let p;function m(T,P){return(s.value==="left"?T:s.value==="right"?document.documentElement.clientWidth-T:s.value==="top"?T:s.value==="bottom"?document.documentElement.clientHeight-T:Ss())-(P?a.value:0)}function v(T){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const w=s.value==="left"?(T-g.value)/a.value:s.value==="right"?(document.documentElement.clientWidth-T-g.value)/a.value:s.value==="top"?(T-g.value)/a.value:s.value==="bottom"?(document.documentElement.clientHeight-T-g.value)/a.value:Ss();return P?Math.max(0,Math.min(1,w)):w}function _(T){if(r.value)return;const P=T.changedTouches[0].clientX,w=T.changedTouches[0].clientY,b=25,S=s.value==="left"?P<b:s.value==="right"?P>document.documentElement.clientWidth-b:s.value==="top"?w<b:s.value==="bottom"?w>document.documentElement.clientHeight-b:Ss(),E=n.value&&(s.value==="left"?P<a.value:s.value==="right"?P>document.documentElement.clientWidth-a.value:s.value==="top"?w<a.value:s.value==="bottom"?w>document.documentElement.clientHeight-a.value:Ss());(S||E||n.value&&i.value)&&(p=[P,w],g.value=m(o.value?P:w,n.value),h.value=v(o.value?P:w),d=g.value>-20&&g.value<80,u(T),l(T))}function M(T){const P=T.changedTouches[0].clientX,w=T.changedTouches[0].clientY;if(d){if(!T.cancelable){d=!1;return}const S=Math.abs(P-p[0]),E=Math.abs(w-p[1]);(o.value?S>E&&S>3:E>S&&E>3)?(f.value=!0,d=!1):(o.value?E:S)>3&&(d=!1)}if(!f.value)return;T.preventDefault(),l(T);const b=v(o.value?P:w,!1);h.value=Math.max(0,Math.min(1,b)),b>1?g.value=m(o.value?P:w,!0):b<0&&(g.value=m(o.value?P:w,!1))}function x(T){if(d=!1,!f.value)return;l(T),f.value=!1;const P=c(T.changedTouches[0].identifier),w=Math.abs(P.x),b=Math.abs(P.y);(o.value?w>b&&w>400:b>w&&b>3)?n.value=P.direction===({left:"right",right:"left",top:"down",bottom:"up"}[s.value]||Ss()):n.value=h.value>.5}const C=A(()=>f.value?{transform:s.value==="left"?`translateX(calc(-100% + ${h.value*a.value}px))`:s.value==="right"?`translateX(calc(100% - ${h.value*a.value}px))`:s.value==="top"?`translateY(calc(-100% + ${h.value*a.value}px))`:s.value==="bottom"?`translateY(calc(100% - ${h.value*a.value}px))`:Ss(),transition:"none"}:void 0);return zn(f,()=>{var w,b;const T=((w=t.value)==null?void 0:w.style.transform)??null,P=((b=t.value)==null?void 0:b.style.transition)??null;Bt(()=>{var S,E,R,L;(E=t.value)==null||E.style.setProperty("transform",((S=C.value)==null?void 0:S.transform)||"none"),(L=t.value)==null||L.style.setProperty("transition",((R=C.value)==null?void 0:R.transition)||null)}),Sn(()=>{var S,E;(S=t.value)==null||S.style.setProperty("transform",T),(E=t.value)==null||E.style.setProperty("transition",P)})}),{isDragging:f,dragProgress:h,dragStyles:C}}function Ss(){throw new Error}const cN=["start","end","left","right","top","bottom"],dN=Y({color:String,disableResizeWatcher:Boolean,disableRouteWatcher:Boolean,expandOnHover:Boolean,floating:Boolean,modelValue:{type:Boolean,default:null},permanent:Boolean,rail:{type:Boolean,default:null},railWidth:{type:[Number,String],default:56},scrim:{type:[Boolean,String],default:!0},image:String,temporary:Boolean,persistent:Boolean,touchless:Boolean,width:{type:[Number,String],default:256},location:{type:String,default:"start",validator:e=>cN.includes(e)},sticky:Boolean,...Yn(),...Ie(),...Cm(),...Yr({mobile:null}),...sn(),...qr(),...Vt(),...Je({tag:"nav"}),...dt()},"VNavigationDrawer"),fN=de()({name:"VNavigationDrawer",props:dN(),emits:{"update:modelValue":e=>!0,"update:rail":e=>!0},setup(e,t){let{attrs:n,emit:i,slots:a}=t;const{isRtl:r}=rn(),{themeClasses:s}=pt(e),{borderClasses:o}=ri(e),{backgroundColorClasses:l,backgroundColorStyles:u}=wt(se(e,"color")),{elevationClasses:c}=pn(e),{displayClasses:d,mobile:f}=gi(e),{roundedClasses:h}=Gt(e),g=jb(),p=He(e,"modelValue",null,W=>!!W),{ssrBootStyles:m}=Kr(),{scopeId:v}=ns(),_=_e(),M=Me(!1),{runOpenDelay:x,runCloseDelay:C}=Am(e,W=>{M.value=W}),T=A(()=>e.rail&&e.expandOnHover&&M.value?Number(e.width):Number(e.rail?e.railWidth:e.width)),P=A(()=>Gf(e.location,r.value)),w=A(()=>e.persistent),b=A(()=>!e.permanent&&(f.value||e.temporary)),S=A(()=>e.sticky&&!b.value&&P.value!=="bottom");zn(()=>e.expandOnHover&&e.rail!=null,()=>{Te(M,W=>i("update:rail",!W))}),zn(()=>!e.disableResizeWatcher,()=>{Te(b,W=>!e.permanent&&ft(()=>p.value=!W))}),zn(()=>!e.disableRouteWatcher&&!!g,()=>{Te(g.currentRoute,()=>b.value&&(p.value=!1))}),Te(()=>e.permanent,W=>{W&&(p.value=!0)}),e.modelValue==null&&!b.value&&(p.value=e.permanent||!f.value);const{isDragging:E,dragProgress:R}=uN({el:_,isActive:p,isTemporary:b,width:T,touchless:se(e,"touchless"),position:P}),L=A(()=>{const W=b.value?0:e.rail&&e.expandOnHover?Number(e.railWidth):T.value;return E.value?W*R.value:W}),{layoutItemStyles:O,layoutItemScrimStyles:G}=jr({id:e.name,order:A(()=>parseInt(e.order,10)),position:P,layoutSize:L,elementSize:T,active:A(()=>p.value||E.value),disableTransitions:A(()=>E.value),absolute:A(()=>e.absolute||S.value&&typeof U.value!="string")}),{isStuck:U,stickyStyles:j}=aN({rootEl:_,isSticky:S,layoutItemStyles:O}),B=wt(A(()=>typeof e.scrim=="string"?e.scrim:null)),X=A(()=>({...E.value?{opacity:R.value*.2,transition:"none"}:void 0,...G.value}));return zt({VList:{bgColor:"transparent"}}),pe(()=>{const W=a.image||e.image;return y(Ne,null,[y(e.tag,ge({ref:_,onMouseenter:x,onMouseleave:C,class:["v-navigation-drawer",`v-navigation-drawer--${P.value}`,{"v-navigation-drawer--expand-on-hover":e.expandOnHover,"v-navigation-drawer--floating":e.floating,"v-navigation-drawer--is-hovering":M.value,"v-navigation-drawer--rail":e.rail,"v-navigation-drawer--temporary":b.value,"v-navigation-drawer--persistent":w.value,"v-navigation-drawer--active":p.value,"v-navigation-drawer--sticky":S.value},s.value,l.value,o.value,d.value,c.value,h.value,e.class],style:[u.value,O.value,m.value,j.value,e.style]},v,n),{default:()=>{var H,te,Se;return[W&&y("div",{key:"image",class:"v-navigation-drawer__img"},[a.image?y(rt,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{alt:"",cover:!0,height:"inherit",src:e.image}}},a.image):y(va,{key:"image-img",alt:"",cover:!0,height:"inherit",src:e.image},null)]),a.prepend&&y("div",{class:"v-navigation-drawer__prepend"},[(H=a.prepend)==null?void 0:H.call(a)]),y("div",{class:"v-navigation-drawer__content"},[(te=a.default)==null?void 0:te.call(a)]),a.append&&y("div",{class:"v-navigation-drawer__append"},[(Se=a.append)==null?void 0:Se.call(a)])]}}),y(da,{name:"fade-transition"},{default:()=>[b.value&&(E.value||p.value)&&!!e.scrim&&y("div",ge({class:["v-navigation-drawer__scrim",B.backgroundColorClasses.value],style:[X.value,B.backgroundColorStyles.value],onClick:()=>{w.value||(p.value=!1)}},v),null)]})])}),{isStuck:U}}}),hN=ii({name:"VNoSsr",setup(e,t){let{slots:n}=t;const i=k0();return()=>{var a;return i.value&&((a=n.default)==null?void 0:a.call(n))}}}),mN=Y({autofocus:Boolean,divider:String,focusAll:Boolean,label:{type:String,default:"$vuetify.input.otp"},length:{type:[Number,String],default:6},modelValue:{type:[Number,String],default:void 0},placeholder:String,type:{type:String,default:"number"},...Qt(),...ml(),...Ka(pl({variant:"outlined"}),["baseColor","bgColor","class","color","disabled","error","loading","rounded","style","theme","variant"])},"VOtpInput"),vN=de()({name:"VOtpInput",props:mN(),emits:{finish:e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:n,emit:i,slots:a}=t;const{dimensionStyles:r}=en(e),{isFocused:s,focus:o,blur:l}=Sa(e),u=He(e,"modelValue","",w=>w==null?[]:String(w).split(""),w=>w.join("")),{t:c}=$t(),d=A(()=>Number(e.length)),f=A(()=>Array(d.value).fill(0)),h=_e(-1),g=_e(),p=_e([]),m=A(()=>p.value[h.value]);function v(){if(P(m.value.value)){m.value.value="";return}const w=u.value.slice(),b=m.value.value;w[h.value]=b;let S=null;h.value>u.value.length?S=u.value.length+1:h.value+1!==d.value&&(S="next"),u.value=w,S&&Ar(g.value,S)}function _(w){const b=u.value.slice(),S=h.value;let E=null;["ArrowLeft","ArrowRight","Backspace","Delete"].includes(w.key)&&(w.preventDefault(),w.key==="ArrowLeft"?E="prev":w.key==="ArrowRight"?E="next":["Backspace","Delete"].includes(w.key)&&(b[h.value]="",u.value=b,h.value>0&&w.key==="Backspace"?E="prev":requestAnimationFrame(()=>{var R;(R=p.value[S])==null||R.select()})),requestAnimationFrame(()=>{E!=null&&Ar(g.value,E)}))}function M(w,b){var E,R;b.preventDefault(),b.stopPropagation();const S=((E=b==null?void 0:b.clipboardData)==null?void 0:E.getData("Text").slice(0,d.value))??"";P(S)||(u.value=S.split(""),(R=p.value)==null||R[w].blur())}function x(){u.value=[]}function C(w,b){o(),h.value=b}function T(){l(),h.value=-1}function P(w){return e.type==="number"&&/[^0-9]/g.test(w)}return zt({VField:{color:A(()=>e.color),bgColor:A(()=>e.color),baseColor:A(()=>e.baseColor),disabled:A(()=>e.disabled),error:A(()=>e.error),variant:A(()=>e.variant)}},{scoped:!0}),Te(u,w=>{w.length===d.value&&i("finish",w.join(""))},{deep:!0}),Te(h,w=>{w<0||ft(()=>{var b;(b=p.value[w])==null||b.select()})}),pe(()=>{var S;const[w,b]=Za(n);return y("div",ge({class:["v-otp-input",{"v-otp-input--divided":!!e.divider},e.class],style:[e.style]},w),[y("div",{ref:g,class:"v-otp-input__content",style:[r.value]},[f.value.map((E,R)=>y(Ne,null,[e.divider&&R!==0&&y("span",{class:"v-otp-input__divider"},[e.divider]),y($a,{focused:s.value&&e.focusAll||h.value===R,key:R},{...a,loader:void 0,default:()=>y("input",{ref:L=>p.value[R]=L,"aria-label":c(e.label,R+1),autofocus:R===0&&e.autofocus,autocomplete:"one-time-code",class:["v-otp-input__field"],disabled:e.disabled,inputmode:e.type==="number"?"numeric":"text",min:e.type==="number"?0:void 0,maxlength:R===0?d.value:"1",placeholder:e.placeholder,type:e.type==="number"?"text":e.type,value:u.value[R],onInput:v,onFocus:L=>C(L,R),onBlur:T,onKeydown:_,onPaste:L=>M(R,L)},null)})])),y("input",ge({class:"v-otp-input-input",type:"hidden"},b,{value:u.value.join("")}),null),y(zi,{contained:!0,"content-class":"v-otp-input__loader","model-value":!!e.loading,persistent:!0},{default:()=>{var E;return[((E=a.loader)==null?void 0:E.call(a))??y(Ys,{color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0,size:"24",width:"2"},null)]}}),(S=a.default)==null?void 0:S.call(a)])])}),{blur:()=>{var w;(w=p.value)==null||w.some(b=>b.blur())},focus:()=>{var w;(w=p.value)==null||w[0].focus()},reset:x,isFocused:s}}});function gN(e){return Math.floor(Math.abs(e))*Math.sign(e)}const pN=Y({scale:{type:[Number,String],default:.5},...Ie()},"VParallax"),yN=de()({name:"VParallax",props:pN(),setup(e,t){let{slots:n}=t;const{intersectionRef:i,isIntersecting:a}=dc(),{resizeRef:r,contentRect:s}=Ii(),{height:o}=gi(),l=_e();Bt(()=>{var h;i.value=r.value=(h=l.value)==null?void 0:h.$el});let u;Te(a,h=>{h?(u=dm(i.value),u=u===document.scrollingElement?document:u,u.addEventListener("scroll",f,{passive:!0}),f()):u.removeEventListener("scroll",f)}),dn(()=>{u==null||u.removeEventListener("scroll",f)}),Te(o,f),Te(()=>{var h;return(h=s.value)==null?void 0:h.height},f);const c=A(()=>1-qt(Number(e.scale)));let d=-1;function f(){a.value&&(cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var C;const h=((C=l.value)==null?void 0:C.$el).querySelector(".v-img__img");if(!h)return;const g=u instanceof Document?document.documentElement.clientHeight:u.clientHeight,p=u instanceof Document?window.scrollY:u.scrollTop,m=i.value.getBoundingClientRect().top+p,v=s.value.height,_=m+(v-g)/2,M=gN((p-_)*c.value),x=Math.max(1,(c.value*(g-v)+v)/v);h.style.setProperty("transform",`translateY(${M}px) scale(${x})`)}))}return pe(()=>y(va,{class:["v-parallax",{"v-parallax--active":a.value},e.class],style:e.style,ref:l,cover:!0,onLoadstart:f,onLoad:f},n)),{}}}),_N=Y({...vc({falseIcon:"$radioOff",trueIcon:"$radioOn"})},"VRadio"),bN=de()({name:"VRadio",props:_N(),setup(e,t){let{slots:n}=t;return pe(()=>{const i=Wa.filterProps(e);return y(Wa,ge(i,{class:["v-radio",e.class],style:e.style,type:"radio"}),n)}),{}}}),xN=Y({height:{type:[Number,String],default:"auto"},...Ma(),...Kt(Sm(),["multiple"]),trueIcon:{type:We,default:"$radioOn"},falseIcon:{type:We,default:"$radioOff"},type:{type:String,default:"radio"}},"VRadioGroup"),SN=de()({name:"VRadioGroup",inheritAttrs:!1,props:xN(),emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:i}=t;const a=gn(),r=A(()=>e.id||`radio-group-${a}`),s=He(e,"modelValue");return pe(()=>{const[o,l]=Za(n),u=xn.filterProps(e),c=Wa.filterProps(e),d=i.label?i.label({label:e.label,props:{for:r.value}}):e.label;return y(xn,ge({class:["v-radio-group",e.class],style:e.style},o,u,{modelValue:s.value,"onUpdate:modelValue":f=>s.value=f,id:r.value}),{...i,default:f=>{let{id:h,messagesId:g,isDisabled:p,isReadonly:m}=f;return y(Ne,null,[d&&y(no,{id:h.value},{default:()=>[d]}),y(s0,ge(c,{id:h.value,"aria-describedby":g.value,defaultsTarget:"VRadio",trueIcon:e.trueIcon,falseIcon:e.falseIcon,type:e.type,disabled:p.value,readonly:m.value,"aria-labelledby":d?h.value:void 0,multiple:!1},l,{modelValue:s.value,"onUpdate:modelValue":v=>s.value=v}),i)])}})}),{}}}),MN=Y({...ml(),...Ma(),...tx(),strict:Boolean,modelValue:{type:Array,default:()=>[0,0]}},"VRangeSlider"),EN=de()({name:"VRangeSlider",props:MN(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,end:e=>!0,start:e=>!0},setup(e,t){let{slots:n,emit:i}=t;const a=_e(),r=_e(),s=_e(),{rtlClasses:o}=rn();function l(S){if(!a.value||!r.value)return;const E=uh(S,a.value.$el,e.direction),R=uh(S,r.value.$el,e.direction),L=Math.abs(E),O=Math.abs(R);return L<O||L===O&&E<0?a.value.$el:r.value.$el}const u=nx(e),c=He(e,"modelValue",void 0,S=>S!=null&&S.length?S.map(E=>u.roundValue(E)):[0,0]),{activeThumbRef:d,hasLabels:f,max:h,min:g,mousePressed:p,onSliderMousedown:m,onSliderTouchstart:v,position:_,trackContainerRef:M,readonly:x}=ix({props:e,steps:u,onSliderStart:()=>{i("start",c.value)},onSliderEnd:S=>{var L;let{value:E}=S;const R=d.value===((L=a.value)==null?void 0:L.$el)?[E,c.value[1]]:[c.value[0],E];!e.strict&&R[0]<R[1]&&(c.value=R),i("end",c.value)},onSliderMove:S=>{var O,G,U,j;let{value:E}=S;const[R,L]=c.value;!e.strict&&R===L&&R!==g.value&&(d.value=E>R?(O=r.value)==null?void 0:O.$el:(G=a.value)==null?void 0:G.$el,(U=d.value)==null||U.focus()),d.value===((j=a.value)==null?void 0:j.$el)?c.value=[Math.min(E,L),L]:c.value=[R,Math.max(R,E)]},getActiveThumb:l}),{isFocused:C,focus:T,blur:P}=Sa(e),w=A(()=>_(c.value[0])),b=A(()=>_(c.value[1]));return pe(()=>{const S=xn.filterProps(e),E=!!(e.label||n.label||n.prepend);return y(xn,ge({class:["v-slider","v-range-slider",{"v-slider--has-labels":!!n["tick-label"]||f.value,"v-slider--focused":C.value,"v-slider--pressed":p.value,"v-slider--disabled":e.disabled},o.value,e.class],style:e.style,ref:s},S,{focused:C.value}),{...n,prepend:E?R=>{var L,O;return y(Ne,null,[((L=n.label)==null?void 0:L.call(n,R))??(e.label?y(no,{class:"v-slider__label",text:e.label},null):void 0),(O=n.prepend)==null?void 0:O.call(n,R)])}:void 0,default:R=>{var G,U;let{id:L,messagesId:O}=R;return y("div",{class:"v-slider__container",onMousedown:x.value?void 0:m,onTouchstartPassive:x.value?void 0:v},[y("input",{id:`${L.value}_start`,name:e.name||L.value,disabled:!!e.disabled,readonly:!!e.readonly,tabindex:"-1",value:c.value[0]},null),y("input",{id:`${L.value}_stop`,name:e.name||L.value,disabled:!!e.disabled,readonly:!!e.readonly,tabindex:"-1",value:c.value[1]},null),y(ax,{ref:M,start:w.value,stop:b.value},{"tick-label":n["tick-label"]}),y(ch,{ref:a,"aria-describedby":O.value,focused:C&&d.value===((G=a.value)==null?void 0:G.$el),modelValue:c.value[0],"onUpdate:modelValue":j=>c.value=[j,c.value[1]],onFocus:j=>{var B,X,W,H;T(),d.value=(B=a.value)==null?void 0:B.$el,h.value!==g.value&&c.value[0]===c.value[1]&&c.value[1]===g.value&&j.relatedTarget!==((X=r.value)==null?void 0:X.$el)&&((W=a.value)==null||W.$el.blur(),(H=r.value)==null||H.$el.focus())},onBlur:()=>{P(),d.value=void 0},min:g.value,max:c.value[1],position:w.value,ripple:e.ripple},{"thumb-label":n["thumb-label"]}),y(ch,{ref:r,"aria-describedby":O.value,focused:C&&d.value===((U=r.value)==null?void 0:U.$el),modelValue:c.value[1],"onUpdate:modelValue":j=>c.value=[c.value[0],j],onFocus:j=>{var B,X,W,H;T(),d.value=(B=r.value)==null?void 0:B.$el,h.value!==g.value&&c.value[0]===c.value[1]&&c.value[0]===h.value&&j.relatedTarget!==((X=a.value)==null?void 0:X.$el)&&((W=r.value)==null||W.$el.blur(),(H=a.value)==null||H.$el.focus())},onBlur:()=>{P(),d.value=void 0},min:c.value[0],max:h.value,position:b.value,ripple:e.ripple},{"thumb-label":n["thumb-label"]})])}})}),{}}}),wN=Y({name:String,itemAriaLabel:{type:String,default:"$vuetify.rating.ariaLabel.item"},activeColor:String,color:String,clearable:Boolean,disabled:Boolean,emptyIcon:{type:We,default:"$ratingEmpty"},fullIcon:{type:We,default:"$ratingFull"},halfIncrements:Boolean,hover:Boolean,length:{type:[Number,String],default:5},readonly:Boolean,modelValue:{type:[Number,String],default:0},itemLabels:Array,itemLabelPosition:{type:String,default:"top",validator:e=>["top","bottom"].includes(e)},ripple:Boolean,...Ie(),...fn(),...$i(),...Je(),...dt()},"VRating"),TN=de()({name:"VRating",props:wN(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{t:i}=$t(),{themeClasses:a}=pt(e),r=He(e,"modelValue"),s=A(()=>qt(parseFloat(r.value),0,Number(e.length))),o=A(()=>Bi(Number(e.length),1)),l=A(()=>o.value.flatMap(p=>e.halfIncrements?[p-.5,p]:[p])),u=Me(-1),c=A(()=>l.value.map(p=>{const m=e.hover&&u.value>-1,v=s.value>=p,_=u.value>=p,x=(m?_:v)?e.fullIcon:e.emptyIcon,C=e.activeColor??e.color,T=v||_?C:e.color;return{isFilled:v,isHovered:_,icon:x,color:T}})),d=A(()=>[0,...l.value].map(p=>{function m(){u.value=p}function v(){u.value=-1}function _(){e.disabled||e.readonly||(r.value=s.value===p&&e.clearable?0:p)}return{onMouseenter:e.hover?m:void 0,onMouseleave:e.hover?v:void 0,onClick:_}})),f=A(()=>e.name??`v-rating-${gn()}`);function h(p){var w,b;let{value:m,index:v,showStar:_=!0}=p;const{onMouseenter:M,onMouseleave:x,onClick:C}=d.value[v+1],T=`${f.value}-${String(m).replace(".","-")}`,P={color:(w=c.value[v])==null?void 0:w.color,density:e.density,disabled:e.disabled,icon:(b=c.value[v])==null?void 0:b.icon,ripple:e.ripple,size:e.size,variant:"plain"};return y(Ne,null,[y("label",{for:T,class:{"v-rating__item--half":e.halfIncrements&&m%1>0,"v-rating__item--full":e.halfIncrements&&m%1===0},onMouseenter:M,onMouseleave:x,onClick:C},[y("span",{class:"v-rating__hidden"},[i(e.itemAriaLabel,m,e.length)]),_?n.item?n.item({...c.value[v],props:P,value:m,index:v,rating:s.value}):y(vt,ge({"aria-label":i(e.itemAriaLabel,m,e.length)},P),null):void 0]),y("input",{class:"v-rating__hidden",name:f.value,id:T,type:"radio",value:m,checked:s.value===m,tabindex:-1,readonly:e.readonly,disabled:e.disabled},null)])}function g(p){return n["item-label"]?n["item-label"](p):p.label?y("span",null,[p.label]):y("span",null,[ca(" ")])}return pe(()=>{var m;const p=!!((m=e.itemLabels)!=null&&m.length)||n["item-label"];return y(e.tag,{class:["v-rating",{"v-rating--hover":e.hover,"v-rating--readonly":e.readonly},a.value,e.class],style:e.style},{default:()=>[y(h,{value:0,index:-1,showStar:!1},null),o.value.map((v,_)=>{var M,x;return y("div",{class:"v-rating__wrapper"},[p&&e.itemLabelPosition==="top"?g({value:v,index:_,label:(M=e.itemLabels)==null?void 0:M[_]}):void 0,y("div",{class:"v-rating__item"},[e.halfIncrements?y(Ne,null,[y(h,{value:v-.5,index:_*2},null),y(h,{value:v,index:_*2+1},null)]):y(h,{value:v,index:_},null)]),p&&e.itemLabelPosition==="bottom"?g({value:v,index:_,label:(x=e.itemLabels)==null?void 0:x[_]}):void 0])})]})}),{}}}),CN={actions:"button@2",article:"heading, paragraph",avatar:"avatar",button:"button",card:"image, heading","card-avatar":"image, list-item-avatar",chip:"chip","date-picker":"list-item, heading, divider, date-picker-options, date-picker-days, actions","date-picker-options":"text, avatar@2","date-picker-days":"avatar@28",divider:"divider",heading:"heading",image:"image","list-item":"text","list-item-avatar":"avatar, text","list-item-two-line":"sentences","list-item-avatar-two-line":"avatar, sentences","list-item-three-line":"paragraph","list-item-avatar-three-line":"avatar, paragraph",ossein:"ossein",paragraph:"text@3",sentences:"text@2",subtitle:"text",table:"table-heading, table-thead, table-tbody, table-tfoot","table-heading":"chip, text","table-thead":"heading@6","table-tbody":"table-row-divider@6","table-row-divider":"table-row, divider","table-row":"text@6","table-tfoot":"text@2, avatar@2",text:"text"};function AN(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return y("div",{class:["v-skeleton-loader__bone",`v-skeleton-loader__${e}`]},[t])}function Hp(e){const[t,n]=e.split("@");return Array.from({length:n}).map(()=>Lc(t))}function Lc(e){let t=[];if(!e)return t;const n=CN[e];if(e!==n){if(e.includes(","))return Gp(e);if(e.includes("@"))return Hp(e);n.includes(",")?t=Gp(n):n.includes("@")?t=Hp(n):n&&t.push(Lc(n))}return[AN(e,t)]}function Gp(e){return e.replace(/\s/g,"").split(",").map(Lc)}const PN=Y({boilerplate:Boolean,color:String,loading:Boolean,loadingText:{type:String,default:"$vuetify.loading"},type:{type:[String,Array],default:"ossein"},...Qt(),...sn(),...dt()},"VSkeletonLoader"),RN=de()({name:"VSkeletonLoader",props:PN(),setup(e,t){let{slots:n}=t;const{backgroundColorClasses:i,backgroundColorStyles:a}=wt(se(e,"color")),{dimensionStyles:r}=en(e),{elevationClasses:s}=pn(e),{themeClasses:o}=pt(e),{t:l}=$t(),u=A(()=>Lc(Nt(e.type).join(",")));return pe(()=>{var f;const c=!n.default||e.loading,d=e.boilerplate||!c?{}:{ariaLive:"polite",ariaLabel:l(e.loadingText),role:"alert"};return y("div",ge({class:["v-skeleton-loader",{"v-skeleton-loader--boilerplate":e.boilerplate},o.value,i.value,s.value],style:[a.value,c?r.value:{}]},d),[c?u.value:(f=n.default)==null?void 0:f.call(n)])}),{}}}),IN=de()({name:"VSlideGroupItem",props:Qr(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const i=es(e,v0);return()=>{var a;return(a=n.default)==null?void 0:a.call(n,{isSelected:i.isSelected.value,select:i.select,toggle:i.toggle,selectedClass:i.selectedClass.value})}}});function DN(e){const t=Me(e());let n=-1;function i(){clearInterval(n)}function a(){i(),ft(()=>t.value=e())}function r(s){const o=s?getComputedStyle(s):{transitionDuration:.2},l=parseFloat(o.transitionDuration)*1e3||200;if(i(),t.value<=0)return;const u=performance.now();n=window.setInterval(()=>{const c=performance.now()-u+l;t.value=Math.max(e()-c,0),t.value<=0&&i()},l)}return Sn(i),{clear:i,time:t,start:r,reset:a}}const LN=Y({multiLine:Boolean,text:String,timer:[Boolean,String],timeout:{type:[Number,String],default:5e3},vertical:Boolean,...ba({location:"bottom"}),...eo(),...Vt(),...pi(),...dt(),...Kt(gl({transition:"v-snackbar-transition"}),["persistent","noClickAnimation","scrim","scrollStrategy"])},"VSnackbar"),kN=de()({name:"VSnackbar",props:LN(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const i=He(e,"modelValue"),{positionClasses:a}=to(e),{scopeId:r}=ns(),{themeClasses:s}=pt(e),{colorClasses:o,colorStyles:l,variantClasses:u}=Zr(e),{roundedClasses:c}=Gt(e),d=DN(()=>Number(e.timeout)),f=_e(),h=_e(),g=Me(!1),p=Me(0),m=_e(),v=ot(Bo,void 0);zn(()=>!!v,()=>{const E=Fb();Bt(()=>{m.value=E.mainStyles.value})}),Te(i,M),Te(()=>e.timeout,M),Zt(()=>{i.value&&M()});let _=-1;function M(){d.reset(),window.clearTimeout(_);const E=Number(e.timeout);if(!i.value||E===-1)return;const R=am(h.value);d.start(R),_=window.setTimeout(()=>{i.value=!1},E)}function x(){d.reset(),window.clearTimeout(_)}function C(){g.value=!0,x()}function T(){g.value=!1,M()}function P(E){p.value=E.touches[0].clientY}function w(E){Math.abs(p.value-E.changedTouches[0].clientY)>50&&(i.value=!1)}function b(){g.value&&T()}const S=A(()=>e.location.split(" ").reduce((E,R)=>(E[`v-snackbar--${R}`]=!0,E),{}));return pe(()=>{const E=zi.filterProps(e),R=!!(n.default||n.text||e.text);return y(zi,ge({ref:f,class:["v-snackbar",{"v-snackbar--active":i.value,"v-snackbar--multi-line":e.multiLine&&!e.vertical,"v-snackbar--timer":!!e.timer,"v-snackbar--vertical":e.vertical},S.value,a.value,e.class],style:[m.value,e.style]},E,{modelValue:i.value,"onUpdate:modelValue":L=>i.value=L,contentProps:ge({class:["v-snackbar__wrapper",s.value,o.value,c.value,u.value],style:[l.value],onPointerenter:C,onPointerleave:T},E.contentProps),persistent:!0,noClickAnimation:!0,scrim:!1,scrollStrategy:"none",_disableGlobalStack:!0,onTouchstartPassive:P,onTouchend:w,onAfterLeave:b},r),{default:()=>{var L,O;return[Ja(!1,"v-snackbar"),e.timer&&!g.value&&y("div",{key:"timer",class:"v-snackbar__timer"},[y(fc,{ref:h,color:typeof e.timer=="string"?e.timer:"info",max:e.timeout,"model-value":d.time.value},null)]),R&&y("div",{key:"content",class:"v-snackbar__content",role:"status","aria-live":"polite"},[((L=n.text)==null?void 0:L.call(n))??e.text,(O=n.default)==null?void 0:O.call(n)]),n.actions&&y(rt,{defaults:{VBtn:{variant:"text",ripple:!1,slim:!0}}},{default:()=>[y("div",{class:"v-snackbar__actions"},[n.actions({isActive:i})])]})]},activator:n.activator})}),yi({},f)}}),qx=Y({autoDraw:Boolean,autoDrawDuration:[Number,String],autoDrawEasing:{type:String,default:"ease"},color:String,gradient:{type:Array,default:()=>[]},gradientDirection:{type:String,validator:e=>["top","bottom","left","right"].includes(e),default:"top"},height:{type:[String,Number],default:75},labels:{type:Array,default:()=>[]},labelSize:{type:[Number,String],default:7},lineWidth:{type:[String,Number],default:4},id:String,itemValue:{type:String,default:"value"},modelValue:{type:Array,default:()=>[]},min:[String,Number],max:[String,Number],padding:{type:[String,Number],default:8},showLabels:Boolean,smooth:[Boolean,String,Number],width:{type:[Number,String],default:300}},"Line"),jx=Y({autoLineWidth:Boolean,...qx()},"VBarline"),Wp=de()({name:"VBarline",props:jx(),setup(e,t){let{slots:n}=t;const i=gn(),a=A(()=>e.id||`barline-${i}`),r=A(()=>Number(e.autoDrawDuration)||500),s=A(()=>!!(e.showLabels||e.labels.length>0||n!=null&&n.label)),o=A(()=>parseFloat(e.lineWidth)||4),l=A(()=>Math.max(e.modelValue.length*o.value,Number(e.width))),u=A(()=>({minX:0,maxX:l.value,minY:0,maxY:parseInt(e.height,10)})),c=A(()=>e.modelValue.map(m=>an(m,e.itemValue,m)));function d(m,v){const{minX:_,maxX:M,minY:x,maxY:C}=v,T=m.length;let P=e.max!=null?Number(e.max):Math.max(...m),w=e.min!=null?Number(e.min):Math.min(...m);w>0&&e.min==null&&(w=0),P<0&&e.max==null&&(P=0);const b=M/T,S=(C-x)/(P-w||1),E=C-Math.abs(w*S);return m.map((R,L)=>{const O=Math.abs(S*R);return{x:_+L*b,y:E-O+ +(R<0)*O,height:O,value:R}})}const f=A(()=>{const m=[],v=d(c.value,u.value),_=v.length;for(let M=0;m.length<_;M++){const x=v[M];let C=e.labels[M];C||(C=typeof x=="object"?x.value:x),m.push({x:x.x,value:String(C)})}return m}),h=A(()=>d(c.value,u.value)),g=A(()=>(Math.abs(h.value[0].x-h.value[1].x)-o.value)/2),p=A(()=>typeof e.smooth=="boolean"?e.smooth?2:0:Number(e.smooth));pe(()=>{const m=e.gradient.slice().length?e.gradient.slice().reverse():[""];return y("svg",{display:"block"},[y("defs",null,[y("linearGradient",{id:a.value,gradientUnits:"userSpaceOnUse",x1:e.gradientDirection==="left"?"100%":"0",y1:e.gradientDirection==="top"?"100%":"0",x2:e.gradientDirection==="right"?"100%":"0",y2:e.gradientDirection==="bottom"?"100%":"0"},[m.map((v,_)=>y("stop",{offset:_/Math.max(m.length-1,1),"stop-color":v||"currentColor"},null))])]),y("clipPath",{id:`${a.value}-clip`},[h.value.map(v=>y("rect",{x:v.x+g.value,y:v.y,width:o.value,height:v.height,rx:p.value,ry:p.value},[e.autoDraw&&y(Ne,null,[y("animate",{attributeName:"y",from:v.y+v.height,to:v.y,dur:`${r.value}ms`,fill:"freeze"},null),y("animate",{attributeName:"height",from:"0",to:v.height,dur:`${r.value}ms`,fill:"freeze"},null)])]))]),s.value&&y("g",{key:"labels",style:{textAnchor:"middle",dominantBaseline:"mathematical",fill:"currentColor"}},[f.value.map((v,_)=>{var M;return y("text",{x:v.x+g.value+o.value/2,y:parseInt(e.height,10)-2+(parseInt(e.labelSize,10)||7*.75),"font-size":Number(e.labelSize)||7},[((M=n.label)==null?void 0:M.call(n,{index:_,value:v.value}))??v.value])})]),y("g",{"clip-path":`url(#${a.value}-clip)`,fill:`url(#${a.value})`},[y("rect",{x:0,y:0,width:Math.max(e.modelValue.length*o.value,Number(e.width)),height:e.height},null)])])})}});function VN(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:75;if(e.length===0)return"";const a=e.shift(),r=e[e.length-1];return(n?`M${a.x} ${i-a.x+2} L${a.x} ${a.y}`:`M${a.x} ${a.y}`)+e.map((s,o)=>{const l=e[o+1],u=e[o-1]||a,c=l&&FN(l,s,u);if(!l||c)return`L${s.x} ${s.y}`;const d=Math.min($p(u,s),$p(l,s)),h=d/2<t?d/2:t,g=Xp(u,s,h),p=Xp(l,s,h);return`L${g.x} ${g.y}S${s.x} ${s.y} ${p.x} ${p.y}`}).join("")+(n?`L${r.x} ${i-a.x+2} Z`:"")}function au(e){return parseInt(e,10)}function FN(e,t,n){return au(e.x+n.x)===au(2*t.x)&&au(e.y+n.y)===au(2*t.y)}function $p(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Xp(e,t,n){const i={x:e.x-t.x,y:e.y-t.y},a=Math.sqrt(i.x*i.x+i.y*i.y),r={x:i.x/a,y:i.y/a};return{x:t.x+r.x*n,y:t.y+r.y*n}}const Kx=Y({fill:Boolean,...qx()},"VTrendline"),Yp=de()({name:"VTrendline",props:Kx(),setup(e,t){let{slots:n}=t;const i=gn(),a=A(()=>e.id||`trendline-${i}`),r=A(()=>Number(e.autoDrawDuration)||(e.fill?500:2e3)),s=_e(0),o=_e(null);function l(m,v){const{minX:_,maxX:M,minY:x,maxY:C}=v,T=m.length,P=e.max!=null?Number(e.max):Math.max(...m),w=e.min!=null?Number(e.min):Math.min(...m),b=(M-_)/(T-1),S=(C-x)/(P-w||1);return m.map((E,R)=>({x:_+R*b,y:C-(E-w)*S,value:E}))}const u=A(()=>!!(e.showLabels||e.labels.length>0||n!=null&&n.label)),c=A(()=>parseFloat(e.lineWidth)||4),d=A(()=>Number(e.width)),f=A(()=>{const m=Number(e.padding);return{minX:m,maxX:d.value-m,minY:m,maxY:parseInt(e.height,10)-m}}),h=A(()=>e.modelValue.map(m=>an(m,e.itemValue,m))),g=A(()=>{const m=[],v=l(h.value,f.value),_=v.length;for(let M=0;m.length<_;M++){const x=v[M];let C=e.labels[M];C||(C=typeof x=="object"?x.value:x),m.push({x:x.x,value:String(C)})}return m});Te(()=>e.modelValue,async()=>{if(await ft(),!e.autoDraw||!o.value)return;const m=o.value,v=m.getTotalLength();e.fill?(m.style.transformOrigin="bottom center",m.style.transition="none",m.style.transform="scaleY(0)",m.getBoundingClientRect(),m.style.transition=`transform ${r.value}ms ${e.autoDrawEasing}`,m.style.transform="scaleY(1)"):(m.style.strokeDasharray=`${v}`,m.style.strokeDashoffset=`${v}`,m.getBoundingClientRect(),m.style.transition=`stroke-dashoffset ${r.value}ms ${e.autoDrawEasing}`,m.style.strokeDashoffset="0"),s.value=v},{immediate:!0});function p(m){const v=typeof e.smooth=="boolean"?e.smooth?8:0:Number(e.smooth);return VN(l(h.value,f.value),v,m,parseInt(e.height,10))}pe(()=>{var v;const m=e.gradient.slice().length?e.gradient.slice().reverse():[""];return y("svg",{display:"block","stroke-width":parseFloat(e.lineWidth)??4},[y("defs",null,[y("linearGradient",{id:a.value,gradientUnits:"userSpaceOnUse",x1:e.gradientDirection==="left"?"100%":"0",y1:e.gradientDirection==="top"?"100%":"0",x2:e.gradientDirection==="right"?"100%":"0",y2:e.gradientDirection==="bottom"?"100%":"0"},[m.map((_,M)=>y("stop",{offset:M/Math.max(m.length-1,1),"stop-color":_||"currentColor"},null))])]),u.value&&y("g",{key:"labels",style:{textAnchor:"middle",dominantBaseline:"mathematical",fill:"currentColor"}},[g.value.map((_,M)=>{var x;return y("text",{x:_.x+c.value/2+c.value/2,y:parseInt(e.height,10)-4+(parseInt(e.labelSize,10)||7*.75),"font-size":Number(e.labelSize)||7},[((x=n.label)==null?void 0:x.call(n,{index:M,value:_.value}))??_.value])})]),y("path",{ref:o,d:p(e.fill),fill:e.fill?`url(#${a.value})`:"none",stroke:e.fill?"none":`url(#${a.value})`},null),e.fill&&y("path",{d:p(!1),fill:"none",stroke:e.color??((v=e.gradient)==null?void 0:v[0])},null)])})}}),NN=Y({type:{type:String,default:"trend"},...jx(),...Kx()},"VSparkline"),ON=de()({name:"VSparkline",props:NN(),setup(e,t){let{slots:n}=t;const{textColorClasses:i,textColorStyles:a}=bn(se(e,"color")),r=A(()=>!!(e.showLabels||e.labels.length>0||n!=null&&n.label)),s=A(()=>{let o=parseInt(e.height,10);return r.value&&(o+=parseInt(e.labelSize,10)*1.5),o});pe(()=>{const o=e.type==="trend"?Yp:Wp,l=e.type==="trend"?Yp.filterProps(e):Wp.filterProps(e);return y(o,ge({key:e.type,class:i.value,style:a.value,viewBox:`0 0 ${e.width} ${parseInt(s.value,10)}`},l),n)})}}),UN=Y({...Ie(),...O0({offset:8,minWidth:0,openDelay:0,closeDelay:100,location:"top center",transition:"scale-transition"})},"VSpeedDial"),BN=de()({name:"VSpeedDial",props:UN(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const i=He(e,"modelValue"),a=_e(),r=A(()=>{var u;const[o,l="center"]=((u=e.location)==null?void 0:u.split(" "))??[];return`${o} ${l}`}),s=A(()=>({[`v-speed-dial__content--${r.value.replace(" ","-")}`]:!0}));return pe(()=>{const o=qs.filterProps(e);return y(qs,ge(o,{modelValue:i.value,"onUpdate:modelValue":l=>i.value=l,class:e.class,style:e.style,contentClass:["v-speed-dial__content",s.value,e.contentClass],location:r.value,ref:a,transition:"fade-transition"}),{...n,default:l=>y(rt,{defaults:{VBtn:{size:"small"}}},{default:()=>[y(Pn,{appear:!0,group:!0,transition:e.transition},{default:()=>{var u;return[(u=n.default)==null?void 0:u.call(n,l)]}})]})})}),{}}}),Km=Symbol.for("vuetify:v-stepper"),Zx=Y({color:String,disabled:{type:[Boolean,String],default:!1},prevText:{type:String,default:"$vuetify.stepper.prev"},nextText:{type:String,default:"$vuetify.stepper.next"}},"VStepperActions"),Jx=de()({name:"VStepperActions",props:Zx(),emits:{"click:prev":()=>!0,"click:next":()=>!0},setup(e,t){let{emit:n,slots:i}=t;const{t:a}=$t();function r(){n("click:prev")}function s(){n("click:next")}return pe(()=>{const o={onClick:r},l={onClick:s};return y("div",{class:"v-stepper-actions"},[y(rt,{defaults:{VBtn:{disabled:["prev",!0].includes(e.disabled),text:a(e.prevText),variant:"text"}}},{default:()=>{var u;return[((u=i.prev)==null?void 0:u.call(i,{props:o}))??y(vt,o,null)]}}),y(rt,{defaults:{VBtn:{color:e.color,disabled:["next",!0].includes(e.disabled),text:a(e.nextText),variant:"tonal"}}},{default:()=>{var u;return[((u=i.next)==null?void 0:u.call(i,{props:l}))??y(vt,l,null)]}})])}),{}}}),Qx=Wi("v-stepper-header"),zN=Y({color:String,title:String,subtitle:String,complete:Boolean,completeIcon:{type:We,default:"$complete"},editable:Boolean,editIcon:{type:We,default:"$edit"},error:Boolean,errorIcon:{type:We,default:"$error"},icon:We,ripple:{type:[Boolean,Object],default:!0},rules:{type:Array,default:()=>[]}},"StepperItem"),HN=Y({...zN(),...Qr()},"VStepperItem"),eS=de()({name:"VStepperItem",directives:{Ripple:xa},props:HN(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const i=es(e,Km,!0),a=A(()=>(i==null?void 0:i.value.value)??e.value),r=A(()=>e.rules.every(f=>f()===!0)),s=A(()=>!e.disabled&&e.editable),o=A(()=>!e.disabled&&e.editable),l=A(()=>e.error||!r.value),u=A(()=>e.complete||e.rules.length>0&&r.value),c=A(()=>l.value?e.errorIcon:u.value?e.completeIcon:i.isSelected.value&&e.editable?e.editIcon:e.icon),d=A(()=>({canEdit:o.value,hasError:l.value,hasCompleted:u.value,title:e.title,subtitle:e.subtitle,step:a.value,value:e.value}));return pe(()=>{var m,v,_;const f=(!i||i.isSelected.value||u.value||o.value)&&!l.value&&!e.disabled,h=!!(e.title!=null||n.title),g=!!(e.subtitle!=null||n.subtitle);function p(){i==null||i.toggle()}return kt(y("button",{class:["v-stepper-item",{"v-stepper-item--complete":u.value,"v-stepper-item--disabled":e.disabled,"v-stepper-item--error":l.value},i==null?void 0:i.selectedClass.value],disabled:!e.editable,type:"button",onClick:p},[s.value&&Ja(!0,"v-stepper-item"),y(mi,{key:"stepper-avatar",class:"v-stepper-item__avatar",color:f?e.color:void 0,size:24},{default:()=>{var M;return[((M=n.icon)==null?void 0:M.call(n,d.value))??(c.value?y(gt,{icon:c.value},null):a.value)]}}),y("div",{class:"v-stepper-item__content"},[h&&y("div",{key:"title",class:"v-stepper-item__title"},[((m=n.title)==null?void 0:m.call(n,d.value))??e.title]),g&&y("div",{key:"subtitle",class:"v-stepper-item__subtitle"},[((v=n.subtitle)==null?void 0:v.call(n,d.value))??e.subtitle]),(_=n.default)==null?void 0:_.call(n,d.value)])]),[[ni("ripple"),e.ripple&&e.editable,null]])}),{}}}),GN=Y({...Kt(xc(),["continuous","nextIcon","prevIcon","showArrows","touch","mandatory"])},"VStepperWindow"),tS=de()({name:"VStepperWindow",props:GN(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const i=ot(Km,null),a=He(e,"modelValue"),r=A({get(){var s;return a.value!=null||!i?a.value:(s=i.items.value.find(o=>i.selected.value.includes(o.id)))==null?void 0:s.value},set(s){a.value=s}});return pe(()=>{const s=Or.filterProps(e);return y(Or,ge({_as:"VStepperWindow"},s,{modelValue:r.value,"onUpdate:modelValue":o=>r.value=o,class:["v-stepper-window",e.class],style:e.style,mandatory:!1,touch:!1}),n)}),{}}}),WN=Y({...Sc()},"VStepperWindowItem"),nS=de()({name:"VStepperWindowItem",props:WN(),setup(e,t){let{slots:n}=t;return pe(()=>{const i=Ur.filterProps(e);return y(Ur,ge({_as:"VStepperWindowItem"},i,{class:["v-stepper-window-item",e.class],style:e.style}),n)}),{}}}),$N=Y({altLabels:Boolean,bgColor:String,completeIcon:We,editIcon:We,editable:Boolean,errorIcon:We,hideActions:Boolean,items:{type:Array,default:()=>[]},itemTitle:{type:String,default:"title"},itemValue:{type:String,default:"value"},nonLinear:Boolean,flat:Boolean,...Yr()},"Stepper"),XN=Y({...$N(),...Jr({mandatory:"force",selectedClass:"v-stepper-item--selected"}),...Mc(),...Ka(Zx(),["prevText","nextText"])},"VStepper"),YN=de()({name:"VStepper",props:XN(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{items:i,next:a,prev:r,selected:s}=Qa(e,Km),{displayClasses:o,mobile:l}=gi(e),{completeIcon:u,editIcon:c,errorIcon:d,color:f,editable:h,prevText:g,nextText:p}=Wr(e),m=A(()=>e.items.map((M,x)=>{const C=an(M,e.itemTitle,M),T=an(M,e.itemValue,x+1);return{title:C,value:T,raw:M}})),v=A(()=>i.value.findIndex(M=>s.value.includes(M.id))),_=A(()=>e.disabled?e.disabled:v.value===0?"prev":v.value===i.value.length-1?"next":!1);return zt({VStepperItem:{editable:h,errorIcon:d,completeIcon:u,editIcon:c,prevText:g,nextText:p},VStepperActions:{color:f,disabled:_,prevText:g,nextText:p}}),pe(()=>{const M=Br.filterProps(e),x=!!(n.header||e.items.length),C=e.items.length>0,T=!e.hideActions&&!!(C||n.actions);return y(Br,ge(M,{color:e.bgColor,class:["v-stepper",{"v-stepper--alt-labels":e.altLabels,"v-stepper--flat":e.flat,"v-stepper--non-linear":e.nonLinear,"v-stepper--mobile":l.value},o.value,e.class],style:e.style}),{default:()=>{var P,w;return[x&&y(Qx,{key:"stepper-header"},{default:()=>[m.value.map((b,S)=>{let{raw:E,...R}=b;return y(Ne,null,[!!S&&y(vl,null,null),y(eS,R,{default:n[`header-item.${R.value}`]??n.header,icon:n.icon,title:n.title,subtitle:n.subtitle})])})]}),C&&y(tS,{key:"stepper-window"},{default:()=>[m.value.map(b=>y(nS,{value:b.value},{default:()=>{var S,E;return((S=n[`item.${b.value}`])==null?void 0:S.call(n,b))??((E=n.item)==null?void 0:E.call(n,b))}}))]}),(P=n.default)==null?void 0:P.call(n,{prev:r,next:a}),T&&(((w=n.actions)==null?void 0:w.call(n,{next:a,prev:r}))??y(Jx,{key:"stepper-actions","onClick:prev":r,"onClick:next":a},n))]}})}),{prev:r,next:a}}}),qN=Y({indeterminate:Boolean,inset:Boolean,flat:Boolean,loading:{type:[Boolean,String],default:!1},...Ma(),...vc()},"VSwitch"),jN=de()({name:"VSwitch",inheritAttrs:!1,props:qN(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,t){let{attrs:n,slots:i}=t;const a=He(e,"indeterminate"),r=He(e,"modelValue"),{loaderClasses:s}=cl(e),{isFocused:o,focus:l,blur:u}=Sa(e),c=_e(),d=mt&&window.matchMedia("(forced-colors: active)").matches,f=A(()=>typeof e.loading=="string"&&e.loading!==""?e.loading:e.color),h=gn(),g=A(()=>e.id||`switch-${h}`);function p(){a.value&&(a.value=!1)}function m(v){var _,M;v.stopPropagation(),v.preventDefault(),(M=(_=c.value)==null?void 0:_.input)==null||M.click()}return pe(()=>{const[v,_]=Za(n),M=xn.filterProps(e),x=Wa.filterProps(e);return y(xn,ge({class:["v-switch",{"v-switch--flat":e.flat},{"v-switch--inset":e.inset},{"v-switch--indeterminate":a.value},s.value,e.class]},v,M,{modelValue:r.value,"onUpdate:modelValue":C=>r.value=C,id:g.value,focused:o.value,style:e.style}),{...i,default:C=>{let{id:T,messagesId:P,isDisabled:w,isReadonly:b,isValid:S}=C;const E={model:r,isValid:S};return y(Wa,ge({ref:c},x,{modelValue:r.value,"onUpdate:modelValue":[R=>r.value=R,p],id:T.value,"aria-describedby":P.value,type:"checkbox","aria-checked":a.value?"mixed":void 0,disabled:w.value,readonly:b.value,onFocus:l,onBlur:u},_),{...i,default:R=>{let{backgroundColorClasses:L,backgroundColorStyles:O}=R;return y("div",{class:["v-switch__track",d?void 0:L.value],style:O.value,onClick:m},[i["track-true"]&&y("div",{key:"prepend",class:"v-switch__track-true"},[i["track-true"](E)]),i["track-false"]&&y("div",{key:"append",class:"v-switch__track-false"},[i["track-false"](E)])])},input:R=>{let{inputNode:L,icon:O,backgroundColorClasses:G,backgroundColorStyles:U}=R;return y(Ne,null,[L,y("div",{class:["v-switch__thumb",{"v-switch__thumb--filled":O||e.loading},e.inset||d?void 0:G.value],style:e.inset?void 0:U.value},[i.thumb?y(rt,{defaults:{VIcon:{icon:O,size:"x-small"}}},{default:()=>[i.thumb({...E,icon:O})]}):y(pm,null,{default:()=>[e.loading?y(dl,{name:"v-switch",active:!0,color:S.value===!1?void 0:f.value},{default:j=>i.loader?i.loader(j):y(Ys,{active:j.isActive,color:j.color,indeterminate:!0,size:"16",width:"2"},null)}):O&&y(gt,{key:String(O),icon:O,size:"x-small"},null)]})])])}})}})}),{}}}),KN=Y({color:String,height:[Number,String],window:Boolean,...Ie(),...sn(),...qr(),...Vt(),...Je(),...dt()},"VSystemBar"),ZN=de()({name:"VSystemBar",props:KN(),setup(e,t){let{slots:n}=t;const{themeClasses:i}=pt(e),{backgroundColorClasses:a,backgroundColorStyles:r}=wt(se(e,"color")),{elevationClasses:s}=pn(e),{roundedClasses:o}=Gt(e),{ssrBootStyles:l}=Kr(),u=A(()=>e.height??(e.window?32:24)),{layoutItemStyles:c}=jr({id:e.name,order:A(()=>parseInt(e.order,10)),position:Me("top"),layoutSize:u,elementSize:u,active:A(()=>!0),absolute:se(e,"absolute")});return pe(()=>y(e.tag,{class:["v-system-bar",{"v-system-bar--window":e.window},i.value,a.value,s.value,o.value,e.class],style:[r.value,c.value,l.value,e.style]},n)),{}}}),Zm=Symbol.for("vuetify:v-tabs"),JN=Y({fixed:Boolean,sliderColor:String,hideSlider:Boolean,direction:{type:String,default:"horizontal"},...Kt(mc({selectedClass:"v-tab--selected",variant:"text"}),["active","block","flat","location","position","symbol"])},"VTab"),iS=de()({name:"VTab",props:JN(),setup(e,t){let{slots:n,attrs:i}=t;const{textColorClasses:a,textColorStyles:r}=bn(e,"sliderColor"),s=_e(),o=_e(),l=A(()=>e.direction==="horizontal"),u=A(()=>{var d,f;return((f=(d=s.value)==null?void 0:d.group)==null?void 0:f.isSelected.value)??!1});function c(d){var h,g;let{value:f}=d;if(f){const p=(g=(h=s.value)==null?void 0:h.$el.parentElement)==null?void 0:g.querySelector(".v-tab--selected .v-tab__slider"),m=o.value;if(!p||!m)return;const v=getComputedStyle(p).color,_=p.getBoundingClientRect(),M=m.getBoundingClientRect(),x=l.value?"x":"y",C=l.value?"X":"Y",T=l.value?"right":"bottom",P=l.value?"width":"height",w=_[x],b=M[x],S=w>b?_[T]-M[T]:_[x]-M[x],E=Math.sign(S)>0?l.value?"right":"bottom":Math.sign(S)<0?l.value?"left":"top":"center",L=(Math.abs(S)+(Math.sign(S)<0?_[P]:M[P]))/Math.max(_[P],M[P])||0,O=_[P]/M[P]||0,G=1.5;Mr(m,{backgroundColor:[v,"currentcolor"],transform:[`translate${C}(${S}px) scale${C}(${O})`,`translate${C}(${S/G}px) scale${C}(${(L-1)/G+1})`,"none"],transformOrigin:Array(3).fill(E)},{duration:225,easing:Oo})}}return pe(()=>{const d=vt.filterProps(e);return y(vt,ge({symbol:Zm,ref:s,class:["v-tab",e.class],style:e.style,tabindex:u.value?0:-1,role:"tab","aria-selected":String(u.value),active:!1},d,i,{block:e.fixed,maxWidth:e.fixed?300:void 0,"onGroup:selected":c}),{...n,default:()=>{var f;return y(Ne,null,[((f=n.default)==null?void 0:f.call(n))??e.text,!e.hideSlider&&y("div",{ref:o,class:["v-tab__slider",a.value],style:r.value},null)])}})}),yi({},s)}}),QN=Y({...Kt(xc(),["continuous","nextIcon","prevIcon","showArrows","touch","mandatory"])},"VTabsWindow"),aS=de()({name:"VTabsWindow",props:QN(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const i=ot(Zm,null),a=He(e,"modelValue"),r=A({get(){var s;return a.value!=null||!i?a.value:(s=i.items.value.find(o=>i.selected.value.includes(o.id)))==null?void 0:s.value},set(s){a.value=s}});return pe(()=>{const s=Or.filterProps(e);return y(Or,ge({_as:"VTabsWindow"},s,{modelValue:r.value,"onUpdate:modelValue":o=>r.value=o,class:["v-tabs-window",e.class],style:e.style,mandatory:!1,touch:!1}),n)}),{}}}),eO=Y({...Sc()},"VTabsWindowItem"),rS=de()({name:"VTabsWindowItem",props:eO(),setup(e,t){let{slots:n}=t;return pe(()=>{const i=Ur.filterProps(e);return y(Ur,ge({_as:"VTabsWindowItem"},i,{class:["v-tabs-window-item",e.class],style:e.style}),n)}),{}}});function tO(e){return e?e.map(t=>nc(t)?t:{text:t,value:t}):[]}const nO=Y({alignTabs:{type:String,default:"start"},color:String,fixedTabs:Boolean,items:{type:Array,default:()=>[]},stacked:Boolean,bgColor:String,grow:Boolean,height:{type:[Number,String],default:void 0},hideSlider:Boolean,sliderColor:String,...Mm({mandatory:"force",selectedClass:"v-tab-item--selected"}),...fn(),...Je()},"VTabs"),iO=de()({name:"VTabs",props:nO(),emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:i}=t;const a=He(e,"modelValue"),r=A(()=>tO(e.items)),{densityClasses:s}=In(e),{backgroundColorClasses:o,backgroundColorStyles:l}=wt(se(e,"bgColor")),{scopeId:u}=ns();return zt({VTab:{color:se(e,"color"),direction:se(e,"direction"),stacked:se(e,"stacked"),fixed:se(e,"fixedTabs"),sliderColor:se(e,"sliderColor"),hideSlider:se(e,"hideSlider")}}),pe(()=>{const c=$o.filterProps(e),d=!!(i.window||e.items.length>0);return y(Ne,null,[y($o,ge(c,{modelValue:a.value,"onUpdate:modelValue":f=>a.value=f,class:["v-tabs",`v-tabs--${e.direction}`,`v-tabs--align-tabs-${e.alignTabs}`,{"v-tabs--fixed-tabs":e.fixedTabs,"v-tabs--grow":e.grow,"v-tabs--stacked":e.stacked},s.value,o.value,e.class],style:[{"--v-tabs-height":Re(e.height)},l.value,e.style],role:"tablist",symbol:Zm},u,n),{default:()=>{var f;return[((f=i.default)==null?void 0:f.call(i))??r.value.map(h=>{var g;return((g=i.tab)==null?void 0:g.call(i,{item:h}))??y(iS,ge(h,{key:h.text,value:h.value}),{default:i[`tab.${h.value}`]?()=>{var p;return(p=i[`tab.${h.value}`])==null?void 0:p.call(i,{item:h})}:void 0})})]}}),d&&y(aS,ge({modelValue:a.value,"onUpdate:modelValue":f=>a.value=f,key:"tabs-window"},u),{default:()=>{var f;return[r.value.map(h=>{var g;return((g=i.item)==null?void 0:g.call(i,{item:h}))??y(rS,{value:h.value},{default:()=>{var p;return(p=i[`item.${h.value}`])==null?void 0:p.call(i,{item:h})}})}),(f=i.window)==null?void 0:f.call(i)]}})])}),{}}}),aO=Y({autoGrow:Boolean,autofocus:Boolean,counter:[Boolean,Number,String],counterValue:Function,prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,noResize:Boolean,rows:{type:[Number,String],default:5,validator:e=>!isNaN(parseFloat(e))},maxRows:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},suffix:String,modelModifiers:Object,...Ma(),...pl()},"VTextarea"),rO=de()({name:"VTextarea",directives:{Intersect:ul},inheritAttrs:!1,props:aO(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:n,emit:i,slots:a}=t;const r=He(e,"modelValue"),{isFocused:s,focus:o,blur:l}=Sa(e),u=A(()=>typeof e.counterValue=="function"?e.counterValue(r.value):(r.value||"").toString().length),c=A(()=>{if(n.maxlength)return n.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter});function d(E,R){var L,O;!e.autofocus||!E||(O=(L=R[0].target)==null?void 0:L.focus)==null||O.call(L)}const f=_e(),h=_e(),g=Me(""),p=_e(),m=A(()=>e.persistentPlaceholder||s.value||e.active);function v(){var E;p.value!==document.activeElement&&((E=p.value)==null||E.focus()),s.value||o()}function _(E){v(),i("click:control",E)}function M(E){i("mousedown:control",E)}function x(E){E.stopPropagation(),v(),ft(()=>{r.value="",ic(e["onClick:clear"],E)})}function C(E){var L;const R=E.target;if(r.value=R.value,(L=e.modelModifiers)!=null&&L.trim){const O=[R.selectionStart,R.selectionEnd];ft(()=>{R.selectionStart=O[0],R.selectionEnd=O[1]})}}const T=_e(),P=_e(Number(e.rows)),w=A(()=>["plain","underlined"].includes(e.variant));Bt(()=>{e.autoGrow||(P.value=Number(e.rows))});function b(){e.autoGrow&&ft(()=>{if(!T.value||!h.value)return;const E=getComputedStyle(T.value),R=getComputedStyle(h.value.$el),L=parseFloat(E.getPropertyValue("--v-field-padding-top"))+parseFloat(E.getPropertyValue("--v-input-padding-top"))+parseFloat(E.getPropertyValue("--v-field-padding-bottom")),O=T.value.scrollHeight,G=parseFloat(E.lineHeight),U=Math.max(parseFloat(e.rows)*G+L,parseFloat(R.getPropertyValue("--v-input-control-height"))),j=parseFloat(e.maxRows)*G+L||1/0,B=qt(O??0,U,j);P.value=Math.floor((B-L)/G),g.value=Re(B)})}Zt(b),Te(r,b),Te(()=>e.rows,b),Te(()=>e.maxRows,b),Te(()=>e.density,b);let S;return Te(T,E=>{E?(S=new ResizeObserver(b),S.observe(T.value)):S==null||S.disconnect()}),dn(()=>{S==null||S.disconnect()}),pe(()=>{const E=!!(a.counter||e.counter||e.counterValue),R=!!(E||a.details),[L,O]=Za(n),{modelValue:G,...U}=xn.filterProps(e),j=$a.filterProps(e);return y(xn,ge({ref:f,modelValue:r.value,"onUpdate:modelValue":B=>r.value=B,class:["v-textarea v-text-field",{"v-textarea--prefixed":e.prefix,"v-textarea--suffixed":e.suffix,"v-text-field--prefixed":e.prefix,"v-text-field--suffixed":e.suffix,"v-textarea--auto-grow":e.autoGrow,"v-textarea--no-resize":e.noResize||e.autoGrow,"v-input--plain-underlined":w.value},e.class],style:e.style},L,U,{centerAffix:P.value===1&&!w.value,focused:s.value}),{...a,default:B=>{let{id:X,isDisabled:W,isDirty:H,isReadonly:te,isValid:Se}=B;return y($a,ge({ref:h,style:{"--v-textarea-control-height":g.value},onClick:_,onMousedown:M,"onClick:clear":x,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},j,{id:X.value,active:m.value||H.value,centerAffix:P.value===1&&!w.value,dirty:H.value||e.dirty,disabled:W.value,focused:s.value,error:Se.value===!1}),{...a,default:$=>{let{props:{class:he,...ae}}=$;return y(Ne,null,[e.prefix&&y("span",{class:"v-text-field__prefix"},[e.prefix]),kt(y("textarea",ge({ref:p,class:he,value:r.value,onInput:C,autofocus:e.autofocus,readonly:te.value,disabled:W.value,placeholder:e.placeholder,rows:e.rows,name:e.name,onFocus:v,onBlur:l},ae,O),null),[[ni("intersect"),{handler:d},null,{once:!0}]]),e.autoGrow&&kt(y("textarea",{class:[he,"v-textarea__sizer"],id:`${ae.id}-sizer`,"onUpdate:modelValue":Q=>r.value=Q,ref:T,readonly:!0,"aria-hidden":"true"},null),[[VE,r.value]]),e.suffix&&y("span",{class:"v-text-field__suffix"},[e.suffix])])}})},details:R?B=>{var X;return y(Ne,null,[(X=a.details)==null?void 0:X.call(a,B),E&&y(Ne,null,[y("span",null,null),y(yc,{active:e.persistentCounter||s.value,value:u.value,max:c.value,disabled:e.disabled},a.counter)])])}:void 0})}),yi({},f,h,p)}}),sO=Y({withBackground:Boolean,...Ie(),...dt(),...Je()},"VThemeProvider"),oO=de()({name:"VThemeProvider",props:sO(),setup(e,t){let{slots:n}=t;const{themeClasses:i}=pt(e);return()=>{var a;return e.withBackground?y(e.tag,{class:["v-theme-provider",i.value,e.class],style:e.style},{default:()=>{var r;return[(r=n.default)==null?void 0:r.call(n)]}}):(a=n.default)==null?void 0:a.call(n)}}}),lO=Y({dotColor:String,fillDot:Boolean,hideDot:Boolean,icon:We,iconColor:String,lineColor:String,...Ie(),...Vt(),...$i(),...sn()},"VTimelineDivider"),uO=de()({name:"VTimelineDivider",props:lO(),setup(e,t){let{slots:n}=t;const{sizeClasses:i,sizeStyles:a}=Qs(e,"v-timeline-divider__dot"),{backgroundColorStyles:r,backgroundColorClasses:s}=wt(se(e,"dotColor")),{roundedClasses:o}=Gt(e,"v-timeline-divider__dot"),{elevationClasses:l}=pn(e),{backgroundColorClasses:u,backgroundColorStyles:c}=wt(se(e,"lineColor"));return pe(()=>y("div",{class:["v-timeline-divider",{"v-timeline-divider--fill-dot":e.fillDot},e.class],style:e.style},[y("div",{class:["v-timeline-divider__before",u.value],style:c.value},null),!e.hideDot&&y("div",{key:"dot",class:["v-timeline-divider__dot",l.value,o.value,i.value],style:a.value},[y("div",{class:["v-timeline-divider__inner-dot",s.value,o.value],style:r.value},[n.default?y(rt,{key:"icon-defaults",disabled:!e.icon,defaults:{VIcon:{color:e.iconColor,icon:e.icon,size:e.size}}},n.default):y(gt,{key:"icon",color:e.iconColor,icon:e.icon,size:e.size},null)])]),y("div",{class:["v-timeline-divider__after",u.value],style:c.value},null)])),{}}}),sS=Y({density:String,dotColor:String,fillDot:Boolean,hideDot:Boolean,hideOpposite:{type:Boolean,default:void 0},icon:We,iconColor:String,lineInset:[Number,String],...Ie(),...Qt(),...sn(),...Vt(),...$i(),...Je()},"VTimelineItem"),cO=de()({name:"VTimelineItem",props:sS(),setup(e,t){let{slots:n}=t;const{dimensionStyles:i}=en(e),a=Me(0),r=_e();return Te(r,s=>{var o;s&&(a.value=((o=s.$el.querySelector(".v-timeline-divider__dot"))==null?void 0:o.getBoundingClientRect().width)??0)},{flush:"post"}),pe(()=>{var s,o;return y("div",{class:["v-timeline-item",{"v-timeline-item--fill-dot":e.fillDot},e.class],style:[{"--v-timeline-dot-size":Re(a.value),"--v-timeline-line-inset":e.lineInset?`calc(var(--v-timeline-dot-size) / 2 + ${Re(e.lineInset)})`:Re(0)},e.style]},[y("div",{class:"v-timeline-item__body",style:i.value},[(s=n.default)==null?void 0:s.call(n)]),y(uO,{ref:r,hideDot:e.hideDot,icon:e.icon,iconColor:e.iconColor,size:e.size,elevation:e.elevation,dotColor:e.dotColor,fillDot:e.fillDot,rounded:e.rounded},{default:n.icon}),e.density!=="compact"&&y("div",{class:"v-timeline-item__opposite"},[!e.hideOpposite&&((o=n.opposite)==null?void 0:o.call(n))])])}),{}}}),dO=Y({align:{type:String,default:"center",validator:e=>["center","start"].includes(e)},direction:{type:String,default:"vertical",validator:e=>["vertical","horizontal"].includes(e)},justify:{type:String,default:"auto",validator:e=>["auto","center"].includes(e)},side:{type:String,validator:e=>e==null||["start","end"].includes(e)},lineThickness:{type:[String,Number],default:2},lineColor:String,truncateLine:{type:String,validator:e=>["start","end","both"].includes(e)},...Ka(sS({lineInset:0}),["dotColor","fillDot","hideOpposite","iconColor","lineInset","size"]),...Ie(),...fn(),...Je(),...dt()},"VTimeline"),fO=de()({name:"VTimeline",props:dO(),setup(e,t){let{slots:n}=t;const{themeClasses:i}=pt(e),{densityClasses:a}=In(e),{rtlClasses:r}=rn();zt({VTimelineDivider:{lineColor:se(e,"lineColor")},VTimelineItem:{density:se(e,"density"),dotColor:se(e,"dotColor"),fillDot:se(e,"fillDot"),hideOpposite:se(e,"hideOpposite"),iconColor:se(e,"iconColor"),lineColor:se(e,"lineColor"),lineInset:se(e,"lineInset"),size:se(e,"size")}});const s=A(()=>{const l=e.side?e.side:e.density!=="default"?"end":null;return l&&`v-timeline--side-${l}`}),o=A(()=>{const l=["v-timeline--truncate-line-start","v-timeline--truncate-line-end"];switch(e.truncateLine){case"both":return l;case"start":return l[0];case"end":return l[1];default:return null}});return pe(()=>y(e.tag,{class:["v-timeline",`v-timeline--${e.direction}`,`v-timeline--align-${e.align}`,`v-timeline--justify-${e.justify}`,o.value,{"v-timeline--inset-line":!!e.lineInset},i.value,a.value,s.value,r.value,e.class],style:[{"--v-timeline-line-thickness":Re(e.lineThickness)},e.style]},n)),{}}}),hO=Y({...Ie(),...pi({variant:"text"})},"VToolbarItems"),mO=de()({name:"VToolbarItems",props:hO(),setup(e,t){let{slots:n}=t;return zt({VBtn:{color:se(e,"color"),height:"inherit",variant:se(e,"variant")}}),pe(()=>{var i;return y("div",{class:["v-toolbar-items",e.class],style:e.style},[(i=n.default)==null?void 0:i.call(n)])}),{}}}),vO=Y({id:String,text:String,...Kt(gl({closeOnBack:!1,location:"end",locationStrategy:"connected",eager:!0,minWidth:0,offset:10,openOnClick:!1,openOnHover:!0,origin:"auto",scrim:!1,scrollStrategy:"reposition",transition:!1}),["absolute","persistent"])},"VTooltip"),oS=de()({name:"VTooltip",props:vO(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const i=He(e,"modelValue"),{scopeId:a}=ns(),r=gn(),s=A(()=>e.id||`v-tooltip-${r}`),o=_e(),l=A(()=>e.location.split(" ").length>1?e.location:e.location+" center"),u=A(()=>e.origin==="auto"||e.origin==="overlap"||e.origin.split(" ").length>1||e.location.split(" ").length>1?e.origin:e.origin+" center"),c=A(()=>e.transition?e.transition:i.value?"scale-transition":"fade-transition"),d=A(()=>ge({"aria-describedby":s.value},e.activatorProps));return pe(()=>{const f=zi.filterProps(e);return y(zi,ge({ref:o,class:["v-tooltip",e.class],style:e.style,id:s.value},f,{modelValue:i.value,"onUpdate:modelValue":h=>i.value=h,transition:c.value,absolute:!0,location:l.value,origin:u.value,persistent:!0,role:"tooltip",activatorProps:d.value,_disableGlobalStack:!0},a),{activator:n.activator,default:function(){var m;for(var h=arguments.length,g=new Array(h),p=0;p<h;p++)g[p]=arguments[p];return((m=n.default)==null?void 0:m.call(n,...g))??e.text}})}),yi({},o)}}),gO=de()({name:"VValidation",props:d0(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const i=f0(e,"validation");return()=>{var a;return(a=n.default)==null?void 0:a.call(n,i)}}}),pO=Object.freeze(Object.defineProperty({__proto__:null,VAlert:BL,VAlertTitle:a0,VApp:jD,VAppBar:vL,VAppBarNavIcon:FL,VAppBarTitle:NL,VAutocomplete:o2,VAvatar:mi,VBadge:u2,VBanner:f2,VBannerActions:H0,VBannerText:G0,VBottomNavigation:m2,VBottomSheet:g2,VBreadcrumbs:b2,VBreadcrumbsDivider:$0,VBreadcrumbsItem:X0,VBtn:vt,VBtnGroup:Jf,VBtnToggle:xL,VCard:w2,VCardActions:Y0,VCardItem:K0,VCardSubtitle:q0,VCardText:Z0,VCardTitle:j0,VCarousel:k2,VCarouselItem:F2,VCheckbox:jL,VCheckboxBtn:ga,VChip:io,VChipGroup:ek,VClassIcon:vm,VCode:N2,VCol:fF,VColorPicker:wV,VCombobox:AV,VComponentIcon:jf,VConfirmEdit:RV,VContainer:lF,VCounter:yc,VDataIterator:BV,VDataTable:nF,VDataTableFooter:Yo,VDataTableHeaders:zr,VDataTableRow:$m,VDataTableRows:Hr,VDataTableServer:sF,VDataTableVirtual:aF,VDatePicker:wF,VDatePickerControls:mh,VDatePickerHeader:vh,VDatePickerMonth:gh,VDatePickerMonths:ph,VDatePickerYears:yh,VDefaultsProvider:rt,VDialog:sh,VDialogBottomTransition:QD,VDialogTopTransition:eL,VDialogTransition:uc,VDivider:vl,VEmptyState:CF,VExpandTransition:cc,VExpandXTransition:_m,VExpansionPanel:AF,VExpansionPanelText:_h,VExpansionPanelTitle:bh,VExpansionPanels:IF,VFab:LF,VFabTransition:JD,VFadeTransition:zo,VField:$a,VFieldLabel:bo,VFileInput:VF,VFooter:NF,VForm:UF,VHover:zF,VIcon:gt,VImg:va,VInfiniteScroll:GF,VInput:xn,VItem:XF,VItemGroup:$F,VKbd:YF,VLabel:no,VLayout:jF,VLayoutItem:ZF,VLazy:QF,VLigatureIcon:mD,VList:pc,VListGroup:nh,VListImg:Sk,VListItem:pa,VListItemAction:Ek,VListItemMedia:Tk,VListItemSubtitle:E0,VListItemTitle:w0,VListSubheader:T0,VLocaleProvider:tN,VMain:iN,VMenu:qs,VMessages:u0,VNavigationDrawer:fN,VNoSsr:hN,VOtpInput:vN,VOverlay:zi,VPagination:fh,VParallax:yN,VProgressCircular:Ys,VProgressLinear:fc,VRadio:bN,VRadioGroup:SN,VRangeSlider:EN,VRating:TN,VResponsive:Kf,VRow:_F,VScaleTransition:pm,VScrollXReverseTransition:nL,VScrollXTransition:tL,VScrollYReverseTransition:aL,VScrollYTransition:iL,VSelect:Lm,VSelectionControl:Wa,VSelectionControlGroup:s0,VSheet:Br,VSkeletonLoader:RN,VSlideGroup:$o,VSlideGroupItem:IN,VSlideXReverseTransition:sL,VSlideXTransition:rL,VSlideYReverseTransition:oL,VSlideYTransition:ym,VSlider:dh,VSnackbar:kN,VSpacer:Ox,VSparkline:ON,VSpeedDial:BN,VStepper:YN,VStepperActions:Jx,VStepperHeader:Qx,VStepperItem:eS,VStepperWindow:tS,VStepperWindowItem:nS,VSvgIcon:mm,VSwitch:jN,VSystemBar:ZN,VTab:iS,VTable:Gr,VTabs:iO,VTabsWindow:aS,VTabsWindowItem:rS,VTextField:Nr,VTextarea:rO,VThemeProvider:oO,VTimeline:fO,VTimelineItem:cO,VToolbar:Zf,VToolbarItems:mO,VToolbarTitle:gm,VTooltip:oS,VValidation:gO,VVirtualScroll:bc,VWindow:Or,VWindowItem:Ur},Symbol.toStringTag,{value:"Module"}));function yO(e,t){const n=t.modifiers||{},i=t.value,{once:a,immediate:r,...s}=n,o=!Object.keys(s).length,{handler:l,options:u}=typeof i=="object"?i:{handler:i,options:{attributes:(s==null?void 0:s.attr)??o,characterData:(s==null?void 0:s.char)??o,childList:(s==null?void 0:s.child)??o,subtree:(s==null?void 0:s.sub)??o}},c=new MutationObserver(function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=arguments.length>1?arguments[1]:void 0;l==null||l(d,f),a&&lS(e,t)});r&&(l==null||l([],c)),e._mutate=Object(e._mutate),e._mutate[t.instance.$.uid]={observer:c},c.observe(e,u)}function lS(e,t){var n;(n=e._mutate)!=null&&n[t.instance.$.uid]&&(e._mutate[t.instance.$.uid].observer.disconnect(),delete e._mutate[t.instance.$.uid])}const _O={mounted:yO,unmounted:lS};function bO(e,t){var a,r;const n=t.value,i={passive:!((a=t.modifiers)!=null&&a.active)};window.addEventListener("resize",n,i),e._onResize=Object(e._onResize),e._onResize[t.instance.$.uid]={handler:n,options:i},(r=t.modifiers)!=null&&r.quiet||n()}function xO(e,t){var a;if(!((a=e._onResize)!=null&&a[t.instance.$.uid]))return;const{handler:n,options:i}=e._onResize[t.instance.$.uid];window.removeEventListener("resize",n,i),delete e._onResize[t.instance.$.uid]}const SO={mounted:bO,unmounted:xO};function uS(e,t){const{self:n=!1}=t.modifiers??{},i=t.value,a=typeof i=="object"&&i.options||{passive:!0},r=typeof i=="function"||"handleEvent"in i?i:i.handler,s=n?e:t.arg?document.querySelector(t.arg):window;s&&(s.addEventListener("scroll",r,a),e._onScroll=Object(e._onScroll),e._onScroll[t.instance.$.uid]={handler:r,options:a,target:n?void 0:s})}function cS(e,t){var r;if(!((r=e._onScroll)!=null&&r[t.instance.$.uid]))return;const{handler:n,options:i,target:a=e}=e._onScroll[t.instance.$.uid];a.removeEventListener("scroll",n,i),delete e._onScroll[t.instance.$.uid]}function MO(e,t){t.value!==t.oldValue&&(cS(e,t),uS(e,t))}const EO={mounted:uS,unmounted:cS,updated:MO};function wO(e,t){const n=typeof e=="string"?pM(e):e,i=TO(n,t);return{mounted:i,updated:i,unmounted(a){__(null,a)}}}function TO(e,t){return function(n,i,a){var d,f,h;const r=typeof t=="function"?t(i):t,s=((d=i.value)==null?void 0:d.text)??i.value??(r==null?void 0:r.text),o=nc(i.value)?i.value:{},l=()=>s??n.textContent,u=(a.ctx===i.instance.$?(f=CO(a,i.instance.$))==null?void 0:f.provides:(h=a.ctx)==null?void 0:h.provides)??i.instance.$.provides,c=_a(e,ge(r,o),l);c.appContext=Object.assign(Object.create(null),i.instance.$.appContext,{provides:u}),__(c,n)}}function CO(e,t){const n=new Set,i=r=>{var s,o;for(const l of r){if(!l)continue;if(l===e||l.el&&e.el&&l.el===e.el)return!0;n.add(l);let u;if(l.suspense?u=i([l.ssContent]):Array.isArray(l.children)?u=i(l.children):(s=l.component)!=null&&s.vnode&&(u=i([(o=l.component)==null?void 0:o.subTree])),u)return u;n.delete(l)}return!1};if(!i([t.subTree]))return t;const a=Array.from(n).reverse();for(const r of a)if(r.component)return r.component;return t}const AO=wO(oS,e=>{var t;return{activator:"parent",location:(t=e.arg)==null?void 0:t.replace("-"," "),text:typeof e.value=="boolean"?void 0:e.value}}),PO=Object.freeze(Object.defineProperty({__proto__:null,ClickOutside:N0,Intersect:ul,Mutate:_O,Resize:SO,Ripple:xa,Scroll:EO,Tooltip:AO,Touch:km},Symbol.toStringTag,{value:"Module"})),RO=Ob({components:pO,directives:PO,theme:{defaultTheme:"light"}}),dS=zE(YD);dS.use(RO);dS.mount("#app");