const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./init-CzXBwfa2.js","./VAutocomplete-14RBtvAN.js","./VAutocomplete-C7GsKXCI.css","./index-AOcxwHT9.js","./index-B8R6cH3l.css","./index-fM-yRA8C.js","./index-T0FVgtn_.css","./VColorPicker-OJXTdtLi.js","./VSlider-Bmvc6aBM.js","./VSlider-CCLK5IcE.css","./VColorPicker-C5SaCPIG.css","./VItem-BK4QWvWk.js","./VItem-Dc6sXDLO.css","./TextEllipsis-Csvrxmtg.js","./TextEllipsis-CiyJs6he.css","./init-L6M_wKfy.css","./index-BH2u6Mtr.js","./index-BLbEZ0ov.css","./index-iVKLIIPr.js","./index-DygTP69T.js","./index-DVn-lV_d.css","./index-CRFMH-eq.js","./index-ShAoptWN.js","./index-DGgDsdLN.js","./index-AqzXok66.css","./index-Cz6Ec37f.js","./index-Djasm6Rq.css","./index-D1XXAW7v.js","./index-BH4GkfoQ.css","./index-Bk1fV-OO.js","./index-C01L9dzC.css","./index-CWQ67CZx.js","./index-DGIlKyM9.js","./index-zOzy80IM.js","./index-IqHIF4Ia.css","./index-DQl_2X1i.js","./hooks-Bm-hi6ta.js","./index-InhgaAuK.css","./index-DhMIQvXp.js","./index-ByQCJWio.css","./index-CZjiVl8-.js","./index-D_JgiZwh.css","./index-Cho1JviK.js","./index-nJNJkaz0.js","./index-CuMwt_m8.css","./index-q238DTSs.js","./hooks-B2wby68t.js","./index-B2_I0Nan.css","./index-BqOFji3O.js","./index-Cus1j3uJ.css","./index-C6Jlbm68.js","./index-Ih-hcyhV.css","./index-CmrbCn_y.js","./index-zgJSgbIM.js","./print-BUiXb7dt.js","./index-BP7v9n-Z.js","./index-DzKCDU2b.css","./index-C-IrQJDk.js","./index-B4IIMmzb.js","./hooks-oYkL7aVN.js","./index-x667nqpe.css","./index-DlZg7BZu.js","./index-DQ8ioBU-.css","./index-BC6zIT-j.js","./index-DOVFRcUT.css","./index-D-b_Xqbw.js","./index-n0gERvBg.js","./index-BP-b09cf.css","./index-tfq16h0w.js","./index-BTYP6yHp.js","./index-S-BSxkx-.css","./index-RAYsk0uq.js","./index-CL_f6Mbr.js"])))=>i.map(i=>d[i]); var $0=Object.defineProperty;var H0=(t,e,l)=>e in t?$0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[e]=l;var Pm=(t,e,l)=>H0(t,typeof e!="symbol"?e+"":e,l);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))n(u);new MutationObserver(u=>{for(const c of u)if(c.type==="childList")for(const y of c.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&n(y)}).observe(document,{childList:!0,subtree:!0});function l(u){const c={};return u.integrity&&(c.integrity=u.integrity),u.referrerPolicy&&(c.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?c.credentials="include":u.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function n(u){if(u.ep)return;u.ep=!0;const c=l(u);fetch(u.href,c)}})();const scriptRel="modulepreload",assetsURL=function(t,e){return new URL(t,e).href},seen={},__vitePreload=function(e,l,n){let u=Promise.resolve();if(l&&l.length>0){const y=document.getElementsByTagName("link"),b=document.querySelector("meta[property=csp-nonce]"),m=b?.nonce||b?.getAttribute("nonce");u=Promise.allSettled(l.map(O=>{if(O=assetsURL(O,n),O in seen)return;seen[O]=!0;const N=O.endsWith(".css"),L=N?'[rel="stylesheet"]':"";if(!!n)for(let J=y.length-1;J>=0;J--){const fe=y[J];if(fe.href===O&&(!N||fe.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${O}"]${L}`))return;const q=document.createElement("link");if(q.rel=N?"stylesheet":scriptRel,N||(q.as="script"),q.crossOrigin="",q.href=O,m&&q.setAttribute("nonce",m),document.head.appendChild(q),N)return new Promise((J,fe)=>{q.addEventListener("load",J),q.addEventListener("error",()=>fe(new Error(`Unable to preload CSS for ${O}`)))})}))}function c(y){const b=new Event("vite:preloadError",{cancelable:!0});if(b.payload=y,window.dispatchEvent(b),!b.defaultPrevented)throw y}return u.then(y=>{for(const b of y||[])b.status==="rejected"&&c(b.reason);return e().catch(c)})};/** * @vue/shared v3.5.6 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **//*! #__NO_SIDE_EFFECTS__ */function makeMap(t){const e=Object.create(null);for(const l of t.split(","))e[l]=1;return l=>l in e}const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,isOn$1=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),isModelListener=t=>t.startsWith("onUpdate:"),extend$1=Object.assign,remove=(t,e)=>{const l=t.indexOf(e);l>-1&&t.splice(l,1)},hasOwnProperty$3=Object.prototype.hasOwnProperty,hasOwn=(t,e)=>hasOwnProperty$3.call(t,e),isArray$3=Array.isArray,isMap=t=>toTypeString(t)==="[object Map]",isSet=t=>toTypeString(t)==="[object Set]",isDate$1=t=>toTypeString(t)==="[object Date]",isRegExp$1=t=>toTypeString(t)==="[object RegExp]",isFunction$2=t=>typeof t=="function",isString$2=t=>typeof t=="string",isSymbol=t=>typeof t=="symbol",isObject$2=t=>t!==null&&typeof t=="object",isPromise$2=t=>(isObject$2(t)||isFunction$2(t))&&isFunction$2(t.then)&&isFunction$2(t.catch),objectToString=Object.prototype.toString,toTypeString=t=>objectToString.call(t),toRawType=t=>toTypeString(t).slice(8,-1),isPlainObject$3=t=>toTypeString(t)==="[object Object]",isIntegerKey=t=>isString$2(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=t=>{const e=Object.create(null);return l=>e[l]||(e[l]=t(l))},camelizeRE=/-(\w)/g,camelize=cacheStringFunction(t=>t.replace(camelizeRE,(e,l)=>l?l.toUpperCase():"")),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(t=>t.replace(hyphenateRE,"-$1").toLowerCase()),capitalize=cacheStringFunction(t=>t.charAt(0).toUpperCase()+t.slice(1)),toHandlerKey=cacheStringFunction(t=>t?`on${capitalize(t)}`:""),hasChanged=(t,e)=>!Object.is(t,e),invokeArrayFns=(t,...e)=>{for(let l=0;l{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:n,value:l})},looseToNumber=t=>{const e=parseFloat(t);return isNaN(e)?t:e},toNumber=t=>{const e=isString$2(t)?Number(t):NaN;return isNaN(e)?t:e};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),GLOBALS_ALLOWED="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",isGloballyAllowed=makeMap(GLOBALS_ALLOWED);function normalizeStyle(t){if(isArray$3(t)){const e={};for(let l=0;l{if(l){const n=l.split(propertyDelimiterRE);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function normalizeClass(t){let e="";if(isString$2(t))e=t;else if(isArray$3(t))for(let l=0;llooseEqual(l,e))}const isRef$1=t=>!!(t&&t.__v_isRef===!0),toDisplayString=t=>isString$2(t)?t:t==null?"":isArray$3(t)||isObject$2(t)&&(t.toString===objectToString||!isFunction$2(t.toString))?isRef$1(t)?toDisplayString(t.value):JSON.stringify(t,replacer,2):String(t),replacer=(t,e)=>isRef$1(e)?replacer(t,e.value):isMap(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((l,[n,u],c)=>(l[stringifySymbol(n,c)+" =>"]=u,l),{})}:isSet(e)?{[`Set(${e.size})`]:[...e.values()].map(l=>stringifySymbol(l))}:isSymbol(e)?stringifySymbol(e):isObject$2(e)&&!isArray$3(e)&&!isPlainObject$3(e)?String(e):e,stringifySymbol=(t,e="")=>{var l;return isSymbol(t)?`Symbol(${(l=t.description)!=null?l:e})`:t};/** * @vue/reactivity v3.5.6 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let activeEffectScope;class EffectScope{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=activeEffectScope,!e&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,l;if(this.scopes)for(e=0,l=this.scopes.length;e0)return;let t;for(;batchedSub;){let e=batchedSub;for(batchedSub=void 0;e;){const l=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(n){t||(t=n)}e=l}}if(t)throw t}function prepareDeps(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function cleanupDeps(t){let e,l=t.depsTail,n=l;for(;n;){const u=n.prevDep;n.version===-1?(n===l&&(l=u),removeSub(n),removeDep(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=u}t.deps=e,t.depsTail=l}function isDirty(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(refreshComputed(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function refreshComputed(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===globalVersion))return;t.globalVersion=globalVersion;const e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&t.deps&&!isDirty(t)){t.flags&=-3;return}const l=activeSub,n=shouldTrack;activeSub=t,shouldTrack=!0;try{prepareDeps(t);const u=t.fn(t._value);(e.version===0||hasChanged(u,t._value))&&(t._value=u,e.version++)}catch(u){throw e.version++,u}finally{activeSub=l,shouldTrack=n,cleanupDeps(t),t.flags&=-3}}function removeSub(t){const{dep:e,prevSub:l,nextSub:n}=t;if(l&&(l.nextSub=n,t.prevSub=void 0),n&&(n.prevSub=l,t.nextSub=void 0),e.subs===t&&(e.subs=l),!e.subs&&e.computed){e.computed.flags&=-5;for(let u=e.computed.deps;u;u=u.nextDep)removeSub(u)}}function removeDep(t){const{prevDep:e,nextDep:l}=t;e&&(e.nextDep=l,t.prevDep=void 0),l&&(l.prevDep=e,t.nextDep=void 0)}function effect(t,e){t.effect instanceof ReactiveEffect&&(t=t.effect.fn);const l=new ReactiveEffect(t);e&&extend$1(l,e);try{l.run()}catch(u){throw l.stop(),u}const n=l.run.bind(l);return n.effect=l,n}function stop(t){t.effect.stop()}let shouldTrack=!0;const trackStack=[];function pauseTracking(){trackStack.push(shouldTrack),shouldTrack=!1}function resetTracking(){const t=trackStack.pop();shouldTrack=t===void 0?!0:t}function cleanupEffect(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const l=activeSub;activeSub=void 0;try{e()}finally{activeSub=l}}}let globalVersion=0;class Link{constructor(e,l){this.sub=e,this.dep=l,this.version=l.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Dep{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0}track(e){if(!activeSub||!shouldTrack||activeSub===this.computed)return;let l=this.activeLink;if(l===void 0||l.sub!==activeSub)l=this.activeLink=new Link(activeSub,this),activeSub.deps?(l.prevDep=activeSub.depsTail,activeSub.depsTail.nextDep=l,activeSub.depsTail=l):activeSub.deps=activeSub.depsTail=l,activeSub.flags&4&&addSub(l);else if(l.version===-1&&(l.version=this.version,l.nextDep)){const n=l.nextDep;n.prevDep=l.prevDep,l.prevDep&&(l.prevDep.nextDep=n),l.prevDep=activeSub.depsTail,l.nextDep=void 0,activeSub.depsTail.nextDep=l,activeSub.depsTail=l,activeSub.deps===l&&(activeSub.deps=n)}return l}trigger(e){this.version++,globalVersion++,this.notify(e)}notify(e){startBatch();try{for(let l=this.subs;l;l=l.prevSub)l.sub.notify()&&l.sub.dep.notify()}finally{endBatch()}}}function addSub(t){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let n=e.deps;n;n=n.nextDep)addSub(n)}const l=t.dep.subs;l!==t&&(t.prevSub=l,l&&(l.nextSub=t)),t.dep.subs=t}const targetMap=new WeakMap,ITERATE_KEY=Symbol(""),MAP_KEY_ITERATE_KEY=Symbol(""),ARRAY_ITERATE_KEY=Symbol("");function track(t,e,l){if(shouldTrack&&activeSub){let n=targetMap.get(t);n||targetMap.set(t,n=new Map);let u=n.get(l);u||n.set(l,u=new Dep),u.track()}}function trigger(t,e,l,n,u,c){const y=targetMap.get(t);if(!y){globalVersion++;return}const b=m=>{m&&m.trigger()};if(startBatch(),e==="clear")y.forEach(b);else{const m=isArray$3(t),O=m&&isIntegerKey(l);if(m&&l==="length"){const N=Number(n);y.forEach((L,G)=>{(G==="length"||G===ARRAY_ITERATE_KEY||!isSymbol(G)&&G>=N)&&b(L)})}else switch(l!==void 0&&b(y.get(l)),O&&b(y.get(ARRAY_ITERATE_KEY)),e){case"add":m?O&&b(y.get("length")):(b(y.get(ITERATE_KEY)),isMap(t)&&b(y.get(MAP_KEY_ITERATE_KEY)));break;case"delete":m||(b(y.get(ITERATE_KEY)),isMap(t)&&b(y.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap(t)&&b(y.get(ITERATE_KEY));break}}endBatch()}function getDepFromReactive(t,e){var l;return(l=targetMap.get(t))==null?void 0:l.get(e)}function reactiveReadArray(t){const e=toRaw(t);return e===t?e:(track(e,"iterate",ARRAY_ITERATE_KEY),isShallow(t)?e:e.map(toReactive))}function shallowReadArray(t){return track(t=toRaw(t),"iterate",ARRAY_ITERATE_KEY),t}const arrayInstrumentations={__proto__:null,[Symbol.iterator](){return iterator(this,Symbol.iterator,toReactive)},concat(...t){return reactiveReadArray(this).concat(...t.map(e=>isArray$3(e)?reactiveReadArray(e):e))},entries(){return iterator(this,"entries",t=>(t[1]=toReactive(t[1]),t))},every(t,e){return apply(this,"every",t,e,void 0,arguments)},filter(t,e){return apply(this,"filter",t,e,l=>l.map(toReactive),arguments)},find(t,e){return apply(this,"find",t,e,toReactive,arguments)},findIndex(t,e){return apply(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return apply(this,"findLast",t,e,toReactive,arguments)},findLastIndex(t,e){return apply(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return apply(this,"forEach",t,e,void 0,arguments)},includes(...t){return searchProxy(this,"includes",t)},indexOf(...t){return searchProxy(this,"indexOf",t)},join(t){return reactiveReadArray(this).join(t)},lastIndexOf(...t){return searchProxy(this,"lastIndexOf",t)},map(t,e){return apply(this,"map",t,e,void 0,arguments)},pop(){return noTracking(this,"pop")},push(...t){return noTracking(this,"push",t)},reduce(t,...e){return reduce(this,"reduce",t,e)},reduceRight(t,...e){return reduce(this,"reduceRight",t,e)},shift(){return noTracking(this,"shift")},some(t,e){return apply(this,"some",t,e,void 0,arguments)},splice(...t){return noTracking(this,"splice",t)},toReversed(){return reactiveReadArray(this).toReversed()},toSorted(t){return reactiveReadArray(this).toSorted(t)},toSpliced(...t){return reactiveReadArray(this).toSpliced(...t)},unshift(...t){return noTracking(this,"unshift",t)},values(){return iterator(this,"values",toReactive)}};function iterator(t,e,l){const n=shallowReadArray(t),u=n[e]();return n!==t&&!isShallow(t)&&(u._next=u.next,u.next=()=>{const c=u._next();return c.value&&(c.value=l(c.value)),c}),u}const arrayProto=Array.prototype;function apply(t,e,l,n,u,c){const y=shallowReadArray(t),b=y!==t&&!isShallow(t),m=y[e];if(m!==arrayProto[e]){const L=m.apply(t,c);return b?toReactive(L):L}let O=l;y!==t&&(b?O=function(L,G){return l.call(this,toReactive(L),G,t)}:l.length>2&&(O=function(L,G){return l.call(this,L,G,t)}));const N=m.call(y,O,n);return b&&u?u(N):N}function reduce(t,e,l,n){const u=shallowReadArray(t);let c=l;return u!==t&&(isShallow(t)?l.length>3&&(c=function(y,b,m){return l.call(this,y,b,m,t)}):c=function(y,b,m){return l.call(this,y,toReactive(b),m,t)}),u[e](c,...n)}function searchProxy(t,e,l){const n=toRaw(t);track(n,"iterate",ARRAY_ITERATE_KEY);const u=n[e](...l);return(u===-1||u===!1)&&isProxy(l[0])?(l[0]=toRaw(l[0]),n[e](...l)):u}function noTracking(t,e,l=[]){pauseTracking(),startBatch();const n=toRaw(t)[e].apply(t,l);return endBatch(),resetTracking(),n}const isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(isSymbol));function hasOwnProperty$2(t){isSymbol(t)||(t=String(t));const e=toRaw(this);return track(e,"has",t),e.hasOwnProperty(t)}class BaseReactiveHandler{constructor(e=!1,l=!1){this._isReadonly=e,this._isShallow=l}get(e,l,n){const u=this._isReadonly,c=this._isShallow;if(l==="__v_isReactive")return!u;if(l==="__v_isReadonly")return u;if(l==="__v_isShallow")return c;if(l==="__v_raw")return n===(u?c?shallowReadonlyMap:readonlyMap:c?shallowReactiveMap:reactiveMap).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const y=isArray$3(e);if(!u){let m;if(y&&(m=arrayInstrumentations[l]))return m;if(l==="hasOwnProperty")return hasOwnProperty$2}const b=Reflect.get(e,l,isRef(e)?e:n);return(isSymbol(l)?builtInSymbols.has(l):isNonTrackableKeys(l))||(u||track(e,"get",l),c)?b:isRef(b)?y&&isIntegerKey(l)?b:b.value:isObject$2(b)?u?readonly(b):reactive(b):b}}class MutableReactiveHandler extends BaseReactiveHandler{constructor(e=!1){super(!1,e)}set(e,l,n,u){let c=e[l];if(!this._isShallow){const m=isReadonly(c);if(!isShallow(n)&&!isReadonly(n)&&(c=toRaw(c),n=toRaw(n)),!isArray$3(e)&&isRef(c)&&!isRef(n))return m?!1:(c.value=n,!0)}const y=isArray$3(e)&&isIntegerKey(l)?Number(l)t,getProto=t=>Reflect.getPrototypeOf(t);function get(t,e,l=!1,n=!1){t=t.__v_raw;const u=toRaw(t),c=toRaw(e);l||(hasChanged(e,c)&&track(u,"get",e),track(u,"get",c));const{has:y}=getProto(u),b=n?toShallow:l?toReadonly:toReactive;if(y.call(u,e))return b(t.get(e));if(y.call(u,c))return b(t.get(c));t!==u&&t.get(e)}function has$1(t,e=!1){const l=this.__v_raw,n=toRaw(l),u=toRaw(t);return e||(hasChanged(t,u)&&track(n,"has",t),track(n,"has",u)),t===u?l.has(t):l.has(t)||l.has(u)}function size(t,e=!1){return t=t.__v_raw,!e&&track(toRaw(t),"iterate",ITERATE_KEY),Reflect.get(t,"size",t)}function add$2(t,e=!1){!e&&!isShallow(t)&&!isReadonly(t)&&(t=toRaw(t));const l=toRaw(this);return getProto(l).has.call(l,t)||(l.add(t),trigger(l,"add",t,t)),this}function set(t,e,l=!1){!l&&!isShallow(e)&&!isReadonly(e)&&(e=toRaw(e));const n=toRaw(this),{has:u,get:c}=getProto(n);let y=u.call(n,t);y||(t=toRaw(t),y=u.call(n,t));const b=c.call(n,t);return n.set(t,e),y?hasChanged(e,b)&&trigger(n,"set",t,e):trigger(n,"add",t,e),this}function deleteEntry(t){const e=toRaw(this),{has:l,get:n}=getProto(e);let u=l.call(e,t);u||(t=toRaw(t),u=l.call(e,t)),n&&n.call(e,t);const c=e.delete(t);return u&&trigger(e,"delete",t,void 0),c}function clear(){const t=toRaw(this),e=t.size!==0,l=t.clear();return e&&trigger(t,"clear",void 0,void 0),l}function createForEach(t,e){return function(n,u){const c=this,y=c.__v_raw,b=toRaw(y),m=e?toShallow:t?toReadonly:toReactive;return!t&&track(b,"iterate",ITERATE_KEY),y.forEach((O,N)=>n.call(u,m(O),m(N),c))}}function createIterableMethod(t,e,l){return function(...n){const u=this.__v_raw,c=toRaw(u),y=isMap(c),b=t==="entries"||t===Symbol.iterator&&y,m=t==="keys"&&y,O=u[t](...n),N=l?toShallow:e?toReadonly:toReactive;return!e&&track(c,"iterate",m?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:L,done:G}=O.next();return G?{value:L,done:G}:{value:b?[N(L[0]),N(L[1])]:N(L),done:G}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function createInstrumentations(){const t={get(c){return get(this,c)},get size(){return size(this)},has:has$1,add:add$2,set,delete:deleteEntry,clear,forEach:createForEach(!1,!1)},e={get(c){return get(this,c,!1,!0)},get size(){return size(this)},has:has$1,add(c){return add$2.call(this,c,!0)},set(c,y){return set.call(this,c,y,!0)},delete:deleteEntry,clear,forEach:createForEach(!1,!0)},l={get(c){return get(this,c,!0)},get size(){return size(this,!0)},has(c){return has$1.call(this,c,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!1)},n={get(c){return get(this,c,!0,!0)},get size(){return size(this,!0)},has(c){return has$1.call(this,c,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(c=>{t[c]=createIterableMethod(c,!1,!1),l[c]=createIterableMethod(c,!0,!1),e[c]=createIterableMethod(c,!1,!0),n[c]=createIterableMethod(c,!0,!0)}),[t,l,e,n]}const[mutableInstrumentations,readonlyInstrumentations,shallowInstrumentations,shallowReadonlyInstrumentations]=createInstrumentations();function createInstrumentationGetter(t,e){const l=e?t?shallowReadonlyInstrumentations:shallowInstrumentations:t?readonlyInstrumentations:mutableInstrumentations;return(n,u,c)=>u==="__v_isReactive"?!t:u==="__v_isReadonly"?t:u==="__v_raw"?n:Reflect.get(hasOwn(l,u)&&u in n?l:n,u,c)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},shallowReadonlyCollectionHandlers={get:createInstrumentationGetter(!0,!0)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function getTargetType(t){return t.__v_skip||!Object.isExtensible(t)?0:targetTypeMap(toRawType(t))}function reactive(t){return isReadonly(t)?t:createReactiveObject(t,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(t){return createReactiveObject(t,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly(t){return createReactiveObject(t,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function shallowReadonly(t){return createReactiveObject(t,!0,shallowReadonlyHandlers,shallowReadonlyCollectionHandlers,shallowReadonlyMap)}function createReactiveObject(t,e,l,n,u){if(!isObject$2(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const c=u.get(t);if(c)return c;const y=getTargetType(t);if(y===0)return t;const b=new Proxy(t,y===2?n:l);return u.set(t,b),b}function isReactive(t){return isReadonly(t)?isReactive(t.__v_raw):!!(t&&t.__v_isReactive)}function isReadonly(t){return!!(t&&t.__v_isReadonly)}function isShallow(t){return!!(t&&t.__v_isShallow)}function isProxy(t){return t?!!t.__v_raw:!1}function toRaw(t){const e=t&&t.__v_raw;return e?toRaw(e):t}function markRaw(t){return!hasOwn(t,"__v_skip")&&Object.isExtensible(t)&&def(t,"__v_skip",!0),t}const toReactive=t=>isObject$2(t)?reactive(t):t,toReadonly=t=>isObject$2(t)?readonly(t):t;function isRef(t){return t?t.__v_isRef===!0:!1}function ref(t){return createRef(t,!1)}function shallowRef(t){return createRef(t,!0)}function createRef(t,e){return isRef(t)?t:new RefImpl(t,e)}class RefImpl{constructor(e,l){this.dep=new Dep,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=l?e:toRaw(e),this._value=l?e:toReactive(e),this.__v_isShallow=l}get value(){return this.dep.track(),this._value}set value(e){const l=this._rawValue,n=this.__v_isShallow||isShallow(e)||isReadonly(e);e=n?e:toRaw(e),hasChanged(e,l)&&(this._rawValue=e,this._value=n?e:toReactive(e),this.dep.trigger())}}function triggerRef(t){t.dep.trigger()}function unref(t){return isRef(t)?t.value:t}function toValue(t){return isFunction$2(t)?t():unref(t)}const shallowUnwrapHandlers={get:(t,e,l)=>e==="__v_raw"?t:unref(Reflect.get(t,e,l)),set:(t,e,l,n)=>{const u=t[e];return isRef(u)&&!isRef(l)?(u.value=l,!0):Reflect.set(t,e,l,n)}};function proxyRefs(t){return isReactive(t)?t:new Proxy(t,shallowUnwrapHandlers)}class CustomRefImpl{constructor(e){this.__v_isRef=!0,this._value=void 0;const l=this.dep=new Dep,{get:n,set:u}=e(l.track.bind(l),l.trigger.bind(l));this._get=n,this._set=u}get value(){return this._value=this._get()}set value(e){this._set(e)}}function customRef(t){return new CustomRefImpl(t)}function toRefs(t){const e=isArray$3(t)?new Array(t.length):{};for(const l in t)e[l]=propertyToRef(t,l);return e}class ObjectRefImpl{constructor(e,l,n){this._object=e,this._key=l,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return getDepFromReactive(toRaw(this._object),this._key)}}class GetterRefImpl{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function toRef(t,e,l){return isRef(t)?t:isFunction$2(t)?new GetterRefImpl(t):isObject$2(t)&&arguments.length>1?propertyToRef(t,e,l):ref(t)}function propertyToRef(t,e,l){const n=t[e];return isRef(n)?n:new ObjectRefImpl(t,e,l)}class ComputedRefImpl{constructor(e,l,n){this.fn=e,this.setter=l,this._value=void 0,this.dep=new Dep(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=globalVersion-1,this.effect=this,this.__v_isReadonly=!l,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&activeSub!==this)return batch(this),!0}get value(){const e=this.dep.track();return refreshComputed(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function computed$1(t,e,l=!1){let n,u;return isFunction$2(t)?n=t:(n=t.get,u=t.set),new ComputedRefImpl(n,u,l)}const TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},INITIAL_WATCHER_VALUE={},cleanupMap=new WeakMap;let activeWatcher;function getCurrentWatcher(){return activeWatcher}function onWatcherCleanup(t,e=!1,l=activeWatcher){if(l){let n=cleanupMap.get(l);n||cleanupMap.set(l,n=[]),n.push(t)}}function watch$1(t,e,l=EMPTY_OBJ){const{immediate:n,deep:u,once:c,scheduler:y,augmentJob:b,call:m}=l,O=Ve=>u?Ve:isShallow(Ve)||u===!1||u===0?traverse(Ve,1):traverse(Ve);let N,L,G,q,J=!1,fe=!1;if(isRef(t)?(L=()=>t.value,J=isShallow(t)):isReactive(t)?(L=()=>O(t),J=!0):isArray$3(t)?(fe=!0,J=t.some(Ve=>isReactive(Ve)||isShallow(Ve)),L=()=>t.map(Ve=>{if(isRef(Ve))return Ve.value;if(isReactive(Ve))return O(Ve);if(isFunction$2(Ve))return m?m(Ve,2):Ve()})):isFunction$2(t)?e?L=m?()=>m(t,2):t:L=()=>{if(G){pauseTracking();try{G()}finally{resetTracking()}}const Ve=activeWatcher;activeWatcher=N;try{return m?m(t,3,[q]):t(q)}finally{activeWatcher=Ve}}:L=NOOP,e&&u){const Ve=L,rt=u===!0?1/0:u;L=()=>traverse(Ve(),rt)}const ve=getCurrentScope(),ne=()=>{N.stop(),ve&&remove(ve.effects,N)};if(c&&e){const Ve=e;e=(...rt)=>{Ve(...rt),ne()}}let Ue=fe?new Array(t.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const De=Ve=>{if(!(!(N.flags&1)||!N.dirty&&!Ve))if(e){const rt=N.run();if(u||J||(fe?rt.some((Ae,Te)=>hasChanged(Ae,Ue[Te])):hasChanged(rt,Ue))){G&&G();const Ae=activeWatcher;activeWatcher=N;try{const Te=[rt,Ue===INITIAL_WATCHER_VALUE?void 0:fe&&Ue[0]===INITIAL_WATCHER_VALUE?[]:Ue,q];m?m(e,3,Te):e(...Te),Ue=rt}finally{activeWatcher=Ae}}}else N.run()};return b&&b(De),N=new ReactiveEffect(L),N.scheduler=y?()=>y(De,!1):De,q=Ve=>onWatcherCleanup(Ve,!1,N),G=N.onStop=()=>{const Ve=cleanupMap.get(N);if(Ve){if(m)m(Ve,4);else for(const rt of Ve)rt();cleanupMap.delete(N)}},e?n?De(!0):Ue=N.run():y?y(De.bind(null,!0),!0):N.run(),ne.pause=N.pause.bind(N),ne.resume=N.resume.bind(N),ne.stop=ne,ne}function traverse(t,e=1/0,l){if(e<=0||!isObject$2(t)||t.__v_skip||(l=l||new Set,l.has(t)))return t;if(l.add(t),e--,isRef(t))traverse(t.value,e,l);else if(isArray$3(t))for(let n=0;n{traverse(n,e,l)});else if(isPlainObject$3(t)){for(const n in t)traverse(t[n],e,l);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&traverse(t[n],e,l)}return t}/** * @vue/runtime-core v3.5.6 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/const stack$1=[];function pushWarningContext(t){stack$1.push(t)}function popWarningContext(){stack$1.pop()}let isWarning=!1;function warn$1(t,...e){if(isWarning)return;isWarning=!0,pauseTracking();const l=stack$1.length?stack$1[stack$1.length-1].component:null,n=l&&l.appContext.config.warnHandler,u=getComponentTrace();if(n)callWithErrorHandling(n,l,11,[t+e.map(c=>{var y,b;return(b=(y=c.toString)==null?void 0:y.call(c))!=null?b:JSON.stringify(c)}).join(""),l&&l.proxy,u.map(({vnode:c})=>`at <${formatComponentName(l,c.type)}>`).join(` `),u]);else{const c=[`[Vue warn]: ${t}`,...e];u.length&&c.push(` `,...formatTrace(u)),console.warn(...c)}resetTracking(),isWarning=!1}function getComponentTrace(){let t=stack$1[stack$1.length-1];if(!t)return[];const e=[];for(;t;){const l=e[0];l&&l.vnode===t?l.recurseCount++:e.push({vnode:t,recurseCount:0});const n=t.component&&t.component.parent;t=n&&n.vnode}return e}function formatTrace(t){const e=[];return t.forEach((l,n)=>{e.push(...n===0?[]:[` `],...formatTraceEntry(l))}),e}function formatTraceEntry({vnode:t,recurseCount:e}){const l=e>0?`... (${e} recursive calls)`:"",n=t.component?t.component.parent==null:!1,u=` at <${formatComponentName(t.component,t.type,n)}`,c=">"+l;return t.props?[u,...formatProps(t.props),c]:[u+c]}function formatProps(t){const e=[],l=Object.keys(t);return l.slice(0,3).forEach(n=>{e.push(...formatProp(n,t[n]))}),l.length>3&&e.push(" ..."),e}function formatProp(t,e,l){return isString$2(e)?(e=JSON.stringify(e),l?e:[`${t}=${e}`]):typeof e=="number"||typeof e=="boolean"||e==null?l?e:[`${t}=${e}`]:isRef(e)?(e=formatProp(t,toRaw(e.value),!0),l?e:[`${t}=Ref<`,e,">"]):isFunction$2(e)?[`${t}=fn${e.name?`<${e.name}>`:""}`]:(e=toRaw(e),l?e:[`${t}=`,e])}function assertNumber(t,e){}const ErrorCodes={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},ErrorTypeStrings$1={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function callWithErrorHandling(t,e,l,n){try{return n?t(...n):t()}catch(u){handleError(u,e,l)}}function callWithAsyncErrorHandling(t,e,l,n){if(isFunction$2(t)){const u=callWithErrorHandling(t,e,l,n);return u&&isPromise$2(u)&&u.catch(c=>{handleError(c,e,l)}),u}if(isArray$3(t)){const u=[];for(let c=0;c>>1,u=queue[n],c=getId(u);c=getId(l)?queue.push(t):queue.splice(findInsertionIndex(e),0,t),t.flags|=1,queueFlush()}}function queueFlush(){!isFlushing&&!isFlushPending&&(isFlushPending=!0,currentFlushPromise=resolvedPromise.then(flushJobs))}function queuePostFlushCb(t){isArray$3(t)?pendingPostFlushCbs.push(...t):activePostFlushCbs&&t.id===-1?activePostFlushCbs.splice(postFlushIndex+1,0,t):t.flags&1||(pendingPostFlushCbs.push(t),t.flags|=1),queueFlush()}function flushPreFlushCbs(t,e,l=isFlushing?flushIndex+1:0){for(;lgetId(l)-getId(n));if(pendingPostFlushCbs.length=0,activePostFlushCbs){activePostFlushCbs.push(...e);return}for(activePostFlushCbs=e,postFlushIndex=0;postFlushIndext.id==null?t.flags&2?-1:1/0:t.id;function flushJobs(t){isFlushPending=!1,isFlushing=!0;try{for(flushIndex=0;flushIndexdevtools$1.emit(u,...c)),buffer$2=[]):typeof window<"u"&&window.HTMLElement&&!((n=(l=window.navigator)==null?void 0:l.userAgent)!=null&&n.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(c=>{setDevtoolsHook$1(c,e)}),setTimeout(()=>{devtools$1||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,buffer$2=[])},3e3)):buffer$2=[]}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(t){const e=currentRenderingInstance;return currentRenderingInstance=t,currentScopeId=t&&t.type.__scopeId||null,e}function pushScopeId(t){currentScopeId=t}function popScopeId(){currentScopeId=null}const withScopeId=t=>withCtx;function withCtx(t,e=currentRenderingInstance,l){if(!e||t._n)return t;const n=(...u)=>{n._d&&setBlockTracking(-1);const c=setCurrentRenderingInstance(e);let y;try{y=t(...u)}finally{setCurrentRenderingInstance(c),n._d&&setBlockTracking(1)}return y};return n._n=!0,n._c=!0,n._d=!0,n}function withDirectives(t,e){if(currentRenderingInstance===null)return t;const l=getComponentPublicInstance(currentRenderingInstance),n=t.dirs||(t.dirs=[]);for(let u=0;ut.__isTeleport,isTeleportDisabled=t=>t&&(t.disabled||t.disabled===""),isTeleportDeferred=t=>t&&(t.defer||t.defer===""),isTargetSVG=t=>typeof SVGElement<"u"&&t instanceof SVGElement,isTargetMathML=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,resolveTarget=(t,e)=>{const l=t&&t.to;return isString$2(l)?e?e(l):null:l},TeleportImpl={name:"Teleport",__isTeleport:!0,process(t,e,l,n,u,c,y,b,m,O){const{mc:N,pc:L,pbc:G,o:{insert:q,querySelector:J,createText:fe,createComment:ve}}=O,ne=isTeleportDisabled(e.props);let{shapeFlag:Ue,children:De,dynamicChildren:Ve}=e;if(t==null){const rt=e.el=fe(""),Ae=e.anchor=fe("");q(rt,l,n),q(Ae,l,n);const Te=(ie,ue)=>{Ue&16&&(u&&u.isCE&&(u.ce._teleportTarget=ie),N(De,ie,ue,u,c,y,b,m))},Xe=()=>{const ie=e.target=resolveTarget(e.props,J),ue=prepareAnchor(ie,e,fe,q);ie&&(y!=="svg"&&isTargetSVG(ie)?y="svg":y!=="mathml"&&isTargetMathML(ie)&&(y="mathml"),ne||(Te(ie,ue),updateCssVars(e)))};ne&&(Te(l,Ae),updateCssVars(e)),isTeleportDeferred(e.props)?queuePostRenderEffect(Xe,c):Xe()}else{e.el=t.el,e.targetStart=t.targetStart;const rt=e.anchor=t.anchor,Ae=e.target=t.target,Te=e.targetAnchor=t.targetAnchor,Xe=isTeleportDisabled(t.props),ie=Xe?l:Ae,ue=Xe?rt:Te;if(y==="svg"||isTargetSVG(Ae)?y="svg":(y==="mathml"||isTargetMathML(Ae))&&(y="mathml"),Ve?(G(t.dynamicChildren,Ve,ie,u,c,y,b),traverseStaticChildren(t,e,!0)):m||L(t,e,ie,ue,u,c,y,b,!1),ne)Xe?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):moveTeleport(e,l,rt,O,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const pt=e.target=resolveTarget(e.props,J);pt&&moveTeleport(e,pt,null,O,0)}else Xe&&moveTeleport(e,Ae,Te,O,1);updateCssVars(e)}},remove(t,e,l,{um:n,o:{remove:u}},c){const{shapeFlag:y,children:b,anchor:m,targetStart:O,targetAnchor:N,target:L,props:G}=t;if(L&&(u(O),u(N)),c&&u(m),y&16){const q=c||!isTeleportDisabled(G);for(let J=0;J{t.isMounted=!0}),onBeforeUnmount(()=>{t.isUnmounting=!0}),t}const TransitionHookValidator=[Function,Array],BaseTransitionPropsValidators={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:TransitionHookValidator,onEnter:TransitionHookValidator,onAfterEnter:TransitionHookValidator,onEnterCancelled:TransitionHookValidator,onBeforeLeave:TransitionHookValidator,onLeave:TransitionHookValidator,onAfterLeave:TransitionHookValidator,onLeaveCancelled:TransitionHookValidator,onBeforeAppear:TransitionHookValidator,onAppear:TransitionHookValidator,onAfterAppear:TransitionHookValidator,onAppearCancelled:TransitionHookValidator},recursiveGetSubtree=t=>{const e=t.subTree;return e.component?recursiveGetSubtree(e.component):e},BaseTransitionImpl={name:"BaseTransition",props:BaseTransitionPropsValidators,setup(t,{slots:e}){const l=getCurrentInstance$1(),n=useTransitionState();return()=>{const u=e.default&&getTransitionRawChildren(e.default(),!0);if(!u||!u.length)return;const c=findNonCommentChild(u),y=toRaw(t),{mode:b}=y;if(n.isLeaving)return emptyPlaceholder(c);const m=getInnerChild$1(c);if(!m)return emptyPlaceholder(c);let O=resolveTransitionHooks(m,y,n,l,G=>O=G);m.type!==Comment&&setTransitionHooks(m,O);const N=l.subTree,L=N&&getInnerChild$1(N);if(L&&L.type!==Comment&&!isSameVNodeType(m,L)&&recursiveGetSubtree(l).type!==Comment){const G=resolveTransitionHooks(L,y,n,l);if(setTransitionHooks(L,G),b==="out-in"&&m.type!==Comment)return n.isLeaving=!0,G.afterLeave=()=>{n.isLeaving=!1,l.job.flags&8||l.update(),delete G.afterLeave},emptyPlaceholder(c);b==="in-out"&&m.type!==Comment&&(G.delayLeave=(q,J,fe)=>{const ve=getLeavingNodesForType(n,L);ve[String(L.key)]=L,q[leaveCbKey]=()=>{J(),q[leaveCbKey]=void 0,delete O.delayedLeave},O.delayedLeave=fe})}return c}}};function findNonCommentChild(t){let e=t[0];if(t.length>1){for(const l of t)if(l.type!==Comment){e=l;break}}return e}const BaseTransition=BaseTransitionImpl;function getLeavingNodesForType(t,e){const{leavingVNodes:l}=t;let n=l.get(e.type);return n||(n=Object.create(null),l.set(e.type,n)),n}function resolveTransitionHooks(t,e,l,n,u){const{appear:c,mode:y,persisted:b=!1,onBeforeEnter:m,onEnter:O,onAfterEnter:N,onEnterCancelled:L,onBeforeLeave:G,onLeave:q,onAfterLeave:J,onLeaveCancelled:fe,onBeforeAppear:ve,onAppear:ne,onAfterAppear:Ue,onAppearCancelled:De}=e,Ve=String(t.key),rt=getLeavingNodesForType(l,t),Ae=(ie,ue)=>{ie&&callWithAsyncErrorHandling(ie,n,9,ue)},Te=(ie,ue)=>{const pt=ue[1];Ae(ie,ue),isArray$3(ie)?ie.every(mt=>mt.length<=1)&&pt():ie.length<=1&&pt()},Xe={mode:y,persisted:b,beforeEnter(ie){let ue=m;if(!l.isMounted)if(c)ue=ve||m;else return;ie[leaveCbKey]&&ie[leaveCbKey](!0);const pt=rt[Ve];pt&&isSameVNodeType(t,pt)&&pt.el[leaveCbKey]&&pt.el[leaveCbKey](),Ae(ue,[ie])},enter(ie){let ue=O,pt=N,mt=L;if(!l.isMounted)if(c)ue=ne||O,pt=Ue||N,mt=De||L;else return;let Tt=!1;const kt=ie[enterCbKey$1]=It=>{Tt||(Tt=!0,It?Ae(mt,[ie]):Ae(pt,[ie]),Xe.delayedLeave&&Xe.delayedLeave(),ie[enterCbKey$1]=void 0)};ue?Te(ue,[ie,kt]):kt()},leave(ie,ue){const pt=String(t.key);if(ie[enterCbKey$1]&&ie[enterCbKey$1](!0),l.isUnmounting)return ue();Ae(G,[ie]);let mt=!1;const Tt=ie[leaveCbKey]=kt=>{mt||(mt=!0,ue(),kt?Ae(fe,[ie]):Ae(J,[ie]),ie[leaveCbKey]=void 0,rt[pt]===t&&delete rt[pt])};rt[pt]=t,q?Te(q,[ie,Tt]):Tt()},clone(ie){const ue=resolveTransitionHooks(ie,e,l,n,u);return u&&u(ue),ue}};return Xe}function emptyPlaceholder(t){if(isKeepAlive(t))return t=cloneVNode(t),t.children=null,t}function getInnerChild$1(t){if(!isKeepAlive(t))return isTeleport(t.type)&&t.children?findNonCommentChild(t.children):t;const{shapeFlag:e,children:l}=t;if(l){if(e&16)return l[0];if(e&32&&isFunction$2(l.default))return l.default()}}function setTransitionHooks(t,e){t.shapeFlag&6&&t.component?(t.transition=e,setTransitionHooks(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function getTransitionRawChildren(t,e=!1,l){let n=[],u=0;for(let c=0;c1)for(let c=0;cl.value,set:c=>l.value=c})}return l}function setRef(t,e,l,n,u=!1){if(isArray$3(t)){t.forEach((J,fe)=>setRef(J,e&&(isArray$3(e)?e[fe]:e),l,n,u));return}if(isAsyncWrapper(n)&&!u)return;const c=n.shapeFlag&4?getComponentPublicInstance(n.component):n.el,y=u?null:c,{i:b,r:m}=t,O=e&&e.r,N=b.refs===EMPTY_OBJ?b.refs={}:b.refs,L=b.setupState,G=toRaw(L),q=L===EMPTY_OBJ?()=>!1:J=>hasOwn(G,J);if(O!=null&&O!==m&&(isString$2(O)?(N[O]=null,q(O)&&(L[O]=null)):isRef(O)&&(O.value=null)),isFunction$2(m))callWithErrorHandling(m,b,12,[y,N]);else{const J=isString$2(m),fe=isRef(m);if(J||fe){const ve=()=>{if(t.f){const ne=J?q(m)?L[m]:N[m]:m.value;u?isArray$3(ne)&&remove(ne,c):isArray$3(ne)?ne.includes(c)||ne.push(c):J?(N[m]=[c],q(m)&&(L[m]=N[m])):(m.value=[c],t.k&&(N[t.k]=m.value))}else J?(N[m]=y,q(m)&&(L[m]=y)):fe&&(m.value=y,t.k&&(N[t.k]=y))};y?(ve.id=-1,queuePostRenderEffect(ve,l)):ve()}}}let hasLoggedMismatchError=!1;const logMismatchError=()=>{hasLoggedMismatchError||(console.error("Hydration completed but contains mismatches."),hasLoggedMismatchError=!0)},isSVGContainer=t=>t.namespaceURI.includes("svg")&&t.tagName!=="foreignObject",isMathMLContainer=t=>t.namespaceURI.includes("MathML"),getContainerType=t=>{if(t.nodeType===1){if(isSVGContainer(t))return"svg";if(isMathMLContainer(t))return"mathml"}},isComment=t=>t.nodeType===8;function createHydrationFunctions(t){const{mt:e,p:l,o:{patchProp:n,createText:u,nextSibling:c,parentNode:y,remove:b,insert:m,createComment:O}}=t,N=(De,Ve)=>{if(!Ve.hasChildNodes()){l(null,De,Ve),flushPostFlushCbs(),Ve._vnode=De;return}L(Ve.firstChild,De,null,null,null),flushPostFlushCbs(),Ve._vnode=De},L=(De,Ve,rt,Ae,Te,Xe=!1)=>{Xe=Xe||!!Ve.dynamicChildren;const ie=isComment(De)&&De.data==="[",ue=()=>fe(De,Ve,rt,Ae,Te,ie),{type:pt,ref:mt,shapeFlag:Tt,patchFlag:kt}=Ve;let It=De.nodeType;Ve.el=De,kt===-2&&(Xe=!1,Ve.dynamicChildren=null);let nn=null;switch(pt){case Text:It!==3?Ve.children===""?(m(Ve.el=u(""),y(De),De),nn=De):nn=ue():(De.data!==Ve.children&&(logMismatchError(),De.data=Ve.children),nn=c(De));break;case Comment:Ue(De)?(nn=c(De),ne(Ve.el=De.content.firstChild,De,rt)):It!==8||ie?nn=ue():nn=c(De);break;case Static:if(ie&&(De=c(De),It=De.nodeType),It===1||It===3){nn=De;const tn=!Ve.children.length;for(let pn=0;pn{Xe=Xe||!!Ve.dynamicChildren;const{type:ie,props:ue,patchFlag:pt,shapeFlag:mt,dirs:Tt,transition:kt}=Ve,It=ie==="input"||ie==="option";if(It||pt!==-1){Tt&&invokeDirectiveHook(Ve,null,rt,"created");let nn=!1;if(Ue(De)){nn=needTransition(Ae,kt)&&rt&&rt.vnode.props&&rt.vnode.props.appear;const pn=De.content.firstChild;nn&&kt.beforeEnter(pn),ne(pn,De,rt),Ve.el=De=pn}if(mt&16&&!(ue&&(ue.innerHTML||ue.textContent))){let pn=q(De.firstChild,Ve,De,rt,Ae,Te,Xe);for(;pn;){isMismatchAllowed(De,1)||logMismatchError();const _n=pn;pn=pn.nextSibling,b(_n)}}else if(mt&8){let pn=Ve.children;pn[0]===` `&&(De.tagName==="PRE"||De.tagName==="TEXTAREA")&&(pn=pn.slice(1)),De.textContent!==pn&&(isMismatchAllowed(De,0)||logMismatchError(),De.textContent=Ve.children)}if(ue){if(It||!Xe||pt&48){const pn=De.tagName.includes("-");for(const _n in ue)(It&&(_n.endsWith("value")||_n==="indeterminate")||isOn$1(_n)&&!isReservedProp(_n)||_n[0]==="."||pn)&&n(De,_n,null,ue[_n],void 0,rt)}else if(ue.onClick)n(De,"onClick",null,ue.onClick,void 0,rt);else if(pt&4&&isReactive(ue.style))for(const pn in ue.style)ue.style[pn]}let tn;(tn=ue&&ue.onVnodeBeforeMount)&&invokeVNodeHook(tn,rt,Ve),Tt&&invokeDirectiveHook(Ve,null,rt,"beforeMount"),((tn=ue&&ue.onVnodeMounted)||Tt||nn)&&queueEffectWithSuspense(()=>{tn&&invokeVNodeHook(tn,rt,Ve),nn&&kt.enter(De),Tt&&invokeDirectiveHook(Ve,null,rt,"mounted")},Ae)}return De.nextSibling},q=(De,Ve,rt,Ae,Te,Xe,ie)=>{ie=ie||!!Ve.dynamicChildren;const ue=Ve.children,pt=ue.length;for(let mt=0;mt{const{slotScopeIds:ie}=Ve;ie&&(Te=Te?Te.concat(ie):ie);const ue=y(De),pt=q(c(De),Ve,ue,rt,Ae,Te,Xe);return pt&&isComment(pt)&&pt.data==="]"?c(Ve.anchor=pt):(logMismatchError(),m(Ve.anchor=O("]"),ue,pt),pt)},fe=(De,Ve,rt,Ae,Te,Xe)=>{if(isMismatchAllowed(De.parentElement,1)||logMismatchError(),Ve.el=null,Xe){const pt=ve(De);for(;;){const mt=c(De);if(mt&&mt!==pt)b(mt);else break}}const ie=c(De),ue=y(De);return b(De),l(null,Ve,ue,ie,rt,Ae,getContainerType(ue),Te),ie},ve=(De,Ve="[",rt="]")=>{let Ae=0;for(;De;)if(De=c(De),De&&isComment(De)&&(De.data===Ve&&Ae++,De.data===rt)){if(Ae===0)return c(De);Ae--}return De},ne=(De,Ve,rt)=>{const Ae=Ve.parentNode;Ae&&Ae.replaceChild(De,Ve);let Te=rt;for(;Te;)Te.vnode.el===Ve&&(Te.vnode.el=Te.subTree.el=De),Te=Te.parent},Ue=De=>De.nodeType===1&&De.tagName==="TEMPLATE";return[N,L]}const allowMismatchAttr="data-allow-mismatch",MismatchTypeString={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function isMismatchAllowed(t,e){if(e===0||e===1)for(;t&&!t.hasAttribute(allowMismatchAttr);)t=t.parentElement;const l=t&&t.getAttribute(allowMismatchAttr);if(l==null)return!1;if(l==="")return!0;{const n=l.split(",");return e===0&&n.includes("children")?!0:l.split(",").includes(MismatchTypeString[e])}}const hydrateOnIdle=(t=1e4)=>e=>{const l=requestIdleCallback(e,{timeout:t});return()=>cancelIdleCallback(l)},hydrateOnVisible=t=>(e,l)=>{const n=new IntersectionObserver(u=>{for(const c of u)if(c.isIntersecting){n.disconnect(),e();break}},t);return l(u=>n.observe(u)),()=>n.disconnect()},hydrateOnMediaQuery=t=>e=>{if(t){const l=matchMedia(t);if(l.matches)e();else return l.addEventListener("change",e,{once:!0}),()=>l.removeEventListener("change",e)}},hydrateOnInteraction=(t=[])=>(e,l)=>{isString$2(t)&&(t=[t]);let n=!1;const u=y=>{n||(n=!0,c(),e(),y.target.dispatchEvent(new y.constructor(y.type,y)))},c=()=>{l(y=>{for(const b of t)y.removeEventListener(b,u)})};return l(y=>{for(const b of t)y.addEventListener(b,u,{once:!0})}),c};function forEachElement(t,e){if(isComment(t)&&t.data==="["){let l=1,n=t.nextSibling;for(;n;){if(n.nodeType===1)e(n);else if(isComment(n))if(n.data==="]"){if(--l===0)break}else n.data==="["&&l++;n=n.nextSibling}}else e(t)}const isAsyncWrapper=t=>!!t.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function defineAsyncComponent(t){isFunction$2(t)&&(t={loader:t});const{loader:e,loadingComponent:l,errorComponent:n,delay:u=200,hydrate:c,timeout:y,suspensible:b=!0,onError:m}=t;let O=null,N,L=0;const G=()=>(L++,O=null,q()),q=()=>{let J;return O||(J=O=e().catch(fe=>{if(fe=fe instanceof Error?fe:new Error(String(fe)),m)return new Promise((ve,ne)=>{m(fe,()=>ve(G()),()=>ne(fe),L+1)});throw fe}).then(fe=>J!==O&&O?O:(fe&&(fe.__esModule||fe[Symbol.toStringTag]==="Module")&&(fe=fe.default),N=fe,fe)))};return defineComponent$1({name:"AsyncComponentWrapper",__asyncLoader:q,__asyncHydrate(J,fe,ve){const ne=c?()=>{const Ue=c(ve,De=>forEachElement(J,De));Ue&&(fe.bum||(fe.bum=[])).push(Ue)}:ve;N?ne():q().then(()=>!fe.isUnmounted&&ne())},get __asyncResolved(){return N},setup(){const J=currentInstance;if(markAsyncBoundary(J),N)return()=>createInnerComp(N,J);const fe=De=>{O=null,handleError(De,J,13,!n)};if(b&&J.suspense||isInSSRComponentSetup)return q().then(De=>()=>createInnerComp(De,J)).catch(De=>(fe(De),()=>n?createVNode(n,{error:De}):null));const ve=ref(!1),ne=ref(),Ue=ref(!!u);return u&&setTimeout(()=>{Ue.value=!1},u),y!=null&&setTimeout(()=>{if(!ve.value&&!ne.value){const De=new Error(`Async component timed out after ${y}ms.`);fe(De),ne.value=De}},y),q().then(()=>{ve.value=!0,J.parent&&isKeepAlive(J.parent.vnode)&&J.parent.update()}).catch(De=>{fe(De),ne.value=De}),()=>{if(ve.value&&N)return createInnerComp(N,J);if(ne.value&&n)return createVNode(n,{error:ne.value});if(l&&!Ue.value)return createVNode(l)}}})}function createInnerComp(t,e){const{ref:l,props:n,children:u,ce:c}=e.vnode,y=createVNode(t,n,u);return y.ref=l,y.ce=c,delete e.vnode.ce,y}const isKeepAlive=t=>t.type.__isKeepAlive,KeepAliveImpl={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(t,{slots:e}){const l=getCurrentInstance$1(),n=l.ctx;if(!n.renderer)return()=>{const Ue=e.default&&e.default();return Ue&&Ue.length===1?Ue[0]:Ue};const u=new Map,c=new Set;let y=null;const b=l.suspense,{renderer:{p:m,m:O,um:N,o:{createElement:L}}}=n,G=L("div");n.activate=(Ue,De,Ve,rt,Ae)=>{const Te=Ue.component;O(Ue,De,Ve,0,b),m(Te.vnode,Ue,De,Ve,Te,b,rt,Ue.slotScopeIds,Ae),queuePostRenderEffect(()=>{Te.isDeactivated=!1,Te.a&&invokeArrayFns(Te.a);const Xe=Ue.props&&Ue.props.onVnodeMounted;Xe&&invokeVNodeHook(Xe,Te.parent,Ue)},b)},n.deactivate=Ue=>{const De=Ue.component;invalidateMount(De.m),invalidateMount(De.a),O(Ue,G,null,1,b),queuePostRenderEffect(()=>{De.da&&invokeArrayFns(De.da);const Ve=Ue.props&&Ue.props.onVnodeUnmounted;Ve&&invokeVNodeHook(Ve,De.parent,Ue),De.isDeactivated=!0},b)};function q(Ue){resetShapeFlag(Ue),N(Ue,l,b,!0)}function J(Ue){u.forEach((De,Ve)=>{const rt=getComponentName(De.type);rt&&!Ue(rt)&&fe(Ve)})}function fe(Ue){const De=u.get(Ue);De&&(!y||!isSameVNodeType(De,y))?q(De):y&&resetShapeFlag(y),u.delete(Ue),c.delete(Ue)}watch(()=>[t.include,t.exclude],([Ue,De])=>{Ue&&J(Ve=>matches(Ue,Ve)),De&&J(Ve=>!matches(De,Ve))},{flush:"post",deep:!0});let ve=null;const ne=()=>{ve!=null&&(isSuspense(l.subTree.type)?queuePostRenderEffect(()=>{u.set(ve,getInnerChild(l.subTree))},l.subTree.suspense):u.set(ve,getInnerChild(l.subTree)))};return onMounted(ne),onUpdated(ne),onBeforeUnmount(()=>{u.forEach(Ue=>{const{subTree:De,suspense:Ve}=l,rt=getInnerChild(De);if(Ue.type===rt.type&&Ue.key===rt.key){resetShapeFlag(rt);const Ae=rt.component.da;Ae&&queuePostRenderEffect(Ae,Ve);return}q(Ue)})}),()=>{if(ve=null,!e.default)return y=null;const Ue=e.default(),De=Ue[0];if(Ue.length>1)return y=null,Ue;if(!isVNode(De)||!(De.shapeFlag&4)&&!(De.shapeFlag&128))return y=null,De;let Ve=getInnerChild(De);if(Ve.type===Comment)return y=null,Ve;const rt=Ve.type,Ae=getComponentName(isAsyncWrapper(Ve)?Ve.type.__asyncResolved||{}:rt),{include:Te,exclude:Xe,max:ie}=t;if(Te&&(!Ae||!matches(Te,Ae))||Xe&&Ae&&matches(Xe,Ae))return Ve.shapeFlag&=-257,y=Ve,De;const ue=Ve.key==null?rt:Ve.key,pt=u.get(ue);return Ve.el&&(Ve=cloneVNode(Ve),De.shapeFlag&128&&(De.ssContent=Ve)),ve=ue,pt?(Ve.el=pt.el,Ve.component=pt.component,Ve.transition&&setTransitionHooks(Ve,Ve.transition),Ve.shapeFlag|=512,c.delete(ue),c.add(ue)):(c.add(ue),ie&&c.size>parseInt(ie,10)&&fe(c.values().next().value)),Ve.shapeFlag|=256,y=Ve,isSuspense(De.type)?De:Ve}}},KeepAlive=KeepAliveImpl;function matches(t,e){return isArray$3(t)?t.some(l=>matches(l,e)):isString$2(t)?t.split(",").includes(e):isRegExp$1(t)?(t.lastIndex=0,t.test(e)):!1}function onActivated(t,e){registerKeepAliveHook(t,"a",e)}function onDeactivated(t,e){registerKeepAliveHook(t,"da",e)}function registerKeepAliveHook(t,e,l=currentInstance){const n=t.__wdc||(t.__wdc=()=>{let u=l;for(;u;){if(u.isDeactivated)return;u=u.parent}return t()});if(injectHook(e,n,l),l){let u=l.parent;for(;u&&u.parent;)isKeepAlive(u.parent.vnode)&&injectToKeepAliveRoot(n,e,l,u),u=u.parent}}function injectToKeepAliveRoot(t,e,l,n){const u=injectHook(e,t,n,!0);onUnmounted(()=>{remove(n[e],u)},l)}function resetShapeFlag(t){t.shapeFlag&=-257,t.shapeFlag&=-513}function getInnerChild(t){return t.shapeFlag&128?t.ssContent:t}function injectHook(t,e,l=currentInstance,n=!1){if(l){const u=l[t]||(l[t]=[]),c=e.__weh||(e.__weh=(...y)=>{pauseTracking();const b=setCurrentInstance(l),m=callWithAsyncErrorHandling(e,l,t,y);return b(),resetTracking(),m});return n?u.unshift(c):u.push(c),c}}const createHook=t=>(e,l=currentInstance)=>{(!isInSSRComponentSetup||t==="sp")&&injectHook(t,(...n)=>e(...n),l)},onBeforeMount=createHook("bm"),onMounted=createHook("m"),onBeforeUpdate=createHook("bu"),onUpdated=createHook("u"),onBeforeUnmount=createHook("bum"),onUnmounted=createHook("um"),onServerPrefetch=createHook("sp"),onRenderTriggered=createHook("rtg"),onRenderTracked=createHook("rtc");function onErrorCaptured(t,e=currentInstance){injectHook("ec",t,e)}const COMPONENTS="components",DIRECTIVES="directives";function resolveComponent(t,e){return resolveAsset(COMPONENTS,t,!0,e)||t}const NULL_DYNAMIC_COMPONENT=Symbol.for("v-ndc");function resolveDynamicComponent(t){return isString$2(t)?resolveAsset(COMPONENTS,t,!1)||t:t||NULL_DYNAMIC_COMPONENT}function resolveDirective(t){return resolveAsset(DIRECTIVES,t)}function resolveAsset(t,e,l=!0,n=!1){const u=currentRenderingInstance||currentInstance;if(u){const c=u.type;if(t===COMPONENTS){const b=getComponentName(c,!1);if(b&&(b===e||b===camelize(e)||b===capitalize(camelize(e))))return c}const y=resolve(u[t]||c[t],e)||resolve(u.appContext[t],e);return!y&&n?c:y}}function resolve(t,e){return t&&(t[e]||t[camelize(e)]||t[capitalize(camelize(e))])}function renderList(t,e,l,n){let u;const c=l&&l[n],y=isArray$3(t);if(y||isString$2(t)){const b=y&&isReactive(t);let m=!1;b&&(m=!isShallow(t),t=shallowReadArray(t)),u=new Array(t.length);for(let O=0,N=t.length;Oe(b,m,void 0,c&&c[m]));else{const b=Object.keys(t);u=new Array(b.length);for(let m=0,O=b.length;m{const c=n.fn(...u);return c&&(c.key=n.key),c}:n.fn)}return t}function renderSlot(t,e,l={},n,u){if(currentRenderingInstance.ce||currentRenderingInstance.parent&&isAsyncWrapper(currentRenderingInstance.parent)&¤tRenderingInstance.parent.ce)return e!=="default"&&(l.name=e),openBlock(),createBlock(Fragment,null,[createVNode("slot",l,n&&n())],64);let c=t[e];c&&c._c&&(c._d=!1),openBlock();const y=c&&ensureValidVNode$1(c(l)),b=createBlock(Fragment,{key:(l.key||y&&y.key||`_${e}`)+(!y&&n?"_fb":"")},y||(n?n():[]),y&&t._===1?64:-2);return!u&&b.scopeId&&(b.slotScopeIds=[b.scopeId+"-s"]),c&&c._c&&(c._d=!0),b}function ensureValidVNode$1(t){return t.some(e=>isVNode(e)?!(e.type===Comment||e.type===Fragment&&!ensureValidVNode$1(e.children)):!0)?t:null}function toHandlers(t,e){const l={};for(const n in t)l[e&&/[A-Z]/.test(n)?`on:${n}`:toHandlerKey(n)]=t[n];return l}const getPublicInstance=t=>t?isStatefulComponent(t)?getComponentPublicInstance(t):getPublicInstance(t.parent):null,publicPropertiesMap=extend$1(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>getPublicInstance(t.parent),$root:t=>getPublicInstance(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>resolveMergedOptions(t),$forceUpdate:t=>t.f||(t.f=()=>{queueJob(t.update)}),$nextTick:t=>t.n||(t.n=nextTick.bind(t.proxy)),$watch:t=>instanceWatch.bind(t)}),hasSetupBinding=(t,e)=>t!==EMPTY_OBJ&&!t.__isScriptSetup&&hasOwn(t,e),PublicInstanceProxyHandlers={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:l,setupState:n,data:u,props:c,accessCache:y,type:b,appContext:m}=t;let O;if(e[0]!=="$"){const q=y[e];if(q!==void 0)switch(q){case 1:return n[e];case 2:return u[e];case 4:return l[e];case 3:return c[e]}else{if(hasSetupBinding(n,e))return y[e]=1,n[e];if(u!==EMPTY_OBJ&&hasOwn(u,e))return y[e]=2,u[e];if((O=t.propsOptions[0])&&hasOwn(O,e))return y[e]=3,c[e];if(l!==EMPTY_OBJ&&hasOwn(l,e))return y[e]=4,l[e];shouldCacheAccess&&(y[e]=0)}}const N=publicPropertiesMap[e];let L,G;if(N)return e==="$attrs"&&track(t.attrs,"get",""),N(t);if((L=b.__cssModules)&&(L=L[e]))return L;if(l!==EMPTY_OBJ&&hasOwn(l,e))return y[e]=4,l[e];if(G=m.config.globalProperties,hasOwn(G,e))return G[e]},set({_:t},e,l){const{data:n,setupState:u,ctx:c}=t;return hasSetupBinding(u,e)?(u[e]=l,!0):n!==EMPTY_OBJ&&hasOwn(n,e)?(n[e]=l,!0):hasOwn(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(c[e]=l,!0)},has({_:{data:t,setupState:e,accessCache:l,ctx:n,appContext:u,propsOptions:c}},y){let b;return!!l[y]||t!==EMPTY_OBJ&&hasOwn(t,y)||hasSetupBinding(e,y)||(b=c[0])&&hasOwn(b,y)||hasOwn(n,y)||hasOwn(publicPropertiesMap,y)||hasOwn(u.config.globalProperties,y)},defineProperty(t,e,l){return l.get!=null?t._.accessCache[e]=0:hasOwn(l,"value")&&this.set(t,e,l.value,null),Reflect.defineProperty(t,e,l)}},RuntimeCompiledPublicInstanceProxyHandlers=extend$1({},PublicInstanceProxyHandlers,{get(t,e){if(e!==Symbol.unscopables)return PublicInstanceProxyHandlers.get(t,e,t)},has(t,e){return e[0]!=="_"&&!isGloballyAllowed(e)}});function defineProps(){return null}function defineEmits(){return null}function defineExpose(t){}function defineOptions(t){}function defineSlots(){return null}function defineModel(){}function withDefaults(t,e){return null}function useSlots(){return getContext().slots}function useAttrs(){return getContext().attrs}function getContext(){const t=getCurrentInstance$1();return t.setupContext||(t.setupContext=createSetupContext(t))}function normalizePropsOrEmits(t){return isArray$3(t)?t.reduce((e,l)=>(e[l]=null,e),{}):t}function mergeDefaults(t,e){const l=normalizePropsOrEmits(t);for(const n in e){if(n.startsWith("__skip"))continue;let u=l[n];u?isArray$3(u)||isFunction$2(u)?u=l[n]={type:u,default:e[n]}:u.default=e[n]:u===null&&(u=l[n]={default:e[n]}),u&&e[`__skip_${n}`]&&(u.skipFactory=!0)}return l}function mergeModels(t,e){return!t||!e?t||e:isArray$3(t)&&isArray$3(e)?t.concat(e):extend$1({},normalizePropsOrEmits(t),normalizePropsOrEmits(e))}function createPropsRestProxy(t,e){const l={};for(const n in t)e.includes(n)||Object.defineProperty(l,n,{enumerable:!0,get:()=>t[n]});return l}function withAsyncContext(t){const e=getCurrentInstance$1();let l=t();return unsetCurrentInstance(),isPromise$2(l)&&(l=l.catch(n=>{throw setCurrentInstance(e),n})),[l,()=>setCurrentInstance(e)]}let shouldCacheAccess=!0;function applyOptions(t){const e=resolveMergedOptions(t),l=t.proxy,n=t.ctx;shouldCacheAccess=!1,e.beforeCreate&&callHook$1(e.beforeCreate,t,"bc");const{data:u,computed:c,methods:y,watch:b,provide:m,inject:O,created:N,beforeMount:L,mounted:G,beforeUpdate:q,updated:J,activated:fe,deactivated:ve,beforeDestroy:ne,beforeUnmount:Ue,destroyed:De,unmounted:Ve,render:rt,renderTracked:Ae,renderTriggered:Te,errorCaptured:Xe,serverPrefetch:ie,expose:ue,inheritAttrs:pt,components:mt,directives:Tt,filters:kt}=e;if(O&&resolveInjections(O,n,null),y)for(const tn in y){const pn=y[tn];isFunction$2(pn)&&(n[tn]=pn.bind(l))}if(u){const tn=u.call(l,l);isObject$2(tn)&&(t.data=reactive(tn))}if(shouldCacheAccess=!0,c)for(const tn in c){const pn=c[tn],_n=isFunction$2(pn)?pn.bind(l,l):isFunction$2(pn.get)?pn.get.bind(l,l):NOOP,Dn=!isFunction$2(pn)&&isFunction$2(pn.set)?pn.set.bind(l):NOOP,an=computed({get:_n,set:Dn});Object.defineProperty(n,tn,{enumerable:!0,configurable:!0,get:()=>an.value,set:Rn=>an.value=Rn})}if(b)for(const tn in b)createWatcher(b[tn],n,l,tn);if(m){const tn=isFunction$2(m)?m.call(l):m;Reflect.ownKeys(tn).forEach(pn=>{provide(pn,tn[pn])})}N&&callHook$1(N,t,"c");function nn(tn,pn){isArray$3(pn)?pn.forEach(_n=>tn(_n.bind(l))):pn&&tn(pn.bind(l))}if(nn(onBeforeMount,L),nn(onMounted,G),nn(onBeforeUpdate,q),nn(onUpdated,J),nn(onActivated,fe),nn(onDeactivated,ve),nn(onErrorCaptured,Xe),nn(onRenderTracked,Ae),nn(onRenderTriggered,Te),nn(onBeforeUnmount,Ue),nn(onUnmounted,Ve),nn(onServerPrefetch,ie),isArray$3(ue))if(ue.length){const tn=t.exposed||(t.exposed={});ue.forEach(pn=>{Object.defineProperty(tn,pn,{get:()=>l[pn],set:_n=>l[pn]=_n})})}else t.exposed||(t.exposed={});rt&&t.render===NOOP&&(t.render=rt),pt!=null&&(t.inheritAttrs=pt),mt&&(t.components=mt),Tt&&(t.directives=Tt),ie&&markAsyncBoundary(t)}function resolveInjections(t,e,l=NOOP){isArray$3(t)&&(t=normalizeInject(t));for(const n in t){const u=t[n];let c;isObject$2(u)?"default"in u?c=inject$1(u.from||n,u.default,!0):c=inject$1(u.from||n):c=inject$1(u),isRef(c)?Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:()=>c.value,set:y=>c.value=y}):e[n]=c}}function callHook$1(t,e,l){callWithAsyncErrorHandling(isArray$3(t)?t.map(n=>n.bind(e.proxy)):t.bind(e.proxy),e,l)}function createWatcher(t,e,l,n){let u=n.includes(".")?createPathGetter(l,n):()=>l[n];if(isString$2(t)){const c=e[t];isFunction$2(c)&&watch(u,c)}else if(isFunction$2(t))watch(u,t.bind(l));else if(isObject$2(t))if(isArray$3(t))t.forEach(c=>createWatcher(c,e,l,n));else{const c=isFunction$2(t.handler)?t.handler.bind(l):e[t.handler];isFunction$2(c)&&watch(u,c,t)}}function resolveMergedOptions(t){const e=t.type,{mixins:l,extends:n}=e,{mixins:u,optionsCache:c,config:{optionMergeStrategies:y}}=t.appContext,b=c.get(e);let m;return b?m=b:!u.length&&!l&&!n?m=e:(m={},u.length&&u.forEach(O=>mergeOptions(m,O,y,!0)),mergeOptions(m,e,y)),isObject$2(e)&&c.set(e,m),m}function mergeOptions(t,e,l,n=!1){const{mixins:u,extends:c}=e;c&&mergeOptions(t,c,l,!0),u&&u.forEach(y=>mergeOptions(t,y,l,!0));for(const y in e)if(!(n&&y==="expose")){const b=internalOptionMergeStrats[y]||l&&l[y];t[y]=b?b(t[y],e[y]):e[y]}return t}const internalOptionMergeStrats={data:mergeDataFn,props:mergeEmitsOrPropsOptions,emits:mergeEmitsOrPropsOptions,methods:mergeObjectOptions,computed:mergeObjectOptions,beforeCreate:mergeAsArray,created:mergeAsArray,beforeMount:mergeAsArray,mounted:mergeAsArray,beforeUpdate:mergeAsArray,updated:mergeAsArray,beforeDestroy:mergeAsArray,beforeUnmount:mergeAsArray,destroyed:mergeAsArray,unmounted:mergeAsArray,activated:mergeAsArray,deactivated:mergeAsArray,errorCaptured:mergeAsArray,serverPrefetch:mergeAsArray,components:mergeObjectOptions,directives:mergeObjectOptions,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(t,e){return e?t?function(){return extend$1(isFunction$2(t)?t.call(this,this):t,isFunction$2(e)?e.call(this,this):e)}:e:t}function mergeInject(t,e){return mergeObjectOptions(normalizeInject(t),normalizeInject(e))}function normalizeInject(t){if(isArray$3(t)){const e={};for(let l=0;l1)return l&&isFunction$2(e)?e.call(n&&n.proxy):e}}function hasInjectionContext(){return!!(currentInstance||currentRenderingInstance||currentApp)}const internalObjectProto={},createInternalObject=()=>Object.create(internalObjectProto),isInternalObject=t=>Object.getPrototypeOf(t)===internalObjectProto;function initProps(t,e,l,n=!1){const u={},c=createInternalObject();t.propsDefaults=Object.create(null),setFullProps(t,e,u,c);for(const y in t.propsOptions[0])y in u||(u[y]=void 0);l?t.props=n?u:shallowReactive(u):t.type.props?t.props=u:t.props=c,t.attrs=c}function updateProps(t,e,l,n){const{props:u,attrs:c,vnode:{patchFlag:y}}=t,b=toRaw(u),[m]=t.propsOptions;let O=!1;if((n||y>0)&&!(y&16)){if(y&8){const N=t.vnode.dynamicProps;for(let L=0;L{m=!0;const[G,q]=normalizePropsOptions(L,e,!0);extend$1(y,G),q&&b.push(...q)};!l&&e.mixins.length&&e.mixins.forEach(N),t.extends&&N(t.extends),t.mixins&&t.mixins.forEach(N)}if(!c&&!m)return isObject$2(t)&&n.set(t,EMPTY_ARR),EMPTY_ARR;if(isArray$3(c))for(let N=0;Nt[0]==="_"||t==="$stable",normalizeSlotValue=t=>isArray$3(t)?t.map(normalizeVNode):[normalizeVNode(t)],normalizeSlot=(t,e,l)=>{if(e._n)return e;const n=withCtx((...u)=>normalizeSlotValue(e(...u)),l);return n._c=!1,n},normalizeObjectSlots=(t,e,l)=>{const n=t._ctx;for(const u in t){if(isInternalKey(u))continue;const c=t[u];if(isFunction$2(c))e[u]=normalizeSlot(u,c,n);else if(c!=null){const y=normalizeSlotValue(c);e[u]=()=>y}}},normalizeVNodeSlots=(t,e)=>{const l=normalizeSlotValue(e);t.slots.default=()=>l},assignSlots=(t,e,l)=>{for(const n in e)(l||n!=="_")&&(t[n]=e[n])},initSlots=(t,e,l)=>{const n=t.slots=createInternalObject();if(t.vnode.shapeFlag&32){const u=e._;u?(assignSlots(n,e,l),l&&def(n,"_",u,!0)):normalizeObjectSlots(e,n)}else e&&normalizeVNodeSlots(t,e)},updateSlots=(t,e,l)=>{const{vnode:n,slots:u}=t;let c=!0,y=EMPTY_OBJ;if(n.shapeFlag&32){const b=e._;b?l&&b===1?c=!1:assignSlots(u,e,l):(c=!e.$stable,normalizeObjectSlots(e,u)),y=e}else e&&(normalizeVNodeSlots(t,e),y={default:1});if(c)for(const b in u)!isInternalKey(b)&&y[b]==null&&delete u[b]},queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(t){return baseCreateRenderer(t)}function createHydrationRenderer(t){return baseCreateRenderer(t,createHydrationFunctions)}function baseCreateRenderer(t,e){const l=getGlobalThis();l.__VUE__=!0;const{insert:n,remove:u,patchProp:c,createElement:y,createText:b,createComment:m,setText:O,setElementText:N,parentNode:L,nextSibling:G,setScopeId:q=NOOP,insertStaticContent:J}=t,fe=(Vn,Yn,Vr,xi=null,Si=null,qn=null,ia=void 0,Wi=null,ha=!!Yn.dynamicChildren)=>{if(Vn===Yn)return;Vn&&!isSameVNodeType(Vn,Yn)&&(xi=$n(Vn),Rn(Vn,Si,qn,!0),Vn=null),Yn.patchFlag===-2&&(ha=!1,Yn.dynamicChildren=null);const{type:ai,ref:Ia,shapeFlag:fi}=Yn;switch(ai){case Text:ve(Vn,Yn,Vr,xi);break;case Comment:ne(Vn,Yn,Vr,xi);break;case Static:Vn==null&&Ue(Yn,Vr,xi,ia);break;case Fragment:mt(Vn,Yn,Vr,xi,Si,qn,ia,Wi,ha);break;default:fi&1?rt(Vn,Yn,Vr,xi,Si,qn,ia,Wi,ha):fi&6?Tt(Vn,Yn,Vr,xi,Si,qn,ia,Wi,ha):(fi&64||fi&128)&&ai.process(Vn,Yn,Vr,xi,Si,qn,ia,Wi,ha,gn)}Ia!=null&&Si&&setRef(Ia,Vn&&Vn.ref,qn,Yn||Vn,!Yn)},ve=(Vn,Yn,Vr,xi)=>{if(Vn==null)n(Yn.el=b(Yn.children),Vr,xi);else{const Si=Yn.el=Vn.el;Yn.children!==Vn.children&&O(Si,Yn.children)}},ne=(Vn,Yn,Vr,xi)=>{Vn==null?n(Yn.el=m(Yn.children||""),Vr,xi):Yn.el=Vn.el},Ue=(Vn,Yn,Vr,xi)=>{[Vn.el,Vn.anchor]=J(Vn.children,Yn,Vr,xi,Vn.el,Vn.anchor)},De=({el:Vn,anchor:Yn},Vr,xi)=>{let Si;for(;Vn&&Vn!==Yn;)Si=G(Vn),n(Vn,Vr,xi),Vn=Si;n(Yn,Vr,xi)},Ve=({el:Vn,anchor:Yn})=>{let Vr;for(;Vn&&Vn!==Yn;)Vr=G(Vn),u(Vn),Vn=Vr;u(Yn)},rt=(Vn,Yn,Vr,xi,Si,qn,ia,Wi,ha)=>{Yn.type==="svg"?ia="svg":Yn.type==="math"&&(ia="mathml"),Vn==null?Ae(Yn,Vr,xi,Si,qn,ia,Wi,ha):ie(Vn,Yn,Si,qn,ia,Wi,ha)},Ae=(Vn,Yn,Vr,xi,Si,qn,ia,Wi)=>{let ha,ai;const{props:Ia,shapeFlag:fi,transition:An,dirs:sa}=Vn;if(ha=Vn.el=y(Vn.type,qn,Ia&&Ia.is,Ia),fi&8?N(ha,Vn.children):fi&16&&Xe(Vn.children,ha,null,xi,Si,resolveChildrenNamespace(Vn,qn),ia,Wi),sa&&invokeDirectiveHook(Vn,null,xi,"created"),Te(ha,Vn,Vn.scopeId,ia,xi),Ia){for(const fn in Ia)fn!=="value"&&!isReservedProp(fn)&&c(ha,fn,null,Ia[fn],qn,xi);"value"in Ia&&c(ha,"value",null,Ia.value,qn),(ai=Ia.onVnodeBeforeMount)&&invokeVNodeHook(ai,xi,Vn)}sa&&invokeDirectiveHook(Vn,null,xi,"beforeMount");const Nn=needTransition(Si,An);Nn&&An.beforeEnter(ha),n(ha,Yn,Vr),((ai=Ia&&Ia.onVnodeMounted)||Nn||sa)&&queuePostRenderEffect(()=>{ai&&invokeVNodeHook(ai,xi,Vn),Nn&&An.enter(ha),sa&&invokeDirectiveHook(Vn,null,xi,"mounted")},Si)},Te=(Vn,Yn,Vr,xi,Si)=>{if(Vr&&q(Vn,Vr),xi)for(let qn=0;qn{for(let ai=ha;ai{const Wi=Yn.el=Vn.el;let{patchFlag:ha,dynamicChildren:ai,dirs:Ia}=Yn;ha|=Vn.patchFlag&16;const fi=Vn.props||EMPTY_OBJ,An=Yn.props||EMPTY_OBJ;let sa;if(Vr&&toggleRecurse(Vr,!1),(sa=An.onVnodeBeforeUpdate)&&invokeVNodeHook(sa,Vr,Yn,Vn),Ia&&invokeDirectiveHook(Yn,Vn,Vr,"beforeUpdate"),Vr&&toggleRecurse(Vr,!0),(fi.innerHTML&&An.innerHTML==null||fi.textContent&&An.textContent==null)&&N(Wi,""),ai?ue(Vn.dynamicChildren,ai,Wi,Vr,xi,resolveChildrenNamespace(Yn,Si),qn):ia||pn(Vn,Yn,Wi,null,Vr,xi,resolveChildrenNamespace(Yn,Si),qn,!1),ha>0){if(ha&16)pt(Wi,fi,An,Vr,Si);else if(ha&2&&fi.class!==An.class&&c(Wi,"class",null,An.class,Si),ha&4&&c(Wi,"style",fi.style,An.style,Si),ha&8){const Nn=Yn.dynamicProps;for(let fn=0;fn{sa&&invokeVNodeHook(sa,Vr,Yn,Vn),Ia&&invokeDirectiveHook(Yn,Vn,Vr,"updated")},xi)},ue=(Vn,Yn,Vr,xi,Si,qn,ia)=>{for(let Wi=0;Wi{if(Yn!==Vr){if(Yn!==EMPTY_OBJ)for(const qn in Yn)!isReservedProp(qn)&&!(qn in Vr)&&c(Vn,qn,Yn[qn],null,Si,xi);for(const qn in Vr){if(isReservedProp(qn))continue;const ia=Vr[qn],Wi=Yn[qn];ia!==Wi&&qn!=="value"&&c(Vn,qn,Wi,ia,Si,xi)}"value"in Vr&&c(Vn,"value",Yn.value,Vr.value,Si)}},mt=(Vn,Yn,Vr,xi,Si,qn,ia,Wi,ha)=>{const ai=Yn.el=Vn?Vn.el:b(""),Ia=Yn.anchor=Vn?Vn.anchor:b("");let{patchFlag:fi,dynamicChildren:An,slotScopeIds:sa}=Yn;sa&&(Wi=Wi?Wi.concat(sa):sa),Vn==null?(n(ai,Vr,xi),n(Ia,Vr,xi),Xe(Yn.children||[],Vr,Ia,Si,qn,ia,Wi,ha)):fi>0&&fi&64&&An&&Vn.dynamicChildren?(ue(Vn.dynamicChildren,An,Vr,Si,qn,ia,Wi),(Yn.key!=null||Si&&Yn===Si.subTree)&&traverseStaticChildren(Vn,Yn,!0)):pn(Vn,Yn,Vr,Ia,Si,qn,ia,Wi,ha)},Tt=(Vn,Yn,Vr,xi,Si,qn,ia,Wi,ha)=>{Yn.slotScopeIds=Wi,Vn==null?Yn.shapeFlag&512?Si.ctx.activate(Yn,Vr,xi,ia,ha):kt(Yn,Vr,xi,Si,qn,ia,ha):It(Vn,Yn,ha)},kt=(Vn,Yn,Vr,xi,Si,qn,ia)=>{const Wi=Vn.component=createComponentInstance(Vn,xi,Si);if(isKeepAlive(Vn)&&(Wi.ctx.renderer=gn),setupComponent(Wi,!1,ia),Wi.asyncDep){if(Si&&Si.registerDep(Wi,nn,ia),!Vn.el){const ha=Wi.subTree=createVNode(Comment);ne(null,ha,Yn,Vr)}}else nn(Wi,Vn,Yn,Vr,Si,qn,ia)},It=(Vn,Yn,Vr)=>{const xi=Yn.component=Vn.component;if(shouldUpdateComponent(Vn,Yn,Vr))if(xi.asyncDep&&!xi.asyncResolved){tn(xi,Yn,Vr);return}else xi.next=Yn,xi.update();else Yn.el=Vn.el,xi.vnode=Yn},nn=(Vn,Yn,Vr,xi,Si,qn,ia)=>{const Wi=()=>{if(Vn.isMounted){let{next:fi,bu:An,u:sa,parent:Nn,vnode:fn}=Vn;{const bi=locateNonHydratedAsyncRoot(Vn);if(bi){fi&&(fi.el=fn.el,tn(Vn,fi,ia)),bi.asyncDep.then(()=>{Vn.isUnmounted||Wi()});return}}let un=fi,Ln;toggleRecurse(Vn,!1),fi?(fi.el=fn.el,tn(Vn,fi,ia)):fi=fn,An&&invokeArrayFns(An),(Ln=fi.props&&fi.props.onVnodeBeforeUpdate)&&invokeVNodeHook(Ln,Nn,fi,fn),toggleRecurse(Vn,!0);const hr=renderComponentRoot(Vn),hi=Vn.subTree;Vn.subTree=hr,fe(hi,hr,L(hi.el),$n(hi),Vn,Si,qn),fi.el=hr.el,un===null&&updateHOCHostEl(Vn,hr.el),sa&&queuePostRenderEffect(sa,Si),(Ln=fi.props&&fi.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(Ln,Nn,fi,fn),Si)}else{let fi;const{el:An,props:sa}=Yn,{bm:Nn,m:fn,parent:un,root:Ln,type:hr}=Vn,hi=isAsyncWrapper(Yn);if(toggleRecurse(Vn,!1),Nn&&invokeArrayFns(Nn),!hi&&(fi=sa&&sa.onVnodeBeforeMount)&&invokeVNodeHook(fi,un,Yn),toggleRecurse(Vn,!0),An&&Kn){const bi=()=>{Vn.subTree=renderComponentRoot(Vn),Kn(An,Vn.subTree,Vn,Si,null)};hi&&hr.__asyncHydrate?hr.__asyncHydrate(An,Vn,bi):bi()}else{Ln.ce&&Ln.ce._injectChildStyle(hr);const bi=Vn.subTree=renderComponentRoot(Vn);fe(null,bi,Vr,xi,Vn,Si,qn),Yn.el=bi.el}if(fn&&queuePostRenderEffect(fn,Si),!hi&&(fi=sa&&sa.onVnodeMounted)){const bi=Yn;queuePostRenderEffect(()=>invokeVNodeHook(fi,un,bi),Si)}(Yn.shapeFlag&256||un&&isAsyncWrapper(un.vnode)&&un.vnode.shapeFlag&256)&&Vn.a&&queuePostRenderEffect(Vn.a,Si),Vn.isMounted=!0,Yn=Vr=xi=null}};Vn.scope.on();const ha=Vn.effect=new ReactiveEffect(Wi);Vn.scope.off();const ai=Vn.update=ha.run.bind(ha),Ia=Vn.job=ha.runIfDirty.bind(ha);Ia.i=Vn,Ia.id=Vn.uid,ha.scheduler=()=>queueJob(Ia),toggleRecurse(Vn,!0),ai()},tn=(Vn,Yn,Vr)=>{Yn.component=Vn;const xi=Vn.vnode.props;Vn.vnode=Yn,Vn.next=null,updateProps(Vn,Yn.props,xi,Vr),updateSlots(Vn,Yn.children,Vr),pauseTracking(),flushPreFlushCbs(Vn),resetTracking()},pn=(Vn,Yn,Vr,xi,Si,qn,ia,Wi,ha=!1)=>{const ai=Vn&&Vn.children,Ia=Vn?Vn.shapeFlag:0,fi=Yn.children,{patchFlag:An,shapeFlag:sa}=Yn;if(An>0){if(An&128){Dn(ai,fi,Vr,xi,Si,qn,ia,Wi,ha);return}else if(An&256){_n(ai,fi,Vr,xi,Si,qn,ia,Wi,ha);return}}sa&8?(Ia&16&&xn(ai,Si,qn),fi!==ai&&N(Vr,fi)):Ia&16?sa&16?Dn(ai,fi,Vr,xi,Si,qn,ia,Wi,ha):xn(ai,Si,qn,!0):(Ia&8&&N(Vr,""),sa&16&&Xe(fi,Vr,xi,Si,qn,ia,Wi,ha))},_n=(Vn,Yn,Vr,xi,Si,qn,ia,Wi,ha)=>{Vn=Vn||EMPTY_ARR,Yn=Yn||EMPTY_ARR;const ai=Vn.length,Ia=Yn.length,fi=Math.min(ai,Ia);let An;for(An=0;AnIa?xn(Vn,Si,qn,!0,!1,fi):Xe(Yn,Vr,xi,Si,qn,ia,Wi,ha,fi)},Dn=(Vn,Yn,Vr,xi,Si,qn,ia,Wi,ha)=>{let ai=0;const Ia=Yn.length;let fi=Vn.length-1,An=Ia-1;for(;ai<=fi&&ai<=An;){const sa=Vn[ai],Nn=Yn[ai]=ha?cloneIfMounted(Yn[ai]):normalizeVNode(Yn[ai]);if(isSameVNodeType(sa,Nn))fe(sa,Nn,Vr,null,Si,qn,ia,Wi,ha);else break;ai++}for(;ai<=fi&&ai<=An;){const sa=Vn[fi],Nn=Yn[An]=ha?cloneIfMounted(Yn[An]):normalizeVNode(Yn[An]);if(isSameVNodeType(sa,Nn))fe(sa,Nn,Vr,null,Si,qn,ia,Wi,ha);else break;fi--,An--}if(ai>fi){if(ai<=An){const sa=An+1,Nn=saAn)for(;ai<=fi;)Rn(Vn[ai],Si,qn,!0),ai++;else{const sa=ai,Nn=ai,fn=new Map;for(ai=Nn;ai<=An;ai++){const Pi=Yn[ai]=ha?cloneIfMounted(Yn[ai]):normalizeVNode(Yn[ai]);Pi.key!=null&&fn.set(Pi.key,ai)}let un,Ln=0;const hr=An-Nn+1;let hi=!1,bi=0;const Ra=new Array(hr);for(ai=0;ai=hr){Rn(Pi,Si,qn,!0);continue}let oi;if(Pi.key!=null)oi=fn.get(Pi.key);else for(un=Nn;un<=An;un++)if(Ra[un-Nn]===0&&isSameVNodeType(Pi,Yn[un])){oi=un;break}oi===void 0?Rn(Pi,Si,qn,!0):(Ra[oi-Nn]=ai+1,oi>=bi?bi=oi:hi=!0,fe(Pi,Yn[oi],Vr,null,Si,qn,ia,Wi,ha),Ln++)}const so=hi?getSequence(Ra):EMPTY_ARR;for(un=so.length-1,ai=hr-1;ai>=0;ai--){const Pi=Nn+ai,oi=Yn[Pi],Ni=Pi+1{const{el:qn,type:ia,transition:Wi,children:ha,shapeFlag:ai}=Vn;if(ai&6){an(Vn.component.subTree,Yn,Vr,xi);return}if(ai&128){Vn.suspense.move(Yn,Vr,xi);return}if(ai&64){ia.move(Vn,Yn,Vr,gn);return}if(ia===Fragment){n(qn,Yn,Vr);for(let fi=0;fiWi.enter(qn),Si);else{const{leave:fi,delayLeave:An,afterLeave:sa}=Wi,Nn=()=>n(qn,Yn,Vr),fn=()=>{fi(qn,()=>{Nn(),sa&&sa()})};An?An(qn,Nn,fn):fn()}else n(qn,Yn,Vr)},Rn=(Vn,Yn,Vr,xi=!1,Si=!1)=>{const{type:qn,props:ia,ref:Wi,children:ha,dynamicChildren:ai,shapeFlag:Ia,patchFlag:fi,dirs:An,cacheIndex:sa}=Vn;if(fi===-2&&(Si=!1),Wi!=null&&setRef(Wi,null,Vr,Vn,!0),sa!=null&&(Yn.renderCache[sa]=void 0),Ia&256){Yn.ctx.deactivate(Vn);return}const Nn=Ia&1&&An,fn=!isAsyncWrapper(Vn);let un;if(fn&&(un=ia&&ia.onVnodeBeforeUnmount)&&invokeVNodeHook(un,Yn,Vn),Ia&6)hn(Vn.component,Vr,xi);else{if(Ia&128){Vn.suspense.unmount(Vr,xi);return}Nn&&invokeDirectiveHook(Vn,null,Yn,"beforeUnmount"),Ia&64?Vn.type.remove(Vn,Yn,Vr,gn,xi):ai&&!ai.hasOnce&&(qn!==Fragment||fi>0&&fi&64)?xn(ai,Yn,Vr,!1,!0):(qn===Fragment&&fi&384||!Si&&Ia&16)&&xn(ha,Yn,Vr),xi&&Lt(Vn)}(fn&&(un=ia&&ia.onVnodeUnmounted)||Nn)&&queuePostRenderEffect(()=>{un&&invokeVNodeHook(un,Yn,Vn),Nn&&invokeDirectiveHook(Vn,null,Yn,"unmounted")},Vr)},Lt=Vn=>{const{type:Yn,el:Vr,anchor:xi,transition:Si}=Vn;if(Yn===Fragment){wn(Vr,xi);return}if(Yn===Static){Ve(Vn);return}const qn=()=>{u(Vr),Si&&!Si.persisted&&Si.afterLeave&&Si.afterLeave()};if(Vn.shapeFlag&1&&Si&&!Si.persisted){const{leave:ia,delayLeave:Wi}=Si,ha=()=>ia(Vr,qn);Wi?Wi(Vn.el,qn,ha):ha()}else qn()},wn=(Vn,Yn)=>{let Vr;for(;Vn!==Yn;)Vr=G(Vn),u(Vn),Vn=Vr;u(Yn)},hn=(Vn,Yn,Vr)=>{const{bum:xi,scope:Si,job:qn,subTree:ia,um:Wi,m:ha,a:ai}=Vn;invalidateMount(ha),invalidateMount(ai),xi&&invokeArrayFns(xi),Si.stop(),qn&&(qn.flags|=8,Rn(ia,Vn,Yn,Vr)),Wi&&queuePostRenderEffect(Wi,Yn),queuePostRenderEffect(()=>{Vn.isUnmounted=!0},Yn),Yn&&Yn.pendingBranch&&!Yn.isUnmounted&&Vn.asyncDep&&!Vn.asyncResolved&&Vn.suspenseId===Yn.pendingId&&(Yn.deps--,Yn.deps===0&&Yn.resolve())},xn=(Vn,Yn,Vr,xi=!1,Si=!1,qn=0)=>{for(let ia=qn;ia{if(Vn.shapeFlag&6)return $n(Vn.component.subTree);if(Vn.shapeFlag&128)return Vn.suspense.next();const Yn=G(Vn.anchor||Vn.el),Vr=Yn&&Yn[TeleportEndKey];return Vr?G(Vr):Yn};let Xr=!1;const ti=(Vn,Yn,Vr)=>{Vn==null?Yn._vnode&&Rn(Yn._vnode,null,null,!0):fe(Yn._vnode||null,Vn,Yn,null,null,null,Vr),Yn._vnode=Vn,Xr||(Xr=!0,flushPreFlushCbs(),flushPostFlushCbs(),Xr=!1)},gn={p:fe,um:Rn,m:an,r:Lt,mt:kt,mc:Xe,pc:pn,pbc:ue,n:$n,o:t};let Xn,Kn;return e&&([Xn,Kn]=e(gn)),{render:ti,hydrate:Xn,createApp:createAppAPI(ti,Xn)}}function resolveChildrenNamespace({type:t,props:e},l){return l==="svg"&&t==="foreignObject"||l==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:l}function toggleRecurse({effect:t,job:e},l){l?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function needTransition(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function traverseStaticChildren(t,e,l=!1){const n=t.children,u=e.children;if(isArray$3(n)&&isArray$3(u))for(let c=0;c>1,t[l[b]]0&&(e[n]=l[c-1]),l[c]=n)}}for(c=l.length,y=l[c-1];c-- >0;)l[c]=y,y=e[y];return l}function locateNonHydratedAsyncRoot(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:locateNonHydratedAsyncRoot(e)}function invalidateMount(t){if(t)for(let e=0;einject$1(ssrContextKey);function watchEffect(t,e){return doWatch(t,null,e)}function watchPostEffect(t,e){return doWatch(t,null,{flush:"post"})}function watchSyncEffect(t,e){return doWatch(t,null,{flush:"sync"})}function watch(t,e,l){return doWatch(t,e,l)}function doWatch(t,e,l=EMPTY_OBJ){const{immediate:n,deep:u,flush:c,once:y}=l,b=extend$1({},l);let m;if(isInSSRComponentSetup)if(c==="sync"){const G=useSSRContext();m=G.__watcherHandles||(G.__watcherHandles=[])}else if(!e||n)b.once=!0;else{const G=()=>{};return G.stop=NOOP,G.resume=NOOP,G.pause=NOOP,G}const O=currentInstance;b.call=(G,q,J)=>callWithAsyncErrorHandling(G,O,q,J);let N=!1;c==="post"?b.scheduler=G=>{queuePostRenderEffect(G,O&&O.suspense)}:c!=="sync"&&(N=!0,b.scheduler=(G,q)=>{q?G():queueJob(G)}),b.augmentJob=G=>{e&&(G.flags|=4),N&&(G.flags|=2,O&&(G.id=O.uid,G.i=O))};const L=watch$1(t,e,b);return m&&m.push(L),L}function instanceWatch(t,e,l){const n=this.proxy,u=isString$2(t)?t.includes(".")?createPathGetter(n,t):()=>n[t]:t.bind(n,n);let c;isFunction$2(e)?c=e:(c=e.handler,l=e);const y=setCurrentInstance(this),b=doWatch(u,c.bind(n),l);return y(),b}function createPathGetter(t,e){const l=e.split(".");return()=>{let n=t;for(let u=0;u{let N,L=EMPTY_OBJ,G;return watchSyncEffect(()=>{const q=t[e];hasChanged(N,q)&&(N=q,O())}),{get(){return m(),l.get?l.get(N):N},set(q){const J=l.set?l.set(q):q;if(!hasChanged(J,N)&&!(L!==EMPTY_OBJ&&hasChanged(q,L)))return;const fe=n.vnode.props;fe&&(e in fe||u in fe||c in fe)&&(`onUpdate:${e}`in fe||`onUpdate:${u}`in fe||`onUpdate:${c}`in fe)||(N=q,O()),n.emit(`update:${e}`,J),hasChanged(q,J)&&hasChanged(q,L)&&!hasChanged(J,G)&&O(),L=q,G=J}}});return b[Symbol.iterator]=()=>{let m=0;return{next(){return m<2?{value:m++?y||EMPTY_OBJ:b,done:!1}:{done:!0}}}},b}const getModelModifiers=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${camelize(e)}Modifiers`]||t[`${hyphenate(e)}Modifiers`];function emit(t,e,...l){if(t.isUnmounted)return;const n=t.vnode.props||EMPTY_OBJ;let u=l;const c=e.startsWith("update:"),y=c&&getModelModifiers(n,e.slice(7));y&&(y.trim&&(u=l.map(N=>isString$2(N)?N.trim():N)),y.number&&(u=l.map(looseToNumber)));let b,m=n[b=toHandlerKey(e)]||n[b=toHandlerKey(camelize(e))];!m&&c&&(m=n[b=toHandlerKey(hyphenate(e))]),m&&callWithAsyncErrorHandling(m,t,6,u);const O=n[b+"Once"];if(O){if(!t.emitted)t.emitted={};else if(t.emitted[b])return;t.emitted[b]=!0,callWithAsyncErrorHandling(O,t,6,u)}}function normalizeEmitsOptions(t,e,l=!1){const n=e.emitsCache,u=n.get(t);if(u!==void 0)return u;const c=t.emits;let y={},b=!1;if(!isFunction$2(t)){const m=O=>{const N=normalizeEmitsOptions(O,e,!0);N&&(b=!0,extend$1(y,N))};!l&&e.mixins.length&&e.mixins.forEach(m),t.extends&&m(t.extends),t.mixins&&t.mixins.forEach(m)}return!c&&!b?(isObject$2(t)&&n.set(t,null),null):(isArray$3(c)?c.forEach(m=>y[m]=null):extend$1(y,c),isObject$2(t)&&n.set(t,y),y)}function isEmitListener(t,e){return!t||!isOn$1(e)?!1:(e=e.slice(2).replace(/Once$/,""),hasOwn(t,e[0].toLowerCase()+e.slice(1))||hasOwn(t,hyphenate(e))||hasOwn(t,e))}function markAttrsAccessed(){}function renderComponentRoot(t){const{type:e,vnode:l,proxy:n,withProxy:u,propsOptions:[c],slots:y,attrs:b,emit:m,render:O,renderCache:N,props:L,data:G,setupState:q,ctx:J,inheritAttrs:fe}=t,ve=setCurrentRenderingInstance(t);let ne,Ue;try{if(l.shapeFlag&4){const Ve=u||n,rt=Ve;ne=normalizeVNode(O.call(rt,Ve,N,L,q,G,J)),Ue=b}else{const Ve=e;ne=normalizeVNode(Ve.length>1?Ve(L,{attrs:b,slots:y,emit:m}):Ve(L,null)),Ue=e.props?b:getFunctionalFallthrough(b)}}catch(Ve){blockStack.length=0,handleError(Ve,t,1),ne=createVNode(Comment)}let De=ne;if(Ue&&fe!==!1){const Ve=Object.keys(Ue),{shapeFlag:rt}=De;Ve.length&&rt&7&&(c&&Ve.some(isModelListener)&&(Ue=filterModelListeners(Ue,c)),De=cloneVNode(De,Ue,!1,!0))}return l.dirs&&(De=cloneVNode(De,null,!1,!0),De.dirs=De.dirs?De.dirs.concat(l.dirs):l.dirs),l.transition&&setTransitionHooks(De,l.transition),ne=De,setCurrentRenderingInstance(ve),ne}function filterSingleRoot(t,e=!0){let l;for(let n=0;n{let e;for(const l in t)(l==="class"||l==="style"||isOn$1(l))&&((e||(e={}))[l]=t[l]);return e},filterModelListeners=(t,e)=>{const l={};for(const n in t)(!isModelListener(n)||!(n.slice(9)in e))&&(l[n]=t[n]);return l};function shouldUpdateComponent(t,e,l){const{props:n,children:u,component:c}=t,{props:y,children:b,patchFlag:m}=e,O=c.emitsOptions;if(e.dirs||e.transition)return!0;if(l&&m>=0){if(m&1024)return!0;if(m&16)return n?hasPropsChanged(n,y,O):!!y;if(m&8){const N=e.dynamicProps;for(let L=0;Lt.__isSuspense;let suspenseId=0;const SuspenseImpl={name:"Suspense",__isSuspense:!0,process(t,e,l,n,u,c,y,b,m,O){if(t==null)mountSuspense(e,l,n,u,c,y,b,m,O);else{if(c&&c.deps>0&&!t.suspense.isInFallback){e.suspense=t.suspense,e.suspense.vnode=e,e.el=t.el;return}patchSuspense(t,e,l,n,u,y,b,m,O)}},hydrate:hydrateSuspense,normalize:normalizeSuspenseChildren},Suspense=SuspenseImpl;function triggerEvent(t,e){const l=t.props&&t.props[e];isFunction$2(l)&&l()}function mountSuspense(t,e,l,n,u,c,y,b,m){const{p:O,o:{createElement:N}}=m,L=N("div"),G=t.suspense=createSuspenseBoundary(t,u,n,e,L,l,c,y,b,m);O(null,G.pendingBranch=t.ssContent,L,null,n,G,c,y),G.deps>0?(triggerEvent(t,"onPending"),triggerEvent(t,"onFallback"),O(null,t.ssFallback,e,l,n,null,c,y),setActiveBranch(G,t.ssFallback)):G.resolve(!1,!0)}function patchSuspense(t,e,l,n,u,c,y,b,{p:m,um:O,o:{createElement:N}}){const L=e.suspense=t.suspense;L.vnode=e,e.el=t.el;const G=e.ssContent,q=e.ssFallback,{activeBranch:J,pendingBranch:fe,isInFallback:ve,isHydrating:ne}=L;if(fe)L.pendingBranch=G,isSameVNodeType(G,fe)?(m(fe,G,L.hiddenContainer,null,u,L,c,y,b),L.deps<=0?L.resolve():ve&&(ne||(m(J,q,l,n,u,null,c,y,b),setActiveBranch(L,q)))):(L.pendingId=suspenseId++,ne?(L.isHydrating=!1,L.activeBranch=fe):O(fe,u,L),L.deps=0,L.effects.length=0,L.hiddenContainer=N("div"),ve?(m(null,G,L.hiddenContainer,null,u,L,c,y,b),L.deps<=0?L.resolve():(m(J,q,l,n,u,null,c,y,b),setActiveBranch(L,q))):J&&isSameVNodeType(G,J)?(m(J,G,l,n,u,L,c,y,b),L.resolve(!0)):(m(null,G,L.hiddenContainer,null,u,L,c,y,b),L.deps<=0&&L.resolve()));else if(J&&isSameVNodeType(G,J))m(J,G,l,n,u,L,c,y,b),setActiveBranch(L,G);else if(triggerEvent(e,"onPending"),L.pendingBranch=G,G.shapeFlag&512?L.pendingId=G.component.suspenseId:L.pendingId=suspenseId++,m(null,G,L.hiddenContainer,null,u,L,c,y,b),L.deps<=0)L.resolve();else{const{timeout:Ue,pendingId:De}=L;Ue>0?setTimeout(()=>{L.pendingId===De&&L.fallback(q)},Ue):Ue===0&&L.fallback(q)}}function createSuspenseBoundary(t,e,l,n,u,c,y,b,m,O,N=!1){const{p:L,m:G,um:q,n:J,o:{parentNode:fe,remove:ve}}=O;let ne;const Ue=isVNodeSuspensible(t);Ue&&e&&e.pendingBranch&&(ne=e.pendingId,e.deps++);const De=t.props?toNumber(t.props.timeout):void 0,Ve=c,rt={vnode:t,parent:e,parentComponent:l,namespace:y,container:n,hiddenContainer:u,deps:0,pendingId:suspenseId++,timeout:typeof De=="number"?De:-1,activeBranch:null,pendingBranch:null,isInFallback:!N,isHydrating:N,isUnmounted:!1,effects:[],resolve(Ae=!1,Te=!1){const{vnode:Xe,activeBranch:ie,pendingBranch:ue,pendingId:pt,effects:mt,parentComponent:Tt,container:kt}=rt;let It=!1;rt.isHydrating?rt.isHydrating=!1:Ae||(It=ie&&ue.transition&&ue.transition.mode==="out-in",It&&(ie.transition.afterLeave=()=>{pt===rt.pendingId&&(G(ue,kt,c===Ve?J(ie):c,0),queuePostFlushCb(mt))}),ie&&(fe(ie.el)===kt&&(c=J(ie)),q(ie,Tt,rt,!0)),It||G(ue,kt,c,0)),setActiveBranch(rt,ue),rt.pendingBranch=null,rt.isInFallback=!1;let nn=rt.parent,tn=!1;for(;nn;){if(nn.pendingBranch){nn.effects.push(...mt),tn=!0;break}nn=nn.parent}!tn&&!It&&queuePostFlushCb(mt),rt.effects=[],Ue&&e&&e.pendingBranch&&ne===e.pendingId&&(e.deps--,e.deps===0&&!Te&&e.resolve()),triggerEvent(Xe,"onResolve")},fallback(Ae){if(!rt.pendingBranch)return;const{vnode:Te,activeBranch:Xe,parentComponent:ie,container:ue,namespace:pt}=rt;triggerEvent(Te,"onFallback");const mt=J(Xe),Tt=()=>{rt.isInFallback&&(L(null,Ae,ue,mt,ie,null,pt,b,m),setActiveBranch(rt,Ae))},kt=Ae.transition&&Ae.transition.mode==="out-in";kt&&(Xe.transition.afterLeave=Tt),rt.isInFallback=!0,q(Xe,ie,null,!0),kt||Tt()},move(Ae,Te,Xe){rt.activeBranch&&G(rt.activeBranch,Ae,Te,Xe),rt.container=Ae},next(){return rt.activeBranch&&J(rt.activeBranch)},registerDep(Ae,Te,Xe){const ie=!!rt.pendingBranch;ie&&rt.deps++;const ue=Ae.vnode.el;Ae.asyncDep.catch(pt=>{handleError(pt,Ae,0)}).then(pt=>{if(Ae.isUnmounted||rt.isUnmounted||rt.pendingId!==Ae.suspenseId)return;Ae.asyncResolved=!0;const{vnode:mt}=Ae;handleSetupResult(Ae,pt,!1),ue&&(mt.el=ue);const Tt=!ue&&Ae.subTree.el;Te(Ae,mt,fe(ue||Ae.subTree.el),ue?null:J(Ae.subTree),rt,y,Xe),Tt&&ve(Tt),updateHOCHostEl(Ae,mt.el),ie&&--rt.deps===0&&rt.resolve()})},unmount(Ae,Te){rt.isUnmounted=!0,rt.activeBranch&&q(rt.activeBranch,l,Ae,Te),rt.pendingBranch&&q(rt.pendingBranch,l,Ae,Te)}};return rt}function hydrateSuspense(t,e,l,n,u,c,y,b,m){const O=e.suspense=createSuspenseBoundary(e,n,l,t.parentNode,document.createElement("div"),null,u,c,y,b,!0),N=m(t,O.pendingBranch=e.ssContent,l,O,c,y);return O.deps===0&&O.resolve(!1,!0),N}function normalizeSuspenseChildren(t){const{shapeFlag:e,children:l}=t,n=e&32;t.ssContent=normalizeSuspenseSlot(n?l.default:l),t.ssFallback=n?normalizeSuspenseSlot(l.fallback):createVNode(Comment)}function normalizeSuspenseSlot(t){let e;if(isFunction$2(t)){const l=isBlockTreeEnabled&&t._c;l&&(t._d=!1,openBlock()),t=t(),l&&(t._d=!0,e=currentBlock,closeBlock())}return isArray$3(t)&&(t=filterSingleRoot(t)),t=normalizeVNode(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(l=>l!==t)),t}function queueEffectWithSuspense(t,e){e&&e.pendingBranch?isArray$3(t)?e.effects.push(...t):e.effects.push(t):queuePostFlushCb(t)}function setActiveBranch(t,e){t.activeBranch=e;const{vnode:l,parentComponent:n}=t;let u=e.el;for(;!u&&e.component;)e=e.component.subTree,u=e.el;l.el=u,n&&n.subTree===l&&(n.vnode.el=u,updateHOCHostEl(n,u))}function isVNodeSuspensible(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}const Fragment=Symbol.for("v-fgt"),Text=Symbol.for("v-txt"),Comment=Symbol.for("v-cmt"),Static=Symbol.for("v-stc"),blockStack=[];let currentBlock=null;function openBlock(t=!1){blockStack.push(currentBlock=t?null:[])}function closeBlock(){blockStack.pop(),currentBlock=blockStack[blockStack.length-1]||null}let isBlockTreeEnabled=1;function setBlockTracking(t){isBlockTreeEnabled+=t,t<0&¤tBlock&&(currentBlock.hasOnce=!0)}function setupBlock(t){return t.dynamicChildren=isBlockTreeEnabled>0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(t),t}function createElementBlock(t,e,l,n,u,c){return setupBlock(createBaseVNode(t,e,l,n,u,c,!0))}function createBlock(t,e,l,n,u){return setupBlock(createVNode(t,e,l,n,u,!0))}function isVNode(t){return t?t.__v_isVNode===!0:!1}function isSameVNodeType(t,e){return t.type===e.type&&t.key===e.key}function transformVNodeArgs(t){}const normalizeKey=({key:t})=>t??null,normalizeRef=({ref:t,ref_key:e,ref_for:l})=>(typeof t=="number"&&(t=""+t),t!=null?isString$2(t)||isRef(t)||isFunction$2(t)?{i:currentRenderingInstance,r:t,k:e,f:!!l}:t:null);function createBaseVNode(t,e=null,l=null,n=0,u=null,c=t===Fragment?0:1,y=!1,b=!1){const m={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&normalizeKey(e),ref:e&&normalizeRef(e),scopeId:currentScopeId,slotScopeIds:null,children:l,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:c,patchFlag:n,dynamicProps:u,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return b?(normalizeChildren(m,l),c&128&&t.normalize(m)):l&&(m.shapeFlag|=isString$2(l)?8:16),isBlockTreeEnabled>0&&!y&¤tBlock&&(m.patchFlag>0||c&6)&&m.patchFlag!==32&¤tBlock.push(m),m}const createVNode=_createVNode;function _createVNode(t,e=null,l=null,n=0,u=null,c=!1){if((!t||t===NULL_DYNAMIC_COMPONENT)&&(t=Comment),isVNode(t)){const b=cloneVNode(t,e,!0);return l&&normalizeChildren(b,l),isBlockTreeEnabled>0&&!c&¤tBlock&&(b.shapeFlag&6?currentBlock[currentBlock.indexOf(t)]=b:currentBlock.push(b)),b.patchFlag=-2,b}if(isClassComponent(t)&&(t=t.__vccOpts),e){e=guardReactiveProps(e);let{class:b,style:m}=e;b&&!isString$2(b)&&(e.class=normalizeClass(b)),isObject$2(m)&&(isProxy(m)&&!isArray$3(m)&&(m=extend$1({},m)),e.style=normalizeStyle(m))}const y=isString$2(t)?1:isSuspense(t)?128:isTeleport(t)?64:isObject$2(t)?4:isFunction$2(t)?2:0;return createBaseVNode(t,e,l,n,u,y,c,!0)}function guardReactiveProps(t){return t?isProxy(t)||isInternalObject(t)?extend$1({},t):t:null}function cloneVNode(t,e,l=!1,n=!1){const{props:u,ref:c,patchFlag:y,children:b,transition:m}=t,O=e?mergeProps(u||{},e):u,N={__v_isVNode:!0,__v_skip:!0,type:t.type,props:O,key:O&&normalizeKey(O),ref:e&&e.ref?l&&c?isArray$3(c)?c.concat(normalizeRef(e)):[c,normalizeRef(e)]:normalizeRef(e):c,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:b,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Fragment?y===-1?16:y|16:y,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:m,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&cloneVNode(t.ssContent),ssFallback:t.ssFallback&&cloneVNode(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return m&&n&&setTransitionHooks(N,m.clone(N)),N}function createTextVNode(t=" ",e=0){return createVNode(Text,null,t,e)}function createStaticVNode(t,e){const l=createVNode(Static,null,t);return l.staticCount=e,l}function createCommentVNode(t="",e=!1){return e?(openBlock(),createBlock(Comment,null,t)):createVNode(Comment,null,t)}function normalizeVNode(t){return t==null||typeof t=="boolean"?createVNode(Comment):isArray$3(t)?createVNode(Fragment,null,t.slice()):typeof t=="object"?cloneIfMounted(t):createVNode(Text,null,String(t))}function cloneIfMounted(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:cloneVNode(t)}function normalizeChildren(t,e){let l=0;const{shapeFlag:n}=t;if(e==null)e=null;else if(isArray$3(e))l=16;else if(typeof e=="object")if(n&65){const u=e.default;u&&(u._c&&(u._d=!1),normalizeChildren(t,u()),u._c&&(u._d=!0));return}else{l=32;const u=e._;!u&&!isInternalObject(e)?e._ctx=currentRenderingInstance:u===3&¤tRenderingInstance&&(currentRenderingInstance.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else isFunction$2(e)?(e={default:e,_ctx:currentRenderingInstance},l=32):(e=String(e),n&64?(l=16,e=[createTextVNode(e)]):l=8);t.children=e,t.shapeFlag|=l}function mergeProps(...t){const e={};for(let l=0;lcurrentInstance||currentRenderingInstance;let internalSetCurrentInstance,setInSSRSetupState;{const t=getGlobalThis(),e=(l,n)=>{let u;return(u=t[l])||(u=t[l]=[]),u.push(n),c=>{u.length>1?u.forEach(y=>y(c)):u[0](c)}};internalSetCurrentInstance=e("__VUE_INSTANCE_SETTERS__",l=>currentInstance=l),setInSSRSetupState=e("__VUE_SSR_SETTERS__",l=>isInSSRComponentSetup=l)}const setCurrentInstance=t=>{const e=currentInstance;return internalSetCurrentInstance(t),t.scope.on(),()=>{t.scope.off(),internalSetCurrentInstance(e)}},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),internalSetCurrentInstance(null)};function isStatefulComponent(t){return t.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(t,e=!1,l=!1){e&&setInSSRSetupState(e);const{props:n,children:u}=t.vnode,c=isStatefulComponent(t);initProps(t,n,c,e),initSlots(t,u,l);const y=c?setupStatefulComponent(t,e):void 0;return e&&setInSSRSetupState(!1),y}function setupStatefulComponent(t,e){const l=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,PublicInstanceProxyHandlers);const{setup:n}=l;if(n){const u=t.setupContext=n.length>1?createSetupContext(t):null,c=setCurrentInstance(t);pauseTracking();const y=callWithErrorHandling(n,t,0,[t.props,u]);if(resetTracking(),c(),isPromise$2(y)){if(isAsyncWrapper(t)||markAsyncBoundary(t),y.then(unsetCurrentInstance,unsetCurrentInstance),e)return y.then(b=>{handleSetupResult(t,b,e)}).catch(b=>{handleError(b,t,0)});t.asyncDep=y}else handleSetupResult(t,y,e)}else finishComponentSetup(t,e)}function handleSetupResult(t,e,l){isFunction$2(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:isObject$2(e)&&(t.setupState=proxyRefs(e)),finishComponentSetup(t,l)}let compile,installWithProxy;function registerRuntimeCompiler(t){compile=t,installWithProxy=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,RuntimeCompiledPublicInstanceProxyHandlers))}}const isRuntimeOnly=()=>!compile;function finishComponentSetup(t,e,l){const n=t.type;if(!t.render){if(!e&&compile&&!n.render){const u=n.template||resolveMergedOptions(t).template;if(u){const{isCustomElement:c,compilerOptions:y}=t.appContext.config,{delimiters:b,compilerOptions:m}=n,O=extend$1(extend$1({isCustomElement:c,delimiters:b},y),m);n.render=compile(u,O)}}t.render=n.render||NOOP,installWithProxy&&installWithProxy(t)}{const u=setCurrentInstance(t);pauseTracking();try{applyOptions(t)}finally{resetTracking(),u()}}}const attrsProxyHandlers={get(t,e){return track(t,"get",""),t[e]}};function createSetupContext(t){const e=l=>{t.exposed=l||{}};return{attrs:new Proxy(t.attrs,attrsProxyHandlers),slots:t.slots,emit:t.emit,expose:e}}function getComponentPublicInstance(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(proxyRefs(markRaw(t.exposed)),{get(e,l){if(l in e)return e[l];if(l in publicPropertiesMap)return publicPropertiesMap[l](t)},has(e,l){return l in e||l in publicPropertiesMap}})):t.proxy}const classifyRE=/(?:^|[-_])(\w)/g,classify=t=>t.replace(classifyRE,e=>e.toUpperCase()).replace(/[-_]/g,"");function getComponentName(t,e=!0){return isFunction$2(t)?t.displayName||t.name:t.name||e&&t.__name}function formatComponentName(t,e,l=!1){let n=getComponentName(e);if(!n&&e.__file){const u=e.__file.match(/([^/\\]+)\.\w+$/);u&&(n=u[1])}if(!n&&t&&t.parent){const u=c=>{for(const y in c)if(c[y]===e)return y};n=u(t.components||t.parent.type.components)||u(t.appContext.components)}return n?classify(n):l?"App":"Anonymous"}function isClassComponent(t){return isFunction$2(t)&&"__vccOpts"in t}const computed=(t,e)=>computed$1(t,e,isInSSRComponentSetup);function h(t,e,l){const n=arguments.length;return n===2?isObject$2(e)&&!isArray$3(e)?isVNode(e)?createVNode(t,null,[e]):createVNode(t,e):createVNode(t,null,e):(n>3?l=Array.prototype.slice.call(arguments,2):n===3&&isVNode(l)&&(l=[l]),createVNode(t,e,l))}function initCustomFormatter(){}function withMemo(t,e,l,n){const u=l[n];if(u&&isMemoSame(u,t))return u;const c=e();return c.memo=t.slice(),c.cacheIndex=n,l[n]=c}function isMemoSame(t,e){const l=t.memo;if(l.length!=e.length)return!1;for(let n=0;n0&¤tBlock&¤tBlock.push(t),!0}const version$4="3.5.6",warn=NOOP,ErrorTypeStrings=ErrorTypeStrings$1,devtools=devtools$1,setDevtoolsHook=setDevtoolsHook$1,_ssrUtils={createComponentInstance,setupComponent,renderComponentRoot,setCurrentRenderingInstance,isVNode,normalizeVNode,getComponentPublicInstance,ensureValidVNode:ensureValidVNode$1,pushWarningContext,popWarningContext},ssrUtils=_ssrUtils,resolveFilter=null,compatUtils=null,DeprecationTypes=null;/** * @vue/runtime-dom v3.5.6 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let policy;const tt=typeof window<"u"&&window.trustedTypes;if(tt)try{policy=tt.createPolicy("vue",{createHTML:t=>t})}catch{}const unsafeToTrustedHTML=policy?t=>policy.createHTML(t):t=>t,svgNS="http://www.w3.org/2000/svg",mathmlNS="http://www.w3.org/1998/Math/MathML",doc=typeof document<"u"?document:null,templateContainer=doc&&doc.createElement("template"),nodeOps={insert:(t,e,l)=>{e.insertBefore(t,l||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,l,n)=>{const u=e==="svg"?doc.createElementNS(svgNS,t):e==="mathml"?doc.createElementNS(mathmlNS,t):l?doc.createElement(t,{is:l}):doc.createElement(t);return t==="select"&&n&&n.multiple!=null&&u.setAttribute("multiple",n.multiple),u},createText:t=>doc.createTextNode(t),createComment:t=>doc.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>doc.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,l,n,u,c){const y=l?l.previousSibling:e.lastChild;if(u&&(u===c||u.nextSibling))for(;e.insertBefore(u.cloneNode(!0),l),!(u===c||!(u=u.nextSibling)););else{templateContainer.innerHTML=unsafeToTrustedHTML(n==="svg"?`${t}`:n==="mathml"?`${t}`:t);const b=templateContainer.content;if(n==="svg"||n==="mathml"){const m=b.firstChild;for(;m.firstChild;)b.appendChild(m.firstChild);b.removeChild(m)}e.insertBefore(b,l)}return[y?y.nextSibling:e.firstChild,l?l.previousSibling:e.lastChild]}},TRANSITION="transition",ANIMATION="animation",vtcKey=Symbol("_vtc"),DOMTransitionPropsValidators={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},TransitionPropsValidators=extend$1({},BaseTransitionPropsValidators,DOMTransitionPropsValidators),decorate$1=t=>(t.displayName="Transition",t.props=TransitionPropsValidators,t),Transition=decorate$1((t,{slots:e})=>h(BaseTransition,resolveTransitionProps(t),e)),callHook=(t,e=[])=>{isArray$3(t)?t.forEach(l=>l(...e)):t&&t(...e)},hasExplicitCallback=t=>t?isArray$3(t)?t.some(e=>e.length>1):t.length>1:!1;function resolveTransitionProps(t){const e={};for(const mt in t)mt in DOMTransitionPropsValidators||(e[mt]=t[mt]);if(t.css===!1)return e;const{name:l="v",type:n,duration:u,enterFromClass:c=`${l}-enter-from`,enterActiveClass:y=`${l}-enter-active`,enterToClass:b=`${l}-enter-to`,appearFromClass:m=c,appearActiveClass:O=y,appearToClass:N=b,leaveFromClass:L=`${l}-leave-from`,leaveActiveClass:G=`${l}-leave-active`,leaveToClass:q=`${l}-leave-to`}=t,J=normalizeDuration(u),fe=J&&J[0],ve=J&&J[1],{onBeforeEnter:ne,onEnter:Ue,onEnterCancelled:De,onLeave:Ve,onLeaveCancelled:rt,onBeforeAppear:Ae=ne,onAppear:Te=Ue,onAppearCancelled:Xe=De}=e,ie=(mt,Tt,kt)=>{removeTransitionClass(mt,Tt?N:b),removeTransitionClass(mt,Tt?O:y),kt&&kt()},ue=(mt,Tt)=>{mt._isLeaving=!1,removeTransitionClass(mt,L),removeTransitionClass(mt,q),removeTransitionClass(mt,G),Tt&&Tt()},pt=mt=>(Tt,kt)=>{const It=mt?Te:Ue,nn=()=>ie(Tt,mt,kt);callHook(It,[Tt,nn]),nextFrame(()=>{removeTransitionClass(Tt,mt?m:c),addTransitionClass(Tt,mt?N:b),hasExplicitCallback(It)||whenTransitionEnds(Tt,n,fe,nn)})};return extend$1(e,{onBeforeEnter(mt){callHook(ne,[mt]),addTransitionClass(mt,c),addTransitionClass(mt,y)},onBeforeAppear(mt){callHook(Ae,[mt]),addTransitionClass(mt,m),addTransitionClass(mt,O)},onEnter:pt(!1),onAppear:pt(!0),onLeave(mt,Tt){mt._isLeaving=!0;const kt=()=>ue(mt,Tt);addTransitionClass(mt,L),addTransitionClass(mt,G),forceReflow(),nextFrame(()=>{mt._isLeaving&&(removeTransitionClass(mt,L),addTransitionClass(mt,q),hasExplicitCallback(Ve)||whenTransitionEnds(mt,n,ve,kt))}),callHook(Ve,[mt,kt])},onEnterCancelled(mt){ie(mt,!1),callHook(De,[mt])},onAppearCancelled(mt){ie(mt,!0),callHook(Xe,[mt])},onLeaveCancelled(mt){ue(mt),callHook(rt,[mt])}})}function normalizeDuration(t){if(t==null)return null;if(isObject$2(t))return[NumberOf(t.enter),NumberOf(t.leave)];{const e=NumberOf(t);return[e,e]}}function NumberOf(t){return toNumber(t)}function addTransitionClass(t,e){e.split(/\s+/).forEach(l=>l&&t.classList.add(l)),(t[vtcKey]||(t[vtcKey]=new Set)).add(e)}function removeTransitionClass(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.remove(n));const l=t[vtcKey];l&&(l.delete(e),l.size||(t[vtcKey]=void 0))}function nextFrame(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let endId=0;function whenTransitionEnds(t,e,l,n){const u=t._endId=++endId,c=()=>{u===t._endId&&n()};if(l)return setTimeout(c,l);const{type:y,timeout:b,propCount:m}=getTransitionInfo(t,e);if(!y)return n();const O=y+"end";let N=0;const L=()=>{t.removeEventListener(O,G),c()},G=q=>{q.target===t&&++N>=m&&L()};setTimeout(()=>{N(l[J]||"").split(", "),u=n(`${TRANSITION}Delay`),c=n(`${TRANSITION}Duration`),y=getTimeout(u,c),b=n(`${ANIMATION}Delay`),m=n(`${ANIMATION}Duration`),O=getTimeout(b,m);let N=null,L=0,G=0;e===TRANSITION?y>0&&(N=TRANSITION,L=y,G=c.length):e===ANIMATION?O>0&&(N=ANIMATION,L=O,G=m.length):(L=Math.max(y,O),N=L>0?y>O?TRANSITION:ANIMATION:null,G=N?N===TRANSITION?c.length:m.length:0);const q=N===TRANSITION&&/\b(transform|all)(,|$)/.test(n(`${TRANSITION}Property`).toString());return{type:N,timeout:L,propCount:G,hasTransform:q}}function getTimeout(t,e){for(;t.lengthtoMs(l)+toMs(t[n])))}function toMs(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function forceReflow(){return document.body.offsetHeight}function patchClass(t,e,l){const n=t[vtcKey];n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):l?t.setAttribute("class",e):t.className=e}const vShowOriginalDisplay=Symbol("_vod"),vShowHidden=Symbol("_vsh"),vShow={beforeMount(t,{value:e},{transition:l}){t[vShowOriginalDisplay]=t.style.display==="none"?"":t.style.display,l&&e?l.beforeEnter(t):setDisplay(t,e)},mounted(t,{value:e},{transition:l}){l&&e&&l.enter(t)},updated(t,{value:e,oldValue:l},{transition:n}){!e!=!l&&(n?e?(n.beforeEnter(t),setDisplay(t,!0),n.enter(t)):n.leave(t,()=>{setDisplay(t,!1)}):setDisplay(t,e))},beforeUnmount(t,{value:e}){setDisplay(t,e)}};function setDisplay(t,e){t.style.display=e?t[vShowOriginalDisplay]:"none",t[vShowHidden]=!e}function initVShowForSSR(){vShow.getSSRProps=({value:t})=>{if(!t)return{style:{display:"none"}}}}const CSS_VAR_TEXT=Symbol("");function useCssVars(t){const e=getCurrentInstance$1();if(!e)return;const l=e.ut=(u=t(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(c=>setVarsOnNode(c,u))},n=()=>{const u=t(e.proxy);e.ce?setVarsOnNode(e.ce,u):setVarsOnVNode(e.subTree,u),l(u)};onBeforeMount(()=>{watchPostEffect(n)}),onMounted(()=>{const u=new MutationObserver(n);u.observe(e.subTree.el.parentNode,{childList:!0}),onUnmounted(()=>u.disconnect())})}function setVarsOnVNode(t,e){if(t.shapeFlag&128){const l=t.suspense;t=l.activeBranch,l.pendingBranch&&!l.isHydrating&&l.effects.push(()=>{setVarsOnVNode(l.activeBranch,e)})}for(;t.component;)t=t.component.subTree;if(t.shapeFlag&1&&t.el)setVarsOnNode(t.el,e);else if(t.type===Fragment)t.children.forEach(l=>setVarsOnVNode(l,e));else if(t.type===Static){let{el:l,anchor:n}=t;for(;l&&(setVarsOnNode(l,e),l!==n);)l=l.nextSibling}}function setVarsOnNode(t,e){if(t.nodeType===1){const l=t.style;let n="";for(const u in e)l.setProperty(`--${u}`,e[u]),n+=`--${u}: ${e[u]};`;l[CSS_VAR_TEXT]=n}}const displayRE=/(^|;)\s*display\s*:/;function patchStyle(t,e,l){const n=t.style,u=isString$2(l);let c=!1;if(l&&!u){if(e)if(isString$2(e))for(const y of e.split(";")){const b=y.slice(0,y.indexOf(":")).trim();l[b]==null&&setStyle(n,b,"")}else for(const y in e)l[y]==null&&setStyle(n,y,"");for(const y in l)y==="display"&&(c=!0),setStyle(n,y,l[y])}else if(u){if(e!==l){const y=n[CSS_VAR_TEXT];y&&(l+=";"+y),n.cssText=l,c=displayRE.test(l)}}else e&&t.removeAttribute("style");vShowOriginalDisplay in t&&(t[vShowOriginalDisplay]=c?n.display:"",t[vShowHidden]&&(n.display="none"))}const importantRE=/\s*!important$/;function setStyle(t,e,l){if(isArray$3(l))l.forEach(n=>setStyle(t,e,n));else if(l==null&&(l=""),e.startsWith("--"))t.setProperty(e,l);else{const n=autoPrefix(t,e);importantRE.test(l)?t.setProperty(hyphenate(n),l.replace(importantRE,""),"important"):t[n]=l}}const prefixes=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(t,e){const l=prefixCache[e];if(l)return l;let n=camelize(e);if(n!=="filter"&&n in t)return prefixCache[e]=n;n=capitalize(n);for(let u=0;ucachedNow||(p$2.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(t,e){const l=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=l.attached)return;callWithAsyncErrorHandling(patchStopImmediatePropagation(n,l.value),e,5,[n])};return l.value=t,l.attached=getNow(),l}function patchStopImmediatePropagation(t,e){if(isArray$3(e)){const l=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{l.call(t),t._stopped=!0},e.map(n=>u=>!u._stopped&&n&&n(u))}else return e}const isNativeOn=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,patchProp=(t,e,l,n,u,c)=>{const y=u==="svg";e==="class"?patchClass(t,n,y):e==="style"?patchStyle(t,l,n):isOn$1(e)?isModelListener(e)||patchEvent(t,e,l,n,c):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):shouldSetAsProp(t,e,n,y))?(patchDOMProp(t,e,n),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&patchAttr(t,e,n,y,c,e!=="value")):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),patchAttr(t,e,n,y))};function shouldSetAsProp(t,e,l,n){if(n)return!!(e==="innerHTML"||e==="textContent"||e in t&&isNativeOn(e)&&isFunction$2(l));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const u=t.tagName;if(u==="IMG"||u==="VIDEO"||u==="CANVAS"||u==="SOURCE")return!1}return isNativeOn(e)&&isString$2(l)?!1:!!(e in t||t._isVueCE&&(/[A-Z]/.test(e)||!isString$2(l)))}const REMOVAL={};/*! #__NO_SIDE_EFFECTS__ */function defineCustomElement(t,e,l){const n=defineComponent$1(t,e);isPlainObject$3(n)&&extend$1(n,e);class u extends VueElement{constructor(y){super(n,y,l)}}return u.def=n,u}/*! #__NO_SIDE_EFFECTS__ */const defineSSRCustomElement=(t,e)=>defineCustomElement(t,e,createSSRApp),BaseClass=typeof HTMLElement<"u"?HTMLElement:class{};class VueElement extends BaseClass{constructor(e,l={},n=createApp){super(),this._def=e,this._props=l,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==createApp?this._root=this.shadowRoot:e.shadowRoot!==!1?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof VueElement){this._parent=e;break}this._instance||(this._resolved?(this._setParent(),this._update()):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,nextTick(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let n=0;n{for(const u of n)this._setAttr(u.attributeName)}),this._ob.observe(this,{attributes:!0});const e=(n,u=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:c,styles:y}=n;let b;if(c&&!isArray$3(c))for(const m in c){const O=c[m];(O===Number||O&&O.type===Number)&&(m in this._props&&(this._props[m]=toNumber(this._props[m])),(b||(b=Object.create(null)))[camelize(m)]=!0)}this._numberProps=b,u&&this._resolveProps(n),this.shadowRoot&&this._applyStyles(y),this._mount(n)},l=this._def.__asyncLoader;l?this._pendingResolve=l().then(n=>e(this._def=n,!0)):e(this._def)}_mount(e){this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const l=this._instance&&this._instance.exposed;if(l)for(const n in l)hasOwn(this,n)||Object.defineProperty(this,n,{get:()=>unref(l[n])})}_resolveProps(e){const{props:l}=e,n=isArray$3(l)?l:Object.keys(l||{});for(const u of Object.keys(this))u[0]!=="_"&&n.includes(u)&&this._setProp(u,this[u]);for(const u of n.map(camelize))Object.defineProperty(this,u,{get(){return this._getProp(u)},set(c){this._setProp(u,c,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;const l=this.hasAttribute(e);let n=l?this.getAttribute(e):REMOVAL;const u=camelize(e);l&&this._numberProps&&this._numberProps[u]&&(n=toNumber(n)),this._setProp(u,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,l,n=!0,u=!1){l!==this._props[e]&&(l===REMOVAL?delete this._props[e]:(this._props[e]=l,e==="key"&&this._app&&(this._app._ceVNode.key=l)),u&&this._instance&&this._update(),n&&(l===!0?this.setAttribute(hyphenate(e),""):typeof l=="string"||typeof l=="number"?this.setAttribute(hyphenate(e),l+""):l||this.removeAttribute(hyphenate(e))))}_update(){render$1(this._createVNode(),this._root)}_createVNode(){const e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));const l=createVNode(this._def,extend$1(e,this._props));return this._instance||(l.ce=n=>{this._instance=n,n.ce=this,n.isCE=!0;const u=(c,y)=>{this.dispatchEvent(new CustomEvent(c,isPlainObject$3(y[0])?extend$1({detail:y},y[0]):{detail:y}))};n.emit=(c,...y)=>{u(c,y),hyphenate(c)!==c&&u(hyphenate(c),y)},this._setParent()}),l}_applyStyles(e,l){if(!e)return;if(l){if(l===this._def||this._styleChildren.has(l))return;this._styleChildren.add(l)}const n=this._nonce;for(let u=e.length-1;u>=0;u--){const c=document.createElement("style");n&&c.setAttribute("nonce",n),c.textContent=e[u],this.shadowRoot.prepend(c)}}_parseSlots(){const e=this._slots={};let l;for(;l=this.firstChild;){const n=l.nodeType===1&&l.getAttribute("slot")||"default";(e[n]||(e[n]=[])).push(l),this.removeChild(l)}}_renderSlots(){const e=(this._teleportTarget||this).querySelectorAll("slot"),l=this._instance.type.__scopeId;for(let n=0;n(delete t.props.mode,t),TransitionGroupImpl=decorate({name:"TransitionGroup",props:extend$1({},TransitionPropsValidators,{tag:String,moveClass:String}),setup(t,{slots:e}){const l=getCurrentInstance$1(),n=useTransitionState();let u,c;return onUpdated(()=>{if(!u.length)return;const y=t.moveClass||`${t.name||"v"}-move`;if(!hasCSSTransform(u[0].el,l.vnode.el,y))return;u.forEach(callPendingCbs),u.forEach(recordPosition);const b=u.filter(applyTranslation);forceReflow(),b.forEach(m=>{const O=m.el,N=O.style;addTransitionClass(O,y),N.transform=N.webkitTransform=N.transitionDuration="";const L=O[moveCbKey]=G=>{G&&G.target!==O||(!G||/transform$/.test(G.propertyName))&&(O.removeEventListener("transitionend",L),O[moveCbKey]=null,removeTransitionClass(O,y))};O.addEventListener("transitionend",L)})}),()=>{const y=toRaw(t),b=resolveTransitionProps(y);let m=y.tag||Fragment;if(u=[],c)for(let O=0;O{b.split(/\s+/).forEach(m=>m&&n.classList.remove(m))}),l.split(/\s+/).forEach(b=>b&&n.classList.add(b)),n.style.display="none";const c=e.nodeType===1?e:e.parentNode;c.appendChild(n);const{hasTransform:y}=getTransitionInfo(n);return c.removeChild(n),y}const getModelAssigner=t=>{const e=t.props["onUpdate:modelValue"]||!1;return isArray$3(e)?l=>invokeArrayFns(e,l):e};function onCompositionStart(t){t.target.composing=!0}function onCompositionEnd(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const assignKey=Symbol("_assign"),vModelText={created(t,{modifiers:{lazy:e,trim:l,number:n}},u){t[assignKey]=getModelAssigner(u);const c=n||u.props&&u.props.type==="number";addEventListener(t,e?"change":"input",y=>{if(y.target.composing)return;let b=t.value;l&&(b=b.trim()),c&&(b=looseToNumber(b)),t[assignKey](b)}),l&&addEventListener(t,"change",()=>{t.value=t.value.trim()}),e||(addEventListener(t,"compositionstart",onCompositionStart),addEventListener(t,"compositionend",onCompositionEnd),addEventListener(t,"change",onCompositionEnd))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:l,modifiers:{lazy:n,trim:u,number:c}},y){if(t[assignKey]=getModelAssigner(y),t.composing)return;const b=(c||t.type==="number")&&!/^0\d/.test(t.value)?looseToNumber(t.value):t.value,m=e??"";b!==m&&(document.activeElement===t&&t.type!=="range"&&(n&&e===l||u&&t.value.trim()===m)||(t.value=m))}},vModelCheckbox={deep:!0,created(t,e,l){t[assignKey]=getModelAssigner(l),addEventListener(t,"change",()=>{const n=t._modelValue,u=getValue(t),c=t.checked,y=t[assignKey];if(isArray$3(n)){const b=looseIndexOf(n,u),m=b!==-1;if(c&&!m)y(n.concat(u));else if(!c&&m){const O=[...n];O.splice(b,1),y(O)}}else if(isSet(n)){const b=new Set(n);c?b.add(u):b.delete(u),y(b)}else y(getCheckboxValue(t,c))})},mounted:setChecked,beforeUpdate(t,e,l){t[assignKey]=getModelAssigner(l),setChecked(t,e,l)}};function setChecked(t,{value:e,oldValue:l},n){t._modelValue=e;let u;isArray$3(e)?u=looseIndexOf(e,n.props.value)>-1:isSet(e)?u=e.has(n.props.value):u=looseEqual(e,getCheckboxValue(t,!0)),t.checked!==u&&(t.checked=u)}const vModelRadio={created(t,{value:e},l){t.checked=looseEqual(e,l.props.value),t[assignKey]=getModelAssigner(l),addEventListener(t,"change",()=>{t[assignKey](getValue(t))})},beforeUpdate(t,{value:e,oldValue:l},n){t[assignKey]=getModelAssigner(n),e!==l&&(t.checked=looseEqual(e,n.props.value))}},vModelSelect={deep:!0,created(t,{value:e,modifiers:{number:l}},n){const u=isSet(e);addEventListener(t,"change",()=>{const c=Array.prototype.filter.call(t.options,y=>y.selected).map(y=>l?looseToNumber(getValue(y)):getValue(y));t[assignKey](t.multiple?u?new Set(c):c:c[0]),t._assigning=!0,nextTick(()=>{t._assigning=!1})}),t[assignKey]=getModelAssigner(n)},mounted(t,{value:e,modifiers:{number:l}}){setSelected(t,e)},beforeUpdate(t,e,l){t[assignKey]=getModelAssigner(l)},updated(t,{value:e,modifiers:{number:l}}){t._assigning||setSelected(t,e)}};function setSelected(t,e,l){const n=t.multiple,u=isArray$3(e);if(!(n&&!u&&!isSet(e))){for(let c=0,y=t.options.length;cString(N)===String(m)):b.selected=looseIndexOf(e,m)>-1}else b.selected=e.has(m);else if(looseEqual(getValue(b),e)){t.selectedIndex!==c&&(t.selectedIndex=c);return}}!n&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function getValue(t){return"_value"in t?t._value:t.value}function getCheckboxValue(t,e){const l=e?"_trueValue":"_falseValue";return l in t?t[l]:e}const vModelDynamic={created(t,e,l){callModelHook(t,e,l,null,"created")},mounted(t,e,l){callModelHook(t,e,l,null,"mounted")},beforeUpdate(t,e,l,n){callModelHook(t,e,l,n,"beforeUpdate")},updated(t,e,l,n){callModelHook(t,e,l,n,"updated")}};function resolveDynamicModel(t,e){switch(t){case"SELECT":return vModelSelect;case"TEXTAREA":return vModelText;default:switch(e){case"checkbox":return vModelCheckbox;case"radio":return vModelRadio;default:return vModelText}}}function callModelHook(t,e,l,n,u){const y=resolveDynamicModel(t.tagName,l.props&&l.props.type)[u];y&&y(t,e,l,n)}function initVModelForSSR(){vModelText.getSSRProps=({value:t})=>({value:t}),vModelRadio.getSSRProps=({value:t},e)=>{if(e.props&&looseEqual(e.props.value,t))return{checked:!0}},vModelCheckbox.getSSRProps=({value:t},e)=>{if(isArray$3(t)){if(e.props&&looseIndexOf(t,e.props.value)>-1)return{checked:!0}}else if(isSet(t)){if(e.props&&t.has(e.props.value))return{checked:!0}}else if(t)return{checked:!0}},vModelDynamic.getSSRProps=(t,e)=>{if(typeof e.type!="string")return;const l=resolveDynamicModel(e.type.toUpperCase(),e.props&&e.props.type);if(l.getSSRProps)return l.getSSRProps(t,e)}}const systemModifiers=["ctrl","shift","alt","meta"],modifierGuards={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>systemModifiers.some(l=>t[`${l}Key`]&&!e.includes(l))},withModifiers=(t,e)=>{const l=t._withMods||(t._withMods={}),n=e.join(".");return l[n]||(l[n]=(u,...c)=>{for(let y=0;y{const l=t._withKeys||(t._withKeys={}),n=e.join(".");return l[n]||(l[n]=u=>{if(!("key"in u))return;const c=hyphenate(u.key);if(e.some(y=>y===c||keyNames[y]===c))return t(u)})},rendererOptions=extend$1({patchProp},nodeOps);let renderer,enabledHydration=!1;function ensureRenderer(){return renderer||(renderer=createRenderer(rendererOptions))}function ensureHydrationRenderer(){return renderer=enabledHydration?renderer:createHydrationRenderer(rendererOptions),enabledHydration=!0,renderer}const render$1=(...t)=>{ensureRenderer().render(...t)},hydrate=(...t)=>{ensureHydrationRenderer().hydrate(...t)},createApp=(...t)=>{const e=ensureRenderer().createApp(...t),{mount:l}=e;return e.mount=n=>{const u=normalizeContainer(n);if(!u)return;const c=e._component;!isFunction$2(c)&&!c.render&&!c.template&&(c.template=u.innerHTML),u.nodeType===1&&(u.textContent="");const y=l(u,!1,resolveRootNamespace(u));return u instanceof Element&&(u.removeAttribute("v-cloak"),u.setAttribute("data-v-app","")),y},e},createSSRApp=(...t)=>{const e=ensureHydrationRenderer().createApp(...t),{mount:l}=e;return e.mount=n=>{const u=normalizeContainer(n);if(u)return l(u,!0,resolveRootNamespace(u))},e};function resolveRootNamespace(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function normalizeContainer(t){return isString$2(t)?document.querySelector(t):t}let ssrDirectiveInitialized=!1;const initDirectivesForSSR=()=>{ssrDirectiveInitialized||(ssrDirectiveInitialized=!0,initVModelForSSR(),initVShowForSSR())};var commonjsGlobal$1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function commonjsRequire(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}let PubSub$1=class{constructor(){this.events={}}on(e,l){let n=this;n.events.hasOwnProperty(e)||(n.events[e]=[]),n.events[e].push(l)}emit(e,...l){this.events.hasOwnProperty(e)&&this.events[e].map(n=>n(...l))}off(e,l){if(this.events[e])if(l===void 0)this.events[e]=[];else{const n=this.events[e].indexOf(l);this.events[e].splice(n,1)}}};class Store{constructor(e){let l=this;l.actions={},l.mutations={},l.state=e.state,l.status="resting",l.events=new PubSub$1,e.hasOwnProperty("actions")&&(l.actions=e.actions),e.hasOwnProperty("mutations")&&(l.mutations=e.mutations)}dispatch(e,l){let n=this;return typeof n.actions[e]=="function"&&(console.groupCollapsed(`ACTION: ${e}`),n.status="action",n.actions[e](n,l),console.groupEnd(),!0)}commit(e,l){let n=this;if(typeof n.mutations[e]!="function")return console.log(`Mutation "${e}" doesn't exist`),!1;n.status="mutation";let u=n.mutations[e](n.state,l);return n.state=Object.assign(n.state,u),!0}}const options={state:{MxFun:null,Mxassembly:null,isCreateDrawObj:!1},actions:{},mutations:{}};for(let t in options.state){const e=t.charAt(0).toUpperCase()+t.slice(1);options.mutations["set"+e]=(l,n)=>{l[t]=n}}const store=new Store(options);function mxfun(){(function t(e,l,n){function u(b,m){if(!l[b]){if(!e[b]){var O=typeof commonjsRequire=="function"&&commonjsRequire;if(!m&&O)return O(b,!0);if(c)return c(b,!0);var N=new Error("Cannot find module '"+b+"'");throw N.code="MODULE_NOT_FOUND",N}var L=l[b]={exports:{}};e[b][0].call(L.exports,function(G){return u(e[b][1][G]||G)},L,L.exports,t,e,l,n)}return l[b].exports}for(var c=typeof commonjsRequire=="function"&&commonjsRequire,y=0;y>>6:(L<65536?N[J++]=224|L>>>12:(N[J++]=240|L>>>18,N[J++]=128|L>>>12&63),N[J++]=128|L>>>6&63),N[J++]=128|63&L);return N},l.buf2binstring=function(O){return m(O,O.length)},l.binstring2buf=function(O){for(var N=new n.Buf8(O.length),L=0,G=N.length;L>10&1023,ve[G++]=56320|1023&q)}return m(ve,G)},l.utf8border=function(O,N){var L;for((N=N||O.length)>O.length&&(N=O.length),L=N-1;0<=L&&(192&O[L])==128;)L--;return!(L<0)&&L!==0&&L+y[O[L]]>N?L:N}},{"./common":4}],6:[function(t,e,l){e.exports=function(n,u,c,y){for(var b=65535&n|0,m=n>>>16&65535|0,O=0;c!==0;){for(c-=O=2e3>>1:u>>>1;c[y]=u}return c}();e.exports=function(u,c,y,b){var m=n,O=b+y;u^=-1;for(var N=b;N>>8^m[255&(u^c[N])];return-1^u}},{}],9:[function(t,e,l){var n,u=t("../utils/common"),c=t("./trees"),y=t("./adler32"),b=t("./crc32"),m=t("./messages"),O=0,N=0,L=-2,G=2,q=8,J=286,fe=30,ve=19,ne=2*J+1,Ue=15,De=3,Ve=258,rt=Ve+De+1,Ae=42,Te=113;function Xe(Lt,wn){return Lt.msg=m[wn],wn}function ie(Lt){return(Lt<<1)-(4Lt.avail_out&&(hn=Lt.avail_out),hn!==0&&(u.arraySet(Lt.output,wn.pending_buf,wn.pending_out,hn,Lt.next_out),Lt.next_out+=hn,wn.pending_out+=hn,Lt.total_out+=hn,Lt.avail_out-=hn,wn.pending-=hn,wn.pending===0&&(wn.pending_out=0))}function mt(Lt,wn){c._tr_flush_block(Lt,0<=Lt.block_start?Lt.block_start:-1,Lt.strstart-Lt.block_start,wn),Lt.block_start=Lt.strstart,pt(Lt.strm)}function Tt(Lt,wn){Lt.pending_buf[Lt.pending++]=wn}function kt(Lt,wn){Lt.pending_buf[Lt.pending++]=wn>>>8&255,Lt.pending_buf[Lt.pending++]=255&wn}function It(Lt,wn){var hn,xn,$n=Lt.max_chain_length,Xr=Lt.strstart,ti=Lt.prev_length,gn=Lt.nice_match,Xn=Lt.strstart>Lt.w_size-rt?Lt.strstart-(Lt.w_size-rt):0,Kn=Lt.window,Vn=Lt.w_mask,Yn=Lt.prev,Vr=Lt.strstart+Ve,xi=Kn[Xr+ti-1],Si=Kn[Xr+ti];Lt.prev_length>=Lt.good_match&&($n>>=2),gn>Lt.lookahead&&(gn=Lt.lookahead);do if(Kn[(hn=wn)+ti]===Si&&Kn[hn+ti-1]===xi&&Kn[hn]===Kn[Xr]&&Kn[++hn]===Kn[Xr+1]){Xr+=2,hn++;do;while(Kn[++Xr]===Kn[++hn]&&Kn[++Xr]===Kn[++hn]&&Kn[++Xr]===Kn[++hn]&&Kn[++Xr]===Kn[++hn]&&Kn[++Xr]===Kn[++hn]&&Kn[++Xr]===Kn[++hn]&&Kn[++Xr]===Kn[++hn]&&Kn[++Xr]===Kn[++hn]&&XrXn&&--$n!=0);return ti<=Lt.lookahead?ti:Lt.lookahead}function nn(Lt){var wn,hn,xn,$n,Xr,ti,gn,Xn,Kn,Vn,Yn=Lt.w_size;do{if($n=Lt.window_size-Lt.lookahead-Lt.strstart,Lt.strstart>=Yn+(Yn-rt)){for(u.arraySet(Lt.window,Lt.window,Yn,Yn,0),Lt.match_start-=Yn,Lt.strstart-=Yn,Lt.block_start-=Yn,wn=hn=Lt.hash_size;xn=Lt.head[--wn],Lt.head[wn]=Yn<=xn?xn-Yn:0,--hn;);for(wn=hn=Yn;xn=Lt.prev[--wn],Lt.prev[wn]=Yn<=xn?xn-Yn:0,--hn;);$n+=Yn}if(Lt.strm.avail_in===0)break;if(ti=Lt.strm,gn=Lt.window,Xn=Lt.strstart+Lt.lookahead,Vn=void 0,(Kn=$n)<(Vn=ti.avail_in)&&(Vn=Kn),hn=Vn===0?0:(ti.avail_in-=Vn,u.arraySet(gn,ti.input,ti.next_in,Vn,Xn),ti.state.wrap===1?ti.adler=y(ti.adler,gn,Vn,Xn):ti.state.wrap===2&&(ti.adler=b(ti.adler,gn,Vn,Xn)),ti.next_in+=Vn,ti.total_in+=Vn,Vn),Lt.lookahead+=hn,Lt.lookahead+Lt.insert>=De)for(Xr=Lt.strstart-Lt.insert,Lt.ins_h=Lt.window[Xr],Lt.ins_h=(Lt.ins_h<=De&&(Lt.ins_h=(Lt.ins_h<=De)if(xn=c._tr_tally(Lt,Lt.strstart-Lt.match_start,Lt.match_length-De),Lt.lookahead-=Lt.match_length,Lt.match_length<=Lt.max_lazy_match&&Lt.lookahead>=De){for(Lt.match_length--;Lt.strstart++,Lt.ins_h=(Lt.ins_h<=De&&(Lt.ins_h=(Lt.ins_h<=De&&Lt.match_length<=Lt.prev_length){for($n=Lt.strstart+Lt.lookahead-De,xn=c._tr_tally(Lt,Lt.strstart-1-Lt.prev_match,Lt.prev_length-De),Lt.lookahead-=Lt.prev_length-1,Lt.prev_length-=2;++Lt.strstart<=$n&&(Lt.ins_h=(Lt.ins_h<Lt.pending_buf_size-5&&(hn=Lt.pending_buf_size-5);;){if(Lt.lookahead<=1){if(nn(Lt),Lt.lookahead===0&&wn===O)return 1;if(Lt.lookahead===0)break}Lt.strstart+=Lt.lookahead,Lt.lookahead=0;var xn=Lt.block_start+hn;if((Lt.strstart===0||Lt.strstart>=xn)&&(Lt.lookahead=Lt.strstart-xn,Lt.strstart=xn,mt(Lt,!1),Lt.strm.avail_out===0)||Lt.strstart-Lt.block_start>=Lt.w_size-rt&&(mt(Lt,!1),Lt.strm.avail_out===0))return 1}return Lt.insert=0,wn===4?(mt(Lt,!0),Lt.strm.avail_out===0?3:4):(Lt.strstart>Lt.block_start&&(mt(Lt,!1),Lt.strm.avail_out),1)}),new _n(4,4,8,4,tn),new _n(4,5,16,8,tn),new _n(4,6,32,32,tn),new _n(4,4,16,16,pn),new _n(8,16,32,32,pn),new _n(8,16,128,128,pn),new _n(8,32,128,256,pn),new _n(32,128,258,1024,pn),new _n(32,258,258,4096,pn)],l.deflateInit=function(Lt,wn){return Rn(Lt,wn,q,15,8,0)},l.deflateInit2=Rn,l.deflateReset=an,l.deflateResetKeep=Dn,l.deflateSetHeader=function(Lt,wn){return Lt&&Lt.state&&Lt.state.wrap===2?(Lt.state.gzhead=wn,N):L},l.deflate=function(Lt,wn){var hn,xn,$n,Xr;if(!Lt||!Lt.state||5>8&255),Tt(xn,xn.gzhead.time>>16&255),Tt(xn,xn.gzhead.time>>24&255),Tt(xn,xn.level===9?2:2<=xn.strategy||xn.level<2?4:0),Tt(xn,255&xn.gzhead.os),xn.gzhead.extra&&xn.gzhead.extra.length&&(Tt(xn,255&xn.gzhead.extra.length),Tt(xn,xn.gzhead.extra.length>>8&255)),xn.gzhead.hcrc&&(Lt.adler=b(Lt.adler,xn.pending_buf,xn.pending,0)),xn.gzindex=0,xn.status=69):(Tt(xn,0),Tt(xn,0),Tt(xn,0),Tt(xn,0),Tt(xn,0),Tt(xn,xn.level===9?2:2<=xn.strategy||xn.level<2?4:0),Tt(xn,3),xn.status=Te);else{var ti=q+(xn.w_bits-8<<4)<<8;ti|=(2<=xn.strategy||xn.level<2?0:xn.level<6?1:xn.level===6?2:3)<<6,xn.strstart!==0&&(ti|=32),ti+=31-ti%31,xn.status=Te,kt(xn,ti),xn.strstart!==0&&(kt(xn,Lt.adler>>>16),kt(xn,65535&Lt.adler)),Lt.adler=1}if(xn.status===69)if(xn.gzhead.extra){for($n=xn.pending;xn.gzindex<(65535&xn.gzhead.extra.length)&&(xn.pending!==xn.pending_buf_size||(xn.gzhead.hcrc&&xn.pending>$n&&(Lt.adler=b(Lt.adler,xn.pending_buf,xn.pending-$n,$n)),pt(Lt),$n=xn.pending,xn.pending!==xn.pending_buf_size));)Tt(xn,255&xn.gzhead.extra[xn.gzindex]),xn.gzindex++;xn.gzhead.hcrc&&xn.pending>$n&&(Lt.adler=b(Lt.adler,xn.pending_buf,xn.pending-$n,$n)),xn.gzindex===xn.gzhead.extra.length&&(xn.gzindex=0,xn.status=73)}else xn.status=73;if(xn.status===73)if(xn.gzhead.name){$n=xn.pending;do{if(xn.pending===xn.pending_buf_size&&(xn.gzhead.hcrc&&xn.pending>$n&&(Lt.adler=b(Lt.adler,xn.pending_buf,xn.pending-$n,$n)),pt(Lt),$n=xn.pending,xn.pending===xn.pending_buf_size)){Xr=1;break}Xr=xn.gzindex$n&&(Lt.adler=b(Lt.adler,xn.pending_buf,xn.pending-$n,$n)),Xr===0&&(xn.gzindex=0,xn.status=91)}else xn.status=91;if(xn.status===91)if(xn.gzhead.comment){$n=xn.pending;do{if(xn.pending===xn.pending_buf_size&&(xn.gzhead.hcrc&&xn.pending>$n&&(Lt.adler=b(Lt.adler,xn.pending_buf,xn.pending-$n,$n)),pt(Lt),$n=xn.pending,xn.pending===xn.pending_buf_size)){Xr=1;break}Xr=xn.gzindex$n&&(Lt.adler=b(Lt.adler,xn.pending_buf,xn.pending-$n,$n)),Xr===0&&(xn.status=103)}else xn.status=103;if(xn.status===103&&(xn.gzhead.hcrc?(xn.pending+2>xn.pending_buf_size&&pt(Lt),xn.pending+2<=xn.pending_buf_size&&(Tt(xn,255&Lt.adler),Tt(xn,Lt.adler>>8&255),Lt.adler=0,xn.status=Te)):xn.status=Te),xn.pending!==0){if(pt(Lt),Lt.avail_out===0)return xn.last_flush=-1,N}else if(Lt.avail_in===0&&ie(wn)<=ie(hn)&&wn!==4)return Xe(Lt,-5);if(xn.status===666&&Lt.avail_in!==0)return Xe(Lt,-5);if(Lt.avail_in!==0||xn.lookahead!==0||wn!==O&&xn.status!==666){var gn=xn.strategy===2?function(Xn,Kn){for(var Vn;;){if(Xn.lookahead===0&&(nn(Xn),Xn.lookahead===0)){if(Kn===O)return 1;break}if(Xn.match_length=0,Vn=c._tr_tally(Xn,0,Xn.window[Xn.strstart]),Xn.lookahead--,Xn.strstart++,Vn&&(mt(Xn,!1),Xn.strm.avail_out===0))return 1}return Xn.insert=0,Kn===4?(mt(Xn,!0),Xn.strm.avail_out===0?3:4):Xn.last_lit&&(mt(Xn,!1),Xn.strm.avail_out===0)?1:2}(xn,wn):xn.strategy===3?function(Xn,Kn){for(var Vn,Yn,Vr,xi,Si=Xn.window;;){if(Xn.lookahead<=Ve){if(nn(Xn),Xn.lookahead<=Ve&&Kn===O)return 1;if(Xn.lookahead===0)break}if(Xn.match_length=0,Xn.lookahead>=De&&0Xn.lookahead&&(Xn.match_length=Xn.lookahead)}if(Xn.match_length>=De?(Vn=c._tr_tally(Xn,1,Xn.match_length-De),Xn.lookahead-=Xn.match_length,Xn.strstart+=Xn.match_length,Xn.match_length=0):(Vn=c._tr_tally(Xn,0,Xn.window[Xn.strstart]),Xn.lookahead--,Xn.strstart++),Vn&&(mt(Xn,!1),Xn.strm.avail_out===0))return 1}return Xn.insert=0,Kn===4?(mt(Xn,!0),Xn.strm.avail_out===0?3:4):Xn.last_lit&&(mt(Xn,!1),Xn.strm.avail_out===0)?1:2}(xn,wn):n[xn.level].func(xn,wn);if(gn!==3&&gn!==4||(xn.status=666),gn===1||gn===3)return Lt.avail_out===0&&(xn.last_flush=-1),N;if(gn===2&&(wn===1?c._tr_align(xn):wn!==5&&(c._tr_stored_block(xn,0,0,!1),wn===3&&(ue(xn.head),xn.lookahead===0&&(xn.strstart=0,xn.block_start=0,xn.insert=0))),pt(Lt),Lt.avail_out===0))return xn.last_flush=-1,N}return wn!==4?N:xn.wrap<=0?1:(xn.wrap===2?(Tt(xn,255&Lt.adler),Tt(xn,Lt.adler>>8&255),Tt(xn,Lt.adler>>16&255),Tt(xn,Lt.adler>>24&255),Tt(xn,255&Lt.total_in),Tt(xn,Lt.total_in>>8&255),Tt(xn,Lt.total_in>>16&255),Tt(xn,Lt.total_in>>24&255)):(kt(xn,Lt.adler>>>16),kt(xn,65535&Lt.adler)),pt(Lt),0=hn.w_size&&(Xr===0&&(ue(hn.head),hn.strstart=0,hn.block_start=0,hn.insert=0),Kn=new u.Buf8(hn.w_size),u.arraySet(Kn,wn,Vn-hn.w_size,hn.w_size,0),wn=Kn,Vn=hn.w_size),ti=Lt.avail_in,gn=Lt.next_in,Xn=Lt.input,Lt.avail_in=Vn,Lt.next_in=0,Lt.input=wn,nn(hn);hn.lookahead>=De;){for(xn=hn.strstart,$n=hn.lookahead-(De-1);hn.ins_h=(hn.ins_h<>>=Te=Ae>>>24,ne-=Te,(Te=Ae>>>16&255)==0)Tt[m++]=65535&Ae;else{if(!(16&Te)){if(!(64&Te)){Ae=Ue[(65535&Ae)+(ve&(1<>>=Te,ne-=Te),ne<15&&(ve+=mt[y++]<>>=Te=Ae>>>24,ne-=Te,!(16&(Te=Ae>>>16&255))){if(!(64&Te)){Ae=De[(65535&Ae)+(ve&(1<>>=Te,ne-=Te,(Te=m-O)>3,ve&=(1<<(ne-=Xe<<3))-1,n.next_in=y,n.next_out=m,n.avail_in=y>>24&255)+(Xe>>>8&65280)+((65280&Xe)<<8)+((255&Xe)<<24)}function J(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function fe(Xe){var ie;return Xe&&Xe.state?(ie=Xe.state,Xe.total_in=Xe.total_out=ie.total=0,Xe.msg="",ie.wrap&&(Xe.adler=1&ie.wrap),ie.mode=N,ie.last=0,ie.havedict=0,ie.dmax=32768,ie.head=null,ie.hold=0,ie.bits=0,ie.lencode=ie.lendyn=new n.Buf32(L),ie.distcode=ie.distdyn=new n.Buf32(G),ie.sane=1,ie.back=-1,m):O}function ve(Xe){var ie;return Xe&&Xe.state?((ie=Xe.state).wsize=0,ie.whave=0,ie.wnext=0,fe(Xe)):O}function ne(Xe,ie){var ue,pt;return Xe&&Xe.state?(pt=Xe.state,ie<0?(ue=0,ie=-ie):(ue=1+(ie>>4),ie<48&&(ie&=15)),ie&&(ie<8||15=Tt.wsize?(n.arraySet(Tt.window,ie,ue-Tt.wsize,Tt.wsize,0),Tt.wnext=0,Tt.whave=Tt.wsize):(pt<(mt=Tt.wsize-Tt.wnext)&&(mt=pt),n.arraySet(Tt.window,ie,ue-pt,mt,Tt.wnext),(pt-=mt)?(n.arraySet(Tt.window,ie,ue-pt,pt,0),Tt.wnext=pt,Tt.whave=Tt.wsize):(Tt.wnext+=mt,Tt.wnext===Tt.wsize&&(Tt.wnext=0),Tt.whave>>8&255,ue.check=c(ue.check,Vr,2,0),pn=tn=0,ue.mode=2;break}if(ue.flags=0,ue.head&&(ue.head.done=!1),!(1&ue.wrap)||(((255&tn)<<8)+(tn>>8))%31){Xe.msg="incorrect header check",ue.mode=30;break}if((15&tn)!=8){Xe.msg="unknown compression method",ue.mode=30;break}if(pn-=4,gn=8+(15&(tn>>>=4)),ue.wbits===0)ue.wbits=gn;else if(gn>ue.wbits){Xe.msg="invalid window size",ue.mode=30;break}ue.dmax=1<>8&1),512&ue.flags&&(Vr[0]=255&tn,Vr[1]=tn>>>8&255,ue.check=c(ue.check,Vr,2,0)),pn=tn=0,ue.mode=3;case 3:for(;pn<32;){if(It===0)break e;It--,tn+=pt[Tt++]<>>8&255,Vr[2]=tn>>>16&255,Vr[3]=tn>>>24&255,ue.check=c(ue.check,Vr,4,0)),pn=tn=0,ue.mode=4;case 4:for(;pn<16;){if(It===0)break e;It--,tn+=pt[Tt++]<>8),512&ue.flags&&(Vr[0]=255&tn,Vr[1]=tn>>>8&255,ue.check=c(ue.check,Vr,2,0)),pn=tn=0,ue.mode=5;case 5:if(1024&ue.flags){for(;pn<16;){if(It===0)break e;It--,tn+=pt[Tt++]<>>8&255,ue.check=c(ue.check,Vr,2,0)),pn=tn=0}else ue.head&&(ue.head.extra=null);ue.mode=6;case 6:if(1024&ue.flags&&(It<(an=ue.length)&&(an=It),an&&(ue.head&&(gn=ue.head.extra_len-ue.length,ue.head.extra||(ue.head.extra=new Array(ue.head.extra_len)),n.arraySet(ue.head.extra,pt,Tt,an,gn)),512&ue.flags&&(ue.check=c(ue.check,pt,an,Tt)),It-=an,Tt+=an,ue.length-=an),ue.length))break e;ue.length=0,ue.mode=7;case 7:if(2048&ue.flags){if(It===0)break e;for(an=0;gn=pt[Tt+an++],ue.head&&gn&&ue.length<65536&&(ue.head.name+=String.fromCharCode(gn)),gn&&an>9&1,ue.head.done=!0),Xe.adler=ue.check=0,ue.mode=12;break;case 10:for(;pn<32;){if(It===0)break e;It--,tn+=pt[Tt++]<>>=7&pn,pn-=7&pn,ue.mode=27;break}for(;pn<3;){if(It===0)break e;It--,tn+=pt[Tt++]<>>=1)){case 0:ue.mode=14;break;case 1:if(Ae(ue),ue.mode=20,ie!==6)break;tn>>>=2,pn-=2;break e;case 2:ue.mode=17;break;case 3:Xe.msg="invalid block type",ue.mode=30}tn>>>=2,pn-=2;break;case 14:for(tn>>>=7&pn,pn-=7&pn;pn<32;){if(It===0)break e;It--,tn+=pt[Tt++]<>>16^65535)){Xe.msg="invalid stored block lengths",ue.mode=30;break}if(ue.length=65535&tn,pn=tn=0,ue.mode=15,ie===6)break e;case 15:ue.mode=16;case 16:if(an=ue.length){if(It>>=5,pn-=5,ue.ndist=1+(31&tn),tn>>>=5,pn-=5,ue.ncode=4+(15&tn),tn>>>=4,pn-=4,286>>=3,pn-=3}for(;ue.have<19;)ue.lens[xi[ue.have++]]=0;if(ue.lencode=ue.lendyn,ue.lenbits=7,Kn={bits:ue.lenbits},Xn=b(0,ue.lens,0,19,ue.lencode,0,ue.work,Kn),ue.lenbits=Kn.bits,Xn){Xe.msg="invalid code lengths set",ue.mode=30;break}ue.have=0,ue.mode=19;case 19:for(;ue.have>>16&255,xn=65535&Yn,!((wn=Yn>>>24)<=pn);){if(It===0)break e;It--,tn+=pt[Tt++]<>>=wn,pn-=wn,ue.lens[ue.have++]=xn;else{if(xn===16){for(Vn=wn+2;pn>>=wn,pn-=wn,ue.have===0){Xe.msg="invalid bit length repeat",ue.mode=30;break}gn=ue.lens[ue.have-1],an=3+(3&tn),tn>>>=2,pn-=2}else if(xn===17){for(Vn=wn+3;pn>>=wn)),tn>>>=3,pn-=3}else{for(Vn=wn+7;pn>>=wn)),tn>>>=7,pn-=7}if(ue.have+an>ue.nlen+ue.ndist){Xe.msg="invalid bit length repeat",ue.mode=30;break}for(;an--;)ue.lens[ue.have++]=gn}}if(ue.mode===30)break;if(ue.lens[256]===0){Xe.msg="invalid code -- missing end-of-block",ue.mode=30;break}if(ue.lenbits=9,Kn={bits:ue.lenbits},Xn=b(1,ue.lens,0,ue.nlen,ue.lencode,0,ue.work,Kn),ue.lenbits=Kn.bits,Xn){Xe.msg="invalid literal/lengths set",ue.mode=30;break}if(ue.distbits=6,ue.distcode=ue.distdyn,Kn={bits:ue.distbits},Xn=b(2,ue.lens,ue.nlen,ue.ndist,ue.distcode,0,ue.work,Kn),ue.distbits=Kn.bits,Xn){Xe.msg="invalid distances set",ue.mode=30;break}if(ue.mode=20,ie===6)break e;case 20:ue.mode=21;case 21:if(6<=It&&258<=nn){Xe.next_out=kt,Xe.avail_out=nn,Xe.next_in=Tt,Xe.avail_in=It,ue.hold=tn,ue.bits=pn,y(Xe,Dn),kt=Xe.next_out,mt=Xe.output,nn=Xe.avail_out,Tt=Xe.next_in,pt=Xe.input,It=Xe.avail_in,tn=ue.hold,pn=ue.bits,ue.mode===12&&(ue.back=-1);break}for(ue.back=0;hn=(Yn=ue.lencode[tn&(1<>>16&255,xn=65535&Yn,!((wn=Yn>>>24)<=pn);){if(It===0)break e;It--,tn+=pt[Tt++]<>$n)])>>>16&255,xn=65535&Yn,!($n+(wn=Yn>>>24)<=pn);){if(It===0)break e;It--,tn+=pt[Tt++]<>>=$n,pn-=$n,ue.back+=$n}if(tn>>>=wn,pn-=wn,ue.back+=wn,ue.length=xn,hn===0){ue.mode=26;break}if(32&hn){ue.back=-1,ue.mode=12;break}if(64&hn){Xe.msg="invalid literal/length code",ue.mode=30;break}ue.extra=15&hn,ue.mode=22;case 22:if(ue.extra){for(Vn=ue.extra;pn>>=ue.extra,pn-=ue.extra,ue.back+=ue.extra}ue.was=ue.length,ue.mode=23;case 23:for(;hn=(Yn=ue.distcode[tn&(1<>>16&255,xn=65535&Yn,!((wn=Yn>>>24)<=pn);){if(It===0)break e;It--,tn+=pt[Tt++]<>$n)])>>>16&255,xn=65535&Yn,!($n+(wn=Yn>>>24)<=pn);){if(It===0)break e;It--,tn+=pt[Tt++]<>>=$n,pn-=$n,ue.back+=$n}if(tn>>>=wn,pn-=wn,ue.back+=wn,64&hn){Xe.msg="invalid distance code",ue.mode=30;break}ue.offset=xn,ue.extra=15&hn,ue.mode=24;case 24:if(ue.extra){for(Vn=ue.extra;pn>>=ue.extra,pn-=ue.extra,ue.back+=ue.extra}if(ue.offset>ue.dmax){Xe.msg="invalid distance too far back",ue.mode=30;break}ue.mode=25;case 25:if(nn===0)break e;if(an=Dn-nn,ue.offset>an){if((an=ue.offset-an)>ue.whave&&ue.sane){Xe.msg="invalid distance too far back",ue.mode=30;break}Rn=an>ue.wnext?(an-=ue.wnext,ue.wsize-an):ue.wnext-an,an>ue.length&&(an=ue.length),Lt=ue.window}else Lt=mt,Rn=kt-ue.offset,an=ue.length;for(nnrt?(Te=wn[hn+J[pt]],Dn[an+J[pt]]):(Te=96,0),ve=1<>nn)+(ne-=ve)]=Ae<<24|Te<<16|Xe|0,ne!==0;);for(ve=1<>=1;if(ve!==0?(_n&=ve-1,_n+=ve):_n=0,pt++,--Rn[ue]==0){if(ue===Tt)break;ue=O[N+J[pt]]}if(kt>>7)]}function ue(hn,xn){hn.pending_buf[hn.pending++]=255&xn,hn.pending_buf[hn.pending++]=xn>>>8&255}function pt(hn,xn,$n){hn.bi_valid>O-$n?(hn.bi_buf|=xn<>O-hn.bi_valid,hn.bi_valid+=$n-O):(hn.bi_buf|=xn<>>=1,$n<<=1,0<--xn;);return $n>>>1}function kt(hn,xn,$n){var Xr,ti,gn=new Array(m+1),Xn=0;for(Xr=1;Xr<=m;Xr++)gn[Xr]=Xn=Xn+$n[Xr-1]<<1;for(ti=0;ti<=xn;ti++){var Kn=hn[2*ti+1];Kn!==0&&(hn[2*ti]=Tt(gn[Kn]++,Kn))}}function It(hn){var xn;for(xn=0;xn>1;1<=$n;$n--)pn(hn,gn,$n);for(ti=Vn;$n=hn.heap[1],hn.heap[1]=hn.heap[hn.heap_len--],pn(hn,gn,1),Xr=hn.heap[1],hn.heap[--hn.heap_max]=$n,hn.heap[--hn.heap_max]=Xr,gn[2*ti]=gn[2*$n]+gn[2*Xr],hn.depth[ti]=(hn.depth[$n]>=hn.depth[Xr]?hn.depth[$n]:hn.depth[Xr])+1,gn[2*$n+1]=gn[2*Xr+1]=ti,hn.heap[1]=ti++,pn(hn,gn,1),2<=hn.heap_len;);hn.heap[--hn.heap_max]=hn.heap[1],function(Vr,xi){var Si,qn,ia,Wi,ha,ai,Ia=xi.dyn_tree,fi=xi.max_code,An=xi.stat_desc.static_tree,sa=xi.stat_desc.has_stree,Nn=xi.stat_desc.extra_bits,fn=xi.stat_desc.extra_base,un=xi.stat_desc.max_length,Ln=0;for(Wi=0;Wi<=m;Wi++)Vr.bl_count[Wi]=0;for(Ia[2*Vr.heap[Vr.heap_max]+1]=0,Si=Vr.heap_max+1;Si<573;Si++)un<(Wi=Ia[2*Ia[2*(qn=Vr.heap[Si])+1]+1]+1)&&(Wi=un,Ln++),Ia[2*qn+1]=Wi,fi>=7;ti>>=1)if(1&Yn&&Kn.dyn_ltree[2*Vn]!==0)return 0;if(Kn.dyn_ltree[18]!==0||Kn.dyn_ltree[20]!==0||Kn.dyn_ltree[26]!==0)return 1;for(Vn=32;Vn>>3,(gn=hn.static_len+3+7>>>3)<=ti&&(ti=gn)):ti=gn=$n+5,$n+4<=ti&&xn!==-1?wn(hn,xn,$n,Xr):hn.strategy===4||gn===ti?(pt(hn,2+(Xr?1:0),3),_n(hn,J,fe)):(pt(hn,4+(Xr?1:0),3),function(Kn,Vn,Yn,Vr){var xi;for(pt(Kn,Vn-257,5),pt(Kn,Yn-1,5),pt(Kn,Vr-4,4),xi=0;xi>>8&255,hn.pending_buf[hn.d_buf+2*hn.last_lit+1]=255&xn,hn.pending_buf[hn.l_buf+hn.last_lit]=255&$n,hn.last_lit++,xn===0?hn.dyn_ltree[2*$n]++:(hn.matches++,xn--,hn.dyn_ltree[2*(ne[$n]+c+1)]++,hn.dyn_dtree[2*ie(xn)]++),hn.last_lit===hn.lit_bufsize-1},l._tr_align=function(hn){var xn;pt(hn,2,3),mt(hn,256,J),(xn=hn).bi_valid===16?(ue(xn,xn.bi_buf),xn.bi_buf=0,xn.bi_valid=0):8<=xn.bi_valid&&(xn.pending_buf[xn.pending++]=255&xn.bi_buf,xn.bi_buf>>=8,xn.bi_valid-=8)}},{"../utils/common":4}],16:[function(t,e,l){e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],17:[function(t,e,l){var n=t("three");n.OrbitControls=function(u,c){var y,b,m,O,N;c===void 0&&console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'),c===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.object=u,this.domElement=c,this.enabled=!0,this.target=new n.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={LEFT:n.MOUSE.ROTATE,MIDDLE:n.MOUSE.DOLLY,RIGHT:n.MOUSE.PAN},this.touches={ONE:n.TOUCH.ROTATE,TWO:n.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return Ue.phi},this.getAzimuthalAngle=function(){return Ue.theta},this.saveState=function(){L.target0.copy(L.target),L.position0.copy(L.object.position),L.zoom0=L.object.zoom},this.resetStatusValue=function(){ve=fe.NONE},this.reset=function(){L.target.copy(L.target0),L.object.position.copy(L.position0),L.object.zoom=L.zoom0,L.object.updateProjectionMatrix(),L.dispatchEvent(G),L.update(),ve=fe.NONE},this.update=(y=new n.Vector3,b=new n.Quaternion().setFromUnitVectors(u.up,new n.Vector3(0,1,0)),m=b.clone().inverse(),O=new n.Vector3,N=new n.Quaternion,function(){var fi=L.object.position;return y.copy(fi).sub(L.target),y.applyQuaternion(b),Ue.setFromVector3(y),L.autoRotate&&ve===fe.NONE&&tn(2*Math.PI/60/60*L.autoRotateSpeed),L.enableDamping?(Ue.theta+=De.theta*L.dampingFactor,Ue.phi+=De.phi*L.dampingFactor):(Ue.theta+=De.theta,Ue.phi+=De.phi),Ue.theta=Math.max(L.minAzimuthAngle,Math.min(L.maxAzimuthAngle,Ue.theta)),Ue.phi=Math.max(L.minPolarAngle,Math.min(L.maxPolarAngle,Ue.phi)),Ue.makeSafe(),Ue.radius*=Ve,Ue.radius=Math.max(L.minDistance,Math.min(L.maxDistance,Ue.radius)),L.enableDamping===!0?L.target.addScaledVector(rt,L.dampingFactor):L.target.add(rt),y.setFromSpherical(Ue),y.applyQuaternion(m),fi.copy(L.target).add(y),L.object.lookAt(L.target),L.enableDamping===!0?(De.theta*=1-L.dampingFactor,De.phi*=1-L.dampingFactor,rt.multiplyScalar(1-L.dampingFactor)):(De.set(0,0,0),rt.set(0,0,0)),Ve=1,!(!(Ae||O.distanceToSquared(L.object.position)>ne||8*(1-N.dot(L.object.quaternion))>ne)||(L.dispatchEvent(G),O.copy(L.object.position),N.copy(L.object.quaternion),Ae=!1))}),this.dispose=function(){L.domElement.removeEventListener("contextmenu",Ia,!1),L.domElement.removeEventListener("mousedown",Yn,!1),L.domElement.removeEventListener("wheel",Si,!1),L.domElement.removeEventListener("touchstart",Wi,!1),L.domElement.removeEventListener("touchend",ai,!1),L.domElement.removeEventListener("touchmove",ha,!1),document.removeEventListener("mousemove",Vr,!1),document.removeEventListener("mouseup",xi,!1),L.domElement.removeEventListener("keydown",qn,!1)};var L=this,G={type:"change"},q={type:"start"},J={type:"end"},fe={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},ve=fe.NONE,ne=1e-6,Ue=new n.Spherical,De=new n.Spherical,Ve=1,rt=new n.Vector3,Ae=!1,Te=new n.Vector2,Xe=new n.Vector2,ie=new n.Vector2,ue=new n.Vector2,pt=new n.Vector2,mt=new n.Vector2,Tt=new n.Vector2,kt=new n.Vector2,It=new n.Vector2;function nn(){return Math.pow(.95,L.zoomSpeed)}function tn(fi){De.theta-=fi}function pn(fi){De.phi-=fi}var _n,Dn,an,Rn=(_n=new n.Vector3,function(fi,An){_n.setFromMatrixColumn(An,0),_n.multiplyScalar(-fi),rt.add(_n)}),Lt=(Dn=new n.Vector3,function(fi,An){L.screenSpacePanning===!0?Dn.setFromMatrixColumn(An,1):(Dn.setFromMatrixColumn(An,0),Dn.crossVectors(L.object.up,Dn)),Dn.multiplyScalar(fi),rt.add(Dn)}),wn=(an=new n.Vector3,function(fi,An){var sa=L.domElement;if(L.object.isPerspectiveCamera){var Nn=L.object.position;an.copy(Nn).sub(L.target);var fn=an.length();fn*=Math.tan(L.object.fov/2*Math.PI/180),Rn(2*fi*fn/sa.clientHeight,L.object.matrix),Lt(2*An*fn/sa.clientHeight,L.object.matrix)}else L.object.isOrthographicCamera?(Rn(fi*(L.object.right-L.object.left)/L.object.zoom/sa.clientWidth,L.object.matrix),Lt(An*(L.object.top-L.object.bottom)/L.object.zoom/sa.clientHeight,L.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),L.enablePan=!1)});function hn(fi){L.object.isPerspectiveCamera?Ve/=fi:L.object.isOrthographicCamera?(L.object.zoom=Math.max(L.minZoom,Math.min(L.maxZoom,L.object.zoom*fi)),L.object.updateProjectionMatrix(),Ae=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),L.enableZoom=!1)}function xn(fi){Te.set(fi.clientX,fi.clientY)}function $n(fi){ue.set(fi.clientX,fi.clientY)}function Xr(fi){if(fi.touches.length==1)Te.set(fi.touches[0].pageX,fi.touches[0].pageY);else{var An=.5*(fi.touches[0].pageX+fi.touches[1].pageX),sa=.5*(fi.touches[0].pageY+fi.touches[1].pageY);Te.set(An,sa)}}function ti(fi){if(fi.touches.length==1)ue.set(fi.touches[0].pageX,fi.touches[0].pageY);else{var An=.5*(fi.touches[0].pageX+fi.touches[1].pageX),sa=.5*(fi.touches[0].pageY+fi.touches[1].pageY);ue.set(An,sa)}}function gn(fi){var An=fi.touches[0].pageX-fi.touches[1].pageX,sa=fi.touches[0].pageY-fi.touches[1].pageY,Nn=Math.sqrt(An*An+sa*sa);Tt.set(0,Nn)}function Xn(fi){if(fi.touches.length==1)Xe.set(fi.touches[0].pageX,fi.touches[0].pageY);else{var An=.5*(fi.touches[0].pageX+fi.touches[1].pageX),sa=.5*(fi.touches[0].pageY+fi.touches[1].pageY);Xe.set(An,sa)}ie.subVectors(Xe,Te).multiplyScalar(L.rotateSpeed);var Nn=L.domElement;tn(2*Math.PI*ie.x/Nn.clientHeight),pn(2*Math.PI*ie.y/Nn.clientHeight),Te.copy(Xe)}function Kn(fi){if(fi.touches.length==1)pt.set(fi.touches[0].pageX,fi.touches[0].pageY);else{var An=.5*(fi.touches[0].pageX+fi.touches[1].pageX),sa=.5*(fi.touches[0].pageY+fi.touches[1].pageY);pt.set(An,sa)}mt.subVectors(pt,ue).multiplyScalar(L.panSpeed),wn(mt.x,mt.y),ue.copy(pt)}function Vn(fi){var An=fi.touches[0].pageX-fi.touches[1].pageX,sa=fi.touches[0].pageY-fi.touches[1].pageY,Nn=Math.sqrt(An*An+sa*sa);kt.set(0,Nn),It.set(0,Math.pow(kt.y/Tt.y,L.zoomSpeed)),hn(It.y),Tt.copy(kt)}function Yn(fi){if(L.enabled!==!1){switch(fi.preventDefault(),L.domElement.focus?L.domElement.focus():window.focus(),fi.button){case 0:switch(L.mouseButtons.LEFT){case n.MOUSE.ROTATE:if(fi.ctrlKey||fi.metaKey||fi.shiftKey){if(L.enablePan===!1)return;$n(fi),ve=fe.PAN}else{if(L.enableRotate===!1)return;xn(fi),ve=fe.ROTATE}break;case n.MOUSE.PAN:if(fi.ctrlKey||fi.metaKey||fi.shiftKey){if(L.enableRotate===!1)return;xn(fi),ve=fe.ROTATE}else{if(L.enablePan===!1)return;$n(fi),ve=fe.PAN}break;default:ve=fe.NONE}break;case 1:switch(L.mouseButtons.MIDDLE){case n.MOUSE.DOLLY:if(L.enableZoom===!1)return;An=fi,Tt.set(An.clientX,An.clientY),ve=fe.DOLLY;break;case n.MOUSE.PAN:if(L.enablePan===!1)return;$n(fi),ve=fe.PAN;break;default:ve=fe.NONE}break;case 2:switch(L.mouseButtons.RIGHT){case n.MOUSE.ROTATE:if(L.enableRotate===!1)return;xn(fi),ve=fe.ROTATE;break;case n.MOUSE.PAN:if(L.enablePan===!1)return;$n(fi),ve=fe.PAN;break;default:ve=fe.NONE}}var An;ve!==fe.NONE&&(document.addEventListener("mousemove",Vr,!1),document.addEventListener("mouseup",xi,!1),L.dispatchEvent(q))}}function Vr(fi){var An;if(L.enabled!==!1)switch(fi.preventDefault(),ve){case fe.ROTATE:if(L.enableRotate===!1)return;(function(sa){Xe.set(sa.clientX,sa.clientY),ie.subVectors(Xe,Te).multiplyScalar(L.rotateSpeed);var Nn=L.domElement;tn(2*Math.PI*ie.x/Nn.clientHeight),pn(2*Math.PI*ie.y/Nn.clientHeight),Te.copy(Xe),L.update()})(fi);break;case fe.DOLLY:if(L.enableZoom===!1)return;(function(sa){var Nn;kt.set(sa.clientX,sa.clientY),It.subVectors(kt,Tt),0L.far||G.push({distance:It,point:Ue.clone().applyMatrix4(this.matrixWorld),index:ie,face:null,faceIndex:null,object:this}))}else for(ie=0,ue=(Xe=Ae.position.array).length/3-1;ieL.far||G.push({distance:It,point:Ue.clone().applyMatrix4(this.matrixWorld),index:ie,face:null,faceIndex:null,object:this}))}else if(fe instanceof b.Geometry){var Tt=fe.vertices,kt=Tt.length;for(ie=0;ieL.far||G.push({distance:It,point:Ue.clone().applyMatrix4(this.matrixWorld),index:ie,face:null,faceIndex:null,object:this}))}}}}),m.prototype.compareV3=function(L,G){var q=6*L,J=6*G;return this.positions[q]===this.positions[J]&&this.positions[1+q]===this.positions[1+J]&&this.positions[2+q]===this.positions[2+J]},m.prototype.copyV3=function(L){var G=6*L;return[this.positions[G],this.positions[1+G],this.positions[2+G]]},m.prototype.process=function(){var L,G,q=this.positions.length/6;this.previous=[],this.next=[],this.side=[],this.width=[],this.indices_array=[],this.uvs=[];for(var J=0;J>8&255]+Ul[f>>16&255]+Ul[f>>24&255]+"-"+Ul[255&E]+Ul[E>>8&255]+"-"+Ul[E>>16&15|64]+Ul[E>>24&255]+"-"+Ul[63&W|128]+Ul[W>>8&255]+"-"+Ul[W>>16&255]+Ul[W>>24&255]+Ul[255&ge]+Ul[ge>>8&255]+Ul[ge>>16&255]+Ul[ge>>24&255]).toUpperCase()},clamp:function(f,E,W){return Math.max(E,Math.min(W,f))},euclideanModulo:function(f,E){return(f%E+E)%E},mapLinear:function(f,E,W,ge,ct){return ge+(f-E)*(ct-ge)/(W-E)},lerp:function(f,E,W){return(1-W)*f+W*E},smoothstep:function(f,E,W){return f<=E?0:W<=f?1:(f=(f-E)/(W-E))*f*(3-2*f)},smootherstep:function(f,E,W){return f<=E?0:W<=f?1:(f=(f-E)/(W-E))*f*f*(f*(6*f-15)+10)},randInt:function(f,E){return f+Math.floor(Math.random()*(E-f+1))},randFloat:function(f,E){return f+Math.random()*(E-f)},randFloatSpread:function(f){return f*(.5-Math.random())},degToRad:function(f){return f*js.DEG2RAD},radToDeg:function(f){return f*js.RAD2DEG},isPowerOfTwo:function(f){return(f&f-1)==0&&f!==0},ceilPowerOfTwo:function(f){return Math.pow(2,Math.ceil(Math.log(f)/Math.LN2))},floorPowerOfTwo:function(f){return Math.pow(2,Math.floor(Math.log(f)/Math.LN2))},setQuaternionFromProperEuler:function(f,E,W,ge,ct){var gt=Math.cos,St=Math.sin,Pt=gt(W/2),sn=St(W/2),ln=gt((E+ge)/2),Sn=St((E+ge)/2),En=gt((E-ge)/2),On=St((E-ge)/2),mn=gt((ge-E)/2),Hn=St((ge-E)/2);ct==="XYX"?f.set(Pt*Sn,sn*En,sn*On,Pt*ln):ct==="YZY"?f.set(sn*On,Pt*Sn,sn*En,Pt*ln):ct==="ZXZ"?f.set(sn*En,sn*On,Pt*Sn,Pt*ln):ct==="XZX"?f.set(Pt*Sn,sn*Hn,sn*mn,Pt*ln):ct==="YXY"?f.set(sn*mn,Pt*Sn,sn*Hn,Pt*ln):ct==="ZYZ"?f.set(sn*Hn,sn*mn,Pt*Sn,Pt*ln):console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order.")}};function co(f,E){this.x=f||0,this.y=E||0}function Vl(){this.elements=[1,0,0,0,1,0,0,0,1],0"u")return f.src;if(f instanceof HTMLCanvasElement)E=f;else{jc===void 0&&(jc=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),jc.width=f.width,jc.height=f.height;var W=jc.getContext("2d");f instanceof ImageData?W.putImageData(f,0,0):W.drawImage(f,0,0,f.width,f.height),E=jc}return 2048Number.EPSILON){var $i=Math.sqrt(Ci),da=Math.atan2($i,_r*gi);mr=Math.sin(mr*da)/$i,St=Math.sin(St*da)/$i}var ji=St*gi;if(Pt=Pt*mr+En*ji,sn=sn*mr+On*ji,ln=ln*mr+mn*ji,Sn=Sn*mr+Hn*ji,mr===1-St){var Sa=1/Math.sqrt(Pt*Pt+sn*sn+ln*ln+Sn*Sn);Pt*=Sa,sn*=Sa,ln*=Sa,Sn*=Sa}}f[E]=Pt,f[E+1]=sn,f[E+2]=ln,f[E+3]=Sn}}),Object.defineProperties(Wu.prototype,{x:{get:function(){return this._x},set:function(f){this._x=f,this._onChangeCallback()}},y:{get:function(){return this._y},set:function(f){this._y=f,this._onChangeCallback()}},z:{get:function(){return this._z},set:function(f){this._z=f,this._onChangeCallback()}},w:{get:function(){return this._w},set:function(f){this._w=f,this._onChangeCallback()}}}),Object.assign(Wu.prototype,{isQuaternion:!0,set:function(f,E,W,ge){return this._x=f,this._y=E,this._z=W,this._w=ge,this._onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(f){return this._x=f.x,this._y=f.y,this._z=f.z,this._w=f.w,this._onChangeCallback(),this},setFromEuler:function(f,E){if(!f||!f.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var W=f._x,ge=f._y,ct=f._z,gt=f.order,St=Math.cos,Pt=Math.sin,sn=St(W/2),ln=St(ge/2),Sn=St(ct/2),En=Pt(W/2),On=Pt(ge/2),mn=Pt(ct/2);return gt==="XYZ"?(this._x=En*ln*Sn+sn*On*mn,this._y=sn*On*Sn-En*ln*mn,this._z=sn*ln*mn+En*On*Sn,this._w=sn*ln*Sn-En*On*mn):gt==="YXZ"?(this._x=En*ln*Sn+sn*On*mn,this._y=sn*On*Sn-En*ln*mn,this._z=sn*ln*mn-En*On*Sn,this._w=sn*ln*Sn+En*On*mn):gt==="ZXY"?(this._x=En*ln*Sn-sn*On*mn,this._y=sn*On*Sn+En*ln*mn,this._z=sn*ln*mn+En*On*Sn,this._w=sn*ln*Sn-En*On*mn):gt==="ZYX"?(this._x=En*ln*Sn-sn*On*mn,this._y=sn*On*Sn+En*ln*mn,this._z=sn*ln*mn-En*On*Sn,this._w=sn*ln*Sn+En*On*mn):gt==="YZX"?(this._x=En*ln*Sn+sn*On*mn,this._y=sn*On*Sn+En*ln*mn,this._z=sn*ln*mn-En*On*Sn,this._w=sn*ln*Sn-En*On*mn):gt==="XZY"&&(this._x=En*ln*Sn-sn*On*mn,this._y=sn*On*Sn-En*ln*mn,this._z=sn*ln*mn+En*On*Sn,this._w=sn*ln*Sn+En*On*mn),E!==!1&&this._onChangeCallback(),this},setFromAxisAngle:function(f,E){var W=E/2,ge=Math.sin(W);return this._x=f.x*ge,this._y=f.y*ge,this._z=f.z*ge,this._w=Math.cos(W),this._onChangeCallback(),this},setFromRotationMatrix:function(f){var E,W=f.elements,ge=W[0],ct=W[4],gt=W[8],St=W[1],Pt=W[5],sn=W[9],ln=W[2],Sn=W[6],En=W[10],On=ge+Pt+En;return 0Math.abs(f.z)?(this._x=-f.y,this._y=f.x,this._z=0):(this._x=0,this._y=-f.z,this._z=f.y)):(this._x=f.y*E.z-f.z*E.y,this._y=f.z*E.x-f.x*E.z,this._z=f.x*E.y-f.y*E.x),this._w=W,this.normalize()},angleTo:function(f){return 2*Math.acos(Math.abs(js.clamp(this.dot(f),-1,1)))},rotateTowards:function(f,E){var W=this.angleTo(f);if(W===0)return this;var ge=Math.min(1,E/W);return this.slerp(f,ge),this},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this},dot:function(f){return this._x*f._x+this._y*f._y+this._z*f._z+this._w*f._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var f=this.length();return f===0?(this._x=0,this._y=0,this._z=0,this._w=1):(f=1/f,this._x=this._x*f,this._y=this._y*f,this._z=this._z*f,this._w=this._w*f),this._onChangeCallback(),this},multiply:function(f,E){return E!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(f,E)):this.multiplyQuaternions(this,f)},premultiply:function(f){return this.multiplyQuaternions(f,this)},multiplyQuaternions:function(f,E){var W=f._x,ge=f._y,ct=f._z,gt=f._w,St=E._x,Pt=E._y,sn=E._z,ln=E._w;return this._x=W*ln+gt*St+ge*sn-ct*Pt,this._y=ge*ln+gt*Pt+ct*St-W*sn,this._z=ct*ln+gt*sn+W*Pt-ge*St,this._w=gt*ln-W*St-ge*Pt-ct*sn,this._onChangeCallback(),this},slerp:function(f,E){if(E===0)return this;if(E===1)return this.copy(f);var W=this._x,ge=this._y,ct=this._z,gt=this._w,St=gt*f._w+W*f._x+ge*f._y+ct*f._z;if(St<0?(this._w=-f._w,this._x=-f._x,this._y=-f._y,this._z=-f._z,St=-St):this.copy(f),1<=St)return this._w=gt,this._x=W,this._y=ge,this._z=ct,this;var Pt=1-St*St;if(Pt<=Number.EPSILON){var sn=1-E;return this._w=sn*gt+E*this._w,this._x=sn*W+E*this._x,this._y=sn*ge+E*this._y,this._z=sn*ct+E*this._z,this.normalize(),this._onChangeCallback(),this}var ln=Math.sqrt(Pt),Sn=Math.atan2(ln,St),En=Math.sin((1-E)*Sn)/ln,On=Math.sin(E*Sn)/ln;return this._w=gt*En+this._w*On,this._x=W*En+this._x*On,this._y=ge*En+this._y*On,this._z=ct*En+this._z*On,this._onChangeCallback(),this},equals:function(f){return f._x===this._x&&f._y===this._y&&f._z===this._z&&f._w===this._w},fromArray:function(f,E){return E===void 0&&(E=0),this._x=f[E],this._y=f[E+1],this._z=f[E+2],this._w=f[E+3],this._onChangeCallback(),this},toArray:function(f,E){return f===void 0&&(f=[]),E===void 0&&(E=0),f[E]=this._x,f[E+1]=this._y,f[E+2]=this._z,f[E+3]=this._w,f},_onChange:function(f){return this._onChangeCallback=f,this},_onChangeCallback:function(){}});var ud=new yi,Xc=new Wu;function yi(f,E,W){this.x=f||0,this.y=E||0,this.z=W||0}Object.assign(yi.prototype,{isVector3:!0,set:function(f,E,W){return this.x=f,this.y=E,this.z=W,this},setScalar:function(f){return this.x=f,this.y=f,this.z=f,this},setX:function(f){return this.x=f,this},setY:function(f){return this.y=f,this},setZ:function(f){return this.z=f,this},setComponent:function(f,E){switch(f){case 0:this.x=E;break;case 1:this.y=E;break;case 2:this.z=E;break;default:throw new Error("index is out of range: "+f)}return this},getComponent:function(f){switch(f){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+f)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(f){return this.x=f.x,this.y=f.y,this.z=f.z,this},add:function(f,E){return E!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(f,E)):(this.x+=f.x,this.y+=f.y,this.z+=f.z,this)},addScalar:function(f){return this.x+=f,this.y+=f,this.z+=f,this},addVectors:function(f,E){return this.x=f.x+E.x,this.y=f.y+E.y,this.z=f.z+E.z,this},addScaledVector:function(f,E){return this.x+=f.x*E,this.y+=f.y*E,this.z+=f.z*E,this},sub:function(f,E){return E!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(f,E)):(this.x-=f.x,this.y-=f.y,this.z-=f.z,this)},subScalar:function(f){return this.x-=f,this.y-=f,this.z-=f,this},subVectors:function(f,E){return this.x=f.x-E.x,this.y=f.y-E.y,this.z=f.z-E.z,this},multiply:function(f,E){return E!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(f,E)):(this.x*=f.x,this.y*=f.y,this.z*=f.z,this)},multiplyScalar:function(f){return this.x*=f,this.y*=f,this.z*=f,this},multiplyVectors:function(f,E){return this.x=f.x*E.x,this.y=f.y*E.y,this.z=f.z*E.z,this},applyEuler:function(f){return f&&f.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(Xc.setFromEuler(f))},applyAxisAngle:function(f,E){return this.applyQuaternion(Xc.setFromAxisAngle(f,E))},applyMatrix3:function(f){var E=this.x,W=this.y,ge=this.z,ct=f.elements;return this.x=ct[0]*E+ct[3]*W+ct[6]*ge,this.y=ct[1]*E+ct[4]*W+ct[7]*ge,this.z=ct[2]*E+ct[5]*W+ct[8]*ge,this},applyNormalMatrix:function(f){return this.applyMatrix3(f).normalize()},applyMatrix4:function(f){var E=this.x,W=this.y,ge=this.z,ct=f.elements,gt=1/(ct[3]*E+ct[7]*W+ct[11]*ge+ct[15]);return this.x=(ct[0]*E+ct[4]*W+ct[8]*ge+ct[12])*gt,this.y=(ct[1]*E+ct[5]*W+ct[9]*ge+ct[13])*gt,this.z=(ct[2]*E+ct[6]*W+ct[10]*ge+ct[14])*gt,this},applyQuaternion:function(f){var E=this.x,W=this.y,ge=this.z,ct=f.x,gt=f.y,St=f.z,Pt=f.w,sn=Pt*E+gt*ge-St*W,ln=Pt*W+St*E-ct*ge,Sn=Pt*ge+ct*W-gt*E,En=-ct*E-gt*W-St*ge;return this.x=sn*Pt+En*-ct+ln*-St-Sn*-gt,this.y=ln*Pt+En*-gt+Sn*-ct-sn*-St,this.z=Sn*Pt+En*-St+sn*-gt-ln*-ct,this},project:function(f){return this.applyMatrix4(f.matrixWorldInverse).applyMatrix4(f.projectionMatrix)},unproject:function(f){return this.applyMatrix4(f.projectionMatrixInverse).applyMatrix4(f.matrixWorld)},transformDirection:function(f){var E=this.x,W=this.y,ge=this.z,ct=f.elements;return this.x=ct[0]*E+ct[4]*W+ct[8]*ge,this.y=ct[1]*E+ct[5]*W+ct[9]*ge,this.z=ct[2]*E+ct[6]*W+ct[10]*ge,this.normalize()},divide:function(f){return this.x/=f.x,this.y/=f.y,this.z/=f.z,this},divideScalar:function(f){return this.multiplyScalar(1/f)},min:function(f){return this.x=Math.min(this.x,f.x),this.y=Math.min(this.y,f.y),this.z=Math.min(this.z,f.z),this},max:function(f){return this.x=Math.max(this.x,f.x),this.y=Math.max(this.y,f.y),this.z=Math.max(this.z,f.z),this},clamp:function(f,E){return this.x=Math.max(f.x,Math.min(E.x,this.x)),this.y=Math.max(f.y,Math.min(E.y,this.y)),this.z=Math.max(f.z,Math.min(E.z,this.z)),this},clampScalar:function(f,E){return this.x=Math.max(f,Math.min(E,this.x)),this.y=Math.max(f,Math.min(E,this.y)),this.z=Math.max(f,Math.min(E,this.z)),this},clampLength:function(f,E){var W=this.length();return this.divideScalar(W||1).multiplyScalar(Math.max(f,Math.min(E,W)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(f){return this.x*f.x+this.y*f.y+this.z*f.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(f){return this.normalize().multiplyScalar(f)},lerp:function(f,E){return this.x+=(f.x-this.x)*E,this.y+=(f.y-this.y)*E,this.z+=(f.z-this.z)*E,this},lerpVectors:function(f,E,W){return this.subVectors(E,f).multiplyScalar(W).add(f)},cross:function(f,E){return E!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(f,E)):this.crossVectors(this,f)},crossVectors:function(f,E){var W=f.x,ge=f.y,ct=f.z,gt=E.x,St=E.y,Pt=E.z;return this.x=ge*Pt-ct*St,this.y=ct*gt-W*Pt,this.z=W*St-ge*gt,this},projectOnVector:function(f){var E=f.lengthSq();if(E===0)return this.set(0,0,0);var W=f.dot(this)/E;return this.copy(f).multiplyScalar(W)},projectOnPlane:function(f){return ud.copy(this).projectOnVector(f),this.sub(ud)},reflect:function(f){return this.sub(ud.copy(f).multiplyScalar(2*this.dot(f)))},angleTo:function(f){var E=Math.sqrt(this.lengthSq()*f.lengthSq());if(E===0)return Math.PI/2;var W=this.dot(f)/E;return Math.acos(js.clamp(W,-1,1))},distanceTo:function(f){return Math.sqrt(this.distanceToSquared(f))},distanceToSquared:function(f){var E=this.x-f.x,W=this.y-f.y,ge=this.z-f.z;return E*E+W*W+ge*ge},manhattanDistanceTo:function(f){return Math.abs(this.x-f.x)+Math.abs(this.y-f.y)+Math.abs(this.z-f.z)},setFromSpherical:function(f){return this.setFromSphericalCoords(f.radius,f.phi,f.theta)},setFromSphericalCoords:function(f,E,W){var ge=Math.sin(E)*f;return this.x=ge*Math.sin(W),this.y=Math.cos(E)*f,this.z=ge*Math.cos(W),this},setFromCylindrical:function(f){return this.setFromCylindricalCoords(f.radius,f.theta,f.y)},setFromCylindricalCoords:function(f,E,W){return this.x=f*Math.sin(E),this.y=W,this.z=f*Math.cos(E),this},setFromMatrixPosition:function(f){var E=f.elements;return this.x=E[12],this.y=E[13],this.z=E[14],this},setFromMatrixScale:function(f){var E=this.setFromMatrixColumn(f,0).length(),W=this.setFromMatrixColumn(f,1).length(),ge=this.setFromMatrixColumn(f,2).length();return this.x=E,this.y=W,this.z=ge,this},setFromMatrixColumn:function(f,E){return this.fromArray(f.elements,4*E)},setFromMatrix3Column:function(f,E){return this.fromArray(f.elements,3*E)},equals:function(f){return f.x===this.x&&f.y===this.y&&f.z===this.z},fromArray:function(f,E){return E===void 0&&(E=0),this.x=f[E],this.y=f[E+1],this.z=f[E+2],this},toArray:function(f,E){return f===void 0&&(f=[]),E===void 0&&(E=0),f[E]=this.x,f[E+1]=this.y,f[E+2]=this.z,f},fromBufferAttribute:function(f,E,W){return W!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=f.getX(E),this.y=f.getY(E),this.z=f.getZ(E),this}});var mc=new yi,Su=new Vo,Yh=new yi(0,0,0),ka=new yi(1,1,1),pl=new yi,Il=new yi,Ss=new yi;function Vo(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0Pt)return!1}return!0}Object.assign(Xu.prototype,{isBox3:!0,set:function(f,E){return this.min.copy(f),this.max.copy(E),this},setFromArray:function(f){for(var E=1/0,W=1/0,ge=1/0,ct=-1/0,gt=-1/0,St=-1/0,Pt=0,sn=f.length;Ptthis.max.x||f.ythis.max.y||f.zthis.max.z)},containsBox:function(f){return this.min.x<=f.min.x&&f.max.x<=this.max.x&&this.min.y<=f.min.y&&f.max.y<=this.max.y&&this.min.z<=f.min.z&&f.max.z<=this.max.z},getParameter:function(f,E){return E===void 0&&(console.warn("THREE.Box3: .getParameter() target is now required"),E=new yi),E.set((f.x-this.min.x)/(this.max.x-this.min.x),(f.y-this.min.y)/(this.max.y-this.min.y),(f.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(f){return!(f.max.xthis.max.x||f.max.ythis.max.y||f.max.zthis.max.z)},intersectsSphere:function(f){return this.clampPoint(f.center,ts),ts.distanceToSquared(f.center)<=f.radius*f.radius},intersectsPlane:function(f){var E,W;return W=0=-f.constant},intersectsTriangle:function(f){if(this.isEmpty())return!1;this.getCenter(Lc),vl.subVectors(this.max,Lc),nl.subVectors(f.a,Lc),Fs.subVectors(f.b,Lc),eu.subVectors(f.c,Lc),Gs.subVectors(Fs,nl),As.subVectors(eu,Fs),yl.subVectors(nl,eu);var E=[0,-Gs.z,Gs.y,0,-As.z,As.y,0,-yl.z,yl.y,Gs.z,0,-Gs.x,As.z,0,-As.x,yl.z,0,-yl.x,-Gs.y,Gs.x,0,-As.y,As.x,0,-yl.y,yl.x,0];return!!Ju(E,nl,Fs,eu,vl)&&!!Ju(E=[1,0,0,0,1,0,0,0,1],nl,Fs,eu,vl)&&(du.crossVectors(Gs,As),Ju(E=[du.x,du.y,du.z],nl,Fs,eu,vl))},clampPoint:function(f,E){return E===void 0&&(console.warn("THREE.Box3: .clampPoint() target is now required"),E=new yi),E.copy(f).clamp(this.min,this.max)},distanceToPoint:function(f){return ts.copy(f).clamp(this.min,this.max).sub(f).length()},getBoundingSphere:function(f){return f===void 0&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(f.center),f.radius=.5*this.getSize(ts).length(),f},intersect:function(f){return this.min.max(f.min),this.max.min(f.max),this.isEmpty()&&this.makeEmpty(),this},union:function(f){return this.min.min(f.min),this.max.max(f.max),this},applyMatrix4:function(f){return this.isEmpty()||(oo[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(f),oo[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(f),oo[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(f),oo[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(f),oo[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(f),oo[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(f),oo[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(f),oo[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(f),this.setFromPoints(oo)),this},translate:function(f){return this.min.add(f),this.max.add(f),this},equals:function(f){return f.min.equals(this.min)&&f.max.equals(this.max)}});var Vu=new Xu;function Nl(f,E){this.center=f!==void 0?f:new yi,this.radius=E!==void 0?E:0}Object.assign(Nl.prototype,{set:function(f,E){return this.center.copy(f),this.radius=E,this},setFromPoints:function(f,E){var W=this.center;E!==void 0?W.copy(E):Vu.setFromPoints(f).getCenter(W);for(var ge=0,ct=0,gt=f.length;ctthis.radius*this.radius&&(E.sub(this.center).normalize(),E.multiplyScalar(this.radius).add(this.center)),E},getBoundingBox:function(f){return f===void 0&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),f=new Xu),f.set(this.center,this.center),f.expandByScalar(this.radius),f},applyMatrix4:function(f){return this.center.applyMatrix4(f),this.radius=this.radius*f.getMaxScaleOnAxis(),this},translate:function(f){return this.center.add(f),this},equals:function(f){return f.center.equals(this.center)&&f.radius===this.radius}});var $l=new yi,hu=new yi,Qu=new yi,Gu=new yi,Bs=new yi,su=new yi,ku=new yi;function Hl(f,E){this.origin=f!==void 0?f:new yi,this.direction=E!==void 0?E:new yi(0,0,-1)}Object.assign(Hl.prototype,{set:function(f,E){return this.origin.copy(f),this.direction.copy(E),this},clone:function(){return new this.constructor().copy(this)},copy:function(f){return this.origin.copy(f.origin),this.direction.copy(f.direction),this},at:function(f,E){return E===void 0&&(console.warn("THREE.Ray: .at() target is now required"),E=new yi),E.copy(this.direction).multiplyScalar(f).add(this.origin)},lookAt:function(f){return this.direction.copy(f).sub(this.origin).normalize(),this},recast:function(f){return this.origin.copy(this.at(f,$l)),this},closestPointToPoint:function(f,E){E===void 0&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),E=new yi),E.subVectors(f,this.origin);var W=E.dot(this.direction);return W<0?E.copy(this.origin):E.copy(this.direction).multiplyScalar(W).add(this.origin)},distanceToPoint:function(f){return Math.sqrt(this.distanceSqToPoint(f))},distanceSqToPoint:function(f){var E=$l.subVectors(f,this.origin).dot(this.direction);return E<0?this.origin.distanceToSquared(f):($l.copy(this.direction).multiplyScalar(E).add(this.origin),$l.distanceToSquared(f))},distanceSqToSegment:function(f,E,W,ge){hu.copy(f).add(E).multiplyScalar(.5),Qu.copy(E).sub(f).normalize(),Gu.copy(this.origin).sub(hu);var ct,gt,St,Pt,sn=.5*f.distanceTo(E),ln=-this.direction.dot(Qu),Sn=Gu.dot(this.direction),En=-Gu.dot(Qu),On=Gu.lengthSq(),mn=Math.abs(1-ln*ln);if(0>16&255)/255,this.g=(f>>8&255)/255,this.b=(255&f)/255,this},setRGB:function(f,E,W){return this.r=f,this.g=E,this.b=W,this},setHSL:function(f,E,W){if(f=js.euclideanModulo(f,1),E=js.clamp(E,0,1),W=js.clamp(W,0,1),E===0)this.r=this.g=this.b=W;else{var ge=W<=.5?W*(1+E):W+E-W*E,ct=2*W-ge;this.r=Wa(ct,ge,f+1/3),this.g=Wa(ct,ge,f),this.b=Wa(ct,ge,f-1/3)}return this},setStyle:function(f){function E(En){En!==void 0&&parseFloat(En)<1&&console.warn("THREE.Color: Alpha component of "+f+" will be ignored.")}var W;if(W=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(f)){var ge,ct=W[1],gt=W[2];switch(ct){case"rgb":case"rgba":if(ge=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(gt))return this.r=Math.min(255,parseInt(ge[1],10))/255,this.g=Math.min(255,parseInt(ge[2],10))/255,this.b=Math.min(255,parseInt(ge[3],10))/255,E(ge[5]),this;if(ge=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(gt))return this.r=Math.min(100,parseInt(ge[1],10))/100,this.g=Math.min(100,parseInt(ge[2],10))/100,this.b=Math.min(100,parseInt(ge[3],10))/100,E(ge[5]),this;break;case"hsl":case"hsla":if(ge=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(gt)){var St=parseFloat(ge[1])/360,Pt=parseInt(ge[2],10)/100,sn=parseInt(ge[3],10)/100;return E(ge[5]),this.setHSL(St,Pt,sn)}}}else if(W=/^\#([A-Fa-f0-9]+)$/.exec(f)){var ln=W[1],Sn=ln.length;if(Sn===3)return this.r=parseInt(ln.charAt(0)+ln.charAt(0),16)/255,this.g=parseInt(ln.charAt(1)+ln.charAt(1),16)/255,this.b=parseInt(ln.charAt(2)+ln.charAt(2),16)/255,this;if(Sn===6)return this.r=parseInt(ln.charAt(0)+ln.charAt(1),16)/255,this.g=parseInt(ln.charAt(2)+ln.charAt(3),16)/255,this.b=parseInt(ln.charAt(4)+ln.charAt(5),16)/255,this}return f&&0E&&(E=f[W]);return E}Object.defineProperty(ca.prototype,"needsUpdate",{set:function(f){f===!0&&this.version++}}),Object.assign(ca.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setUsage:function(f){return this.usage=f,this},copy:function(f){return this.name=f.name,this.array=new f.array.constructor(f.array),this.itemSize=f.itemSize,this.count=f.count,this.normalized=f.normalized,this.usage=f.usage,this},copyAt:function(f,E,W){f*=this.itemSize,W*=E.itemSize;for(var ge=0,ct=this.itemSize;geW.far?null:{distance:sn,point:Cc.clone(),object:f}}function nf(f,E,W,ge,ct,gt,St,Pt,sn,ln,Sn,En){Fc.fromBufferAttribute(ct,ln),fh.fromBufferAttribute(ct,Sn),Rd.fromBufferAttribute(ct,En);var On=f.morphTargetInfluences;if(E.morphTargets&>&&On){_d.set(0,0,0),oh.set(0,0,0),tf.set(0,0,0);for(var mn=0,Hn=gt.length;mn"," #include ","}"].join(` `),fragmentShader:["uniform sampler2D tEquirect;","varying vec3 vWorldDirection;","#define RECIPROCAL_PI 0.31830988618","#define RECIPROCAL_PI2 0.15915494","void main() {"," vec3 direction = normalize( vWorldDirection );"," vec2 sampleUV;"," sampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;"," sampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;"," gl_FragColor = texture2D( tEquirect, sampleUV );","}"].join(` `)},ct=new Ld({type:"CubemapFromEquirect",uniforms:Xh(ge.uniforms),vertexShader:ge.vertexShader,fragmentShader:ge.fragmentShader,side:q,blending:ve});ct.uniforms.tEquirect.value=E;var gt=new lu(new Zo(5,5,5),ct);W.add(gt);var St=new Jh(1,10,1);return St.renderTarget=this,St.renderTarget.texture.name="CubeCameraTexture",St.update(f,W),gt.geometry.dispose(),gt.material.dispose(),this},((pp.prototype=Object.create(Ql.prototype)).constructor=pp).prototype.isDataTexture=!0;var Ph=new Nl,mh=new yi;function Ih(f,E,W,ge,ct,gt){this.planes=[f!==void 0?f:new wu,E!==void 0?E:new wu,W!==void 0?W:new wu,ge!==void 0?ge:new wu,ct!==void 0?ct:new wu,gt!==void 0?gt:new wu]}Object.assign(Ih.prototype,{set:function(f,E,W,ge,ct,gt){var St=this.planes;return St[0].copy(f),St[1].copy(E),St[2].copy(W),St[3].copy(ge),St[4].copy(ct),St[5].copy(gt),this},clone:function(){return new this.constructor().copy(this)},copy:function(f){for(var E=this.planes,W=0;W<6;W++)E[W].copy(f.planes[W]);return this},setFromProjectionMatrix:function(f){var E=this.planes,W=f.elements,ge=W[0],ct=W[1],gt=W[2],St=W[3],Pt=W[4],sn=W[5],ln=W[6],Sn=W[7],En=W[8],On=W[9],mn=W[10],Hn=W[11],mr=W[12],_r=W[13],gi=W[14],Ci=W[15];return E[0].setComponents(St-ge,Sn-Pt,Hn-En,Ci-mr).normalize(),E[1].setComponents(St+ge,Sn+Pt,Hn+En,Ci+mr).normalize(),E[2].setComponents(St+ct,Sn+sn,Hn+On,Ci+_r).normalize(),E[3].setComponents(St-ct,Sn-sn,Hn-On,Ci-_r).normalize(),E[4].setComponents(St-gt,Sn-ln,Hn-mn,Ci-gi).normalize(),E[5].setComponents(St+gt,Sn+ln,Hn+mn,Ci+gi).normalize(),this},intersectsObject:function(f){var E=f.geometry;return E.boundingSphere===null&&E.computeBoundingSphere(),Ph.copy(E.boundingSphere).applyMatrix4(f.matrixWorld),this.intersectsSphere(Ph)},intersectsSprite:function(f){return Ph.center.set(0,0,0),Ph.radius=.7071067811865476,Ph.applyMatrix4(f.matrixWorld),this.intersectsSphere(Ph)},intersectsSphere:function(f){for(var E=this.planes,W=f.center,ge=-f.radius,ct=0;ct<6;ct++)if(E[ct].distanceToPoint(W) 0.0 ) { distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); } return distanceFalloff; #else if( cutoffDistance > 0.0 && decayExponent > 0.0 ) { return pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent ); } return 1.0; #endif } vec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) { return RECIPROCAL_PI * diffuseColor; } vec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) { float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH ); return ( 1.0 - specularColor ) * fresnel + specularColor; } vec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) { float fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV ); vec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0; return Fr * fresnel + F0; } float G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) { float a2 = pow2( alpha ); float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); return 1.0 / ( gl * gv ); } float G_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 ); } vec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) { float alpha = pow2( roughness ); vec3 halfDir = normalize( incidentLight.direction + viewDir ); float dotNL = saturate( dot( normal, incidentLight.direction ) ); float dotNV = saturate( dot( normal, viewDir ) ); float dotNH = saturate( dot( normal, halfDir ) ); float dotLH = saturate( dot( incidentLight.direction, halfDir ) ); vec3 F = F_Schlick( specularColor, dotLH ); float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV ); float D = D_GGX( alpha, dotNH ); return F * ( G * 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 ); } vec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) { float dotNV = saturate( dot( normal, viewDir ) ); vec2 brdf = integrateSpecularBRDF( dotNV, roughness ); return specularColor * brdf.x + brdf.y; } void BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) ); vec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness ); vec2 brdf = integrateSpecularBRDF( dotNV, roughness ); vec3 FssEss = F * brdf.x + brdf.y; float Ess = brdf.x + brdf.y; float Ems = 1.0 - Ess; vec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); singleScatter += FssEss; multiScatter += Fms * Ems; } 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_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) { vec3 halfDir = normalize( incidentLight.direction + geometry.viewDir ); float dotNH = saturate( dot( geometry.normal, halfDir ) ); float dotLH = saturate( dot( incidentLight.direction, halfDir ) ); vec3 F = F_Schlick( specularColor, dotLH ); float G = G_BlinnPhong_Implicit( ); float D = D_BlinnPhong( shininess, dotNH ); return F * ( G * D ); } float GGXRoughnessToBlinnExponent( const in float ggxRoughness ) { return ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 ); } float BlinnExponentToGGXRoughness( const in float blinnExponent ) { return sqrt( 2.0 / ( blinnExponent + 2.0 ) ); } #if defined( USE_SHEEN ) float D_Charlie(float roughness, float NoH) { float invAlpha = 1.0 / roughness; float cos2h = NoH * NoH; float sin2h = max(1.0 - cos2h, 0.0078125); return (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI); } float V_Neubelt(float NoV, float NoL) { return saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV))); } vec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) { vec3 N = geometry.normal; vec3 V = geometry.viewDir; vec3 H = normalize( V + L ); float dotNH = saturate( dot( N, H ) ); return specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) ); } #endif`,bumpmap_pars_fragment:`#ifdef USE_BUMPMAP uniform sampler2D bumpMap; uniform float bumpScale; vec2 dHdxy_fwd() { vec2 dSTdx = dFdx( vUv ); vec2 dSTdy = dFdy( vUv ); float Hll = bumpScale * texture2D( bumpMap, vUv ).x; float dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll; float dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll; return vec2( dBx, dBy ); } vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) { vec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) ); vec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) ); vec3 vN = surf_norm; vec3 R1 = cross( vSigmaY, vN ); vec3 R2 = cross( vN, vSigmaX ); float fDet = dot( vSigmaX, R1 ); fDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 ); vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); return normalize( abs( fDet ) * surf_norm - vGrad ); } #endif`,clipping_planes_fragment:`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #pragma unroll_loop for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { plane = clippingPlanes[ i ]; if ( dot( vViewPosition, plane.xyz ) > plane.w ) discard; } #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES bool clipped = true; #pragma unroll_loop for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { plane = clippingPlanes[ i ]; clipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped; } if ( clipped ) discard; #endif #endif`,clipping_planes_pars_fragment:`#if NUM_CLIPPING_PLANES > 0 #if ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP ) varying vec3 vViewPosition; #endif uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; #endif`,clipping_planes_pars_vertex:`#if NUM_CLIPPING_PLANES > 0 && ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP ) varying vec3 vViewPosition; #endif`,clipping_planes_vertex:`#if NUM_CLIPPING_PLANES > 0 && ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP ) vViewPosition = - mvPosition.xyz; #endif`,color_fragment:`#ifdef USE_COLOR diffuseColor.rgb *= vColor; #endif`,color_pars_fragment:`#ifdef USE_COLOR varying vec3 vColor; #endif`,color_pars_vertex:`#ifdef USE_COLOR varying vec3 vColor; #endif`,color_vertex:`#ifdef USE_COLOR vColor.xyz = color.xyz; #endif`,common:`#define PI 3.14159265359 #define PI2 6.28318530718 #define PI_HALF 1.5707963267949 #define RECIPROCAL_PI 0.31830988618 #define RECIPROCAL_PI2 0.15915494 #define LOG2 1.442695 #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; } float pow3( const in float x ) { return x*x*x; } float pow4( const in float x ) { float x2 = x*x; return x2*x2; } float average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); } 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 max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); } 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; }; struct GeometricContext { vec3 position; vec3 normal; vec3 viewDir; #ifdef CLEARCOAT vec3 clearcoatNormal; #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 ); } vec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) { float distance = dot( planeNormal, point - pointOnPlane ); return - distance * planeNormal + point; } float sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) { return sign( dot( point - pointOnPlane, planeNormal ) ); } vec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) { return lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine; } mat3 transposeMat3( const in mat3 m ) { mat3 tmp; tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); return tmp; } float linearToRelativeLuminance( const in vec3 color ) { vec3 weights = vec3( 0.2126, 0.7152, 0.0722 ); return dot( weights, color.rgb ); } bool isPerspectiveMatrix( mat4 m ) { return m[ 2 ][ 3 ] == - 1.0; }`,cube_uv_reflection_fragment:`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_maxMipLevel 8.0 #define cubeUV_minMipLevel 4.0 #define cubeUV_maxTileSize 256.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 = direction.xy / abs(direction.z); } else if (face == 3.0) { uv = vec2(direction.z, direction.y) / abs(direction.x); } else if (face == 4.0) { uv = direction.xz / 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); float texelSize = 1.0 / (3.0 * cubeUV_maxTileSize); vec2 uv = getUV(direction, face) * (faceSize - 1.0); vec2 f = fract(uv); uv += 0.5 - f; if (face > 2.0) { uv.y += faceSize; face -= 3.0; } uv.x += face * faceSize; if(mipInt < cubeUV_maxMipLevel){ uv.y += 2.0 * cubeUV_maxTileSize; } uv.y += filterInt * 2.0 * cubeUV_minTileSize; uv.x += 3.0 * max(0.0, cubeUV_maxTileSize - 2.0 * faceSize); uv *= texelSize; vec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb; uv.x += texelSize; vec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb; uv.y += texelSize; vec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb; uv.x -= texelSize; vec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb; vec3 tm = mix(tl, tr, f.x); vec3 bm = mix(bl, br, f.x); return mix(tm, bm, f.y); } #define r0 1.0 #define v0 0.339 #define m0 -2.0 #define r1 0.8 #define v1 0.276 #define m1 -1.0 #define r4 0.4 #define v4 0.046 #define m4 2.0 #define r5 0.305 #define v5 0.016 #define m5 3.0 #define r6 0.21 #define v6 0.0038 #define m6 4.0 float roughnessToMip(float roughness) { float mip = 0.0; if (roughness >= r1) { mip = (r0 - roughness) * (m1 - m0) / (r0 - r1) + m0; } else if (roughness >= r4) { mip = (r1 - roughness) * (m4 - m1) / (r1 - r4) + m1; } else if (roughness >= r5) { mip = (r4 - roughness) * (m5 - m4) / (r4 - r5) + m4; } else if (roughness >= r6) { mip = (r5 - roughness) * (m6 - m5) / (r5 - r6) + m5; } else { mip = -2.0 * log2(1.16 * roughness); } return mip; } vec4 textureCubeUV(sampler2D envMap, vec3 sampleDir, float roughness) { float mip = clamp(roughnessToMip(roughness), m0, cubeUV_maxMipLevel); 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`,defaultnormal_vertex:`vec3 transformedNormal = objectNormal; #ifdef USE_INSTANCING transformedNormal = mat3( instanceMatrix ) * transformedNormal; #endif transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedNormal = - transformedNormal; #endif #ifdef USE_TANGENT vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif #endif`,displacementmap_pars_vertex:`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; #endif`,displacementmap_vertex:`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias ); #endif`,emissivemap_fragment:`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vUv ); emissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb; totalEmissiveRadiance *= emissiveColor.rgb; #endif`,emissivemap_pars_fragment:`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; #endif`,encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:` vec4 LinearToLinear( in vec4 value ) { return value; } vec4 GammaToLinear( in vec4 value, in float gammaFactor ) { return vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a ); } vec4 LinearToGamma( in vec4 value, in float gammaFactor ) { return vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a ); } vec4 sRGBToLinear( 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 LinearTosRGB( in vec4 value ) { return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); } vec4 RGBEToLinear( in vec4 value ) { return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 ); } vec4 LinearToRGBE( in vec4 value ) { float maxComponent = max( max( value.r, value.g ), value.b ); float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 ); return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 ); } vec4 RGBMToLinear( in vec4 value, in float maxRange ) { return vec4( value.rgb * value.a * maxRange, 1.0 ); } vec4 LinearToRGBM( in vec4 value, in float maxRange ) { float maxRGB = max( value.r, max( value.g, value.b ) ); float M = clamp( maxRGB / maxRange, 0.0, 1.0 ); M = ceil( M * 255.0 ) / 255.0; return vec4( value.rgb / ( M * maxRange ), M ); } vec4 RGBDToLinear( in vec4 value, in float maxRange ) { return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 ); } vec4 LinearToRGBD( in vec4 value, in float maxRange ) { float maxRGB = max( value.r, max( value.g, value.b ) ); float D = max( maxRange / maxRGB, 1.0 ); D = clamp( floor( D ) / 255.0, 0.0, 1.0 ); return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D ); } const mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 ); vec4 LinearToLogLuv( in vec4 value ) { vec3 Xp_Y_XYZp = cLogLuvM * value.rgb; Xp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) ); vec4 vResult; vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z; float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0; vResult.w = fract( Le ); vResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0; return vResult; } const mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 ); vec4 LogLuvToLinear( in vec4 value ) { float Le = value.z * 255.0 + value.w; vec3 Xp_Y_XYZp; Xp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 ); Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y; Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z; vec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb; return vec4( max( vRGB, 0.0 ), 1.0 ); }`,envmap_fragment:`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); } else { cameraToFrag = normalize( vWorldPosition - cameraPosition ); } vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); #ifdef ENVMAP_MODE_REFLECTION vec3 reflectVec = reflect( cameraToFrag, worldNormal ); #else vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); #endif #else vec3 reflectVec = vReflect; #endif #ifdef ENVMAP_TYPE_CUBE vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); #elif defined( ENVMAP_TYPE_CUBE_UV ) vec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 ); #elif defined( ENVMAP_TYPE_EQUIREC ) vec2 sampleUV; reflectVec = normalize( reflectVec ); sampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; sampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5; vec4 envColor = texture2D( envMap, sampleUV ); #elif defined( ENVMAP_TYPE_SPHERE ) reflectVec = normalize( reflectVec ); vec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) ); vec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 ); #else vec4 envColor = vec4( 0.0 ); #endif #ifndef ENVMAP_TYPE_CUBE_UV envColor = envMapTexelToLinear( envColor ); #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`,envmap_common_pars_fragment:`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; uniform int maxMipLevel; #ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #else uniform sampler2D envMap; #endif #endif`,envmap_pars_fragment:`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) #define ENV_WORLDPOS #endif #ifdef ENV_WORLDPOS varying vec3 vWorldPosition; uniform float refractionRatio; #else varying vec3 vReflect; #endif #endif`,envmap_pars_vertex:`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG ) #define ENV_WORLDPOS #endif #ifdef ENV_WORLDPOS varying vec3 vWorldPosition; #else varying vec3 vReflect; uniform float refractionRatio; #endif #endif`,envmap_physical_pars_fragment:`#if defined( USE_ENVMAP ) #ifdef ENVMAP_MODE_REFRACTION uniform float refractionRatio; #endif vec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) { vec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix ); #ifdef ENVMAP_TYPE_CUBE vec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz ); #ifdef TEXTURE_LOD_EXT vec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) ); #else vec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) ); #endif envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb; #elif defined( ENVMAP_TYPE_CUBE_UV ) vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 ); #else vec4 envMapColor = vec4( 0.0 ); #endif return PI * envMapColor.rgb * envMapIntensity; } float getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) { float maxMIPLevelScalar = float( maxMIPLevel ); float sigma = PI * roughness * roughness / ( 1.0 + roughness ); float desiredMIPLevel = maxMIPLevelScalar + log2( sigma ); return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar ); } vec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) { #ifdef ENVMAP_MODE_REFLECTION vec3 reflectVec = reflect( -viewDir, normal ); reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); #else vec3 reflectVec = refract( -viewDir, normal, refractionRatio ); #endif reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); float specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel ); #ifdef ENVMAP_TYPE_CUBE vec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz ); #ifdef TEXTURE_LOD_EXT vec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel ); #else vec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel ); #endif envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb; #elif defined( ENVMAP_TYPE_CUBE_UV ) vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ); #elif defined( ENVMAP_TYPE_EQUIREC ) vec2 sampleUV; sampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; sampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5; #ifdef TEXTURE_LOD_EXT vec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel ); #else vec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel ); #endif envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb; #elif defined( ENVMAP_TYPE_SPHERE ) vec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) ); #ifdef TEXTURE_LOD_EXT vec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel ); #else vec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel ); #endif envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb; #endif return envMapColor.rgb * envMapIntensity; } #endif`,envmap_vertex:`#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`,fog_vertex:`#ifdef USE_FOG fogDepth = -mvPosition.z; #endif`,fog_pars_vertex:`#ifdef USE_FOG varying float fogDepth; #endif`,fog_fragment:`#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, fogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); #endif`,fog_pars_fragment:`#ifdef USE_FOG uniform vec3 fogColor; varying float fogDepth; #ifdef FOG_EXP2 uniform float fogDensity; #else uniform float fogNear; uniform float fogFar; #endif #endif`,gradientmap_pars_fragment:`#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 texture2D( gradientMap, coord ).rgb; #else return ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 ); #endif }`,lightmap_fragment:`#ifdef USE_LIGHTMAP vec4 lightMapTexel= texture2D( lightMap, vUv2 ); reflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity; #endif`,lightmap_pars_fragment:`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; #endif`,lights_lambert_vertex:`vec3 diffuse = vec3( 1.0 ); GeometricContext geometry; geometry.position = mvPosition.xyz; geometry.normal = normalize( transformedNormal ); geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz ); GeometricContext backGeometry; backGeometry.position = geometry.position; backGeometry.normal = -geometry.normal; backGeometry.viewDir = geometry.viewDir; vLightFront = vec3( 0.0 ); vIndirectFront = vec3( 0.0 ); #ifdef DOUBLE_SIDED vLightBack = vec3( 0.0 ); vIndirectBack = vec3( 0.0 ); #endif IncidentLight directLight; float dotNL; vec3 directLightColor_Diffuse; #if NUM_POINT_LIGHTS > 0 #pragma unroll_loop for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { getPointDirectLightIrradiance( pointLights[ i ], geometry, directLight ); dotNL = dot( geometry.normal, directLight.direction ); directLightColor_Diffuse = PI * directLight.color; vLightFront += saturate( dotNL ) * directLightColor_Diffuse; #ifdef DOUBLE_SIDED vLightBack += saturate( -dotNL ) * directLightColor_Diffuse; #endif } #endif #if NUM_SPOT_LIGHTS > 0 #pragma unroll_loop for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { getSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight ); dotNL = dot( geometry.normal, directLight.direction ); directLightColor_Diffuse = PI * directLight.color; vLightFront += saturate( dotNL ) * directLightColor_Diffuse; #ifdef DOUBLE_SIDED vLightBack += saturate( -dotNL ) * directLightColor_Diffuse; #endif } #endif #if NUM_DIR_LIGHTS > 0 #pragma unroll_loop for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { getDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight ); dotNL = dot( geometry.normal, directLight.direction ); directLightColor_Diffuse = PI * directLight.color; vLightFront += saturate( dotNL ) * directLightColor_Diffuse; #ifdef DOUBLE_SIDED vLightBack += saturate( -dotNL ) * directLightColor_Diffuse; #endif } #endif #if NUM_HEMI_LIGHTS > 0 #pragma unroll_loop for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { vIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry ); #ifdef DOUBLE_SIDED vIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry ); #endif } #endif`,lights_pars_begin:`uniform bool receiveShadow; uniform vec3 ambientLightColor; uniform vec3 lightProbe[ 9 ]; 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 GeometricContext geometry ) { vec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix ); vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); return irradiance; } vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { vec3 irradiance = ambientLightColor; #ifndef PHYSICALLY_CORRECT_LIGHTS irradiance *= PI; #endif return irradiance; } #if NUM_DIR_LIGHTS > 0 struct DirectionalLight { vec3 direction; vec3 color; int shadow; float shadowBias; float shadowRadius; vec2 shadowMapSize; }; uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; void getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) { directLight.color = directionalLight.color; directLight.direction = directionalLight.direction; directLight.visible = true; } #endif #if NUM_POINT_LIGHTS > 0 struct PointLight { vec3 position; vec3 color; float distance; float decay; int shadow; float shadowBias; float shadowRadius; vec2 shadowMapSize; float shadowCameraNear; float shadowCameraFar; }; uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; void getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) { vec3 lVector = pointLight.position - geometry.position; directLight.direction = normalize( lVector ); float lightDistance = length( lVector ); directLight.color = pointLight.color; directLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay ); directLight.visible = ( directLight.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; int shadow; float shadowBias; float shadowRadius; vec2 shadowMapSize; }; uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; void getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) { vec3 lVector = spotLight.position - geometry.position; directLight.direction = normalize( lVector ); float lightDistance = length( lVector ); float angleCos = dot( directLight.direction, spotLight.direction ); if ( angleCos > spotLight.coneCos ) { float spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos ); directLight.color = spotLight.color; directLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay ); directLight.visible = true; } else { directLight.color = vec3( 0.0 ); directLight.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 GeometricContext geometry ) { float dotNL = dot( geometry.normal, hemiLight.direction ); float hemiDiffuseWeight = 0.5 * dotNL + 0.5; vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); #ifndef PHYSICALLY_CORRECT_LIGHTS irradiance *= PI; #endif return irradiance; } #endif`,lights_toon_fragment:`ToonMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; material.specularStrength = specularStrength;`,lights_toon_pars_fragment:`varying vec3 vViewPosition; #ifndef FLAT_SHADED varying vec3 vNormal; #endif struct ToonMaterial { vec3 diffuseColor; vec3 specularColor; float specularShininess; float specularStrength; }; void RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color; #ifndef PHYSICALLY_CORRECT_LIGHTS irradiance *= PI; #endif reflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); reflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength; } void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon #define RE_IndirectDiffuse RE_IndirectDiffuse_Toon #define Material_LightProbeLOD( material ) (0)`,lights_phong_fragment:`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; material.specularStrength = specularStrength;`,lights_phong_pars_fragment:`varying vec3 vViewPosition; #ifndef FLAT_SHADED varying vec3 vNormal; #endif struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; float specularShininess; float specularStrength; }; void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); vec3 irradiance = dotNL * directLight.color; #ifndef PHYSICALLY_CORRECT_LIGHTS irradiance *= PI; #endif reflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); reflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength; } void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong #define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong #define Material_LightProbeLOD( material ) (0)`,lights_physical_fragment:`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); material.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness; material.specularRoughness = min( material.specularRoughness, 1.0 ); #ifdef REFLECTIVITY material.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor ); #else material.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor ); #endif #ifdef CLEARCOAT material.clearcoat = saturate( clearcoat ); material.clearcoatRoughness = max( clearcoatRoughness, 0.0525 ); material.clearcoatRoughness += geometryRoughness; material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); #endif #ifdef USE_SHEEN material.sheenColor = sheen; #endif`,lights_physical_pars_fragment:`struct PhysicalMaterial { vec3 diffuseColor; float specularRoughness; vec3 specularColor; #ifdef CLEARCOAT float clearcoat; float clearcoatRoughness; #endif #ifdef USE_SHEEN vec3 sheenColor; #endif }; #define MAXIMUM_SPECULAR_COEFFICIENT 0.16 #define DEFAULT_SPECULAR_COEFFICIENT 0.04 float clearcoatDHRApprox( const in float roughness, const in float dotNL ) { return DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) ); } #if NUM_RECT_AREA_LIGHTS > 0 void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { vec3 normal = geometry.normal; vec3 viewDir = geometry.viewDir; vec3 position = geometry.position; vec3 lightPos = rectAreaLight.position; vec3 halfWidth = rectAreaLight.halfWidth; vec3 halfHeight = rectAreaLight.halfHeight; vec3 lightColor = rectAreaLight.color; float roughness = material.specularRoughness; 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 GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); vec3 irradiance = dotNL * directLight.color; #ifndef PHYSICALLY_CORRECT_LIGHTS irradiance *= PI; #endif #ifdef CLEARCOAT float ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) ); vec3 ccIrradiance = ccDotNL * directLight.color; #ifndef PHYSICALLY_CORRECT_LIGHTS ccIrradiance *= PI; #endif float clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL ); reflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness ); #else float clearcoatDHR = 0.0; #endif #ifdef USE_SHEEN reflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen( material.specularRoughness, directLight.direction, geometry, material.sheenColor ); #else reflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness); #endif reflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); } void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); } void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { #ifdef CLEARCOAT float ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) ); reflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness ); float ccDotNL = ccDotNV; float clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL ); #else float clearcoatDHR = 0.0; #endif float clearcoatInv = 1.0 - clearcoatDHR; vec3 singleScattering = vec3( 0.0 ); vec3 multiScattering = vec3( 0.0 ); vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; BRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering ); vec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) ); reflectedLight.indirectSpecular += clearcoatInv * 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 ); }`,lights_fragment_begin:` GeometricContext geometry; geometry.position = - vViewPosition; geometry.normal = normal; geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); #ifdef CLEARCOAT geometry.clearcoatNormal = clearcoatNormal; #endif IncidentLight directLight; #if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) PointLight pointLight; #pragma unroll_loop for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { pointLight = pointLights[ i ]; getPointDirectLightIrradiance( pointLight, geometry, directLight ); #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) directLight.color *= all( bvec3( pointLight.shadow, directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; #endif RE_Direct( directLight, geometry, material, reflectedLight ); } #endif #if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) SpotLight spotLight; #pragma unroll_loop for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { spotLight = spotLights[ i ]; getSpotDirectLightIrradiance( spotLight, geometry, directLight ); #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) directLight.color *= all( bvec3( spotLight.shadow, directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0; #endif RE_Direct( directLight, geometry, material, reflectedLight ); } #endif #if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) DirectionalLight directionalLight; #pragma unroll_loop for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { directionalLight = directionalLights[ i ]; getDirectionalDirectLightIrradiance( directionalLight, geometry, directLight ); #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) directLight.color *= all( bvec3( directionalLight.shadow, directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; #endif RE_Direct( directLight, geometry, material, reflectedLight ); } #endif #if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) RectAreaLight rectAreaLight; #pragma unroll_loop for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { rectAreaLight = rectAreaLights[ i ]; RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight ); } #endif #if defined( RE_IndirectDiffuse ) vec3 iblIrradiance = vec3( 0.0 ); vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); irradiance += getLightProbeIrradiance( lightProbe, geometry ); #if ( NUM_HEMI_LIGHTS > 0 ) #pragma unroll_loop for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry ); } #endif #endif #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); #endif`,lights_fragment_maps:`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel= texture2D( lightMap, vUv2 ); vec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity; #ifndef PHYSICALLY_CORRECT_LIGHTS lightMapIrradiance *= PI; #endif irradiance += lightMapIrradiance; #endif #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) iblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel ); #endif #endif #if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) radiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel ); #ifdef CLEARCOAT clearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel ); #endif #endif`,lights_fragment_end:`#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight ); #endif`,logdepthbuf_fragment:`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; #endif`,logdepthbuf_pars_fragment:`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; #endif`,logdepthbuf_pars_vertex:`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT varying float vFragDepth; varying float vIsPerspective; #else uniform float logDepthBufFC; #endif #endif`,logdepthbuf_vertex:`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); #else if ( isPerspectiveMatrix( projectionMatrix ) ) { gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0; gl_Position.z *= gl_Position.w; } #endif #endif`,map_fragment:`#ifdef USE_MAP vec4 texelColor = texture2D( map, vUv ); texelColor = mapTexelToLinear( texelColor ); diffuseColor *= texelColor; #endif`,map_pars_fragment:`#ifdef USE_MAP uniform sampler2D map; #endif`,map_particle_fragment:`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; #endif #ifdef USE_MAP vec4 mapTexel = texture2D( map, uv ); diffuseColor *= mapTexelToLinear( mapTexel ); #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; #endif`,map_particle_pars_fragment:`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) uniform mat3 uvTransform; #endif #ifdef USE_MAP uniform sampler2D map; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; #endif`,metalnessmap_fragment:`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vUv ); metalnessFactor *= texelMetalness.b; #endif`,metalnessmap_pars_fragment:`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; #endif`,morphnormal_vertex:`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; #endif`,morphtarget_pars_vertex:`#ifdef USE_MORPHTARGETS uniform float morphTargetBaseInfluence; #ifndef USE_MORPHNORMALS uniform float morphTargetInfluences[ 8 ]; #else uniform float morphTargetInfluences[ 4 ]; #endif #endif`,morphtarget_vertex:`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; transformed += morphTarget0 * morphTargetInfluences[ 0 ]; transformed += morphTarget1 * morphTargetInfluences[ 1 ]; transformed += morphTarget2 * morphTargetInfluences[ 2 ]; transformed += morphTarget3 * morphTargetInfluences[ 3 ]; #ifndef USE_MORPHNORMALS transformed += morphTarget4 * morphTargetInfluences[ 4 ]; transformed += morphTarget5 * morphTargetInfluences[ 5 ]; transformed += morphTarget6 * morphTargetInfluences[ 6 ]; transformed += morphTarget7 * morphTargetInfluences[ 7 ]; #endif #endif`,normal_fragment_begin:`#ifdef FLAT_SHADED vec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) ); vec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) ); vec3 normal = normalize( cross( fdx, fdy ) ); #else vec3 normal = normalize( vNormal ); #ifdef DOUBLE_SIDED normal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 ); #endif #ifdef USE_TANGENT vec3 tangent = normalize( vTangent ); vec3 bitangent = normalize( vBitangent ); #ifdef DOUBLE_SIDED tangent = tangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 ); bitangent = bitangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 ); #endif #if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP ) mat3 vTBN = mat3( tangent, bitangent, normal ); #endif #endif #endif vec3 geometryNormal = normal;`,normal_fragment_maps:`#ifdef OBJECTSPACE_NORMALMAP normal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; #endif #ifdef DOUBLE_SIDED normal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 ); #endif normal = normalize( normalMatrix * normal ); #elif defined( TANGENTSPACE_NORMALMAP ) vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; mapN.xy *= normalScale; #ifdef USE_TANGENT normal = normalize( vTBN * mapN ); #else normal = perturbNormal2Arb( -vViewPosition, normal, mapN ); #endif #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() ); #endif`,normalmap_pars_fragment:`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif #ifdef OBJECTSPACE_NORMALMAP uniform mat3 normalMatrix; #endif #if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) ) vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN ) { vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) ); vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) ); vec2 st0 = dFdx( vUv.st ); vec2 st1 = dFdy( vUv.st ); float scale = sign( st1.t * st0.s - st0.t * st1.s ); vec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale ); vec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale ); vec3 N = normalize( surf_norm ); mat3 tsn = mat3( S, T, N ); mapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 ); return normalize( tsn * mapN ); } #endif`,clearcoat_normal_fragment_begin:`#ifdef CLEARCOAT vec3 clearcoatNormal = geometryNormal; #endif`,clearcoat_normal_fragment_maps:`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; #ifdef USE_TANGENT clearcoatNormal = normalize( vTBN * clearcoatMapN ); #else clearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN ); #endif #endif`,clearcoat_normalmap_pars_fragment:`#ifdef USE_CLEARCOAT_NORMALMAP uniform sampler2D clearcoatNormalMap; uniform vec2 clearcoatNormalScale; #endif`,packing:`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { return 2.0 * rgb.xyz - 1.0; } const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); const float ShiftRight8 = 1. / 256.; vec4 packDepthToRGBA( const in float v ) { vec4 r = vec4( fract( v * PackFactors ), v ); r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; } float unpackRGBAToDepth( const in vec4 v ) { return dot( v, UnpackFactors ); } vec4 pack2HalfToRGBA( vec2 v ) { vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 )); return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w); } vec2 unpackRGBATo2Half( vec4 v ) { return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); } float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { return ( viewZ + near ) / ( near - far ); } float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) { return linearClipZ * ( 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 invClipZ, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * invClipZ - far ); }`,premultiplied_alpha_fragment:`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; #endif`,project_vertex:`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_INSTANCING mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; gl_Position = projectionMatrix * mvPosition;`,dithering_fragment:`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); #endif`,dithering_pars_fragment:`#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`,roughnessmap_fragment:`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vUv ); roughnessFactor *= texelRoughness.g; #endif`,roughnessmap_pars_fragment:`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; #endif`,shadowmap_pars_fragment:`#ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; #endif #if NUM_SPOT_LIGHT_SHADOWS > 0 uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; varying vec4 vSpotShadowCoord[ 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 ]; #endif float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); } vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { return unpackRGBATo2Half( texture2D( shadow, uv ) ); } float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ float occlusion = 1.0; vec2 distribution = texture2DDistribution( shadow, uv ); float hard_shadow = step( compare , distribution.x ); if (hard_shadow != 1.0 ) { float distance = compare - distribution.x ; float variance = max( 0.00000, distribution.y * distribution.y ); float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); } return occlusion; } float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { float shadow = 1.0; shadowCoord.xyz /= shadowCoord.w; shadowCoord.z += shadowBias; bvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 ); bool inFrustum = all( inFrustumVec ); bvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 ); bool frustumTest = all( frustumTestVec ); if ( frustumTest ) { #if defined( SHADOWMAP_TYPE_PCF ) vec2 texelSize = vec2( 1.0 ) / shadowMapSize; float dx0 = - texelSize.x * shadowRadius; float dy0 = - texelSize.y * shadowRadius; float dx1 = + texelSize.x * shadowRadius; float dy1 = + texelSize.y * shadowRadius; float dx2 = dx0 / 2.0; float dy2 = dy0 / 2.0; float dx3 = dx1 / 2.0; float dy3 = dy1 / 2.0; shadow = ( texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) ) * ( 1.0 / 17.0 ); #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) vec2 texelSize = vec2( 1.0 ) / shadowMapSize; float dx = texelSize.x; float dy = texelSize.y; vec2 uv = shadowCoord.xy; vec2 f = fract( uv * shadowMapSize + 0.5 ); uv -= f * texelSize; shadow = ( texture2DCompare( shadowMap, uv, shadowCoord.z ) + texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), f.x ) + mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), f.x ) + mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), f.y ) + mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), f.y ) + mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), f.x ), mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), texture2DCompare( shadowMap, uv + + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), f.x ), f.y ) ) * ( 1.0 / 9.0 ); #elif defined( SHADOWMAP_TYPE_VSM ) shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); #else shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); #endif } return shadow; } vec2 cubeToUV( vec3 v, float texelSizeY ) { vec3 absV = abs( v ); float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); absV *= scaleToCube; v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); vec2 planar = v.xy; float almostATexel = 1.5 * texelSizeY; float almostOne = 1.0 - almostATexel; if ( absV.z >= almostOne ) { if ( v.z > 0.0 ) planar.x = 4.0 - v.x; } else if ( absV.x >= almostOne ) { float signX = sign( v.x ); planar.x = v.z * signX + 2.0 * signX; } else if ( absV.y >= almostOne ) { float signY = sign( v.y ); planar.x = v.x + 2.0 * signY + 2.0; planar.y = v.z * signY - 2.0; } return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); } float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); vec3 lightToPosition = shadowCoord.xyz; float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; vec3 bd3D = normalize( lightToPosition ); #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; return ( texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) ) * ( 1.0 / 9.0 ); #else return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); #endif } #endif`,shadowmap_pars_vertex:`#ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; #endif #if NUM_SPOT_LIGHT_SHADOWS > 0 uniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ]; varying vec4 vSpotShadowCoord[ 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 ]; #endif #endif`,shadowmap_vertex:`#ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 #pragma unroll_loop for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition; } #endif #if NUM_SPOT_LIGHT_SHADOWS > 0 #pragma unroll_loop for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { vSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition; } #endif #if NUM_POINT_LIGHT_SHADOWS > 0 #pragma unroll_loop for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition; } #endif #endif`,shadowmask_pars_fragment:`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 DirectionalLight directionalLight; #pragma unroll_loop for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { directionalLight = directionalLights[ i ]; shadow *= all( bvec2( directionalLight.shadow, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; } #endif #if NUM_SPOT_LIGHT_SHADOWS > 0 SpotLight spotLight; #pragma unroll_loop for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { spotLight = spotLights[ i ]; shadow *= all( bvec2( spotLight.shadow, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0; } #endif #if NUM_POINT_LIGHT_SHADOWS > 0 PointLight pointLight; #pragma unroll_loop for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { pointLight = pointLights[ i ]; shadow *= all( bvec2( pointLight.shadow, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; } #endif #endif return shadow; }`,skinbase_vertex:`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); #endif`,skinning_pars_vertex:`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; #ifdef BONE_TEXTURE uniform highp sampler2D boneTexture; uniform int boneTextureSize; mat4 getBoneMatrix( const in float i ) { float j = i * 4.0; float x = mod( j, float( boneTextureSize ) ); float y = floor( j / float( boneTextureSize ) ); float dx = 1.0 / float( boneTextureSize ); float dy = 1.0 / float( boneTextureSize ); y = dy * ( y + 0.5 ); vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) ); vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) ); vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) ); vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) ); mat4 bone = mat4( v1, v2, v3, v4 ); return bone; } #else uniform mat4 boneMatrices[ MAX_BONES ]; mat4 getBoneMatrix( const in float i ) { mat4 bone = boneMatrices[ int(i) ]; return bone; } #endif #endif`,skinning_vertex:`#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`,skinnormal_vertex:`#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`,specularmap_fragment:`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; #endif`,specularmap_pars_fragment:`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; #endif`,tonemapping_fragment:`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); #endif`,tonemapping_pars_fragment:`#ifndef saturate #define saturate(a) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; uniform float toneMappingWhitePoint; vec3 LinearToneMapping( vec3 color ) { return toneMappingExposure * color; } vec3 ReinhardToneMapping( vec3 color ) { color *= toneMappingExposure; return saturate( color / ( vec3( 1.0 ) + color ) ); } #define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) ) vec3 Uncharted2ToneMapping( vec3 color ) { color *= toneMappingExposure; return saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) ); } vec3 OptimizedCineonToneMapping( vec3 color ) { color *= toneMappingExposure; color = max( vec3( 0.0 ), color - 0.004 ); return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); } vec3 ACESFilmicToneMapping( vec3 color ) { color *= toneMappingExposure; return saturate( ( color * ( 2.51 * color + 0.03 ) ) / ( color * ( 2.43 * color + 0.59 ) + 0.14 ) ); }`,uv_pars_fragment:`#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) ) varying vec2 vUv; #endif`,uv_pars_vertex:`#ifdef USE_UV #ifdef UVS_VERTEX_ONLY vec2 vUv; #else varying vec2 vUv; #endif uniform mat3 uvTransform; #endif`,uv_vertex:`#ifdef USE_UV vUv = ( uvTransform * vec3( uv, 1 ) ).xy; #endif`,uv2_pars_fragment:`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) varying vec2 vUv2; #endif`,uv2_pars_vertex:`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) attribute vec2 uv2; varying vec2 vUv2; uniform mat3 uv2Transform; #endif`,uv2_vertex:`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy; #endif`,worldpos_vertex:`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_INSTANCING worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; #endif`,background_frag:`uniform sampler2D t2D; varying vec2 vUv; void main() { vec4 texColor = texture2D( t2D, vUv ); gl_FragColor = mapTexelToLinear( texColor ); #include #include }`,background_vert:`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); }`,cube_frag:`#include uniform float opacity; varying vec3 vWorldDirection; #include void main() { vec3 vReflect = vWorldDirection; #include gl_FragColor = envColor; gl_FragColor.a *= opacity; #include #include }`,cube_vert:`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; }`,depth_frag:`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include #include #include #include #include #include #include void main() { #include vec4 diffuseColor = vec4( 1.0 ); #if DEPTH_PACKING == 3200 diffuseColor.a = opacity; #endif #include #include #include #include #if DEPTH_PACKING == 3200 gl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity ); #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( gl_FragCoord.z ); #endif }`,depth_vert:`#include #include #include #include #include #include #include void main() { #include #include #ifdef USE_DISPLACEMENTMAP #include #include #include #endif #include #include #include #include #include #include #include }`,distanceRGBA_frag:`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; varying vec3 vWorldPosition; #include #include #include #include #include #include void main () { #include vec4 diffuseColor = vec4( 1.0 ); #include #include #include float dist = length( vWorldPosition - referencePosition ); dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); }`,distanceRGBA_vert:`#define DISTANCE varying vec3 vWorldPosition; #include #include #include #include #include #include void main() { #include #include #ifdef USE_DISPLACEMENTMAP #include #include #include #endif #include #include #include #include #include #include #include vWorldPosition = worldPosition.xyz; }`,equirect_frag:`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { vec3 direction = normalize( vWorldDirection ); vec2 sampleUV; sampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; sampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5; vec4 texColor = texture2D( tEquirect, sampleUV ); gl_FragColor = mapTexelToLinear( texColor ); #include #include }`,equirect_vert:`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include }`,linedashed_frag:`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; varying float vLineDistance; #include #include #include #include #include void main() { #include if ( mod( vLineDistance, totalSize ) > dashSize ) { discard; } vec3 outgoingLight = vec3( 0.0 ); vec4 diffuseColor = vec4( diffuse, opacity ); #include #include outgoingLight = diffuseColor.rgb; gl_FragColor = vec4( outgoingLight, diffuseColor.a ); #include #include #include #include }`,linedashed_vert:`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include #include #include #include #include void main() { #include vLineDistance = scale * lineDistance; vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 ); gl_Position = projectionMatrix * mvPosition; #include #include #include }`,meshbasic_frag:`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include vec4 diffuseColor = vec4( diffuse, opacity ); #include #include #include #include #include #include ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); #ifdef USE_LIGHTMAP vec4 lightMapTexel= texture2D( lightMap, vUv2 ); reflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity; #else reflectedLight.indirectDiffuse += vec3( 1.0 ); #endif #include reflectedLight.indirectDiffuse *= diffuseColor.rgb; vec3 outgoingLight = reflectedLight.indirectDiffuse; #include gl_FragColor = vec4( outgoingLight, diffuseColor.a ); #include #include #include #include }`,meshbasic_vert:`#include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #ifdef USE_ENVMAP #include #include #include #include #endif #include #include #include #include #include #include #include #include #include }`,meshlambert_frag:`uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; varying vec3 vLightFront; varying vec3 vIndirectFront; #ifdef DOUBLE_SIDED varying vec3 vLightBack; varying vec3 vIndirectBack; #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include vec4 diffuseColor = vec4( diffuse, opacity ); ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); vec3 totalEmissiveRadiance = emissive; #include #include #include #include #include #include #include reflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor ); #ifdef DOUBLE_SIDED reflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack; #else reflectedLight.indirectDiffuse += vIndirectFront; #endif #include reflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ); #ifdef DOUBLE_SIDED reflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack; #else reflectedLight.directDiffuse = vLightFront; #endif reflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask(); #include vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; #include gl_FragColor = vec4( outgoingLight, diffuseColor.a ); #include #include #include #include #include }`,meshlambert_vert:`#define LAMBERT varying vec3 vLightFront; varying vec3 vIndirectFront; #ifdef DOUBLE_SIDED varying vec3 vLightBack; varying vec3 vIndirectBack; #endif #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include }`,meshmatcap_frag:`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; varying vec3 vViewPosition; #ifndef FLAT_SHADED varying vec3 vNormal; #endif #include #include #include #include #include #include #include #include #include void main() { #include vec4 diffuseColor = vec4( diffuse, opacity ); #include #include #include #include #include #include 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 ); matcapColor = matcapTexelToLinear( matcapColor ); #else vec4 matcapColor = vec4( 1.0 ); #endif vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; gl_FragColor = vec4( outgoingLight, diffuseColor.a ); #include #include #include #include }`,meshmatcap_vert:`#define MATCAP varying vec3 vViewPosition; #ifndef FLAT_SHADED varying vec3 vNormal; #endif #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #endif #include #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; }`,meshtoon_frag:`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; uniform float shininess; uniform float opacity; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include vec4 diffuseColor = vec4( diffuse, opacity ); ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); vec3 totalEmissiveRadiance = emissive; #include #include #include #include #include #include #include #include #include #include #include #include #include #include vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; gl_FragColor = vec4( outgoingLight, diffuseColor.a ); #include #include #include #include #include }`,meshtoon_vert:`#define TOON varying vec3 vViewPosition; #ifndef FLAT_SHADED varying vec3 vNormal; #endif #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #endif #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; #include #include #include }`,meshphong_frag:`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; uniform float shininess; uniform float opacity; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include vec4 diffuseColor = vec4( diffuse, opacity ); ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); vec3 totalEmissiveRadiance = emissive; #include #include #include #include #include #include #include #include #include #include #include #include #include #include vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; #include gl_FragColor = vec4( outgoingLight, diffuseColor.a ); #include #include #include #include #include }`,meshphong_vert:`#define PHONG varying vec3 vViewPosition; #ifndef FLAT_SHADED varying vec3 vNormal; #endif #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #endif #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; #include #include #include #include }`,meshphysical_frag:`#define STANDARD #ifdef PHYSICAL #define REFLECTIVITY #define CLEARCOAT #define TRANSPARENCY #endif uniform vec3 diffuse; uniform vec3 emissive; uniform float roughness; uniform float metalness; uniform float opacity; #ifdef TRANSPARENCY uniform float transparency; #endif #ifdef REFLECTIVITY uniform float reflectivity; #endif #ifdef CLEARCOAT uniform float clearcoat; uniform float clearcoatRoughness; #endif #ifdef USE_SHEEN uniform vec3 sheen; #endif varying vec3 vViewPosition; #ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include vec4 diffuseColor = vec4( diffuse, opacity ); ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); vec3 totalEmissiveRadiance = emissive; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; #ifdef TRANSPARENCY diffuseColor.a *= saturate( 1. - transparency + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) ); #endif gl_FragColor = vec4( outgoingLight, diffuseColor.a ); #include #include #include #include #include }`,meshphysical_vert:`#define STANDARD varying vec3 vViewPosition; #ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif #endif #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif #endif #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; #include #include #include }`,normal_frag:`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) varying vec3 vViewPosition; #endif #ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif #endif #include #include #include #include #include #include void main() { #include #include #include #include gl_FragColor = vec4( packNormalToRGB( normal ), opacity ); }`,normal_vert:`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) varying vec3 vViewPosition; #endif #ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif #endif #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif #endif #include #include #include #include #include #include #include #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) vViewPosition = - mvPosition.xyz; #endif }`,points_frag:`uniform vec3 diffuse; uniform float opacity; #include #include #include #include #include #include void main() { #include vec3 outgoingLight = vec3( 0.0 ); vec4 diffuseColor = vec4( diffuse, opacity ); #include #include #include #include outgoingLight = diffuseColor.rgb; gl_FragColor = vec4( outgoingLight, diffuseColor.a ); #include #include #include #include }`,points_vert:`uniform float size; uniform float scale; #include #include #include #include #include #include void main() { #include #include #include #include gl_PointSize = size; #ifdef USE_SIZEATTENUATION bool isPerspective = isPerspectiveMatrix( projectionMatrix ); if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); #endif #include #include #include #include }`,shadow_frag:`uniform vec3 color; uniform float opacity; #include #include #include #include #include #include #include void main() { gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); #include #include #include }`,shadow_vert:`#include #include void main() { #include #include #include #include #include }`,sprite_frag:`uniform vec3 diffuse; uniform float opacity; #include #include #include #include #include #include #include void main() { #include vec3 outgoingLight = vec3( 0.0 ); vec4 diffuseColor = vec4( diffuse, opacity ); #include #include #include #include outgoingLight = diffuseColor.rgb; gl_FragColor = vec4( outgoingLight, diffuseColor.a ); #include #include #include }`,sprite_vert:`uniform float rotation; uniform vec2 center; #include #include #include #include #include void main() { #include vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); vec2 scale; scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); #ifndef USE_SIZEATTENUATION bool isPerspective = isPerspectiveMatrix( projectionMatrix ); if ( isPerspective ) scale *= - mvPosition.z; #endif vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; vec2 rotatedPosition; rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; mvPosition.xy += rotatedPosition; gl_Position = projectionMatrix * mvPosition; #include #include #include }`},Xd={basic:{uniforms:kc([Ts.common,Ts.specularmap,Ts.envmap,Ts.aomap,Ts.lightmap,Ts.fog]),vertexShader:ql.meshbasic_vert,fragmentShader:ql.meshbasic_frag},lambert:{uniforms:kc([Ts.common,Ts.specularmap,Ts.envmap,Ts.aomap,Ts.lightmap,Ts.emissivemap,Ts.fog,Ts.lights,{emissive:{value:new la(0)}}]),vertexShader:ql.meshlambert_vert,fragmentShader:ql.meshlambert_frag},phong:{uniforms:kc([Ts.common,Ts.specularmap,Ts.envmap,Ts.aomap,Ts.lightmap,Ts.emissivemap,Ts.bumpmap,Ts.normalmap,Ts.displacementmap,Ts.fog,Ts.lights,{emissive:{value:new la(0)},specular:{value:new la(1118481)},shininess:{value:30}}]),vertexShader:ql.meshphong_vert,fragmentShader:ql.meshphong_frag},standard:{uniforms:kc([Ts.common,Ts.envmap,Ts.aomap,Ts.lightmap,Ts.emissivemap,Ts.bumpmap,Ts.normalmap,Ts.displacementmap,Ts.roughnessmap,Ts.metalnessmap,Ts.fog,Ts.lights,{emissive:{value:new la(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:ql.meshphysical_vert,fragmentShader:ql.meshphysical_frag},toon:{uniforms:kc([Ts.common,Ts.specularmap,Ts.aomap,Ts.lightmap,Ts.emissivemap,Ts.bumpmap,Ts.normalmap,Ts.displacementmap,Ts.gradientmap,Ts.fog,Ts.lights,{emissive:{value:new la(0)},specular:{value:new la(1118481)},shininess:{value:30}}]),vertexShader:ql.meshtoon_vert,fragmentShader:ql.meshtoon_frag},matcap:{uniforms:kc([Ts.common,Ts.bumpmap,Ts.normalmap,Ts.displacementmap,Ts.fog,{matcap:{value:null}}]),vertexShader:ql.meshmatcap_vert,fragmentShader:ql.meshmatcap_frag},points:{uniforms:kc([Ts.points,Ts.fog]),vertexShader:ql.points_vert,fragmentShader:ql.points_frag},dashed:{uniforms:kc([Ts.common,Ts.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ql.linedashed_vert,fragmentShader:ql.linedashed_frag},depth:{uniforms:kc([Ts.common,Ts.displacementmap]),vertexShader:ql.depth_vert,fragmentShader:ql.depth_frag},normal:{uniforms:kc([Ts.common,Ts.bumpmap,Ts.normalmap,Ts.displacementmap,{opacity:{value:1}}]),vertexShader:ql.normal_vert,fragmentShader:ql.normal_frag},sprite:{uniforms:kc([Ts.sprite,Ts.fog]),vertexShader:ql.sprite_vert,fragmentShader:ql.sprite_frag},background:{uniforms:{uvTransform:{value:new Vl},t2D:{value:null}},vertexShader:ql.background_vert,fragmentShader:ql.background_frag},cube:{uniforms:kc([Ts.envmap,{opacity:{value:1}}]),vertexShader:ql.cube_vert,fragmentShader:ql.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ql.equirect_vert,fragmentShader:ql.equirect_frag},distanceRGBA:{uniforms:kc([Ts.common,Ts.displacementmap,{referencePosition:{value:new yi},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ql.distanceRGBA_vert,fragmentShader:ql.distanceRGBA_frag},shadow:{uniforms:kc([Ts.lights,Ts.fog,{color:{value:new la(0)},opacity:{value:1}}]),vertexShader:ql.shadow_vert,fragmentShader:ql.shadow_frag}};function Kl(f,E,W,ge){var ct,gt,St=new la(0),Pt=0,sn=null,ln=0,Sn=null;function En(On,mn){E.buffers.color.setClear(On.r,On.g,On.b,mn,ge)}return{getClearColor:function(){return St},setClearColor:function(On,mn){St.set(On),En(St,Pt=mn!==void 0?mn:1)},getClearAlpha:function(){return Pt},setClearAlpha:function(On){En(St,Pt=On)},render:function(On,mn,Hn,mr){var _r=mn.background,gi=f.xr,Ci=gi.getSession&&gi.getSession();if(Ci&&Ci.environmentBlendMode==="additive"&&(_r=null),_r===null?En(St,Pt):_r&&_r.isColor&&(En(_r,1),mr=!0),(f.autoClear||mr)&&f.clear(f.autoClearColor,f.autoClearDepth,f.autoClearStencil),_r&&(_r.isCubeTexture||_r.isWebGLCubeRenderTarget||_r.mapping===fi)){gt===void 0&&((gt=new lu(new Zo(1,1,1),new Ld({type:"BackgroundCubeMaterial",uniforms:Xh(Xd.cube.uniforms),vertexShader:Xd.cube.vertexShader,fragmentShader:Xd.cube.fragmentShader,side:q,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),gt.geometry.deleteAttribute("uv"),gt.onBeforeRender=function(da,ji,Sa){this.matrixWorld.copyPosition(Sa.matrixWorld)},Object.defineProperty(gt.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),W.update(gt));var $i=_r.isWebGLCubeRenderTarget?_r.texture:_r;gt.material.uniforms.envMap.value=$i,gt.material.uniforms.flipEnvMap.value=$i.isCubeTexture?-1:1,sn===_r&&ln===$i.version&&Sn===f.toneMapping||(gt.material.needsUpdate=!0,sn=_r,ln=$i.version,Sn=f.toneMapping),On.unshift(gt,gt.geometry,gt.material,0,0,null)}else _r&&_r.isTexture&&(ct===void 0&&((ct=new lu(new Qh(2,2),new Ld({type:"BackgroundMaterial",uniforms:Xh(Xd.background.uniforms),vertexShader:Xd.background.vertexShader,fragmentShader:Xd.background.fragmentShader,side:G,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),Object.defineProperty(ct.material,"map",{get:function(){return this.uniforms.t2D.value}}),W.update(ct)),(ct.material.uniforms.t2D.value=_r).matrixAutoUpdate===!0&&_r.updateMatrix(),ct.material.uniforms.uvTransform.value.copy(_r.matrix),sn===_r&&ln===_r.version&&Sn===f.toneMapping||(ct.material.needsUpdate=!0,ln=(sn=_r).version,Sn=f.toneMapping),On.unshift(ct,ct.geometry,ct.material,0,0,null))}}}function Vp(f,E){return Math.abs(E[1])-Math.abs(f[1])}function ep(f,E,W,ge,ct,gt,St,Pt,sn,ln){Ql.call(this,f=f!==void 0?f:[],E=E!==void 0?E:ia,W,ge,ct,gt,St=St!==void 0?St:il,Pt,sn,ln),this.flipY=!1}function Df(f,E,W,ge){Ql.call(this,null),this.image={data:f||null,width:E||1,height:W||1,depth:ge||1},this.magFilter=un,this.minFilter=un,this.wrapR=Nn,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}function xd(f,E,W,ge){Ql.call(this,null),this.image={data:f||null,width:E||1,height:W||1,depth:ge||1},this.magFilter=un,this.minFilter=un,this.wrapR=Nn,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}Xd.physical={uniforms:kc([Xd.standard.uniforms,{transparency:{value:0},clearcoat:{value:0},clearcoatRoughness:{value:0},sheen:{value:new la(0)},clearcoatNormalScale:{value:new co(1,1)},clearcoatNormalMap:{value:null}}]),vertexShader:ql.meshphysical_vert,fragmentShader:ql.meshphysical_frag},((ep.prototype=Object.create(Ql.prototype)).constructor=ep).prototype.isCubeTexture=!0,Object.defineProperty(ep.prototype,"images",{get:function(){return this.image},set:function(f){this.image=f}}),((Df.prototype=Object.create(Ql.prototype)).constructor=Df).prototype.isDataTexture2DArray=!0,((xd.prototype=Object.create(Ql.prototype)).constructor=xd).prototype.isDataTexture3D=!0;var rf=new Ql,af=new Df,Yf=new xd,fp=new ep,Zf=[],pd=[],gh=new Float32Array(16),Np=new Float32Array(9),Im=new Float32Array(4);function Rh(f,E,W){var ge=f[0];if(ge<=0||0/gm;function na(f){return f.replace(To,Eo)}function Eo(f,E){var W=ql[E];if(W===void 0)throw new Error("Can not resolve #include <"+E+">");return na(W)}var So=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g;function Qo(f){return f.replace(So,Za)}function Za(f,E,W,ge){for(var ct="",gt=parseInt(E);gt void main() { float mean = 0.0; float squared_mean = 0.0; float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) ); for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) { #ifdef HORIZONAL_PASS vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 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, i ) * radius ) / resolution ) ); mean += depth; squared_mean += depth * depth; #endif } mean = mean * HALF_SAMPLE_RATE; squared_mean = squared_mean * HALF_SAMPLE_RATE; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); }`,sh=`void main() { gl_Position = vec4( position, 1.0 ); }`;function yh(f,E,W){var ge=new Ih,ct=new co,gt=new co,St=new Ll,Pt=[],sn=[],ln={},Sn={0:q,1:G,2:J},En=new Ld({defines:{SAMPLE_RATE:.25,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new co},radius:{value:4}},vertexShader:sh,fragmentShader:Ud}),On=En.clone();On.defines.HORIZONAL_PASS=1;var mn=new Ds;mn.setAttribute("position",new ca(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var Hn=new lu(mn,En),mr=this;function _r(ji,Sa){var ea=E.update(Hn);En.uniforms.shadow_pass.value=ji.map.texture,En.uniforms.resolution.value=ji.mapSize,En.uniforms.radius.value=ji.radius,f.setRenderTarget(ji.mapPass),f.clear(),f.renderBufferDirect(Sa,null,ea,En,Hn,null),On.uniforms.shadow_pass.value=ji.mapPass.texture,On.uniforms.resolution.value=ji.mapSize,On.uniforms.radius.value=ji.radius,f.setRenderTarget(ji.map),f.clear(),f.renderBufferDirect(Sa,null,ea,On,Hn,null)}function gi(ji,Sa,ea){var Ba=ji<<0|Sa<<1|ea<<2,Ya=Pt[Ba];return Ya===void 0&&(Ya=new _c({depthPacking:Jl,morphTargets:ji,skinning:Sa}),Pt[Ba]=Ya),Ya}function Ci(ji,Sa,ea){var Ba=ji<<0|Sa<<1|ea<<2,Ya=sn[Ba];return Ya===void 0&&(Ya=new Bc({morphTargets:ji,skinning:Sa}),sn[Ba]=Ya),Ya}function $i(ji,Sa,ea,Ba,Ya,ro){var $a=ji.geometry,go=null,ko=gi,Qa=ji.customDepthMaterial;if(ea.isPointLight===!0&&(ko=Ci,Qa=ji.customDistanceMaterial),Qa===void 0){var Ha=!1;Sa.morphTargets===!0&&($a.isBufferGeometry===!0?Ha=$a.morphAttributes&&$a.morphAttributes.position&&0<$a.morphAttributes.position.length:$a.isGeometry===!0&&(Ha=$a.morphTargets&&0<$a.morphTargets.length));var fs=!1;ji.isSkinnedMesh===!0&&(Sa.skinning===!0?fs=!0:console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",ji)),go=ko(Ha,fs,ji.isInstancedMesh===!0)}else go=Qa;if(f.localClippingEnabled&&Sa.clipShadows===!0&&Sa.clippingPlanes.length!==0){var os=go.uuid,Ks=Sa.uuid,Xs=ln[os];Xs===void 0&&(Xs={},ln[os]=Xs);var zs=Xs[Ks];zs===void 0&&(zs=go.clone(),Xs[Ks]=zs),go=zs}return go.visible=Sa.visible,go.wireframe=Sa.wireframe,go.side=ro===L?Sa.shadowSide!==null?Sa.shadowSide:Sa.side:Sa.shadowSide!==null?Sa.shadowSide:Sn[Sa.side],go.clipShadows=Sa.clipShadows,go.clippingPlanes=Sa.clippingPlanes,go.clipIntersection=Sa.clipIntersection,go.wireframeLinewidth=Sa.wireframeLinewidth,go.linewidth=Sa.linewidth,ea.isPointLight===!0&&go.isMeshDistanceMaterial===!0&&(go.referencePosition.setFromMatrixPosition(ea.matrixWorld),go.nearDistance=Ba,go.farDistance=Ya),go}function da(ji,Sa,ea,Ba,Ya){if(ji.visible!==!1){if(ji.layers.test(Sa.layers)&&(ji.isMesh||ji.isLine||ji.isPoints)&&(ji.castShadow||ji.receiveShadow&&Ya===L)&&(!ji.frustumCulled||ge.intersectsObject(ji))){ji.modelViewMatrix.multiplyMatrices(ea.matrixWorldInverse,ji.matrixWorld);var ro=E.update(ji),$a=ji.material;if(Array.isArray($a))for(var go=ro.groups,ko=0,Qa=go.length;koW||ct.y>W)&&(console.warn("THREE.WebGLShadowMap:",Qa,"has shadow exceeding max texture size, reducing"),ct.x>W&&(gt.x=Math.floor(W/fs.x),ct.x=gt.x*fs.x,Ha.mapSize.x=gt.x),ct.y>W&&(gt.y=Math.floor(W/fs.y),ct.y=gt.y*fs.y,Ha.mapSize.y=gt.y)),Ha.map===null&&!Ha.isPointLightShadow&&this.type===L){var os={minFilter:hi,magFilter:hi,format:zr};Ha.map=new Au(ct.x,ct.y,os),Ha.map.texture.name=Qa.name+".shadowMap",Ha.mapPass=new Au(ct.x,ct.y,os),Ha.camera.updateProjectionMatrix()}Ha.map===null&&(os={minFilter:un,magFilter:un,format:zr},Ha.map=new Au(ct.x,ct.y,os),Ha.map.texture.name=Qa.name+".shadowMap",Ha.camera.updateProjectionMatrix()),f.setRenderTarget(Ha.map),f.clear();for(var Ks=Ha.getViewportCount(),Xs=0;XsCo||Ii.height>Co)&&(Cl=Co/Math.max(Ii.width,Ii.height)),Cl<1||va===!0){if(typeof HTMLImageElement<"u"&&Ii instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&Ii instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&Ii instanceof ImageBitmap){var Us=va?js.floorPowerOfTwo:Math.floor,eo=Us(Cl*Ii.width),Hs=Us(Cl*Ii.height);Pt===void 0&&(Pt=mr(eo,Hs));var Dl=Bo?mr(eo,Hs):Pt;return Dl.width=eo,Dl.height=Hs,Dl.getContext("2d").drawImage(Ii,0,0,eo,Hs),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Ii.width+"x"+Ii.height+") to ("+eo+"x"+Hs+")."),Dl}return"data"in Ii&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Ii.width+"x"+Ii.height+")."),Ii}return Ii}function gi(Ii){return js.isPowerOfTwo(Ii.width)&&js.isPowerOfTwo(Ii.height)}function Ci(Ii,va){return Ii.generateMipmaps&&va&&Ii.minFilter!==un&&Ii.minFilter!==hi}function $i(Ii,va,Bo,Co){f.generateMipmap(Ii),ge.get(va).__maxMipLevel=Math.log(Math.max(Bo,Co))*Math.LOG2E}function da(Ii,va,Bo){if(sn===!1)return va;if(Ii!==null){if(f[Ii]!==void 0)return f[Ii];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+Ii+"'")}var Co=va;return va===6403&&(Bo===5126&&(Co=33326),Bo===5131&&(Co=33325),Bo===5121&&(Co=33321)),va===6407&&(Bo===5126&&(Co=34837),Bo===5131&&(Co=34843),Bo===5121&&(Co=32849)),va===6408&&(Bo===5126&&(Co=34836),Bo===5131&&(Co=34842),Bo===5121&&(Co=32856)),Co===33325||Co===33326||Co===34842||Co===34836?E.get("EXT_color_buffer_float"):Co!==34843&&Co!==34837||console.warn("THREE.WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead."),Co}function ji(Ii){return Ii===un||Ii===Ln||Ii===hr?9728:9729}function Sa(Ii){var va=Ii.target;va.removeEventListener("dispose",Sa),function(Bo){var Co=ge.get(Bo);Co.__webglInit!==void 0&&(f.deleteTexture(Co.__webglTexture),ge.remove(Bo))}(va),va.isVideoTexture&&mn.delete(va),St.memory.textures--}function ea(Ii){var va=Ii.target;va.removeEventListener("dispose",ea),function(Bo){var Co=ge.get(Bo),Cl=ge.get(Bo.texture);if(Bo){if(Cl.__webglTexture!==void 0&&f.deleteTexture(Cl.__webglTexture),Bo.depthTexture&&Bo.depthTexture.dispose(),Bo.isWebGLCubeRenderTarget)for(var Us=0;Us<6;Us++)f.deleteFramebuffer(Co.__webglFramebuffer[Us]),Co.__webglDepthbuffer&&f.deleteRenderbuffer(Co.__webglDepthbuffer[Us]);else f.deleteFramebuffer(Co.__webglFramebuffer),Co.__webglDepthbuffer&&f.deleteRenderbuffer(Co.__webglDepthbuffer);if(Bo.isWebGLMultiviewRenderTarget){f.deleteTexture(Co.__webglColorTexture),f.deleteTexture(Co.__webglDepthStencilTexture),St.memory.textures-=2,Us=0;for(var eo=Co.__webglViewFramebuffers.length;Usrl)return!1;for(var k=1,X=_.length;kf.far||E.push({distance:Pt,point:lf.clone(),uv:qu.getUV(lf,wd,vh,uf,T3,Qf,J3,new co),face:null,object:this})}},clone:function(){return new this.constructor(this.material).copy(this)},copy:function(f){return Ri.prototype.copy.call(this,f),f.center!==void 0&&this.center.copy(f.center),this}});var cf=new yi,kf=new yi;function yp(){Ri.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}function _h(f,E){f&&f.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),lu.call(this,f,E),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Vo,this.bindMatrixInverse=new Vo}yp.prototype=Object.assign(Object.create(Ri.prototype),{constructor:yp,isLOD:!0,copy:function(f){Ri.prototype.copy.call(this,f,!1);for(var E=f.levels,W=0,ge=E.length;W=E[ge].distance;ge++)E[ge-1].object.visible=!1,E[ge].object.visible=!0;for(;gef.far||E.push({distance:ji,point:ln.clone().applyMatrix4(this.matrixWorld),index:mr,face:null,faceIndex:null,object:this}))}else for(mr=0,_r=mn.length/3-1;mr<_r;mr+=En)Pt.fromArray(mn,3*mr),sn.fromArray(mn,3*mr+3),Stf.far||E.push({distance:ji,point:ln.clone().applyMatrix4(this.matrixWorld),index:mr,face:null,faceIndex:null,object:this}))}else if(ge.isGeometry){var $i=ge.vertices,da=$i.length;for(mr=0;mrf.far||E.push({distance:ji,point:ln.clone().applyMatrix4(this.matrixWorld),index:mr,face:null,faceIndex:null,object:this}))}}}},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}});var tm=new yi,_u=new yi;function xc(f,E){Hc.call(this,f,E),this.type="LineSegments"}function Pf(f,E){Hc.call(this,f,E),this.type="LineLoop"}function ch(f){ii.call(this),this.type="PointsMaterial",this.color=new la(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(f)}xc.prototype=Object.assign(Object.create(Hc.prototype),{constructor:xc,isLineSegments:!0,computeLineDistances:function(){var f=this.geometry;if(f.isBufferGeometry)if(f.index===null){for(var E=f.attributes.position,W=[],ge=0,ct=E.count;gect.far)return;gt.push({distance:ln,distanceToRay:Math.sqrt(Pt),point:sn,index:E,face:null,object:St})}}function Wp(f,E,W,ge,ct,gt,St,Pt,sn){Ql.call(this,f,E,W,ge,ct,gt,St,Pt,sn),this.format=St!==void 0?St:il,this.minFilter=gt!==void 0?gt:hi,this.magFilter=ct!==void 0?ct:hi,this.generateMipmaps=!1}function nm(f,E,W,ge,ct,gt,St,Pt,sn,ln,Sn,En){Ql.call(this,null,gt,St,Pt,sn,ln,ge,ct,Sn,En),this.image={width:E,height:W},this.mipmaps=f,this.flipY=!1,this.generateMipmaps=!1}function Nm(f,E,W,ge,ct,gt,St,Pt,sn){Ql.call(this,f,E,W,ge,ct,gt,St,Pt,sn),this.needsUpdate=!0}function rm(f,E,W,ge,ct,gt,St,Pt,sn,ln){if((ln=ln!==void 0?ln:ni)!==ni&&ln!==Ei)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");W===void 0&&ln===ni&&(W=Ni),W===void 0&&ln===Ei&&(W=_o),Ql.call(this,null,ge,ct,gt,St,Pt,ln,W,sn),this.image={width:f,height:E},this.magFilter=St!==void 0?St:un,this.minFilter=Pt!==void 0?Pt:un,this.flipY=!1,this.generateMipmaps=!1}function im(f){Ds.call(this),this.type="WireframeGeometry";var E,W,ge,ct,gt,St,Pt,sn,ln,Sn,En=[],On=[0,0],mn={},Hn=["a","b","c"];if(f&&f.isGeometry){var mr=f.faces;for(E=0,ge=mr.length;Egt.x?ct.x>St.x?ct.x:St.x:gt.x>St.x?gt.x:St.x,Sn=ct.y>gt.y?ct.y>St.y?ct.y:St.y:gt.y>St.y?gt.y:St.y,En=ld(Pt,sn,E,W,ge),On=ld(ln,Sn,E,W,ge),mn=f.prevZ,Hn=f.nextZ;mn&&mn.z>=En&&Hn&&Hn.z<=On;){if(mn!==f.prev&&mn!==f.next&&Ch(ct.x,ct.y,gt.x,gt.y,St.x,St.y,mn.x,mn.y)&&0<=Cu(mn.prev,mn,mn.next)||(mn=mn.prevZ,Hn!==f.prev&&Hn!==f.next&&Ch(ct.x,ct.y,gt.x,gt.y,St.x,St.y,Hn.x,Hn.y)&&0<=Cu(Hn.prev,Hn,Hn.next)))return;Hn=Hn.nextZ}for(;mn&&mn.z>=En;){if(mn!==f.prev&&mn!==f.next&&Ch(ct.x,ct.y,gt.x,gt.y,St.x,St.y,mn.x,mn.y)&&0<=Cu(mn.prev,mn,mn.next))return;mn=mn.prevZ}for(;Hn&&Hn.z<=On;){if(Hn!==f.prev&&Hn!==f.next&&Ch(ct.x,ct.y,gt.x,gt.y,St.x,St.y,Hn.x,Hn.y)&&0<=Cu(Hn.prev,Hn,Hn.next))return;Hn=Hn.nextZ}return 1}}function sm(f,E,W){var ge=f;do{var ct=ge.prev,gt=ge.next.next;!xp(ct,gt)&&Ru(ct,ge,ge.next,gt)&&Gm(ct,gt)&&Gm(gt,ct)&&(E.push(ct.i/W),E.push(ge.i/W),E.push(gt.i/W),um(ge),um(ge.next),ge=f=gt),ge=ge.next}while(ge!==f);return ge}function A3(f,E,W,ge,ct,gt){var St,Pt,sn=f;do{for(var ln=sn.next.next;ln!==sn.prev;){if(sn.i!==ln.i&&(Pt=ln,(St=sn).next.i!==Pt.i&&St.prev.i!==Pt.i&&!function(En,On){var mn=En;do{if(mn.i!==En.i&&mn.next.i!==En.i&&mn.i!==On.i&&mn.next.i!==On.i&&Ru(mn,mn.next,En,On))return 1;mn=mn.next}while(mn!==En)}(St,Pt)&&Gm(St,Pt)&&Gm(Pt,St)&&function(En,On){for(var mn=En,Hn=!1,mr=(En.x+On.x)/2,_r=(En.y+On.y)/2;mn.y>_r!=mn.next.y>_r&&mn.next.y!==mn.y&&mr<(mn.next.x-mn.x)*(_r-mn.y)/(mn.next.y-mn.y)+mn.x&&(Hn=!Hn),(mn=mn.next)!==En;);return Hn}(St,Pt))){var Sn=Um(sn,ln);return sn=_p(sn,sn.next),Sn=_p(Sn,Sn.next),Lf(sn,E,W,ge,ct,gt),void Lf(Sn,E,W,ge,ct,gt)}ln=ln.next}sn=sn.next}while(sn!==f)}function hh(f,E){return f.x-E.x}function k3(f,E){if(E=function(ge,ct){var gt,St=ct,Pt=ge.x,sn=ge.y,ln=-1/0;do{if(sn<=St.y&&sn>=St.next.y&&St.next.y!==St.y){var Sn=St.x+(sn-St.y)*(St.next.x-St.x)/(St.next.y-St.y);if(Sn<=Pt&&ln=St.x&&St.x>=mn&&Pt!==St.x&&Ch(sngt.x)&&Gm(St,ge)&&(gt=St,mr=En),St=St.next;return gt}(f,E)){var W=Um(E,f);_p(W,W.next)}}function ld(f,E,W,ge,ct){return(f=1431655765&((f=858993459&((f=252645135&((f=16711935&((f=32767*(f-W)*ct)|f<<8))|f<<4))|f<<2))|f<<1))|(E=1431655765&((E=858993459&((E=252645135&((E=16711935&((E=32767*(E-ge)*ct)|E<<8))|E<<4))|E<<2))|E<<1))<<1}function Zl(f){for(var E=f,W=f;(E.x=f.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),((nm.prototype=Object.create(Ql.prototype)).constructor=nm).prototype.isCompressedTexture=!0,((Nm.prototype=Object.create(Ql.prototype)).constructor=Nm).prototype.isCanvasTexture=!0,((rm.prototype=Object.create(Ql.prototype)).constructor=rm).prototype.isDepthTexture=!0,(im.prototype=Object.create(Ds.prototype)).constructor=im,(dh.prototype=Object.create(ul.prototype)).constructor=dh,(bh.prototype=Object.create(Ds.prototype)).constructor=bh,(vp.prototype=Object.create(ul.prototype)).constructor=vp,(Yc.prototype=Object.create(Ds.prototype)).constructor=Yc,(kl.prototype=Object.create(ul.prototype)).constructor=kl,(Rf.prototype=Object.create(Yc.prototype)).constructor=Rf,(Md.prototype=Object.create(ul.prototype)).constructor=Md,(Dc.prototype=Object.create(Yc.prototype)).constructor=Dc,(zh.prototype=Object.create(ul.prototype)).constructor=zh,(zm.prototype=Object.create(Yc.prototype)).constructor=zm,(hf.prototype=Object.create(ul.prototype)).constructor=hf,(wh.prototype=Object.create(Yc.prototype)).constructor=wh,(Of.prototype=Object.create(ul.prototype)).constructor=Of,((qp.prototype=Object.create(Ds.prototype)).constructor=qp).prototype.toJSON=function(){var f=Ds.prototype.toJSON.call(this);return f.path=this.parameters.path.toJSON(),f},(bc.prototype=Object.create(ul.prototype)).constructor=bc,($u.prototype=Object.create(Ds.prototype)).constructor=$u,(am.prototype=Object.create(ul.prototype)).constructor=am,(om.prototype=Object.create(Ds.prototype)).constructor=om;var bp={area:function(f){for(var E=f.length,W=0,ge=E-1,ct=0;ct80*Sn){En=mn=sn[0],On=Hn=sn[1];for(var Sa=Sn;Sa<$i;Sa+=Sn)(mr=sn[Sa])Number.EPSILON){var Dm=Math.sqrt(o3),Em=Math.sqrt(Ap*Ap+wf*wf),Am=Zu.x-ph/Dm,s3=Zu.y+zd/Dm,Uh=((xu.x-wf/Em-Am)*wf-(xu.y+Ap/Em-s3)*Ap)/(zd*wf-ph*Ap),K3=(Oc=Am+zd*Uh-nu.x)*Oc+(zu=s3+ph*Uh-nu.y)*zu;if(K3<=2)return new co(Oc,zu);rd=Math.sqrt(K3/2)}else{var $h=!1;zd>Number.EPSILON?Ap>Number.EPSILON&&($h=!0):zd<-Number.EPSILON?Ap<-Number.EPSILON&&($h=!0):Math.sign(ph)===Math.sign(wf)&&($h=!0),rd=$h?(Oc=-ph,zu=zd,Math.sqrt(o3)):(Oc=zd,zu=ph,Math.sqrt(o3/2))}return new co(Oc/rd,zu/rd)}for(var Us=[],eo=0,Hs=os.length,Dl=Hs-1,Pa=eo+1;eogt.tracks[Pt].times[0]&&(mr=gt.tracks[Pt].times[0]);for(Pt=0;Pt>>1;fE;)--gt;if(++gt,ct!==0||gt!==ge){gt<=ct&&(ct=(gt=Math.max(gt,1))-1);var St=this.getValueSize();this.times=Nc.arraySlice(W,ct,gt),this.values=Nc.arraySlice(this.values,ct*St,gt*St)}return this},validate:function(){var f=!0,E=this.getValueSize();E-Math.floor(E)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),f=!1);var W=this.times,ge=this.values,ct=W.length;ct===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),f=!1);for(var gt=null,St=0;St!==ct;St++){var Pt=W[St];if(typeof Pt=="number"&&isNaN(Pt)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,St,Pt),f=!1;break}if(gt!==null&&PtNumber.EPSILON&&(ln.normalize(),ct=Math.acos(js.clamp(St[W-1].dot(St[W]),-1,1)),Pt[W].applyMatrix4(Sn.makeRotationAxis(ln,ct))),sn[W].crossVectors(St[W],Pt[W]);if(E===!0)for(ct=Math.acos(js.clamp(Pt[0].dot(Pt[f]),-1,1)),ct/=f,0ge.length-2?ge.length-1:gt+1],Sn=ge[gt>ge.length-3?ge.length-1:gt+2];return W.set(Ms(St,Pt.x,sn.x,ln.x,Sn.x),Ms(St,Pt.y,sn.y,ln.y,Sn.y)),W},pu.prototype.copy=function(f){Oa.prototype.copy.call(this,f),this.points=[];for(var E=0,W=f.points.length;E=E){var ct=W[ge]-E,gt=this.curves[ge],St=gt.getLength(),Pt=St===0?0:1-ct/St;return gt.getPointAt(Pt)}ge++}return null},getLength:function(){var f=this.getCurveLengths();return f[f.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var f=[],E=0,W=0,ge=this.curves.length;W"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),Ze.call(this,f),this.options=void 0}function lg(){this.type="ShapePath",this.color=new la,this.subPaths=[],this.currentPath=null}function ug(f){this.type="Font",this.data=f}function r0(f,E,W,ge,ct){var gt=ct.glyphs[f]||ct.glyphs["?"];if(gt){var St,Pt,sn,ln,Sn,En,On,mn,Hn=new lg;if(gt.o)for(var mr=gt._cachedOutline||(gt._cachedOutline=gt.o.split(" ")),_r=0,gi=mr.length;_rNumber.EPSILON){if(va<0&&(gl=fs[zs],Ii=-Ii,Os=fs[Xs],va=-va),Ha.yOs.y)continue;if(Ha.y===gl.y){if(Ha.x===gl.x)return 1}else{var Bo=va*(Ha.x-gl.x)-Ii*(Ha.y-gl.y);if(Bo==0)return 1;if(Bo<0)continue;Ks=!Ks}}else{if(Ha.y!==gl.y)continue;if(Os.x<=Ha.x&&Ha.x<=gl.x||gl.x<=Ha.x&&Ha.x<=Os.x)return 1}}return Ks}var ct=bp.isClockWise,gt=this.subPaths;if(gt.length===0)return[];if(E===!0)return W(gt);var St,Pt,sn,ln=[];if(gt.length===1)return Pt=gt[0],(sn=new th).curves=Pt.curves,ln.push(sn),ln;var Sn=!ct(gt[0].getPoints());Sn=f?!Sn:Sn;var En,On,mn=[],Hn=[],mr=[],_r=0;Hn[_r]=void 0,mr[_r]=[];for(var gi=0,Ci=gt.length;gi"u"?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var f=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var E=(typeof performance>"u"?Date:performance).now();f=(E-this.oldTime)/1e3,this.oldTime=E,this.elapsedTime+=f}return f}});var Jm=new yi,i0=new Wu,B3=new yi,Qm=new yi;function zg(){Ri.call(this),this.type="AudioListener",this.context=Vg.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new _m}function e3(f){Ri.call(this),this.type="Audio",this.listener=f,this.context=f.context,this.gain=this.context.createGain(),this.gain.connect(f.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this._startedAt=0,this._pausedAt=0,this.filters=[]}zg.prototype=Object.assign(Object.create(Ri.prototype),{constructor:zg,getInput:function(){return this.gain},removeFilter:function(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this},getFilter:function(){return this.filter},setFilter:function(f){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=f,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(f){return this.gain.gain.setTargetAtTime(f,this.context.currentTime,.01),this},updateMatrixWorld:function(f){Ri.prototype.updateMatrixWorld.call(this,f);var E=this.context.listener,W=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Jm,i0,B3),Qm.set(0,0,-1).applyQuaternion(i0),E.positionX){var ge=this.context.currentTime+this.timeDelta;E.positionX.linearRampToValueAtTime(Jm.x,ge),E.positionY.linearRampToValueAtTime(Jm.y,ge),E.positionZ.linearRampToValueAtTime(Jm.z,ge),E.forwardX.linearRampToValueAtTime(Qm.x,ge),E.forwardY.linearRampToValueAtTime(Qm.y,ge),E.forwardZ.linearRampToValueAtTime(Qm.z,ge),E.upX.linearRampToValueAtTime(W.x,ge),E.upY.linearRampToValueAtTime(W.y,ge),E.upZ.linearRampToValueAtTime(W.z,ge)}else E.setPosition(Jm.x,Jm.y,Jm.z),E.setOrientation(Qm.x,Qm.y,Qm.z,W.x,W.y,W.z)}}),e3.prototype=Object.assign(Object.create(Ri.prototype),{constructor:e3,getOutput:function(){return this.gain},setNodeSource:function(f){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=f,this.connect(),this},setMediaElementSource:function(f){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(f),this.connect(),this},setMediaStreamSource:function(f){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(f),this.connect(),this},setBuffer:function(f){return this.buffer=f,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(f){if(f===void 0&&(f=0),this.isPlaying!==!0){if(this.hasPlaybackControl!==!1){this._startedAt=this.context.currentTime+f;var E=this.context.createBufferSource();return E.buffer=this.buffer,E.loop=this.loop,E.loopStart=this.loopStart,E.loopEnd=this.loopEnd,E.onended=this.onEnded.bind(this),E.start(this._startedAt,this._pausedAt+this.offset,this.duration),this.isPlaying=!0,this.source=E,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(this.hasPlaybackControl!==!1)return this.isPlaying===!0&&(this._pausedAt=(this.context.currentTime-this._startedAt)*this.playbackRate,this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(this.hasPlaybackControl!==!1)return this._pausedAt=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(0W.parameterPositions[1]&&(this.stopFading(),ge===0&&(this.enabled=!1))}}return this._effectiveWeight=E},_updateTimeScale:function(f){var E=0;if(!this.paused){E=this.timeScale;var W=this._timeScaleInterpolant;W!==null&&(E*=W.evaluate(f)[0],f>W.parameterPositions[1]&&(this.stopWarping(),E===0?this.paused=!0:this.timeScale=E))}return this._effectiveTimeScale=E},_updateTime:function(f){var E=this.time+f,W=this._clip.duration,ge=this.loop,ct=this._loopCount,gt=ge===2202;if(f===0)return ct!==-1&>&&(1&ct)==1?W-E:E;if(ge===2200){ct===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(W<=E)E=W;else{if(!(E<0)){this.time=E;break e}E=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=E,this._mixer.dispatchEvent({type:"finished",action:this,direction:f<0?-1:1})}}else{if(ct===-1&&(0<=f?(ct=0,this._setEndings(!0,this.repetitions===0,gt)):this._setEndings(this.repetitions===0,!0,gt)),W<=E||E<0){var St=Math.floor(E/W);E-=W*St,ct+=Math.abs(St);var Pt=this.repetitions-ct;if(Pt<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,E=0this.max.x||f.ythis.max.y)},containsBox:function(f){return this.min.x<=f.min.x&&f.max.x<=this.max.x&&this.min.y<=f.min.y&&f.max.y<=this.max.y},getParameter:function(f,E){return E===void 0&&(console.warn("THREE.Box2: .getParameter() target is now required"),E=new co),E.set((f.x-this.min.x)/(this.max.x-this.min.x),(f.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(f){return!(f.max.xthis.max.x||f.max.ythis.max.y)},clampPoint:function(f,E){return E===void 0&&(console.warn("THREE.Box2: .clampPoint() target is now required"),E=new co),E.copy(f).clamp(this.min,this.max)},distanceToPoint:function(f){return n3.copy(f).clamp(this.min,this.max).sub(f).length()},intersect:function(f){return this.min.max(f.min),this.max.min(f.max),this},union:function(f){return this.min.min(f.min),this.max.max(f.max),this},translate:function(f){return this.min.add(f),this.max.add(f),this},equals:function(f){return f.min.equals(this.min)&&f.max.equals(this.max)}});var N3=new yi,_g=new yi;function xg(f,E){this.start=f!==void 0?f:new yi,this.end=E!==void 0?E:new yi}function bg(f){Ri.call(this),this.material=f,this.render=function(){}}Object.assign(xg.prototype,{set:function(f,E){return this.start.copy(f),this.end.copy(E),this},clone:function(){return new this.constructor().copy(this)},copy:function(f){return this.start.copy(f.start),this.end.copy(f.end),this},getCenter:function(f){return f===void 0&&(console.warn("THREE.Line3: .getCenter() target is now required"),f=new yi),f.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(f){return f===void 0&&(console.warn("THREE.Line3: .delta() target is now required"),f=new yi),f.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(f,E){return E===void 0&&(console.warn("THREE.Line3: .at() target is now required"),E=new yi),this.delta(E).multiplyScalar(f).add(this.start)},closestPointToPointParameter:function(f,E){N3.subVectors(f,this.start),_g.subVectors(this.end,this.start);var W=_g.dot(_g),ge=_g.dot(N3)/W;return E&&(ge=js.clamp(ge,0,1)),ge},closestPointToPoint:function(f,E,W){var ge=this.closestPointToPointParameter(f,E);return W===void 0&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),W=new yi),this.delta(W).multiplyScalar(ge).add(this.start)},applyMatrix4:function(f){return this.start.applyMatrix4(f),this.end.applyMatrix4(f),this},equals:function(f){return f.start.equals(this.start)&&f.end.equals(this.end)}}),((bg.prototype=Object.create(Ri.prototype)).constructor=bg).prototype.isImmediateRenderObject=!0;var s0=new yi;function z3(f,E){Ri.call(this),this.light=f,this.light.updateMatrixWorld(),this.matrix=f.matrixWorld,this.matrixAutoUpdate=!1,this.color=E;for(var W=new Ds,ge=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],ct=0,gt=1;ct<32;ct++,gt++){var St=ct/32*Math.PI*2,Pt=gt/32*Math.PI*2;ge.push(Math.cos(St),Math.sin(St),1,Math.cos(Pt),Math.sin(Pt),1)}W.setAttribute("position",new io(ge,3));var sn=new Pc({fog:!1});this.cone=new xc(W,sn),this.add(this.cone),this.update()}((z3.prototype=Object.create(Ri.prototype)).constructor=z3).prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},z3.prototype.update=function(){this.light.updateMatrixWorld();var f=this.light.distance?this.light.distance:1e3,E=f*Math.tan(this.light.angle);this.cone.scale.set(E,E,f),s0.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(s0),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)};var Gf=new yi,y3=new Vo,j3=new Vo;function G3(f){for(var E=function Sn(En){var On=[];En&&En.isBone&&On.push(En);for(var mn=0;mn vec4 inputTexelToLinear(vec4 value){ if(inputEncoding == 0){ return value; }else if(inputEncoding == 1){ return sRGBToLinear(value); }else if(inputEncoding == 2){ return RGBEToLinear(value); }else if(inputEncoding == 3){ return RGBMToLinear(value, 7.0); }else if(inputEncoding == 4){ return RGBMToLinear(value, 16.0); }else if(inputEncoding == 5){ return RGBDToLinear(value, 256.0); }else{ return GammaToLinear(value, 2.2); } } vec4 linearToOutputTexel(vec4 value){ if(outputEncoding == 0){ return value; }else if(outputEncoding == 1){ return LinearTosRGB(value); }else if(outputEncoding == 2){ return LinearToRGBE(value); }else if(outputEncoding == 3){ return LinearToRGBM(value, 7.0); }else if(outputEncoding == 4){ return LinearToRGBM(value, 16.0); }else if(outputEncoding == 5){ return LinearToRGBD(value, 256.0); }else{ return LinearToGamma(value, 2.2); } } vec4 envMapTexelToLinear(vec4 color) { return inputTexelToLinear(color); } #define ENVMAP_TYPE_CUBE_UV #include void main() { gl_FragColor = vec4(0.0); for (int i = 0; i < n; i++) { if (i >= samples) break; for (int dir = -1; dir < 2; dir += 2) { if (i == 0 && dir == 1) continue; vec3 axis = latitudinal ? poleAxis : cross(poleAxis, vOutputDirection); if (all(equal(axis, vec3(0.0)))) axis = cross(vec3(0.0, 1.0, 0.0), vOutputDirection); axis = normalize(axis); float theta = dTheta * float(dir * i); float cosTheta = cos(theta); // Rodrigues' axis-angle rotation vec3 sampleDirection = vOutputDirection * cosTheta + cross(axis, vOutputDirection) * sin(theta) + axis * dot(axis, vOutputDirection) * (1.0 - cosTheta); gl_FragColor.rgb += weights[i] * bilinearCubeUV(envMap, sampleDirection, mipInt); } } gl_FragColor = linearToOutputTexel(gl_FragColor); } `,blending:ve,depthTest:!1,depthWrite:!1})).type="SphericalGaussianBlur",h0),Sm=null,bf=null,Y3=function(){for(var f=[],E=[],W=[],ge=Cm,ct=0;ct vec4 inputTexelToLinear(vec4 value){ if(inputEncoding == 0){ return value; }else if(inputEncoding == 1){ return sRGBToLinear(value); }else if(inputEncoding == 2){ return RGBEToLinear(value); }else if(inputEncoding == 3){ return RGBMToLinear(value, 7.0); }else if(inputEncoding == 4){ return RGBMToLinear(value, 16.0); }else if(inputEncoding == 5){ return RGBDToLinear(value, 256.0); }else{ return GammaToLinear(value, 2.2); } } vec4 linearToOutputTexel(vec4 value){ if(outputEncoding == 0){ return value; }else if(outputEncoding == 1){ return LinearTosRGB(value); }else if(outputEncoding == 2){ return LinearToRGBE(value); }else if(outputEncoding == 3){ return LinearToRGBM(value, 7.0); }else if(outputEncoding == 4){ return LinearToRGBM(value, 16.0); }else if(outputEncoding == 5){ return LinearToRGBD(value, 256.0); }else{ return LinearToGamma(value, 2.2); } } vec4 envMapTexelToLinear(vec4 color) { return inputTexelToLinear(color); } #define RECIPROCAL_PI 0.31830988618 #define RECIPROCAL_PI2 0.15915494 void main() { gl_FragColor = vec4(0.0); vec3 outputDirection = normalize(vOutputDirection); vec2 uv; uv.y = asin(clamp(outputDirection.y, -1.0, 1.0)) * RECIPROCAL_PI + 0.5; uv.x = atan(outputDirection.z, outputDirection.x) * RECIPROCAL_PI2 + 0.5; vec2 f = fract(uv / texelSize - 0.5); uv -= f * texelSize; vec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb; uv.x += texelSize.x; vec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb; uv.y += texelSize.y; vec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb; uv.x -= texelSize.x; vec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb; vec3 tm = mix(tl, tr, f.x); vec3 bm = mix(bl, br, f.x); gl_FragColor.rgb = mix(tm, bm, f.y); gl_FragColor = linearToOutputTexel(gl_FragColor); } `,blending:ve,depthTest:!1,depthWrite:!1});return f.type="EquirectangularToCubeUV",f}function w3(){var f=new Kp({uniforms:{envMap:{value:null},inputEncoding:{value:nh[qi]},outputEncoding:{value:nh[qi]}},vertexShader:` precision mediump float; precision mediump int; attribute vec3 position; attribute vec2 uv; attribute float faceIndex; varying vec3 vOutputDirection; 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; direction.z *= -1.0; } else if (face == 1.0) { direction = direction.xzy; direction.z *= -1.0; } else if (face == 3.0) { direction = direction.zyx; direction.x *= -1.0; } else if (face == 4.0) { direction = direction.xzy; direction.y *= -1.0; } else if (face == 5.0) { direction.xz *= -1.0; } return direction; } void main() { vOutputDirection = getDirection(uv, faceIndex); gl_Position = vec4( position, 1.0 ); } `,fragmentShader:` precision mediump float; precision mediump int; varying vec3 vOutputDirection; uniform samplerCube envMap; uniform int inputEncoding; uniform int outputEncoding; #include vec4 inputTexelToLinear(vec4 value){ if(inputEncoding == 0){ return value; }else if(inputEncoding == 1){ return sRGBToLinear(value); }else if(inputEncoding == 2){ return RGBEToLinear(value); }else if(inputEncoding == 3){ return RGBMToLinear(value, 7.0); }else if(inputEncoding == 4){ return RGBMToLinear(value, 16.0); }else if(inputEncoding == 5){ return RGBDToLinear(value, 256.0); }else{ return GammaToLinear(value, 2.2); } } vec4 linearToOutputTexel(vec4 value){ if(outputEncoding == 0){ return value; }else if(outputEncoding == 1){ return LinearTosRGB(value); }else if(outputEncoding == 2){ return LinearToRGBE(value); }else if(outputEncoding == 3){ return LinearToRGBM(value, 7.0); }else if(outputEncoding == 4){ return LinearToRGBM(value, 16.0); }else if(outputEncoding == 5){ return LinearToRGBD(value, 256.0); }else{ return LinearToGamma(value, 2.2); } } vec4 envMapTexelToLinear(vec4 color) { return inputTexelToLinear(color); } void main() { gl_FragColor = vec4(0.0); gl_FragColor.rgb = envMapTexelToLinear(textureCube(envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ))).rgb; gl_FragColor = linearToOutputTexel(gl_FragColor); } `,blending:ve,depthTest:!1,depthWrite:!1});return f.type="CubemapToCubeUV",f}function Rg(f){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Qs.call(this,f),this.type="catmullrom",this.closed=!0}function v0(f){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Qs.call(this,f),this.type="catmullrom"}function Xg(f){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Qs.call(this,f),this.type="catmullrom"}Yg.prototype={constructor:Yg,fromScene:function(f,E,W,ge){E===void 0&&(E=0),W===void 0&&(W=.1),ge===void 0&&(ge=100),qg=Mc.getRenderTarget();var ct=Pg();return function(gt,St,Pt,sn){var ln=new cc(90,1,St,Pt),Sn=[1,1,1,1,-1,1],En=[1,1,-1,-1,-1,1],On=Mc.outputEncoding,mn=Mc.toneMapping,Hn=Mc.toneMappingExposure,mr=Mc.getClearColor(),_r=Mc.getClearAlpha();Mc.toneMapping=Yn,Mc.toneMappingExposure=1,Mc.outputEncoding=qi,gt.scale.z*=-1;var gi=gt.background;if(gi&&gi.isColor){gi.convertSRGBToLinear();var Ci=Math.max(gi.r,gi.g,gi.b),$i=Math.min(Math.max(Math.ceil(Math.log2(Ci)),-128),127);gi=gi.multiplyScalar(Math.pow(2,-$i));var da=($i+128)/255;Mc.setClearColor(gi,da),gt.background=null}for(var ji=0;ji<6;ji++){var Sa=ji%3;Sa==0?(ln.up.set(0,Sn[ji],0),ln.lookAt(En[ji],0,0)):Sa==1?(ln.up.set(0,0,Sn[ji]),ln.lookAt(0,En[ji],0)):(ln.up.set(0,Sn[ji],0),ln.lookAt(0,0,En[ji])),Kg(sn,Sa*Dh,2L.x)Xe=N.MxThreeJS.createLines(Te,16777215),ie=255;else{var ue=Ve.getMcEdJig().getMxObject().viewCoordLong2Cad(3);Xe=N.MxThreeJS.createDashedLines(Te,16777215,2*ue,ue)}var pt=[];pt.push(L),pt.push(rt),pt.push(De),pt.push(L),pt.push(De),pt.push(Ae);var mt=N.MxThreeJS.createTriangle(pt,ie,.27);Ve.drawEntity(mt,30),Ve.drawEntity(Xe,31)}else Xe=N.MxThreeJS.createLines(Te,16777215),Ve.drawEntity(Xe,31)}),ne.setUserDraw(Ue),ne.go(function(De){J&&J({status:De,detailedResult:ne.getDetailedResult()}),De!=0?ve(null):(ne.clearLastInputPoint(),ve(ne.value()))})})}},{"./MxThreeJS":37,"./Operate/MrxDbgUiPrBase":45,"./Operate/MrxDbgUiPrPoint":47,"./Operate/MxEntSelJig":50,"./Operate/MxJigCmdManager":54,"./UI/MxUiVue":65,three:19}],21:[function(t,e,l){Object.defineProperty(l,"__esModule",{value:!0}),l.MxDrawCommands=void 0;var n=t("./MxFun"),u=t("./MxType"),c=t("./Operate/MxIntelliSelect"),y=t("./Operate/MxJigCmdManager");function b(q){q!=null&&q.grips!=null&&q.ids!=null&&n.MxFun.getCurrentMx().getMcObject().getGripManager().gripEditImp(q)}function m(q){if(q!=null&&q.pt!=null){var J=n.MxFun.getCurrentMx(),fe=q.pt;if(!J.getMxDatabase().getGripManager().doPointSelect(fe)){var ve=!0;if(J.isValidMcObject()&&J.getMcObject().getGripManager().doPointSelect(fe)&&(ve=!1),n.MxFun.isPC()||(ve=!1),ve&&J.isMultipleSelect){var ne=J.screenCoord2Current(fe.x,fe.y,0),Ue=new c.MxIntelliSelectJig(ne);Ue.setDisableDynInput(!0),Ue.setDisableOsnap(!0),y.MxJigCmdManager.runCmd(Ue)}}}}function O(q){q!=null&&q.grips!=null&&q.ents!=null&&n.MxFun.getCurrentMx().getMxDatabase().getGripManager().gripEditImp(q)}function N(){n.MxFun.getCurrentMx().getMcObject().undo()}function L(){n.MxFun.getCurrentMx().getMcObject().redo()}function G(){n.MxFun.getCurrentMx().startPanCommand()}(l.MxDrawCommands||(l.MxDrawCommands={})).registerCommand=function(){n.MxFun.addCommand("Mx_FrontEndWebpageIntelliSel",m,u.MxType.MxCommandFlag.MCRX_CMD_TRANSPARENT|u.MxType.MxCommandFlag.MCRX_CMD_NO_UNDO_MARKER|u.MxType.MxCommandFlag.MCRX_CMD_NO_CLEAR_SELECT|u.MxType.MxCommandFlag.MCRX_CMD_NO_RECORD_PRVCMD),n.MxFun.addCommand("Mx_FrontEndWebpageGripEdit",O,u.MxType.MxCommandFlag.MCRX_CMD_TRANSPARENT|u.MxType.MxCommandFlag.MCRX_CMD_NO_UNDO_MARKER|u.MxType.MxCommandFlag.MCRX_CMD_NO_CLEAR_SELECT|u.MxType.MxCommandFlag.MCRX_CMD_NO_RECORD_PRVCMD),n.MxFun.addCommand("McDraw_GripEdit",b,u.MxType.MxCommandFlag.MCRX_CMD_TRANSPARENT|u.MxType.MxCommandFlag.MCRX_CMD_NO_CLEAR_SELECT|u.MxType.MxCommandFlag.MCRX_CMD_NO_RECORD_PRVCMD),n.MxFun.addCommand("Mx_Undo",N,u.MxType.MxCommandFlag.MCRX_CMD_NO_UNDO_MARKER),n.MxFun.addCommand("Mx_Redo",L,u.MxType.MxCommandFlag.MCRX_CMD_NO_UNDO_MARKER),n.MxFun.addCommand("Mx_Pan",G,u.MxType.MxCommandFlag.MCRX_CMD_NO_UNDO_MARKER)}},{"./MxFun":27,"./MxType":39,"./Operate/MxIntelliSelect":52,"./Operate/MxJigCmdManager":54}],22:[function(t,e,l){var n;Object.defineProperty(l,"__esModule",{value:!0}),l.MxDrawData=void 0,(n=l.MxDrawData||(l.MxDrawData={})).m_dInputRectWidth=16,n.m_isEnableIntelliSelect=!0,n.m_isEnableGripEidt=!0,n.m_isForbiddenDynInput=!1,n.m_isMultipleSelect=!1,n.m_isAutoResetRenderer=!1,n.m_isCorrectLargeCoordinates=!0,n.m_isRequestHeaderCacheControl=!1,n.m_gripPointColor=3355443455,n.m_isMapBox=!1,n.setIniset=function(u){u.EnableIntelliSelect!==void 0&&typeof u.EnableIntelliSelect=="boolean"&&(n.m_isEnableIntelliSelect=u.EnableIntelliSelect),u.EnableGripEidt!==void 0&&typeof u.EnableGripEidt=="boolean"&&(n.m_isEnableGripEidt=u.EnableGripEidt),u.ForbiddenDynInput!==void 0&&typeof u.ForbiddenDynInput=="boolean"&&(n.m_isForbiddenDynInput=u.ForbiddenDynInput),u.multipleSelect!==void 0&&typeof u.multipleSelect=="boolean"&&(n.m_isMultipleSelect=u.multipleSelect),u.autoResetRenderer!==void 0&&typeof u.autoResetRenderer=="boolean"&&(n.m_isAutoResetRenderer=u.autoResetRenderer),u.correctLargeCoordinates!==void 0&&typeof u.correctLargeCoordinates=="boolean"&&(n.m_isCorrectLargeCoordinates=u.correctLargeCoordinates),u.requestHeaderCacheControl!==void 0&&typeof u.requestHeaderCacheControl=="boolean"&&(n.m_isRequestHeaderCacheControl=u.requestHeaderCacheControl),u.MapBox!==void 0&&typeof u.MapBox=="boolean"&&(n.m_isMapBox=u.MapBox),u.inputRectWidth!==void 0&&typeof u.inputRectWidth=="number"&&(n.m_dInputRectWidth=u.inputRectWidth),u.gripPointColor!==void 0&&typeof u.gripPointColor=="number"&&(n.m_gripPointColor=u.gripPointColor)}},{}],23:[function(t,e,l){Object.defineProperty(l,"__esModule",{value:!0}),l.MxDrawObject=l.IniSetName=l.MxRunMode=void 0;var n,u,c,y=t("three"),b=t("./MxFun"),m=t("./View/MxBrowseLayerData"),O=t("./View/MxBrowseDisplay"),N=t("./MxNetData"),L=t("./MxNetData"),G=t("./MxManager"),q=t("./MxSystemVariable"),J=t("./MxLocalFileLoad"),fe=t("./Operate/MxDrawObjectOsnap"),ve=t("./View/MxDbDatabase"),ne=t("./View/MxDrawMapBox"),Ue=t("./MxDrawObjectEvent"),De=t("./View/MxDbEntityGrip"),Ve=t("./cpp/McDrawObject"),rt=t("./UI/MxUiVue"),Ae=t("./MxDrawData"),Te=t("./MxTempMarkDraw");(u=n=l.MxRunMode||(l.MxRunMode={}))[u.kBrowse=1]="kBrowse",u[u.kCPPMxCAD=4]="kCPPMxCAD",(c=l.IniSetName||(l.IniSetName={})).kEnableOsnapFunction="EnableOsnapFunction";var Xe=(ie.prototype.getCurrentMousePostion=function(){return this.curMousePostion},ie.prototype.isValidCurMousePostion=function(){return this.m_isValidCurMousePostion},ie.prototype.setCurrentMousePostion=function(ue,pt){if(pt===void 0&&(pt=!1),pt){if(0It.x){var nn=kt.x;kt.x=It.x,It.x=nn}if(kt.y>It.y){var tn=kt.y;kt.y=It.y,It.y=tn}this.reInit(),this._devicePixelRatio=window.devicePixelRatio,this._openFile="",this._openFileExtName="dwg",this._iniParam=[],this._initZoomwCoordPt1=null,this._initZoomWCoordPt2=null;var pn=new y.Matrix4;pn.identity(),this.intiDoc2Wold(pn),this.initCAD2Doc(pn),this.initializingObjectMatrix(),this.mxdrawThreeJS.updateCameraDisplayRange(kt,It,0),this.updateDisplay(!0);var _n=b.MxFun.getUiObj();_n!=null&&(_n.SetLayoutData(this._allLayoutName),_n.UpDisplayLayout())},ie.prototype.calcViewsize=function(){if(this._userCanvas==null)return{viewWidth:window.innerWidth,viewHeight:window.innerHeight};var ue=this._userCanvas.clientWidth,pt=this._userCanvas.clientHeight;if(this._event.onResize!=null){var mt=this._event.onResize;mt instanceof Array&&(mt=mt[0]);var Tt=mt();Tt!=null&&(ue=parseInt(Tt.width),pt=parseInt(Tt.height))}return{viewWidth:ue,viewHeight:pt}},ie.prototype.initMxCpp=function(ue){ue&&ue.getImp()?(this.mcObject.init(this,ue),this.secenView!=null?this.secenView.background=null:this.scene.background=null):console.log("mxerror: mcppObjectImp is null")},ie.prototype.create=function(ue,pt,mt,Tt){if(this._is2d?this.mxdrawThreeJS=Tt?new ne.MxDrawMapBoxThreeJS(Tt,this):new ne.MxDrawObject2dThreeJS(this):this.mxdrawThreeJS=new ne.MxDrawObject3dThreeJS(this),this._callCreateCanvasImageData=void 0,this._devicePixelRatio=window.devicePixelRatio,this._runMode==n.kCPPMxCAD)this._openFile="";else{if(pt instanceof Array?(this._openFile=pt[0],this._staticLoadingOpenFiles=pt):this._openFile=pt,this._iniParam=b.MxFun.getUrlParams(),this._openFileExtName=this._openFile.substring(this._openFile.lastIndexOf(".")+1),this._openFile!=""){var kt=new Array;kt.push("file"),kt.push(this._openFile),this._iniParam.push(kt)}this._userIdentitySign!=""&&(this.addInitParam("userIdentitySign",this._userIdentitySign),this.addInitParam("userRandomToken",this._userRandomToken)),this.addInitParam("runMode","browse")}this._userCanvas=ue;var It=window.innerWidth,nn=window.innerHeight;if(ue!=null&&(It=ue.clientWidth,nn=ue.clientHeight),this._viewWidth=It,this._viewHeight=nn,this.m_mxDatabase.getSelectManager().setCanvasSize(It,nn),this.mxdrawThreeJS.onInitThreejs(),this.eventManager.registEvent(this),this.onCreate(),this.m_mxDatabase.init(this),this._parentDocObject=new y.Object3D,this.scene.add(this._parentDocObject),this._parentDocObject_SmallCoord=new y.Object3D,this.scene.add(this._parentDocObject_SmallCoord),this.threejsselectObjects=new y.Object3D,this.scene.add(this.threejsselectObjects),this._objectsOsnap=new fe.MxDrawObjectOsnap(this),this.tempMarkDraw.init(this),G.MxManager.add(this),G.MxManager.setCurrentMx(this),this.mxdrawThreeJS.addControlsChangeEvent(),Tt||this.updateDisplay(),this.mxdrawThreeJS.getType()!=ne.MxThreeJSType.kMapBox){var tn=this;if(ue==null){var pn=function(xn,$n){$n===void 0&&($n=!0),tn._viewWidth=window.innerWidth,tn._viewHeight=window.innerHeight,tn.onResizeImp()&&tn.updateDisplay($n)};window.addEventListener("resize",pn,!1),this._onResizeFun=pn}else{var _n=function(xn,$n){$n===void 0&&($n=!0),xn&&xn.viewWidth&&xn.viewHeight||(xn=tn.calcViewsize()),tn._viewWidth=xn.viewWidth,tn._viewHeight=xn.viewHeight,tn.onResizeImp(tn._viewWidth,tn._viewHeight)&&tn.updateDisplay($n)};if(this._onResizeFun=_n,this._event.addResizeEvent!=null){var Dn=this._event.addResizeEvent;Dn instanceof Array&&(Dn=Dn[0]),Dn(_n,ue)}else window.addEventListener("resize",_n,!1);if(window.setTimeout(function(){_n(void 0,!1)},5),this._event.onResize!=null){var an=tn.calcViewsize();_n(an,!1);var Rn=0,Lt=0,wn=!0,hn=window.setInterval(function(){Lt++;var xn=tn.calcViewsize();if(xn.viewWidth==an.viewWidth&&xn.viewHeight==an.viewHeight&&0>24&255;xi==2?(xn.push(ti,gn),xn.push(Xn,Kn),xn.push(Vn,Yn)):xi==1?an!=0&&Dn?($n.push(ti,gn),$n.push(Xn,Kn),$n.push(Vn,Yn)):(hn.push(ti,gn),hn.push(Xn,Kn),hn.push(Vn,Yn)):(Vr=this.automaticInversionColor(16777215&Vr),Lt.push(ti,gn),Lt.push(Xn,Kn),Lt.push(Vn,Yn),wn.push((255&Vr)/255,(Vr>>8&255)/255,(Vr>>16&255)/255),wn.push((255&Vr)/255,(Vr>>8&255)/255,(Vr>>16&255)/255),wn.push((255&Vr)/255,(Vr>>8&255)/255,(Vr>>16&255)/255))}var Si=this._blocks,qn=this._layers;It!=0&&(Si=this._extRefManager.getBlocks(It),qn=this._extRefManager.getLayers(It));var ia=Si.crateBlock(an);ia.addGeometryMesh(Lt,wn,_n,xn,hn,$n),Si.createThreejsObj(ia,this,qn)}}},ie.prototype.mxWebAddEntityForMemorySections=function(ue,pt){var mt=new N.MxNetData(ue),Tt=mt.getMemorySectionsHead(),kt=(Tt.zeroLayerIdIndex,Tt.databaseIndex);pt!=-1&&(kt=pt);var It=Tt.nOffset,nn=this._blocks,tn=this._layers;kt!=0&&(nn=this._extRefManager.getBlocks(kt),tn=this._extRefManager.getLayers(kt));for(var pn=0;pn>10),56320+(1023&tn)))}return Tt.join("")},ie.prototype.mxWebAddEntityFor2dPointTextureBuffers=function(ue,pt){var mt=new N.MxNetData(ue),Tt=mt.getdPointTextureBuffersHead(),kt=Tt.ver,It=(Tt.zeroLayerIdIndex,Tt.databaseIndex);pt!=-1&&(It=pt);for(var nn=Tt.datasize,tn=0;tn>24&255;ai=un==2||un==1?16777215:this.automaticInversionColor(16777215&ai),Yn.push(Ia,fi),Yn.push(An,sa),Yn.push(Nn,fn),Vn.push((255&ai)/255,(ai>>8&255)/255,(ai>>16&255)/255),Vn.push((255&ai)/255,(ai>>8&255)/255,(ai>>16&255)/255),Vn.push((255&ai)/255,(ai>>8&255)/255,(ai>>16&255)/255)}hn.addGeometryTexture(Kn,Yn,Vn,_n,Xn,xn,$n,Xr)}}Lt.createThreejsObj(hn,this,wn)}}},ie.prototype.mxWebAddEntityFor2dPointCurveBuffers=function(ue,pt){var mt=new N.MxNetData(ue),Tt=mt.getdPointCurveBuffersHead(),kt=Tt.zeroLayerIdIndex,It=Tt.databaseIndex;pt!=-1&&(It=pt);for(var nn=Tt.datasize,tn=0;tn>24&255;Yn==2?(xn.push(ti,gn),xn.push(Xn,Kn)):Yn==1?an!=0&&Dn?($n.push(ti,gn),$n.push(Xn,Kn)):(hn.push(ti,gn),hn.push(Xn,Kn)):(Lt.push(ti,gn),Lt.push(Xn,Kn),Vn=this.automaticInversionColor(16777215&Vn),wn.push((255&Vn)/255,(Vn>>8&255)/255,(Vn>>16&255)/255),wn.push((255&Vn)/255,(Vn>>8&255)/255,(Vn>>16&255)/255))}var Vr=this._blocks,xi=this._layers;It!=0&&(Vr=this._extRefManager.getBlocks(It),xi=this._extRefManager.getLayers(It));var Si=Vr.crateBlock(an);Si.addGeometryCurve(Lt,wn,_n,xn,hn,$n),Vr.createThreejsObj(Si,this,xi)}}},ie.prototype.mxWebAddEntityFor2dPointCurveBuffer=function(ue,pt){var mt=new N.MxNetData(ue);if(!mt.getIsSketchEntity()){var Tt,kt=mt.getLayerId(),It=kt==mt.getZeroLayerId(),nn=mt.getBlockId();if(!((Tt=ue.getInt32(20,!0)/20)<1)){for(var tn=80,pn=[],_n=[],Dn=[],an=[],Rn=[],Lt=0;Lt>24&255;ti==2?(an.push(wn,hn),an.push(xn,$n)):ti==1?nn!=0&&It?(Rn.push(wn,hn),Rn.push(xn,$n)):(Dn.push(wn,hn),Dn.push(xn,$n)):(Xr=this.automaticInversionColor(16777215&Xr),pn.push(wn,hn),pn.push(xn,$n),_n.push((255&Xr)/255,(Xr>>8&255)/255,(Xr>>16&255)/255),_n.push((255&Xr)/255,(Xr>>8&255)/255,(Xr>>16&255)/255))}var gn=mt.getDatabaseIndex();pt!=-1&&(gn=pt);var Xn=this._blocks,Kn=this._layers;gn!=0&&(Xn=this._extRefManager.getBlocks(gn),Kn=this._extRefManager.getLayers(gn));var Vn=Xn.crateBlock(nn);Vn.addGeometryCurve(pn,_n,kt,an,Dn,Rn),Xn.createThreejsObj(Vn,this,Kn)}}},ie.prototype.mxWebAddEntityFor2dPointMeshBuffer=function(ue,pt){var mt=new N.MxNetData(ue);if(!mt.getIsSketchEntity()){var Tt,kt=mt.getLayerId(),It=mt.getBlockId(),nn=kt==mt.getZeroLayerId();if(!((Tt=ue.getInt32(12,!0)/28)<1)){for(var tn=80,pn=[],_n=[],Dn=[],an=[],Rn=[],Lt=0;Lt>24&255;Xn==2?(an.push(wn,hn),an.push(xn,$n),an.push(Xr,ti)):Xn==1?It!=0&&nn?(Rn.push(wn,hn),Rn.push(xn,$n),Rn.push(Xr,ti)):(Dn.push(wn,hn),Dn.push(xn,$n),Dn.push(Xr,ti)):(pn.push(wn,hn),pn.push(xn,$n),pn.push(Xr,ti),gn=this.automaticInversionColor(16777215&gn),_n.push((255&gn)/255,(gn>>8&255)/255,(gn>>16&255)/255),_n.push((255&gn)/255,(gn>>8&255)/255,(gn>>16&255)/255),_n.push((255&gn)/255,(gn>>8&255)/255,(gn>>16&255)/255))}var Kn=mt.getDatabaseIndex();pt!=-1&&(Kn=pt);var Vn=this._blocks,Yn=this._layers;Kn!=0&&(Vn=this._extRefManager.getBlocks(Kn),Yn=this._extRefManager.getLayers(Kn));var Vr=Vn.crateBlock(It);Vr.addGeometryMesh(pn,_n,kt,an,Dn,Rn),Vn.createThreejsObj(Vr,this,Yn)}}},ie.prototype.mxWebCreateAllBlocks=function(ue,pt){var mt=new N.MxNetData(ue).getDatabaseIndex();pt!=-1&&(mt=pt);var Tt=this._blocks;mt!=0&&(Tt=this._extRefManager.getBlocks(mt)),Tt.createBlocks(ue,this.scene)},ie.prototype.mxWebEntitysData=function(ue,pt){pt==-1&&this._objectsOsnap.mxWebEntitysData(ue,pt)},ie.prototype.getObjectOsnap=function(){return this._objectsOsnap},ie.prototype.saveMxEntityToJson=function(ue){return this.m_mxDatabase.saveJson(ue)},ie.prototype.getDtabaseJsonString=function(){return JSON.stringify(this.m_mxDatabase.toJsonObject())},ie.prototype.loadMxEntityFromJson=function(ue){return this.m_mxDatabase.loadJson(ue)},ie);function ie(ue){this._is2d=!0,this._runMode=n.kBrowse,this._userCanvas=null,this._openFile="empty",this._staticLoadingOpenFiles=[],this._openFileExtName="",this._userIdentitySign="",this._rendererParam=void 0,this._userRandomToken="",this._isCreate=!1,this.m_iniSet={},this._net=null,this._staticNet=null,this._staticLoadTzNet=null,this._staticLocalNet=null,this._isStaticLocalLoad=!1,this._staticLocalLoadPath="",this._viewWidth=1,this._viewHeight=1,this.m_sysVariable=new q.MxSystemVariable,this._color="#FFFFFF",this._viewcolor=15790320,this._isAnimation=!1,this._isAnimationStarting=!1,this._isWaiteCount=0,this._callCreateCanvasImageData=void 0,this._event={},this.scene=null,this.camera=null,this.camera_recover=null,this.secenView=null,this.cameraView=null,this.renderer=null,this.controls=null,this.threejsselectObjectsView=null,this._mouseRightRotate=!1,this._isMouseMiddlePan=1,this._mapId2Entity=new Map,this._setAdyDelete=new Map,this._layers=new m.MxBrowseLayerData,this._blocks=new O.Blocks,this._extRefManager=new O.ExternalReferenceManager,this._doc2World=new y.Matrix4,this._word2doc=new y.Matrix4,this._cad2Doc=new y.Matrix4,this._doc2CAD=new y.Matrix4,this._word2Current=new y.Matrix4,this._current2word=new y.Matrix4,this._allLayoutName=new Array,this._devicePixelRatio=1,this._tzDwgStaticFile="",this._requestHeader="",this._objectsOsnap=null,this._initZoomwCoordPt1=null,this._initZoomWCoordPt2=null,this.m_mxDatabase=null,this._parentDocObject=null,this._parentDocObject_SmallCoord=null,this.threejsselectObjects=null,this.tempMarkDraw=new Te.MxTempMarkDraw,this._onResizeFun=null,this._sCurrentLoadURL="",this.eventManager=new Ue.MxDrawObjectEvent,this._viewangle=0,this.id=0,this.mcObject=new Ve.McDrawObject,this.isPointMultipleSelect=!1,this.isNewObjectMatrix=!0,this.bakControls=void 0,this.isMultipleSelect=!1,this.mxdrawThreeJS=null,this.curMousePostion=new y.Vector2(0,0),this.m_isValidCurMousePostion=!1,this._is2d=ue,this._blocks.initRootBlockRef(),this.m_iniSet[c.kEnableOsnapFunction]=!1,this.m_sysVariable.init(this),this.m_mxDatabase=new ve.MxDbDatabase,this.id=G.MxManager.allocId(),this.isMultipleSelect=Ae.MxDrawData.m_isMultipleSelect,this.mcObject.initMxObject(this)}l.MxDrawObject=Xe},{"./MxDrawData":22,"./MxDrawObjectEvent":26,"./MxFun":27,"./MxLocalFileLoad":28,"./MxManager":29,"./MxNetData":31,"./MxSystemVariable":35,"./MxTempMarkDraw":36,"./Operate/MxDrawObjectOsnap":49,"./UI/MxUiVue":65,"./View/MxBrowseDisplay":66,"./View/MxBrowseLayerData":67,"./View/MxDbDatabase":68,"./View/MxDbEntityGrip":70,"./View/MxDrawMapBox":75,"./cpp/McDrawObject":78,three:19}],24:[function(t,e,l){var n,u=this&&this.__extends||(n=function(ve,ne){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ue,De){Ue.__proto__=De}||function(Ue,De){for(var Ve in De)Object.prototype.hasOwnProperty.call(De,Ve)&&(Ue[Ve]=De[Ve])})(ve,ne)},function(ve,ne){function Ue(){this.constructor=ve}n(ve,ne),ve.prototype=ne===null?Object.create(ne):(Ue.prototype=ne.prototype,new Ue)});Object.defineProperty(l,"__esModule",{value:!0}),l.MxDrawObject2d=void 0;var c,y=t("three"),b=t("./MxFun"),m=t("./MxDrawObject"),O=t("three-orbitcontrols"),N=t("./MxNetData"),L=t("./MxMaterial"),G=t("./MxDrawData"),q=t("./View/MxDrawMapBox"),J=(u(fe,c=m.MxDrawObject),fe.prototype.set3DDraw=function(ve){this.is3DDraw=ve},fe.prototype.getOrthographicCamera=function(){return this.camera instanceof y.OrthographicCamera?this.camera:null},fe.prototype.getFullDisplayRange=function(){return{minPt:this._initMinDisplayPoint,maxPt:this._initMaxDisplayPoint}},fe.prototype.saveZoom=function(){this.camera_recover=this.camera.clone(!1),this.controls.saveState()},fe.prototype.recoverZoom=function(){this.camera_recover&&(this.camera.copy(this.camera_recover,!1),this.camera_recover=null,this.getOrthographicCamera().updateProjectionMatrix(),this.controls.reset(),this.mcObject.updateDisplayMatrixData())},fe.prototype.zoomW_call=function(ve,ne,Ue,De){if(ve.distanceTo(ne)<1e-7)console.log("Mx:ZoomW param invalid");else{if(Ue!=null&&Ue||(ve=this.currentCoord2World(ve.x,ve.y,0),ne=this.currentCoord2World(ne.x,ne.y,0)),ve.x>ne.x){var Ve=ve.x;ve.x=ne.x,ne.x=Ve}ve.y>ne.y&&(Ve=ve.y,ve.y=ne.y,ne.y=Ve);var rt=this.getViewWidth(),Ae=this.getViewHeight();Ae<5&&(Ae=5),rt<5&&(rt=5);var Te=Math.abs(ve.x-ne.x),Xe=Math.abs(ve.y-ne.y);Te<1e-5&&(Te=1e-5),Xe<1e-5&&(Xe=1e-5);var ie=this.getOrthographicCamera();if(Te/XeXe.x&&(pt.x=Xe.x),pt.x>ie.x&&(pt.x=ie.x),pt.x>ue.x&&(pt.x=ue.x),pt.y>Xe.y&&(pt.y=Xe.y),pt.y>ie.y&&(pt.y=ie.y),pt.y>ue.y&&(pt.y=ue.y);var mt=Te.clone();mt.x=this._dataNum)this._isShowLoading&&n.MxFun.hideLoading();else{var N=this._dataType[this._iGet];this._iGet++;var L=this,G=this._iGet+1,q="$"+this._filename+".mxb"+G+".wgh",J=N!=0;this.getFile(this._path,q,J,function(fe){L.net.onStaticMessage(fe),L.getDatas()},function(){L._dataNum=0,L._iGet=0,L._isShowLoading&&n.MxFun.hideLoading(),console.log("mx get "+q+" faild")})}},O.prototype.onRenderHead=function(N){var L=JSON.parse(N);this._dataType=L.type,this._dataNum=L.count,this._iGet=0,this._isShowLoading&&n.MxFun.showLoading(),this.getDatas()},O.prototype.getFile=function(N,L,G,q,J){var fe=new y;fe.setPath(N),fe.setBinary(G),fe.load(L,q,function(){},J)},O);function O(N){this.net=null,this._dataNum=0,this._iGet=0,this._dataType=[],this._path="",this._filename="",this._isShowLoading=!0,this.net=N}l.MxLocalDwgFileLoad=m},{"./MxFun":27}],29:[function(t,e,l){Object.defineProperty(l,"__esModule",{value:!0}),l.MxManager=l.MxCpp=l.MxData=void 0;var n,u=t("./View/MxDbEntity"),c=t("./View/MxDbTextureManager"),y=t("./SVGLoader/MxSVGLoader");(n=l.MxData||(l.MxData={})).iSelectRenderOrder=5,n.iCADMeshRenderOrder=10,n.iCADCurveRenderOrder=20,n.iMxEntityRenderOrder=30,n.iGripRenderOrder=110,n.iDynJigRenderOrder=120;var b,m,O,N,L,G,q,J,fe,ve,ne,Ue=(De.prototype.init=function(Ve){this.imp=Ve},De.prototype.getMxCAD_MxCpp=function(){return this.imp},De.prototype.getMxCAD_App=function(){return this.imp.App},De.prototype.newMcGePoint3d=function(Ve){return this.imp?this.imp.newMcGePoint3d(Ve):null},De.prototype.decodeFromGb2312=function(Ve){return this.imp.decodeFromGb2312(Ve)},De.prototype.encodeToGb2312=function(Ve){return this.imp.encodeToGb2312(Ve)},De.prototype.getMcDbCurve=function(Ve){if(this.imp.App.objectIdIsKindOf(Ve,"McDbCurve"))return this.imp.App.objectIdToObject(Ve)},De);function De(){}l.MxCpp=Ue,b=l.MxManager||(l.MxManager={}),m=[],O=null,L=[],G=void(N=0),q=new c.MxDbTextureManager,J=new y.MxSvgManager,fe=new u.MxDbEntityClassHierarchy,ve=new Ue,ne={},b.add=function(Ve){m.push(Ve)},b.on=function(Ve,rt){ne[Ve]||(ne[Ve]=[]),ne[Ve].push(rt)},b.callEvent=function(Ve,rt){var Ae;if(ne[Ve])return ne[Ve].forEach(function(Te){var Xe=Te(rt);Ae=Ae||Xe}),Ae},b.initMxCpp=function(Ve){ve.init(Ve)},b.getMxCpp=function(){return ve},b.allocId=function(){return++N},b.getMxDbEntityClassHierarchy=function(){return fe},b.getMxDbTextureManager=function(){return q},b.getMxDbSvgManager=function(){return J},b.outDebugString=function(Ve){G==null?console.log(Ve):G(Ve)},b.setOutDebugCall=function(Ve){G=Ve},b.onLoad=function(){for(var Ve in m)m[Ve].onLoad("")},b.updateDisplay=function(){for(var Ve in m)m[Ve].updateDisplay()},b.currentMx=function(){return O},b.setCurrentMx=function(Ve){O=Ve},b.initResize=function(){for(var Ve in m)m[Ve].initResize()},b.addSelectEvent=function(Ve){L.push(Ve)},b.clearSelectEvent=function(){L=[]},b.callSelectObject=function(Ve){for(var rt in L)if(L[rt](Ve)==1)break},b.getMxObject=function(Ve){if(typeof Ve=="number"){for(var rt in m)if(m[rt].getId()===Ve)return m[rt]}else for(var rt in m)if(m[rt].getCanvas()===Ve)return m[rt];return null}},{"./SVGLoader/MxSVGLoader":59,"./View/MxDbEntity":69,"./View/MxDbTextureManager":74}],30:[function(t,e,l){Object.defineProperty(l,"__esModule",{value:!0}),l.MxMaterial=void 0;var n=t("three");(function(u){u.shaderUniforms={crAmbient:{value:new n.Vector3(1,0,0)},crDiffuse:{value:new n.Vector3(1,0,0)},crSpecular:{value:new n.Vector3(1,0,0)}},u.m_arrSystemColors=new Array(0,16711680,16776960,65280,65535,255,16711935,16777215,8421504,12632256,16711680,16744319,13369344,13395558,10027008,10046540,8323072,8339263,4980736,4990502,16727808,16752511,13382400,13401958,10036736,10051404,8331008,8343359,4985600,4992806,16744192,16760703,13395456,13408614,10046464,10056268,8339200,8347455,4990464,4995366,16760576,16768895,13408512,13415014,10056192,10061132,8347392,8351551,4995328,4997670,16776960,16777087,13421568,13421670,10066176,10066252,8355584,8355647,5000192,5000230,12582656,14679935,10079232,11717734,7510272,8755532,6258432,7307071,3755008,4344870,8388352,12582783,6736896,10079334,5019904,7510348,4161280,6258495,2509824,3755046,4194048,10485631,3394560,8375398,2529536,6265164,2064128,5209919,1264640,3099686,65280,8388479,52224,6736998,39168,5019980,32512,4161343,19456,2509862,65343,8388511,52275,6737023,39206,5019999,32543,4161359,19475,2509871,65407,8388543,52326,6737049,39244,5020018,32575,4161375,19494,2509881,65471,8388575,52377,6737074,39282,5020037,32607,4161391,19513,2509890,65535,8388607,52428,6737100,39321,5020057,32639,4161407,19532,2509900,49151,8380415,39372,6730444,29337,5014937,24447,4157311,14668,2507340,32767,8372223,26316,6724044,19609,5010073,16255,4153215,9804,2505036,16383,8364031,13260,6717388,9881,5005209,8063,4149119,4940,2502476,255,8355839,204,6710988,153,5000345,127,4145023,76,2500172,4129023,10452991,3342540,8349388,2490521,6245529,2031743,5193599,1245260,3089996,8323327,12550143,6684876,10053324,4980889,7490713,4128895,6242175,2490444,3745356,12517631,14647295,10027212,11691724,7471257,8735897,6226047,7290751,3735628,4335180,16711935,16744447,13369548,13395660,10027161,10046617,8323199,8339327,4980812,4990540,16711871,16744415,13369497,13395634,10027122,10046597,8323167,8339311,4980793,4990530,16711807,16744383,13369446,13395609,10027084,10046578,8323135,8339295,4980774,4990521,16711743,16744351,13369395,13395583,10027046,10046559,8323103,8339279,4980755,4990511,3355443,5987163,8684676,11382189,14079702,16777215),u.m_arrDefUseMaterials=new Array(null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null),u.m_arrDefUseCurveMaterials=new Array(null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null),u.m_arrDefUseBasicMaterials=new Array(null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null),u.m_selectMaterial=new n.MeshPhongMaterial({color:255,opacity:.2,transparent:!0,side:n.DoubleSide}),u.m_mouseMoveMaterial=new n.MeshPhongMaterial({color:16776960,side:n.DoubleSide}),u.m_lockedMaterial=new n.MeshPhongMaterial({color:197379,side:n.DoubleSide}),u.m_samplePoints=new n.PointsMaterial({color:255,depthTest:!1,size:8}),u.m_samplePointsMouseMove=new n.PointsMaterial({color:16711680,depthTest:!1,size:12});var c=new n.MeshBasicMaterial({color:16777215,transparent:!0,depthTest:!1,side:n.DoubleSide,opacity:1,stencilWrite:!1,colorWrite:!1});u.getStencilMaterial=function(){return c},u.GetColorByIndex=function(y){return u.m_arrSystemColors[y]},u.GetColorMaterial=function(y){var b=u.m_arrDefUseMaterials[y];return b===null&&(b=new n.MeshLambertMaterial({color:u.m_arrSystemColors[y],side:n.DoubleSide}),u.m_arrDefUseMaterials[y]=b),b},u.GetBaseColorMaterial=function(y){var b=u.m_arrDefUseBasicMaterials[y];return b===null&&(b=new n.MeshBasicMaterial({color:u.m_arrSystemColors[y],side:n.DoubleSide}),u.m_arrDefUseMaterials[y]=b),b},u.GetCurveColorMaterial=function(y){var b=u.m_arrDefUseCurveMaterials[y];return b===null&&(b=new n.LineBasicMaterial({color:u.m_arrSystemColors[y],linewidth:1}),u.m_arrDefUseCurveMaterials[y]=b),b},u.GetSelectMaterial=function(){return u.m_selectMaterial},u.GetMouseMoveMaterial=function(){return u.m_mouseMoveMaterial},u.GetLockedMaterial=function(){return u.m_lockedMaterial},u.GetSamplePointsMaterial=function(){return u.m_samplePoints},u.GetSamplePointsMouseMoveMaterial=function(){return u.m_samplePointsMouseMove},u.createMaterial=function(y){var b=void 0;if(y==null)return b;function m(O,N){if(N.map!=null){var L=N.map,G=new n.TextureLoader().load(L);G.wrapS=G.wrapT=n.RepeatWrapping,O.map=G,O.side=n.DoubleSide}}return y.transparent!=0?y.transparent=!0:y.transparent=!1,y.name=="MeshPhongMaterial"?m(b=new n.MeshPhongMaterial(y),y):y.name=="MeshBasicMaterial"?m(b=new n.MeshBasicMaterial(y),y):y.name=="MeshDepthMaterial"?m(b=new n.MeshDepthMaterial(y),y):y.name=="MeshNormalMaterial"?m(b=new n.MeshNormalMaterial(y),y):y.name=="MeshLambertMaterial"?m(b=new n.MeshLambertMaterial(y),y):y.name=="MeshStandardMaterial"&&m(b=new n.MeshStandardMaterial(y),y),b}})(l.MxMaterial||(l.MxMaterial={}))},{three:19}],31:[function(t,e,l){Object.defineProperty(l,"__esModule",{value:!0}),l.MxHFileLoad=l.MxNet=l.MxNetBinMessageType=l.MxNetSend=l.MxNetMessage=l.MxNetMessageType=l.MxNetData=void 0;var n,u,c=t("three"),y=t("./MxFun"),b=t("pako"),m=t("./MxManager"),O=t("./MxDrawData"),N=(L.prototype.getId=function(){return this._dataView.getInt32(4,!0)},L.prototype.getVersion_MwBlobHead=function(){return this._dataView.getInt32(60,!0)},L.prototype.getVersion_MwBlobHeadDynLen=function(){return this._dataView.getInt32(4,!0)},L.prototype.getdPointCurveBuffersHead=function(){var Ae={};return Ae.ver=this._dataView.getInt32(4,!0),Ae.databaseIndex=this._dataView.getInt32(8,!0),Ae.zeroLayerIdIndex=this._dataView.getInt32(16,!0),Ae.datacount=this._dataView.getInt32(20,!0),Ae.datasize=this._dataView.getInt32(24,!0),Ae},L.prototype.getdPointMeshBuffersHead=function(){var Ae={};return Ae.ver=this._dataView.getInt32(4,!0),Ae.databaseIndex=this._dataView.getInt32(8,!0),Ae.id=this._dataView.getInt32(12,!0),Ae.zeroLayerIdIndex=this._dataView.getInt32(16,!0),Ae.datacount=this._dataView.getInt32(20,!0),Ae.datasize=this._dataView.getInt32(24,!0),Ae},L.prototype.getdPointTextureBuffersHead=function(){var Ae={};return Ae.ver=this._dataView.getInt32(4,!0),Ae.databaseIndex=this._dataView.getInt32(8,!0),Ae.zeroLayerIdIndex=this._dataView.getInt32(16,!0),Ae.datacount=this._dataView.getInt32(20,!0),Ae.datasize=this._dataView.getInt32(24,!0),Ae},L.prototype.getBlobHeadForMemorySectionsHead=function(Ae){var Te={};return Te.type=this._dataView.getInt32(Ae,!0),Ae+=4,Te.ver=this._dataView.getInt32(Ae,!0),Ae+=4,Te.databaseIndex=this._dataView.getInt32(Ae,!0),Ae+=4,Te.nOffset=Ae,Te},L.prototype.getMemorySectionsHead=function(){var Ae=this.getBlobHeadForMemorySectionsHead(0);return Ae.zeroLayerIdIndex=this._dataView.getInt32(Ae.nOffset,!0),Ae.nOffset+=4,Ae.datacount=this._dataView.getInt32(Ae.nOffset,!0),Ae.nOffset+=4,Ae.datasize=this._dataView.getInt32(Ae.nOffset,!0),Ae.nOffset+=4,Ae.datasize!=Ae.nOffset&&console.log("mx: sectionshead size assert(0)"),Ae},L.prototype.getMemorySectionHead=function(Ae){var Te=this.getBlobHeadForMemorySectionsHead(Ae);return Ae=Te.nOffset,Te.pointCount=this._dataView.getInt32(Ae,!0),Ae+=4,Te.layerId=this._dataView.getInt32(Ae,!0),Ae+=4,Te.blkId=this._dataView.getInt32(Ae,!0),Ae+=4,Te.memColor=this._dataView.getInt32(Ae,!0),Ae+=4,Te.memId=this._dataView.getInt32(Ae,!0),Ae+=4,Te.memType=this._dataView.getInt32(Ae,!0),Ae+=4,Te.offset=Ae,Te},L.prototype.getdPointTextureBufferDataHead=function(Ae){Ae+=4,Ae+=4,Ae+=4;var Te={};return Te.dataCount=this._dataView.getInt32(Ae,!0),Ae+=4,Te.layerId=this._dataView.getInt32(Ae,!0),Ae+=4,Te.blkId=this._dataView.getInt32(Ae,!0),Ae+=4,Te.offset=Ae,Te},L.prototype.getdPointCurveBufferDataHead=function(Ae){Ae+=4,Ae+=4,Ae+=4;var Te={};return Te.pointCount=this._dataView.getInt32(Ae,!0),Ae+=4,Te.layerId=this._dataView.getInt32(Ae,!0),Ae+=4,Te.blkId=this._dataView.getInt32(Ae,!0),Ae+=4,Te.offset=Ae,Te},L.prototype.getdPointMeshBufferDataHead=function(Ae){Ae+=4,Ae+=4,Ae+=4;var Te={};return Te.pointCount=this._dataView.getInt32(Ae,!0),Ae+=4,Te.layerId=this._dataView.getInt32(Ae,!0),Ae+=4,Te.blkId=this._dataView.getInt32(Ae,!0),Ae+=4,Te.offset=Ae,Te},L.prototype.getDatabaseIndex=function(){return this._dataView.getInt32(8,!0)},L.prototype.getColorIndex=function(){return this._dataView.getInt32(24,!0)},L.prototype.getBufferType=function(){return this._dataView.getInt32(32,!0)},L.prototype.getIsSketchEntity=function(){return this._dataView.getInt32(40,!0)},L.prototype.getLayerId=function(){return this._dataView.getInt32(44,!0)},L.prototype.getBlockId=function(){return this._dataView.getInt32(48,!0)},L.prototype.getVertexBufferSize=function(){return this._dataView.getInt32(12,!0)},L.prototype.getIndexBufferSize=function(){return this._dataView.getInt32(16,!0)},L.prototype.getZeroLayerId=function(){return this._dataView.getInt32(52,!0)},L.prototype.getSelectMark=function(){return this._dataView.getInt32(56,!0)},L.prototype.getMateria=function(){var Ae=this._dataView.getInt32(36,!0);if(Ae==0)return"";for(var Te=[],Xe=0;Xe=this._dataNum)this.hideLoading(0);else{var Ae=this._dataType[this._iGet];this._iGet++;var Te=this,Xe=this._iGet+1,ie="$"+this._filename+".mxb"+Xe+".wgh";if(1=this._staticLoadingOpenFiles.length)return console.log("Mx staticLoadingOpenFiles error!"),void this.hideLoading(7);ie=this._staticLoadingOpenFiles[this._iGet]}var ue=ie;this._path&&(ue=this._path+ie);var pt=ue.substring(0,ue.lastIndexOf("/")+1);if(this.net.getMxDrawObject().setCurrentLoadUrl(pt),Ae==0)this.getFile(this._path,ie,function(kt){Te._isStopLoading||(Te.net.onStaticMessage(kt)||(console.log(this._path),console.log(ie)),Te.getData())},function(){Te._dataNum=0,Te._iGet=0,Te.hideLoading(8),console.log("mx get "+ie+" faild")});else{var mt=new XMLHttpRequest,Tt=ie;this._path&&(Tt=this._path+ie),this._urlParam.length!=0?mt.open("GET",Tt+this._urlParam):mt.open("GET",Tt),O.MxDrawData.m_isRequestHeaderCacheControl&&mt.setRequestHeader("Cache-Control","max-age=7200"),this._requestHeader.length!=0&&mt.setRequestHeader("usertoken",this._requestHeader),mt.responseType="arraybuffer",mt.onload=function(){Te._isStopLoading||(Te.net.onStaticMessage(mt.response)||console.log(Tt),Te.getData())},mt.addEventListener("error",function(kt){Te._dataNum=0,Te._iGet=0,Te.hideLoading(9),console.log("mx get "+ie+" faild")},!1),mt.send()}}},rt.prototype.onRenderHead=function(Ae){if(!this._isStopLoading){var Te=JSON.parse(Ae);this._dataType=Te.type,this._dataNum=Te.count,this._iGet=0,this.showLoading(),this.getData()}},rt.prototype.getFile=function(Ae,Te,Xe,ie){var ue=new c.FileLoader(this.manager);ue.setPath(Ae);var pt=Te;this._urlParam.length!=0&&(pt=Te+this._urlParam),this._requestHeader.length!=0&&(ue.requestHeader={usertoken:this._requestHeader}),ue.load(pt,Xe,function(){},ie)},rt);function rt(Ae,Te){this.net=null,this.manager=null,this._dataNum=0,this._iGet=0,this._dataType=[],this._path="",this._filename="",this._staticLoadingOpenFiles=[],this._isShowLoading=!0,this._requestHeader="",this._isStopLoading=!1,this._urlParam="",this.net=Ae,this.manager=Te!==void 0?Te:c.DefaultLoadingManager}l.MxHFileLoad=Ve},{"./MxDrawData":22,"./MxFun":27,"./MxManager":29,pako:1,three:19}],32:[function(t,e,l){var n;Object.defineProperty(l,"__esModule",{value:!0}),l.MxShader=void 0,(n=l.MxShader||(l.MxShader={})).VSHADER_COLOR_POINT=` precision highp float; uniform mat4 modelViewMatrix; uniform mat4 projectionMatrix; attribute vec2 position; attribute vec3 color; attribute vec4 tran1; attribute vec4 tran2; attribute vec4 tran3; attribute vec4 tran4; attribute float ishide; varying vec4 vColor; void main(){ mat4 tran; tran[0][0] = tran1.x;tran[0][1] = tran1.y;tran[0][2] = tran1.z;tran[0][3] = tran1.w; tran[1][0] = tran2.x;tran[1][1] = tran2.y;tran[1][2] = tran2.z;tran[1][3] = tran2.w; tran[2][0] = tran3.x;tran[2][1] = tran3.y;tran[2][2] = tran3.z;tran[2][3] = tran3.w; tran[3][0] = tran4.x;tran[3][1] = tran4.y;tran[3][2] = tran4.z;tran[3][3] = tran4.w; if(ishide > 0.1) vColor = vec4(color,0.0); else vColor = vec4(color,1.0); gl_Position = projectionMatrix * modelViewMatrix * tran * vec4( position.x,position.y,0.0, 1.0 ); } `,n.VSHADER_COLOR_POINT_BYLAYER=` precision highp float; uniform mat4 modelViewMatrix; uniform mat4 projectionMatrix; uniform vec3 color; attribute vec2 position; attribute vec4 tran1; attribute vec4 tran2; attribute vec4 tran3; attribute vec4 tran4; attribute float ishide; varying vec4 vColor; void main(){ mat4 tran; tran[0][0] = tran1.x;tran[0][1] = tran1.y;tran[0][2] = tran1.z;tran[0][3] = tran1.w; tran[1][0] = tran2.x;tran[1][1] = tran2.y;tran[1][2] = tran2.z;tran[1][3] = tran2.w; tran[2][0] = tran3.x;tran[2][1] = tran3.y;tran[2][2] = tran3.z;tran[2][3] = tran3.w; tran[3][0] = tran4.x;tran[3][1] = tran4.y;tran[3][2] = tran4.z;tran[3][3] = tran4.w; if(ishide > 0.1) vColor = vec4(color,0.0); else vColor = vec4(color,1.0); gl_Position = projectionMatrix * modelViewMatrix * tran * vec4( position.x,position.y,0.0, 1.0 ); } `,n.FSHADER_COLOR_POINT=` precision highp float; varying vec4 vColor; void main() { gl_FragColor = vColor; } `,n.VSHADER_COLOR_POINT_TEXTURE=` precision highp float; uniform mat4 modelViewMatrix; uniform mat4 projectionMatrix; attribute vec2 position; attribute vec2 uv; attribute vec4 tran1; attribute vec4 tran2; attribute vec4 tran3; attribute vec4 tran4; varying vec2 vUv; void main(){ vUv = uv; mat4 tran; tran[0][0] = tran1.x;tran[0][1] = tran1.y;tran[0][2] = tran1.z;tran[0][3] = tran1.w; tran[1][0] = tran2.x;tran[1][1] = tran2.y;tran[1][2] = tran2.z;tran[1][3] = tran2.w; tran[2][0] = tran3.x;tran[2][1] = tran3.y;tran[2][2] = tran3.z;tran[2][3] = tran3.w; tran[3][0] = tran4.x;tran[3][1] = tran4.y;tran[3][2] = tran4.z;tran[3][3] = tran4.w; gl_Position = projectionMatrix * modelViewMatrix * tran * vec4( position.x,position.y,0.0, 1.0 ); } `,n.FSHADER_COLOR_POINT_TEXTURE=` precision highp float; varying vec2 vUv; uniform sampler2D texture; void main() { gl_FragColor = texture2D( texture, vUv ); } `,n.VSHADER_COLOR_POINT_CLIP=` precision highp float; uniform mat4 modelViewMatrix; uniform mat4 projectionMatrix; uniform vec2 clippt1; uniform vec2 clippt2; uniform float vieww; uniform float viewh; attribute vec2 position; attribute vec3 color; attribute vec4 tran1; attribute vec4 tran2; attribute vec4 tran3; attribute vec4 tran4; attribute float ishide; varying vec4 vColor; varying vec2 vCp1; varying vec2 vCp2; void main(){ mat4 tran; tran[0][0] = tran1.x;tran[0][1] = tran1.y;tran[0][2] = tran1.z;tran[0][3] = tran1.w; tran[1][0] = tran2.x;tran[1][1] = tran2.y;tran[1][2] = tran2.z;tran[1][3] = tran2.w; tran[2][0] = tran3.x;tran[2][1] = tran3.y;tran[2][2] = tran3.z;tran[2][3] = tran3.w; tran[3][0] = tran4.x;tran[3][1] = tran4.y;tran[3][2] = tran4.z;tran[3][3] = tran4.w; vec4 pt1 = projectionMatrix * modelViewMatrix * vec4( clippt1.x,clippt1.y,0.0, 1.0 ); vec4 pt2 = projectionMatrix * modelViewMatrix * vec4( clippt2.x,clippt2.y,0.0, 1.0 ); vCp1 = vec2(pt1.x * vieww + vieww,pt1.y * viewh + viewh); vCp2 = vec2(pt2.x * vieww + vieww,pt2.y * viewh + viewh); if(ishide > 0.1) vColor = vec4(color,0.0); else vColor = vec4(color,1.0); gl_Position = projectionMatrix * modelViewMatrix * tran * vec4( position.x,position.y,0.0, 1.0 ); } `,n.VSHADER_COLOR_POINT_BYLAYER_CLIP=` precision highp float; uniform mat4 modelViewMatrix; uniform mat4 projectionMatrix; uniform vec3 color; uniform vec2 clippt1; uniform vec2 clippt2; uniform float vieww; uniform float viewh; attribute vec2 position; attribute vec4 tran1; attribute vec4 tran2; attribute vec4 tran3; attribute vec4 tran4; attribute float ishide; varying vec4 vColor; varying vec2 vCp1; varying vec2 vCp2; void main(){ mat4 tran; tran[0][0] = tran1.x;tran[0][1] = tran1.y;tran[0][2] = tran1.z;tran[0][3] = tran1.w; tran[1][0] = tran2.x;tran[1][1] = tran2.y;tran[1][2] = tran2.z;tran[1][3] = tran2.w; tran[2][0] = tran3.x;tran[2][1] = tran3.y;tran[2][2] = tran3.z;tran[2][3] = tran3.w; tran[3][0] = tran4.x;tran[3][1] = tran4.y;tran[3][2] = tran4.z;tran[3][3] = tran4.w; vec4 pt1 = projectionMatrix * modelViewMatrix * vec4( clippt1.x,clippt1.y,0.0, 1.0 ); vec4 pt2 = projectionMatrix * modelViewMatrix * vec4( clippt2.x,clippt2.y,0.0, 1.0 ); vCp1 = vec2(pt1.x * vieww + vieww,pt1.y * viewh + viewh); vCp2 = vec2(pt2.x * vieww + vieww,pt2.y * viewh + viewh); if(ishide > 0.1) vColor = vec4(color,0.0); else vColor = vec4(color,1.0); gl_Position = projectionMatrix * modelViewMatrix * tran * vec4( position.x,position.y,0.0, 1.0 ); } `,n.FSHADER_COLOR_POINT_CLIP=`precision highp float; varying vec4 vColor; varying vec2 vCp1; varying vec2 vCp2; void main() { if(gl_FragCoord.x > vCp1.x && gl_FragCoord.x < vCp2.x && gl_FragCoord.y > vCp1.y && gl_FragCoord.y < vCp2.y) gl_FragColor = vColor; else discard; } `,n.VSHADER_COLOR_POINT_FORMXCAD=` precision highp float; uniform mat4 modelViewMatrix; uniform mat4 projectionMatrix; uniform vec3 color; attribute vec2 position; attribute vec4 tran1; attribute vec4 tran2; attribute vec4 tran3; attribute vec4 tran4; attribute float ishide; varying vec4 vColor; void main(){ mat4 tran; tran[0][0] = tran1.x;tran[0][1] = tran1.y;tran[0][2] = tran1.z;tran[0][3] = tran1.w; tran[1][0] = tran2.x;tran[1][1] = tran2.y;tran[1][2] = tran2.z;tran[1][3] = tran2.w; tran[2][0] = tran3.x;tran[2][1] = tran3.y;tran[2][2] = tran3.z;tran[2][3] = tran3.w; tran[3][0] = tran4.x;tran[3][1] = tran4.y;tran[3][2] = tran4.z;tran[3][3] = tran4.w; gl_PointSize = 1.0; if(ishide > 0.1) vColor = vec4(color,0.0); else vColor = vec4(color,1.0); gl_Position = projectionMatrix * modelViewMatrix * tran * vec4( position.x,position.y,0.0, 1.0 ); } `,n.FSHADER_COLOR_POINT_FORMXCAD=` precision highp float; varying vec4 vColor; void main() { gl_FragColor = vColor; } `,n.VSHADER_COLOR_POINT_CLIP_FORMXCAD=` precision highp float; uniform mat4 modelViewMatrix; uniform mat4 projectionMatrix; uniform vec3 color; uniform vec2 clippt1; uniform vec2 clippt2; uniform float vieww; uniform float viewh; attribute vec2 position; attribute vec4 tran1; attribute vec4 tran2; attribute vec4 tran3; attribute vec4 tran4; attribute float ishide; varying vec4 vColor; varying vec2 vCp1; varying vec2 vCp2; void main(){ mat4 tran; tran[0][0] = tran1.x;tran[0][1] = tran1.y;tran[0][2] = tran1.z;tran[0][3] = tran1.w; tran[1][0] = tran2.x;tran[1][1] = tran2.y;tran[1][2] = tran2.z;tran[1][3] = tran2.w; tran[2][0] = tran3.x;tran[2][1] = tran3.y;tran[2][2] = tran3.z;tran[2][3] = tran3.w; tran[3][0] = tran4.x;tran[3][1] = tran4.y;tran[3][2] = tran4.z;tran[3][3] = tran4.w; vec4 pt1 = projectionMatrix * modelViewMatrix * vec4( clippt1.x,clippt1.y,0.0, 1.0 ); vec4 pt2 = projectionMatrix * modelViewMatrix * vec4( clippt2.x,clippt2.y,0.0, 1.0 ); vCp1 = vec2(pt1.x * vieww + vieww,pt1.y * viewh + viewh); vCp2 = vec2(pt2.x * vieww + vieww,pt2.y * viewh + viewh); if(ishide > 0.1) vColor = vec4(color,0.0); else vColor = vec4(color,1.0); gl_Position = projectionMatrix * modelViewMatrix * tran * vec4( position.x,position.y,0.0, 1.0 ); } `,n.FSHADER_COLOR_POINT_CLIP_FORMXCAD=`precision highp float; varying vec4 vColor; varying vec2 vCp1; varying vec2 vCp2; void main() { if(gl_FragCoord.x > vCp1.x && gl_FragCoord.x < vCp2.x && gl_FragCoord.y > vCp1.y && gl_FragCoord.y < vCp2.y) gl_FragColor = vColor; else discard; } `},{}],33:[function(t,e,l){Object.defineProperty(l,"__esModule",{value:!0}),l.MxStencilObject=void 0;var n=t("three"),u=t("./MxMaterial"),c=(y.prototype.object_onAfterRender=function(b){var m=this.aryMeshStencil;if(m&&0J&&(ne+=(rt.fontBoundingBoxAscent+rt.fontBoundingBoxDescent)*q,fe.push(b.substring(Ue,De)),Ue=De,Ve++);if(Uene&&(Ve+=Te=(Xe.fontBoundingBoxAscent+Xe.fontBoundingBoxDescent)*ve,Ue.push(b.substring(rt,Ae)),De.push(Te),rt=Ae);if(rt>16&255)+"",(L>>8&255)+"",(255&L)+"");fe.fillStyle=mt,fe.textAlign="left",fe.textBaseline="bottom";for(var Tt=0,kt=0;Tt>24&255;return y<=0&&(y=255),y/255},n.getColor=function(c){return 16777215&c},l.MxPair=function(c,y){this.first=c,this.second=y}},{three:19}],39:[function(t,e,l){var n,u,c;Object.defineProperty(l,"__esModule",{value:!0}),l.MxType=void 0,(u=(n=l.MxType||(l.MxType={})).MxCommandFlag||(n.MxCommandFlag={}))[u.MCRX_CMD_MODAL=0]="MCRX_CMD_MODAL",u[u.MCRX_CMD_TRANSPARENT=1]="MCRX_CMD_TRANSPARENT",u[u.MCRX_CMD_NO_UNDO_MARKER=2]="MCRX_CMD_NO_UNDO_MARKER",u[u.MCRX_CMD_NOPRV=4]="MCRX_CMD_NOPRV",u[u.MCRX_CMD_NO_RECORD_PRVCMD=8]="MCRX_CMD_NO_RECORD_PRVCMD",u[u.MCRX_CMD_NO_CLEAR_SELECT=16]="MCRX_CMD_NO_CLEAR_SELECT",(c=n.MxCloneType||(n.MxCloneType={}))[c.kClone=1]="kClone",c[c.kDragClone=2]="kDragClone",c[c.kMxFileClone=3]="kMxFileClone",c[c.kSaveDwgClone=4]="kSaveDwgClone"},{}],40:[function(t,e,l){Object.defineProperty(l,"__esModule",{value:!0}),l.MxBulid=void 0,window.MxDrawVersion="1.0(2024-10-11 11:06)",(l.MxBulid||(l.MxBulid={})).getVersion=function(){return window.MxDrawVersion?window.MxDrawVersion:"inalid version"}},{}],41:[function(t,e,l){Object.defineProperty(l,"__esModule",{value:!0}),l.MxWindowsEvent=void 0;var n,u,c,y=t("./MxFun"),b=t("./Operate/MxJigCmdManager"),m=t("./MxDrawData"),O=t("./UI/MxUiVue");function N(ve,ne){for(var Ue=0,De=c.length;UeMath.abs(ie.y-mt.y)?(this.m_ptOrtho.x=ie.x,this.m_ptOrtho.y=mt.y):(this.m_ptOrtho.x=mt.x,this.m_ptOrtho.y=ie.y),this.m_isValid=!0}else this.m_isValid=!1}},Ve.prototype.GetCurOrthoPoint=function(){return{pt:this.m_ptOrtho,isValid:this.m_isValid}},Ve);function Ve(ie){this.m_mxJig=null,this.m_ptOrtho=new q.Vector3,this.m_isValid=!1,this.m_isTrace=!0,this.m_mxJig=ie}l.McEdJigOrtho=De;var rt=(Ae.prototype.setAddDynDrawObject_call=function(ie){this.m_addDynDrawObject_call=ie},Ae.prototype.addDynDrawObject=function(ie){this.m_addDynDrawObject_call?this.m_addDynDrawObject_call(ie):c.addDynDrawObject(ie)},Ae.prototype.drawLine=function(ie,ue,pt){var mt=new q.Geometry,Tt=new q.LineBasicMaterial({color:this.m_iColor});mt.vertices.push(new q.Vector3(ie.x,ie.y,ie.z),new q.Vector3(ue.x,ue.y,ue.z));var kt=new q.Line(mt,Tt);pt.add(kt),this.addDynDrawObject(kt)},Ae.prototype.drawPolyline=function(ie,ue){for(var pt=new q.Geometry,mt=new q.LineBasicMaterial({color:this.m_iColor}),Tt=ie.length,kt=0;ktue)&&(this.m_osmode=ve.MxJigCmdManager.OsnapMode.kOsModekInValid));var pt=this.m_mxJig.getMxObject().getSysVarLong("OSMODE"),mt=c.getPrvPoint();this.notifyOsnap(pt,c.isValidPrvpoint()?mt:void 0)}},Xe.prototype.seInValidPoint=function(){this.setPoint(void 0)},Xe.prototype.getCurrentOSnapPoint=function(ie){var ue={isSnapPoint:!1};return this.isEnable()?(ue.pt=ie,ue.osmode=this.m_osmode,this.m_osmode!=ve.MxJigCmdManager.OsnapMode.kOsModekInValid?(ue.isSnapPoint=!0,ue.pt.x=this.m_ptSnapPoint.x,ue.pt.y=this.m_ptSnapPoint.y,ue.pt.z=this.m_ptSnapPoint.z,c.isOsnapZValue()||(ie.z=0)):ue.pt=ie):(ue.pt=ie,ue.osmode=ve.MxJigCmdManager.OsnapMode.kOsModekInValid),ue},Xe.prototype.setLongprogressStatus=function(ie){this.m_iLongprogressStatus=ie},Xe.prototype.reComputeOffset=function(){if(this.m_isOffsetInputPostion){var ie=this.m_mxJig.getMxObject(),ue=ne.MxTools.MillimeterToPixels(8);ue=ie.screenCoordLong2Doc(ue),this.m_vecOffset.set(0,ue,0),this.m_vecOffset.applyAxisAngle(new q.Vector3(0,0,1),20*Math.PI/180)}},Xe);function Xe(ie){this.m_inPoint=new q.Vector3,this.m_vecOffset=new q.Vector3,this.m_pt=new q.Vector3,this.m_isValid=!1,this.m_ptSnapPoint=new q.Vector3,this.m_ptSnapSrcPoint=new q.Vector3,this.m_snapObjectId=0,this.m_osmode=ve.MxJigCmdManager.OsnapMode.kOsModekInValid,this.m_prvInputPoint=new q.Vector3,this.m_isValidPrvInputPoint=!1,this.m_lOSmode=0,this.m_iLongprogressStatus=-1,this.m_isOffsetInputPostion=!1,this.m_mxJig=null,this.m_notifyOsnap_delayCall=void 0,this.m_isRuning=!1,this.m_isEnable=!1,this.m_mxJig=ie,this.m_draw=new rt}l.McEdJigOsnap=Te},{"../MxDrawData":22,"../MxDrawObject":23,"../MxFun":27,"../MxTools":38,"./MxJigCmdManager":54,three:19}],44:[function(t,e,l){var n,u=this&&this.__extends||(n=function(ne,Ue){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(De,Ve){De.__proto__=Ve}||function(De,Ve){for(var rt in Ve)Object.prototype.hasOwnProperty.call(Ve,rt)&&(De[rt]=Ve[rt])})(ne,Ue)},function(ne,Ue){function De(){this.constructor=ne}n(ne,Ue),ne.prototype=Ue===null?Object.create(Ue):(De.prototype=Ue.prototype,new De)});Object.defineProperty(l,"__esModule",{value:!0}),l.McGiWorldDrawSelect=l.McGiWorldDraw=l.McGiWorldDrawType=void 0;var c,y,b=t("three"),m=t("../MxThreeJS"),O=t("../MxManager"),N=t("three.meshline"),L=t("../MxFun");(y=c=l.McGiWorldDrawType||(l.McGiWorldDrawType={}))[y.kWorldDraw=1]="kWorldDraw",y[y.kDynDragDraw=2]="kDynDragDraw",y[y.kSelectDraw=3]="kSelectDraw";var G=(q.prototype.getType=function(){return this.worldDrawType},q.prototype.setXData=function(ne){this.xData=ne},q.prototype.setMatrix=function(ne){this.matrix=ne},q.prototype.getMatrix=function(){return this.matrix},q.prototype.setOpacity=function(ne){this.opacity=ne},q.prototype.getOpacity=function(){return this.opacity},q.prototype.setColor=function(ne){ne=L.MxFun.getNumberColor(ne),this.iColor!=ne&&(this.widthMaterial=null),this.iColor=ne},q.prototype.setDash=function(ne,Ue){this.dDashArray=ne,this.dDashRatio=Ue},q.prototype.getDash=function(){return{dDashArray:this.dDashArray,dDashRatio:this.dDashRatio}},q.prototype.setDashLineDisplay=function(ne){ne?(this.dDashArray=.03,this.dDashRatio=.1,this.dLineWidth==0&&(this.dLineWidth=6,this.lineWidthByPixels=!0)):(this.dDashArray=0,this.dDashRatio=0)},q.prototype.isDashLineDisplay=function(){return 0=b.MxJigCmdManager.DragStatus.kKW1&&0=b.MxJigCmdManager.DragStatus.kKW1&&(pt=b.MxJigCmdManager.DragStatus.kNormal),this.m_resultDragStatus=pt,b.MxJigCmdManager.DoneStatius.kExitCommand;m.MxFun.Assert(0)},Te.prototype.upDisplay=function(){this.m_currSamplerPoint&&this.m_pWorldDraw&&(this._mxObject.getMcObject().onReadyJigUpdateDispla(),this.m_pWorldDraw.worldDraw(this.m_currSamplerPoint))},Te);function Te(){var pt=rt.call(this)||this;return pt.m_currSamplerPoint=null,pt.m_retcall=null,pt.m_resultDragStatus=b.MxJigCmdManager.DragStatus.kCancel,pt.m_cursorType=N.MxUiVue.CursorType.kCross,pt.setUserInputControls(0),pt.setDisableDynInput(!0),pt}l.MrxDbgUiPrKeyWord=Ae;var Xe,ie=(u(ue,Xe=O.MrxDbgUiPrBase),ue.prototype.value=function(){return this.m_value},ue.prototype.basePt=function(){return new y.Vector3(this.m_basePt.x,this.m_basePt.y,0)},ue.prototype.setBasePt=function(pt){this.m_basePt==null?this.m_basePt=new y.Vector3(pt.x,pt.y,0):(this.m_basePt.x=pt.x,this.m_basePt.y=pt.y),this.m_useBasePt=!0},ue.prototype.setUseBasePt=function(pt){this.m_useBasePt=pt},ue.prototype.initGo=function(){this.m_keyWordPicked="",this.m_retcall=null,this.clearLastInputPoint(),this.m_useBasePt&&this.SetLASTPOINT(this.m_basePt)},ue.prototype.go=function(pt){this.initGo(),this.m_retcall=pt,this.m_previousInPoint=null,this.m_currentInPoint=null,this.m_value=0,b.MxJigCmdManager.runCmd(this)},ue.prototype.onExitCommand=function(){var pt=this;N.MxUiVue.setCursorType(N.MxUiVue.CursorType.kNormal);var mt=!1;this.m_retcall!=null&&(b.MxJigCmdManager.setRunCmdEvent(function(){Xe.prototype.onExitCommand.call(pt,!1),mt=!0}),this.m_retcall(this.getReturnStatus(this.m_resultDragStatus)),b.MxJigCmdManager.setRunCmdEvent(void 0)),!mt&&b.MxJigCmdManager.isWaitCmdNull()&&N.MxUiVue.restoreCmdStatus(),mt||Xe.prototype.onExitCommand.call(this,!0)},ue.prototype.onStartCommand=function(){N.MxUiVue.setCursorType(this.m_cursorType),this.printMessage(),b.MxJigCmdManager.setKeywordList(this.keyWords()),Xe.prototype.onStartCommand.call(this)},ue.prototype.sampler=function(){var pt,mt=b.MxJigCmdManager.acquirePoint(this.m_toucheType,!1);return mt.status==b.MxJigCmdManager.DragStatus.kNormal&&(this.m_currSamplerPoint==null?this.m_currSamplerPoint=new y.Vector3(mt.pt.x,mt.pt.y,0):(this.m_currSamplerPoint.x=mt.pt.x,this.m_currSamplerPoint.y=mt.pt.y)),pt=this.m_useBasePt?this.acquireAngle(this.m_toucheType,this.m_basePt):this.acquireAngle(this.m_toucheType,this.m_currentInPoint),this.procInKeyword(pt),pt.status==b.MxJigCmdManager.DragStatus.kNormal?(this.m_value=pt.ang,pt.status):pt.status==b.MxJigCmdManager.DragStatus.kKW1?pt.status:this.m_useBasePt||this.m_currentInPoint?mt.status:((pt=this.acquirePoint(this.m_toucheType,!1)).status==b.MxJigCmdManager.DragStatus.kNormal&&pt.exit&&(this.m_previousInPoint==null?this.m_previousInPoint=new y.Vector3(pt.pt.x,pt.pt.y,0):(this.m_previousInPoint.x=pt.pt.x,this.m_previousInPoint.y=pt.pt.y)),pt.status)},ue.prototype.done=function(pt){if(this.m_retcall!=null)return this.m_resultDragStatus=pt,this.m_useBasePt||pt!=b.MxJigCmdManager.DragStatus.kNormal||!this.m_previousInPoint||this.m_currentInPoint?b.MxJigCmdManager.DoneStatius.kExitCommand:(this.m_currentInPoint=this.m_previousInPoint,this.m_previousInPoint=null,b.MxJigCmdManager.DoneStatius.kContinueCommand);m.MxFun.Assert(0)},ue.prototype.upDisplay=function(){this.m_currSamplerPoint&&(this.m_pWorldDraw&&(this._mxObject.getMcObject().onReadyJigUpdateDispla(),this.m_pWorldDraw.worldDraw(this.m_currSamplerPoint)),this.m_useBasePt&&this.m_basePt?this.drawEntity(L.MxThreeJS.createLine(this.m_currSamplerPoint,this.m_basePt,16777215)):this.m_currentInPoint&&this.drawEntity(L.MxThreeJS.createLine(this.m_currSamplerPoint,this.m_currentInPoint,16777215)))},ue);function ue(){var pt=Xe.call(this)||this;return pt.m_useBasePt=!1,pt.m_basePt=null,pt.m_previousInPoint=null,pt.m_currentInPoint=null,pt.m_value=0,pt.m_currSamplerPoint=null,pt.m_retcall=null,pt.m_resultDragStatus=b.MxJigCmdManager.DragStatus.kCancel,pt.m_cursorType=N.MxUiVue.CursorType.kCross,pt}l.MrxDbgUiPrAngle=ie},{"../MxFun":27,"../MxString":34,"../MxThreeJS":37,"../UI/MxUiVue":65,"./MrxDbgUiPrBase":45,"./MxJigCmdManager":54,three:19}],47:[function(t,e,l){var n,u=this&&this.__extends||(n=function(fe,ve){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ne,Ue){ne.__proto__=Ue}||function(ne,Ue){for(var De in Ue)Object.prototype.hasOwnProperty.call(Ue,De)&&(ne[De]=Ue[De])})(fe,ve)},function(fe,ve){function ne(){this.constructor=fe}n(fe,ve),fe.prototype=ve===null?Object.create(ve):(ne.prototype=ve.prototype,new ne)});Object.defineProperty(l,"__esModule",{value:!0}),l.MrxDbgUiPrPoint=void 0;var c,y=t("three"),b=t("./MxJigCmdManager"),m=t("../MxFun"),O=t("./MrxDbgUiPrBase"),N=t("../UI/MxUiVue"),L=t("../MxThreeJS"),G=t("../MxManager"),q=(u(J,c=O.MrxDbgUiPrBase),J.prototype.value=function(){return new y.Vector3(this.m_value.x,this.m_value.y,0)},J.prototype.getCADValue=function(){return G.MxManager.getMxCpp().newMcGePoint3d(new y.Vector3(this.m_value.x,this.m_value.y,0))},J.prototype.basePt=function(){return new y.Vector3(this.m_basePt.x,this.m_basePt.y,0)},J.prototype.setBasePt=function(fe){this.m_basePt==null?this.m_basePt=new y.Vector3(fe.x,fe.y,0):(this.m_basePt.x=fe.x,this.m_basePt.y=fe.y),this.m_useBasePt=!0},J.prototype.setUseBasePt=function(fe){this.m_useBasePt=fe},J.prototype.initGo=function(){this.m_keyWordPicked="",this.m_retcall=null,this.m_retWhileCall=null,this.m_exitCall=null,this.m_useBasePt&&this.SetLASTPOINT(this.m_basePt)},J.prototype.go=function(fe){this.initGo(),this.m_retcall=fe,b.MxJigCmdManager.runCmd(this)},J.prototype.goWhile=function(fe,ve){this.initGo(),this.m_retWhileCall=fe,ve&&(this.m_exitCall=ve),b.MxJigCmdManager.runCmd(this)},J.prototype.onExitCommand=function(){var fe=this;N.MxUiVue.setCursorType(N.MxUiVue.CursorType.kNormal);var ve=!1;this.m_retcall!=null&&(b.MxJigCmdManager.setRunCmdEvent(function(){c.prototype.onExitCommand.call(fe,!1),ve=!0}),this.m_retcall(this.getReturnStatus(this.m_resultDragStatus)),b.MxJigCmdManager.setRunCmdEvent(void 0)),!ve&&b.MxJigCmdManager.isWaitCmdNull()&&N.MxUiVue.restoreCmdStatus(),ve||c.prototype.onExitCommand.call(this,!0)},J.prototype.onStartCommand=function(){N.MxUiVue.setCursorType(this.m_cursorType),this.printMessage(),b.MxJigCmdManager.setKeywordList(this.keyWords()),this.m_useBasePt&&this.SetLASTPOINT(this.m_basePt),c.prototype.onStartCommand.call(this)},J.prototype.sampler=function(){var fe=this.acquirePoint(this.m_toucheType);return this.procInKeyword(fe),fe.status==b.MxJigCmdManager.DragStatus.kNormal&&(this.m_value==null?this.m_value=new y.Vector3(fe.pt.x,fe.pt.y,0):(this.m_value.x=fe.pt.x,this.m_value.y=fe.pt.y)),fe.status},J.prototype.done=function(fe){if(this.m_retcall!=null)return this.m_resultDragStatus=fe,this.m_exitCall&&this.m_exitCall(this.getReturnStatus(this.m_resultDragStatus)),b.MxJigCmdManager.DoneStatius.kExitCommand;if(this.m_retWhileCall!=null){if((this.m_resultDragStatus=fe)==b.MxJigCmdManager.DragStatus.kCancel)return this.m_exitCall&&this.m_exitCall(this.getReturnStatus(this.m_resultDragStatus)),b.MxJigCmdManager.DoneStatius.kExitCommand;var ve=!1;fe==b.MxJigCmdManager.DragStatus.kNull&&(ve=!0);var ne=this.m_retWhileCall(this.getReturnStatus(this.m_resultDragStatus));return ne!=null&&ne.exit!=null&&(ve=ne.exit),ve?(this.m_exitCall&&this.m_exitCall(this.getReturnStatus(this.m_resultDragStatus)),b.MxJigCmdManager.DoneStatius.kExitCommand):(b.MxJigCmdManager.setKeywordList(this.keyWords()),this.printMessage(),b.MxJigCmdManager.DoneStatius.kContinueCommand)}m.MxFun.Assert(0)},J.prototype.upDisplay=function(){if(this.m_value&&(this.m_pWorldDraw&&(this._mxObject.getMcObject().onReadyJigUpdateDispla(0,this.m_value),this.m_pWorldDraw.worldDraw(this.m_value)),this.m_useBasePt&&this.m_basePt)){var fe=16777215;this._mxObject.isWhiteViewColor()&&(fe=0);var ve=this._mxObject;this.drawEntity(L.MxThreeJS.createLine(ve.toSmallcoord(this.m_value),ve.toSmallcoord(this.m_basePt),fe),void 0,!0)}},J);function J(){var fe=c.call(this)||this;return fe.m_useBasePt=!1,fe.m_basePt=null,fe.m_value=null,fe.m_retcall=null,fe.m_retWhileCall=null,fe.m_exitCall=null,fe.m_resultDragStatus=b.MxJigCmdManager.DragStatus.kCancel,fe.m_cursorType=N.MxUiVue.CursorType.kCross,fe}l.MrxDbgUiPrPoint=q},{"../MxFun":27,"../MxManager":29,"../MxThreeJS":37,"../UI/MxUiVue":65,"./MrxDbgUiPrBase":45,"./MxJigCmdManager":54,three:19}],48:[function(t,e,l){Object.defineProperty(l,"__esModule",{value:!0}),l.MxCmdRunManager=void 0;var n,u,c,y,b,m,O,N,L=t("../MxFun"),G=t("../MxType"),q=t("./MxJigCmdManager"),J=t("../UI/MxUiVue"),fe=t("../MxDrawData");n=l.MxCmdRunManager||(l.MxCmdRunManager={}),u={},c=new Array,y=0,b=!1,m="",O={},N={},n.InitQuickCommand=function(ve){if(ve)if(ve instanceof Array)for(var ne=ve.length,Ue=0;Ue=c.length&&(y=0):b=!0,!0},n.MoveDownKey=function(){return!!b&&(--y<0&&(y=c.length-1),!0)},n.GetListCommad=function(){return y<0||y>=c.length?"":c[y]},n.ClearPrvCmd=function(){m=""},n.GetPrvCmd=function(){return m},n.SetPrvCmd=function(ve){m=ve},n.runCmd=function(ve,ne,Ue){var De=ne.toUpperCase(),Ve=u[De];if(ve&&Ve==null){var rt=O[De];if(rt!=null&&(Ve=u[rt.toUpperCase()]),Ve==null)return J.MxUiVue.isNull()?console.log(L.MxFun.formatString('未知命令"{0}"',ne)):J.MxUiVue.acutPrintf(`未知命令"{0}"。 命令:`,ne),!1}if(!Ve)return!1;ve.endPanCommand(),ve.getTempMarkDraw().clear(!1);var Ae=c.indexOf(Ve.cmd);-1J.x)Ae=O.MxThreeJS.createLines(rt,16777215),Te=255;else{var Xe=this.getMxObject().viewCoordLong2Cad(3);Ae=O.MxThreeJS.createDashedLines(rt,16777215,2*Xe,Xe)}var ie=[];ie.push(J),ie.push(ve),ie.push(fe),ie.push(J),ie.push(fe),ie.push(ne);var ue=O.MxThreeJS.createTriangle(ie,Te,.27);this.drawEntity(ue,30),this.drawEntity(Ae,31)},G);function G(q){var J=c.call(this)||this;return J.m_pt1=q,J.m_pt2=q,J}l.MxIntelliSelectJig=L},{"../MxThreeJS":37,"../MxTools":38,"./MxJig":53,"./MxJigCmdManager":54,three:19}],53:[function(t,e,l){Object.defineProperty(l,"__esModule",{value:!0}),l.McEdJigCommand=l.MxDynamicInput=void 0;var n=t("three"),u=t("../MxFun"),c=t("./MxJigCmdManager"),y=t("../MxManager"),b=t("../MxTools"),m=t("../UI/MxUiVue"),O=t("./McEdJigOsnap"),N=t("./McEdJigDynamicTrace"),L=t("./MxPolarAxisTrace"),G=t("./MxGridTrace"),q=t("../MxThreeJS"),J=t("../MxDrawData"),fe=t("./MxOffsetArrow"),ve=(ne.prototype.getFocusIndex=function(){return this.m_isShowDynInput?this.m_iFocusIndex:-1},ne.prototype.ClearDynDrawEntity=function(){for(var Ve=this.m_jig.getMxObject().getTheTempDrawContainer_SmallCoord(),rt=this.m_vecDynDrawEntity.length,Ae=0;Ae"u"?$(document).ready(function(){c.CreateMx()}):MxDocumentReady(t,c.CreateMx)},c).Main()},{"./MxFun":27,"./MxManager":29}],59:[function(t,e,l){Object.defineProperty(l,"__esModule",{value:!0}),l.MxSvgManager=void 0;var n=t("three"),u=t("three"),c=t("./SVGLoader"),y=function(){this.svg=new n.Group,this.aryMeterial=[],this.boxSize=new u.Vector3(1,1,1)},b=(m.prototype.loadSVGImp=function(L,G,q,J){new c.SVGLoader().load(L,function(fe){if(fe.paths.length){var ve=[],ne=fe.paths,Ue=new n.Group,De=!0,Ve=!0,rt=!1,Ae=!1;J&&(J.drawStrokes&&(De=J.drawStrokes),J.drawFillShapes&&(Ve=J.drawFillShapes),J.fillShapesWireframe&&(rt=J.fillShapesWireframe),J.strokesWireframe&&(Ae=J.strokesWireframe));for(var Te=0;TeNumber.EPSILON?G.loc=L.RIGHT:ue*mt<0||pt*Tt<0?G.loc=L.BEHIND:Math.sqrt(ue*ue+pt*pt)=wn.t-Number.EPSILON})===void 0&&(kt.push(wn),It.push(new y.Vector2(wn.x,wn.y)))},Dn=1;DnXe&&(Xe=Tt.y),Tt.yue&&(ue=Tt.x),Tt.x=G&&so.push(hr[bi]);return so.push(hr[hr.length-1]),so}(O)).length;if(pn<2)return 0;var _n,Dn,an,Rn,Lt,wn,hn=O[0].equals(O[pn-1]),xn=O[0],$n=N.strokeWidth/2,Xr=1/(pn-1),ti=0,gn=!1,Xn=0,Kn=3*ve,Vn=2*ve;fi(O[0],O[1],ne).multiplyScalar($n),Xe.copy(O[0]).sub(ne),ie.copy(O[0]).add(ne),ue.copy(Xe),pt.copy(ie);for(var Yn=1;Yn"),this.isShowMainMenu&&(document.write(""),document.write(""),document.write("