1!function(){"use strict";var e={744:function(e,t){t.Z=(e,t)=>{const n=e.__vccOpts||e;for(const[e,i]of t)n[e]=i;return n}}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={}; 2/** 3* @vue/shared v3.4.23 4* (c) 2018-present Yuxi (Evan) You and Vue contributors 5* @license MIT 6**/ 7/*! #__NO_SIDE_EFFECTS__ */ 8function t(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}n.r(e),n.d(e,{BaseTransition:function(){return zi},BaseTransitionPropsValidators:function(){return Bi},Comment:function(){return Zs},DeprecationTypes:function(){return da},EffectScope:function(){return pe},ErrorCodes:function(){return fn},ErrorTypeStrings:function(){return oa},Fragment:function(){return $s},KeepAlive:function(){return Qi},ReactiveEffect:function(){return _e},Static:function(){return Ks},Suspense:function(){return vi},Teleport:function(){return qs},Text:function(){return Ys},TrackOpTypes:function(){return an},Transition:function(){return ya},TransitionGroup:function(){return dl},TriggerOpTypes:function(){return ln},VueElement:function(){return sl},assertNumber:function(){return pn},callWithAsyncErrorHandling:function(){return vn},callWithErrorHandling:function(){return gn},camelize:function(){return P},capitalize:function(){return D},cloneVNode:function(){return _o},compatUtils:function(){return ua},computed:function(){return Jo},createApp:function(){return Gl},createBlock:function(){return ao},createCommentVNode:function(){return bo},createElementBlock:function(){return oo},createElementVNode:function(){return fo},createHydrationRenderer:function(){return Ns},createPropsRestProxy:function(){return Hr},createRenderer:function(){return Ds},createSSRApp:function(){return Wl},createSlots:function(){return xr},createStaticVNode:function(){return xo},createTextVNode:function(){return yo},createVNode:function(){return mo},customRef:function(){return en},defineAsyncComponent:function(){return Zi},defineComponent:function(){return $i},defineCustomElement:function(){return nl},defineEmits:function(){return Pr},defineExpose:function(){return Lr},defineModel:function(){return Nr},defineOptions:function(){return Ir},defineProps:function(){return Rr},defineSSRCustomElement:function(){return il},defineSlots:function(){return Dr},devtools:function(){return aa},effect:function(){return Se},effectScope:function(){return fe},getCurrentInstance:function(){return Lo},getCurrentScope:function(){return ge},getTransitionRawChildren:function(){return Xi},guardReactiveProps:function(){return vo},h:function(){return ea},handleError:function(){return _n},hasInjectionContext:function(){return ls},hydrate:function(){return Hl},initCustomFormatter:function(){return ta},initDirectivesForSSR:function(){return $l},inject:function(){return as},isMemoSame:function(){return ia},isProxy:function(){return Nt},isReactive:function(){return Lt},isReadonly:function(){return It},isRef:function(){return Gt},isRuntimeOnly:function(){return Go},isShallow:function(){return Dt},isVNode:function(){return lo},markRaw:function(){return Ut},mergeDefaults:function(){return Br},mergeModels:function(){return zr},mergeProps:function(){return Mo},nextTick:function(){return Cn},normalizeClass:function(){return $},normalizeProps:function(){return Y},normalizeStyle:function(){return G},onActivated:function(){return tr},onBeforeMount:function(){return cr},onBeforeUnmount:function(){return pr},onBeforeUpdate:function(){return ur},onDeactivated:function(){return nr},onErrorCaptured:function(){return _r},onMounted:function(){return hr},onRenderTracked:function(){return vr},onRenderTriggered:function(){return gr},onScopeDispose:function(){return ve},onServerPrefetch:function(){return mr},onUnmounted:function(){return fr},onUpdated:function(){return dr},openBlock:function(){return eo},popScopeId:function(){return Qn},provide:function(){return os},proxyRefs:function(){return Jt},pushScopeId:function(){return Jn},queuePostFlushCb:function(){return Ln},reactive:function(){return Tt},readonly:function(){return Ct},ref:function(){return Wt},registerRuntimeCompiler:function(){return Ho},render:function(){return zl},renderList:function(){return yr},renderSlot:function(){return br},resolveComponent:function(){return ci},resolveDirective:function(){return di},resolveDynamicComponent:function(){return ui},resolveFilter:function(){return ha},resolveTransitionHooks:function(){return Gi},setBlockTracking:function(){return ro},setDevtoolsHook:function(){return la},setTransitionHooks:function(){return qi},shallowReactive:function(){return At},shallowReadonly:function(){return Rt},shallowRef:function(){return jt},ssrContextKey:function(){return Si},ssrUtils:function(){return ca},stop:function(){return Ee},toDisplayString:function(){return le},toHandlerKey:function(){return N},toHandlers:function(){return Sr},toRaw:function(){return Ot},toRef:function(){return sn},toRefs:function(){return tn},toValue:function(){return Zt},transformVNodeArgs:function(){return ho},triggerRef:function(){return $t},unref:function(){return Yt},useAttrs:function(){return kr},useCssModule:function(){return ol},useCssVars:function(){return Ba},useModel:function(){return Qo},useSSRContext:function(){return Ei},useSlots:function(){return Ur},useTransitionState:function(){return Fi},vModelCheckbox:function(){return bl},vModelDynamic:function(){return Cl},vModelRadio:function(){return Sl},vModelSelect:function(){return El},vModelText:function(){return xl},vShow:function(){return ka},version:function(){return ra},warn:function(){return sa},watch:function(){return Ri},watchEffect:function(){return Mi},watchPostEffect:function(){return Ti},watchSyncEffect:function(){return Ai},withAsyncContext:function(){return Gr},withCtx:function(){return ti},withDefaults:function(){return Or},withDirectives:function(){return Ni},withKeys:function(){return Ol},withMemo:function(){return na},withModifiers:function(){return Dl},withScopeId:function(){return ei}});const i={},r=[],s=()=>{},o=()=>!1,a=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),l=e=>e.startsWith("onUpdate:"),c=Object.assign,h=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,d=(e,t)=>u.call(e,t),p=Array.isArray,f=e=>"[object Map]"===S(e),m=e=>"[object Set]"===S(e),g=e=>"[object Date]"===S(e),v=e=>"function"==typeof e,_=e=>"string"==typeof e,y=e=>"symbol"==typeof e,x=e=>
vendor: 4,130 bytes, line 8
8null!==e&&"object"==typeof e,b=e=>(x(e)||v(e))&&v(e.then)&&v(e.catch),w=Object.prototype.toString,S=e=>w.call(e),E=e=>"[object Object]"===S(e),M=e=>_(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,T=t(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),A=t("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),C=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},R=/-(\w)/g,P=C((e=>e.replace(R,((e,t)=>t?t.toUpperCase():"")))),L=/\B([A-Z])/g,I=C((e=>e.replace(L,"-$1").toLowerCase())),D=C((e=>e.charAt(0).toUpperCase()+e.slice(1))),N=C((e=>e?`on${D(e)}`:"")),O=(e,t)=>!Object.is(e,t),U=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},k=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},F=e=>{const t=parseFloat(e);return isNaN(t)?e:t},V=e=>{const t=_(e)?Number(e):NaN;return isNaN(t)?e:t};let B;const z=()=>B||(B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{});const H=t("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");function G(e){if(p(e)){const t={};for(let n=0;n<e.length;n++){const i=e[n],r=_(i)?X(i):G(i);if(r)for(const e in r)t[e]=r[e]}return t}if(_(e)||x(e))return e}const W=/;(?![^(]*\))/g,j=/:([^]+)/,q=/\/\*[^]*?\*\//g;function X(e){const t={};return e.replace(q,"").split(W).forEach((e=>{if(e){const n=e.split(j);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function $(e){let t="";if(_(e))t=e;else if(p(e))for(let n=0;n<e.length;n++){const i=$(e[n]);i&&(t+=i+" ")}else if(x(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Y(e){if(!e)return null;let{class:t,style:n}=e;return t&&!_(t)&&(e.class=$(t)),n&&(e.style=G(n)),e}const Z=t("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),K=t("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),J=t("annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"),Q=t("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),ee="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",te=t(ee),ne=t(ee+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function ie(e){return!!e||""===e}const re=t("accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,c
8olspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap"),se=t("xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode
8-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan");function oe(e,t){if(e===t)return!0;let n=g(e),i=g(t);if(n||i)return!(!n||!i)&&e.getTime()===t.getTime();if(n=y(e),i=y(t),n||i)return e===t;if(n=p(e),i=p(t),n||i)return!(!n||!i)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let i=0;n&&i<e.length;i++)n=oe(e[i],t[i]);return n}(e,t);if(n=x(e),i=x(t),n||i){if(!n||!i)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const i=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(i&&!r||!i&&r||!oe(e[n],t[n]))return!1}}return String(e)===String(t)}function ae(e,t){return e.findIndex((e=>oe(e,t)))}const le=e=>_(e)?e:null==e?"":p(e)||x(e)&&(e.toString===w||!v(e.toString))?JSON.stringify(e,ce,2):String(e),ce=(e,t)=>t&&t.__v_isRef?ce(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],i)=>(e[he(t,i)+" =>"]=n,e)),{})}:m(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>he(e)))}:y(t)?he(t):!x(t)||p(t)||E(t)?t:String(t),he=(e,t="")=>{var n;return y(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};let ue,de;class pe{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=ue,!e&&ue&&(this.index=(ue.scopes||(ue.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=ue;try{return ue=this,e()}finally{ue=t}}else 0}on(){ue=this}off(){ue=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0,this._active=!1}}}function fe(e){return new pe(e)}function me(e,t=ue){t&&t.active&&t.effects.push(e)}function ge(){return ue}function ve(e){ue&&ue.cleanups.push(e)}class _e{constructor(e,t,n,i){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,me(this,i)}get dirty(){if(2===this._dirtyLevel||3===this._dirtyLevel){this._dirtyLevel=1,Ce();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(ye(t.computed),this._dirtyLevel>=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),Re()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=Me,t=de;try{return Me=!0,de=this,this._runnings++,xe(this),this.fn()}finally{be(this),this._runnings--,de=t,Me=e}}stop(){var e;this.active&&(xe(this),be(this),null==(e=this.onStop)||e.call(this),this.active=!1)}}function ye(e){return e.value}function xe(e){e._trackId++,e._depsLength=0}function be(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)we(e.deps[t],e);e.deps.length=e._depsLength}}function we(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}function Se(e,t){e.effect instanceof _e&&(e=e.effect.fn);const n=new _e(e,s,(()=>{n.dirty&&n.run()}));t&&(c(n,t),t.scope&&me(n,t.scope)),t&&t.lazy||n.run();const i=n.run.bind(n);return i.effect=n,i}function Ee(e){e.effect.stop()}let Me=!0,Te=0;const Ae=[];function Ce(){Ae.push(Me),Me=!1}function Re(){const e=Ae.pop();Me=void 0===e||e}function Pe(){Te++}function Le(){for(Te--;!Te&&De.length;)De.shift()()}function Ie(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&we(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}const De=[];function Ne(e,t,n){Pe();for(const n of e.keys()){let i;n._dirtyLevel<t&&(null!=i?i:i=e.get(n)===n._trackId)&&(n._shouldSchedule||(n._shouldSchedule=0===n._dirtyLevel),n._dirtyLevel=t),n._shouldSchedule&&(null!=i?i:i=e.get(n)===n._trackId)&&(n.trigger(),n._runnings&&!n.allowRecurse||2===n._dirtyLevel||(n._shouldSchedule=!1,n.scheduler&&De.push(n.scheduler)))}Le()}const Oe=(e,t)=>
vendor: 5,808 bytes, line 8
8{const n=new Map;return n.cleanup=e,n.computed=t,n},Ue=new WeakMap,ke=Symbol(""),Fe=Symbol("");function Ve(e,t,n){if(Me&&de){let t=Ue.get(e);t||Ue.set(e,t=new Map);let i=t.get(n);i||t.set(n,i=Oe((()=>t.delete(n)))),Ie(de,i)}}function Be(e,t,n,i,r,s){const o=Ue.get(e);if(!o)return;let a=[];if("clear"===t)a=[...o.values()];else if("length"===n&&p(e)){const e=Number(i);o.forEach(((t,n)=>{("length"===n||!y(n)&&n>=e)&&a.push(t)}))}else switch(void 0!==n&&a.push(o.get(n)),t){case"add":p(e)?M(n)&&a.push(o.get("length")):(a.push(o.get(ke)),f(e)&&a.push(o.get(Fe)));break;case"delete":p(e)||(a.push(o.get(ke)),f(e)&&a.push(o.get(Fe)));break;case"set":f(e)&&a.push(o.get(ke))}Pe();for(const e of a)e&&Ne(e,4);Le()}const ze=t("__proto__,__v_isRef,__isVue"),He=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(y)),Ge=We();function We(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=Ot(this);for(let e=0,t=this.length;e<t;e++)Ve(n,0,e+"");const i=n[t](...e);return-1===i||!1===i?n[t](...e.map(Ot)):i}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){Ce(),Pe();const n=Ot(this)[t].apply(this,e);return Le(),Re(),n}})),e}function je(e){y(e)||(e=String(e));const t=Ot(this);return Ve(t,0,e),t.hasOwnProperty(e)}class qe{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const i=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!i;if("__v_isReadonly"===t)return i;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(i?r?Et:St:r?wt:bt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const s=p(e);if(!i){if(s&&d(Ge,t))return Reflect.get(Ge,t,n);if("hasOwnProperty"===t)return je}const o=Reflect.get(e,t,n);return(y(t)?He.has(t):ze(t))?o:(i||Ve(e,0,t),r?o:Gt(o)?s&&M(t)?o:o.value:x(o)?i?Ct(o):Tt(o):o)}}class Xe extends qe{constructor(e=!1){super(!1,e)}set(e,t,n,i){let r=e[t];if(!this._isShallow){const t=It(r);if(Dt(n)||It(n)||(r=Ot(r),n=Ot(n)),!p(e)&&Gt(r)&&!Gt(n))return!t&&(r.value=n,!0)}const s=p(e)&&M(t)?Number(t)<e.length:d(e,t),o=Reflect.set(e,t,n,i);return e===Ot(i)&&(s?O(n,r)&&Be(e,"set",t,n):Be(e,"add",t,n)),o}deleteProperty(e,t){const n=d(e,t),i=(e[t],Reflect.deleteProperty(e,t));return i&&n&&Be(e,"delete",t,void 0),i}has(e,t){const n=Reflect.has(e,t);return y(t)&&He.has(t)||Ve(e,0,t),n}ownKeys(e){return Ve(e,0,p(e)?"length":ke),Reflect.ownKeys(e)}}class $e extends qe{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const Ye=new Xe,Ze=new $e,Ke=new Xe(!0),Je=new $e(!0),Qe=e=>e,et=e=>Reflect.getPrototypeOf(e);function tt(e,t,n=!1,i=!1){const r=Ot(e=e.__v_raw),s=Ot(t);n||(O(t,s)&&Ve(r,0,t),Ve(r,0,s));const{has:o}=et(r),a=i?Qe:n?Ft:kt;return o.call(r,t)?a(e.get(t)):o.call(r,s)?a(e.get(s)):void(e!==r&&e.get(t))}function nt(e,t=!1){const n=this.__v_raw,i=Ot(n),r=Ot(e);return t||(O(e,r)&&Ve(i,0,e),Ve(i,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function it(e,t=!1){return e=e.__v_raw,!t&&Ve(Ot(e),0,ke),Reflect.get(e,"size",e)}function rt(e){e=Ot(e);const t=Ot(this);return et(t).has.call(t,e)||(t.add(e),Be(t,"add",e,e)),this}function st(e,t){t=Ot(t);const n=Ot(this),{has:i,get:r}=et(n);let s=i.call(n,e);s||(e=Ot(e),s=i.call(n,e));const o=r.call(n,e);return n.set(e,t),s?O(t,o)&&Be(n,"set",e,t):Be(n,"add",e,t),this}function ot(e){const t=Ot(this),{has:n,get:i}=et(t);let r=n.call(t,e);r||(e=Ot(e),r=n.call(t,e));i&&i.call(t,e);const s=t.delete(e);return r&&Be(t,"delete",e,void 0),s}function at(){const e=Ot(this),t=0!==e.size,n=e.clear();return t&&Be(e,"clear",void 0,void 0),n}function lt(e,t){return function(n,i){const r=this,s=r.__v_raw,o=Ot(s),a=t?Qe:e?Ft:kt;return!e&&Ve(o,0,ke),s.forEach(((e,t)=>n.call(i,a(e),a(t),r)))}}function ct(e,t,n){return function(...i){const r=this.__v_raw,s=Ot(r),o=f(s),a="entries"===e||e===Symbol.iterator&&o,l="keys"===e&&o,c=r[e](...i),h=n?Qe:t?Ft:kt;return!t&&Ve(s,0,l?Fe:ke),{next(){const{value:e,done:t}=c.next();return t?{value:e,done:t}:{value:a?[h(e[0]),h(e[1])]:h(e),done:t}},[Symbol.iterator](){return this}}}}function ht(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function ut(){const e={get(e){return tt(this,e)},get size(){return it(this)},has:nt,add:rt,set:st,delete:ot,clear:at,forEach:lt(!1,!1)},t={get(e){return tt(this,e,!1,!0)},get size(){return it(this)},has:nt,add:rt,set:st,delete:ot,clear:at,forEach:lt(!1,!0)},n={get(e){return tt(this,e,!0)},get size(){return it(this,!0)},has(e){return nt.call(this,e,!0)},add:ht("add"),set:ht("set"),delete:ht("delete"),clear:ht("clear"),forEach:lt(!0,!1)},i={get(e){return tt(this,e,!0,!0)},get size(){return it(this,!0)},has(e){return nt.call(this,e,!0)},add:ht("add"),set:ht("set"),delete:ht("delete"),clear:ht("clear"),forEach:lt(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=ct(r,!1,!1),n[r]=ct(r,!0,!1),t[r]=ct(r,!1,!0),i[r]=ct(r,!0,!0)})),[e,n,t,i]}const[dt,pt,ft,mt]=ut();function gt(e,t){const n=t?e?mt:ft:e?pt:dt;return(t,i,r)=>"__v_isReactive"===i?!e:"__v_isReadonly"===i?e:"__v_raw"===i?t:Reflect.get(d(n,i)&&i in t?n:t,i,r)}const vt={get:gt(!1,!1)},_t={get:gt(!1,!0)},yt={get:gt(!0,!1)},xt={get:gt(!0,!0)};const bt=new WeakMap,wt=new WeakMap,St=new WeakMap,Et=new WeakMap;function Mt(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>S(e).slice(8,-1))(e))}function Tt(e){return It(e)?e:Pt(e,!1,Ye,vt,bt)}function At(e){return Pt(e,!1,Ke,_t,wt)}function Ct(e){return Pt(e,!0,Ze,yt,St)}function Rt(e){return Pt(e,!0,Je,xt,Et)}function Pt(e,t,n,i,r){if(!x(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const o=Mt(e);
8if(0===o)return e;const a=new Proxy(e,2===o?i:n);return r.set(e,a),a}function Lt(e){return It(e)?Lt(e.__v_raw):!(!e||!e.__v_isReactive)}function It(e){return!(!e||!e.__v_isReadonly)}function Dt(e){return!(!e||!e.__v_isShallow)}function Nt(e){return!!e&&!!e.__v_raw}function Ot(e){const t=e&&e.__v_raw;return t?Ot(t):e}function Ut(e){return Object.isExtensible(e)&&k(e,"__v_skip",!0),e}const kt=e=>x(e)?Tt(e):e,Ft=e=>x(e)?Ct(e):e;class Vt{constructor(e,t,n,i){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new _e((()=>e(this._value)),(()=>Ht(this,2===this.effect._dirtyLevel?2:3))),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=n}get value(){const e=Ot(this);return e._cacheable&&!e.effect.dirty||!O(e._value,e._value=e.effect.run())||Ht(e,4),zt(e),e.effect._dirtyLevel>=2&&Ht(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function Bt(e,t,n=!1){let i,r;const o=v(e);o?(i=e,r=s):(i=e.get,r=e.set);return new Vt(i,r,o||!r,n)}function zt(e){var t;Me&&de&&(e=Ot(e),Ie(de,null!=(t=e.dep)?t:e.dep=Oe((()=>e.dep=void 0),e instanceof Vt?e:void 0)))}function Ht(e,t=4,n){const i=(e=Ot(e)).dep;i&&Ne(i,t)}function Gt(e){return!(!e||!0!==e.__v_isRef)}function Wt(e){return qt(e,!1)}function jt(e){return qt(e,!0)}function qt(e,t){return Gt(e)?e:new Xt(e,t)}class Xt{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Ot(e),this._value=t?e:kt(e)}get value(){return zt(this),this._value}set value(e){const t=this.__v_isShallow||Dt(e)||It(e);e=t?e:Ot(e),O(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:kt(e),Ht(this,4))}}function $t(e){Ht(e,4)}function Yt(e){return Gt(e)?e.value:e}function Zt(e){return v(e)?e():Yt(e)}const Kt={get:(e,t,n)=>Yt(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const r=e[t];return Gt(r)&&!Gt(n)?(r.value=n,!0):Reflect.set(e,t,n,i)}};function Jt(e){return Lt(e)?e:new Proxy(e,Kt)}class Qt{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>zt(this)),(()=>Ht(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function en(e){return new Qt(e)}function tn(e){const t=p(e)?new Array(e.length):{};for(const n in e)t[n]=on(e,n);return t}class nn{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return e=Ot(this._object),t=this._key,null==(n=Ue.get(e))?void 0:n.get(t);var e,t,n}}class rn{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function sn(e,t,n){return Gt(e)?e:v(e)?new rn(e):x(e)&&arguments.length>1?on(e,t,n):Wt(e)}function on(e,t,n){const i=e[t];return Gt(i)?i:new nn(e,t,n)}const an={GET:"get",HAS:"has",ITERATE:"iterate"},ln={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},cn=[];function hn(e,...t){Ce();const n=cn.length?cn[cn.length-1].component:null,i=n&&n.appContext.config.warnHandler,r=function(){let e=cn[cn.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const i=e.component&&e.component.parent;e=i&&i.vnode}return t}();if(i)gn(i,n,11,[e+t.map((e=>{var t,n;return null!=(n=null==(t=e.toString)?void 0:t.call(e))?n:JSON.stringify(e)})).join(""),n&&n.proxy,r.map((({vnode:e})=>`at <${Zo(n,e.type)}>`)).join("\n"),r]);else{const n=[`[Vue warn]: ${e}`,...t];r.length&&n.push("\n",...function(e){const t=[];return e.forEach(((e,n)=>{t.push(...0===n?[]:["\n"],...function({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",i=!!e.component&&null==e.component.parent,r=` at <${Zo(e.component,e.type,i)}`,s=">"+n;return e.props?[r,...un(e.props),s]:[r+s]}(e))})),t}(r)),console.warn(...n)}Re()}function un(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach((n=>{t.push(...dn(n,e[n]))})),n.length>3&&t.push(" ..."),t}function dn(e,t,n){return _(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):"number"==typeof t||"boolean"==typeof t||null==t?n?t:[`${e}=${t}`]:Gt(t)?(t=dn(e,Ot(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):v(t)?[`${e}
8=fn${t.name?`<${t.name}>`:""}`]:(t=Ot(t),n?t:[`${e}=`,t])}function pn(e,t){}const fn={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",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"},mn={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. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."};function gn(e,t,n,i){try{return i?e(...i):e()}catch(e){_n(e,t,n)}}function vn(e,t,n,i){if(v(e)){const r=gn(e,t,n,i);return r&&b(r)&&r.catch((e=>{_n(e,t,n)})),r}if(p(e)){const r=[];for(let s=0;s<e.length;s++)r.push(vn(e[s],t,n,i));return r}}function _n(e,t,n,i=!0){t&&t.vnode;if(t){let i=t.parent;const r=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;i;){const t=i.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,r,s))return;i=i.parent}const o=t.appContext.config.errorHandler;if(o)return Ce(),gn(o,null,10,[e,r,s]),void Re()}!function(e,t,n,i=!0){console.error(e)}(e,0,0,i)}let yn=!1,xn=!1;const bn=[];let wn=0;const Sn=[];let En=null,Mn=0;const Tn=Promise.resolve();let An=null;function Cn(e){const t=An||Tn;return e?t.then(this?e.bind(this):e):t}function Rn(e){bn.length&&bn.includes(e,yn&&e.allowRecurse?wn+1:wn)||(null==e.id?bn.push(e):bn.splice(function(e){let t=wn+1,n=bn.length;for(;t<n;){const i=t+n>>>1,r=bn[i],s=Nn(r);s<e||s===e&&r.pre?t=i+1:n=i}return t}(e.id),0,e),Pn())}function Pn(){yn||xn||(xn=!0,An=Tn.then(Un))}function Ln(e){p(e)?Sn.push(...e):En&&En.includes(e,e.allowRecurse?Mn+1:Mn)||Sn.push(e),Pn()}function In(e,t,n=(yn?wn+1:0)){for(0;n<bn.length;n++){const t=bn[n];if(t&&t.pre){if(e&&t.id!==e.uid)continue;0,bn.splice(n,1),n--,t()}}}function Dn(e){if(Sn.length){const e=[...new Set(Sn)].sort(((e,t)=>Nn(e)-Nn(t)));if(Sn.length=0,En)return void En.push(...e);for(En=e,Mn=0;Mn<En.length;Mn++)En[Mn]();En=null,Mn=0}}const Nn=e=>null==e.id?1/0:e.id,On=(e,t)=>{const n=Nn(e)-Nn(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Un(e){xn=!1,yn=!0,bn.sort(On);try{for(wn=0;wn<bn.length;wn++){const e=bn[wn];e&&!1!==e.active&&gn(e,null,14)}}finally{wn=0,bn.length=0,Dn(),yn=!1,An=null,(bn.length||Sn.length)&&Un(e)}}let kn,Fn=[],Vn=!1;function Bn(e,...t){kn?kn.emit(e,...t):Vn||Fn.push({event:e,args:t})}function zn(e,t){var n,i;if(kn=e,kn)kn.enabled=!0,Fn.forEach((({event:e,args:t})=>kn.emit(e,...t))),Fn=[];else if("undefined"!=typeof window&&window.HTMLElement&&!(null==(i=null==(n=window.navigator)?void 0:n.userAgent)?void 0:i.includes("jsdom"))){(t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push((e=>{zn(e,t)})),setTimeout((()=>{kn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Vn=!0,Fn=[])}),3e3)}else Vn=!0,Fn=[]}const Hn=jn("component:added"),Gn=jn("component:updated"),Wn=jn("component:removed"); 9/*! #__NO_SIDE_EFFECTS__ */ 10function jn(e){return t=>{Bn(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}function qn(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||i;let s=n;const o=t.startsWith("update:"),a=o&&t.slice(7);if(a&&a in r){const e=`${"modelValue"===a?"model":a}Modifiers`,{number:t,trim:o}=r[e]||i;o&&(s=n.map((e=>_(e)?e.trim():e))),t&&(s=n.map(F))}let l;__VUE_PROD_DEVTOOLS__&&function(e,t,n){Bn("component:emit",e.appContext.app,e,t,n)}(e,t,s);let c=r[l=N(t)]||r[l=N(P(t))];!c&&o&&(c=r[l=N(I(t))]),c&&vn(c,e,6,s);const h=r[l+"Once"];if(h){if(e.emitted){if(e.emitted[l])return}else e.emitted={};e.emitted[l]=!0,vn(h,e,6,s)}}function Xn(e,t,n=!1){const i=t.emitsCache,r=i.get(e);if(void 0!==r)return r;const s=e.emits;let o={},a=!1;if(__VUE_OPTIONS_API__&&!v(e)){const i=e=>{const n=Xn(e,t,!0);n&&(a=!0,c(o,n))};!n&&t.mixins.length&&t.mixins.forEach(i),e.extends&&i(e.extends),e.mixins&&e.mixins.forEach(i)}
10return s||a?(p(s)?s.forEach((e=>o[e]=null)):c(o,s),x(e)&&i.set(e,o),o):(x(e)&&i.set(e,null),null)}function $n(e,t){return!(!e||!a(t))&&(t=t.slice(2).replace(/Once$/,""),d(e,t[0].toLowerCase()+t.slice(1))||d(e,I(t))||d(e,t))}let Yn=null,Zn=null;function Kn(e){const t=Yn;return Yn=e,Zn=e&&e.type.__scopeId||null,t}function Jn(e){Zn=e}function Qn(){Zn=null}const ei=e=>ti;function ti(e,t=Yn,n){if(!t)return e;if(e._n)return e;const i=(...n)=>{i._d&&ro(-1);const r=Kn(t);let s;try{s=e(...n)}finally{Kn(r),i._d&&ro(1)}return __VUE_PROD_DEVTOOLS__&&Gn(t),s};return i._n=!0,i._c=!0,i._d=!0,i}function ni(e){const{type:t,vnode:n,proxy:i,withProxy:r,props:s,propsOptions:[o],slots:a,attrs:c,emit:h,render:u,renderCache:d,data:p,setupState:f,ctx:m,inheritAttrs:g}=e;let v,_;const y=Kn(e);try{if(4&n.shapeFlag){const e=r||i,t=e;v=wo(u.call(t,e,d,s,f,p,m)),_=c}else{const e=t;0,v=wo(e.length>1?e(s,{attrs:c,slots:a,emit:h}):e(s,null)),_=t.props?c:ri(c)}}catch(t){Js.length=0,_n(t,e,1),v=mo(Zs)}let x=v;if(_&&!1!==g){const e=Object.keys(_),{shapeFlag:t}=x;e.length&&7&t&&(o&&e.some(l)&&(_=si(_,o)),x=_o(x,_))}return n.dirs&&(x=_o(x),x.dirs=x.dirs?x.dirs.concat(n.dirs):n.dirs),n.transition&&(x.transition=n.transition),v=x,Kn(y),v}function ii(e,t=!0){let n;for(let t=0;t<e.length;t++){const i=e[t];if(!lo(i))return;if(i.type!==Zs||"v-if"===i.children){if(n)return;n=i}}return n}const ri=e=>{let t;for(const n in e)("class"===n||"style"===n||a(n))&&((t||(t={}))[n]=e[n]);return t},si=(e,t)=>{const n={};for(const i in e)l(i)&&i.slice(9)in t||(n[i]=e[i]);return n};function oi(e,t,n){const i=Object.keys(t);if(i.length!==Object.keys(e).length)return!0;for(let r=0;r<i.length;r++){const s=i[r];
10if(t[s]!==e[s]&&!$n(n,s))return!0}return!1}function ai({vnode:e,parent:t},n){for(;t;){const i=t.subTree;if(i.suspense&&i.suspense.activeBranch===e&&(i.el=e.el),i!==e)break;(e=t.vnode).el=n,t=t.parent}}const li="components";function ci(e,t){return pi(li,e,!0,t)||e}const hi=Symbol.for("v-ndc");function ui(e){return _(e)?pi(li,e,!1)||e:e||hi}function di(e){return pi("directives",e)}function pi(e,t,n=!0,i=!1){const r=Yn||Po;if(r){const n=r.type;if(e===li){const e=Yo(n,!1);if(e&&(e===t||e===P(t)||e===D(P(t))))return n}const s=fi(r[e]||n[e],t)||fi(r.appContext[e],t);return!s&&i?n:s}}function fi(e,t){return e&&(e[t]||e[P(t)]||e[D(P(t))])}const mi=e=>e.__isSuspense;let gi=0;const vi={name:"Suspense",__isSuspense:!0,process(e,t,n,i,r,s,o,a,l,c){if(null==e)!function(e,t,n,i,r,s,o,a,l){const{p:c,o:{createElement:h}}=l,u=h("div"),d=e.suspense=yi(e,r,i,t,u,n,s,o,a,l);c(null,d.pendingBranch=e.ssContent,u,null,i,d,s,o),d.deps>0?(_i(e,"onPending"),_i(e,"onFallback"),c(null,e.ssFallback,t,n,i,null,s,o),wi(d,e.ssFallback)):d.resolve(!1,!0)}(t,n,i,r,s,o,a,l,c);else{if(s&&s.deps>0&&!e.suspense.isInFallback)return t.suspense=e.suspense,t.suspense.vnode=t,void(t.el=e.el);!function(e,t,n,i,r,s,o,a,{p:l,um:c,o:{createElement:h}}){const u=t.suspense=e.suspense;u.vnode=t,t.el=e.el;const d=t.ssContent,p=t.ssFallback,{activeBranch:f,pendingBranch:m,isInFallback:g,isHydrating:v}=u;if(m)u.pendingBranch=d,co(d,m)?(l(m,d,u.hiddenContainer,null,r,u,s,o,a),u.deps<=0?u.resolve():g&&(v||(l(f,p,n,i,r,null,s,o,a),wi(u,p)))):(u.pendingId=gi++,v?(u.isHydrating=!1,u.activeBranch=m):c(m,r,u),u.deps=0,u.effects.length=0,u.hiddenContainer=h("div"),g?(l(null,d,u.hiddenContainer,null,r,u,s,o,a),u.deps<=0?u.resolve():(l(f,p,n,i,r,null,s,o,a),wi(u,p))):f&&co(d,f)?(l(f,d,n,i,r,u,s,o,a),u.resolve(!0)):(l(null,d,u.hiddenContainer,null,r,u,s,o,a),u.deps<=0&&u.resolve()));else if(f&&co(d,f))l(f,d,n,i,r,u,s,o,a),wi(u,d);else if(_i(t,"onPending"),u.pendingBranch=d,512&d.shapeFlag?u.pendingId=d.component.suspenseId:u.pendingId=gi++,l(null,d,u.hiddenContainer,null,r,u,s,o,a),u.deps<=0)u.resolve();else{const{timeout:e,pendingId:t}=u;e>0?setTimeout((()=>{u.pendingId===t&&u.fallback(p)}),e):0===e&&u.fallback(p)}}(e,t,n,i,r,o,a,l,c)}},hydrate:function(e,t,n,i,r,s,o,a,l){const c=t.suspense=yi(t,i,n,e.parentNode,document.createElement("div"),null,r,s,o,a,!0),h=l(e,c.pendingBranch=t.ssContent,n,c,s,o);0===c.deps&&c.resolve(!1,!0);return h},create:yi,normalize:function(e){const{shapeFlag:t,children:n}=e,i=32&t;e.ssContent=xi(i?n.default:n),e.ssFallback=i?xi(n.fallback):mo(Zs)}};function _i(e,t){const n=e.props&&e.props[t];v(n)&&n()}function yi(e,t,n,i,r,s,o,a,l,c,h=!1){const{p:u,m:d,um:p,n:f,o:{parentNode:m,remove:g}}=c;let v;const _=function(e){var t;return null!=(null==(t=e.props)?void 0:t.suspensible)&&!1!==e.props.suspensible}(e);_&&(null==t?void 0:t.pendingBranch)&&(v=t.pendingId,t.deps++);const y=e.props?V(e.props.timeout):void 0;const x=s,b={vnode:e,parent:t,parentComponent:n,namespace:o,container:i,hiddenContainer:r,deps:0,pendingId:gi++,timeout:"number"==typeof y?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!h,isHydrating:h,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){const{vnode:i,activeBranch:r,pendingBranch:o,pendingId:a,effects:l,parentComponent:c,container:h}=b;let u=!1;b.isHydrating?b.isHydrating=!1:e||(u=r&&o.transition&&"out-in"===o.transition.mode,u&&(r.transition.afterLeave=()=>{a===b.pendingId&&(d(o,h,s===x?f(r):s,0),Ln(l))}),r&&(m(r.el)!==b.hiddenContainer&&(s=f(r)),p(r,c,b,!0)),u||d(o,h,s,0)),wi(b,o),b.pendingBranch=null,b.isInFallback=!1;let g=b.parent,y=!1;for(;g;){if(g.pendingBranch){g.effects.push(...l),y=!0;break}g=g.parent}y||u||Ln(l),b.effects=[],_&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),_i(i,"onResolve")},fallback(e){if(!b.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:i,container:r,namespace:s}=b;_i(t,"onFallback");const o=f(n),c=()=>{b.isInFallback&&(u(null,e,r,o,i,null,s,a,l),wi(b,e))},h=e.transition&&"out-in"===e.transition.mode;h&&(n.transition.afterLeave=c),b.isInFallback=!0,p(n,i,null,!0),h||c()},move(e,t,n){b.activeBranch&&d(b.activeBranch,e,t,n),b.container=e},next(){return b.activeBranch&&f(b.activeBranch)},registerDep(e,t){const n=!!b.pendingBranch;n&&b.deps++;const i=e.vnode.el;
10e.asyncDep.catch((t=>{_n(t,e,0)})).then((r=>{if(e.isUnmounted||b.isUnmounted||b.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:s}=e;zo(e,r,!1),i&&(s.el=i);const a=!i&&e.subTree.el;t(e,s,m(i||e.subTree.el),i?null:f(e.subTree),b,o,l),a&&g(a),ai(e,s.el),n&&0==--b.deps&&b.resolve()}))},unmount(e,t){b.isUnmounted=!0,b.activeBranch&&p(b.activeBranch,n,e,t),b.pendingBranch&&p(b.pendingBranch,n,e,t)}};return b}function xi(e){let t;if(v(e)){const n=io&&e._c;n&&(e._d=!1,eo()),e=e(),n&&(e._d=!0,t=Qs,to())}if(p(e)){const t=ii(e);0,e=t}return e=wo(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function bi(e,t){t&&t.pendingBranch?p(e)?t.effects.push(...e):t.effects.push(e):Ln(e)}function wi(e,t){e.activeBranch=t;const{vnode:n,parentComponent:i}=e;let r=t.el;for(;!r&&t.component;)r=(t=t.component.subTree).el;n.el=r,i&&i.subTree===n&&(i.vnode.el=r,ai(i,r))}const Si=Symbol.for("v-scx"),Ei=()=>{{const e=as(Si);return e}};function Mi(e,t){return Pi(e,null,t)}function Ti(e,t){return Pi(e,null,{flush:"post"})}function Ai(e,t){return Pi(e,null,{flush:"sync"})}const Ci={};function Ri(e,t,n){return Pi(e,t,n)}function Pi(e,t,{immediate:n,deep:r,flush:o,once:a,onTrack:l,onTrigger:c}=i){if(t&&a){const e=t;t=(...t)=>{e(...t),T()}}const u=Po,d=e=>!0===r?e:Di(e,!1===r?1:void 0);let f,m,g=!1,_=!1;if(Gt(e)?(f=()=>e.value,g=Dt(e)):Lt(e)?(f=()=>d(e),g=!0):p(e)?(_=!0,g=e.some((e=>Lt(e)||Dt(e))),f=()=>e.map((e=>Gt(e)?e.value:Lt(e)?d(e):v(e)?gn(e,u,2):void 0))):f=v(e)?t?()=>gn(e,u,2):()=>(m&&m(),vn(e,u,3,[x])):s,t&&r){const e=f;f=()=>Di(e())}let y,x=e=>{m=E.onStop=()=>{gn(e,u,4),m=E.onStop=void 0}};if(Vo){if(x=s,t?n&&vn(t,u,3,[f(),_?[]:void 0,x]):f(),"sync"!==o)return s;{const e=Ei();y=e.__watcherHandles||(e.__watcherHandles=[])}}let b=_?new Array(e.length).fill(Ci):Ci;const w=()=>{if(E.active&&E.dirty)if(t){const e=E.run();(r||g||(_?e.some(((e,t)=>O(e,b[t]))):O(e,b)))&&(m&&m(),vn(t,u,3,[e,b===Ci?void 0:_&&b[0]===Ci?[]:b,x]),b=e)}else E.run()};let S;w.allowRecurse=!!t,"sync"===o?S=w:"post"===o?S=()=>Is(w,u&&u.suspense):(w.pre=!0,u&&(w.id=u.uid),S=()=>Rn(w));const E=new _e(f,s,S),M=ge(),T=()=>{E.stop(),M&&h(M.effects,E)};return t?n?w():b=E.run():"post"===o?Is(E.run.bind(E),u&&u.suspense):E.run(),y&&y.push(T),T}function Li(e,t,n){const i=this.proxy,r=_(e)?e.includes(".")?Ii(i,e):()=>i[e]:e.bind(i,i);let s;v(t)?s=t:(s=t.handler,n=t);const o=No(this),a=Pi(r,s.bind(i),n);return o(),a}function Ii(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function Di(e,t,n=0,i){if(!x(e)||e.__v_skip)return e;if(t&&t>0){if(n>=t)return e;n++}if((i=i||new Set).has(e))return e;if(i.add(e),Gt(e))Di(e.value,t,n,i);else if(p(e))for(let r=0;r<e.length;r++)Di(e[r],t,n,i);else if(m(e)||f(e))e.forEach((e=>{Di(e,t,n,i)}));else if(E(e))for(const r in e)Di(e[r],t,n,i);return e}function Ni(e,t){if(null===Yn)return e;const n=Xo(Yn)||Yn.proxy,r=e.dirs||(e.dirs=[]);for(let e=0;e<t.length;e++){let[s,o,a,l=i]=t[e];s&&(v(s)&&(s={mounted:s,updated:s}),s.deep&&Di(o),r.push({dir:s,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function Oi(e,t,n,i){const r=e.dirs,s=t&&t.dirs;for(let o=0;o<r.length;o++){const a=r[o];s&&(a.oldValue=s[o].value);let l=a.dir[i];l&&(Ce(),vn(l,n,8,[e.el,a,e,t]),Re())}}const Ui=Symbol("_leaveCb"),ki=Symbol("_enterCb");function Fi(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return hr((()=>{e.isMounted=!0})),pr((()=>{e.isUnmounting=!0})),e}const Vi=[Function,Array],Bi={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Vi,onEnter:Vi,onAfterEnter:Vi,onEnterCancelled:Vi,onBeforeLeave:Vi,onLeave:Vi,onAfterLeave:Vi,onLeaveCancelled:Vi,onBeforeAppear:Vi,onAppear:Vi,onAfterAppear:Vi,onAppearCancelled:Vi},zi={name:"BaseTransition",props:Bi,setup(e,{slots:t}){const n=Lo(),i=Fi();return()=>{const r=t.default&&Xi(t.default(),!0);if(!r||!r.length)return;let s=r[0];if(r.length>1){let e=!1;for(const t of r)if(t.type!==Zs){0,s=t,e=!0;break}}const o=Ot(e),{mode:a}=o;if(i.isLeaving)return Wi(s);const l=ji(s);if(!l)return Wi(s);const c=Gi(l,o,i,n);qi(l,c);const h=n.subTree,u=h&&ji(h);if(u&&u.type!==Zs&&!co(l,u)){const e=Gi(u,o,i,n);if(qi(u,e),"out-in"===a)return i.isLeaving=!0,e.afterLeave=()=>{i.isLeaving=!1,!1!==n.update.active&&(n.effect.dirty=!0,n.update())},Wi(s);
10"in-out"===a&&l.type!==Zs&&(e.delayLeave=(e,t,n)=>{Hi(i,u)[String(u.key)]=u,e[Ui]=()=>{t(),e[Ui]=void 0,delete c.delayedLeave},c.delayedLeave=n})}return s}}};function Hi(e,t){const{leavingVNodes:n}=e;let i=n.get(t.type);return i||(i=Object.create(null),n.set(t.type,i)),i}function Gi(e,t,n,i){const{appear:r,mode:s,persisted:o=!1,onBeforeEnter:a,onEnter:l,onAfterEnter:c,onEnterCancelled:h,onBeforeLeave:u,onLeave:d,onAfterLeave:f,onLeaveCancelled:m,onBeforeAppear:g,onAppear:v,onAfterAppear:_,onAppearCancelled:y}=t,x=String(e.key),b=Hi(n,e),w=(e,t)=>{e&&vn(e,i,9,t)},S=(e,t)=>{const n=t[1];w(e,t),p(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},E={mode:s,persisted:o,beforeEnter(t){let i=a;if(!n.isMounted){if(!r)return;i=g||a}t[Ui]&&t[Ui](!0);const s=b[x];s&&co(e,s)&&s.el[Ui]&&s.el[Ui](),w(i,[t])},enter(e){let t=l,i=c,s=h;if(!n.isMounted){if(!r)return;t=v||l,i=_||c,s=y||h}let o=!1;const a=e[ki]=t=>{o||(o=!0,w(t?s:i,[e]),E.delayedLeave&&E.delayedLeave(),e[ki]=void 0)};t?S(t,[e,a]):a()},leave(t,i){const r=String(e.key);if(t[ki]&&t[ki](!0),n.isUnmounting)return i();w(u,[t]);let s=!1;const o=t[Ui]=n=>{s||(s=!0,i(),w(n?m:f,[t]),t[Ui]=void 0,b[r]===e&&delete b[r])};b[r]=e,d?S(d,[t,o]):o()},clone(e){return Gi(e,t,n,i)}};return E}function Wi(e){if(Ji(e))return(e=_o(e)).children=null,e}function ji(e){return Ji(e)?e.children?e.children[0]:void 0:e}function qi(e,t){6&e.shapeFlag&&e.component?qi(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Xi(e,t=!1,n){let i=[],r=0;for(let s=0;s<e.length;s++){let o=e[s];const a=null==n?o.key:String(n)+String(null!=o.key?o.key:s);o.type===$s?(128&o.patchFlag&&r++,i=i.concat(Xi(o.children,t,a))):(t||o.type!==Zs)&&i.push(null!=a?_o(o,{key:a}):o)}if(r>1)for(let e=0;e<i.length;e++)i[e].patchFlag=-2;return i} 11/*! #__NO_SIDE_EFFECTS__ */function $i(e,t){return v(e)?(()=>c({name:e.name},t,{setup:e}))():e}const Yi=e=>!!e.type.__asyncLoader 12/*! #__NO_SIDE_EFFECTS__ */;function Zi(e){v(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:i,delay:r=200,timeout:s,suspensible:o=!0,onError:a}=e;let l,c=null,h=0;const u=()=>{let e;return c||(e=c=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),a)return new Promise(((t,n)=>{a(e,(()=>t((h++,c=null,u()))),(()=>n(e)),h+1)}));throw e})).then((t=>e!==c&&c?c:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),l=t,t))))};return $i({name:"AsyncComponentWrapper",__asyncLoader:u,get __asyncResolved(){return l},setup(){const e=Po;if(l)return()=>Ki(l,e);const t=t=>{c=null,_n(t,e,13,!i)};if(o&&e.suspense||Vo)return u().then((t=>()=>Ki(t,e))).catch((e=>(t(e),()=>i?mo(i,{error:e}):null)));const a=Wt(!1),h=Wt(),d=Wt(!!r);return r&&setTimeout((()=>{d.value=!1}),r),null!=s&&setTimeout((()=>{if(!a.value&&!h.value){const e=new Error(`Async component timed out after ${s}ms.`);t(e),h.value=e}}),s),u().then((()=>{a.value=!0,e.parent&&Ji(e.parent.vnode)&&(e.parent.effect.dirty=!0,Rn(e.parent.update))})).catch((e=>{t(e),h.value=e})),()=>a.value&&l?Ki(l,e):h.value&&i?mo(i,{error:h.value}):n&&!d.value?mo(n):void 0}})}function Ki(e,t){const{ref:n,props:i,children:r,ce:s}=t.vnode,o=mo(e,i,r);return o.ref=n,o.ce=s,delete t.vnode.ce,o}const Ji=e=>e.type.__isKeepAlive,Qi={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Lo(),i=n.ctx;if(!i.renderer)return()=>{const e=t.default&&t.default();return e&&1===e.length?e[0]:e};const r=new Map,s=new Set;let o=null;__VUE_PROD_DEVTOOLS__&&(n.__v_cache=r);const a=n.suspense,{renderer:{p:l,m:c,um:h,o:{createElement:u}}}=i,d=u("div");function p(e){sr(e),h(e,n,a,!0)}function f(e){r.forEach(((t,n)=>{const i=Yo(t.type);!i||e&&e(i)||m(n)}))}function m(e){const t=r.get(e);o&&co(t,o)?o&&sr(o):p(t),r.delete(e),s.delete(e)}i.activate=(e,t,n,i,r)=>{const s=e.component;c(e,t,n,0,a),l(s.vnode,e,t,n,s,a,i,e.slotScopeIds,r),Is((()=>{s.isDeactivated=!1,s.a&&U(s.a);const t=e.props&&e.props.onVnodeMounted;t&&To(t,s.parent,e)}),a),__VUE_PROD_DEVTOOLS__&&Hn(s)},i.deactivate=e=>{const t=e.component;c(e,d,null,1,a),Is((()=>{t.da&&U(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&To(n,t.parent,e),t.isDeactivated=!0}),a),__VUE_PROD_DEVTOOLS__&&Hn(t)},Ri((()=>[e.include,e.exclude]),(([e,t])=>{e&&f((t=>er(e,t))),t&&f((e=>!er(t,e)))}),{flush:"post",deep:!0});let g=null;const v=()=>{null!=g&&r.set(g,or(n.subTree))};
12return hr(v),dr(v),pr((()=>{r.forEach((e=>{const{subTree:t,suspense:i}=n,r=or(t);if(e.type!==r.type||e.key!==r.key)p(e);else{sr(r);const e=r.component.da;e&&Is(e,i)}}))})),()=>{if(g=null,!t.default)return o=null;const n=t.default(),i=n[0];if(n.length>1)return o=null,n;if(!(lo(i)&&(4&i.shapeFlag||128&i.shapeFlag)))return o=null,i;let a=or(i);const l=a.type,c=Yo(Yi(a)?a.type.__asyncResolved||{}:l),{include:h,exclude:u,max:d}=e;if(h&&(!c||!er(h,c))||u&&c&&er(u,c))return o=a,i;const p=null==a.key?l:a.key,f=r.get(p);return a.el&&(a=_o(a),128&i.shapeFlag&&(i.ssContent=a)),g=p,f?(a.el=f.el,a.component=f.component,a.transition&&qi(a,a.transition),a.shapeFlag|=512,s.delete(p),s.add(p)):(s.add(p),d&&s.size>parseInt(d,10)&&m(s.values().next().value)),a.shapeFlag|=256,o=a,mi(i.type)?i:a}}};function er(e,t){return p(e)?e.some((e=>er(e,t))):_(e)?e.split(",").includes(t):"[object RegExp]"===S(e)&&e.test(t)}function tr(e,t){ir(e,"a",t)}function nr(e,t){ir(e,"da",t)}function ir(e,t,n=Po){const i=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(ar(t,i,n),n){let e=n.parent;for(;e&&e.parent;)Ji(e.parent.vnode)&&rr(i,t,n,e),e=e.parent}}function rr(e,t,n,i){const r=ar(t,e,i,!0);fr((()=>{h(i[t],r)}),n)}function sr(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function or(e){return 128&e.shapeFlag?e.ssContent:e}function ar(e,t,n=Po,i=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{if(n.isUnmounted)return;Ce();const r=No(n),s=vn(t,n,e,i);return r(),Re(),s});return i?r.unshift(s):r.push(s),s}}const lr=e=>(t,n=Po)=>(!Vo||"sp"===e)&&ar(e,((...e)=>t(...e)),n),cr=lr("bm"),hr=lr("m"),ur=lr("bu"),dr=lr("u"),pr=lr("bum"),fr=lr("um"),mr=lr("sp"),gr=lr("rtg"),vr=lr("rtc");function _r(e,t=Po){ar("ec",e,t)}function yr(e,t,n,i){let r;const s=n&&n[i];if(p(e)||_(e)){r=new Array(e.length);for(let n=0,i=e.length;n<i;n++)r[n]=t(e[n],n,void 0,s&&s[n])}else if("number"==typeof e){0,r=new Array(e);for(let n=0;n<e;n++)r[n]=t(n+1,n,void 0,s&&s[n])}else if(x(e))if(e[Symbol.iterator])r=Array.from(e,((e,n)=>t(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let i=0,o=n.length;i<o;i++){const o=n[i];r[i]=t(e[o],o,i,s&&s[i])}}else r=[];return n&&(n[i]=r),r}function xr(e,t){for(let n=0;n<t.length;n++){const i=t[n];if(p(i))for(let t=0;t<i.length;t++)e[i[t].name]=i[t].fn;else i&&(e[i.name]=i.key?(...e)=>{const t=i.fn(...e);return t&&(t.key=i.key),t}:i.fn)}return e}function br(e,t,n={},i,r){if(Yn.isCE||Yn.parent&&Yi(Yn.parent)&&Yn.parent.isCE)return"default"!==t&&(n.name=t),mo("slot",n,i&&i());let s=e[t];s&&s._c&&(s._d=!1),eo();const o=s&&wr(s(n)),a=ao($s,{key:n.key||o&&o.key||`_${t}`},o||(i?i():[]),o&&1===e._?64:-2);return!r&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),s&&s._c&&(s._d=!0),a}function wr(e){return e.some((e=>!lo(e)||e.type!==Zs&&!(e.type===$s&&!wr(e.children))))?e:null}function Sr(e,t){const n={};for(const i in e)n[t&&/[A-Z]/.test(i)?`on:${i}`:N(i)]=e[i];return n}const Er=e=>e?Uo(e)?Xo(e)||e.proxy:Er(e.parent):null,Mr=c(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Er(e.parent),$root:e=>Er(e.root),$emit:e=>e.emit,$options:e=>__VUE_OPTIONS_API__?$r(e):e.type,$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Rn(e.update)}),$nextTick:e=>e.n||(e.n=Cn.bind(e.proxy)),$watch:e=>__VUE_OPTIONS_API__?Li.bind(e):s}),Tr=(e,t)=>e!==i&&!e.__isScriptSetup&&d(e,t),Ar={get({_:e},t){if("__v_skip"===t)return!0;const{ctx:n,setupState:r,data:s,props:o,accessCache:a,type:l,appContext:c}=e;let h;if("$"!==t[0]){const l=a[t];if(void 0!==l)switch(l){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(Tr(r,t))return a[t]=1,r[t];if(s!==i&&d(s,t))return a[t]=2,s[t];if((h=e.propsOptions[0])&&d(h,t))return a[t]=3,o[t];if(n!==i&&d(n,t))return a[t]=4,n[t];__VUE_OPTIONS_API__&&!Wr||(a[t]=0)}}const u=Mr[t];let p,f;return u?("$attrs"===t&&Ve(e.attrs,0,""),u(e)):(p=l.__cssModules)&&(p=p[t])?p:n!==i&&d(n,t)?(a[t]=4,n[t]):(f=c.config.globalProperties,d(f,t)?f[t]:void 0)},set({_:e},t,n){const{data:r,setupState:s,ctx:o}=e;return Tr(s,t)?(s[t]=n,!0):r!==i&&d(r,t)?(r[t]=n,!0):!d(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(o[t]=n,
12!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:o}},a){let l;return!!n[a]||e!==i&&d(e,a)||Tr(t,a)||(l=o[0])&&d(l,a)||d(r,a)||d(Mr,a)||d(s.config.globalProperties,a)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:d(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};const Cr=c({},Ar,{get(e,t){if(t!==Symbol.unscopables)return Ar.get(e,t,e)},has(e,t){return"_"!==t[0]&&!H(t)}});function Rr(){return null}function Pr(){return null}function Lr(e){0}function Ir(e){0}function Dr(){return null}function Nr(){0}function Or(e,t){return null}function Ur(){return Fr().slots}function kr(){return Fr().attrs}function Fr(){const e=Lo();return e.setupContext||(e.setupContext=qo(e))}function Vr(e){return p(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}function Br(e,t){const n=Vr(e);for(const e in t){if(e.startsWith("__skip"))continue;let i=n[e];i?p(i)||v(i)?i=n[e]={type:i,default:t[e]}:i.default=t[e]:null===i&&(i=n[e]={default:t[e]}),i&&t[`__skip_${e}`]&&(i.skipFactory=!0)}return n}function zr(e,t){return e&&t?p(e)&&p(t)?e.concat(t):c({},Vr(e),Vr(t)):e||t}function Hr(e,t){const n={};for(const i in e)t.includes(i)||Object.defineProperty(n,i,{enumerable:!0,get:()=>e[i]});return n}function Gr(e){const t=Lo();let n=e();return Oo(),b(n)&&(n=n.catch((e=>{throw No(t),e}))),[n,()=>No(t)]}let Wr=!0;function jr(e){const t=$r(e),n=e.proxy,i=e.ctx;Wr=!1,t.beforeCreate&&qr(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:a,watch:l,provide:c,inject:h,created:u,beforeMount:d,mounted:f,beforeUpdate:m,updated:g,activated:_,deactivated:y,beforeDestroy:b,beforeUnmount:w,destroyed:S,unmounted:E,render:M,renderTracked:T,renderTriggered:A,errorCaptured:C,serverPrefetch:R,expose:P,inheritAttrs:L,components:I,directives:D,filters:N}=t;if(h&&function(e,t,n=s){p(e)&&(e=Jr(e));for(const n in e){const i=e[n];let r;r=x(i)?"default"in i?as(i.from||n,i.default,!0):as(i.from||n):as(i),Gt(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[n]=r}}(h,i,null),a)for(const e in a){const t=a[e];v(t)&&(i[e]=t.bind(n))}if(r){0;const t=r.call(n,n);0,x(t)&&(e.data=Tt(t))}if(Wr=!0,o)for(const e in o){const t=o[e],r=v(t)?t.bind(n,n):v(t.get)?t.get.bind(n,n):s;0;const a=!v(t)&&v(t.set)?t.set.bind(n):s,l=Jo({get:r,set:a});Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e})}if(l)for(const e in l)Xr(l[e],i,n,e);if(c){const e=v(c)?c.call(n):c;Reflect.ownKeys(e).forEach((t=>{os(t,e[t])}))}function O(e,t){p(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(u&&qr(u,e,"c"),O(cr,d),O(hr,f),O(ur,m),O(dr,g),O(tr,_),O(nr,y),O(_r,C),O(vr,T),O(gr,A),O(pr,w),O(fr,E),O(mr,R),p(P))if(P.length){const t=e.exposed||(e.exposed={});P.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});M&&e.render===s&&(e.render=M),null!=L&&(e.inheritAttrs=L),I&&(e.components=I),D&&(e.directives=D)}function qr(e,t,n){vn(p(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function Xr(e,t,n,i){const r=i.includes(".")?Ii(n,i):()=>n[i];if(_(e)){const n=t[e];v(n)&&Ri(r,n)}else if(v(e))Ri(r,e.bind(n));else if(x(e))if(p(e))e.forEach((e=>Xr(e,t,n,i)));else{const i=v(e.handler)?e.handler.bind(n):t[e.handler];v(i)&&Ri(r,i,e)}else 0}function $r(e){const t=e.type,{mixins:n,extends:i}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:o}}=e.appContext,a=s.get(t);let l;return a?l=a:r.length||n||i?(l={},r.length&&r.forEach((e=>Yr(l,e,o,!0))),Yr(l,t,o)):l=t,x(t)&&s.set(t,l),l}function Yr(e,t,n,i=!1){const{mixins:r,extends:s}=t;s&&Yr(e,s,n,!0),r&&r.forEach((t=>Yr(e,t,n,!0)));for(const r in t)if(i&&"expose"===r);else{const i=Zr[r]||n&&n[r];e[r]=i?i(e[r],t[r]):t[r]}return e}const Zr={data:Kr,props:ts,emits:ts,methods:es,computed:es,beforeCreate:Qr,created:Qr,beforeMount:Qr,mounted:Qr,beforeUpdate:Qr,updated:Qr,beforeDestroy:Qr,beforeUnmount:Qr,destroyed:Qr,unmounted:Qr,activated:Qr,deactivated:Qr,errorCaptured:Qr,serverPrefetch:Qr,components:es,directives:es,watch:function(e,t){if(!e)return t;if(!t)return e;const n=c(Object.create(null),e);for(const i in t)n[i]=Qr(e[i],t[i]);return n},provide:Kr,inject:function(e,t){return es(Jr(e),Jr(t))}};function Kr(e,t){return t?e?function(){return c(v(e)?e.call(this,this):e,v(t)?t.call(this,this):t)}:t:e}function Jr(e){if(p(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Qr(e,t){return e?[...new Set([].concat(e,t))]:t}function es(e,t){return e?c(Object.create(null),e,t):t}function ts(e,t){return e?p(e)&&p(t)?[...new Set([...e,...t])]:c(Object.create(null),Vr(e),Vr(null!=t?t:{})):t}function ns(){return{app:null,config:{isNativeTag:o,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let is=0;function rs(e,t){return function(n,i=null){v(n)||(n=c({},n)),null==i||x(i)||(i=null);const r=ns(),s=new WeakSet;let o=!1;const a=r.app={_uid:is++,_component:n,_props:i,_container:null,_context:r,_instance:null,version:ra,get config(){return r.config},set config(e){0},use(e,...t){return s.has(e)||(e&&v(e.install)?(s.add(e),e.install(a,...t)):v(e)&&(s.add(e),e(a,...t))),a},mixin(e){return __VUE_OPTIONS_API__&&(r.mixins.includes(e)||r.mixins.push(e)),a},component(e,t){return t?(r.components[e]=t,a):r.components[e]},directive(e,t){return t?(r.directives[e]=t,a):r.directives[e]}
12,mount(s,l,c){if(!o){0;const h=mo(n,i);return h.appContext=r,!0===c?c="svg":!1===c&&(c=void 0),l&&t?t(h,s):e(h,s,c),o=!0,a._container=s,s.__vue_app__=a,__VUE_PROD_DEVTOOLS__&&(a._instance=h.component,function(e,t){Bn("app:init",e,t,{Fragment:$s,Text:Ys,Comment:Zs,Static:Ks})}(a,ra)),Xo(h.component)||h.component.proxy}},unmount(){o&&(e(null,a._container),__VUE_PROD_DEVTOOLS__&&(a._instance=null,function(e){Bn("app:unmount",e)}(a)),delete a._container.__vue_app__)},provide(e,t){return r.provides[e]=t,a},runWithContext(e){const t=ss;ss=a;try{return e()}finally{ss=t}}};return a}}let ss=null;function os(e,t){if(Po){let n=Po.provides;const i=Po.parent&&Po.parent.provides;i===n&&(n=Po.provides=Object.create(i)),n[e]=t}else 0}function as(e,t,n=!1){const i=Po||Yn;if(i||ss){const r=i?null==i.parent?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:ss._context.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&v(t)?t.call(i&&i.proxy):t}else 0}function ls(){return!!(Po||Yn||ss)}const cs=Object.create(null),hs=()=>Object.create(cs),us=e=>Object.getPrototypeOf(e)===cs;function ds(e,t,n,r){const[s,o]=e.propsOptions;let a,l=!1;if(t)for(let i in t){if(T(i))continue;const c=t[i];let h;s&&d(s,h=P(i))?o&&o.includes(h)?(a||(a={}))[h]=c:n[h]=c:$n(e.emitsOptions,i)||i in r&&c===r[i]||(r[i]=c,l=!0)}if(o){const t=Ot(n),r=a||i;for(let i=0;i<o.length;i++){const a=o[i];n[a]=ps(s,t,a,r[a],e,!d(r,a))}}return l}function ps(e,t,n,i,r,s){const o=e[n];if(null!=o){const e=d(o,"default");if(e&&void 0===i){const e=o.default;if(o.type!==Function&&!o.skipFactory&&v(e)){const{propsDefaults:s}=r;if(n in s)i=s[n];else{const o=No(r);i=s[n]=e.call(null,t),o()}}else i=e}o[0]&&(s&&!e?i=!1:!o[1]||""!==i&&i!==I(n)||(i=!0))}return i}function fs(e,t,n=!1){const s=t.propsCache,o=s.get(e);if(o)return o;const a=e.props,l={},h=[];let u=!1;if(__VUE_OPTIONS_API__&&!v(e)){const i=e=>{u=!0;const[n,i]=fs(e,t,!0);c(l,n),i&&h.push(...i)};!n&&t.mixins.length&&t.mixins.forEach(i),e.extends&&i(e.extends),e.mixins&&e.mixins.forEach(i)}if(!a&&!u)return x(e)&&s.set(e,r),r;if(p(a))for(let e=0;e<a.length;e++){0;const t=P(a[e]);ms(t)&&(l[t]=i)}else if(a){0;for(const e in a){const t=P(e);if(ms(t)){const n=a[e],i=l[t]=p(n)||v(n)?{type:n}:c({},n);if(i){const e=_s(Boolean,i.type),n=_s(String,i.type);i[0]=e>-1,i[1]=n<0||e<n,(e>-1||d(i,"default"))&&h.push(t)}}}}const f=[l,h];return x(e)&&s.set(e,f),f}function ms(e){return"$"!==e[0]&&!T(e)}function gs(e){if(null===e)return"null";if("function"==typeof e)return e.name||"";if("object"==typeof e){return e.constructor&&e.constructor.name||""}return""}function vs(e,t){return gs(e)===gs(t)}function _s(e,t){return p(t)?t.findIndex((t=>vs(t,e))):v(t)&&vs(t,e)?0:-1}const ys=e=>"_"===e[0]||"$stable"===e,xs=e=>p(e)?e.map(wo):[wo(e)],bs=(e,t,n)=>{if(t._n)return t;const i=ti(((...e)=>xs(t(...e))),n);return i._c=!1,i},ws=(e,t,n)=>{const i=e._ctx;for(const n in e){if(ys(n))continue;const r=e[n];if(v(r))t[n]=bs(0,r,i);else if(null!=r){0;const e=xs(r);t[n]=()=>e}}},Ss=(e,t)=>{const n=xs(t);e.slots.default=()=>n};function Es(e,t,n,r,s=!1){if(p(e))return void e.forEach(((e,i)=>Es(e,t&&(p(t)?t[i]:t),n,r,s)));if(Yi(r)&&!s)return;const o=4&r.shapeFlag?Xo(r.component)||r.component.proxy:r.el,a=s?null:o,{i:l,r:c}=e;const u=t&&t.r,f=l.refs===i?l.refs={}:l.refs,m=l.setupState;if(null!=u&&u!==c&&(_(u)?(f[u]=null,d(m,u)&&(m[u]=null)):Gt(u)&&(u.value=null)),v(c))gn(c,l,12,[a,f]);else{const t=_(c),i=Gt(c);if(t||i){const r=()=>{if(e.f){const n=t?d(m,c)?m[c]:f[c]:c.value;s?p(n)&&h(n,o):p(n)?n.includes(o)||n.push(o):t?(f[c]=[o],d(m,c)&&(m[c]=f[c])):(c.value=[o],e.k&&(f[e.k]=c.value))}else t?(f[c]=a,d(m,c)&&(m[c]=a)):i&&(c.value=a,e.k&&(f[e.k]=a))};a?(r.id=-1,Is(r,n)):r()}else 0}}let Ms=!1;const Ts=e=>(e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName)(e)?"svg":(e=>e.namespaceURI.includes("MathML"))(e)?"mathml":void 0,As=e=>8===e.nodeType;function Cs(e){const{mt:t,p:n,o:{patchProp:i,createText:r,nextSibling:s,parentNode:o,remove:l,insert:c,createComment:h}}=e,u=(n,i,a,l,h,y=!1)=>{y=y||!!i.dynamicChildren;const x=As(n)&&"["===n.data,b=()=>m(n,i,a,l,h,x),{type:w,ref:S,shapeFlag:E,patchFlag:M}=i;let T=n.nodeType;i.el=n,__VUE_PROD_DEVTOOLS__&&("__vnode"in n||Object.defineProperty(n,"__vnode",{value:i,enumerable:!1}),"__vueParentComponent"in n||Object.defineProperty(n,"__vueParentComponent",{value:a,enumerable:!1})),-2===M&&(y=!1,i.dynamicChildren=null);let A=null;switch(w){case Ys:3!==T?""===i.children?(c(i.el=r(""),o(n),n),A=n):A=b():(n.data!==i.children&&(Ms=!0,__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&hn("Hydration text mismatch in",n.parentNode,`\n - rendered on server: ${JSON.stringify(n.data)}\n - expected on client: ${JSON.stringify(i.children)}`),n.data=i.children),A=s(n));break;case Zs:_(n)?(A=s(n),v(i.el=n.content.firstChild,n,a)):A=8!==T||x?b():s(n);break;case Ks:if(x&&(T=(n=s(n)).nodeType),1===T||3===T){A=n;const e=!i.children.length;for(let t=0;t<i.staticCount;t++)e&&(i.children+=1===A.nodeType?A.outerHTML:A.data),t===i.staticCount-1&&(i.anchor=A),A=s(A);return x?s(A):A}
12b();break;case $s:A=x?f(n,i,a,l,h,y):b();break;default:if(1&E)A=1===T&&i.type.toLowerCase()===n.tagName.toLowerCase()||_(n)?d(n,i,a,l,h,y):b();else if(6&E){i.slotScopeIds=h;const e=o(n);if(A=x?g(n):As(n)&&"teleport start"===n.data?g(n,n.data,"teleport end"):s(n),t(i,e,null,a,l,Ts(e),y),Yi(i)){let t;x?(t=mo($s),t.anchor=A?A.previousSibling:e.lastChild):t=3===n.nodeType?yo(""):mo("div"),t.el=n,i.component.subTree=t}}else 64&E?A=8!==T?b():i.type.hydrate(n,i,a,l,h,y,e,p):128&E?A=i.type.hydrate(n,i,a,l,Ts(o(n)),h,y,e,u):__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&hn("Invalid HostVNode type:",w,`(${typeof w})`)}return null!=S&&Es(S,null,l,i),A},d=(e,t,n,r,s,o)=>{o=o||!!t.dynamicChildren;const{type:c,props:h,patchFlag:u,shapeFlag:d,dirs:f,transition:m}=t,g="input"===c||"option"===c;if(g||-1!==u){f&&Oi(t,null,n,"created");let c,y=!1;if(_(e)){y=Fs(r,m)&&n&&n.vnode.props&&n.vnode.props.appear;const i=e.content.firstChild;y&&m.beforeEnter(i),v(i,e,n),t.el=e=i}if(16&d&&(!h||!h.innerHTML&&!h.textContent)){let i=p(e.firstChild,t,e,n,r,s,o),a=!1;for(;i;){Ms=!0,__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&!a&&(hn("Hydration children mismatch on",e,"\nServer rendered element contains more child nodes than client vdom."),a=!0);const t=i;i=i.nextSibling,l(t)}}else 8&d&&e.textContent!==t.children&&(Ms=!0,__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&hn("Hydration text content mismatch on",e,`\n - rendered on server: ${e.textContent}\n - expected on client: ${t.children}`),e.textContent=t.children);if(h)if(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__||g||!o||48&u)for(const r in h)__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&Rs(e,r,h[r],t,n)&&(Ms=!0),(g&&(r.endsWith("value")||"indeterminate"===r)||a(r)&&!T(r)||"."===r[0])&&i(e,r,null,h[r],void 0,void 0,n);else h.onClick&&i(e,"onClick",null,h.onClick,void 0,void 0,n);(c=h&&h.onVnodeBeforeMount)&&To(c,n,t),f&&Oi(t,null,n,"beforeMount"),((c=h&&h.onVnodeMounted)||f||y)&&bi((()=>{c&&To(c,n,t),y&&m.enter(e),f&&Oi(t,null,n,"mounted")}),r)}return e.nextSibling},p=(e,t,i,r,s,o,a)=>{a=a||!!t.dynamicChildren;const l=t.children,c=l.length;let h=!1;for(let t=0;t<c;t++){const c=a?l[t]:l[t]=wo(l[t]);if(e)e=u(e,c,r,s,o,a);else{if(c.type===Ys&&!c.children)continue;Ms=!0,__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&!h&&(hn("Hydration children mismatch on",i,"\nServer rendered element contains fewer child nodes than client vdom."),h=!0),n(null,c,i,null,r,s,Ts(i),o)}}return e},f=(e,t,n,i,r,a)=>{const{slotScopeIds:l}=t;l&&(r=r?r.concat(l):l);const u=o(e),d=p(s(e),t,u,n,i,r,a);return d&&As(d)&&"]"===d.data?s(t.anchor=d):(Ms=!0,c(t.anchor=h("]"),u,d),d)},m=(e,t,i,r,a,c)=>{if(Ms=!0,__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&hn("Hydration node mismatch:\n- rendered on server:",e,3===e.nodeType?"(text)":As(e)&&"["===e.data?"(start of fragment)":"","\n- expected on client:",t.type),t.el=null,c){const t=g(e);for(;;){const n=s(e);if(!n||n===t)break;l(n)}}const h=s(e),u=o(e);return l(e),n(null,t,u,h,i,r,Ts(u),a),h},g=(e,t="[",n="]")=>{let i=0;for(;e;)if((e=s(e))&&As(e)&&(e.data===t&&i++,e.data===n)){if(0===i)return s(e);i--}return e},v=(e,t,n)=>{const i=t.parentNode;i&&i.replaceChild(e,t);let r=n;for(;r;)r.vnode.el===t&&(r.vnode.el=r.subTree.el=e),r=r.parent},_=e=>1===e.nodeType&&"template"===e.tagName.toLowerCase();return[(e,t)=>{if(!t.hasChildNodes())return __VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&hn("Attempting to hydrate existing markup but container is empty. Performing full mount instead."),n(null,e,t),Dn(),void(t._vnode=e);Ms=!1,u(t.firstChild,e,null,null,null),Dn(),t._vnode=e,Ms&&console.error("Hydration completed but contains mismatches.")},u]}function Rs(e,t,n,i,r){var s;let o,a,l,c;if("class"===t)l=e.getAttribute("class"),c=$(n),function(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}(Ps(l||""),Ps(c))||(o=a="class");else if("style"===t){l=e.getAttribute("style"),c=_(n)?n:function(e){let t="";if(!e||_(e))return t;for(const n in e){const i=e[n],r=n.startsWith("--")?n:I(n);(_(i)||"number"==typeof i)&&(t+=`${r}:${i};`)}return t}(G(n));const t=Ls(l),h=Ls(c);if(i.dirs)for(const{dir:e,value:t}of i.dirs)"show"!==e.name||t||h.set("display","none");const u=null==r?void 0:r.subTree;if(i===u||(null==u?void 0:u.type)===$s&&u.children.includes(i)){const e=null==(s=null==r?void 0:r.getCssVars)?void 0:s.call(r);for(const t in e)h.set(`--${t}`,String(e[t]))}(function(e,t){if(e.size!==t.size)return!1;for(const[n,i]of e)if(i!==t.get(n))return!1;return!0})(t,h)||(o=a="style")}else(e instanceof SVGElement&&se(t)||e instanceof HTMLElement&&(ne(t)||re(t)))&&(ne(t)?(l=e.hasAttribute(t),c=ie(n)):null==n?(l=e.hasAttribute(t),c=!1):(l=e.hasAttribute(t)?e.getAttribute(t):"value"===t&&"TEXTAREA"===e.tagName&&e.value,c=!!function(e){if(null==e)return!1;const t=typeof e;return"string"===t||"number"===t||"boolean"===t}(n)&&String(n)),l!==c&&(o="attribute",a=t));if(o){const t=e=>!1===e?"(not rendered)":`${a}="${e}"`;return hn(`Hydration ${o} mismatch on`,e,`\n - rendered on server: ${t(l)}\n - expected on client: ${t(c)}\n Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.\n You should fix the source of the mismatch.`),!0}return!1}function Ps(e){return new Set(e.trim().split(/\s+/))}function Ls(e){const t=new Map;for(const n of e.split(";")){let[e,i]=n.split(":");e=null==e?void 0:e.trim(),i=null==i?void 0:i.trim(),e&&i&&t.set(e,i)}return t}const Is=bi;function Ds(e){return Os(e)}function Ns(e){return Os(e,Cs)}function Os(e,t){"boolean"!=typeof __VUE_OPTIONS_API__&&(z().__VUE_OPTIONS_API__=!0),"boolean"!=typeof __VUE_PROD_DEVTOOLS__&&(z().__VUE_PROD_DEVTOOLS__=!1),"boolean"!=typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&(z().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__=!1);const n=z();n.__VUE__=!0,__VUE_PROD_DEVTOOLS__&&zn(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:o,remove:a,patchProp:l,createElement:h,createText:u,createComment:p,setText:f,setElementText:m,parentNode:g,nextSibling:v,setScopeId:_=s,insertStaticContent:y}=e,x=(e,t,n,i=null,r=null,s=null,o,a=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!co(e,t)&&(i=J(e),X(e,r,s,!0),e=null),-2===t.patchFlag&&(l=!1,t.dynamicChildren=null);const{type:c,ref:h,shapeFlag:u}=t;switch(c){case Ys:b(e,t,n,i);break;case Zs:w(e,t,n,i);break;case Ks:null==e&&S(t,n,i,o);break;case $s:O(e,t,n,i,r,s,o,a,l);break;default:1&u?M(e,t,n,i,r,s,o,a,l):6&u?k(e,t,n,i,r,s,o,a,l):(64&u||128&u)&&c.process(e,t,n,i,r,s,o,a,l,te)}null!=h&&r&&Es(h,e&&e.ref,s,t||e,!t)},b=(e,t,n,i)=>{if(null==e)o(t.el=u(t.children),n,i);else{const n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},w=(e,t,n,i)=>{null==e?o(t.el=p(t.children||""),n,i):t.el=e.el},S=(e,t,n,i)=>{[e.el,e.anchor]=y(e.children,t,n,i,e.el,e.anchor)},E=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=v(e),a(e),e=n;a(t)},M=(e,t,n,i,r,s,o,a,l)=>{"svg"===t.type?o="svg":"math"===t.type&&(o="mathml"),null==e?A(t,n,i,r,s,o,a,l):L(e,t,r,s,o,a,l)},A=(e,t,n,i,r,s,a,c)=>{let u,d;const{props:p,shapeFlag:f,transition:g,dirs:v}=e;if(u=e.el=h(e.type,s,p&&p.is,p),8&f?m(u,e.children):16&f&&R(e.children,u,null,i,r,Us(e,s),a,
vendor: 8,170 bytes, line 12
12c),v&&Oi(e,null,i,"created"),C(u,e,e.scopeId,a,i),p){for(const t in p)"value"===t||T(t)||l(u,t,null,p[t],s,e.children,i,r,K);"value"in p&&l(u,"value",null,p.value,s),(d=p.onVnodeBeforeMount)&&To(d,i,e)}__VUE_PROD_DEVTOOLS__&&(Object.defineProperty(u,"__vnode",{value:e,enumerable:!1}),Object.defineProperty(u,"__vueParentComponent",{value:i,enumerable:!1})),v&&Oi(e,null,i,"beforeMount");const _=Fs(r,g);_&&g.beforeEnter(u),o(u,t,n),((d=p&&p.onVnodeMounted)||_||v)&&Is((()=>{d&&To(d,i,e),_&&g.enter(u),v&&Oi(e,null,i,"mounted")}),r)},C=(e,t,n,i,r)=>{if(n&&_(e,n),i)for(let t=0;t<i.length;t++)_(e,i[t]);if(r){if(t===r.subTree){const t=r.vnode;C(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},R=(e,t,n,i,r,s,o,a,l=0)=>{for(let c=l;c<e.length;c++){const l=e[c]=a?So(e[c]):wo(e[c]);x(null,l,t,n,i,r,s,o,a)}},L=(e,t,n,r,s,o,a)=>{const c=t.el=e.el;let{patchFlag:h,dynamicChildren:u,dirs:d}=t;h|=16&e.patchFlag;const p=e.props||i,f=t.props||i;let g;if(n&&ks(n,!1),(g=f.onVnodeBeforeUpdate)&&To(g,n,t,e),d&&Oi(t,e,n,"beforeUpdate"),n&&ks(n,!0),u?D(e.dynamicChildren,u,c,n,r,Us(t,s),o):a||G(e,t,c,null,n,r,Us(t,s),o,!1),h>0){if(16&h)N(c,t,p,f,n,r,s);else if(2&h&&p.class!==f.class&&l(c,"class",null,f.class,s),4&h&&l(c,"style",p.style,f.style,s),8&h){const i=t.dynamicProps;for(let t=0;t<i.length;t++){const o=i[t],a=p[o],h=f[o];h===a&&"value"!==o||l(c,o,a,h,s,e.children,n,r,K)}}1&h&&e.children!==t.children&&m(c,t.children)}else a||null!=u||N(c,t,p,f,n,r,s);((g=f.onVnodeUpdated)||d)&&Is((()=>{g&&To(g,n,t,e),d&&Oi(t,e,n,"updated")}),r)},D=(e,t,n,i,r,s,o)=>{for(let a=0;a<t.length;a++){const l=e[a],c=t[a],h=l.el&&(l.type===$s||!co(l,c)||70&l.shapeFlag)?g(l.el):n;x(l,c,h,null,i,r,s,o,!0)}},N=(e,t,n,r,s,o,a)=>{if(n!==r){if(n!==i)for(const i in n)T(i)||i in r||l(e,i,n[i],null,a,t.children,s,o,K);for(const i in r){if(T(i))continue;const c=r[i],h=n[i];c!==h&&"value"!==i&&l(e,i,h,c,a,t.children,s,o,K)}"value"in r&&l(e,"value",n.value,r.value,a)}},O=(e,t,n,i,r,s,a,l,c)=>{const h=t.el=e?e.el:u(""),d=t.anchor=e?e.anchor:u("");let{patchFlag:p,dynamicChildren:f,slotScopeIds:m}=t;m&&(l=l?l.concat(m):m),null==e?(o(h,n,i),o(d,n,i),R(t.children||[],n,d,r,s,a,l,c)):p>0&&64&p&&f&&e.dynamicChildren?(D(e.dynamicChildren,f,n,r,s,a,l),(null!=t.key||r&&t===r.subTree)&&Vs(e,t,!0)):G(e,t,n,d,r,s,a,l,c)},k=(e,t,n,i,r,s,o,a,l)=>{t.slotScopeIds=a,null==e?512&t.shapeFlag?r.ctx.activate(t,n,i,o,l):F(t,n,i,r,s,o,l):V(e,t,l)},F=(e,t,n,i,r,s,o)=>{const a=e.component=Ro(e,i,r);if(Ji(e)&&(a.ctx.renderer=te),Bo(a),a.asyncDep){if(r&&r.registerDep(a,B),!e.el){const e=a.subTree=mo(Zs);w(null,e,t,n)}}else B(a,e,t,n,r,s,o)},V=(e,t,n)=>{const i=t.component=e.component;if(function(e,t,n){const{props:i,children:r,component:s}=e,{props:o,children:a,patchFlag:l}=t,c=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&l>=0))return!(!r&&!a||a&&a.$stable)||i!==o&&(i?!o||oi(i,o,c):!!o);if(1024&l)return!0;if(16&l)return i?oi(i,o,c):!!o;if(8&l){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(o[n]!==i[n]&&!$n(c,n))return!0}}return!1}(e,t,n)){if(i.asyncDep&&!i.asyncResolved)return void H(i,t,n);i.next=t,function(e){const t=bn.indexOf(e);t>wn&&bn.splice(t,1)}(i.update),i.effect.dirty=!0,i.update()}else t.el=e.el,i.vnode=t},B=(e,t,n,i,r,o,a)=>{const l=()=>{if(e.isMounted){let{next:t,bu:n,u:i,parent:s,vnode:c}=e;{const n=Bs(e);if(n)return t&&(t.el=c.el,H(e,t,a)),void n.asyncDep.then((()=>{e.isUnmounted||l()}))}let h,u=t;0,ks(e,!1),t?(t.el=c.el,H(e,t,a)):t=c,n&&U(n),(h=t.props&&t.props.onVnodeBeforeUpdate)&&To(h,s,t,c),ks(e,!0);const d=ni(e);0;const p=e.subTree;e.subTree=d,x(p,d,g(p.el),J(p),e,r,o),t.el=d.el,null===u&&ai(e,d.el),i&&Is(i,r),(h=t.props&&t.props.onVnodeUpdated)&&Is((()=>To(h,s,t,c)),r),__VUE_PROD_DEVTOOLS__&&Gn(e)}else{let s;const{el:a,props:l}=t,{bm:c,m:h,parent:u}=e,d=Yi(t);if(ks(e,!1),c&&U(c),!d&&(s=l&&l.onVnodeBeforeMount)&&To(s,u,t),ks(e,!0),a&&ie){const n=()=>{e.subTree=ni(e),ie(a,e.subTree,e,r,null)};d?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{0;const s=e.subTree=ni(e);0,x(null,s,n,i,e,r,o),t.el=s.el}if(h&&Is(h,r),!d&&(s=l&&l.onVnodeMounted)){const e=t;Is((()=>To(s,u,e)),r)}(256&t.shapeFlag||u&&Yi(u.vnode)&&256&u.vnode.shapeFlag)&&e.a&&Is(e.a,r),e.isMounted=!0,__VUE_PROD_DEVTOOLS__&&Hn(e),t=n=i=null}},c=e.effect=new _e(l,s,(()=>Rn(h)),e.scope),h=e.update=()=>{c.dirty&&c.run()};h.id=e.uid,ks(e,!0),h()},H=(e,t,n)=>{t.component=e;const r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,i){const{props:r,attrs:s,vnode:{patchFlag:o}}=e,a=Ot(r),[l]=e.propsOptions;let c=!1;if(!(i||o>0)||16&o){let i;ds(e,t,r,s)&&(c=!0);for(const s in a)t&&(d(t,s)||(i=I(s))!==s&&d(t,i))||(l?!n||void 0===n[s]&&void 0===n[i]||(r[s]=ps(l,a,s,void 0,e,!0)):delete r[s]);if(s!==a)for(const e in s)t&&d(t,e)||(delete s[e],c=!0)}else if(8&o){const n=e.vnode.dynamicProps;for(let i=0;i<n.length;i++){let o=n[i];if($n(e.emitsOptions,o))continue;const h=t[o];if(l)if(d(s,o))h!==s[o]&&(s[o]=h,c=!0);else{const t=P(o);r[t]=ps(l,a,t,h,e,!1)}else h!==s[o]&&(s[o]=h,c=!0)}}c&&Be(e.attrs,"set","")}(e,t.props,r,n),((e,t,n)=>{const{vnode:r,slots:s}=e;let o=!0,a=i;if(32&r.shapeFlag){const e=t._;e?n&&1===e?o=!1:(c(s,t),n||1!==e||delete s._):(o=!t.$stable,ws(t,s)),a=t}else t&&(Ss(e,t),a={default:1});if(o)for(const e in s)ys(e)||null!=a[e]||delete s[e]})(e,t.children,n),Ce(),In(e),Re()},G=(e,t,n,i,r,s,o,a,l=!1)=>{const c=e&&e.children,h=e?e.shapeFlag:0,u=t.children,{patchFlag:d,shapeFlag:p}=t;if(d>0){if(128&d)return void j(c,u,n,i,r,s,o,a,l);if(256&d)return void W(c,u,n,i,r,s,o,a,l)}8&p?(16&h&&K(c,r,s),u!==c&&m(n,u)):16&h?16&p?j(c,u,n,i,r,s,o,a,l):K(c,r,s,!0):(8&h&&m(n,""),16&p&&R(u,n,i,r,s,o,a,l))},W=(e,t,n,i,s,o,a,l,c)=>{t=t||r;const h=(e=e||r).length,u=t.length,d=Math.min(h,u);let p;for(p=0;p<d;p++){const i=t[p]=c?So(t[p]):wo(t[p]);x(e[p],i,n,null,s,o,a,l,c)}h>u?K(e,s,o,!0,!1,d):R(t,n,i,s,o,a,l,c,d)},j=(e,t,n,i,s,o,a,l,c)=>{let h=0;const u=t.length;let d=e.length-1,p=u-1;for(;h<=d&&h<=p;){const i=e[h],r=t[h]=c?So(t[h]):wo(t[h]);if(!co(i,r))break;x(i,r,n,null,s,o,a,l,c),h++}for(;h<=d&&h<=p;){const i=e[d],r=t[p]=c?So(t[p]):wo(t[p]);if(!co(i,r))break;x(i,r,n,null,s,o,a,l,c),d--,p--}if(h>d){if(h<=p){const e=p+1,r=e<u?t[e].el:i;for(;h<=p;)x(null,t[h]=c?So(t[h]):wo(t[h]),n,r,s,o,a,l,c),h++}}else if(h>p)for(;h<=d;)X(e[h],s,o,!0),h++;else{const f=h,m=h,g=new Map;for(h=m;h<=p;h++){const e=t[h]=c?So(t[h]):wo(t[h]);null!=e.key&&g.set(e.key,h)}let v,_=0;const y=p-m+1;let b=!1,w=0;const S=new Array(y);for(h=0;h<y;h++)S[h]=0;for(h=f;h<=d;h++){const i=e[h];if(_>=y){X(i,s,o,!0);continue}let r;if(null!=i.key)r=g.get(i.key);else for(v=m;v<=p;v++)if(0===S[v-m]&&co(i,t[v])){r=v;break}void 0===r?X(i,s,o,!0):(S[r-m]=h+1,r>=w?w=r:b=!0,x(i,t[r],n,null,s,o,a,l,c),_++)}const E=b?function(e){const t=e.slice(),n=[0];let i,r,s,o,a;const l=e.length;for(i=0;i<l;i++){const l=e[i];if(0!==l){if(r=n[n.length-1],e[r]<l){t[i]=r,n.push(i);continue}for(s=0,o=n.length-1;s<o;)a=s+o>>1,e[n[a]]<l?s=a+1:o=a;l<e[n[s]]&&(s>0&&(t[i]=n[s-1]),n[s]=i)}}s=n.length,o=n[s-1];for(;s-- >0;)n[s]=o,o=t[o];return n}(S):r;for(v=E.length-1,h=y-1;h>=0;h--){const e=m+h,r=t[e],d=e+1<u?t[e+1].el:i;0===S[h]?x(null,r,n,d,s,o,a,l,c):b&&(v<0||h!==E[v]?q(r,n,d,2):v--)}}},q=(e,t,n,i,r=null)=>{const{el:s,type:a,transition:l,children:c,shapeFlag:h}=e;if(6&h)return void q(e.component.subTree,t,n,i);if(128&h)return void e.suspense.move(t,n,i);if(64&h)return void a.move(e,t,n,te);if(a===$s){o(s,t,n);for(let e=0;e<c.length;e++)q(c[e],t,n,i);return void o(e.anchor,t,n)}if(a===Ks)return void(({el:e,anchor:t},n,i)=>{let r;for(;e&&e!==t;)r=v(e),o(e,n,i),e=r;o(t,n,i)})(e,t,n);if(2!==i&&1&h&&l)if(0===i)l.beforeEnter(s),o(s,t,n),Is((()=>l.enter(s)),r);else{const{leave:e,delayLeave:i,afterLeave:r}=l,a=()=>o(s,t,n),c=()=>{e(s,(()=>{a(),r&&r()}))};i?i(s,a,c):c()}else o(s,t,n)},X=(e,t,n,i=!1,r=!1)=>{const{type:s,props:o,ref:a,children:l,dynamicChildren:c,shapeFlag:h,patchFlag:u,dirs:d}=e;if(null!=a&&Es(a,null,n,e,!0),256&h)return void t.ctx.deactivate(e);const p=1&h&&d,f=!Yi(e);let m;if(f&&(m=o&&o.onVnodeBeforeUnmount)&&To(m,t,e),6&h)Z(e.component,n,i);else{if(128&h)return void e.suspense.unmount(n,i);p&&Oi(e,null,t,"beforeUnmount"),64&h?e.type.remove(e,t,n,r,te,i):c&&(s!==$s||u>
120&&64&u)?K(c,t,n,!1,!0):(s===$s&&384&u||!r&&16&h)&&K(l,t,n),i&&$(e)}(f&&(m=o&&o.onVnodeUnmounted)||p)&&Is((()=>{m&&To(m,t,e),p&&Oi(e,null,t,"unmounted")}),n)},$=e=>{const{type:t,el:n,anchor:i,transition:r}=e;if(t===$s)return void Y(n,i);if(t===Ks)return void E(e);const s=()=>{a(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){const{leave:t,delayLeave:i}=r,o=()=>t(n,s);i?i(e.el,s,o):o()}else s()},Y=(e,t)=>{let n;for(;e!==t;)n=v(e),a(e),e=n;a(t)},Z=(e,t,n)=>{const{bum:i,scope:r,update:s,subTree:o,um:a}=e;var l;i&&U(i),r.stop(),s&&(s.active=!1,X(o,e,t,n)),a&&Is(a,t),Is((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve()),__VUE_PROD_DEVTOOLS__&&(l=e,kn&&"function"==typeof kn.cleanupBuffer&&!kn.cleanupBuffer(l)&&Wn(l))},K=(e,t,n,i=!1,r=!1,s=0)=>{for(let o=s;o<e.length;o++)X(e[o],t,n,i,r)},J=e=>6&e.shapeFlag?J(e.component.subTree):128&e.shapeFlag?e.suspense.next():v(e.anchor||e.el);let Q=!1;const ee=(e,t,n)=>{null==e?t._vnode&&X(t._vnode,null,null,!0):x(t._vnode||null,e,t,null,null,null,n),Q||(Q=!0,In(),Dn(),Q=!1),t._vnode=e},te={p:x,um:X,m:q,r:$,mt:F,mc:R,pc:G,pbc:D,n:J,o:e};let ne,ie;return t&&([ne,ie]=t(te)),{render:ee,hydrate:ne,createApp:rs(ee,ne)}}function Us({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function ks({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Fs(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Vs(e,t,n=!1){const i=e.children,r=t.children;if(p(i)&&p(r))for(let e=0;e<i.length;e++){const t=i[e];let s=r[e];1&s.shapeFlag&&!s.dynamicChildren&&((s.patchFlag<=0||32===s.patchFlag)&&(s=r[e]=So(r[e]),s.el=t.el),n||Vs(t,s)),s.type===Ys&&(s.el=t.el)}}function Bs(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Bs(t)}const zs=e=>e&&(e.disabled||""===e.disabled),Hs=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,Gs=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,Ws=(e,t)=>{const n=e&&e.to;if(_(n)){if(t){const e=t(n);return e}return null}return n};function js(e,t,n,{o:{insert:i},m:r},s=2){0===s&&i(e.targetAnchor,t,n);const{el:o,anchor:a,shapeFlag:l,children:c,props:h}=e,u=2===s;if(u&&i(o,t,n),(!u||zs(h))&&16&l)for(let e=0;e<c.length;e++)r(c[e],t,n,2);u&&i(a,t,n)}const qs={name:"Teleport",__isTeleport:!0,process(e,t,n,i,r,s,o,a,l,c){const{mc:h,pc:u,pbc:d,o:{insert:p,querySelector:f,createText:m,createComment:g}}=c,v=zs(t.props);let{shapeFlag:_,children:y,dynamicChildren:x}=t;if(null==e){const e=t.el=m(""),c=t.anchor=m("");p(e,n,i),p(c,n,i);const u=t.target=Ws(t.props,f),d=t.targetAnchor=m("");u&&(p(d,u),"svg"===o||Hs(u)?o="svg":("mathml"===o||Gs(u))&&(o="mathml"));const g=(e,t)=>{16&_&&h(y,e,t,r,s,o,a,l)};v?g(n,c):u&&g(u,d)}else{t.el=e.el;const i=t.anchor=e.anchor,h=t.target=e.target,p=t.targetAnchor=e.targetAnchor,m=zs(e.props),g=m?n:h,_=m?i:p;if("svg"===o||Hs(h)?o="svg":("mathml"===o||Gs(h))&&(o="mathml"),x?(d(e.dynamicChildren,x,g,r,s,o,a),Vs(e,t,!0)):l||u(e,t,g,_,r,s,o,a,!1),v)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):js(t,n,i,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=Ws(t.props,f);e&&js(t,e,null,c,0)}else m&&js(t,h,p,c,1)}Xs(t)},remove(e,t,n,i,{um:r,o:{remove:s}},o){const{shapeFlag:a,children:l,anchor:c,targetAnchor:h,target:u,props:d}=e;if(u&&s(h),o&&s(c),16&a){const e=o||!zs(d);for(let i=0;i<l.length;i++){const s=l[i];r(s,t,n,e,!!s.dynamicChildren)}}},move:js,hydrate:function(e,t,n,i,r,s,{o:{nextSibling:o,parentNode:a,querySelector:l}},c){const h=t.target=Ws(t.props,l);if(h){const l=h._lpa||h.firstChild;if(16&t.shapeFlag)if(zs(t.props))t.anchor=c(o(e),t,a(e),n,i,r,s),t.targetAnchor=l;else{t.anchor=o(e);let a=l;for(;a;)if(a=o(a),a&&8===a.nodeType&&"teleport anchor"===a.data){t.targetAnchor=a,h._lpa=t.targetAnchor&&o(t.targetAnchor);break}c(l,t,h,n,i,r,s)}Xs(t)}return t.anchor&&o(t.anchor)}};function Xs(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)1===n.nodeType&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}const $s=Symbol.for("v-fgt"),Ys=Symbol.for("v-txt"),Zs=Symbol.for("v-cmt"),Ks=Symbol.for("v-stc"),Js=[];let Qs=null;function eo(e=!1){Js.push(Qs=e?null:[])}function to(){Js.pop(),Qs=Js[Js.length-1]||null}let no,io=1;function ro(e){io+=e}function so(e){return e.dynamicChildren=io>0?Qs||r:null,to(),io>0&&Qs&&Qs.push(e),e}function oo(e,t,n,i,r,s){return so(fo(e,t,n,i,r,s,!0))}function ao(e,t,n,i,r){return so(mo(e,t,n,i,r,!0))}function lo(e){return!!e&&!0===e.__v_isVNode}function co(e,t){return e.type===t.type&&e.key===t.key}function ho(e){no=e}const uo=({key:e})=>null!=e?e:null,po=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?_(e)||Gt(e)||v(e)?{i:Yn,r:e,k:t,f:!!n}:e:null);function fo(e,t=null,n=null,i=0,r=null,s=(e===$s?0:1),o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,t
12ype:e,props:t,key:t&&uo(t),ref:t&&po(t),scopeId:Zn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:i,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Yn};return a?(Eo(l,n),128&s&&e.normalize(l)):n&&(l.shapeFlag|=_(n)?8:16),io>0&&!o&&Qs&&(l.patchFlag>0||6&s)&&32!==l.patchFlag&&Qs.push(l),l}const mo=go;function go(e,t=null,n=null,i=0,r=null,s=!1){if(e&&e!==hi||(e=Zs),lo(e)){const i=_o(e,t,!0);return n&&Eo(i,n),io>0&&!s&&Qs&&(6&i.shapeFlag?Qs[Qs.indexOf(e)]=i:Qs.push(i)),i.patchFlag|=-2,i}if(Ko(e)&&(e=e.__vccOpts),t){t=vo(t);let{class:e,style:n}=t;e&&!_(e)&&(t.class=$(e)),x(n)&&(Nt(n)&&!p(n)&&(n=c({},n)),t.style=G(n))}return fo(e,t,n,i,r,_(e)?1:mi(e)?128:(e=>e.__isTeleport)(e)?64:x(e)?4:v(e)?2:0,s,!0)}function vo(e){return e?Nt(e)||us(e)?c({},e):e:null}function _o(e,t,n=!1){const{props:i,ref:r,patchFlag:s,children:o}=e,a=t?Mo(i||{},t):i;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&uo(a),ref:t&&t.ref?n&&r?p(r)?r.concat(po(t)):[r,po(t)]:po(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==$s?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&_o(e.ssContent),ssFallback:e.ssFallback&&_o(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function yo(e=" ",t=0){return mo(Ys,null,e,t)}function xo(e,t){const n=mo(Ks,null,e);return n.staticCount=t,n}function bo(e="",t=!1){return t?(eo(),ao(Zs,null,e)):mo(Zs,null,e)}function wo(e){return null==e||"boolean"==typeof e?mo(Zs):p(e)?mo($s,null,e.slice()):"object"==typeof e?So(e):mo(Ys,null,String(e))}function So(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:_o(e)}function Eo(e,t){let n=0;const{shapeFlag:i}=e;if(null==t)t=null;else if(p(t))n=16;else if("object"==typeof t){if(65&i){const n=t.default;return void(n&&(n._c&&(n._d=!1),Eo(e,n()),n._c&&(n._d=!0)))}{n=32;const i=t._;i||us(t)?3===i&&Yn&&(1===Yn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Yn}}else v(t)?(t={default:t,_ctx:Yn},n=32):(t=String(t),64&i?(n=16,t=[yo(t)]):n=8);e.children=t,e.shapeFlag|=n}function Mo(...e){const t={};for(let n=0;n<e.length;n++){const i=e[n];for(const e in i)if("class"===e)t.class!==i.class&&(t.class=$([t.class,i.class]));else if("style"===e)t.style=G([t.style,i.style]);else if(a(e)){const n=t[e],r=i[e];!r||n===r||p(n)&&n.includes(r)||(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=i[e])}return t}function To(e,t,n,i=null){vn(e,t,7,[n,i])}const Ao=ns();let Co=0;function Ro(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||Ao,o={uid:Co++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,scope:new pe(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:fs(r,s),emitsOptions:Xn(r,s),emit:null,emitted:null,propsDefaults:i,inheritAttrs:r.inheritAttrs,ctx:i,data:i,props:i,attrs:i,slots:i,refs:i,setupState:i,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=qn.bind(null,o),e.ce&&e.ce(o),o}let Po=null;const Lo=()=>Po||Yn;let Io,Do;{const e=z(),t=(t,n)=>{let i;return(i=e[t])||(i=e[t]=[]),i.push(n),e=>{i.length>1?i.forEach((t=>t(e))):i[0](e)}};Io=t("__VUE_INSTANCE_SETTERS__",(e=>Po=e)),Do=t("__VUE_SSR_SETTERS__",(e=>Vo=e))}const No=e=>{const t=Po;return Io(e),e.scope.on(),()=>{e.scope.off(),Io(t)}},Oo=()=>{Po&&Po.scope.off(),Io(null)};function Uo(e){return 4&e.vnode.shapeFlag}let ko,Fo,Vo=!1;function Bo(e,t=!1){t&&Do(t);const{props:n,children:i}=e.vnode,r=Uo(e);!function(e,t,n,i=!1){const r={},s=hs();e.propsDefaults=Object.create(null),ds(e,t,r,s);for(const t in e.propsOptions[0])t in r||(r[t]=void 0);n?e.props=i?r:At(r):e.type.props?e.props=r:e.props=s,e.attrs=s}(e,n,r,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=Ot(t),k(e.slots,"_",n)):ws(t,e.slots=hs())}else e.slots=hs(),t&&Ss(e,t)})(e,i);const s=r?function(e,t){const n=e.type;0;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ar),!1;const{setup:i}=n;if(i){const n=e.setupContext=i.length>1?qo(e):null,r=No(e);Ce();const s=gn(i,e,0,[e.props,n]);if(Re(),r(),b(s)){if(s.then(Oo,Oo),t)return s.then((n=>{zo(e,n,t)})).catch((t=>{_n(t,e,0)}));e.asyncDep=s}else zo(e,s,t)}else Wo(e,t)}(e,t):void 0;return t&&Do(!1),s}
12function zo(e,t,n){v(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:x(t)&&(__VUE_PROD_DEVTOOLS__&&(e.devtoolsRawSetupState=t),e.setupState=Jt(t)),Wo(e,n)}function Ho(e){ko=e,Fo=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Cr))}}const Go=()=>!ko;function Wo(e,t,n){const i=e.type;if(!e.render){if(!t&&ko&&!i.render){const t=i.template||$r(e).template;if(t){0;const{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:s,compilerOptions:o}=i,a=c(c({isCustomElement:n,delimiters:s},r),o);i.render=ko(t,a)}}e.render=i.render||s,Fo&&Fo(e)}if(__VUE_OPTIONS_API__){const t=No(e);Ce();try{jr(e)}finally{Re(),t()}}}const jo={get(e,t){return Ve(e,0,""),e[t]}};function qo(e){const t=t=>{e.exposed=t||{}};return{attrs:new Proxy(e.attrs,jo),slots:e.slots,emit:e.emit,expose:t}}function Xo(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Jt(Ut(e.exposed)),{get(t,n){return n in t?t[n]:n in Mr?Mr[n](e):void 0},has(e,t){return t in e||t in Mr}}))}const $o=/(?:^|[-_])(\w)/g;function Yo(e,t=!0){return v(e)?e.displayName||e.name:e.name||t&&e.__name}function Zo(e,t,n=!1){let i=Yo(t);if(!i&&t.__file){const e=t.__file.match(/([^/\\]+)\.\w+$/);e&&(i=e[1])}if(!i&&e&&e.parent){const n=e=>{for(const n in e)if(e[n]===t)return n};i=n(e.components||e.parent.type.components)||n(e.appContext.components)}return i?i.replace($o,(e=>e.toUpperCase())).replace(/[-_]/g,""):n?"App":"Anonymous"}function Ko(e){return v(e)&&"__vccOpts"in e}const Jo=(e,t)=>Bt(e,0,Vo);function Qo(e,t,n=i){const r=Lo();const s=P(t),o=I(t),a=en(((i,a)=>{let l;return Ai((()=>{const n=e[t];O(l,n)&&(l=n,a())})),{get(){return i(),n.get?n.get(l):l},set(e){const i=r.vnode.props;i&&(t in i||s in i||o in i)&&(`onUpdate:${t}`in i||`onUpdate:${s}`in i||`onUpdate:${o}`in i)||!O(e,l)||(l=e,a()),r.emit(`update:${t}`,n.set?n.set(e):e)}}})),l="modelValue"===t?"modelModifiers":`${t}Modifiers`;return a[Symbol.iterator]=()=>{let t=0;return{next(){return t<2?{value:t++?e[l]||{}:a,done:!1}:{done:!0}}}},a}function ea(e,t,n){const i=arguments.length;return 2===i?x(t)&&!p(t)?lo(t)?mo(e,null,[t]):mo(e,t):mo(e,null,t):(i>3?n=Array.prototype.slice.call(arguments,2):3===i&&lo(n)&&(n=[n]),mo(e,t,n))}function ta(){return void 0}function na(e,t,n,i){const r=n[i];if(r&&ia(r,e))return r;const s=t();return s.memo=e.slice(),n[i]=s}function ia(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e<n.length;e++)if(O(n[e],t[e]))return!1;return io>0&&Qs&&Qs.push(e),!0}const ra="3.4.23",sa=s,oa=mn,aa=kn,la=zn,ca={createComponentInstance:Ro,setupComponent:Bo,renderComponentRoot:ni,setCurrentRenderingInstance:Kn,isVNode:lo,normalizeVNode:wo},ha=null,ua=null,da=null,pa="undefined"!=typeof document?document:null,fa=pa&&pa.createElement("template"),ma={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,i)=>{const r="svg"===t?pa.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?pa.createElementNS("http://www.w3.org/1998/Math/MathML",e):pa.createElement(e,n?{is:n}:void 0);return"select"===e&&i&&null!=i.multiple&&r.setAttribute("multiple",i.multiple),r},createText:e=>pa.createTextNode(e),createComment:e=>pa.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>
vendor: 4,382 bytes, line 12
12{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>pa.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,i,r,s){const o=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==s&&(r=r.nextSibling););else{fa.innerHTML="svg"===i?`<svg>${e}</svg>`:"mathml"===i?`<math>${e}</math>`:e;const r=fa.content;if("svg"===i||"mathml"===i){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ga="transition",va="animation",_a=Symbol("_vtc"),ya=(e,{slots:t})=>ea(zi,Ea(e),t);ya.displayName="Transition";const xa={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},ba=ya.props=c({},Bi,xa),wa=(e,t=[])=>{p(e)?e.forEach((e=>e(...t))):e&&e(...t)},Sa=e=>!!e&&(p(e)?e.some((e=>e.length>1)):e.length>1);function Ea(e){const t={};for(const n in e)n in xa||(t[n]=e[n]);if(!1===e.css)return t;const{name:n="v",type:i,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:h=o,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,m=function(e){if(null==e)return null;if(x(e))return[Ma(e.enter),Ma(e.leave)];{const t=Ma(e);return[t,t]}}(r),g=m&&m[0],v=m&&m[1],{onBeforeEnter:_,onEnter:y,onEnterCancelled:b,onLeave:w,onLeaveCancelled:S,onBeforeAppear:E=_,onAppear:M=y,onAppearCancelled:T=b}=t,A=(e,t,n)=>{Aa(e,t?u:a),Aa(e,t?h:o),n&&n()},C=(e,t)=>{e._isLeaving=!1,Aa(e,d),Aa(e,f),Aa(e,p),t&&t()},R=e=>(t,n)=>{const r=e?M:y,o=()=>A(t,e,n);wa(r,[t,o]),Ca((()=>{Aa(t,e?l:s),Ta(t,e?u:a),Sa(r)||Pa(t,i,g,o)}))};return c(t,{onBeforeEnter(e){wa(_,[e]),Ta(e,s),Ta(e,o)},onBeforeAppear(e){wa(E,[e]),Ta(e,l),Ta(e,h)},onEnter:R(!1),onAppear:R(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>C(e,t);Ta(e,d),Na(),Ta(e,p),Ca((()=>{e._isLeaving&&(Aa(e,d),Ta(e,f),Sa(w)||Pa(e,i,v,n))})),wa(w,[e,n])},onEnterCancelled(e){A(e,!1),wa(b,[e])},onAppearCancelled(e){A(e,!0),wa(T,[e])},onLeaveCancelled(e){C(e),wa(S,[e])}})}function Ma(e){return V(e)}function Ta(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[_a]||(e[_a]=new Set)).add(t)}function Aa(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const n=e[_a];n&&(n.delete(t),n.size||(e[_a]=void 0))}function Ca(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Ra=0;function Pa(e,t,n,i){const r=e._endId=++Ra,s=()=>{r===e._endId&&i()};if(n)return setTimeout(s,n);const{type:o,timeout:a,propCount:l}=La(e,t);if(!o)return i();const c=o+"end";let h=0;const u=()=>{e.removeEventListener(c,d),s()},d=t=>{t.target===e&&++h>=l&&u()};setTimeout((()=>{h<l&&u()}),a+1),e.addEventListener(c,d)}function La(e,t){const n=window.getComputedStyle(e),i=e=>(n[e]||"").split(", "),r=i("transitionDelay"),s=i("transitionDuration"),o=Ia(r,s),a=i("animationDelay"),l=i("animationDuration"),c=Ia(a,l);let h=null,u=0,d=0;t===ga?o>0&&(h=ga,u=o,d=s.length):t===va?c>0&&(h=va,u=c,d=l.length):(u=Math.max(o,c),h=u>0?o>c?ga:va:null,d=h?h===ga?s.length:l.length:0);return{type:h,timeout:u,propCount:d,hasTransform:h===ga&&/\b(transform|all)(,|$)/.test(i("transitionProperty").toString())}}function Ia(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,n)=>Da(t)+Da(e[n]))))}function Da(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function Na(){return document.body.offsetHeight}const Oa=Symbol("_vod"),Ua=Symbol("_vsh"),ka={beforeMount(e,{value:t},{transition:n}){e[Oa]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):Fa(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:i}){!t!=!n&&(i?t?(i.beforeEnter(e),Fa(e,!0),i.enter(e)):i.leave(e,(()=>{Fa(e,!1)})):Fa(e,t))},beforeUnmount(e,{value:t}){Fa(e,t)}};function Fa(e,t){e.style.display=t?e[Oa]:"none",e[Ua]=!t}const Va=Symbol("");function Ba(e){const t=Lo();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}
12"]`)).forEach((e=>Ha(e,n)))};const i=()=>{const i=e(t.proxy);za(t.subTree,i),n(i)};hr((()=>{Ti(i);const e=new MutationObserver(i);e.observe(t.subTree.el.parentNode,{childList:!0}),fr((()=>e.disconnect()))}))}function za(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{za(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)Ha(e.el,t);else if(e.type===$s)e.children.forEach((e=>za(e,t)));else if(e.type===Ks){let{el:n,anchor:i}=e;for(;n&&(Ha(n,t),n!==i);)n=n.nextSibling}}function Ha(e,t){if(1===e.nodeType){const n=e.style;let i="";for(const e in t)n.setProperty(`--${e}`,t[e]),i+=`--${e}: ${t[e]};`;n[Va]=i}}const Ga=/(^|;)\s*display\s*:/;const Wa=/\s*!important$/;function ja(e,t,n){if(p(n))n.forEach((n=>ja(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const i=function(e,t){const n=Xa[t];if(n)return n;let i=P(t);if("filter"!==i&&i in e)return Xa[t]=i;i=D(i);for(let n=0;n<qa.length;n++){const r=qa[n]+i;if(r in e)return Xa[t]=r}return t}(e,t);Wa.test(n)?e.setProperty(I(i),n.replace(Wa,""),"important"):e[i]=n}}const qa=["Webkit","Moz","ms"],Xa={};const $a="http://www.w3.org/1999/xlink";function Ya(e,t,n,i){e.addEventListener(t,n,i)}const Za=Symbol("_vei");function Ka(e,t,n,i,r=null){const s=e[Za]||(e[Za]={}),o=s[t];if(i&&o)o.value=i;else{const[n,a]=function(e){let t;if(Ja.test(e)){let n;for(t={};n=e.match(Ja);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):I(e.slice(2)),t]}(t);if(i){const o=s[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();vn(function(e,t){if(p(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=(()=>Qa||(el.then((()=>Qa=0)),Qa=Date.now()))(),n}(i,r);Ya(e,n,o,a)}else o&&(!function(e,t,n,i){e.removeEventListener(t,n,i)}(e,n,o,a),s[t]=void 0)}}const Ja=/(?:Once|Passive|Capture)$/;let Qa=0;const el=Promise.resolve();const tl=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123; 13/*! #__NO_SIDE_EFFECTS__ */ 14function nl(e,t){const n=$i(e);class i extends sl{constructor(e){super(n,e,t)}}return i.def=n,i} 15/*! #__NO_SIDE_EFFECTS__ */const il=e=>nl(e,Hl),rl="undefined"!=typeof HTMLElement?HTMLElement:class{};class sl extends rl{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),Cn((()=>{this._connected||(zl(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){this._resolved=!0;for(let e=0;e<this.attributes.length;e++)this._setAttr(this.attributes[e].name);this._ob=new MutationObserver((e=>{for(const t of e)this._setAttr(t.attributeName)})),this._ob.observe(this,{attributes:!0});const e=(e,t=!1)=>{const{props:n,styles:i}=e;let r;if(n&&!p(n))for(const e in n){const t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=V(this._props[e])),(r||(r=Object.create(null)))[P(e)]=!0)}this._numberProps=r,t&&this._resolveProps(e),this._applyStyles(i),this._update()},t=this._def.__asyncLoader;t?t().then((t=>e(t,!0))):e(this._def)}_resolveProps(e){const{props:t}=e,n=p(t)?t:Object.keys(t||{});for(const e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e],!0,!1);for(const e of n.map(P))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t)}})}_setAttr(e){let t=this.hasAttribute(e)?this.getAttribute(e):void 0;const n=P(e);this._numberProps&&this._numberProps[n]&&(t=V(t)),this._setProp(n,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,i=!0){t!==this._props[e]&&(this._props[e]=t,i&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(I(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(I(e),t+""):t||this.removeAttribute(I(e))))}
15_update(){zl(this._createVNode(),this.shadowRoot)}_createVNode(){const e=mo(this._def,c({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};e.emit=(e,...n)=>{t(e,n),I(e)!==e&&t(I(e),n)};let n=this;for(;n=n&&(n.parentNode||n.host);)if(n instanceof sl){e.parent=n._instance,e.provides=n._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}function ol(e="$style"){{const t=Lo();if(!t)return i;const n=t.type.__cssModules;if(!n)return i;const r=n[e];return r||i}}const al=new WeakMap,ll=new WeakMap,cl=Symbol("_moveCb"),hl=Symbol("_enterCb"),ul={name:"TransitionGroup",props:c({},ba,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Lo(),i=Fi();let r,s;return dr((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const i=e.cloneNode(),r=e[_a];r&&r.forEach((e=>{e.split(/\s+/).forEach((e=>e&&i.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&i.classList.add(e))),i.style.display="none";const s=1===t.nodeType?t:t.parentNode;s.appendChild(i);const{hasTransform:o}=La(i);return s.removeChild(i),o}(r[0].el,n.vnode.el,t))return;r.forEach(pl),r.forEach(fl);const i=r.filter(ml);Na(),i.forEach((e=>{const n=e.el,i=n.style;Ta(n,t),i.transform=i.webkitTransform=i.transitionDuration="";const r=n[cl]=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",r),n[cl]=null,Aa(n,t))};n.addEventListener("transitionend",r)}))})),()=>{const o=Ot(e),a=Ea(o);let l=o.tag||$s;if(r=[],s)for(let e=0;e<s.length;e++){const t=s[e];t.el&&t.el instanceof Element&&(r.push(t),qi(t,Gi(t,a,i,n)),al.set(t,t.el.getBoundingClientRect()))}s=t.default?Xi(t.default()):[];for(let e=0;e<s.length;e++){const t=s[e];null!=t.key&&qi(t,Gi(t,a,i,n))}return mo(l,null,s)}}},dl=ul;function pl(e){const t=e.el;t[cl]&&t[cl](),t[hl]&&t[hl]()}function fl(e){ll.set(e,e.el.getBoundingClientRect())}function ml(e){const t=al.get(e),n=ll.get(e),i=t.left-n.left,r=t.top-n.top;if(i||r){const t=e.el.style;return t.transform=t.webkitTransform=`translate(${i}px,${r}px)`,t.transitionDuration="0s",e}}const gl=e=>{const t=e.props["onUpdate:modelValue"]||!1;return p(t)?e=>U(t,e):t};function vl(e){e.target.composing=!0}function _l(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const yl=Symbol("_assign"),xl={created(e,{modifiers:{lazy:t,trim:n,number:i}},r){e[yl]=gl(r);const s=i||r.props&&"number"===r.props.type;Ya(e,t?"change":"input",(t=>{if(t.target.composing)return;let i=e.value;n&&(i=i.trim()),s&&(i=F(i)),e[yl](i)})),n&&Ya(e,"change",(()=>{e.value=e.value.trim()})),t||(Ya(e,"compositionstart",vl),Ya(e,"compositionend",_l),Ya(e,"change",_l))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:i,number:r}},s){if(e[yl]=gl(s),e.composing)return;const o=null==t?"":t;if((!r&&"number"!==e.type||/^0\d/.test(e.value)?e.value:F(e.value))!==o){if(document.activeElement===e&&"range"!==e.type){if(n)return;if(i&&e.value.trim()===o)return}e.value=o}}},bl={deep:!0,created(e,t,n){e[yl]=gl(n),Ya(e,"change",(()=>{const t=e._modelValue,n=Tl(e),i=e.checked,r=e[yl];if(p(t)){const e=ae(t,n),s=-1!==e;if(i&&!s)r(t.concat(n));else if(!i&&s){const n=[...t];n.splice(e,1),r(n)}}else if(m(t)){const e=new Set(t);i?e.add(n):e.delete(n),r(e)}else r(Al(e,i))}))},mounted:wl,beforeUpdate(e,t,n){e[yl]=gl(n),wl(e,t,n)}};function wl(e,{value:t,oldValue:n},i){e._modelValue=t,p(t)?e.checked=ae(t,i.props.value)>-1:m(t)?e.checked=t.has(i.props.value):t!==n&&(e.checked=oe(t,Al(e,!0)))}const Sl={created(e,{value:t},n){e.checked=oe(t,n.props.value),e[yl]=gl(n),Ya(e,"change",(()=>{e[yl](Tl(e))}))},beforeUpdate(e,{value:t,oldValue:n},i){e[yl]=gl(i),t!==n&&(e.checked=oe(t,i.props.value))}},El={deep:!0,created(e,{value:t,modifiers:{number:n}},i){const r=m(t);Ya(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?F(Tl(e)):Tl(e)));e[yl](e.multiple?r?new Set(t):t:t[0]),e._assigning=!0,Cn((()=>{e._assigning=!1}))})),e[yl]=gl(i)},mounted(e,{value:t,modifiers:{number:n}}){Ml(e,t)}
15,beforeUpdate(e,t,n){e[yl]=gl(n)},updated(e,{value:t,modifiers:{number:n}}){e._assigning||Ml(e,t)}};function Ml(e,t,n){const i=e.multiple,r=p(t);if(!i||r||m(t)){for(let n=0,s=e.options.length;n<s;n++){const s=e.options[n],o=Tl(s);if(i)if(r){const e=typeof o;s.selected="string"===e||"number"===e?t.some((e=>String(e)===String(o))):ae(t,o)>-1}else s.selected=t.has(o);else if(oe(Tl(s),t))return void(e.selectedIndex!==n&&(e.selectedIndex=n))}i||-1===e.selectedIndex||(e.selectedIndex=-1)}}function Tl(e){return"_value"in e?e._value:e.value}function Al(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Cl={created(e,t,n){Pl(e,t,n,null,"created")},mounted(e,t,n){Pl(e,t,n,null,"mounted")},beforeUpdate(e,t,n,i){Pl(e,t,n,i,"beforeUpdate")},updated(e,t,n,i){Pl(e,t,n,i,"updated")}};function Rl(e,t){switch(e){case"SELECT":return El;case"TEXTAREA":return xl;default:switch(t){case"checkbox":return bl;case"radio":return Sl;default:return xl}}}function Pl(e,t,n,i,r){const s=Rl(e.tagName,n.props&&n.props.type)[r];s&&s(e,t,n,i)}const Ll=["ctrl","shift","alt","meta"],Il={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Ll.some((n=>e[`${n}Key`]&&!t.includes(n)))},Dl=(e,t)=>{const n=e._withMods||(e._withMods={}),i=t.join(".");return n[i]||(n[i]=(n,...i)=>{for(let e=0;e<t.length;e++){const i=Il[t[e]];if(i&&i(n,t))return}return e(n,...i)})},Nl={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Ol=(e,t)=>{const n=e._withKeys||(e._withKeys={}),i=t.join(".");return n[i]||(n[i]=n=>{if(!("key"in n))return;const i=I(n.key);return t.some((e=>e===i||Nl[e]===i))?e(n):void 0})},Ul=c({patchProp:(e,t,n,i,r,s,o,c,h)=>{const u="svg"===r;"class"===t?function(e,t,n){const i=e[_a];i&&(t=(t?[t,...i]:[...i]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,i,u):"style"===t?function(e,t,n){const i=e.style,r=_(n);let s=!1;if(n&&!r){if(t)if(_(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&ja(i,t,"")}else for(const e in t)null==n[e]&&ja(i,e,"");for(const e in n)"display"===e&&(s=!0),ja(i,e,n[e])}else if(r){if(t!==n){const e=i[Va];e&&(n+=";"+e),i.cssText=n,s=Ga.test(n)}}else t&&e.removeAttribute("style");Oa in e&&(e[Oa]=s?i.display:"",e[Ua]&&(i.display="none"))}(e,n,i):a(t)?l(t)||Ka(e,t,0,i,o):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,i){if(i)return"innerHTML"===t||"textContent"===t||!!(t in e&&tl(t)&&v(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(tl(t)&&_(n))return!1;return t in e}(e,t,i,u))?function(e,t,n,i,r,s,o){if("innerHTML"===t||"textContent"===t)return i&&o(i,r,s),void(e[t]=null==n?"":n);const a=e.tagName;if("value"===t&&"PROGRESS"!==a&&!a.includes("-")){const i=null==n?"":n;return("OPTION"===a?e.getAttribute("value")||"":e.value)===i&&"_value"in e||(e.value=i),null==n&&e.removeAttribute(t),void(e._value=n)}let l=!1;if(""===n||null==n){const i=typeof e[t];"boolean"===i?n=ie(n):null==n&&"string"===i?(n="",l=!0):"number"===i&&(n=0,l=!0)}try{e[t]=n}catch(e){}l&&e.removeAttribute(t)}(e,t,i,s,o,c,h):("true-value"===t?e._trueValue=i:"false-value"===t&&(e._falseValue=i),function(e,t,n,i,r){if(i&&t.startsWith("xlink:"))null==n?e.removeAttributeNS($a,t.slice(6,t.length)):e.setAttributeNS($a,t,n);else{const i=te(t);null==n||i&&!ie(n)?e.removeAttribute(t):e.setAttribute(t,i?"":n)}}(e,t,i,u))}},ma);let kl,Fl=!1;function Vl(){return kl||(kl=Ds(Ul))}function Bl(){return kl=Fl?kl:Ns(Ul),Fl=!0,kl}const zl=(...e)=>{Vl().render(...e)},Hl=(...e)=>{Bl().hydrate(...e)},Gl=(...e)=>{const t=Vl().createApp(...e);const{mount:n}=t;return t.mount=e=>{const i=ql(e);
15if(!i)return;const r=t._component;v(r)||r.render||r.template||(r.template=i.innerHTML),i.innerHTML="";const s=n(i,!1,jl(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),s},t},Wl=(...e)=>{const t=Bl().createApp(...e);const{mount:n}=t;return t.mount=e=>{const t=ql(e);if(t)return n(t,!0,jl(t))},t};function jl(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function ql(e){if(_(e)){return document.querySelector(e)}return e}let Xl=!1;const $l=()=>{Xl||(Xl=!0,xl.getSSRProps=({value:e})=>({value:e}),Sl.getSSRProps=({value:e},t)=>{if(t.props&&oe(t.props.value,e))return{checked:!0}},bl.getSSRProps=({value:e},t)=>{if(p(e)){if(t.props&&ae(e,t.props.value)>-1)return{checked:!0}}else if(m(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Cl.getSSRProps=(e,t)=>{if("string"!=typeof t.type)return;const n=Rl(t.type.toUpperCase(),t.props&&t.props.type);return n.getSSRProps?n.getSSRProps(e,t):void 0},ka.getSSRProps=({value:e})=>
15{if(!e)return{style:{display:"none"}}})},Yl=Symbol(""),Zl=Symbol(""),Kl=Symbol(""),Jl=Symbol(""),Ql=Symbol(""),ec=Symbol(""),tc=Symbol(""),nc=Symbol(""),ic=Symbol(""),rc=Symbol(""),sc=Symbol(""),oc=Symbol(""),ac=Symbol(""),lc=Symbol(""),cc=Symbol(""),hc=Symbol(""),uc=Symbol(""),dc=Symbol(""),pc=Symbol(""),fc=Symbol(""),mc=Symbol(""),gc=Symbol(""),vc=Symbol(""),_c=Symbol(""),yc=Symbol(""),xc=Symbol(""),bc=Symbol(""),wc=Symbol(""),Sc=Symbol(""),Ec=Symbol(""),Mc=Symbol(""),Tc=Symbol(""),Ac=Symbol(""),Cc=Symbol(""),Rc=Symbol(""),Pc=Symbol(""),Lc=Symbol(""),Ic=Symbol(""),Dc=Symbol(""),Nc={[Yl]:"Fragment",[Zl]:"Teleport",[Kl]:"Suspense",[Jl]:"KeepAlive",[Ql]:"BaseTransition",[ec]:"openBlock",[tc]:"createBlock",[nc]:"createElementBlock",[ic]:"createVNode",[rc]:"createElementVNode",[sc]:"createCommentVNode",[oc]:"createTextVNode",[ac]:"createStaticVNode",[lc]:"resolveComponent",[cc]:"resolveDynamicComponent",[hc]:"resolveDirective",[uc]:"resolveFilter",[dc]:"withDirectives",[pc]:"renderList",[fc]:"renderSlot",[mc]:"createSlots",[gc]:"toDisplayString",[vc]:"mergeProps",[_c]:"normalizeClass",[yc]:"normalizeStyle",[xc]:"normalizeProps",[bc]:"guardReactiveProps",[wc]:"toHandlers",[Sc]:"camelize",[Ec]:"capitalize",[Mc]:"toHandlerKey",[Tc]:"setBlockTracking",[Ac]:"pushScopeId",[Cc]:"popScopeId",[Rc]:"withCtx",[Pc]:"unref",[Lc]:"isRef",[Ic]:"withMemo",[Dc]:"isMemoSame"};const Oc={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function Uc(e,t,n,i,r,s,o,a=!1,l=!1,c=!1,h=Oc){return e&&(a?(e.helper(ec),e.helper(qc(e.inSSR,c))):e.helper(jc(e.inSSR,c)),o&&e.helper(dc)),{type:13,tag:t,props:n,children:i,patchFlag:r,dynamicProps:s,directives:o,isBlock:a,disableTracking:l,isComponent:c,loc:h}}function kc(e,t=Oc){return{type:17,loc:t,elements:e}}function Fc(e,t=Oc){return{type:15,loc:t,properties:e}}function Vc(e,t){return{type:16,loc:Oc,key:_(e)?Bc(e,!0):e,value:t}}function Bc(e,t=!1,n=Oc,i=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:i}}function zc(e,t=Oc){return{type:8,loc:t,children:e}}function Hc(e,t=[],n=Oc){return{type:14,loc:n,callee:e,arguments:t}}function Gc(e,t,n=!1,i=!1,r=Oc){return{type:18,params:e,returns:t,newline:n,isSlot:i,loc:r}}function Wc(e,t,n,i=!0){return{type:19,test:e,consequent:t,alternate:n,newline:i,loc:Oc}}function jc(e,t){return e||t?ic:rc}function qc(e,t){return e||t?tc:nc}function Xc(e,{helper:t,removeHelper:n,inSSR:i}){e.isBlock||(e.isBlock=!0,n(jc(i,e.isComponent)),t(ec),t(qc(i,e.isComponent)))}const $c=new Uint8Array([123,123]),Yc=new Uint8Array([125,125]);function Zc(e){return e>=97&&e<=122||e>=65&&e<=90}function Kc(e){return 32===e||10===e||9===e||12===e||13===e}function Jc(e){return 47===e||62===e||Kc(e)}function Qc(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}const eh={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};function th(e,{compatConfig:t}){const n=t&&t[e];return"MODE"===e?n||3:n}function nh(e,t){const n=th("MODE",t),i=th(e,t);return 3===n?!0===i:!1!==i}function ih(e,t,n,...i){return nh(e,t)}function rh(e){throw e}function sh(e){}function oh(e,t,n,i){const r=new SyntaxError(String(`https://vuejs.org/error-reference/#compiler-${e}`));return r.code=e,r.loc=t,r}const ah=e=>4===e.type&&e.isStatic;function lh(e){switch(e){case"Teleport":case"teleport":return Zl;case"Suspense":case"suspense":return Kl;case"KeepAlive":case"keep-alive":return Jl;case"BaseTransition":case"base-transition":return Ql}}const ch=/^\d|[^\$\w]/,hh=e=>!ch.test(e),uh=/[A-Za-z_$\xA0-\uFFFF]/,dh=/[\.\?\w$\xA0-\uFFFF]/,ph=/\s+[.[]\s*|\s*[.[]\s+/g,fh=e=>{e=e.trim().replace(ph,(e=>e.trim()));let t=0,n=[],i=0,r=0,s=null;for(let o=0;o<e.length;o++){const a=e.charAt(o);switch(t){case 0:if("["===a)n.push(t),t=1,i++;else if("("===a)n.push(t),t=2,r++;else if(!(0===o?uh:dh).test(a))return!1;break;case 1:"'"===a||'"'===a||"`"===a?(n.push(t),t=3,s=a):"["===a?i++:"]"===a&&(--i||(t=n.pop()));break;case 2:if("'"===a||'"'===a||"`"===a)n.push(t),t=3,s=a;else if("("===a)r++;else if(")"===a){if(o===e.length-1)return!1;--r||(t=n.pop())}break;case 3:a===s&&(t=n.pop(),s=null)}}return!i&&!r};function mh(e,t,n=!1){for(let i=0;i<e.props.length;i++){const r=e.props[i];if(7===r.type&&(n||r.exp)&&(_(t)?r.name===t:t.test(r.name)))return r}}function gh(e,t,n=!1,i=!1){for(let r=0;r<e.props.length;r++){const s=e.props[r];
vendor: 13,061 bytes, line 15
15if(6===s.type){if(n)continue;if(s.name===t&&(s.value||i))return s}else if("bind"===s.name&&(s.exp||i)&&vh(s.arg,t))return s}}function vh(e,t){return!(!e||!ah(e)||e.content!==t)}function _h(e){return 5===e.type||2===e.type}function yh(e){return 7===e.type&&"slot"===e.name}function xh(e){return 1===e.type&&3===e.tagType}function bh(e){return 1===e.type&&2===e.tagType}const wh=new Set([xc,bc]);function Sh(e,t=[]){if(e&&!_(e)&&14===e.type){const n=e.callee;if(!_(n)&&wh.has(n))return Sh(e.arguments[0],t.concat(e))}return[e,t]}function Eh(e,t,n){let i,r,s=13===e.type?e.props:e.arguments[2],o=[];if(s&&!_(s)&&14===s.type){const e=Sh(s);s=e[0],o=e[1],r=o[o.length-1]}if(null==s||_(s))i=Fc([t]);else if(14===s.type){const e=s.arguments[0];_(e)||15!==e.type?s.callee===wc?i=Hc(n.helper(vc),[Fc([t]),s]):s.arguments.unshift(Fc([t])):Mh(t,e)||e.properties.unshift(t),!i&&(i=s)}else 15===s.type?(Mh(t,s)||s.properties.unshift(t),i=s):(i=Hc(n.helper(vc),[Fc([t]),s]),r&&r.callee===bc&&(r=o[o.length-2]));13===e.type?r?r.arguments[0]=i:e.props=i:r?r.arguments[0]=i:e.arguments[2]=i}function Mh(e,t){let n=!1;if(4===e.key.type){const i=e.key.content;n=t.properties.some((e=>4===e.key.type&&e.key.content===i))}return n}function Th(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}const Ah=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Ch={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:o,isPreTag:o,isCustomElement:o,onError:rh,onWarn:sh,comments:!1,prefixIdentifiers:!1};let Rh=Ch,Ph=null,Lh="",Ih=null,Dh=null,Nh="",Oh=-1,Uh=-1,kh=0,Fh=!1,Vh=null;const Bh=[],zh=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=$c,this.delimiterClose=Yc,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=$c,this.delimiterClose=Yc}getPos(e){let t=1,n=e+1;for(let i=this.newlines.length-1;i>=0;i--){const r=this.newlines[i];if(e>r){t=i+2,n=e-r;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){const t=this.sequenceIndex===this.currentSequence.length;if(t?Jc(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||Kc(e)){const t=this.index-this.currentSequence.length;if(this.sectionStart<t){const e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}return this.sectionStart=t+2,this.stateInClosingTagName(e),void(this.inRCDATA=!1)}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence===eh.TitleEnd||this.currentSequence===eh.TextareaEnd&&!this.inSFCRoot?e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=Number(60===e)}stateCDATASequence(e){e===eh.Cdata[this.sequenceIndex]?++this.sequenceIndex===eh.Cdata.length&&(this.state=28,this.currentSequence=eh.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){const t=this.buffer.charCodeAt(this.index);if(10===t&&this.newlines.push(this.index),t===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===eh.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,t){this.enterRCDATA(e,t),this.state=31}enterRCDATA(e,t){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=t}stateBeforeTagName(e){33===e?(this.state=22,this.sectionStart=this.index+1):63===e?(this.state=24,this.sectionStart=this.index+1):Zc(e)?(this.sectionStart=this.index,0===this.mode?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:this.state=116===e?30:115===e?29:6):47===e?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){Jc(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(Jc(e)){const t=this.buffer.slice(this.sectionStart,this.index);"template"!==t&&this.enterRCDATA(Qc("</"+t),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){Kc(e)||(62===e?(this.state=1,this.sectionStart=this.index+1):(this.state=Zc(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(62===e||Kc(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){62===e&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){62===e?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):47===e?this.state=7:60===e&&47===this.peek()?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):Kc(e)||this.handleAttrStart(e)}handleAttrStart(e){118===e&&45===this.peek()?(this.state=13,this.sectionStart=this.index):46===e||58===e||64===e||35===e?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(e){62===e?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):Kc(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(61===e||Jc(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){61===e||Jc(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):58===e?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):46===e&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){61===e||Jc(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):91===e?this.state=15:46===e&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){93===e?this.state=14:(61===e||Jc(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){61===e||Jc(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):46===e&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){61===e?this.state=18:47===e||62===e?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):Kc(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){34===e?(this.state=19,this.sectionStart=this.index+1):39===e?(this.state=20,this.sectionStart=this.index+1):Kc(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,t){(e===t||this.fastForwardTo(t))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(34===t?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){Kc(e)||62===e?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):39!==e&&60!==e&&61!==e&&96!==e||this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){91===e?(this.state=26,this.sequenceIndex=0):this.state=45===e?25:23}stateInDeclaration(e){(62===e||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(62===e||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){45===e?(this.state=28,this.currentSequence=eh.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(62===e||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){e===eh.ScriptEnd[3]?this.startSpecial(eh.ScriptEnd,4):e===eh.StyleEnd[3]?this.startSpecial(eh.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===eh.TitleEnd[3]?this.startSpecial(eh.TitleEnd,4):e===eh.TextareaEnd[3]?this.startSpecial(eh.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){const e=this.buffer.charCodeAt(this.index);switch(10===e&&this.newlines.push(this.index),this.state){case 1:this.stateText(e);break;case 2:this.stateInterpolationOpen(e);break;case 3:this.stateInterpolation(e);break;case 4:this.stateInterpolationClose(e);break;case 31:this.stateSpecialStartSequence(e);break;case 32:this.stateInRCDATA(e);break;case 26:this.stateCDATASequence(e);break;case 19:this.stateInAttrValueDoubleQuotes(e);break;case 12:this.stateInAttrName(e);break;case 13:this.stateInDirName(e);break;case 14:this.stateInDirArg(e);break;case 15:this.stateInDynamicDirArg(e);break;case 16:this.stateInDirModifier(e);break;case 28:this.stateInCommentLike(e);break;case 27:this.stateInSpecialComment(e);break;case 11:this.stateBeforeAttrName(e);break;case 6:this.stateInTagName(e);break;case 34:this.stateInSFCRootTagName(e);break;case 9:this.stateInClosingTagName(e);break;case 5:this.stateBeforeTagName(e);break;case 17:this.stateAfterAttrName(e);break;case 20:this.stateInAttrValueSingleQuotes(e);break;case 18:this.stateBeforeAttrValue(e);break;case 8:this.stateBeforeClosingTagName(e);break;case 10:this.stateAfterClosingTagName(e);break;case 29:this.stateBeforeSpecialS(e);break;case 30:this.stateBeforeSpecialT(e);break;case 21:this.stateInAttrValueNoQuotes(e);break;case 7:this.stateInSelfClosingTag(e);break;case 23:this.stateInDeclaration(e);break;case 22:this.stateBeforeDeclaration(e);break;case 25:this.stateBeforeComment(e);break;case 24:this.stateInProcessingInstruction(e);break;case 33:this.stateInEntity()}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(1===this.state||32===this.state&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):19!==this.state&&20!==this.state&&21!==this.state||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const e=this.buffer.length;this.sectionStart>=e||(28===this.state?this.currentSequence===eh.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(Bh,{onerr:au,ontext(e,t){qh(Wh(e,t),e,t)}
15,ontextentity(e,t,n){qh(e,t,n)},oninterpolation(e,t){if(Fh)return qh(Wh(e,t),e,t);let n=e+zh.delimiterOpen.length,i=t-zh.delimiterClose.length;for(;Kc(Lh.charCodeAt(n));)n++;for(;Kc(Lh.charCodeAt(i-1));)i--;let r=Wh(n,i);r.includes("&")&&(r=Rh.decodeEntities(r,!1)),nu({type:5,content:ou(r,!1,iu(n,i)),loc:iu(e,t)})},onopentagname(e,t){const n=Wh(e,t);Ih={type:1,tag:n,ns:Rh.getNamespace(n,Bh[0],Rh.ns),tagType:0,props:[],children:[],loc:iu(e-1,t),codegenNode:void 0}},onopentagend(e){jh(e)},onclosetag(e,t){const n=Wh(e,t);if(!Rh.isVoidTag(n)){let i=!1;for(let e=0;e<Bh.length;e++){if(Bh[e].tag.toLowerCase()===n.toLowerCase()){i=!0,e>0&&au(24,Bh[0].loc.start.offset);for(let n=0;n<=e;n++){Xh(Bh.shift(),t,n<e)}break}}i||au(23,$h(e,60))}},onselfclosingtag(e){var t;const n=Ih.tag;Ih.isSelfClosing=!0,jh(e),(null==(t=Bh[0])?void 0:t.tag)===n&&Xh(Bh.shift(),e)},onattribname(e,t){Dh={type:6,name:Wh(e,t),nameLoc:iu(e,t),value:void 0,loc:iu(e)}},ondirname(e,t){const n=Wh(e,t),i="."===n||":"===n?"bind":"@"===n?"on":"#"===n?"slot":n.slice(2);if(Fh||""!==i||au(26,e),Fh||""===i)Dh={type:6,name:n,nameLoc:iu(e,t),value:void 0,loc:iu(e)};else if(Dh={type:7,name:i,rawName:n,exp:void 0,arg:void 0,modifiers:"."===n?["prop"]:[],loc:iu(e)},"pre"===i){Fh=zh.inVPre=!0,Vh=Ih;const e=Ih.props;for(let t=0;t<e.length;t++)7===e[t].type&&(e[t]=su(e[t]))}},ondirarg(e,t){if(e===t)return;const n=Wh(e,t);if(Fh)Dh.name+=n,ru(Dh.nameLoc,t);else{const i="["!==n[0];Dh.arg=ou(i?n:n.slice(1,-1),i,iu(e,t),i?3:0)}},ondirmodifier(e,t){const n=Wh(e,t);if(Fh)Dh.name+="."+n,ru(Dh.nameLoc,t);else if("slot"===Dh.name){const e=Dh.arg;e&&(e.content+="."+n,ru(e.loc,t))}else Dh.modifiers.push(n)},onattribdata(e,t){Nh+=Wh(e,t),Oh<0&&(Oh=e),Uh=t},onattribentity(e,t,n){Nh+=e,Oh<0&&(Oh=t),Uh=n},onattribnameend(e){const t=Dh.loc.start.offset,n=Wh(t,e);7===Dh.type&&(Dh.rawName=n),Ih.props.some((e=>(7===e.type?e.rawName:e.name)===n))&&au(2,t)},onattribend(e,t){if(Ih&&Dh){if(ru(Dh.loc,t),0!==e)if(Nh.includes("&")&&(Nh=Rh.decodeEntities(Nh,!0)),6===Dh.type)"class"===Dh.name&&(Nh=tu(Nh).trim()),1!==e||Nh||au(13,t),Dh.value={type:2,content:Nh,loc:1===e?iu(Oh,Uh):iu(Oh-1,Uh+1)},zh.inSFCRoot&&"template"===Ih.tag&&"lang"===Dh.name&&Nh&&"html"!==Nh&&zh.enterRCDATA(Qc("</template"),0);else{let e=0;Dh.exp=ou(Nh,!1,iu(Oh,Uh),0,e),"for"===Dh.name&&(Dh.forParseResult=function(e){const t=e.loc,n=e.content,i=n.match(Ah);if(!i)return;const[,r,s]=i,o=(e,n,i=!1)=>{const r=t.start.offset+n;return ou(e,!1,iu(r,r+e.length),0,i?1:0)},a={source:o(s.trim(),n.indexOf(s,r.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let l=r.trim().replace(Gh,"").trim();const c=r.indexOf(l),h=l.match(Hh);if(h){l=l.replace(Hh,"").trim();const e=h[1].trim();let t;if(e&&(t=n.indexOf(e,c+l.length),a.key=o(e,t,!0)),h[2]){const i=h[2].trim();i&&(a.index=o(i,n.indexOf(i,a.key?t+e.length:c+l.length),!0))}}l&&(a.value=o(l,c,!0));return a}(Dh.exp));let t=-1;"bind"===Dh.name&&(t=Dh.modifiers.indexOf("sync"))>-1&&ih("COMPILER_V_BIND_SYNC",Rh,Dh.loc,Dh.rawName)&&(Dh.name="model",Dh.modifiers.splice(t,1))}7===Dh.type&&"pre"===Dh.name||Ih.props.push(Dh)}Nh="",Oh=Uh=-1},oncomment(e,t){Rh.comments&&nu({type:3,content:Wh(e,t),loc:iu(e-4,t+3)})},onend(){const e=Lh.length;for(let t=0;t<Bh.length;t++)Xh(Bh[t],e-1),au(24,Bh[t].loc.start.offset)},oncdata(e,t){0!==Bh[0].ns?qh(Wh(e,t),e,t):au(1,e-9)},onprocessinginstruction(e){0===(Bh[0]?Bh[0].ns:Rh.ns)&&au(21,e-1)}}),Hh=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Gh=/^\(|\)$/g;function Wh(e,t){return Lh.slice(e,t)}function jh(e){zh.inSFCRoot&&(Ih.innerLoc=iu(e+1,e+1)),nu(Ih);const{tag:t,ns:n}=Ih;0===n&&Rh.isPreTag(t)&&kh++,Rh.isVoidTag(t)?Xh(Ih,e):(Bh.unshift(Ih),1!==n&&2!==n||(zh.inXML=!0)),Ih=null}function qh(e,t,n){var i;{const t=null==(i=Bh[0])?void 0:i.tag;"script"!==t&&"style"!==t&&e.includes("&")&&(e=Rh.decodeEntities(e,!1))}const r=Bh[0]||Ph,s=r.children[r.children.length-1];2===(null==s?void 0:s.type)?(s.content+=e,ru(s.loc,n)):r.children.push({type:2,content:e,loc:iu(t,n)})}function Xh(e,t,n=!1){ru(e.loc,n?$h(t,60):function(e,t){let n=e;for(;Lh.charCodeAt(n)!==t&&n<Lh.length-1;)n++;return n}(t,62)+1),zh.inSFCRoot&&(e.children.length?e.innerLoc.end=c({},e.children[e.children.length-1].loc.end):e.innerLoc.end=c({},e.innerLoc.start),e.innerLoc.source=Wh(e.innerLoc.start.offset,e.innerLoc.end.offset));const{tag:i,ns:r}=e;Fh||("slot"===i?e.tagType=2:Zh(e)?e.tagType=3:function({tag:e,props:t}){var n;if(Rh.isCustomElement(e))return!1;if("component"===e||(i=e.charCodeAt(0),i>64&&i<91)||lh(e)||(null==(n=Rh.isBuiltInComponent)?void 0:n.call(Rh,e))||Rh.isNativeTag&&!Rh.isNativeTag(e))return!0;var i;for(let e=0;e<t.length;e++){const n=t[e];if(6===n.type){if("is"===n.name&&n.value){if(n.value.content.startsWith("vue:"))return!0;
vendor: 5,928 bytes, line 15
15if(ih("COMPILER_IS_ON_ELEMENT",Rh,n.loc))return!0}}else if("bind"===n.name&&vh(n.arg,"is")&&ih("COMPILER_IS_ON_ELEMENT",Rh,n.loc))return!0}return!1}(e)&&(e.tagType=1)),zh.inRCDATA||(e.children=Jh(e.children,e.tag)),0===r&&Rh.isPreTag(i)&&kh--,Vh===e&&(Fh=zh.inVPre=!1,Vh=null),zh.inXML&&0===(Bh[0]?Bh[0].ns:Rh.ns)&&(zh.inXML=!1);{const t=e.props;if(!zh.inSFCRoot&&nh("COMPILER_NATIVE_TEMPLATE",Rh)&&"template"===e.tag&&!Zh(e)){const t=Bh[0]||Ph,n=t.children.indexOf(e);t.children.splice(n,1,...e.children)}const n=t.find((e=>6===e.type&&"inline-template"===e.name));n&&ih("COMPILER_INLINE_TEMPLATE",Rh,n.loc)&&e.children.length&&(n.value={type:2,content:Wh(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:n.loc})}}function $h(e,t){let n=e;for(;Lh.charCodeAt(n)!==t&&n>=0;)n--;return n}const Yh=new Set(["if","else","else-if","for","slot"]);function Zh({tag:e,props:t}){if("template"===e)for(let e=0;e<t.length;e++)if(7===t[e].type&&Yh.has(t[e].name))return!0;return!1}const Kh=/\r\n/g;function Jh(e,t){var n,i;const r="preserve"!==Rh.whitespace;let s=!1;for(let t=0;t<e.length;t++){const o=e[t];if(2===o.type)if(kh)o.content=o.content.replace(Kh,"\n");else if(Qh(o.content)){const a=null==(n=e[t-1])?void 0:n.type,l=null==(i=e[t+1])?void 0:i.type;!a||!l||r&&(3===a&&(3===l||1===l)||1===a&&(3===l||1===l&&eu(o.content)))?(s=!0,e[t]=null):o.content=" "}else r&&(o.content=tu(o.content))}if(kh&&t&&Rh.isPreTag(t)){const t=e[0];t&&2===t.type&&(t.content=t.content.replace(/^\r?\n/,""))}return s?e.filter(Boolean):e}function Qh(e){for(let t=0;t<e.length;t++)if(!Kc(e.charCodeAt(t)))return!1;return!0}function eu(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(10===n||13===n)return!0}return!1}function tu(e){let t="",n=!1;for(let i=0;i<e.length;i++)Kc(e.charCodeAt(i))?n||(t+=" ",n=!0):(t+=e[i],n=!1);return t}function nu(e){(Bh[0]||Ph).children.push(e)}function iu(e,t){return{start:zh.getPos(e),end:null==t?t:zh.getPos(t),source:null==t?t:Wh(e,t)}}function ru(e,t){e.end=zh.getPos(t),e.source=Wh(e.start.offset,t)}function su(e){const t={type:6,name:e.rawName,nameLoc:iu(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){const n=e.exp.loc;n.end.offset<e.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),t.value={type:2,content:e.exp.content,loc:n}}return t}function ou(e,t=!1,n,i=0,r=0){return Bc(e,t,n,i)}function au(e,t,n){Rh.onError(oh(e,iu(t,t)))}function lu(e,t){if(zh.reset(),Ih=null,Dh=null,Nh="",Oh=-1,Uh=-1,Bh.length=0,Lh=e,Rh=c({},Ch),t){let e;for(e in t)null!=t[e]&&(Rh[e]=t[e])}zh.mode="html"===Rh.parseMode?1:"sfc"===Rh.parseMode?2:0,zh.inXML=1===Rh.ns||2===Rh.ns;const n=null==t?void 0:t.delimiters;n&&(zh.delimiterOpen=Qc(n[0]),zh.delimiterClose=Qc(n[1]));const i=Ph=function(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:Oc}}([],e);return zh.parse(Lh),i.loc=iu(0,e.length),i.children=Jh(i.children),Ph=null,i}function cu(e,t){uu(e,t,hu(e,e.children[0]))}function hu(e,t){const{children:n}=e;return 1===n.length&&1===t.type&&!bh(t)}function uu(e,t,n=!1){const{children:i}=e,r=i.length;let s=0;for(let e=0;e<i.length;e++){const r=i[e];if(1===r.type&&0===r.tagType){const e=n?0:du(r,t);if(e>0){if(e>=2){r.codegenNode.patchFlag="-1",r.codegenNode=t.hoist(r.codegenNode),s++;continue}}else{const e=r.codegenNode;if(13===e.type){const n=vu(e);if((!n||512===n||1===n)&&mu(r,t)>=2){const n=gu(r);n&&(e.props=t.hoist(n))}e.dynamicProps&&(e.dynamicProps=t.hoist(e.dynamicProps))}}}if(1===r.type){const e=1===r.tagType;e&&t.scopes.vSlot++,uu(r,t),e&&t.scopes.vSlot--}else if(11===r.type)uu(r,t,1===r.children.length);else if(9===r.type)for(let e=0;e<r.branches.length;e++)uu(r.branches[e],t,1===r.branches[e].children.length)}if(s&&t.transformHoist&&t.transformHoist(i,t,e),s&&s===r&&1===e.type&&0===e.tagType&&e.codegenNode&&13===e.codegenNode.type&&p(e.codegenNode.children)){const n=t.hoist(kc(e.codegenNode.children));t.hmr&&(n.content=`[...${n.content}]`),e.codegenNode.children=n}}function du(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;const i=n.get(e);if(void 0!==i)return i;const r=e.codegenNode;if(13!==r.type)return 0;if(r.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag)return 0;if(vu(r))return n.set(e,0),0;{let i=3;const s=mu(e,t);if(0===s)return n.set(e,0),0;s<i&&(i=s);for(let r=0;r<e.children.length;r++){const s=du(e.children[r],t);if(0===s)return n.set(e,0),0;s<i&&(i=s)}if(i>1)for(let r=0;r<e.props.length;r++){const s=e.props[r];if(7===s.type&&"bind"===s.name&&s.exp){const r=du(s.exp,t);if(0===r)return n.set(e,0),0;r<i&&(i=r)}}if(r.isBlock){for(let t=0;t<e.props.length;t++){if(7===e.props[t].type)return n.set(e,0),0}t.removeHelper(ec),t.removeHelper(qc(t.inSSR,r.isComponent)),r.isBlock=!1,t.helper(jc(t.inSSR,r.isComponent))}return n.set(e,i),i}case 2:case 3:return 3;case 9:case 11:case 10:default:return 0;case 5:case 12:return du(e.content,t);case 4:return e.constType;case 8:let s=3;for(let n=0;n<e.children.length;n++){const i=e.children[n];if(_(i)||y(i))continue;const r=du(i,t);if(0===r)return 0;r<s&&(s=r)}return s}}const pu=new Set([_c,yc,xc,bc]);function fu(e,t){if(14===e.type&&!_(e.callee)&&pu.has(e.callee)){const n=e.arguments[0];if(4===n.type)return du(n,t);if(14===n.type)return fu(n,t)}return 0}function mu(e,t){let n=3;const i=gu(e);if(i&&15===i.type){const{properties:e}=i;for(let i=0;i<e.length;i++){const{key:r,value:s}=e[i],o=du(r,t);if(0===o)return o;let a;if(o<n&&(n=o),a=4===s.type?du(s,t):14===s.type?fu(s,t):0,0===a)return a;a<n&&(n=a)}}return n}function gu(e){const t=e.codegenNode;if(13===t.type)return t.props}function vu(e){const t=e.patchFlag;return t?parseInt(t,10):void 0}function _u(e,{filename:t="",prefixIdentifiers:n=!1,hoistStatic:r=!1,hmr:o=!1,cacheHandlers:a=!1,nodeTransforms:l=[],directiveTransforms:c={}
15,transformHoist:h=null,isBuiltInComponent:u=s,isCustomElement:d=s,expressionPlugins:p=[],scopeId:f=null,slotted:m=!0,ssr:g=!1,inSSR:v=!1,ssrCssVars:y="",bindingMetadata:x=i,inline:b=!1,isTS:w=!1,onError:S=rh,onWarn:E=sh,compatConfig:M}){const T=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),A={filename:t,selfName:T&&D(P(T[1])),prefixIdentifiers:n,hoistStatic:r,hmr:o,cacheHandlers:a,nodeTransforms:l,directiveTransforms:c,transformHoist:h,isBuiltInComponent:u,isCustomElement:d,expressionPlugins:p,scopeId:f,slotted:m,ssr:g,inSSR:v,ssrCssVars:y,bindingMetadata:x,inline:b,isTS:w,onError:S,onWarn:E,compatConfig:M,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],constantCache:new WeakMap,temps:0,cached:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){const t=A.helpers.get(e)||0;return A.helpers.set(e,t+1),e},removeHelper(e){const t=A.helpers.get(e);if(t){const n=t-1;n?A.helpers.set(e,n):A.helpers.delete(e)}},helperString(e){return`_${Nc[A.helper(e)]}`},replaceNode(e){A.parent.children[A.childIndex]=A.currentNode=e},removeNode(e){const t=A.parent.children,n=e?t.indexOf(e):A.currentNode?A.childIndex:-1;e&&e!==A.currentNode?A.childIndex>n&&(A.childIndex--,A.onNodeRemoved()):(A.currentNode=null,A.onNodeRemoved()),A.parent.children.splice(n,1)},onNodeRemoved:s,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){_(e)&&(e=Bc(e)),A.hoists.push(e);const t=Bc(`_hoisted_${A.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1){return function(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:Oc}}(A.cached++,e,t)}};return A.filters=new Set,A}function yu(e,t){const n=_u(e,t);xu(e,n),t.hoistStatic&&cu(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:i}=e;if(1===i.length){const n=i[0];if(hu(e,n)&&n.codegenNode){const i=n.codegenNode;13===i.type&&Xc(i,t),e.codegenNode=i}else e.codegenNode=n}else if(i.length>1){let i=64;0,e.codegenNode=Uc(t,n(Yl),void 0,e.children,i+"",void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function xu(e,t){t.currentNode=e;const{nodeTransforms:n}=t,i=[];for(let r=0;r<n.length;r++){const s=n[r](e,t);if(s&&(p(s)?i.push(...s):i.push(s)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.ssr||t.helper(sc);break;case 5:t.ssr||t.helper(gc);break;case 9:for(let n=0;n<e.branches.length;n++)xu(e.branches[n],t);break;case 10:case 11:case 1:case 0:!function(e,t){let n=0;const i=()=>{n--};for(;n<e.children.length;n++){const r=e.children[n];_(r)||(t.parent=e,t.childIndex=n,t.onNodeRemoved=i,xu(r,t))}}(e,t)}t.currentNode=e;let r=i.length;for(;r--;)i[r]()}function bu(e,t){const n=_(e)?t=>t===e:t=>e.test(t);return(e,i)=>{if(1===e.type){const{props:r}=e;if(3===e.tagType&&r.some(yh))return;const s=[];for(let o=0;o<r.length;o++){const a=r[o];if(7===a.type&&n(a.name)){r.splice(o,1),o--;const n=t(e,a,i);n&&s.push(n)}}return s}}}const wu="/*#__PURE__*/",Su=e=>`${Nc[e]}: _${Nc[e]}`;function Eu(e,t={}){const n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:i=!1,filename:r="template.vue.html",scopeId:s=null,optimizeImports:o=!1,runtimeGlobalName:a="Vue",runtimeModuleName:l="vue",ssrRuntimeModuleName:c="vue/server-renderer",ssr:h=!1,isTS:u=!1,inSSR:d=!1}){const p={mode:t,prefixIdentifiers:n,sourceMap:i,filename:r,scopeId:s,optimizeImports:o,runtimeGlobalName:a,runtimeModuleName:l,ssrRuntimeModuleName:c,ssr:h,isTS:u,inSSR:d,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(e){return`_${Nc[e]}`},push(e,t=-2,n){p.code+=e},indent(){f(++p.indentLevel)},deindent(e=!1){e?--p.indentLevel:f(--p.indentLevel)},newline(){f(p.indentLevel)}};function f(e){p.push("\n"+" ".repeat(e),0)}return p}(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:i,push:r,prefixIdentifiers:s,indent:o,deindent:a,newline:l,scopeId:c,ssr:h}=n,u=Array.from(e.helpers),d=u.length>0,p=!s&&"module"!==i;!function(e,t){const{ssr:n,prefixIdentifiers:i,push:r,newline:s,runtimeModuleName:o,runtimeGlobalName:a,ssrRuntimeModuleName:l}=t,c=a,h=Array.from(e.helpers);if(h.length>0&&(r(`const _Vue = ${c}\n`,-1),e.hoists.length)){r(`const { ${[ic,rc,sc,oc,ac].filter((e=>h.includes(e))).map(Su).join(", ")} } = _Vue\n`,-1)}(function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:i,helper:r,scopeId:s,mode:o}=t;i();for(let r=0;r<e.length;r++){const s=e[r];
15s&&(n(`const _hoisted_${r+1} = `),Cu(s,t),i())}t.pure=!1})(e.hoists,t),s(),r("return ")}(e,n);if(r(`function ${h?"ssrRender":"render"}(${(h?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ")}) {`),o(),p&&(r("with (_ctx) {"),o(),d&&(r(`const { ${u.map(Su).join(", ")} } = _Vue\n`,-1),l())),e.components.length&&(Mu(e.components,"component",n),(e.directives.length||e.temps>0)&&l()),e.directives.length&&(Mu(e.directives,"directive",n),e.temps>0&&l()),e.filters&&e.filters.length&&(l(),Mu(e.filters,"filter",n),l()),e.temps>0){r("let ");for(let t=0;t<e.temps;t++)r(`${t>0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(r("\n",0),l()),h||r("return "),e.codegenNode?Cu(e.codegenNode,n):r("null"),p&&(a(),r("}")),a(),r("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function Mu(e,t,{helper:n,push:i,newline:r,isTS:s}){const o=n("filter"===t?uc:"component"===t?lc:hc);for(let n=0;n<e.length;n++){let a=e[n];const l=a.endsWith("__self");l&&(a=a.slice(0,-6)),i(`const ${Th(a,t)} = ${o}(${JSON.stringify(a)}${l?", true":""})${s?"!":""}`),n<e.length-1&&r()}}function Tu(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),Au(e,t,n),n&&t.deindent(),t.push("]")}function Au(e,t,n=!1,i=!0){const{push:r,newline:s}=t;for(let o=0;o<e.length;o++){const a=e[o];_(a)?r(a,-3):p(a)?Tu(a,t):Cu(a,t),o<e.length-1&&(n?(i&&r(","),s()):i&&r(", "))}}function Cu(e,t){if(_(e))t.push(e,-3);else if(y(e))t.push(t.helper(e));else switch(e.type){case 1:case 9:case 11:case 12:Cu(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),-3,e)}(e,t);break;case 4:Ru(e,t);break;case 5:!function(e,t){const{push:n,helper:i,pure:r}=t;r&&n(wu);n(`${i(gc)}(`),Cu(e.content,t),n(")")}(e,t);break;case 8:Pu(e,t);break;case 3:!function(e,t){const{push:n,helper:i,pure:r}=t;r&&n(wu);n(`${i(sc)}(${JSON.stringify(e.content)})`,-3,e)}(e,t);break;case 13:!function(e,t){const{push:n,helper:i,pure:r}=t,{tag:s,props:o,children:a,patchFlag:l,dynamicProps:c,directives:h,isBlock:u,disableTracking:d,isComponent:p}=e;h&&n(i(dc)+"(");u&&n(`(${i(ec)}(${d?"true":""}), `);r&&n(wu);const f=u?qc(t.inSSR,p):jc(t.inSSR,p);n(i(f)+"(",-2,e),Au(function(e){let t=e.length;for(;t--&&null==e[t];);return e.slice(0,t+1).map((e=>e||"null"))}([s,o,a,l,c]),t),n(")"),u&&n(")");h&&(n(", "),Cu(h,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:i,pure:r}=t,s=_(e.callee)?e.callee:i(e.callee);r&&n(wu);n(s+"(",-2,e),Au(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:i,deindent:r,newline:s}=t,{properties:o}=e;if(!o.length)return void n("{}",-2,e);const a=o.length>1||!1;n(a?"{":"{ "),a&&i();for(let e=0;e<o.length;e++){const{key:i,value:r}=o[e];Lu(i,t),n(": "),Cu(r,t),e<o.length-1&&(n(","),s())}a&&r(),n(a?"}":" }")}(e,t);break;case 17:!function(e,t){Tu(e.elements,t)}(e,t);break;case 18:!function(e,t){const{push:n,indent:i,deindent:r}=t,{params:s,returns:o,body:a,newline:l,isSlot:c}=e;c&&n(`_${Nc[Rc]}(`);n("(",-2,e),p(s)?Au(s,t):s&&Cu(s,t);n(") => "),(l||a)&&(n("{"),i());o?(l&&n("return "),p(o)?Tu(o,t):Cu(o,t)):a&&Cu(a,t);(l||a)&&(r(),n("}"));c&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}(e,t);break;case 19:!function(e,t){const{test:n,consequent:i,alternate:r,newline:s}=e,{push:o,indent:a,deindent:l,newline:c}=t;if(4===n.type){const e=!hh(n.content);e&&o("("),Ru(n,t),e&&o(")")}else o("("),Cu(n,t),o(")");s&&a(),t.indentLevel++,s||o(" "),o("? "),Cu(i,t),t.indentLevel--,s&&c(),s||o(" "),o(": ");const h=19===r.type;h||t.indentLevel++;Cu(r,t),h||t.indentLevel--;s&&l(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:i,indent:r,deindent:s,newline:o}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(r(),n(`${i(Tc)}(-1),`),o());n(`_cache[${e.index}] = `),Cu(e.value,t),e.isVNode&&(n(","),o(),n(`${i(Tc)}(1),`),o(),n(`_cache[${e.index}]`),s());n(")")}(e,t);break;case 21:Au(e.body,t,!0,!1)}}function Ru(e,t){const{content:n,isStatic:i}=e;t.push(i?JSON.stringify(n):n,-3,e)}function Pu(e,t){for(let n=0;n<e.children.length;n++){const i=e.children[n];_(i)?t.push(i,-3):Cu(i,t)}}function Lu(e,t){const{push:n}=t;if(8===e.type)n("["),Pu(e,t),n("]");else if(e.isStatic){n(hh(e.content)?e.content:JSON.stringify(e.content),-2,e)}else n(`[${e.content}]`,-3,e)}new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");const Iu=bu(/^(if|else|else-if)$/,((e,t,n)=>function(e,t,n,i){if(!("else"===t.name||t.exp&&t.exp.content.trim())){const i=t.exp?t.exp.loc:e.loc;n.onError(oh(28,t.loc)),t.exp=Bc("true",!1,i)}0;if("if"===t.name){const r=Du(e,t),s={type:9,loc:e.loc,branches:[r]};if(n.replaceNode(s),i)return i(s,r,!0)}else{const r=n.parent.children;let s=r.indexOf(e);for(;s-- >=-1;){const o=r[s];if(o&&3===o.type)n.removeNode(o);else{if(!o||2!==o.type||o.content.trim().length){if(o&&9===o.type){"else-if"===t.name&&void 0===o.branches[o.branches.length-1].condition&&n.onError(oh(30,e.loc)),n.removeNode();const r=Du(e,t);0,o.branches.push(r);const s=i&&i(o,r,!1);xu(r,n),s&&s(),n.currentNode=null}else n.onError(oh(30,e.loc));break}n.removeNode(o)}}}}(e,t,n,((e,t,i)=>{const r=n.parent.children;let s=r.indexOf(e),o=0;for(;s-- >=0;){const e=r[s];e&&9===e.type&&(o+=e.branches.length)}return()=>{if(i)e.codegenNode=Nu(t,o,n);else{const i=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);i.alternate=Nu(t,o+e.branches.length-1,n)}}}))));function Du(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!mh(e,"for")?e.children:[e],userKey:gh(e,"key"),isTemplateIf:n}}function Nu(e,t,n){return e.condition?Wc(e.condition,Ou(e,t,n),Hc(n.helper(sc),['""',"true"])):Ou(e,t,n)}function Ou(e,t,n){const{helper:i}=n,r=Vc("key",Bc(`${t}`,!1,Oc,2)),{children:s}=e,o=s[0];if(1!==s.length||1!==o.type){if(1===s.length&&11===o.type){const e=o.codegenNode;return Eh(e,r,n),e}{let t=64;
15return Uc(n,i(Yl),Fc([r]),s,t+"",void 0,void 0,!0,!1,!1,e.loc)}}{const e=o.codegenNode,t=14===(a=e).type&&a.callee===Ic?a.arguments[1].returns:a;return 13===t.type&&Xc(t,n),Eh(t,r,n),e}var a}const Uu=bu("for",((e,t,n)=>{const{helper:i,removeHelper:r}=n;return function(e,t,n,i){if(!t.exp)return void n.onError(oh(31,t.loc));const r=t.forParseResult;if(!r)return void n.onError(oh(32,t.loc));ku(r,n);const{addIdentifiers:s,removeIdentifiers:o,scopes:a}=n,{source:l,value:c,key:h,index:u}=r,d={type:11,loc:t.loc,source:l,valueAlias:c,keyAlias:h,objectIndexAlias:u,parseResult:r,children:xh(e)?e.children:[e]};n.replaceNode(d),a.vFor++;const p=i&&i(d);return()=>{a.vFor--,p&&p()}}(e,t,n,(t=>{const s=Hc(i(pc),[t.source]),o=xh(e),a=mh(e,"memo"),l=gh(e,"key"),c=l&&(6===l.type?Bc(l.value.content,!0):l.exp),h=l?Vc("key",c):null,u=4===t.source.type&&t.source.constType>0,d=u?64:l?128:256;return t.codegenNode=Uc(n,i(Yl),void 0,s,d+"",void 0,void 0,!0,!u,!1,e.loc),()=>{let l;const{children:d}=t;const p=1!==d.length||1!==d[0].type,f=bh(e)?e:o&&1===e.children.length&&bh(e.children[0])?e.children[0]:null;if(f?(l=f.codegenNode,o&&h&&Eh(l,h,n)):p?l=Uc(n,i(Yl),h?Fc([h]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(l=d[0].codegenNode,o&&h&&Eh(l,h,n),l.isBlock!==!u&&(l.isBlock?(r(ec),r(qc(n.inSSR,l.isComponent))):r(jc(n.inSSR,l.isComponent))),l.isBlock=!u,l.isBlock?(i(ec),i(qc(n.inSSR,l.isComponent))):i(jc(n.inSSR,l.isComponent))),a){const e=Gc(Fu(t.parseResult,[Bc("_cached")]));e.body={type:21,body:[zc(["const _memo = (",a.exp,")"]),zc(["if (_cached",...c?[" && _cached.key === ",c]:[],` && ${n.helperString(Dc)}(_cached, _memo)) return _cached`]),zc(["const _item = ",l]),Bc("_item.memo = _memo"),Bc("return _item")],loc:Oc},s.arguments.push(e,Bc("_cache"),Bc(String(n.cached++)))}else s.arguments.push(Gc(Fu(t.parseResult),l,!0))}}))}));function ku(e,t){e.finalized||(e.finalized=!0)}function Fu({value:e,key:t,index:n},i=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||Bc("_".repeat(t+1),!1)))}([e,t,n,...i])}const Vu=Bc("undefined",!1),Bu=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=mh(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},zu=(e,t,n,i)=>Gc(e,n,!1,!0,n.length?n[0].loc:i);function Hu(e,t,n=zu){t.helper(Rc);const{children:i,loc:r}=e,s=[],o=[];let a=t.scopes.vSlot>0||t.scopes.vFor>0;const l=mh(e,"slot",!0);if(l){const{arg:e,exp:t}=l;e&&!ah(e)&&(a=!0),s.push(Vc(e||Bc("default",!0),n(t,void 0,i,r)))}let c=!1,h=!1;const u=[],d=new Set;let p=0;for(let e=0;e<i.length;e++){const r=i[e];let f;if(!xh(r)||!(f=mh(r,"slot",!0))){3!==r.type&&u.push(r);continue}if(l){t.onError(oh(37,f.loc));break}c=!0;const{children:m,loc:g}=r,{arg:v=Bc("default",!0),exp:_,loc:y}=f;let x;ah(v)?x=v?v.content:"default":a=!0;const b=mh(r,"for"),w=n(_,b,m,g);let S,E;if(S=mh(r,"if"))a=!0,o.push(Wc(S.exp,Gu(v,w,p++),Vu));else if(E=mh(r,/^else(-if)?$/,!0)){let n,r=e;for(;r--&&(n=i[r],3===n.type););if(n&&xh(n)&&mh(n,"if")){i.splice(e,1),e--;let t=o[o.length-1];for(;19===t.alternate.type;)t=t.alternate;t.alternate=E.exp?Wc(E.exp,Gu(v,w,p++),Vu):Gu(v,w,p++)}else t.onError(oh(30,E.loc))}else if(b){a=!0;const e=b.forParseResult;e?(ku(e),o.push(Hc(t.helper(pc),[e.source,Gc(Fu(e),Gu(v,w),!0)]))):t.onError(oh(32,b.loc))}else{if(x){if(d.has(x)){t.onError(oh(38,y));continue}d.add(x),"default"===x&&(h=!0)}s.push(Vc(v,w))}}if(!l){const e=(e,i)=>{const s=n(e,void 0,i,r);return t.compatConfig&&(s.isNonScopedSlot=!0),Vc("default",s)};c?u.length&&u.some((e=>ju(e)))&&(h?t.onError(oh(39,u[0].loc)):s.push(e(void 0,u))):s.push(e(void 0,i))}const f=a?2:Wu(e.children)?3:1;let m=Fc(s.concat(Vc("_",Bc(f+"",!1))),r);return o.length&&(m=Hc(t.helper(mc),[m,kc(o)])),{slots:m,hasDynamicSlots:a}}function Gu(e,t,n){const i=[Vc("name",e),Vc("fn",t)];return null!=n&&i.push(Vc("key",Bc(String(n),!0))),Fc(i)}function Wu(e){for(let t=0;t<e.length;t++){const n=e[t];switch(n.type){case 1:if(2===n.tagType||Wu(n.children))return!0;break;case 9:if(Wu(n.branches))return!0;break;case 10:case 11:if(Wu(n.children))return!0}}return!1}function ju(e){return 2!==e.type&&12!==e.type||(2===e.type?!!e.content.trim():ju(e.content))}const qu=new WeakMap,Xu=(e,t)=>function(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:i}=e,r=1===e.tagType;let s=r?function(e,t,n=!1){let{tag:i}=e;const r=Ku(i),s=gh(e,"is",!1,!0);if(s)if(r||nh("COMPILER_IS_ON_ELEMENT",t)){let e;
15if(6===s.type?e=s.value&&Bc(s.value.content,!0):(e=s.exp,e||(e=Bc("is",!1,s.loc))),e)return Hc(t.helper(cc),[e])}else 6===s.type&&s.value.content.startsWith("vue:")&&(i=s.value.content.slice(4));const o=lh(i)||t.isBuiltInComponent(i);if(o)return n||t.helper(o),o;return t.helper(lc),t.components.add(i),Th(i,"component")}(e,t):`"${n}"`;const o=x(s)&&s.callee===cc;let a,l,c,h,u,d,p=0,f=o||s===Zl||s===Kl||!r&&("svg"===n||"foreignObject"===n);if(i.length>0){const n=$u(e,t,void 0,r,o);a=n.props,p=n.patchFlag,u=n.dynamicPropNames;const i=n.directives;d=i&&i.length?kc(i.map((e=>function(e,t){const n=[],i=qu.get(e);i?n.push(t.helperString(i)):(t.helper(hc),t.directives.add(e.name),n.push(Th(e.name,"directive")));const{loc:r}=e;e.exp&&n.push(e.exp);e.arg&&(e.exp||n.push("void 0"),n.push(e.arg));if(Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=Bc("true",!1,r);n.push(Fc(e.modifiers.map((e=>Vc(e,t))),r))}return kc(n,e.loc)}(e,t)))):void 0,n.shouldUseBlock&&(f=!0)}if(e.children.length>0){s===Jl&&(f=!0,p|=1024);if(r&&s!==Zl&&s!==Jl){const{slots:n,hasDynamicSlots:i}=Hu(e,t);l=n,i&&(p|=1024)}else if(1===e.children.length&&s!==Zl){const n=e.children[0],i=n.type,r=5===i||8===i;r&&0===du(n,t)&&(p|=1),l=r||2===i?n:e.children}else l=e.children}0!==p&&(c=String(p),u&&u.length&&(h=function(e){let t="[";for(let n=0,i=e.length;n<i;n++)t+=JSON.stringify(e[n]),n<i-1&&(t+=", ");return t+"]"}(u))),e.codegenNode=Uc(t,s,a,l,c,h,d,!!f,!1,r,e.loc)};function $u(e,t,n=e.props,i,r,s=!1){const{tag:o,loc:l,children:c}=e;let h=[];const u=[],d=[],p=c.length>0;let f=!1,m=0,g=!1,v=!1,_=!1,x=!1,b=!1,w=!1;const S=[],E=e=>{h.length&&(u.push(Fc(Yu(h),l)),h=[]),e&&u.push(e)},M=({key:e,value:n})=>{if(ah(e)){const s=e.content,o=a(s);
15if(!o||i&&!r||"onclick"===s.toLowerCase()||"onUpdate:modelValue"===s||T(s)||(x=!0),o&&T(s)&&(w=!0),o&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&du(n,t)>0)return;"ref"===s?g=!0:"class"===s?v=!0:"style"===s?_=!0:"key"===s||S.includes(s)||S.push(s),!i||"class"!==s&&"style"!==s||S.includes(s)||S.push(s)}else b=!0};for(let r=0;r<n.length;r++){const a=n[r];if(6===a.type){const{loc:e,name:n,nameLoc:i,value:r}=a;let s=!0;if("ref"===n&&(g=!0,t.scopes.vFor>0&&h.push(Vc(Bc("ref_for",!0),Bc("true")))),"is"===n&&(Ku(o)||r&&r.content.startsWith("vue:")||nh("COMPILER_IS_ON_ELEMENT",t)))continue;h.push(Vc(Bc(n,!0,i),Bc(r?r.content:"",s,r?r.loc:e)))}else{const{name:n,arg:r,exp:c,loc:g,modifiers:v}=a,_="bind"===n,x="on"===n;if("slot"===n){i||t.onError(oh(40,g));continue}if("once"===n||"memo"===n)continue;if("is"===n||_&&vh(r,"is")&&(Ku(o)||nh("COMPILER_IS_ON_ELEMENT",t)))continue;if(x&&s)continue;if((_&&vh(r,"key")||x&&p&&vh(r,"vue:before-update"))&&(f=!0),_&&vh(r,"ref")&&t.scopes.vFor>0&&h.push(Vc(Bc("ref_for",!0),Bc("true"))),!r&&(_||x)){if
15(b=!0,c)if(_){if(E(),nh("COMPILER_V_BIND_OBJECT_ORDER",t)){u.unshift(c);continue}u.push(c)}else E({type:14,loc:g,callee:t.helper(wc),arguments:i?[c]:[c,"true"]});else t.onError(oh(_?34:35,g));continue}_&&v.includes("prop")&&(m|=32);const w=t.directiveTransforms[n];if(w){const{props:n,needRuntime:i}=w(a,e,t);!s&&n.forEach(M),x&&r&&!ah(r)?E(Fc(n,l)):h.push(...n),i&&(d.push(a),y(i)&&qu.set(a,i))}else A(n)||(d.push(a),p&&(f=!0))}}let C;if(u.length?(E(),C=u.length>1?Hc(t.helper(vc),u,l):u[0]):h.length&&(C=Fc(Yu(h),l)),b?m|=16:(v&&!i&&(m|=2),_&&!i&&(m|=4),S.length&&(m|=8),x&&(m|=32)),f||0!==m&&32!==m||!(g||w||d.length>0)||(m|=512),!t.inSSR&&C)switch(C.type){case 15:let e=-1,n=-1,i=!1;for(let t=0;t<C.properties.length;t++){const r=C.properties[t].key;ah(r)?"class"===r.content?e=t:"style"===r.content&&(n=t):r.isHandlerKey||(i=!0)}const r=C.properties[e],s=C.properties[n];i?C=Hc(t.helper(xc),[C]):(r&&!ah(r.value)&&(r.value=Hc(t.helper(_c),[r.value])),s&&(_||4===s.value.type&&"["===s.value.content.trim()[0]||17===s.value.type)&&(s.value=Hc(t.helper(yc),[s.value])));break;case 14:break;default:C=Hc(t.helper(xc),[Hc(t.helper(bc),[C])])}return{props:C,directives:d,patchFlag:m,dynamicPropNames:S,shouldUseBlock:f}}function Yu(e){const t=new Map,n=[];for(let i=0;i<e.length;i++){const r=e[i];if(8===r.key.type||!r.key.isStatic){n.push(r);continue}const s=r.key.content,o=t.get(s);o?("style"===s||"class"===s||a(s))&&Zu(o,r):(t.set(s,r),n.push(r))}return n}function Zu(e,t){17===e.value.type?e.value.elements.push(t.value):e.value=kc([e.value,t.value],e.loc)}function Ku(e){return"component"===e||"Component"===e}const Ju=(e,t)=>{if(bh(e)){const{children:n,loc:i}=e,{slotName:r,slotProps:s}=function(e,t){let n,i='"default"';const r=[];for(let t=0;t<e.props.length;t++){const n=e.props[t];if(6===n.type)n.value&&("name"===n.name?i=JSON.stringify(n.value.content):(n.name=P(n.name),r.push(n)));else if("bind"===n.name&&vh(n.arg,"name")){if(n.exp)i=n.exp;else if(n.arg&&4===n.arg.type){const e=P(n.arg.content);i=n.exp=Bc(e,!1,n.arg.loc)}}else"bind"===n.name&&n.arg&&ah(n.arg)&&(n.arg.content=P(n.arg.content)),r.push(n)}if(r.length>0){const{props:i,directives:s}=$u(e,t,r,!1,!1);n=i,s.length&&t.onError(oh(36,s[0].loc))}return{slotName:i,slotProps:n}}(e,t),o=[t.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let a=2;s&&(o[2]=s,a=3),n.length&&(o[3]=Gc([],n,!1,!1,i),a=4),t.scopeId&&!t.slotted&&(a=5),o.splice(a),e.codegenNode=Hc(t.helper(fc),o,i)}};const Qu=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,ed=(e,t,n,i)=>{const{loc:r,modifiers:s,arg:o}=e;let a;if(e.exp||s.length||n.onError(oh(35,r)),4===o.type)if(o.isStatic){let e=o.content;0,e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`);a=Bc(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?N(P(e)):`on:${e}`,!0,o.loc)}else a=zc([`${n.helperString(Mc)}(`,o,")"]);else a=o,a.children.unshift(`${n.helperString(Mc)}(`),a.children.push(")");let l=e.exp;l&&!l.content.trim()&&(l=void 0);let c=n.cacheHandlers&&!l&&!n.inVOnce;if(l){const e=fh(l.content),t=!(e||Qu.test(l.content)),n=l.content.includes(";");0,(t||c&&e)&&(l=zc([`${t?"$event":"(...args)"} => ${n?"{":"("}`,l,n?"}":")"]))}let h={props:[Vc(a,l||Bc("() => {}",!1,r))]};return i&&(h=i(h)),c&&(h.props[0].value=n.cache(h.props[0].value)),h.props.forEach((e=>e.key.isHandlerKey=!0)),h},td=(e,t,n)=>{const{modifiers:i,loc:r}=e,s=e.arg;let{exp:o}=e;if(o&&4===o.type&&!o.content.trim()&&(o=void 0),!o){if(4!==s.type||!s.isStatic)return n.onError(oh(52,s.loc)),{props:[Vc(s,Bc("",!0,r))]};const t=P(s.content);o=e.exp=Bc(t,!1,s.loc)}return 4!==s.type?(s.children.unshift("("),s.children.push(') || ""')):s.isStatic||(s.content=`${s.content} || ""`),i.includes("camel")&&(4===s.type?s.isStatic?s.content=P(s.content):s.content=`${n.helperString(Sc)}(${s.content})`:(s.children.unshift(`${n.helperString(Sc)}(`),s.children.push(")"))),n.inSSR||(i.includes("prop")&&nd(s,"."),i.includes("attr")&&nd(s,"^")),{props:[Vc(s,o)]}},nd=(e,t)=>{4===e.type?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},id=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let i,r=!1;for(let e=0;e<n.length;e++){const t=n[e];if(_h(t)){r=!0;for(let r=e+1;r<n.length;r++){const s=n[r];if(!_h(s)){i=void 0;break}i||(i=n[e]=zc([t],t.loc)),i.children.push(" + ",s),n.splice(r,1),r--}}}if(r&&(1!==n.length||0!==e.type&&(1!==e.type||0!==e.tagType||e.props.find((e=>7===e.type&&!t.directiveTransforms[e.name]))||"template"===e.tag)))for(let e=0;e<n.length;e++){const i=n[e];
15if(_h(i)||8===i.type){const r=[];2===i.type&&" "===i.content||r.push(i),t.ssr||0!==du(i,t)||r.push("1"),n[e]={type:12,content:i,loc:i.loc,codegenNode:Hc(t.helper(oc),r)}}}}},rd=new WeakSet,sd=(e,t)=>{if(1===e.type&&mh(e,"once",!0)){if(rd.has(e)||t.inVOnce||t.inSSR)return;return rd.add(e),t.inVOnce=!0,t.helper(Tc),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},od=(e,t,n)=>{const{exp:i,arg:r}=e;if(!i)return n.onError(oh(41,e.loc)),ad();const s=i.loc.source,o=4===i.type?i.content:s,a=n.bindingMetadata[s];if("props"===a||"props-aliased"===a)return n.onError(oh(44,i.loc)),ad();if(!o.trim()||!fh(o))return n.onError(oh(42,i.loc)),ad();const l=r||Bc("modelValue",!0),c=r?ah(r)?`onUpdate:${P(r.content)}`:zc(['"onUpdate:" + ',r]):"onUpdate:modelValue";let h;h=zc([`${n.isTS?"($event: any)":"$event"} => ((`,i,") = $event)"]);const u=[Vc(l,e.exp),Vc(c,h)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>(hh(e)?e:JSON.stringify(e))+": true")).join(", "),n=r?ah(r)?`${r.content}Modifiers`:zc([r,' + "Modifiers"']):"modelModifiers";u.push(Vc(n,Bc(`{ ${t} }`,!1,e.loc,2)))}return ad(u)};function ad(e=[]){return{props:e}}const ld=/[\w).+\-_$\]]/,cd=(e,t)=>{nh("COMPILER_FILTERS",t)&&(5===e.type&&hd(e.content,t),1===e.type&&e.props.forEach((e=>{7===e.type&&"for"!==e.name&&e.exp&&hd(e.exp,t)})))};function hd(e,t){if(4===e.type)ud(e,t);else for(let n=0;n<e.children.length;n++){const i=e.children[n];"object"==typeof i&&(4===i.type?ud(i,t):8===i.type?hd(e,t):5===i.type&&hd(i.content,t))}}function ud(e,t){const n=e.content;let i,r,s,o,a=!1,l=!1,c=!1,h=!1,u=0,d=0,p=0,f=0,m=[];for(s=0;s<n.length;s++)if(r=i,i=n.charCodeAt(s),a)39===i&&92!==r&&(a=!1);else if(l)34===i&&92!==r&&(l=!1);else if(c)96===i&&92!==r&&(c=!1);else if(h)47===i&&92!==r&&(h=!1);else if(124!==i||124===n.charCodeAt(s+1)||124===n.charCodeAt(s-1)||u||d||p){switch(i){case 34:l=!0;break;case 39:a=!0;break;case 96:c=!0;break;case 40:p++;break;case 41:p--;break;case 91:d++;break;case 93:d--;break;case 123:u++;break;case 125:u--}if(47===i){let e,t=s-1;for(;t>=0&&(e=n.charAt(t)," "===e);t--);e&&ld.test(e)||(h=!0)}}else void 0===o?(f=s+1,o=n.slice(0,s).trim()):g();function g(){m.push(n.slice(f,s).trim()),f=s+1}if(void 0===o?o=n.slice(0,s).trim():0!==f&&g(),m.length){for(s=0;s<m.length;s++)o=dd(o,m[s],t);e.content=o}}function dd(e,t,n){n.helper(uc);const i=t.indexOf("(");if(i<0)return n.filters.add(t),`${Th(t,"filter")}(${e})`;{const r=t.slice(0,i),s=t.slice(i+1);return n.filters.add(r),`${Th(r,"filter")}(${e}${")"!==s?","+s:s}`}}const pd=new WeakSet,fd=(e,t)=>{if(1===e.type){const n=mh(e,"memo");if(!n||pd.has(e))return;return pd.add(e),()=>{const i=e.codegenNode||t.currentNode.codegenNode;i&&13===i.type&&(1!==e.tagType&&Xc(i,t),e.codegenNode=Hc(t.helper(Ic),[n.exp,Gc(void 0,i),"_cache",String(t.cached++)]))}}};function md(e,t={}){const n=t.onError||rh,i="module"===t.mode;!0===t.prefixIdentifiers?n(oh(47)):i&&n(oh(48));t.cacheHandlers&&n(oh(49)),t.scopeId&&!i&&n(oh(50));const r=c({},t,{prefixIdentifiers:!1}),s=_(e)?lu(e,r):e,[o,a]=[[sd,Iu,fd,Uu,cd,Ju,Xu,Bu,id],{on:ed,bind:td,model:od}];return yu(s,c({},r,{nodeTransforms:[...o,...t.nodeTransforms||[]],directiveTransforms:c({},a,t.directiveTransforms||{})})),Eu(s,r)}const gd=Symbol(""),vd=Symbol(""),_d=Symbol(""),yd=Symbol(""),xd=Symbol(""),bd=Symbol(""),wd=Symbol(""),Sd=Symbol(""),Ed=Symbol(""),Md=Symbol("");var Td;let Ad;Td={[gd]:"vModelRadio",[vd]:"vModelCheckbox",[_d]:"vModelText",[yd]:"vModelSelect",[xd]:"vModelDynamic",[bd]:"withModifiers",[wd]:"withKeys",[Sd]:"vShow",[Ed]:"Transition",[Md]:"TransitionGroup"},Object.getOwnPropertySymbols(Td).forEach((e=>{Nc[e]=Td[e]}));const Cd={parseMode:"html",isVoidTag:Q,isNativeTag:e=>Z(e)||K(e)||J(e),isPreTag:e=>"pre"===e,decodeEntities:function(e,t=!1){return Ad||(Ad=document.createElement("div")),t?(Ad.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,Ad.children[0].getAttribute("foo")):(Ad.innerHTML=e,Ad.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?Ed:"TransitionGroup"===e||"transition-group"===e?Md:void 0,getNamespace(e,t,n){let i=t?t.ns:n;if(t&&2===i)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some((e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content)))&&(i=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(i=0);else t&&1===i&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(i=0));if(0===i){if("svg"===e)return 1;if("math"===e)return 2}return i}},Rd=(e,t)=>{const n=X(e);return Bc(JSON.stringify(n),!1,t,3)};function Pd(e,t){return oh(e,t)}const Ld=t("passive,once,capture"),Id=t("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Dd=t("left,right"),Nd=t("onkeyup,onkeydown,onkeypress",!0),Od=(e,t)=>ah(e)&&"onclick"===e.content.toLowerCase()?Bc(t,!0):4!==e.type?zc(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e;const Ud=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||t.removeNode()},kd=[e=>{1===e.type&&e.props.forEach(((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:Bc("style",!0,t.loc),exp:Rd(t.value.content,t.loc),modifiers:[],loc:t.loc})}))}],Fd={cloak:()=>({props:[]}
15),html:(e,t,n)=>{const{exp:i,loc:r}=e;return i||n.onError(Pd(53,r)),t.children.length&&(n.onError(Pd(54,r)),t.children.length=0),{props:[Vc(Bc("innerHTML",!0,r),i||Bc("",!0))]}},text:(e,t,n)=>{const{exp:i,loc:r}=e;return i||n.onError(Pd(55,r)),t.children.length&&(n.onError(Pd(56,r)),t.children.length=0),{props:[Vc(Bc("textContent",!0),i?du(i,n)>0?i:Hc(n.helperString(gc),[i],r):Bc("",!0))]}},model:(e,t,n)=>{const i=od(e,t,n);if(!i.props.length||1===t.tagType)return i;e.arg&&n.onError(Pd(58,e.arg.loc));const{tag:r}=t,s=n.isCustomElement(r);if("input"===r||"textarea"===r||"select"===r||s){let o=_d,a=!1;if("input"===r||s){const i=gh(t,"type");if(i){if(7===i.type)o=xd;else if(i.value)switch(i.value.content){case"radio":o=gd;break;case"checkbox":o=vd;break;case"file":a=!0,n.onError(Pd(59,e.loc))}}else(function(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))})(t)&&(o=xd)}else"select"===r&&(o=yd);a||(i.needRuntime=n.helper(o))}else n.onError(Pd(57,e.loc));return i.props=i.props.filter((e=>!(4===e.key.type&&"modelValue"===e.key.content))),i},on:(e,t,n)=>ed(e,t,n,(t=>{const{modifiers:i}=e;if(!i.length)return t;let{key:r,value:s}=t.props[0];const{keyModifiers:o,nonKeyModifiers:a,eventOptionModifiers:l}=((e,t,n,i)=>{const r=[],s=[],o=[];for(let i=0;i<t.length;i++){const a=t[i];"native"===a&&ih("COMPILER_V_ON_NATIVE",n)||Ld(a)?o.push(a):Dd(a)?ah(e)?Nd(e.content)?r.push(a):s.push(a):(r.push(a),s.push(a)):Id(a)?s.push(a):r.push(a)}return{keyModifiers:r,nonKeyModifiers:s,eventOptionModifiers:o}})(r,i,n,e.loc);if(a.includes("right")&&(r=Od(r,"onContextmenu")),a.includes("middle")&&(r=Od(r,"onMouseup")),a.length&&(s=Hc(n.helper(bd),[s,JSON.stringify(a)])),!o.length||ah(r)&&!Nd(r.content)||(s=Hc(n.helper(wd),[s,JSON.stringify(o)])),l.length){const e=l.map(D).join("");r=ah(r)?Bc(`${r.content}${e}`,!0):zc(["(",r,`) + "${e}"`])}return{props:[Vc(r,s)]}})),show:(e,t,n)=>{const{exp:i,loc:r}=e;return i||n.onError(Pd(61,r)),{props:[],needRuntime:n.helper(Sd)}}};const Vd=new WeakMap;Ho((function(t,n){if(!_(t)){if(!t.nodeType)return s;t=t.innerHTML}const r=t,o=function(e){let t=Vd.get(null!=e?e:i);return t||(t=Object.create(null),Vd.set(null!=e?e:i,t)),t}(n),a=o[r];if(a)return a;if("#"===t[0]){const e=document.querySelector(t);0,t=e?e.innerHTML:""}const l=c({hoistStatic:!0,onError:void 0,onWarn:s},n);l.isCustomElement||"undefined"==typeof customElements||(l.isCustomElement=e=>!!customElements.get(e));const{code:h}=function(e,t={}){return md(e,c({},Cd,t,{nodeTransforms:[Ud,...kd,...t.nodeTransforms||[]],directiveTransforms:c({},Fd,t.directiveTransforms||{}),transformHoist:null}))}(t,l),u=new Function("Vue",h)(e);return u._rc=!0,o[r]=u}));const Bd=["href","target"],zd={key:0,class:"w-full bg-secondary text-center py-1"},Hd=["src","srcset","alt"],Gd={key:2,class:"h-60 w-full"},Wd={class:"text-h2"},jd={class:"bg-primary transform transition-transform duration-300 px-4 pt-4 ease-in-out group-hover:-translate-y-12 group-focus:-translate-y-12 group-hover:pt-2 group-focus:pt-2"},qd={key:0,class:"font-medium bg-primary-10 text-primary px-2 py-1 mb-2 inline-block group-hover:mt-2 group-focus:mt-2"},Xd={key:1,class:"text-h6"},$d={class:"ml-2"},Yd={key:2,class:"text-h6"},Zd={class:"ml-2"},Kd={key:3,class:"text-h6"},Jd={class:"italic line-clamp-2"},Qd=fo("div",{class:"absolute bottom-0 flex items-center px-4 py-4 transition-opacity duration-300 delay-75 opacity-0 group-hover:opacity-100 group-focus:opacity-100"},[fo("svg",{class:"fill-current h-7 w-7","aria-hidden":"true"},[fo("use",{href:"#icon-arrow-right"})])],-1);var ep=$i({props:{url:String,title:String,imageSrc:String,imageSrcset:String,imageAlt:String,eventCategory:Object,eventSeries:String,venue:Object,eventDate:Number,eventOpenTime:Object,eventStartTime:Object,showAllVenues:Boolean,hideEventDate:Boolean,useInIframe:String,eventHeaderOtherInfo:[Object,null]},data:()=>({}),computed:{eventWeekDay(){if(this.eventDate)return new Date(this.eventDate).toLocaleDateString("en-US",{weekday:"short"})},eventDay(){return this.eventDate?new Date(this.eventDate).getDate():""},eventMonth(){if(this.eventDate){return new Intl.DateTimeFormat("default",{month:"short"}).format(new Date(this.eventDate))}return""}},methods:{},mounted(){}}),tp=n(744);var np=(0,tp.Z)(ep,[["render",function(e,t,n,i,r,s){return eo(),oo("a",{href:e.url,target:"List"===e.useInIframe?"_blank":"_self",class:"bg-primary relative pb-4 group cursor-pointer block !no-underline h-full"}
15,[e.showAllVenues?(eo(),oo("div",zd,le(e.venue.title),1)):bo("v-if",!0),e.imageSrc?(eo(),oo("img",{key:1,class:"h-60 w-full object-cover",loading:"lazy",src:e.imageSrc,srcset:e.imageSrcset,sizes:"450px",alt:e.imageAlt?e.imageAlt:""},null,8,Hd)):(eo(),oo("div",Gd)),fo("div",{class:$([e.showAllVenues?"top-12":"top-4","absolute left-0 bg-secondary inline-block text-center px-3 py-1"])},[Ni(fo("div",{class:"text-h5 uppercase"},le(e.eventWeekDay),513),[[ka,e.eventWeekDay&&!e.hideEventDate]]),Ni(fo("div",{class:"text-h2"},le(e.eventDay),513),[[ka,e.eventDay&&!e.hideEventDate]]),Ni(fo("div",{class:"text-h5 uppercase"},le(e.eventMonth),513),[[ka,e.eventMonth&&!e.hideEventDate]]),Ni(fo("div",Wd,"TBC",512),[[ka,e.hideEventDate]])],2),e.eventCategory?(eo(),oo("div",{key:3,class:$([e.showAllVenues?"top-12":"top-4","font-medium absolute right-0 px-2 bg-secondary py-1"])},le(e.eventCategory.title),3)):bo("v-if",!0),fo("div",jd,[e.eventSeries?(eo(),oo("div",qd,le(e.eventSeries),1)):bo("v-if",!0),fo("h3",{class:$([e.eventSeries?"":"group-hover:pt-2 group-focus:pt-2","text-h4 mb-4 group-hover:underline group-focus:underline break-words"])},le(e.title),3),e.eventOpenTime&&e.eventOpenTime.text?(eo(),oo("div",Xd,[fo("span",null,le(e.eventOpenTime.time),1),fo("span",$d,le(e.eventOpenTime.text),1)])):bo("v-if",!0),e.eventStartTime&&e.eventStartTime.text?(eo(),oo("div",Yd,[fo("span",null,le(e.eventStartTime.time),1),fo("span",Zd,le(e.eventStartTime.text),1)])):bo("v-if",!0),e.eventHeaderOtherInfo?(eo(),oo("div",Kd,[fo("span",Jd,le(e.eventHeaderOtherInfo.description),1)])):bo("v-if",!0)]),Qd],8,Bd)}]]);const ip={key:0,class:"block md:hidden"},rp=fo("svg",{class:"h-6 w-6 fill-current","aria-hidden":"true"},[fo("use",{href:"#icon-filter"})],-1),sp={class:"mb-6 flex flex-col md:block"},op={class:"flex justify-between"},ap=fo("h2",{class:"text-h3"},"Filter Events",-1),lp=[fo("svg",{class:"h-8 w-8 fill-primary","aria-hidden":"true"},[fo("use",{href:"#icon-chevron-left"})],-1)],cp=["disabled"],hp={class:"mb-6"},up=fo("h3",{class:"text-h4"},"Event Type",-1),dp={class:"sq-form-checkbox-radio"},pp=["name","value"],fp={class:"flex flex-col mt-6"},mp=fo("label",{for:"category-select",class:"text-h4 mb-2 sm:text-2xl text-xl"},"Category",-1),gp=fo("option",{value:"",selected:""},"- All -",-1),vp=["value"],_p={key:0,class:"mb-6"},yp=fo("h3",{class:"text-h4"},"Location/Venue",-1),xp={class:"flex flex-col"},bp={class:"sq-form-checkbox-radio"},wp=["name","value"],Sp=["name","value"],Ep=fo("h3",{class:"text-h4"},"Date Range",-1),Mp={class:"flex flex-col mb-6 mt-2"},Tp=fo("label",{class:"sq-form-label",for:"from-date"},"From",-1),Ap=["min"],Cp={class:"flex flex-col mb-6"},Rp=fo("label",{class:"sq-form-label",for:"to-date"},"To",-1),Pp=["min"],Lp={key:0,class:"sr-only"},Ip=["role"],Dp={key:2,role:"status",class:"mb-4"},Np=["aria-live"],Op=[fo("button",{class:"sq-btn sq-btn-white"},"See more",-1)];var Up=$i({props:{items:Array,showFilters:Boolean,showAllVenues:Boolean,resultsPerPage:Number,useInIframe:String},components:{EventCard:np},data:()=>({categoryTags:[],selectedEventTypes:[],selectedLocations:[],selectedVenues:[],selectedCategory:"",fromDate:"",toDate:"",minDateToday:(new Date).toISOString().split("T")[0],isAllItems:!1,isMobile:!1}),computed:{eventTypeTags(){const e=this.items.map((e=>e.eventType));return[...new Map(e.map((e=>[e.id,e]))).values()]},locationTags(){const e=this.items.map((e=>e.location)),t=this.items.map((e=>e.venue)),n=[...new Map(t.map((e=>[e.id,e]))).values()],i=[...new Map(e.map((e=>[e.id,e]))).values()].reduce(((e,t)=>(e[t.id]={...t,subVenues:[]},e)),{});return n.forEach((e=>{const t=e.id.split("/").slice(0,2).join("/");i[t]&&i[t].subVenues.push(e)})),Object.values(i)},filteredCategoryTags(){return 0===this.selectedEventTypes.length?this.categoryTags:this.categoryTags.filter((e=>this.selectedEventTypes.some((t=>e.id.includes(t.toLowerCase())))))},filteredItems(){const e=this.items.filter((e=>(0===this.selectedEventTypes.length||this.selectedEventTypes.includes(e.eventType.title))&&(""===this.selectedCategory||this.selectedCategory===e.eventCategory.title)&&(0===this.selectedLocations.length||this.selectedLocations.includes(e.location.title))&&(0===this.selectedVenues.length||this.selectedVenues.includes(e.venue.title))&&(""===this.fromDate||new Date(this.fromDate).setHours(0,0,0,0)<=new Date(e.eventDate))&&(""===this.toDate||new Date(this.toDate).setHours(0,0,0,0)>=new Date(e.eventDate))));return e&&e.length>9?this.isAllItems=!1:this.isAllItems=!0,e},maxItems(){return this.filteredItems&&this.filteredItems.length>9&&!this.isAllItems?this.filteredItems.slice(0,9):this.filteredItems},isDisabled(){return!(0!==this.selectedEventTypes.length||""!==this.selectedCategory||0!==this.selectedLocations.length||0!==this.selectedVenues.length||""!==this.fromDate||""!==this.toDate)}},methods:{resetAllFilters(){this.selectedEventTypes=[],this.selectedLocations=[],this.selectedVenues=[],this.selectedCategory="",this.fromDate="",this.toDate="",this.filteredCategoryTags=this.categoryTags,this.filteredItems=this.items},showAllItems(){this.isAllItems=!0},showMobileDrawerFilter(){const e=document.getElementById("eventListFilter");document.getElementById("mobile-btn-close").focus(),e.classList.add("drawer
15-animation"),document.body.classList.add("overflow-hidden")},hideMobileDrawerFilter(){const e=document.getElementById("eventListFilter");document.getElementById("mobile-btn-close").blur(),e.classList.remove("drawer-animation"),document.body.classList.remove("overflow-hidden")},handleTab(e){const t=document.getElementById("eventListFilter");if(!this.isMobile)return;const n=t.querySelectorAll("input, button, select"),i=n[0],r=n[n.length-1];e.shiftKey&&document.activeElement===i&&(e.preventDefault(),r.focus()),e.shiftKey||document.activeElement!==r||(e.preventDefault(),i.focus())},updateIsMobile(){this.isMobile=window.innerWidth<976}},mounted(){this.categoryTags=[...new Map(this.items.map((e=>e.eventCategory)).map((e=>[e.id,e]))).values()],this.filteredCategoryTags=this.categoryTags,this.updateIsMobile(),window.addEventListener("resize",this.updateIsMobile)},watch:{selectedEventTypes(e){this.selectedCategory=""}}});const kp=(0,tp.Z)(Up,[["render",function(e,t,n,i,r,s){const o=ci("EventCard");return eo(),oo("div",{class:$(["flex flex-col md:flex-row",e.showFilters?"mb-4":""])},[e.showFilters?(eo(),oo("div",ip,[fo("button",{onClick:t[0]||(t[0]=(...t)=>e.showMobileDrawerFilter&&e.showMobileDrawerFilter(...t)),class:"sq-btn sq-btn-white mb-6"},[rp,yo(" Filter events ")])])):bo("v-if",!0),e.showFilters?(eo(),oo("div",{key:1,id:"eventListFilter",class:$(["overflow-y-auto md:overflow-y-hidden",e.isMobile?"mobile-drawer-filter":"desktop-filter"]),onKeydown:t[9]||(t[9]=Ol(((...t)=>e.handleTab&&e.handleTab(...t)),["tab"]))},[fo("div",sp,[fo("div",op,[ap,fo("button",{class:"md:hidden",id:"mobile-btn-close",onClick:t[1]||(t[1]=(...t)=>e.hideMobileDrawerFilter&&e.hideMobileDrawerFilter(...t)),"aria-label":"Close filter"},lp)]),fo("button",{disabled:e.isDisabled,onClick:t[2]||(t[2]=(...t)=>e.resetAllFilters&&e.resetAllFilters(...t)),class:"sq-btn sq-btn-white mt-6"},"Reset filters",8,cp)]),fo("div",hp,[up,(eo(!0),oo($s,null,yr(e.eventTypeTags,(n=>(eo(),oo("div",{key:n.id},[fo("label",dp,[Ni(fo("input",{"onUpdate:modelValue":t[3]||(t[3]=t=>e.selectedEventTypes=t),type:"checkbox",name:n.title,value:n.title},null,8,pp),[[bl,e.selectedEventTypes]]),fo("span",null,le(n.title),1)])])))),128)),fo("div",fp,[mp,Ni(fo("select",{id:"category-select",class:"sq-form-select","onUpdate:modelValue":t[4]||(t[4]=t=>e.selectedCategory=t)},[gp,(eo(!0),oo($s,null,yr(e.filteredCategoryTags,(e=>(eo(),oo("option",{value:e.title},le(e.title),9,vp)))),256))],512),[[El,e.selectedCategory]])])]),e.showAllVenues?(eo(),oo("div",_p,[yp,(eo(!0),oo($s,null,yr(e.locationTags,(n=>(eo(),oo("div",{key:n.id},[fo("div",xp,[fo("label",bp,[Ni(fo("input",{"onUpdate:modelValue":t[5]||(t[5]=t=>e.selectedLocations=t),type:"checkbox",name:n.title,value:n.title},null,8,wp),[[bl,e.selectedLocations]]),fo("span",null,le(n.title),1)]),(eo(!0),oo($s,null,yr(n.subVenues,(i=>(eo(),oo("label",{class:"sq-form-checkbox-radio ml-4",key:n.id},[Ni(fo("input",{"onUpdate:modelValue":t[6]||(t[6]=t=>e.selectedVenues=t),type:"checkbox",name:i.title,value:i.title},null,8,Sp),[[bl,e.selectedVenues]]),fo("span",null,le(i.title),1)])))),128))])])))),128))])):bo("v-if",!0),fo("div",null,[Ep,fo("div",Mp,[Tp,Ni(fo("input",{id:"from-date","onUpdate:modelValue":t[7]||(t[7]=t=>e.fromDate=t),class:"sq-form-input",type:"date",min:e.minDateToday},null,8,Ap),[[xl,e.fromDate]])]),fo("div",Cp,[Rp,Ni(fo("input",{id:"to-date","onUpdate:modelValue":t[8]||(t[8]=t=>e.toDate=t),class:"sq-form-input",type:"date",min:e.minDateToday},null,8,Pp),[[xl,e.toDate]])])])],34)):bo("v-if",!0),fo("div",{class:$(e.showFilters?"basis-4/5":"w-full")},[e.showFilters?(eo(),oo("h2",Lp,"Event results")):bo("v-if",!0),e.maxItems&&0!==e.maxItems.length?bo("v-if",!0):(eo(),oo("div",{key:1,role:e.showFilters?"status":null}," No events found ",8,Ip)),e.showFilters&&e.maxItems&&e.maxItems.length>0?(eo(),oo("div",Dp," Showing "+le(e.maxItems.length)+" of "+le(e.filteredItems.length)+" result"+le(e.filteredItems.length>1?"s":""),1)):bo("v-if",!0),fo("div",{"aria-live":e.showFilters?"polite":null,class:$([e.showFilters?"lg:grid-cols-3 md:grid-cols-2":"lg:grid-cols-4 md:grid-cols-3 sm:grid-cols-2","grid grid-cols-1 gap-4 mb-6"])}
15,[(eo(!0),oo($s,null,yr(e.maxItems,(t=>(eo(),oo("div",{key:t.url},[mo(o,Mo(t,{showAllVenues:e.showAllVenues,useInIframe:e.useInIframe}),null,16,["showAllVenues","useInIframe"])])))),128))],10,Np),e.isAllItems?bo("v-if",!0):(eo(),oo("div",{key:3,onClick:t[10]||(t[10]=(...t)=>e.showAllItems&&e.showAllItems(...t)),class:"flex items-center justify-center mb-10"},Op))],2)],2)}]]);var Fp=kp;const Vp={key:0,class:"mb-4"},Bp={class:"text-h4 text-primary mb-5"},zp={class:"flex w-full flex-wrap md:flex-nowrap"},Hp={class:"flex items-start md:items-center mr-4 mb-4 md:mb-0 flex-col md:flex-row"},Gp=fo("label",{for:"guest-number-input",class:"text-h6 mr-2"},"Number of guests",-1),Wp={class:"flex items-start md:items-center flex-col md:flex-row"},jp=fo("label",{for:"seated-or-standing",class:"text-h6 mr-2"},"Seated or Standing",-1),qp=fo("option",{value:"",selected:""},"All",-1),Xp=["value"],$p={key:0,class:"flex items-start md:items-center mt-4 md:mt-0 ml-0 md:ml-4 flex-col md:flex-row"},Yp=fo("label",{for:"venue",class:"text-h6 mr-2"},"Venue",-1),Zp=fo("option",{value:"",selected:""},"All",-1),Kp=["value"],Jp={key:1,role:"status",class:"mb-16"},Qp=["role"],ef=["aria-live"],tf={key:3,class:"flex items-center justify-center w-full"};const nf=["href","target"],rf={class:"cursor-pointer block !no-underline pt-4 group-hover:pt-0 group-focus:pt-0 transition-all duration-300 ease-in-out"},sf=["src","srcset","alt"],of={key:1,class:"h-60 w-full"},af={key:2,class:"text-h6 font-normal top-8 group-hover:top-4 group-focus:top-4 absolute left-0 px-4 bg-secondary py-2 transition-all duration-300 ease-in-out"},lf={class:"bg-primary flex justify-between group-hover:py-2 group-focus:py-2 transition-all duration-300 ease-in-out"},cf={class:"text-h4 py-2 px-4"},hf=fo("div",{class:"flex items-center pr-5 invisible transition-opacity duration-500 opacity-0 group-hover:opacity-100 group-hover:visible group-focus:opacity-100 group-focus:visible"},[fo("svg",{class:"fill-current h-7 w-7","aria-hidden":"true"},[fo("use",{href:"#icon-arrow-right"})])],-1),uf={class:"py-5"},df={class:"flex items-center mb-3"},pf=fo("svg",{class:"fill-current h-6 w-6 mr-2","aria-hidden":"true"},[fo("use",{href:"#icon-glass-flute"})],-1),ff=fo("span",{class:"font-medium mr-4"},"Standing Cocktail",-1),mf={class:"flex items-center mb-3"},gf=fo("svg",{class:"fill-current h-6 w-6 mr-2"},[fo("use",{href:"#icon-food-turkey"})],-1),vf=fo("span",{class:"font-medium mr-4"},"Seated Dining",-1),_f={class:"flex items-center mb-5"},yf=fo("svg",{class:"fill-current h-6 w-6 mr-2","aria-hidden":"true"},[fo("use",{href:"#icon-theater"})],-1),xf=fo("span",{class:"font-medium mr-4"},"Seated Theatre",-1);var bf=$i({props:{url:String,title:String,imageSrc:String,imageSrcset:String,imageAlt:String,functionAddress:String,seatedCapacity:Number,standingCapacity:Number,theatreCapacity:Number,locationName:String,description:String,showVenue:Boolean,useInIframe:Boolean},data:()=>({}),computed:{},methods:{},mounted(){}});var wf=$i({props:{showFilters:Boolean,items:Array,useInIframe:Boolean,functionListTitle:{type:String,default:"Search our rooms"}},components:{FunctionHireCard:(0,tp.Z)(bf,[["render",function(e,t,n,i,r,s){return eo(),oo("a",{href:e.url,target:e.useInIframe?"_blank":"_self",class:"group relative"},[fo("div",rf,[e.imageSrc?(eo(),oo("img",{key:0,class:"h-60 w-full object-cover",loading:"lazy",src:e.imageSrc,srcset:e.imageSrcset,sizes:"450px",alt:e.imageAlt?e.imageAlt:""},null,8,sf)):(eo(),oo("div",of)),e.locationName&&e.showVenue?(eo(),oo("div",af,le(e.locationName),1)):bo("v-if",!0),fo("div",lf,[fo("h3",cf,le(e.title),1),hf])]),fo("div",uf,[fo("div",df,[pf,ff,fo("span",null,le(e.standingCapacity?e.standingCapacity+" people":"N/A"),1)]),fo("div",mf,[gf,vf,fo("span",null,le(e.seatedCapacity?e.seatedCapacity+" people":"N/A"),1)]),fo("div",_f,[yf,xf,fo("span",null,le(e.theatreCapacity?e.theatreCapacity+" people":"N/A"),1)]),Ni(fo("p",{class:"line-clamp-2"},le(e.description),513),[[ka,e.description]])])],8,nf)}]])},data:()=>({guestNumber:"",selectedSeatedOrStanding:"",seatedOrStandingOptions:[{title:"Standing Cocktail",value:"standingCapacity"},{title:"Seated Dining",value:"seatedCapacity"},{title:"Seated Theater",value:"theatreCapacity"}],selectedVenue:"",isAllItems:!1}),computed:{filteredItem(){const e=this.items.filter((e=>{const t={standingCapacity:e.standingCapacity?e.standingCapacity:0,seatedCapacity:e.seatedCapacity?e.seatedCapacity:0,theatreCapacity:e.theatreCapacity?e.theatreCapacity:0}
15,n=this.selectedSeatedOrStanding?t[this.selectedSeatedOrStanding]>0&&(""===this.guestNumber||t[this.selectedSeatedOrStanding]>=this.guestNumber):Math.max(...Object.values(t))>=this.guestNumber,i=!this.selectedVenue||e.locationName===this.selectedVenue;return n&&i}));return e&&e.length>9?this.isAllItems=!1:this.isAllItems=!0,e},maxItems(){return this.filteredItem&&this.filteredItem.length>9&&!this.isAllItems?this.filteredItem.slice(0,9):this.filteredItem},venueOptions(){return[...new Set(this.items.map((e=>e.locationName)))]}},methods:{},mounted(){}});const Sf=(0,tp.Z)(wf,[["render",function(e,t,n,i,r,s){const o=ci("FunctionHireCard");return eo(),oo("div",{class:$(e.showFilters?"mb-4":"mt-1")},[e.showFilters?(eo(),oo("div",Vp,[fo("h2",Bp,le(e.functionListTitle),1),fo("div",zp,[fo("div",Hp,[Gp,Ni(fo("input",{id:"guest-number-input","onUpdate:modelValue":t[0]||(t[0]=t=>e.guestNumber=t),class:"sq-form-input !w-60",type:"number",spellcheck:"true",placeholder:"How many people?"},null,512),[[xl,e.guestNumber]])]),fo("div",Wp,[jp,Ni(fo("select",{id:"seated-or-standing",class:"sq-form-select !w-60","onUpdate:modelValue":t[1]||(t[1]=t=>e.selectedSeatedOrStanding=t)},[qp,(eo(!0),oo($s,null,yr(e.seatedOrStandingOptions,(e=>(eo(),oo("option",{value:e.value},le(e.title),9,Xp)))),256))],512),[[El,e.selectedSeatedOrStanding]])]),e.venueOptions&&e.venueOptions.length>1?(eo(),oo("div",$p,[Yp,Ni(fo("select",{id:"venue",class:"sq-form-select !w-60","onUpdate:modelValue":t[2]||(t[2]=t=>e.selectedVenue=t)},[Zp,(eo(!0),oo($s,null,yr(e.venueOptions,(e=>(eo(),oo("option",{value:e},le(e),9,Kp)))),256))],512),[[El,e.selectedVenue]])])):bo("v-if",!0)])])):bo("v-if",!0),e.showFilters&&e.maxItems&&e.maxItems.length>0?(eo(),oo("div",Jp," Showing "+le(e.maxItems.length)+" of "+le(e.filteredItem.length)+" result"+le(e.filteredItem.length>1?"s":""),1)):bo("v-if",!0),e.maxItems&&0!==e.maxItems.length?bo("v-if",!0):(eo(),oo("div",{key:2,role:e.showFilters?"status":null}," No results found ",8,Qp)),fo("div",{"aria-live":e.showFilters?"polite":null,class:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 mb-4"},[(eo(!0),oo($s,null,yr(e.maxItems,(t=>(eo(),oo("div",{key:t.url},[mo(o,Mo(t,{"show-venue":e.venueOptions.length>1,useInIframe:e.useInIframe}),null,16,["show-venue","useInIframe"])])))),128))],8,ef),e.isAllItems?bo("v-if",!0):(eo(),oo("div",tf,[fo("button",{onClick:t[3]||(t[3]=t=>e.isAllItems=!0),class:"sq-btn sq-btn-white"},"See more rooms")]))],2)}]]);var Ef=Sf;const Mf={class:"mb-4"},Tf={key:0};const Af={class:"py-8 border-b-2 border-grey-30 grid grid-cols-1 sm:grid-cols-3 md:grid-cols-5 gap-4"},Cf={class:"mb-4 md:mb-0"},Rf=["src","alt"],Pf=["href","target"],Lf=fo("div",{class:"sm:text-sm text-xs text-primary mb-2"},"Location",-1),If={class:"mr-4"},Df=fo("div",{class:"sm:text-sm text-xs text-primary mb-2"},"Job type",-1),Nf={class:"flex items-center"},Of=["href","target"];var Uf=$i({props:{logoPath:String,title:String,locationName:String,jobAddress:String,jobApplicationClosingDate:Number,jobTypes:Array,jobApplyLinkUrl:String,url:String,useInIframe:Boolean},data:()=>({}),computed:{formattedCloseDate(){if(this.jobApplicationClosingDate){const e={day:"2-digit",month:"2-digit",year:"2-digit"};return new Intl.DateTimeFormat("en-GB",e).format(new Date(this.jobApplicationClosingDate))}return""},formattedJobTypeTitle(){return this.jobTypes.map((e=>e)).join(" / ")}},methods:{},mounted(){}});var kf=$i({props:{items:Array,useInIframe:Boolean},components:{JobCard:(0,tp.Z)(Uf,[["render",function(e,t,n,i,r,s){return eo(),oo("div",Af,[fo("div",Cf,[e.logoPath?(eo(),oo("img",{key:0,class:"max-h-[100px] max-w-[180px] object-contain",src:e.logoPath,alt:e.locationName+" logo"},null,8,Rf)):bo("v-if",!0)]),fo("div",null,[Ni(fo("h3",{class:"text-h4 mb-2"},le(e.title),513),[[ka,e.title]]),Ni(fo("div",{class:"text-primary"},"Closing date: "+le(e.formattedCloseDate),513),[[ka,e.formattedCloseDate]]),fo("a",{href:e.url,target:e.useInIframe?"_blank":"_self",class:"underline"},"Learn more",8,Pf)]),fo("div",null,[Lf,Ni(fo("div",{class:"font-bold"},le(e.locationName),513),[[ka,e.locationName]]),Ni(fo("div",null,le(e.jobAddress),513),[[ka,e.jobAddress]])]),fo("div",If,[Df,Ni(fo("div",{class:"font-bold"},le(e.formattedJobTypeTitle),513),[[ka,e.formattedJobTypeTitle]])]),fo("div",Nf,[fo("a",{href:e.jobApplyLinkUrl,target:e.useInIframe?"_blank":"_self",class:"sq-btn sq-btn-secondary"},"Apply now",8,Of)])])}]])},data:()=>({}),computed:{},methods:{},mounted(){}});var Ff=(0,tp.Z)(kf,[["render",function(e,t,n,i,r,s){const o=ci("JobCard");return eo(),oo("div",Mf,[(eo(!0),oo($s,null,yr(e.items,(t=>(eo(),oo("div",{key:t.url},[mo(o,Mo(t,{useInIframe:e.useInIframe}),null,16,["useInIframe"])])))),128)),e.items&&0!==e.items.length?bo("v-if",!0):(eo(),oo("div",Tf," There are no current vacancies. Please check back later. "))])}]]);const Vf=e=>(Jn("data-v-3edb9bce"),e=e(),Qn(),e),Bf={class:"flex flex-col md:flex-row py-8"},zf={class:"w-full pr-0 md:pr-5 md:w-[370px] md:min-w-[370px]"},Hf={key:0},Gf={class:"drawer fixed p-5 top-0 z-10 w-full -left-full sm:left-[-400px] sm:w-[400px] transition-all duration-500 ease-in-out bg-white shadow",ref:"Drawer"},Wf=[Vf((()=>fo("svg",{class:"w-8 h-8","aria-hidden":"true"},[fo("use",{href:"#icon-chevron-left"}
15)],-1)))],jf={key:0},qf=Vf((()=>fo("svg",{class:"fill-current","aria-hidden":"true"},[fo("use",{href:"#icon-filter"})],-1))),Xf={key:1},$f={key:0},Yf={key:2},Zf={class:"w-full"},Kf={key:0,class:"bg-primary px-5 py-3 flex flex-col justify-between md:flex-row"},Jf=Vf((()=>fo("div",null,[fo("h4",{class:"text-h5 py-1"},"View from your section"),fo("p",{class:"text-sm py-1"},"Select your section for a 360 degree view")],-1))),Qf={key:0,class:"flex items-center justify-between md:justify-start"},em={class:"text-h3"},tm=[Vf((()=>fo("svg",{"aria-hidden":"true",class:"w-12 h-12 fill-current"},[fo("use",{href:"#icon-chevron-up"})],-1)))],nm={class:"relative z-50"},im={class:"HoverBox absolute top-0 left-0 h-full w-full",ref:"HoverBox"},rm={key:0};function sm(e,t,n,i){return new(n||(n=Promise))((function(r,s){function o(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((i=i.apply(e,t||[])).next())}))}function om(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError;var am=om((function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var i,r,s;if(Array.isArray(t)){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((i=(s=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=i;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=i;0!=r--;){var o=s[r];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}));const lm="__googleMapsScriptId";var cm;!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"}(cm||(cm={}));class hm{constructor({apiKey:e,authReferrerPolicy:t,channel:n,client:i,id:r=lm,language:s,libraries:o=[],mapIds:a,nonce:l,region:c,retries:h=3,url:u="https://maps.googleapis.com/maps/api/js",version:d}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=t,this.channel=n,this.client=i,this.id=r||lm,this.language=s,this.libraries=o,this.mapIds=a,this.nonce=l,this.region=c,this.retries=h,this.url=u,this.version=d,hm.instance){if(!am(this.options,hm.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(hm.instance.options)}`);return hm.instance}hm.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?cm.FAILURE:this.done?cm.SUCCESS:this.loading?cm.LOADING:cm.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=__googleMapsCallback&loading=async",this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`®ion=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((e,t)=>{this.loadCallback((n=>{n?t(n.error):e(window.google)}))}))}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,t;if(document.getElementById(this.id))return void this.callback();const n={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};
15Object.keys(n).forEach((e=>!n[e]&&delete n[e])),(null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.importLibrary)||(e=>{let t,n,i,r="The Google Maps JavaScript API",s="google",o="importLibrary",a="__ib__",l=document,c=window;c=c[s]||(c[s]={});const h=c.maps||(c.maps={}),u=new Set,d=new URLSearchParams,p=()=>t||(t=new Promise(((o,c)=>sm(this,void 0,void 0,(function*(){var p;for(i in yield n=l.createElement("script"),n.id=this.id,d.set("libraries",[...u]+""),e)d.set(i.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase())),e[i]);d.set("callback",s+".maps."+a),n.src=this.url+"?"+d,h[a]=o,n.onerror=()=>t=c(Error(r+" could not load.")),n.nonce=this.nonce||(null===(p=l.querySelector("script[nonce]"))||void 0===p?void 0:p.nonce)||"",l.head.append(n)})))));h[o]?console.warn(r+" only loads once. Ignoring:",e):h[o]=(e,...t)=>u.add(e)&&p().then((()=>h[o](e,...t)))})(n);const i=this.libraries.map((e=>this.importLibrary(e)));i.length||i.push(this.importLibrary("core")),Promise.all(i).then((()=>this.callback()),(e=>{const t=new ErrorEvent("error",{error:e});this.loadErrorCallback(t)}))}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const e=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${e} ms.`),setTimeout((()=>{this.deleteScript(),this.setScript()}),e)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((e=>{e(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading||(this.loading=!0,this.setScript())}}}const um={ref:"photoSphereViewer",class:"w-full h-full"}; 16/** 17 * @license 18 * Copyright 2010-2023 Three.js Authors 19 * SPDX-License-Identifier: MIT 20 */ 21const dm="161",pm=100,fm=301,mm=302,gm=303,vm=304,_m=306,ym=1e3,xm=1001,bm=1002,wm=1003,Sm=1004,Em=1005,Mm=1006,Tm=1007,Am=1008,Cm=1009,Rm=1012,Pm=1013,Lm=1014,Im=1015,Dm=1016,Nm=1020,Om=1023,Um=1026,km=1027,Fm=33776,Vm=33777,Bm=33778,zm=33779,Hm=36492,Gm=2300,Wm=2301,jm=2302,qm=2400,Xm=2401,$m=2402,Ym=3001,Zm="",Km="srgb",Jm="srgb-linear",Qm="display-p3",eg="display-p3-linear",tg="linear",ng="srgb",ig="rec709",rg="p3",sg=7680,og=35044,ag="300 es",lg=1035,cg=2e3,hg=2001;class ug{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,i=n.length;t<i;t++)n[t].call(this,e);e.target=null}}}const dg=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let pg=1234567;const fg=Math.PI/180,mg=180/Math.PI;function gg(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(dg[255&e]+dg[e>>8&255]+dg[e>>16&255]+dg[e>>24&255]+"-"+dg[255&t]+dg[t>>8&255]+"-"+dg[t>>16&15|64]+dg[t>>24&255]+"-"+dg[63&n|128]+dg[n>>8&255]+"-"+dg[n>>16&255]+dg[n>>24&255]+dg[255&i]+dg[i>>8&255]+dg[i>>16&255]+dg[i>>24&255]).toLowerCase()}function vg(e,t,n){return Math.max(t,Math.min(n,e))}function _g(e,t){return(e%t+t)%t}function yg(e,t,n){return(1-n)*e+n*t}function xg(e){return 0==(e&e-1)&&0!==e}function bg(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function wg(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function Sg(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(4294967295*e);case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int32Array:return Math.round(2147483647*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}}const Eg={DEG2RAD:fg,RAD2DEG:mg,generateUUID:gg,clamp:vg,euclideanModulo:_g,mapLinear:function(e,t,n,i,r){return i+(e-t)*(r-i)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:yg,damp:function(e,t,n,i){return yg(e,t,1-Math.exp(-n*i))},pingpong:function(e,t=1){return t-Math.abs(_g(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(pg=e);let t=pg+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296},degToRad:function(e){return e*fg},radToDeg:function(e){return e*mg},isPowerOfTwo:xg,ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:bg,setQuaternionFromProperEuler:function(e,t,n,i,r){const s=Math.cos,o=Math.sin,a=s(n/2),l=o(n/2),c=s((t+i)/2),h=o((t+i)/2),u=s((t-i)/2),d=o((t-i)/2),p=s((i-t)/2),f=o((i-t)/2);switch(r){case"XYX":e.set(a*h,l*u,l*d,a*c);break;case"YZY":e.set(l*d,a*h,l*u,a*c);break;case"ZXZ":e.set(l*u,l*d,a*h,a*c);break;case"XZX":e.set(a*h,l*f,l*p,a*c);break;case"YXY":e.set(l*p,a*h,l*f,a*c);break;case"ZYZ":e.set(l*f,l*p,a*h,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}},normalize:Sg,denormalize:wg};class Mg{constructor(e=0,t=0){Mg.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}
vendor: 19,171 bytes, line 21
21sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(vg(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),i=Math.sin(t),r=this.x-e.x,s=this.y-e.y;return this.x=r*n-s*i+e.x,this.y=r*i+s*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Tg{constructor(e,t,n,i,r,s,o,a,l){Tg.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,n,i,r,s,o,a,l)}set(e,t,n,i,r,s,o,a,l){const c=this.elements;return c[0]=e,c[1]=i,c[2]=o,c[3]=t,c[4]=r,c[5]=a,c[6]=n,c[7]=s,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,r=this.elements,s=n[0],o=n[3],a=n[6],l=n[1],c=n[4],h=n[7],u=n[2],d=n[5],p=n[8],f=i[0],m=i[3],g=i[6],v=i[1],_=i[4],y=i[7],x=i[2],b=i[5],w=i[8];return r[0]=s*f+o*v+a*x,r[3]=s*m+o*_+a*b,r[6]=s*g+o*y+a*w,r[1]=l*f+c*v+h*x,r[4]=l*m+c*_+h*b,r[7]=l*g+c*y+h*w,r[2]=u*f+d*v+p*x,r[5]=u*m+d*_+p*b,r[8]=u*g+d*y+p*w,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],s=e[4],o=e[5],a=e[6],l=e[7],c=e[8];return t*s*c-t*o*l-n*r*c+n*o*a+i*r*l-i*s*a}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],s=e[4],o=e[5],a=e[6],l=e[7],c=e[8],h=c*s-o*l,u=o*a-c*r,d=l*r-s*a,p=t*h+n*u+i*d;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const f=1/p;return e[0]=h*f,e[1]=(i*l-c*n)*f,e[2]=(o*n-i*s)*f,e[3]=u*f,e[4]=(c*t-i*a)*f,e[5]=(i*r-o*t)*f,e[6]=d*f,e[7]=(n*a-l*t)*f,e[8]=(s*t-n*r)*f,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,i,r,s,o){const a=Math.cos(r),l=Math.sin(r);return this.set(n*a,n*l,-n*(a*s+l*o)+s+e,-i*l,i*a,-i*(-l*s+a*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(Ag.makeScale(e,t)),this}rotate(e){return this.premultiply(Ag.makeRotation(-e)),this}translate(e,t){return this.premultiply(Ag.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}const Ag=new Tg;function Cg(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;function Rg(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function Pg(){const e=Rg("canvas");return e.style.display="block",e}const Lg={};function Ig(e){e in Lg||(Lg[e]=!0,console.warn(e))}const Dg=(new Tg).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),Ng=(new Tg).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Og={[Jm]:{transfer:tg,primaries:ig,toReference:e=>e,fromReference:e=>e},[Km]:{transfer:ng,primaries:ig,toReference:e=>e.convertSRGBToLinear(),fromReference:e=>e.convertLinearToSRGB()},[eg]:{transfer:tg,primaries:rg,toReference:e=>e.applyMatrix3(Ng),fromReference:e=>e.applyMatrix3(Dg)},[Qm]:{transfer:ng,primaries:rg,toReference:e=>e.convertSRGBToLinear().applyMatrix3(Ng),fromReference:e=>e.applyMatrix3(Dg).convertLinearToSRGB()}},Ug=new Set([Jm,eg]),kg={enabled:!0,_workingColorSpace:Jm,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(e){if(!Ug.has(e))throw new Error(`Unsupported working color space, "${e}".`);this._workingColorSpace=e},convert:function(e,t,n){if(!1===this.enabled||t===n||!t||!n)return e;const i=Og[t].toReference;return(0,Og[n].fromReference)(i(e))},fromWorkingColorSpace:function(e,t){return this.convert(e,this._workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this._workingColorSpace)},getPrimaries:function(e){return Og[e].primaries},getTransfer:function(e){return e===Zm?tg:Og[e].transfer}};function Fg(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Vg(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}let Bg;class zg{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===Bg&&(Bg=Rg("canvas")),Bg.width=e.width,Bg.height=e.height;const n=Bg.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=Bg}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=Rg("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const i=n.getImageData(0,0,e.width,e.height),r=i.data;for(let e=0;e<r.length;e++)r[e]=255*Fg(r[e]/255);return n.putImageData(i,0,0),t}if(e.data){const t=e.data.slice(0);for(let e=0;e<t.length;e++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[e]=Math.floor(255*Fg(t[e]/255)):t[e]=Fg(t[e]);return{data:t,width:e.width,height:e.height}}return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let Hg=0;class Gg{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:Hg++}),this.uuid=gg(),this.data=e,this.dataReady=!0,this.version=0}set needsUpdate(e){!0===e&&this.version++}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.images[this.uuid])return e.images[this.uuid];const n={uuid:this.uuid,url:""},i=this.data;if(null!==i){let e;if(Array.isArray(i)){e=[];for(let t=0,n=i.length;t<n;t++)i[t].isDataTexture?e.push(Wg(i[t].image)):e.push(Wg(i[t]))}else e=Wg(i);n.url=e}return t||(e.images[this.uuid]=n),n}}function Wg(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?zg.getDataURL(e):e.data?{data:Array.from(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let jg=0;class qg extends ug{constructor(e=qg.DEFAULT_IMAGE,t=qg.DEFAULT_MAPPING,n=1001,i=1001,r=1006,s=1008,o=1023,a=1009,l=qg.DEFAULT_ANISOTROPY,c=""){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:jg++}),this.uuid=gg(),this.name="",this.source=new Gg(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=i,this.magFilter=r,this.minFilter=s,this.anisotropy=l,this.format=o,this.internalFormat=null,this.type=a,this.offset=new Mg(0,0),this.repeat=new Mg(1,1),this.center=new Mg(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Tg,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,"string"==typeof c?this.colorSpace=c:(Ig("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=c===Ym?Km:Zm),this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];const n={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(300!==this.mapping)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case ym:e.x=e.x-Math.floor(e.x);break;case xm:e.x=e.x<0?0:1;break;case bm:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case ym:e.y=e.y-Math.floor(e.y);break;case xm:e.y=e.y<0?0:1;break;case bm:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Ig("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Km?Ym:3e3}set encoding(e){Ig("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===Ym?Km:Zm}}qg.DEFAULT_IMAGE=null,qg.DEFAULT_MAPPING=300,qg.DEFAULT_ANISOTROPY=1;class Xg{constructor(e=0,t=0,n=0,i=1){Xg.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,i){return this.x=e,this.y=t,this.z=n,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,r=this.w,s=e.elements;return this.x=s[0]*t+s[4]*n+s[8]*i+s[12]*r,this.y=s[1]*t+s[5]*n+s[9]*i+s[13]*r,this.z=s[2]*t+s[6]*n+s[10]*i+s[14]*r,this.w=s[3]*t+s[7]*n+s[11]*i+s[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,i,r;const s=.01,o=.1,a=e.elements,l=a[0],c=a[4],h=a[8],u=a[1],d=a[5],p=a[9],f=a[2],m=a[6],g=a[10];if(Math.abs(c-u)<s&&Math.abs(h-f)<s&&Math.abs(p-m)<s){if(Math.abs(c+u)<o&&Math.abs(h+f)<o&&Math.abs(p+m)<o&&Math.abs(l+d+g-3)<o)return this.set(1,0,0,0),this;t=Math.PI;const e=(l+1)/2,a=(d+1)/2,v=(g+1)/2,_=(c+u)/4,y=(h+f)/4,x=(p+m)/4;return e>a&&e>v?e<s?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(e),i=_/n,r=y/n):a>v?a<s?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(a),n=_/i,r=x/i):v<s?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(v),n=y/r,i=x/r),this.set(n,i,r,t),this}let v=Math.sqrt((m-p)*(m-p)+(h-f)*(h-f)+(u-c)*(u-c));return Math.abs(v)<.001&&(v=1),this.x=(m-p)/v,this.y=(h-f)/v,this.z=(u-c)/v,this.w=Math.acos((l+d+g-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class $g extends ug{constructor(e=1,t=1,n={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Xg(0,0,e,t),this.scissorTest=!1,this.viewport=new Xg(0,0,e,t);const i={width:e,height:t,depth:1};void 0!==n.encoding&&(Ig("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace
vendor: 4,997 bytes, line 21
21=n.encoding===Ym?Km:Zm),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Mm,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},n),this.texture=new qg(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=n.generateMipmaps,this.texture.internalFormat=n.internalFormat,this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.depthTexture=n.depthTexture,this.samples=n.samples}setSize(e,t,n=1){this.width===e&&this.height===t&&this.depth===n||(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return(new this.constructor).copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new Gg(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Yg extends $g{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class Zg extends qg{constructor(e=null,t=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=wm,this.minFilter=wm,this.wrapR=xm,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Kg extends qg{constructor(e=null,t=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=wm,this.minFilter=wm,this.wrapR=xm,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Jg{constructor(e=0,t=0,n=0,i=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=i}static slerpFlat(e,t,n,i,r,s,o){let a=n[i+0],l=n[i+1],c=n[i+2],h=n[i+3];const u=r[s+0],d=r[s+1],p=r[s+2],f=r[s+3];if(0===o)return e[t+0]=a,e[t+1]=l,e[t+2]=c,void(e[t+3]=h);if(1===o)return e[t+0]=u,e[t+1]=d,e[t+2]=p,void(e[t+3]=f);if(h!==f||a!==u||l!==d||c!==p){let e=1-o;const t=a*u+l*d+c*p+h*f,n=t>=0?1:-1,i=1-t*t;if(i>Number.EPSILON){const r=Math.sqrt(i),s=Math.atan2(r,t*n);e=Math.sin(e*s)/r,o=Math.sin(o*s)/r}const r=o*n;if(a=a*e+u*r,l=l*e+d*r,c=c*e+p*r,h=h*e+f*r,e===1-o){const e=1/Math.sqrt(a*a+l*l+c*c+h*h);a*=e,l*=e,c*=e,h*=e}}e[t]=a,e[t+1]=l,e[t+2]=c,e[t+3]=h}static multiplyQuaternionsFlat(e,t,n,i,r,s){const o=n[i],a=n[i+1],l=n[i+2],c=n[i+3],h=r[s],u=r[s+1],d=r[s+2],p=r[s+3];return e[t]=o*p+c*h+a*d-l*u,e[t+1]=a*p+c*u+l*h-o*d,e[t+2]=l*p+c*d+o*u-a*h,e[t+3]=c*p-o*h-a*u-l*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const n=e._x,i=e._y,r=e._z,s=e._order,o=Math.cos,a=Math.sin,l=o(n/2),c=o(i/2),h=o(r/2),u=a(n/2),d=a(i/2),p=a(r/2);switch(s){case"XYZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"YXZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"ZXY":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"ZYX":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"YZX":this._x=u*c*h+l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h-u*d*p;break;case"XZY":this._x=u*c*h-l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h+u*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return!0===t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],i=t[4],r=t[8],s=t[1],o=t[5],a=t[9],l=t[2],c=t[6],h=t[10],u=n+o+h;if(u>0){const e=.5/Math.sqrt(u+1);this._w=.25/e,this._x=(c-a)*e,this._y=(r-l)*e,this._z=(s-i)*e}else if(n>o&&n>h){const e=2*Math.sqrt(1+n-o-h);this._w=(c-a)/e,this._x=.25*e,this._y=(i+s)/e,this._z=(r+l)/e}else if(o>h){const e=2*Math.sqrt(1+o-n-h);this._w=(r-l)/e,this._x=(i+s)/e,this._y=.25*e,this._z=(a+c)/e}else{const e=2*Math.sqrt(1+h-n-o);this._w=(s-i)/e,this._x=(r+l)/e,this._y=(a+c)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>
vendor: 6,180 bytes, line 21
21Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(vg(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const i=Math.min(1,t/n);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,i=e._y,r=e._z,s=e._w,o=t._x,a=t._y,l=t._z,c=t._w;return this._x=n*c+s*o+i*l-r*a,this._y=i*c+s*a+r*o-n*l,this._z=r*c+s*l+n*a-i*o,this._w=s*c-n*o-i*a-r*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,i=this._y,r=this._z,s=this._w;let o=s*e._w+n*e._x+i*e._y+r*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=s,this._x=n,this._y=i,this._z=r,this;const a=1-o*o;if(a<=Number.EPSILON){const e=1-t;return this._w=e*s+t*this._w,this._x=e*n+t*this._x,this._y=e*i+t*this._y,this._z=e*r+t*this._z,this.normalize(),this}const l=Math.sqrt(a),c=Math.atan2(l,o),h=Math.sin((1-t)*c)/l,u=Math.sin(t*c)/l;return this._w=s*h+this._w*u,this._x=n*h+this._x*u,this._y=i*h+this._y*u,this._z=r*h+this._z*u,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),i=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(t*Math.cos(i),n*Math.sin(r),n*Math.cos(r),t*Math.sin(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Qg{constructor(e=0,t=0,n=0){Qg.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(tv.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(tv.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6]*i,this.y=r[1]*t+r[4]*n+r[7]*i,this.z=r[2]*t+r[5]*n+r[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,r=e.elements,s=1/(r[3]*t+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*t+r[4]*n+r[8]*i+r[12])*s,this.y=(r[1]*t+r[5]*n+r[9]*i+r[13])*s,this.z=(r[2]*t+r[6]*n+r[10]*i+r[14])*s,this}applyQuaternion(e){const t=this.x,n=this.y,i=this.z,r=e.x,s=e.y,o=e.z,a=e.w,l=2*(s*i-o*n),c=2*(o*t-r*i),h=2*(r*n-s*t);return this.x=t+a*l+s*h-o*c,this.y=n+a*c+o*l-r*h,this.z=i+a*h+r*c-s*l,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[4]*n+r[8]*i,this.y=r[1]*t+r[5]*n+r[9]*i,this.z=r[2]*t+r[6]*n+r[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}
vendor: 5,021 bytes, line 21
21round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,i=e.y,r=e.z,s=t.x,o=t.y,a=t.z;return this.x=i*a-r*o,this.y=r*s-n*a,this.z=n*o-i*s,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return ev.copy(this).projectOnVector(e),this.sub(ev)}reflect(e){return this.sub(ev.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(vg(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return t*t+n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const i=Math.sin(t)*e;return this.x=i*Math.sin(n),this.y=Math.cos(t)*e,this.z=i*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const ev=new Qg,tv=new Jg;class nv{constructor(e=new Qg(1/0,1/0,1/0),t=new Qg(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(rv.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(rv.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=rv.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(void 0!==n){const i=n.getAttribute("position");if(!0===t&&void 0!==i&&!0!==e.isInstancedMesh)for(let t=0,n=i.count;t<n;t++)!0===e.isMesh?e.getVertexPosition(t,rv):rv.fromBufferAttribute(i,t),rv.applyMatrix4(e.matrixWorld),this.expandByPoint(rv);else void 0!==e.boundingBox?(null===e.boundingBox&&e.computeBoundingBox(),sv.copy(e.boundingBox)):(null===n.boundingBox&&n.computeBoundingBox(),sv.copy(n.boundingBox)),sv.applyM
vendor: 4,425 bytes, line 21
21atrix4(e.matrixWorld),this.union(sv)}const i=e.children;for(let e=0,n=i.length;e<n;e++)this.expandByObject(i[e],t);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,rv),rv.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(dv),pv.subVectors(this.max,dv),ov.subVectors(e.a,dv),av.subVectors(e.b,dv),lv.subVectors(e.c,dv),cv.subVectors(av,ov),hv.subVectors(lv,av),uv.subVectors(ov,lv);let t=[0,-cv.z,cv.y,0,-hv.z,hv.y,0,-uv.z,uv.y,cv.z,0,-cv.x,hv.z,0,-hv.x,uv.z,0,-uv.x,-cv.y,cv.x,0,-hv.y,hv.x,0,-uv.y,uv.x,0];return!!gv(t,ov,av,lv,pv)&&(t=[1,0,0,0,1,0,0,0,1],!!gv(t,ov,av,lv,pv)&&(fv.crossVectors(cv,hv),t=[fv.x,fv.y,fv.z],gv(t,ov,av,lv,pv)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,rv).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(rv).length()),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(iv[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),iv[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),iv[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),iv[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),iv[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),iv[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),iv[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),iv[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(iv)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const iv=[new Qg,new Qg,new Qg,new Qg,new Qg,new Qg,new Qg,new Qg],rv=new Qg,sv=new nv,ov=new Qg,av=new Qg,lv=new Qg,cv=new Qg,hv=new Qg,uv=new Qg,dv=new Qg,pv=new Qg,fv=new Qg,mv=new Qg;function gv(e,t,n,i,r){for(let s=0,o=e.length-3;s<=o;s+=3){mv.fromArray(e,s);const o=r.x*Math.abs(mv.x)+r.y*Math.abs(mv.y)+r.z*Math.abs(mv.z),a=t.dot(mv),l=n.dot(mv),c=i.dot(mv);if(Math.max(-Math.max(a,l,c),Math.min(a,l,c))>o)return!1}return!0}const vv=new nv,_v=new Qg,yv=new Qg;class xv{constructor(e=new Qg,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):vv.setFromPoints(e).getCenter(n);let i=0;for(let t=0,r=e.length;t<r;t++)i=Math.max(i,n.distanceToSquared(e[t]));return this.radius=Math.sqrt(i),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}
vendor: 6,890 bytes, line 21
21applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;_v.subVectors(e,this.center);const t=_v.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.addScaledVector(_v,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(yv.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(_v.copy(e.center).add(yv)),this.expandByPoint(_v.copy(e.center).sub(yv))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const bv=new Qg,wv=new Qg,Sv=new Qg,Ev=new Qg,Mv=new Qg,Tv=new Qg,Av=new Qg;class Cv{constructor(e=new Qg,t=new Qg(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,bv)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=bv.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(bv.copy(this.origin).addScaledVector(this.direction,t),bv.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){wv.copy(e).add(t).multiplyScalar(.5),Sv.copy(t).sub(e).normalize(),Ev.copy(this.origin).sub(wv);const r=.5*e.distanceTo(t),s=-this.direction.dot(Sv),o=Ev.dot(this.direction),a=-Ev.dot(Sv),l=Ev.lengthSq(),c=Math.abs(1-s*s);let h,u,d,p;if(c>0)if(h=s*a-o,u=s*o-a,p=r*c,h>=0)if(u>=-p)if(u<=p){const e=1/c;h*=e,u*=e,d=h*(h+s*u+2*o)+u*(s*h+u+2*a)+l}else u=r,h=Math.max(0,-(s*u+o)),d=-h*h+u*(u+2*a)+l;else u=-r,h=Math.max(0,-(s*u+o)),d=-h*h+u*(u+2*a)+l;else u<=-p?(h=Math.max(0,-(-s*r+o)),u=h>0?-r:Math.min(Math.max(-r,-a),r),d=-h*h+u*(u+2*a)+l):u<=p?(h=0,u=Math.min(Math.max(-r,-a),r),d=u*(u+2*a)+l):(h=Math.max(0,-(s*r+o)),u=h>0?r:Math.min(Math.max(-r,-a),r),d=-h*h+u*(u+2*a)+l);else u=s>0?-r:r,h=Math.max(0,-(s*u+o)),d=-h*h+u*(u+2*a)+l;return n&&n.copy(this.origin).addScaledVector(this.direction,h),i&&i.copy(wv).addScaledVector(Sv,u),d}intersectSphere(e,t){bv.subVectors(e.center,this.origin);const n=bv.dot(this.direction),i=bv.dot(bv)-n*n,r=e.radius*e.radius;if(i>r)return null;const s=Math.sqrt(r-i),o=n-s,a=n+s;return a<0?null:o<0?this.at(a,t):this.at(o,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);if(0===t)return!0;return e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,i,r,s,o,a;const l=1/this.direction.x,c=1/this.direction.y,h=1/this.direction.z,u=this.origin;return l>=0?(n=(e.min.x-u.x)*l,i=(e.max.x-u.x)*l):(n=(e.max.x-u.x)*l,i=(e.min.x-u.x)*l),c>=0?(r=(e.min.y-u.y)*c,s=(e.max.y-u.y)*c):(r=(e.max.y-u.y)*c,s=(e.min.y-u.y)*c),n>s||r>i?null:((r>n||isNaN(n))&&(n=r),(s<i||isNaN(i))&&(i=s),h>=0?(o=(e.min.z-u.z)*h,a=(e.max.z-u.z)*h):(o=(e.max.z-u.z)*h,a=(e.min.z-u.z)*h),n>a||o>i?null:((o>n||n!=n)&&(n=o),(a<i||i!=i)&&(i=a),i<0?null:this.at(n>=0?n:i,t)))}intersectsBox(e){return null!==this.intersectBox(e,bv)}intersectTriangle(e,t,n,i,r){Mv.subVectors(t,e),Tv.subVectors(n,e),Av.crossVectors(Mv,Tv);let s,o=this.direction.dot(Av);if(o>0){if(i)return null;s=1}else{if(!(o<0))return null;s=-1,o=-o}Ev.subVectors(this.origin,e);const a=s*this.direction.dot(Tv.crossVectors(Ev,Tv));if(a<0)return null;const l=s*this.direction.dot(Mv.cross(Ev));if(l<0)return null;if(a+l>o)return null;const c=-s*Ev.dot(Av);return c<0?null:this.at(c/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class Rv{constructor(e,t,n,i,r,s,o,a,l,c,h,u,d,p,f,m){Rv.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,n,i,r,s,o,a,l,c,h,u,d,p,f,m)}set(e,t,n,i,r,s,o,a,l,c,h,u,d,p,f,m){const g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=i,g[1]=r,g[5]=s,g[9]=o,g[13]=a,g[2]=l,g[6]=c,g[10]=h,g[14]=u,g[3]=d,g[7]=p,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new Rv).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,i=1/Pv.setFromMatrixColumn(e,0).length(),r=1/Pv.setFromMatrixColumn(e,1).length(),s=1/Pv.setFromMatrixColumn(e,2).length();return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=0,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=0,t[8]=n[8]*s,t[9]=n[9]*s,t[10]=n[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,i=e.y,r=e.z,s=Math.cos(n),o=Math.sin(n),a=Math.cos(i),l=Math.sin(i),c=Math.cos(r),h=Math.sin(r);if("XYZ"===e.order){const e=s*c,n=s*h,i=o*c,r=o*h;t[0]=a*c,t[4]=-a*h,t[8]=l,t[1]=n+i*l,t[5]=e-r*l,t[9]=-o*a,t[2]=r-e*l,t[6]=i+n*l,t[10]=s*a}else if("YXZ"===e.order){const e=a*c,n=a*h,i=l*c,r=l*h;t[0]=e+r*o,t[4]=i*o-n,t[8]=s*l,t[1]=s*h,t[5]=s*c,t[9]=-o,t[2]=n*o-i,t[6]=r+e*o,t[10]=s*a}else if("ZXY"===e.order){const e=a*c,n=a*h,i=l*c,r=l*h;t[0]=e-r*o,t[4]=-s*h,t[8]=i+n*o,t[1]=n+i*o,t[5]=s*c,t[9]=r-e*o,t[2]=-s*l,t[6]=o,t[10]=s*a}else if("ZYX"===e.order){const e=s*c,n=s*h,i=o*c,r=o*h;t[0]=a*c,t[4]=i*l-n,t[8]=e*l+r,t[1]=a*h,t[5]=r*l+e,t[9]=n*l-i,t[2]=-l,t[6]=o*a,t[10]=s*a}else if("YZX"===e.order){const e=s*a,n=s*l,i=o*a,r=o*l;t[0]=a*c,t[4]=r-e*h,t[8]=i*h+n,t[1]=h,t[5]=s*c,t[9]=-o*c,t[2]=-l*c,t[6]=n*h+i,t[10]=e-r*h}
vendor: 4,568 bytes, line 21
21else if("XZY"===e.order){const e=s*a,n=s*l,i=o*a,r=o*l;t[0]=a*c,t[4]=-h,t[8]=l*c,t[1]=e*h+r,t[5]=s*c,t[9]=n*h-i,t[2]=i*h-n,t[6]=o*c,t[10]=r*h+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Iv,e,Dv)}lookAt(e,t,n){const i=this.elements;return Uv.subVectors(e,t),0===Uv.lengthSq()&&(Uv.z=1),Uv.normalize(),Nv.crossVectors(n,Uv),0===Nv.lengthSq()&&(1===Math.abs(n.z)?Uv.x+=1e-4:Uv.z+=1e-4,Uv.normalize(),Nv.crossVectors(n,Uv)),Nv.normalize(),Ov.crossVectors(Uv,Nv),i[0]=Nv.x,i[4]=Ov.x,i[8]=Uv.x,i[1]=Nv.y,i[5]=Ov.y,i[9]=Uv.y,i[2]=Nv.z,i[6]=Ov.z,i[10]=Uv.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,r=this.elements,s=n[0],o=n[4],a=n[8],l=n[12],c=n[1],h=n[5],u=n[9],d=n[13],p=n[2],f=n[6],m=n[10],g=n[14],v=n[3],_=n[7],y=n[11],x=n[15],b=i[0],w=i[4],S=i[8],E=i[12],M=i[1],T=i[5],A=i[9],C=i[13],R=i[2],P=i[6],L=i[10],I=i[14],D=i[3],N=i[7],O=i[11],U=i[15];return r[0]=s*b+o*M+a*R+l*D,r[4]=s*w+o*T+a*P+l*N,r[8]=s*S+o*A+a*L+l*O,r[12]=s*E+o*C+a*I+l*U,r[1]=c*b+h*M+u*R+d*D,r[5]=c*w+h*T+u*P+d*N,r[9]=c*S+h*A+u*L+d*O,r[13]=c*E+h*C+u*I+d*U,r[2]=p*b+f*M+m*R+g*D,r[6]=p*w+f*T+m*P+g*N,r[10]=p*S+f*A+m*L+g*O,r[14]=p*E+f*C+m*I+g*U,r[3]=v*b+_*M+y*R+x*D,r[7]=v*w+_*T+y*P+x*N,r[11]=v*S+_*A+y*L+x*O,r[15]=v*E+_*C+y*I+x*U,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],i=e[8],r=e[12],s=e[1],o=e[5],a=e[9],l=e[13],c=e[2],h=e[6],u=e[10],d=e[14];return e[3]*(+r*a*h-i*l*h-r*o*u+n*l*u+i*o*d-n*a*d)+e[7]*(+t*a*d-t*l*u+r*s*u-i*s*d+i*l*c-r*a*c)+e[11]*(+t*l*h-t*o*d-r*s*h+n*s*d+r*o*c-n*l*c)+e[15]*(-i*o*c-t*a*h+t*o*u+i*s*h-n*s*u+n*a*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],s=e[4],o=e[5],a=e[6],l=e[7],c=e[8],h=e[9],u=e[10],d=e[11],p=e[12],f=e[13],m=e[14],g=e[15],v=h*m*l-f*u*l+f*a*d-o*m*d-h*a*g+o*u*g,_=p*u*l-c*m*l-p*a*d+s*m*d+c*a*g-s*u*g,y=c*f*l-p*h*l+p*o*d-s*f*d-c*o*g+s*h*g,x=p*h*a-c*f*a-p*o*u+s*f*u+c*o*m-s*h*m,b=t*v+n*_+i*y+r*x;if(0===b)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const w=1/b;return e[0]=v*w,e[1]=(f*u*r-h*m*r-f*i*d+n*m*d+h*i*g-n*u*g)*w,e[2]=(o*m*r-f*a*r+f*i*l-n*m*l-o*i*g+n*a*g)*w,e[3]=(h*a*r-o*u*r-h*i*l+n*u*l+o*i*d-n*a*d)*w,e[4]=_*w,e[5]=(c*m*r-p*u*r+p*i*d-t*m*d-c*i*g+t*u*g)*w,e[6]=(p*a*r-s*m*r-p*i*l+t*m*l+s*i*g-t*a*g)*w,e[7]=(s*u*r-c*a*r+c*i*l-t*u*l-s*i*d+t*a*d)*w,e[8]=y*w,e[9]=(p*h*r-c*f*r-p*n*d+t*f*d+c*n*g-t*h*g)*w,e[10]=(s*f*r-p*o*r+p*n*l-t*f*l-s*n*g+t*o*g)*w,e[11]=(c*o*r-s*h*r-c*n*l+t*h*l+s*n*d-t*o*d)*w,e[12]=x*w,e[13]=(c*f*i-p*h*i+p*n*u-t*f*u-c*n*m+t*h*m)*w,e[14]=(p*o*i-s*f*i-p*n*a+t*f*a+s*n*m-t*o*m)*w,e[15]=(s*h*i-c*o*i+c*n*a-t*h*a-s*n*u+t*o*u)*w,this}scale(e){const t=this.elements,n=e.x,i=e.y,r=e.z;return t[0]*=n,t[4]*=i,t[8]*=r,t[1]*=n,t[5]*=i,t[9]*=r,t[2]*=n,t[6]*=i,t[10]*=r,t[3]*=n,t[7]*=i,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,i))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),i=Math.sin(t),r=1-n,s=e.x,o=e.y,a=e.z,l=r*s,c=r*o;return this.set(l*s+n,l*o-i*a,l*a+i*o,0,l*o+i*a,c*o+n,c*a-i*s,0,l*a-i*o,c*a+i*s,r*a*a+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,i,r,s){return this.set(1,n,r,0,e,1,s,0,t,i,1,0,0,0,0,1),this}compose(e,t,n){const i=this.elements,r=t._x,s=t._y,o=t._z,a=t._w,l=r+r,c=s+s,h=o+o,u=r*l,d=r*c,p=r*h,f=s*c,m=s*h,g=o*h,v=a*l,_=a*c,y=a*h,x=n.x,b=n.y,w=n.z;return i[0]=(1-(f+g))*x,i[1]=(d+y)*x,i[2]=(p-_)*x,i[3]=0,i[4]=(d-y)*b,i[5]=(1-(u+g))*b,
vendor: 4,770 bytes, line 21
21i[6]=(m+v)*b,i[7]=0,i[8]=(p+_)*w,i[9]=(m-v)*w,i[10]=(1-(u+f))*w,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,n){const i=this.elements;let r=Pv.set(i[0],i[1],i[2]).length();const s=Pv.set(i[4],i[5],i[6]).length(),o=Pv.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),e.x=i[12],e.y=i[13],e.z=i[14],Lv.copy(this);const a=1/r,l=1/s,c=1/o;return Lv.elements[0]*=a,Lv.elements[1]*=a,Lv.elements[2]*=a,Lv.elements[4]*=l,Lv.elements[5]*=l,Lv.elements[6]*=l,Lv.elements[8]*=c,Lv.elements[9]*=c,Lv.elements[10]*=c,t.setFromRotationMatrix(Lv),n.x=r,n.y=s,n.z=o,this}makePerspective(e,t,n,i,r,s,o=2e3){const a=this.elements,l=2*r/(t-e),c=2*r/(n-i),h=(t+e)/(t-e),u=(n+i)/(n-i);let d,p;if(o===cg)d=-(s+r)/(s-r),p=-2*s*r/(s-r);else{if(o!==hg)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);d=-s/(s-r),p=-s*r/(s-r)}return a[0]=l,a[4]=0,a[8]=h,a[12]=0,a[1]=0,a[5]=c,a[9]=u,a[13]=0,a[2]=0,a[6]=0,a[10]=d,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,n,i,r,s,o=2e3){const a=this.elements,l=1/(t-e),c=1/(n-i),h=1/(s-r),u=(t+e)*l,d=(n+i)*c;let p,f;if(o===cg)p=(s+r)*h,f=-2*h;else{if(o!==hg)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);p=r*h,f=-1*h}return a[0]=2*l,a[4]=0,a[8]=0,a[12]=-u,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-d,a[2]=0,a[6]=0,a[10]=f,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const Pv=new Qg,Lv=new Rv,Iv=new Qg(0,0,0),Dv=new Qg(1,1,1),Nv=new Qg,Ov=new Qg,Uv=new Qg,kv=new Rv,Fv=new Jg;class Vv{constructor(e=0,t=0,n=0,i=Vv.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,i=this._order){return this._x=e,this._y=t,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const i=e.elements,r=i[0],s=i[4],o=i[8],a=i[1],l=i[5],c=i[9],h=i[2],u=i[6],d=i[10];switch(t){case"XYZ":this._y=Math.asin(vg(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,d),this._z=Math.atan2(-s,r)):(this._x=Math.atan2(u,l),this._z=0);break;case"YXZ":this._x=Math.asin(-vg(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(o,d),this._z=Math.atan2(a,l)):(this._y=Math.atan2(-h,r),this._z=0);break;case"ZXY":this._x=Math.asin(vg(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(a,r));break;case"ZYX":this._y=Math.asin(-vg(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(u,d),this._z=Math.atan2(a,r)):(this._x=0,this._z=Math.atan2(-s,l));break;case"YZX":this._z=Math.asin(vg(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-h,r)):(this._x=0,this._y=Math.atan2(o,d));break;case"XZY":this._z=Math.asin(-vg(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(u,l),this._y=Math.atan2(o,r)):(this._x=Math.atan2(-c,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return kv.makeRotationFromQuaternion(e),this.setFromRotationMatrix(kv,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Fv.setFromEuler(this),this.setFromQuaternion(Fv,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Vv.DEFAULT_ORDER="XYZ";class Bv{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return 0!=(this.mask&e.mask)}
vendor: 5,283 bytes, line 21
21isEnabled(e){return 0!=(this.mask&(1<<e|0))}}let zv=0;const Hv=new Qg,Gv=new Jg,Wv=new Rv,jv=new Qg,qv=new Qg,Xv=new Qg,$v=new Jg,Yv=new Qg(1,0,0),Zv=new Qg(0,1,0),Kv=new Qg(0,0,1),Jv={type:"added"},Qv={type:"removed"};class e_ extends ug{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:zv++}),this.uuid=gg(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=e_.DEFAULT_UP.clone();const e=new Qg,t=new Vv,n=new Jg,i=new Qg(1,1,1);t._onChange((function(){n.setFromEuler(t,!1)})),n._onChange((function(){t.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Rv},normalMatrix:{value:new Tg}}),this.matrix=new Rv,this.matrixWorld=new Rv,this.matrixAutoUpdate=e_.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=e_.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Bv,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Gv.setFromAxisAngle(e,t),this.quaternion.multiply(Gv),this}rotateOnWorldAxis(e,t){return Gv.setFromAxisAngle(e,t),this.quaternion.premultiply(Gv),this}rotateX(e){return this.rotateOnAxis(Yv,e)}rotateY(e){return this.rotateOnAxis(Zv,e)}rotateZ(e){return this.rotateOnAxis(Kv,e)}translateOnAxis(e,t){return Hv.copy(e).applyQuaternion(this.quaternion),this.position.add(Hv.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(Yv,e)}translateY(e){return this.translateOnAxis(Zv,e)}translateZ(e){return this.translateOnAxis(Kv,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(Wv.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?jv.copy(e):jv.set(e,t,n);const i=this.parent;this.updateWorldMatrix(!0,!1),qv.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Wv.lookAt(qv,jv,this.up):Wv.lookAt(jv,qv,this.up),this.quaternion.setFromRotationMatrix(Wv),i&&(Wv.extractRotation(i.matrixWorld),Gv.setFromRotationMatrix(Wv),this.quaternion.premultiply(Gv.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(Jv)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}const t=this.children.indexOf(e);return-1!==t&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(Qv)),this}removeFromParent(){const e=this.parent;return null!==e&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),Wv.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),Wv.multiply(e.parent.matrixWorld)),e.applyMatrix4(Wv),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,i=this.children.length;n<i;n++){const i=this.children[n].getObjectByProperty(e,t);if(void 0!==i)return i}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);const i=this.children;for(let r=0,s=i.length;r<s;r++)i[r].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(qv,e,Xv),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(qv,$v,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix
vendor: 7,540 bytes, line 21
21):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,i=t.length;n<i;n++){const i=t[n];!0!==i.matrixWorldAutoUpdate&&!0!==e||i.updateMatrixWorld(e)}}updateWorldMatrix(e,t){const n=this.parent;if(!0===e&&null!==n&&!0===n.matrixWorldAutoUpdate&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t){const e=this.children;for(let t=0,n=e.length;t<n;t++){const n=e[t];!0===n.matrixWorldAutoUpdate&&n.updateWorldMatrix(!1,!0)}}}toJSON(e){const t=void 0===e||"string"==typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});const i={};function r(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),!0===this.castShadow&&(i.castShadow=!0),!0===this.receiveShadow&&(i.receiveShadow=!0),!1===this.visible&&(i.visible=!1),!1===this.frustumCulled&&(i.frustumCulled=!1),0!==this.renderOrder&&(i.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map((e=>({boxInitialized:e.boxInitialized,boxMin:e.box.min.toArray(),boxMax:e.box.max.toArray(),sphereInitialized:e.sphereInitialized,sphereRadius:e.sphere.radius,sphereCenter:e.sphere.center.toArray()}))),i.maxGeometryCount=this._maxGeometryCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),null!==this.boundingSphere&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),null!==this.boundingBox&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()})),this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,i=n.length;t<i;t++){const i=n[t];r(e.shapes,i)}else r(e.shapes,n)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(r(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const t=[];for(let n=0,i=this.material.length;n<i;n++)t.push(r(e.materials,this.material[n]));i.material=t}else i.material=r(e.materials,this.material);if(this.children.length>0){i.children=[];for(let t=0;t<this.children.length;t++)i.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let t=0;t<this.animations.length;t++){const n=this.animations[t];i.animations.push(r(e.animations,n))}}if(t){const t=s(e.geometries),i=s(e.materials),r=s(e.textures),o=s(e.images),a=s(e.shapes),l=s(e.skeletons),c=s(e.animations),h=s(e.nodes);t.length>0&&(n.geometries=t),i.length>0&&(n.materials=i),r.length>0&&(n.textures=r),o.length>0&&(n.images=o),a.length>0&&(n.shapes=a),l.length>0&&(n.skeletons=l),c.length>0&&(n.animations=c),h.length>0&&(n.nodes=h)}return n.object=i,n;function s(e){const t=[];for(const n in e){const i=e[n];delete i.metadata,t.push(i)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let t=0;t<e.children.length;t++){const n=e.children[t];this.add(n.clone())}return this}}e_.DEFAULT_UP=new Qg(0,1,0),e_.DEFAULT_MATRIX_AUTO_UPDATE=!0,e_.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const t_=new Qg,n_=new Qg,i_=new Qg,r_=new Qg,s_=new Qg,o_=new Qg,a_=new Qg,l_=new Qg,c_=new Qg,h_=new Qg;class u_{constructor(e=new Qg,t=new Qg,n=new Qg){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,i){i.subVectors(n,t),t_.subVectors(e,t),i.cross(t_);const r=i.lengthSq();return r>0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(e,t,n,i,r){t_.subVectors(i,t),n_.subVectors(n,t),i_.subVectors(e,t);const s=t_.dot(t_),o=t_.dot(n_),a=t_.dot(i_),l=n_.dot(n_),c=n_.dot(i_),h=s*l-o*o;if(0===h)return r.set(0,0,0),null;const u=1/h,d=(l*a-o*c)*u,p=(s*c-o*a)*u;return r.set(1-d-p,p,d)}static containsPoint(e,t,n,i){return null!==this.getBarycoord(e,t,n,i,r_)&&(r_.x>=0&&r_.y>=0&&r_.x+r_.y<=1)}static getInterpolation(e,t,n,i,r,s,o,a){return null===this.getBarycoord(e,t,n,i,r_)?(a.x=0,a.y=0,"z"in a&&(a.z=0),"w"in a&&(a.w=0),null):(a.setScalar(0),a.addScaledVector(r,r_.x),a.addScaledVector(s,r_.y),a.addScaledVector(o,r_.z),a)}static isFrontFacing(e,t,n,i){return t_.subVectors(n,t),n_.subVectors(e,t),t_.cross(n_).dot(i)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,i){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,t,n,i){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,i),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return t_.subVectors(this.c,this.b),n_.subVectors(this.a,this.b),.5*t_.cross(n_).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return u_.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return u_.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,i,r){return u_.getInterpolation(e,this.a,this.b,this.c,t,n,i,r)}containsPoint(e){return u_.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return u_.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,i=this.b,r=this.c;let s,o;s_.subVectors(i,n),o_.subVectors(r,n),l_.subVectors(e,n);const a=s_.dot(l_),l=o_.dot(l_);if(a<=0&&l<=0)return t.copy(n);c_.subVectors(e,i);
vendor: 10,317 bytes, line 21
21const c=s_.dot(c_),h=o_.dot(c_);if(c>=0&&h<=c)return t.copy(i);const u=a*h-c*l;if(u<=0&&a>=0&&c<=0)return s=a/(a-c),t.copy(n).addScaledVector(s_,s);h_.subVectors(e,r);const d=s_.dot(h_),p=o_.dot(h_);if(p>=0&&d<=p)return t.copy(r);const f=d*l-a*p;if(f<=0&&l>=0&&p<=0)return o=l/(l-p),t.copy(n).addScaledVector(o_,o);const m=c*p-d*h;if(m<=0&&h-c>=0&&d-p>=0)return a_.subVectors(r,i),o=(h-c)/(h-c+(d-p)),t.copy(i).addScaledVector(a_,o);const g=1/(m+f+u);return s=f*g,o=u*g,t.copy(n).addScaledVector(s_,s).addScaledVector(o_,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const d_={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},p_={h:0,s:0,l:0},f_={h:0,s:0,l:0};function m_(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}class g_{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(void 0===t&&void 0===n){const t=e;t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t="srgb"){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,kg.toWorkingColorSpace(this,t),this}setRGB(e,t,n,i=kg.workingColorSpace){return this.r=e,this.g=t,this.b=n,kg.toWorkingColorSpace(this,i),this}setHSL(e,t,n,i=kg.workingColorSpace){if(e=_g(e,1),t=vg(t,0,1),n=vg(n,0,1),0===t)this.r=this.g=this.b=n;else{const i=n<=.5?n*(1+t):n+t-n*t,r=2*n-i;this.r=m_(r,i,e+1/3),this.g=m_(r,i,e),this.b=m_(r,i,e-1/3)}return kg.toWorkingColorSpace(this,i),this}setStyle(e,t="srgb"){function n(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const s=i[1],o=i[2];switch(s){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const n=i[1],r=n.length;if(3===r)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,t);if(6===r)return this.setHex(parseInt(n,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t="srgb"){const n=d_[e.toLowerCase()];return void 0!==n?this.setHex(n,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Fg(e.r),this.g=Fg(e.g),this.b=Fg(e.b),this}copyLinearToSRGB(e){return this.r=Vg(e.r),this.g=Vg(e.g),this.b=Vg(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e="srgb"){return kg.fromWorkingColorSpace(v_.copy(this),e),65536*Math.round(vg(255*v_.r,0,255))+256*Math.round(vg(255*v_.g,0,255))+Math.round(vg(255*v_.b,0,255))}getHexString(e="srgb"){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=kg.workingColorSpace){kg.fromWorkingColorSpace(v_.copy(this),t);const n=v_.r,i=v_.g,r=v_.b,s=Math.max(n,i,r),o=Math.min(n,i,r);let a,l;const c=(o+s)/2;if(o===s)a=0,l=0;else{const e=s-o;switch(l=c<=.5?e/(s+o):e/(2-s-o),s){case n:a=(i-r)/e+(i<r?6:0);break;case i:a=(r-n)/e+2;break;case r:a=(n-i)/e+4}a/=6}return e.h=a,e.s=l,e.l=c,e}getRGB(e,t=kg.workingColorSpace){return kg.fromWorkingColorSpace(v_.copy(this),t),e.r=v_.r,e.g=v_.g,e.b=v_.b,e}getStyle(e="srgb"){kg.fromWorkingColorSpace(v_.copy(this),e);const t=v_.r,n=v_.g,i=v_.b;return e!==Km?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(255*t)},${Math.round(255*n)},${Math.round(255*i)})`}offsetHSL(e,t,n){return this.getHSL(p_),this.setHSL(p_.h+e,p_.s+t,p_.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(p_),e.getHSL(f_);const n=yg(p_.h,f_.h,t),i=yg(p_.s,f_.s,t),r=yg(p_.l,f_.l,t);return this.setHSL(n,i,r),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,n=this.g,i=this.b,r=e.elements;return this.r=r[0]*t+r[3]*n+r[6]*i,this.g=r[1]*t+r[4]*n+r[7]*i,this.b=r[2]*t+r[5]*n+r[8]*i,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const v_=new g_;g_.NAMES=d_;let __=0;class y_ extends ug{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:__++}),this.uuid=gg(),this.name="",this.type="Material",this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=pm,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new g_(0,0,0),this.blendAlpha=0,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=sg,this.stencilZFail=sg,this.stencilZPass=sg,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const i=this[t];void 0!==i?i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[t]=n:console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function i(e){const t=[];for(const n in e){const i=e[n];delete i.metadata,t.push(i)}return t}
vendor: 5,282 bytes, line 21
21if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),void 0!==this.anisotropy&&(n.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),0!==this.side&&(n.side=this.side),!0===this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=!0),204!==this.blendSrc&&(n.blendSrc=this.blendSrc),205!==this.blendDst&&(n.blendDst=this.blendDst),this.blendEquation!==pm&&(n.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(n.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&
vendor: 10,971 bytes, line 21
21(n.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(n.blendAlpha=this.blendAlpha),3!==this.depthFunc&&(n.depthFunc=this.depthFunc),!1===this.depthTest&&(n.depthTest=this.depthTest),!1===this.depthWrite&&(n.depthWrite=this.depthWrite),!1===this.colorWrite&&(n.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(n.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(n.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(n.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==sg&&(n.stencilFail=this.stencilFail),this.stencilZFail!==sg&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==sg&&(n.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(n.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaHash&&(n.alphaHash=!0),!0===this.alphaToCoverage&&(n.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=!0),!0===this.forceSinglePass&&(n.forceSinglePass=!0),!0===this.wireframe&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),t){const t=i(e.textures),r=i(e.images);t.length>0&&(n.textures=t),r.length>0&&(n.images=r)}return n}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let i=0;i!==e;++i)n[i]=t[i].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}class x_ extends y_{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new g_(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const b_=new Qg,w_=new Mg;class S_{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=n,this.usage=og,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Im,this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}get updateRange(){return Ig("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[e+i]=t.array[n+i];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,n=this.count;t<n;t++)w_.fromBufferAttribute(this,t),w_.applyMatrix3(e),this.setXY(t,w_.x,w_.y);else if(3===this.itemSize)for(let t=0,n=this.count;t<n;t++)b_.fromBufferAttribute(this,t),b_.applyMatrix3(e),this.setXYZ(t,b_.x,b_.y,b_.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)b_.fromBufferAttribute(this,t),b_.applyMatrix4(e),this.setXYZ(t,b_.x,b_.y,b_.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)b_.fromBufferAttribute(this,t),b_.applyNormalMatrix(e),this.setXYZ(t,b_.x,b_.y,b_.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)b_.fromBufferAttribute(this,t),b_.transformDirection(e),this.setXYZ(t,b_.x,b_.y,b_.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=wg(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=Sg(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=wg(t,this.array)),t}setX(e,t){return this.normalized&&(t=Sg(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=wg(t,this.array)),t}setY(e,t){return this.normalized&&(t=Sg(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=wg(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Sg(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=wg(t,this.array)),t}setW(e,t){return this.normalized&&(t=Sg(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Sg(t,this.array),n=Sg(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,i){return e*=this.itemSize,this.normalized&&(t=Sg(t,this.array),n=Sg(n,this.array),i=Sg(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e*=this.itemSize,this.normalized&&(t=Sg(t,this.array),n=Sg(n,this.array),i=Sg(i,this.array),r=Sg(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this.array[e+3]=r,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),this.usage!==og&&(e.usage=this.usage),e}}class E_ extends S_{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class M_ extends S_{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class T_ extends S_{constructor(e,t,n){super(new Float32Array(e),t,n)}}let A_=0;const C_=new Rv,R_=new e_,P_=new Qg,L_=new nv,I_=new nv,D_=new Qg;class N_ extends ug{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:A_++}),this.uuid=gg(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(Cg(e)?M_:E_)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const t=(new Tg).getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}const i=this.attributes.tangent;return void 0!==i&&(i.transformDirection(e),i.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return C_.makeRotationFromQuaternion(e),this.applyMatrix4(C_),this}rotateX(e){return C_.makeRotationX(e),this.applyMatrix4(C_),this}rotateY(e){return C_.makeRotationY(e),this.applyMatrix4(C_),this}rotateZ(e){return C_.makeRotationZ(e),this.applyMatrix4(C_),this}translate(e,t,n){return C_.makeTranslation(e,t,n),this.applyMatrix4(C_),this}scale(e,t,n){return C_.makeScale(e,t,n),this.applyMatrix4(C_),this}lookAt(e){return R_.lookAt(e),R_.updateMatrix(),this.applyMatrix4(R_.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(P_).negate(),this.translate(P_.x,P_.y,P_.z),this}setFromPoints(e){const t=[];for(let n=0,i=e.length;n<i;n++){const i=e[n];t.push(i.x,i.y,i.z||0)}return this.setAttribute("position",new T_(t,3)),this}
vendor: 1,434 bytes, line 21
21computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new nv);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new Qg(-1/0,-1/0,-1/0),new Qg(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];L_.setFromBufferAttribute(n),this.morphTargetsRelative?(D_.addVectors(this.boundingBox.min,L_.min),this.boundingBox.expandByPoint(D_),D_.addVectors(this.boundingBox.max,L_.max),this.boundingBox.expandByPoint(D_)):(this.boundingBox.expandByPoint(L_.min),this.boundingBox.expandByPoint(L_.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new xv);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "fal
21se".',this),void this.boundingSphere.set(new Qg,1/0);if(e){const n=this.boundingSphere.center;if(L_.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];I_.setFromBufferAttribute(n),this.morphTargetsRelative?(D_.addVectors(L_.min,I_.min),L_.expandByPoint(D_),D_.addVectors(L_.max,I_.max),L_.expandByPoint(D_)):(L_.expandByPoint(I_.min),L_.expandByPoint(I_.max))}L_.getCenter(n);let i=0;for(let t=0,r=e.count;t<r;t++)D_.fromBufferAttribute(e,t),i=Math.max(i,n.distanceToSquared(D_));if(t)for(let r=0,s=t.length;r<s;r++){const s=t[r],o=this.morphTargetsRelative;for(let t=0,r=s.count;t<r;t++)D_.fromBufferAttribute(s,t),o&&(P_.fromBufferAttribute(e,t),D_.add(P_)),i=Math.max(i,n.distanceToSquared(D_))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=e.array,i=t.position.array,r=t.normal.array,s=t.uv.array,o=i.length/3;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new S_(new Float32Array(4*o),4));const a=this.getAttribute("tangent").array,l=[],c=[];for(let e=0;e<o;e++)l[e]=new Qg,c[e]=new Qg;const h=new Qg,u=new Qg,d=new Qg,p=new Mg,f=new Mg,m=new Mg,g=new Qg,v=new Qg;function _(e,t,n){h.fromArray(i,3*e),u.fromArray(i,3*t),d.fromArray(i,3*n),p.fromArray(s,2*e),f.fromArray(s,2*t),m.fromArray(s,2*n),u.sub(h),d.sub(h),f.sub(p),m.sub(p);const r=1/(f.x*m.y-m.x*f.y);isFinite(r)&&(g.copy(u).multiplyScalar(m.y).addScaledVector(d,-f.y).multiplyScalar(r),v.copy(d).multiplyScalar(f.x).addScaledVector(u,-m.x).multiplyScalar(r),l[e].add(g),l[t].add(g),l[n].add(g),c[e].add(v),c[t].add(v),c[n].add(v))}let y=this.groups;0===y.length&&(y=[{start:0,count:n.length}]);for(let e=0,t=y.length;e<t;++e){const t=y[e],i=t.start;for(let e=i,r=i+t.count;e<r;e+=3)_(n[e+0],n[e+1],n[e+2])}const x=new Qg,b=new Qg,w=new Qg,S=new Qg;function E(e){w.fromArray(r,3*e),S.copy(w);const t=l[e];x.copy(t),x.sub(w.multiplyScalar(w.dot(t))).normalize(),b.crossVectors(S,t);const n=b.dot(c[e])<0?-1:1;a[4*e]=x.x,a[4*e+1]=x.y,a[4*e+2]=x.z,a[4*e+3]=n}for(let e=0,t=y.length;e<t;++e){const t=y[e],i=t.start;for(let e=i,r=i+t.count;e<r;e+=3)E(n[e+0]),E(n[e+1]),E(n[e+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(void 0!==t){let n=this.getAttribute("normal");if(void 0===n)n=new S_(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(let e=0,t=n.count;e<t;e++)n.setXYZ(e,0,0,0);const i=new Qg,r=new Qg,s=new Qg,o=new Qg,a=new Qg,l=new Qg,c=new Qg,h=new Qg;if(e)for(let u=0,d=e.count;u<d;u+=3){const d=e.getX(u+0),p=e.getX(u+1),f=e.getX(u+2);i.fromBufferAttribute(t,d),r.fromBufferAttribute(t,p),s.fromBufferAttribute(t,f),c.subVectors(s,r),h.subVectors(i,r),c.cross(h),o.fromBufferAttribute(n,d),a.fromBufferAttribute(n,p),l.fromBufferAttribute(n,f),o.add(c),a.add(c),l.add(c),n.setXYZ(d,o.x,o.y,o.z),n.setXYZ(p,a.x,a.y,a.z),n.setXYZ(f,l.x,l.y,l.z)}else for(let e=0,o=t.count;e<o;e+=3)i.fromBufferAttribute(t,e+0),r.fromBufferAttribute(t,e+1),s.fromBufferAttribute(t,e+2),c.subVectors(s,r),h.subVectors(i,r),c.cross(h),n.setXYZ(e+0,c.x,c.y,c.z),n.setXYZ(e+1,c.x,c.y,c.z),n.setXYZ(e+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)D_.fromBufferAttribute(e,t),D_.normalize(),e.setXYZ(t,D_.x,D_.y,D_.z)}toNonIndexed(){function e(e,t){const n=e.array,i=e.itemSize,r=e.normalized,s=new n.constructor(t.length*i);let o=0,a=0;for(let r=0,l=t.length;r<l;r++){o=e.isInterleavedBufferAttribute?t[r]*e.data.stride+e.offset:t[r]*i;for(let e=0;e<i;e++)s[a++]=n[o++]}return new S_(s,i,r)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new N_,n=this.index.array,i=this.attributes;for(const r in i){const s=e(i[r],n);t.setAttribute(r,s)}const r=this.morphAttributes;for(const i in r){const s=[],o=r[i];for(let t=0,i=o.length;t<i;t++){const i=e(o[t],n);s.push(i)}t.morphAttributes[i]=s}t.morphTargetsRelative=this.morphTargetsRelative;const s=this.groups;for(let e=0,n=s.length;e<n;e++){const n=s[e];t.addGroup(n.start,n.count,n.materialIndex)}return t}toJSON(){const e={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};
vendor: 5,180 bytes, line 21
21if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const t in n){const i=n[t];e.data.attributes[t]=i.toJSON(e.data)}const i={};let r=!1;for(const t in this.morphAttributes){const n=this.morphAttributes[t],s=[];for(let t=0,i=n.length;t<i;t++){const i=n[t];s.push(i.toJSON(e.data))}s.length>0&&(i[t]=s,r=!0)}r&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));const o=this.boundingSphere;return null!==o&&(e.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const i=e.attributes;for(const e in i){const n=i[e];this.setAttribute(e,n.clone(t))}const r=e.morphAttributes;for(const e in r){const n=[],i=r[e];for(let e=0,r=i.length;e<r;e++)n.push(i[e].clone(t));this.morphAttributes[e]=n}this.morphTargetsRelative=e.morphTargetsRelative;const s=e.groups;for(let e=0,t=s.length;e<t;e++){const t=s[e];this.addGroup(t.start,t.count,t.materialIndex)}const o=e.boundingBox;null!==o&&(this.boundingBox=o.clone());const a=e.boundingSphere;return null!==a&&(this.boundingSphere=a.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const O_=new Rv,U_=new Cv,k_=new xv,F_=new Qg,V_=new Qg,B_=new Qg,z_=new Qg,H_=new Qg,G_=new Qg,W_=new Mg,j_=new Mg,q_=new Mg,X_=new Qg,$_=new Qg,Y_=new Qg,Z_=new Qg,K_=new Qg;class J_ extends e_{constructor(e=new N_,t=new x_){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}getVertexPosition(e,t){const n=this.geometry,i=n.attributes.position,r=n.morphAttributes.position,s=n.morphTargetsRelative;t.fromBufferAttribute(i,e);const o=this.morphTargetInfluences;if(r&&o){G_.set(0,0,0);for(let n=0,i=r.length;n<i;n++){const i=o[n],a=r[n];0!==i&&(H_.fromBufferAttribute(a,e),s?G_.addScaledVector(H_,i):G_.addScaledVector(H_.sub(t),i))}t.add(G_)}return t}raycast(e,t){const n=this.geometry,i=this.material,r=this.matrixWorld;if(void 0!==i){if(null===n.boundingSphere&&n.computeBoundingSphere(),k_.copy(n.boundingSphere),k_.applyMatrix4(r),U_.copy(e.ray).recast(e.near),!1===k_.containsPoint(U_.origin)){if(null===U_.intersectSphere(k_,F_))return;if(U_.origin.distanceToSquared(F_)>(e.far-e.near)**2)return}O_.copy(r).invert(),U_.copy(e.ray).applyMatrix4(O_),null!==n.boundingBox&&!1===U_.intersectsBox(n.boundingBox)||this._computeIntersections(e,t,U_)}}_computeIntersections(e,t,n){let i;const r=this.geometry,s=this.material,o=r.index,a=r.attributes.position,l=r.attributes.uv,c=r.attributes.uv1,h=r.attributes.normal,u=r.groups,d=r.drawRange;if(null!==o)if(Array.isArray(s))for(let r=0,a=u.length;r<a;r++){const a=u[r],p=s[a.materialIndex];for(let r=Math.max(a.start,d.start),s=Math.min(o.count,Math.min(a.start+a.count,d.start+d.count));r<s;r+=3){i=Q_(this,p,e,n,l,c,h,o.getX(r),o.getX(r+1),o.getX(r+2)),i&&(i.faceIndex=Math.floor(r/3),i.face.materialIndex=a.materialIndex,t.push(i))}}else{for(let r=Math.max(0,d.start),a=Math.min(o.count,d.start+d.count);r<a;r+=3){i=Q_(this,s,e,n,l,c,h,o.getX(r),o.getX(r+1),o.getX(r+2)),i&&(i.faceIndex=Math.floor(r/3),t.push(i))}}else if(void 0!==a)if(Array.isArray(s))for(let r=0,o=u.length;r<o;r++){const o=u[r],p=s[o.materialIndex];for(let r=Math.max(o.start,d.start),s=Math.min(a.count,Math.min(o.start+o.count,d.start+d.count));r<s;r+=3){i=Q_(this,p,e,n,l,c,h,r,r+1,r+2),i&&(i.faceIndex=Math.floor(r/3),i.face.materialIndex=o.materialIndex,t.push(i))}}else{for(let r=Math.max(0,d.start),o=Math.min(a.count,d.start+d.count);r<o;r+=3){i=Q_(this,s,e,n,l,c,h,r,r+1,r+2),i&&(i.faceIndex=Math.floor(r/3),t.push(i))}}}}function Q_(e,t,n,i,r,s,o,a,l,c){e.getVertexPosition(a,V_),e.getVertexPosition(l,B_),e.getVertexPosition(c,z_);const h=function(e,t,n,i,r,s,o,a){let l;if(l=1===t.side?i.intersectTriangle(o,s,r,!0,a):i.intersectTriangle(r,s,o,0===t.side,a),null===l)return null;
vendor: 10,491 bytes, line 21
21K_.copy(a),K_.applyMatrix4(e.matrixWorld);const c=n.ray.origin.distanceTo(K_);return c<n.near||c>n.far?null:{distance:c,point:K_.clone(),object:e}}(e,t,n,i,V_,B_,z_,Z_);if(h){r&&(W_.fromBufferAttribute(r,a),j_.fromBufferAttribute(r,l),q_.fromBufferAttribute(r,c),h.uv=u_.getInterpolation(Z_,V_,B_,z_,W_,j_,q_,new Mg)),s&&(W_.fromBufferAttribute(s,a),j_.fromBufferAttribute(s,l),q_.fromBufferAttribute(s,c),h.uv1=u_.getInterpolation(Z_,V_,B_,z_,W_,j_,q_,new Mg),h.uv2=h.uv1),o&&(X_.fromBufferAttribute(o,a),$_.fromBufferAttribute(o,l),Y_.fromBufferAttribute(o,c),h.normal=u_.getInterpolation(Z_,V_,B_,z_,X_,$_,Y_,new Qg),h.normal.dot(i.direction)>0&&h.normal.multiplyScalar(-1));const e={a:a,b:l,c:c,normal:new Qg,materialIndex:0};u_.getNormal(V_,B_,z_,e.normal),h.face=e}return h}class ey extends N_{constructor(e=1,t=1,n=1,i=1,r=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:i,heightSegments:r,depthSegments:s};const o=this;i=Math.floor(i),r=Math.floor(r),s=Math.floor(s);const a=[],l=[],c=[],h=[];let u=0,d=0;function p(e,t,n,i,r,s,p,f,m,g,v){const _=s/m,y=p/g,x=s/2,b=p/2,w=f/2,S=m+1,E=g+1;let M=0,T=0;const A=new Qg;for(let s=0;s<E;s++){const o=s*y-b;for(let a=0;a<S;a++){const u=a*_-x;A[e]=u*i,A[t]=o*r,A[n]=w,l.push(A.x,A.y,A.z),A[e]=0,A[t]=0,A[n]=f>0?1:-1,c.push(A.x,A.y,A.z),h.push(a/m),h.push(1-s/g),M+=1}}for(let e=0;e<g;e++)for(let t=0;t<m;t++){const n=u+t+S*e,i=u+t+S*(e+1),r=u+(t+1)+S*(e+1),s=u+(t+1)+S*e;a.push(n,i,s),a.push(i,r,s),T+=6}o.addGroup(d,T,v),d+=T,u+=M}p("z","y","x",-1,-1,n,t,e,s,r,0),p("z","y","x",1,-1,n,t,-e,s,r,1),p("x","z","y",1,1,e,n,t,i,s,2),p("x","z","y",1,-1,e,n,-t,i,s,3),p("x","y","z",1,-1,e,t,n,i,r,4),p("x","y","z",-1,-1,e,t,-n,i,r,5),this.setIndex(a),this.setAttribute("position",new T_(l,3)),this.setAttribute("normal",new T_(c,3)),this.setAttribute("uv",new T_(h,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ey(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function ty(e){const t={};for(const n in e){t[n]={};for(const i in e[n]){const r=e[n][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[n][i]=null):t[n][i]=r.clone():Array.isArray(r)?t[n][i]=r.slice():t[n][i]=r}}return t}function ny(e){const t={};for(let n=0;n<e.length;n++){const i=ty(e[n]);for(const e in i)t[e]=i[e]}return t}function iy(e){return null===e.getRenderTarget()?e.outputColorSpace:kg.workingColorSpace}const ry={clone:ty,merge:ny};class sy extends y_{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1,clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=ty(e.uniforms),this.uniformsGroups=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].clone());return t}(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const n in this.uniforms){const i=this.uniforms[n].value;i&&i.isTexture?t.uniforms[n]={type:"t",value:i.toJSON(e).uuid}:i&&i.isColor?t.uniforms[n]={type:"c",value:i.getHex()}:i&&i.isVector2?t.uniforms[n]={type:"v2",value:i.toArray()}:i&&i.isVector3?t.uniforms[n]={type:"v3",value:i.toArray()}:i&&i.isVector4?t.uniforms[n]={type:"v4",value:i.toArray()}:i&&i.isMatrix3?t.uniforms[n]={type:"m3",value:i.toArray()}:i&&i.isMatrix4?t.uniforms[n]={type:"m4",value:i.toArray()}:t.uniforms[n]={value:i}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const e in this.extensions)!0===this.extensions[e]&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class oy extends e_{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Rv,this.projectionMatrix=new Rv,this.projectionMatrixInverse=new Rv,this.coordinateSystem=cg}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}const ay=new Qg,ly=new Mg,cy=new Mg;class hy extends oy{constructor(e=50,t=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*mg*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*fg*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*mg*Math.atan(Math.tan(.5*fg*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){ay.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(ay.x,ay.y).multiplyScalar(-e/ay.z),ay.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(ay.x,ay.y).multiplyScalar(-e/ay.z)}getViewSize(e,t){return this.getViewBounds(e,ly,cy),t.subVectors(cy,ly)}setViewOffset(e,t,n,i,r,s){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*fg*this.fov)/this.zoom,n=2*t,i=this.aspect*n,r=-.5*i;const s=this.view;if(null!==this.view&&this.view.enabled){const e=s.fullWidth,o=s.fullHeight;r+=s.offsetX*i/e,t-=s.offsetY*n/o,i*=s.width/e,n*=s.height/o}const o=this.filmOffset;0!==o&&(r+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,t,t-n,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const uy=-90;class dy extends e_{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new hy(uy,1,e,t);i.layers=this.layers,this.add(i);const r=new hy(uy,1,e,t);r.layers=this.layers,this.add(r);const s=new hy(uy,1,e,t);s.layers=this.layers,this.add(s);const o=new hy(uy,1,e,t);o.layers=this.layers,this.add(o);const a=new hy(uy,1,e,t);a.layers=this.layers,this.add(a);const l=new hy(uy,1,e,t);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,i,r,s,o,a]=t;for(const e of t)this.remove(e);if(e===cg)n.up.set(0,1,0),n.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),s.up.set(0,0,1),s.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),a.up.set(0,1,0),a.lookAt(0,0,-1);else{if(e!==hg)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);n.up.set(0,-1,0),n.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),s.up.set(0,0,-1),s.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),a.up.set(0,-1,0),a.lookAt(0,0,-1)}for(const e of t)this.add(e),e.updateMatrixWorld()}update(e,t){null===this.parent&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,s,o,a,l,c]=this.children,h=e.getRenderTarget(),u=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;const f=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,i),e.render(t,r),e.setRenderTarget(n,1,i),e.render(t,s),e.setRenderTarget(n,2,i),e.render(t,o),e.setRenderTarget(n,3,i),e.render(t,a),e.setRenderTarget(n,4,i),e.render(t,l),n.texture.generateMipmaps=f,e.setRenderTarget(n,5,i),e.render(t,c),e.setRenderTarget(h,u,d),e.xr.enabled=p,n.texture.needsPMREMUpdate=!0}}class py extends qg{constructor(e,t,n,i,r,s,o,a,l,c){super(e=void 0!==e?e:[],t=void 0!==t?t:fm,n,i,r,s,o,a,l,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class fy extends Yg{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},i=[n,n,n,n,n,n];void 0!==t.encoding&&(Ig("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace
vendor: 8,837 bytes, line 21
21=t.encoding===Ym?Km:Zm),this.texture=new py(i,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:Mm}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},i=new ey(5,5,5),r=new sy({name:"CubemapFromEquirect",uniforms:ty(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:1,blending:0});r.uniforms.tEquirect.value=t;const s=new J_(i,r),o=t.minFilter;t.minFilter===Am&&(t.minFilter=Mm);return new dy(1,10,this).update(e,s),t.minFilter=o,s.geometry.dispose(),s.material.dispose(),this}clear(e,t,n,i){const r=e.getRenderTarget();for(let r=0;r<6;r++)e.setRenderTarget(this,r),e.clear(t,n,i);e.setRenderTarget(r)}}const my=new Qg,gy=new Qg,vy=new Tg;class _y{constructor(e=new Qg(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,i){return this.normal.set(e,t,n),this.constant=i,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const i=my.subVectors(n,t).cross(gy.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const n=e.delta(my),i=this.normal.dot(n);if(0===i)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/i;return r<0||r>1?null:t.copy(e.start).addScaledVector(n,r)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||vy.getNormalMatrix(e),i=this.coplanarPoint(my).applyMatrix4(e),r=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const yy=new xv,xy=new Qg;class by{constructor(e=new _y,t=new _y,n=new _y,i=new _y,r=new _y,s=new _y){this.planes=[e,t,n,i,r,s]}set(e,t,n,i,r,s){const o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(i),o[4].copy(r),o[5].copy(s),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=2e3){const n=this.planes,i=e.elements,r=i[0],s=i[1],o=i[2],a=i[3],l=i[4],c=i[5],h=i[6],u=i[7],d=i[8],p=i[9],f=i[10],m=i[11],g=i[12],v=i[13],_=i[14],y=i[15];if(n[0].setComponents(a-r,u-l,m-d,y-g).normalize(),n[1].setComponents(a+r,u+l,m+d,y+g).normalize(),n[2].setComponents(a+s,u+c,m+p,y+v).normalize(),n[3].setComponents(a-s,u-c,m-p,y-v).normalize(),n[4].setComponents(a-o,u-h,m-f,y-_).normalize(),t===cg)n[5].setComponents(a+o,u+h,m+f,y+_).normalize();else{if(t!==hg)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);n[5].setComponents(o,h,f,_).normalize()}return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),yy.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),yy.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(yy)}intersectsSprite(e){return yy.center.set(0,0,0),yy.radius=.7071067811865476,yy.applyMatrix4(e.matrixWorld),this.intersectsSphere(yy)}intersectsSphere(e){const t=this.planes,n=e.center,i=-e.radius;for(let e=0;e<6;e++){if(t[e].distanceToPoint(n)<i)return!1}return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const i=t[n];if(xy.x=i.normal.x>0?e.max.x:e.min.x,xy.y=i.normal.y>0?e.max.y:e.min.y,xy.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(xy)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function wy(){let e=null,t=!1,n=null,i=null;function r(t,s){n(t,s),i=e.requestAnimationFrame(r)}return{start:function(){!0!==t&&null!==n&&(i=e.requestAnimationFrame(r),t=!0)},stop:function(){e.cancelAnimationFrame(i),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function Sy(e,t){const n=t.isWebGL2,i=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),i.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=i.get(t);n&&(e.deleteBuffer(n.buffer),i.delete(t))},update:function(t,r){if(t.isGLBufferAttribute){const e=i.get(t);return void((!e||e.version<t.version)&&i.set(t,{buffer:t.buffer,type:t.type,bytesPerElement:t.elementSize,version:t.version}))}t.isInterleavedBufferAttribute&&(t=t.data);const s=i.get(t);if(void 0===s)i.set(t,function(t,i){const r=t.array,s=t.usage,o=r.byteLength,a=e.createBuffer();let l;if(e.bindBuffer(i,a),e.bufferData(i,r,s),t.onUploadCallback(),r instanceof Float32Array)l=e.FLOAT;else if(r instanceof Uint16Array)if(t.isFloat16BufferAttribute){if(!n)throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");l=e.HALF_FLOAT}else l=e.UNSIGNED_SHORT;else if(r instanceof Int16Array)l=e.SHORT;else if(r instanceof Uint32Array)l=e.UNSIGNED_INT;else if(r instanceof Int32Array)l=e.INT;else if(r instanceof Int8Array)l=e.BYTE;else if(r instanceof Uint8Array)l=e.UNSIGNED_BYTE;else{if(!(r instanceof Uint8ClampedArray))throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+r);l=e.UNSIGNED_BYTE}return{buffer:a,type:l,bytesPerElement:r.BYTES_PER_ELEMENT,version:t.version,size:o}}(t,r));else if(s.version<t.version){if(s.size!==t.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");!function(t,i,r){const s=i.array,o=i._updateRange,a=i.updateRanges;if(e.bindBuffer(r,t),-1===o.count&&0===a.length&&e.bufferSubData(r,0,s),0!==a.length){for(let t=0,i=a.length;t<i;t++){const i=a[t];n?e.bufferSubData(r,i.start*s.BYTES_PER_ELEMENT,s,i.start,i.count):e.bufferSubData(r,i.start*s.BYTES_PER_ELEMENT,s.subarray(i.start,i.start+i.count))}i.clearUpdateRanges()}-1!==o.count&&(n?e.bufferSubData(r,o.offset*s.BYTES_PER_ELEMENT,s,o.offset,o.count):e.bufferSubData(r,o.offset*s.BYTES_PER_ELEMENT,s.subarray(o.offset,o.offset+o.count)),o.count=-1),i.onUploadCallback()}(s.buffer,t,r),s.version=t.version}}}}class Ey extends N_{constructor(e=1,t=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:i};const r=e/2,s=t/2,o=Math.floor(n),a=Math.floor(i),l=o+1,c=a+1,h=e/o,u=t/a,d=[],p=[],f=[],m=[];for(let e=0;e<c;e++){const t=e*u-s;for(let n=0;n<l;n++){const i=n*h-r;p.push(i,-t,0),f.push(0,0,1),m.push(n/o),m.push(1-e/a)}}for(let e=0;e<a;e++)for(let t=0;t<o;t++){const n=t+l*e,i=t+l*(e+1),r=t+1+l*(e+1),s=t+1+l*e;d.push(n,i,s),d.push(i,r,s)}this.setIndex(d),this.setAttribute("position",new T_(p,3)),this.setAttribute("normal",new T_(f,3)),this.setAttribute("uv",new T_(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Ey(e.width,e.height,e.widthSegments,e.heightSegments)}}const My
vendor: 21,217 bytes, line 21
21={alphahash_fragment:"#ifdef USE_ALPHAHASH\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif",alphahash_pars_fragment:"#ifdef USE_ALPHAHASH\n\tconst float ALPHA_HASH_SCALE = 0.05;\n\tfloat hash2D( vec2 value ) {\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\t}\n\tfloat hash3D( vec3 value ) {\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\t}\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\t}\n#endif",alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n\t#ifdef ALPHA_TO_COVERAGE\n\tdiffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\tif ( diffuseColor.a < alphaTest ) discard;\n\t#endif\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_CLEARCOAT ) \n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_SHEEN ) \n\t\tsheenSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",batching_pars_vertex:"#ifdef USE_BATCHING\n\tattribute float batchId;\n\tuniform highp sampler2D batchingTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",batching_vertex:"#ifdef USE_BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( batchId );\n#endif",begin_vertex:"vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n\tvPosition = vec3( position );\n#endif",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated",iridescence_fragment:"#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\treturn vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#ifdef ALPHA_TO_COVERAGE\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tfloat unionClipOpacity = 1.0;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\t\t#endif\n\t\tdiffuseColor.a *= clipOpacity;\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tbool clipped = true;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tif ( clipped ) discard;\n\t\t#endif\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn 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 );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap,
21vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap,
vendor: 17,734 bytes, line 21
21 reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alph
vendor: 11,921 bytes, line 21
21aB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;
vendor: 10,827 bytes, line 21
21\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morph
21color_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];
vendor: 24,771 bytes, line 21
21\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;
vendor: 2,890 bytes, line 21
21\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor *= toneMappingExposure;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\tcolor = clamp( color, 0.0, 1.0 );\n\treturn color;\n}\nvec3
21CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );
vendor: 8,954 bytes, line 21
21\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float
21flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",depth_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;
21\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:
vendor: 4,191 bytes, line 21
21"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}"
vendor: 8,641 bytes, line 21
21,meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}"},Ty={common:{diffuse:{value:new g_(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Tg},alphaMap:{value:null},alphaMapTransform:{value:new Tg},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Tg}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Tg}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Tg}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Tg},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Tg},normalScale:{value:new Mg(1,1)}}
vendor: 7,471 bytes, line 21
21,displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Tg},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Tg}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Tg}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Tg}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new g_(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new g_(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Tg},alphaTest:{value:0},uvTransform:{value:new Tg}},sprite:{diffuse:{value:new g_(16777215)},opacity:{value:1},center:{value:new Mg(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Tg},alphaMap:{value:null},alphaMapTransform:{value:new Tg},alphaTest:{value:0}}},Ay={basic:{uniforms:ny([Ty.common,Ty.specularmap,Ty.envmap,Ty.aomap,Ty.lightmap,Ty.fog]),vertexShader:My.meshbasic_vert,fragmentShader:My.meshbasic_frag},lambert:{uniforms:ny([Ty.common,Ty.specularmap,Ty.envmap,Ty.aomap,Ty.lightmap,Ty.emissivemap,Ty.bumpmap,Ty.normalmap,Ty.displacementmap,Ty.fog,Ty.lights,{emissive:{value:new g_(0)}}]),vertexShader:My.meshlambert_vert,fragmentShader:My.meshlambert_frag},phong:{uniforms:ny([Ty.common,Ty.specularmap,Ty.envmap,Ty.aomap,Ty.lightmap,Ty.emissivemap,Ty.bumpmap,Ty.normalmap,Ty.displacementmap,Ty.fog,Ty.lights,{emissive:{value:new g_(0)},specular:{value:new g_(1118481)},shininess:{value:30}}]),vertexShader:My.meshphong_vert,fragmentShader:My.meshphong_frag},standard:{uniforms:ny([Ty.common,Ty.envmap,Ty.aomap,Ty.lightmap,Ty.emissivemap,Ty.bumpmap,Ty.normalmap,Ty.displacementmap,Ty.roughnessmap,Ty.metalnessmap,Ty.fog,Ty.lights,{emissive:{value:new g_(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:My.meshphysical_vert,fragmentShader:My.meshphysical_frag},toon:{uniforms:ny([Ty.common,Ty.aomap,Ty.lightmap,Ty.emissivemap,Ty.bumpmap,Ty.normalmap,Ty.displacementmap,Ty.gradientmap,Ty.fog,Ty.lights,{emissive:{value:new g_(0)}}]),vertexShader:My.meshtoon_vert,fragmentShader:My.meshtoon_frag},matcap:{uniforms:ny([Ty.common,Ty.bumpmap,Ty.normalmap,Ty.displacementmap,Ty.fog,{matcap:{value:null}}]),vertexShader:My.meshmatcap_vert,fragmentShader:My.meshmatcap_frag},points:{uniforms:ny([Ty.points,Ty.fog]),vertexShader:My.points_vert,fragmentShader:My.points_frag},dashed:{uniforms:ny([Ty.common,Ty.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:My.linedashed_vert,fragmentShader:My.linedashed_frag},depth:{uniforms:ny([Ty.common,Ty.displacementmap]),vertexShader:My.depth_vert,fragmentShader:My.depth_frag},normal:{uniforms:ny([Ty.common,Ty.bumpmap,Ty.normalmap,Ty.displacementmap,{opacity:{value:1}}]),vertexShader:My.meshnormal_vert,fragmentShader:My.meshnormal_frag},sprite:{uniforms:ny([Ty.sprite,Ty.fog]),vertexShader:My.sprite_vert,fragmentShader:My.sprite_frag},background:{uniforms:{uvTransform:{value:new Tg},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:My.background_vert,fragmentShader:My.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:My.backgroundCube_vert,fragmentShader:My.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:My.cube_vert,fragmentShader:My.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:My.equirect_vert,fragmentShader:My.equirect_frag},distanceRGBA:{uniforms:ny([Ty.common,Ty.displacementmap,{referencePosition:{value:new Qg},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:My.distanceRGBA_vert,fragmentShader:My.distanceRGBA_frag},shadow:{uniforms:ny([Ty.lights,Ty.fog,{color:{value:new g_(0)},opacity:{value:1}}]),vertexShader:My.shadow_vert,fragmentShader:My.shadow_frag}};Ay.physical={uniforms:ny([Ay.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Tg},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Tg},clearcoatNormalScale:{value:new Mg(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Tg},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Tg},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Tg},sheen:{value:0},sheenColor:{value:new g_(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Tg},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Tg},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Tg},transmissionSamplerSize:{value:new Mg},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Tg},attenuationDistance:{value:0},attenuationColor:{value:new g_(0)},specularColor:{value:new g_(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Tg},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Tg},anisotropyVector:{value:new Mg},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Tg}}]),vertexShader:My.meshphysical_vert,fragmentShader:My.meshphysical_frag};const Cy={r:0,b:0,g:0};function Ry(e,t,n,i,r,s,o){const a=new g_(0);let l,c,h=!0===s?0:1,u=null,d=0,p=null;function f(t,n){t.getRGB(Cy,iy(e)),i.buffers.color.setClear(Cy.r,Cy.g,Cy.b,n,o)}return{getClearColor:function(){return a},setClearColor:function(e,t=1){a.set(e),h=t,f(a,h)},getClearAlpha:function(){return h},setClearAlpha:function(e){h=e,f(a,h)},render:function(s,m){let g=!1,v=!0===m.isScene?m.background:null;if(v&&v.isTexture){v=(m.backgroundBlurriness>0?n:t).get(v)}null===v?f(a,h):v&&v.isColor&&(f(v,1),g=!0);const _=e.xr.getEnvironmentBlendMode();"additive"===_?i.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===_&&i.buffers.color.setClear(0,0,0,0,o),(e.autoClear||g)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),v&&(v.isCubeTexture||v.mapping===_m)?(void 0===c&&(c=new J_(new ey(1,1,1),new sy({name:"Backgroun
21dCubeMaterial",uniforms:ty(Ay.backgroundCube.uniforms),vertexShader:Ay.backgroundCube.vertexShader,fragmentShader:Ay.backgroundCube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(c)),c.material.uniforms.envMap.value=v,c.material.uniforms.flipEnvMap.value=v.isCubeTexture&&!1===v.isRenderTargetTexture?-1:1,c.material.uniforms.backgroundBlurriness.value=m.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=m.backgroundIntensity,c.material.toneMapped=kg.getTransfer(v.colorSpace)!==ng,u===v&&d===v.version&&p===e.toneMapping||(c.material.needsUpdate=!0,u=v,d=v.version,p=e.toneMapping),c.layers.enableAll(),s.unshift(c,c.geometry,c.material,0,0,null)):v&&v.isTexture&&(void 0===l&&(l=new J_(new Ey(2,2),new sy({name:"BackgroundMaterial",uniforms:ty(Ay.background.uniforms),vertexShader:Ay.background.vertexShader,fragmentShader:Ay.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),Object.defineProperty(l.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(l)),l.material.uniforms.t2D.value=v,l.material.uniforms.backgroundIntensity.value=m.backgroundIntensity,l.material.toneMapped=kg.getTransfer(v.colorSpace)!==ng,!0===v.matrixAutoUpdate&&v.updateMatrix(),l.material.uniforms.uvTransform.value.copy(v.matrix),u===v&&d===v.version&&p===e.toneMapping||(l.material.needsUpdate=!0,u=v,d=v.version,p=e.toneMapping),l.layers.enableAll(),s.unshift(l,l.geometry,l.material,0,0,null))}}}function Py(e,t,n,i){const r=e.getParameter(e.MAX_VERTEX_ATTRIBS),s=i.isWebGL2?null:t.get("OES_vertex_array_object"),o=i.isWebGL2||null!==s,a={},l=p(null);let c=l,h=!1;function u(t){return i.isWebGL2?e.bindVertexArray(t):s.bindVertexArrayOES(t)}function d(t){return i.isWebGL2?e.deleteVertexArray(t):s.deleteVertexArrayOES(t)}function p(e){const t=[],n=[],i=[];for(let e=0;e<r;e++)t[e]=0,n[e]=0,i[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:i,object:e,attributes:{},index:null}}function f(){const e=c.newAttributes;for(let t=0,n=e.length;t<n;t++)e[t]=0}function m(e){g(e,0)}function g(n,r){const s=c.newAttributes,o=c.enabledAttributes,a=c.attributeDivisors;if(s[n]=1,0===o[n]&&(e.enableVertexAttribArray(n),o[n]=1),a[n]!==r){(i.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[i.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,r),a[n]=r}}function v(){const t=c.newAttributes,n=c.enabledAttributes;for(let i=0,r=n.length;i<r;i++)n[i]!==t[i]&&(e.disableVertexAttribArray(i),n[i]=0)}function _(t,n,i,r,s,o,a){!0===a?e.vertexAttribIPointer(t,n,i,s,o):e.vertexAttribPointer(t,n,i,r,s,o)}function y(){x(),h=!0,c!==l&&(c=l,u(c.object))}function x(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(r,l,d,y,x){let b=!1;if(o){const t=function(t,n,r){const o=!0===r.wireframe;let l=a[t.id];void 0===l&&(l={},a[t.id]=l);let c=l[n.id];void 0===c&&(c={},l[n.id]=c);let h=c[o];void 0===h&&(h=p(i.isWebGL2?e.createVertexArray():s.createVertexArrayOES()),c[o]=h);return h}(y,d,l);c!==t&&(c=t,u(c.object)),b=function(e,t,n,i){const r=c.attributes,s=t.attributes;let o=0;const a=n.getAttributes();for(const t in a){if(a[t].location>=0){const n=r[t];let i=s[t];if(void 0===i&&("instanceMatrix"===t&&e.instanceMatrix&&(i=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(i=e.instanceColor)),void 0===n)return!0;if(n.attribute!==i)return!0;if(i&&n.data!==i.data)return!0;o++}}return c.attributesNum!==o||c.index!==i}(r,y,d,x),b&&function(e,t,n,i){const r={},s=t.attributes;let o=0;const a=n.getAttributes();for(const t in a){if(a[t].location>=0){let n=s[t];void 0===n&&("instanceMatrix"===t&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(n=e.instanceColor));const i={};i.attribute=n,n&&n.data&&(i.data=n.data),r[t]=i,o++}}c.attributes=r,c.attributesNum=o,c.index=i}(r,y,d,x)}else{const e=!0===l.wireframe;c.geometry===y.id&&c.program===d.id&&c.wireframe===e||(c.geometry=y.id,c.program=d.id,c.wireframe=e,b=!0)}null!==x&&n.update(x,e.ELEMENT_ARRAY_BUFFER),(b||h)&&(h=!1,function(r,s,o,a){if(!1===i.isWebG
vendor: 6,614 bytes, line 21
21L2&&(r.isInstancedMesh||a.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;f();const l=a.attributes,c=o.getAttributes(),h=s.defaultAttributeValues;for(const t in c){const s=c[t];if(s.location>=0){let o=l[t];if(void 0===o&&("instanceMatrix"===t&&r.instanceMatrix&&(o=r.instanceMatrix),"instanceColor"===t&&r.instanceColor&&(o=r.instanceColor)),void 0!==o){const t=o.normalized,l=o.itemSize,c=n.get(o);if(void 0===c)continue;const h=c.buffer,u=c.type,d=c.bytesPerElement,p=!0===i.isWebGL2&&(u===e.INT||u===e.UNSIGNED_INT||o.gpuType===Pm);if(o.isInterleavedBufferAttribute){const n=o.data,i=n.stride,c=o.offset;if(n.isInstancedInterleavedBuffer){for(let e=0;e<s.locationSize;e++)g(s.location+e,n.meshPerAttribute);!0!==r.isInstancedMesh&&void 0===a._maxInstanceCount&&(a._maxInstanceCount=n.meshPerAttribute*n.count)}else for(let e=0;e<s.locationSize;e++)m(s.location+e);e.bindBuffer(e.ARRAY_BUFFER,h);for(let e=0;e<s.locationSize;e++)_(s.location+e,l/s.locationSize,u,t,i*d,(c+l/s.locationSize*e)*d,p)}else{if(o.isInstancedBufferAttribute){for(let e=0;e<s.locationSize;e++)g(s.location+e,o.meshPerAttribute);!0!==r.isInstancedMesh&&void 0===a._maxInstanceCount&&(a._maxInstanceCount=o.meshPerAttribute*o.count)}else for(let e=0;e<s.locationSize;e++)m(s.location+e);e.bindBuffer(e.ARRAY_BUFFER,h);for(let e=0;e<s.locationSize;e++)_(s.location+e,l/s.locationSize,u,t,l*d,l/s.locationSize*e*d,p)}}else if(void 0!==h){const n=h[t];if(void 0!==n)switch(n.length){case 2:e.vertexAttrib2fv(s.location,n);break;case 3:e.vertexAttrib3fv(s.location,n);break;case 4:e.vertexAttrib4fv(s.location,n);break;default:e.vertexAttrib1fv(s.location,n)}}}}v()}(r,l,d,y),null!==x&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n.get(x).buffer))},reset:y,resetDefaultState:x,dispose:function(){y();for(const e in a){const t=a[e];for(const e in t){const n=t[e];for(const e in n)d(n[e].object),delete n[e];delete t[e]}delete a[e]}},releaseStatesOfGeometry:function(e){if(void 0===a[e.id])return;const t=a[e.id];for(const e in t){const n=t[e];for(const e in n)d(n[e].object),delete n[e];delete t[e]}delete a[e.id]},releaseStatesOfProgram:function(e){for(const t in a){const n=a[t];if(void 0===n[e.id])continue;const i=n[e.id];for(const e in i)d(i[e].object),delete i[e];delete n[e.id]}},initAttributes:f,enableAttribute:m,disableUnusedAttributes:v}}function Ly(e,t,n,i){const r=i.isWebGL2;let s;this.setMode=function(e){s=e},this.render=function(t,i){e.drawArrays(s,t,i),n.update(i,s,1)},this.renderInstances=function(i,o,a){if(0===a)return;let l,c;if(r)l=e,c="drawArraysInstanced";else if(l=t.get("ANGLE_instanced_arrays"),c="drawArraysInstancedANGLE",null===l)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[c](s,i,o,a),n.update(o,s,a)},this.renderMultiDraw=function(e,i,r){if(0===r)return;const o=t.get("WEBGL_multi_draw");if(null===o)for(let t=0;t<r;t++)this.render(e[t],i[t]);else{o.multiDrawArraysWEBGL(s,e,0,i,0,r);let t=0;for(let e=0;e<r;e++)t+=i[e];n.update(t,s,1)}}}function Iy(e,t,n){let i;function r(t){if("highp"===t){if(e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const s="undefined"!=typeof WebGL2RenderingContext&&"WebGL2RenderingContext"===e.constructor.name;let o=void 0!==n.precision?n.precision:"highp";const a=r(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);const l=s||t.has("WEBGL_draw_buffers"),c=!0===n.logarithmicDepthBuffer,h=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),u=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),d=e.getParameter(e.MAX_TEXTURE_SIZE),p=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),f=e.getParameter(e.MAX_VERTEX_ATTRIBS),m=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),g=e.getParameter(e.MAX_VARYING_VECTORS),v=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),_=u>0,y=s||t.has("OES_texture_float");return{isWebGL2:s,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==i)return i;if(!0===t.has("EXT_texture_filter_anisotropic")){const n=t.get("EXT_texture_filter_anisotropic");i=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i},getMaxPrecision:r,precision:o,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:u,maxTextureSize:d,maxCubemapSize:p,maxAttributes:f,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:v,vertexTextures:_,floatFragmentTextures:y,floatVertexTextures:_&&y,maxSamples:s?e.getParameter(e.MAX_SAMPLES):0}}function Dy(e){const t=this;let n=null,i=0,r=!1,s=!1;const o=new _y,a=new Tg,l={value:null,needsUpdate:!1};function c(e,n,i,r){const s=null!==e?e.length:0;let c=null;if(0!==s){if(c=l.value,!0!==r||null===c){const t=i+4*s,r=n.matrixWorldInverse;a.getNormalMatrix(r),(null===c||c.length<t)&&(c=new Float32Array(t));for(let t=0,n=i;t!==s;++t,n+=4)o.copy(e[t]).applyMatrix4(r,a),o.normal.toArray(c,n),c[n+3]=o.constant}l.value=c,l.needsUpdate=!0}return t.numPlanes=s,t.numIntersection=0,c}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t){const n=0!==e.length||t||0!==i||r;return r=t,i=e.length,n},this.beginShadows=function(){s=!0,c(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(e,t){n=c(e,t,0)},this.setState=function(o,a,h){const u=o.clippingPlanes,d=o.clipIntersection,p=o.clipShadows,f=e.get(o);if(!r||null===u||0===u.length||s&&!p)s?c(null):function(){l.value!==n&&(l.value=n,l.needsUpdate=i>0);t.numPlanes=i,t.numIntersection=0}();else{const e=s?0:i,t=4*e;let r=f.clippingState||null;l.value=r,r=c(u,a,t,h);for(let e=0;e!==t;++e)r[e]=n[e];f.clippingState=r,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=e}}}function Ny(e){let t=new WeakMap;function n(e,t){return t===gm?e.mapping=fm:t===vm&&(e.mapping=mm),e}function i(e){const n=e.target;n.removeEventListener("dispose",i);const r=t.get(n);void 0!==r&&(t.delete(n),r.dispose())}return{get:function(r){if(r&&r.isTexture){const s=r.mapping;if(s===gm||s===vm){if(t.has(r)){return n(t.get(r).texture,r.mapping)}{const s=r.image;if(s&&s.height>0){const o=new fy(s.height);return o.fromEquirectangularTexture(e,r),t.set(r,o),r.addEventListener("dispose",i),n(o.texture,r.mapping)}return null}}}return r},dispose:function(){t=new WeakMap}}}class Oy extends oy{constructor(e=-1,t=1,n=1,i=-1,r=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="Orthogra
21phicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=i,this.near=r,this.far=s,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,i,r,s){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let r=n-e,s=n+e,o=i+t,a=i-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=e*this.view.offsetX,s=r+e*this.view.width,o-=t*this.view.offsetY,a=o-t*this.view.height}this.projectionMatrix.makeOrthographic(r,s,o,a,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}const Uy=[.125,.215,.35,.446,.526,.582],ky=20,Fy=new Oy,Vy=new g_;let By=null,zy=0,Hy=0;const Gy=(1+Math.sqrt(5))/2,Wy=1/Gy,jy=[new Qg(1,1,1),new Qg(-1,1,1),new Qg(1,1,-1),new Qg(-1,1,-1),new Qg(0,Gy,Wy),new Qg(0,Gy,-Wy),new Qg(Wy,0,Gy),new Qg(-Wy,0,Gy),new Qg(Gy,Wy,0),new Qg(-Gy,Wy,0)];class qy{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,i=100){By=this._renderer.getRenderTarget(),zy=this._renderer.getActiveCubeFace(),Hy=this._renderer.getActiveMipmapLevel(),this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(e,n,i,r),t>0&&this._blur(r,0,0,t),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=Zy(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=Yy(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(By,zy,Hy),e.scissorTest=!1,$y(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===fm||e.mapping===mm?this._setSize(0===e.image.length?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),By=this._renderer.getRenderTarget(),zy=this._renderer.getActiveCubeFace(),Hy=this._renderer.getActiveMipmapLevel();const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:Mm,minFilter:Mm,generateMipmaps:!1,type:Dm,format:Om,colorSpace:Jm,depthBuffer:!1},i=Xy(e,t,n);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=Xy(e,t,n);const{_lodMax:i}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=function(e){const t=[],n=[],i=[];let r=e;const s=e-4+1+Uy.length;for(let o=0;o<s;o++){const s=Math.pow(2,r);n.push(s);let a=1/s;o>e-4?a=Uy[o-e+4-1]:0===o&&(a=0),i.push(a);const l=1/(s-2),c=-l,h=1+l,u=[c,c,h,c,h,h,c,c,h,h,c,h],d=6,p=6,f=3,m=2,g=1,v=new Float32Array(f*p*d),_=new Float32Array(m*p*d),y=new Float32Array(g*p*d);for(let e=0;e<d;e++){const t=e%3*2/3-1,n=e>2?0:-1,i=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];v.set(i,f*p*e),_.set(u,m*p*e);const r=[e,e,e,e,e,e];y.set(r,g*p*e)}const x=new N_;x.setAttribute("position",new S_(v,f)),x.setAttribute("uv",new S_(_,m)),x.setAttribute("faceIndex",new S_(y,g)),t.push(x),r>4&&r--}return{lodPlanes:t,sizeLods:n,sigmas:i}}(i)),this._blurMaterial=function(e,t,n){const i=new Float32Array(ky),r=new Qg(0,1,0);return new sy({name:"SphericalGaussianBlur",defines:{n:ky,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:Ky(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}(i,e,t)}return i}_compileMaterial(e){const t=new J_(this._lodPlanes[0],e);this._renderer.compile(t,Fy)}_sceneToCubeUV(e,t,n,i){const r=new hy(90,1,t,n),s=[1,-1,1,1,1,1],o=[1,1,1,-1,-1,-1],a=this._renderer,l=a.autoClear,c=a.toneMapping;a.getClearColor(Vy),a.toneMapping=0,a.autoClear=!1;
vendor: 5,639 bytes, line 21
21const h=new x_({name:"PMREM.Background",side:1,depthWrite:!1,depthTest:!1}),u=new J_(new ey,h);let d=!1;const p=e.background;p?p.isColor&&(h.color.copy(p),e.background=null,d=!0):(h.color.copy(Vy),d=!0);for(let t=0;t<6;t++){const n=t%3;0===n?(r.up.set(0,s[t],0),r.lookAt(o[t],0,0)):1===n?(r.up.set(0,0,s[t]),r.lookAt(0,o[t],0)):(r.up.set(0,s[t],0),r.lookAt(0,0,o[t]));const l=this._cubeSize;$y(i,n*l,t>2?l:0,l,l),a.setRenderTarget(i),d&&a.render(u,r),a.render(e,r)}u.geometry.dispose(),u.material.dispose(),a.toneMapping=c,a.autoClear=l,e.background=p}_textureToCubeUV(e,t){const n=this._renderer,i=e.mapping===fm||e.mapping===mm;i?(null===this._cubemapMaterial&&(this._cubemapMaterial=Zy()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=Yy());const r=i?this._cubemapMaterial:this._equirectMaterial,s=new J_(this._lodPlanes[0],r);r.uniforms.envMap.value=e;const o=this._cubeSize;$y(t,0,0,3*o,2*o),n.setRenderTarget(t),n.render(s,Fy)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let t=1;t<this._lodPlanes.length;t++){const n=Math.sqrt(this._sigmas[t]*this._sigmas[t]-this._sigmas[t-1]*this._sigmas[t-1]),i=jy[(t-1)%jy.length];this._blur(e,t-1,t,n,i)}t.autoClear=n}_blur(e,t,n,i,r){const s=this._pingPongRenderTarget;this._halfBlur(e,s,t,n,i,"latitudinal",r),this._halfBlur(s,e,n,n,i,"longitudinal",r)}_halfBlur(e,t,n,i,r,s,o){const a=this._renderer,l=this._blurMaterial;"latitudinal"!==s&&"longitudinal"!==s&&console.error("blur direction must be either latitudinal or longitudinal!");const c=new J_(this._lodPlanes[i],l),h=l.uniforms,u=this._sizeLods[n]-1,d=isFinite(r)?Math.PI/(2*u):2*Math.PI/39,p=r/d,f=isFinite(r)?1+Math.floor(3*p):ky;f>ky&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${f} samples when the maximum is set to 20`);const m=[];let g=0;for(let e=0;e<ky;++e){const t=e/p,n=Math.exp(-t*t/2);m.push(n),0===e?g+=n:e<f&&(g+=2*n)}for(let e=0;e<m.length;e++)m[e]=m[e]/g;h.envMap.value=e.texture,h.samples.value=f,h.weights.value=m,h.latitudinal.value="latitudinal"===s,o&&(h.poleAxis.value=o);const{_lodMax:v}=this;h.dTheta.value=d,h.mipInt.value=v-n;const _=this._sizeLods[i];$y(t,3*_*(i>v-4?i-v+4:0),4*(this._cubeSize-_),3*_,2*_),a.setRenderTarget(t),a.render(c,Fy)}}function Xy(e,t,n){const i=new Yg(e,t,n);return i.texture.mapping=_m,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function $y(e,t,n,i,r){e.viewport.set(t,n,i,r),e.scissor.set(t,n,i,r)}function Yy(){return new sy({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Ky(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function Zy(){return new sy({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Ky(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function Ky(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function Jy(e){let t=new WeakMap,n=null;function i(e){const n=e.target;n.removeEventListener("dispose",i);const r=t.get(n);void 0!==r&&(t.delete(n),r.dispose())}return{get:function(r){if(r&&r.isTexture){const s=r.mapping,o=s===gm||s===vm,a=s===fm||s===mm;if(o||a){if(r.isRenderTargetTexture&&!0===r.needsPMREMUpdate){r.needsPMREMUpdate=!1;let i=t.get(r);return null===n&&(n=new qy(e)),i=o?n.fromEquirectangular(r,i):n.fromCubemap(r,i),t.set(r,i),i.texture}if(t.has(r))return t.get(r).texture;{const s=r.image;if(o&&s&&s.height>0||a&&s&&function(e){let t=0;const n=6;for(let i=0;i<n;i++)void 0!==e[i]&&t++;return t===n}(s)){null===n&&(n=new qy(e));const s=o?n.fromEquirectangular(r):n.fromCubemap(r);return t.set(r,s),r.addEventListener("dispose",i),s.texture}return null}}}return r},dispose:function(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function Qy(e){const t={};
vendor: 2,763 bytes, line 21
21function n(n){if(void 0!==t[n])return t[n];let i;switch(n){case"WEBGL_depth_texture":i=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=e.getExtension(n)}return t[n]=i,i}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?(n("EXT_color_buffer_float"),n("WEBGL_clip_cull_distance")):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture")},get:function(e){const t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function ex(e,t,n,i){const r={},s=new WeakMap;function o(e){const a=e.target;null!==a.index&&t.remove(a.index);for(const e in a.attributes)t.remove(a.attributes[e]);for(const e in a.morphAttributes){const n=a.morphAttributes[e];for(let e=0,i=n.length;e<i;e++)t.remove(n[e])}a.removeEventListener("dispose",o),delete r[a.id];const l=s.get(a);l&&(t.remove(l),s.delete(a)),i.releaseStatesOfGeometry(a),!0===a.isInstancedBufferGeometry&&delete a._maxInstanceCount,n.memory.geometries--}function a(e){const n=[],i=e.index,r=e.attributes.position;let o=0;if(null!==i){const e=i.array;o=i.version;for(let t=0,i=e.length;t<i;t+=3){const i=e[t+0],r=e[t+1],s=e[t+2];n.push(i,r,r,s,s,i)}}else{if(void 0===r)return;{const e=r.array;o=r.version;for(let t=0,i=e.length/3-1;t<i;t+=3){const e=t+0,i=t+1,r=t+2;n.push(e,i,i,r,r,e)}}}const a=new(Cg(n)?M_:E_)(n,1);a.version=o;const l=s.get(e);l&&t.remove(l),s.set(e,a)}return{get:function(e,t){return!0===r[t.id]||(t.addEventListener("dispose",o),r[t.id]=!0,n.memory.geometries++),t},update:function(n){const i=n.attributes;for(const n in i)t.update(i[n],e.ARRAY_BUFFER);const r=n.morphAttributes;for(const n in r){const i=r[n];for(let n=0,r=i.length;n<r;n++)t.update(i[n],e.ARRAY_BUFFER)}},getWireframeAttribute:function(e){const t=s.get(e);if(t){const n=e.index;null!==n&&t.version<n.version&&a(e)}else a(e);return s.get(e)}}}
vendor: 4,613 bytes, line 21
21function tx(e,t,n,i){const r=i.isWebGL2;let s,o,a;this.setMode=function(e){s=e},this.setIndex=function(e){o=e.type,a=e.bytesPerElement},this.render=function(t,i){e.drawElements(s,i,o,t*a),n.update(i,s,1)},this.renderInstances=function(i,l,c){if(0===c)return;let h,u;if(r)h=e,u="drawElementsInstanced";else if(h=t.get("ANGLE_instanced_arrays"),u="drawElementsInstancedANGLE",null===h)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");h[u](s,l,o,i*a,c),n.update(l,s,c)},this.renderMultiDraw=function(e,i,r){if(0===r)return;const l=t.get("WEBGL_multi_draw");if(null===l)for(let t=0;t<r;t++)this.render(e[t]/a,i[t]);else{l.multiDrawElementsWEBGL(s,i,0,o,e,0,r);let t=0;for(let e=0;e<r;e++)t+=i[e];n.update(t,s,1)}}}function nx(e){const t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(n,i,r){switch(t.calls++,i){case e.TRIANGLES:t.triangles+=r*(n/3);break;case e.LINES:t.lines+=r*(n/2);break;case e.LINE_STRIP:t.lines+=r*(n-1);break;case e.LINE_LOOP:t.lines+=r*n;break;case e.POINTS:t.points+=r*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",i)}}}}function ix(e,t){return e[0]-t[0]}function rx(e,t){return Math.abs(t[1])-Math.abs(e[1])}function sx(e,t,n){const i={},r=new Float32Array(8),s=new WeakMap,o=new Xg,a=[];for(let e=0;e<8;e++)a[e]=[e,0];return{update:function(l,c,h){const u=l.morphTargetInfluences;if(!0===t.isWebGL2){const d=c.morphAttributes.position||c.morphAttributes.normal||c.morphAttributes.color,p=void 0!==d?d.length:0;let f=s.get(c);if(void 0===f||f.count!==p){void 0!==f&&f.texture.dispose();const v=void 0!==c.morphAttributes.position,_=void 0!==c.morphAttributes.normal,y=void 0!==c.morphAttributes.color,x=c.morphAttributes.position||[],b=c.morphAttributes.normal||[],w=c.morphAttributes.color||[];let S=0;!0===v&&(S=1),!0===_&&(S=2),!0===y&&(S=3);let E=c.attributes.position.count*S,M=1;E>t.maxTextureSize&&(M=Math.ceil(E/t.maxTextureSize),E=t.maxTextureSize);const T=new Float32Array(E*M*4*p),A=new Zg(T,E,M,p);A.type=Im,A.needsUpdate=!0;const C=4*S;for(let P=0;P<p;P++){const L=x[P],I=b[P],D=w[P],N=E*M*4*P;for(let O=0;O<L.count;O++){const U=O*C;!0===v&&(o.fromBufferAttribute(L,O),T[N+U+0]=o.x,T[N+U+1]=o.y,T[N+U+2]=o.z,T[N+U+3]=0),!0===_&&(o.fromBufferAttribute(I,O),T[N+U+4]=o.x,T[N+U+5]=o.y,T[N+U+6]=o.z,T[N+U+7]=0),!0===y&&(o.fromBufferAttribute(D,O),T[N+U+8]=o.x,T[N+U+9]=o.y,T[N+U+10]=o.z,T[N+U+11]=4===D.itemSize?o.w:1)}}function R(){A.dispose(),s.delete(c),c.removeEventListener("dispose",R)}f={count:p,texture:A,size:new Mg(E,M)},s.set(c,f),c.addEventListener("dispose",R)}let m=0;for(let k=0;k<u.length;k++)m+=u[k];const g=c.morphTargetsRelative?1:1-m;h.getUniforms().setValue(e,"morphTargetBaseInfluence",g),h.getUniforms().setValue(e,"morphTargetInfluences",u),h.getUniforms().setValue(e,"morphTargetsTexture",f.texture,n),h.getUniforms().setValue(e,"morphTargetsTextureSize",f.size)}else{const F=void 0===u?0:u.length;let V=i[c.id];if(void 0===V||V.length!==F){V=[];for(let W=0;W<F;W++)V[W]=[W,0];i[c.id]=V}for(let j=0;j<F;j++){const q=V[j];q[0]=j,q[1]=u[j]}V.sort(rx);for(let X=0;X<8;X++)X<F&&V[X][1]?(a[X][0]=V[X][0],a[X][1]=V[X][1]):(a[X][0]=Number.MAX_SAFE_INTEGER,a[X][1]=0);a.sort(ix);const B=c.morphAttributes.position,z=c.morphAttributes.normal;let H=0;for(let $=0;$<8;$++){const Y=a[$],Z=Y[0],K=Y[1];Z!==Number.MAX_SAFE_INTEGER&&K?(B&&c.getAttribute("morphTarget"+$)!==B[Z]&&c.setAttribute("morphTarget"+$,B[Z]),z&&c.getAttribute("morphNormal"+$)!==z[Z]&&c.setAttribute("morphNormal"+$,z[Z]),r[$]=K,H+=K):(B&&!0===c.hasAttribute("morphTarget"+$)&&c.deleteAttribute("morphTarget"+$),z&&!0===c.hasAttribute("morphNormal"+$)&&c.deleteAttribute("morphNormal"+$),r[$]=0)}const G=c.morphTargetsRelative?1:1-H;h.getUniforms().setValue(e,"morphTargetBaseInfluence",G),h.getUniforms().setValue(e,"morphTargetInfluences",r)}}}}function ox(e,t,n,i){let r=new WeakMap;function s(e){const t=e.target;t.removeEventListener("dispose",s),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(o){const a=i.render.frame,l=o.geometry,c=t.get(o,l);if(r.get(c)!==a&&(t.update(c),r.set(c,a)),o.isInstancedMesh&&(!1===o.hasEventListener("dispose",s)&&o.addEventListener("dispose",s),r.get(o)!==a&&(n.update(o.instanceMatrix,e.ARRAY_BUFFER),null!==o.instanceColor&&n.update(o.instanceColor,e.ARRAY_BUFFER),r.set(o,a))),o.isSkinnedMesh){const e=o.skeleton;
vendor: 4,443 bytes, line 21
21r.get(e)!==a&&(e.update(),r.set(e,a))}return c},dispose:function(){r=new WeakMap}}}class ax extends qg{constructor(e,t,n,i,r,s,o,a,l,c){if((c=void 0!==c?c:Um)!==Um&&c!==km)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&c===Um&&(n=Lm),void 0===n&&c===km&&(n=Nm),super(null,i,r,s,o,a,c,n,l),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=void 0!==o?o:wm,this.minFilter=void 0!==a?a:wm,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return null!==this.compareFunction&&(t.compareFunction=this.compareFunction),t}}const lx=new qg,cx=new ax(1,1);cx.compareFunction=515;const hx=new Zg,ux=new Kg,dx=new py,px=[],fx=[],mx=new Float32Array(16),gx=new Float32Array(9),vx=new Float32Array(4);function _x(e,t,n){const i=e[0];if(i<=0||i>0)return e;const r=t*n;let s=px[r];if(void 0===s&&(s=new Float32Array(r),px[r]=s),0!==t){i.toArray(s,0);for(let i=1,r=0;i!==t;++i)r+=n,e[i].toArray(s,r)}return s}function yx(e,t){if(e.length!==t.length)return!1;for(let n=0,i=e.length;n<i;n++)if(e[n]!==t[n])return!1;return!0}function xx(e,t){for(let n=0,i=t.length;n<i;n++)e[n]=t[n]}function bx(e,t){let n=fx[t];void 0===n&&(n=new Int32Array(t),fx[t]=n);for(let i=0;i!==t;++i)n[i]=e.allocateTextureUnit();return n}function wx(e,t){const n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function Sx(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(yx(n,t))return;e.uniform2fv(this.addr,t),xx(n,t)}}function Ex(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(yx(n,t))return;e.uniform3fv(this.addr,t),xx(n,t)}}function Mx(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(yx(n,t))return;e.uniform4fv(this.addr,t),xx(n,t)}}function Tx(e,t){const n=this.cache,i=t.elements;if(void 0===i){if(yx(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),xx(n,t)}else{if(yx(n,i))return;vx.set(i),e.uniformMatrix2fv(this.addr,!1,vx),xx(n,i)}}function Ax(e,t){const n=this.cache,i=t.elements;if(void 0===i){if(yx(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),xx(n,t)}else{if(yx(n,i))return;gx.set(i),e.uniformMatrix3fv(this.addr,!1,gx),xx(n,i)}}function Cx(e,t){const n=this.cache,i=t.elements;if(void 0===i){if(yx(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),xx(n,t)}else{if(yx(n,i))return;mx.set(i),e.uniformMatrix4fv(this.addr,!1,mx),xx(n,i)}}function Rx(e,t){const n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function Px(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2i(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(yx(n,t))return;e.uniform2iv(this.addr,t),xx(n,t)}}function Lx(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3i(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(yx(n,t))return;e.uniform3iv(this.addr,t),xx(n,t)}}function Ix(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4i(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(yx(n,t))return;e.uniform4iv(this.addr,t),xx(n,t)}}function Dx(e,t){const n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function Nx(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2ui(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(yx(n,t))return;e.uniform2uiv(this.addr,t),xx(n,t)}}function Ox(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3ui(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(yx(n,t))return;e.uniform3uiv(this.addr,t),xx(n,t)}}function Ux(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4ui(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(yx(n,t))return;e.uniform4uiv(this.addr,t),xx(n,t)}}function kx(e,t,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r);const s=this.type===e.SAMPLER_2D_SHADOW?cx:lx;n.setTexture2D(t||s,r)}
vendor: 5,953 bytes, line 21
21function Fx(e,t,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTexture3D(t||ux,r)}function Vx(e,t,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTextureCube(t||dx,r)}function Bx(e,t,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTexture2DArray(t||hx,r)}function zx(e,t){e.uniform1fv(this.addr,t)}function Hx(e,t){const n=_x(t,this.size,2);e.uniform2fv(this.addr,n)}function Gx(e,t){const n=_x(t,this.size,3);e.uniform3fv(this.addr,n)}function Wx(e,t){const n=_x(t,this.size,4);e.uniform4fv(this.addr,n)}function jx(e,t){const n=_x(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function qx(e,t){const n=_x(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function Xx(e,t){const n=_x(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function $x(e,t){e.uniform1iv(this.addr,t)}function Yx(e,t){e.uniform2iv(this.addr,t)}function Zx(e,t){e.uniform3iv(this.addr,t)}function Kx(e,t){e.uniform4iv(this.addr,t)}function Jx(e,t){e.uniform1uiv(this.addr,t)}function Qx(e,t){e.uniform2uiv(this.addr,t)}function eb(e,t){e.uniform3uiv(this.addr,t)}function tb(e,t){e.uniform4uiv(this.addr,t)}function nb(e,t,n){const i=this.cache,r=t.length,s=bx(n,r);yx(i,s)||(e.uniform1iv(this.addr,s),xx(i,s));for(let e=0;e!==r;++e)n.setTexture2D(t[e]||lx,s[e])}function ib(e,t,n){const i=this.cache,r=t.length,s=bx(n,r);yx(i,s)||(e.uniform1iv(this.addr,s),xx(i,s));for(let e=0;e!==r;++e)n.setTexture3D(t[e]||ux,s[e])}function rb(e,t,n){const i=this.cache,r=t.length,s=bx(n,r);yx(i,s)||(e.uniform1iv(this.addr,s),xx(i,s));for(let e=0;e!==r;++e)n.setTextureCube(t[e]||dx,s[e])}function sb(e,t,n){const i=this.cache,r=t.length,s=bx(n,r);yx(i,s)||(e.uniform1iv(this.addr,s),xx(i,s));for(let e=0;e!==r;++e)n.setTexture2DArray(t[e]||hx,s[e])}class ob{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=function(e){switch(e){case 5126:return wx;case 35664:return Sx;case 35665:return Ex;case 35666:return Mx;case 35674:return Tx;case 35675:return Ax;case 35676:return Cx;case 5124:case 35670:return Rx;case 35667:case 35671:return Px;case 35668:case 35672:return Lx;case 35669:case 35673:return Ix;case 5125:return Dx;case 36294:return Nx;case 36295:return Ox;case 36296:return Ux;case 35678:case 36198:case 36298:case 36306:case 35682:return kx;case 35679:case 36299:case 36307:return Fx;case 35680:case 36300:case 36308:case 36293:return Vx;case 36289:case 36303:case 36311:case 36292:return Bx}}(t.type)}}class ab{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=function(e){switch(e){case 5126:return zx;case 35664:return Hx;case 35665:return Gx;case 35666:return Wx;case 35674:return jx;case 35675:return qx;case 35676:return Xx;case 5124:case 35670:return $x;case 35667:case 35671:return Yx;case 35668:case 35672:return Zx;case 35669:case 35673:return Kx;case 5125:return Jx;case 36294:return Qx;case 36295:return eb;case 36296:return tb;case 35678:case 36198:case 36298:case 36306:case 35682:return nb;case 35679:case 36299:case 36307:return ib;case 35680:case 36300:case 36308:case 36293:return rb;case 36289:case 36303:case 36311:case 36292:return sb}}(t.type)}}class lb{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){const i=this.seq;for(let r=0,s=i.length;r!==s;++r){const s=i[r];s.setValue(e,t[s.id],n)}}}const cb=/(\w+)(\])?(\[|\.)?/g;function hb(e,t){e.seq.push(t),e.map[t.id]=t}function ub(e,t,n){const i=e.name,r=i.length;for(cb.lastIndex=0;;){const s=cb.exec(i),o=cb.lastIndex;let a=s[1];const l="]"===s[2],c=s[3];if(l&&(a|=0),void 0===c||"["===c&&o+2===r){hb(n,void 0===c?new ob(a,e,t):new ab(a,e,t));break}{let e=n.map[a];void 0===e&&(e=new lb(a),hb(n,e)),n=e}}}class db{constructor(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let i=0;i<n;++i){const n=e.getActiveUniform(t,i);ub(n,e.getUniformLocation(t,n.name),this)}}setValue(e,t,n,i){const r=this.map[t];void 0!==r&&r.setValue(e,n,i)}setOptional(e,t,n){const i=t[n];void 0!==i&&this.setValue(e,n,i)}static upload(e,t,n,i){for(let r=0,s=t.length;r!==s;++r){const s=t[r],o=n[s.id];!1!==o.needsUpdate&&s.setValue(e,o.value,i)}}static seqWithValue(e,t){const n=[];for(let i=0,r=e.length;i!==r;++i){const r=e[i];r.id in t&&n.push(r)}return n}}function pb(e,t,n){const i=e.createShader(t);return e.shaderSource(i,n),e.compileShader(i),i}let fb=0;function mb(e,t,n){const i=e.getShaderParameter(t,e.COMPILE_STATUS),r=e.getShaderInfoLog(t).trim();if(i&&""===r)return"";const s=/ERROR: 0:(\d+)/.exec(r);if(s){const i=parseInt(s[1]);return n.toUpperCase()+"\n\n"+r+"\n\n"+function(e,t){const n=e.split("\n"),i=[],r=Math.max(t-6,0),s=Math.min(t+6,n.length);for(let e=r;e<s;e++){const r=e+1;i.push(`${r===t?">":" "} ${r}: ${n[e]}`)}return i.join("\n")}(e.getShaderSource(t),i)}return r}function gb(e,t){const n=function(e){const t=kg.getPrimaries(kg.workingColorSpace),n=kg.getPrimaries(e);let i;switch(t===n?i="":t===rg&&n===ig?i="LinearDisplayP3ToLinearSRGB":t===ig&&n===rg&&(i="LinearSRGBToLinearDisplayP3"),e){case Jm:case eg:return[i,"LinearTransferOETF"];case Km:case Qm:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",e),[i,"LinearTransferOETF"]}}(t);return`vec4 ${e}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function vb(e,t){let n;switch(t){case 1:n="Linear";break;case 2:n="Reinhard";break;case 3:n="OptimizedCineon";break;case 4:n="ACESFilmic";break;case 6:n="AgX";break;case 5:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function _b(e){return""!==e}function yb(e,t){const n=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_L
21IGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function xb(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const bb=/^[ \t]*#include +<([\w\d./]+)>/gm;function wb(e){return e.replace(bb,Eb)}const Sb=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function Eb(e,t){let n=My[t];if(void 0===n){const e=Sb.get(t);if(void 0===e)throw new Error("Can not resolve #include <"+t+">");n=My[e],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,e)}return wb(n)}const Mb=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Tb(e){return e.replace(Mb,Ab)}function Ab(e,t,n,i){let r="";for(let e=parseInt(t);e<parseInt(n);e++)r+=i.replace(/\[\s*i\s*\]/g,"[ "+e+" ]").replace(/UNROLLED_LOOP_INDEX/g,e);return r}function Cb(e){let t=`precision ${e.precision} float;\n\tprecision ${e.precision} int;\n\tprecision ${e.precision} sampler2D;\n\tprecision ${e.precision} samplerCube;\n\t`;return e.isWebGL2&&(t+=`precision ${e.precision} sampler3D;\n\t\tprecision ${e.precision} sampler2DArray;\n\t\tprecision ${e.precision} sampler2DShadow;\n\t\tprecision ${e.precision} samplerCubeShadow;\n\t\tprecision ${e.precision} sampler2DArrayShadow;\n\t\tprecision ${e.precision} isampler2D;\n\t\tprecision ${e.precision} isampler3D;\n\t\tprecision ${e.precision} isamplerCube;\n\t\tprecision ${e.precision} isampler2DArray;\n\t\tprecision ${e.precision} usampler2D;\n\t\tprecision ${e.precision} usampler3D;\n\t\tprecision ${e.precision} usamplerCube;\n\t\tprecision ${e.precision} usampler2DArray;\n\t\t`),"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function Rb(e,t,n,i){const r=e.getContext(),s=n.defines;let o=n.vertexShader,a=n.fragmentShader;const l=function(e){let t="SHADOWMAP_TYPE_BASIC";return 1===e.shadowMapType?t="SHADOWMAP_TYPE_PCF":2===e.shadowMapType?t="SHADOWMAP_TYPE_PCF_SOFT":3===e.shadowMapType&&(t="SHADOWMAP_TYPE_VSM"),t}(n),c=function(e){let t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case fm:case mm:t="ENVMAP_TYPE_CUBE";break;case _m:t="ENVMAP_TYPE_CUBE_UV"}return t}(n),h=function(e){let t="ENVMAP_MODE_REFLECTION";e.envMap&&e.envMapMode===mm&&(t="ENVMAP_MODE_REFRACTION");return t}(n),u=function(e){let t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case 0:t="ENVMAP_BLENDING_MULTIPLY";break;case 1:t="ENVMAP_BLENDING_MIX";break;case 2:t="ENVMAP_BLENDING_ADD"}return t}(n),d=function(e){const t=e.envMapCubeUVHeight;if(null===t)return null;const n=Math.log2(t)-2,i=1/t;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:i,maxMip:n}}(n),p=n.isWebGL2?"":function(e){return[e.extensionDerivatives||e.envMapCubeUVHeight||e.bumpMap||e.normalMapTangentSpace||e.clearcoatNormalMap||e.flatShading||e.alphaToCoverage||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap||e.transmission)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(_b).join("\n")}(n),f=function(e){return[e.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",e.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(_b).join("\n")}(n),m=function(e){const t=[];for(const n in e){const i=e[n];!1!==i&&t.push("#define "+n+" "+i)}return t.join("\n")}(s),g=r.createProgram();let v,_,y=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(v=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,m].filter(_b).join("\n"),v.length>0&&(v+="\n"),_=[p,"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,m].filter(_b).join("\n"),_.length>0&&(_+="\n")):(v=[Cb(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,m,n.extensionCl
vendor: 5,993 bytes, line 21
21ipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+h:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(_b).join("\n"),_=[p,Cb(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,m,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alph
vendor: 4,292 bytes, line 21
21aToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+h:"",n.envMap?"#define "+u:"",d?"#define CUBEUV_TEXEL_WIDTH "+d.texelWidth:"",d?"#define CUBEUV_TEXEL_HEIGHT "+d.texelHeight:"",d?"#define CUBEUV_MAX_MIP "+d.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==n.toneMapping?"#define TONE_MAPPING":"",0!==n.toneMapping?My.tonemapping_pars_fragment:"",0!==n.toneMapping?vb("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",My.colorspace_pars_fragment,gb("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(_b).join("\n")),o=wb(o),o=yb(o,n),o=xb(o,n),a=wb(a),a=yb(a,n),a=xb(a,n),o=Tb(o),a=Tb(a),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(y="#version 300 es\n",v=[f,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+v,_=["precision mediump sampler2DArray;","#define varying in",n.glslVersion===ag?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===ag?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+_);const x=y+v+o,b=y+_+a,w=pb(r,r.VERTEX_SHADER,x),S=pb(r,r.FRAGMENT_SHADER,b);function E(t){if(e.debug.checkShaderErrors){const n=r.getProgramInfoLog(g).trim(),i=r.getShaderInfoLog(w).trim(),s=r.getShaderInfoLog(S).trim();let o=!0,a=!0;if(!1===r.getProgramParameter(g,r.LINK_STATUS))if(o=!1,"function"==typeof e.debug.onSha
vendor: 8,771 bytes, line 21
21derError)e.debug.onShaderError(r,g,w,S);else{const e=mb(r,w,"vertex"),i=mb(r,S,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(g,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+t.name+"\nMaterial Type: "+t.type+"\n\nProgram Info Log: "+n+"\n"+e+"\n"+i)}else""!==n?console.warn("THREE.WebGLProgram: Program Info Log:",n):""!==i&&""!==s||(a=!1);a&&(t.diagnostics={runnable:o,programLog:n,vertexShader:{log:i,prefix:v},fragmentShader:{log:s,prefix:_}})}r.deleteShader(w),r.deleteShader(S),M=new db(r,g),T=function(e,t){const n={},i=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let r=0;r<i;r++){const i=e.getActiveAttrib(t,r),s=i.name;let o=1;i.type===e.FLOAT_MAT2&&(o=2),i.type===e.FLOAT_MAT3&&(o=3),i.type===e.FLOAT_MAT4&&(o=4),n[s]={type:i.type,location:e.getAttribLocation(t,s),locationSize:o}}return n}(r,g)}let M,T;r.attachShader(g,w),r.attachShader(g,S),void 0!==n.index0AttributeName?r.bindAttribLocation(g,0,n.index0AttributeName):!0===n.morphTargets&&r.bindAttribLocation(g,0,"position"),r.linkProgram(g),this.getUniforms=function(){return void 0===M&&E(this),M},this.getAttributes=function(){return void 0===T&&E(this),T};let A=!1===n.rendererExtensionParallelShaderCompile;return this.isReady=function(){return!1===A&&(A=r.getProgramParameter(g,37297)),A},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(g),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=fb++,this.cacheKey=t,this.usedTimes=1,this.program=g,this.vertexShader=w,this.fragmentShader=S,this}let Pb=0;class Lb{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,i=this._getShaderStage(t),r=this._getShaderStage(n),s=this._getShaderCacheForMaterial(e);return!1===s.has(i)&&(s.add(i),i.usedTimes++),!1===s.has(r)&&(s.add(r),r.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const e of t)e.usedTimes--,0===e.usedTimes&&this.shaderCache.delete(e.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let n=t.get(e);return void 0===n&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return void 0===n&&(n=new Ib(e),t.set(e,n)),n}}class Ib{constructor(e){this.id=Pb++,this.code=e,this.usedTimes=0}}function Db(e,t,n,i,r,s,o){const a=new Bv,l=new Lb,c=new Set,h=[],u=r.isWebGL2,d=r.logarithmicDepthBuffer,p=r.vertexTextures;let f=r.precision;const m={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function g(e){return c.add(e),0===e?"uv":`uv${e}`}return{getParameters:function(s,a,h,v,_){const y=v.fog,x=_.geometry,b=s.isMeshStandardMaterial?v.environment:null,w=(s.isMeshStandardMaterial?n:t).get(s.envMap||b),S=w&&w.mapping===_m?w.image.height:null,E=m[s.type];null!==s.precision&&(f=r.getMaxPrecision(s.precision),f!==s.precision&&console.warn("THREE.WebGLProgram.getParameters:",s.precision,"not supported, using",f,"instead."));const M=x.morphAttributes.position||x.morphAttributes.normal||x.morphAttributes.color,T=void 0!==M?M.length:0;let A,C,R,P,L=0;if(void 0!==x.morphAttributes.position&&(L=1),void 0!==x.morphAttributes.normal&&(L=2),void 0!==x.morphAttributes.color&&(L=3),E){const e=Ay[E];A=e.vertexShader,C=e.fragmentShader}else A=s.vertexShader,C=s.fragmentShader,l.update(s),R=l.getVertexShaderID(s),P=l.getFragmentShaderID(s);const I=e.getRenderTarget(),D=!0===_.isInstancedMesh,N=!0===_.isBatchedMesh,O=!!s.map,U=!!s.matcap,k=!!w,F=!!s.aoMap,V=!!s.lightMap,B=!!s.bumpMap,z=!!s.normalMap,H=!!s.displacementMap,G=!!s.emissiveMap,W=!!s.metalnessMap,j=!!s.roughnessMap,q=s.anisotropy>0,X=s.clearcoat>0,$=s.iridescence>0,Y=s.sheen>0,Z=s.transmission>0,K=q&&!!s.anisotropyMap,J=X&&!!s.clearcoatMap,Q=X&&!!s.clearcoatNormalMap,ee=X&&!!s.clearcoatRoughnessMap,te=$&&!!s.iridescenceMap,ne=$&&!!s.iridescenceThicknessMap,ie=Y&&!!s.sheenColorMap,re=Y&&!!s.sheenRoughnessMap,se=!!s.specularMap,oe=!!s.specularColorMap,ae=!!s.specularIntensityMap,le=Z&&!!s.transmissionMap,ce=Z&&!!s.thicknessMap,he=!!s.gradientMap,ue=!!s.alphaMap,de=s.alphaTest>0,pe=!!s.alphaHash,fe=!!s.extensions;let me=0;s.toneMapped&&(null!==I&&!0!==I.isXRRenderTarget||(me=e.toneMapping));const ge={isWebGL2:u,shaderID:E,shaderType:s.type,shaderName:s.name,vertexShader:A,fragmentShader:C,defines:s.defines,customVertexShaderID:R,customFragmentShaderID:P,isRawShaderMaterial:!0===s.isRawShaderMaterial,glslVersion:s.glslVersion,precision:f,batching:N,instancing:D,instancingColor:D&&null!==_.instanceColor,supportsVertexTextures:p,outputColorSpace:null===I?e.outputColorSpace:!0===I.isXRRenderTarget?I.texture.colorSpace:Jm,alphaToCoverage:!!s.alphaToCoverage,map:O,matcap:U,envMap:k,envMapMode:k&&w.mapping,envMapCubeUVHeight:S,aoMap:F,lightMap:V,bumpMap:B,normalMap:z,displacementMap:p&&H,emissiveMap:G,normalMapObjectSpace:z&&1===s.normalMapType,normalMapTangentSpace:z&&0===s.normalMapType,metalnessMap:W,roughnessMap:j,anisotropy:q,anisotropyMap:K,clearcoat:X,clearcoatMap:J,clearcoatNormalMap:Q,clearcoatRoughnessMap:ee,iridescence:$,iridescenceMap:te,iridescenceThicknessMap:ne,sheen:Y,sheenColorMap:ie,sheenRoughnessMap:re,specularMap:se,specularColorMap:oe,specularIntensityMap:ae,transmission:Z,transmissionMap:le,thicknessMap:ce,gradientMap:he,opaque:!1===s.transparent&&1===s.blending&&!1===s.alphaToCoverage,alphaMap:ue,alphaTest:de,alphaHash:pe,combine:s.combine,mapUv:O&&g(s.map.channel),aoMapUv:F&&g(s.aoMap.channel),lightMapUv:V&&g(s.lightMap.channel),bumpMapUv:B&&g(s.bumpMap.channel),normalMapUv:z&&g(s.normalMap.channel),displacementMapUv:H&&g(s.displacementMap.channel),emissiveMapUv:G&&g(s.emissiveMap.channel),metalnessMapUv:W&&g(s.metalnessMap.channel),roughnessMapUv:j&&g(s.roughnessMap.channel),anisotropyMapUv:K&&g(s.anisotropyMap.channel),clearcoatMapUv:J&&g(s.clearcoatMap.channel),clearcoatNormalMapUv:Q&&g(s.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ee&&g(s.clearcoatRoughnessMap.channel),iridescenceMapUv:te&&g(s.iridescenceMap.channel),iridescenceThicknessMapUv:ne&&g(s.iridescenceThicknessMap.channel),sheenColorMapUv:ie&&g(s.sheenColorMap.channel),sheenRoughnessMapUv:re&&g(s.sheenRoughnessMap.channel),specularMapUv:se&&g(s.specularMap.channel),specularColorMapUv:oe&&g(s.specularColorMap.channel),specularIntensityMapUv:ae&&g(s.specularIntensityMap.channel),transmissionMapUv:le&&g(s.transmissionMap.channel),thicknessMapUv:ce&&g(s.thicknessMap.channel),alphaMapUv:ue&&g(s.alphaMap.channel),vertexTangents:!!x.attributes.tangent&&(z||q),vertexColors:s.vertexColors,vertexAlphas:!0===s.vertexColors&&!!x.attributes.color&&4===x.attributes.color.itemSize,pointsUvs:!0===_.isPoints&&!!x.attributes.uv&&(O||ue),fog:!!y,useFog:!0===s.fog,fogExp2:!!y&&y.isFogExp2,flatShading:!0===s.flatShading,sizeAttenuation:!0===s.sizeAttenuation,logarithmicDepthBuffer:d,skinning:!0===_.isSkinnedMesh,morphTargets:void 0!==x.morphAttributes.position,morphNormals:void 0!==x.morphAttributes.normal,morphColors:void 0!==x.morphAttributes.color,morphTargetsCount:T,morphTextureStride:L,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numSpotLightMaps:a.spotLightMap.length,numRectAreaLights:a.rectArea.length,numHemiLights:a.hemi.length,numDirLightShadows:a.directionalShadowMap.length,numPointLightShadows:a.pointShadowMap.length,numSpotLightShadows:a.spotShadowMap.length,numSpotLightShadowsWithMaps:a.numSpotLightShadowsWithMaps,numLightProbes:a.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:s.dithering,shadowMapEnabled:e.shadowMap.enabled&&h.length>0,shadowMapType:e.shadowMap.type,toneMapping:me,useLegacyLights:e._useLegacyLights,decodeVideoTexture:O&&!0===s.map.isVideoTexture&&kg.getTransfer(s.map.colorSpace)===ng,premultipliedAlpha:s.premultipliedAlpha,doubleSided:2===s.side,flipSided:1===s.side,useDepthPacking:s.depthPacking>=0,depthPacking:s.depthPacking||0,index0AttributeName:s.index0AttributeName,extensionDerivatives:fe&&!0===s.extensions.derivatives,extensionFragDepth:fe&&!0===s.extensions.fragDepth,extensionDrawBuffers:fe&&!0===s.extensions.drawBuffers,extensionShaderTextureLOD:fe&&!0===s.extensions.shaderTextureLOD,extensionCl
vendor: 12,477 bytes, line 21
21ipCullDistance:fe&&!0===s.extensions.clipCullDistance&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:fe&&!0===s.extensions.multiDraw&&i.has("WEBGL_multi_draw"),rendererExtensionFragDepth:u||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||i.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:s.customProgramCacheKey()};return ge.vertexUv1s=c.has(1),ge.vertexUv2s=c.has(2),ge.vertexUv3s=c.has(3),c.clear(),ge},getProgramCacheKey:function(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(!function(e,t){e.push(t.precision),e.push(t.outputColorSpace),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.mapUv),e.push(t.alphaMapUv),e.push(t.lightMapUv),e.push(t.aoMapUv),e.push(t.bumpMapUv),e.push(t.normalMapUv),e.push(t.displacementMapUv),e.push(t.emissiveMapUv),e.push(t.metalnessMapUv),e.push(t.roughnessMapUv),e.push(t.anisotropyMapUv),e.push(t.clearcoatMapUv),e.push(t.clearcoatNormalMapUv),e.push(t.clearcoatRoughnessMapUv),e.push(t.iridescenceMapUv),e.push(t.iridescenceThicknessMapUv),e.push(t.sheenColorMapUv),e.push(t.sheenRoughnessMapUv),e.push(t.specularMapUv),e.push(t.specularColorMapUv),e.push(t.specularIntensityMapUv),e.push(t.transmissionMapUv),e.push(t.thicknessMapUv),e.push(t.combine),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.numLightProbes),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}(n,t),function(e,t){a.disableAll(),t.isWebGL2&&a.enable(0);t.supportsVertexTextures&&a.enable(1);t.instancing&&a.enable(2);t.instancingColor&&a.enable(3);t.matcap&&a.enable(4);t.envMap&&a.enable(5);t.normalMapObjectSpace&&a.enable(6);t.normalMapTangentSpace&&a.enable(7);t.clearcoat&&a.enable(8);t.iridescence&&a.enable(9);t.alphaTest&&a.enable(10);t.vertexColors&&a.enable(11);t.vertexAlphas&&a.enable(12);t.vertexUv1s&&a.enable(13);t.vertexUv2s&&a.enable(14);t.vertexUv3s&&a.enable(15);t.vertexTangents&&a.enable(16);t.anisotropy&&a.enable(17);t.alphaHash&&a.enable(18);t.batching&&a.enable(19);e.push(a.mask),a.disableAll(),t.fog&&a.enable(0);t.useFog&&a.enable(1);t.flatShading&&a.enable(2);t.logarithmicDepthBuffer&&a.enable(3);t.skinning&&a.enable(4);t.morphTargets&&a.enable(5);t.morphNormals&&a.enable(6);t.morphColors&&a.enable(7);t.premultipliedAlpha&&a.enable(8);t.shadowMapEnabled&&a.enable(9);t.useLegacyLights&&a.enable(10);t.doubleSided&&a.enable(11);t.flipSided&&a.enable(12);t.useDepthPacking&&a.enable(13);t.dithering&&a.enable(14);t.transmission&&a.enable(15);t.sheen&&a.enable(16);t.opaque&&a.enable(17);t.pointsUvs&&a.enable(18);t.decodeVideoTexture&&a.enable(19);t.alphaToCoverage&&a.enable(20);e.push(a.mask)}(n,t),n.push(e.outputColorSpace)),n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=m[e.type];let n;if(t){const e=Ay[t];n=ry.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let i;for(let e=0,t=h.length;e<t;e++){const t=h[e];if(t.cacheKey===n){i=t,++i.usedTimes;break}}return void 0===i&&(i=new Rb(e,n,t,s),h.push(i)),i},releaseProgram:function(e){if(0==--e.usedTimes){const t=h.indexOf(e);h[t]=h[h.length-1],h.pop(),e.destroy()}},releaseShaderCache:function(e){l.remove(e)},programs:h,dispose:function(){l.dispose()}}}function Nb(){let e=new WeakMap;return{get:function(t){let n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,i){e.get(t)[n]=i},dispose:function(){e=new WeakMap}}}function Ob(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function Ub(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function kb(){const e=[];let t=0;const n=[],i=[],r=[];function s(n,i,r,s,o,a){let l=e[t];return void 0===l?(l={id:n.id,object:n,geometry:i,material:r,groupOrder:s,renderOrder:n.renderOrder,z:o,group:a},e[t]=l):(l.id=n.id,l.object=n,l.geometry=i,l.material=r,l.groupOrder=s,l.renderOrder=n.renderOrder,l.z=o,l.group=a),t++,l}return{opaque:n,transmissive:i,transparent:r,init:function(){t=0,n.length=0,i.length=0,r.length=0},push:function(e,t,o,a,l,c){const h=s(e,t,o,a,l,c);o.transmission>0?i.push(h):!0===o.transparent?r.push(h):n.push(h)},unshift:function(e,t,o,a,l,c){const h=s(e,t,o,a,l,c);o.transmission>0?i.unshift(h):!0===o.transparent?r.unshift(h):n.unshift(h)},finish:function(){for(let n=t,i=e.length;n<i;n++){const t=e[n];if(null===t.id)break;t.id=null,t.object=null,t.geometry=null,t.material=null,t.group=null}},sort:function(e,t){n.length>1&&n.sort(e||Ob),i.length>1&&i.sort(t||Ub),r.length>1&&r.sort(t||Ub)}}}function Fb(){let e=new WeakMap;return{get:function(t,n){const i=e.get(t);let r;return void 0===i?(r=new kb,e.set(t,[r])):n>=i.length?(r=new kb,i.push(r)):r=i[n],r},dispose:function(){e=new WeakMap}}}function Vb(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new Qg,color:new g_};break;case"SpotLight":n={position:new Qg,direction:new Qg,color:new g_,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new Qg,color:new g_,distance:0,decay:0};break;case"HemisphereLight":n={direction:new Qg,skyColor:new g_,groundColor:new g_};break;case"RectAreaLight":n={color:new g_,position:new Qg,halfWidth:new Qg,halfHeight:new Qg}}return e[t.id]=n,n}}}let Bb=0;function zb(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function Hb(e,t){const n=new Vb,i=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Mg};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Mg,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let e=0;e<9;e++)r.probe.push(new Qg);const s=new Qg,o=new Rv,a=new Rv;return{setup:function(s,o){let a=0,l=0,c=0;for(let e=0;e<9;e++)r.probe[e].set(0,0,0);let h=0,u=0,d=0,p=0,f=0,m=0,g=0,v=0,_=0,y=0,x=0;s.sort(zb);const b=!0===o?Math.PI:1;for(let e=0,t=s.length;e<t;e++){const t=s[e],o=t.color,w=t.intensity,S=t.distance,E=t.shadow&&t.shadow.map?t.shadow.map.texture:null;if(t.isAmbientLight)a+=o.r*w*b,l+=o.g*w*b,c+=o.b*w*b;else if(t.isLightProbe){for(let e=0;e<9;e++)r.probe[e].addScaledVector(t.sh.coefficients[e],w);x++}else if(t.isDirectionalLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity*b),t.castShadow){const e=t.shadow,n=i.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,r.directionalShadow[h]=n,r.directionalShadowMap[h]=E,r.directionalShadowMatrix[h]=t.shadow.matrix,m++}r.directional[h]=e,h++}else if(t.isSpotLight){const e=n.get(t);e.position.setFromMatrixPosition(t.matrixWorld),e.color.copy(o).multiplyScalar(w*b),e.distance=S,e.coneCos=Math.cos(t.angle),e.penumbraCos=Math.cos(t.angle*(1-t.penumbra)),e.decay=t.decay,r.spot[d]=e;const s=t.shadow;if(t.map&&(r.spotLightMap[_]=t.map,_++,s.updateMatrices(t),t.castShadow&&y++),r.spotLightMatrix[d]=s.matrix,t.castShadow){const e=i.get(t);e.shadowBias=s.bias,e.shadowNormalBias=s.normalBias,e.shadowRadius=s.radius,e.shadowMapSize=s.mapSize,r.spotShadow[d]=e,r.spotShadowMap[d]=E,v++}d++}else if(t.isRectAreaLight){const e=n.get(t);e.color.copy(o).multiplyScalar(w),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),r.rectArea[p]=e,p++}else if(t.isPointLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity*b),e.distance=t.distance,e.decay=t.decay,t.castShadow){const e=t.shadow,n=i.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,n.shadowCameraNear=e.camera.near,n.shadowCameraFar=e.camera.far,r.pointShadow[u]=n,r.pointShadowMap[u]=E,r.pointShadowMatrix[u]=t.shadow.matrix,g++}r.point[u]=e,u++}else if(t.isHemisphereLight){const e=n.get(t);e.skyColor.copy(t.color).multiplyScalar(w*b),e.groundColor.copy(t.groundColor).multiplyScalar(w*b),r.hemi[f]=e,f++}}p>0&&(t.isWebGL2?!0===e.has("OES_texture_float_linear")?(r.rectAreaLTC1=Ty.LTC_FLOAT_1,r.rectAreaLTC2=Ty.LTC_FLOAT_2):(r.rectAreaLTC1=Ty.LTC_HALF_1,r.rectAreaLTC2=Ty.LTC_HALF_2):!0===e.has("OES_texture_float_linear")?(r.rectAreaLTC1=Ty.LTC_FLOAT_1,r.rectAreaLTC2=Ty.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(r.rectAreaLTC1=Ty.LTC_HALF_1,r.rectAreaLTC2=Ty.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=a,r.ambient[1]=l,r.ambient[2]=c;const w=r.hash;w.directionalLength===h&&w.pointLength===u&&w.spotLength===d&&w.rectAreaLength===p&&w.hemiLength===f&&w.numDirectionalShadows===m&&w.numPointShadows===g&&w.numSpotShadows===v&&w.numSpotMaps===_&&w.numLightProbes===x||(r.directional.length=h,r.spot.length=d,r.rectArea.length=p,r.point.length=u,r.hemi.length=f,r.directionalShadow.length=m,r.directionalShadowMap.length=m,r.pointShadow.length=g,r.pointShadowMap.length=g,r.spotShadow.length=v,r.spotShadowMap.length=v,r.directionalShadowMatrix.length=m,r.pointShadowMatrix.length=g,r.spotLightMatrix.length=v+_-y,r.spotLightMap.length=_,r.numSpotLightShadowsWithMaps=y,r.numLightProbes=x,w.directionalLength=h,w.pointLength=u,w.spotLength=d,w.rectAreaLength=p,w.hemiLength=f,w.numDirectionalShadows=m,w.numPointShadows=g,w.numSpotShadows=v,w.numSpotMaps=_,w.numLightProbes=x,r.version=Bb++)},setupView:function(e,t){let n=0,i=0,l=0,c=0,h=0;const u=t.matrixWorldInverse;for(let t=0,d=e.length;t<d;t++){const d=e[t];if(d.isDirectionalLight){const e=r.directional[n];e.direction.setFromMatrixPosition(d.matrixWorld),s.setFromMatrixPosition(d.target.matrixWorld),e.direction.sub(s),e.direction.transformDirection(u),n++}else if(d.isSpotLight){const e=r.spot[l];e.position.setFromMatrixPosition(d.matrixWorld),e.position.applyMatrix4(u),e.direction.setFromMatrixPosition(d.matrixWorld),s.setFromMatrixPosition(d.target.matrixWorld),e.direction.sub(s),e.direction.transformDirection(u),l++}else if(d.isRectAreaLight){const e=r.rectArea[c];e.position.setFromMatrixPosition(d.matrixWorld),e.position.applyMatrix4(u),a.identity(),o.copy(d.matrixWorld),o.premultiply(u),a.extractRotation(o),e.halfWidth.set(.5*d.width,0,0),e.halfHeight.set(0,.5*d.height,0),e.halfWidth.applyMatrix4(a),e.halfHeight.applyMatrix4(a),c++}else if(d.isPointLight){const e=r.point[i];e.position.setFromMatrixPosition(d.matrixWorld),e.position.applyMatrix4(u),i++}else if(d.isHemisphereLight){const e=r.hemi[h];e.direction.setFromMatrixPosition(d.matrixWorld),e.direction.transformDirection(u),h++}}},state:r}}function Gb(e,t){const n=new Hb(e,t),i=[],r=[];return{init:function(){i.length=0,r.length=0},state:{lightsArray:i,shadowsArray:r,lights:n},setupLights:function(e){n.setup(i,e)},setupLightsView:function(e){n.setupView(i,e)},pushLight:function(e){i.push(e)},pushShadow:function(e){r.push(e)}}}function Wb(e,t){let n=new WeakMap;return{get:function(i,r=0){const s=n.get(i);let o;return void 0===s?(o=new Gb(e,t),n.set(i,[o])):r>=s.length?(o=new Gb(e,t),s.push(o)):o=s[r],o},dispose:function(){n=new WeakMap}}}
vendor: 6,596 bytes, line 21
21class jb extends y_{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class qb extends y_{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}function Xb(e,t,n){let i=new by;const r=new Mg,s=new Mg,o=new Xg,a=new jb({depthPacking:3201}),l=new qb,c={},h=n.maxTextureSize,u={0:1,1:0,2:2},d=new sy({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Mg},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),p=d.clone();p.defines.HORIZONTAL_PASS=1;const f=new N_;f.setAttribute("position",new S_(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const m=new J_(f,d),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1;let v=this.type;function _(n,i){const s=t.update(m);d.defines.VSM_SAMPLES!==n.blurSamples&&(d.defines.VSM_SAMPLES=n.blurSamples,p.defines.VSM_SAMPLES=n.blurSamples,d.needsUpdate=!0,p.needsUpdate=!0),null===n.mapPass&&(n.mapPass=new Yg(r.x,r.y)),d.uniforms.shadow_pass.value=n.map.texture,d.uniforms.resolution.value=n.mapSize,d.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(i,null,s,d,m,null),p.uniforms.shadow_pass.value=n.mapPass.texture,p.uniforms.resolution.value=n.mapSize,p.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(i,null,s,p,m,null)}function y(t,n,i,r){let s=null;const o=!0===i.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==o)s=o;else if(s=!0===i.isPointLight?l:a,e.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0){const e=s.uuid,t=n.uuid;let i=c[e];void 0===i&&(i={},c[e]=i);let r=i[t];void 0===r&&(r=s.clone(),i[t]=r,n.addEventListener("dispose",b)),s=r}if(s.visible=n.visible,s.wireframe=n.wireframe,s.side=3===r?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:u[n.side],s.alphaMap=n.alphaMap,s.alphaTest=n.alphaTest,s.map=n.map,s.clipShadows=n.clipShadows,s.clippingPlanes=n.clippingPlanes,s.clipIntersection=n.clipIntersection,s.displacementMap=n.displacementMap,s.displacementScale=n.displacementScale,s.displacementBias=n.displacementBias,s.wireframeLinewidth=n.wireframeLinewidth,s.linewidth=n.linewidth,!0===i.isPointLight&&!0===s.isMeshDistanceMaterial){e.properties.get(s).light=i}return s}function x(n,r,s,o,a){if(!1===n.visible)return;if(n.layers.test(r.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&3===a)&&(!n.frustumCulled||i.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(s.matrixWorldInverse,n.matrixWorld);const i=t.update(n),l=n.material;if(Array.isArray(l)){const t=i.groups;for(let c=0,h=t.length;c<h;c++){const h=t[c],u=l[h.materialIndex];if(u&&u.visible){const t=y(n,u,o,a);n.onBeforeShadow(e,n,r,s,i,t,h),e.renderBufferDirect(s,null,i,t,n,h),n.onAfterShadow(e,n,r,s,i,t,h)}}}else if(l.visible){const t=y(n,l,o,a);n.onBeforeShadow(e,n,r,s,i,t,null),e.renderBufferDirect(s,null,i,t,n,null),n.onAfterShadow(e,n,r,s,i,t,null)}}const l=n.children;for(let e=0,t=l.length;e<t;e++)x(l[e],r,s,o,a)}function b(e){e.target.removeEventListener("dispose",b);for(const t in c){const n=c[t],i=e.target.uuid;if(i in n){n[i].dispose(),delete n[i]}}}this.render=function(t,n,a){if(!1===g.enabled)return;if(!1===g.autoUpdate&&!1===g.needsUpdate)return;if(0===t.length)return;const l=e.getRenderTarget(),c=e.getActiveCubeFace(),u=e.getActiveMipmapLevel(),d=e.state;d.setBlending(0),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);const p=3!==v&&3===this.type,f=3===v&&3!==this.type;for(let l=0,c=t.length;l<c;l++){const c=t[l],u=c.shadow;if(void 0===u){console.warn("THREE.WebGLShadowMap:",c,"has no shadow.");continue}if(!1===u.autoUpdate&&!1===u.needsUpdate)continue;r.copy(u.mapSize);const m=u.getFrameExtents();if(r.multiply(m),s.copy(u.mapSize),(r.x>h||r.y>h)&&(r.x>h&&(s.x=Math.floor(h/m.x),r.x=s.x*m.x,u.mapSize.x=s.x),r.y>h&&(s.y=Math.floor(h/m.y),r.y=s.y*m.y,u.mapSize.y=s.y)),null===u.map||!0===p||!0===f){const e=3!==this.type?{minFilter:wm,magFilter:wm}:{};null!==u.map&&u.map.dispose(),u.map=new Yg(r.x,r.y,e),u.map.texture.name=c.name+".shadowMap",u.camera.updateProjectionMatrix()}e.setRenderTarget(u.map),e.clear();const g=u.getViewportCount();for(let e=0;e<g;e++){const t=u.getViewport(e);o.set(s.x*t.x,s.y*t.y,s.x*t.z,s.y*t.w),d.viewport(o),u.updateMatrices(c,e),i=u.getFrustum(),x(n,a,u.camera,c,this.type)}!0!==u.isPointLightShadow&&3===this.type&&_(u,a),u.needsUpdate=!1}
21v=this.type,g.needsUpdate=!1,e.setRenderTarget(l,c,u)}}function $b(e,t,n){const i=n.isWebGL2;const r=new function(){let t=!1;const n=new Xg;let i=null;const r=new Xg(0,0,0,0);return{setMask:function(n){i===n||t||(e.colorMask(n,n,n,n),i=n)},setLocked:function(e){t=e},setClear:function(t,i,s,o,a){!0===a&&(t*=o,i*=o,s*=o),n.set(t,i,s,o),!1===r.equals(n)&&(e.clearColor(t,i,s,o),r.copy(n))},reset:function(){t=!1,i=null,r.set(-1,0,0,0)}}},s=new function(){let t=!1,n=null,i=null,r=null;return{setTest:function(t){t?H(e.DEPTH_TEST):G(e.DEPTH_TEST)},setMask:function(i){n===i||t||(e.depthMask(i),n=i)},setFunc:function(t){if(i!==t){switch(t){case 0:e.depthFunc(e.NEVER);break;case 1:e.depthFunc(e.ALWAYS);break;case 2:e.depthFunc(e.LESS);break;case 3:default:e.depthFunc(e.LEQUAL);break;case 4:e.depthFunc(e.EQUAL);break;case 5:e.depthFunc(e.GEQUAL);break;case 6:e.depthFunc(e.GREATER);break;case 7:e.depthFunc(e.NOTEQUAL)}i=t}},setLocked:function(e){t=e},setClear:function(t){r!==t&&(e.clearDepth(t),r=t)},reset:function(){t=!1,n=null,i=null,r=null}}},o=new function(){let t=!1,n=null,i=null,r=null,s=null,o=null,a=null,l=null,c=null;return{setTest:function(n){t||(n?H(e.STENCIL_TEST):G(e.STENCIL_TEST))},setMask:function(i){n===i||t||(e.stencilMask(i),n=i)},setFunc:function(t,n,o){i===t&&r===n&&s===o||(e.stencilFunc(t,n,o),i=t,r=n,s=o)},setOp:function(t,n,i){o===t&&a===n&&l===i||(e.stencilOp(t,n,i),o=t,a=n,l=i)},setLocked:function(e){t=e},setClear:function(t){c!==t&&(e.clearStencil(t),c=t)},reset:function(){t=!1,n=null,i=null,r=null,s=null,o=null,a=null,l=null,c=null}}},a=new WeakMap,l=new WeakMap;let c={},h={},u=new WeakMap,d=[],p=null,f=!1,m=null,g=null,v=null,_=null,y=null,x=null,b=null,w=new g_(0,0,0),S=0,E=!1,M=null,T=null,A=null,C=null,R=null;const P=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let L=!1,I=0;const D=e.getParameter(e.VERSION);-1!==D.indexOf("WebGL")?(I=parseFloat(/^WebGL (\d)/.exec(D)[1]),L=I>=1):-1!==D.indexOf("OpenGL ES")&&(I=parseFloat(/^OpenGL ES (\d)/.exec(D)[1]),L=I>=2);let N=null,O={};const U=e.getParameter(e.SCISSOR_BOX),k=e.getParameter(e.VIEWPORT),F=(new Xg).fromArray(U),V=(new Xg).fromArray(k);function B(t,n,r,s){const o=new Uint8Array(4),a=e.createTexture();e.bindTexture(t,a),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let a=0;a<r;a++)!i||t!==e.TEXTURE_3D&&t!==e.TEXTURE_2D_ARRAY?e.texImage2D(n+a,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,o):e.texImage3D(n,0,e.RGBA,1,1,s,0,e.RGBA,e.UNSIGNED_BYTE,o);return a}const z={};function H(t){!0!==c[t]&&(e.enable(t),c[t]=!0)}function G(t){!1!==c[t]&&(e.disable(t),c[t]=!1)}z[e.TEXTURE_2D]=B(e.TEXTURE_2D,e.TEXTURE_2D,1),z[e.TEXTURE_CUBE_MAP]=B(e.TEXTURE_CUBE_MAP,e.TEXTURE_CUBE_MAP_POSITIVE_X,6),i&&(z[e.TEXTURE_2D_ARRAY]=B(e.TEXTURE_2D_ARRAY,e.TEXTURE_2D_ARRAY,1,1),z[e.TEXTURE_3D]=B(e.TEXTURE_3D,e.TEXTURE_3D,1,1)),r.setClear(0,0,0,1),s.setClear(1),o.setClear(0),H(e.DEPTH_TEST),s.setFunc(3),X(!1),$(1),H(e.CULL_FACE),q(0);const W={[pm]:e.FUNC_ADD,101:e.FUNC_SUBTRACT,102:e.FUNC_REVERSE_SUBTRACT};if(i)W[103]=e.MIN,W[104]=e.MAX;else{const e=t.get("EXT_blend_minmax");null!==e&&(W[103]=e.MIN_EXT,W[104]=e.MAX_EXT)}const j={200:e.ZERO,201:e.ONE,202:e.SRC_COLOR,204:e.SRC_ALPHA,210:e.SRC_ALPHA_SATURATE,208:e.DST_COLOR,206:e.DST_ALPHA,203:e.ONE_MINUS_SRC_COLOR,205:e.ONE_MINUS_SRC_ALPHA,209:e.ONE_MINUS_DST_COLOR,207:e.ONE_MINUS_DST_ALPHA,211:e.CONSTANT_COLOR,212:e.ONE_MINUS_CONSTANT_COLOR,213:e.CONSTANT_ALPHA,214:e.ONE_MINUS_CONSTANT_ALPHA};function q(t,n,i,r,s,o,a,l,c,h){if(0!==t){if(!1===f&&(H(e.BLEND),f=!0),5===t)s=s||n,o=o||i,a=a||r,n===g&&s===y||(e.blendEquationSeparate(W[n],W[s]),g=n,y=s),i===v&&r===_&&o===x&&a===b||(e.blendFuncSeparate(j[i],j[r],j[o],j[a]),v=i,_=r,x=o,b=a),!1!==l.equals(w)&&c===S||(e.blendColor(l.r,l.g,l.b,c),w.copy(l),S=c),m=t,E=!1;else if(t!==m||h!==E){if(g===pm&&y===pm||(e.blendEquation(e.FUNC_ADD),g=pm,y=pm),h)switch(t){case 1:e.blendFuncSeparate(e.ONE,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case 2:e.blendFunc(e.ONE,e.ONE);break;case 3:e.blendFuncSeparate(e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ZERO,e.ONE);break;case 4:e.blendFuncSeparate(e.ZERO,e.SRC_COLOR,e.ZERO,e.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case 1:e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case 2:e.blendFunc(e.SRC_ALPHA,e.ONE);break;case 3:e.blendFuncSeparate(e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ZERO,e.ONE);break;case 4:e.blendFunc(e.ZERO,e.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}v=null,_=null,x=null,b=null,w.set(0,0,0),S=0,m=t,E=h}}else!0===f&&(G(e.BLEND),f=!1)}function X(t){M!==t&&(t?e.frontFace(e.CW):e.frontFace(e.CCW),M=t)}function $(t){0!==t?(H(e.CULL_FACE),t!==T&&(1===t?e.cullFace(e.BACK):2===t?e.cullFace(e.FRONT):e.cullFace(e.FRONT_AND_BACK))):G(e.CULL_FACE),T=t}function Y(t,n,i){t?(H(e.POLYGON_OFFSET_FILL),C===n&&R===i||(e.polygonOffset(n,i),C=n,R=i)):G(e.POLYGON_OFFSET_FILL)}return{buffers:{color:r,depth:s,stencil:o},enable:H,disable:G,bindFramebuffer:function(t,n){return h[t]!==n&&(e.bindFramebuffer(t,n),h[t]=n,i&&(t===e.DRAW_FRAMEBUFFER&&(h[e.FRAMEBUFFER]=n),t===e.FRAMEBUFFER&&(h[e.DRAW_FRAMEBUFFER]=n)),!0)},drawBuffers:function(i,r){let s=d,o=!1;if(i)if(s=u.get(r),void 0===s&&(s=[],u.set(r,s)),i.isWebGLMultipleRenderTargets){const t=i.texture;if(s.length!==t.length||s[0]!==e.COLOR_ATTACHMENT0){for(let n=0,i=t.length;n<i;n++)s[n]=e.COLOR_ATTACHMENT0+n;s.length=t.length,o=!0}}else s[0]!==e.COLOR_ATTACHMENT0&&(s[0]=e.COLOR_ATTACHMENT0,o=!0);else s[0]!==e.BACK&&(s[0]=e.BACK,o=!0);
vendor: 5,083 bytes, line 21
21o&&(n.isWebGL2?e.drawBuffers(s):t.get("WEBGL_draw_buffers").drawBuffersWEBGL(s))},useProgram:function(t){return p!==t&&(e.useProgram(t),p=t,!0)},setBlending:q,setMaterial:function(t,n){2===t.side?G(e.CULL_FACE):H(e.CULL_FACE);let i=1===t.side;n&&(i=!i),X(i),1===t.blending&&!1===t.transparent?q(0):q(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.blendColor,t.blendAlpha,t.premultipliedAlpha),s.setFunc(t.depthFunc),s.setTest(t.depthTest),s.setMask(t.depthWrite),r.setMask(t.colorWrite);const a=t.stencilWrite;o.setTest(a),a&&(o.setMask(t.stencilWriteMask),o.setFunc(t.stencilFunc,t.stencilRef,t.stencilFuncMask),o.setOp(t.stencilFail,t.stencilZFail,t.stencilZPass)),Y(t.polygonOffset,t.polygonOffsetFactor,t.polygonOffsetUnits),!0===t.alphaToCoverage?H(e.SAMPLE_ALPHA_TO_COVERAGE):G(e.SAMPLE_ALPHA_TO_COVERAGE)},setFlipSided:X,setCullFace:$,setLineWidth:function(t){t!==A&&(L&&e.lineWidth(t),A=t)},setPolygonOffset:Y,setScissorTest:function(t){t?H(e.SCISSOR_TEST):G(e.SCISSOR_TEST)},activeTexture:function(t){void 0===t&&(t=e.TEXTURE0+P-1),N!==t&&(e.activeTexture(t),N=t)},bindTexture:function(t,n,i){void 0===i&&(i=null===N?e.TEXTURE0+P-1:N);let r=O[i];void 0===r&&(r={type:void 0,texture:void 0},O[i]=r),r.type===t&&r.texture===n||(N!==i&&(e.activeTexture(i),N=i),e.bindTexture(t,n||z[t]),r.type=t,r.texture=n)},unbindTexture:function(){const t=O[N];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},compressedTexImage3D:function(){try{e.compressedTexImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},updateUBOMapping:function(t,n){let i=l.get(n);void 0===i&&(i=new WeakMap,l.set(n,i));let r=i.get(t);void 0===r&&(r=e.getUniformBlockIndex(n,t.name),i.set(t,r))},uniformBlockBinding:function(t,n){const i=l.get(n).get(t);a.get(n)!==i&&(e.uniformBlockBinding(n,i,t.__bindingPointIndex),a.set(n,i))},texStorage2D:function(){try{e.texStorage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texStorage3D:function(){try{e.texStorage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texSubImage2D:function(){try{e.texSubImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texSubImage3D:function(){try{e.texSubImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},compressedTexSubImage2D:function(){try{e.compressedTexSubImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},compressedTexSubImage3D:function(){try{e.compressedTexSubImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},scissor:function(t){!1===F.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),F.copy(t))},viewport:function(t){!1===V.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),V.copy(t))},reset:function(){e.disable(e.BLEND),e.disable(e.CULL_FACE),e.disable(e.DEPTH_TEST),e.disable(e.POLYGON_OFFSET_FILL),e.disable(e.SCISSOR_TEST),e.disable(e.STENCIL_TEST),e.disable(e.SAMPLE_ALPHA_TO_COVERAGE),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ZERO),e.blendFuncSeparate(e.ONE,e.ZERO,e.ONE,e.ZERO),e.blendColor(0,0,0,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(e.LESS),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(e.ALWAYS,0,4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),e.clearStencil(0),e.cullFace(e.BACK),e.frontFace(e.CCW),e.polygonOffset(0,0),e.activeTexture(e.TEXTURE0),e.bindFramebuffer(e.FRAMEBUFFER,null),!0===i&&(e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),e.bindFramebuffer(e.READ_FRAMEBUFFER,null)),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),c={},N=null,O={},h={},u=new WeakMap,d=[],p=null,f=!1,m=null,g=null,v=null,_=null,y=null,x=null,b=null,w=new g_(0,0,0),S=0,E=!1,M=null,T=null,A=null,C=null,R=null,F.set(0,0,e.canvas.width,e.canvas.height),V.set(0,0,e.canvas.width,e.canvas.height),r.reset(),s.reset(),o.reset()}}}function Yb(e,t,n,i,r,s,o){const a=r.isWebGL2,l=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,c="undefined"!=typeof navigator&&/OculusBrowser/g.test(navigator.userAgent),h=new WeakMap;let u;const d=new WeakMap;let p=!1;try{p="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(e){}function f(e,t){return p?new OffscreenCanvas(e,t):Rg("canvas")}function m(e,t,n,i){let r=1;if((e.width>i||e.height>i)&&(r=i/Math.max(e.width,e.height)),r<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const i=t?bg:Math.floor,s=i(r*e.width),o=i(r*e.he
21ight);void 0===u&&(u=f(s,o));const a=n?f(s,o):u;a.width=s,a.height=o;return a.getContext("2d").drawImage(e,0,0,s,o),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+s+"x"+o+")."),a}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function g(e){return xg(e.width)&&xg(e.height)}function v(e,t){return e.generateMipmaps&&t&&e.minFilter!==wm&&e.minFilter!==Mm}function _(t){e.generateMipmap(t)}function y(n,i,r,s,o=!1){if(!1===a)return i;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let l=i;if(i===e.RED&&(r===e.FLOAT&&(l=e.R32F),r===e.HALF_FLOAT&&(l=e.R16F),r===e.UNSIGNED_BYTE&&(l=e.R8)),i===e.RED_INTEGER&&(r===e.UNSIGNED_BYTE&&(l=e.R8UI),r===e.UNSIGNED_SHORT&&(l=e.R16UI),r===e.UNSIGNED_INT&&(l=e.R32UI),r===e.BYTE&&(l=e.R8I),r===e.SHORT&&(l=e.R16I),r===e.INT&&(l=e.R32I)),i===e.RG&&(r===e.FLOAT&&(l=e.RG32F),r===e.HALF_FLOAT&&(l=e.RG16F),r===e.UNSIGNED_BYTE&&(l=e.RG8)),i===e.RGBA){const t=o?tg:kg.getTransfer(s);r===e.FLOAT&&(l=e.RGBA32F),r===e.HALF_FLOAT&&(l=e.RGBA16F),r===e.UNSIGNED_BYTE&&(l=t===ng?e.SRGB8_ALPHA8:e.RGBA8),r===e.UNSIGNED_SHORT_4_4_4_4&&(l=e.RGBA4),r===e.UNSIGNED_SHORT_5_5_5_1&&(l=e.RGB5_A1)}return l!==e.R16F&&l!==e.R32F&&l!==e.RG16F&&l!==e.RG32F&&l!==e.RGBA16F&&l!==e.RGBA32F||t.get("EXT_color_buffer_float"),l}function x(e,t,n){return!0===v(e,n)||e.isFramebufferTexture&&e.minFilter!==wm&&e.minFilter!==Mm?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function b(t){return t===wm||t===Sm||t===Em?e.NEAREST:e.LINEAR}function w(e){const t=e.target;t.removeEventListener("dispose",w),function(e){const t=i.get(e);if(void 0===t.__webglInit)return;const n=e.source,r=d.get(n);if(r){const i=r[t.__cacheKey];i.usedTimes--,0===i.usedTimes&&E(e),0===Object.keys(r).length&&d.delete(n)}i.remove(e)}(t),t.isVideoTexture&&h.delete(t)}function S(t){const n=t.target;n.removeEventListener("dispose",S),function(t){const n=t.texture,r=i.get(t),s=i.get(n);void 0!==s.__webglTexture&&(e.deleteTexture(s.__webglTexture),o.memory.textures--);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++){if(Array.isArray(r.__webglFramebuffer[t]))for(let n=0;n<r.__webglFramebuffer[t].length;n++)e.deleteFramebuffer(r.__webglFramebuffer[t][n]);else e.deleteFramebuffer(r.__webglFramebuffer[t]);r.__webglDepthbuffer&&e.deleteRenderbuffer(r.__webglDepthbuffer[t])}else{if(Array.isArray(r.__webglFramebuffer))for(let t=0;t<r.__webglFramebuffer.length;t++)e.deleteFramebuffer(r.__webglFramebuffer[t]);else e.deleteFramebuffer(r.__webglFramebuffer);if(r.__webglDepthbuffer&&e.deleteRenderbuffer(r.__webglDepthbuffer),r.__webglMultisampledFramebuffer&&e.deleteFramebuffer(r.__webglMultisampledFramebuffer),r.__webglColorRenderbuffer)for(let t=0;t<r.__webglColorRenderbuffer.length;t++)r.__webglColorRenderbuffer[t]&&e.deleteRenderbuffer(r.__webglColorRenderbuffer[t]);r.__webglDepthRenderbuffer&&e.deleteRenderbuffer(r.__webglDepthRenderbuffer)}if(t.isWebGLMultipleRenderTargets)for(let t=0,r=n.length;t<r;t++){const r=i.get(n[t]);r.__webglTexture&&(e.deleteTexture(r.__webglTexture),o.memory.textures--),i.remove(n[t])}i.remove(n),i.remove(t)}(n)}function E(t){const n=i.get(t);e.deleteTexture(n.__webglTexture);const r=t.source;delete d.get(r)[n.__cacheKey],o.memory.textures--}let M=0;function T(t,r){const s=i.get(t);if(t.isVideoTexture&&function(e){const t=o.render.frame;h.get(e)!==t&&(h.set(e,t),e.update())}(t),!1===t.isRenderTargetTexture&&t.version>0&&s.__version!==t.version){const e=t.image;if(null===e)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==e.complete)return void I(s,t,r);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.bindTexture(e.TEXTURE_2D,s.__webglTexture,e.TEXTURE0+r)}const A={[ym]:e.REPEAT,[xm]:e.CLAMP_TO_EDGE,[bm]:e.MIRRORED_REPEAT},C={[wm]:e.NEAREST,[Sm]:e.NEAREST_MIPMAP_NEAREST,[Em]:e.NEAREST_MIPMAP_LINEAR,[Mm]:e.LINEAR,[Tm]:e.LINEAR_MIPMAP_NEAREST,[Am]:e.LINEAR_MIPMAP_LINEAR},R={512:e.NEVER,519:e.ALWAYS,513:e.LESS,515:e.LEQUAL,514:e.EQUAL,518:e.GEQUAL,516:e.GREATER,517:e.NOTEQUAL};function P(n,s,o){if(s.type!==Im||!1!==t.has("OES_texture_float_linear")||s.magFilter!==Mm&&s.magFilter!==Tm&&s.magFilter!==Em&&s.magFilter!==Am&&s.minFilter!==Mm&&s.minFilter!==Tm&&s.minFilter!==Em&&s.minFilter!==Am||console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),o?(e.texParameteri(n,e.TEXTURE_WRAP_S,A[s.wrapS]),e.texParameteri(n,e.TEXTURE_WRAP_T,A[s.wrapT]),n!==e.TEXTURE_3D&&n!==e.TEXTURE_2D_ARRAY||e.texParameteri(n,e.TEXTURE_WRAP_R,A[s.wrapR]),e.texParameteri(n,e.TEXTURE_MAG_FILTER,C[s.magFilter]),e.texParameteri(n,e.TEXTURE_MIN_FILTER,C[s.minFilter])):(e.texParameteri(n,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(n,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),n!==e.TEXTURE_3D&&n!==e.TEXTURE_2D_ARRAY||e.texParameteri(n,e.TEXTURE_WRAP_R,e.CLAMP_TO_EDGE),s.wrapS===xm&&s.wrapT===xm||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,e.TEXTURE_MAG_FILTER,b(s.magFilter)),e.texParameteri(n,e.TEXTURE_MIN_FILTER,b(s.minFilter)),s.minFilter!==wm&&s.minFilter!==Mm&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),s.compareFunction&&(e.texParameteri(n,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(n,e.TEXTURE_COMPARE_FUNC,R[s.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){const o=t.get("EXT_texture_filter_anisotropic");if(s.magFilter===wm)return;if(s.minFilter!==Em&&s.minFilter!==Am)return;if(s.type===Im&&!1===t.has("OES_texture_float_linear"))return;if(!1===a&&s.type===Dm&&!1===t.has("OES_texture_half_float_linear"))return;(s.anisotropy>1||i.get(s).__currentAnisotropy)&&(e.texParameterf(n,o.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(s.anisotropy,r.getMaxAnisotropy())),i.get(s).__currentAnisotropy=s.anisotropy)}}function L(t,n){let i=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",w));const r=n.source;let s=d.get(r);void 0===s&&(s={},d.set(r,s));const a=function(e){const t=[];
vendor: 6,875 bytes, line 21
21return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.colorSpace),t.join()}(n);if(a!==t.__cacheKey){void 0===s[a]&&(s[a]={texture:e.createTexture(),usedTimes:0},o.memory.textures++,i=!0),s[a].usedTimes++;const r=s[t.__cacheKey];void 0!==r&&(s[t.__cacheKey].usedTimes--,0===r.usedTimes&&E(n)),t.__cacheKey=a,t.__webglTexture=s[a].texture}return i}function I(t,o,l){let c=e.TEXTURE_2D;(o.isDataArrayTexture||o.isCompressedArrayTexture)&&(c=e.TEXTURE_2D_ARRAY),o.isData3DTexture&&(c=e.TEXTURE_3D);const h=L(t,o),u=o.source;n.bindTexture(c,t.__webglTexture,e.TEXTURE0+l);const d=i.get(u);if(u.version!==d.__version||!0===h){n.activeTexture(e.TEXTURE0+l);const t=kg.getPrimaries(kg.workingColorSpace),i=o.colorSpace===Zm?null:kg.getPrimaries(o.colorSpace),p=o.colorSpace===Zm||t===i?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,o.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,o.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,o.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,p);const f=function(e){return!a&&(e.wrapS!==xm||e.wrapT!==xm||e.minFilter!==wm&&e.minFilter!==Mm)}(o)&&!1===g(o.image);let b=m(o.image,f,!1,r.maxTextureSize);b=F(o,b);const w=g(b)||a,S=s.convert(o.format,o.colorSpace);let E,M=s.convert(o.type),T=y(o.internalFormat,S,M,o.colorSpace,o.isVideoTexture);P(c,o,w);const A=o.mipmaps,C=a&&!0!==o.isVideoTexture&&36196!==T,R=void 0===d.__version||!0===h,L=u.dataReady,I=x(o,b,w);if(o.isDepthTexture)T=e.DEPTH_COMPONENT,a?T=o.type===Im?e.DEPTH_COMPONENT32F:o.type===Lm?e.DEPTH_COMPONENT24:o.type===Nm?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT16:o.type===Im&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),o.format===Um&&T===e.DEPTH_COMPONENT&&o.type!==Rm&&o.type!==Lm&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),o.type=Lm,M=s.convert(o.type)),o.format===km&&T===e.DEPTH_COMPONENT&&(T=e.DEPTH_STENCIL,o.type!==Nm&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),o.type=Nm,M=s.convert(o.type))),R&&(C?n.texStorage2D(e.TEXTURE_2D,1,T,b.width,b.height):n.texImage2D(e.TEXTURE_2D,0,T,b.width,b.height,0,S,M,null));else if(o.isDataTexture)if(A.length>0&&w){C&&R&&n.texStorage2D(e.TEXTURE_2D,I,T,A[0].width,A[0].height);for(let t=0,i=A.length;t<i;t++)E=A[t],C?L&&n.texSubImage2D(e.TEXTURE_2D,t,0,0,E.width,E.height,S,M,E.data):n.texImage2D(e.TEXTURE_2D,t,T,E.width,E.height,0,S,M,E.data);o.generateMipmaps=!1}else C?(R&&n.texStorage2D(e.TEXTURE_2D,I,T,b.width,b.height),L&&n.texSubImage2D(e.TEXTURE_2D,0,0,0,b.width,b.height,S,M,b.data)):n.texImage2D(e.TEXTURE_2D,0,T,b.width,b.height,0,S,M,b.data);else if(o.isCompressedTexture)if(o.isCompressedArrayTexture){C&&R&&n.texStorage3D(e.TEXTURE_2D_ARRAY,I,T,A[0].width,A[0].height,b.depth);for(let t=0,i=A.length;t<i;t++)E=A[t],o.format!==Om?null!==S?C?L&&n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,0,E.width,E.height,b.depth,S,E.data,0,0):n.compressedTexImage3D(e.TEXTURE_2D_ARRAY,t,T,E.width,E.height,b.depth,0,E.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):C?L&&n.texSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,0,E.width,E.height,b.depth,S,M,E.data):n.texImage3D(e.TEXTURE_2D_ARRAY,t,T,E.width,E.height,b.depth,0,S,M,E.data)}else{C&&R&&n.texStorage2D(e.TEXTURE_2D,I,T,A[0].width,A[0].height);for(let t=0,i=A.length;t<i;t++)E=A[t],o.format!==Om?null!==S?C?L&&n.compressedTexSubImage2D(e.TEXTURE_2D,t,0,0,E.width,E.height,S,E.data):n.compressedTexImage2D(e.TEXTURE_2D,t,T,E.width,E.height,0,E.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):C?L&&n.texSubImage2D(e.TEXTURE_2D,t,0,0,E.width,E.height,S,M,E.data):n.texImage2D(e.TEXTURE_2D,t,T,E.width,E.height,0,S,M,E.data)}else if(o.isDataArrayTexture)C?(R&&n.texStorage3D(e.TEXTURE_2D_ARRAY,I,T,b.width,b.height,b.depth),L&&n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,0,b.width,b.height,b.depth,S,M,b.data)):n.texImage3D(e.TEXTURE_2D_ARRAY,0,T,b.width,b.height,b.depth,0,S,M,b.data);else if(o.isData3DTexture)C?(R&&n.texStorage3D(e.TEXTURE_3D,I,T,b.width,b.height,b.depth),L&&n.texSubImage3D(e.TEXTURE_3D,0,0,0,0,b.width,b.height,b.depth,S,M,b.data)):n.texImage3D(e.TEXTURE_3D,0,T,b.width,b.height,b.depth,0,S,M,b.data);else if(o.isFramebufferTexture){if(R)if(C)n.texStorage2D(e.TEXTURE_2D,I,T,b.width,b.height);else{let t=b.width,i=b.height;for(let r=0;r<I;r++)n.texImage2D(e.TEXTURE_2D,r,T,t,i,0,S,M,null),t>>=1,i>>=1}}else if(A.length>0&&w){C&&R&&n.texStorage2D(e.TEXTURE_2D,I,T,A[0].width,A[0].height);for(let t=0,i=A.length;t<i;t++)E=A[t],C?L&&n.texSubImage2D(e.TEXTURE_2D,t,0,0,S,M,E):n.texImage2D(e.TEXTURE_2D,t,T,S,M,E);o.generateMipmaps=!1}else C?(R&&n.texStorage2D(e.TEXTURE_2D,I,T,b.width,b.height),L&&n.texSubImage2D(e.TEXTURE_2D,0,0,0,S,M,b)):n.texImage2D(e.TEXTURE_2D,0,T,S,M,b);v(o,w)&&_(c),d.__version=u.version,o.onUpdate&&o.onUpdate(o)}t.__version=o.version}function D(t,r,o,a,c,h){const u=s.convert(o.format,o.colorSpace),d=s.convert(o.type),p=y(o.internalFormat,u,d,o.colorSpace);if(!i.get(r).__hasExternalTextures){const t=Math.max(1,r.width>>h),i=Math.max(1,r.height>>h);c===e.TEXTURE_3D||c===e.TEXTURE_2D_ARRAY?n.texImage3D(c,h,p,t,i,r.depth,0,u,d,null):n.texImage2D(c,h,p,t,i,0,u,d,null)}n.bindFramebuffer(e.FRAMEBUFFER,t),k(r)?l.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,a,c,i.get(o).__webglTexture,0,U(r)):(c===e.TEXTURE_2D||c>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&c<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,a,c,i.get(o).__webglTexture,h),n.bindFramebuffer(e.FRAMEBUFFER,null)}function N(t,n,i){if(e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer&&!n.stencilBuffer){let r=!0===a?e.DEPTH_COMPONENT24:e.DEPTH_COMPONENT16;if(i||k(n)){const t=n.depthTexture;t&&t.isDepthTexture&&(t.type===Im?r=e.DEPTH_COMPONENT32F:t.type===Lm&&(r=e.DEPTH_COMPONENT24));const i=U(n);k(n)?l.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,i,r,n.width,n.height):e.renderbufferStorageMultisample(e.RENDERBUFFER,i,r,n.width,n.height)}else e.renderbufferStorage(e.RENDERBUFFER,r,n.width,n.height);e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t)}else if(n.depthBuffer&&n.stencilBuffer){const r=U(n);i&&!1===k(n)?e.renderbufferStorageMultisample(e.RENDERBUFFER,r,e.DEPTH24_STENCIL8,n.width,n.height):k(n)?l.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,r,e.DEPTH24_STENCIL8,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t)}
21else{const t=!0===n.isWebGLMultipleRenderTargets?n.texture:[n.texture];for(let r=0;r<t.length;r++){const o=t[r],a=s.convert(o.format,o.colorSpace),c=s.convert(o.type),h=y(o.internalFormat,a,c,o.colorSpace),u=U(n);i&&!1===k(n)?e.renderbufferStorageMultisample(e.RENDERBUFFER,u,h,n.width,n.height):k(n)?l.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,u,h,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,h,n.width,n.height)}}e.bindRenderbuffer(e.RENDERBUFFER,null)}function O(t){const r=i.get(t),s=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture&&!r.__autoAllocateDepthBuffer){if(s)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,r){if(r&&r.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(e.FRAMEBUFFER,t),!r.depthTexture||!r.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");i.get(r.depthTexture).__webglTexture&&r.depthTexture.image.width===r.width&&r.depthTexture.image.height===r.height||(r.depthTexture.image.width=r.width,r.depthTexture.image.height=r.height,r.depthTexture.needsUpdate=!0),T(r.depthTexture,0);const s=i.get(r.depthTexture).__webglTexture,o=U(r);if(r.depthTexture.format===Um)k(r)?l.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,s,0,o):e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,s,0);else{if(r.depthTexture.format!==km)throw new Error("Unknown depthTexture format");k(r)?l.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,s,0,o):e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,s,0)}}(r.__webglFramebuffer,t)}else if(s){r.__webglDepthbuffer=[];for(let i=0;i<6;i++)n.bindFramebuffer(e.FRAMEBUFFER,r.__webglFramebuffer[i]),r.__webglDepthbuffer[i]=e.createRenderbuffer(),N(r.__webglDepthbuffer[i],t,!1)}else n.bindFramebuffer(e.FRAMEBUFFER,r.__webglFramebuffer),r.__webglDepthbuffer=e.createRenderbuffer(),N(r.__webglDepthbuffer,t,!1);n.bindFramebuffer(e.FRAMEBUFFER,null)}function U(e){return Math.min(r.maxSamples,e.samples)}function k(e){const n=i.get(e);return a&&e.samples>0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function F(e,n){const i=e.colorSpace,r=e.format,s=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||e.format===lg||i!==Jm&&i!==Zm&&(kg.getTransfer(i)===ng?!1===a?!0===t.has("EXT_sRGB")&&r===Om?(e.format=lg,e.minFilter=Mm,e.generateMipmaps=!1):n=zg.sRGBToLinear(n):r===Om&&s===Cm||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",i)),n}this.allocateTextureUnit=function(){const e=M;return e>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+r.maxTextures),M+=1,e},this.resetTextureUnits=function(){M=0},this.setTexture2D=T,this.setTexture2DArray=function(t,r){const s=i.get(t);t.version>0&&s.__version!==t.version?I(s,t,r):n.bindTexture(e.TEXTURE_2D_ARRAY,s.__webglTexture,e.TEXTURE0+r)},this.setTexture3D=function(t,r){const s=i.get(t);t.version>0&&s.__version!==t.version?I(s,t,r):n.bindTexture(e.TEXTURE_3D,s.__webglTexture,e.TEXTURE0+r)},this.setTextureCube=function(t,o){const l=i.get(t);t.version>0&&l.__version!==t.version?function(t,o,l){if(6!==o.image.length)return;const c=L(t,o),h=o.source;n.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture,e.TEXTURE0+l);const u=i.get(h);if(h.version!==u.__version||!0===c){n.activeTexture(e.TEXTURE0+l);
21const t=kg.getPrimaries(kg.workingColorSpace),i=o.colorSpace===Zm?null:kg.getPrimaries(o.colorSpace),d=o.colorSpace===Zm||t===i?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,o.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,o.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,o.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,d);const p=o.isCompressedTexture||o.image[0].isCompressedTexture,f=o.image[0]&&o.image[0].isDataTexture,b=[];for(let e=0;e<6;e++)b[e]=p||f?f?o.image[e].image:o.image[e]:m(o.image[e],!1,!0,r.maxCubemapSize),b[e]=F(o,b[e]);const w=b[0],S=g(w)||a,E=s.convert(o.format,o.colorSpace),M=s.convert(o.type),T=y(o.internalFormat,E,M,o.colorSpace),A=a&&!0!==o.isVideoTexture,C=void 0===u.__version||!0===c,R=h.dataReady;let L,I=x(o,w,S);if(P(e.TEXTURE_CUBE_MAP,o,S),p){A&&C&&n.texStorage2D(e.TEXTURE_CUBE_MAP,I,T,w.width,w.height);for(let t=0;t<6;t++){L=b[t].mipmaps;for(let i=0;i<L.length;i++){const r=L[i];o.format!==Om?null!==E?A?R&&n.compressedTexSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,i,0,0,r.width,r.height,E,r.data):n.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,i,T,r.width,r.height,0,r.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):A?R&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,i,0,0,r.width,r.height,E,M,r.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,i,T,r.width,r.height,0,E,M,r.data)}}}else{L=o.mipmaps,A&&C&&(L.length>0&&I++,n.texStorage2D(e.TEXTURE_CUBE_MAP,I,T,b[0].width,b[0].height));for(let t=0;t<6;t++)if(f){A?R&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,b[t].width,b[t].height,E,M,b[t].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,T,b[t].width,b[t].height,0,E,M,b[t].data);for(let i=0;i<L.length;i++){const r=L[i].image[t].image;A?R&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,i+1,0,0,r.width,r.height,E,M,r.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,i+1,T,r.width,r.height,0,E,M,r.data)}}else{A?R&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,E,M,b[t]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,T,E,M,b[t]);for(let i=0;i<L.length;i++){const r=L[i];A?R&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,i+1,0,0,E,M,r.image[t]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,i+1,T,E,M,r.image[t])}}}v(o,S)&&_(e.TEXTURE_CUBE_MAP),u.__version=h.version,o.onUpdate&&o.onUpdate(o)}t.__version=o.version}(l,t,o):n.bindTexture(e.TEXTURE_CUBE_MAP,l.__webglTexture,e.TEXTURE0+o)},this.rebindTextures=function(t,n,r){const s=i.get(t);void 0!==n&&D(s.__webglFramebuffer,t,t.texture,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,0),void 0!==r&&O(t)},this.setupRenderTarget=function(t){const l=t.texture,c=i.get(t),h=i.get(l);t.addEventListener("dispose",S),!0!==t.isWebGLMultipleRenderTargets&&(void 0===h.__webglTexture&&(h.__webglTexture=e.createTexture()),h.__version=l.version,o.memory.textures++);const u=!0===t.isWebGLCubeRenderTarget,d=!0===t.isWebGLMultipleRenderTargets,p=g(t)||a;if(u){c.__webglFramebuffer=[];for(let t=0;t<6;t++)if(a&&l.mipmaps&&l.mipmaps.length>0){c.__webglFramebuffer[t]=[];for(let n=0;n<l.mipmaps.length;n++)c.__webglFramebuffer[t][n]=e.createFramebuffer()}else c.__webglFramebuffer[t]=e.createFramebuffer()}else{if(a&&l.mipmaps&&l.mipmaps.length>0){c.__webglFramebuffer=[];for(let t=0;t<l.mipmaps.length;t++)c.__webglFramebuffer[t]=e.createFramebuffer()}else c.__webglFramebuffer=e.createFramebuffer();if(d)if(r.drawBuffers){const n=t.texture;for(let t=0,r=n.length;t<r;t++){const r=i.get(n[t]);void 0===r.__webglTexture&&(r.__webglTexture=e.createTexture(),o.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");if(a&&t.samples>0&&!1===k(t)){const i=d?l:[l];c.__webglMultisampledFramebuffer=e.createFramebuffer(),c.__webglColorRenderbuffer=[],n.bindFramebuffer(e.FRAMEBUFFER,c.__webglMultisampledFramebuffer);for(let n=0;n<i.length;n++){const r=i[n];c.__webglColorRenderbuffer[n]=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,c.__webglColorRenderbuffer[n]);const o=s.convert(r.format,r.colorSpace),a=s.convert(r.type),l=y(r.internalFormat,o,a,r.colorSpace,!0===t.isXRRenderTarget),h=U(t);e.renderbufferStorageMultisample(e.RENDERBUFFER,h,l,t.width,t.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+n,e.RENDERBUFFER,c.__webglColorRen
vendor: 10,015 bytes, line 21
21derbuffer[n])}e.bindRenderbuffer(e.RENDERBUFFER,null),t.depthBuffer&&(c.__webglDepthRenderbuffer=e.createRenderbuffer(),N(c.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(e.FRAMEBUFFER,null)}}if(u){n.bindTexture(e.TEXTURE_CUBE_MAP,h.__webglTexture),P(e.TEXTURE_CUBE_MAP,l,p);for(let n=0;n<6;n++)if(a&&l.mipmaps&&l.mipmaps.length>0)for(let i=0;i<l.mipmaps.length;i++)D(c.__webglFramebuffer[n][i],t,l,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+n,i);else D(c.__webglFramebuffer[n],t,l,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0);v(l,p)&&_(e.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(d){const r=t.texture;for(let s=0,o=r.length;s<o;s++){const o=r[s],a=i.get(o);n.bindTexture(e.TEXTURE_2D,a.__webglTexture),P(e.TEXTURE_2D,o,p),D(c.__webglFramebuffer,t,o,e.COLOR_ATTACHMENT0+s,e.TEXTURE_2D,0),v(o,p)&&_(e.TEXTURE_2D)}n.unbindTexture()}else{let i=e.TEXTURE_2D;if((t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(a?i=t.isWebGL3DRenderTarget?e.TEXTURE_3D:e.TEXTURE_2D_ARRAY:console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")),n.bindTexture(i,h.__webglTexture),P(i,l,p),a&&l.mipmaps&&l.mipmaps.length>0)for(let n=0;n<l.mipmaps.length;n++)D(c.__webglFramebuffer[n],t,l,e.COLOR_ATTACHMENT0,i,n);else D(c.__webglFramebuffer,t,l,e.COLOR_ATTACHMENT0,i,0);v(l,p)&&_(i),n.unbindTexture()}t.depthBuffer&&O(t)},this.updateRenderTargetMipmap=function(t){const r=g(t)||a,s=!0===t.isWebGLMultipleRenderTargets?t.texture:[t.texture];for(let o=0,a=s.length;o<a;o++){const a=s[o];if(v(a,r)){const r=t.isWebGLCubeRenderTarget?e.TEXTURE_CUBE_MAP:e.TEXTURE_2D,s=i.get(a).__webglTexture;n.bindTexture(r,s),_(r),n.unbindTexture()}}},this.updateMultisampleRenderTarget=function(t){if(a&&t.samples>0&&!1===k(t)){const r=t.isWebGLMultipleRenderTargets?t.texture:[t.texture],s=t.width,o=t.height;let a=e.COLOR_BUFFER_BIT;const l=[],h=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,u=i.get(t),d=!0===t.isWebGLMultipleRenderTargets;if(d)for(let t=0;t<r.length;t++)n.bindFramebuffer(e.FRAMEBUFFER,u.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.RENDERBUFFER,null),n.bindFramebuffer(e.FRAMEBUFFER,u.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.TEXTURE_2D,null,0);n.bindFramebuffer(e.READ_FRAMEBUFFER,u.__webglMultisampledFramebuffer),n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglFramebuffer);for(let n=0;n<r.length;n++){l.push(e.COLOR_ATTACHMENT0+n),t.depthBuffer&&l.push(h);const p=void 0!==u.__ignoreDepthValues&&u.__ignoreDepthValues;if(!1===p&&(t.depthBuffer&&(a|=e.DEPTH_BUFFER_BIT),t.stencilBuffer&&(a|=e.STENCIL_BUFFER_BIT)),d&&e.framebufferRenderbuffer(e.READ_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,u.__webglColorRenderbuffer[n]),!0===p&&(e.invalidateFramebuffer(e.READ_FRAMEBUFFER,[h]),e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,[h])),d){const t=i.get(r[n]).__webglTexture;e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0)}e.blitFramebuffer(0,0,s,o,0,0,s,o,a,e.NEAREST),c&&e.invalidateFramebuffer(e.READ_FRAMEBUFFER,l)}if(n.bindFramebuffer(e.READ_FRAMEBUFFER,null),n.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),d)for(let t=0;t<r.length;t++){n.bindFramebuffer(e.FRAMEBUFFER,u.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.RENDERBUFFER,u.__webglColorRenderbuffer[t]);const s=i.get(r[t]).__webglTexture;n.bindFramebuffer(e.FRAMEBUFFER,u.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.TEXTURE_2D,s,0)}n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglMultisampledFramebuffer)}},this.setupDepthRenderbuffer=O,this.setupFrameBufferTexture=D,this.useMultisampledRTT=k}function Zb(e,t,n){const i=n.isWebGL2;return{convert:function(n,r=""){let s;const o=kg.getTransfer(r);if(n===Cm)return e.UNSIGNED_BYTE;if(1017===n)return e.UNSIGNED_SHORT_4_4_4_4;if(1018===n)return e.UNSIGNED_SHORT_5_5_5_1;if(1010===n)return e.BYTE;if(1011===n)return e.SHORT;if(n===Rm)return e.UNSIGNED_SHORT;if(n===Pm)return e.INT;if(n===Lm)return e.UNSIGNED_INT;if(n===Im)return e.FLOAT;if(n===Dm)return i?e.HALF_FLOAT:(s=t.get("OES_texture_half_float"),null!==s?s.HALF_FLOAT_OES:null);if(1021===n)return e.ALPHA;if(n===Om)return e.RGBA;if(1024===n)return e.LUMINANCE;if(1025===n)return e.LUMINANCE_ALPHA;if(n===Um)return e.DEPTH_COMPONENT;if(n===km)return e.DEPTH_STENCIL;if(n===lg)return s=t.get("EXT_sRGB"),null!==s?s.SRGB_ALPHA_EXT:null;if(1028===n)return e.RED;if(1029===n)return e.RED_INTEGER;if(1030===n)return e.RG;if(1031===n)return e.RG_INTEGER;if(1033===n)return e.RGBA_INTEGER;if(n===Fm||n===Vm||n===Bm||n===zm)if(o===ng){if(s=t.get("WEBGL_compressed_texture_s3tc_srgb"),null===s)return null;if(n===Fm)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===Vm)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===Bm)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===zm)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(s=t.get("WEBGL_compressed_texture_s3tc"),null===s)return null;if(n===Fm)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Vm)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===Bm)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===zm)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===n||35841===n||35842===n||35843===n){if(s=t.get("WEBGL_compressed_texture_pvrtc"),null===s)return null;if(35840===n)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===n)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===n)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===n)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===n)return s=t.get("WEBGL_compressed_texture_etc1"),null!==s?s.COMPRESSED_RGB_ETC1_WEBGL:null;if(37492===n||37496===n){if(s=t.get("WEBGL_compressed_texture_etc"),null===s)return null;if(37492===n)return o===ng?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(37496===n)return o===ng?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}if(37808===n||37809===n||37810===n||37811===n||37812===n||37813===n||37814===n||37815===n||37816===n||37817===n||37818===n||37819===n||37820===n||37821===n){if(s=t.get("WEBGL_compressed_texture_astc"),null===s)return null;if(37808===n)return o===ng?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(37809===n)return o===ng?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(37810===n)return o===ng?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(37811===n)return o===ng?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(37812===n)return o===ng?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(37813===n)return o===ng?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(37814===n)return o===ng?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(37815===n)return o===ng?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(37816===n)return o===ng?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(37817===n)return o===ng?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(37818===n)return o===ng?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(37819===n)return o===ng?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(37820===n)return o===ng?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(37821===n)return o===ng?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}if(n===Hm||36494===n||36495===n){if(s=t.get("EXT_texture_compression_bptc"),null===s)return null;if(n===Hm)return o===ng?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(36494===n)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(36495===n)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}if(36283===n||36284===n||36285===n||36286===n){if(s=t.get("EXT_texture_compression_rgtc"),null===s)return null;if(n===Hm)return s.COMPRESSED_RED_RGTC1_EXT;if(36284===n)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(36285===n)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(36286===n)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}return n===Nm?i?e.UNSIGNED_INT_24_8:(s=t.get("WEBGL_depth_texture"),null!==s?s.UNSIGNED_INT_24_8_WEBGL:null):void 0!==e[n]?e[n]:null}}}class Kb extends hy{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Jb extends e_{constructor(){super(),this.isGroup=!0,this.type="Group"}}const Qb={type:"move"};class ew{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new Jb,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new Jb,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Qg,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Qg),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new Jb,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Qg,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Qg),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let i=null,r=null,s=null;const o=this._targetRay,a=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState){if(l&&e.hand){s=!0;
vendor: 11,052 bytes, line 21
21for(const i of e.hand.values()){const e=t.getJointPose(i,n),r=this._getHandJoint(l,i);null!==e&&(r.matrix.fromArray(e.transform.matrix),r.matrix.decompose(r.position,r.rotation,r.scale),r.matrixWorldNeedsUpdate=!0,r.jointRadius=e.radius),r.visible=null!==e}const i=l.joints["index-finger-tip"],r=l.joints["thumb-tip"],o=i.position.distanceTo(r.position),a=.02,c=.005;l.inputState.pinching&&o>a+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&o<=a-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==a&&e.gripSpace&&(r=t.getPose(e.gripSpace,n),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1));null!==o&&(i=t.getPose(e.targetRaySpace,n),null===i&&null!==r&&(i=r),null!==i&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(Qb)))}return null!==o&&(o.visible=null!==i),null!==a&&(a.visible=null!==r),null!==l&&(l.visible=null!==s),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){const n=new Jb;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class tw{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,n){if(null===this.texture){const i=new qg;e.properties.get(i).__webglTexture=t.texture,t.depthNear==n.depthNear&&t.depthFar==n.depthFar||(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=i}}render(e,t){if(null!==this.texture){if(null===this.mesh){const e=t.cameras[0].viewport,n=new sy({extensions:{fragDepth:!0},vertexShader:"\nvoid main() {\n\n\tgl_Position = vec4( position, 1.0 );\n\n}",fragmentShader:"\nuniform sampler2DArray depthColor;\nuniform float depthWidth;\nuniform float depthHeight;\n\nvoid main() {\n\n\tvec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );\n\n\tif ( coord.x >= 1.0 ) {\n\n\t\tgl_FragDepthEXT = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;\n\n\t} else {\n\n\t\tgl_FragDepthEXT = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;\n\n\t}\n\n}",uniforms:{depthColor:{value:this.texture},depthWidth:{value:e.z},depthHeight:{value:e.w}}});this.mesh=new J_(new Ey(20,20),n)}e.render(this.mesh,t)}}reset(){this.texture=null,this.mesh=null}}class nw extends ug{constructor(e,t){super();const n=this;let i=null,r=1,s=null,o="local-floor",a=1,l=null,c=null,h=null,u=null,d=null,p=null;const f=new tw,m=t.getContextAttributes();let g=null,v=null;const _=[],y=[],x=new Mg;let b=null;const w=new hy;w.layers.enable(1),w.viewport=new Xg;const S=new hy;S.layers.enable(2),S.viewport=new Xg;const E=[w,S],M=new Kb;M.layers.enable(1),M.layers.enable(2);let T=null,A=null;function C(e){const t=y.indexOf(e.inputSource);if(-1===t)return;const n=_[t];void 0!==n&&(n.update(e.inputSource,e.frame,l||s),n.dispatchEvent({type:e.type,data:e.inputSource}))}function R(){i.removeEventListener("select",C),i.removeEventListener("selectstart",C),i.removeEventListener("selectend",C),i.removeEventListener("squeeze",C),i.removeEventListener("squeezestart",C),i.removeEventListener("squeezeend",C),i.removeEventListener("end",R),i.removeEventListener("inputsourceschange",P);for(let e=0;e<_.length;e++){const t=y[e];null!==t&&(y[e]=null,_[e].disconnect(t))}T=null,A=null,f.reset(),e.setRenderTarget(g),d=null,u=null,h=null,i=null,v=null,O.stop(),n.isPresenting=!1,e.setPixelRatio(b),e.setSize(x.width,x.height,!1),n.dispatchEvent({type:"sessionend"})}function P(e){for(let t=0;t<e.removed.length;t++){const n=e.removed[t],i=y.indexOf(n);i>=0&&(y[i]=null,_[i].disconnect(n))}for(let t=0;t<e.added.length;t++){const n=e.added[t];let i=y.indexOf(n);if(-1===i){for(let e=0;e<_.length;e++){if(e>=y.length){y.push(n),i=e;break}if(null===y[e]){y[e]=n,i=e;break}}if(-1===i)break}const r=_[i];r&&r.connect(n)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=_[e];return void 0===t&&(t=new ew,_[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=_[e];return void 0===t&&(t=new ew,_[e]=t),t.getGripSpace()},this.getHand=function(e){let t=_[e];return void 0===t&&(t=new ew,_[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){r=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){o=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||s},this.setReferenceSpace=function(e){l=e},this.getBaseLayer=function(){return null!==u?u:d},this.getBinding=function(){return h},this.getFrame=function(){return p},this.getSession=function(){return i},this.setSession=async function(c){if(i=c,null!==i){if(g=e.getRenderTarget(),i.addEventListener("select",C),i.addEventListener("selectstart",C),i.addEventListener("selectend",C),i.addEventListener("squeeze",C),i.addEventListener("squeezestart",C),i.addEventListener("squeezeend",C),i.addEventListener("end",R),i.addEventListener("inputsourceschange",P),!0!==m.xrCompatible&&await t.makeXRCompatible(),b=e.getPixelRatio(),e.getSize(x),void 0===i.renderState.layers||!1===e.capabilities.isWebGL2){const n={antialias:void 0!==i.renderState.layers||m.antialias,alpha:!0,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:r};d=new XRWebGLLayer(i,t,n),i.updateRenderState({baseLayer:d}),e.setPixelRatio(1),e.setSize(d.framebufferWidth,d.framebufferHeight,!1),v=new Yg(d.framebufferWidth,d.framebufferHeight,{format:Om,type:Cm,colorSpace:e.outputColorSpace,stencilBuffer:m.stencil})}else{let n=null,s=null,o=null;m.depth&&(o=m.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,n=m.stencil?km:Um,s=m.stencil?Nm:Lm);const a={colorFormat:t.RGBA8,depthFormat:o,scaleFactor:r};h=new XRWebGLBinding(i,t),u=h.createProjectionLayer(a),i.updateRenderState({layers:[u]}),e.setPixelRatio(1),e.setSize(u.textureWidth,u.textureHeight,!1),v=new Yg(u.textureWidth,u.textureHeight,{format:Om,type:Cm,depthTexture:new ax(u.textureWidth,u.textureHeight,s,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:m.stencil,colorSpace:e.outputColorSpace,samples:m.antialias?4:0});e.properties.get(v).__ignoreDepthValues=u.ignoreDepthValues}v.isXRRenderTarget=!0,this.setFoveation(a),l=null,s=await i.requestReferenceSpace(o),O.setContext(i),O.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==i)return i.environmentBlendMode};const L=new Qg,I=new Qg;function D(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===i)return;null!==f.texture&&(e.near=f.depthNear,e.far=f.depthFar),M.near=S.near=w.near=e.near,M.far=S.far=w.far=e.far,T===M.near&&A===M.far||(i.updateRenderState({depthNear:M.near,depthFar:M.far}),T=M.near,A=M.far,w.near=T,w.far=A,S.near=T,S.far=A,w.updateProjectionMatrix(),S.updateProjectionMatrix(),e.updateProjectionMatrix());const t=e.parent,n=M.cameras;D(M,t);for(let e=0;e<n.length;e++)D(n[e],t);2===n.length?function(e,t,n){L.setFromMatrixPosition(t.matrixWorld),I.setFromMatrixPosition(n.matrixWorld);const i=L.distanceTo(I),r=t.projectionMatrix.elements,s=n.projectionMatrix.elements,o=r[14]/(r[10]-1),a=r[14]/(r[10]+1),l=(r[9]+1)/r[5],c=(r[9]-1)/r[5],h=(r[8]-1)/r[0],u=(s[8]+1)/s[0],d=o*h,p=o*u,f=i/(-h+u),m=f*-h;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(f),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();const g=o+f,v=a+f,_=d-m,y=p+(i-m),x=l*a/v*g,b=c*a/v*g;e.projectionMatrix.makePerspective(_,y,x,b,g,v),e.projectionMatrixInverse.copy(e.projectionMatrix).invert()}(M,w,S):M.projectionMatrix.copy(w.projectionMatrix),function(e,t,n){null===n?e.matrix.copy(t.matrixWorld):(e.matrix.copy(n.matrixWorld),e.matrix.invert(),e.matrix.multiply(t.matrixWorld));e.matrix.decompose(e.position,e.quaternion,e.scale),e.updateMatrixWorld(!0),e.projectionMatrix.copy(t.projectionMatrix),e.projectionMatrixInverse.copy(t.projectionMatrixInverse),e.isPerspectiveCamera&&(e.fov=2*mg*Math.atan(1/e.projectionMatrix.elements[5]),e.zoom=1)}(e,M,t)},this.getCamera=function(){return M},this.getFoveation=function(){if(null!==u||null!==d)return a},this.setFoveation=function(e){a=e,null!==u&&(u.fixedFoveation=e),null!==d&&void 0!==d.fixedFoveation&&(d.fixedFoveation=e)},this.hasDepthSensing=function(){return null!==f.texture};let N=null;const O=new wy;O.setAnimationLoop((function(t,r){if(c=r.getViewerPose(l||s),p=r,null!==c){const t=c.views;null!==d&&(e.setRenderTargetFramebuffer(v,d.framebuffer),e.setRenderTarget(v));let n=!1;t.length!==M.cameras.length&&(M.cameras.length=0,n=!0);for(let i=0;i<t.length;i++){const r=t[i];let s=null;if(null!==d)s=d.getViewport(r);else{const t=h.getViewSubImage(u,r);s=t.viewport,0===i&&(e.setRenderTargetTextures(v,t.colorTexture,u.ignoreDepthValues?void 0:t.depthStencilTexture),e.setRenderTarget(v))}let o=E[i];void 0===o&&(o=new hy,o.layers.enable(i),o.viewport=new Xg,E[i]=o),o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.quaternion,o.scale),o.projectionMatrix.fromArray(r.projectionMatrix),o.projectionMatrixInverse.copy(o.projectionMatrix).invert(),o.viewport.set(s.x,s.y,s.width,s.height),0===i&&(M.matrix.copy(o.matrix),M.matrix.decompose(M.position,M.quaternion,M.scale)),!0===n&&M.cameras.push(o)}const r=i.enabledFeatures;if(r&&r.includes("depth-sensing")){const n=h.getDepthInformation(t[0]);n&&n.isValid&&n.texture&&f.init(e,n,i.renderState)}}for(let e=0;e<_.length;e++){const t=y[e],n=_[e];null!==t&&void 0!==n&&n.update(t,r,l||s)}f.render(e,M),N&&N(t,r),r.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:r}),p=null})),this.setAnimationLoop=function(e){N=e},this.dispose=function(){}}}function iw(e,t){function n(e,t){!0===e.matrixAutoUpdate&&e.updateMatrix(),t.value.copy(e.matrix)}function i(i,r){i.opacity.value=r.opacity,r.color&&i.diffuse.value.copy(r.color),r.emissive&&i.emissive.value.copy(r.emissive).multiplyScalar(r.emissiveIntensity),r.map&&(i.map.value=r.map,n(r.map,i.mapTransform)),r.alphaMap&&(i.alphaMap.value=r.alphaMap,n(r.alphaMap,i.alphaMapTransform)),r.bumpMap&&(i.bumpMap.value=r.bumpMap,n(r.bumpMap,i.bumpMapTransform),i.bumpScale.value=r.bumpScale,1===r.side&&(i.bumpScale.value*=-1)),r.normalMap&&(i.normalMap.value=r.normalMap,n(r.
vendor: 9,204 bytes, line 21
21normalMap,i.normalMapTransform),i.normalScale.value.copy(r.normalScale),1===r.side&&i.normalScale.value.negate()),r.displacementMap&&(i.displacementMap.value=r.displacementMap,n(r.displacementMap,i.displacementMapTransform),i.displacementScale.value=r.displacementScale,i.displacementBias.value=r.displacementBias),r.emissiveMap&&(i.emissiveMap.value=r.emissiveMap,n(r.emissiveMap,i.emissiveMapTransform)),r.specularMap&&(i.specularMap.value=r.specularMap,n(r.specularMap,i.specularMapTransform)),r.alphaTest>0&&(i.alphaTest.value=r.alphaTest);const s=t.get(r).envMap;if(s&&(i.envMap.value=s,i.flipEnvMap.value=s.isCubeTexture&&!1===s.isRenderTargetTexture?-1:1,i.reflectivity.value=r.reflectivity,i.ior.value=r.ior,i.refractionRatio.value=r.refractionRatio),r.lightMap){i.lightMap.value=r.lightMap;const t=!0===e._useLegacyLights?Math.PI:1;i.lightMapIntensity.value=r.lightMapIntensity*t,n(r.lightMap,i.lightMapTransform)}r.aoMap&&(i.aoMap.value=r.aoMap,i.aoMapIntensity.value=r.aoMapIntensity,n(r.aoMap,i.aoMapTransform))}return{refreshFogUniforms:function(t,n){n.color.getRGB(t.fogColor.value,iy(e)),n.isFog?(t.fogNear.value=n.near,t.fogFar.value=n.far):n.isFogExp2&&(t.fogDensity.value=n.density)},refreshMaterialUniforms:function(e,r,s,o,a){r.isMeshBasicMaterial||r.isMeshLambertMaterial?i(e,r):r.isMeshToonMaterial?(i(e,r),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(e,r)):r.isMeshPhongMaterial?(i(e,r),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}(e,r)):r.isMeshStandardMaterial?(i(e,r),function(e,i){e.metalness.value=i.metalness,i.metalnessMap&&(e.metalnessMap.value=i.metalnessMap,n(i.metalnessMap,e.metalnessMapTransform));e.roughness.value=i.roughness,i.roughnessMap&&(e.roughnessMap.value=i.roughnessMap,n(i.roughnessMap,e.roughnessMapTransform));t.get(i).envMap&&(e.envMapIntensity.value=i.envMapIntensity)}(e,r),r.isMeshPhysicalMaterial&&function(e,t,i){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap,n(t.sheenColorMap,e.sheenColorMapTransform)),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap,n(t.sheenRoughnessMap,e.sheenRoughnessMapTransform)));t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap,n(t.clearcoatMap,e.clearcoatMapTransform)),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap,n(t.clearcoatRoughnessMap,e.clearcoatRoughnessMapTransform)),t.clearcoatNormalMap&&(e.clearcoatNormalMap.value=t.clearcoatNormalMap,n(t.clearcoatNormalMap,e.clearcoatNormalMapTransform),e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),1===t.side&&e.clearcoatNormalScale.value.negate()));t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap,n(t.iridescenceMap,e.iridescenceMapTransform)),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap,n(t.iridescenceThicknessMap,e.iridescenceThicknessMapTransform)));t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=i.texture,e.transmissionSamplerSize.value.set(i.width,i.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap,n(t.transmissionMap,e.transmissionMapTransform)),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap,n(t.thicknessMap,e.thicknessMapTransform)),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor));t.anisotropy>0&&(e.anisotropyVector.value.set(t.anisotropy*Math.cos(t.anisotropyRotation),t.anisotropy*Math.sin(t.anisotropyRotation)),t.anisotropyMap&&(e.anisotropyMap.value=t.anisotropyMap,n(t.anisotropyMap,e.anisotropyMapTransform)));e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap,n(t.specularColorMap,e.specularColorMapTransform));t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap,n(t.specularIntensityMap,e.specularIntensityMapTransform))}(e,r,a)):r.isMeshMatcapMaterial?(i(e,r),function(e,t){t.matcap&&(e.matcap.value=t.matcap)}(e,r)):r.isMeshDepthMaterial?i(e,r):r.isMeshDistanceMaterial?(i(e,r),function(e,n){const i=t.get(n).light;e.referencePosition.value.setFromMatrixPosition(i.matrixWorld),e.nearDistance.value=i.shadow.camera.near,e.farDistance.value=i.shadow.camera.far}(e,r)):r.isMeshNormalMaterial?i(e,r):r.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform))}(e,r),r.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,r)):r.isPointsMaterial?function(e,t,i,r){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*i,e.scale.value=.5*r,t.map&&(e.map.value=t.map,n(t.map,e.uvTransform));t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform));t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,r,s,o):r.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform));t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform));t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,r):r.isShadowMaterial?(e.color.value.copy(r.color),e.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function rw(e,t,n,i){let r={},s={},o=[];const a=n.isWebGL2?e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(e,t,n,i){const r=e.value,s=t+"_"+n;if(void 0===i[s])return i[s]="number"==typeof r||"boolean"==typeof r?r:r.clone(),!0;{const e=i[s];if("number"==typeof r||"boolean"==typeof r){if(e!==r)return i[s]=r,!0}else if(!1===e.equals(r))return e.copy(r),!0}return!1}function c(e){const t={boundary:0,storage:0};return"number"==typeof e||"boolean"==typeof e?(t.boundary=4,t.storage=4):e.isVector2?(t.boundary=8,t.storage=8):e.isVector3||e.isColor?(t.boundary=16,t.storage=12):e.isVector4?(t.boundary=16,t.storage=16):e.isMatrix3?(t.boundary=48,t.storage=48):e.isMatrix4?(t.boundary=64,t.storage=64):e.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",e),t}function h(t){const n=t.target;n.removeEventListener("dispose",h);const i=o.indexOf(n.__bindingPointIndex);o.splice(i,1),e.deleteBuffer(r[n.id]),delete r[n.id],delete s[n.id]}return{bind:function(e,t){const n=t.program;i.uniformBlockBinding(e,n)},update:function(n,u){let d=r[n.id];void 0===d&&(!function(e){const t=e.uniforms;let n=0;const i=16;for(let e=0,r=t.length;e<r;e++){const r=Array.isArray(t[e])?t[e]:[t[e]];for(let e=0,t=r.length;e<t;e++){const t=r[e],s=Array.isArray(t.value)?t.value:[t.value];for(let e=0,r=s.length;e<r;e++){const r=c(s[e]),o=n%i;0!==o&&i-o<r.boundary&&(n+=i-o),t.__data=new Float32Array(r.storage/Float32Array.BYTES_PER_ELEMENT),t.__offset=n,n+=r.storage}}}const r=n%i;r>0&&(n+=i-r);e.__size=n,e.__cache={}}(n),d=function(t){const n=function(){for(let e=0;e<a;e++)if(-1===o.indexOf(e))return o.push(e),e;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}();t.__bindingPointIndex=n;const i=e.createBuffer(),r=t.__size,s=t.usage;return e.bindBuffer(e.UNIFORM_BUFFER,i),e.bufferData(e.UNIFORM_BUFFER,r,s),e.bindBuffer(e.UNIFORM_BUFFER,null),e.bindBufferBase(e.UNIFORM_BUFFER,n,i),i}(n),r[n.id]=d,n.addEventListener("dispose",h));const p=u.program;i.updateUBOMapping(n,p);const f=t.render.frame;s[n.id]!==f&&(!function(t){const n=r[t.id],i=t.uniforms,s=t.__cache;e.bindBuffer(e.UNIFORM_BUFFER,n);for(let t=0,n=i.length;t<n;t++){const n=Array.isArray(i[t])?i[t]:[i[t]];for(let i=0,r=n.length;i<r;i++){const r=n[i];if(!0===l(r,t,i,s)){const t=r.__offset,n=Array.isArray(r.value)?r.value:[r.value];let i=0;for(let s=0;s<n.length;s++){const o=n[s],a=c(o);"number"==typeof o||"boolean"==typeof o?(r.__data[0]=o,e.bufferSubData(e.UNIFORM_BUFFER,t+i,r.__data)):o.isMatrix3?(r.__data[0]=o.elements[0],r.__data[1]=o.elements[1],r.__data[2]=o.elements[2],r.__data[3]=0,r.__data[4]=o.elements[3],r.__data[5]=o.elements[4],r.__data[6]=o.elements[5],r.__data[7]=0,r.__data[8]=o.elements[6],r.__data[9]=o.elements[7],r.__data[10]=o.elements[8],r.__data[11]=0):(o.toArray(r.__data,i),i+=a.storage/Float32Array.BYTES_PER_ELEMENT)}e.bufferSubData(e.UNIFORM_BUFFER,t,r.__data)}}}e.bindBuffer(e.UNIFORM_BUFFER,null)}(n),s[n.id]=f)},dispose:function(){for(const t in r)e.deleteBuffer(r[t]);o=[],r={},s={}}}}class sw{constructor(e={}){const{canvas:t=Pg(),context:n=null,depth:i=!0,stencil:r=!0,alpha:s=!1,antialias:o=!1,premultipliedAlpha:a=!0,preserveDrawingBuffer:l=!1,powerPreference:c="default",failIfMajorPerformanceCaveat:h=!1}=e;let u;
21this.isWebGLRenderer=!0,u=null!==n?n.getContextAttributes().alpha:s;const d=new Uint32Array(4),p=new Int32Array(4);let f=null,m=null;const g=[],v=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Km,this._useLegacyLights=!1,this.toneMapping=0,this.toneMappingExposure=1;const _=this;let y=!1,x=0,b=0,w=null,S=-1,E=null;const M=new Xg,T=new Xg;let A=null;const C=new g_(0);let R=0,P=t.width,L=t.height,I=1,D=null,N=null;const O=new Xg(0,0,P,L),U=new Xg(0,0,P,L);let k=!1;const F=new by;let V=!1,B=!1,z=null;const H=new Rv,G=new Mg,W=new Qg,j={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function q(){return null===w?I:1}let X,$,Y,Z,K,J,Q,ee,te,ne,ie,re,se,oe,ae,le,ce,he,ue,de,pe,fe,me,ge,ve=n;function _e(e,n){for(let i=0;i<e.length;i++){const r=e[i],s=t.getContext(r,n);if(null!==s)return s}return null}try{const e={alpha:!0,depth:i,stencil:r,antialias:o,premultipliedAlpha:a,preserveDrawingBuffer:l,powerPreference:c,failIfMajorPerformanceCaveat:h};if("setAttribute"in t&&t.setAttribute("data-engine","three.js r161"),t.addEventListener("webglcontextlost",be,!1),t.addEventListener("webglcontextrestored",we,!1),t.addEventListener("webglcontextcreationerror",Se,!1),null===ve){const t=["webgl2","webgl","experimental-webgl"];if(!0===_.isWebGL1Renderer&&t.shift(),ve=_e(t,e),null===ve)throw _e(t)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}"undefined"!=typeof WebGLRenderingContext&&ve instanceof WebGLRenderingContext&&console.warn("THREE.WebGLRenderer: WebGL 1 support was deprecated in r153 and will be removed in r163."),void 0===ve.getShaderPrecisionFormat&&(ve.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(e){throw console.error("THREE.WebGLRenderer: "+e.message),e}function ye(){X=new Qy(ve),$=new Iy(ve,X,e),X.init($),fe=new Zb(ve,X,$),Y=new $b(ve,X,$),Z=new nx(ve),K=new Nb,J=new Yb(ve,X,Y,K,$,fe,Z),Q=new Ny(_),ee=new Jy(_),te=new Sy(ve,$),me=new Py(ve,X,te,$),ne=new ex(ve,te,Z,me),ie=new ox(ve,ne,te,Z),ue=new sx(ve,$,J),le=new Dy(K),re=new Db(_,Q,ee,X,$,me,le),se=new iw(_,K),oe=new Fb,ae=new Wb(X,$),he=new Ry(_,Q,ee,Y,ie,u,a),ce=new Xb(_,ie,$),ge=new rw(ve,Z,$,Y),de=new Ly(ve,X,Z,$),pe=new tx(ve,X,Z,$),Z.programs=re.programs,_.capabilities=$,_.extensions=X,_.properties=K,_.renderLists=oe,_.shadowMap=ce,_.state=Y,_.info=Z}ye();const xe=new nw(_,ve);function be(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),y=!0}function we(){console.log("THREE.WebGLRenderer: Context Restored."),y=!1;const e=Z.autoReset,t=ce.enabled,n=ce.autoUpdate,i=ce.needsUpdate,r=ce.type;ye(),Z.autoReset=e,ce.enabled=t,ce.autoUpdate=n,ce.needsUpdate=i,ce.type=r}function Se(e){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",e.statusMessage)}function Ee(e){const t=e.target;t.removeEventListener("dispose",Ee),function(e){(function(e){const t=K.get(e).programs;void 0!==t&&(t.forEach((function(e){re.releaseProgram(e)})),e.isShaderMaterial&&re.releaseShaderCache(e))})(e),K.remove(e)}(t)}function Me(e,t,n){!0===e.transparent&&2===e.side&&!1===e.forceSinglePass?(e.side=1,e.needsUpdate=!0,Ne(e,t,n),e.side=0,e.needsUpdate=!0,Ne(e,t,n),e.side=2):Ne(e,t,n)}this.xr=xe,this.getContext=function(){return ve},this.getContextAttributes=function(){return ve.getContextAttributes()},this.forceContextLoss=function(){const e=X.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){const e=X.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return I},this.setPixelRatio=function(e){void 0!==e&&(I=e,this.setSize(P,L,!1))},this.getSize=function(e){return e.set(P,L)},this.setSize=function(e,n,i=!0){xe.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(P=e,L=n,t.width=Math.floor(e*I),t.height=Math.floor(n*I),!0===i&&(t.style.width=e+"px",t.style.height=n+"px"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(e){return e.set(P*I,L*I).floor()},this.setDrawingBufferSize=function(e,n,i){P=e,L=n,I=i,t.width=Math.floor(e*i),t.height=Math.floor(n*i),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return e.copy(M)},this.getViewport=function(e){return e.copy(O)},this.setViewport=function(e,t,n,i){e.isVector4?O.set(e.x,e.y,e.z,e.w):O.set(e,t,n,i),Y.viewport(M.copy(O).multiplyScalar(I).floor())}
vendor: 2,880 bytes, line 21
21,this.getScissor=function(e){return e.copy(U)},this.setScissor=function(e,t,n,i){e.isVector4?U.set(e.x,e.y,e.z,e.w):U.set(e,t,n,i),Y.scissor(T.copy(U).multiplyScalar(I).floor())},this.getScissorTest=function(){return k},this.setScissorTest=function(e){Y.setScissorTest(k=e)},this.setOpaqueSort=function(e){D=e},this.setTransparentSort=function(e){N=e},this.getClearColor=function(e){return e.copy(he.getClearColor())},this.setClearColor=function(){he.setClearColor.apply(he,arguments)},this.getClearAlpha=function(){return he.getClearAlpha()},this.setClearAlpha=function(){he.setClearAlpha.apply(he,arguments)},this.clear=function(e=!0,t=!0,n=!0){let i=0;if(e){let e=!1;if(null!==w){const t=w.texture.format;e=1033===t||1031===t||1029===t}if(e){const e=w.texture.type,t=e===Cm||e===Lm||e===Rm||e===Nm||1017===e||1018===e,n=he.getClearColor(),i=he.getClearAlpha(),r=n.r,s=n.g,o=n.b;t?(d[0]=r,d[1]=s,d[2]=o,d[3]=i,ve.clearBufferuiv(ve.COLOR,0,d)):(p[0]=r,p[1]=s,p[2]=o,p[3]=i,ve.clearBufferiv(ve.COLOR,0,p))}else i|=ve.COLOR_BUFFER_BIT}t&&(i|=ve.DEPTH_BUFFER_BIT),n&&(i|=ve.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),ve.clear(i)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",be,!1),t.removeEventListener("webglcontextrestored",we,!1),t.removeEventListener("webglcontextcreationerror",Se,!1),oe.dispose(),ae.dispose(),K.dispose(),Q.dispose(),ee.dispose(),ie.dispose(),me.dispose(),ge.dispose(),re.dispose(),xe.dispose(),xe.removeEventListener("sessionstart",Ae),xe.removeEventListener("sessionend",Ce),z&&(z.dispose(),z=null),Re.stop()},this.renderBufferDirect=function(e,t,n,i,r,s){null===t&&(t=j);const o=r.isMesh&&r.matrixWorld.determinant()<0,a=function(e,t,n,i,r){!0!==t.isScene&&(t=j);J.resetTextureUnits();const s=t.fog,o=i.isMeshStandardMaterial?t.environment:null,a=null===w?_.outputColorSpace:!0===w.isXRRenderTarget?w.texture.colorSpace:Jm,l=(i.isMeshStandardMaterial?ee:Q).get(i.envMap||o),c=!0===i.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,h=!!n.attributes.tangent&&(!!i.normalMap||i.anisotropy>0),u=!!n.morphAttributes.position,d=!!n.morphAttributes.normal,p=!!n.morphAttributes.color;let f=0;i.toneMapped&&(null!==w&&!0!==w.isXRRenderTarget||(f=_.toneMapping));const g=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,v=void 0!==g?g.length:0,y=K.get(i),x=m.state.lights;if(!0===V&&(!0===B||e!==E)){const t=e===E&&i.id===S;le.setState(i,e,t)}let b=!1;i.version===y.__version?y.needsLights&&y.lightsStateVersion!==x.state.version||y.outputColorSpace!==a||r.isBatchedMesh&&!1===y.batching?b=!0:r.isBatchedMesh||!0!==y.batching?r.isInstancedMesh&&!1===y.instancing?b=!0:r.isInstancedMesh||!0!==y.instancing?r.isSkinnedMesh&&
vendor: 10,258 bytes, line 21
21!1===y.skinning?b=!0:r.isSkinnedMesh||!0!==y.skinning?r.isInstancedMesh&&!0===y.instancingColor&&null===r.instanceColor||r.isInstancedMesh&&!1===y.instancingColor&&null!==r.instanceColor||y.envMap!==l||!0===i.fog&&y.fog!==s?b=!0:void 0===y.numClippingPlanes||y.numClippingPlanes===le.numPlanes&&y.numIntersection===le.numIntersection?(y.vertexAlphas!==c||y.vertexTangents!==h||y.morphTargets!==u||y.morphNormals!==d||y.morphColors!==p||y.toneMapping!==f||!0===$.isWebGL2&&y.morphTargetsCount!==v)&&(b=!0):b=!0:b=!0:b=!0:b=!0:(b=!0,y.__version=i.version);let M=y.currentProgram;!0===b&&(M=Ne(i,t,r));let T=!1,A=!1,C=!1;const R=M.getUniforms(),P=y.uniforms;Y.useProgram(M.program)&&(T=!0,A=!0,C=!0);i.id!==S&&(S=i.id,A=!0);if(T||E!==e){R.setValue(ve,"projectionMatrix",e.projectionMatrix),R.setValue(ve,"viewMatrix",e.matrixWorldInverse);const t=R.map.cameraPosition;void 0!==t&&t.setValue(ve,W.setFromMatrixPosition(e.matrixWorld)),$.logarithmicDepthBuffer&&R.setValue(ve,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),(i.isMeshPhongMaterial||i.isMeshToonMaterial||i.isMeshLambertMaterial||i.isMeshBasicMaterial||i.isMeshStandardMaterial||i.isShaderMaterial)&&R.setValue(ve,"isOrthographic",!0===e.isOrthographicCamera),E!==e&&(E=e,A=!0,C=!0)}if(r.isSkinnedMesh){R.setOptional(ve,r,"bindMatrix"),R.setOptional(ve,r,"bindMatrixInverse");const e=r.skeleton;e&&($.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),R.setValue(ve,"boneTexture",e.boneTexture,J)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}r.isBatchedMesh&&(R.setOptional(ve,r,"batchingTexture"),R.setValue(ve,"batchingTexture",r._matricesTexture,J));const D=n.morphAttributes;(void 0!==D.position||void 0!==D.normal||void 0!==D.color&&!0===$.isWebGL2)&&ue.update(r,n,M);(A||y.receiveShadow!==r.receiveShadow)&&(y.receiveShadow=r.receiveShadow,R.setValue(ve,"receiveShadow",r.receiveShadow));i.isMeshGouraudMaterial&&null!==i.envMap&&(P.envMap.value=l,P.flipEnvMap.value=l.isCubeTexture&&!1===l.isRenderTargetTexture?-1:1);A&&(R.setValue(ve,"toneMappingExposure",_.toneMappingExposure),y.needsLights&&(O=C,(N=P).ambientLightColor.needsUpdate=O,N.lightProbe.needsUpdate=O,N.directionalLights.needsUpdate=O,N.directionalLightShadows.needsUpdate=O,N.pointLights.needsUpdate=O,N.pointLightShadows.needsUpdate=O,N.spotLights.needsUpdate=O,N.spotLightShadows.needsUpdate=O,N.rectAreaLights.needsUpdate=O,N.hemisphereLights.needsUpdate=O),s&&!0===i.fog&&se.refreshFogUniforms(P,s),se.refreshMaterialUniforms(P,i,I,L,z),db.upload(ve,Oe(y),P,J));var N,O;i.isShaderMaterial&&!0===i.uniformsNeedUpdate&&(db.upload(ve,Oe(y),P,J),i.uniformsNeedUpdate=!1);i.isSpriteMaterial&&R.setValue(ve,"center",r.center);if(R.setValue(ve,"modelViewMatrix",r.modelViewMatrix),R.setValue(ve,"normalMatrix",r.normalMatrix),R.setValue(ve,"modelMatrix",r.matrixWorld),i.isShaderMaterial||i.isRawShaderMaterial){const e=i.uniformsGroups;for(let t=0,n=e.length;t<n;t++)if($.isWebGL2){const n=e[t];ge.update(n,M),ge.bind(n,M)}else console.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.")}return M}(e,t,n,i,r);Y.setMaterial(i,o);let l=n.index,c=1;if(!0===i.wireframe){if(l=ne.getWireframeAttribute(n),void 0===l)return;c=2}const h=n.drawRange,u=n.attributes.position;let d=h.start*c,p=(h.start+h.count)*c;null!==s&&(d=Math.max(d,s.start*c),p=Math.min(p,(s.start+s.count)*c)),null!==l?(d=Math.max(d,0),p=Math.min(p,l.count)):null!=u&&(d=Math.max(d,0),p=Math.min(p,u.count));const f=p-d;if(f<0||f===1/0)return;let g;me.setup(r,i,a,n,l);let v=de;if(null!==l&&(g=te.get(l),v=pe,v.setIndex(g)),r.isMesh)!0===i.wireframe?(Y.setLineWidth(i.wireframeLinewidth*q()),v.setMode(ve.LINES)):v.setMode(ve.TRIANGLES);else if(r.isLine){let e=i.linewidth;void 0===e&&(e=1),Y.setLineWidth(e*q()),r.isLineSegments?v.setMode(ve.LINES):r.isLineLoop?v.setMode(ve.LINE_LOOP):v.setMode(ve.LINE_STRIP)}else r.isPoints?v.setMode(ve.POINTS):r.isSprite&&v.setMode(ve.TRIANGLES);if(r.isBatchedMesh)v.renderMultiDraw(r._multiDrawStarts,r._multiDrawCounts,r._multiDrawCount);else if(r.isInstancedMesh)v.renderInstances(d,f,r.count);else if(n.isInstancedBufferGeometry){const e=void 0!==n._maxInstanceCount?n._maxInstanceCount:1/0,t=Math.min(n.instanceCount,e);v.renderInstances(d,f,t)}else v.render(d,f)},this.compile=function(e,t,n=null){null===n&&(n=e),m=ae.get(n),m.init(),v.push(m),n.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(m.pushLight(e),e.castShadow&&m.pushShadow(e))})),e!==n&&e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(m.pushLight(e),e.castShadow&&m.pushShadow(e))})),m.setupLights(_._useLegacyLights);const i=new Set;return e.traverse((function(e){const t=e.material;if(t)if(Array.isArray(t))for(let r=0;r<t.length;r++){const s=t[r];Me(s,n,e),i.add(s)}else Me(t,n,e),i.add(t)})),v.pop(),m=null,i},this.compileAsync=function(e,t,n=null){const i=this.compile(e,t,n);return new Promise((t=>{function n(){i.forEach((function(e){K.get(e).currentProgram.isReady()&&i.delete(e)})),0!==i.size?setTimeout(n,10):t(e)}null!==X.get("KHR_parallel_shader_compile")?n():setTimeout(n,10)}))};let Te=null;function Ae(){Re.stop()}function Ce(){Re.start()}const Re=new wy;function Pe(e,t,n,i){if(!1===e.visible)return;if(e.layers.test(t.layers))if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)m.pushLight(e),e.castShadow&&m.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||F.intersectsSprite(e)){i&&W.setFromMatrixPosition(e.matrixWorld).applyMatrix4(H);const t=ie.update(e),r=e.material;r.visible&&f.push(e,t,r,n,W.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||F.intersectsObject(e))){const t=ie.update(e),r=e.material;if(i&&(void 0!==e.boundingSphere?(null===e.boundingSphere&&e.computeBoundingSphere(),W.copy(e.boundingSphere.center)):(null===t.boundingSphere&&t.computeBoundingSphere(),W.copy(t.boundingSphere.center)),W.applyMatrix4(e.matrixWorld).applyMatrix4(H)),Array.isArray(r)){const i=t.groups;for(let s=0,o=i.length;s<o;s++){const o=i[s],a=r[o.materialIndex];a&&a.visible&&f.push(e,t,a,n,W.z,o)}}else r.visible&&f.push(e,t,r,n,W.z,null)}const r=e.children;for(let e=0,s=r.length;e<s;e++)Pe(r[e],t,n,i)}function Le(e,t,n,i){const r=e.opaque,s=e.transmissive,o=e.transparent;m.setupLightsView(n),!0===V&&le.setGlobalState(_.clippingPlanes,n),s.length>0&&function(e,t,n,i){if(null!==(!0===n.isScene?n.overrideMaterial:null))return;const r=$.isWebGL2;null===z&&(z=new Yg(1,1,{generateMipmaps:!0,type:X.has("EXT_color_buffer_half_float")?Dm:Cm,minFilter:Am,samples:r?4:0}));_.getDrawingBufferSize(G),r?z.setSize(G.x,G.y):z.setSize(bg(G.x),bg(G.y));const s=_.getRenderTarget();_.setRenderTarget(z),_.getClearColor(C),R=_.getClearAlpha(),R<1&&_.setClearColor(16777215,.5);_.clear();const o=_.toneMapping;_.toneMapping=0,Ie(e,n,i),J.updateMultisampleRenderTarget(z),J.updateRenderTargetMipmap(z);let a=!1;for(let e=0,r=t.length;e<r;e++){const r=t[e],s=r.object,o=r.geometry,l=r.material,c=r.group;if(2===l.side&&s.layers.test(i.layers)){const e=l.side;l.side=1,l.needsUpdate=!0,De(s,n,i,o,l,c),l.side=e,l.needsUpdate=!0,a=!0}}!0===a&&(J.updateMultisampleRenderTarget(z),J.updateRenderTargetMipmap(z));_.setRenderTarget(s),_.setClearColor(C,R),_.toneMapping=o}(r,s,t,n),i&&Y.viewport(M.copy(i)),r.length>0&&Ie(r,t,n),s.length>0&&Ie(s,t,n),o.length>0&&Ie(o,t,n),Y.buffers.depth.setTest(!0),Y.buffers.depth.setMask(!0),Y.buffers.color.setMask(!0),Y.setPolygonOffset(!1)}function Ie(e,t,n){const i=!0===t.isScene?t.overrideMaterial:null;for(let r=0,s=e.length;r<s;r++){const s=e[r],o=s.object,a=s.geometry,l=null===i?s.material:i,c=s.group;o.layers.test(n.layers)&&De(o,t,n,a,l,c)}}function De(e,t,n,i,r,s){e.onBeforeRender(_,t,n,i,r,s),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),r.onBeforeRender(_,t,n,i,e,s),!0===r.transparent&&2===r.side&&!1===r.forceSinglePass?(r.side=1,r.needsUpdate=!0,_.renderBufferDirect(n,t,i,r,e,s),r.side=0,r.needsUpdate=!0,_.renderBufferDirect(n,t,i,r,e,s),r.side=2):_.renderBufferDirect(n,t,i,r,e,s),e.onAfterRender(_,t,n,i,r,s)}function Ne(e,t,n){!0!==t.isScene&&(t=j);const i=K.get(e),r=m.state.lights,s=m.state.shadowsArray,o=r.state.version,a=re.getParameters(e,r.state,s,t,n),l=re.getProgramCacheKey(a);let c=i.programs;i.environment=e.isMeshStandardMaterial?t.environment:null,i.fog=t.fog,i.envMap=(e.isMeshStandardMaterial?ee:Q).get(e.envMap||i.environment),void 0===c&&(e.addEventListener("dispose",Ee),c=new Map,i.programs=c);let h=c.get(l);if(void 0!==h){if(i.currentProgram===h&&i.lightsStateVersion===o)return Ue(e,a),h}else a.uniforms=re.getUniforms(e),e.onBuild(n,a,_),e.onBeforeCompile(a,_),h=re.acquireProgram(a,l),c.set(l,h),i.uniforms=a.uniforms;const u=i.uniforms;return(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(u.clippingPlanes=le.uniform),Ue(e,a),i.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),i.lightsStateVersion=o,i.needsLights&&(u.ambientLightColor.value=r.state.ambient,u.lightProbe.value=r.state.probe,u.directionalLights.value=r.state.directional,u.directionalLightShadows.value=r.state.directionalShadow,u.spotLights.value=r.state.spot,u.spotLightShadows.value=r.state.spotShadow,u.rectAreaLights.value=r.state.rectArea,u.ltc_1.value=r.state.rectAreaLTC1,u.ltc_2.value=r.state.rectAreaLTC2,u.pointLights.value=r.state.point,u.pointLightShadows.value=r.state.pointShadow,u.hemisphereLights.value=r.state.hemi,u.directionalShadowMap.value=r.state.directionalShadowMap,u.directionalShadowMatrix.value=r.state.directionalShadowMatrix,u.spotShadowMap.value=r.state.spotShadowMap,u.spotLightMatrix.value=r.state.spotLightMatrix,u.spotLightMap.value=r.state.spotLightMap,u.pointShadowMap.value=r.state.pointShadowMap,u.pointShadowMatrix.value=r.state.pointShadowMatrix),i.currentProgram=h,i.uniformsList=null,h}function Oe(e){if(null===e.uniformsList){const t=e.currentProgram.getUniforms();e.uniformsList=db.seqWithValue(t.seq,e.uniforms)}return e.uniformsList}function Ue(e,t){const n=K.get(e);
vendor: 4,228 bytes, line 21
21n.outputColorSpace=t.outputColorSpace,n.batching=t.batching,n.instancing=t.instancing,n.instancingColor=t.instancingColor,n.skinning=t.skinning,n.morphTargets=t.morphTargets,n.morphNormals=t.morphNormals,n.morphColors=t.morphColors,n.morphTargetsCount=t.morphTargetsCount,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas,n.vertexTangents=t.vertexTangents,n.toneMapping=t.toneMapping}Re.setAnimationLoop((function(e){Te&&Te(e)})),"undefined"!=typeof self&&Re.setContext(self),this.setAnimationLoop=function(e){Te=e,xe.setAnimationLoop(e),null===e?Re.stop():Re.start()},xe.addEventListener("sessionstart",Ae),xe.addEventListener("sessionend",Ce),this.render=function(e,t){if(void 0!==t&&!0!==t.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===y)return;!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),!0===xe.enabled&&!0===xe.isPresenting&&(!0===xe.cameraAutoUpdate&&xe.updateCamera(t),t=xe.getCamera()),!0===e.isScene&&e.onBeforeRender(_,e,t,w),m=ae.get(e,v.length),m.init(),v.push(m),H.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),F.setFromProjectionMatrix(H),B=this.localClippingEnabled,V=le.init(this.clippingPlanes,B),f=oe.get(e,g.length),f.init(),g.push(f),Pe(e,t,0,_.sortObjects),f.finish(),!0===_.sortObjects&&f.sort(D,N),this.info.render.frame++,!0===V&&le.beginShadows();const n=m.state.shadowsArray;if(ce.render(n,e,t),!0===V&&le.endShadows(),!0===this.info.autoReset&&this.info.reset(),!1!==xe.enabled&&!1!==xe.isPresenting&&!1!==xe.hasDepthSensing()||he.render(f,e),m.setupLights(_._useLegacyLights),t.isArrayCamera){const n=t.cameras;for(let t=0,i=n.length;t<i;t++){const i=n[t];Le(f,e,i,i.viewport)}}else Le(f,e,t);null!==w&&(J.updateMultisampleRenderTarget(w),J.updateRenderTargetMipmap(w)),!0===e.isScene&&e.onAfterRender(_,e,t),me.resetDefaultState(),S=-1,E=null,v.pop(),m=v.length>0?v[v.length-1]:null,g.pop(),f=g.length>0?g[g.length-1]:null},this.getActiveCubeFace=function(){return x},this.getActiveMipmapLevel=function(){return b},this.getRenderTarget=function(){return w},this.setRenderTargetTextures=function(e,t,n){K.get(e.texture).__webglTexture=t,K.get(e.depthTexture).__webglTexture=n;const i=K.get(e);i.__hasExternalTextures=!0,i.__hasExternalTextures&&(i.__autoAllocateDepthBuffer=void 0===n,i.__autoAllocateDepthBuffer||!0===X.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),i.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(e,t){const n=K.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,n=0){w=e,x=t,b=n;let i=!0,r=null,s=!1,o=!1;if(e){const a=K.get(e);void 0!==a.__useDefaultFramebuffer?(Y.bindFramebuffer(ve.FRAMEBUFFER,null),i=!1):void 0===a.__webglFramebuffer?J.setupRenderTarget(e):a.__hasExternalTextures&&J.rebindTextures(e,K.get(e.texture).__webglTexture,K.get(e.depthTexture).__webglTexture);const l=e.texture;(l.isData3DTexture||l.isDataArrayTexture||l.isCompressedArrayTexture)&&(o=!0);const c=K.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(r=Array.isArray(c[t])?c[t][n]:c[t],s=!0):r=$.isWebGL2&&e.samples>0&&!1===J.useMultisampledRTT(e)?K.get(e).__webglMultisampledFramebuffer:Array.isArray(c)?c[n]:c,M.copy(e.viewport),T.copy(e.scissor),A=e.scissorTest}else M.copy(O).multiplyScalar(I).floor(),T.copy(U).multiplyScalar(I).floor(),A=k;if(Y.bindFramebuffer(ve.FRAMEBUFFER,r)&&$.drawBuffers&&i&&Y.drawBuffers(e,r),Y.viewport(M),Y.scissor(T),Y.setScissorTest(A),s){const i=K.get(e.texture);ve.framebufferTexture2D(ve.FRAMEBUFFER,ve.COLOR_ATTACHMENT0,ve.TEXTURE_CUBE_MAP_POSITIVE_X+t,i.__webglTexture,n)}else if(o){const i=K.get(e.texture),r=t||0;ve.framebufferTextureLayer(ve.FRAMEBUFFER,ve.COLOR_ATTACHMENT0,i.__webglTexture,n||0,r)}S=-1},this.readRenderTargetPixels=function(e,t,n,i,r,s,o){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let a=K.get(e).__webglFramebuffer;
21if(e.isWebGLCubeRenderTarget&&void 0!==o&&(a=a[o]),a){Y.bindFramebuffer(ve.FRAMEBUFFER,a);try{const o=e.texture,a=o.format,l=o.type;if(a!==Om&&fe.convert(a)!==ve.getParameter(ve.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const c=l===Dm&&(X.has("EXT_color_buffer_half_float")||$.isWebGL2&&X.has("EXT_color_buffer_float"));if(!(l===Cm||fe.convert(l)===ve.getParameter(ve.IMPLEMENTATION_COLOR_READ_TYPE)||l===Im&&($.isWebGL2||X.has("OES_texture_float")||X.has("WEBGL_color_buffer_float"))||c))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-i&&n>=0&&n<=e.height-r&&ve.readPixels(t,n,i,r,fe.convert(a),fe.convert(l),s)}finally{const e=null!==w?K.get(w).__webglFramebuffer:null;Y.bindFramebuffer(ve.FRAMEBUFFER,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){const i=Math.pow(2,-n),r=Math.floor(t.image.width*i),s=Math.floor(t.image.height*i);J.setTexture2D(t,0),ve.copyTexSubImage2D(ve.TEXTURE_2D,n,0,0,e.x,e.y,r,s),Y.unbindTexture()},this.copyTextureToTexture=function(e,t,n,i=0){const r=t.image.width,s=t.image.height,o=fe.convert(n.format),a=fe.convert(n.type);J.setTexture2D(n,0),ve.pixelStorei(ve.UNPACK_FLIP_Y_WEBGL,n.flipY),ve.pixelStorei(ve.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),ve.pixelStorei(ve.UNPACK_ALIGNMENT,n.unpackAlignment),t.isDataTexture?ve.texSubImage2D(ve.TEXTURE_2D,i,e.x,e.y,r,s,o,a,t.image.data):t.isCompressedTexture?ve.compressedTexSubImage2D(ve.TEXTURE_2D,i,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,o,t.mipmaps[0].data):ve.texSubImage2D(ve.TEXTURE_2D,i,e.x,e.y,o,a,t.image),0===i&&n.generateMipmaps&&ve.generateMipmap(ve.TEXTURE_2D),Y.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,i,r=0){if(_.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const s=e.max.x-e.min.x+1,o=e.max.y-e.min.y+1,a=e.max.z-e.min.z+1,l=fe.convert(i.format),c=fe.convert(i.type);let h;if(i.isData3DTexture)J.setTexture3D(i,0),h=ve.TEXTURE_3D;else{if(!i.isDataArrayTexture&&!i.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");J.setTexture2DArray(i,0),h=ve.TEXTURE_2D_ARRAY}ve.pixelStorei(ve.UNPACK_FLIP_Y_WEBGL,i.flipY),ve.pixelStorei(ve.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),ve.pixelStorei(ve.UNPACK_ALIGNMENT,i.unpackAlignment);const u=ve.getParameter(ve.UNPACK_ROW_LENGTH),d=ve.getParameter(ve.UNPACK_IMAGE_HEIGHT),p=ve.getParameter(ve.UNPACK_SKIP_PIXELS),f=ve.getParameter(ve.UNPACK_SKIP_ROWS),m=ve.getParameter(ve.UNPACK_SKIP_IMAGES),g=n.isCompressedTexture?n.mipmaps[r]:n.image;ve.pixelStorei(ve.UNPACK_ROW_LENGTH,g.width),ve.pixelStorei(ve.UNPACK_IMAGE_HEIGHT,g.height),ve.pixelStorei(ve.UNPACK_SKIP_PIXELS,e.min.x),ve.pixelStorei(ve.UNPACK_SKIP_ROWS,e.min.y),ve.pixelStorei(ve.UNPACK_SKIP_IMAGES,e.min.z),n.isDataTexture||n.isData3DTexture?ve.texSubImage3D(h,r,t.x,t.y,t.z,s,o,a,l,c,g.data):n.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ve.compressedTexSubImage3D(h,r,t.x,t.y,t.z,s,o,a,l,g.data)):ve.texSubImage3D(h,r,t.x,t.y,t.z,s,o,a,l,c,g),ve.pixelStorei(ve.UNPACK_ROW_LENGTH,u),ve.pixelStorei(ve.UNPACK_IMAGE_HEIGHT,d),ve.pixelStorei(ve.UNPACK_SKIP_PIXELS,p),ve.pixelStorei(ve.UNPACK_SKIP_ROWS,f),ve.pixelStorei(ve.UNPACK_SKIP_IMAGES,m),0===r&&i.generateMipmaps&&ve.generateMipmap(h),Y.unbindTexture()},this.initTexture=function(e){e.isCubeTexture?J.setTextureCube(e,0):e.isData3DTexture?J.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?J.setTexture2DArray(e,0):J.setTexture2D(e,0),Y.unbindTexture()},this.resetState=function(){x=0,b=0,w=null,Y.reset(),me.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return cg}get outputColorSpace(){return this._outputColorSpace}
21set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===Qm?"display-p3":"srgb",t.unpackColorSpace=kg.workingColorSpace===eg?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Km?Ym:3e3}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===Ym?Km:Jm}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}(class extends sw{}).prototype.isWebGL1Renderer=!0;class ow extends e_{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t}}class aw{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,i=this.getPoint(0),r=0;t.push(0);for(let s=1;s<=e;s++)n=this.getPoint(s/e),r+=n.distanceTo(i),t.push(r),i=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let i=0;const r=n.length;let s;s=t||e*n[r-1];let o,a=0,l=r-1;for(;a<=l;)if(i=Math.floor(a+(l-a)/2),o=n[i]-s,o<0)a=i+1;else{if(!(o>0)){l=i;break}l=i-1}if(i=l,n[i]===s)return i/(r-1);const c=n[i];return(i+(s-c)/(n[i+1]-c))/(r-1)}getTangent(e,t){const n=1e-4;let i=e-n,r=e+n;i<0&&(i=0),r>1&&(r=1);const s=this.getPoint(i),o=this.getPoint(r),a=t||(s.isVector2?new Mg:new Qg);return a.copy(o).sub(s).normalize(),a}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new Qg,i=[],r=[],s=[],o=new Qg,a=new Rv;for(let t=0;t<=e;t++){const n=t/e;i[t]=this.getTangentAt(n,new Qg)}r[0]=new Qg,s[0]=new Qg;let l=Number.MAX_VALUE;const c=Math.abs(i[0].x),h=Math.abs(i[0].y),u=Math.abs(i[0].z);c<=l&&(l=c,n.set(1,0,0)),h<=l&&(l=h,n.set(0,1,0)),u<=l&&n.set(0,0,1),o.crossVectors(i[0],n).normalize(),r[0].crossVectors(i[0],o),s[0].crossVectors(i[0],r[0]);for(let t=1;t<=e;t++){if(r[t]=r[t-1].clone(),s[t]=s[t-1].clone(),o.crossVectors(i[t-1],i[t]),o.length()>Number.EPSILON){o.normalize();const e=Math.acos(vg(i[t-1].dot(i[t]),-1,1));r[t].applyMatrix4(a.makeRotationAxis(o,e))}s[t].crossVectors(i[t],r[t])}if(!0===t){let t=Math.acos(vg(r[0].dot(r[e]),-1,1));t/=e,i[0].dot(o.crossVectors(r[0],r[e]))>0&&(t=-t);for(let n=1;n<=e;n++)r[n].applyMatrix4(a.makeRotationAxis(i[n],t*n)),s[n].crossVectors(i[n],r[n])}return{tangents:i,normals:r,binormals:s}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.t
vendor: 1,458 bytes, line 21
21ype,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}function lw(e,t,n,i,r){const s=.5*(i-t),o=.5*(r-n),a=e*e;return(2*n-2*i+s+o)*(e*a)+(-3*n+3*i-2*s-o)*a+s*e+n}class cw extends aw{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new Mg){const n=t,i=this.points,r=(i.length-1)*e,s=Math.floor(r),o=r-s,a=i[0===s?s:s-1],l=i[s],c=i[s>i.length-2?i.length-1:s+1],h=i[s>i.length-3?i.length-1:s+2];return n.set(lw(o,a.x,l.x,c.x,h.x),lw(o,a.y,l.y,c.y,h.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new Mg).fromArray(n))}return this}}class hw extends N_{constructor(e=1,t=32,n=16,i=0,r=2*Math.PI,s=0,o=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:i,phiLength:r,thetaStart:s,thetaLength:o},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const a=Math.min(s+o,Math.PI);let l=0;const c=[],h=new Qg,u=new Qg,d=[],p=[],f=[],m=[];for(let d=0;d<=n;d++){const g=[],v=d/n;let _=0;0===d&&0===s?_=.5/t:d===n&&a===Math.PI&&(_=-.5/t);for(let n=0;n<=t;n++){const a=n/t;
vendor: 9,849 bytes, line 21
21h.x=-e*Math.cos(i+a*r)*Math.sin(s+v*o),h.y=e*Math.cos(s+v*o),h.z=e*Math.sin(i+a*r)*Math.sin(s+v*o),p.push(h.x,h.y,h.z),u.copy(h).normalize(),f.push(u.x,u.y,u.z),m.push(a+_,1-v),g.push(l++)}c.push(g)}for(let e=0;e<n;e++)for(let i=0;i<t;i++){const t=c[e][i+1],r=c[e][i],o=c[e+1][i],l=c[e+1][i+1];(0!==e||s>0)&&d.push(t,r,l),(e!==n-1||a<Math.PI)&&d.push(r,o,l)}this.setIndex(d),this.setAttribute("position",new T_(p,3)),this.setAttribute("normal",new T_(f,3)),this.setAttribute("uv",new T_(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new hw(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}function uw(e,t,n){return!e||!n&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)}function dw(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}class pw{constructor(e,t,n,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==i?i:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,i=t[n],r=t[n-1];e:{t:{let s;n:{i:if(!(e<i)){for(let s=n+2;;){if(void 0===i){if(e<r)break i;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===s)break;if(r=i,i=t[++n],e<i)break t}s=t.length;break n}if(e>=r)break e;{const o=t[1];e<o&&(n=2,r=o);for(let s=n-2;;){if(void 0===r)return this._cachedIndex=0,this.copySampleValue_(0);if(n===s)break;if(i=r,r=t[--n-1],e>=r)break t}s=n,n=0}}for(;n<s;){const i=n+s>>>1;e<t[i]?s=i:n=i+1}if(i=t[n],r=t[n-1],void 0===r)return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===i)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,r,i)}return this.interpolate_(n,r,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=e*i;for(let e=0;e!==i;++e)t[e]=n[r+e];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class fw extends pw{constructor(e,t,n,i){super(e,t,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:qm,endingEnd:qm}}intervalChanged_(e,t,n){const i=this.parameterPositions;let r=e-2,s=e+1,o=i[r],a=i[s];if(void 0===o)switch(this.getSettings_().endingStart){case Xm:r=e,o=2*t-n;break;case $m:r=i.length-2,o=t+i[r]-i[r+1];break;default:r=e,o=n}if(void 0===a)switch(this.getSettings_().endingEnd){case Xm:s=e,a=2*n-t;break;case $m:s=1,a=n+i[1]-i[0];break;default:s=e-1,a=t}const l=.5*(n-t),c=this.valueSize;this._weightPrev=l/(t-o),this._weightNext=l/(a-n),this._offsetPrev=r*c,this._offsetNext=s*c}interpolate_(e,t,n,i){const r=this.resultBuffer,s=this.sampleValues,o=this.valueSize,a=e*o,l=a-o,c=this._offsetPrev,h=this._offsetNext,u=this._weightPrev,d=this._weightNext,p=(n-t)/(i-t),f=p*p,m=f*p,g=-u*m+2*u*f-u*p,v=(1+u)*m+(-1.5-2*u)*f+(-.5+u)*p+1,_=(-1-d)*m+(1.5+d)*f+.5*p,y=d*m-d*f;for(let e=0;e!==o;++e)r[e]=g*s[c+e]+v*s[l+e]+_*s[a+e]+y*s[h+e];return r}}class mw extends pw{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const r=this.resultBuffer,s=this.sampleValues,o=this.valueSize,a=e*o,l=a-o,c=(n-t)/(i-t),h=1-c;for(let e=0;e!==o;++e)r[e]=s[l+e]*h+s[a+e]*c;return r}}class gw extends pw{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e){return this.copySampleValue_(e-1)}}class vw{constructor(e,t,n,i){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=uw(t,this.TimeBufferType),this.values=uw(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:uw(e.times,Array),values:uw(e.values,Array)};const t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new gw(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new mw(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new fw(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case Gm:t=this.InterpolantFactoryMethodDiscrete;break;case Wm:t=this.InterpolantFactoryMethodLinear;break;case jm:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){const t="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(t);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Gm;case this.InterpolantFactoryMethodLinear:return Wm;case this.InterpolantFactoryMethodSmooth:return jm}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]+=e}return this}scale(e){if(1!==e){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]*=e}return this}trim(e,t){const n=this.times,i=n.length;let r=0,s=i-1;for(;r!==i&&n[r]<e;)++r;for(;-1!==s&&n[s]>t;)--s;if(++s,0!==r||s!==i){r>=s&&(s=Math.max(s,1),r=s-1);const e=this.getValueSize();this.times=n.slice(r,s),this.values=this.values.slice(r*e,s*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,i=this.values,r=n.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let t=0;t!==r;t++){const i=n[t];if("number"==typeof i&&isNaN(i)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,i),e=!1;break}if(null!==s&&s>i){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,i,s),e=!1;break}s=i}if(void 0!==i&&dw(i))for(let t=0,n=i.length;t!==n;++t){const n=i[t];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,n),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===jm,r=e.length-1;let s=1;for(let o=1;o<r;++o){let r=!1;const a=e[o];if(a!==e[o+1]&&(1!==o||a!==e[0]))if(i)r=!0;else{const e=o*n,i=e-n,s=e+n;for(let o=0;o!==n;++o){const n=t[e+o];if(n!==t[i+o]||n!==t[s+o]){r=!0;break}}}if(r){if(o!==s){e[s]=e[o];const i=o*n,r=s*n;for(let e=0;e!==n;++e)t[r+e]=t[i+e]}++s}}if(r>0){e[s]=e[r];for(let e=r*n,i=s*n,o=0;o!==n;++o)t[i+o]=t[e+o];++s}return s!==e.length?(this.times=e.slice(0,s),this.values=t.slice(0,s*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}vw.prototype.TimeBufferType=Float32Array,vw.prototype.ValueBufferType=Float32Array,vw.prototype.DefaultInterpolation=Wm;class _w extends vw{}_w.prototype.ValueTypeName="bool",_w.prototype.ValueBufferType=Array,_w.prototype.DefaultInterpolation=Gm,_w.prototype.InterpolantFactoryMethodLinear=void 0,_w.prototype.InterpolantFactoryMethodSmooth=void 0;class yw extends vw{}yw.prototype.ValueTypeName="color";class xw extends vw{}xw.prototype.ValueTypeName="number";class bw extends pw{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const r=this.resultBuffer,s=this.sampleValues,o=this.valueSize,a=(n-t)/(i-t);let l=e*o;for(let e=l+o;l!==e;l+=4)Jg.slerpFlat(r,0,s,l-o,s,l,a);return r}}class ww extends vw{InterpolantFactoryMethodLinear(e){return new bw(this.times,this.values,this.getValueSize(),e)}}ww.prototype.ValueTypeName="quaternion",ww.prototype.DefaultInterpolation=Wm,ww.prototype.InterpolantFactoryMethodSmooth=void 0;class Sw extends vw{}Sw.prototype.ValueTypeName="string",Sw.prototype.ValueBufferType=Array,Sw.prototype.DefaultInterpolation=Gm,Sw.prototype.InterpolantFactoryMethodLinear=void 0,Sw.prototype.InterpolantFactoryMethodSmooth=void 0;class Ew extends vw{}Ew.prototype.ValueTypeName="vector";const Mw={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class Tw{constructor(e,t,n){const i=this;let r,s=!1,o=0,a=0;const l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){a++,!1===s&&void 0!==i.onStart&&i.onStart(e,o,a),s=!0},this.itemEnd=function(e){o++,void 0!==i.onProgress&&i.onProgress(e,o,a),o===a&&(s=!1,void 0!==i.onLoad&&i.onLoad())},this.itemError=function(e){void 0!==i.onError&&i.onError(e)},this.resolveURL=function(e){return r?r(e):e},this.setURLModifier=function(e){return r=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){const t=l.indexOf(e);return-1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=l.length;t<n;t+=2){const n=l[t],i=l[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return i}return null}}}const Aw=new Tw;class Cw{constructor(e){this.manager=void 0!==e?e:Aw,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise((function(i,r){n.load(e,i,t,r)}))}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}Cw.DEFAULT_MATERIAL_NAME="__DEFAULT";
vendor: 4,598 bytes, line 21
21class Rw extends Error{constructor(e,t){super(e),this.response=t}}const Pw="\\[\\]\\.:\\/",Lw=new RegExp("[\\[\\]\\.:\\/]","g"),Iw="[^\\[\\]\\.:\\/]",Dw="[^"+Pw.replace("\\.","")+"]",Nw=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",Iw)+/(WCOD+)?/.source.replace("WCOD",Dw)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Iw)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Iw)+"$"),Ow=["material","materials","bones","map"];class Uw{constructor(e,t,n){this.path=t,this.parsedPath=n||Uw.parseTrackName(t),this.node=Uw.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new Uw.Composite(e,t,n):new Uw(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Lw,"")}static parseTrackName(e){const t=Nw.exec(e);if(null===t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==i&&-1!==i){const e=n.nodeName.substring(i+1);-1!==Ow.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const n=function(e){for(let i=0;i<e.length;i++){const r=e[i];if(r.name===t||r.uuid===t)return r;const s=n(r.children);if(s)return s}return null},i=n(e.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)e[t++]=n[i]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,i=t.propertyName;let r=t.propertyIndex;if(e||(e=Uw.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");if(n){let i=t.objectIndex;switch(n){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(let t=0;t<e.length;t++)if(e[t].name===i){i=t;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as no
21de does not have a material.",this);if(!e.material.map)return void console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);e=e.material.map;break;default:if(void 0===e[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==i){if(void 0===e[i])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[i]}}const s=e[i];if(void 0===s){const n=t.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+n+"."+i+" but it wasn't found.",e)}let o=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?o=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(o=this.Versioning.MatrixWorldNeedsUpdate);let a=this.BindingType.Direct;if(void 0!==r){if("morphTargetInfluences"===i){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[r]&&(r=e.morphTargetDictionary[r])}a=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=r}else void 0!==s.fromArray&&void 0!==s.toArray?(a=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(a=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=i;this.getValue=this.GetterByBindingType[a],this.setValue=this.SetterByBindingTypeAndVersioning[a][o]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Uw.Composite=class{constructor(e,t,n){const i=n||Uw.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,i)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,i=this._bindings[n];void 0!==i&&i.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,r=n.length;i!==r;++i)n[i].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},Uw.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Uw.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Uw.prototype.GetterByBindingType=[Uw.prototype._getValue_direct,Uw.prototype._getValue_array,Uw.prototype._getValue_arrayElement,Uw.prototype._getValue_toArray],Uw.prototype.SetterByBindingTypeAndVersioning=[[Uw.prototype._setValue_direct,Uw.prototype._setValue_direct_setNeedsUpdate,Uw.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Uw.prototype._setValue_array,Uw.prototype._setValue_array_setNeedsUpdate,Uw.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Uw.prototype._setValue_arrayElement,Uw.prototype._setValue_arrayElement_setNeedsUpdate,Uw.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Uw.prototype._setValue_fromArray,Uw.prototype._setValue_fromArray_setNeedsUpdate,Uw.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];new Float32Array(1);class kw{constructor(e,t,n=0,i=1/0){this.ray=new Cv(e,t),this.near=n,this.far=i,this.camera=null,this.layers=new Bv,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}intersectObject(e,t=!0,n=[]){return Vw(e,this,n,t),n.sort(Fw),n}intersectObjects(e,t=!0,n=[]){for(let i=0,r=e.length;i<r;i++)Vw(e[i],this,n,t);return n.sort(Fw),n}}function Fw(e,t){return e.distance-t.distance}function Vw(e,t,n,i){if(e.layers.test(t.layers)&&e.raycast(t,n),!0===i){const i=e.children;for(let e=0,r=i.length;e<r;e++)Vw(i[e],t,n,!0)}}"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:dm}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=dm); 22/*! 23 * PhotoSphereViewer 5.7.4 24 * @copyright 2014-2015 Jérémy Heleine 25 * @copyright 2024 Damien "Mistic" Sorel
26 * @licence MIT (https://opensource.org/licenses/MIT) 27 */ 28var Bw=Object.defineProperty,zw=(e,t)=>{for(var n in t)Bw(e,n,{get:t[n],enumerable:!0})},Hw={};zw(Hw,{ACTIONS:()=>tS,ANIMATION_MIN_DURATION:()=>jw,CAPTURE_EVENTS_CLASS:()=>eS,CTRLZOOM_TIMEOUT:()=>Zw,DBLCLICK_DELAY:()=>Xw,DEFAULT_TRANSITION:()=>Ww,EASINGS:()=>sS,ICONS:()=>rS,IDS:()=>nS,INERTIA_WINDOW:()=>Kw,KEY_CODES:()=>iS,LONGTOUCH_DELAY:()=>$w,MOVE_THRESHOLD:()=>qw,SPHERE_RADIUS:()=>Jw,TWOFINGERSOVERLAY_DELAY:()=>Yw,VIEWER_DATA:()=>Qw});var Gw,Ww=1500,jw=500,qw=4,Xw=300,$w=500,Yw=100,Zw=2e3,Kw=300,Jw=10,Qw="photoSphereViewer",eS="psv--capture-event",tS=(e=>(e.ROTATE_UP="ROTATE_UP",e.ROTATE_DOWN="ROTATE_DOWN",e.ROTATE_RIGHT="ROTATE_RIGHT",e.ROTATE_LEFT="ROTATE_LEFT",e.ZOOM_IN="ZOOM_IN",e.ZOOM_OUT="ZOOM_OUT",e))(tS||{}),nS={MENU:"menu",TWO_FINGERS:"twoFingers",CTRL_ZOOM:"ctrlZoom",ERROR:"error",DESCRIPTION:"description"},iS={Enter:"Enter",Control:"Control",Escape:"Escape",Space:" ",PageUp:"PageUp",PageDown:"PageDown",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Delete:"Delete",Plus:"+",Minus:"-"},rS={arrow:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="40 40 432 432"><g transform="rotate(0, 256, 256)"><path fill="currentColor" d="M425.23 210.55H227.39a5 5 0 01-3.53-8.53l56.56-56.57a45.5 45.5 0 000-64.28 45.15 45.15 0 00-32.13-13.3 45.15 45.15 0 00-32.14 13.3L41.32 256l174.83 174.83a45.15 45.15 0 0032.14 13.3 45.15 45.15 0 0032.13-13.3 45.5 45.5 0 000-64.28l-56.57-56.57a5 5 0 013.54-8.53h197.84c25.06 0 45.45-20.39 45.45-45.45s-20.4-45.45-45.45-45.45z"/></g>\x3c!-- Created by Flatart from the Noun Project --\x3e</svg>\n',close:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><g fill="currentColor" transform=" translate(50, 50) rotate(45)"><rect x="-5" y="-65" width="10" height="130"/><rect x="-65" y="-5" width="130" height="10"/></g></svg>',download:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="currentColor" d="M83.3 35.6h-17V3H32.2v32.6H16.6l33.6 32.7 33-32.7z"/><path fill="currentColor" d="M83.3 64.2v16.3H16.6V64.2H-.1v32.6H100V64.2H83.3z"/>\x3c!--Created by Michael Zenaty from the Noun Project--\x3e</svg>\n',fullscreenIn:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="currentColor" d="M100 40H87.1V18.8h-21V6H100zM100 93.2H66V80.3h21.1v-21H100zM34 93.2H0v-34h12.9v21.1h21zM12.9 40H0V6h34v12.9H12.8z"/>\x3c!--Created by Garrett Knoll from the Noun Project--\x3e</svg>\n',fullscreenOut:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="currentColor" d="M66 7h13v21h21v13H66zM66 60.3h34v12.9H79v21H66zM0 60.3h34v34H21V73.1H0zM21 7h13v34H0V28h21z"/>\x3c!--Created by Garrett Knoll from the Noun Project--\x3e</svg>\n',info:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path fill="currentColor" d="M28.3 26.1c-1 2.6-1.9 4.8-2.6 7-2.5 7.4-5 14.7-7.2 22-1.3 4.4.5 7.2 4.3 7.8 1.3.2 2.8.2 4.2-.1 8.2-2 11.9-8.6 15.7-15.2l-2.2 2a18.8 18.8 0 0 1-7.4 5.2 2 2 0 0 1-1.6-.2c-.2-.1 0-1 0-1.4l.8-1.8L41.9 28c.5-1.4.9-3 .7-4.4-.2-2.6-3-4.4-6.3-4.4-8.8.2-15 4.5-19.5 11.8-.2.3-.2.6-.3 1.3 3.7-2.8 6.8-6.1 11.8-6.2z"/><circle fill="currentColor" cx="39.3" cy="9.2" r="8.2"/>\x3c!--Created by Arafat Uddin from the Noun Project--\x3e</svg>\n',menu:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="10 10 80 80"><g fill="currentColor"><circle r="10" cx="20" cy="20"/><circle r="10" cx="50" cy="20"/><circle r="10" cx="80" cy="20"/><circle r="10" cx="20" cy="50"/><circle r="10" cx="50" cy="50"/><circle r="10" cx="80" cy="50"/><circle r="10" cx="20" cy="80"/><circle r="10" cx="50" cy="80"/><circle r="10" cx="80" cy="80"/></g>\x3c!-- Created by Richard Kunák from the Noun Project--\x3e</svg>\n',zoomIn:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="currentColor" d="M14.043 12.22a7.738 7.738 0 1 0-1.823 1.822l4.985 4.985c.503.504 1.32.504 1.822 0a1.285 1.285 0 0 0 0-1.822l-4.984-4.985zm-6.305 1.043a5.527 5.527 0 1 1 0-11.053 5.527 5.527 0 0 1 0 11.053z"/><path fill="currentColor" d="M8.728 4.009H6.744v2.737H4.006V8.73h2.738v2.736h1.984V8.73h2.737V6.746H8.728z"/>\x3c!--Created by Ryan Canning from the Noun Project--\x3e</svg>\n',zoomOut:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
28<path fill="currentColor" d="M14.043 12.22a7.738 7.738 0 1 0-1.823 1.822l4.985 4.985c.503.504 1.32.504 1.822 0a1.285 1.285 0 0 0 0-1.822l-4.984-4.985zm-6.305 1.043a5.527 5.527 0 1 1 0-11.053 5.527 5.527 0 0 1 0 11.053z"/><path fill="currentColor" d="M4.006 6.746h7.459V8.73H4.006z"/>\x3c!--Created by Ryan Canning from the Noun Project--\x3e</svg>\n'},sS={linear:e=>e,inQuad:e=>e*e,outQuad:e=>e*(2-e),inOutQuad:e=>e<.5?2*e*e:(4-2*e)*e-1,inCubic:e=>e*e*e,outCubic:e=>--e*e*e+1,inOutCubic:e=>e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1,inQuart:e=>e*e*e*e,outQuart:e=>1- --e*e*e*e,inOutQuart:e=>e<.5?8*e*e*e*e:1-8*--e*e*e*e,inQuint:e=>e*e*e*e*e,outQuint:e=>1+--e*e*e*e*e,inOutQuint:e=>e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e,inSine:e=>1-Math.cos(e*(Math.PI/2)),outSine:e=>Math.sin(e*(Math.PI/2)),inOutSine:e=>.5-.5*Math.cos(Math.PI*e),inExpo:e=>Math.pow(2,10*(e-1)),outExpo:e=>1-Math.pow(2,-10*e),inOutExpo:e=>(e=2*e-1)<0?.5*Math.pow(2,10*e):1-.5*Math.pow(2,-10*e),inCirc:e=>1-Math.sqrt(1-e*e),outCirc:e=>Math.sqrt(1-(e-1)*(e-1)),inOutCirc:e=>(e*=2)<1?.5-.5*Math.sqrt(1-e*e):.5+.5*Math.sqrt(1-(e-=2)*e)},oS={};function aS(e,t){let n=e%t;return n<0&&(n+=t),n}function lS(e){return e.reduce(((e,t)=>e+t),0)}function cS(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function hS(e,t){return Math.atan2(t.y-e.y,t.x-e.x)}function uS(e,t){return[0,2*Math.PI,2*-Math.PI].reduce(((n,i)=>{const r=t-e+i;return Math.abs(r)<Math.abs(n)?r:n}),1/0)}function dS(e,t){return Math.acos(Math.cos(e.pitch)*Math.cos(t.pitch)*Math.cos(e.yaw-t.yaw)+Math.sin(e.pitch)*Math.sin(t.pitch))}function pS([e,t],[n,i]){e-n>Math.PI?e-=2*Math.PI:e-n<-Math.PI&&(e+=2*Math.PI);const r=(n-e)*Math.cos((t+i)/2),s=i-t;return Math.sqrt(r*r+s*s)}function fS(e){return"string"==typeof e?e.match(/^[a-z]/i)?document.getElementById(e):document.querySelector(e):e}function mS(e,t,n){void 0===n?e.classList.toggle(t):n?e.classList.add(t):n||e.classList.remove(t)}function gS(e,t){e.classList.add(...t.split(" "))}function vS(e,t){e.classList.remove(...t.split(" "))}function _S(e,t){let n=e;do{if(n===t)return!0;n=n.parentElement}while(n);return!1}function yS(e,t){if(!e?.matches)return null;let n=e;do{if(n.matches(t))return n;n=n.parentElement}while(n);return null}function xS(e){let t=0,n=0,i=e;for(;i;)t+=i.offsetLeft-i.scrollLeft+i.clientLeft,n+=i.offsetTop-i.scrollTop+i.clientTop,i=i.offsetParent;return{x:t,y:n}}function bS(e,t){return window.getComputedStyle(e).getPropertyValue(t)}function wS(e){if(e.touches.length<2)return null;const t={x:e.touches[0].clientX,y:e.touches[0].clientY},n={x:e.touches[1].clientX,y:e.touches[1].clientY};return{distance:cS(t,n),angle:hS(t,n),center:{x:(t.x+n.x)/2,y:(t.y+n.y)/2}}}function SS(e,t=!1){return t?e===Gw:document.fullscreenElement===e}function ES(e,t=!1){t?(Gw=e,e.classList.add("psv-fullscreen-emulation"),document.dispatchEvent(new Event("fullscreenchange"))):e.requestFullscreen()}function MS(e=!1){e?(Gw.classList.remove("psv-fullscreen-emulation"),Gw=null,document.dispatchEvent(new Event("fullscreenchange"))):document.exitFullscreen()}function TS(e){return e.replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g,((e,t)=>(t>0?"-":"")+e.toLowerCase()))}function AS(e,t){let n=!1;return function(...i){n||(n=!0,setTimeout((()=>{e.apply(this,i),n=!1}),t))}}function CS(e){if("object"!=typeof e||null===e||"[object Object]"!==Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function RS(e,t){const n=t;return function e(t,i){return Array.isArray(i)?(t&&Array.isArray(t)?t.length=0:t=[],i.forEach(((n,i)=>{t[i]=e(null,n)}))):"object"==typeof i?(t&&!Array.isArray(t)||(t={}
28),Object.keys(i).forEach((r=>{"object"==typeof i[r]&&i[r]&&CS(i[r])?i[r]!==n&&(t[r]?e(t[r],i[r]):t[r]=e(null,i[r])):t[r]=i[r]}))):t=i,t}(e,t)}function PS(e){return RS(null,e)}function LS(e){return!e||0===Object.keys(e).length&&e.constructor===Object}function IS(e){return null==e}function DS(...e){for(const t of e)if(!IS(t))return t;return null}function NS(e,t){if(e===t)return!0;if(OS(e)&&OS(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n of Object.keys(e))if(!NS(e[n],t[n]))return!1;return!0}return!1}function OS(e){return"object"==typeof e&&null!==e}zw(oS,{Animation:()=>aE,Dynamic:()=>lE,MultiDynamic:()=>cE,PressHandler:()=>hE,Slider:()=>dE,SliderDirection:()=>uE,addClasses:()=>gS,angle:()=>hS,applyEulerInverse:()=>iE,checkStylesheet:()=>sE,checkVersion:()=>oE,cleanCssPosition:()=>ZS,clone:()=>PS,createTexture:()=>tE,cssPositionIsOrdered:()=>KS,dasherize:()=>TS,deepEqual:()=>NS,deepmerge:()=>RS,distance:()=>cS,exitFullscreen:()=>MS,firstNonNull:()=>DS,getAbortError:()=>VS,getAngle:()=>dS,getClosest:()=>yS,getConfigParser:()=>rE,getElement:()=>fS,getPosition:()=>xS,getShortestArc:()=>uS,getStyleProperty:()=>bS,getTouchData:()=>wS,getXMPValue:()=>GS,greatArcDistance:()=>pS,hasParent:()=>_S,invertResolvableBoolean:()=>FS,isAbortError:()=>BS,isEmpty:()=>LS,isExtendedPosition:()=>HS,isFullscreenEnabled:()=>SS,isNil:()=>IS,isPlainObject:()=>CS,logWarn:()=>zS,parseAngle:()=>eE,parsePoint:()=>YS,parseSpeed:()=>JS,removeClasses:()=>vS,requestFullscreen:()=>ES,resolveBoolean:()=>kS,speedToDuration:()=>QS,sum:()=>lS,throttle:()=>AS,toggleClass:()=>mS,wrap:()=>aS});var US=class e extends Error{constructor(t){super(t),this.name="PSVError",Error.captureStackTrace?.(this,e)}};function kS(e,t){CS(e)?(t(e.initial,!0),e.promise.then((e=>t(e,!1)))):t(e,!0)}function FS(e){return{initial:!e.initial,promise:e.promise.then((e=>!e))}}function VS(){const e=new Error("Loading was aborted.");return e.name="AbortError",e}function BS(e){return"AbortError"===e?.name}function zS(e){console.warn(`PhotoSphereViewer: ${e}`)}function HS(e){return!!e&&[["textureX","textureY"],["yaw","pitch"]].some((([t,n])=>void 0!==e[t]&&void 0!==e[n]))}function GS(e,t){let n=e.match("<GPano:"+t+">(.*)</GPano:"+t+">");if(null!==n){const e=parseInt(n[1],10);return isNaN(e)?null:e}if(n=e.match("GPano:"+t+'="(.*?)"'),null!==n){const e=parseInt(n[1],10);return isNaN(e)?null:e}return null}var WS={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},jS=["left","center","right"],qS=["top","center","bottom"],XS=[...jS,...qS],$S="center";function YS(e){if(!e)return{x:.5,y:.5};if("object"==typeof e)return e;let t=e.toLocaleLowerCase().split(" ").slice(0,2);1===t.length&&(t=WS[t[0]]?[t[0],$S]:[t[0],t[0]]);const n="left"!==t[1]&&"right"!==t[1]&&"top"!==t[0]&&"bottom"!==t[0];t=t.map((e=>WS[e]||e)),n||t.reverse();const i=t.join(" ").match(/^([0-9.]+)% ([0-9.]+)%$/);return i?{x:parseFloat(i[1])/100,y:parseFloat(i[2])/100}:{x:.5,y:.5}}function ZS(e,{allowCenter:t,cssOrder:n}={allowCenter:!0,cssOrder:!0}){return e?("string"==typeof e&&(e=e.split(" ")),1===e.length&&(e[0]===$S?e=[$S,$S]:-1!==jS.indexOf(e[0])?e=[$S,e[0]]:-1!==qS.indexOf(e[0])&&(e=[e[0],$S])),2!==e.length||-1===XS.indexOf(e[0])||-1===XS.indexOf(e[1])?(zS(`Unparsable position ${e}`),null):t||e[0]!==$S||e[1]!==$S?(n&&!KS(e)&&(e=[e[1],e[0]]),e[1]===$S&&-1!==jS.indexOf(e[0])&&(e=[$S,e[0]]),e[0]===$S&&-1!==qS.indexOf(e[1])&&(e=[e[1],$S]),e):(zS("Invalid position center center"),null)):null}function KS(e){return-1!==qS.indexOf(e[0])&&-1!==jS.indexOf(e[1])}function JS(e){let t;if("string"==typeof e){const n=e.toString().trim();let i=parseFloat(n.replace(/^(-?[0-9]+(?:\.[0-9]*)?).*$/,"$1"));const r=n.replace(/^-?[0-9]+(?:\.[0-9]*)?(.*)$/,"$1").trim();switch(r.match(/(pm|per minute)$/)&&(i/=60),r){case"dpm":case"degrees per minute":case"dps":case"degrees per second":t=Eg.degToRad(i);break;case"rdpm":case"radians per minute":case"rdps":case"radians per second":t=i;break;case"rpm":case"revolutions per minute":case"rps":case"revolutions per second":t=i*Math.PI*2;break;default:throw new US(`Unknown speed unit "${r}"`)}}else t=e;return t}function QS(e,t){if("number"!=typeof e){const n=JS(e);return t/Math.abs(n)*1e3}return Math.abs(e)}function eE(e,t=!1,n=t){let i;if("string"==typeof e){const t=e.toLowerCase().trim().match(/^(-?[0-9]+(?:\.[0-9]*)?)(.*)$/);if(!t)throw new US(`Unknown angle "${e}"`);const n=parseFloat(t[1]),r=t[2];if(r)switch(r){case"deg":case"degs":i=Eg.degToRad(n);break;case"rad":case"rads":i=n;break;default:throw new US(`Unknown angle unit "${r}"`)}else i=n}else{if("number"!=typeof e||isNaN(e))throw new US(`Unknown angle "${e}"`);
28i=e}return i=aS(t?i+Math.PI:i,2*Math.PI),t?Eg.clamp(i-Math.PI,-Math.PI/(n?2:1),Math.PI/(n?2:1)):i}function tE(e,t=!1){const n=new qg(e);return n.needsUpdate=!0,n.minFilter=t?Am:Mm,n.generateMipmaps=t,n.anisotropy=t?2:1,n}var nE=new Jg;function iE(e,t){nE.setFromEuler(t).invert(),e.applyQuaternion(nE)}function rE(e,t){const n=function(n){if(!n)return PS(e);const i=PS({...e,...n}),r={};for(let[n,s]of Object.entries(i)){if(t&&n in t)s=t[n](s,{rawConfig:i,defValue:e[n]});else if(!(n in e)){zS(`Unknown option ${n}`);continue}r[n]=s}return r};return n.defaults=e,n.parsers=t||{},n}function sE(e,t){"true"!==bS(e,`--psv-${t}-loaded`)&&console.error(`PhotoSphereViewer: stylesheet "@photo-sphere-viewer/${t}/index.css" is not loaded`)}function oE(e,t,n){t&&t!==n&&console.error(`PhotoSphereViewer: @photo-sphere-viewer/${e} is in version ${t} but @photo-sphere-viewer/core is in version ${n}`)}var aE=class{constructor(e){this.easing=sS.linear,this.callbacks=[],this.resolved=!1,this.cancelled=!1,this.options=e,e?(e.easing&&(this.easing="function"==typeof e.easing?e.easing:sS[e.easing]||sS.linear),this.delayTimeout=setTimeout((()=>{this.delayTimeout=void 0,this.animationFrame=window.requestAnimationFrame((e=>this.__run(e)))}),e.delay||0)):this.resolved=!0}__run(e){if(this.cancelled)return;this.start||(this.start=e);const t=(e-this.start)/this.options.duration,n={};if(t<1){for(const[e,i]of Object.entries(this.options.properties))if(i){const r=i.start+(i.end-i.start)*this.easing(t);n[e]=r}
28this.options.onTick(n,t),this.animationFrame=window.requestAnimationFrame((e=>this.__run(e)))}else{for(const[e,t]of Object.entries(this.options.properties))t&&(n[e]=t.end);this.options.onTick(n,1),this.__resolve(!0),this.animationFrame=void 0}}__resolve(e){e?this.resolved=!0:this.cancelled=!0,this.callbacks.forEach((t=>t(e))),this.callbacks.length=0}then(e){return this.resolved||this.cancelled?Promise.resolve(this.resolved).then(e):new Promise((e=>{this.callbacks.push(e)})).then(e)}cancel(){this.cancelled||this.resolved||(this.__resolve(!1),this.delayTimeout&&(window.clearTimeout(this.delayTimeout),this.delayTimeout=void 0),this.animationFrame&&(window.cancelAnimationFrame(this.animationFrame),this.animationFrame=void 0))}},lE=class{constructor(e,t){if(this.fn=e,this.mode=0,this.speed=0,this.speedMult=0,this.currentSpeed=0,this.target=0,this.__current=0,this.min=t.min,this.max=t.max,this.wrap=t.wrap,this.current=t.defaultValue,this.wrap&&0!==this.min)throw new US("invalid config");this.fn&&this.fn(this.current)}get current(){return this.__current}set current(e){this.__current=e}setSpeed(e){this.speed=e}goto(e,t=1){this.mode=2,this.target=this.wrap?aS(e,this.max):Eg.clamp(e,this.min,this.max),this.speedMult=t}step(e,t=1){0===t?this.setValue(this.current+e):(2!==this.mode&&(this.target=this.current),this.goto(this.target+e,t))}roll(e=!1,t=1){this.mode=1,this.target=e?-1/0:1/0,this.speedMult=t}stop(){this.mode=0}setValue(e){return this.target=this.wrap?aS(e,this.max):Eg.clamp(e,this.min,this.max),this.mode=0,this.currentSpeed=0,this.target!==this.current&&(this.current=this.target,this.fn&&this.fn(this.current),!0)}update(e){if(2===this.mode){this.wrap&&Math.abs(this.target-this.current)>this.max/2&&(this.current=this.current<this.target?this.current+this.max:this.current-this.max);const e=this.currentSpeed*this.currentSpeed/(this.speed*this.speedMult*4);Math.abs(this.target-this.current)<=e&&(this.mode=0)}let t=0===this.mode?0:this.speed*this.speedMult;this.target<this.current&&(t=-t),this.currentSpeed<t?this.currentSpeed=Math.min(t,this.currentSpeed+e/1e3*this.speed*this.speedMult*2):this.currentSpeed>t&&(this.currentSpeed=Math.max(t,this.currentSpeed-e/1e3*this.speed*this.speedMult*2));let n=null;return this.current>this.target&&this.currentSpeed?n=Math.max(this.target,this.current+this.currentSpeed*e/1e3):this.current<this.target&&this.currentSpeed&&(n=Math.min(this.target,this.current+this.currentSpeed*e/1e3)),null!==n&&(n=this.wrap?aS(n,this.max):Eg.clamp(n,this.min,this.max),n!==this.current)&&(this.current=n,this.fn&&this.fn(this.current),!0)}},cE=class{constructor(e,t){this.fn=e,this.dynamics=t,this.fn&&this.fn(this.current)}get current(){return Object.entries(this.dynamics).reduce(((e,[t,n])=>(e[t]=n.current,e)),{})}setSpeed(e){for(const t of Object.values(this.dynamics))t.setSpeed(e)}goto(e,t=1){for(const[n,i]of Object.entries(e))this.dynamics[n].goto(i,t)}step(e,t=1){if(0===t)this.setValue(Object.keys(e).reduce(((t,n)=>(t[n]=e[n]+this.dynamics[n].current,t)),{}));else for(const[n,i]of Object.entries(e))this.dynamics[n].step(i,t)}roll(e,t=1){for(const[n,i]of Object.entries(e))this.dynamics[n].roll(i,t)}stop(){for(const e of Object.values(this.dynamics))e.stop()}setValue(e){let t=!1;for(const[n,i]of Object.entries(e))t=this.dynamics[n].setValue(i)||t;return t&&this.fn&&this.fn(this.current),t}update(e){let t=!1;for(const n of Object.values(this.dynamics))t=n.update(e)||t;return t&&this.fn&&this.fn(this.current),t}},hE=class{constructor(e=200){this.delay=e,this.time=0,this.delay=e}get pending(){return 0!==this.time}down(){this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0),this.time=(new Date).getTime()}up(e){if(!this.time)return;Date.now()-this.time<this.delay?this.timeout=setTimeout((()=>{e(),this.timeout=void 0,this.time=0}),this.delay):(e(),this.time=0)}},uE=(e=>(e.VERTICAL="VERTICAL",e.HORIZONTAL="HORIZONTAL",e))(uE||{}),dE=class{constructor(e,t,n){this.container=e,this.direction=t,this.listener=n,this.mousedown=!1,this.mouseover=!1,this.container.addEventListener("click",this),this.container.addEventListener("mousedown",this),this.container.addEventListener("mouseenter",this),this.container.addEventListener("mouseleave",this),this.container.addEventListener("touchstart",this),this.container.addEventListener("mousemove",this,!0),this.container.addEventListener("touchmove",this,!0),window.addEventListener("mouseup",this),window.addEventListener("touchend",this)}get isVertical(){return"VERTICAL"===this.direction}get isHorizontal(){return"HORIZONTAL"===this.direction}destroy(){window.removeEventListener("mouseup",this),window.removeEventListener("touchend",this)}handleEvent(e){switch(e.type){case"click":e.stopPropagation();break;case"mousedown":this.__onMouseDown(e);break;case"mouseenter":this.__onMouseEnter(e);break;case"mouseleave":this.__onMouseLeave(e);break;case"touchstart":this.__onTouchStart(e);break;case"mousemove":this.__onMouseMove(e);break;case"touchmove":this.__onTouchMove(e);break;case"mouseup":this.__onMouseUp(e);break;case"touchend":this.__onTouchEnd(e)}}__onMouseDown(e){this.mousedown=!0,this.__update(e.clientX,e.clientY,!0)}__onMouseEnter(e){this.mouseover=!0,this.__update(e.clientX,e.clientY,!0)}__onTouchStart(e){this.mouseover=!0,this.mousedown=!0;const t=e.changedTouches[0];this.__update(t.clientX,t.clientY,!0)}__onMouseMove(e){(this.mousedown||this.mouseover)&&(e.stopPropagation(),this.__update(e.clientX,e.clientY,!0))}__onTouchMove(e){if(this.mousedown||this.mouseover){e.stopPropagation();const t=e.changedTouches[0];this.__update(t.clientX,t.clientY,!0)}}__onMouseUp(e){this.mousedown&&(this.mousedown=!1,this.__update(e.clientX,e.clientY,!1))}__onMouseLeave(e){this.mouseover&&(this.mouseover=!1,this.__update(e.clientX,e.clientY,!0))}__onTouchEnd(e){if(this.mousedown){this.mouseover=!1,this.mousedown=!1;const t=e.changedTouches[0];this.__update(t.clientX,t.clientY,!1)}}__update(e,t,n){const i=this.container.getBoundingClientRect(),r=this.isVertical?t:e,s=i[this.isVertical?"bottom":"left"],o=i[this.isVertical?"height":"width"],a=Math.abs((s-r)/o);this.listener({value:a,click:!n,mousedown:this.mousedown,mouseover:this.mouseover,cursor:{clientX:e,clientY:t}})}},pE={};zw(pE,{BeforeAnimateEvent:()=>_E,BeforeRenderEvent:()=>xE,BeforeRotateEvent:()=>wE,ClickEvent:()=>EE,ConfigChangedEvent:()=>TE,DoubleClickEvent:()=>CE,FullscreenEvent:()=>PE,HideNotificationEvent:()=>IE,HideOverlayEvent:()=>NE,HidePanelEvent:()=>UE,HideTooltipEvent:()=>FE,KeypressEvent:()=>BE,LoadProgressEvent:()=>HE,ObjectEnterEvent:()=>yM,ObjectEvent:()=>vM,ObjectHoverEvent:()=>SM,ObjectLeaveEvent:()=>bM,PanoramaErrorEvent:()=>$E,PanoramaLoadEvent:()=>WE,PanoramaLoadedEvent:()=>qE,PositionUpdatedEvent:()=>ZE,ReadyEvent:()=>eM,RenderEvent:()=>nM,RollUpdatedEvent:()=>JE,ShowNotificationEvent:()=>rM,ShowOverlayEvent:()=>oM,ShowPanelEvent:()=>lM,ShowTooltipEvent:()=>hM,SizeUpdatedEvent:()=>dM,StopAllEvent:()=>fM,ViewerEvent:()=>gE,ZoomUpdatedEvent:()=>gM});
vendor: 4,063 bytes, line 28
28var fE=class extends Event{constructor(e,t=!1){super(e,{cancelable:t})}},mE=class extends EventTarget{dispatchEvent(e){return super.dispatchEvent(e)}addEventListener(e,t,n){super.addEventListener(e,t,n)}removeEventListener(e,t,n){super.removeEventListener(e,t,n)}},gE=class extends fE{},vE=class e extends gE{constructor(t,n){super(e.type,!0),this.position=t,this.zoomLevel=n}};vE.type="before-animate";var _E=vE,yE=class e extends gE{constructor(t,n){super(e.type),this.timestamp=t,this.elapsed=n}};yE.type="before-render";var xE=yE,bE=class e extends gE{constructor(t){super(e.type,!0),this.position=t}};bE.type="before-rotate";var wE=bE,SE=class e extends gE{constructor(t){super(e.type),this.data=t}};SE.type="click";var EE=SE,ME=class e extends gE{constructor(t){super(e.type),this.options=t}containsOptions(...e){return e.some((e=>this.options.includes(e)))}};ME.type="config-changed";var TE=ME,AE=class e extends gE{constructor(t){super(e.type),this.data=t}};AE.type="dblclick";var CE=AE,RE=class e extends gE{constructor(t){super(e.type),this.fullscreenEnabled=t}};RE.type="fullscreen";var PE=RE,LE=class e extends gE{constructor(t){super(e.type),this.notificationId=t}};LE.type="hide-notification";var IE=LE,DE=class e extends gE{constructor(t){super(e.type),this.overlayId=t}};DE.type="hide-overlay";var NE=DE,OE=class e extends gE{constructor(t){super(e.type),this.panelId=t}};OE.type="hide-panel";var UE=OE,kE=class e extends gE{constructor(t){super(e.type),this.tooltipData=t}};kE.type="hide-tooltip";var FE=kE,VE=class e extends gE{constructor(t){super(e.type,!0),this.key=t}};VE.type="key-press";var BE=VE,zE=class e extends gE{constructor(t){super(e.type),this.progress=t}};zE.type="load-progress";var HE=zE,GE=class e extends gE{constructor(t){super(e.type),this.panorama=t}};GE.type="panorama-load";var WE=GE,jE=class e extends gE{constructor(t){super(e.type),this.data=t}};jE.type="panorama-loaded";var qE=jE,XE=class e extends gE{constructor(t,n){super(e.type),this.panorama=t,this.error=n}};XE.type="panorama-error";var $E=XE,YE=class e extends gE{constructor(t){super(e.type),this.position=t}};YE.type="position-updated";var ZE=YE,KE=class e extends gE{constructor(t){super(e.type),this.roll=t}};KE.type="roll-updated";var JE=KE,QE=class e extends gE{constructor(){super(e.type)}};QE.type="ready";var eM=QE,tM=class e extends gE{constructor(){super(e.type)}};tM.type="render";var nM=tM,iM=class e extends gE{constructor(t){super(e.type),this.notificationId=t}};iM.type="show-notification";var rM=iM,sM=class e extends gE{constructor(t){super(e.type),this.overlayId=t}};sM.type="show-overlay";var oM=sM,aM=class e extends gE{constructor(t){super(e.type),this.panelId=t}};aM.type="show-panel";var lM=aM,cM=class e extends gE{constructor(t,n){super(e.type),this.tooltip=t,this.tooltipData=n}};cM.type="show-tooltip";var hM=cM,uM=class e extends gE{constructor(t){super(e.type),this.size=t}};uM.type="size-updated";var dM=uM,pM=class e extends gE{constructor(){super(e.type)}};pM.type="stop-all";var fM=pM,mM=class e extends gE{constructor(t){super(e.type),this.zoomLevel=t}};mM.type="zoom-updated";var gM=mM,vM=class extends gE{constructor(e,t,n,i,r){super(e),this.originalEvent=t,this.object=n,this.viewerPoint=i,this.userDataKey=r}},_M=class e extends vM{constructor(t,n,i,r){super(e.type,t,n,i,r)}};_M.type="enter-object";var yM=_M,xM=class e extends vM{constructor(t,n,i,r){super(e.type,t,n,i,r)}};xM.type="leave-object";var bM=xM,wM=class e extends vM{constructor(t,n,i,r){super(e.type,t,n,i,r)}};wM.type="hover-object";var SM=wM,EM=class{constructor(e){this.viewer=e}init(){}destroy(){}supportsTransition(e){return!1}supportsPreload(e){return!1}textureCoordsToSphericalCoords(e,t){throw new US("Current adapter does not support texture coordinates.")}sphericalCoordsToTextureCoords(e,t){throw new US("Current adapter does not support texture coordinates.")}};function MM(e){if(e)for(const[,t]of[["_",e],...Object.entries(e)])if(t.prototype instanceof EM)return oE(t.id,t.VERSION,"5.7.4"),t;return null}EM.supportsDownload=!1;var TM=`${Qw}
28_touchSupport`,AM={loaded:!1,pixelRatio:1,isWebGLSupported:!1,maxTextureWidth:0,isTouchEnabled:null,__maxCanvasWidth:null,isIphone:!1,get maxCanvasWidth(){return null===this.__maxCanvasWidth&&(this.__maxCanvasWidth=function(e){let t=e,n=!1;for(;t>1024&&!n;){const e=document.createElement("canvas"),i=e.getContext("2d");e.width=t,e.height=t/2,i.fillStyle="white",i.fillRect(0,0,1,1);try{i.getImageData(0,0,1,1).data[0]>0&&(n=!0)}catch(e){}e.width=0,e.height=0,n||(t/=2)}if(n)return t;throw new US("Unable to detect system capabilities")}(this.maxTextureWidth)),this.__maxCanvasWidth},load(){if(!this.loaded){const e=function(){const e=document.createElement("canvas"),t=["webgl2","webgl","experimental-webgl"];let n=null;if(!e.getContext)return null;return t.some((t=>{try{return n=e.getContext(t),null!==n}catch(e){return!1}}))?n:null}();this.pixelRatio=window.devicePixelRatio||1,this.isWebGLSupported=null!==e,this.maxTextureWidth=e?e.getParameter(e.MAX_TEXTURE_SIZE):0,this.isTouchEnabled=function(){let e="ontouchstart"in window||navigator.maxTouchPoints>0;TM in localStorage&&(e="true"===localStorage[TM]);const t=new Promise((t=>{const n=()=>{window.removeEventListener("mousedown",i),window.removeEventListener("touchstart",r),clearTimeout(o)},i=()=>{n(),localStorage[TM]=!1,t(!1)},r=()=>{n(),localStorage[TM]=!0,t(!0)},s=()=>{n(),localStorage[TM]=e,t(e)};window.addEventListener("mousedown",i,!1),window.addEventListener("touchstart",r,!1);const o=setTimeout(s,1e4)}));return{initial:e,promise:t}}(),this.isIphone=/iPhone/i.test(navigator.userAgent),this.loaded=!0}if(!AM.isWebGLSupported)throw new US("WebGL is not supported.");if(0===AM.maxTextureWidth)throw new US("Unable to detect system capabilities")}};var CM=URL.createObjectURL(new Blob(["(",function(){function e(e){return`rgb(${e.r}, ${e.g}, ${e.b})`}function t(e,t){return{r:Math.round(e.r/2+t.r/2),g:Math.round(e.g/2+t.g/2),b:Math.round(e.b/2+t.b/2)}}function n(t,n,i,r,s){const o=t.createLinearGradient(n,0,i,0);return o.addColorStop(0,e(r)),o.addColorStop(1,e(s)),o}function i(e,t,n,i,r,s){s=Math.round(s);let o=0,a=0,l=0,c=0;const h=e.getImageData(t,n,i,r);for(let e=0;e<r;e+=s)for(let t=0;t<i;t+=s){const n=4*(e*i+t);o+=h.data[n],a+=h.data[n+1],l+=h.data[n+2],c++}return o=Math.round(o/c),a=Math.round(a/c),l=Math.round(l/c),{r:o,g:a,b:l}}self.onmessage=r=>{const s=r.data.panoData,o=new OffscreenCanvas(s.fullWidth,s.fullHeight),a=o.getContext("2d",{willReadFrequently:!0}),l=new OffscreenCanvas(s.croppedWidth,s.croppedHeight);l.getContext("2d").putImageData(r.data.image,0,0),function(r,s,o){const a=o.fullHeight-o.croppedHeight-o.croppedY,l=o.fullWidth-o.croppedWidth-o.croppedX,c=o.croppedY+o.croppedHeight/2,h=r.width/32,u=h,d=10,p=`blur(${h}px)`,f=r.getContext("2d");
28if(f.drawImage(s,o.croppedX,o.croppedY,o.croppedWidth,o.croppedHeight),o.croppedY>0){if(o.croppedX>0||l>0){f.filter="none";const e=i(f,o.croppedX,o.croppedY,d,d,2),s=i(f,r.width-l-11,o.croppedY,d,d,2),a=t(e,s);o.croppedX>0&&(f.fillStyle=n(f,0,o.croppedX,a,e),f.fillRect(-u,-u,o.croppedX+2*u,c+u)),l>0&&(f.fillStyle=n(f,r.width-l,r.width,s,a),f.fillRect(r.width-l-u,-u,l+2*u,c+u))}f.filter=p,f.drawImage(s,0,0,s.width,d,o.croppedX,-u,o.croppedWidth,o.croppedY+2*u),f.fillStyle=e(i(f,0,0,r.width,d,d)),f.fillRect(-u,-u,r.width+2*u,2*u)}if(a>0){if(o.croppedX>0||l>0){f.filter="none";const e=i(f,o.croppedX,r.height-a-1-d,d,d,2),s=i(f,r.width-l-1-d,r.height-a-1-d,d,d,2),h=t(e,s);o.croppedX>0&&(f.fillStyle=n(f,0,o.croppedX,h,e),f.fillRect(-u,c,o.croppedX+2*u,r.height-c+u)),l>0&&(f.fillStyle=n(f,r.width-l,r.width,s,h),f.fillRect(r.width-l-u,c,l+2*u,r.height-c+u))}f.filter=p,f.drawImage(s,0,s.height-d,s.width,d,o.croppedX,r.height-a-u,o.croppedWidth,a+2*u),f.fillStyle=e(i(f,0,r.height-1-d,r.width,d,d)),f.fillRect(-u,r.height-u,r.width+2*u,2*u)}o.croppedX>0&&(f.filter=p,f.drawImage(s,s.width-d,0,d,s.height,-u,o.croppedY,2*u,o.croppedHeight),f.drawImage(s,0,0,d,s.height,0,o.croppedY,o.
28croppedX+u,o.croppedHeight));l>0&&(f.filter=p,f.drawImage(s,0,0,d,s.height,r.width-u,o.croppedY,2*u,o.croppedHeight),f.drawImage(s,s.width-d,0,d,s.height,r.width-l-u,o.croppedY,l+u,o.croppedHeight));f.filter="none",f.drawImage(s,o.croppedX,o.croppedY,o.croppedWidth,o.croppedHeight)}(o,l,s),postMessage(a.getImageData(0,0,o.width,o.height))}}.toString(),")()"],{type:"application/javascript"})),RM=rE({backgroundColor:"#000",interpolateBackground:!1,resolution:64,useXmpData:!0,blur:!1},{resolution:e=>{if(!e||!Eg.isPowerOfTwo(e))throw new US("EquirectangularAdapter resolution must be power of two");return e}}),PM=class extends EM{constructor(e,t){super(e),this.config=RM(t),this.config.interpolateBackground&&(window.Worker?this.interpolationWorker=new Worker(CM,{name:"photo-sphere-viewer-interpolation"}):(zS("Web Worker API not available"),this.config.interpolateBackground=!1)),this.SPHERE_SEGMENTS=this.config.resolution,this.SPHERE_HORIZONTAL_SEGMENTS=this.SPHERE_SEGMENTS/2}supportsTransition(){return!0}supportsPreload(){return!0}destroy(){this.interpolationWorker?.terminate(),super.destroy()}textureCoordsToSphericalCoords(e,t){if(IS(e.textureX)||IS(e.textureY))throw new US("Texture position is missing 'textureX' or 'textureY'");const n=(e.textureX+t.croppedX)/t.fullWidth*Math.PI*2,i=(e.textureY+t.croppedY)/t.fullHeight*Math.PI;return{yaw:n>=Math.PI?n-Math.PI:n+Math.PI,pitch:Math.PI/2-i}}sphericalCoordsToTextureCoords(e,t){const n=e.yaw/Math.PI/2*t.fullWidth,i=e.pitch/Math.PI*t.fullHeight;return{textureX:Math.round(e.yaw<Math.PI?n+t.fullWidth/2:n-t.fullWidth/2)-t.croppedX,textureY:Math.round(t.fullHeight/2-i)-t.croppedY}}async loadTexture(e,t=!0,n,i=this.config.useXmpData){if("string"!=typeof e)return Promise.reject(new US("Invalid panorama url, are you using the right adapter?"));const r=await this.viewer.textureLoader.loadFile(e,t?e=>this.viewer.loader.setProgress(e):null,e),s=i?await this.loadXMP(r):null,o=await this.viewer.textureLoader.blobToImage(r);"function"==typeof n&&(n=n(o,s)),n||s||(n=this.__defaultPanoData(o));const a={isEquirectangular:!0,fullWidth:DS(n?.fullWidth,s?.fullWidth,o.width),fullHeight:DS(n?.fullHeight,s?.fullHeight,o.height),croppedWidth:DS(n?.croppedWidth,s?.croppedWidth,o.width),croppedHeight:DS(n?.croppedHeight,s?.croppedHeight,o.height),croppedX:DS(n?.croppedX,s?.croppedX,0),croppedY:DS(n?.croppedY,s?.croppedY,0),poseHeading:DS(n?.poseHeading,s?.poseHeading,0),posePitch:DS(n?.posePitch,s?.posePitch,0),poseRoll:DS(n?.poseRoll,s?.poseRoll,0)};a.croppedWidth===o.width&&a.croppedHeight===o.height||zS(`Invalid panoData, croppedWidth/croppedHeight is not coherent with the loaded image.\n panoData: ${a.croppedWidth}x${a.croppedHeight}, image: ${o.width}x${o.height}`),Math.abs(a.fullWidth-2*a.fullHeight)>1&&(zS("Invalid panoData, fullWidth should be twice fullHeight"),a.fullWidth=2*a.fullHeight),a.croppedX+a.croppedWidth>a.fullWidth&&(zS("Invalid panoData, croppedX + croppedWidth > fullWidth"),a.croppedX=a.fullWidth-a.croppedWidth),a.croppedY+a.croppedHeight>a.fullHeight&&(zS("Invalid panoData, croppedY + croppedHeight > fullHeight"),a.croppedY=a.fullHeight-a.croppedHeight);return{panorama:e,texture:this.createEquirectangularTexture(o,a),panoData:a,cacheKey:e}}async loadXMP(e){const t=await this.loadBlobAsString(e),n=t.indexOf("<x:xmpmeta"),i=t.indexOf("</x:xmpmeta>"),r=t.substring(n,i);return-1!==n&&-1!==i&&r.includes("GPano:")?{isEquirectangular:!0,fullWidth:GS(r,"FullPanoWidthPixels"),fullHeight:GS(r,"FullPanoHeightPixels"),croppedWidth:GS(r,"CroppedAreaImageWidthPixels"),croppedHeight:GS(r,"CroppedAreaImageHeightPixels"),croppedX:GS(r,"CroppedAreaLeftPixels"),croppedY:GS(r,"CroppedAreaTopPixels"),poseHeading:GS(r,"PoseHeadingDegrees"),posePitch:GS(r,"PosePitchDegrees"),poseRoll:GS(r,"PoseRollDegrees")}:null}loadBlobAsString(e){return new Promise(((t,n)=>{const i=new FileReader;i.onload=()=>t(i.result),i.onerror=n,i.readAsText(e)}))}createEquirectangularTexture(e,t){if(this.config.blur||t.fullWidth>AM.maxTextureWidth||t.croppedWidth!==t.fullWidth||t.croppedHeight!==t.fullHeight){const n=Math.min(1,AM.maxCanvasWidth/t.fullWidth),i={fullWidth:t.fullWidth*n,fullHeight:t.fullHeight*n,croppedWidth:t.croppedWidth*n,croppedHeight:t.croppedHeight*n,croppedX:t.croppedX*n,croppedY:t.croppedY*n},r=document.createElement("canvas");r.width=i.fullWidth,r.height=i.fullHeight;const s=r.getContext("2d");if(this.config.backgroundColor&&(s.fillStyle=this.config.backgroundColor,s.fillRect(0,0,r.width,r.height)),this.config.blur){const t=r.width/2048,o=Math.ceil(2*t);i.croppedWidth===r.width&&(s.drawImage(e,0,0,o/n,e.height,0,i.croppedY,o,i.croppedHeight),s.drawImage(e,e.width-o/n,
280,o/n,e.height,r.width-o,i.croppedY,o,i.croppedHeight)),i.croppedHeight===r.height&&(s.drawImage(e,0,0,1,1,i.croppedX,0,i.croppedWidth,o),s.drawImage(e,0,e.height-1,1,1,i.croppedX,r.height-o,i.croppedWidth,o)),s.filter=`blur(${t}px)`}s.drawImage(e,i.croppedX,i.croppedY,i.croppedWidth,i.croppedHeight);const o=tE(r);return this.config.interpolateBackground&&i.fullWidth<=8096&&(t.croppedWidth!==t.fullWidth||t.croppedHeight!==t.fullHeight)&&(this.interpolationWorker.postMessage({image:s.getImageData(i.croppedX,i.croppedY,i.croppedWidth,i.croppedHeight),panoData:i}),this.interpolationWorker.onmessage=e=>{s.putImageData(e.data,0,0),o.needsUpdate=!0,this.viewer.needsUpdate()}),o}return tE(e)}createMesh(e=1){const t=new hw(Jw*e,this.SPHERE_SEGMENTS,this.SPHERE_HORIZONTAL_SEGMENTS,-Math.PI/2).scale(-1,1,1);return new J_(t,new x_)}setTexture(e,t){e.material.map=t.texture}setTextureOpacity(e,t){e.material.opacity=t,e.material.transparent=t<1}disposeTexture(e){e.texture?.dispose()}__defaultPanoData(e){const t=Math.max(e.width,2*e.height),n=Math.round(t/2),i=Math.round((t-e.width)/2),r=Math.round((n-e.height)/2);return{isEquirectangular:!0,fullWidth:t,fullHeight:n,croppedWidth:e.width,croppedHeight:e.height,croppedX:i,croppedY:r}}};PM.id="equirectangular",PM.VERSION="5.7.4",PM.supportsDownload=!0;var LM=class e{constructor(t,n){this.parent=t,this.children=[],this.container=document.createElement("div"),this.state={visible:!0},this.viewer=t instanceof e?t.viewer:t,this.container.className=n.className||"",this.parent.children.push(this),this.parent.container.appendChild(this.container)}destroy(){this.parent.container.removeChild(this.container);const e=this.parent.children.indexOf(this);-1!==e&&this.parent.children.splice(e,1),this.children.slice().forEach((e=>e.destroy())),this.children.length=0}toggle(e=!this.isVisible()){e?this.show():this.hide()}hide(e){this.container.style.display="none",this.state.visible=!1}show(e){this.container.style.display="",this.state.visible=!0}isVisible(){return this.state.visible}},IM=rE({id:null,className:null,title:null,hoverScale:!1,collapsable:!1,tabbable:!0,icon:null,iconActive:null}),DM=class extends LM{constructor(e,t){super(e,{className:`psv-button ${t.hoverScale?"psv-button--hover-scale":""} ${t.className||""}`}),this.state={visible:!0,enabled:!0,supported:!0,collapsed:!1,active:!1,width:0},this.config=IM(t),this.config.id=this.constructor.id,t.icon&&this.__setIcon(t.icon),this.state.width=this.container.offsetWidth,this.config.title?this.container.title=this.config.title:this.id&&this.id in this.viewer.config.lang&&(this.container.title=this.viewer.config.lang[this.id]),t.tabbable&&(this.container.tabIndex=0),this.container.addEventListener("click",(e=>{this.state.enabled&&this.onClick(),e.stopPropagation()})),this.container.addEventListener("keydown",(e=>{e.key===iS.Enter&&this.state.enabled&&(this.onClick(),e.stopPropagation())}))}get id(){return this.config.id}get title(){return this.container.title}get content(){return this.container.innerHTML}get width(){return this.state.width}get collapsable(){return this.config.collapsable}show(e=!0){this.isVisible()||(this.state.visible=!0,this.state.collapsed||(this.container.style.display=""),e&&this.viewer.navbar.autoSize())}hide(e=!0){this.isVisible()&&(this.state.visible=!1,this.container.style.display="none",e&&this.viewer.navbar.autoSize())}checkSupported(){kS(this.isSupported(),((e,t)=>{this.state&&(this.state.supported=e,t?e||this.hide():this.toggle(e))}))}autoSize(){}isSupported(){return!0}toggleActive(e=!this.state.active){e!==this.state.active&&(this.state.active=e,mS(this.container,"psv-button--active",this.state.active),this.config.iconActive&&this.__setIcon(this.state.active?this.config.iconActive:this.config.icon))}disable(){this.container.classList.add("psv-button--disabled"),this.state.enabled=!1}enable(){this.container.classList.remove("psv-button--disabled"),this.state.enabled=!0}collapse(){this.state.collapsed=!0,this.container.style.display="none"}uncollapse(){this.state.collapsed=!1,this.state.visible&&(this.container.style.display="")}__setIcon(e){this.container.innerHTML=e,gS(this.container.querySelector("svg"),"psv-button-svg")}},NM=class extends DM{constructor(e,t){super(e,{className:`psv-custom-button ${t.className||""}`,hoverScale:!1,collapsable:!1!==t.collapsable,tabbable:!1!==t.tabbable,title:t.title}),this.customOnClick=t.onClick,t.id?this.config.id=t.id:this.config.id="psvButton-"+Math.random().toString(36).substring(2),t.content&&("string"==typeof t.content?this.container.innerHTML=t.content:(this.container.classList.add("psv-custom-button--no-padding"),t.content.style.height="100%",t.content.attachViewer?.(this.viewer),this.container.appendChild(t.content))),this.state.width=this.container.offsetWidth,t.disabled&&this.disable(),!1===t.visible&&this.hide()}onClick(){this.customOnClick?.(this.viewer)}},OM=class extends DM{constructor(e){super(e,{className:"psv-description-button",hoverScale:!0,collapsable:!1,tabbable:!0,icon:rS.info}),this.mode=0,this.viewer.addEventListener(IE.type,this),this.viewer.addEventListener(rM.type,this),this.viewer.addEventListener(UE.type,this),this.viewer.addEventListener(lM.t
28ype,this),this.viewer.addEventListener(TE.type,this)}destroy(){this.viewer.removeEventListener(IE.type,this),this.viewer.removeEventListener(rM.type,this),this.viewer.removeEventListener(UE.type,this),this.viewer.removeEventListener(lM.type,this),this.viewer.removeEventListener(TE.type,this),super.destroy()}handleEvent(e){if(e instanceof TE)return void(e.containsOptions("description")&&this.autoSize(!0));if(!this.mode)return;let t=!1;e instanceof IE?t=1===this.mode:e instanceof rM?t=1===this.mode&&e.notificationId!==nS.DESCRIPTION:e instanceof UE?t=2===this.mode:e instanceof lM&&(t=2===this.mode&&e.panelId!==nS.DESCRIPTION),t&&(this.toggleActive(!1),this.mode=0)}onClick(){this.mode?this.__close():this.__open()}hide(e){super.hide(e),this.mode&&this.__close()}autoSize(e=!1){if(e){const e=this.viewer.navbar.getButton("caption",!1),t=e&&!e.isVisible(),n=!!this.viewer.config.description;t||n?this.show(!1):this.hide(!1)}}__close(){switch(this.mode){case 1:this.viewer.notification.hide(nS.DESCRIPTION);break;case 2:this.viewer.panel.hide(nS.DESCRIPTION)}}__open(){this.toggleActive(!0),this.viewer.config.description?(this.mode=2,this.viewer.panel.show({id:nS.DESCRIPTION,content:(this.viewer.config.caption?`<p>${this.viewer.config.caption}</p>`:"")+this.viewer.config.description})):(this.mode=1,this.viewer.notification.show({id:nS.DESCRIPTION,content:this.viewer.config.caption}))}};OM.id="description";var UM=class extends DM{constructor(e){super(e,{className:"psv-download-button",hoverScale:!0,collapsable:!0,tabbable:!0,icon:rS.download}),this.viewer.addEventListener(TE.type,this)}destroy(){this.viewer.removeEventListener(TE.type,this),super.destroy()}handleEvent(e){e instanceof TE&&e.containsOptions("downloadUrl")&&this.checkSupported()}onClick(){const e=document.createElement("a");e.href=this.viewer.config.downloadUrl||this.viewer.config.panorama,e.href.startsWith("data:")&&!this.viewer.config.downloadName?e.download="panorama."+e.href.substring(0,e.href.indexOf(";")).split("/").pop():e.download=this.viewer.config.downloadName||e.href.split("/").pop(),e.target="_blank",this.viewer.container.appendChild(e),e.click(),setTimeout((()=>{this.viewer.container.removeChild(e)}),100)}
vendor: 1,556 bytes, line 28
28checkSupported(){this.viewer.adapter.constructor.supportsDownload||this.viewer.config.downloadUrl?this.show():this.hide()}};UM.id="download";var kM=class extends DM{constructor(e){super(e,{className:"psv-fullscreen-button",hoverScale:!0,collapsable:!1,tabbable:!0,icon:rS.fullscreenIn,iconActive:rS.fullscreenOut}),this.viewer.addEventListener(PE.type,this)}destroy(){this.viewer.removeEventListener(PE.type,this),super.destroy()}handleEvent(e){e instanceof PE&&this.toggleActive(e.fullscreenEnabled)}onClick(){this.viewer.toggleFullscreen()}};kM.id="fullscreen";var FM=class extends DM{constructor(e){super(e,{className:"psv-menu-button",hoverScale:!0,collapsable:!1,tabbable:!0,icon:rS.menu}),this.viewer.addEventListener(lM.type,this),this.viewer.addEventListener(UE.type,this),super.hide()}destroy(){this.viewer.removeEventListener(lM.type,this),this.viewer.removeEventListener(UE.type,this),super.destroy()}handleEvent(e){e instanceof lM?this.toggleActive(e.panelId===nS.MENU):e instanceof UE&&this.toggleActive(!1)}onClick(){this.state.active?this.__hideMenu():this.__showMenu()}hide(e){super.hide(e),this.__hideMenu()}show(e){super.show(e),this.state.active&&this.__showMenu()}__showMenu(){var e,t;this.viewer.panel.show({id:nS.MENU,content:(e=this.viewer.navbar.collapsed,t=this.viewer.config.lang.menu,`\n<div class="psv-panel-menu psv-panel-menu--stripped">\n <h1 class="psv-panel-menu-title">${rS.menu} ${t}</h1>\n <ul class="psv-panel-menu-list">\n ${e.map((e=>`\n <li data-psv-button="${e.id}" class="psv-panel-menu-item" tabindex="0">
28\n <span class="psv-panel-menu-item-icon">${e.content}</span>\n <span class="psv-panel-menu-item-label">${e.title}</span>\n </li>\n `)).join("")}\n </ul>\n</div>\n`),noMargin:!0,clickHandler:e=>{const t=e?yS(e,"li"):void 0,n=t?t.dataset.psvButton:void 0;n&&(this.viewer.navbar.getButton(n).onClick(),this.__hideMenu())}})}__hideMenu(){this.viewer.panel.hide(nS.MENU)}};function VM(e){let t=0;switch(e){case 0:t=90;break;case 1:t=-90;break;case 3:t=180;break;default:t=0}return rS.arrow.replace("rotate(0",`rotate(${t}`)}FM.id="menu";var BM=class extends DM{constructor(e,t){super(e,{className:"psv-move-button",hoverScale:!0,collapsable:!1,tabbable:!0,icon:VM(t)}),this.direction=t,this.handler=new hE,this.container.addEventListener("mousedown",this),this.container.addEventListener("keydown",this),this.container.addEventListener("keyup",this),this.viewer.container.addEventListener("mouseup",this),this.viewer.container.addEventListener("touchend",this)}destroy(){this.__onMouseUp(),this.viewer.container.removeEventListener("mouseup",this),this.viewer.container.removeEventListener("touchend",this),super.destroy()}handleEvent(e){switch(e.type){case"mousedown":this.__onMouseDown();break;case"mouseup":case"touchend":this.__onMouseUp();break;case"keydown":e.key===iS.Enter&&this.__onMouseDown();break;case"keyup":e.key===iS.Enter&&this.__onMouseUp()}}onClick(){}isSupported(){return FS(AM.isTouchEnabled)}__onMouseDown(){if(!this.state.enabled)return;const e={};switch(this.direction){case 0:e.pitch=!1;break;case 1:e.pitch=!0;break;case 3:e.yaw=!1;break;default:e.yaw=!0}this.viewer.stopAll(),this.viewer.dynamics.position.roll(e),this.handler.down()}__onMouseUp(){this.state.enabled&&this.handler.up((()=>{this.viewer.dynamics.position.stop(),this.viewer.resetIdleTimer()}))}};BM.groupId="move";var zM=class extends BM{constructor(e){super(e,1)}};zM.id="moveDown";var HM=class extends BM{constructor(e){super(e,2)}};HM.id="moveLeft";var GM=class extends BM{constructor(e){super(e,3)}};GM.id="moveRight";var WM=class extends BM{constructor(e){super(e,0)}};WM.id="moveUp";var jM=class extends DM{constructor(e,t,n){super(e,{className:"psv-zoom-button",hoverScale:!0,collapsable:!1,tabbable:!0,icon:t}),this.direction=n,this.handler=new hE,this.container.addEventListener("mousedown",this),this.container.addEventListener("keydown",this),this.container.addEventListener("keyup",this),this.viewer.container.addEventListener("mouseup",this),this.viewer.container.addEventListener("touchend",this)}destroy(){this.__onMouseUp(),this.viewer.container.removeEventListener("mouseup",this),this.viewer.container.removeEventListener("touchend",this),super.destroy()}handleEvent(e){switch(e.type){case"mousedown":this.__onMouseDown();break;case"mouseup":case"touchend":this.__onMouseUp();break;case"keydown":e.key===iS.Enter&&this.__onMouseDown();break;case"keyup":e.key===iS.Enter&&this.__onMouseUp()}}onClick(){}isSupported(){return FS(AM.isTouchEnabled)}__onMouseDown(){this.state.enabled&&(this.viewer.dynamics.zoom.roll(1===this.direction),this.handler.down())}__onMouseUp(){this.state.enabled&&this.handler.up((()=>this.viewer.dynamics.zoom.stop()))}};jM.groupId="zoom";var qM=class extends jM{constructor(e){super(e,rS.zoomIn,0)}};qM.id="zoomIn";var XM=class extends jM{constructor(e){super(e,rS.zoomOut,1)}};XM.id="zoomOut";var $M=class extends DM{constructor(e){super(e,{className:"psv-zoom-range",hoverScale:!1,collapsable:!1,tabbable:!1}),this.zoomRange=document.createElement("div"),this.zoomRange.className="psv-zoom-range-line",this.container.appendChild(this.zoomRange),this.zoomValue=document.createElement("div"),this.zoomValue.className="psv-zoom-range-handle",this.zoomRange.appendChild(this.zoomValue),this.slider=new dE(this.container,"HORIZONTAL",(e=>this.__onSliderUpdate(e))),this.mediaMinWidth=parseInt(bS(this.container,"max-width"),10),this.viewer.addEventListener(gM.type,this),this.viewer.state.ready?this.__moveZoomValue(this.viewer.getZoomLevel()):this.viewer.addEventListener(eM.type,this)}destroy(){this.slider.destroy(),this.viewer.removeEventListener(gM.type,this),this.viewer.removeEventListener(eM.type,this),super.destroy()}handleEvent(e){e instanceof gM?this.__moveZoomValue(e.zoomLevel):e instanceof eM&&this.__moveZoomValue(this.viewer.getZoomLevel())}onClick(){}isSupported(){return FS(AM.isTouchEnabled)}autoSize(){this.state.supported&&(this.viewer.state.size.width<=this.mediaMinWidth&&this.state.visible?this.hide(!1):this.viewer.state.size.width>this.mediaMinWidth&&!this.state.visible&&this.show(!1))}__moveZoomValue(e){this.zoomValue.style.left=e/100*this.zoomRange.offsetWidth-this.zoomValue.offsetWidth/2+"px"}
28__onSliderUpdate(e){e.mousedown&&this.viewer.zoom(100*e.value)}};$M.id="zoomRange",$M.groupId="zoom";var YM=class extends mE{constructor(e){super(),this.viewer=e}init(){}destroy(){}},ZM=class extends YM{constructor(e,t){super(e),this.config=this.constructor.configParser(t)}setOption(e,t){this.setOptions({[e]:t})}setOptions(e){const t={...this.config,...e},n=this.constructor,i=n.configParser,r=n.readonlyOptions,s=n.id;for(let[n,o]of Object.entries(e))n in i.defaults?r.includes(n)?zS(`${s}: Option "${n}" cannot be updated`):(n in i.parsers&&(o=i.parsers[n](o,{rawConfig:t,defValue:i.defaults[n]})),this.config[n]=o):zS(`${s}: Unknown option "${n}"`)}};function KM(e){if(e)for(const[,t]of[["_",e],...Object.entries(e)])if(t.prototype instanceof YM)return oE(t.id,t.VERSION,"5.7.4"),t;return null}ZM.readonlyOptions=[];var JM={panorama:null,container:null,adapter:[PM,null],plugins:[],caption:null,description:null,downloadUrl:null,downloadName:null,loadingImg:null,loadingTxt:"",size:null,fisheye:0,minFov:30,maxFov:90,defaultZoomLvl:50,defaultYaw:0,defaultPitch:0,sphereCorrection:null,moveSpeed:1,zoomSpeed:1,moveInertia:!0,mousewheel:!0,mousemove:!0,mousewheelCtrlKey:!1,touchmoveTwoFingers:!1,panoData:null,requestHeaders:null,rendererParameters:{alpha:!0,antialias:!0},withCredentials:!1,navbar:["zoom","move","download","description","caption","fullscreen"],lang:{zoom:"Zoom",zoomOut:"Zoom out",zoomIn:"Zoom in",moveUp:"Move up",moveDown:"Move down",moveLeft:"Move left",moveRight:"Move right",description:"Description",download:"Download",fullscreen:"Fullscreen",loading:"Loading...",menu:"Menu",close:"Close",twoFingers:"Use two fingers to navigate",ctrlZoom:"Use ctrl + scroll to zoom the image",loadError:"The panorama cannot be loaded",webglError:"Your browser does not seem to support WebGL"},keyboard:"fullscreen",keyboardActions:{[iS.ArrowUp]:"ROTATE_UP",[iS.ArrowDown]:"ROTATE_DOWN",[iS.ArrowRight]:"ROTATE_RIGHT",[iS.ArrowLeft]:"ROTATE_LEFT",[iS.PageUp]:"ZOOM_IN",[iS.PageDown]:"ZOOM_OUT",[iS.Plus]:"ZOOM_IN",[iS.Minus]:"ZOOM_OUT"}},QM={panorama:"Use setPanorama method to change the panorama",panoData:"Use setPanorama method to change the panorama",container:"Cannot change viewer container",adapter:"Cannot change adapter",plugins:"Cannot change plugins"},eT={container:e=>{if(!e)throw new US("No value given for container.");return e},adapter:(e,{defValue:t})=>{if(!(e=e?Array.isArray(e)?[MM(e[0]),e[1]]:[MM(e),null]:t)[0])throw new US("An undefined value was given for adapter.");if(!e[0].id)throw new US("Adapter has no id.");return e},defaultYaw:e=>eE(e),defaultPitch:e=>eE(e,!0),defaultZoomLvl:e=>Eg.clamp(e,0,100),minFov:(e,{rawConfig:t})=>(t.maxFov<e&&(zS("maxFov cannot be lower than minFov"),e=t.maxFov),Eg.clamp(e,1,179)),maxFov:(e,{rawConfig:t})=>(e<t.minFov&&(e=t.minFov),Eg.clamp(e,1,179)),lang:e=>({...JM.lang,...e}),keyboard:e=>!!e&&("object"==typeof e?(zS("Use keyboardActions to configure the keyboard actions, keyboard option must be either true, false, 'fullscreen' or 'always'"),"fullscreen"):"always"===e?"always":"fullscreen"),keyboardActions:(e,{rawConfig:t})=>t.keyboard&&"object"==typeof t.keyboard?t.keyboard:e,fisheye:e=>!0===e?1:!1===e?0:e,requestHeaders:e=>e&&"object"==typeof e?()=>e:"function"==typeof e?e:null,rendererParameters:(e,{defValue:t})=>({...e,...t}),plugins:e=>e.map(((e,t)=>{if(!(e=Array.isArray(e)?[KM(e[0]),e[1]]:[KM(e),null])[0])throw new US(`An undefined value was given for plugin ${t}.`);if(!e[0].id)throw new US(`Plugin ${t} has no id.`);return e})),navbar:e=>!1===e?null:!0===e?PS(JM.navbar):"string"==typeof e?e.split(/[ ,]/):e},tT=rE(JM,eT),nT=class extends DM{constructor(e){super(e,{className:"psv-caption",hoverScale:!1,collapsable:!1,tabbable:!0}),this.contentWidth=0,this.state.width=0,this.contentElt=document.createElement("div"),this.contentElt.className="psv-caption-content",this.container.appendChild(this.contentElt),this.setCaption(this.viewer.config.caption)}hide(){this.contentElt.style.display="none",this.state.visible=!1}show(){this.contentElt.style.display="",this.state.visible=!0}onClick(){}setCaption(e){this.show(),this.contentElt.innerHTML=e??"",this.contentElt.innerHTML?this.contentWidth=this.contentElt.offsetWidth:this.contentWidth=0,this.autoSize()}autoSize(){this.toggle(this.container.offsetWidth>=this.contentWidth),this.__refreshButton()}__refreshButton(){this.viewer.navbar.getButton(OM.id,!1)?.autoSize(!0)}};nT.id="caption";var iT={},rT={};
28function sT(e,t){if(!e.id)throw new US("Button id is required");if(iT[e.id]=e,e.groupId&&(rT[e.groupId]=rT[e.groupId]||[]).push(e),t){const n=JM.navbar;switch(t){case"start":n.unshift(e.id);break;case"end":n.push(e.id);break;default:{const[i,r]=t.split(":"),s=n.indexOf(i);if(!i||!r||-1===s)throw new US(`Invalid defaultPosition ${t}`);n.splice(s+("right"===r?1:0),0,e.id)}}}}[XM,$M,qM,OM,nT,UM,kM,HM,GM,WM,zM].forEach((e=>sT(e)));var oT=class extends LM{constructor(e){super(e,{className:`psv-navbar ${eS}`}),this.collapsed=[],this.state.visible=!1}show(){this.viewer.container.classList.add("psv--has-navbar"),this.container.classList.add("psv-navbar--open"),this.state.visible=!0}hide(){this.viewer.container.classList.remove("psv--has-navbar"),this.container.classList.remove("psv-navbar--open"),this.state.visible=!1}setButtons(e){this.children.slice().forEach((e=>e.destroy())),this.children.length=0,-1!==e.indexOf(nT.id)&&-1===e.indexOf(OM.id)&&e.splice(e.indexOf(nT.id),0,OM.id),e.forEach((e=>{"object"==typeof e?new NM(this,e):iT[e]?new iT[e](this):rT[e]?rT[e].forEach((e=>{new e(this)})):zS(`Unknown button ${e}`)})),new FM(this),this.children.forEach((e=>{e instanceof DM&&e.checkSupported()})),this.autoSize()}setCaption(e){this.children.some((t=>t instanceof nT&&(t.setCaption(e),!0)))}getButton(e,t=!0){const n=this.children.find((t=>t instanceof DM&&t.id===e));return!n&&t&&zS(`button "${e}" not found in the navbar`),n}autoSize(){this.children.forEach((e=>{e instanceof DM&&e.autoSize()}));const e=this.container.offsetWidth;let t=0;const n=[];this.children.forEach((e=>{e.isVisible()&&e instanceof DM&&(t+=e.width,e.collapsable&&n.push(e))})),0!==t&&(e<t&&n.length>0?(n.forEach((e=>e.collapse())),this.collapsed=n,this.getButton(FM.id).show(!1)):e>=t&&this.collapsed.length>0&&(this.collapsed.forEach((e=>e.uncollapse())),this.collapsed=[],this.getButton(FM.id).hide(!1)),this.getButton(nT.id,!1)?.autoSize())}};Mw.enabled=!1;var aT={enabled:!0,maxItems:10,ttl:600,items:{},purgeInterval:null,init(){Mw.enabled&&(zS("ThreeJS cache should be disabled"),Mw.enabled=!1),!this.purgeInterval&&this.enabled&&(this.purgeInterval=setInterval((()=>this.purge()),6e4))},add(e,t,n){this.enabled&&t&&(this.items[t]=this.items[t]??{files:{},lastAccess:null},this.items[t].files[e]=n,this.items[t].lastAccess=Date.now())},get(e,t){if(this.enabled&&t&&this.items[t])return this.items[t].lastAccess=Date.now(),this.items[t].files[e]},remove(e,t){this.enabled&&t&&this.items[t]&&(delete this.items[t].files[e],0===Object.keys(this.items[t].files).length&&delete this.items[t])},purge(){Object.entries(this.items).sort((([,e],[,t])=>t.lastAccess-e.lastAccess)).forEach((([e,{lastAccess:t}],n)=>{n>0&&(Date.now()-t>=1e3*this.ttl||n>=this.maxItems)&&delete this.items[e]}))}},lT=class extends LM{constructor(e){super(e,{className:"psv-loader-container"}),this.loader=document.createElement("div"),this.loader.className="psv-loader",this.container.appendChild(this.loader),this.size=this.loader.offsetWidth,this.canvas=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.canvas.setAttribute("class","psv-loader-canvas"),this.canvas.setAttribute("viewBox",`0 0 ${this.size} ${this.size}`),this.loader.appendChild(this.canvas),this.textColor=bS(this.loader,"color"),this.color=bS(this.canvas,"color"),this.border=parseInt(bS(this.loader,"--psv-loader-border"),10),this.thickness=parseInt(bS(this.loader,"--psv-loader-tickness"),10),this.viewer.addEventListener(TE.type,this),this.__updateContent(),this.hide()}destroy(){this.viewer.removeEventListener(TE.type,this),super.destroy()}handleEvent(e){e instanceof TE&&e.containsOptions("loadingImg","loadingTxt")&&this.__updateContent()}setProgress(e){const t=Math.min(e,99.999)/100*Math.PI*2,n=this.size/2,i=n,r=this.thickness/2+this.border,s=(this.size-this.thickness)/2-this.border,o=Math.sin(t)*s+n,a=-Math.cos(t)*s+n,l=e>50?"1":"0";this.canvas.innerHTML=`\n <circle cx="${n}" cy="${n}" r="${n}" fill="${this.color}"/>\n <path d="M ${i} ${r} A ${s} ${s} 0 ${l} 1 ${o} ${a}" \n fill="none" stroke="${this.textColor}" stroke-width="${this.thickness}" stroke-linecap="round"/>\n `,this.viewer.dispatchEvent(new HE(Math.round(e)))}__updateContent(){const e=this.loader.querySelector(".psv-loader-image, .psv-loader-text");let t;if(e&&this.loader.removeChild(e),this.viewer.config.loadingImg?(t=document.createElement("img"),t.className="psv-loader-image",t.src=this.viewer.config.loadingImg):null!==this.viewer.config.loadingTxt&&(t=document.createElement("div"),t.className="psv-loader-text",t.innerHTML=this.viewer.config.loadingTxt||this.viewer.config.lang.loading),t){const e=Math.round(Math.sqrt(2*Math.pow(this.size/2-this.thickness/2-this.border,2)));t.style.maxWidth=e+"px",t.style.maxHeight=e+"px",this.loader.appendChild(t)}}},cT=class extends LM{constructor(e){super(e,{className:"psv-notification"}
28),this.state={visible:!1,contentId:null,timeout:null},this.content=document.createElement("div"),this.content.className="psv-notification-content",this.container.appendChild(this.content),this.content.addEventListener("click",(()=>this.hide()))}isVisible(e){return this.state.visible&&(!e||!this.state.contentId||this.state.contentId===e)}toggle(){throw new US("Notification cannot be toggled")}show(e){this.state.timeout&&(clearTimeout(this.state.timeout),this.state.timeout=null),"string"==typeof e&&(e={content:e}),this.state.contentId=e.id||null,this.content.innerHTML=e.content,this.container.classList.add("psv-notification--visible"),this.state.visible=!0,this.viewer.dispatchEvent(new rM(e.id)),e.timeout&&(this.state.timeout=setTimeout((()=>this.hide(this.state.contentId)),e.timeout))}hide(e){if(this.isVisible(e)){const e=this.state.contentId;this.container.classList.remove("psv-notification--visible"),this.state.visible=!1,this.state.contentId=null,this.viewer.dispatchEvent(new IE(e))}}},hT=class extends LM{constructor(e){super(e,{className:`psv-overlay ${eS}`}),this.state={visible:!1,contentId:null,dissmisable:!0},this.image=document.createElement("div"),this.image.className="psv-overlay-image",this.container.appendChild(this.image),this.title=document.createElement("div"),this.title.className="psv-overlay-title",this.container.appendChild(this.title),this.text=document.createElement("div"),this.text.className="psv-overlay-text",this.container.appendChild(this.text),this.container.addEventListener("click",this),this.viewer.addEventListener(BE.type,this),super.hide()}destroy(){this.viewer.removeEventListener(BE.type,this),super.destroy()}handleEvent(e){"click"===e.type?this.isVisible()&&this.state.dissmisable&&(this.hide(),e.stopPropagation()):e instanceof BE&&this.isVisible()&&this.state.dissmisable&&e.key===iS.Escape&&(this.hide(),e.preventDefault())}isVisible(e){return this.state.visible&&(!e||!this.state.contentId||this.state.contentId===e)}toggle(){throw new US("Overlay cannot be toggled")}show(e){"string"==typeof e&&(e={title:e}),this.state.contentId=e.id||null,this.state.dissmisable=!1!==e.dissmisable,this.image.innerHTML=e.image||"",this.title.innerHTML=e.title||"",this.text.innerHTML=e.text||"",super.show(),this.viewer.dispatchEvent(new oM(e.id))}hide(e){if(this.isVisible(e)){const e=this.state.contentId;super.hide(),this.state.contentId=null,this.viewer.dispatchEvent(new NE(e))}}},uT="psv-panel-content--no-interaction",dT=class extends LM{constructor(e){super(e,{className:`psv-panel ${eS}`}),this.state={visible:!1,contentId:null,mouseX:0,mouseY:0,mousedown:!1,clickHandler:null,keyHandler:null,width:{}};const t=document.createElement("div");t.className="psv-panel-resizer",this.container.appendChild(t);const n=document.createElement("div");n.className="psv-panel-close-button",n.innerHTML=rS.close,n.title=e.config.lang.close,this.container.appendChild(n),this.content=document.createElement("div"),this.content.className="psv-panel-content",this.container.appendChild(this.content),this.container.addEventListener("wheel",(e=>e.stopPropagation())),n.addEventListener("click",(()=>this.hide())),t.addEventListener("mousedown",this),t.addEventListener("touchstart",this),this.viewer.container.addEventListener("mouseup",this),this.viewer.container.addEventListener("touchend",this),this.viewer.container.addEventListener("mousemove",this),this.viewer.container.addEventListener("touchmove",this),this.viewer.addEventListener(BE.type,this)}destroy(){this.viewer.removeEventListener(BE.type,this),this.viewer.container.removeEventListener("mousemove",this),this.viewer.container.removeEventListener("touchmove",this),this.viewer.container.removeEventListener("mouseup",this),this.viewer.container.removeEventListener("touchend",this),super.destroy()}handleEvent(e){switch(e.type){case"mousedown":this.__onMouseDown(e);break;case"touchstart":this.__onTouchStart(e);break;case"mousemove":this.__onMouseMove(e);break;case"touchmove":this.__onTouchMove(e);break;case"mouseup":this.__onMouseUp(e);break;case"touchend":this.__onTouchEnd(e);break;case BE.type:this.__onKeyPress(e)}}isVisible(e){return this.state.visible&&(!e||!this.state.contentId||this.state.contentId===e)}toggle(){throw new US("Panel cannot be toggled")}show(e){"string"==typeof e&&(e={content:e});const t=this.isVisible(e.id);this.state.contentId=e.id||null,this.state.visible=!0,this.state.clickHandler&&(this.content.removeEventListener("click",this.state.clickHandler),this.content.removeEventListener("keydown",this.state.keyHandler),this.state.clickHandler=null,this.state.keyHandler=null),e.id&&this.state.width[e.id]?this.container.style.width=this.state.width[e.id]:e.width?this.container.style.width=e.width:this.container.style.width=null,this.content.innerHTML=e.content,this.content.scrollTop=0,this.container.classList.add("psv-panel--open"),mS(this.content,"psv-panel-content--no-margin",!0===e.noMargin),e.clickHandler&&(this.state.clickHandler=t=>{e.clickHandler(t.target)},this.state.keyHandler=t=>{t.key===iS.Enter&&e.clickHandler(t.target)},this.content.addEventListener("click",this.state.clickHandler),this.content.addEventListener("keydown",this.state.keyHandler),t||setTimeout((()=>{this.content.querySelector("a,button,[tabindex]")?.focus()}),300)),this.viewer.dispatchEvent(new lM(e.id))}hide(e){if(this.isVisible(e)){const e=this.state.contentId;this.state.visible=!1,this.state.contentId=null,this.content.innerHTML=null,this.container.classList.remove("psv-panel--open"),this.state.clickHandler&&(this.content.removeEventListener("click",this.state.clickHandler),this.state.clickHandler=null),this.viewer.dispatchEvent(new
vendor: 5,284 bytes, line 28
28UE(e))}}__onMouseDown(e){e.stopPropagation(),this.__startResize(e.clientX,e.clientY)}__onTouchStart(e){if(e.stopPropagation(),1===e.touches.length){const t=e.touches[0];this.__startResize(t.clientX,t.clientY)}}__onMouseUp(e){this.state.mousedown&&(e.stopPropagation(),this.state.mousedown=!1,this.content.classList.remove(uT))}__onTouchEnd(e){this.state.mousedown&&(e.stopPropagation(),0===e.touches.length&&(this.state.mousedown=!1,this.content.classList.remove(uT)))}__onMouseMove(e){this.state.mousedown&&(e.stopPropagation(),this.__resize(e.clientX,e.clientY))}__onTouchMove(e){if(this.state.mousedown){const t=e.touches[0];this.__resize(t.clientX,t.clientY)}}__onKeyPress(e){this.isVisible()&&e.key===iS.Escape&&(this.hide(),e.preventDefault())}__startResize(e,t){this.state.mouseX=e,this.state.mouseY=t,this.state.mousedown=!0,this.content.classList.add(uT)}__resize(e,t){const n=e,i=t,r=Math.max(200,this.container.offsetWidth-(n-this.state.mouseX))+"px";this.state.contentId&&(this.state.width[this.state.contentId]=r),this.container.style.width=r,this.state.mouseX=n,this.state.mouseY=i}},pT=class extends LM{constructor(e,t){super(e,{className:"psv-tooltip"}),this.state={visible:!0,arrow:0,border:0,state:0,width:0,height:0,pos:"",config:null,data:null},this.content=document.createElement("div"),this.content.className="psv-tooltip-content",this.container.appendChild(this.content),this.arrow=document.createElement("div"),this.arrow.className="psv-tooltip-arrow",this.container.appendChild(this.arrow),this.container.addEventListener("transitionend",this),this.container.addEventListener("touchdown",(e=>e.stopPropagation())),this.container.addEventListener("mousedown",(e=>e.stopPropagation())),this.container.style.top="-1000px",this.container.style.left="-1000px",this.show(t)}handleEvent(e){"transitionend"===e.type&&this.__onTransitionEnd(e)}destroy(){delete this.state.data,super.destroy()}toggle(){throw new US("Tooltip cannot be toggled")}show(e){if(0!==this.state.state)throw new US("Initialized tooltip cannot be re-initialized");e.className&&gS(this.container,e.className),e.style&&Object.assign(this.container.style,e.style),this.state.state=3,this.update(e.content,e),this.state.data=e.data,this.state.state=1,this.viewer.dispatchEvent(new hM(this,this.state.data)),this.__waitImages()}update(e,t){this.content.innerHTML=e;const n=this.container.getBoundingClientRect();this.state.width=n.right-n.left,this.state.height=n.bottom-n.top,this.state.arrow=parseInt(bS(this.arrow,"border-top-width"),10),this.state.border=parseInt(bS(this.container,"border-top-left-radius"),10),this.move(t??this.state.config),this.__waitImages()}move(e){if(1!==this.state.state&&3!==this.state.state)throw new US("Uninitialized tooltip cannot be moved");e.box=e.box??this.state.config?.box??{width:0,height:0},this.state.config=e;const t=this.container,n=this.arrow,i={posClass:ZS(e.position,{allowCenter:!1,cssOrder:!1})||["top","center"],width:this.state.width,height:this.state.height,top:0,left:0,arrowTop:0,arrowLeft:0};this.__computeTooltipPosition(i,e);let r=null,s=null;if(i.top<0?r="bottom":i.top+i.height>this.viewer.state.size.height&&(r="top"),i.left<0?s="right":i.left+i.width>this.viewer.state.size.width&&(s="left"),s||r){const t=KS(i.posClass);r&&(i.posClass[t?0:1]=r),s&&(i.posClass[t?1:0]=s),this.__computeTooltipPosition(i,e)}t.style.top=i.top+"px",t.style.left=i.left+"px",n.style.top=i.arrowTop+"px",n.style.left=i.arrowLeft+"px";const o=i.posClass.join("-");o!==this.state.pos&&(t.classList.remove(`psv-tooltip--${this.state.pos}`),this.state.pos=o,t.classList.add(`psv-tooltip--${this.state.pos}`))}hide(){this.container.classList.remove("psv-tooltip--visible"),this.state.state=2,this.viewer.dispatchEvent(new FE(this.state.data))}__onTransitionEnd(e){if("transform"===e.propertyName)switch(this.state.state){case 1:this.container.classList.add("psv-tooltip--visible"),this.state.state=3;break;case 2:this.state.state=0,this.destroy()}}__computeTooltipPosition(e,t){const n=this.state.arrow,i=t.top,r=e.height,s=t.left,o=e.width,a=n+this.state.border,l=t.box.width/2+2*n,c=t.box.height/2+2*n;switch(e.posClass.join("-")){case"top-left":e.top=i-c-r,e.left=s+a-o,e.arrowTop=r,e.arrowLeft=o-a-n;break;case"top-center":e.top=i-c-r,e.left=s-o/2,e.arrowTop=r,e.arrowLeft=o/2-n;break;case"top-right":e.top=i-c-r,e.left=s-a,e.arrowTop=r,e.arrowLeft=n;break;case"bottom-left":e.top=i+c,e.left=s+a-o,e.arrowTop=2*-n,e.arrowLeft=o-a-n;break;case"bottom-center":e.top=i+c,e.left=s-o/2,e.arrowTop=2*-n,e.arrowLeft=o/2-n;break;case"bottom-right":e.top=i+c,e.left=s-a,e.arrowTop=2*-n,e.arrowLeft=n;break;case"left-top":e.top=i+a-r,e.left=s-l-o,e.arrowTop=r-a-n,e.arrowLeft=o;break;case"center-left":e.top=i-r/2,e.left=s-l-o,e.arrowTop=r/2-n,e.arrowLeft=o;break;case"left-bottom":e.top=i-a,e.left=s-l-o,e.arrowTop=n,e.arrowLeft=o;break;case"right-top":e.top=i+a-r,e.left=s+l,e.arrowTop=r-a-n,e.arrowLeft=2*-n;break;case"center-right":e.top=i-r/2,e.left=s+l,e.arrowTop=r/2-n,e.arrowLeft=2*-n;break;case"right-bottom":e.top=i-a,e.left=s+l,e.arrowTop=n,e.arrowLeft=2*-n}}__waitImages(){const e=this.content.querySelectorAll("img");if(e.length>0){const t=[];e.forEach((e=>{e.complete||t.push(new Promise((t=>{e.onload=t,e.onerror=t})))})),t.length&&Promise.all(t).then((()=>
28{if(1===this.state.state||3===this.state.state){const e=this.container.getBoundingClientRect();this.state.width=e.right-e.left,this.state.height=e.bottom-e.top,this.move(this.state.config)}}))}}},fT=class{constructor(e){this.viewer=e,this.config=e.config,this.state=e.state}destroy(){}},mT=new Qg,gT=new Vv(0,0,0,"ZXY"),vT=class extends fT{constructor(e){super(e)}fovToZoomLevel(e){const t=Math.round((e-this.config.minFov)/(this.config.maxFov-this.config.minFov)*100);return t-2*(t-50)}zoomLevelToFov(e){return this.config.maxFov+e/100*(this.config.minFov-this.config.maxFov)}vFovToHFov(e){return Eg.radToDeg(2*Math.atan(Math.tan(Eg.degToRad(e)/2)*this.state.aspect))}getAnimationProperties(e,t,n){const i=!IS(t),r=!IS(n),s={};let o=null;if(i){const n=this.viewer.getPosition(),i=uS(n.yaw,t.yaw);s.yaw={start:n.yaw,end:n.yaw+i},s.pitch={start:n.pitch,end:t.pitch},o=QS(e,dS(n,t))}if(r){const t=this.viewer.getZoomLevel(),i=Math.abs(n-t);s.zoom={start:t,end:n},null===o&&(o=QS(e,Math.PI/4*i/100))}return o=null===o?"number"==typeof e?e:jw:Math.max(jw,o),{duration:o,properties:s}}textureCoordsToSphericalCoords(e){if(!this.state.textureData?.panoData)throw new US("Current adapter does not support texture coordinates or no texture has been loaded");const t=this.viewer.adapter.textureCoordsToSphericalCoords(e,this.state.textureData.panoData);return gT.equals(this.viewer.renderer.panoramaPose)&&gT.equals(this.viewer.renderer.sphereCorrection)?t:(this.sphericalCoordsToVector3(t,mT),mT.applyEuler(this.viewer.renderer.panoramaPose),mT.applyEuler(this.viewer.renderer.sphereCorrection),this.vector3ToSphericalCoords(mT))}sphericalCoordsToTextureCoords(e){if(!this.state.textureData?.panoData)throw new US("Current adapter does not support texture coordinates or no texture has been loaded");return gT.equals(this.viewer.renderer.panoramaPose)&&gT.equals(this.viewer.renderer.sphereCorrection)||(this.sphericalCoordsToVector3(e,mT),iE(mT,this.viewer.renderer.sphereCorrection),iE(mT,this.viewer.renderer.panoramaPose),e=this.vector3ToSphericalCoords(mT)),this.viewer.adapter.sphericalCoordsToTextureCoords(e,this.state.textureData.panoData)}sphericalCoordsToVector3(e,t,n=Jw){return t||(t=new Qg),t.x=n*-Math.cos(e.pitch)*Math.sin(e.yaw),t.y=n*Math.sin(e.pitch),t.z=n*Math.cos(e.pitch)*Math.cos(e.yaw),t}vector3ToSphericalCoords(e){const t=Math.acos(e.y/Math.sqrt(e.x*e.x+e.y*e.y+e.z*e.z)),n=Math.atan2(e.x,e.z);return{yaw:n<0?-n:2*Math.PI-n,pitch:Math.PI/2-t}}viewerCoordsToVector3(e){const t=this.viewer.renderer.getIntersections(e).filter((e=>e.object.userData[Qw]));return t.length?t[0].point:null}viewerCoordsToSphericalCoords(e){const t=this.viewerCoordsToVector3(e);return t?this.vector3ToSphericalCoords(t):null}vector3ToViewerCoords(e){const t=e.clone();return t.project(this.viewer.renderer.camera),{x:Math.round((t.x+1)/2*this.state.size.width),y:Math.round((1-t.y)/2*this.state.size.height)}}sphericalCoordsToViewerCoords(e){return this.sphericalCoordsToVector3(e,mT),this.vector3ToViewerCoords(mT)}isPointVisible(e){let t,n;if(e instanceof Qg)t=e,n=this.vector3ToViewerCoords(e);else{if(!HS(e))return!1;t=this.sphericalCoordsToVector3(e,mT),n=this.vector3ToViewerCoords(t)}return t.dot(this.viewer.state.direction)>0&&n.x>=0&&n.x<=this.viewer.state.size.width&&n.y>=0&&n.y<=this.viewer.state.size.height}cleanPosition(e){if("yaw"in e||"pitch"in e){if(!("yaw"in e)||!("pitch"in e))throw new US("Position is missing 'yaw' or 'pitch'");return{yaw:eE(e.yaw),pitch:eE(e.pitch,!this.state.littlePlanet)}}return this.textureCoordsToSphericalCoords(e)}cleanSphereCorrection(e){return{pan:eE(e?.pan||0),tilt:eE(e?.tilt||0,!0),roll:eE(e?.roll||0,!0,!1)}}cleanPanoramaPose(e){return{pan:Eg.degToRad(e?.poseHeading||0),tilt:Eg.degToRad(e?.posePitch||0),roll:Eg.degToRad(e?.poseRoll||0)}}},_T=class e{constructor(){this.$=e.IDLE}is(...e){return e.some((e=>this.$&e))}set(e){this.$=e}add(e){this.$|=e}remove(e){this.$&=~e}};_T.IDLE=0,_T.CLICK=1,_T.MOVING=2,_T.INERTIA=4;var yT=_T,xT=class extends fT{constructor(e){super(e),this.data={startMouseX:0,startMouseY:0,mouseX:0,mouseY:0,mouseHistory:[],pinchDist:0,ctrlKeyDown:!1,dblclickData:null,dblclickTimeout:null,longtouchTimeout:null,twofingersTimeout:null,ctrlZoomTimeout:null},this.step=new yT,this.keyHandler=new hE,this.resizeObserver=new ResizeObserver(AS((()=>this.viewer.autoSize()),50)),this.moveThreshold=qw*AM.pixelRatio}init(){window.addEventListener("keydown",this,{passive:!1}),window.addEventListener("keyup",this),this.viewer.container.addEventListener("mousedown",this),window.addEventListener("mousemove",this,{passive:!1}),window.addEventListener("mouseup",this),this.viewer.container.addEventListener("touchstart",this,{passive:!1}),window.addEventListener("touchmove",this,{passive:!1}),window.addEventListener("touchend",this,{passive:!1}),this.viewer.container.addEventListener("wheel",this,{passive:!1}),document.addEventListener("fullscreenchange",this),this.resizeObserver.observe(this.viewer.container)}destroy(){window.removeEventListener("keydown",this),window.removeEventListener("keyup",this),this.viewer.container.removeEventListener("mousedown",this),window.removeEventListener("mousemove",this),window.removeEventListener("mouseup",this),this.viewer.container.removeEventListener("touchstart",this),window.removeEventListener("touchmove",this),window.removeEventListener("touchend",this),this.viewer.container.removeEventListener("wheel",this),document.removeEventListener("fullscreenchange",this),this.resizeObserver.disconnect(),clearTimeout(this.data.dblclickTimeout),clearTimeout(this.data.longtouchTimeout),clearTimeout(this.data.twofingersTimeout),clearTimeout(this.data.ctrlZoomTimeout),super.destroy()}handleEvent(e){switch(e.type){case"keydown":this.__onKeyDown(e);break;case"keyup":this.__onKeyUp();break;case"mousemove":this.__onMouseMove(e);break;case"mouseup":this.__onMouseUp(e);break;case"touchmove":this.__onTouchMove(e);break;case"touchend":this.__onTouchEnd(e);break;case"fullscreenchange":this.__onFullscreenChange()}if(!yS(e.target,"."+eS))switch(e.type){case"mousedown":this.__onMouseDown(e);break;case"touchstart":this.__onTouchStart(e);break;case"wheel":this.__onMouseWheel(e)}}__onKeyDown(e){if(this.config.mousewheelCtrlKey&&(this.data.ctrlKeyDown=e.key===iS.Control,this.data.ctrlKeyDown&&(clearTimeout(this.data.ctrlZoomTimeout),this.viewer.overlay.hide(nS.CTRL_ZOOM))),!this.viewer.dispatchEvent(new BE(e.key)))return;if(!this.state.keyboardEnabled)return;const t=this.config.keyboardActions?.[e.key];if("function"==typeof t)t(this.viewer),e.preventDefault();else if(t&&!this.keyHandler.pending){switch("ZOOM_IN"!==t&&"ZOOM_OUT"!==t&&this.viewer.stopAll(),t){case"ROTATE_UP":this.viewer.dynamics.position.roll({pitch:!1});break;case"ROTATE_DOWN":this.viewer.dynamics.position.roll({pitch:!0});break;case"ROTATE_RIGHT":this.viewer.dynamics.position.roll({yaw:!1});break;case"ROTATE_LEFT":this.viewer.dynamics.position.roll({yaw:!0});break;case"ZOOM_IN":this.viewer.dynamics.zoom.roll(!1);break;case"ZOOM_OUT":this.viewer.dynamics.zoom.roll(!0)}this.keyHandler.down(),e.preventDefault()}}__onKeyUp(){this.data.ctrlKeyDown=!1,this.state.keyboardEnabled&&this.keyHandler.up((()=>{this.viewer.dynamics.position.stop(),this.viewer.dynamics.zoom.stop(),this.viewer.resetIdleTimer()}))}__onMouseDown(e){this.step.add(yT.CLICK),this.data.startMouseX=e.clientX,this.data.startMouseY=e.clientY}__onMouseUp(e){this.step.is(yT.CLICK,yT.MOVING)&&this.__stopMove(e.clientX,e.clientY,e.target,2===e.button)}__onMouseMove(e){this.config.mousemove&&this.step.is(yT.CLICK,yT.MOVING)&&(e.preventDefault(),this.__doMove(e.clientX,e.clientY)),this.__handleObjectsEvents(e)}__onTouchStart(e){1===e.touches.length?(this.step.add(yT.CLICK),this.data.startMouseX=e.touches[0].clientX,this.data.startMouseY=e.touches[0].clientY,this.data.longtouchTimeout||(this.data.longtouchTimeout=setTimeout((()=>{const t=e.touches[0];this.__stopMove(t.clientX,t.clientY,t.target,!0),this.data.longtouchTimeout=null}),$w))):2===e.touches.length&&(this.step.set(yT.IDLE),this.__cancelLongTouch(),this.config.mousemove&&(this.__cancelTwoFingersOverlay(),this.__startMoveZoom(e),e.preventDefault()))}__onTouchEnd(e){if(this.__cancelLongTouch(),this.step.is(yT.CLICK,yT.MOVING))if(e.preventDefault(),this.__cancelTwoFingersOverlay(),1===e.touches.length)this.__stopMove(this.data.mouseX,this.data.mouseY);else if(0===e.touches.length){const t=e.changedTouches[0];this.__stopMove(t.clientX,t.clientY,t.target)}}__onTouchMove(e){if(this.__cancelLongTouch(),this.config.mousemove)if(1===e.touches.length){if(this.config.touchmoveTwoFingers)this.step.is(yT.CLICK)&&!this.data.twofingersTimeout&&(this.data.twofingersTimeout=setTimeout((()=>{this.viewer.overlay.show({id:nS.TWO_FINGERS,image:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
28<path fill="currentColor" d="M33.38 33.2a1.96 1.96 0 0 0 1.5-3.23 10.61 10.61 0 0 1 7.18-17.51c.7-.06 1.31-.49 1.61-1.12a13.02 13.02 0 0 1 11.74-7.43c7.14 0 12.96 5.8 12.96 12.9 0 3.07-1.1 6.05-3.1 8.38-.7.82-.61 2.05.21 2.76.83.7 2.07.6 2.78-.22a16.77 16.77 0 0 0 4.04-10.91C72.3 7.54 64.72 0 55.4 0a16.98 16.98 0 0 0-14.79 8.7 14.6 14.6 0 0 0-12.23 14.36c0 3.46 1.25 6.82 3.5 9.45.4.45.94.69 1.5.69m45.74 43.55a22.13 22.13 0 0 1-5.23 12.4c-4 4.55-9.53 6.86-16.42 6.86-12.6 0-20.1-10.8-20.17-10.91a1.82 1.82 0 0 0-.08-.1c-5.3-6.83-14.55-23.82-17.27-28.87-.05-.1 0-.21.02-.23a6.3 6.3 0 0 1 8.24 1.85l9.38 12.59a1.97 1.97 0 0 0 3.54-1.17V25.34a4 4 0 0 1 1.19-2.87 3.32 3.32 0 0 1 2.4-.95c1.88.05 3.4 1.82 3.4 3.94v24.32a1.96 1.96 0 0 0 3.93 0v-33.1a3.5 3.5 0 0 1 7 0v35.39a1.96 1.96 0 0 0 3.93 0v-.44c.05-2.05 1.6-3.7 3.49-3.7 1.93 0 3.5 1.7 3.5 3.82v5.63c0 .24.04.48.13.71l.1.26a1.97 1.97 0 0 0 3.76-.37c.33-1.78 1.77-3.07 3.43-3.07 1.9 0 3.45 1.67 3.5 3.74l-1.77 18.1zM77.39 51c-1.25 0-2.45.32-3.5.9v-.15c0-4.27-3.33-7.74-7.42-7.74-1.26 0-2.45.33-3.5.9V16.69a7.42 7.42 0 0 0-14.85 0v1.86a7 7 0 0 0-3.28-.94 7.21 7.21 0 0 0-5.26 2.07 7.92 7.92 0 0 0-2.38 5.67v37.9l-5.83-7.82a10.2 10.2 0 0 0-13.35-2.92 4.1 4.1 0 0 0-1.53 5.48C20 64.52 28.74 80.45 34.07 87.34c.72 1.04 9.02 12.59 23.4 12.59 7.96 0 14.66-2.84 19.38-8.2a26.06 26.06 0 0 0 6.18-14.6l1.78-18.2v-.2c0-4.26-3.32-7.73-7.42-7.73z"/>\x3c!--Created by AomAm from the Noun Project--\x3e</svg>\n',title:this.config.lang.twoFingers})}),Yw));else if(this.step.is(yT.CLICK,yT.MOVING)){e.preventDefault();const t=e.touches[0];this.__doMove(t.clientX,t.clientY)}}else this.__doMoveZoom(e),this.__cancelTwoFingersOverlay()}__cancelLongTouch(){this.data.longtouchTimeout&&(clearTimeout(this.data.longtouchTimeout),this.data.longtouchTimeout=null)}__cancelTwoFingersOverlay(){this.config.touchmoveTwoFingers&&(this.data.twofingersTimeout&&(clearTimeout(this.data.twofingersTimeout),this.data.twofingersTimeout=null),this.viewer.overlay.hide(nS.TWO_FINGERS))}__onMouseWheel(e){if(!this.config.mousewheel||!e.deltaY)return;if(this.config.mousewheelCtrlKey&&!this.data.ctrlKeyDown)return this.viewer.overlay.show({id:nS.CTRL_ZOOM,image:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="10 17 79 79"><path fill="currentColor" d="M38.1 29.27c-.24 0-.44.2-.44.45v10.7a.45.45 0 00.9 0v-10.7c0-.25-.2-.45-.45-.45zm10.2 26.66a11.54 11.54 0 01-8.48-6.14.45.45 0 10-.8.41 12.45 12.45 0 009.22 6.62.45.45 0 00.07-.9zm24.55-13.08a23.04 23.04 0 00-22.56-23v7.07l-.01.05a2.83 2.83 0 012.39 2.78v14.03l.09-.02h8.84v-9.22a.45.45 0 11.9 0v9.22h10.35v-.9zm0 27.33V44.66H62.5c-.02 2.01-.52 4-1.47 5.76a.45.45 0 01-.61.18.45.45 0 01-.19-.61 11.54 11.54 0 001.36-5.33h-8.83l-.1-.01a2.83 2.83 0 01-2.83 2.84h-.04-.04a2.83 2.83 0 01-2.83-2.83v-14.9a2.82 2.82 0 012.47-2.8v-7.11a23.04 23.04 0 00-22.57 23v.91h14.72V29.88a8.2 8.2 0 015.02-7.57c.22-.1.5.01.59.24.1.23-.01.5-.24.6a7.3 7.3 0 00-4.47 6.73v13.88h3.9a.45.45 0 110 .9h-3.9v.15a7.32 7.32 0 0011.23 6.17.45.45 0 01.49.76 8.22 8.22 0 01-12.62-6.93v-.15H26.82v25.52a23.04 23.04 0 0023.01 23.01 23.04 23.04 0 0023.02-23.01zm1.8-27.33v27.33A24.85 24.85 0 0149.84 95a24.85 24.85 0 01-24.82-24.82V42.85a24.85 24.85 0 0124.82-24.82 24.85 24.85 0 0124.83 24.82zM57.98 29.88v9.36a.45.45 0 11-.9 0v-9.36a7.28 7.28 0 00-3.4-6.17.45.45 0 01.49-.76 8.18 8.18 0 013.8 6.93z"/>\x3c!-- Created by Icon Island from the Noun Project --\x3e</svg>\n',title:this.config.lang.ctrlZoom}),clearTimeout(this.data.ctrlZoomTimeout),void(this.data.ctrlZoomTimeout=setTimeout((()=>this.viewer.overlay.hide(nS.CTRL_ZOOM)),Zw));e.preventDefault(),e.stopPropagation();const t=e.deltaY/Math.abs(e.deltaY)*5*this.config.zoomSpeed;0!==t&&this.viewer.dynamics.zoom.step(-t,5)}__onFullscreenChange(){const e=this.viewer.isFullscreenEnabled();"fullscreen"===this.config.keyboard&&(e?this.viewer.startKeyboardControl():this.viewer.stopKeyboardControl()),this.viewer.dispatchEvent(new PE(e))}__resetMove(){this.step.set(yT.IDLE),this.data.mouseX=0,this.data.mouseY=0,this.data.startMouseX=0,this.data.startMouseY=0,this.data.mouseHistory.length=0}__startMoveZoom(e){this.viewer.stopAll(),this.__resetMove();const t=wS(e);this.step.set(yT.MOVING),({distance:this.data.pinchDist,center:{x:this.data.mouseX,y:this.data.mouseY}}=t),this.__logMouseMove(this.data.mouseX,this.data.mouseY)}__stopMove(e,t,n,i=!1){this.step.is(yT.MOVING)?this.config.moveInertia?(this.__logMouseMove(e,t),this.__stopMoveInertia(e,t)):(this.__resetMove(),this.viewer.resetIdleTimer()):(this.step.is(yT.CLICK)&&!this.__moveThresholdReached(e,t)&&this.__doClick(e,t,n,i),this.step.remove(yT.CLICK),this.step.is(yT.INERTIA)||(this.__resetMove(),this.viewer.resetIdleTimer()))}__stopMoveInertia(e,t){const n=new cw(this.data.mouseHistory.map((([,e,t])=>new Mg(e,t)))).getTangent(1),i=this.data.mouseHistory.reduce((({total:e,prev:t},n)=>({total:t?e+cS({x:t[1],y:t[2]},{x:n[1],y:n[2]})/(n[0]-t[0]):0,prev:n})),{total:0,prev:null}).total/this.data.mouseHistory.length;if(!i)return this.__resetMove(),void this.viewer.resetIdleTimer();this.step.set(yT.INERTIA);let r=e,s=t;this.state.animation=new aE({properties:{speed:{start:i,end:0}},duration:1e3,easing:"outQuad",onTick:e=>{r+=e.speed*n.x*3*AM.pixelRatio,s+=e.speed*n.y*3*AM.pixelRatio,this.__applyMove(r,s)}}),this.state.animation.then((e=>{this.state.animation=null,e&&(this.__resetMove(),this.viewer.resetIdleTimer())}))}__doClick(e,t,n,i=!1){const r=this.viewer.container.getBoundingClientRect(),s=e-r.left,o=t-r.top,a=this.viewer.renderer.getIntersections({x:s,y:o}),l=a.find((e=>e.object.userData[Qw]));if(l){const r=this.viewer.dataHelper.vector3ToSphericalCoords(l.point),c={rightclick:i,target:n,clientX:e,clientY:t,viewerX:s,viewerY:o,yaw:r.yaw,pitch:r.pitch,objects:a.map((e=>e.object)).filter((e=>!e.userData[Qw]))};try{const e=this.viewer.dataHelper.sphericalCoordsToTextureCoords(c);Object.assign(c,e)}catch(e){}this.data.dblclickTimeout?(Math.abs(this.data.dblclickData.clientX-c.clientX)<this.moveThreshold&&Math.abs(this.data.dblclickData.clientY-c.
28clientY)<this.moveThreshold&&this.viewer.dispatchEvent(new CE(this.data.dblclickData)),clearTimeout(this.data.dblclickTimeout),this.data.dblclickTimeout=null,this.data.dblclickData=null):(this.viewer.dispatchEvent(new EE(c)),this.data.dblclickData=PS(c),this.data.dblclickTimeout=setTimeout((()=>{this.data.dblclickTimeout=null,this.data.dblclickData=null}),Xw))}}__handleObjectsEvents(e){if(!LS(this.state.objectsObservers)&&_S(e.target,this.viewer.container)){const t=xS(this.viewer.container),n={x:e.clientX-t.x,y:e.clientY-t.y},i=this.viewer.renderer.getIntersections(n),r=(t,i,r)=>{this.viewer.dispatchEvent(new r(e,t,n,i))};for(const[e,t]of Object.entries(this.state.objectsObservers)){const n=i.find((t=>t.object.userData[e]));n?(t&&n.object!==t&&(r(t,e,bM),this.state.objectsObservers[e]=null),t?r(n.object,e,SM):(this.state.objectsObservers[e]=n.object,r(n.object,e,yM))):t&&(r(t,e,bM),this.state.objectsObservers[e]=null)}}}__doMove(e,t){this.step.is(yT.CLICK)&&this.__moveThresholdReached(e,t)?(this.viewer.stopAll(),this.__resetMove(),this.step.set(yT.MOVING),this.data.mouseX=e,this.data.mouseY=t,this.__logMouseMove(e,t)):this.step.is(yT.MOVING)&&(this.__applyMove(e,t),this.__logMouseMove(e,t))}__moveThresholdReached(e,t){return Math.abs(e-this.data.startMouseX)>=this.moveThreshold||Math.abs(t-this.data.startMouseY)>=this.moveThreshold}__applyMove(e,t){const n=(e-this.data.mouseX)*Math.cos(this.state.roll)-(t-this.data.mouseY)*Math.sin(this.state.roll),i=(t-this.data.mouseY)*Math.cos(this.state.roll)+(e-this.data.mouseX)*Math.sin(this.state.roll),r=this.config.moveSpeed*(n/this.state.size.width)*Eg.degToRad(this.state.littlePlanet?90:this.state.hFov),s=this.config.moveSpeed*(i/this.state.size.height)*Eg.degToRad(this.state.littlePlanet?90:this.state.vFov),o=this.viewer.getPosition();this.viewer.rotate({yaw:o.yaw-r,pitch:o.pitch+s}),this.data.mouseX=e,this.data.mouseY=t}__doMoveZoom(e){if(this.step.is(yT.MOVING)){e.preventDefault();const t=wS(e),n=(t.distance-this.data.pinchDist)/AM.pixelRatio*this.config.zoomSpeed;this.viewer.zoom(this.viewer.getZoomLevel()+n),this.__doMove(t.center.x,t.center.y),this.data.pinchDist=t.distance}}__logMouseMove(e,t){const n=Date.now(),i=this.data.mouseHistory.length?this.data.mouseHistory[this.data.mouseHistory.length-1]:[0,-1,-1];i[1]===e&&i[2]===t?i[0]=n:n===i[0]?(i[1]=e,i[2]=t):this.data.mouseHistory.push([n,e,t]);let r=null;for(let e=0;e<this.data.mouseHistory.length;)this.data.mouseHistory[e][0]<n-Kw?this.data.mouseHistory.splice(e,1):r&&this.data.mouseHistory[e][0]-r>Kw/10?(this.data.mouseHistory.splice(0,e),e=0,r=this.data.mouseHistory[e][0]):(r=this.data.mouseHistory[e][0],e++)}};kg.enabled=!1;var bT=new Mg,wT=new Rv,ST=new nv,ET=class extends fT{constructor(e){super(e),this.frustumNeedsUpdate=!0,this.renderer=new sw(this.config.rendererParameters),this.renderer.setPixelRatio(AM.pixelRatio),this.renderer.outputColorSpace=Jm,this.renderer.domElement.className="psv-canvas",this.scene=new ow,this.camera=new hy(50,16/9,.1,2*Jw),this.camera.matrixWorldAutoUpdate=!1,this.mesh=this.viewer.adapter.createMesh(),this.mesh.userData={[Qw]:!0},this.meshContainer=new Jb,this.meshContainer.add(this.mesh),this.scene.add(this.meshContainer),this.raycaster=new kw,this.frustum=new by,this.container=document.createElement("div"),this.container.className="psv-canvas-container",this.container.appendChild(this.renderer.domElement),this.viewer.container.appendChild(this.container),this.viewer.addEventListener(dM.type,this),this.viewer.addEventListener(gM.type,this),this.viewer.addEventListener(ZE.type,this),this.viewer.addEventListener(JE.type,this),this.viewer.addEventListener(TE.type,this),this.hide()}get panoramaPose(){return this.mesh.rotation}get sphereCorrection(){return this.meshContainer.rotation}init(){this.show(),this.renderer.setAnimationLoop((e=>this.__renderLoop(e)))}destroy(){this.renderer.setAnimationLoop(null),this.cleanScene(this.scene),this.viewer.container.removeChild(this.container),this.viewer.removeEventListener(dM.type,this),this.viewer.removeEventListener(gM.type,this),this.viewer.removeEventListener(ZE.type,this),this.viewer.removeEventListener(JE.type,this),this.viewer.removeEventListener(TE.type,this),super.destroy()}handleEvent(e){switch(e.type){case dM.type:this.__onSizeUpdated();break;
28case gM.type:this.__onZoomUpdated();break;case ZE.type:case JE.type:this.__onPositionUpdated();break;case TE.type:e.containsOptions("fisheye")&&this.__onPositionUpdated()}}hide(){this.container.style.opacity="0"}show(){this.container.style.opacity="1"}setCustomRenderer(e){this.customRenderer=e?e(this.renderer):null,this.viewer.needsUpdate()}__onSizeUpdated(){this.renderer.setSize(this.state.size.width,this.state.size.height),this.camera.aspect=this.state.aspect,this.camera.updateProjectionMatrix(),this.viewer.needsUpdate(),this.frustumNeedsUpdate=!0}__onZoomUpdated(){this.camera.fov=this.state.vFov,this.camera.updateProjectionMatrix(),this.viewer.needsUpdate(),this.frustumNeedsUpdate=!0}__onPositionUpdated(){this.camera.position.set(0,0,0),this.camera.lookAt(this.state.direction),this.config.fisheye&&this.camera.position.copy(this.state.direction).multiplyScalar(this.config.fisheye/2).negate(),this.camera.rotateZ(-this.state.roll),this.camera.updateMatrixWorld(),this.viewer.needsUpdate(),this.frustumNeedsUpdate=!0}__renderLoop(e){const t=this.timestamp?e-this.timestamp:0;this.timestamp=e,this.viewer.dispatchEvent(new xE(e,t)),this.viewer.dynamics.update(t),(this.state.needsUpdate||this.state.continuousUpdateCount>0)&&(this.state.needsUpdate=!1,(this.customRenderer||this.renderer).render(this.scene,this.camera),this.viewer.dispatchEvent(new nM))}setTexture(e){this.state.textureData&&this.viewer.adapter.disposeTexture(this.state.textureData),this.state.textureData=e,this.viewer.adapter.setTexture(this.mesh,e),this.viewer.needsUpdate()}setPanoramaPose(e,t=this.mesh){const n=this.viewer.dataHelper.cleanPanoramaPose(e);t.rotation.set(-n.tilt,-n.pan,-n.roll,"ZXY")}setSphereCorrection(e,t=this.meshContainer){const n=this.viewer.dataHelper.cleanSphereCorrection(e);t.rotation.set(n.tilt,n.pan,n.roll,"ZXY")}transition(e,t){const n=!IS(t.position),i=!IS(t.zoom),r=new _E(n?this.viewer.dataHelper.cleanPosition(t.position):void 0,t.zoom);this.viewer.dispatchEvent(r);const s=new Jb,o=this.viewer.adapter.createMesh(.5);if(this.viewer.adapter.setTexture(o,e,!0),this.viewer.adapter.setTextureOpacity(o,0),this.setPanoramaPose(e.panoData,o),this.setSphereCorrection(t.sphereCorrection,s),n&&"fade-only"===t.transition){const e=this.viewer.getPosition(),t=new Qg(0,1,0);s.rotateOnWorldAxis(t,r.position.yaw-e.yaw);const n=new Qg(0,1,0).cross(this.camera.getWorldDirection(new Qg)).normalize();s.rotateOnWorldAxis(n,r.position.pitch-e.pitch)}s.add(o),this.scene.add(s),this.renderer.setRenderTarget(new Yg),this.renderer.render(this.scene,this.camera),this.renderer.setRenderTarget(null);const{duration:a,properties:l}=this.viewer.dataHelper.getAnimationProperties(t.speed,!0===t.transition?r.position:null,r.zoomLevel),c=new aE({properties:{...l,opacity:{start:0,end:1}},duration:a,easing:"inOutCubic",onTick:e=>{this.viewer.adapter.setTextureOpacity(o,e.opacity),n&&!0===t.transition&&this.viewer.dynamics.position.setValue({yaw:e.yaw,pitch:e.pitch}),i&&this.viewer.dynamics.zoom.setValue(e.zoom),this.viewer.needsUpdate()}});return c.then((i=>{i?(this.setTexture(e),this.viewer.adapter.setTextureOpacity(this.mesh,1),this.setPanoramaPose(e.panoData),this.setSphereCorrection(t.sphereCorrection),n&&"fade-only"===t.transition&&this.viewer.rotate(t.position)):this.viewer.adapter.disposeTexture(e),this.scene.remove(s),o.geometry.dispose(),o.geometry=null})),c}getIntersections(e){bT.x=2*e.x/this.state.size.width-1,bT.y=-2*e.y/this.state.size.height+1,this.raycaster.setFromCamera(bT,this.camera);const t=this.raycaster.intersectObjects(this.scene.children,!0).filter((e=>e.object.visible)).filter((e=>e.object.isMesh&&!!e.object.userData));return this.customRenderer?.getIntersections&&t.push(...this.customRenderer.getIntersections(this.raycaster,bT)),t}isObjectVisible(e){if(!e)return!1;if(this.frustumNeedsUpdate&&(wT.multiplyMatrices(this.camera.projectionMatrix,this.camera.matrixWorldInverse),this.frustum.setFromProjectionMatrix(wT),this.frustumNeedsUpdate=!1),e.isVector3)return this.frustum.containsPoint(e);if(e.isMesh&&e.geometry){const t=e;return t.geometry.boundingBox||t.geometry.computeBoundingBox(),ST.copy(t.geometry.boundingBox).applyMatrix4(t.matrixWorld),this.frustum.intersectsBox(ST)}return!!e.isObject3D&&this.frustum.intersectsObject(e)}
28addObject(e){this.scene.add(e)}removeObject(e){this.scene.remove(e)}cleanScene(e){const t=e=>{e.map?.dispose(),e.uniforms&&Object.values(e.uniforms).forEach((e=>{e.value?.dispose?.()})),e.dispose()};e.traverse((n=>{n.geometry?.dispose(),n.material&&(Array.isArray(n.material)?n.material.forEach((e=>{t(e)})):t(n.material)),n instanceof ow||n.dispose?.(),n!==e&&this.cleanScene(n)}))}},MT=class extends Cw{load(e,t,n,i,r){const s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"});fetch(s,{signal:r}).then((e=>{if(200===e.status||0===e.status){const t=e.body.getReader(),r=e.headers.get("Content-Length")||e.headers.get("X-File-Size"),s=r?parseInt(r):0,o=0!==s;let a=0;const l=new ReadableStream({start(e){!function r(){t.read().then((({done:t,value:i})=>{if(t)e.close();else{a+=i.byteLength;const t=new ProgressEvent("progress",{lengthComputable:o,loaded:a,total:s});n(t),e.enqueue(i),r()}})).catch((e=>{i(e)}))}()}});return new Response(l)}throw new Error(`fetch for "${e.url}" responded with ${e.status}: ${e.statusText}`)})).then((e=>e.blob())).then((e=>{t(e)})).catch((e=>{i(e)}))}},TT=class extends Cw{load(e,t,n,i){const r=document.createElement("img");function s(){l(),t(this)}function o(e){if(l(),i?.aborted){const e=new Error;e.name="AbortError",e.message="The operation was aborted.",n(e)}else n(e)}function a(){r.src=""}function l(){r.removeEventListener("load",s,!1),r.removeEventListener("error",o,!1),i?.removeEventListener("abort",a,!1)}return r.addEventListener("load",s,!1),r.addEventListener("error",o,!1),i?.addEventListener("abort",a,!1),e.startsWith("data:")||void 0===this.crossOrigin||(r.crossOrigin=this.crossOrigin),r.src=e,r}},AT=class extends fT{constructor(e){super(e),this.abortCtrl={},this.fileLoader=new MT,this.imageLoader=new TT,this.config.withCredentials&&(this.fileLoader.setWithCredentials(!0),this.imageLoader.setCrossOrigin("use-credentials"))}destroy(){this.abortLoading(),super.destroy()}abortLoading(){Object.values(this.abortCtrl).forEach((e=>e.abort())),this.abortCtrl={}}loadFile(e,t,n){const i=aT.get(e,n);if(i){if(i instanceof Blob)return t?.(100),Promise.resolve(i);aT.remove(e,n)}return this.config.requestHeaders&&this.fileLoader.setRequestHeader(this.config.requestHeaders(e)),new Promise(((i,r)=>{let s=0;t?.(s),this.fileLoader.load(e,(r=>{s=100,t?.(s),aT.add(e,n,r),i(r)}),(e=>{if(e.lengthComputable){const n=e.loaded/e.total*100;n>s&&(s=n,t?.(s))}}),(e=>{r(e)}),this.__getAbortSignal(n))}))}loadImage(e,t,n){const i=aT.get(e,n);return i?(t?.(100),i instanceof Blob?this.blobToImage(i):Promise.resolve(i)):t||this.config.requestHeaders?this.loadFile(e,t,n).then((e=>this.blobToImage(e))):new Promise(((t,i)=>{this.imageLoader.load(e,(i=>{aT.add(e,n,i),t(i)}),(e=>{i(e)}),this.__getAbortSignal(n))}))}blobToImage(e){return new Promise(((t,n)=>{const i=document.createElement("img");i.onload=()=>{URL.revokeObjectURL(i.src),t(i)},i.onerror=n,i.src=URL.createObjectURL(e)}))}preloadPanorama(e){return this.viewer.adapter.supportsPreload(e)?this.viewer.adapter.loadTexture(e,!1):Promise.reject(new US("Current adapter does not support preload"))}__getAbortSignal(e){return e?(this.abortCtrl[e]?.signal.aborted&&delete this.abortCtrl[e],this.abortCtrl[e]||(this.abortCtrl[e]=new AbortController),this.abortCtrl[e].signal):null}},CT=class extends fT{constructor(e){super(e),this.zoom=new lE((e=>{this.viewer.state.vFov=this.viewer.dataHelper.zoomLevelToFov(e),this.viewer.state.hFov=this.viewer.dataHelper.vFovToHFov(this.viewer.state.vFov),this.viewer.dispatchEvent(new gM(e))}),{defaultValue:this.viewer.config.defaultZoomLvl,min:0,max:100,wrap:!1}),this.position=new cE((e=>{this.viewer.dataHelper.sphericalCoordsToVector3(e,this.viewer.state.direction),this.viewer.dispatchEvent(new ZE(e))}),{yaw:new lE(null,{defaultValue:this.config.defaultYaw,min:0,max:2*Math.PI,wrap:!0}),pitch:new lE(null,{defaultValue:this.config.defaultPitch,min:this.viewer.state.littlePlanet?0:-Math.PI/2,max:this.viewer.state.littlePlanet?2*Math.PI:Math.PI/2,wrap:this.viewer.state.littlePlanet})}),this.roll=new lE((e=>{this.viewer.state.roll=e,this.viewer.dispatchEvent(new JE(e))}),{defaultValue:0,min:-Math.PI,max:Math.PI,wrap:!1}),this.updateSpeeds()}updateSpeeds(){this.zoom.setSpeed(50*this.config.zoomSpeed),this.position.setSpeed(Eg.degToRad(50*this.config.moveSpeed)),this.roll.setSpeed(Eg.degToRad(50*this.config.moveSpeed))}update(e){this.zoom.update(e),this.position.update(e),this.roll.update(e)}},RT=class extends mE{constructor(e){if(super(),this.plugins={},this.children=[],this.onResize=AS((()=>this.navbar.autoSize()),500),this.parent=fS(e.container),!this.parent)throw new US('"container" element not found.');this.parent[Qw]=this,this.container=document.createElement("div"),this.container.classList.add("psv-container"),this.parent.appendChild(this.container),sE(this.container,"core"),this.state=new class{constructor(){this.ready=!1,this.needsUpdate=!1,this.continuousUpdateCount=0,this.keyboardEnabled=!1,this.direction=new Qg(0,0,Jw),this.roll=0,this.vFov=60,this.hFov=60,this.aspect=1,this.animation=null,this.transitionAnimation=null,this.loadingPromise=null,this.littlePlanet=!1,this.idleTime=-1,this.objectsObservers={}
28,this.size={width:0,height:0}}},this.config=tT(e),this.__setSize(this.config.size),this.overlay=new hT(this);try{AM.load()}catch(e){return console.error(e),void this.showError(this.config.lang.webglError)}aT.init(),this.adapter=new this.config.adapter[0](this,this.config.adapter[1]),this.renderer=new ET(this),this.textureLoader=new AT(this),this.eventsHandler=new xT(this),this.dataHelper=new vT(this),this.dynamics=new CT(this),this.adapter.init?.(),this.loader=new lT(this),this.navbar=new oT(this),this.panel=new dT(this),this.notification=new cT(this),this.autoSize(),this.setCursor(null),kS(AM.isTouchEnabled,(e=>{mS(this.container,"psv--is-touch",e)})),this.config.plugins.forEach((([e,t])=>{this.plugins[e.id]=new e(this,t)}));for(const e of Object.values(this.plugins))e.init?.();this.config.navbar&&this.navbar.setButtons(this.config.navbar),this.state.loadingPromise||(this.config.panorama?this.setPanorama(this.config.panorama):this.loader.show())}destroy(){this.stopAll(),this.stopKeyboardControl(),this.exitFullscreen();for(const[e,t]of Object.entries(this.plugins))t.destroy(),delete this.plugins[e];this.children.slice().forEach((e=>e.destroy())),this.children.length=0,this.eventsHandler?.destroy(),this.renderer?.destroy(),this.textureLoader?.destroy(),this.dataHelper?.destroy(),this.adapter?.destroy(),this.dynamics?.destroy(),this.parent.removeChild(this.container),delete this.parent[Qw]}init(){this.eventsHandler.init(),this.renderer.init(),this.config.navbar&&this.navbar.show(),"always"===this.config.keyboard&&this.startKeyboardControl(),this.resetIdleTimer(),this.state.ready=!0,this.dispatchEvent(new eM)}resetIdleTimer(){this.state.idleTime=performance.now()}disableIdleTimer(){this.state.idleTime=-1}getPlugin(e){if("string"==typeof e)return this.plugins[e];{const t=KM(e);return t?this.plugins[t.id]:null}}getPosition(){return this.dataHelper.cleanPosition(this.dynamics.position.current)}getZoomLevel(){return this.dynamics.zoom.current}getSize(){return{...this.state.size}}isFullscreenEnabled(){return SS(this.parent,AM.isIphone)}needsUpdate(){this.state.needsUpdate=!0}needsContinuousUpdate(e){e?this.state.continuousUpdateCount++:this.state.continuousUpdateCount>0&&this.state.continuousUpdateCount--}autoSize(){this.container.clientWidth===this.state.size.width&&this.container.clientHeight===this.state.size.height||(this.state.size.width=Math.round(this.container.clientWidth),this.state.size.height=Math.round(this.container.clientHeight),this.state.aspect=this.state.size.width/this.state.size.height,this.state.hFov=this.dataHelper.vFovToHFov(this.state.vFov),this.dispatchEvent(new dM(this.getSize())),this.onResize())}setPanorama(e,t={}){this.textureLoader.abortLoading(),this.state.transitionAnimation?.cancel(),this.state.ready||["sphereCorrection","panoData"].forEach((e=>{e in t||(t[e]=this.config[e])})),void 0===t.transition&&(t.transition=!0),void 0===t.speed&&(t.speed=Ww),void 0===t.showLoader&&(t.showLoader=!0),void 0===t.caption&&(t.caption=this.config.caption),void 0===t.description&&(t.description=this.config.description),t.panoData||"function"!=typeof this.config.panoData||(t.panoData=this.config.panoData);const n=!IS(t.position),i=!IS(t.zoom);(n||i)&&this.stopAll(),this.hideError(),this.resetIdleTimer(),this.config.panorama=e,this.config.caption=t.caption,this.config.description=t.description;const r=t=>{if(BS(t))return!1;if(this.loader.hide(),this.state.loadingPromise=null,t)throw this.navbar.setCaption(""),this.showError(this.config.lang.loadError),console.error(t),this.dispatchEvent(new $E(e,t)),t;return this.navbar.setCaption(this.config.caption),!0};this.navbar.setCaption(`<em>${this.config.lang.loading}</em>`),!t.showLoader&&this.state.ready||this.loader.show(),this.dispatchEvent(new WE(e));const s=this.adapter.loadTexture(this.config.panorama,!0,t.panoData).then((e=>{if(e.panorama!==this.config.panorama)throw this.adapter.disposeTexture(e),VS();return e}));return t.transition&&this.state.ready&&this.adapter.supportsTransition(this.config.panorama)?this.state.loadingPromise=s.then((e=>(this.loader.hide(),this.dispatchEvent(new qE(e)),this.state.transitionAnimation=this.renderer.transition(e,t),this.state.transitionAnimation))).then((e=>{if(this.state.transitionAnimation=null,!e)throw VS()})).then((()=>r()),(e=>r(e))):this.state.loadingPromise=s.then((e=>{this.renderer.show(),this.renderer.setTexture(e),this.renderer.setPanoramaPose(e.panoData),this.renderer.setSphereCorrection(t.sphereCorrection),this.state.ready||this.init(),this.dispatchEvent(new qE(e)),i&&this.zoom(t.zoom),n&&this.rotate(t.position)})).then((()=>r()),(e=>r(e))),this.state.loadingPromise}setOptions(e){const t={...this.config,...e};for(let[n,i]of Object.entries(e))if(n in JM)if(n in QM)zS(QM[n]);else switch(n in eT&&(i=eT[n](i,{rawConfig:t,defValue:JM[n]})),this.config[n]=i,n){case"mousemove":this.state.cursorOverride||this.setCursor(null);break;case"caption":this.navbar.setCaption(this.config.caption);break;case"size":this.resize(this.config.size);break;case"sphereCorrection":this.renderer.setSphereCorrection(this.config.sphereCorrection);break;case"navbar":case"lang":this.navbar.setButtons(this.config.navbar);break;case"moveSpeed":case"zoomSpeed":this.dynamics.updateSpeeds();break;case"minFov":case"maxFov":this.dynamics.zoom.setValue(this.dataHelper.fovToZoomLevel(this.state.vFov)),this.dispatchEvent(new gM(this.getZoomLevel()));break;case"keyboard":"always"===this.config.keyboard?this.startKeyboardControl():this.stopKeyboardControl()}else zS(`Unknown option ${n}`);this.needsUpdate(),this.dispatchEvent(new TE(Object.keys(e)))}setOption(e,t){this.setOptions({[e]:t})}showError(e){this.overlay.show({id:nS.ERROR,image:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="15 15 70 70">
28<path fill="currentColor" d="M50,16.2c-18.6,0-33.8,15.1-33.8,33.8S31.4,83.7,50,83.7S83.8,68.6,83.8,50S68.6,16.2,50,16.2z M50,80.2c-16.7,0-30.2-13.6-30.2-30.2S33.3,19.7,50,19.7S80.3,33.3,80.3,50S66.7,80.2,50,80.2z"/><rect fill="currentColor" x="48" y="31.7" width="4" height="28"/><rect fill="currentColor" x="48" y="63.2" width="4" height="5"/>\x3c!--Created by Shastry from the Noun Project--\x3e</svg>\n',title:e,dissmisable:!1})}hideError(){this.overlay.hide(nS.ERROR)}rotate(e){const t=new wE(this.dataHelper.cleanPosition(e));this.dispatchEvent(t),t.defaultPrevented||this.dynamics.position.setValue(t.position)}zoom(e){this.dynamics.zoom.setValue(e)}zoomIn(e=1){this.dynamics.zoom.step(e)}zoomOut(e=1){this.dynamics.zoom.step(-e)}animate(e){const t=HS(e),n=!IS(e.zoom),i=new _E(t?this.dataHelper.cleanPosition(e):void 0,e.zoom);if(this.dispatchEvent(i),i.defaultPrevented)return;this.stopAll();const{duration:r,properties:s}=this.dataHelper.getAnimationProperties(e.speed,i.position,i.zoomLevel);return r?(this.state.animation=new aE({properties:s,duration:r,easing:e.easing||"inOutSine",onTick:e=>{t&&this.dynamics.position.setValue({yaw:e.yaw,pitch:e.pitch}),n&&this.dynamics.zoom.setValue(e.zoom)}}),this.state.animation.then((()=>{this.state.animation=null,this.resetIdleTimer()})),this.state.animation):(t&&this.rotate(i.position),n&&this.zoom(i.zoomLevel),new aE(null))}stopAnimation(){return this.state.animation?(this.state.animation.cancel(),this.state.animation):Promise.resolve()}resize(e){this.__setSize(e),this.autoSize()}__setSize(e){const t=e;["width","height"].forEach((n=>{e&&t[n]&&(/^[0-9.]+$/.test(t[n])&&(t[n]+="px"),this.parent.style[n]=t[n])}))}enterFullscreen(){this.isFullscreenEnabled()||ES(this.parent,AM.isIphone)}exitFullscreen(){this.isFullscreenEnabled()&&MS(AM.isIphone)}toggleFullscreen(){this.isFullscreenEnabled()?this.exitFullscreen():this.enterFullscreen()}startKeyboardControl(){this.state.keyboardEnabled=!0}stopKeyboardControl(){this.state.keyboardEnabled=!1}createTooltip(e){return new pT(this,e)}setCursor(e){this.state.cursorOverride=e,this.container.style.cursor=e||(this.config.mousemove?"move":"default")}observeObjects(e){this.state.objectsObservers[e]||(this.state.objectsObservers[e]=null)}unobserveObjects(e){delete this.state.objectsObservers[e]}stopAll(){return this.dispatchEvent(new fM),this.disableIdleTimer(),this.stopAnimation()}},PT=Object.defineProperty;((e,t)=>{for(var n in t)PT(e,n,{get:t[n],enumerable:!0})})({},{AutorotateEvent:()=>IT});var LT=class e extends fE{constructor(t){super(e.type),this.autorotateEnabled=t}};LT.type="autorotate";var IT=LT,DT=class extends DM{constructor(e){super(e,{className:"psv-autorotate-button",hoverScale:!0,collapsable:!0,tabbable:!0,icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 41" overflow="visible"><g fill="currentColor" transform-origin="center" transform="scale(1.3)"><path d="M40.5 14.1c-.1-.1-1.2-.5-2.899-1-.101 0-.2-.1-.2-.2C34.5 6.5 28 2 20.5 2S6.6 6.5 3.7 12.9c0 .1-.1.1-.2.2-1.7.6-2.8 1-2.9 1l-.6.3v12.1l.6.2c.1 0 1.1.4 2.7.9.1 0 .2.1.2.199C6.3 34.4 12.9 39 20.5 39c7.601 0 14.101-4.6 16.9-11.1 0-.101.1-.101.2-.2 1.699-.6 2.699-1 2.8-1l.6-.3V14.3l-.5-.2zM20.5 4c5.8 0 10.9 3 13.8 7.5.2.3-.1.6-.399.5-3.8-1-8.8-2-13.6-2-4.7 0-9.5 1-13.2 2-.3.1-.5-.2-.4-.5C9.7 7 14.8 4 20.5 4zm0 33c-5.9 0-11.1-3.1-14-7.899-.2-.301.1-.601.4-.5 3.9 1 8.9 2.1 13.6 2.1 5 0 9.9-1 13.601-2 .3-.1.5.2.399.5A16.422 16.422 0 0 1 20.5 37zm18.601-12.1c0 .1-.101.3-.2.3-2.5.9-10.4 3.6-18.4 3.6-7.1 0-15.6-2.699-18.3-3.6C2.1 25.2 2 25 2 24.9V16c0-.1.1-.3.2-.3 2.6-.9 10.6-3.6 18.2-3.6 7.5 0 15.899 2.7 18.5 3.6.1 0 .2.2.2.3v8.9z"/><path d="M18.7 24l6.4-3.7c.3-.2.3-.7 0-.8l-6.4-3.8c-.3-.2-.7 0-.7.4v7.4c0 .5.4.7.7.5z"/></g>\x3c!--Created by Nick Bluth from the Noun Project--\x3e</svg>\n',iconActive:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 41" overflow="visible"><g fill="currentColor" transform-origin="center" transform="scale(1.3)"><path d="M40.5 14.1c-.1-.1-1.2-.5-2.898-1-.102 0-.202-.1-.202-.2C34.5 6.5 28 2 20.5 2S6.6 6.5 3.7 12.9c0 .1-.1.1-.2.2-1.7.6-2.8 1-2.9 1l-.6.3v12.1l.6.2c.1 0 1.1.399 2.7.899.1 0 .2.101.2.199C6.3 34.4 12.9 39 20.5 39c7.602 0 14.102-4.6 16.9-11.1 0-.102.1-.102.199-.2 1.699-.601 2.699-1 2.801-1l.6-.3V14.3l-.5-.2zM6.701 11.5C9.7 7 14.8 4 20.5 4c5.8 0 10.9 3 13.8 7.5.2.3-.1.6-.399.5-3.799-1-8.799-2-13.6-2-4.7 0-9.5 1-13.2 2-.3.1-.5-.2-.4-.5zM25.1 20.3L18.7 24c-.3.2-.7 0-.7-.5v-7.4c0-.4.4-.6.7-.4l6.399 3.8c.301.1.301.6.001.8zm9.4 8.901A16.421 16.421 0 0 1 20.5 37c-5.9 0-11.1-3.1-14-7.898-.2-.302.1-.602.4-.5 3.9 1 8.9 2.1 13.6 2.1 5 0 9.9-1 13.602-2 .298-.1.5.198.398.499z"/></g>\x3c!--Created by Nick Bluth from the Noun Project--\x3e</svg>\n'}),this.plugin=this.viewer.getPlugin("autorotate"),this.plugin?.addEventListener(IT.type,this)}destroy(){this.plugin?.removeEventListener(IT.type,this),super.destroy()}isSupported(){return!!this.plugin}handleEvent(e){e instanceof IT&&this.toggleActive(e.autorotateEnabled)}onClick(){this.plugin.isEnabled()&&(this.plugin.config.autostartOnIdle=!1),this.plugin.toggle()}};DT.id="autorotate";var NT=oS.getConfigParser({autostartDelay:2e3,autostartOnIdle:!0,autorotateSpeed:oS.parseSpeed("2rpm"),autorotatePitch:null,autorotateZoomLvl:null,keypoints:null,startFromClosest:!0},{autostartOnIdle:(e,{rawConfig:t})=>e&&oS.isNil(t.autostartDelay)?(oS.logWarn("autostartOnIdle requires a non null autostartDelay"),!1):e,autorotateSpeed:e=>oS.parseSpeed(e),autorotatePitch:e=>oS.isNil(e)?null:oS.parseAngle(e,!0),autorotateZoomLvl:e=>oS.isNil(e)?null:Eg.clamp(e,0,100)});function OT(e){return[e.yaw,e.pitch]}var UT=class extends ZM{constructor(e,t){super(e,t),this.state={initialStart:!0,enabled:!1,idx:-1,curve:[],startStep:null,endStep:null,startTime:null,stepDuration:null,remainingPause:null,lastTime:null,tooltip:null},this.state.initialStart=!oS.isNil(this.config.autostartDelay)}init(){super.init(),this.video=this.viewer.getPlugin("video"),this.markers=this.viewer.getPlugin("markers"),this.config.keypoints&&(this.setKeypoints(this.config.keypoints),delete this.config.keypoints),this.viewer.addEventListener(pE.StopAllEvent.type,this),this.viewer.addEventListener(pE.BeforeRenderEvent.type,this),this.video||this.viewer.addEventListener(pE.KeypressEvent.type,this)}destroy(){this.viewer.removeEventListener(pE.StopAllEvent.type,this),this.viewer.removeEventListener(pE.BeforeRenderEvent.type,this),this.viewer.removeEventListener(pE.KeypressEvent.type,this),delete this.video,delete this.markers,delete this.keypoints,super.destroy()}handleEvent(e){switch(e.type){case pE.StopAllEvent.type:this.stop();break;case pE.BeforeRenderEvent.type:this.__beforeRender(e.timestamp);break;case pE.KeypressEvent.type:e.key===Hw.KEY_CODES.Space&&this.viewer.state.keyboardEnabled&&(this.toggle(),e.preventDefault())}}setKeypoints(e){if(e){if(e.length<2)throw new US("At least two points are required");this.keypoints=e.map(((e,t)=>{const n={position:null,markerId:null,pause:0,tooltip:null};let i;if("string"==typeof e?n.markerId=e:oS.isExtendedPosition(e)?i=e:(n.markerId=e.markerId,n.pause=e.pause,i=e.position,e.tooltip&&"object"==typeof e.tooltip?n.tooltip=e.tooltip:"string"==typeof e.tooltip&&(n.tooltip={content:e.tooltip})),n.markerId){if(!this.markers)throw new US(`Keypoint #${t} references a marker but the markers plugin is not loaded`);const e=this.markers.getMarker(n.markerId);n.position=OT(e.state.position)}else{if(!i)throw new US(`Keypoint #${t} is missing marker or position`);
28n.position=OT(this.viewer.dataHelper.cleanPosition(i))}return n}))}else this.keypoints=null;this.isEnabled()&&(this.stop(),this.start())}isEnabled(){return this.state.enabled}start(){this.isEnabled()||(this.viewer.stopAll(),this.keypoints?this.config.startFromClosest&&this.__shiftKeypoints():this.__animate(),this.state.initialStart=!1,this.state.enabled=!0,this.dispatchEvent(new IT(!0)))}stop(){this.isEnabled()&&(this.__hideTooltip(),this.__reset(),this.viewer.stopAnimation(),this.viewer.dynamics.position.stop(),this.viewer.dynamics.zoom.stop(),this.state.enabled=!1,this.dispatchEvent(new IT(!1)))}toggle(){this.isEnabled()?this.stop():this.start()}reverse(){this.isEnabled()&&!this.keypoints&&(this.config.autorotateSpeed=-this.config.autorotateSpeed,this.__animate())}__animate(){let e;e=oS.isNil(this.config.autorotateZoomLvl)?Promise.resolve(!0):this.viewer.animate({zoom:this.config.autorotateZoomLvl,speed:2*this.viewer.config.zoomSpeed+"rpm"}),e.then((e=>{e&&(this.viewer.dynamics.position.roll({yaw:this.config.autorotateSpeed<0},Math.abs(this.config.autorotateSpeed/this.viewer.config.moveSpeed)),this.viewer.dynamics.position.goto({pitch:this.config.autorotatePitch??this.viewer.config.defaultPitch},Math.abs(this.config.autorotateSpeed/this.viewer.config.moveSpeed)))}))}__reset(){this.state.idx=-1,this.state.curve=[],this.state.startStep=null,this.state.endStep=null,this.state.startTime=null,this.state.stepDuration=null,this.state.remainingPause=null,this.state.lastTime=null,this.state.tooltip=null}__beforeRender(e){(this.state.initialStart||this.config.autostartOnIdle)&&this.viewer.state.idleTime>0&&e-this.viewer.state.idleTime>this.config.autostartDelay&&this.start(),this.isEnabled()&&this.keypoints&&(this.state.startTime||(this.state.endStep=OT(this.viewer.getPosition()),this.__nextStep(),this.state.startTime=e,this.state.lastTime=e),this.__nextFrame(e))}__shiftKeypoints(){const e=OT(this.viewer.getPosition()),t=this.__findMinIndex(this.keypoints,(t=>oS.greatArcDistance(t.position,e)));this.keypoints.push(...this.keypoints.splice(0,t))}__incrementIdx(){this.state.idx++,this.state.idx===this.keypoints.length&&(this.state.idx=0)}__showTooltip(){const e=this.keypoints[this.state.idx];if(e.tooltip){const t=this.viewer.dataHelper.vector3ToViewerCoords(this.viewer.state.direction);this.state.tooltip=this.viewer.createTooltip({content:e.tooltip.content,position:e.tooltip.position,top:t.y,left:t.x})}else if(e.markerId){const t=this.markers.getMarker(e.markerId);t.showTooltip(),this.state.tooltip=t.tooltip}}__hideTooltip(){if(this.state.tooltip){const e=this.keypoints[this.state.idx];if(e.tooltip)this.state.tooltip.hide();else if(e.markerId){this.markers.getMarker(e.markerId).hideTooltip()}this.state.tooltip=null}}__nextPoint(){const e=[];if(-1===this.state.idx){const t=OT(this.viewer.getPosition());e.push(t,t,this.keypoints[0].position,this.keypoints[1].position)}else for(let t=-1;t<3;t++){const n=this.state.idx+t<0?this.keypoints[this.keypoints.length-1]:this.keypoints[(this.state.idx+t)%this.keypoints.length];e.push(n.position)}const t=[new Mg(e[0][0],e[0][1])];let n=0;for(let i=1;i<=3;i++){const r=e[i-1][0]-e[i][0];r>Math.PI?n+=1:r<-Math.PI&&(n-=1),0!==n&&1===i&&(t[0].x-=2*n*Math.PI,n=0),t.push(new Mg(e[i][0]+2*n*Math.PI,e[i][1]))}const i=new cw(t).getPoints(48).map((e=>[e.x,e.y]));this.state.curve=i.slice(17,33),-1!==this.state.idx?(this.state.remainingPause=this.keypoints[this.state.idx].pause,this.state.remainingPause?this.__showTooltip():this.__incrementIdx()):this.__incrementIdx()}__nextStep(){0===this.state.curve.length&&(this.__nextPoint(),this.state.endStep[0]=oS.parseAngle(this.state.endStep[0])),this.state.startStep=this.state.endStep,this.state.endStep=this.state.curve.shift();const e=oS.greatArcDistance(this.state.startStep,this.state.endStep);this.state.stepDuration=1e3*e/Math.abs(this.config.autorotateSpeed),0===e&&this.__nextStep()}__nextFrame(e){const t=e-this.state.lastTime;if(this.state.lastTime=e,this.state.remainingPause){if(this.state.remainingPause=Math.max(0,this.state.remainingPause-t),this.state.remainingPause>0)return;this.__hideTooltip(),this.__incrementIdx(),this.state.startTime=e}let n=(e-this.state.startTime)/this.state.stepDuration;n>=1&&(this.__nextStep(),n=0,this.state.startTime=e),this.viewer.rotate({y
28aw:this.state.startStep[0]+(this.state.endStep[0]-this.state.startStep[0])*n,pitch:this.state.startStep[1]+(this.state.endStep[1]-this.state.startStep[1])*n})}__findMinIndex(e,t){let n=0,i=Number.MAX_VALUE;return e.forEach(((e,r)=>{const s=t(e);s<i&&(i=s,n=r)})),n}};UT.id="autorotate",UT.VERSION="5.7.4",UT.configParser=NT,UT.readonlyOptions=["keypoints"],sT(DT,"start"),JM.lang[DT.id]="Automatic rotation";var kT=$i({props:{currentSectionUrl:{type:String}},data:()=>({viewer:null}),computed:{},methods:{initializeViewer(){this.viewer&&this.viewer.destroy(),this.currentSectionUrl&&(this.viewer=new RT({container:this.$refs.photoSphereViewer,panorama:this.currentSectionUrl,navbar:["autorotate","zoom","move"],plugins:[[UT,{autostartDelay:1e3,autorotatePitch:"0deg"}]]}))}},watch:{currentSectionUrl:"initializeViewer"}});var FT=(0,tp.Z)(kT,[["render",function(e,t,n,i,r,s){return eo(),oo("div",um,null,512)}]]);const VT=fo("h4",{class:"text-h4 pt-5 md:pt-2"},"Legend",-1),BT={class:"py-3"},zT={class:"flex flex-wrap gap-2"},HT=["src","alt"],GT={class:"text-sm mt-1"};var WT=$i({name:"Legend",props:{legend:{type:Array,required:!0}},methods:{}});var jT=(0,tp.Z)(WT,[["render",function(e,t,n,i,r,s){return eo(),oo("div",null,[VT,fo("div",BT,[fo("div",zT,[(eo(!0),oo($s,null,yr(e.legend,((e,t)=>(eo(),oo("div",{key:t,class:"flex items-start gap-2 w-[168px]"},[fo("img",{src:e.path,alt:e.name,class:"h-6"},null,8,HT),fo("span",GT,le(e.name),1)])))),128))])])])}]]);const qT=fo("div",{class:"text-h4"},"View",-1),XT={class:"flex flex-col py-4 gap-y-3"},$T=["name","value","checked"];var YT=$i({name:"LevelSelect",props:{options:{type:Array,required:!0},selectedLevel:{type:String,required:!0}},data(){return{radioselectedLevel:this.selectedLevel}},methods:{handleRadioClick(e){this.$emit("update:selectedLevel",e.target.value)}}});const ZT=(0,tp.Z)(YT,[["render",function(e,t,n,i,r,s){return eo(),oo("div",null,[qT,fo("div",XT,[(eo(!0),oo($s,null,yr(e.options,((n,i)=>(eo(),oo("label",{key:i,class:"radio-container flex items-center cursor-pointer"},[Ni(fo("input",{type:"radio",name:n.name,value:i,class:"cursor-pointer min-w-6 w-6 h-6 mr-3",onChange:t[0]||(t[0]=(...t)=>e.handleRadioClick&&e.handleRadioClick(...t)),"onUpdate:modelValue":t[1]||(t[1]=t=>e.radioselectedLevel=t),checked:e.radioselectedLevel===i.toString()},null,40,$T),[[Sl,e.radioselectedLevel]]),yo(" "+le(n.name),1)])))),128))])])}]]);var KT=ZT;const JT=fo("div",{class:"text-h4 pt-2"},"Show/Hide",-1),QT={class:"py-4 flex flex-col gap-y-3"},eA=["id","value","checked"],tA=["for"],nA={key:0,class:"flex flex-row gap-x-3 pt-2"};var iA=$i({name:"Filters",props:{options:{type:Array,required:!0},selectedFilters:{type:Array,required:!0}},data(){return{selectedCheckboxes:this.selectedFilters?this.selectedFilters:[]}},methods:{isChecked(e){return this.selectedCheckboxes.includes(e)},handleSelectAll(){const e=this.options.map((e=>e.layer));for(const t of e)this.selectedCheckboxes.includes(t)||this.selectedCheckboxes.push(t);for(var t=this.$refs.checkBoxes,n=0;n<t.length;n++)t[n].checked=!0;this.$emit("update:selectedFilters",this.selectedCheckboxes)},handleClearAll(){const e=this.options.map((e=>e.layer));this.selectedCheckboxes=this.selectedCheckboxes.filter((t=>!e.includes(t))),this.$emit("update:selectedFilters",this.selectedCheckboxes)},handleCheckBoxClick(){this.$emit("update:selectedFilters",this.selectedCheckboxes)}}});const rA=(0,tp.Z)(iA,[["render",function(e,t,n,i,r,s){return eo(),oo("div",null,[JT,fo("div",QT,[(eo(!0),oo($s,null,yr(e.options,((n,i)=>(eo(),oo("div",{key:i,class:"flex items-center relative cursor-pointer"},[Ni(fo("input",{ref_for:!0,ref:"checkBoxes",type:"checkbox",id:n.layer+i.toString(),value:n.layer,class:"absolute cursor-pointer h-6 w-6","onUpdate:modelValue":t[0]||(t[0]=t=>e.selectedCheckboxes=t),checked:e.isChecked(n.layer),onChange:t[1]||(t[1]=(...t)=>e.handleCheckBoxClick&&e.handleCheckBoxClick(...t))},null,40,eA),[[bl,e.selectedCheckboxes]]),fo("label",{for:n.layer+i.toString(),class:"ml-9 cursor-pointer"},le(n.label),9,tA)])))),128)),e.options.length>1?(eo(),oo("div",nA,[fo("button",{onClick:t[2]||(t[2]=(...t)=>e.handleSelectAll&&e.handleSelectAll(...t)),class:"sq-btn sq-btn-sm sq-btn-primary"}," Select All "),fo("button",{onClick:t[3]||(t[3]=(...t)=>e.handleClearAll&&e.handleClearAll(...t)),class:"sq-btn sq-btn-sm sq-btn-white"}," Clear All ")])):bo("v-if",!0)])])}]]);var sA=rA;!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".mapdiv[data-v-dbf82c40]{width:100%;height:100%}.custom-control-wrapper[data-v-d099a3a6]{display:none}.mapdiv .custom-control-wrapper[data-v-d099a3a6]{display:inline-block}.info-window-wrapper[data-v-cbe1707b]{display:none}.mapdiv .info-window-wrapper[data-v-cbe1707b]{display:inline-block}.custom-marker-wrapper[data-v-2d2d343a]{display:none}.mapdiv .custom-marker-wrapper[data-v-2d2d343a]{display:inline-block}")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();var oA=Object.defineProperty,aA=(e,t,n)=>(((e,t,n)=>{t in e?oA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const lA=Symbol("map"),cA=Symbol("api"),hA=Symbol("marker"),uA=Symbol("markerCluster"),dA=Symbol("CustomMarker"),pA=Symbol("mapTilesLoaded"),fA=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"]; 29/*! ***************************************************************************** 30Copyright (c) Microsoft Corporation. 31 32Permission to use, copy, modify, and/or distribute this software for any 33purpose with or without fee is hereby granted. 34 35THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 36REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 37AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 38INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 39LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 40OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 41PERFORMANCE OF THIS SOFTWARE. 42***************************************************************************** */function mA(e,t,n,i){return new(n||(n=Prom
42ise))((function(r,s){function o(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(o,a)}l((i=i.apply(e,t||[])).next())}))}var gA=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var i,r,s;if(Array.isArray(t)){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((i=(s=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=i;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=i;0!=r--;){var o=s[r];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n};const vA="__googleMapsScriptId";var _A,yA;(yA=_A||(_A={}))[yA.INITIALIZED=0]="INITIALIZED",yA[yA.LOADING=1]="LOADING",yA[yA.SUCCESS=2]="SUCCESS",yA[yA.FAILURE=3]="FAILURE";class xA{constructor({apiKey:e,authReferrerPolicy:t,channel:n,client:i,id:r=vA,language:s,libraries:o=[],mapIds:a,nonce:l,region:c,retries:h=3,url:u="https://maps.googleapis.com/maps/api/js",version:d}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=t,this.channel=n,this.client=i,this.id=r||vA,this.language=s,this.libraries=o,this.mapIds=a,this.nonce=l,this.region=c,this.retries=h,this.url=u,this.version=d,xA.instance){if(!gA(this.options,xA.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(xA.instance.options)}`);return xA.instance}xA.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?_A.FAILURE:this.done?_A.SUCCESS:this.loading?_A.LOADING:_A.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=__googleMapsCallback",this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`®ion=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((e,t)=>{this.loadCallback((n=>{n?t(n.error):e(window.google)}))}))}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,t;if(document.getElementById(this.id))return void this.callback();const n={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(n).forEach((e=>!n[e]&&delete n[e])),null!==(t=null===(e=null==window?void 0:window.google)||void 0===e?void 0:e.maps)&&void 0!==t&&t.importLibrary||(e=>{let t,n,i,r="The Google Maps JavaScript API",s="google",o="importLibrary",a="__ib__",l=document,c=window;c=c[s]||(c[s]={});const h=c.maps||(c.maps={}),u=new Set,d=new URLSearchParams,p=()=>t||(t=new Promise(((o,c)=>mA(this,void 0,void 0,(function*(){var p;for(i in yield n=l.createElement("script"),n.id=this.id,d.set("libraries",[...u]+""),e)d.set(i.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase())),e[i]);d.set("callback",s+".maps."+a),n.src=this.url+"?"+d,h[a]=o,n.onerror=()=>t=c(Error(r+" could not load.")),n.nonce=this.nonce||(null===(p=l.querySelector("script[n
42once]"))||void 0===p?void 0:p.nonce)||"",l.head.append(n)})))));h[o]?console.warn(r+" only loads once. Ignoring:",e):h[o]=(e,...t)=>u.add(e)&&p().then((()=>h[o](e,...t)))})(n);const i=this.libraries.map((e=>this.importLibrary(e)));i.length||i.push(this.importLibrary("core")),Promise.all(i).then((()=>this.callback()),(e=>{const t=new ErrorEvent("error",{error:e});this.loadErrorCallback(t)}))}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const e=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${e} ms.`),setTimeout((()=>{this.deleteScript(),this.setScript()}),e)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((e=>{e(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading||(this.loading=!0,this.setScript())}}}let bA;const wA=["bounds_changed","center_changed","click","contextmenu","dblclick","drag","dragend","dragstart","heading_changed","idle","isfractionalzoomenabled_changed","mapcapabilities_changed","maptypeid_changed","mousemove","mouseout","mouseover","projection_changed","renderingtype_changed","rightclick","tilesloaded","tilt_changed","zoom_changed"],SA=$i({props:{apiPromise:{type:Promise},apiKey:{type:String,default:""},version:{type:String,default:"weekly"},libraries:{type:Array,default:()=>["places"]},region:{type:String,required:!1},language:{type:String,required:!1},backgroundColor:{type:String,required:!1},center:{type:Object,default:()=>({lat:0,lng:0})},clickableIcons:{type:Boolean,required:!1,default:void 0},controlSize:{type:Number,required:!1},disableDefaultUi:{type:Boolean,required:!1,default:void 0},disableDoubleClickZoom:{type:Boolean,required:!1,default:void 0},draggable:{type:Boolean,required:!1,default:void 0},draggableCursor:{type:String,required:!1},draggingCursor:{type:String,required:!1},fullscreenControl:{type:Boolean,required:!1,default:void 0},fullscreenControlPosition:{type:String,required:!1},gestureHandling:{type:String,required:!1},heading:{type:Number,required:!1},isFractionalZoomEnabled:{type:Boolean,required:!1,default:void 0},keyboardShortcuts:{type:Boolean,required:!1,default:void 0},mapTypeControl:{type:Boolean,required:!1,default:void 0},mapTypeControlOptions:{type:Object,required:!1},mapTypeId:{type:[Number,String],required:!1},mapId:{type:String,required:!1},maxZoom:{type:Number,required:!1},minZoom:{type:Number,required:!1},noClear:{type:Boolean,required:!1,default:void 0},panControl:{type:Boolean,required:!1,default:void 0},panControlPosition:{type:String,required:!1},restriction:{type:Object,required:!1},rotateControl:{type:Boolean,required:!1,default:void 0},rotateControlPosition:{type:String,required:!1},scaleControl:{type:Boolean,required:!1,default:void 0},scaleControlStyle:{type:Number,required:!1},scrollwheel:{type:Boolean,required:!1,default:void 0},streetView:{type:Object,required:!1},streetViewControl:{type:Boolean,required:!1,default:void 0},streetViewControlPosition:{type:String,required:!1},styles:{type:Array,required:!1},tilt:{type:Number,required:!1},zoom:{type:Number,required:!1},zoomControl:{type:Boolean,required:!1,default:void 0},zoomControlPosition:{type:String,required:!1},nonce:{type:String,default:""}},emits:wA,setup(e,{emit:t}){const n=Wt(),i=Wt(!1),r=Wt(),s=Wt(),o=Wt(!1);os(lA,r),os(cA,s),os(pA,o);const a=()=>{const t={...e};Object.keys(t).forEach((e=>{void 0===t[e]&&delete t[e]}));const n=e=>{var t;return e?{position:null==(t=s.value)?void 0:t.ControlPosition[e]}:{}},i={scaleControlOptions:e.scaleControlStyle?{style:e.scaleControlStyle}:{},panControlOptions:n(e.panControlPosition),zoomControlOptions:n(e.zoomControlPosition),rotateControlOptions:n(e.rotateControlPosition),streetViewControlOptions:n(e.streetViewControlPosition),fullscreenControlOptions:n(e.fullscreenControlPosition),disableDefaultUI:e.disableDefaultUi};return{...t,...i}},l=Ri([s,r],(([e,t])=>{const n=t;e&&n&&(e.event.addListenerOnce(n,"tilesloaded",(()=>{o.value=!0})),setTimeout(l,0))}),{immediate:!0}),c=o=>{s.value=Ut(o.maps),r.value=Ut(new o.maps.Map(n.value,a()));const l=function(e){return class extends e.OverlayView{constructor(e){super(),aA(this,"element"),aA(this,"opts");const{element:t,...n}=e;this.element=t,this.opts=n,this.opts.map&&this.setMap(this.opts.map)}getPosition(){return this.opts.position?this.opts.position instanceof e.LatLng?this.opts.position:new e.LatLng(this.opts.position):null}getVisible(){if(!this.element)return!1;const e=this.element;
42return"none"!==e.style.display&&"hidden"!==e.style.visibility&&(""===e.style.opacity||Number(e.style.opacity)>.01)}onAdd(){if(!this.element)return;const e=this.getPanes();e&&e.overlayMouseTarget.appendChild(this.element)}draw(){if(!this.element)return;const e=this.getProjection(),t=null==e?void 0:e.fromLatLngToDivPixel(this.getPosition());if(t){this.element.style.position="absolute";const e=this.element.offsetHeight,n=this.element.offsetWidth;let i,r;switch(this.opts.anchorPoint){case"TOP_CENTER":i=t.x-n/2,r=t.y;break;case"BOTTOM_CENTER":i=t.x-n/2,r=t.y-e;break;case"LEFT_CENTER":i=t.x,r=t.y-e/2;break;case"RIGHT_CENTER":i=t.x-n,r=t.y-e/2;break;case"TOP_LEFT":i=t.x,r=t.y;break;case"TOP_RIGHT":i=t.x-n,r=t.y;break;case"BOTTOM_LEFT":i=t.x,r=t.y-e;break;case"BOTTOM_RIGHT":i=t.x-n,r=t.y-e;break;default:i=t.x-n/2,r=t.y-e/2}this.element.style.left=i+"px",this.element.style.top=r+"px",this.element.style.transform=`translateX(${this.opts.offsetX||0}px) translateY(${this.opts.offsetY||0}px)`,this.opts.zIndex&&(this.element.style.zIndex=this.opts.zIndex.toString())}}onRemove(){this.element&&this.element.remove()}setOptions(e){const{element:t,...n}=e;this.element=t,this.opts=n,this.draw()}}}(s.value);s.value[dA]=l,wA.forEach((e=>{var n;null==(n=r.value)||n.addListener(e,(n=>t(e,n)))})),i.value=!0;Ri([()=>e.center,()=>e.zoom,...Object.keys(e).filter((e=>!["apiPromise","apiKey","version","libraries","region","language","center","zoom","nonce"].includes(e))).map((t=>sn(e,t)))],(([e,t],[n,i])=>{var s,o,l;const{center:c,zoom:h,...u}=a();null==(s=r.value)||s.setOptions(u),void 0!==t&&t!==i&&(null==(o=r.value)||o.setZoom(t));const d=!n||e.lng!==n.lng||e.lat!==n.lat;e&&d&&(null==(l=r.value)||l.panTo(e))}))};return hr((()=>{e.apiPromise&&e.apiPromise instanceof Promise?e.apiPromise.then(c):((()=>{try{const{apiKey:t,region:n,version:i,language:r,libraries:s,nonce:o}=e;bA=new xA({apiKey:t,region:n,version:i,language:r,libraries:s,nonce:o})}catch(e){console.error(e)}})(),bA.load().then(c))})),pr((()=>{var e;o.value=!1,r.value&&(null==(e=s.value)||e.event.clearInstanceListeners(r.value))})),{mapRef:n,ready:i,map:r,api:s,mapTilesLoaded:o}}}),EA=(e,t)=>{const n=e.__vccOpts||e;for(const[e,i]of t)n[e]=i;return n},MA={ref:"mapRef",class:"mapdiv"};const TA=EA(SA,[["render",function(e,t,n,i,r,s){return eo(),oo("div",null,[fo("div",MA,null,512),br(e.$slots,"default",Y(vo({ready:e.ready,map:e.map,api:e.api,mapTilesLoaded:e.mapTilesLoaded})),void 0,!0)])}],["__scopeId","data-v-dbf82c40"]]);function AA(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var CA=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var i,r,s;if(Array.isArray(t)){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((i=(s=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=i;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=i;0!=r--;){var o=s[r];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n};const RA=AA(CA),PA=(e,t,n,i)=>{const r=Wt(),s=as(lA,Wt()),o=as(cA,Wt()),a=as(uA,Wt()),l=Jo((()=>!!(a.value&&o.value&&(r.value instanceof o.value.Marker||r.value instanceof o.value[dA]))));return Ri([s,n],((c,[h,u])=>{var d,p,f;const m=!RA(n.value,u)||s.value!==h;!s.value||!o.value||!m||(r.value?(r.value.setOptions(n.value),l.value&&(null==(d=a.value)||d.removeMarker(r.value),null==(p=a.value)||p.addMarker(r.value))):((e=>"Marker"===e)(e)||(e=>e===dA)(e)?r.value=Ut(new o.value[e](n.value)):r.value=Ut(new o.value[e]({...n.value,map:s.value})),l.value?null==(f=a.value)||f.addMarker(r.value):r.value.setMap(s.value),t.forEach((e=>{var t;null==(t=r.value)||t.addListener(e,(t=>i(e,t)))}))))}),{immediate:!0}),pr((()=>{var e,t;r.value&&(null==(e=o.value)||e.event.clearInstanceListeners(r.value),l.value?null==(t=a.value)||t.removeMarker(r.value):r.value.setMap(null))})),r},LA=["animation_changed","click","dblclick","rightclick","dragstart","dragend","drag","mouseover","mousedown","mouseout","mouseup","draggable_changed","clickable_changed","contextmenu","cursor_changed","flat_changed","rightclick","zindex_changed","icon_changed","position_changed","shape_changed","title_changed","visible_changed"],IA=($i({name:"Marker",props:{options:{type:Object,required:!0}},emits:LA,setup(e,{emit:t,expose:n,slots:i}){const r=sn(e,"options"),s=PA("Marker",LA,r,t);return os(hA,s),n({marker:s}),()=>{var e;return null==(e=i.default)?void 0:e.call(i)}}}),$i({name:"Polyline",props:{options:{type:Object,required:!0}},emits:fA,setup(e,{emit:t}){const n=sn(e,"options");return{polyline:PA("Polyline",fA,n,t)}},render:()=>null}),$i({name:"Polygon",props:{options:{type:Object,required:!0}},emits:fA,setup(e,{emit:t}){const n=sn(e,"options");return{polygon:PA("Polygon",fA,n,t)}},render:()=>null}),fA.concat(["bounds_changed"])),DA=($i({name:"Rectangle",props:{options:{type:Object,required:!0}},emits:IA,setup(e,{emit:t}){const n=sn(e,"options");return{rectangle:PA("Rectangle",IA,n,t)}},render:()=>null}),fA.concat(["center_changed","radius_changed"]));$i({name:"Circle",props:{options:{type:Object,required:!0}},emits:DA,setup(e,{emit:t}){const n=sn(e,"options");return{circle:PA("Circle",DA,n,t)}},render:()=>null}),$i({props:{position:{type:String,required:!0},index:{type:Number,default:1}},emits:["content:loaded"],setup(e,{emit:t}){const n=Wt(null),i=as(lA,Wt()),r=as(cA,Wt()),s=Ri([as(pA,Wt(!1)),r,n],(([n,i,r])=>
42{i&&n&&r&&(o(e.position),t("content:loaded"),setTimeout(s,0))}),{immediate:!0}),o=e=>{if(i.value&&r.value&&n.value){const t=r.value.ControlPosition[e];i.value.controls[t].push(n.value)}},a=e=>{if(i.value&&r.value){let t=null;const s=r.value.ControlPosition[e];i.value.controls[s].forEach(((e,i)=>{e===n.value&&(t=i)})),null!==t&&i.value.controls[s].removeAt(t)}};return pr((()=>a(e.position))),Ri((()=>e.position),((e,t)=>{a(t),o(e)})),Ri((()=>e.index),(t=>{t&&n.value&&(n.value.index=e.index)})),{controlRef:n}}});const NA=["closeclick","content_changed","domready","position_changed","visible","zindex_changed"];$i({inheritAttrs:!1,props:{options:{type:Object,default:()=>({})},modelValue:{type:Boolean}},emits:[...NA,"update:modelValue"],setup(e,{slots:t,emit:n,expose:i}){const r=Wt(),s=Wt(),o=as(lA,Wt()),a=as(cA,Wt()),l=as(hA,Wt());let c,h=e.modelValue;const u=Jo((()=>{var e;return null==(e=t.default)?void 0:e.call(t).some((e=>e.type!==Zs))})),d=e=>{h=e,n("update:modelValue",e)},p=e=>{r.value&&(r.value.open({map:o.value,anchor:l.value,...e}),d(!0))},f=()=>{r.value&&(r.value.close(),d(!1))};return hr((()=>{Ri([o,()=>e.options],(([e,t],[i,f])=>{var m;const g=!RA(t,f)||o.value!==i;o.value&&a.value&&g&&(r.value?(r.value.setOptions({...t,content:u.value?s.value:t.content}),l.value||p()):(r.value=Ut(new a.value.InfoWindow({...t,content:u.value?s.value:t.content})),l.value&&(c=l.value.addListener("click",(()=>{p()}))),(!l.value||h)&&p(),NA.forEach((e=>{var t;null==(t=r.value)||t.addListener(e,(t=>n(e,t)))})),null==(m=r.value)||m.addListener("closeclick",(()=>d(!1)))))}),{immediate:!0}),Ri((()=>e.modelValue),(e=>{e!==h&&(e?p():f())}))})),pr((()=>{var e;c&&c.remove(),r.value&&(null==(e=a.value)||e.event.clearInstanceListeners(r.value),f())})),i({infoWindow:r,open:p,close:f}),{infoWindow:r,infoWindowRef:s,hasSlotContent:u,open:p,close:f}}});const OA=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class UA{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[t,n]=new Uint8Array(e,0,2);if(219!==t)throw new Error("Data does not appear to be in a KDBush format.");const i=n>>4;if(1!==i)throw new Error(`Got v${i} data when expected v1.`);const r=OA[15&n];if(!r)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(e,2,1),[o]=new Uint32Array(e,4,1);return new UA(o,s,r,e)}constructor(e,t=64,n=Float64Array,i){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const r=OA.indexOf(this.ArrayType),s=2*e*this.ArrayType.BYTES_PER_ELEMENT,o=e*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-o%8)%8;if(r<0)throw new Error(`Unexpected typed array class: ${n}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+o+a,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+s+o+a),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+o+a,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+r]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){const n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=t,n}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return kA(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,n,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:r,coords:s,nodeSize:o}=this,a=[0,r.length-1,0],l=[];for(;a.length;){const c=a.pop()||0,h=a.pop()||0,u=a.pop()||0;if(h-u<=o){for(let o=u;o<=h;o++){const a=s[2*o],c=s[2*o+1];a>=e&&a<=n&&c>=t&&c<=i&&l.push(r[o])}continue}const d=u+h>>1,p=s[2*d],f=s[2*d+1];p>=e&&p<=n&&f>=t&&f<=i&&l.push(r[d]),(0===c?e<=p:t<=f)&&(a.push(u),a.push(d-1),a.push(1-c)),(0===c?n>=p:i>=f)&&(a.push(d+1),a.push(h),a.push(1-c))}return l}within(e,t,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:r,nodeSize:s}=this,o=[0,i.length-1,0],a=[],l=n*n;for(;o.length;){const c=o.pop()||0,h=o.pop()||0,u=o.pop()||0;if(h-u<=s){for(let n=u;n<=h;n++)zA(r[2*n],r[2*n+1],e,t)<=l&&a.push(i[n]);continue}const d=u+h>>1,p=r[2*d],f=r[2*d+1];zA(p,f,e,t)<=l&&a.push(i[d]),(0===c?e-n<=p:t-n<=f)&&(o.push(u),o.push(d-1),o.push(1-c)),(0===c?e+n>=p:t+n>=f)&&(o.push(d+1),o.push(h),o.push(1-c))}return a}}function kA(e,t,n,i,r,s){if(r-i<=n)return;const o=i+r>>1;FA(e,t,o,i,r,s),kA(e,t,n,i,o-1,1-s),kA(e,t,n,o+1,r,1-s)}function FA(e,t,n,i,r,s){for(;r>i;){if(r-i>600){const o=r-i+1,a=n-i+1,l=Math.log(o),c=.5*Math.exp(2*l/3),h=.5*Math.sqrt(l*c*(o-c)/o)*(a-o/2<0?-1:1);FA(e,t,n,Math.max(i,Math.floor(n-a*c/o+h)),Math.min(r,Math.floor(n+(o-a)*c/o+h)),s)}const o=t[2*n+s];let a=i,l=r;
vendor: 5,218 bytes, line 42
42for(VA(e,t,i,n),t[2*r+s]>o&&VA(e,t,i,r);a<l;){for(VA(e,t,a,l),a++,l--;t[2*a+s]<o;)a++;for(;t[2*l+s]>o;)l--}t[2*i+s]===o?VA(e,t,i,l):(l++,VA(e,t,l,r)),l<=n&&(i=l+1),n<=l&&(r=l-1)}}function VA(e,t,n,i){BA(e,n,i),BA(t,2*n,2*i),BA(t,2*n+1,2*i+1)}function BA(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function zA(e,t,n,i){const r=e-n,s=t-i;return r*r+s*s}const HA={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},GA=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1));class WA{constructor(e){this.options=Object.assign(Object.create(HA),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:n,maxZoom:i}=this.options;t&&console.time("total time");const r=`prepare ${e.length} points`;t&&console.time(r),this.points=e;const s=[];for(let t=0;t<e.length;t++){const n=e[t];if(!n.geometry)continue;const[i,r]=n.geometry.coordinates,o=GA(XA(i)),a=GA($A(r));s.push(o,a,1/0,t,-1,1),this.options.reduce&&s.push(0)}let o=this.trees[i+1]=this._createTree(s);t&&console.timeEnd(r);for(let e=i;e>=n;e--){const n=+Date.now();o=this.trees[e]=this._createTree(this._cluster(o,e)),t&&console.log("z%d: %d clusters in %dms",e,o.numItems,+Date.now()-n)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let n=((e[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[1]));let r=180===e[2]?180:((e[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,r=180;else if(n>r){const e=this.getClusters([n,i,180,s],t),o=this.getClusters([-180,i,r,s],t);return e.concat(o)}const o=this.trees[this._limitZoom(t)],a=o.range(XA(n),$A(s),XA(r),$A(i)),l=o.data,c=[];for(const e of a){const t=this.stride*e;c.push(l[t+5]>1?jA(l,t,this.clusterProps):this.points[l[t+3]])}return c}getChildren(e){const t=this._getOriginId(e),n=this._getOriginZoom(e),i="No cluster with the specified id.",r=this.trees[n];if(!r)throw new Error(i);const s=r.data;if(t*this.stride>=s.length)throw new Error(i);const o=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=s[t*this.stride],l=s[t*this.stride+1],c=r.within(a,l,o),h=[];for(const t of c){const n=t*this.stride;s[n+4]===e&&h.push(s[n+5]>1?jA(s,n,this.clusterProps):this.points[s[n+3]])}if(0===h.length)throw new Error(i);return h}getLeaves(e,t,n){t=t||10,n=n||0;const i=[];return this._appendLeaves(i,e,t,n,0),i}getTile(e,t,n){const i=this.trees[this._limitZoom(e)],r=Math.pow(2,e),{extent:s,radius:o}=this.options,a=o/s,l=(n-a)/r,c=(n+1+a)/r,h={features:[]};return this._addTileFeatures(i.range((t-a)/r,l,(t+1+a)/r,c),i.data,t,n,r,h),0===t&&this._addTileFeatures(i.range(1-a/r,l,1,c),i.data,r,n,r,h),t===r-1&&this._addTileFeatures(i.range(0,l,a/r,c),i.data,-1,n,r,h),h.features.length?h:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const n=this.getChildren(e);if(t++,1!==n.length)break;e=n[0].properties.cluster_id}return t}_appendLeaves(e,t,n,i,r){const s=this.getChildren(t);for(const t of s){const s=t.properties;if(s&&s.cluster?r+s.point_count<=i?r+=s.point_count:r=this._appendLeaves(e,s.cluster_id,n,i,r):r<i?r++:e.push(t),e.length===n)break}return r}_createTree(e){const t=new UA(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let n=0;n<e.length;n+=this.stride)t.add(e[n],e[n+1]);return t.finish(),t.data=e,t}_addTileFeatures(e,t,n,i,r,s){for(const o of e){const e=o*this.stride,a=t[e+5]>1;let l,c,h;if(a)l=qA(t,e,this.clusterProps),c=t[e],h=t[e+1];else{const n=this.points[t[e+3]];l=n.properties;const[i,r]=n.geometry.coordinates;c=XA(i),h=$A(r)}const u={type:1,geometry:[[Math.round(this.options.extent*(c*r-n)),Math.round(this.options.extent*(h*r-i))]],tags:l};let d;d=a||this.options.generateId?t[e+3]:this.points[t[e+3]].id,void 0!==d&&(u.id=d),s.features.push(u)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:n,extent:i,reduce:r,minPoints:s}=this.options,o=n/(i*Math.pow(2,t)),a=e.data,l=[],c=this.stride;for(let n=0;n<a.length;n+=c){if(a[n+2]<=t)continue;a[n+2]=t;const i=a[n],h=a[n+1],u=e.within(a[n],a[n+1],o),d=a[n+5];let p=d;for(const e of u){const n=e*c;a[n+2]>t&&(p+=a[n+5])}if(p>d&&p>=s){let e,s=i*d,o=h*d,f=-1;const m=((n/c|0)<<5)+(t+1)+this.points.length;for(const i of u){const l=i*c;if(a[l+2]<=t)continue;a[l+2]=t;const h=a[l+5];s+=a[l]*h,o+=a[l+1]*h,a[l+4]=m,r&&(e||(e=this._map(a,n,!0),f=this.clusterProps.length,this.clusterProps.push(e)),r(e,this._map(a,l)))}a[n+4]=m,l.push(s/p,o/p,1/0,m,-1,p),r&&l.push(f)}else{for(let e=0;e<c;e++)l.push(a[n+e]);if(p>1)for(const e of u){const n=e*c;if(!(a[n+2]<=t)){a[n+2]=t;for(let e=0;e<c;e++)l.push(a[n+e])}}}}return l}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,n){if(e[t+5]>1){const i=this.clusterProps[e[t+6]];return n?Object.assign({},i):i}const i=this.points[e[t+3]].properties,r=this.options.map(i);return n&&r===i?Object.assign({},r):r}}function jA(e,t,n){return{type:"Feature",id:e[t+3],properties:qA(e,t,n),geometry:{type:"Point",coordinates:[YA(e[t]),ZA(e[t+1])]}}}function qA(e,t,n){const i=e[t+5],r=i>=1e4?`${Math.round(i/1e3)}
42k`:i>=1e3?Math.round(i/100)/10+"k":i,s=e[t+6],o=-1===s?{}:Object.assign({},n[s]);return Object.assign(o,{cluster:!0,cluster_id:e[t+3],point_count:i,point_count_abbreviated:r})}function XA(e){return e/360+.5}function $A(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function YA(e){return 360*(e-.5)}function ZA(e){const t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90} 43/*! ***************************************************************************** 44Copyright (c) Microsoft Corporation. 45 46Permission to use, copy, modify, and/or distribute this software for any 47purpose with or without fee is hereby granted. 48 49THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 50REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 51AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 52INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 53LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 54OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 55PERFORMANCE OF THIS SOFTWARE. 56***************************************************************************** */function KA(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}class JA{static isAdvancedMarkerAvailable(e){return google.maps.marker&&!0===e.getMapCapabilities().isAdvancedMarkersAvailable}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,t){this.isAdvancedMarker(e)?e.map=t:e.setMap(t)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(e.position.lat&&e.position.lng)return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return!!this.isAdvancedMarker(e)||e.getVisible()}}class QA{constructor({markers:e,position:t}){this.markers=e,t&&(t instanceof google.maps.LatLng?this._position=t:this._position=new google.maps.LatLng(t))}get bounds(){if(0===this.markers.length&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const t of this.markers)e.extend(JA.getPosition(t));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter((e=>JA.getVisible(e))).length}push(e){this.markers.push(e)}delete(){this.marker&&(JA.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}const eC=(e,t,n,i)=>{const r=tC(e.getBounds(),t,i);return n.filter((e=>r.contains(JA.getPosition(e))))},tC=(e,t,n)=>{const{northEast:i,southWest:r}=iC(e,t),s=rC({northEast:i,southWest:r},n);return sC(s,t)},nC=(e,t,n)=>
56{const i=tC(e,t,n),r=i.getNorthEast(),s=i.getSouthWest();return[s.lng(),s.lat(),r.lng(),r.lat()]},iC=(e,t)=>({northEast:t.fromLatLngToDivPixel(e.getNorthEast()),southWest:t.fromLatLngToDivPixel(e.getSouthWest())}),rC=({northEast:e,southWest:t},n)=>(e.x+=n,e.y-=n,t.x-=n,t.y+=n,{northEast:e,southWest:t}),sC=({northEast:e,southWest:t},n)=>{const i=n.fromDivPixelToLatLng(t),r=n.fromDivPixelToLatLng(e);return new google.maps.LatLngBounds(i,r)};class oC{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return lC(e)}}class aC extends oC{constructor(e){var{viewportPadding:t=60}=e;super(KA(e,["viewportPadding"])),this.viewportPadding=60,this.viewportPadding=t}calculate({markers:e,map:t,mapCanvasProjection:n}){return t.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:eC(t,n,e,this.viewportPadding),map:t,mapCanvasProjection:n})}}}const lC=e=>e.map((e=>new QA({position:JA.getPosition(e),markers:[e]})));class cC extends oC{constructor(e){var{maxZoom:t,radius:n=60}=e,i=KA(e,["maxZoom","radius"]);super({maxZoom:t}),this.state={zoom:-1},this.superCluster=new WA(Object.assign({maxZoom:this.maxZoom,radius:n},i))}calculate(e){let t=!1;const n={zoom:e.map.getZoom()};if(!RA(e.markers,this.markers)){t=!0,this.markers=[...e.markers];const n=this.markers.map((e=>{const t=JA.getPosition(e);return{type:"Feature",geometry:{type:"Point",coordinates:[t.lng(),t.lat()]},properties:{marker:e}}}));this.superCluster.load(n)}return t||(this.state.zoom<=this.maxZoom||n.zoom<=this.maxZoom)&&(t=!RA(this.state,n)),this.state=n,t&&(this.cluster
56s=this.cluster(e)),{clusters:this.clusters,changed:t}}cluster({map:e}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map((e=>this.transformCluster(e)))}transformCluster({geometry:{coordinates:[e,t]},properties:n}){if(n.cluster)return new QA({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map((e=>e.properties.marker)),position:{lat:t,lng:e}});const i=n.marker;return new QA({markers:[i],position:JA.getPosition(i)})}}class hC extends aC{constructor(e){var{maxZoom:t,radius:n=60,viewportPadding:i=60}=e,r=KA(e,["maxZoom","radius","viewportPadding"]);super({maxZoom:t,viewportPadding:i}),this.superCluster=new WA(Object.assign({maxZoom:this.maxZoom,radius:n},r)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(e){const t={zoom:Math.round(e.map.getZoom()),view:nC(e.map.getBounds(),e.mapCanvasProjection,this.viewportPadding)};let n=!RA(this.state,t);if(!RA(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const t=this.markers.map((e=>{const t=JA.getPosition(e);return{type:"Feature",geometry:{type:"Point",coordinates:[t.lng(),t.lat()]},properties:{marker:e}}}));this.superCluster.load(t)}
56return n&&(this.clusters=this.cluster(e),this.state=t),{clusters:this.clusters,changed:n}}cluster({map:e,mapCanvasProjection:t}){const n={zoom:Math.round(e.getZoom()),view:nC(e.getBounds(),t,this.viewportPadding)};return this.superCluster.getClusters(n.view,n.zoom).map((e=>this.transformCluster(e)))}transformCluster({geometry:{coordinates:[e,t]},properties:n}){if(n.cluster)return new QA({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map((e=>e.properties.marker)),position:{lat:t,lng:e}});const i=n.marker;return new QA({markers:[i],position:JA.getPosition(i)})}}class uC{constructor(e,t){this.markers={sum:e.length};const n=t.map((e=>e.count)),i=n.reduce(((e,t)=>e+t),0);this.clusters={count:t.length,markers:{mean:i/t.length,sum:i,min:Math.min(...n),max:Math.max(...n)}}}}class dC{render({count:e,position:t},n,i){const r=`<svg fill="${e>Math.max(10,n.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">\n<circle cx="120" cy="120" opacity=".6" r="70" />\n<circle cx="120" cy="120" opacity=".3" r="90" />\n<circle cx="120" cy="120" opacity=".2" r="110" />\n<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>\n</svg>`,s=`Cluster of ${e} markers`,o=Number(google.maps.Marker.MAX_ZINDEX)+e;if(JA.isAdvancedMarkerAvailable(i)){const e=document.createElement("div");e.innerHTML=r;const n=e.firstElementChild;n.setAttribute("transform","translate(0 25)");const a={map:i,position:t,zIndex:o,title:s,content:n};return new google.maps.marker.AdvancedMarkerElement(a)}const a={position:t,zIndex:o,title:s,icon:{url:`data:image/svg+xml;base64,${btoa(r)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(a)}}class pC{constructor(){!function(e,t){for(let n in t.prototype)e.prototype[n]=t.prototype[n]}(pC,google.maps.OverlayView)}}var fC;!function(e){e.CLUSTERING_BEGIN="clusteringbegin",e.CLUSTERING_END="clusteringend",e.CLUSTER_CLICK="click"}(fC||(fC={}));const mC=(e,t,n)=>{n.fitBounds(t.bounds)};class gC extends pC{constructor({map:e,markers:t=[],algorithmOptions:n={},algorithm:i=new cC(n),renderer:r=new dC,onClusterClick:s=mC}){super(),this.markers=[...t],this.clusters=[],this.algorithm=i,this.renderer=r,this.onClusterClick=s,e&&this.setMap(e)}addMarker(e,t){this.markers.includes(e)||(this.markers.push(e),t||this.render())}addMarkers(e,t){e.forEach((e=>{this.addMarker(e,!0)})),t||this.render()}removeMarker(e,t){const n=this.markers.indexOf(e);return-1!==n&&(JA.setMap(e,null),this.markers.splice(n,1),t||this.render(),!0)}removeMarkers(e,t){let n=!1;return e.forEach((e=>{n=this.removeMarker(e,!0)||n})),n&&!t&&this.render(),n}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,fC.CLUSTERING_BEGIN,this);const{clusters:t,changed:n}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(n||null==n){const e=new Set;for(const n of t)1==n.markers.length&&e.add(n.markers[0]);const n=[];for(const t of this.clusters)null!=t.marker&&(1==t.markers.length?e.has(t.marker)||JA.setMap(t.marker,null):n.push(t.marker));this.clusters=t,this.renderClusters(),requestAnimationFrame((()=>n.forEach((e=>JA.setMap(e,null)))))}google.maps.event.trigger(this,fC.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach((e=>JA.setMap(e,null))),this.clusters.forEach((e=>e.delete())),this.clusters=[]}renderClusters(){const e=new uC(this.markers,this.clusters),t=this.getMap();this.clusters.forEach((n=>{1===n.markers.length?n.marker=n.markers[0]:(n.marker=this.renderer.render(n,e,t),n.markers.forEach((e=>JA.setMap(e,null))),this.onClusterClick&&n.marker.addListener("click",(e=>{google.maps.event.trigger(this,fC.CLUSTER_CLICK,n),this.onClusterClick(e,n,t)}))),JA.setMap(n.marker,t)}))}}const vC=Object.values(fC);$i({name:"MarkerCluster",props:{options:{type:Object,default:()=>({})}},emits:vC,setup(e,{emit:t,expose:n,slots:i}){const r=Wt(),s=as(lA,Wt()),o=as(cA,Wt());return os(uA,r),Ri(s,(()=>{s.value&&(r.value=Ut(new gC({map:s.value,algorithm:new hC(e.options.algorithmOptions??{}),...e.options}
56)),vC.forEach((e=>{var n;null==(n=r.value)||n.addListener(e,(n=>t(e,n)))})))}),{immediate:!0}),pr((()=>{var e;r.value&&(null==(e=o.value)||e.event.clearInstanceListeners(r.value),r.value.clearMarkers(),r.value.setMap(null))})),n({markerCluster:r}),()=>{var e;return null==(e=i.default)?void 0:e.call(i)}}}),$i({inheritAttrs:!1,props:{options:{type:Object,required:!0}},setup(e,{slots:t,emit:n,expose:i}){const r=Wt(),s=Jo((()=>{var e;return null==(e=t.default)?void 0:e.call(t).some((e=>e.type!==Zs))})),o=Jo((()=>({...e.options,element:r.value}))),a=PA(dA,[],o,n);return i({customMarker:a}),{customMarkerRef:r,customMarker:a,hasSlotContent:s}}});$i({name:"HeatmapLayer",props:{options:{type:Object,default:()=>({})}},setup(e){const t=Wt(),n=as(lA,Wt()),i=as(cA,Wt());return Ri([n,()=>e.options],(([e,r],[s,o])=>{var a;const l=!RA(r,o)||n.value!==s;if(n.value&&i.value&&l){const e=structuredClone(r);if(e.data&&!(e.data instanceof i.value.MVCArray)){const t=i.value.LatLng;e.data=null==(a=e.data)?void 0:a.map((e=>e instanceof t||"location"in e&&(e.location instanceof t||null===e.location)?e:"location"in e?{...e,location:new t(e.location)}:new t(e)))}t.value?t.value.setOptions(e):t.value=Ut(new i.value.visualization.HeatmapLayer({...e,map:n.value}))}}),{immediate:!0}),pr((()=>{t.value&&t.value.setMap(null)})),{heatmapLayer:t}},render:()=>null});var _C=$i({name:"VenueMap",components:{PhotoSphereViewer:FT,Legend:jT,GoogleMap:TA,LevelSelect:KT,Filters:sA},props:{legend:Array,googleMapApiKey:String,center:Object,zoom:Number,levels:Array,sectionImagesPath:String,isClickable:Boolean,altZoomRatio:{type:Number,default:.8}},data(){return{map:null,overlays:[],selectedFilters:[],selectedLevel:"0",photoSphereIsOpen:!1,isMobile:!1,isMobilePhotoSphere:!1,md:976,sm:576,section:"Section",currentSectionUrl:"",apiPromise:new hm({apiKey:this.googleMapApiKey,version:"weekly",libraries:["places"]}).load(),mapRef:null,mapZoom:this.levels[0].zoom||this.zoom,isModalOpen:!1,currentIdx:0,mapContainerHeight:770,mapContainerMobileHeight:432}},methods:{SVGOverlay(e,t){const n=new google.maps.OverlayView;n.bounds=e,n.svg=t,n.onAdd=function(){t.style.position="absolute";this.getPanes().overlayMouseTarget.appendChild(t),i()};const i=()=>{const e=n.getPanes().overlayMouseTarget;e.addEventListener("click",(e=>{const t=e.target;if(t.id.startsWith("section-view-control-")){const e=t.id.replace("section-view-control-","");isNaN(e[0])?this.section=e:this.section="Section "+e,this.section=this.section.replaceAll("_"," "),this.currentSectionUrl=this.sectionImagesPath+e+".jpg",this.openPhotoSphere()}})),e.addEventListener("dblclick",(e=>{e.target.id.startsWith("section-view-control-")&&e.stopPropagation()}))};return n.draw=function(){const e=this.getProjection(),t=this.bounds,n=e.fromLatLngToDivPixel(t.getSouthWest
56()),i=e.fromLatLngToDivPixel(t.getNorthEast()),r=this.svg.style;r.left=n.x+"px",r.top=i.y+"px",r.width=i.x-n.x+"px",r.height=n.y-i.y+"px"},n.onRemove=function(){this.svg&&this.svg.parentNode&&this.svg.parentNode.removeChild(this.svg)},n},handleRadioSelected(e){this.selectedLevel=e;const t=parseInt(e);this.overlays.forEach((e=>{e.setMap(null)})),this.isMobile?this.mapZoom=(this.levels[t].zoom||this.zoom)-1:this.mapZoom=this.levels[t].zoom||this.zoom,this.map.setZoom(this.mapZoom),this.levels[t].center?this.map.setCenter(this.levels[t].center):this.map.setCenter(this.center),this.overlays[t].setMap(this.map)},handleselectedFilters(e){this.selectedFilters=e;const t=[];this.levels[parseInt(this.selectedLevel)].filterOptions.map((e=>e.layer)).forEach((n=>{e.includes(n)||t.push(n)})),t.forEach((e=>{const t=document.getElementById(e);t&&(t.style.visibility="hidden")})),e.forEach((e=>{const t=document.getElementById(e);t&&(t.style.visibility="visible")}))},openPhotoSphere(){const e=this.$refs.HoverBox,t=this.isMobilePhotoSphere?"300px":"616px";e.style.height=t,this.photoSphereIsOpen=!0},closePhotoSphere(){this.$refs.HoverBox.style.height="0",this.photoSphereIsOpen=!1},async fetchSVG(e){try{const t=await fetch(e);return t.text()}catch(e){console.error("Fetch svg error",e)}},createResetButton(){const e=document.createElement("button");e.style.zoom=""+1/this.altZoomRatio;return["sq-btn","sq-btn-sm","sq-btn-white","ml-2.5"].forEach((t=>{e.classList.add(t)})),e.textContent="Re-centre Map",e.addEventListener("click",(()=>{const e=this.levels[parseInt(this.selectedLevel)];this.map.setCenter(e?.center??this.center),this.layerConfig?.zoom&&(this.mapZoom=this.isMobile?e.zoom-1:e.zoom),this.map.setZoom(this.mapZoom)})),e},resetButtonControl(){const e=document.createElement("div"),t=this.createResetButton();e.appendChild(t),this.map.controls[google.maps.ControlPosition.LEFT_BOTTOM].push(e)},checkIfMobile(){const e=window.innerWidth;if(e<=this.md?(this.isMobile=!0,this.mapZoom=(this.levels[parseInt(this.selectedLevel)].zoom||this.zoom)-1):(this.isMobile=!1,this.isModalOpen=!1,this.mapZoom=this.levels[parseInt(this.selectedLevel)].zoom||this.zoom),this.map){const e=parseInt(this.selectedLevel);this.levels[e].center?this.map.setCenter(this.levels[this.selectedLevel].center):this.map.setCenter(this.center),this.map.setZoom(this.mapZoom)}e<=this.sm?this.isMobilePhotoSphere=!0:this.isMobilePhotoSphere=!1},async createMapLayers(){for(let e=0;e<this.levels.length;e++){const t=new google.maps.LatLngBounds(this.levels[e].swBounds,this.levels[e].neBounds),n=new DOMParser,i=await this.fetchSVG(this.levels[e].filePath),r=n.parseFromString(i,"text/xml").querySelector("svg");this.overlays.push(this.SVGOverlay(t,r))}this.overlays[0].setMap(this.map)},toggleDrawer(){this.isModalOpen=!this.isModalOpen;const e=this.$refs.Drawer;e.classList.toggle("open");this.$refs.drawerOverlay.addEventListener("click",(t=>{e.contains(t.target)||this.toggleDrawer()}))},handleSelectAllFilters(){for(let e=0;e<this.levels.length;e++)if(this.levels[e].filterOptions.length>0){this.levels[e].filterOptions.map((e=>
56e.layer)).forEach((e=>{this.selectedFilters.includes(e)||this.selectedFilters.push(e)}))}}},computed:{currentLevelFilterOptions(){return this.levels.find(((e,t)=>t===parseInt(this.selectedLevel))).filterOptions}},watch:{"mapRef.ready"(e){e&&(this.map=this.mapRef.map,this.resetButtonControl(),this.createMapLayers())},isMobilePhotoSphere(e){const t=this.$refs.HoverBox;if(this.photoSphereIsOpen){const n=e?"300px":"616px";t.style.height=n}else t.style.height="0"}},mounted(){this.mapRef=this.$refs.mapRef,window.addEventListener("resize",this.checkIfMobile),this.checkIfMobile(),this.isMobile&&(this.mapZoom=this.zoom-1),this.handleSelectAllFilters(),this.mapContainerHeight=parseInt(this.mapContainerHeight/this.altZoomRatio),this.mapContainerMobileHeight=parseInt(this.mapContainerMobileHeight/this.altZoomRatio)},beforeDestroy(){window.removeEventListener("resize",this.checkIfMobile)}});const yC=(0,tp.Z)(_C,[["render",function(e,t,n,i,r,s){const o=ci("LevelSelect"),a=ci("Filters"),l=ci("Legend"),c=ci("PhotoSphereViewer"),h=ci("GoogleMap");return eo(),oo("div",Bf,[fo("aside",zf,[e.isMobile?(eo(),oo("div",Hf,[(eo(),ao(qs,{to:"body"},[fo("div",{class:$({"fixed z-50 top-0 left-0 w-screen h-screen inset-0":e.isModalOpen}),ref:"drawerOverlay"},[fo("div",Gf,[fo("a",{class:"absolute top-5 right-4 fill-primary hover:cursor-pointer","aria-label":"close",onClick:t[0]||(t[0]=(...t)=>e.toggleDrawer&&e.toggleDrawer(...t))},Wf),mo(o,{selectedLevel:this.selectedLevel,options:this.levels,"onUpdate:selectedLevel":e.handleRadioSelected},null,8,["selectedLevel","options","onUpdate:selectedLevel"]),e.currentLevelFilterOptions.length?(eo(),oo("div",jf,[mo(a,{options:e.currentLevelFilterOptions,selectedFilters:this.selectedFilters,"onUpdate:selectedFilters":e.handleselectedFilters},null,8,["options","selectedFilters","onUpdate:selectedFilters"])])):bo("v-if",!0)],512)],2)])),e.isMobile?(eo(),oo("a",{key:0,onClick:t[1]||(t[1]=(...t)=>e.toggleDrawer&&e.toggleDrawer(...t)),class:"sq-btn sq-btn-sm sq-btn-white mb-5"},[qf,yo(" Filter Map ")])):bo("v-if",!0)])):(eo(),oo("div",Xf,[mo(o,{selectedLevel:this.selectedLevel,options:this.levels,"onUpdate:selectedLevel":e.handleRadioSelected},null,8,["selectedLevel","options","onUpdate:selectedLevel"]),e.currentLevelFilterOptions.length?(eo(),oo("div",$f,[mo(a,{options:e.currentLevelFilterOptions,selectedFilters:this.selectedFilters,"onUpdate:selectedFilters":e.handleselectedFilters},null,8,["options","selectedFilters","onUpdate:selectedFilters"])])):bo("v-if",!0)])),e.isMobile?bo("v-if",!0):(eo(),oo("div",Yf,[mo(l,{legend:e.legend},null,8,["legend"])]))]),fo("main",Zf,[e.isClickable?(eo(),oo("div",Kf,[Jf,this.photoSphereIsOpen?(eo(),oo("div",Qf,[fo("h3",em,le(e.section),1),fo("a",{onClick:t[2]||(t[2]=(...t)=>e.closePhotoSphere&&e.closePhotoSphere(...t)),class:"text-white pl-8 cursor-pointer","aria-label":"close"},tm)])):bo("v-if",!0)])):bo("v-if",!0),fo("div",nm,[fo("div",im,[mo(c,{currentSectionUrl:e.currentSectionUrl},null,8,["currentSectionUrl"])],512)]),mo(h,{ref:"mapRef",class:"w-full",style:G({height:e.isMobile?`${this.mapContainerMobileHeight}px`:`${this.mapContainerHeight}px`,zoom:`${this.altZoomRatio}`}),"api-promise":e.apiPromise,center:this.center,zoom:this.mapZoom,streetViewControl:!1,mapTypeControl:!1,clickableIcons:!1},null,8,["style","api-promise","center","zoom"])]),e.isMobile?(eo(),oo("div",rm,[mo(l,{legend:e.legend},null,8,["legend"])])):bo("v-if",!0)])}],["__scopeId","data-v-3edb9bce"]]);var xC=yC;const bC={class:"mx-auto my-3"},wC={key:0},SC=["onKeydown"],EC={key:0,class:"relative w-full h-full"},MC=["onClick"],TC=["src"],AC=["onClick"],CC=[fo("div",{class:"w-12 h-12 border-4 border-primary rounded-full bg-white hover:border-primary-70 focus:border-primary-70"},[fo("svg",{class:"w-10 h-10 fill-primary hover:fill-primary-70 focus:fill-primary-70","aria-hidden":"true"},[fo("use",{href:"#icon-play"})])],-1)],RC=["onClick"],PC=["src","alt"];const LC=e=>(Jn("data-v-2d5539ed"),e=e(),Qn(),e),IC={id:"modal",ref:"modal",class:"modal bg-white fixed w-full md:w-3/4 max-w-[1024px] md:max-h-[786px] top-1/2 left-1/2 z-10 translate-x-[-50%] translate-y-[-50%] sm:h-full md:h-auto"},DC=[LC((()=>fo("svg",{class:"!w-8 !h-8","aria-hidden":"true"},[fo("use",{href:"#icon-close"}
56)],-1)))],NC={class:"flex justify-between w-full absolute top-[calc(20vh_-_16px)] sm:top-[calc(50%_-_16px)]"},OC=[LC((()=>fo("svg",{class:"!w-8 !h-8","aria-hidden":"true"},[fo("use",{href:"#icon-chevron-left"})],-1)))],UC=[LC((()=>fo("svg",{class:"!w-8 !h-8","aria-hidden":"true"},[fo("use",{href:"#icon-chevron-right"})],-1)))],kC={class:"flex flex-col md:flex-col sm:flex-row"},FC={tabindex:"0",ref:"openControl",class:"md:w-full sm:w-[50%]"},VC={key:0,class:"relative"},BC={muted:"",playsinline:"",loop:"",controls:"",width:"100%",class:"h-[40vh] sm:h-[100dvh] md:h-auto md:max-h-[606px] object-contain bg-black",ref:"videoElement"},zC=["src"],HC=[LC((()=>fo("svg",{class:"w-12 h-12 fill-primary hover:fill-primary-70 focus:fill-primary-70","aria-hidden":"true"},[fo("use",{href:"#icon-play"})],-1)))],GC=["src","alt"],WC={class:"bg-white px-8 py-6 flex justify-end flex-col gap-y-4 md:flex-row w-full md:w-full sm:w-[50%] sm:justify-center"},jC={class:"line-clamp-3 text-h5"},qC={key:0,class:"flex items-center w-full md:w-1/3 justify-start md:justify-end md:pt-0 md:pr-5"},XC=["href","download"],$C=LC((()=>fo("svg",{"aria-hidden":"true"},[fo("use",{href:"#icon-download"})],-1)));var YC=$i({props:{isModalOpen:Boolean,disableDownload:Boolean,items:Array,itemIndex:Number},data:()=>({isPlaying:!1,firstFocusableElement:null,lastFocusableElement:null,openFocus:!0,scale:1,minScale:1,maxScale:4,translateX:0,translateY:0,isDragging:!1,lastTouchDistance:null,lastTouchX:null,lastTouchY:null,startScale:1}),computed:{isLeftChevronHidden(){return 0===this.itemIndex},isRightChevronHidden(){return this.itemIndex===this.items.length-1},item(){return this.items[this.itemIndex]}},methods:{initModal(){const e=this.$refs.modal;this.$nextTick((()=>{if(e){let t=e.querySelectorAll('a[href], [tabindex="0"], button');t=Array.prototype.slice.call(t),this.firstFocusableElement=t[0],this.lastFocusableElement=t[t.length-1]}document.addEventListener("keydown",this.trapFocus)}))},handleOverlayClick(e){this.$refs.modal.contains(e.target)||this.updateParentValue()},updateParentValue(){this.$emit("updateValue",!this.isModalOpen)},handleVideoClick(e){const t=e.target.closest("button").previousElementSibling;this.isPlaying?t.pause():t.play(),this.isPlaying=!this.isPlaying},trapFocus(e){if(!this.isModalOpen)return;this.openFocus||(this.openFocus=!0,this.firstFocusableElement.classList.remove("focus:bg-secondary"),this.firstFocusableElement.classList.remove("focus:outline-none"));"Tab"===e.key?e.shiftKey?document.activeElement===this.firstFocusableElement&&(this.lastFocusableElement.focus(),e.preventDefault()):document.activeElement===this.lastFocusableElement&&(this.firstFocusableElement.focus(),e.preventDefault()):"Escape"===e.key&&this.updateParentValue()},getTouchDistance(e){const t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)},resetZoom(){this.scale=1,this.translateX=0,this.translateY=0,this.isDragging=!1,this.lastTouchDistance=null},onTouchStart(e){2===e.touches.length?(this.lastTouchDistance=this.getTouchDistance(e.touches),this.startScale=this.scale,this.isDragging=!1):1===e.touches.length&&this.scale>1&&(this.isDragging=!0,this.lastTouchX=e.touches[0].clientX,this.lastTouchY=e.touches[0].clientY)},onTouchMove(e){if(e.touches.length>1&&e.preventDefault(),2===e.touches.length){const t=this.getTouchDistance(e.touches)/this.lastTouchDistance;this.scale=Math.min(this.maxScale,Math.max(this.minScale,this.startScale*t)),this.scale<=1&&(this.translateX=0,this.translateY=0)}else if(1===e.touches.length&&this.isDragging&&this.scale>1){const t=e.touches[0].clientX-this.lastTouchX,n=e.touches[0].clientY-this.lastTouchY,i=150*(this.scale-1);this.translateX=Math.min(i,Math.max(-i,this.translateX+t)),this.translateY=Math.min(i,Math.max(-i,this.translateY+n)),this.lastTouchX=e.touches[0].clientX,this.lastTouchY=e.touches[0].clientY}},onTouchEnd(e){e.touches.length<2&&(this.lastTouchDistance=null,this.startScale=this.scale),0===e.touches.length&&(this.isDragging=!1,this.scale<1&&(this.scale=1,this.translateX=0,this.translateY=0))},handleModalClose(){this.resetZoom(),this.updateParentValue()},handleNextSlide(){if(this.itemIndex<this.items.length-1){if(this.resetZoom(),this.items[this.itemIndex+1].isVideo){this.isPlaying=!1;const e=this.$refs.videoElement;e&&e.load()}this.$emit("update:itemIndex",this.itemIndex+1)}},handlePrevSlide(){if(this.itemIndex>0){if(this.resetZoom(),this.items[this.itemIndex-1].isVideo){this.isPlaying=!1;const e=this.$refs.videoElement;e&&e.load()}this.$emit("update:itemIndex",this.itemIndex-1)}}},watch:{isModalOpen(e){const t=this.$refs.modalOverlay;if(e){const e=this.$refs.videoElement;this.item.isVideo&&e&&(e.load(),this.isPlaying=!1),document.body.style.overflow="hidden",this.$nextTick((()=>{this.firstFocusableElement&&(this.firstFocusableElement.focus(),this.openFocus&&(this.openFocus=!1,this.firstFocusableElement.classList.add("focus:bg-secondary"),this.firstFocusableElement.classList.add("focus:outline-none")))}))}else t&&(document.body.style.overflow="auto"),this.$nextTick((()=>{this.$refs.openControl&&this.$refs.openControl.focus()}))}},mounted(){this.initModal()},beforeDestroy(){document.removeEventListener("keydown",this.trapFocus)}});const ZC=(0,tp.Z)(YC,[["render",function(e,t,n,i,r,s){return eo(),oo("div",null,[(eo(),ao(qs,{to:"body"},[fo("div",{class:$({"fade-in fixed z-50 top-0 left-0 w-screen h-screen inset-0 bg-gray-400 bg-opacity-30 backdrop-filter backdrop-blur-sm":e.isModalOpen}),style:{"touch-action":"none"},ref:"modalOverlay",onClick:t[9]||(t[9]=(...t)=>e.handleOverlayClick&&e.handleOverlayClick(...t))},[Ni(fo("div",IC,[fo("button",{class:"sq-btn sq-btn-secondary absolute md:right-6 md:top-6 right-2 top-2 p-0 rounded-2xl z-10",onClick:t[0]||(t[0]=(...t)=>e.handleModalClose&&e.handleModalClose(...t)),"aria-label":"close"},DC),Ni(fo("div",NC,[fo("button",{class:$(["sq-btn sq-btn-secondary p-0 ml-2 md:-ml-20 rounded-2xl z-10",e.isLeftChevronHidden?"invisible":"visible"]),onClick:t[1]||(t[1]=(...t)=>e.handlePrevSlide&&e.handlePrevSlide(...t)),"aria-label":"Previous Slide"},OC,2),fo("button",{class:$(["sq-btn sq-btn-secondary p-0 mr-2 md:-mr-20 rounded-2xl z-10",e.isRightChevronHidden?"invisible":"visible"]),onClick:t[2]||(t[2]=(...t)=>e.handleNextSlide&&e.handleNextSlide(...t)),"aria-label":"Next Slide"},UC,2)],512),[[ka,e.items.length>1]]),fo("div",kC,[fo("div",FC,[e.item.isVideo?(eo(),oo("div",VC,[fo("video",BC,[yo(" Your browser does not support the video tag. "),fo("source",{src:e.item.downloadPath,type:"video/mp4"},null,8,zC)],512),fo("button",{onClick:t[3]||(t[3]=(...t)=>e.handleVideoClick&&e.handleVideoClick(...t)),onKeydown:[t[4]||(t[4]=Ol(Dl(((...t)=>e.handleVideoClick&&e.handleVideoClick(...t)),["prevent"]),["space"])),t[5]||(t[5]=Ol(Dl(((...t)=>e.handleVideoClick&&e.handleVideoClick(...t)),["prevent"]),["enter"]))],type:"button",class:"w-full h-[calc(100%_-_120px)] flex justify-center items-center absolute top-1/2 left-1/2 cursor-pointer translate-x-[-50%] translate-y-[-50%]","aria-label":"play"},[fo("div",{class:$(["w-16 h-16 border-8 border-primary rounded-full bg-white relative -top-3 hover:border-primary-70 focus:border-primary-70",{hidden:e.isPlaying}
56])},HC,2)],32)])):(eo(),oo("div",{key:1,class:"gallery-image-container overflow-hidden",ref:"imageContainer",style:{"touch-action":"none"},onTouchstart:t[6]||(t[6]=(...t)=>e.onTouchStart&&e.onTouchStart(...t)),onTouchmove:t[7]||(t[7]=(...t)=>e.onTouchMove&&e.onTouchMove(...t)),onTouchend:t[8]||(t[8]=(...t)=>e.onTouchEnd&&e.onTouchEnd(...t))},[fo("img",{ref:"zoomImage",src:e.item.path,alt:e.item.description,class:"w-full md:max-h-[606px] h-[40vh] sm:h-[100dvh] md:h-auto object-cover",style:G({transform:`scale(${e.scale}) translate(${e.translateX}px, ${e.translateY}px)`,transition:e.isDragging?"none":"transform 0.2s ease",transformOrigin:"center center",willChange:"transform",userSelect:"none"}),draggable:"false"},null,12,GC)],544))],512),fo("div",WC,[fo("div",{class:$(["flex items-center w-full",[e.disableDownload?"":"md:w-2/3"]])},[fo("div",jC,le(e.item.title||e.item.fileName.split(".").slice(0,-1).join(".")),1)],2),e.disableDownload?bo("v-if",!0):(eo(),oo("div",qC,[fo("a",{href:e.item.downloadPath,class:"sq-btn sq-btn-sm sq-btn-secondary",download:e.item.fileName},[$C,yo(" Download "+le("("+e.item.downloadSize+")"),1)],8,XC)]))])])],512),[[ka,e.isModalOpen]])],2)]))])}],["__scopeId","data-v-2d5539ed"]]);var KC=$i({props:{items:Array,narrow:Boolean,isSingleFile:Boolean,disableDownload:Boolean},components:{Modal:ZC},data:()=>({selectedAssetIndex:0,isModalOpen:!1}),computed:{},methods:{openModal(e){this.selectedAssetIndex=e,this.isModalOpen=!0},handleUpdateValue(e){this.isModalOpen&&(this.isModalOpen=e,this.$refs.targetFocus[this.selectedAssetIndex].focus())},handleKeyDown(e,t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.openModal(e))},updateItemIndex(e){this.selectedAssetIndex=e}},mounted(){}});var JC=(0,tp.Z)(KC,[["render",function(e,t,n,i,r,s){const o=ci("Modal");return eo(),oo("div",null,[fo("div",bC,[e.items&&0!==e.items.length?bo("v-if",!0):(eo(),oo("div",wC,"No gallery items found")),fo("ul",{class:$(["grid gap-4",{"grid-cols-1":e.isSingleFile,"sm:grid-cols-2 md:grid-cols-4":!e.narrow&&!e.isSingleFile,"sm:grid-cols-2":e.narrow&&!e.isSingleFile}])},[(eo(!0),oo($s,null,yr(e.items,((t,n)=>(eo(),oo("li",{key:n,class:"hover:cursor-pointer",onKeydown:t=>e.handleKeyDown(n,t)},[t.isVideo?(eo(),oo("div",EC,[t.isVideo?(eo(),oo("video",{key:0,id:"video",class:$(["video w-full",[e.isSingleFile?"":e.narrow?"h-[196px]":"h-[248px]",e.isSingleFile?"":"object-cover"]]),width:"100%",onClick:t=>e.openModal(n)},[yo(" Your browser does not support the video tag. "),fo("source",{src:t.downloadPath,type:"video/mp4"},null,8,TC)],10,MC)):bo("v-if",!0),fo("button",{ref_for:!0,ref:"targetFocus",type:"button",class:"w-10 h-10 absolute top-1/2 left-1/2 cursor-pointer translate-x-[-50%] translate-y-[-50%]","aria-label":"play",onClick:t=>e.openModal(n)},CC,8,AC)])):(eo(),oo("a",{key:1,href:"#",onClick:Dl((t=>e.openModal(n)),["prevent"]),ref_for:!0,ref:"targetFocus"},[fo("img",{src:t.path,class:$(["w-full",[e.isSingleFile?"":e.narrow?"h-[196px]":"h-[248px]",e.isSingleFile?"":"object-cover"]]),alt:t.description},null,10,PC)],8,RC))],40,SC)))),128))],2),mo(o,{isModalOpen:e.isModalOpen,items:e.items,itemIndex:this.selectedAssetIndex,onUpdateValue:e.handleUpdateValue,"onUpdate:itemIndex":e.updateItemIndex,disableDownload:e.disableDownload},null,8,["isModalOpen","items","itemIndex","onUpdateValue","onUpdate:itemIndex","disableDownload"])])])}]]);const QC={class:"bg-primary-10"},eR={class:"sq-container flex flex-wrap md:flex-nowrap py-16"},tR=fo("h2",{class:"text-h3 mr-16 mb-5 md:mb-0"},"Showing results for",-1),nR={class:"w-full md:w-1/2"},iR=fo("button",{type:"submit",class:"flex items-center","aria-label":"Submit search"},[fo("svg",{"aria-hidden":"true",class:"mr-2 fill-primary h-6 w-6"},[fo("use",{href:"#icon-search"})])],-1),rR={class:"py-16 sq-container grid grid-cols-1 md:grid-cols-4 gap-4"},sR={class:"col-span-1 mb-10 md:mb-0"},oR=fo("h3",{class:"text-h3 mb-5"},"Filter results",-1),aR={class:"sq-form-checkbox-radio"},lR=fo("span",null,"All",-1),cR={class:"sq-form-checkbox-radio"},hR=fo("span",null,"Events only",-1),uR={class:"sq-form-checkbox-radio"},dR=fo("span",null,"Pages only",-1),pR={class:"col-span-1 md:col-span-3"},fR={class:"mb-14"},mR={class:"flex mb-8"},gR=fo("h3",{class:"text-h2 mr-4"},"Events",-1),vR={role:"status",class:"flex items-end"},_R={key:0},yR={key:1},xR=["innerHTML"],bR={key:1},wR={"aria-live":"polite",class:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4"},SR={class:"text-center mt-9"},ER={class:"flex mb-6"},MR=fo("h3",{class:"text-h2 mr-4"},"Pages",-1),TR={role:"status",class:"flex items-end"},AR={key:0},CR={key:1},RR=["innerHTML"],PR={key:1},LR={class:"border-b-2 border-grey-30"},IR={class:"py-10 px-3 md:px-7"},DR={class:"text-h4 mb-2 hover:underline"},NR=["href"],OR=["href"],UR=["innerHTML"],kR={key:1},FR={class:"text-center mt-9"};var VR=$i({props:{searchApi:String,eventsPerPage:{type:Number,default:3},eventNoResultsMessage:String,pagesPerPage:{type:Number,default:10},pageNoResultsMessage:String,showVenueName:Boolean},components:{EventCard:np},data:()=>({selectedSearchFilter:"",pageResults:[],eventResults:[],totalEventResults:0,totalPageResults:0,eventsToShow:0,searchQuery:"",searchQueryChip:"",pagesToShow:0}),computed:{visibleEventResults(){return this.eventResults.slice(0,this.eventsToShow)}},methods:{async search(){if(this.searchQuery){this.searchQueryChip=this.searchQuery;const e=encodeURIComponent(this.searchQuery),t=new URLSearchParams(window.location.search);t.set("q",e);const n=t.toString()?window.location.pathname+"?"+t.toString():window.location.pathname;history.replaceState(null,document.title,n);const i=await fetch(`${this.searchApi}?fulltext=${this.searchQuery}&resultsPerPage=${this.pagesPerPage}`);if(200===i.status){const e=await i.json();this.pageResults=e.results,this.totalPageResults=e.totalResults}const r=await fetch(`${this.searchApi}?fulltext=${this.searchQuery}&scope=events&resultsPerPage=500`);
56if(200===r.status){const e=await r.json();this.eventResults=e.results,this.totalEventResults=e.totalResults}}},addMoreSearchedEvents(){const e=this.eventResults.length-parseInt(this.eventsToShow);this.eventsToShow+=e>=parseInt(this.eventsPerPage)?parseInt(this.eventsPerPage):e},async addMoreSearchedPages(){const e=this.totalPageResults-this.pagesToShow;if(e>0){const t=Math.min(this.pagesPerPage,e),n=await fetch(`${this.searchApi}?fulltext=${this.searchQuery}&resultsOffset=${this.pagesToShow}&resultsPerPage=${this.pagesPerPage}`);if(200===n.status){const e=await n.json();this.pageResults=this.pageResults.concat(e.results),this.pagesToShow+=t}}}},mounted(){const e=new URL(window.location.href),t=new URLSearchParams(e.search);this.searchQuery=t.get("q"),this.search(),this.eventsToShow=parseInt(this.eventsPerPage),this.pagesToShow=parseInt(this.pagesPerPage)}});const BR=(0,tp.Z)(VR,[["render",function(e,t,n,i,r,s){const o=ci("EventCard");return eo(),oo("div",null,[fo("div",QC,[fo("div",eR,[tR,fo("div",nR,[Ni(fo("div",{class:"inline-block text-h5 bg-white rounded-[30px] py-2 px-5 mb-5"},le(e.searchQueryChip),513),[[ka,e.searchQueryChip]]),fo("form",{onSubmit:t[1]||(t[1]=Dl(((...t)=>e.search&&e.search(...t)),["prevent"])),class:"flex justify-center items-center border-b-2 border-b-primary bg-grey-10 h-12 w-full"},[Ni(fo("input",{"onUpdate:modelValue":t[0]||(t[0]=t=>e.searchQuery=t),type:"search","aria-label":"search term",name:"q",placeholder:"Enter your search",class:"sq-form-input !border-b-[1px] !border-b-primary placeholder:text-grey-50 mr-2"},null,512),[[xl,e.searchQuery]]),iR],32)])])]),fo("div",rR,[fo("div",sR,[oR,fo("div",null,[fo("label",aR,[Ni(fo("input",{"onUpdate:modelValue":t[2]||(t[2]=t=>e.selectedSearchFilter=t),value:"",type:"radio"},null,512),[[Sl,e.selectedSearchFilter]]),lR]),fo("label",cR,[Ni(fo("input",{"onUpdate:modelValue":t[3]||(t[3]=t=>e.selectedSearchFilter=t),value:"eventsOnly",type:"radio"},null,512),[[Sl,e.selectedSearchFilter]]),hR]),fo("label",uR,[Ni(fo("input",{"onUpdate:modelValue":t[4]||(t[4]=t=>e.selectedSearchFilter=t),value:"pagesOnly",type:"radio"},null,512),[[Sl,e.selectedSearchFilter]]),dR])])]),fo("div",pR,[Ni(fo("div",fR,[fo("div",mR,[gR,Ni(fo("div",vR,[e.totalEventResults>e.eventsPerPage?(eo(),oo("span",_R,"(Showing "+le(e.eventsToShow)+" of "+le(e.totalEventResults)+")",1)):(eo(),oo("span",yR,"(Showing "+le(e.totalEventResults)+" of "+le(e.totalEventResults)+")",1))],512),[[ka,e.eventsPerPage&&e.totalEventResults]])]),e.eventResults&&0!==e.eventResults.length?(eo(),oo("div",bR,[fo("div",wR,[(eo(!0),oo($s,null,yr(e.visibleEventResults,(t=>(eo(),oo("div",{key:t.url},[mo(o,Mo(t,{showAllVenues:e.showVenueName}),null,16,["showAllVenues"])])))),128))]),Ni(fo("div",SR,[fo("button",{onClick:t[5]||(t[5]=(...t)=>e.addMoreSearchedEvents&&e.addMoreSearchedEvents(...t)),class:"sq-btn sq-btn-white"},"See more events")],512),[[ka,e.eventsToShow<e.totalEventResults]])])):(eo(),oo("div",{key:0,class:"cmp-text !pl-7 !m-0",innerHTML:e.eventNoResultsMessage},null,8,xR))],512),[[ka,"pagesOnly"!==e.selectedSearchFilter]]),Ni(fo("div",null,[fo("div",ER,[MR,Ni(fo("div",TR,[e.totalPageResults>e.pagesPerPage?(eo(),oo("span",AR,"(Showing "+le(e.pagesToShow)+" of "+le(e.totalPageResults)+")",1)):(eo(),oo("span",CR,"(Showing "+le(e.totalPageResults)+" of "+le(e.totalPageResults)+")",1))],512),[[ka,e.pagesPerPage&&e.totalPageResults]])]),e.pageResults&&0!==e.pageResults.length?(eo(),oo("div",PR,[(eo(!0),oo($s,null,yr(e.pageResults,(e=>(eo(),oo("div",{"aria-live":"polite",key:e.url},[fo("div",LR,[fo("div",IR,[fo("h4",DR,[fo("a",{href:e.url},le(e.title),9,NR)]),fo("a",{href:e.url,class:"block text-primary mb-2 text-ellipsis overflow-hidden"},le(e.url),9,OR),e.excerpt?(eo(),oo("div",{key:0,innerHTML:e.excerpt},null,8,UR)):(eo(),oo("div",kR,le(e.description),1))])])])))),128)),Ni(fo("div",FR,[fo("button",{onClick:t[6]||(t[6]=(...t)=>e.addMoreSearchedPages&&e.addMoreSearchedPages(...t)),class:"sq-btn sq-btn-white"},"See more pages")],512),[[ka,e.totalPageResults>e.pagesToShow]])])):(eo(),oo("div",{key:0,class:"cmp-text !pl-7 !m-0",innerHTML:e.pageNoResultsMessage},null,8,RR))],512),[[ka,"eventsOnly"!==e.selectedSearchFilter]])])])])}]]);var zR=BR;const HR={class:"sq-container"},GR=fo("label",{for:"parentPath"},"Parent Path",-1),WR=fo("br",null,null,-1),jR=fo("label",{for:"query"},"XPath Search Query",-1),qR=fo("br",null,null,-1),XR=fo("h5",null,"Operation to perform on the results",-1),$R={class:"sq-form-checkbox-radio"},YR=fo("span",null,"Nothing, just testing the query",-1),ZR={class:"sq-form-checkbox-radio"},KR=fo("span",null,"Update a property value",-1),JR={class:"sq-form-checkbox-radio"},QR=fo("span",null,"Update a property name",-1),eP={class:"sq-form-checkbox-radio"},tP=fo("span",null,"Add new property",-1),nP={class:"sq-form-checkbox-radio"},iP=fo("span",null,"Copy a property from a relative node into this node",-1),rP={class:"sq-form-checkbox-radio"},sP=fo("span",null,"Delete a property",-1),oP={class:"sq-form-checkbox-radio"},aP=fo("span",null,"Append .html to a property beginning with /content (fixes pathfield urls)",-1),lP={class:"sq-form-checkbox-radio"},cP=fo("span",null,"Rename or move this node",-1),hP={class:"sq-form-checkbox-radio"},uP=fo("span",null,"Add child node via copy",-1),dP={class:"sq-form-checkbox-radio"},pP=fo("span",null,"Add next sibling node via copy",-1),fP={class:"sq-form-checkbox-radio"},mP=fo("span",null,"Delete this node (always saves, does not work with Dry Run!)",-1),gP={class:"sq-form-checkbox-radio"},vP=fo("span",null,"Add mixin",-1),_P={class:"sq-form-checkbox-radio"},yP=fo("span",null,"Change node type",-1),xP=fo("br",null,null,-1),bP={class:"row"},wP={class:"col-md-6"},SP={key:0},EP=fo("label",{for:"propertyName"},"Property name",-1),MP={key:1},TP=fo("label",{for:"newNodeName"},"New node name",-1),AP={key:2},CP=fo("label",{for:"nodePath"},"Relative node path",-1),RP=fo("small",null,' eg "../" will find its parent (but better to do "../../parentNodeName" to be sure) ',-1),PP={key:3},LP=fo("label",{for:"nodePath"},"Absolute node path",-1),IP={key:4},DP=fo("label",{for:"mixin"},"New mixin",-1),NP={key:5},OP=fo("label",{for:"newNodeType"},"Change node type",-1),UP={class:"col-md-6"},kP={key:0},FP={class:"sq-form-checkbox-radio"},VP=fo("span",null,"Copy to first node",-1),BP={key:1},zP=fo("label",{for:"newPropertyName"},"New property name",-1),HP={key:2},GP=fo("label",{for:"propertyValue"},"New property value",-1),WP=fo("small",null," Use [string1,string2] for arrays ",-1),jP=fo("br",null,null,-1),qP={class:"sq-form-checkbox-radio"},XP=fo("span",null,"Run it for real. Cannot be undone!",-1),$P=fo("br",null,null,-1),YP=fo("br",null,null,-1),ZP=fo("br",null,null,-1),KP=fo("br",null,null,-1),JP=[fo("br",null,null,-1),fo("h2",null,"XPath tips",-1),fo("small",null,[fo("p",null,[yo(" Best way to test a query is to use the "),fo("a",{"x-cq-linkchecker":"skip",target:"_blank",href:"/crx/de/index.jsp"},"CRX DE Query Tool"),yo(" (under Tools -> Query) ")]),fo("h5",null,"Sample queries"),yo(" Get all CTA components "),fo("br"),fo("code",null," //*[@sling:resourceType='projectname/components/cta'] "),fo("br"),fo("br"),yo(" Get all CTA components with property ctaType = link "),fo("br"),fo("code",null," //*[@sling:resourceType='projectname/components/cta'][@ctaType='link'] "),fo("br"),fo("br"),yo(" Get all CTA components without the property ctaType "),fo("br"),fo("code",null," //*[@sling:resourceType='projectname/components/cta'][not(@ctaType)] "),fo("br"),fo("br"),yo(" Get all pages with template website_page that are not activated "),fo("br"),fo("code",null," //jcr:content[not(@cq:lastReplicationAction='Activate')][@cq:template='/apps/projectname/templates/website_page'] "),fo("br"),fo("br"),yo(" Get all nodes created before 2016 "),fo("br"),fo("code",null,' //*[@jcr:created <= xs:dateTime("2016-01-01T00:00:00.000+00:00")] '),fo("br"),fo("br"),yo(" Search property's value for string "),fo("br"),fo("code",null," //*[jcr:contains(@propertyName,'search string')] "),fo("br"),fo("br"),yo(" Search all property values for string "),fo("br"),fo("code",null," //*[jcr:contains(.,,'search string')] "),fo("br"),fo("br")],-1),fo("br",null,null,-1)];var QP=$i({props:{},data:()=>({params:{operationType:"",parentPath:"/content/sqld",query:"//*[@sling:resourceType='sq-website/components/page']"},showHelp:!1,message:""}),computed:{},methods:{async submit(e){e.preventDefault();let t="PUT";this.params.operationType&&(t="POST");const n=await fetch("/libs/granite/csrf/token.json"),i=await n.json();if(this.params[":cq_csrf_token"]=i.token,this.message="",this.params.query
56){const e=await fetch("/bin/bulk-editor",{method:t,headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(this.params)});this.message=await e.text()}}}});const eL=(0,tp.Z)(QP,[["render",function(e,t,n,i,r,s){return eo(),oo($s,null,[fo("div",HR,[fo("form",null,[GR,Ni(fo("input",{"onUpdate:modelValue":t[0]||(t[0]=t=>e.params.parentPath=t),name:"parentPath",type:"text",class:"sq-form-input",id:"parentPath",required:""},null,512),[[xl,e.params.parentPath]]),WR,jR,Ni(fo("textarea",{class:"sq-form-input",id:"query",name:"query",rows:"3","onUpdate:modelValue":t[1]||(t[1]=t=>e.params.query=t),required:""},null,512),[[xl,e.params.query]]),qR,XR,fo("label",$R,[Ni(fo("input",{type:"radio","onUpdate:modelValue":t[2]||(t[2]=t=>e.params.operationType=t),name:"operationType",id:"nothing",value:""},null,512),[[Sl,e.params.operationType]]),YR]),fo("label",ZR,[Ni(fo("input",{type:"radio","onUpdate:modelValue":t[3]||(t[3]=t=>e.params.operationType=t),name:"operationType",id:"propertyUpdate",value:"PROPERTY_UPDATE"},null,512),[[Sl,e.params.operationType]]),KR]),fo("label",JR,[Ni(fo("input",{type:"radio","onUpdate:modelValue":t[4]||(t[4]=t=>e.params.operationType=t),name:"operationType",id:"propertyNameUpdate",value:"PROPERTY_NAME_UPDATE"},null,512),[[Sl,e.params.operationType]]),QR]),fo("label",eP,[Ni(fo("input",{type:"radio","onUpdate:modelValue":t[5]||(t[5]=t=>e.params.operationType=t),name:"operationType",id:"propertyAdd",value:"PROPERTY_ADD"},null,512),[[Sl,e.params.operationType]]),tP]),fo("label",nP,[Ni(fo("input",{type:"radio","onUpdate:modelValue":t[6]||(t[6]=t=>e.params.operationType=t),name:"operationType",id:"propertyCopy",value:"PROPERTY_COPY"},null,512),[[Sl,e.params.operationType]]),iP]),fo("label",rP,[Ni(fo("input",{type:"radio","onUpdate:modelValue":t[7]||(t[7]=t=>e.params.operationType=t),name:"operationType",id:"propertyDelete",value:"PROPERTY_DELETE"},null,512),[[Sl,e.params.operationType]]),sP]),fo("label",oP,[Ni(fo("input",{type:"radio","onUpdate:modelValue":t[8]||(t[8]=t=>e.params.operationType=t),name:"operationType",id:"propertyHtml",value:"PROPERTY_HTML"},null,512),[[Sl,e.params.operationType]]),aP]),fo("label",lP,[Ni(fo("input",{type:"radio","onUpdate:modelValue":t[9]||(t[9]=t=>e.params.operationType=t),name:"nodeRename",id:"nodeRename",value:"NODE_MOVE"},null,512),[[Sl,e.params.operationType]]),cP]),fo("label",hP,[Ni(fo("input",{type:"radio","onUpdate:modelValue":t[10]||(t[10]=t=>e.params.operationType=t),name:"nodeAddChild",id:"nodeAddChild",value:"NODE_COPY_TO_CHILD"},null,512),[[Sl,e.params.operationType]]),uP]),fo("label",dP,[Ni(fo("input",{type:"radio","onUpdate:modelValue":t[11]||(t[11]=t=>e.params.operationType=t),name:"nodeAddSibling",id:"nodeAddSibling",value:"NODE_COPY_TO_SIBLING"},null,512),[[Sl,e.params.operationType]]),pP]),fo("label",fP,[Ni(fo("input",{type:"radio","onUpdate:modelValue":t[12]||(t[12]=t=>e.params.operationType=t),name:"nodeDelete",id:"nodeDelete",value:"NODE_DELETE"},null,512),[[Sl,e.params.operationType]]),mP]),fo("label",gP,[Ni(fo("input",{type:"radio","onUpdate:modelValue":t[13]||(t[13]=t=>e.params.operationType=t),name:"addMixin",id:"addMixin",value:"ADD_MIXIN"},null,512),[[Sl,e.params.operationType]]),vP]),fo("label",_P,[Ni(fo("input",{type:"radio","onUpdate:modelValue":t[14]||(t[14]=t=>e.params.operationType=t),name:"changeNodeType",id:"changeNodeType",value:"CHANGE_NODETYPE"},null,512),[[Sl,e.params.operationType]]),yP]),xP,fo("div",bP,[fo("div",wP,["PROPERTY_UPDATE"==e.params.operationType||"PROPERTY_ADD"==e.params.operationType||"PROPERTY_NAME_UPDATE"==e.params.operationType||"PROPERTY_DELETE"==e.params.operationType||"PROPERTY_HTML"==e.params.operationType||"PROPERTY_COPY"==e.params.operationType?(eo(),oo("div",SP,[EP,Ni(fo("input",{"onUpdate:modelValue":t[15]||(t[15]=t=>e.params.propertyName=t),name:"propertyName",type:"text",class:"sq-form-input",id:"propertyName",placeholder:"Property name",required:""},null,512),[[xl,e.params.propertyName]])])):bo("v-if",!0),"NODE_MOVE"==e.params.operationType?(eo(),oo("div",MP,[TP,Ni(fo("input",{"onUpdate:modelValue":t[16]||(t[16]=t=>e.params.newNodeName=t),name:"newNodeName",type:"text",class:"sq-form-input",id:"newNodeName",placeholder:"New node name",required:""},null,512),[[xl,e.params.newNodeName]]),fo("small",null,' Relative path, eg "newname" will rename the node to "newname", "../newname" will move into
56its parent and rename, "sibling/" will move node into folder "sibling". The expression '+le(e.name)+" can be used to insert current node name, eg, blah_"+le(e.name)+" will append blah_ to all node names. ",1)])):bo("v-if",!0),"PROPERTY_COPY"==e.params.operationType?(eo(),oo("div",AP,[CP,Ni(fo("input",{"onUpdate:modelValue":t[17]||(t[17]=t=>e.params.relativeNodePath=t),name:"relativeNodePath",type:"text",class:"sq-form-input",id:"relativeNodePath",placeholder:"Relative node path",required:""},null,512),[[xl,e.params.relativeNodePath]]),RP])):bo("v-if",!0),"NODE_COPY_TO_CHILD"==e.params.operationType||"NODE_COPY_TO_SIBLING"==e.params.operationType?(eo(),oo("div",PP,[LP,Ni(fo("input",{"onUpdate:modelValue":t[18]||(t[18]=t=>e.params.nodePath=t),name:"nodePath",type:"text",class:"sq-form-input",id:"nodePath",placeholder:"Absolute Node path",required:""},null,512),[[xl,e.params.nodePath]])])):bo("v-if",!0),"ADD_MIXIN"==e.params.operationType?(eo(),oo("div",IP,[DP,Ni(fo("input",{"onUpdate:modelValue":t[19]||(t[19]=t=>e.params.mixin=t),name:"mixin",type:"text",class:"sq-form-input",id:"mixin",placeholder:"New mixin",required:""},null,512),[[xl,e.params.mixin]])])):bo("v-if",!0),"CHANGE_NODETYPE"==e.params.operationType?(eo(),oo("div",NP,[OP,Ni(fo("input",{"onUpdate:modelValue":t[20]||(t[20]=t=>e.params.newNodeType=t),name:"newNodeType",type:"text",class:"sq-form-input",id:"newNodeType",placeholder:"New node type",required:""},null,512),[[xl,e.params.newNodeType]])])):bo("v-if",!0)]),fo("div",UP,["NODE_COPY_TO_CHILD"==e.params.operationType?(eo(),oo("div",kP,[fo("label",FP,[Ni(fo("input",{type:"checkbox","onUpdate:modelValue":t[21]||(t[21]=t=>e.params.isFirstNode=t),value:"true"},null,512),[[bl,e.params.isFirstNode]]),VP])])):bo("v-if",!0),"PROPERTY_NAME_UPDATE"==e.params.operationType||"PROPERTY_COPY"==e.params.operationType?(eo(),oo("div",BP,[zP,Ni(fo("input",{"onUpdate:modelValue":t[22]||(t[22]=t=>e.params.newPropertyName=t),name:"newPropertyName",type:"text",class:"sq-form-input",id:"newPropertyName",placeholder:"New property name",required:""},null,512),[[xl,e.params.newPropertyName]])])):bo("v-if",!0),"PROPERTY_ADD"==e.params.operationType||"PROPERTY_UPDATE"==e.params.operationType?(eo(),oo("div",HP,[GP,Ni(fo("input",{"onUpdate:modelValue":t[23]||(t[23]=t=>e.params.propertyValue=t),name:"propertyValue",type:"text",class:"sq-form-input",id:"propertyValue",placeholder:"New property value",required:""},null,512),[[xl,e.params.propertyValue]]),WP])):bo("v-if",!0)])]),jP,fo("label",qP,[Ni(fo("input",{type:"checkbox","onUpdate:modelValue":t[24]||(t[24]=t=>e.params.isReal=t),value:"true"},null,512),[[bl,e.params.isReal]]),XP]),$P,e.params.isReal?bo("v-if",!0):(eo(),oo("button",{key:0,onClick:t[25]||(t[25]=(...t)=>e.submit&&e.submit(...t)),class:"sq-btn sq-btn-primary"},"Dry run ")),e.params.isReal?(eo(),oo("button",{key:1,onClick:t[26]||(t[26]=(...t)=>e.submit&&e.submit(...t)),class:"sq-btn sq-btn-white"},"Run for real ")):bo("v-if",!0),YP,ZP,KP,fo("pre",null,le(e.message),1)])]),Ni(fo("div",null,JP,512),[[ka,e.showHelp]])],64)}]]);var tL=eL;const nL={class:"mb-4"},iL={class:"mb-6 flex items-center justify-center"},rL=fo("svg",{class:"fill-primary h-7 w-7 mr-2 flex-shrink-0","aria-hidden":"true"},[fo("use",{href:"#icon-alert"})],-1),sL={class:"font-medium"},oL={class:"mb-6 text-center font-medium"},aL={class:"flex md:hidden flex-col mb-6"},lL=fo("h3",{class:"text-h6 mb-3"},"Choose a pool:",-1),cL={class:"sq-form-checkbox-radio ml-4"},hL=fo("span",null,"50m Indoor Olympic",-1),uL={class:"sq-form-checkbox-radio ml-4"},dL=fo("span",null,"Outdoor Pool",-1),pL={class:"sq-form-checkbox-radio ml-4"},fL=fo("span",null,"25m Indoor Heated Pool",-1),mL={class:"flex border-b-2 border-secondary items-center h-[100px] md:overflow-hidden"},gL={key:0,class:"text-sm font-bold mr-2 text-primary md:w-[140px] text-right"},vL=[fo("svg",{"aria-hidden":"true",class:"w-7 h-7 fill-primary"},[fo("use",{href:"#icon-chevron-left"})],-1)],_L=["onClick"],yL=[fo("svg",{"aria-hidden":"true",class:"w-7 h-7 fill-primary"},[fo("use",{href:"#icon-chevron-right"})],-1)],xL={class:"overflow-y-scroll h-[685px] pr-2 mb-3"},bL={"aria-live":"polite",class:"min-w-full table-fixed bg-white mb-4 border-separate border-spacing-y-0 border-spacing-x-5"},wL={class:"sticky top-0 bg-white z-[5]"},SL=fo("th",{class:"py-2 px-4"},null,-1),EL={class:"py-2 px-4 w-full md:w-1/3"},ML={class:"py-2 px-4 w-full md:w-1/3"},TL={class:"py-2 px-4 w-full md:w-1/3"},AL={class:"py-2 font-medium text-nowrap w-[97px]"},CL={class:"text-primary text-right mr-7"},RL=fo("span",{class:"text-h6"},"Last updated: ",-1);var PL=$i({props:{warningMessage:String},data:()=>({selectedIndex:0,dateTabs:[],isMobile:!1,selectedPool:"fiftyMeterIndoorPool",sleemanTimetableData:Array,hasError:!1}
56),computed:{selectedDate(){return this.dateTabs[this.selectedIndex]},dateTabsToDisplay(){const e=[];if(this.dateTabs.length){const t=this.isMobile?2:0===this.selectedIndex?6:7,n=7===t?this.selectedIndex-1:this.selectedIndex,i=this.dateTabs.length-n,r=Math.min(i,t);for(let t=n;t<n+r;t++)e.push(this.dateTabs[t])}return e},formattedLastUpdated(){if(this.sleemanTimetableData&&this.sleemanTimetableData.lastUpdated){return new Intl.DateTimeFormat("en-GB",{year:"2-digit",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",hour12:!0}).format(new Date(this.sleemanTimetableData.lastUpdated)).replace(/,/,"")}return null},isLastUpdatedMoreThan1Hour(){if(this.sleemanTimetableData&&this.sleemanTimetableData.lastUpdated){const e=new Date(this.sleemanTimetableData.lastUpdated),t=(new Date).toLocaleString("en-US",{timeZone:"Australia/Brisbane"});return(new Date(t)-e)/36e5>=1}},tableContentRows(){if(this.selectedDate){const e=this.sleemanTimetableData.sscData[this.selectedDate].fiftyMeterPool,t=this.sleemanTimetableData.sscData[this.selectedDate].twentyFiveMeterPool,n=this.sleemanTimetableData.sscData[this.selectedDate].outdoorPool;return Object.keys(e).map((i=>({interval:i,fiftyMeterIndoorPool:e[i]||0,outdoorPool:n[i]||0,twentyFiveMeterPool:t[i]||0})))}return[]},showFiftyMeterIndoorPool(){return!this.isMobile||"fiftyMeterIndoorPool"===this.selectedPool},showOutdoorPool(){return!this.isMobile||"outdoorPool"===this.selectedPool},showTwentyFiveMeterPool(){return!this.isMobile||"twentyFiveMeterPool"===this.selectedPool}},methods:{loadData(){fetch("/content/dam/sqld/system/timetable/timetable-ssc.json").then((e=>{if(!e.ok)throw this.hasError=!0,new Error("Failed to get timetable data");return e.json()})).then((e=>{this.sleemanTimetableData=JSON.parse(JSON.stringify(e));const t=Object.keys(this.sleemanTimetableData.sscData).sort(((e,t)=>new Date(e)-new Date(t))),n=new Date,i=n.toLocaleString("en-US",{year:"numeric",timeZone:"Australia/Brisbane"})+"-"+n.toLocaleString("en-US",{month:"2-digit",timeZone:"Australia/Brisbane"})+"-"+n.toLocaleString("en-US",{day:"2-digit",timeZone:"Australia/Brisbane"}),r=t.indexOf(i);-1===r?this.hasError=!0:this.dateTabs=t.splice(r)})).catch((()=>{console.error("Failed to get timetable data"),this.hasError=!0}))},setSelectedDate(e){this.selectedIndex=this.dateTabs.indexOf(e)},onResize(){this.isMobile=window.innerWidth<976},formatDateForTabs(e){if(e){return new Intl.DateTimeFormat("en-US",{weekday:"short",day:"numeric",month:"short"}).format(new Date(e)).replace(/,/,"")}return""},formatPoolLanesText(e){return 1===e?"1 lane open":(0===e?"No":e)+" lanes open"},getOutdoorPoolText(e){return"string"!=typeof e||e.toLocaleLowerCase().includes("0 lanes")?13===e?"13 lanes open (50m)":this.isOutdoorPoolFullyBooked(e)?"No lanes open":1===e?"1 lane open":`${e} lanes open (50m)`:e.toLocaleLowerCase()},isOutdoorPoolFullyBooked(e){return 0===e||"string"==typeof e&&e.toLocaleLowerCase().includes("0 lanes")}},mounted(){this.loadData(),this.onResize(),window.addEventListener("resize",this.onResize)},beforeDestroy(){window.removeEventListener("resize",this.onResize)}});const LL=(0,tp.Z)(PL,[["render",function(e,t,n,i,r,s){return eo(),oo("div",nL,[Ni(fo("div",iL,[rL,fo("p",sL,le(e.warningMessage),1)],512),[[ka,e.warningMessage&&(e.isLastUpdatedMoreThan1Hour||e.hasError)]]),Ni(fo("div",oL," Timetable details are currently unavailable. Please try again later. ",512),[[ka,e.hasError]]),Ni(fo("div",null,[bo(" Mobile select "),fo("div",aL,[lL,fo("label",cL,[Ni(fo("input",{"onUpdate:modelValue":t[0]||(t[0]=t=>e.selectedPool=t),type:"radio",value:"fiftyMeterIndoorPool"},null,512),[[Sl,e.selectedPool]]),hL]),fo("label",uL,[Ni(fo("input",{"onUpdate:modelValue":t[1]||(t[1]=t=>e.selectedPool=t),type:"radio",value:"outdoorPool"},null,512),[[Sl,e.selectedPool]]),dL]),fo("label",pL,[Ni(fo("input",{"onUpdate:modelValue":t[2]||(t[2]=t=>e.selectedPool=t),type:"radio",value:"twentyFiveMeterPool"},null,512),[[Sl,e.selectedPool]]),fL])]),bo(" Date Navigation "),fo("div",mL,[(eo(!0),oo($s,null,yr(e.dateTabsToDisplay,((n,i)=>(eo(),oo("div",{class:"flex items-center",key:n},[e.selectedDate===n&&0===e.selectedIndex?(eo(),oo("div",gL,"Today:")):bo("v-if",!0),e.selectedDate===n&&e.selectedIndex>0?(eo(),oo("button",{key:1,onClick:t[3]||(t[3]=t=>e.selectedIndex--),"aria-label":"Previous date"},vL)):bo("v-if",!0),fo("button",{onClick:t=>e.setSelectedDate(n),class:$(["w-[120px]",["text-primary text-center",e.selectedDate===n?"text-h4 border-b-4 border-b-primary sm:w-[200px]":"font-medium"]])},le(e.formatDateForTabs(n)),11,_L),e.selectedDate===n&&i<e.dateTabsToDisplay.length-1?(eo(),oo("button",{key:2,onClick:t[4]||(t[4]=t=>e.selectedIndex++),"aria-label":"Next date"},yL)):bo("v-if",!0)])))),128))]),bo(" Timetable "),fo("div",xL,[fo("table",bL,[fo("thead",wL,[fo("tr",null,[SL,Ni(fo("th",EL,"50m Indoor Olympic Pool",512),[[ka,e.showFiftyMeterIndoorPool]]),Ni(fo("th",ML,"Outdoor Pool",512),[[ka,e.showOutdoorPool]]),Ni(fo("th",TL,"25m Indoor Heated Pool",512),[[ka,e.showTwentyFiveMeterPool]])])]),fo("tbody",null,[(eo(!0),oo($s,null,yr(e.tableContentRows,((t,n)=>(eo(),oo("tr",{class:"text-center",key:n},[fo("td",AL,le((t.interval.split(":")[0]%12||12)+":"+t.interval.split(":")[1].padStart(2,"0")+(t.interval.split(":")[0]>=12?" PM":" AM")),1),Ni(fo("td",{class:$(["py-2 border-[1px] border-grey-30 w-full md:w-1/3",0===t.fiftyMeterIndoorPool?"bg-grey-10":"bg-secondary-70"])},le(e.formatPoolLanesText(t.fiftyMeterIndoorPool)),3),[[ka,e.showFiftyMeterIndoorPool]]),Ni(fo("td",{class:$(["py-2 border-[1px] border-grey-30 w-full md:w-1/3",e.isOutdoorPoolFullyBooked(t.outdoorPool)?"bg-grey-10":"bg-secondary-70"])},le(e.getOutdoorPoolText(t.outdoorPool)),3),[[ka,e.showOutdoorPool]]),Ni(fo("td",{class:$(["py-2 border-[1px] border-grey-30 w-full md:w-1/3",0===t.twentyFiveMeterPool?"bg-grey-10":"bg-secondary-70"])},le(e.formatPoolLanesText(t.twentyFiveMeterPool)),3),[[ka,e.showTwentyFiveMeterPool]])])))),128))])])])],512),[[ka,!e.hasError]]),Ni(fo("div",CL,[RL,fo("span",null,le(e.formattedLastUpdated),1)],512),[[ka,e.formattedLastUpdated]])])}]]);var IL=LL;const DL={id:"news-articles-section"},NL={key:0},OL=fo("h3",{class:"text-h4 mr-2 mb-2"},"Filter news articles",-1),UL={class:"flex flex-col md:flex-row md:items-start md:gap-4"},kL={key:0,class:"flex flex-col mb-3 w-full md:w-[calc(25%-16px)]"},FL=fo("label",{for:"filter-by-venue",class:"sq-form-label"},"Venue",-1),VL=fo("option",{value:"",selected:""},"- All -",-1),BL=["value"],zL={class:"flex flex-col mb-6 w-full md:w-[calc(25%-16px)]"},HL=fo("label",{class:"sq-form-label",for:"from-date"},"From",-1),GL=["max"],WL={class:"flex flex-col mb-6 w-full md:w-[calc(25%-16px)]"},jL=fo("label",{class:"sq-form-label",for:"to-date"},"To",-1),qL=["min"],XL=["disabled"],$L={key:1,class:"pb-4",role:"status"},YL=["aria-live"],ZL={class:"flex items-center justify-center md:justify-between"},KL=fo("div",{class:"hidden md:block md:w-1/3"},null,-1),JL={class:"flex justify-center md:w-1/3"},QL={class:"flex justify-center md:justify-end md:w-1/3"},eI={key:0,class:"sq-btn sq-btn-primary ml-2",href:"#news-articles-section"},tI=["role"];const nI={class:"relative group mb-8"},iI={key:0,class:"py-2 px-4 absolute left-0 top-5 bg-secondary inline-block text-center z-10"},rI={class:"flex flex-wrap md:flex-nowrap"},sI={class:"overflow-hidden w-full md:w-1/2 h-60 mr-0 md:mr-5"},oI=["src","srcset","alt"],aI={class:"w-full md:w-1/2 py-3"},lI={class:"text-h4 line-clamp-2"},cI=fo("div",{class:"sq-separator sq-separator-sm mt-3 pb-4"},null,-1),hI={class:"text-h6 mb-3"},uI={class:"mb-3 line-clamp-2"},dI=["href","aria-label","target"];var pI=$i({props:{title:String,locationCity:String,locationName:String,newsArticleDate:Number,url:String,imageSrc:String,imageSrcset:String,imageAlt:String,showLocation:Boolean,description:String,useInIframe:Boolean},data:()=>({}),computed:{formattedNewsArticleDate(){if(this.newsArticleDate){const e={day:"2-digit",month:"2-digit",year:"2-digit"};return new Intl.DateTimeFormat("en-GB",e).format(new Date(this.newsArticleDate))}return""}},methods:{},mounted(){}});var fI=$i({props:{showAllVenues:Boolean,useInIframe:Boolean,searchApi:String,maxItemsNumber:{type:String,default:void 0,required:!1},itemsPerPage:{type:Number,default:void 0,required:!1},pathLocations:Array}
56,components:{NewsCard:(0,tp.Z)(pI,[["render",function(e,t,n,i,r,s){return eo(),oo("div",nI,[e.showLocation?(eo(),oo("div",iI,le(e.locationName),1)):bo("v-if",!0),fo("div",rI,[fo("div",sI,[e.imageSrc?(eo(),oo("img",{key:0,class:"h-full w-full object-cover flex-shrink-0 transition-all duration-300 ease-in-out group-hover:scale-105 group-hover:transform",src:e.imageSrc,srcset:e.imageSrcset,sizes:"300px",alt:e.imageAlt},null,8,oI)):bo("v-if",!0)]),fo("div",aI,[fo("h3",lI,le(e.title),1),cI,fo("div",hI,le(e.formattedNewsArticleDate),1),fo("div",uI,le(e.description),1),fo("a",{href:e.url,class:"underline font-medium text-grey-80 group-hover:text-primary","aria-label":"Read more about "+e.title,target:e.useInIframe?"_blank":"_self"}," Read more ",8,dI)])])])}]])},data:()=>({selectedVenue:"",newsToShow:null,newsPerPage:null,newsResults:[],totalNewsResults:0,params:{},selectedLocation:"",defaultFromDate:"",defaultToDate:(new Date).toISOString().split("T")[0],fromDate:"",toDate:"",locationMap:{"/content/sqld/corporate/en/about/news-and-media":"Stadium Queensland","/content/sqld/bfs/en/about/news":"Suncorp Stadium","/content/sqld/rfs/en/about/news":"Cbus
56Super Stadium","/content/sqld/nqs/en/about/news":"Queensland Country Bank Stadium","/content/sqld/bcg/en/about/news":"The Gabba","/content/sqld/ssc/en/about/news":"Sleeman Sports Complex","/content/sqld/qsac/en/about/news":"Queensland Sports and Athletics Centre","/content/sqld/cfs/en/about/news":"People First Stadium"}}),created(){this.newsToShow=this.itemsPerPage||12,this.newsPerPage=this.itemsPerPage||12;const e=new Date,t=new Date(e);t.setDate(e.getDate()-45),this.defaultFromDate=t.toISOString().split("T")[0],this.fromDate=this.defaultFromDate,this.toDate=this.defaultToDate},computed:{filteredNews(){return this.newsResults},isDisabled(){return!(""!==this.selectedLocation||""!==this.fromDate||""!==this.toDate)},fromDate(e){e&&this.toDate&&this.toDate<e&&(this.toDate=e)},toDate(e){this.fromDate&&e&&e<this.fromDate&&(this.fromDate=e)}},watch:{selectedLocation(){this.newsToShow=this.itemsPerPage||12,this.debouncedSearch()},fromDate(){this.toDate&&(this.newsToShow=this.itemsPerPage||12,this.debouncedSearch())},toDate(){this.fromDate&&(this.newsToShow=this.itemsPerPage||12,this.debouncedSearch())}},methods:{resetAllFilters(){""===this.selectedLocation&&""!==this.fromDate&&""!==this.toDate&&this.debouncedSearch(),this.selectedLocation="",this.fromDate=this.defaultFromDate,this.toDate=this.defaultToDate,this.newsToShow=this.itemsPerPage},async getCSRFToken(){try{const e=await fetch("/libs/granite/csrf/token.json");if(!e.ok)throw new Error("Failed to get CSRF token");return(await e.json()).token}catch(e){throw console.error("Error getting CSRF token:",e),e}},async search(){this.params.fromDate=this.maxItemsNumber?"":this.fromDate,this.params.toDate=this.maxItemsNumber?"":this.toDate,this.params.pagePath=this.selectedLocation||"",this.params.resultsPerPage=this.maxItemsNumber?this.maxItemsNumber:this.newsPerPage,this.params.scope="news",this.params?.resultsOffset>0&&delete this.params.resultsOffset;try{const e=await this.getCSRFToken(),t=await fetch(this.searchApi,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","CSRF-Token":e},body:new URLSearchParams(this.params)});if(200===t.status){const e=await t.json();this.newsResults=e.results,this.totalNewsResults=e.totalResults}else console.error("Failed to fetch news:",t.status)}catch(e){console.error("Error fetching news:",e)}},async addMoreSearchedNews(){const e=(this.maxItemsNumber?this.maxItemsNumber:this.totalNewsResults)-this.newsToShow;if(e>=0){const t=Math.min(this.newsPerPage,e);try{this.params.fromDate=this.fromDate,this.params.toDate=this.toDate,this.params.pagePath=this.selectedLocation||"",this.params.resultsPerPage=t,this.params.resultsOffset=this.newsToShow,this.params.scope="news";const e=await this.getCSRFToken(),n=await fetch(this.searchApi,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","CSRF-Token":e},body:new URLSearchParams(this.params)});if(200===n.status){const e=await n.json();this.newsResults=this.newsResults.concat(e.results),this.newsToShow+=t}else console.error("Failed to fetch more news:",n.status)}catch(e){console.error("Error fetching more news:",e)}}},debouncedSearch(){this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((()=>{this.search()}),500)}},beforeUnmount(){this.searchTimeout&&clearTimeout(this.searchTimeout)},mounted(){this.search()}});const mI=(0,tp.Z)(fI,[["render",function(e,t,n,i,r,s){const o=ci("NewsCard");return eo(),oo("div",null,[fo("div",DL,[e.maxItemsNumber?bo("v-if",!0):(eo(),oo("div",NL,[OL,fo("div",UL,[e.showAllVenues?(eo(),oo("div",kL,[FL,Ni(fo("select",{id:"filter-by-venue",class:"sq-form-select mb-4","onUpdate:modelValue":t[0]||(t[0]=t=>e.selectedLocation=t)},[VL,(eo(!0),oo($s,null,yr(e.pathLocations,(t=>(eo(),oo("option",{key:t,value:t},le(e.locationMap[t]),9,BL)))),128))],512),[[El,e.selectedLocation]])])):bo("v-if",!0),fo("div",zL,[HL,Ni(fo("input",{id:"from-date","onUpdate:modelValue":t[1]||(t[1]=t=>e.fromDate=t),class:"sq-form-input",type:"date",max:e.toDate},null,8,GL),[[xl,e.fromDate]])]),fo("div",WL,[jL,Ni(fo("input",{id:"to-date","onUpdate:modelValue":t[2]||(t[2]=t=>e.toDate=t),class:"sq-form-input",type:"date",min:e.fromDate},null,8,qL),[[xl,e.toDate]])]),fo("div",null,[fo("button",{disabled:e.isDisabled,onClick:t[3]||(t[3]=(...t)=>e.resetAllFilters&&e.resetAllFilters(...t)),class:"sq-btn h-12 sq-btn-white mt-0 md:mt-6 mb-6"},"Reset filters",8,XL)])])])),e.newsResults&&e.newsResults.length>0&&!e.maxItemsNumber?(eo(),oo("div",$L," Showing "+le(e.filteredNews.length)+" of "+le(e.totalNewsResults)+" result"+le(e.filteredNews.length>
561?"s":""),1)):bo("v-if",!0),fo("div",{"aria-live":e.showAllVenues?"polite":null,class:"grid md:grid-cols-2 grid-cols-1 gap-4"},[(eo(!0),oo($s,null,yr(e.filteredNews,(t=>(eo(),oo("div",{key:t.url},[mo(o,Mo(t,{showLocation:e.showAllVenues,useInIframe:e.useInIframe}),null,16,["showLocation","useInIframe"])])))),128))],8,YL),fo("div",ZL,[KL,fo("div",JL,[(e.maxItemsNumber>0?Math.min(e.maxItemsNumber,e.totalNewsResults):e.totalNewsResults)>e.newsToShow&&!e.maxItemsNumber?(eo(),oo("button",{key:0,onClick:t[4]||(t[4]=(...t)=>e.addMoreSearchedNews&&e.addMoreSearchedNews(...t)),class:"sq-btn sq-btn-white"}," See more ")):bo("v-if",!0)]),fo("div",QL,[e.maxItemsNumber?bo("v-if",!0):(eo(),oo("a",eI," Back to Filter "))])])]),e.newsResults&&0!==e.newsResults.length?bo("v-if",!0):(eo(),oo("div",{key:0,class:"pb-4",role:e.showAllVenues?"status":null}," No news articles found ",8,tI))])}]]);var gI=mI;const vI={class:"mb-4"},_I={class:"mb-6 flex items-center justify-center"},yI=fo("svg",{class:"fill-primary h-7 w-7 mr-2 flex-shrink-0","aria-hidden":"true"},[fo("use",{href:"#icon-alert"})],-1),xI={class:"font-bold"},bI={class:"flex md:hidden flex-col mb-6"},wI=fo("h3",{class:"text-h6 mb-3"},"Choose a track:",-1),SI={class:"sq-form-checkbox-radio ml-4"},EI=fo("span",null,"SAF Track",-1),MI={class:"sq-form-checkbox-radio ml-4"},TI=fo("span",null,"Main Stadium",-1),AI={class:"min-w-full table-fixed bg-white my-4 border-separate border-spacing-y-0 border-spacing-x-5"},CI=fo("th",{class:"py-2 px-4"},null,-1),RI={class:"py-2 px-4"},PI={class:"py-2 px-4"},LI={class:"py-2 font-medium text-center w-[100px]"},II={class:"text-sm"},DI={key:0},NI={key:0},OI=fo("tr",{class:"h-3"},null,-1),UI={class:"text-primary text-right",colspan:"3"},kI=fo("span",{class:"text-h6"},"Last updated: ",-1);var FI=$i({props:{warningMessage:String},data:()=>({tableData:[],showSafTrack:!0,showMainStadium:!0,selectedStadium:"saf track",isMobile:!1,qsacTimetableData:Array}),computed:{formattedLastUpdated(){if(this.qsacTimetableData&&this.qsacTimetableData.lastUpdated){return new Intl.DateTimeFormat("en-GB",{year:"2-digit",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",hour12:!0}).format(new Date(this.qsacTimetableData.lastUpdated)).replace(/,/,"")}return null},showWarningMessage(){if(this.qsacTimetableData&&this.qsacTimetableData.lastUpdated){const e=new Date(this.qsacTimetableData.lastUpdated),t=(new Date).toLocaleString("en-US",{timeZone:"Australia/Brisbane"});return(new Date(t)-e)/36e5>=1}}},methods:{updateMobileData(){this.isMobile=window.innerWidth<976,window.innerWidth<976?(this.showSafTrack="saf track"===this.selectedStadium,this.showMainStadium="main stadium"===this.selectedStadium):(this.showSafTrack=!0,this.showMainStadium=!0)},loadData(){fetch("/content/dam/sqld/system/timetable/timetable-qsac.json").then((e=>{if(!e.ok)throw new Error("Network response was not ok "+e.statusText);return e.json()})).then((e=>{this.qsacTimetableData=JSON.parse(JSON.stringify(e));const t=[],n={weekday:"short",day:"numeric",month:"short"},i=new Date,r=this.qsacTimetableData.qsacData;for(let e=0;e<14;e++){const r=new Date(i);r.setDate(i.getDate()+e);const s=r.toLocaleDateString("en-US",n).replace(",","").split(" ");t.push(`${s[0]} ${s[2]} ${s[1]}`)}this.tableData=t.map((e=>({date:e,SAF:r[e]&&r[e]["State Athletics Facility"]?r[e]["State Athletics Facility"].split("; "):"",main:r[e]&&r[e]["Main Stadium"]?r[e]["Main Stadium"].split("; "):""})))})).catch((e=>{console.error("There was a problem with the fetch operation:",e)}))}},mounted(){this.loadData(),this.updateMobileData(),window.addEventListener("resize",this.updateMobileData)},watch:{selectedStadium(){this.updateMobileData()}}});const VI=(0,tp.Z)(FI,[["render",function(e,t,n,i,r,s){return eo(),oo("div",vI,[Ni(fo("div",_I,[yI,fo("p",xI,le(e.warningMessage),1)],512),[[ka,e.warningMessage&&e.showWarningMessage]]),bo(" Mobile select "),fo("div",bI,[wI,fo("label",SI,[Ni(fo("input",{"onUpdate:modelValue":t[0]||(t[0]=t=>e.selectedStadium=t),type:"radio",name:"50m Indoor Olympic Pool",value:"saf track"},null,512),[[Sl,e.selectedStadium]]),EI]),fo("label",MI,[Ni(fo("input",{"onUpdate:modelValue":t[1]||(t[1]=t=>
56e.selectedStadium=t),type:"radio",name:"50m Outdoor Pool",value:"main stadium"},null,512),[[Sl,e.selectedStadium]]),TI])]),fo("table",AI,[fo("thead",null,[fo("tr",null,[CI,Ni(fo("th",RI,"SAF Track",512),[[ka,e.showSafTrack]]),Ni(fo("th",PI,"Main Stadium",512),[[ka,e.showMainStadium]])])]),fo("tbody",null,[(eo(!0),oo($s,null,yr(e.tableData,((t,n)=>(eo(),oo("tr",{class:"text-center",key:n},[fo("td",LI,[Ni(fo("div",II,"Today:",512),[[ka,0===n]]),fo("div",null,le(t.date),1)]),Ni(fo("td",{class:$(["py-2 border-[1px] border-grey-30",t.SAF?"bg-secondary-70":"bg-grey-10"])},[t.SAF?(eo(!0),oo($s,{key:1},yr(t.SAF,((e,t)=>(eo(),oo("div",{key:t},[fo("span",null,le(e),1)])))),128)):(eo(),oo("span",DI,"Not available"))],2),[[ka,e.showSafTrack]]),Ni(fo("td",{class:$(["py-2 border-[1px] border-grey-30",t.main?"bg-secondary-70":"bg-grey-10"])},[t.main?(eo(!0),oo($s,{key:1},yr(t.main,((e,t)=>(eo(),oo("div",{key:t},[fo("span",null,le(e),1)])))),128)):(eo(),oo("span",NI,"Not available"))],2),[[ka,e.showMainStadium]])])))),128))]),OI,fo("tfoot",null,[Ni(fo("tr",null,[fo("td",UI,[kI,fo("span",null,le(e.formattedLastUpdated),1)])],512),[[ka,e.formattedLastUpdated]])])])])}]]);var BI=VI;const zI={key:0},HI={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},GI=fo("option",{value:"",selected:"",disabled:""},"- Select your event -",-1),WI=["value"],jI={class:"flex items-end"},qI=["disabled"],XI=fo("svg",{"aria-hidden":"true",class:"w-8 h-8 fill-current"},[fo("use",{href:"#icon-chevron-right"})],-1);var $I=$i({props:{items:Array,caption:String},data:()=>({selectedEventPath:""}),methods:{linkToEvent(){window.location.href=this.selectedEventPath}}});const YI=(0,tp.Z)($I,[["render",function(e,t,n,i,r,s){return e.items&&e.items.length>0?(eo(),oo("div",zI,[Ni(fo("div",{class:"mb-2"},le(e.caption),513),[[ka,e.caption]]),fo("div",HI,[Ni(fo("select",{class:"sq-form-select","onUpdate:modelValue":t[0]||(t[0]=t=>e.selectedEventPath=t),"aria-label":"Select event"},[GI,(eo(!0),oo($s,null,yr(e.items,(e=>(eo(),oo("option",{value:e.url},le(e.title),9,WI)))),256))],512),[[El,e.selectedEventPath]]),fo("div",jI,[fo("button",{disabled:!e.selectedEventPath,onClick:t[1]||(t[1]=(...t)=>e.linkToEvent&&e.linkToEvent(...t)),class:"sq-btn sq-btn-primary sq-btn-sm"},[yo(" Go to event page "),XI],8,qI)])])])):bo("v-if",!0)}]]);var ZI=YI;const KI={key:0},JI={class:"w-full my-2"},QI=["href"],eD={class:"px-2 py-2 bg-grey-20"},tD={class:"text-h3 text-primary"};var nD=$i({props:{items:Array},data:()=>({}),computed:{},methods:{formattedDate(e){const t=new Intl.DateTimeFormat("en-GB",{weekday:"short",day:"2-digit",month:"short",year:"numeric"}).format(new Date(e)).replace(/,/,"").split(" ");return`${t[0]} ${t[1]} ${t[2]}, ${t[3]}`}},mounted(){}});var iD=(0,tp.Z)(nD,[["render",function(e,t,n,i,r,s){return eo(),oo($s,null,[e.items&&0!==e.items.length?bo("v-if",!0):(eo(),oo("div",KI," No events found ")),(eo(!0),oo($s,null,yr(e.items,(t=>(eo(),oo("div",JI,[fo("a",{href:t.url,target:"_blank"},[fo("div",eD,[fo("h3",tD,le(t.title),1),Ni(fo("div",{class:"text-primary-70 text-h6"},le(t.locationName),513),[[ka,t.locationName]]),Ni(fo("div",null,le(e.formattedDate(t.eventDate)),513),[[ka,t.eventDate]])])],8,QI)])))),256))],64)}]]);const rD=fo("div",{class:"flex items-center gap-2 shrink-0"},[fo("svg",{"aria-hidden":"true",class:"md:w-[72px] md:h-[72px] w-10 h-10 fill-primary shrink-0"},[fo("use",{href:"#icon-chatbot"})]),fo("h5",{class:"text-h5 font-bold whitespace-nowrap overflow-hidden transition-[opacity,max-width] duration-200 ease-in-out max-w-[60px] md:group-hover:max-w-0 md:group-hover:opacity-0"},"Help")],-1),sD={class:"hidden md:flex items-center gap-4 ml-2 shrink-0 opacity-0 transition-opacity duration-300 delay-200 md:group-hover:opacity-100"},oD=fo("div",null,[fo("h5",{class:"text-h5 font-bold whitespace-nowrap"},"How can I help?"),fo("p",{class:"whitespace-nowrap"},"Try our AI chat")],-1),aD=["src","alt"];const lD=e=>(Jn("data-v-60d51c2a"),e=e(),Qn(),e),cD={ref:"modal",class:"modal bg-white fixed w-full md:h-4/5 h-5/6 top-1/2 left-1/2 z-10 translate-x-[-50%] translate-y-[-50%]"},hD={class:"sq-container sm:my-8 my-4 m-auto relative"},uD=[lD((()=>fo("svg",{class:"w-9 h-9 fill-primary hover:fill-primary-70","aria-hidden":"true"},[fo("use",{href:"#icon-close"}
56)],-1)))],dD={class:"flex flex-col md:flex-row bg-white md:py-5 py-2 md:space-x-2 space-x-0 space-y-2 md:space-y-0 mb-8 md:mr-28 mr-0"},pD={class:"w-full md:w-1/12 flex justify-center mr-8"},fD={class:"h-20"},mD=["src","alt"],gD={class:"w-full md:w-4/12"},vD=lD((()=>fo("button",{class:"text-3xl font-bold pointer-events-none cursor-default"},"How can I help?",-1))),_D=lD((()=>fo("hr",{class:"sq-separator sq-separator-sm"},null,-1))),yD=lD((()=>fo("button",{class:"pointer-events-none cursor-default"},"Ask our AI chat a question.",-1))),xD=["innerHTML"],bD=["href"],wD={class:"w-full md:w-7/12"},SD=["innerHTML"],ED={class:"flex justify-end"},MD=["innerHTML"],TD={class:"dot-control flex justify-center"},AD=[lD((()=>fo("div",{class:"dot-flashing"},null,-1)))],CD=["innerHTML"],RD=["innerHTML"],PD={class:"flex relative"},LD=[lD((()=>fo("svg",{"aria-hidden":"true",class:"w-6 h-6 fill-primary hover:fill-primary-70"},[fo("use",{href:"#icon-arrow-up-bold-outline"})],-1)))],ID={ref:"buttonRelatedQuestions",class:"flex flex-wrap gap-2 mt-2"},DD=["onClick"],ND={class:"mt-5"},OD=["href"],UD={class:"flex relative"},kD=[lD((()=>fo("svg",{"aria-hidden":"true",class:"w-6 h-6 fill-primary hover:fill-primary-70"},[fo("use",{href:"#icon-arrow-up-bold-outline"})],-1)))],FD={class:"mt-5"},VD=["href"];var BD=$i({props:{isModalOpen:Boolean,questions:Array,itemIndex:Number,logoUrl:String,logoAlt:String,accountId:String,btnText:String,btnUrl:String,disclaimer:String},data:()=>({firstFocusableElement:null,lastFocusableElement:null,question:"",iqaInstance:null,throttledSubmitButtonQuestion:null,hasQuestion:!1,hasAnswer:!1,welcomeText:"",streamTextDisplay:"",referenceDisplay:"",askedQuestion:"",welcomeIsFinished:!1,isMobile:!1,md:976}),computed:{},methods:{initModal(){const e=this.$refs.modalOverlay,t=this.$refs.modal;t.classList.add("fade-in"),e.addEventListener("click",(e=>{t.contains(e.target)||this.updateParentValue()})),this.addAccessElementToModal()},addAccessElementToModal(){this.$nextTick((()=>{if(this.$refs.modal){let e=this.$refs.modal.querySelectorAll('a[href], a, [tabindex="0"], button');if(e=Array.prototype.slice.call(e),this.firstFocusableElement=e[0],this.isMobile)this.hasAnswer?this.lastFocusableElement=this.$refs.mobileAndQuestion:this.lastFocusableElement=this.$refs.mobileAndNoQuestion;else if(this.hasAnswer)this.lastFocusableElement=this.$refs.questionInput;else{const e=this.$refs.buttonRelatedQuestions?.querySelectorAll("button");if(e&&e.length>0){const t=e[e.length-1];this.lastFocusableElement=t}else this.lastFocusableElement=this.$refs.questionInput}}document.addEventListener("keydown",this.trapFocus)}))},initIQA(){const e=this.accountId,t=e=>{this.welcomeIsFinished||(this.welcomeText+=`<span>${e}</span>`),"?"===e.trim().slice(-1)&&(this.welcomeIsFinished=!0)},n=e=>{this.hasAnswer=!0,this.streamTextDisplay+=`${e}`,this.addAccessElementToModal()},i=e=>{this.hasAnswer=!0,this.referenceDisplay+=`<li class="sm:max-w-[70%] max-w-full cmp-list__item"><a class="cmp-list__item-link" href='${e.link}'>${e.title}<svg aria-hidden="true">\n <use href="#icon-arrow-right"></use>\n </svg></a></li>`,this.addAccessElementToModal()};this.iqaInstance||(this.iqaInstance=window.CAMPFIRE_IQA.init({accountId:e,callbacks:{onWelcomeStreamText:t,onQuestionStreamText:n,onCitationStreamJSON:i}}))},submitQuestion(){this.hasAnswer=!1,""!==this.question.trim()?(this.streamTextDisplay="",this.referenceDisplay="",this.hasQuestion=!0,this.askedQuestion=this.question,this.iqaInstance&&this.iqaInstance.sendQuestion(this.question),this.question=""):alert("Please enter a question.")},submitButtonQuestion(e){this.hasAnswer=!1,this.streamTextDisplay="",this.referenceDisplay="",this.hasQuestion=!0,this.askedQuestion=e,this.iqaInstance&&this.iqaInstance.sendQuestion(e)},updateParentValue(){this.$emit("updateValue",!this.isModalOpen)},recoverToInit(){this.hasQuestion=!1,this.hasAnswer=!1},handleKeyDown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.updateParentValue())},trapFocus(e){if(!this.isModalOpen)return;"Tab"===e.key?e.shiftKey?document.activeElement===this.firstFocusableElement&&(this.lastFocusableElement.focus(),e.preventDefault()):document.activeElement===this.lastFocusableElement&&(this.firstFocusableElement.focus(),e.preventDefault()):"Escape"===e.key&&this.updateParentValue()},handleModalClose(){this.recoverToInit(),this.updateParentValue()},checkIfMobile(){window.innerWidth<=this.md?this.isMobile=!0:this.isMobile=!1,this.addAccessElementToModal()}},watch:{isModalOpen(e){this.initIQA();const t=this.$refs.modalOverlay;e?document.body.style.overflow="hidden":t&&(document.body.style.overflow="auto")}},created(){this.throttledSubmitButtonQuestion=function(e,t){let n=0;return function(...i){const r=Date.now();r-n>=t&&(n=r,e(...i))}}(this.submitButtonQuestion,1e3)},mounted(){this.initModal(),window.addEventListener("resize",this.checkIfMobile),this.checkIfMobile()}});const zD=(0,tp.Z)(BD,[["render",function(e,t,n,i,r,s){return eo(),oo("div",null,[(eo(),ao(qs,{to:"body"},[fo("div",{class:$({"fixed z-50 top-0 left-0 w-screen h-screen inset-0 bg-gray-400 bg-opacity-30 backdrop-filter backdrop-blur-sm":e.isModalOpen}),ref:"modalOverlay"},[Ni(fo("div",cD,[fo("div",hD,[fo("button",{class:"absolute right-5 sm:-top-3 top-0 z-10",onClick:t[0]||(t[0]=(...t)=>e.handleModalClose&&e.handleModalClose(...t)),"aria-label":"close",onKeydown:t[1]||(t[1]=(...t)=>e.handleKeyDown&&e.handleKeyDown(...t))},uD,32),fo("div",dD,[Ni(fo("div",pD,[fo("span",fD,[fo("img",{src:e.logoUrl,alt:e.logoAlt,class:"w-28 h-auto"},null,8,mD)])],512),[[ka,!e.isMobile]]),fo("div",gD,[vD,_D,yD,fo("div",{innerHTML:e.disclaimer,class:"sq-chatbot-disclaimer text-xs text-gray-500 py-2"},null,8,xD),Ni(fo("a",{href:e.btnUrl,class:"sq-btn sq-btn-sm sq-btn-white"},le(e.btnText),9,bD),[[ka,!e.isMobile]])]),fo("div",wD,[fo("div",{class:$([{"min-h-80 md:min-
56h-60":!e.hasQuestion,"min-h-64 md:min-h-52":e.hasQuestion},"max-h-[calc(83.333vh-360px)] sm:max-h-[calc(80vh-320px)] md:max-h-[calc(80vh-160px)] sm:min-h-[280px] space-y-4 overflow-y-auto"])},[fo("div",null,[fo("button",{ref:"welcomeText",innerHTML:e.welcomeText,class:"px-4 py-2 bg-grey-20 rounded-3xl max-w-full sm:max-w-[70%] cursor-default text-left"},null,8,SD)]),Ni(fo("div",ED,[fo("button",{ref:"askedQuestion",innerHTML:e.askedQuestion,class:"px-4 py-2 rounded-3xl pointer-events-none bg-primary text-white text-left max-w-full sm:max-w-[70%] cursor-default"},null,8,MD)],512),[[ka,e.hasQuestion]]),Ni(fo("div",TD,AD,512),[[ka,!e.hasAnswer&&e.hasQuestion]]),Ni(fo("div",null,[fo("div",{class:"sq-chatbot-text sm:max-w-[70%] max-w-full px-4 py-2 text-left bg-grey-20 rounded-3xl cursor-default",ref:"streamTextDisplay",innerHTML:e.streamTextDisplay},null,8,CD)],512),[[ka,e.hasAnswer]]),Ni(fo("div",null,[fo("ul",{class:"cmp-list pb-4",ref:"referenceDisplay",innerHTML:e.referenceDisplay},null,8,RD)],512),[[ka,e.hasAnswer]]),Ni(fo("div",PD,[Ni(fo("input",{ref:"questionInput",onKeyup:t[2]||(t[2]=Ol(((...t)=>e.submitQuestion&&e.submitQuestion(...t)),["enter"])),"onUpdate:modelValue":t[3]||(t[3]=t=>e.question=t),type:"text",tabindex:"0",placeholder:"Ask a question",style:{"font-size":"16px"},class:"sq-form-input pr-8"},null,544),[[xl,e.question]]),fo("a",{onClick:t[4]||(t[4]=(...t)=>e.submitQuestion&&e.submitQuestion(...t)),"aria-label":"submit question",class:"flex items-center absolute right-2 top-3 cursor-pointer"},LD)],512),[[ka,!e.hasQuestion]]),Ni(fo("div",ID,[(eo(!0),oo($s,null,yr(e.questions,((t,n)=>(eo(),oo("button",{key:n,onClick:n=>e.throttledSubmitButtonQuestion(t),class:"px-4 py-2 bg-primary-10 rounded-3xl hover:bg-primary hover:text-white"},le(t),9,DD)))),128))],512),[[ka,!e.hasQuestion]]),Ni(fo("div",ND,[fo("a",{href:e.btnUrl,ref:"mobileAndNoQuestion",class:"sq-btn sq-btn-sm sq-btn-white"},le(e.btnText),9,OD)],512),[[ka,e.isMobile&&!e.hasQuestion]])],2),Ni(fo("div",UD,[Ni(fo("input",{ref:"questionInput",onKeyup:t[5]||(t[5]=Ol(((...t)=>e.submitQuestion&&e.submitQuestion(...t)),["enter"])),"onUpdate:modelValue":t[6]||(t[6]=t=>e.question=t),type:"text",tabindex:"0",placeholder:"Ask a question",style:{"font-size":"16px"},class:"sq-form-input pr-8"},null,544),[[xl,e.question]]),fo("a",{onClick:t[7]||(t[7]=(...t)=>e.submitQuestion&&e.submitQuestion(...t)),"aria-label":"submit question",class:"flex items-center absolute right-2 top-3 cursor-pointer"},kD)],512),[[ka,e.hasQuestion]]),Ni(fo("div",FD,[fo("a",{href:e.btnUrl,ref:"mobileAndQuestion",class:"sq-btn sq-btn-sm sq-btn-white"},le(e.btnText),9,VD)],512),[[ka,e.isMobile&&e.hasQuestion]])])])])],512),[[ka,e.isModalOpen]])],2)]))])}],["__scopeId","data-v-60d51c2a"]]);var HD=$i({props:{accountId:String,logoUrl:String,logoAlt:String,questions:Array,btnText:String,btnUrl:String,disclaimer:String,items:Array},components:{Modal:zD},data:()=>({isModalOpen:!1,isAtBottom:!1}),computed:{},methods:{openModal(){this.isModalOpen=!0},handleUpdateValue(e){this.isModalOpen&&(this.isModalOpen=e)},checkScrollPosition(){const e=window.innerHeight,t=document.documentElement.scrollHeight,n=window.scrollY+e>=t-10;this.isAtBottom=n}},mounted(){window.addEventListener("scroll",this.checkScrollPosition)}});const GD=(0,tp.Z)(HD,[["render",function(e,t,n,i,r,s){const o=ci("Modal");return eo(),oo("div",null,[mo(o,{isModalOpen:e.isModalOpen,questions:e.questions,onUpdateValue:e.handleUpdateValue,logoUrl:e.logoUrl,logoAlt:e.logoAlt,accountId:e.accountId,btnText:e.btnText,btnUrl:e.btnUrl,disclaimer:e.disclaimer},null,8,["isModalOpen","questions","onUpdateValue","logoUrl","logoAlt","accountId","btnText","btnUrl","disclaimer"]),Ni(fo("div",{style:{"box-shadow":"2px 4px 8px 0px rgba(0, 0, 0, 0.25)"},class:"group fixed bottom-20 right-0 shadow-lg flex bg-white items-center border cursor-pointer z-50 overflow-hidden py-3 px-4 md:py-4 md:px-6 md:w-[190px] md:hover:w-[417px] transition-[width] duration-500 ease-in-out",onClick:t[0]||(t[0]=Dl((t=>e.openModal()),["prevent"]))},[rD,fo("div",sD,[oD,fo("img",{src:e.logoUrl,alt:e.logoAlt,class:"w-auto h-auto max-h-[60px] max-w-[120px] ml-auto shrink-0"},null,8,aD)])],512),[[ka,!e.isAtBottom]])])}]]);var WD=GD;const jD={class:"mb-10"},qD={key:0},XD={class:"grid gap-8 mb-8 lg:grid-cols-4 md:grid-cols-3 sm:grid-cols-2"}
56,$D={key:1,class:"flex items-center justify-center"};const YD={class:"h-full flex flex-col justify-between"},ZD=["src","srcset","alt"],KD={key:1,class:"h-60 w-full"},JD={class:"pt-4 mb-4"},QD={key:0,class:"mb-4"},eN={key:1,class:"line-clamp-3 mb-4"},tN={class:"mb-4"},nN={key:0},iN=fo("span",{class:"font-semibold mr-2"},"Level:",-1),rN={key:1},sN=fo("span",{class:"font-semibold mr-2"},"Section:",-1),oN={key:2,class:"pl-3"},aN={class:"font-bold text-primary"},lN=["href"];var cN=$i({props:{url:String,title:String,description:String,imageSrc:String,imageSrcset:String,imageAlt:String,outletLevel:String,outletSection:String,dietaryClassifications:Array,enableOutletPage:Boolean}});var hN=$i({props:{items:Array,displayOptions:String},components:{OutletCard:(0,tp.Z)(cN,[["render",function(e,t,n,i,r,s){return eo(),oo("div",YD,[fo("div",null,[e.imageSrc?(eo(),oo("img",{key:0,class:"h-60 w-full object-cover",loading:"lazy",src:e.imageSrc,srcset:e.imageSrcset,sizes:"450px",alt:e.imageAlt?e.imageAlt:""},null,8,ZD)):(eo(),oo("div",KD)),fo("div",JD,[e.title?(eo(),oo("h3",QD,le(e.title),1)):bo("v-if",!0),e.description?(eo(),oo("div",eN,le(e.description),1)):bo("v-if",!0),fo("div",tN,[e.outletLevel?(eo(),oo("div",nN,[iN,fo("span",null,le(e.outletLevel),1)])):bo("v-if",!0),e.outletSection?(eo(),oo("div",rN,[sN,fo("span",null,le(e.outletSection),1)])):bo("v-if",!0)]),e.dietaryClassifications&&e.dietaryClassifications.length>0?(eo(),oo("div",oN,[(eo(!0),oo($s,null,yr(e.dietaryClassifications,((e,t)=>(eo(),oo("ul",{class:"!list-disc",key:t},[fo("li",aN,le(e),1)])))),128))])):bo("v-if",!0)])]),fo("div",null,[e.enableOutletPage?(eo(),oo("a",{key:0,href:e.url,class:"sq-btn sq-btn-white sq-btn-sm"},"See info and menu",8,lN)):bo("v-if",!0)])])}]])},data:()=>({filteredItems:[],showAll:!1}),computed:{},methods:{seeMoreOutlets(){this.filteredItems=this.items,this.showAll=!0}},mounted(){this.filteredItems=this.displayOptions&&"showWithPagination"===this.displayOptions?this.items.slice(0,4):this.items}});const uN=(0,tp.Z)(hN,[["render",function(e,t,n,i,r,s){const o=ci("OutletCard");return eo(),oo("div",jD,[e.items&&0!==e.items.length?bo("v-if",!0):(eo(),oo("div",qD," No outlet found. ")),fo("div",XD,[(eo(!0),oo($s,null,yr(e.filteredItems,(e=>(eo(),ao(o,Mo({key:e.url},e),null,16)))),128))]),!e.showAll&&"showWithPagination"===e.displayOptions&&e.items.length>4?(eo(),oo("div",$D,[fo("button",{class:"sq-btn sq-btn-white",onClick:t[0]||(t[0]=t=>e.seeMoreOutlets())},"See more")])):bo("v-if",!0)])}]]);var dN=uN;const pN={class:"mb-10"},fN={class:"flex flex-col md:flex-row"},mN={class:"block md:hidden"},gN=fo("svg",{class:"h-6 w-6 fill-current","aria-hidden":"true"},[fo("use",{href:"#icon-filter"})],-1),vN={class:"mb-6 flex flex-col md:block"},_N={class:"flex justify-between"},yN=fo("h2",{class:"text-h3"},"Filter Media",-1),xN=[fo("svg",{class:"h-8 w-8 fill-primary","aria-hidden":"true"},[fo("use",{href:"#icon-chevron-left"})],-1)],bN=["disabled"],wN={class:"mb-6"},SN=fo("h3",{class:"text-h4"},"Location/Venue",-1),EN={class:"flex flex-col"},MN={class:"sq-form-checkbox-radio"},TN=["name","value"],AN=["name","value"],CN=fo("h3",{class:"text-h4"},"Date Range",-1),RN={class:"flex flex-col mb-6 mt-2"},PN=fo("label",{class:"sq-form-label",for:"from-date"},"From",-1),LN=["min"],IN={class:"flex flex-col mb-6"},DN=fo("label",{class:"sq-form-label",for:"to-date"},"To",-1),NN=["min"],ON={class:"basis-5/6"},UN={key:0},kN={class:"grid grid-cols-1 md:grid-cols-2 gap-x-2 gap-y-4"},FN={class:"relative mb-2 md:mb-0 fle flex-col justify-start col-span-2"},VN={key:0,class:"text-center bg-secondary py-1 absolute w-full"},BN=["src","alt"],zN={class:"col-span-3"},HN={key:0,class:"text-primary mb-2 text-h6"},GN={key:1,class:"line-clamp-2 text-h6"},WN=fo("div",{class:"sq-separator"},null,-1),jN={class:"flex items-start md:items-center flex-wrap flex-col md:flex-row"},qN=["href"],XN=fo("svg",{class:"flex-shrink-0","aria-hidden":"true"},[fo("use",{href:"#icon-download"})],-1),$N={key:0},YN={key:1},ZN=["href","target"],KN={key:1,class:"flex justify-center mt-8"};var JN=$i({props:{items:Array,useInIframe:String},data:()=>({isMobile:!1,selectedLocations:[],selectedVenues:[],fromDate:"",toDate:"",isAllItems:!1}),computed:{locationTags(){const e=this.items.map((e=>e.locationTag)),t=this.items.map((e=>e.venueTag)),n=[...new Map(t.map((e=>[e.id,e]))).values()],i=[...new Map(e.map((e=>[e.id,e]))).values()].reduce(((e,t)=>(e[t.id]={...t,subVenues:[]},e)),{});
56return n.forEach((e=>{const t=e.id.split("/").slice(0,2).join("/");i[t]&&i[t].subVenues.push(e)})),Object.values(i)},filteredItems(){const e=this.items.filter((e=>{const t=this.toStartOfDay(this.fromDate),n=this.toStartOfDay(this.toDate),i=this.toStartOfDay(e.date),r=(!t||t<=i)&&(!n||n>=i);return(0===this.selectedLocations.length||this.selectedLocations.includes(e.locationTag.title))&&(0===this.selectedVenues.length||this.selectedVenues.includes(e.venueTag.title))&&r}));return e&&e.length>6?this.isAllItems=!1:this.isAllItems=!0,e},maxItems(){return this.filteredItems&&this.filteredItems.length>6&&!this.isAllItems?this.filteredItems.slice(0,6):this.filteredItems},isDisabled(){return!(0!==this.selectedLocations.length||0!==this.selectedVenues.length||""!==this.fromDate||""!==this.toDate)}},methods:{formatDate(e){return e?new Intl.DateTimeFormat("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}).format(new Date(e)):""},updateIsMobile(){this.isMobile=window.innerWidth<976},handleTab(e){const t=document.getElementById("mediaReleaseFilter");if(!this.isMobile)return;const n=t.querySelectorAll("input, button, select"),i=n[0],r=n[n.length-1];e.shiftKey&&document.activeElement===i&&(e.preventDefault(),r.focus()),e.shiftKey||document.activeElement!==r||(e.preventDefault(),i.focus())},showMobileDrawerFilter(){const e=document.getElementById("mediaReleaseFilter");document.getElementById("mobile-btn-close").focus(),e.classList.add("drawer-animation"),document.body.classList.add("overflow-hidden")},hideMobileDrawerFilter(){const e=document.getElementById("mediaReleaseFilter");document.getElementById("mobile-btn-close").blur(),e.classList.remove("drawer-animation"),document.body.classList.remove("overflow-hidden")},resetAllFilters(){this.selectedLocations=[],this.selectedVenues=[],this.fromDate="",this.toDate="",this.filteredItems=this.items},showAllItems(){this.isAllItems=!0},toStartOfDay(e){if(!e)return null;const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()}},mounted(){this.updateIsMobile(),window.addEventListener("resize",this.updateIsMobile)}});const QN=(0,tp.Z)(JN,[["render",function(e,t,n,i,r,s){return eo(),oo("div",pN,[fo("div",fN,[fo("div",mN,[fo("button",{onClick:t[0]||(t[0]=(...t)=>e.showMobileDrawerFilter&&e.showMobileDrawerFilter(...t)),class:"sq-btn sq-btn-white mb-6"},[gN,yo(" Filter media ")])]),fo("div",{id:"mediaReleaseFilter",class:$(["overflow-y-auto md:overflow-y-hidden",e.isMobile?"mobile-drawer-filter":"desktop-filter"]),onKeydown:t[7]||(t[7]=Ol(((...t)=>e.handleTab&&e.handleTab(...t)),["tab"]))},[fo("div",vN,[fo("div",_N,[yN,fo("button",{class:"md:hidden",id:"mobile-btn-close",onClick:t[1]||(t[1]=(...t)=>e.hideMobileDrawerFilter&&e.hideMobileDrawerFilter(...t)),"aria-label":"Close filter"},xN)]),fo("button",{disabled:e.isDisabled,onClick:t[2]||(t[2]=(...t)=>e.resetAllFilters&&e.resetAllFilters(...t)),class:"sq-btn sq-btn-white mt-6"},"Reset filters",8,bN)]),fo("div",wN,[SN,(eo(!0),oo($s,null,yr(e.locationTags,(n=>(eo(),oo("div",{key:n.id},[fo("div",EN,[fo("label",MN,[Ni(fo("input",{"onUpdate:modelValue":t[3]||(t[3]=t=>e.selectedLocations=t),type:"checkbox",name:n.title,value:n.title},null,8,TN),[[bl,e.selectedLocations]]),fo("span",null,le(n.title),1)]),(eo(!0),oo($s,null,yr(n.subVenues,(i=>(eo(),oo("label",{class:"sq-form-checkbox-radio ml-4",key:n.id},[Ni(fo("input",{"onUpdate:modelValue":t[4]||(t[4]=t=>e.selectedVenues=t),type:"checkbox",name:i.title,value:i.title},null,8,AN),[[bl,e.selectedVenues]]),fo("span",null,le(i.title),1)])))),128))])])))),128))]),fo("div",null,[CN,fo("div",RN,[PN,Ni(fo("input",{id:"from-date","onUpdate:modelValue":t[5]||(t[5]=t=>e.fromDate=t),class:"sq-form-input",type:"date",min:e.minDateToday},null,8,LN),[[xl,e.fromDate]])]),fo("div",IN,[DN,Ni(fo("input",{id:"to-date","onUpdate:modelValue":t[6]||(t[6]=t=>e.toDate=t),class:"sq-form-input",type:"date",min:e.minDateToday},null,8,NN),[[xl,e.toDate]])])])],34),fo("div",ON,[e.maxItems&&0!==e.maxItems.length?bo("v-if",!0):(eo(),oo("div",UN," No media release found. ")),fo("div",kN,[(eo(!0),oo($s,null,yr(e.maxItems,((t,n)=>
56(eo(),oo("div",{key:n,class:"grid grid-cols-1 md:grid-cols-5 gap-4"},[fo("div",FN,[t.location?(eo(),oo("div",VN,le(t.location),1)):bo("v-if",!0),t.thumbnailImage?(eo(),oo("img",{key:1,class:"w-full h-full max-h-[160px] object-cover",src:t.thumbnailImage,alt:t.thumbnailImageAlt},null,8,BN)):bo("v-if",!0)]),fo("div",zN,[t.date?(eo(),oo("div",HN,le(e.formatDate(t.date)),1)):bo("v-if",!0),t.title?(eo(),oo("h3",GN,le(t.title),1)):bo("v-if",!0),WN,fo("div",jN,[t.fileDownloadPath?(eo(),oo("a",{key:0,href:t.fileDownloadPath,class:"sq-btn sq-btn-primary sq-btn-sm mr-2 mb-2 md:mb-0 whitespace-nowrap"},[XN,t.fileSize?(eo(),oo("span",$N,"Download media ("+le(t.fileSize)+")",1)):bo("v-if",!0),t.fileSize?bo("v-if",!0):(eo(),oo("span",YN,"Download media"))],8,qN)):bo("v-if",!0),t.linkUrl?(eo(),oo("a",{key:1,href:t.linkUrl,target:e.useInIframe?"_blank":"_self",class:"underline text-h6 whitespace-nowrap"},le(t.linkText),9,ZN)):bo("v-if",!0)])])])))),128))]),e.isAllItems?bo("v-if",!0):(eo(),oo("div",KN,[fo("button",{onClick:t[8]||(t[8]=(...t)=>e.showAllItems&&e.showAllItems(...t)),class:"sq-btn sq-btn-white btn-see-more"},"See more media releases")]))])])])}]]);const eO={Gallery:JC,EventCard:np,EventList:Fp,VenueMap:xC,FunctionHireList:Ef,SearchResults:zR,JobList:Ff,BulkEditor:tL,SleemanF
56acilityTimetable:IL,NewsList:gI,QsacFacilityTimetable:BI,EventSeatingMapList:ZI,EventListFeed:iD,Chatbot:WD,OutletList:dN,MediaReleaseList:QN};var tO;tO={},document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll("[data-vue-app]").forEach((e=>{Gl({components:{...eO,...tO}}).mount(e)}))}))}()}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.