|
|
|
|
|
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const g of document.querySelectorAll('link[rel="modulepreload"]'))i(g);new MutationObserver(g=>{for(const $ of g)if($.type==="childList")for(const V of $.addedNodes)V.tagName==="LINK"&&V.rel==="modulepreload"&&i(V)}).observe(document,{childList:!0,subtree:!0});function r(g){const $={};return g.integrity&&($.integrity=g.integrity),g.referrerPolicy&&($.referrerPolicy=g.referrerPolicy),g.crossOrigin==="use-credentials"?$.credentials="include":g.crossOrigin==="anonymous"?$.credentials="omit":$.credentials="same-origin",$}function i(g){if(g.ep)return;g.ep=!0;const $=r(g);fetch(g.href,$)}})();/**
|
|
|
|
|
|
* @vue/shared v3.5.26
|
|
|
|
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
|
|
|
|
* @license MIT
|
|
|
|
|
|
**/function makeMap(n){const t=Object.create(null);for(const r of n.split(","))t[r]=1;return r=>r in t}const EMPTY_OBJ$1={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,isOn=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&(n.charCodeAt(2)>122||n.charCodeAt(2)<97),isModelListener=n=>n.startsWith("onUpdate:"),extend$2=Object.assign,remove$1=(n,t)=>{const r=n.indexOf(t);r>-1&&n.splice(r,1)},hasOwnProperty$h=Object.prototype.hasOwnProperty,hasOwn$1=(n,t)=>hasOwnProperty$h.call(n,t),isArray$5=Array.isArray,isMap$2=n=>toTypeString(n)==="[object Map]",isSet$2=n=>toTypeString(n)==="[object Set]",isDate$1=n=>toTypeString(n)==="[object Date]",isFunction$4=n=>typeof n=="function",isString$2=n=>typeof n=="string",isSymbol$1=n=>typeof n=="symbol",isObject$6=n=>n!==null&&typeof n=="object",isPromise=n=>(isObject$6(n)||isFunction$4(n))&&isFunction$4(n.then)&&isFunction$4(n.catch),objectToString$1=Object.prototype.toString,toTypeString=n=>objectToString$1.call(n),toRawType=n=>toTypeString(n).slice(8,-1),isPlainObject$3=n=>toTypeString(n)==="[object Object]",isIntegerKey=n=>isString$2(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=n=>{const t=Object.create(null);return r=>t[r]||(t[r]=n(r))},camelizeRE=/-\w/g,camelize=cacheStringFunction(n=>n.replace(camelizeRE,t=>t.slice(1).toUpperCase())),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(n=>n.replace(hyphenateRE,"-$1").toLowerCase()),capitalize$1=cacheStringFunction(n=>n.charAt(0).toUpperCase()+n.slice(1)),toHandlerKey=cacheStringFunction(n=>n?`on${capitalize$1(n)}`:""),hasChanged=(n,t)=>!Object.is(n,t),invokeArrayFns=(n,...t)=>{for(let r=0;r<n.length;r++)n[r](...t)},def=(n,t,r,i=!1)=>{Object.defineProperty(n,t,{configurable:!0,enumerable:!1,writable:i,value:r})},looseToNumber$1=n=>{const t=parseFloat(n);return isNaN(t)?n:t},toNumber$1=n=>{const t=isString$2(n)?Number(n):NaN;return isNaN(t)?n:t};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function normalizeStyle$1(n){if(isArray$5(n)){const t={};for(let r=0;r<n.length;r++){const i=n[r],g=isString$2(i)?parseStringStyle(i):normalizeStyle$1(i);if(g)for(const $ in g)t[$]=g[$]}return t}else if(isString$2(n)||isObject$6(n))return n}const listDelimiterRE=/;(?![^(]*\))/g,propertyDelimiterRE=/:([^]+)/,styleCommentRE=/\/\*[^]*?\*\//g;function parseStringStyle(n){const t={};return n.replace(styleCommentRE,"").split(listDelimiterRE).forEach(r=>{if(r){const i=r.split(propertyDelimiterRE);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function stringifyStyle(n){if(!n)return"";if(isString$2(n))return n;let t="";for(const r in n){const i=n[r];if(isString$2(i)||typeof i=="number"){const g=r.startsWith("--")?r:hyphenate(r);t+=`${g}:${i};`}}return t}function normalizeClass(n){let t="";if(isString$2(n))t=n;else if(isArray$5(n))for(let r=0;r<n.length;r++){const i=normalizeClass(n[r]);i&&(t+=i+" ")}else if(isObject$6(n))for(const r in n)n[r]&&(t+=r+" ");return t.trim()}function normalizeProps(n){if(!n)return null;let{class:t,style:r}=n;return t&&!isString$2(t)&&(n.class=normalizeClass(t)),r&&(n.style=normalizeStyle$1(r)),n}const SVG_TAGS="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",VOID_TAGS="area,base,br,col,embed,hr,img,input,link,meta,param,source,track
|
|
|
|
|
|
* @vue/reactivity v3.5.26
|
|
|
|
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
|
|
|
|
* @license MIT
|
|
|
|
|
|
**/let activeEffectScope;class EffectScope{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=activeEffectScope,!t&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,r;if(this.scopes)for(t=0,r=this.scopes.length;t<r;t++)this.scopes[t].pause();for(t=0,r=this.effects.length;t<r;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,r;if(this.scopes)for(t=0,r=this.scopes.length;t<r;t++)this.scopes[t].resume();for(t=0,r=this.effects.length;t<r;t++)this.effects[t].resume()}}run(t){if(this._active){const r=activeEffectScope;try{return activeEffectScope=this,t()}finally{activeEffectScope=r}}}on(){++this._on===1&&(this.prevScope=activeEffectScope,activeEffectScope=this)}off(){this._on>0&&--this._on===0&&(activeEffectScope=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let r,i;for(r=0,i=this.effects.length;r<i;r++)this.effects[r].stop();for(this.effects.length=0,r=0,i=this.cleanups.length;r<i;r++)this.cleanups[r]();if(this.cleanups.length=0,this.scopes){for(r=0,i=this.scopes.length;r<i;r++)this.scopes[r].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const g=this.parent.scopes.pop();g&&g!==this&&(this.parent.scopes[this.index]=g,g.index=this.index)}this.parent=void 0}}}function effectScope(n){return new EffectScope(n)}function getCurrentScope(){return activeEffectScope}function onScopeDispose(n,t=!1){activeEffectScope&&activeEffectScope.cleanups.push(n)}let activeSub;const pausedQueueEffects=new WeakSet;class ReactiveEffect{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,activeEffectScope&&activeEffectScope.active&&activeEffectScope.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,pausedQueueEffects.has(this)&&(pausedQueueEffects.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||batch(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,cleanupEffect(this),prepareDeps(this);const t=activeSub,r=shouldTrack;activeSub=this,shouldTrack=!0;try{return this.fn()}finally{cleanupDeps(this),activeSub=t,shouldTrack=r,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)removeSub(t);this.deps=this.depsTail=void 0,cleanupEffect(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?pausedQueueEffects.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){isDirty(this)&&this.run()}get dirty(){return isDirty(this)}}let batchDepth=0,batchedSub,batchedComputed;function batch(n,t=!1){if(n.flags|=8,t){n.next=batchedComputed,batchedComputed=n;return}n.next=batchedSub,batchedSub=n}function startBatch(){batchDepth++}function endBatch(){if(--batchDepth>0)return;if(batchedComputed){let t=batchedComputed;for(batchedComputed=void 0;t;){const r=t.next;t.next=void 0,t.flags&=-9,t=r}}let n;for(;batchedSub;){let t=batchedSub;for(batchedSub=void 0;t;){const r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){n||(n=i)}t=r}}if(n)throw n}function prepareDeps(n){for(let t=n.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function cleanupDeps(n){let t,r=n.depsTail,i=r;for(;i;){const g=i.prevDep;i.version===-1?(i===r&&(r=g),removeSub(i),removeDep(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=g}n.deps=t,n.depsTail=r}function isDirty(n){for(let t=n.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(refreshComputed(t.dep.computed)||t.dep.version!==t.version))return!0;return!!n._dirty}function refreshComputed(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===globalVersion)||(n.globalVersion=globalVersion,!n.isSSR&&n.flags&128&&(!n.deps&&!n._dirty||!isDirty(n))))return;n.flags|=2;const t=n.dep,r=activeSub,i=shouldTrack;activeSub=n,shouldTrack=!0;try{pr
|
|
|
|
|
|
* @vue/runtime-core v3.5.26
|
|
|
|
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
|
|
|
|
* @license MIT
|
|
|
|
|
|
**/const stack=[];function pushWarningContext$1(n){stack.push(n)}function popWarningContext$1(){stack.pop()}let isWarning=!1;function warn$1(n,...t){if(isWarning)return;isWarning=!0,pauseTracking();const r=stack.length?stack[stack.length-1].component:null,i=r&&r.appContext.config.warnHandler,g=getComponentTrace();if(i)callWithErrorHandling(i,r,11,[n+t.map($=>{var V,re;return(re=(V=$.toString)==null?void 0:V.call($))!=null?re:JSON.stringify($)}).join(""),r&&r.proxy,g.map(({vnode:$})=>`at <${formatComponentName(r,$.type)}>`).join(`
|
|
|
|
|
|
`),g]);else{const $=[`[Vue warn]: ${n}`,...t];g.length&&$.push(`
|
|
|
|
|
|
`,...formatTrace(g)),console.warn(...$)}resetTracking(),isWarning=!1}function getComponentTrace(){let n=stack[stack.length-1];if(!n)return[];const t=[];for(;n;){const r=t[0];r&&r.vnode===n?r.recurseCount++:t.push({vnode:n,recurseCount:0});const i=n.component&&n.component.parent;n=i&&i.vnode}return t}function formatTrace(n){const t=[];return n.forEach((r,i)=>{t.push(...i===0?[]:[`
|
|
|
|
|
|
`],...formatTraceEntry(r))}),t}function formatTraceEntry({vnode:n,recurseCount:t}){const r=t>0?`... (${t} recursive calls)`:"",i=n.component?n.component.parent==null:!1,g=` at <${formatComponentName(n.component,n.type,i)}`,$=">"+r;return n.props?[g,...formatProps(n.props),$]:[g+$]}function formatProps(n){const t=[],r=Object.keys(n);return r.slice(0,3).forEach(i=>{t.push(...formatProp(i,n[i]))}),r.length>3&&t.push(" ..."),t}function formatProp(n,t,r){return isString$2(t)?(t=JSON.stringify(t),r?t:[`${n}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?r?t:[`${n}=${t}`]:isRef(t)?(t=formatProp(n,toRaw(t.value),!0),r?t:[`${n}=Ref<`,t,">"]):isFunction$4(t)?[`${n}=fn${t.name?`<${t.name}>`:""}`]:(t=toRaw(t),r?t:[`${n}=`,t])}function callWithErrorHandling(n,t,r,i){try{return i?n(...i):n()}catch(g){handleError(g,t,r)}}function callWithAsyncErrorHandling(n,t,r,i){if(isFunction$4(n)){const g=callWithErrorHandling(n,t,r,i);return g&&isPromise(g)&&g.catch($=>{handleError($,t,r)}),g}if(isArray$5(n)){const g=[];for(let $=0;$<n.length;$++)g.push(callWithAsyncErrorHandling(n[$],t,r,i));return g}}function handleError(n,t,r,i=!0){const g=t?t.vnode:null,{errorHandler:$,throwUnhandledErrorInProduction:V}=t&&t.appContext.config||EMPTY_OBJ$1;if(t){let re=t.parent;const ie=t.proxy,ae=`https://vuejs.org/error-reference/#runtime-${r}`;for(;re;){const oe=re.ec;if(oe){for(let le=0;le<oe.length;le++)if(oe[le](n,ie,ae)===!1)return}re=re.parent}if($){pauseTracking(),callWithErrorHandling($,null,10,[n,ie,ae]),resetTracking();return}}logError$1(n,r,g,i,V)}function logError$1(n,t,r,i=!0,g=!1){if(g)throw n;console.error(n)}const queue=[];let flushIndex=-1;const pendingPostFlushCbs=[];let activePostFlushCbs=null,postFlushIndex=0;const resolvedPromise=Promise.resolve();let currentFlushPromise=null;function nextTick(n){const t=currentFlushPromise||resolvedPromise;return n?t.then(this?n.bind(this):n):t}function findInsertionIndex$1(n){let t=flushIndex+1,r=queue.length;for(;t<r;){const i=t+r>>>1,g=queue[i],$=getId$1(g);$<n||$===n&&g.flags&2?t=i+1:r=i}return t}function queueJob(n){if(!(n.flags&1)){const t=getId$1(n),r=queue[queue.length-1];!r||!(n.flags&2)&&t>=getId$1(r)?queue.push(n):queue.splice(findInsertionIndex$1(t),0,n),n.flags|=1,queueFlush()}}function queueFlush(){currentFlushPromise||(currentFlushPromise=resolvedPromise.then(flushJobs))}function queuePostFlushCb(n){isArray$5(n)?pendingPostFlushCbs.push(...n):activePostFlushCbs&&n.id===-1?activePostFlushCbs.splice(postFlushIndex+1,0,n):n.flags&1||(pendingPostFlushCbs.push(n),n.flags|=1),queueFlush()}function flushPreFlushCbs(n,t,r=flushIndex+1){for(;r<queue.length;r++){const i=queue[r];if(i&&i.flags&2){if(n&&i.id!==n.uid)continue;queue.splice(r,1),r--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function flushPostFlushCbs(n){if(pendingPostFlushCbs.length){const t=[...new Set(pendingPostFlushCbs)].sort((r,i)=>getId$1(r)-getId$1(i));if(pendingPostFlushCbs.length=0,activePostFlushCbs){activePostFlushCbs.push(...t);return}for(activePostFlushCbs=t,postFlushIndex=0;postFlushIndex<activePostFlushCbs.length;postFlushIndex++){const r=activePostFlushCbs[postFlushIndex];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}activePostFlushCbs=null,postFlushIndex=0}}const getId$1=n=>n.id==null?n.flags&2?-1:1/0:n.id;function flushJobs(n){const t=NOOP;try{for(flushIndex=0;flushIndex<queue.length;flushIndex++){const r=queue[flushIndex];r&&!(r.flags&8)&&(r.flags&4&&(r.flags&=-2),callWithErrorHandling(r,r.i,r.i?15:14),r.flags&4||(r.flags&=-2))}}finally{for(;flushIndex<queue.length;flushIndex++){const r=queue[flushIndex];r&&(r.flags&=-2)}flushIndex=-1,queue.length=0,flushPostFlushCbs(),currentFlushPromise=null,(queue.length||pendingPostFlushCbs.length)&&flushJobs()}}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance$1(n){const t=currentRenderingInstance;return currentRenderingInstance=n,currentScopeId=n&&n.type.__scopeId||null,t}function withCtx(n,t=currentRenderingInstance,r){if(!t||n._n)return n;const i=(...g)=>{i._d&&setBlockTracking(-1);const $=setCurrentRenderi
|
|
|
|
|
|
* @vue/runtime-dom v3.5.26
|
|
|
|
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
|
|
|
|
* @license MIT
|
|
|
|
|
|
**/let policy;const tt$1=typeof window<"u"&&window.trustedTypes;if(tt$1)try{policy=tt$1.createPolicy("vue",{createHTML:n=>n})}catch{}const unsafeToTrustedHTML=policy?n=>policy.createHTML(n):n=>n,svgNS="http://www.w3.org/2000/svg",mathmlNS="http://www.w3.org/1998/Math/MathML",doc=typeof document<"u"?document:null,templateContainer=doc&&doc.createElement("template"),nodeOps={insert:(n,t,r)=>{t.insertBefore(n,r||null)},remove:n=>{const t=n.parentNode;t&&t.removeChild(n)},createElement:(n,t,r,i)=>{const g=t==="svg"?doc.createElementNS(svgNS,n):t==="mathml"?doc.createElementNS(mathmlNS,n):r?doc.createElement(n,{is:r}):doc.createElement(n);return n==="select"&&i&&i.multiple!=null&&g.setAttribute("multiple",i.multiple),g},createText:n=>doc.createTextNode(n),createComment:n=>doc.createComment(n),setText:(n,t)=>{n.nodeValue=t},setElementText:(n,t)=>{n.textContent=t},parentNode:n=>n.parentNode,nextSibling:n=>n.nextSibling,querySelector:n=>doc.querySelector(n),setScopeId(n,t){n.setAttribute(t,"")},insertStaticContent(n,t,r,i,g,$){const V=r?r.previousSibling:t.lastChild;if(g&&(g===$||g.nextSibling))for(;t.insertBefore(g.cloneNode(!0),r),!(g===$||!(g=g.nextSibling)););else{templateContainer.innerHTML=unsafeToTrustedHTML(i==="svg"?`<svg>${n}</svg>`:i==="mathml"?`<math>${n}</math>`:n);const re=templateContainer.content;if(i==="svg"||i==="mathml"){const ie=re.firstChild;for(;ie.firstChild;)re.appendChild(ie.firstChild);re.removeChild(ie)}t.insertBefore(re,r)}return[V?V.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}},TRANSITION="transition",ANIMATION="animation",vtcKey=Symbol("_vtc"),DOMTransitionPropsValidators={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},TransitionPropsValidators=extend$2({},BaseTransitionPropsValidators,DOMTransitionPropsValidators),decorate$1=n=>(n.displayName="Transition",n.props=TransitionPropsValidators,n),Transition=decorate$1((n,{slots:t})=>h$1(BaseTransition,resolveTransitionProps(n),t)),callHook=(n,t=[])=>{isArray$5(n)?n.forEach(r=>r(...t)):n&&n(...t)},hasExplicitCallback=n=>n?isArray$5(n)?n.some(t=>t.length>1):n.length>1:!1;function resolveTransitionProps(n){const t={};for(const qe in n)qe in DOMTransitionPropsValidators||(t[qe]=n[qe]);if(n.css===!1)return t;const{name:r="v",type:i,duration:g,enterFromClass:$=`${r}-enter-from`,enterActiveClass:V=`${r}-enter-active`,enterToClass:re=`${r}-enter-to`,appearFromClass:ie=$,appearActiveClass:ae=V,appearToClass:oe=re,leaveFromClass:le=`${r}-leave-from`,leaveActiveClass:ue=`${r}-leave-active`,leaveToClass:de=`${r}-leave-to`}=n,he=normalizeDuration(g),pe=he&&he[0],_e=he&&he[1],{onBeforeEnter:Ce,onEnter:xe,onEnterCancelled:Ie,onLeave:Ne,onLeaveCancelled:Oe,onBeforeAppear:$e=Ce,onAppear:Ve=xe,onAppearCancelled:Ue=Ie}=t,Fe=(qe,Et,kt,At)=>{qe._enterCancelled=At,removeTransitionClass(qe,Et?oe:re),removeTransitionClass(qe,Et?ae:V),kt&&kt()},ze=(qe,Et)=>{qe._isLeaving=!1,removeTransitionClass(qe,le),removeTransitionClass(qe,de),removeTransitionClass(qe,ue),Et&&Et()},Pt=qe=>(Et,kt)=>{const At=qe?Ve:xe,Dt=()=>Fe(Et,qe,kt);callHook(At,[Et,Dt]),nextFrame(()=>{removeTransitionClass(Et,qe?ie:$),addTransitionClass(Et,qe?oe:re),hasExplicitCallback(At)||whenTransitionEnds(Et,i,pe,Dt)})};return extend$2(t,{onBeforeEnter(qe){callHook(Ce,[qe]),addTransitionClass(qe,$),addTransitionClass(qe,V)},onBeforeAppear(qe){callHook($e,[qe]),addTransitionClass(qe,ie),addTransitionClass(qe,ae)},onEnter:Pt(!1),onAppear:Pt(!0),onLeave(qe,Et){qe._isLeaving=!0;const kt=()=>ze(qe,Et);addTransitionClass(qe,le),qe._enterCancelled?(addTransitionClass(qe,ue),forceReflow(qe)):(forceReflow(qe),addTransitionClass(qe,ue)),nextFrame(()=>{qe._isLeaving&&(removeTransitionClass(qe,le),addTransitionClass(qe,de),hasExplicitCallback(Ne)||whenTransitionEnds(qe,i,_e,kt))}),callHook(Ne,[qe,kt])},onEnterCancelled(qe){Fe(qe,!1,void 0,!0),callHook(Ie,[qe])},onAppearCancelle
|
|
|
|
|
|
<path d="m134.5,20c30.58,0,59.34,11.91,80.96,33.54,21.63,21.63,33.54,50.38,33.54,80.96s-11.91,59.34-33.54,80.96c-21.63,21.63-50.38,33.54-80.96,33.54s-59.34-11.91-80.96-33.54c-21.63-21.63-33.54-50.38-33.54-80.96s11.91-59.34,33.54-80.96c21.63-21.63,50.38-33.54,80.96-33.54m0-20C60.22,0,0,60.22,0,134.5s60.22,134.5,134.5,134.5,134.5-60.22,134.5-134.5S208.78,0,134.5,0h0Z"/>\r
|
|
|
|
|
|
<path d="m134.5,240c30.58,0,59.34,11.91,80.96,33.54,21.63,21.63,33.54,50.38,33.54,80.96s-11.91,59.34-33.54,80.96c-21.63,21.63-50.38,33.54-80.96,33.54s-59.34-11.91-80.96-33.54c-21.63-21.63-33.54-50.38-33.54-80.96s11.91-59.34,33.54-80.96c21.63-21.63,50.38-33.54,80.96-33.54m0-20C60.22,220,0,280.22,0,354.5s60.22,134.5,134.5,134.5,134.5-60.22,134.5-134.5-60.22-134.5-134.5-134.5h0Z"/>\r
|
|
|
|
|
|
<path d="m319.5,129.75c30.58,0,59.34,11.91,80.96,33.54,21.63,21.63,33.54,50.38,33.54,80.96s-11.91,59.34-33.54,80.96c-21.63,21.63-50.38,33.54-80.96,33.54s-59.34-11.91-80.96-33.54c-21.63-21.63-33.54-50.38-33.54-80.96s11.91-59.34,33.54-80.96c21.63-21.63,50.38-33.54,80.96-33.54m0-20c-74.28,0-134.5,60.22-134.5,134.5s60.22,134.5,134.5,134.5,134.5-60.22,134.5-134.5-60.22-134.5-134.5-134.5h0Z"/>\r
|
|
|
|
|
|
</svg>`,__vite_glob_0_1=`<?xml version="1.0" encoding="UTF-8"?>\r
|
|
|
|
|
|
<svg id="_图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500">\r
|
|
|
|
|
|
<path d="m250,20c31.06,0,61.18,6.08,89.52,18.07,27.39,11.58,51.99,28.17,73.11,49.3,21.13,21.13,37.72,45.73,49.3,73.11,11.99,28.34,18.07,58.46,18.07,89.52s-6.08,61.18-18.07,89.52c-11.58,27.39-28.17,51.99-49.3,73.11s-45.73,37.72-73.11,49.3c-28.34,11.99-58.46,18.07-89.52,18.07s-61.18-6.08-89.52-18.07c-27.39-11.58-51.99-28.17-73.11-49.3-21.13-21.13-37.72-45.73-49.3-73.11-11.99-28.34-18.07-58.46-18.07-89.52s6.08-61.18,18.07-89.52c11.58-27.39,28.17-51.99,49.3-73.11,21.13-21.13,45.73-37.72,73.11-49.3,28.34-11.99,58.46-18.07,89.52-18.07m0-20C111.93,0,0,111.93,0,250s111.93,250,250,250,250-111.93,250-250S388.07,0,250,0h0Z"/>\r
|
|
|
|
|
|
<text transform="translate(193.93 213.75) scale(1.35 1)" style="font-family: SimHei, SimHei; font-size: 161.58px;"><tspan x="0" y="0">G</tspan></text>\r
|
|
|
|
|
|
<text transform="translate(145.34 570.94) scale(1.24 1)" style="font-family: SimHei, SimHei; font-size: 327.63px;"><tspan x="0" y="0">~</tspan></text>\r
|
|
|
|
|
|
</svg>`,__vite_glob_0_2=`<?xml version="1.0" encoding="UTF-8"?>\r
|
|
|
|
|
|
<svg id="_图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 278 500">\r
|
|
|
|
|
|
<path d="m139,21c31.79,0,61.67,12.38,84.15,34.85,22.48,22.48,34.85,52.36,34.85,84.15s-12.38,61.67-34.85,84.15c-22.48,22.48-52.36,34.85-84.15,34.85s-61.67-12.38-84.15-34.85c-22.48-22.48-34.85-52.36-34.85-84.15s12.38-61.67,34.85-84.15c22.48-22.48,52.36-34.85,84.15-34.85m0-20C62.23,1,0,63.23,0,140s62.23,139,139,139,139-62.23,139-139S215.77,1,139,1h0Z"/>\r
|
|
|
|
|
|
<path d="m139,242c31.79,0,61.67,12.38,84.15,34.85,22.48,22.48,34.85,52.36,34.85,84.15s-12.38,61.67-34.85,84.15c-22.48,22.48-52.36,34.85-84.15,34.85s-61.67-12.38-84.15-34.85c-22.48-22.48-34.85-52.36-34.85-84.15s12.38-61.67,34.85-84.15c22.48-22.48,52.36-34.85,84.15-34.85m0-20C62.23,222,0,284.23,0,361s62.23,139,139,139,139-62.23,139-139-62.23-139-139-139h0Z"/>\r
|
|
|
|
|
|
</svg>`,__vite_glob_0_3=`<?xml version="1.0" encoding="UTF-8"?>\r
|
|
|
|
|
|
<svg id="_图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 180 180">\r
|
|
|
|
|
|
<rect y="0" width="180" height="180" rx="18.7" ry="18.7"/>\r
|
|
|
|
|
|
</svg>`,__vite_glob_1_0=`<svg id="_图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 258 499">\r
|
|
|
|
|
|
<circle cx="129.5" cy="370" r="119" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 20px;"/>\r
|
|
|
|
|
|
<circle cx="129.5" cy="179" r="119" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 20px;"/>\r
|
|
|
|
|
|
<path d="m248.5,180c0-93.19-52.48-168.86-117.53-169.99-.69.68-2.08,1.07-2.77,1.75" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 20px;"/>\r
|
|
|
|
|
|
</svg>`,__vite_glob_1_1=`<?xml version="1.0" encoding="UTF-8"?>\r
|
|
|
|
|
|
<svg id="_图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 158 286">\r
|
|
|
|
|
|
<polyline points="6.88 87 79 14.88 151.12 87" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 20px;"/>\r
|
|
|
|
|
|
<polyline points="6.6 155.52 78.73 83.39 150.85 155.52" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 20px;"/>\r
|
|
|
|
|
|
<line x1="79" y1="94" x2="79" y2="286" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 20px;"/>\r
|
|
|
|
|
|
</svg>`,__vite_glob_1_2=`<?xml version="1.0" encoding="UTF-8"?>\r
|
|
|
|
|
|
<svg id="_图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 210 392">\r
|
|
|
|
|
|
<line y1="284" x2="210" y2="284" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 20px;"/>\r
|
|
|
|
|
|
<line x1="25" y1="333" x2="185" y2="333" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 20px;"/>\r
|
|
|
|
|
|
<line x1="45" y1="382" x2="165" y2="382" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 20px;"/>\r
|
|
|
|
|
|
<line x1="105" x2="105" y2="275" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 20px;"/>\r
|
|
|
|
|
|
</svg>`,__vite_glob_1_3=`<?xml version="1.0" encoding="utf-8"?>\r
|
|
|
|
|
|
<!-- Generator: $$$/GeneralStr/196=Adobe Illustrator 27.6.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->\r
|
|
|
|
|
|
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\r
|
|
|
|
|
|
viewBox="0 0 125.5 318" style="enable-background:new 0 0 125.5 318;" xml:space="preserve">\r
|
|
|
|
|
|
<style type="text/css">\r
|
|
|
|
|
|
.st0{fill:none;stroke:currentColor;stroke-width:20;stroke-miterlimit:10;}\r
|
|
|
|
|
|
.st1{fill:none;stroke:currentColor;stroke-width:4;stroke-miterlimit:10;}\r
|
|
|
|
|
|
.st2{fill:none;stroke:currentColor;stroke-width:10;stroke-miterlimit:10;}\r
|
|
|
|
|
|
.st3{fill:none;stroke:currentColor;stroke-width:16;stroke-miterlimit:10;}\r
|
|
|
|
|
|
</style>\r
|
|
|
|
|
|
<line class="st0" x1="111" y1="0" x2="111" y2="76"/>\r
|
|
|
|
|
|
<line class="st0" x1="111" y1="242" x2="111" y2="318"/>\r
|
|
|
|
|
|
<line class="st1" x1="96" y1="74" x2="124" y2="102"/>\r
|
|
|
|
|
|
<line class="st1" x1="96" y1="102" x2="124" y2="74"/>\r
|
|
|
|
|
|
<line class="st0" x1="110.5" y1="251.47" x2="9.5" y2="76.53"/>\r
|
|
|
|
|
|
</svg>\r
|
|
|
|
|
|
`,__vite_glob_1_4=`<?xml version="1.0" encoding="UTF-8"?>\r
|
|
|
|
|
|
<svg id="_图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 146 648">\r
|
|
|
|
|
|
<path d="m66,78c37,0,67,30,67,67s-30,67-67,67" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 16px;"/>\r
|
|
|
|
|
|
<path d="m65.91,211.53c37,0,67,30,67,67s-30,67-67,67" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 16px;"/>\r
|
|
|
|
|
|
<path d="m65.91,345.53c37,0,67,30,67,67s-30,67-67,67" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 16px;"/>\r
|
|
|
|
|
|
<line x1="62" y1=".5" x2="62" y2="86.5" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 16px;"/>\r
|
|
|
|
|
|
<line x1="74" y1="474" x2="74" y2="560" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 16px;"/>\r
|
|
|
|
|
|
<line x1=".14" y1="570" x2="145.86" y2="570" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 20px;"/>\r
|
|
|
|
|
|
<line x1="17.49" y1="604" x2="128.51" y2="604" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 20px;"/>\r
|
|
|
|
|
|
<line x1="33" y1="638" x2="113" y2="638" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 20px;"/>\r
|
|
|
|
|
|
</svg>`,__vite_glob_1_5=`<?xml version="1.0" encoding="UTF-8"?>\r
|
|
|
|
|
|
<svg id="_图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 190 469">\r
|
|
|
|
|
|
<rect x="10" y="98.5" width="170" height="272" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 20px;"/>\r
|
|
|
|
|
|
<line x1="95" y1="1" x2="95" y2="469" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 20px;"/>\r
|
|
|
|
|
|
</svg>`,__vite_glob_1_6=`<?xml version="1.0" encoding="UTF-8"?>\r
|
|
|
|
|
|
<svg id="_图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 465.5 465">\r
|
|
|
|
|
|
<circle cx="233" cy="233" r="222" stroke="currentColor" style="fill: none; stroke-miterlimit: 10; stroke-width: 20px;"/>\r
|
|
|
|
|
|
</svg>`,__vite_glob_1_7=`<?xml version="1.0" encoding="UTF-8"?>\r
|
|
|
|
|
|
<svg id="_图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 345 151">\r
|
|
|
|
|
|
<line y1="74" x2="129" y2="74" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 20px;"/>\r
|
|
|
|
|
|
<line x1="135" x2="135" y2="151" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 20px;"/>\r
|
|
|
|
|
|
<line x1="345" y1="77" x2="216" y2="77" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 20px;"/>\r
|
|
|
|
|
|
<line x1="210" y1="151" x2="210" y2="0" style="fill: none; stroke: currentColor; stroke-miterlimit: 10; stroke-width: 20px;"/>\r
|
|
|
|
|
|
</svg>`,__vite_glob_1_8=`<?xml version="1.0" encoding="utf-8"?>\r
|
|
|
|
|
|
<!-- Generator: $$$/GeneralStr/196=Adobe Illustrator 27.6.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->\r
|
|
|
|
|
|
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\r
|
|
|
|
|
|
viewBox="0 0 120 282" style="enable-background:new 0 0 120 282;" xml:space="preserve">\r
|
|
|
|
|
|
<style type="text/css">\r
|
|
|
|
|
|
.st0{fill:none;stroke:currentColor;stroke-width:20;stroke-miterlimit:10;}\r
|
|
|
|
|
|
.st1{fill:none;stroke:currentColor;stroke-width:4;stroke-miterlimit:10;}\r
|
|
|
|
|
|
.st2{fill:none;stroke-width:10;stroke-miterlimit:10;}\r
|
|
|
|
|
|
.st3{fill:none;stroke-width:16;stroke-miterlimit:10;}\r
|
|
|
|
|
|
</style>\r
|
|
|
|
|
|
<path class="st0" d="M60,215c-28.17,0-51-22.83-51-51s22.83-51,51-51s51,22.83,51,51"/>\r
|
|
|
|
|
|
<line class="st0" x1="60" y1="0" x2="60" y2="159"/>\r
|
|
|
|
|
|
<line class="st0" x1="60" y1="205" x2="60" y2="283"/>\r
|
|
|
|
|
|
<line class="st0" x1="120" y1="163" x2="50" y2="163"/>\r
|
|
|
|
|
|
</svg>\r
|
|
|
|
|
|
`,__vite_glob_1_9=`<?xml version="1.0" encoding="utf-8"?>\r
|
|
|
|
|
|
<!-- Generator: $$$/GeneralStr/196=Adobe Illustrator 27.6.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->\r
|
|
|
|
|
|
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\r
|
|
|
|
|
|
viewBox="0 0 222 336" style="enable-background:new 0 0 222 336;" xml:space="preserve">\r
|
|
|
|
|
|
<style type="text/css">\r
|
|
|
|
|
|
.st0{fill:none;stroke:currentColor;stroke-width:20;stroke-miterlimit:10;}\r
|
|
|
|
|
|
.st1{fill:none;stroke:currentColor;stroke-width:4;stroke-miterlimit:10;}\r
|
|
|
|
|
|
.st2{fill:none;stroke:currentColor;stroke-width:10;stroke-miterlimit:10;}\r
|
|
|
|
|
|
.st3{fill:none;stroke:currentColor;stroke-width:16;stroke-miterlimit:10;}\r
|
|
|
|
|
|
</style>\r
|
|
|
|
|
|
<line class="st0" x1="111" y1="0" x2="111" y2="336"/>\r
|
|
|
|
|
|
<polygon class="st0" points="111,269 204.92,106.33 17.08,106.33 "/>\r
|
|
|
|
|
|
</svg>\r
|
|
|
|
|
|
`,__vite_glob_1_10=`<?xml version="1.0" encoding="utf-8"?>\r
|
|
|
|
|
|
<!-- Generator: $$$/GeneralStr/196=Adobe Illustrator 27.6.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->\r
|
|
|
|
|
|
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\r
|
|
|
|
|
|
viewBox="0 0 160 318" style="enable-background:new 0 0 160 318;" xml:space="preserve">\r
|
|
|
|
|
|
<style type="text/css">\r
|
|
|
|
|
|
.st0{fill:none;stroke:currentColor;stroke-width:20;stroke-miterlimit:10;}\r
|
|
|
|
|
|
.st1{fill:none;stroke:currentColor;stroke-width:4;stroke-miterlimit:10;}\r
|
|
|
|
|
|
.st2{fill:none;stroke:currentColor;stroke-width:10;stroke-miterlimit:10;}\r
|
|
|
|
|
|
.st3{fill:none;stroke:currentColor;stroke-width:16;stroke-miterlimit:10;}\r
|
|
|
|
|
|
</style>\r
|
|
|
|
|
|
<line class="st0" x1="149.81" y1="-0.48" x2="149.81" y2="75.52"/>\r
|
|
|
|
|
|
<line class="st0" x1="149.81" y1="241.52" x2="149.81" y2="317.52"/>\r
|
|
|
|
|
|
<line class="st0" x1="149.31" y1="250.99" x2="48.31" y2="76.05"/>\r
|
|
|
|
|
|
<line class="st2" x1="50" y1="185" x2="108" y2="185"/>\r
|
|
|
|
|
|
</svg>\r
|
|
|
|
|
|
`,__vite_glob_1_11=`<?xml version="1.0" encoding="utf-8"?>\r
|
|
|
|
|
|
<!-- Generator: $$$/GeneralStr/196=Adobe Illustrator 27.6.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->\r
|
|
|
|
|
|
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\r
|
|
|
|
|
|
viewBox="0 0 179 319" style="enable-background:new 0 0 179 319;" xml:space="preserve">\r
|
|
|
|
|
|
<style type="text/css">\r
|
|
|
|
|
|
.st0{fill:none;stroke:currentColor;stroke-width:20;stroke-miterlimit:10;}\r
|
|
|
|
|
|
.st1{fill:none;stroke:currentColor;stroke-width:4;stroke-miterlimit:10;}\r
|
|
|
|
|
|
.st2{fill:none;stroke:currentColor;stroke-width:10;stroke-miterlimit:10;}\r
|
|
|
|
|
|
.st3{fill:none;stroke:currentColor;stroke-width:16;stroke-miterlimit:10;}\r
|
|
|
|
|
|
</style>\r
|
|
|
|
|
|
<line class="st0" x1="168.6" y1="0.58" x2="168.6" y2="76.58"/>\r
|
|
|
|
|
|
<line class="st0" x1="168.6" y1="242.58" x2="168.6" y2="318.58"/>\r
|
|
|
|
|
|
<line class="st0" x1="168.1" y1="252.05" x2="67.1" y2="77.11"/>\r
|
|
|
|
|
|
<rect x="82" y="107" transform="matrix(0.866 -0.5 0.5 0.866 -64.4769 78.3689)" class="st3" width="64" height="105"/>\r
|
|
|
|
|
|
<line class="st2" x1="45.05" y1="190.18" x2="87" y2="169"/>\r
|
|
|
|
|
|
</svg>\r
|
|
|
|
|
|
`,__vite_glob_1_12=`<?xml version="1.0" encoding="utf-8"?>\r
|
|
|
|
|
|
<!-- Generator: $$$/GeneralStr/196=Adobe Illustrator 27.6.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->\r
|
|
|
|
|
|
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\r
|
|
|
|
|
|
viewBox="0 0 133 318" style="enable-background:new 0 0 133 318;" xml:space="preserve">\r
|
|
|
|
|
|
<style type="text/css">\r
|
|
|
|
|
|
.st0{fill:none;stroke:currentColor;stroke-width:20;stroke-miterlimit:10;}\r
|
|
|
|
|
|
.st1{fill:none;stroke:currentColor;stroke-width:4;stroke-miterlimit:10;}\r
|
|
|
|
|
|
.st2{fill:none;stroke:currentColor;stroke-width:10;stroke-miterlimit:10;}\r
|
|
|
|
|
|
.st3{fill:none;stroke:currentColor;stroke-width:16;stroke-miterlimit:10;}\r
|
|
|
|
|
|
</style>\r
|
|
|
|
|
|
<line class="st0" x1="109.27" y1="0.58" x2="109.27" y2="76.58"/>\r
|
|
|
|
|
|
<line class="st0" x1="109.27" y1="242.58" x2="109.27" y2="318.58"/>\r
|
|
|
|
|
|
<line class="st0" x1="108.77" y1="252.05" x2="7.77" y2="77.11"/>\r
|
|
|
|
|
|
<line class="st0" x1="82" y1="79" x2="133" y2="79"/>\r
|
|
|
|
|
|
</svg>\r
|
|
|
|
|
|
`,index$2="",__uno="",cssVars$1="";if(typeof window<"u"){let n=function(){var t=document.body,r=document.getElementById("___mt__edit__icons__dom__");r||(r=document.createElementNS("http://www.w3.org/2000/svg","svg"),r.style.position="absolute",r.style.width="0",r.style.height="0",r.id="___mt__edit__icons__dom__",r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("xmlns:link","http://www.w3.org/1999/xlink")),r.innerHTML=`<symbol class="icon" viewBox="0 0 1024 1024" id="mt-edit-add">\r
|
|
|
|
|
|
<path d="M801.171 483.589H544V226.418c0-17.673-14.327-32-32-32s-32 14.327-32 32v257.171H222.83c-17.673 0-32 14.327-32 32s14.327 32 32 32H480v257.17c0 17.673 14.327 32 32 32s32-14.327 32-32v-257.17h257.171c17.673 0 32-14.327 32-32s-14.327-32-32-32z" fill="" />\r
|
|
|
|
|
|
</symbol><symbol viewBox="0 0 256 256" id="mt-edit-align-bottom"><path fill="currentColor" d="M228 216a12 12 0 0 1-12 12H40a12 12 0 0 1 0-24h176a12 12 0 0 1 12 12m-92-48V80a20 20 0 0 1 20-20h36a20 20 0 0 1 20 20v88a20 20 0 0 1-20 20h-36a20 20 0 0 1-20-20m24-4h28V84h-28Zm-116 4V40a20 20 0 0 1 20-20h36a20 20 0 0 1 20 20v128a20 20 0 0 1-20 20H64a20 20 0 0 1-20-20m24-4h28V44H68Z" /></symbol><symbol viewBox="0 0 256 256" id="mt-edit-align-horizontally"><path fill="currentColor" d="M208 136h-68v-16h44a20 20 0 0 0 20-20V60a20 20 0 0 0-20-20h-44v-8a12 12 0 0 0-24 0v8H72a20 20 0 0 0-20 20v40a20 20 0 0 0 20 20h44v16H48a20 20 0 0 0-20 20v40a20 20 0 0 0 20 20h68v8a12 12 0 0 0 24 0v-8h68a20 20 0 0 0 20-20v-40a20 20 0 0 0-20-20M76 64h104v32H76Zm128 128H52v-32h152Z" /></symbol><symbol viewBox="0 0 256 256" id="mt-edit-align-left"><path fill="currentColor" d="M52 40v176a12 12 0 0 1-24 0V40a12 12 0 0 1 24 0m16 60V64a20 20 0 0 1 20-20h88a20 20 0 0 1 20 20v36a20 20 0 0 1-20 20H88a20 20 0 0 1-20-20m24-4h80V68H92Zm144 60v36a20 20 0 0 1-20 20H88a20 20 0 0 1-20-20v-36a20 20 0 0 1 20-20h128a20 20 0 0 1 20 20m-24 4H92v28h120Z" /></symbol><symbol viewBox="0 0 256 256" id="mt-edit-align-right"><path fill="currentColor" d="M228 40v176a12 12 0 0 1-24 0V40a12 12 0 0 1 24 0m-40 24v36a20 20 0 0 1-20 20H80a20 20 0 0 1-20-20V64a20 20 0 0 1 20-20h88a20 20 0 0 1 20 20m-24 4H84v28h80Zm24 88v36a20 20 0 0 1-20 20H40a20 20 0 0 1-20-20v-36a20 20 0 0 1 20-20h128a20 20 0 0 1 20 20m-24 4H44v28h120Z" /></symbol><symbol viewBox="0 0 256 256" id="mt-edit-align-top"><path fill="currentColor" d="M228 40a12 12 0 0 1-12 12H40a12 12 0 0 1 0-24h176a12 12 0 0 1 12 12m-16 48v88a20 20 0 0 1-20 20h-36a20 20 0 0 1-20-20V88a20 20 0 0 1 20-20h36a20 20 0 0 1 20 20m-24 4h-28v80h28Zm-68-4v128a20 20 0 0 1-20 20H64a20 20 0 0 1-20-20V88a20 20 0 0 1 20-20h36a20 20 0 0 1 20 20m-24 4H68v120h28Z" /></symbol><symbol viewBox="0 0 256 256" id="mt-edit-align-vertical"><path fill="currentColor" d="M224 116h-8V72a20 20 0 0 0-20-20h-40a20 20 0 0 0-20 20v44h-16V48a20 20 0 0 0-20-20H60a20 20 0 0 0-20 20v68h-8a12 12 0 0 0 0 24h8v68a20 20 0 0 0 20 20h40a20 20 0 0 0 20-20v-68h16v44a20 20 0 0 0 20 20h40a20 20 0 0 0 20-20v-44h8a12 12 0 0 0 0-24M96 204H64V52h32Zm96-24h-32V76h32Z" /></symbol><symbol viewBox="0 0 15 15" id="mt-edit-align">\r
|
|
|
|
|
|
<path fill="currentColor" fill-rule="evenodd" d="M3.5 14.9a.4.4 0 0 0 .4-.4v-4.034l1.317 1.317a.4.4 0 0 0 .565-.566l-2-2a.4.4 0 0 0-.565 0l-2 2a.4.4 0 0 0 .565.566L3.1 10.466V14.5c0 .22.18.4.4.4ZM8 10.5a.5.5 0 0 0 .5.5h6a.5.5 0 1 0 0-1h-6a.5.5 0 0 0-.5.5Zm0-3a.5.5 0 0 0 .5.5h6a.5.5 0 0 0 0-1h-6a.5.5 0 0 0-.5.5ZM8.5 5a.5.5 0 1 1 0-1h6a.5.5 0 0 1 0 1h-6ZM3.9.5a.4.4 0 0 0-.8 0v4.034L1.781 3.217a.4.4 0 0 0-.565.566l2 2a.4.4 0 0 0 .565 0l2-2a.4.4 0 0 0-.565-.566L3.899 4.534V.5Z" clip-rule="evenodd" />\r
|
|
|
|
|
|
</symbol><symbol viewBox="0 0 1024 1024" id="mt-edit-dark">\r
|
|
|
|
|
|
<path d="M513.173333 128A255.061333 255.061333 0 0 0 448 298.666667c0 141.376 114.624 256 256 256a255.36 255.36 0 0 0 189.802667-84.202667c1.450667 13.653333 2.197333 27.498667 2.197333 41.536 0 212.074667-171.925333 384-384 384S128 724.074667 128 512c0-209.706667 168.106667-380.16 376.96-383.936L513.152 128z m-117.824 85.930667l-3.52 1.408C274.645333 262.826667 192 377.770667 192 512c0 176.725333 143.274667 320 320 320 145.408 0 268.16-96.981333 307.114667-229.802667l1.536-5.504-1.6 0.64a319.509333 319.509333 0 0 1-106.496 21.226667L704 618.666667c-176.725333 0-320-143.274667-320-320 0-28.48 3.754667-56.405333 10.944-83.2l0.405333-1.536z" />\r
|
|
|
|
|
|
</symbol><symbol viewBox="0 0 24 24" id="mt-edit-delete"><path fill="currentColor" d="M7.5 1h9v3H22v2h-2.029l-.5 17H4.529l-.5-17H2V4h5.5V1Zm2 3h5V3h-5v1ZM6.03 6l.441 15h11.058l.441-15H6.03ZM13 8v11h-2V8h2Z" /></symbol><symbol viewBox="0 0 15 15" id="mt-edit-exit-full-screen">\r
|
|
|
|
|
|
<path fill="currentColor" fill-rule="evenodd" d="M5.5 2a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1 0-1H5V2.5a.5.5 0 0 1 .5-.5Zm4 0a.5.5 0 0 1 .5.5V5h2.5a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5v-3a.5.5 0 0 1 .5-.5ZM2 9.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0V10H2.5a.5.5 0 0 1-.5-.5Zm7 0a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1H10v2.5a.5.5 0 0 1-1 0v-3Z" clip-rule="evenodd" />\r
|
|
|
|
|
|
</symbol><symbol viewBox="0 0 24 24" id="mt-edit-export-json"><path fill="currentColor" d="M3 1h12.414L21 6.586V12h-2V9h-6V3H5v18h6v2H3V1Zm12 2.414V7h3.586L15 3.414Zm4.05 10.674l4.858 4.914l-4.858 4.914l-1.422-1.406l2.48-2.508h-7.11v-2h7.11l-2.48-2.508l1.422-1.406Z" /></symbol><symbol viewBox="0 0 2048 2048" id="mt-edit-full-screen">\r
|
|
|
|
|
|
<path fill="currentColor" d="M1664 1664v-384h128v512h-512v-128h384zM1280 256h512v512h-128V384h-384V256zM256 768V256h512v128H384v384H256zm128 512v384h384v128H256v-512h128z" />\r
|
|
|
|
|
|
</symbol><symbol viewBox="0 0 1024 1024" id="mt-edit-group"><path fill="currentColor" d="M912 820.1V203.9c28-9.9 48-36.6 48-67.9c0-39.8-32.2-72-72-72c-31.3 0-58 20-67.9 48H203.9C194 84 167.3 64 136 64c-39.8 0-72 32.2-72 72c0 31.3 20 58 48 67.9v616.2C84 830 64 856.7 64 888c0 39.8 32.2 72 72 72c31.3 0 58-20 67.9-48h616.2c9.9 28 36.6 48 67.9 48c39.8 0 72-32.2 72-72c0-31.3-20-58-48-67.9zM888 112c13.3 0 24 10.7 24 24s-10.7 24-24 24s-24-10.7-24-24s10.7-24 24-24zM136 912c-13.3 0-24-10.7-24-24s10.7-24 24-24s24 10.7 24 24s-10.7 24-24 24zm0-752c-13.3 0-24-10.7-24-24s10.7-24 24-24s24 10.7 24 24s-10.7 24-24 24zm704 680H184V184h656v656zm48 72c-13.3 0-24-10.7-24-24s10.7-24 24-24s24 10.7 24 24s-10.7 24-24 24z" /><path fill="currentColor" d="M288 474h448c8.8 0 16-7.2 16-16V282c0-8.8-7.2-16-16-16H288c-8.8 0-16 7.2-16 16v176c0 8.8 7.2 16 16 16zm56-136h336v64H344v-64zm-56 420h448c8.8 0 16-7.2 16-16V566c0-8.8-7.2-16-16-16H288c-8.8 0-16 7.2-16 16v176c0 8.8 7.2 16 16 16zm56-136h336v64H344v-64z" /></symbol><symbol viewBox="0 0 24 24" id="mt-edit-help"><path fill="currentColor" d="M12 21a9 9 0 1 0 0-18a9 9 0 0 0 0 18m11-9c0 6.075-4.925 11-11 11S1 18.075 1 12S5.925 1 12 1s11 4.925 11 11m-9.996 6.254H11V16.25h2.004zM11 15.25V14c0-.867.39-1.573.826-2.11c.432-.53.974-.974 1.41-1.318a2 2 0 1 0-3.123-2.24l-.333.944l-1.885-.666l.333-.943a4.001 4.001 0 1 1 6.246 4.476c-.431.34-.817.666-1.096 1.009c-.274.338-.378.61-.378.848v1.25z" /></symbol><symbol viewBox="0 0 20 20" id="mt-edit-horizontal-distribution"><path fill="currentColor" d="M3.5 18a.5.5 0 0 1-.5-.5v-15a.5.5 0 0 1 1 0v15a.5.5 0 0 1-.5.5m12.5-.5a.5.5 0 0 0 1 0v-15a.5.5 0 0 0-1 0zM9 4a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z" /></symbol><symbol viewBox="0 0 24 24" id="mt-edit-import-json"><path fill="currentColor" d="M3 1h12.414L21 6.586V23h-9v-2h7V9h-6V3H5v10H3V1Zm12 2.414V7h3.586L15 3.414ZM7.05 14.088l4.858 4.914l-4.858 4.914l-1.422-1.406l2.48-2.508H.997v-2h7.11l-2.48-2.508l1.422-1.406Z" /></symbol><symbol viewBox="0 0 1024 1024" id="mt-edit-light">\r
|
|
|
|
|
|
<path d="M522.88 874.666667a21.333333 21.333333 0 0 1 21.333333 21.333333v85.333333a21.333333 21.333333 0 0 1-21.333333 21.333334h-21.333333a21.333333 21.333333 0 0 1-21.333334-21.333334v-85.333333a21.333333 21.333333 0 0 1 21.333334-21.333333h21.333333z m268.416-107.52l60.352 60.352a21.333333 21.333333 0 0 1 0 30.165333l-15.082667 15.082667a21.333333 21.333333 0 0 1-30.186666 0l-60.330667-60.352a21.333333 21.333333 0 0 1 0-30.165334l15.082667-15.082666a21.333333 21.333333 0 0 1 30.165333 0z m-527.957333 0l15.082666 15.082666a21.333333 21.333333 0 0 1 0 30.165334l-60.352 60.352a21.333333 21.333333 0 0 1-30.165333 0l-15.082667-15.082667a21.333333 21.333333 0 0 1 0-30.165333l60.330667-60.352a21.333333 21.333333 0 0 1 30.186667 0zM512 277.333333c141.376 0 256 114.624 256 256s-114.624 256-256 256-256-114.624-256-256 114.624-256 256-256z m0 64a192 192 0 1 0 0 384 192 192 0 0 0 0-384z m448.213333 160a21.333333 21.333333 0 0 1 21.333334 21.333334v21.333333a21.333333 21.333333 0 0 1-21.333334 21.333333h-85.333333a21.333333 21.333333 0 0 1-21.333333-21.333333v-21.333333a21.333333 21.333333 0 0 1 21.333333-21.333334h85.333333z m-810.666666 0a21.333333 21.333333 0 0 1 21.333333 21.333334v21.333333a21.333333 21.333333 0 0 1-21.333333 21.333333h-85.333334a21.333333 21.333333 0 0 1-21.333333-21.333333v-21.333333a21.333333 21.333333 0 0 1 21.333333-21.333334h85.333334zM836.586667 193.92l15.082666 15.082667a21.333333 21.333333 0 0 1 0 30.165333l-60.352 60.352a21.333333 21.333333 0 0 1-30.165333 0l-15.082667-15.082667a21.333333 21.333333 0 0 1 0-30.165333l60.330667-60.352a21.333333 21.333333 0 0 1 30.186667 0z m-618.496 0l60.352 60.352a21.333333 21.333333 0 0 1 0 30.165333l-15.082667 15.082667a21.333333 21.333333 0 0 1-30.186667 0L172.821333 239.146667a21.333333 21.333333 0 0 1 0-30.165334l15.082667-15.082666a21.333333 21.333333 0 0 1 30.165333 0zM522.901333 64a21.333333 21.333333 0 0 1 21.333334 21.333333v85.333334a21.333333 21.333333 0 0 1-21.333334 21.333333h-21.333333a21.333333 21.333333 0 0 1-21.333333-21.333333V85.333333a21.333333 21.333333 0 0 1 21.333333-21.333333h21.333333z" />\r
|
|
|
|
|
|
</symbol><symbol class="icon" viewBox="0 0 1024 1024" id="mt-edit-line"><path d="M893.60324 384c-54.7 1-101.1 36.4-118.4 85.4-2.2 6.4-8.3 10.6-15 10.6H263.80324c-6.7 0-12.8-4.2-15-10.6-17.3-49.1-63.6-84.4-118.4-85.4C59.90324 382.7 0.50324 440.6 0.00324 511.1-0.49676 582.2 57.00324 640 128.00324 640c55.7 0 103.1-35.6 120.7-85.3 2.3-6.4 8.3-10.7 15.1-10.7h496.4c6.8 0 12.8 4.3 15.1 10.7 17.6 49.7 65 85.3 120.7 85.3 71 0 128.5-57.8 128-128.9-0.5-70.5-59.9-128.4-130.4-127.1zM128.00324 576c-35.3 0-64-28.7-64-64s28.7-64 64-64 64 28.7 64 64-28.7 64-64 64z m768 0c-35.3 0-64-28.7-64-64s28.7-64 64-64 64 28.7 64 64-28.7 64-64 64z" p-id="2194" /></symbol><symbol viewBox="0 0 36 36" id="mt-edit-lock"><path fill="currentColor" d="M18.09 20.59A2.41 2.41 0 0 0 17 25.14V28h2v-2.77a2.41 2.41 0 0 0-.91-4.64" class="clr-i-outline clr-i-outline-path-1" /><path fill="currentColor" d="M26 15v-4.28a8.2 8.2 0 0 0-8-8.36a8.2 8.2 0 0 0-8 8.36V15H7v17a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V15Zm-14-4.28a6.2 6.2 0 0 1 6-6.36a6.2 6.2 0 0 1 6 6.36V15H12ZM9 32V17h18v15Z" class="clr-i-outline clr-i-outline-path-2" /><path fill="none" d="M0 0h36v36H0z" /></symbol><symbol viewBox="0 0 24 24" id="mt-edit-menu-fold"><path fill="currentColor" d="M2 4h20v2H2V4Zm20 5.57v4.86L18.113 12L22 9.57ZM2 13v-2h15v2H2Zm0 7v-2h20v2H2Z" /></symbol><symbol viewBox="0 0 24 24" id="mt-edit-menu-unfold"><path fill="currentColor" d="M2 4h20v2H2V4Zm0 5.57L5.887 12L2 14.43V9.57ZM7 11h15v2H7v-2Zm-5 7h20v2H2v-2Z" /></symbol><symbol viewBox="0 0 256 256" id="mt-edit-pen-line">\r
|
|
|
|
|
|
<g>\r
|
|
|
|
|
|
<path d="m227.32,73.37l-44.69,-44.68a16,16 0 0 0 -22.63,0l-123.31,123.31a15.86,15.86 0 0 0 -4.69,11.31l0,44.69a16,16 0 0 0 16,16l44.69,0a15.86,15.86 0 0 0 11.31,-4.69l83.67,-83.66l3.48,13.9l-36.8,36.79a8,8 0 0 0 11.31,11.32l40,-40a8,8 0 0 0 2.11,-7.6l-6.9,-27.61l26.45,-26.45a16,16 0 0 0 0,-22.63m-179.32,105.94l28.69,28.69l-28.69,0l0,-28.69zm48,25.38l-44.69,-44.69l84.69,-84.69l44.69,44.69l-84.69,84.69zm96,-96l-44.68,-44.69l24,-24l44.68,44.69l-24,24z" fill="currentColor" />\r
|
|
|
|
|
|
<line stroke-width="10" y2="234" x2="245" y1="234" x1="47" stroke="currentColor" fill="none" />\r
|
|
|
|
|
|
</g>\r
|
|
|
|
|
|
</symbol><symbol viewBox="0 0 24 24" id="mt-edit-preview"><path fill="currentColor" d="M12 3a9 9 0 1 0 0 18a9 9 0 0 0 0-18ZM1 12C1 5.925 5.925 1 12 1s11 4.925 11 11s-4.925 11-11 11S1 18.075 1 12Zm7.5-5.63L18.25 12L8.5 17.63V6.37Zm2 3.465v4.33L14.25 12L10.5 9.835Z" /></symbol><symbol viewBox="0 0 1024 1024" id="mt-edit-question">\r
|
|
|
|
|
|
<path d="M512 65.984C266.08 65.984 65.984 266.08 65.984 512c0 245.952 200.064 446.016 446.016 446.016 245.952 0 446.016-200.064 446.016-446.016C958.016 266.08 757.952 65.984 512 65.984zM512 894.016C301.344 894.016 129.984 722.624 129.984 512 129.984 301.344 301.344 129.984 512 129.984c210.624 0 382.016 171.36 382.016 382.016C894.016 722.624 722.624 894.016 512 894.016z" fill="#5C636E" />\r
|
|
|
|
|
|
<path d="M512 255.2c-77.216 0-140.032 62.272-140.032 138.816 0 17.664 14.336 32 32 32s32-14.336 32-32c0-41.952 33.376-74.816 76.032-74.816 41.952 0 76.032 34.368 76.032 76.64 0 15.968-22.848 38.784-43.008 58.944C514.56 485.216 480 519.744 480 566.016l0 45.696c0 17.696 14.336 32 32 32s32-14.304 32-32l0-45.696c0-19.744 23.52-43.264 46.272-65.984 28.928-28.928 61.76-61.728 61.76-104.192C652.032 318.272 589.216 255.2 512 255.2z" fill="#5C636E" />\r
|
|
|
|
|
|
<path d="M512 753.92m-48 0a1.5 1.5 0 1 0 96 0 1.5 1.5 0 1 0-96 0Z" fill="#5C636E" />\r
|
|
|
|
|
|
</symbol><symbol viewBox="-1 -2 24 24" id="mt-edit-redo"><path fill="currentColor" d="m19.347 7.24l.847-1.266a.984.984 0 0 1 1.375-.259c.456.31.58.93.277 1.383L19.65 10.38a.984.984 0 0 1-1.375.259L14.97 8.393a1.002 1.002 0 0 1-.277-1.382a.984.984 0 0 1 1.375-.26l1.344.915C16.428 4.386 13.42 2 9.863 2c-4.357 0-7.89 3.582-7.89 8s3.533 8 7.89 8c.545 0 .987.448.987 1s-.442 1-.987 1C4.416 20 0 15.523 0 10S4.416 0 9.863 0c4.504 0 8.302 3.06 9.484 7.24z" /></symbol><symbol viewBox="0 0 2048 2048" id="mt-edit-return"><path fill="currentColor" d="M1792 1152H475l466 467l-90 90l-621-621l621-621l90 90l-466 467h1189V384h128v768z" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="mt-edit-rotate"><path d="M44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44C30.9566 44 37.0836 40.4483 40.6667 35.0593" stroke="currentColor" stroke-width="4" stroke-linecap="round" /><path d="M44 24H30" stroke="#333" stroke-width="4" stroke-linecap="round" /><circle cx="24" cy="24" r="6" fill="#333" stroke="#333" stroke-width="4" /></symbol><symbol viewBox="0 0 2048 2048" id="mt-edit-save"><path fill="currentColor" d="M1792 128q27 0 50 10t40 27t28 41t10 50v1664H357l-229-230V256q0-27 10-50t27-40t41-28t50-10h1536zM512 896h1024V256H512v640zm768 512H640v384h128v-256h128v256h384v-384zm512-1152h-128v768H384V256H256v1381l154 155h102v-512h896v512h384V256z" /></symbol><symbol viewBox="0 0 1024 1024" id="mt-edit-search"><path fill="currentColor" d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1c-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0 0 11.6 0l43.6-43.5a8.2 8.2 0 0 0 0-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" /></symbol><symbol viewBox="0 0 1024 1024" id="mt-edit-setting">\r
|
|
|
|
|
|
<path d="M919.6 405.6l-57.2-8c-12.7-1.8-23-10.4-28-22.1-11.3-26.7-25.7-51.7-42.9-74.5-7.7-10.2-10-23.5-5.2-35.3l21.7-53.5c6.7-16.4 0.2-35.3-15.2-44.1L669.1 96.6c-15.4-8.9-34.9-5.1-45.8 8.9l-35.4 45.3c-7.9 10.2-20.7 14.9-33.5 13.3-14-1.8-28.3-2.8-42.8-2.8-14.5 0-28.8 1-42.8 2.8-12.8 1.6-25.6-3.1-33.5-13.3l-35.4-45.3c-10.9-14-30.4-17.8-45.8-8.9L230.4 168c-15.4 8.9-21.8 27.7-15.2 44.1l21.7 53.5c4.8 11.9 2.5 25.1-5.2 35.3-17.2 22.8-31.7 47.8-42.9 74.5-5 11.8-15.3 20.4-28 22.1l-57.2 8C86 408 72.9 423 72.9 440.8v142.9c0 17.7 13.1 32.7 30.6 35.2l57.2 8c12.7 1.8 23 10.4 28 22.1 11.3 26.7 25.7 51.7 42.9 74.5 7.7 10.2 10 23.5 5.2 35.3l-21.7 53.5c-6.7 16.4-0.2 35.3 15.2 44.1L354 927.8c15.4 8.9 34.9 5.1 45.8-8.9l35.4-45.3c7.9-10.2 20.7-14.9 33.5-13.3 14 1.8 28.3 2.8 42.8 2.8 14.5 0 28.8-1 42.8-2.8 12.8-1.6 25.6 3.1 33.5 13.3l35.4 45.3c10.9 14 30.4 17.8 45.8 8.9l123.7-71.4c15.4-8.9 21.8-27.7 15.2-44.1l-21.7-53.5c-4.8-11.8-2.5-25.1 5.2-35.3 17.2-22.8 31.7-47.8 42.9-74.5 5-11.8 15.3-20.4 28-22.1l57.2-8c17.6-2.5 30.6-17.5 30.6-35.2V440.8c0.2-17.8-12.9-32.8-30.5-35.2z m-408 245.5c-76.7 0-138.9-62.2-138.9-138.9s62.2-138.9 138.9-138.9 138.9 62.2 138.9 138.9-62.2 138.9-138.9 138.9z" />\r
|
|
|
|
|
|
</symbol><symbol viewBox="0 0 20 20" id="mt-edit-thumbnail"><path fill="currentColor" d="M3 2a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zm0 15a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1z" /><path fill="currentColor" d="M17 4H3v10h14zM5 12l2.5-3l2 2L12 8l3 4zm-1 3h12v1H4z" /></symbol><symbol viewBox="0 0 24 24" id="mt-edit-tree-list"><path fill="currentColor" d="M6 22a4 4 0 0 1-1-7.874V9.874A4.002 4.002 0 0 1 6 2a4 4 0 0 1 1 7.874v4.252A4.002 4.002 0 0 1 6 22Zm-2-4a2 2 0 1 0 4 0a2 2 0 0 0-4 0ZM4 6a2 2 0 1 0 4 0a2 2 0 0 0-4 0Zm8 12h7v2h-7v-2Zm0-7h10v2H12v-2Zm0-7h7v2h-7V4Z" /></symbol><symbol viewBox="-0.5 -2 24 24" id="mt-edit-undo"><path fill="currentColor" d="m5.308 7.612l1.352-.923a.981.981 0 0 1 1.372.27a1.008 1.008 0 0 1-.266 1.388l-3.277 2.237a.981.981 0 0 1-1.372-.27L.907 6.998a1.007 1.007 0 0 1 .266-1.389a.981.981 0 0 1 1.372.27l.839 1.259C4.6 3.01 8.38 0 12.855 0c5.458 0 9.882 4.477 9.882 10s-4.424 10-9.882 10a.994.994 0 0 1-.988-1c0-.552.443-1 .988-1c4.366 0 7.906-3.582 7.906-8s-3.54-8-7.906-8C9.311 2 6.312 4.36 5.308 7.612z" /></symbol><symbol viewBox="0 0 1024 1024" id="mt-edit-ungroup"><path fill="currentColor" d="M736 550H288c-8.8 0-16 7.2-16 16v176c0 8.8 7.2 16 16 16h448c8.8 0 16-7.2 16-16V566c0-8.8-7.2-16-16-16zm-56 136H344v-64h336v64zm208 130c-39.8 0-72 32.2-72 72s32.2 72 72 72s72-32.2 72-72s-32.2-72-72-72zm0 96c-13.3 0-24-10.7-24-24s10.7-24 24-24s24 10.7 24 24s-10.7 24-24 24zM736 266H288c-8.8 0-16 7.2-16 16v176c0 8.8 7.2 16 16 16h448c8.8 0 16-7.2 16-16V282c0-8.8-7.2-16-16-16zm-56 136H344v-64h336v64zm208-194c39.8 0 72-32.2 72-72s-32.2-72-72-72s-72 32.2-72 72s32.2 72 72 72zm0-96c13.3 0 24 10.7 24 24s-10.7 24-24 24s-24-10.7-24-24s10.7-24 24-24zM136 64c-39.8 0-72 32.2-72 72s32.2 72 72 72s72-32.2 72-72s-32.2-72-72-72zm0 96c-13.3 0-24-10.7-24-24s10.7-24 24-24s24 10.7 24 24s-10.7 24-24 24zm0 656c-39.8 0-72 32.2-72 72s32.2 72 72 72s72-32.2 72-72s-32.2-72-72-72zm0 96c-13.3 0-24-10.7-24-24s10.7-24 24-24s24 10.7 24 24s-10.7 24-24 24z" /></symbol><symbol viewBox="0 0 36 36" id="mt-edit-unlock"><path fill="currentColor" d="M12 25.14V28h2v-2.77a2.42 2.42 0 1 0-2-.09" class="clr-i-outline clr-i-outline-path-1" /><path fill="currentColor" d="M26 2a8.2 8.2 0 0 0-8 8.36V15H2v17a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V15h-4v-4.64A6.2 6.2 0 0 1 26 4a6.2 6.2 0 0 1 6 6.36v6.83a1 1 0 0 0 2 0v-6.83A8.2 8.2 0 0 0 26 2m-4 15v15H4V17Z" class="clr-i-outline clr-i-outline-path-2" /><path fill="none" d="M0 0h36v36H0z" /></symbol><symbol viewBox="0 0 24 24" id="mt-edit-upload"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 9l5-5l5 5m-5-5v12" /></symbol><symbol viewBox="0 0 20 20" id="mt-edit-vertical-distribution"><path fill="currentColor" d="M2.5 3a.5.5 0 0 0 0 1h15a.5.5 0 0 0 0-1zM2 16.5a.5.5 0 0 1 .5-.5h15a.5.5 0 0 1 0 1h-15a.5.5 0 0 1-.5-.5M6 7a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2z" /></symbol><symbol viewBox="0 0 20 20" id="mt-edit-view-hide"><path fill="currentColor" d="m12.81 4.36l-1.77 1.78a4 4 0 0 0-4.9 4.9l-2.76 2.75C2.06 12.79.96 11.49.2 10a11 11 0 0 1 12.6-5.64zm3.8 1.85c1.33 1 2.43 2.3 3.2 3.79a11 11 0 0 1-12.62 5.64l1.77-1.78a4 4 0 0 0 4.9-4.9l2.76-2.75zm-.25-3.99l1.42 1.42L3.64 17.78l-1.42-1.42z" /></symbol><symbol viewBox="0 0 20 20" id="mt-edit-view-show"><path fill="currentColor" d="M.2 10a11 11 0 0 1 19.6 0A11 11 0 0 1 .2 10m9.8 4a4 4 0 1 0 0-8a4 4 0 0 0 0 8m0-2a2 2 0 1 1 0-4a2 2 0 0 1 0 4" /></symbol>`,t.insertBefore(r,t.lastChild)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",n):n()}const animate="",custom_ani="",autoDestroyMouseMove=(n,t)=>{const r=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("touchmove",n),document.removeEventListener("mouseup",r),document.removeEventListener("touchend",r),document.removeEventListener("mouseleave",r),t&&t()};document.addEventListener("mousemove",n),document.addEventListener("touchmove",n),document.addEventListener("mouseup",r),document.addEventLis
|
|
|
|
|
|
Add an empty element to avoid render label,
|
|
|
|
|
|
do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485
|
|
|
|
|
|
`),ze[2]||(ze[2]=createBaseVNode("span",null,null,-1))]),_:1},8,["model-value","label","disabled"])):ue.value&&n.node.checked?(openBlock(),createBlock(unref(ElIcon),{key:2,class:normalizeClass(unref($).e("prefix"))},{default:withCtx(()=>[createVNode$1(unref(check_default))]),_:1},8,["class"])):createCommentVNode("v-if",!0),createCommentVNode(" content "),createVNode$1(unref(NodeContent$1),{node:n.node},null,8,["node"]),createCommentVNode(" postfix "),ue.value?createCommentVNode("v-if",!0):(openBlock(),createElementBlock(Fragment,{key:3},[n.node.loading?(openBlock(),createBlock(unref(ElIcon),{key:0,class:normalizeClass([unref($).is("loading"),unref($).e("postfix")])},{default:withCtx(()=>[createVNode$1(unref(loading_default))]),_:1},8,["class"])):(openBlock(),createBlock(unref(ElIcon),{key:1,class:normalizeClass(["arrow-right",unref($).e("postfix")])},{default:withCtx(()=>[createVNode$1(unref(arrow_right_default))]),_:1},8,["class"]))],64))],42,_hoisted_1$1n))}});var ElCascaderNode=_export_sfc(_sfc_main$2m,[["__file","/home/runner/work/element-plus/element-plus/packages/components/cascader-panel/src/node.vue"]]);const _sfc_main$2l=defineComponent({name:"ElCascaderMenu",__name:"menu",props:{nodes:{type:Array,required:!0},index:{type:Number,required:!0}},setup(n){const t=n,r=getCurrentInstance(),i=useNamespace("cascader-menu"),{t:g}=useLocale(),$=useId();let V,re;const ie=inject(CASCADER_PANEL_INJECTION_KEY),ae=ref(),oe=computed(()=>!t.nodes.length),le=computed(()=>!ie.initialLoaded),ue=computed(()=>`${$.value}-${t.index}`),de=Ce=>{V=Ce.target},he=Ce=>{var xe;if(!(!ie.isHoverMenu||!V||!ae.value))if(V.contains(Ce.target)){pe();const Ie=r.vnode.el,{left:Ne}=Ie.getBoundingClientRect(),{offsetWidth:Oe,offsetHeight:$e}=Ie,Ve=Ce.clientX-Ne,Ue=V.offsetTop,Fe=Ue+V.offsetHeight,ze=((xe=Ie.querySelector(`.${i.e("wrap")}`))==null?void 0:xe.scrollTop)||0;ae.value.innerHTML=`
|
|
|
|
|
|
<path style="pointer-events: auto;" fill="transparent" d="M${Ve} ${Ue} L${Oe} ${ze} V${Ue} Z" />
|
|
|
|
|
|
<path style="pointer-events: auto;" fill="transparent" d="M${Ve} ${Fe} L${Oe} ${$e+ze} V${Fe} Z" />
|
|
|
|
|
|
`}else re||(re=window.setTimeout(_e,ie.config.hoverThreshold))},pe=()=>{re&&(clearTimeout(re),re=void 0)},_e=()=>{ae.value&&(ae.value.innerHTML="",pe())};return(Ce,xe)=>(openBlock(),createBlock(unref(ElScrollbar),{key:ue.value,tag:"ul",role:"menu",class:normalizeClass(unref(i).b()),"wrap-class":unref(i).e("wrap"),"view-class":[unref(i).e("list"),unref(i).is("empty",oe.value)],onMousemove:he,onMouseleave:_e},{default:withCtx(()=>{var Ie;return[(openBlock(!0),createElementBlock(Fragment,null,renderList(n.nodes,Ne=>(openBlock(),createBlock(ElCascaderNode,{key:Ne.uid,node:Ne,"menu-id":ue.value,onExpand:de},null,8,["node","menu-id"]))),128)),le.value?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(unref(i).e("empty-text"))},[createVNode$1(unref(ElIcon),{size:"14",class:normalizeClass(unref(i).is("loading"))},{default:withCtx(()=>[createVNode$1(unref(loading_default))]),_:1},8,["class"]),createTextVNode(" "+toDisplayString(unref(g)("el.cascader.loading")),1)],2)):oe.value?(openBlock(),createElementBlock("div",{key:1,class:normalizeClass(unref(i).e("empty-text"))},[renderSlot(Ce.$slots,"empty",{},()=>[createTextVNode(toDisplayString(unref(g)("el.cascader.noData")),1)])],2)):(Ie=unref(ie))!=null&&Ie.isHoverMenu?(openBlock(),createElementBlock(Fragment,{key:2},[createCommentVNode(" eslint-disable vue/html-self-closing "),(openBlock(),createElementBlock("svg",{ref_key:"hoverZone",ref:ae,class:normalizeClass(unref(i).e("hover-zone"))},null,2))],2112)):createCommentVNode("v-if",!0),createCommentVNode(" eslint-enable vue/html-self-closing ")]}),_:3},8,["class","wrap-class","view-class"]))}});var ElCascaderMenu=_export_sfc(_sfc_main$2l,[["__file","/home/runner/work/element-plus/element-plus/packages/components/cascader-panel/src/menu.vue"]]);let uid=0;const calculatePathNodes=n=>{const t=[n];let{parent:r}=n;for(;r;)t.unshift(r),r=r.parent;return t};let Node$2=class mi{constructor(t,r,i,g=!1){this.data=t,this.config=r,this.parent=i,this.root=g,this.uid=uid++,this.checked=!1,this.indeterminate=!1,this.loading=!1;const{value:$,label:V,children:re}=r,ie=t[re],ae=calculatePathNodes(this);this.level=g?0:i?i.level+1:1,this.value=t[$],this.label=t[V],this.pathNodes=ae,this.pathValues=ae.map(oe=>oe.value),this.pathLabels=ae.map(oe=>oe.label),this.childrenData=ie,this.children=(ie||[]).map(oe=>new mi(oe,r,this)),this.loaded=!r.lazy||this.isLeaf||!isEmpty(ie),this.text=""}get isDisabled(){const{data:t,parent:r,config:i}=this,{disabled:g,checkStrictly:$}=i;return(isFunction$4(g)?g(t,this):!!t[g])||!$&&!!(r!=null&&r.isDisabled)}get isLeaf(){const{data:t,config:r,childrenData:i,loaded:g}=this,{lazy:$,leaf:V}=r,re=isFunction$4(V)?V(t,this):t[V];return isUndefined$1(re)?$&&!g?!1:!(isArray$5(i)&&i.length):!!re}get valueByOption(){return this.config.emitPath?this.pathValues:this.value}appendChild(t){const{childrenData:r,children:i}=this,g=new mi(t,this.config,this);return isArray$5(r)?r.push(t):this.childrenData=[t],i.push(g),g}calcText(t,r){const i=t?this.pathLabels.join(r):this.label;return this.text=i,i}broadcast(t){this.children.forEach(r=>{var i;r&&(r.broadcast(t),(i=r.onParentCheck)==null||i.call(r,t))})}emit(){var t;const{parent:r}=this;r&&((t=r.onChildCheck)==null||t.call(r),r.emit())}onParentCheck(t){this.isDisabled||this.setCheckState(t)}onChildCheck(){const{children:t}=this,r=t.filter(g=>!g.isDisabled),i=r.length?r.every(g=>g.checked):!1;this.setCheckState(i)}setCheckState(t){const r=this.children.length,i=this.children.reduce((g,$)=>{const V=$.checked?1:$.indeterminate?.5:0;return g+V},0);this.checked=this.loaded&&this.children.filter(g=>!g.isDisabled).every(g=>g.loaded&&g.checked)&&t,this.indeterminate=this.loaded&&i!==r&&i>0}doCheck(t){if(this.checked===t)return;const{checkStrictly:r,multiple:i}=this.config;r||!i?this.checked=t:(this.broadcast(t),this.setCheckState(t),this.emit())}};const flatNodes=(n,t)=>n.reduce((r,i)=>(i.isLeaf?r.push(i):(!t&&r.push(i),r=r.concat(flatNodes(i.children,t))),r),[]);class Store{constructor(t,r){this.config=r;const i=(t||[]).map(g=>new Node$2(g,this.config));this.nodes=i,this.allN
|
|
|
|
|
|
(?:
|
|
|
|
|
|
(?:`+i+":){7}(?:"+i+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
|
|
|
|
(?:`+i+":){6}(?:"+r+"|:"+i+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
|
|
|
|
|
|
(?:`+i+":){5}(?::"+r+"|(?::"+i+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
|
|
|
|
|
|
(?:`+i+":){4}(?:(?::"+i+"){0,1}:"+r+"|(?::"+i+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
|
|
|
|
|
|
(?:`+i+":){3}(?:(?::"+i+"){0,2}:"+r+"|(?::"+i+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
|
|
|
|
|
|
(?:`+i+":){2}(?:(?::"+i+"){0,3}:"+r+"|(?::"+i+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
|
|
|
|
|
|
(?:`+i+":){1}(?:(?::"+i+"){0,4}:"+r+"|(?::"+i+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
|
|
|
|
(?::(?:(?::`+i+"){0,5}:"+r+"|(?::"+i+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
|
|
|
|
|
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
|
|
|
|
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),$=new RegExp("(?:^"+r+"$)|(?:^"+g+"$)"),V=new RegExp("^"+r+"$"),re=new RegExp("^"+g+"$"),ie=function(Ne){return Ne&&Ne.exact?$:new RegExp("(?:"+t(Ne)+r+t(Ne)+")|(?:"+t(Ne)+g+t(Ne)+")","g")};ie.v4=function(Ie){return Ie&&Ie.exact?V:new RegExp(""+t(Ie)+r+t(Ie),"g")},ie.v6=function(Ie){return Ie&&Ie.exact?re:new RegExp(""+t(Ie)+g+t(Ie),"g")};var ae="(?:(?:[a-z]+:)?//)",oe="(?:\\S+(?::\\S*)?@)?",le=ie.v4().source,ue=ie.v6().source,de="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",he="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",pe="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",_e="(?::\\d{2,5})?",Ce='(?:[/?#][^\\s"]*)?',xe="(?:"+ae+"|www\\.)"+oe+"(?:localhost|"+le+"|"+ue+"|"+de+he+pe+")"+_e+Ce;return urlReg=new RegExp("(?:^"+xe+"$)","i"),urlReg},pattern$2={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},types={integer:function(t){return types.number(t)&&parseInt(t,10)===t},float:function(t){return types.number(t)&&!types.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!types.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(pattern$2.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(getUrlRegex())},hex:function(t){return typeof t=="string"&&!!t.match(pattern$2.hex)}},type$1=function(t,r,i,g,$){if(t.required&&r===void 0){required$1(t,r,i,g,$);return}var V=["integer","float","array","regexp","object","method","email","number","date","url","hex"],re=t.type;V.indexOf(re)>-1?types[re](r)||g.push(format$1($.messages.types[re],t.fullField,t.type)):re&&typeof r!==t.type&&g.push(format$1($.messages.types[re],t.fullField,t.type))},range=function(t,r,i,g,$){var V=typeof t.len=="number",re=typeof t.min=="number",ie=typeof t.max=="number",ae=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,oe=r,le=null,ue=typeof r=="number",de=typeof r=="string",he=Array.isArray(r);if(ue?le="number":de?le="string":he&&(le="array"),!le)return!1;he&&(oe=r.length),de&&(oe=r.replace(ae,"_").length),V?oe!==t.len&&g.push(format$1($.messages[le].len,t.fullField,t.len)):re&&!ie&&oe<t.min?g.push(format$1($.messages[le].min,t.fullField,t.min)):ie&&!re&&oe>t.max?g.push(format$1($.messages[le].max,t.fullField,t.max)):re&&ie&&(oe<t.min||oe>t.max)&&g.push(format$1($.messages[le].range,t.fullField,t.min,t.max))},ENUM$1="enum",enumerable$1=function(t,r,i,g,$){t[ENUM$1]=Array.isArray(t[ENUM$1])?t[ENUM$1]:[],t[ENUM$1].indexOf(r)===-1&&g.push(format$1($.messages[ENUM$1],t.fullField,t[ENUM$1].join(", ")))},pattern$1=function(t,r,i,g,$){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(r)||g.push(format$1($.messages.pattern.mismatch,t.fullField,r,t.pattern));else if(typeof t.pattern=="string"){var V=new RegExp(t.pattern);V.test(r)||g.push(format$1($.messages.pattern.mismatch,t.fullField,r,t.pattern))}}},rules={required:required$1,whitespace,type:type$1,range,enum:enumerable$1,pattern:pattern$1},string=function(t,r,i,g,$){var V=[],re=t.required||!t.required&&g.hasOwnProperty(t.field);if(re){if(isEmptyValue(r,"string")&&!t.required)return i();rules.required(t,r,g,V,$,"string"),isEmptyValue(r,"string")||(rules.type(t,r,g,V,$),rules.range(t,r,g,V,$),rules.pattern(t,r,g,V,$),t.whitespace===!0&&rules.whitespace(t,r,g,V,$))}i(V)},method=function(t,r,i,g,$){var V=[],re=t.required||!t.required&&g.hasOwnProperty(t.field);if(re){if(isEmptyValue(r)&&!t.required)return i();rules.required(t,r,g,V,$),r!==void 0&&rules.type(t,r,g,V,
|
|
|
|
|
|
M 50 50
|
|
|
|
|
|
m 0 ${Ne?"":"-"}${Ie}
|
|
|
|
|
|
a ${Ie} ${Ie} 0 1 1 0 ${Ne?"-":""}${Ie*2}
|
|
|
|
|
|
a ${Ie} ${Ie} 0 1 1 0 ${Ne?"":"-"}${Ie*2}
|
|
|
|
|
|
`}),ie=computed(()=>2*Math.PI*V.value),ae=computed(()=>r.type==="dashboard"?.75:1),oe=computed(()=>`${-1*ie.value*(1-ae.value)/2}px`),le=computed(()=>({strokeDasharray:`${ie.value*ae.value}px, ${ie.value}px`,strokeDashoffset:oe.value})),ue=computed(()=>({strokeDasharray:`${ie.value*ae.value*(r.percentage/100)}px, ${ie.value}px`,strokeDashoffset:oe.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),de=computed(()=>{let Ie;return r.color?Ie=xe(r.percentage):Ie=t[r.status]||t.default,Ie}),he=computed(()=>r.status==="warning"?warning_filled_default:r.type==="line"?r.status==="success"?circle_check_default:circle_close_default:r.status==="success"?check_default:close_default),pe=computed(()=>r.type==="line"?12+r.strokeWidth*.4:r.width*.111111+2),_e=computed(()=>r.format(r.percentage));function Ce(Ie){const Ne=100/Ie.length;return Ie.map(($e,Ve)=>isString$2($e)?{color:$e,percentage:(Ve+1)*Ne}:$e).sort(($e,Ve)=>$e.percentage-Ve.percentage)}const xe=Ie=>{var Ne;const{color:Oe}=r;if(isFunction$4(Oe))return Oe(Ie);if(isString$2(Oe))return Oe;{const $e=Ce(Oe);for(const Ve of $e)if(Ve.percentage>Ie)return Ve.color;return(Ne=$e[$e.length-1])==null?void 0:Ne.color}};return(Ie,Ne)=>(openBlock(),createElementBlock("div",{class:normalizeClass([unref(i).b(),unref(i).m(Ie.type),unref(i).is(Ie.status),{[unref(i).m("without-text")]:!Ie.showText,[unref(i).m("text-inside")]:Ie.textInside}]),role:"progressbar","aria-valuenow":Ie.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[Ie.type==="line"?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(unref(i).b("bar"))},[createBaseVNode("div",{class:normalizeClass(unref(i).be("bar","outer")),style:normalizeStyle$1({height:`${Ie.strokeWidth}px`})},[createBaseVNode("div",{class:normalizeClass([unref(i).be("bar","inner"),{[unref(i).bem("bar","inner","indeterminate")]:Ie.indeterminate},{[unref(i).bem("bar","inner","striped")]:Ie.striped},{[unref(i).bem("bar","inner","striped-flow")]:Ie.stripedFlow}]),style:normalizeStyle$1(g.value)},[(Ie.showText||Ie.$slots.default)&&Ie.textInside?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(unref(i).be("bar","innerText"))},[renderSlot(Ie.$slots,"default",{percentage:Ie.percentage},()=>[createBaseVNode("span",null,toDisplayString(_e.value),1)])],2)):createCommentVNode("v-if",!0)],6)],6)],2)):(openBlock(),createElementBlock("div",{key:1,class:normalizeClass(unref(i).b("circle")),style:normalizeStyle$1({height:`${Ie.width}px`,width:`${Ie.width}px`})},[(openBlock(),createElementBlock("svg",_hoisted_2$y,[createBaseVNode("path",{class:normalizeClass(unref(i).be("circle","track")),d:re.value,stroke:`var(${unref(i).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":Ie.strokeLinecap,"stroke-width":$.value,fill:"none",style:normalizeStyle$1(le.value)},null,14,_hoisted_3$e),createBaseVNode("path",{class:normalizeClass(unref(i).be("circle","path")),d:re.value,stroke:de.value,fill:"none",opacity:Ie.percentage?1:0,"stroke-linecap":Ie.strokeLinecap,"stroke-width":$.value,style:normalizeStyle$1(ue.value)},null,14,_hoisted_4$a)]))],6)),(Ie.showText||Ie.$slots.default)&&!Ie.textInside?(openBlock(),createElementBlock("div",{key:2,class:normalizeClass(unref(i).e("text")),style:normalizeStyle$1({fontSize:`${pe.value}px`})},[renderSlot(Ie.$slots,"default",{percentage:Ie.percentage},()=>[Ie.status?(openBlock(),createBlock(unref(ElIcon),{key:1},{default:withCtx(()=>[(openBlock(),createBlock(resolveDynamicComponent(he.value)))]),_:1})):(openBlock(),createElementBlock("span",_hoisted_5$3,toDisplayString(_e.value),1))])],6)):createCommentVNode("v-if",!0)],10,_hoisted_1$N))}});var Progress=_export_sfc(_sfc_main$1i,[["__file","/home/runner/work/element-plus/element-plus/packages/components/progress/src/progress.vue"]]);const ElProgress=withInstall(Progress),rateProps=buildProps({modelValue:{type:Number,default:0},id:{type:String,default:void 0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:definePropType([Array,Object]),default:()=>
|
|
|
|
|
|
* Checks if an event is supported in the current execution environment.
|
|
|
|
|
|
*
|
|
|
|
|
|
* NOTE: This will not work correctly for non-generic events such as `change`,
|
|
|
|
|
|
* `reset`, `load`, `error`, and `select`.
|
|
|
|
|
|
*
|
|
|
|
|
|
* Borrows from Modernizr.
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param {string} eventNameSuffix Event name, e.g. "click".
|
|
|
|
|
|
* @param {?boolean} capture Check if the capture phase is supported.
|
|
|
|
|
|
* @return {boolean} True if the event is supported.
|
|
|
|
|
|
* @internal
|
|
|
|
|
|
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
|
|
|
|
*/const SCOPE$3="_Mousewheel",mousewheel=function(n,t){if(n&&n.addEventListener){removeWheelHandler(n);const r=function(i){const g=Y(i);t&&Reflect.apply(t,this,[i,g])};n[SCOPE$3]={wheelHandler:r},n.addEventListener("wheel",r,{passive:!0})}},removeWheelHandler=n=>{var t;(t=n[SCOPE$3])!=null&&t.wheelHandler&&(n.removeEventListener("wheel",n[SCOPE$3].wheelHandler),n[SCOPE$3]=null)},Mousewheel={beforeMount(n,t){mousewheel(n,t.value)},unmounted(n){removeWheelHandler(n)},updated(n,t){t.value!==t.oldValue&&mousewheel(n,t.value)}};let tableIdSeed=1;const _sfc_main$10=defineComponent({name:"ElTable",directives:{Mousewheel},components:{TableHeader,TableBody,TableFooter,ElScrollbar,hColgroup},props:defaultProps$2,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change","scroll"],setup(n){const{t}=useLocale(),r=useNamespace("table"),i=getCurrentInstance();provide(TABLE_INJECTION_KEY,i);const g=createStore(i,n);i.store=g;const $=new TableLayout({store:i.store,table:i,fit:n.fit,showHeader:n.showHeader});i.layout=$;const V=computed(()=>(g.states.data.value||[]).length===0),{setCurrentRow:re,getSelectionRows:ie,toggleRowSelection:ae,clearSelection:oe,clearFilter:le,toggleAllSelection:ue,toggleRowExpansion:de,clearSort:he,sort:pe,updateKeyChildren:_e}=useUtils(g),{isHidden:Ce,renderExpanded:xe,setDragVisible:Ie,isGroup:Ne,handleMouseLeave:Oe,handleHeaderFooterMousewheel:$e,tableSize:Ve,emptyBlockStyle:Ue,resizeProxyVisible:Fe,bodyWidth:ze,resizeState:Pt,doLayout:qe,tableBodyStyles:Et,tableLayout:kt,scrollbarViewStyle:At,scrollbarStyle:Dt}=useStyle(n,$,g,i),{scrollBarRef:Lt,scrollTo:jt,setScrollLeft:hn,setScrollTop:vn}=useScrollbar$1(),_n=debounce(qe,50),wn=`${r.namespace.value}-table_${tableIdSeed++}`;i.tableId=wn,i.state={isGroup:Ne,resizeState:Pt,doLayout:qe,debouncedUpdateLayout:_n};const bn=computed(()=>{var Tn;return(Tn=n.sumText)!=null?Tn:t("el.table.sumText")}),Cn=computed(()=>{var Tn;return(Tn=n.emptyText)!=null?Tn:t("el.table.emptyText")}),Sn=computed(()=>convertToRows(g.states.originColumns.value)[0]);return useKeyRender(i),onBeforeUnmount(()=>{_n.cancel()}),{ns:r,layout:$,store:g,columns:Sn,handleHeaderFooterMousewheel:$e,handleMouseLeave:Oe,tableId:wn,tableSize:Ve,isHidden:Ce,isEmpty:V,renderExpanded:xe,resizeProxyVisible:Fe,resizeState:Pt,isGroup:Ne,bodyWidth:ze,tableBodyStyles:Et,emptyBlockStyle:Ue,debouncedUpdateLayout:_n,setCurrentRow:re,getSelectionRows:ie,toggleRowSelection:ae,clearSelection:oe,clearFilter:le,toggleAllSelection:ue,toggleRowExpansion:de,clearSort:he,doLayout:qe,sort:pe,updateKeyChildren:_e,t,setDragVisible:Ie,context:i,computedSumText:bn,computedEmptyText:Cn,tableLayout:kt,scrollbarViewStyle:At,scrollbarStyle:Dt,scrollBarRef:Lt,scrollTo:jt,setScrollLeft:hn,setScrollTop:vn,allowDragLastColumn:n.allowDragLastColumn}}}),_hoisted_1$E=["data-prefix"],_hoisted_2$s={ref:"hiddenColumns",class:"hidden-columns"};function _sfc_render$3(n,t,r,i,g,$){const V=resolveComponent("hColgroup"),re=resolveComponent("table-header"),ie=resolveComponent("table-body"),ae=resolveComponent("table-footer"),oe=resolveComponent("el-scrollbar"),le=resolveDirective("mousewheel");return openBlock(),createElementBlock("div",{ref:"tableWrapper",class:normalizeClass([{[n.ns.m("fit")]:n.fit,[n.ns.m("striped")]:n.stripe,[n.ns.m("border")]:n.border||n.isGroup,[n.ns.m("hidden")]:n.isHidden,[n.ns.m("group")]:n.isGroup,[n.ns.m("fluid-height")]:n.maxHeight,[n.ns.m("scrollable-x")]:n.layout.scrollX.value,[n.ns.m("scrollable-y")]:n.layout.scrollY.value,[n.ns.m("enable-row-hover")]:!n.store.states.isComplex.value,[n.ns.m("enable-row-transition")]:(n.store.states.data.value||[]).length!==0&&(n.store.states.data.value||[]).length<100,"has-footer":n.showSummary},n.ns.m(n.tableSize),n.className,n.ns.b(),n.ns.m(`layout-${n.tableLayout}`)]),style:normalizeStyle$1(n.style),"data-prefix":n.ns.namespace.value,onMouseleave:t
|
|
|
|
|
|
`||ae==="\r"){V=ie;continue}if($.includes(ae)){const oe=V===-1?i:V;re={pattern:g.slice(ie+1,oe),start:ie+1,end:oe,prefix:ae,prefixIndex:ie,splitIndex:V,selectionEnd:i};break}}return re},getCursorPosition=(n,t={debug:!1,useSelectionEnd:!1})=>{const r=n.selectionStart!==null?n.selectionStart:0,i=n.selectionEnd!==null?n.selectionEnd:0,g=t.useSelectionEnd?i:r,$=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"];if(t.debug){const ue=document.querySelector("#input-textarea-caret-position-mirror-div");ue!=null&&ue.parentNode&&ue.parentNode.removeChild(ue)}const V=document.createElement("div");V.id="input-textarea-caret-position-mirror-div",document.body.appendChild(V);const re=V.style,ie=window.getComputedStyle(n),ae=n.nodeName==="INPUT";re.whiteSpace=ae?"nowrap":"pre-wrap",ae||(re.wordWrap="break-word"),re.position="absolute",t.debug||(re.visibility="hidden"),$.forEach(ue=>{if(ae&&ue==="lineHeight")if(ie.boxSizing==="border-box"){const de=Number.parseInt(ie.height),he=Number.parseInt(ie.paddingTop)+Number.parseInt(ie.paddingBottom)+Number.parseInt(ie.borderTopWidth)+Number.parseInt(ie.borderBottomWidth),pe=he+Number.parseInt(ie.lineHeight);de>pe?re.lineHeight=`${de-he}px`:de===pe?re.lineHeight=ie.lineHeight:re.lineHeight="0"}else re.lineHeight=ie.height;else re[ue]=ie[ue]}),isFirefox()?n.scrollHeight>Number.parseInt(ie.height)&&(re.overflowY="scroll"):re.overflow="hidden",V.textContent=n.value.slice(0,Math.max(0,g)),ae&&V.textContent&&(V.textContent=V.textContent.replace(/\s/g," "));const oe=document.createElement("span");oe.textContent=n.value.slice(Math.max(0,g))||".",oe.style.position="relative",oe.style.left=`${-n.scrollLeft}px`,oe.style.top=`${-n.scrollTop}px`,V.appendChild(oe);const le={top:oe.offsetTop+Number.parseInt(ie.borderTopWidth),left:oe.offsetLeft+Number.parseInt(ie.borderLeftWidth),height:Number.parseInt(ie.fontSize)*1.5};return t.debug?oe.style.backgroundColor="#aaa":document.body.removeChild(V),le.left>=n.clientWidth&&(le.left=n.clientWidth),le},mentionProps=buildProps({...inputProps,options:{type:definePropType(Array),default:()=>[]},prefix:{type:definePropType([String,Array]),default:"@",validator:n=>isString$2(n)?n.length===1:n.every(t=>isString$2(t)&&t.length===1)},split:{type:String,default:" ",validator:n=>n.length===1},filterOption:{type:definePropType([Boolean,Function]),default:()=>filterOption,validator:n=>n===!1?!0:isFunction$4(n)},placement:{type:definePropType(String),default:"bottom"},showArrow:Boolean,offset:{type:Number,default:0},whole:Boolean,checkIsWhole:{type:definePropType(Function)},modelValue:String,loading:Boolean,popperClass:useTooltipContentProps.popperClass,popperStyle:useTooltipContentProps.popperStyle,popperOptions:{type:definePropType(Object),default:()=>({})},props:{type:definePropType(Object),default:()=>mentionDefaultProps}}),mentionEmits={[UPDATE_MODEL_EVENT]:n=>isString$2(n),"whole-remove":(n,t)=>isString$2(n)&&isString$2(t),input:n=>isString$2(n),search:(n,t)=>isString$2(n)&&isString$2(t),select:(n,t)=>isObject$6(n)&&isString$2(t),focus:n=>n instanceof FocusEvent,blur:n=>n instanceof FocusEvent},mentionDefaultProps={value:"value",label:"label",disabled:"disabled"},mentionDropdownProps=buildProps({options:{type:definePropType(Array),default:()=>[]},loading:Boolean,disabled:Boolean,contentId:String,ariaLabel:String}),mentionDropdownEmits={select:n=>isString$2(n.value)},_hoisted_1$s=["id","aria-disabled","aria-selected","onMousemove","onClick"],_sfc_main$C=defineComponent({name:"ElMentionDropdown",__name:"mention-dropdown",props:mentionDropdownProps,emits:mentionDropdownEmits,setup(n,{expose:t,emit:r}){const i=n,g=r,$=useNamespace("mention"),{t:V}=useLocale(),re=ref(-1),ie=ref(),ae=ref(),oe=ref(),le=(N
|
|
|
|
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
|
|
|
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
|
|
|
|
version="1.1"
|
|
|
|
|
|
width="${r}"
|
|
|
|
|
|
height="${i}"
|
|
|
|
|
|
>
|
|
|
|
|
|
${t}
|
|
|
|
|
|
<use
|
|
|
|
|
|
xlink:href="#${n}"
|
|
|
|
|
|
${g}
|
|
|
|
|
|
x="0"
|
|
|
|
|
|
y="0"
|
|
|
|
|
|
></use>
|
|
|
|
|
|
</svg>
|
|
|
|
|
|
`,svgToImgSrc=n=>"data:image/svg+xml;utf8,"+encodeURIComponent(n),genDomPropstr=n=>{let t="";for(const r in n)t+=` ${r}="${n[r].val}"`;return t},randomString=n=>{n=n||10;const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=t.length;let i="";for(let g=0;g<n;g++)i+=t.charAt(Math.floor(Math.random()*r));return i};function isTouchEvent(n){const t=Object.prototype.toString.call(n);return t.substring(8,t.length-1)==="TouchEvent"}function getRealityXY(n,t){let r=0,i=0;if(isTouchEvent(n)){const g=n.targetTouches[0];r=t?g.pageX-t.x:0,i=t?g.pageY-t.y:0}else r=t?n.clientX-t.x:n.clientX,i=t?n.clientY-t.y:n.clientY;return{realityX:r,realityY:i}}const blobToBase64=n=>new Promise(function(t,r){const i=new FileReader;let g="";i.readAsDataURL(n),i.onload=function(){g=i.result??""},i.onerror=function($){r($)},i.onloadend=function(){t(g)}}),alignToGrid=(n,t=1)=>{const r=Math.floor(n/t);return n%t>=t/2?(r+1)*t:r*t},objectDeepClone=(n,t={})=>n?JSON.parse(JSON.stringify(n)):t,prosToVBind=n=>{let t={};for(const r in n)t={...t,[r]:n[r].val};return t},calculateGuideY=(n,t,r,i,g)=>{for(let $=0;$<r.length;$++){const{left:V,right:re,width:ie}=r[$],ae=n.find(xe=>Math.abs(xe.left-V)<t),oe=n.find(xe=>Math.abs(xe.left-(V+ie/2))<t),le=n.find(xe=>Math.abs(xe.left-re)<t),ue=n.find(xe=>Math.abs(xe.left+xe.width/2-V)<t),de=n.find(xe=>Math.abs(xe.left+xe.width/2-(V+ie/2))<t),he=n.find(xe=>Math.abs(xe.left+xe.width/2-re)<t),pe=n.find(xe=>Math.abs(xe.right-re)<t),_e=n.find(xe=>Math.abs(xe.right-(V+ie/2))<t),Ce=n.find(xe=>Math.abs(xe.right-V)<t);if(ae)return{y_info:{display:!0,left:(ae.left-i.left)/g},move_x:ae.left-V};if(oe)return{y_info:{display:!0,left:(oe.left-i.left)/g},move_x:oe.left-(V+ie/2)};if(le)return{y_info:{display:!0,left:(le.left-i.left)/g},move_x:le.left-re};if(ue)return{y_info:{display:!0,left:(ue.left+ue.width/2-i.left)/g},move_x:ue.left+ue.width/2-V};if(de)return{y_info:{display:!0,left:(de.left+de.width/2-i.left)/g},move_x:de.left+de.width/2-(V+ie/2)};if(he)return{y_info:{display:!0,left:(he.left+he.width/2-i.left)/g},move_x:he.left+he.width/2-re};if(Ce)return{y_info:{display:!0,left:(Ce.right-i.left)/g},move_x:Ce.right-V};if(_e)return{y_info:{display:!0,left:(_e.right-i.left)/g},move_x:_e.right-(V+ie/2)};if(pe)return{y_info:{display:!0,left:(pe.right-i.left)/g},move_x:pe.right-re}}return{y_info:{display:!1,left:0},move_x:0}},calculateGuideX=(n,t,r,i,g)=>{for(let $=0;$<r.length;$++){const{top:V,bottom:re,height:ie}=r[$],ae=n.find(xe=>Math.abs(xe.top-V)<t),oe=n.find(xe=>Math.abs(xe.top-(V+ie/2))<t),le=n.find(xe=>Math.abs(xe.top-re)<t),ue=n.find(xe=>Math.abs(xe.top+xe.height/2-V)<t),de=n.find(xe=>Math.abs(xe.top+xe.height/2-(V+ie/2))<t),he=n.find(xe=>Math.abs(xe.top+xe.height/2-re)<t),pe=n.find(xe=>Math.abs(xe.bottom-re)<t),_e=n.find(xe=>Math.abs(xe.bottom-(V+ie/2))<t),Ce=n.find(xe=>Math.abs(xe.bottom-V)<t);if(ae)return{x_info:{display:!0,top:(ae.top-i.top)/g},move_y:ae.top-V};if(oe)return{x_info:{display:!0,top:(oe.top-i.top)/g},move_y:oe.top-(V+ie/2)};if(le)return{x_info:{display:!0,top:(le.top-i.top)/g},move_y:le.top-re};if(ue)return{x_info:{display:!0,top:(ue.top+ue.height/2-i.top)/g},move_y:ue.top+ue.height/2-V};if(de)return{x_info:{display:!0,top:(de.top+de.height/2-i.top)/g},move_y:de.top+de.height/2-(V+ie/2)};if(he)return{x_info:{display:!0,top:(he.top+he.height/2-i.top)/g},move_y:he.top+he.height/2-re};if(Ce)return{x_info:{display:!0,top:(Ce.bottom-i.top)/g},move_y:Ce.bottom-V};if(_e)return{x_info:{display:!0,top:(_e.bottom-i.top)/g},move_y:_e.bottom-(V+ie/2)};if(pe)return{x_info:{display:!0,top:(pe.bottom-i.top)/g},move_y:pe.bottom-re}}return{x_info:{display:!1,top:0},move_y:0}},positionArrarToPath=(n,t=0,r=0)=>{let i="";for(let g=0;g<n.length;g++)g===0?i+=`M ${n[g].x+t} ${n[g].y+r}`:i+=` L ${n[g].x+t} ${n[g].y+r}`;return i},getCenterXY=(n,t,r,i)=>({x:(n+r)/2,y:(t+i)/2}),rotatePoint=(n,t,r,i,g)=>{const $=r+(n-r)*Math.cos(g)-(t-i)*Math.sin(g),V=i+(n-r)*Math.sin(g)+(t-i)*Math.cos(g);return{x:$,y:V}},getRectCoordinate=n=>{const t={x:n.left,y:n.top},r={x:n.left+n.width,y:n.top},i={x:n.left,y:n.top+n.height},g={x:n.
|
|
|
|
|
|
* @vue/server-renderer v3.5.26
|
|
|
|
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
|
|
|
|
* @license MIT
|
|
|
|
|
|
**/const shouldIgnoreProp=makeMap(",key,ref,innerHTML,textContent,ref_key,ref_for");function ssrRenderAttrs(n,t){let r="";for(const i in n){if(shouldIgnoreProp(i)||isOn(i)||t==="textarea"&&i==="value")continue;const g=n[i];i==="class"?r+=` class="${ssrRenderClass(g)}"`:i==="style"?r+=` style="${ssrRenderStyle(g)}"`:i==="className"?r+=` class="${String(g)}"`:r+=ssrRenderDynamicAttr(i,g,t)}return r}function ssrRenderDynamicAttr(n,t,r){if(!isRenderableAttrValue(t))return"";const i=r&&(r.indexOf("-")>0||isSVGTag(r))?n:propsToAttrMap[n]||n.toLowerCase();return isBooleanAttr(i)?includeBooleanAttr(t)?` ${i}`:"":isSSRSafeAttrName(i)?t===""?` ${i}`:` ${i}="${escapeHtml(t)}"`:(console.warn(`[@vue/server-renderer] Skipped rendering unsafe attribute name: ${i}`),"")}function ssrRenderClass(n){return escapeHtml(normalizeClass(n))}function ssrRenderStyle(n){if(!n)return"";if(isString$2(n))return escapeHtml(n);const t=normalizeStyle$1(ssrResetCssVars(n));return escapeHtml(stringifyStyle(t))}function ssrResetCssVars(n){if(!isArray$5(n)&&isObject$6(n)){const t={};for(const r in n)r.startsWith(":--")?t[r.slice(1)]=normalizeCssVarValue(n[r]):t[r]=n[r];return t}return n}function ssrRenderTeleport(n,t,r,i,g){n("<!--teleport start-->");const $=g.appContext.provides[ssrContextKey],V=$.__teleportBuffers||($.__teleportBuffers={}),re=V[r]||(V[r]=[]),ie=re.length;let ae;if(i)t(n),ae="<!--teleport start anchor--><!--teleport anchor-->";else{const{getBuffer:oe,push:le}=createBuffer();le("<!--teleport start anchor-->"),t(le),le("<!--teleport anchor-->"),ae=oe()}re.splice(ie,0,ae),n("<!--teleport end-->")}{const n=getGlobalThis(),t=(r,i)=>{let g;return(g=n[r])||(g=n[r]=[]),g.push(i),$=>{g.length>1?g.forEach(V=>V($)):g[0]($)}};t("__VUE_INSTANCE_SETTERS__",r=>r),t("__VUE_SSR_SETTERS__",r=>r)}function ssrCompile(n,t){throw new Error("On-the-fly template compilation is not supported in the ESM build of @vue/server-renderer. All templates must be pre-compiled into render functions.")}const{createComponentInstance,setCurrentRenderingInstance,setupComponent,renderComponentRoot,normalizeVNode,pushWarningContext,popWarningContext}=ssrUtils;function createBuffer(){let n=!1;const t=[];return{getBuffer(){return t},push(r){const i=isString$2(r);if(n&&i){t[t.length-1]+=r;return}t.push(r),n=i,(isPromise(r)||isArray$5(r)&&r.hasAsync)&&(t.hasAsync=!0)}}}function renderComponentVNode(n,t=null,r){const i=n.component=createComponentInstance(n,t,null),g=setupComponent(i,!0),$=isPromise(g);let V=i.sp;return $||V?Promise.resolve(g).then(()=>{if($&&(V=i.sp),V)return Promise.all(V.map(ie=>ie.call(i.proxy)))}).catch(NOOP).then(()=>renderComponentSubTree(i,r)):renderComponentSubTree(i,r)}function renderComponentSubTree(n,t){const r=n.type,{getBuffer:i,push:g}=createBuffer();if(isFunction$4(r)){let $=renderComponentRoot(n);if(!r.props)for(const V in n.attrs)V.startsWith("data-v-")&&(($.props||($.props={}))[V]="");renderVNode(g,n.subTree=$,n,t)}else{(!n.render||n.render===NOOP)&&!n.ssrRender&&!r.ssrRender&&isString$2(r.template)&&(r.ssrRender=ssrCompile(r.template));const $=n.ssrRender||r.ssrRender;if($){let V=n.inheritAttrs!==!1?n.attrs:void 0,re=!1,ie=n;for(;;){const oe=ie.vnode.scopeId;oe&&(re||(V={...V},re=!0),V[oe]="");const le=ie.parent;if(le&&le.subTree&&le.subTree===ie.vnode)ie=le;else break}if(t){re||(V={...V});const oe=t.trim().split(" ");for(let le=0;le<oe.length;le++)V[oe[le]]=""}const ae=setCurrentRenderingInstance(n);try{$(n.proxy,g,n,V,n.props,n.setupState,n.data,n.ctx)}finally{setCurrentRenderingInstance(ae)}}else n.render&&n.render!==NOOP?renderVNode(g,n.subTree=renderComponentRoot(n),n,t):(r.name||r.__file,g("<!---->"))}return i()}function renderVNode(n,t,r,i){const{type:g,shapeFlag:$,children:V,dirs:re,props:ie}=t;switch(re&&(t.props=applySSRDirectives(t,ie,re)),g){case Text$1:n(escapeHtml(V));break;case Comment:n(V?`<!--${escapeHtmlComment(V)}-->`:"<!---->");break;case Static:n(V);break;case Fragment:t.slotScopeIds&&(i=(i?i+" ":"")+t.slotScopeIds.join(" ")),n("<!--[-->"),renderVNodeChildren(n,V,r,i),n("<!--]-->");break;default:$&1?renderElementVNode(n,t,r,i):
|
|
|
|
|
|
/*# sourceURL=ace/css/`+de+" */");var Ce=i.createElement("style");Ce.appendChild(_e.createTextNode(ue)),de&&(Ce.id=de),pe==_e&&(pe=i.getDocumentHead(_e)),pe.insertBefore(Ce,pe.firstChild)}}}if(i.importCssString=oe,i.importCssStylsheet=function(ue,de){i.buildDom(["link",{rel:"stylesheet",href:ue}],i.getDocumentHead(de))},i.$fixPositionBug=function(ue){var de=ue.getBoundingClientRect();if(ue.style.left){var he=parseFloat(ue.style.left),pe=+de.left;Math.abs(he-pe)>1&&(ue.style.left=2*he-pe+"px")}if(ue.style.right){var he=parseFloat(ue.style.right),pe=window.innerWidth-de.right;Math.abs(he-pe)>1&&(ue.style.right=2*he-pe+"px")}if(ue.style.top){var he=parseFloat(ue.style.top),pe=+de.top;Math.abs(he-pe)>1&&(ue.style.top=2*he-pe+"px")}if(ue.style.bottom){var he=parseFloat(ue.style.bottom),pe=window.innerHeight-de.bottom;Math.abs(he-pe)>1&&(ue.style.bottom=2*he-pe+"px")}},i.scrollbarWidth=function(ue){var de=i.createElement("ace_inner");de.style.width="100%",de.style.minWidth="0px",de.style.height="200px",de.style.display="block";var he=i.createElement("ace_outer"),pe=he.style;pe.position="absolute",pe.left="-10000px",pe.overflow="hidden",pe.width="200px",pe.minWidth="0px",pe.height="150px",pe.display="block",he.appendChild(de);var _e=ue&&ue.documentElement||document&&document.documentElement;if(!_e)return 0;_e.appendChild(he);var Ce=de.offsetWidth;pe.overflow="scroll";var xe=de.offsetWidth;return Ce===xe&&(xe=he.clientWidth),_e.removeChild(he),Ce-xe},i.computedStyle=function(ue,de){return window.getComputedStyle(ue,"")||{}},i.setStyle=function(ue,de,he){ue[de]!==he&&(ue[de]=he)},i.HAS_CSS_ANIMATION=!1,i.HAS_CSS_TRANSFORMS=!1,i.HI_DPI=$.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,$.isChromeOS&&(i.HI_DPI=!1),typeof document<"u"){var le=document.createElement("div");i.HI_DPI&&le.style.transform!==void 0&&(i.HAS_CSS_TRANSFORMS=!0),!$.isEdge&&typeof le.style.animationName<"u"&&(i.HAS_CSS_ANIMATION=!0),le=null}i.HAS_CSS_TRANSFORMS?i.translate=function(ue,de,he){ue.style.transform="translate("+Math.round(de)+"px, "+Math.round(he)+"px)"}:i.translate=function(ue,de,he){ue.style.top=Math.round(he)+"px",ue.style.left=Math.round(de)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(r,i,g){/*
|
|
|
|
|
|
* based on code from:
|
|
|
|
|
|
*
|
|
|
|
|
|
* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
|
|
|
|
|
|
* Available via the MIT or new BSD license.
|
|
|
|
|
|
* see: http://github.com/jrburke/requirejs for details
|
|
|
|
|
|
*/var $=r("./dom");i.get=function(V,re){var ie=new XMLHttpRequest;ie.open("GET",V,!0),ie.onreadystatechange=function(){ie.readyState===4&&re(ie.responseText)},ie.send(null)},i.loadScript=function(V,re){var ie=$.getDocumentHead(),ae=document.createElement("script");ae.src=V,ie.appendChild(ae),ae.onload=ae.onreadystatechange=function(oe,le){(le||!ae.readyState||ae.readyState=="loaded"||ae.readyState=="complete")&&(ae=ae.onload=ae.onreadystatechange=null,le||re())}},i.qualifyURL=function(V){var re=document.createElement("a");return re.href=V,re.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(r,i,g){i.inherits=function($,V){$.super_=V,$.prototype=Object.create(V.prototype,{constructor:{value:$,enumerable:!1,writable:!0,configurable:!0}})},i.mixin=function($,V){for(var re in V)$[re]=V[re];return $},i.implement=function($,V){i.mixin($,V)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(r,i,g){var $={},V=function(){this.propagationStopped=!0},re=function(){this.defaultPrevented=!0};$._emit=$._dispatchEvent=function(ie,ae){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var oe=this._eventRegistry[ie]||[],le=this._defaultHandlers[ie];if(!(!oe.length&&!le)){(typeof ae!="object"||!ae)&&(ae={}),ae.type||(ae.type=ie),ae.stopPropagation||(ae.stopPropagation=V),ae.preventDefault||(ae.preventDefault=re),oe=oe.slice();for(var ue=0;ue<oe.length&&(oe[ue](ae,this),!ae.propagationStopped);ue++);if(le&&!ae.defaultPrevented)return le(ae,this)}},$._signal=function(ie,ae){var oe=(this._eventRegistry||{})[ie];if(oe){oe=oe.slice();for(var le=0;le<oe.length;le++)oe[le](ae,this)}},$.once=function(ie,ae){var oe=this;if(this.on(ie,function le(){oe.off(ie,le),ae.apply(null,arguments)}),!ae)return new Promise(function(le){ae=le})},$.setDefaultHandler=function(ie,ae){var oe=this._defaultHandlers;if(oe||(oe=this._defaultHandlers={_disabled_:{}}),oe[ie]){var le=oe[ie],ue=oe._disabled_[ie];ue||(oe._disabled_[ie]=ue=[]),ue.push(le);var de=ue.indexOf(ae);de!=-1&&ue.splice(de,1)}oe[ie]=ae},$.removeDefaultHandler=function(ie,ae){var oe=this._defaultHandlers;if(oe){var le=oe._disabled_[ie];if(oe[ie]==ae)le&&this.setDefaultHandler(ie,le.pop());else if(le){var ue=le.indexOf(ae);ue!=-1&&le.splice(ue,1)}}},$.on=$.addEventListener=function(ie,ae,oe){this._eventRegistry=this._eventRegistry||{};var le=this._eventRegistry[ie];return le||(le=this._eventRegistry[ie]=[]),le.indexOf(ae)==-1&&le[oe?"unshift":"push"](ae),ae},$.off=$.removeListener=$.removeEventListener=function(ie,ae){this._eventRegistry=this._eventRegistry||{};var oe=this._eventRegistry[ie];if(oe){var le=oe.indexOf(ae);le!==-1&&oe.splice(le,1)}},$.removeAllListeners=function(ie){ie||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[ie]=void 0),this._defaultHandlers&&(this._defaultHandlers[ie]=void 0)},i.EventEmitter=$}),ace.define("ace/lib/report_error",["require","exports","module"],function(r,i,g){i.reportError=function(V,re){var ie=new Error(V);ie.data=re,typeof console=="object"&&console.error&&console.error(ie),setTimeout(function(){throw ie})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(r,i,g){var $={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace wi
|
|
|
|
|
|
background: #f0f0f0;
|
|
|
|
|
|
color: #333;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_print-margin {
|
|
|
|
|
|
width: 1px;
|
|
|
|
|
|
background: #e8e8e8;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_fold {
|
|
|
|
|
|
background-color: #6B72E6;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm {
|
|
|
|
|
|
background-color: #FFFFFF;
|
|
|
|
|
|
color: black;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_cursor {
|
|
|
|
|
|
color: black;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_invisible {
|
|
|
|
|
|
color: rgb(191, 191, 191);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_storage,
|
|
|
|
|
|
.ace-tm .ace_keyword {
|
|
|
|
|
|
color: blue;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_constant {
|
|
|
|
|
|
color: rgb(197, 6, 11);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_constant.ace_buildin {
|
|
|
|
|
|
color: rgb(88, 72, 246);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_constant.ace_language {
|
|
|
|
|
|
color: rgb(88, 92, 246);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_constant.ace_library {
|
|
|
|
|
|
color: rgb(6, 150, 14);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_invalid {
|
|
|
|
|
|
background-color: rgba(255, 0, 0, 0.1);
|
|
|
|
|
|
color: red;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_support.ace_function {
|
|
|
|
|
|
color: rgb(60, 76, 114);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_support.ace_constant {
|
|
|
|
|
|
color: rgb(6, 150, 14);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_support.ace_type,
|
|
|
|
|
|
.ace-tm .ace_support.ace_class {
|
|
|
|
|
|
color: rgb(109, 121, 222);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_keyword.ace_operator {
|
|
|
|
|
|
color: rgb(104, 118, 135);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_string {
|
|
|
|
|
|
color: rgb(3, 106, 7);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_comment {
|
|
|
|
|
|
color: rgb(76, 136, 107);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_comment.ace_doc {
|
|
|
|
|
|
color: rgb(0, 102, 255);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_comment.ace_doc.ace_tag {
|
|
|
|
|
|
color: rgb(128, 159, 191);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_constant.ace_numeric {
|
|
|
|
|
|
color: rgb(0, 0, 205);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_variable {
|
|
|
|
|
|
color: rgb(49, 132, 149);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_xml-pe {
|
|
|
|
|
|
color: rgb(104, 104, 91);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_entity.ace_name.ace_function {
|
|
|
|
|
|
color: #0000A2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_heading {
|
|
|
|
|
|
color: rgb(12, 7, 255);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_list {
|
|
|
|
|
|
color:rgb(185, 6, 144);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_meta.ace_tag {
|
|
|
|
|
|
color:rgb(0, 22, 142);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_string.ace_regex {
|
|
|
|
|
|
color: rgb(255, 0, 0)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_marker-layer .ace_selection {
|
|
|
|
|
|
background: rgb(181, 213, 255);
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace-tm.ace_multiselect .ace_selection.ace_start {
|
|
|
|
|
|
box-shadow: 0 0 3px 0px white;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace-tm .ace_marker-layer .ace_step {
|
|
|
|
|
|
background: rgb(252, 255, 0);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_marker-layer .ace_stack {
|
|
|
|
|
|
background: rgb(164, 229, 101);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_marker-layer .ace_bracket {
|
|
|
|
|
|
margin: -1px 0 0 -1px;
|
|
|
|
|
|
border: 1px solid rgb(192, 192, 192);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_marker-layer .ace_active-line {
|
|
|
|
|
|
background: rgba(0, 0, 0, 0.07);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_gutter-active-line {
|
|
|
|
|
|
background-color : #dcdcdc;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_marker-layer .ace_selected-word {
|
|
|
|
|
|
background: rgb(250, 250, 255);
|
|
|
|
|
|
border: 1px solid rgb(200, 200, 250);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_indent-guide {
|
|
|
|
|
|
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace-tm .ace_indent-guide-active {
|
|
|
|
|
|
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
|
|
|
|
|
}
|
|
|
|
|
|
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(r,i,g){i.isDark=!1,i.cssClass="ace-tm",i.cssText=r("./textmate-css"),i.$id="ace/theme/textmate";var $=r("../lib/dom");$.importCssString(i.cssText,i.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(r,i,g){"no use strict";var $=r("./lib/lang"),V=r("./lib/net"),re=r("./lib/dom"),ie=r("./lib/app_config").AppConfig;g.exports=i=new ie;var ae={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};i.get=function(de){if(!ae.hasOwnProperty(de))throw new Error("Unknown config key: "+de);return ae[de]},i.set=function(de,he){if(ae.hasOwnProperty(de))ae[de]=he;else if(this.setDefaultValue("",de,he)==!1)throw new Error("Unknown config key: "+de);de=="useStrictCSP"&&re.useStrictCSP(he)},i.all=function(){return $.copyObject(ae)},i.$modes={},i.moduleUrl=function(de,he){if(ae.$moduleUrls[de])return ae.$moduleUrls[de];var pe=de.split("/");he=he||pe[pe.length-2]||"";var _e=he=="snippets"?"/":"-",Ce=pe[pe.length-1];if(he=="worker"&&_e=="-"){var xe=new RegExp("^"+he+"[\\-_]|[\\-_]"+he+"$","g");Ce=Ce.replace(xe,"")}(!Ce||Ce==he)&&pe.length>1&&(Ce=pe[pe.length-2]);var Ie=ae[he+"Path"];return Ie==null?Ie=ae.basePath:_e=="/"&&(he=_e=""),Ie&&Ie.slice(-1)!="/"&&(Ie+="/"),Ie+he+_e+Ce+this.get("suffix")},i.setModuleUrl=function(de,he){return ae.$moduleUrls[de]=he};var oe=function(de,he){if(de==="ace/theme/textmate"||de==="./theme/textmate")return he(null,r("./theme/textmate"));if(le)return le(de,he);console.error("loader is not configured")},le;i.setLoader=function(de){le=de},i.dynamicModules=Object.create(null),i.$loading={},i.$loaded={},i.loadModule=function(de,he){var pe;if(Array.isArray(de))var _e=de[0],Ce=de[1];else if(typeof de=="string")var Ce=de;var xe=function(Ie){if(Ie&&!i.$loading[Ce])return he&&he(Ie);if(i.$loading[Ce]||(i.$loading[Ce]=[]),i.$loading[Ce].push(he),!(i.$loading[Ce].length>1)){var Ne=function(){oe(Ce,function(Oe,$e){$e&&(i.$loaded[Ce]=$e),i._emit("load.module",{name:Ce,module:$e});var Ve=i.$loading[Ce];i.$loading[Ce]=null,Ve.forEach(function(Ue){Ue&&Ue($e)})})};if(!i.get("packaged"))return Ne();V.loadScript(i.moduleUrl(Ce,_e),Ne),ue()}};if(i.dynamicModules[Ce])i.dynamicModules[Ce]().then(function(Ie){Ie.default?xe(Ie.default):xe(Ie)});else{try{pe=this.$require(Ce)}catch{}xe(pe||i.$loaded[Ce])}},i.$require=function(de){if(typeof g.require=="function"){var he="require";return g[he](de)}},i.setModuleLoader=function(de,he){i.dynamicModules[de]=he};var ue=function(){!ae.basePath&&!ae.workerPath&&!ae.modePath&&!ae.themePath&&!Object.keys(ae.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),ue=function(){})};i.version="1.43.5"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(r,i,g){r("./lib/fixoldbrowsers");var $=r("./config");$.setLoader(function(ae,oe){r([ae],function(le){oe(null,le)})});var V=function(){return this||typeof window<"u"&&window}();g.exports=function(ae){$.init=re,$.$require=r,ae.require=r},re(!0);function re(ae){if(!(!V||!V.document)){$.set("packaged",ae||r.packaged||g.packaged||V.define&&(void 0).packaged);var oe={},le="",ue=document.currentScript||document._currentScript,de=ue&&ue.ownerDocument||document;ue&&ue.src&&(le=ue.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var he=de.getElementsByTagName("script"),pe=0;pe<he.length;pe++){var _e=he[pe],Ce=_e.src||_e.getAttribute("src");if(Ce){for(var xe=_e.attributes,Ie=0,Ne=xe.length;Ie<Ne;Ie++){var Oe=xe[Ie];Oe.name.indexOf("data-ace-")===0&&(oe[ie(Oe.name.replace(/^data-ace-/,""))]=Oe.value)}var $e=Ce.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);$e&&(le=$e[1])}}le&&(oe.base=oe.base||le,oe.packaged=!0),oe.baseP
|
|
|
|
|
|
`?Dt=pe.end:kt<Fe.lastSelectionStart&&Fe.lastValue[kt-1]==" "?(Dt=pe.left,Lt=_e.option):kt<Fe.lastSelectionStart||kt==Fe.lastSelectionStart&&Fe.lastSelectionEnd!=Fe.lastSelectionStart&&kt==At?Dt=pe.left:At>Fe.lastSelectionEnd&&Fe.lastValue.slice(0,At).split(`
|
|
|
|
|
|
`).length>2?Dt=pe.down:At>Fe.lastSelectionEnd&&Fe.lastValue[At-1]==" "?(Dt=pe.right,Lt=_e.option):(At>Fe.lastSelectionEnd||At==Fe.lastSelectionEnd&&Fe.lastSelectionEnd!=Fe.lastSelectionStart&&kt==At)&&(Dt=pe.right),kt!==At&&(Lt|=_e.shift),Dt){var jt=Ve.onCommandKey({},Lt,Dt);if(!jt&&Ve.commands){Dt=pe.keyCodeToString(Dt);var hn=Ve.commands.findKeyCommand(Lt,Dt);hn&&Ve.execCommand(hn)}Fe.lastSelectionStart=kt,Fe.lastSelectionEnd=At,Fe.resetSelection("")}}};document.addEventListener("selectionchange",qe),Ve.on("destroy",function(){document.removeEventListener("selectionchange",qe)})},Oe.prototype.onContextMenuClose=function(){var $e=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){$e.tempStyle&&($e.text.style.cssText=$e.tempStyle,$e.tempStyle=""),$e.host.renderer.$isMousePressed=!1,$e.host.renderer.$keepTextAreaAtCursor&&$e.host.renderer.$moveTextAreaToCursor()},0)},Oe.prototype.$onContextMenu=function($e){this.host.textInput.onContextMenu($e),this.onContextMenuClose()},Oe.prototype.onKeyup=function($e){$e.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},Oe.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},Oe.prototype.onCompositionStart=function($e){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){$e.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var Ve=this.host.getSelectionRange();Ve.end.row=Ve.start.row,Ve.end.column=Ve.start.column,this.inComposition.markerRange=Ve,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},Oe.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var $e=this.text.value;this.sendText($e),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},Oe.prototype.onCompositionEnd=function($e){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),$e&&this.onInput())},Oe.prototype.onCut=function($e){this.doCopy($e,!0)},Oe.prototype.onCopy=function($e){this.doCopy($e,!1)},Oe.prototype.onPaste=function($e){var Ve=this.handleClipboardData($e);oe.pasteCancelled()||(typeof Ve=="string"?(Ve&&this.host.onPaste(Ve,$e),re.isIE&&setTimeout(this.resetSelection),$.preventDefault($e)):(this.text.value="",this.pasted=!0))},Oe.prototype.doCopy=function($e,Ve){var Ue=this,Fe=this.host.getCopyText();if(!Fe)return $.preventDefault($e);this.handleClipboardData($e,Fe)?(Ce&&(this.resetSelection(Fe),this.copied=Fe,setTimeout(function(){Ue.copied=!1},10)),Ve?this.host.onCut():this.host.onCopy(),$.preventDefault($e)):(this.copied=!0,this.text.value=Fe,this.text.select(),setTimeout(function(){Ue.copied=!1,Ue.resetSelection(),Ve?Ue.host.onCut():Ue.host.onCopy()}))},Oe.prototype.handleClipboardData=function($e,Ve,Ue){var Fe=$e.clipboardData||window.clipboardData;if(!(!Fe||le)){var ze=ue||Ue?"Text":"text/plain";try{
|
|
|
|
|
|
`:qe},Oe.prototype.onSelect=function($e){var Ve=this;if(!this.inComposition){var Ue=function(Fe){return Fe.selectionStart===0&&Fe.selectionEnd>=Ve.lastValue.length&&Fe.value===Ve.lastValue&&Ve.lastValue&&Fe.selectionEnd!==Ve.lastSelectionEnd};this.copied?this.copied=!1:Ue(this.text)?(this.host.selectAll(),this.resetSelection()):Ie&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},Oe.prototype.$resetSelectionIOS=function($e){if(!(!this.$isFocused||this.copied&&!$e||this.sendingText)){$e||($e="");var Ve=`
|
|
|
|
|
|
ab`+$e+`cde fg
|
|
|
|
|
|
`;Ve!=this.text.value&&(this.text.value=this.lastValue=Ve);var Ue=4,Fe=4+($e.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=Ue||this.lastSelectionEnd!=Fe)&&this.text.setSelectionRange(Ue,Fe),this.lastSelectionStart=Ue,this.lastSelectionEnd=Fe}},Oe.prototype.$resetSelection=function(){var $e=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var Ve=0,Ue=0,Fe="",ze=function(hn,vn){for(var _n=vn,wn=1;wn<=hn-$e.rowStart&&wn<2*$e.numberOfExtraLines+1;wn++)_n+=$e.host.session.getLine(hn-wn).length+1;return _n};if(this.host.session){var Pt=this.host.selection,qe=Pt.getRange(),Et=Pt.cursor.row;Et===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):Et===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(Et<this.rowStart-1||Et>this.rowEnd+1)&&(this.rowStart=Et>this.numberOfExtraLines?Et-this.numberOfExtraLines:0,this.rowEnd=Et>this.numberOfExtraLines?Et+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var kt=[],At=this.rowStart;At<=this.rowEnd;At++)kt.push(this.host.session.getLine(At));if(Fe=kt.join(`
|
|
|
|
|
|
`),Ve=ze(qe.start.row,qe.start.column),Ue=ze(qe.end.row,qe.end.column),qe.start.row<this.rowStart){var Dt=this.host.session.getLine(this.rowStart-1);Ve=qe.start.row<this.rowStart-1?0:Ve,Ue+=Dt.length+1,Fe=Dt+`
|
|
|
|
|
|
`+Fe}else if(qe.end.row>this.rowEnd){var Lt=this.host.session.getLine(this.rowEnd+1);Ue=qe.end.row>this.rowEnd+1?Lt.length:qe.end.column,Ue+=Fe.length+1,Fe=Fe+`
|
|
|
|
|
|
`+Lt}else Ie&&Et>0&&(Fe=`
|
|
|
|
|
|
`+Fe,Ue+=1,Ve+=1);Fe.length>he&&(Ve<he&&Ue<he?Fe=Fe.slice(0,he):(Fe=`
|
|
|
|
|
|
`,Ve==Ue?Ve=Ue=0:(Ve=0,Ue=1)));var jt=Fe+`
|
|
|
|
|
|
|
|
|
|
|
|
`;jt!=this.lastValue&&(this.text.value=this.lastValue=jt,this.lastSelectionStart=this.lastSelectionEnd=jt.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=Ue||this.lastSelectionStart!=Ve||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(Ve,Ue),this.lastSelectionStart=Ve,this.lastSelectionEnd=Ue}catch{}this.inComposition=!1}},Oe.prototype.setHost=function($e){this.host=$e},Oe.prototype.setNumberOfExtraLines=function($e){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,$e<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=$e},Oe.prototype.setAriaLabel=function(){var $e="";if(this.host.$textInputAriaLabel&&($e+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var Ve=this.host.session.selection.cursor.row;$e+=V("text-input.aria-label","Cursor at row $0",[Ve+1])}this.text.setAttribute("aria-label",$e)},Oe.prototype.setAriaOptions=function($e){$e.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",$e.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",$e.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),$e.role&&this.text.setAttribute("role",$e.role),$e.setLabel&&(this.text.setAttribute("aria-roledescription",V("text-input.aria-roledescription","editor")),this.setAriaLabel())},Oe.prototype.focus=function(){var $e=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||de||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var Ve=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var Ue=this.text.getBoundingClientRect().top!=0}catch{return}var Fe=[];if(Ue)for(var ze=this.text.parentElement;ze&&ze.nodeType==1;)Fe.push(ze),ze.setAttribute("ace_nocontext","true"),!ze.parentElement&&ze.getRootNode?ze=ze.getRootNode().host:ze=ze.parentElement;this.text.focus({preventScroll:!0}),Ue&&Fe.forEach(function(Pt){Pt.removeAttribute("ace_nocontext")}),setTimeout(function(){$e.text.style.position="",$e.text.style.top=="0px"&&($e.text.style.top=Ve)},0)},Oe.prototype.blur=function(){this.text.blur()},Oe.prototype.isFocused=function(){return this.$isFocused},Oe.prototype.setInputHandler=function($e){this.inputHandler=$e},Oe.prototype.getInputHandler=function(){return this.inputHandler},Oe.prototype.getElement=function(){return this.text},Oe.prototype.setCommandMode=function($e){this.commandMode=$e,this.text.readOnly=!1},Oe.prototype.setReadOnly=function($e){this.commandMode||(this.text.readOnly=$e)},Oe.prototype.setCopyWithEmptySelection=function($e){},Oe.prototype.onContextMenu=function($e){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:$e}),this.moveToMouse($e,!0)},Oe.prototype.moveToMouse=function($e,Ve){var Ue=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(Ve?"z-index:100000;":"")+(re.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var Fe=this.host.container.getBoundingClientRect(),ze=ie.computedStyle(this.host.container),Pt=Fe.top+(parseInt(ze.borderTopWidth)||0),qe=Fe.left+(parseInt(ze.borderLeftWidth)||0),Et=Fe.bottom-Pt-this.text.clientHeight-2,kt=function(At){ie.translate(Ue.text,At.clientX-qe-2,Math.min(At.clientY-Pt-2,Et))};kt($e),$e.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),re.isWin&&$.capture(this.host.container,kt,this.onContextMenuClose.bind(this)))},Oe.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},Oe}();i.TextInput=Ne,i.$setUserAgentForTests=function(Oe,$e){Ie=Oe,Ce=$e}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(r
|
|
|
|
|
|
`))&&(this.seenBidi=!0,this.currentRow=null)},ae.prototype.getDocumentRow=function(){var oe=0,le=this.session.$screenRowCache;if(le.length){var ue=this.session.$getRowCacheIndex(le,this.currentRow);ue>=0&&(oe=this.session.$docRowCache[ue])}return oe},ae.prototype.getSplitIndex=function(){var oe=0,le=this.session.$screenRowCache;if(le.length)for(var ue,de=this.session.$getRowCacheIndex(le,this.currentRow);this.currentRow-oe>0&&(ue=this.session.$getRowCacheIndex(le,this.currentRow-oe-1),ue===de);)de=ue,oe++;else oe=this.currentRow;return oe},ae.prototype.updateRowLine=function(oe,le){oe===void 0&&(oe=this.getDocumentRow());var ue=oe===this.session.getLength()-1,de=ue?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(oe),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var he=this.session.$wrapData[oe];he&&(le===void 0&&(le=this.getSplitIndex()),le>0&&he.length?(this.wrapIndent=he.indent,this.wrapOffset=this.wrapIndent*this.charWidths[$.L],this.line=le<he.length?this.line.substring(he[le-1],he[le]):this.line.substring(he[he.length-1])):this.line=this.line.substring(0,he[le]),le==he.length&&(this.line+=this.showInvisibles?de:$.DOT))}else this.line+=this.showInvisibles?de:$.DOT;var pe=this.session,_e=0,Ce;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(xe,Ie){return xe===" "||pe.isFullWidth(xe.charCodeAt(0))?(Ce=xe===" "?pe.getScreenTabSize(Ie+_e):2,_e+=Ce-1,V.stringRepeat($.DOT,Ce)):xe}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==$.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},ae.prototype.updateBidiMap=function(){var oe=[];$.hasBidiCharacters(this.line,oe)||this.isRtlDir?this.bidiMap=$.doBidiReorder(this.line,oe,this.isRtlDir):this.bidiMap={}},ae.prototype.markAsDirty=function(){this.currentRow=null},ae.prototype.updateCharacterWidths=function(oe){if(this.characterWidth!==oe.$characterSize.width){this.fontMetrics=oe;var le=this.characterWidth=oe.$characterSize.width,ue=oe.$measureCharWidth("ה");this.charWidths[$.L]=this.charWidths[$.EN]=this.charWidths[$.ON_R]=le,this.charWidths[$.R]=this.charWidths[$.AN]=ue,this.charWidths[$.R_H]=ue*.45,this.charWidths[$.B]=this.charWidths[$.RLE]=0,this.currentRow=null}},ae.prototype.setShowInvisibles=function(oe){this.showInvisibles=oe,this.currentRow=null},ae.prototype.setEolChar=function(oe){this.EOL=oe},ae.prototype.setContentWidth=function(oe){this.contentWidth=oe},ae.prototype.isRtlLine=function(oe){return this.$isRtl?!0:oe!=null?this.session.getLine(oe).charAt(0)==this.RLE:this.isRtlDir},ae.prototype.setRtlDirection=function(oe,le){for(var ue=oe.getCursorPosition(),de=oe.selection.getSelectionAnchor().row;de<=ue.row;de++)!le&&oe.session.getLine(de).charAt(0)===oe.session.$bidiHandler.RLE?oe.session.doc.removeInLine(de,0,1):le&&oe.session.getLine(de).charAt(0)!==oe.session.$bidiHandler.RLE&&oe.session.doc.insert({column:0,row:de},oe.session.$bidiHandler.RLE)},ae.prototype.getPosLeft=function(oe){oe-=this.wrapIndent;var le=this.line.charAt(0)===this.RLE?1:0,ue=oe>le?this.session.getOverwrite()?oe:oe-1:le,de=$.getVisualFromLogicalIdx(ue,this.bidiMap),he=this.bidiMap.bidiLevels,pe=0;!this.session.getOverwrite()&&oe<=le&&he[de]%2!==0&&de++;for(var _e=0;_e<de;_e++)pe+=this.charWidths[he[_e]];return!this.session.getOverwrite()&&oe>le&&he[de]%2===0&&(pe+=this.charWidths[he[de]]),this.wrapIndent&&(pe+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(pe+=this.rtlLineOffset),pe},ae.prototype.getSelections=function(oe,le){var ue=this.bidiMap,de=ue.bidiLevels,he,pe=[],_e=0,Ce=Math.min(oe,le)-this.wrapIndent,xe=Math.max(oe,le)-this.wrapIndent,Ie=!1,Ne=!1,Oe=0;this.wrapIndent&&(_e+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var $e,Ve=0;Ve<de.length;Ve++)$e=ue.logicalFromVisual[Ve],he=de[Ve],Ie=$e>=Ce&&$e<xe,Ie&&!Ne?Oe=_e:!Ie&&Ne&&pe.push({left:Oe,width:_e-Oe}),_e+=this.charWidths[he],Ne=Ie;if(Ie&&Ve===de.length&&pe.push({left:Oe,width:_e-Oe}),th
|
|
|
|
|
|
`||$e==`\r
|
|
|
|
|
|
`){he(Ne);var At="";_e.isMaybeInsertedClosing(Ve,Ue)&&(At=ie.stringRepeat("}",le.maybeInsertedBrackets),_e.clearMaybeInsertedClosing());var Et=Ue.substring(Ve.column,Ve.column+1);if(Et==="}"){var Dt=Oe.findMatchingBracket({row:Ve.row,column:Ve.column+1},"}");if(!Dt)return null;var Lt=this.$getIndent(Oe.getLine(Dt.row))}else if(At)var Lt=this.$getIndent(Ue);else{_e.clearMaybeInsertedClosing();return}var jt=Lt+Oe.getTabString();return{text:`
|
|
|
|
|
|
`+jt+`
|
|
|
|
|
|
`+Lt+At,selection:[1,jt.length,1,jt.length]}}else _e.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(xe,Ie,Ne,Oe,$e){var Ve=Oe.doc.getTextRange($e);if(!$e.isMultiLine()&&Ve=="{"){he(Ne);var Ue=Oe.doc.getLine($e.start.row),Fe=Ue.substring($e.end.column,$e.end.column+1);if(Fe=="}")return $e.end.column++,$e;le.maybeInsertedBrackets--}}),this.add("parens","insertion",function(xe,Ie,Ne,Oe,$e){if($e=="("){he(Ne);var Ve=Ne.getSelectionRange(),Ue=Oe.doc.getTextRange(Ve);if(Ue!==""&&Ne.getWrapBehavioursEnabled())return pe(Ve,Ue,"(",")");if(_e.isSaneInsertion(Ne,Oe))return _e.recordAutoInsert(Ne,Oe,")"),{text:"()",selection:[1,1]}}else if($e==")"){he(Ne);var Fe=Ne.getCursorPosition(),ze=Oe.doc.getLine(Fe.row),Pt=ze.substring(Fe.column,Fe.column+1);if(Pt==")"){var qe=Oe.$findOpeningBracket(")",{column:Fe.column+1,row:Fe.row});if(qe!==null&&_e.isAutoInsertedClosing(Fe,ze,$e))return _e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(xe,Ie,Ne,Oe,$e){var Ve=Oe.doc.getTextRange($e);if(!$e.isMultiLine()&&Ve=="("){he(Ne);var Ue=Oe.doc.getLine($e.start.row),Fe=Ue.substring($e.start.column+1,$e.start.column+2);if(Fe==")")return $e.end.column++,$e}}),this.add("brackets","insertion",function(xe,Ie,Ne,Oe,$e){if($e=="["){he(Ne);var Ve=Ne.getSelectionRange(),Ue=Oe.doc.getTextRange(Ve);if(Ue!==""&&Ne.getWrapBehavioursEnabled())return pe(Ve,Ue,"[","]");if(_e.isSaneInsertion(Ne,Oe))return _e.recordAutoInsert(Ne,Oe,"]"),{text:"[]",selection:[1,1]}}else if($e=="]"){he(Ne);var Fe=Ne.getCursorPosition(),ze=Oe.doc.getLine(Fe.row),Pt=ze.substring(Fe.column,Fe.column+1);if(Pt=="]"){var qe=Oe.$findOpeningBracket("]",{column:Fe.column+1,row:Fe.row});if(qe!==null&&_e.isAutoInsertedClosing(Fe,ze,$e))return _e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(xe,Ie,Ne,Oe,$e){var Ve=Oe.doc.getTextRange($e);if(!$e.isMultiLine()&&Ve=="["){he(Ne);var Ue=Oe.doc.getLine($e.start.row),Fe=Ue.substring($e.start.column+1,$e.start.column+2);if(Fe=="]")return $e.end.column++,$e}}),this.add("string_dquotes","insertion",function(xe,Ie,Ne,Oe,$e){var Ve=Oe.$mode.$quotes||de;if($e.length==1&&Ve[$e]){if(this.lineCommentStart&&this.lineCommentStart.indexOf($e)!=-1)return;he(Ne);var Ue=$e,Fe=Ne.getSelectionRange(),ze=Oe.doc.getTextRange(Fe);if(ze!==""&&(ze.length!=1||!Ve[ze])&&Ne.getWrapBehavioursEnabled())return pe(Fe,ze,Ue,Ue);if(!ze){var Pt=Ne.getCursorPosition(),qe=Oe.doc.getLine(Pt.row),Et=qe.substring(Pt.column-1,Pt.column),kt=qe.substring(Pt.column,Pt.column+1),At=Oe.getTokenAt(Pt.row,Pt.column),Dt=Oe.getTokenAt(Pt.row,Pt.column+1);if(Et=="\\"&&At&&/escape/.test(At.type))return null;var Lt=At&&/string|escape/.test(At.type),jt=!Dt||/string|escape/.test(Dt.type),hn;if(kt==Ue)hn=Lt!==jt,hn&&/string\.end/.test(Dt.type)&&(hn=!1);else{if(Lt&&!jt||Lt&&jt)return null;var vn=Oe.$mode.tokenRe;vn.lastIndex=0;var _n=vn.test(Et);vn.lastIndex=0;var wn=vn.test(kt),bn=Oe.$mode.$pairQuotesAfter,Cn=bn&&bn[Ue]&&bn[Ue].test(Et);if(!Cn&&_n||wn||kt&&!/[\s;,.})\]\\]/.test(kt))return null;var Sn=qe[Pt.column-2];if(Et==Ue&&(Sn==Ue||vn.test(Sn)))return null;hn=!0}return{text:hn?Ue+Ue:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(xe,Ie,Ne,Oe,$e){var Ve=Oe.$mode.$quotes||de,Ue=Oe.doc.getTextRange($e);if(!$e.isMultiLine()&&Ve.hasOwnProperty(Ue)){he(Ne);var Fe=Oe.doc.getLine($e.start.row),ze=Fe.substring($e.start.column+1,$e.start.column+2);if(ze==Ue)return $e.end.column++,$e}}),Ce.closeDocComment!==!1&&this.add("doc comment end","insertion",function(xe,Ie,Ne,Oe,$e){if(xe==="doc-start"&&($e===`
|
|
|
|
|
|
`||$e===`\r
|
|
|
|
|
|
`)&&Ne.selection.isEmpty()){var Ve=Ne.getCursorPosition();if(Ve.column===0)return;for(var Ue=Oe.doc.getLine(Ve.row),Fe=Oe.doc.getLine(Ve.row+1),ze=Oe.getTokens(Ve.row),Pt=0,qe=0;qe<ze.length;qe++){Pt+=ze[qe].value.length;var Et=ze[qe];if(Pt>=Ve.column){if(Pt===Ve.column){if(!/\.doc/.test(Et.type))return;if(/\*\//.test(Et.value)){var kt=ze[qe+1];if(!kt||!/\.doc/.test(kt.type))return}}var At=Ve.column-(Pt-Et.value.length),Dt=Et.value.indexOf("*/"),Lt=Et.value.indexOf("/**",Dt>-1?Dt+2:0);if(Lt!==-1&&At>Lt&&At<Lt+3||Dt!==-1&&Lt!==-1&&At>=Dt&&At<=Lt||!/\.doc/.test(Et.type))return;break}}var jt=this.$getIndent(Ue);if(/\s*\*/.test(Fe))return/^\s*\*/.test(Ue)?{text:$e+jt+"* ",selection:[1,2+jt.length,1,2+jt.length]}:{text:$e+jt+" * ",selection:[1,3+jt.length,1,3+jt.length]};if(/\/\*\*/.test(Ue.substring(0,Ve.column)))return{text:$e+jt+" * "+$e+" "+jt+"*/",selection:[1,4+jt.length,1,4+jt.length]}}})},_e.isSaneInsertion=function(Ce,xe){var Ie=Ce.getCursorPosition(),Ne=new re(xe,Ie.row,Ie.column);if(!this.$matchTokenType(Ne.getCurrentToken()||"text",ae)){if(/[)}\]]/.test(Ce.session.getLine(Ie.row)[Ie.column]))return!0;var Oe=new re(xe,Ie.row,Ie.column+1);if(!this.$matchTokenType(Oe.getCurrentToken()||"text",ae))return!1}return Ne.stepForward(),Ne.getCurrentTokenRow()!==Ie.row||this.$matchTokenType(Ne.getCurrentToken()||"text",oe)},_e.$matchTokenType=function(Ce,xe){return xe.indexOf(Ce.type||Ce)>-1},_e.recordAutoInsert=function(Ce,xe,Ie){var Ne=Ce.getCursorPosition(),Oe=xe.doc.getLine(Ne.row);this.isAutoInsertedClosing(Ne,Oe,le.autoInsertedLineEnd[0])||(le.autoInsertedBrackets=0),le.autoInsertedRow=Ne.row,le.autoInsertedLineEnd=Ie+Oe.substr(Ne.column),le.autoInsertedBrackets++},_e.recordMaybeInsert=function(Ce,xe,Ie){var Ne=Ce.getCursorPosition(),Oe=xe.doc.getLine(Ne.row);this.isMaybeInsertedClosing(Ne,Oe)||(le.maybeInsertedBrackets=0),le.maybeInsertedRow=Ne.row,le.maybeInsertedLineStart=Oe.substr(0,Ne.column)+Ie,le.maybeInsertedLineEnd=Oe.substr(Ne.column),le.maybeInsertedBrackets++},_e.isAutoInsertedClosing=function(Ce,xe,Ie){return le.autoInsertedBrackets>0&&Ce.row===le.autoInsertedRow&&Ie===le.autoInsertedLineEnd[0]&&xe.substr(Ce.column)===le.autoInsertedLineEnd},_e.isMaybeInsertedClosing=function(Ce,xe){return le.maybeInsertedBrackets>0&&Ce.row===le.maybeInsertedRow&&xe.substr(Ce.column)===le.maybeInsertedLineEnd&&xe.substr(0,Ce.column)==le.maybeInsertedLineStart},_e.popAutoInsertedClosing=function(){le.autoInsertedLineEnd=le.autoInsertedLineEnd.substr(1),le.autoInsertedBrackets--},_e.clearMaybeInsertedClosing=function(){le&&(le.maybeInsertedBrackets=0,le.maybeInsertedRow=-1)},$.inherits(_e,V),i.CstyleBehaviour=_e}),ace.define("ace/unicode",["require","exports","module"],function(r,i,g){for(var $=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,
|
|
|
|
|
|
`,this._signal("changeNewLineMode")},le.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
|
|
|
|
|
`;case"unix":return`
|
|
|
|
|
|
`;default:return this.$autoNewLine||`
|
|
|
|
|
|
`}},le.prototype.setNewLineMode=function(ue){this.$newLineMode!==ue&&(this.$newLineMode=ue,this._signal("changeNewLineMode"))},le.prototype.getNewLineMode=function(){return this.$newLineMode},le.prototype.isNewLine=function(ue){return ue==`\r
|
|
|
|
|
|
`||ue=="\r"||ue==`
|
|
|
|
|
|
`},le.prototype.getLine=function(ue){return this.$lines[ue]||""},le.prototype.getLines=function(ue,de){return this.$lines.slice(ue,de+1)},le.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},le.prototype.getLength=function(){return this.$lines.length},le.prototype.getTextRange=function(ue){return this.getLinesForRange(ue).join(this.getNewLineCharacter())},le.prototype.getLinesForRange=function(ue){var de;if(ue.start.row===ue.end.row)de=[this.getLine(ue.start.row).substring(ue.start.column,ue.end.column)];else{de=this.getLines(ue.start.row,ue.end.row),de[0]=(de[0]||"").substring(ue.start.column);var he=de.length-1;ue.end.row-ue.start.row==he&&(de[he]=de[he].substring(0,ue.end.column))}return de},le.prototype.insertLines=function(ue,de){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(ue,de)},le.prototype.removeLines=function(ue,de){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(ue,de)},le.prototype.insertNewLine=function(ue){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(ue,["",""])},le.prototype.insert=function(ue,de){return this.getLength()<=1&&this.$detectNewLine(de),this.insertMergedLines(ue,this.$split(de))},le.prototype.insertInLine=function(ue,de){var he=this.clippedPos(ue.row,ue.column),pe=this.pos(ue.row,ue.column+de.length);return this.applyDelta({start:he,end:pe,action:"insert",lines:[de]},!0),this.clonePos(pe)},le.prototype.clippedPos=function(ue,de){var he=this.getLength();ue===void 0?ue=he:ue<0?ue=0:ue>=he&&(ue=he-1,de=void 0);var pe=this.getLine(ue);return de==null&&(de=pe.length),de=Math.min(Math.max(de,0),pe.length),{row:ue,column:de}},le.prototype.clonePos=function(ue){return{row:ue.row,column:ue.column}},le.prototype.pos=function(ue,de){return{row:ue,column:de}},le.prototype.$clipPosition=function(ue){var de=this.getLength();return ue.row>=de?(ue.row=Math.max(0,de-1),ue.column=this.getLine(de-1).length):(ue.row=Math.max(0,ue.row),ue.column=Math.min(Math.max(ue.column,0),this.getLine(ue.row).length)),ue},le.prototype.insertFullLines=function(ue,de){ue=Math.min(Math.max(ue,0),this.getLength());var he=0;ue<this.getLength()?(de=de.concat([""]),he=0):(de=[""].concat(de),ue--,he=this.$lines[ue].length),this.insertMergedLines({row:ue,column:he},de)},le.prototype.insertMergedLines=function(ue,de){var he=this.clippedPos(ue.row,ue.column),pe={row:he.row+de.length-1,column:(de.length==1?he.column:0)+de[de.length-1].length};return this.applyDelta({start:he,end:pe,action:"insert",lines:de}),this.clonePos(pe)},le.prototype.remove=function(ue){var de=this.clippedPos(ue.start.row,ue.start.column),he=this.clippedPos(ue.end.row,ue.end.column);return this.applyDelta({start:de,end:he,action:"remove",lines:this.getLinesForRange({start:de,end:he})}),this.clonePos(de)},le.prototype.removeInLine=function(ue,de,he){var pe=this.clippedPos(ue,de),_e=this.clippedPos(ue,he);return this.applyDelta({start:pe,end:_e,action:"remove",lines:this.getLinesForRange({start:pe,end:_e})},!0),this.clonePos(pe)},le.prototype.removeFullLines=function(ue,de){ue=Math.min(Math.max(0,ue),this.getLength()-1),de=Math.min(Math.max(0,de),this.getLength()-1);var he=de==this.getLength()-1&&ue>0,pe=de<this.getLength()-1,_e=he?ue-1:ue,Ce=he?this.getLine(_e).length:0,xe=pe?de+1:de,Ie=pe?0:this.getLine(xe).length,Ne=new ie(_e,Ce,xe,Ie),Oe=this.$lines.slice(ue,de+1);return this.applyDelta({start:Ne.start,end:Ne.end,action:"remove",lines:this.getLinesForRange(Ne)}),Oe},le.prototype.removeNewLine=function(ue){ue<this.getLength()-1&&ue>=0&&this.applyDelta({start:this.pos(ue,this.getLine(ue).length),end:this.pos(ue+1,0),action:"remove",lines:["",""]})},le.prototype.replace=function(ue,de){if(ue instanceof ie||(ue=ie.fromPoints(ue.start,ue.end)),de.length===0&&ue.isEmpty())return ue.start;if(de==this.getTextRange(ue))return ue.end;this.remove(ue);var he;return de?he=this.insert(ue.start,de):h
|
|
|
|
|
|
---
|
|
|
|
|
|
`+le(this.$redoStack)},Oe}();$.prototype.hasUndo=$.prototype.canUndo,$.prototype.hasRedo=$.prototype.canRedo,$.prototype.isClean=$.prototype.isAtBookmark,$.prototype.markClean=$.prototype.bookmark;function V(Oe,$e){for(var Ve=$e;Ve--;){var Ue=Oe[Ve];if(Ue&&!Ue[0].ignore){for(;Ve<$e-1;){var Fe=he(Oe[Ve],Oe[Ve+1]);Oe[Ve]=Fe[0],Oe[Ve+1]=Fe[1],Ve++}return!0}}}var re=r("./range").Range,ie=re.comparePoints;re.comparePoints;function ae(Oe){return{row:Oe.row,column:Oe.column}}function oe(Oe){return{start:ae(Oe.start),end:ae(Oe.end),action:Oe.action,lines:Oe.lines.slice()}}function le(Oe){if(Oe=Oe||this,Array.isArray(Oe))return Oe.map(le).join(`
|
|
|
|
|
|
`);var $e="";return Oe.action?($e=Oe.action=="insert"?"+":"-",$e+="["+Oe.lines+"]"):Oe.value&&(Array.isArray(Oe.value)?$e=Oe.value.map(ue).join(`
|
|
|
|
|
|
`):$e=ue(Oe.value)),Oe.start&&($e+=ue(Oe)),(Oe.id||Oe.rev)&&($e+=" ("+(Oe.id||Oe.rev)+")"),$e}function ue(Oe){return Oe.start.row+":"+Oe.start.column+"=>"+Oe.end.row+":"+Oe.end.column}function de(Oe,$e){var Ve=Oe.action=="insert",Ue=$e.action=="insert";if(Ve&&Ue)if(ie($e.start,Oe.end)>=0)_e($e,Oe,-1);else if(ie($e.start,Oe.start)<=0)_e(Oe,$e,1);else return null;else if(Ve&&!Ue)if(ie($e.start,Oe.end)>=0)_e($e,Oe,-1);else if(ie($e.end,Oe.start)<=0)_e(Oe,$e,-1);else return null;else if(!Ve&&Ue)if(ie($e.start,Oe.start)>=0)_e($e,Oe,1);else if(ie($e.start,Oe.start)<=0)_e(Oe,$e,1);else return null;else if(!Ve&&!Ue)if(ie($e.start,Oe.start)>=0)_e($e,Oe,1);else if(ie($e.end,Oe.start)<=0)_e(Oe,$e,-1);else return null;return[$e,Oe]}function he(Oe,$e){for(var Ve=Oe.length;Ve--;)for(var Ue=0;Ue<$e.length;Ue++)if(!de(Oe[Ve],$e[Ue])){for(;Ve<Oe.length;){for(;Ue--;)de($e[Ue],Oe[Ve]);Ue=$e.length,Ve++}return[Oe,$e]}return Oe.selectionBefore=$e.selectionBefore=Oe.selectionAfter=$e.selectionAfter=null,[$e,Oe]}function pe(Oe,$e){var Ve=Oe.action=="insert",Ue=$e.action=="insert";if(Ve&&Ue)ie(Oe.start,$e.start)<0?_e($e,Oe,1):_e(Oe,$e,1);else if(Ve&&!Ue)ie(Oe.start,$e.end)>=0?_e(Oe,$e,-1):(ie(Oe.start,$e.start)<=0||_e(Oe,re.fromPoints($e.start,Oe.start),-1),_e($e,Oe,1));else if(!Ve&&Ue)ie($e.start,Oe.end)>=0?_e($e,Oe,-1):(ie($e.start,Oe.start)<=0||_e($e,re.fromPoints(Oe.start,$e.start),-1),_e(Oe,$e,1));else if(!Ve&&!Ue)if(ie($e.start,Oe.end)>=0)_e($e,Oe,-1);else if(ie($e.end,Oe.start)<=0)_e(Oe,$e,-1);else{var Fe,ze;return ie(Oe.start,$e.start)<0&&(Fe=Oe,Oe=xe(Oe,$e.start)),ie(Oe.end,$e.end)>0&&(ze=xe(Oe,$e.end)),Ce($e.end,Oe.start,Oe.end,-1),ze&&!Fe&&(Oe.lines=ze.lines,Oe.start=ze.start,Oe.end=ze.end,ze=Oe),[$e,Fe,ze].filter(Boolean)}return[$e,Oe]}function _e(Oe,$e,Ve){Ce(Oe.start,$e.start,$e.end,Ve),Ce(Oe.end,$e.start,$e.end,Ve)}function Ce(Oe,$e,Ve,Ue){Oe.row==(Ue==1?$e:Ve).row&&(Oe.column+=Ue*(Ve.column-$e.column)),Oe.row+=Ue*(Ve.row-$e.row)}function xe(Oe,$e){var Ve=Oe.lines,Ue=Oe.end;Oe.end=ae($e);var Fe=Oe.end.row-Oe.start.row,ze=Ve.splice(Fe,Ve.length),Pt=Fe?$e.column:$e.column-Oe.start.column;Ve.push(ze[0].substring(0,Pt)),ze[0]=ze[0].substr(Pt);var qe={start:ae($e),end:Ue,lines:ze,action:Oe.action};return qe}function Ie(Oe,$e){$e=oe($e);for(var Ve=Oe.length;Ve--;){for(var Ue=Oe[Ve],Fe=0;Fe<Ue.length;Fe++){var ze=Ue[Fe],Pt=pe(ze,$e);$e=Pt[0],Pt.length!=2&&(Pt[2]?(Ue.splice(Fe+1,1,Pt[1],Pt[2]),Fe++):Pt[1]||(Ue.splice(Fe,1),Fe--))}Ue.length||Oe.splice(Ve,1)}return Oe}function Ne(Oe,$e){for(var Ve=0;Ve<$e.length;Ve++)for(var Ue=$e[Ve],Fe=0;Fe<Ue.length;Fe++)Ie(Oe,Ue[Fe])}i.UndoManager=$}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(r,i,g){var $=r("../range").Range,V=function(){function re(ie,ae){this.foldData=ie,Array.isArray(ae)?this.folds=ae:ae=this.folds=[ae];var oe=ae[ae.length-1];this.range=new $(ae[0].start.row,ae[0].start.column,oe.end.row,oe.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(le){le.setFoldLine(this)},this)}return re.prototype.shiftRow=function(ie){this.start.row+=ie,this.end.row+=ie,this.folds.forEach(function(ae){ae.start.row+=ie,ae.end.row+=ie})},re.prototype.addFold=function(ie){if(ie.sameRow){if(ie.start.row<this.startRow||ie.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(ie),this.folds.sort(function(ae,oe){return-ae.range.compareEnd(oe.start.row,oe.start.column)}),this.range.compareEnd(ie.start.row,ie.start.column)>0?(this.end.row=ie.end.row,this.end.column=ie.end.column):this.range.compareStart(ie.end.row,ie.end.column)<0&&(this.start.row=ie.start.row,this.start.column=ie.start.column)}else if(ie.start.row==this.end.row)this.folds.push(ie),this.end.row=ie.end.row,this.end.column=ie.end.column;else if(ie.end.row==this.start.row)this.folds.unshift(ie),this.start.row=ie.start.row,this.start.column=ie.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");ie.foldLine=this},re.prototype.containsRow=function(ie){return
|
|
|
|
|
|
`)},re.prototype.idxToPosition=function(ie){for(var ae=0,oe=0;oe<this.folds.length;oe++){var le=this.folds[oe];if(ie-=le.start.column-ae,ie<0)return{row:le.start.row,column:le.start.column+ie};if(ie-=le.placeholder.length,ie<0)return le.start;ae=le.end.column}return{row:this.end.row,column:this.end.column+ie}},re}();i.FoldLine=V}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(r,i,g){var $=r("./range").Range,V=$.comparePoints,re=function(){function ie(){this.ranges=[],this.$bias=1}return ie.prototype.pointIndex=function(ae,oe,le){for(var ue=this.ranges,de=le||0;de<ue.length;de++){var he=ue[de],pe=V(ae,he.end);if(!(pe>0)){var _e=V(ae,he.start);return pe===0?oe&&_e!==0?-de-2:de:_e>0||_e===0&&!oe?de:-de-1}}return-de-1},ie.prototype.add=function(ae){var oe=!ae.isEmpty(),le=this.pointIndex(ae.start,oe);le<0&&(le=-le-1);var ue=this.pointIndex(ae.end,oe,le);return ue<0?ue=-ue-1:ue++,this.ranges.splice(le,ue-le,ae)},ie.prototype.addList=function(ae){for(var oe=[],le=ae.length;le--;)oe.push.apply(oe,this.add(ae[le]));return oe},ie.prototype.substractPoint=function(ae){var oe=this.pointIndex(ae);if(oe>=0)return this.ranges.splice(oe,1)},ie.prototype.merge=function(){var ae=[],oe=this.ranges;oe=oe.sort(function(pe,_e){return V(pe.start,_e.start)});for(var le=oe[0],ue,de=1;de<oe.length;de++){ue=le,le=oe[de];var he=V(ue.end,le.start);he<0||he==0&&!ue.isEmpty()&&!le.isEmpty()||(V(ue.end,le.end)<0&&(ue.end.row=le.end.row,ue.end.column=le.end.column),oe.splice(de,1),ae.push(le),le=ue,de--)}return this.ranges=oe,ae},ie.prototype.contains=function(ae,oe){return this.pointIndex({row:ae,column:oe})>=0},ie.prototype.containsPoint=function(ae){return this.pointIndex(ae)>=0},ie.prototype.rangeAtPoint=function(ae){var oe=this.pointIndex(ae);if(oe>=0)return this.ranges[oe]},ie.prototype.clipRows=function(ae,oe){var le=this.ranges;if(le[0].start.row>oe||le[le.length-1].start.row<ae)return[];var ue=this.pointIndex({row:ae,column:0});ue<0&&(ue=-ue-1);var de=this.pointIndex({row:oe,column:0},ue);de<0&&(de=-de-1);for(var he=[],pe=ue;pe<de;pe++)he.push(le[pe]);return he},ie.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},ie.prototype.attach=function(ae){this.session&&this.detach(),this.session=ae,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},ie.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},ie.prototype.$onChange=function(ae){for(var oe=ae.start,le=ae.end,ue=oe.row,de=le.row,he=this.ranges,pe=0,_e=he.length;pe<_e;pe++){var Ce=he[pe];if(Ce.end.row>=ue)break}if(ae.action=="insert")for(var xe=de-ue,Ie=-oe.column+le.column;pe<_e;pe++){var Ce=he[pe];if(Ce.start.row>ue)break;if(Ce.start.row==ue&&Ce.start.column>=oe.column&&(Ce.start.column==oe.column&&this.$bias<=0||(Ce.start.column+=Ie,Ce.start.row+=xe)),Ce.end.row==ue&&Ce.end.column>=oe.column){if(Ce.end.column==oe.column&&this.$bias<0)continue;Ce.end.column==oe.column&&Ie>0&&pe<_e-1&&Ce.end.column>Ce.start.column&&Ce.end.column==he[pe+1].start.column&&(Ce.end.column-=Ie),Ce.end.column+=Ie,Ce.end.row+=xe}}else for(var xe=ue-de,Ie=oe.column-le.column;pe<_e;pe++){var Ce=he[pe];if(Ce.start.row>de)break;Ce.end.row<de&&(ue<Ce.end.row||ue==Ce.end.row&&oe.column<Ce.end.column)?(Ce.end.row=ue,Ce.end.column=oe.column):Ce.end.row==de?Ce.end.column<=le.column?(xe||Ce.end.column>oe.column)&&(Ce.end.column=oe.column,Ce.end.row=oe.row):(Ce.end.column+=Ie,Ce.end.row+=xe):Ce.end.row>de&&(Ce.end.row+=xe),Ce.start.row<de&&(ue<Ce.start.row||ue==Ce.start.row&&oe.column<Ce.start.column)?(Ce.start.row=ue,Ce.start.column=oe.column):Ce.start.row==de?Ce.start.column<=le.column?(xe||Ce.start.column>oe.column)&&(Ce.start.column=oe.column,Ce.start.row=oe.row):(Ce.start.column+=Ie,Ce.start.row+=xe):Ce.start.row>de&&(Ce.start.row+=xe)}if(xe!=0&&pe<_e)for(;pe<_e;pe++){var Ce=he[pe];Ce.start.row+=xe,Ce.end.row+=xe}},ie}();re.prototype.comparePoints=V,i.RangeList=re}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(r,i,g){var $=
|
|
|
|
|
|
`)},this.$gutterCustomWidgets={},this.bgTokenizer=new pe(new le().getTokenizer(),this);var At=this;this.bgTokenizer.on("update",function(Dt){At._signal("tokenizerUpdate",Dt)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof Et!="object"||!Et.getLine)&&(Et=new he(Et)),this.setDocument(Et),this.selection=new oe(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new re(this),ie.resetOptions(this),this.setMode(kt),ie._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return qe.prototype.$initOperationListeners=function(){var Et=this;this.curOp=null,this.on("change",function(){Et.curOp||(Et.startOperation(),Et.curOp.selectionBefore=Et.$lastSel),Et.curOp.docChanged=!0},!0),this.on("changeSelection",function(){Et.curOp||(Et.startOperation(),Et.curOp.selectionBefore=Et.$lastSel),Et.curOp.selectionChanged=!0},!0),this.$operationResetTimer=V.delayedCall(this.endOperation.bind(this,!0))},qe.prototype.startOperation=function(Et){if(this.curOp){if(!Et||this.curOp.command)return;this.prevOp=this.curOp}Et||(Et={}),this.$operationResetTimer.schedule(),this.curOp={command:Et.command||{},args:Et.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",Et)},qe.prototype.endOperation=function(Et){if(this.curOp){if(Et&&Et.returnValue===!1){this.curOp=null,this._signal("endOperation",Et);return}if(Et==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var kt=this.selection.toJSON();this.curOp.selectionAfter=kt,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(kt),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",Et)}},qe.prototype.setDocument=function(Et){this.doc&&this.doc.off("change",this.$onChange),this.doc=Et,Et.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},qe.prototype.getDocument=function(){return this.doc},Object.defineProperty(qe.prototype,"widgetManager",{get:function(){var Et=new de(this);return this.widgetManager=Et,this.$editor&&Et.attach(this.$editor),Et},set:function(Et){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:Et})},enumerable:!1,configurable:!0}),qe.prototype.$resetRowCache=function(Et){if(!Et){this.$docRowCache=[],this.$screenRowCache=[];return}var kt=this.$docRowCache.length,At=this.$getRowCacheIndex(this.$docRowCache,Et)+1;kt>At&&(this.$docRowCache.splice(At,kt),this.$screenRowCache.splice(At,kt))},qe.prototype.$getRowCacheIndex=function(Et,kt){for(var At=0,Dt=Et.length-1;At<=Dt;){var Lt=At+Dt>>1,jt=Et[Lt];if(kt>jt)At=Lt+1;else if(kt<jt)Dt=Lt-1;else return Lt}return At-1},qe.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},qe.prototype.onChangeFold=function(Et){var kt=Et.data;this.$resetRowCache(kt.start.row)},qe.prototype.onChange=function(Et){this.$modified=!0,this.$bidiHandler.onChange(Et),this.$resetRowCache(Et.start.row);var kt=this.$updateInternalDataOnChange(Et);!this.$fromUndo&&this.$undoManager&&(kt&&kt.length&&(this.$undoManager.add({action:"removeFolds",folds:kt},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(Et,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(Et),this._signal("change",Et)},qe.prototype.onSelectionChange=function(){this._signal("changeSelection")},qe.prototype.setValue=function(Et){this.doc.setValue(Et),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},qe.fromJSON=function(Et){typeof Et=="string"&&(Et=JSON.parse(Et));var kt=new Ce;kt.$undoStack=Et.history.undo,kt.$redoStack=Et.history.redo,kt.mark=Et.history.mark,kt.$rev=Et.history.rev;var At=new qe(Et.value);return Et.folds.forEach(function(Dt
|
|
|
|
|
|
`},qe.prototype.getWordRange=function(Et,kt){var At=this.getLine(Et),Dt=!1;if(kt>0&&(Dt=!!At.charAt(kt-1).match(this.tokenRe)),Dt||(Dt=!!At.charAt(kt).match(this.tokenRe)),Dt)var Lt=this.tokenRe;else if(/^\s+$/.test(At.slice(kt-1,kt+1)))var Lt=/\s/;else var Lt=this.nonTokenRe;var jt=kt;if(jt>0){do jt--;while(jt>=0&&At.charAt(jt).match(Lt));jt++}for(var hn=kt;hn<At.length&&At.charAt(hn).match(Lt);)hn++;return new ue(Et,jt,Et,hn)},qe.prototype.getAWordRange=function(Et,kt){for(var At=this.getWordRange(Et,kt),Dt=this.getLine(At.end.row);Dt.charAt(At.end.column).match(/[ \t]/);)At.end.column+=1;return At},qe.prototype.setNewLineMode=function(Et){this.doc.setNewLineMode(Et)},qe.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},qe.prototype.setUseWorker=function(Et){this.setOption("useWorker",Et)},qe.prototype.getUseWorker=function(){return this.$useWorker},qe.prototype.onReloadTokenizer=function(Et){var kt=Et.data;this.bgTokenizer.start(kt.first),this._signal("tokenizerUpdate",Et)},qe.prototype.setMode=function(Et,kt){if(Et&&typeof Et=="object"){if(Et.getTokenizer)return this.$onChangeMode(Et);var At=Et,Dt=At.path}else Dt=Et||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new le),this.$modes[Dt]&&!At){this.$onChangeMode(this.$modes[Dt]),kt&&kt();return}this.$modeId=Dt,ie.loadModule(["mode",Dt],(function(Lt){if(!this.destroyed){if(this.$modeId!==Dt)return kt&&kt();this.$modes[Dt]&&!At?this.$onChangeMode(this.$modes[Dt]):Lt&&Lt.Mode&&(Lt=new Lt.Mode(At),At||(this.$modes[Dt]=Lt,Lt.$id=Dt),this.$onChangeMode(Lt)),kt&&kt()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},qe.prototype.$onChangeMode=function(Et,kt){if(kt||(this.$modeId=Et.$id),this.$mode!==Et){var At=this.$mode;this.$mode=Et,this.$stopWorker(),this.$useWorker&&this.$startWorker();var Dt=Et.getTokenizer();if(Dt.on!==void 0){var Lt=this.onReloadTokenizer.bind(this);Dt.on("update",Lt)}this.bgTokenizer.setTokenizer(Dt),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=Et.tokenRe,this.nonTokenRe=Et.nonTokenRe,kt||(Et.attachToSession&&Et.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(Et.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:At,mode:Et}))}},qe.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},qe.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(Et){ie.warn("Could not load worker",Et),this.$worker=null}},qe.prototype.getMode=function(){return this.$mode},qe.prototype.setScrollTop=function(Et){this.$scrollTop===Et||isNaN(Et)||(this.$scrollTop=Et,this._signal("changeScrollTop",Et))},qe.prototype.getScrollTop=function(){return this.$scrollTop},qe.prototype.setScrollLeft=function(Et){this.$scrollLeft===Et||isNaN(Et)||(this.$scrollLeft=Et,this._signal("changeScrollLeft",Et))},qe.prototype.getScrollLeft=function(){return this.$scrollLeft},qe.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},qe.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var Et=0;return this.lineWidgets.forEach(function(kt){kt&&kt.screenWidth>Et&&(Et=kt.screenWidth)}),this.lineWidgetWidth=Et},qe.prototype.$computeWidth=function(Et){if(this.$modified||Et){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var kt=this.doc.getAllLines(),At=this.$rowLengthCache,Dt=0,Lt=0,jt=this.$foldData[Lt],hn=jt?jt.start.row:1/0,vn=kt.length,_n=0;_n<vn;_n++){if(_n>hn){if(_n=jt.end.row+1,_n>=vn)break;jt=this.$foldData[Lt++],hn=jt?jt.start.row:1/0}At[_n]==null&&(At[_n]=this.$getStringScreenWidth(kt[_n])[0]),At[_n]>Dt&&(Dt=At[_n])}this.screenWidth=Dt}},qe.prototype.getLine=function(Et){return this.doc.getLine(Et)},qe.prototype.getLines=function(Et,kt){return this.doc.getLines(Et,kt)},qe.prototype.getLength=function(){return this.doc.getLength()},qe.prototype.getTextRange=function(Et){ret
|
|
|
|
|
|
`;break;case he.t:pe+=" ";break}continue}if(xe===he.DollarSign){if(_e++,_e>=Ce){pe+="$";break}var Ne=de.charCodeAt(_e);if(Ne===he.DollarSign){pe+="$$";continue}if(Ne===he.Digit0||Ne===he.Ampersand){pe+="$&";continue}if(he.Digit1<=Ne&&Ne<=he.Digit9){pe+="$"+de[_e];continue}}pe+=de[_e]}return pe||de},ue.prototype.replace=function(de,he){var pe=this.$options,_e=this.$assembleRegExp(pe);if(pe.$isMultiLine)return he;if(_e){var Ce=this.$isMultilineSearch(pe);Ce&&(de=de.replace(/\r\n|\r|\n/g,`
|
|
|
|
|
|
`));var xe=_e.exec(de);if(!xe||!Ce&&xe[0].length!=de.length)return null;if(he=pe.regExp?this.parseReplaceString(he):he.replace(/\$/g,"$$$$"),he=de.replace(_e,he),pe.preserveCase){he=he.split("");for(var Ie=Math.min(de.length,de.length);Ie--;){var Ne=de[Ie];Ne&&Ne.toLowerCase()!=Ne?he[Ie]=he[Ie].toUpperCase():he[Ie]=he[Ie].toLowerCase()}he=he.join("")}return he}},ue.prototype.$assembleRegExp=function(de,he){if(de.needle instanceof RegExp)return de.re=de.needle;var pe=de.needle;if(!de.needle)return de.re=!1;de.regExp||(pe=$.escapeRegExp(pe));var _e=de.caseSensitive?"gm":"gmi";try{new RegExp(pe,"u"),de.$supportsUnicodeFlag=!0,_e+="u"}catch{de.$supportsUnicodeFlag=!1}if(de.wholeWord&&(pe=ae(pe,de)),de.$isMultiLine=!he&&/[\n\r]/.test(pe),de.$isMultiLine)return de.re=this.$assembleMultilineRegExp(pe,_e);try{var Ce=new RegExp(pe,_e)}catch{Ce=!1}return de.re=Ce},ue.prototype.$assembleMultilineRegExp=function(de,he){for(var pe=de.replace(/\r\n|\r|\n/g,`$
|
|
|
|
|
|
^`).split(`
|
|
|
|
|
|
`),_e=[],Ce=0;Ce<pe.length;Ce++)try{_e.push(new RegExp(pe[Ce],he))}catch{return!1}return _e},ue.prototype.$isMultilineSearch=function(de){return de.re&&/\\r\\n|\\r|\\n/.test(de.re.source)&&de.regExp&&!de.$isMultiLine},ue.prototype.$multiLineForward=function(de,he,pe,_e){for(var Ce,xe=le(de,pe),Ie=pe;Ie<=_e;){for(var Ne=0;Ne<xe&&!(Ie>_e);Ne++){var Oe=de.getLine(Ie++);Ce=Ce==null?Oe:Ce+`
|
|
|
|
|
|
`+Oe}var $e=he.exec(Ce);if(he.lastIndex=0,$e){var Ve=Ce.slice(0,$e.index).split(`
|
|
|
|
|
|
`),Ue=$e[0].split(`
|
|
|
|
|
|
`),Fe=pe+Ve.length-1,ze=Ve[Ve.length-1].length,Pt=Fe+Ue.length-1,qe=Ue.length==1?ze+Ue[0].length:Ue[Ue.length-1].length;return{startRow:Fe,startCol:ze,endRow:Pt,endCol:qe}}}return null},ue.prototype.$multiLineBackward=function(de,he,pe,_e,Ce){for(var xe,Ie=le(de,_e),Ne=de.getLine(_e).length-pe,Oe=_e;Oe>=Ce;){for(var $e=0;$e<Ie&&Oe>=Ce;$e++){var Ve=de.getLine(Oe--);xe=xe==null?Ve:Ve+`
|
|
|
|
|
|
`+xe}var Ue=oe(xe,he,Ne);if(Ue){var Fe=xe.slice(0,Ue.index).split(`
|
|
|
|
|
|
`),ze=Ue[0].split(`
|
|
|
|
|
|
`),Pt=Oe+Fe.length,qe=Fe[Fe.length-1].length,Et=Pt+ze.length-1,kt=ze.length==1?qe+ze[0].length:ze[ze.length-1].length;return{startRow:Pt,startCol:qe,endRow:Et,endCol:kt}}}return null},ue.prototype.$matchIterator=function(de,he){var pe=this.$assembleRegExp(he);if(!pe)return!1;var _e=this.$isMultilineSearch(he),Ce=this.$multiLineForward,xe=this.$multiLineBackward,Ie=he.backwards==!0,Ne=he.skipCurrent!=!1,Oe=pe.unicode,$e=he.range,Ve=he.start;Ve||(Ve=$e?$e[Ie?"end":"start"]:de.selection.getRange()),Ve.start&&(Ve=Ve[Ne!=Ie?"end":"start"]);var Ue=$e?$e.start.row:0,Fe=$e?$e.end.row:de.getLength()-1;if(Ie)var ze=function(Et){var kt=Ve.row;if(!qe(kt,Ve.column,Et)){for(kt--;kt>=Ue;kt--)if(qe(kt,Number.MAX_VALUE,Et))return;if(he.wrap!=!1){for(kt=Fe,Ue=Ve.row;kt>=Ue;kt--)if(qe(kt,Number.MAX_VALUE,Et))return}}};else var ze=function(kt){var At=Ve.row;if(!qe(At,Ve.column,kt)){for(At=At+1;At<=Fe;At++)if(qe(At,0,kt))return;if(he.wrap!=!1){for(At=Ue,Fe=Ve.row;At<=Fe;At++)if(qe(At,0,kt))return}}};if(he.$isMultiLine)var Pt=pe.length,qe=function(Et,kt,At){var Dt=Ie?Et-Pt+1:Et;if(!(Dt<0||Dt+Pt>de.getLength())){var Lt=de.getLine(Dt),jt=Lt.search(pe[0]);if(!(!Ie&&jt<kt||jt===-1)){for(var hn=1;hn<Pt;hn++)if(Lt=de.getLine(Dt+hn),Lt.search(pe[hn])==-1)return;var vn=Lt.match(pe[Pt-1])[0].length;if(!(Ie&&vn>kt)&&At(Dt,jt,Dt+Pt-1,vn))return!0}}};else if(Ie)var qe=function(kt,At,Dt){if(_e){var Lt=xe(de,pe,At,kt,Ue);if(!Lt)return!1;if(Dt(Lt.startRow,Lt.startCol,Lt.endRow,Lt.endCol))return!0}else{var jt=de.getLine(kt),hn=[],vn,_n=0;for(pe.lastIndex=0;vn=pe.exec(jt);){var wn=vn[0].length;if(_n=vn.index,!wn){if(_n>=jt.length)break;pe.lastIndex=_n+=$.skipEmptyMatch(jt,_n,Oe)}if(vn.index+wn>At)break;hn.push(vn.index,wn)}for(var bn=hn.length-1;bn>=0;bn-=2){var Cn=hn[bn-1],wn=hn[bn];if(Dt(kt,Cn,kt,Cn+wn))return!0}}};else var qe=function(kt,At,Dt){if(pe.lastIndex=At,_e){var Lt=Ce(de,pe,kt,Fe);if(Lt){var jt=Lt.endRow<=Fe?Lt.endRow-1:Fe;jt>kt&&(kt=jt)}if(!Lt)return!1;if(Dt(Lt.startRow,Lt.startCol,Lt.endRow,Lt.endCol))return!0}else for(var hn=de.getLine(kt),vn,_n;_n=pe.exec(hn);){var wn=_n[0].length;if(vn=_n.index,Dt(kt,vn,kt,vn+wn))return!0;if(!wn&&(pe.lastIndex=vn+=$.skipEmptyMatch(hn,vn,Oe),vn>=hn.length))return!1}};return{forEach:ze}},ue}();function ae(ue,de){var he=$.supportsLookbehind();function pe(Ie,Ne){Ne===void 0&&(Ne=!0);var Oe=he&&de.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return Oe.test(Ie)||de.regExp?he&&de.$supportsUnicodeFlag?Ne?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var _e=Array.from(ue),Ce=_e[0],xe=_e[_e.length-1];return pe(Ce)+ue+pe(xe,!1)}function oe(ue,de,he){for(var pe=null,_e=0;_e<=ue.length;){de.lastIndex=_e;var Ce=de.exec(ue);if(!Ce)break;var xe=Ce.index+Ce[0].length;if(xe>ue.length-he)break;(!pe||xe>pe.index+pe[0].length)&&(pe=Ce),_e=Ce.index+1}return pe}function le(ue,de){var he=5e3,pe={row:de,column:0},_e=ue.doc.positionToIndex(pe),Ce=_e+he,xe=ue.doc.indexToPosition(Ce),Ie=xe.row;return Ie+1}i.Search=ie}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(r,i,g){var $=this&&this.__extends||function(){var ue=function(de,he){return ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(pe,_e){pe.__proto__=_e}||function(pe,_e){for(var Ce in _e)Object.prototype.hasOwnProperty.call(_e,Ce)&&(pe[Ce]=_e[Ce])},ue(de,he)};return function(de,he){if(typeof he!="function"&&he!==null)throw new TypeError("Class extends value "+String(he)+" is not a constructor or null");ue(de,he);function pe(){this.constructor=de}de.prototype=he===null?Object.create(he):(pe.prototype=he.prototype,new pe)}}(),V=r("../lib/keys"),re=r("../lib/useragent"),ie=V.KEY_MODS,ae=function(){function ue(de,he){this.$init(de,he,!1)}return ue.prototype.$init=function(de,he,pe){this.platform=he||(re.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(de),this.$singleCommand=pe},ue.prototype.addCommand=function(de){this.commands[de.name]&&this.removeCommand(de),this.commands[de.name]=de,de.bindKey&&this._buildKeyHash(de)},ue.pro
|
|
|
|
|
|
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(oe){oe.selection.clearSelection();var le=oe.getCursorPosition();oe.selection.moveTo(le.row-1,Number.MAX_VALUE),oe.insert(`
|
|
|
|
|
|
`),le.row===0&&oe.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(oe){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),oe.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:ie("F1","F1"),exec:function(oe){oe.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:ie(null,null),exec:function(oe){oe.prompt({$type:"modes"})},readOnly:!0}];for(var ae=1;ae<9;ae++)i.commands.push({name:"foldToLevel"+ae,description:"Fold To Level "+ae,level:ae,exec:function(oe){oe.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(r,i,g){var $=r("../lib/keys"),V=function(){function ie(ae){this.editor=ae,this.gutterLayer=ae.renderer.$gutterLayer,this.element=ae.renderer.$gutter,this.lines=ae.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return ie.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},ie.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},ie.prototype.$onGutterKeyDown=function(ae){if(this.annotationTooltip.isOpen){ae.preventDefault(),ae.keyCode===$.escape&&this.annotationTooltip.hide();return}if(ae.target===this.element){if(ae.keyCode!=$.enter)return;ae.preventDefault();var oe=this.editor.getCursorPosition().row;this.editor.isRowVisible(oe)||this.editor.scrollToLine(oe,!0,!0),setTimeout((function(){var le=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),ue=this.$findNearestFoldLaneWidget(le),de=this.$findNearestAnnotation(le);if(!(ue===null&&de===null)){var he=this.$findClosestNumber(ue,de,le);if(he===ue)if(this.activeLane="fold",this.activeRowIndex=ue,this.$isCustomWidgetVisible(ue)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=de,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(ae),setTimeout((function(){this.editor._signal("gutterkeydown",new re(ae,this))}).bind(this),10)},ie.prototype.$handleGutterKeyboardInteraction=function(ae){if(ae.keyCode===$.tab){ae.preventDefault();return}if(ae.keyCode===$.escape){ae.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(ae.keyCode===$.up){switch(ae.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(ae.keyCode===$.down){switch(ae.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(ae.keyCode===$.left){ae.preventDefault(),this.$switchLane("annotation");return}if(ae.keyCode===$.right){ae.preventDefault(),this.$switchLane("fold");return}if(ae.keyCode===$.enter||ae.keyCode===$.space){switch(ae.preventDefault(),this.activeLane){case"fold":var oe=this.$rowIndexToRow(this.activeRowIndex),le=this.editor.session.$gutterCustomWidgets[oe];if(le)le.callbacks&&le.callbacks.onClick&&le.callbacks.onClick(ae,oe);else if(this.gutterLayer.session.foldWidgets[oe]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),ae),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==oe&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(oe),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)
|
|
|
|
|
|
`)==-1){var _n=_e.fromPoints(hn,hn);_n.end.column+=At.length,this.session.remove(_n)}}else{var _n=this.getSelectionRange();hn=this.session.remove(_n),this.clearSelection()}if(At==`
|
|
|
|
|
|
`||At==`\r
|
|
|
|
|
|
`){var Sn=Lt.getLine(hn.row);if(hn.column>Sn.search(/\S|$/)){var wn=Sn.substr(hn.column).search(/\S|$/);Lt.doc.removeInLine(hn.row,hn.column,hn.column+wn)}}this.clearSelection();var bn=hn.column,Cn=Lt.getState(hn.row),Sn=Lt.getLine(hn.row),Tn=jt.checkOutdent(Cn,Sn,At);if(Lt.insert(hn,At),vn&&vn.selection&&(vn.selection.length==2?this.selection.setSelectionRange(new _e(hn.row,bn+vn.selection[0],hn.row,bn+vn.selection[1])):this.selection.setSelectionRange(new _e(hn.row+vn.selection[0],vn.selection[1],hn.row+vn.selection[2],vn.selection[3]))),this.$enableAutoIndent){if(Lt.getDocument().isNewLine(At)){var En=jt.getNextLineIndent(Cn,Sn.slice(0,hn.column),Lt.getTabString());Lt.insert({row:hn.row+1,column:0},En)}Tn&&jt.autoOutdent(Cn,Lt,hn.row)}},kt.prototype.autoIndent=function(){for(var At=this.session,Dt=At.getMode(),Lt=this.selection.isEmpty()?[new _e(0,0,At.doc.getLength()-1,0)]:this.selection.getAllRanges(),jt="",hn="",vn="",_n=At.getTabString(),wn=0;wn<Lt.length;wn++)for(var bn=Lt[wn].start.row,Cn=Lt[wn].end.row,Sn=bn;Sn<=Cn;Sn++){Sn>0&&(jt=At.getState(Sn-1),hn=At.getLine(Sn-1),vn=Dt.getNextLineIndent(jt,hn,_n));var Tn=At.getLine(Sn),En=Dt.$getIndent(Tn);if(vn!==En){if(En.length>0){var kn=new _e(Sn,0,Sn,En.length);At.remove(kn)}vn.length>0&&At.insert({row:Sn,column:0},vn)}Dt.autoOutdent(jt,At,Sn)}},kt.prototype.onTextInput=function(At,Dt){if(!Dt)return this.keyBinding.onTextInput(At);this.startOperation({command:{name:"insertstring"}});var Lt=this.applyComposition.bind(this,At,Dt);this.selection.rangeCount?this.forEachSelection(Lt):Lt(),this.endOperation()},kt.prototype.applyComposition=function(At,Dt){if(Dt.extendLeft||Dt.extendRight){var Lt=this.selection.getRange();Lt.start.column-=Dt.extendLeft,Lt.end.column+=Dt.extendRight,Lt.start.column<0&&(Lt.start.row--,Lt.start.column+=this.session.getLine(Lt.start.row).length+1),this.selection.setRange(Lt),!At&&!Lt.isEmpty()&&this.remove()}if((At||!this.selection.isEmpty())&&this.insert(At,!0),Dt.restoreStart||Dt.restoreEnd){var Lt=this.selection.getRange();Lt.start.column-=Dt.restoreStart,Lt.end.column-=Dt.restoreEnd,this.selection.setRange(Lt)}},kt.prototype.onCommandKey=function(At,Dt,Lt){return this.keyBinding.onCommandKey(At,Dt,Lt)},kt.prototype.setOverwrite=function(At){this.session.setOverwrite(At)},kt.prototype.getOverwrite=function(){return this.session.getOverwrite()},kt.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},kt.prototype.setScrollSpeed=function(At){this.setOption("scrollSpeed",At)},kt.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},kt.prototype.setDragDelay=function(At){this.setOption("dragDelay",At)},kt.prototype.getDragDelay=function(){return this.getOption("dragDelay")},kt.prototype.setSelectionStyle=function(At){this.setOption("selectionStyle",At)},kt.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},kt.prototype.setHighlightActiveLine=function(At){this.setOption("highlightActiveLine",At)},kt.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},kt.prototype.setHighlightGutterLine=function(At){this.setOption("highlightGutterLine",At)},kt.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},kt.prototype.setHighlightSelectedWord=function(At){this.setOption("highlightSelectedWord",At)},kt.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},kt.prototype.setAnimatedScroll=function(At){this.renderer.setAnimatedScroll(At)},kt.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},kt.prototype.setShowInvisibles=function(At){this.renderer.setShowInvisibles(At)},kt.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},kt.prototype.setDisplayIndentGuides=function(At){this.renderer.setDisplayIndentGuides(At)},kt.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},kt.prototype.setHighlightIndentGuides=function(At){this.renderer.setHighlightIndentGuides(At)},kt.prototype.getHighlightIndentGuides=fun
|
|
|
|
|
|
`){var _n=Lt.getLine(Dt.end.row);/^\s+$/.test(_n)&&(Dt.end.column=_n.length)}}hn&&(Dt=hn)}this.session.remove(Dt),this.clearSelection()},kt.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},kt.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},kt.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},kt.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var At=this.getSelectionRange();At.start.column==At.end.column&&At.start.row==At.end.row&&(At.end.column=0,At.end.row++),this.session.remove(At),this.clearSelection()},kt.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var At=this.getCursorPosition();this.insert(`
|
|
|
|
|
|
`),this.moveCursorToPosition(At)},kt.prototype.setGhostText=function(At,Dt){this.renderer.setGhostText(At,Dt)},kt.prototype.removeGhostText=function(){this.renderer.removeGhostText()},kt.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var At=this.getCursorPosition(),Dt=At.column;if(Dt!==0){var Lt=this.session.getLine(At.row),jt,hn;Dt<Lt.length?(jt=Lt.charAt(Dt)+Lt.charAt(Dt-1),hn=new _e(At.row,Dt-1,At.row,Dt+1)):(jt=Lt.charAt(Dt-1)+Lt.charAt(Dt-2),hn=new _e(At.row,Dt-2,At.row,Dt)),this.session.replace(hn,jt),this.session.selection.moveToPosition(hn.end)}}},kt.prototype.toLowerCase=function(){var At=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var Dt=this.getSelectionRange(),Lt=this.session.getTextRange(Dt);this.session.replace(Dt,Lt.toLowerCase()),this.selection.setSelectionRange(At)},kt.prototype.toUpperCase=function(){var At=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var Dt=this.getSelectionRange(),Lt=this.session.getTextRange(Dt);this.session.replace(Dt,Lt.toUpperCase()),this.selection.setSelectionRange(At)},kt.prototype.indent=function(){var At=this.session,Dt=this.getSelectionRange();if(Dt.start.row<Dt.end.row){var Lt=this.$getSelectedRows();At.indentRows(Lt.first,Lt.last," ");return}else if(Dt.start.column<Dt.end.column){var jt=At.getTextRange(Dt);if(!/^\s+$/.test(jt)){var Lt=this.$getSelectedRows();At.indentRows(Lt.first,Lt.last," ");return}}var hn=At.getLine(Dt.start.row),vn=Dt.start,_n=At.getTabSize(),wn=At.documentToScreenColumn(vn.row,vn.column);if(this.session.getUseSoftTabs())var bn=_n-wn%_n,Cn=ie.stringRepeat(" ",bn);else{for(var bn=wn%_n;hn[Dt.start.column-1]==" "&&bn;)Dt.start.column--,bn--;this.selection.setSelectionRange(Dt),Cn=" "}return this.insert(Cn)},kt.prototype.blockIndent=function(){var At=this.$getSelectedRows();this.session.indentRows(At.first,At.last," ")},kt.prototype.blockOutdent=function(){var At=this.session.getSelection();this.session.outdentRows(At.getRange())},kt.prototype.sortLines=function(){for(var At=this.$getSelectedRows(),Dt=this.session,Lt=[],jt=At.first;jt<=At.last;jt++)Lt.push(Dt.getLine(jt));Lt.sort(function(_n,wn){return _n.toLowerCase()<wn.toLowerCase()?-1:_n.toLowerCase()>wn.toLowerCase()?1:0});for(var hn=new _e(0,0,0,0),jt=At.first;jt<=At.last;jt++){var vn=Dt.getLine(jt);hn.start.row=jt,hn.end.row=jt,hn.end.column=vn.length,Dt.replace(hn,Lt[jt-At.first])}},kt.prototype.toggleCommentLines=function(){var At=this.session.getState(this.getCursorPosition().row),Dt=this.$getSelectedRows();this.session.getMode().toggleCommentLines(At,this.session,Dt.first,Dt.last)},kt.prototype.toggleBlockComment=function(){var At=this.getCursorPosition(),Dt=this.session.getState(At.row),Lt=this.getSelectionRange();this.session.getMode().toggleBlockComment(Dt,this.session,Lt,At)},kt.prototype.getNumberAt=function(At,Dt){var Lt=/[\-]?[0-9]+(?:\.[0-9]+)?/g;Lt.lastIndex=0;for(var jt=this.session.getLine(At);Lt.lastIndex<Dt;){var hn=Lt.exec(jt);if(hn.index<=Dt&&hn.index+hn[0].length>=Dt){var vn={value:hn[0],start:hn.index,end:hn.index+hn[0].length};return vn}}return null},kt.prototype.modifyNumber=function(At){var Dt=this.selection.getCursor().row,Lt=this.selection.getCursor().column,jt=new _e(Dt,Lt-1,Dt,Lt),hn=this.session.getTextRange(jt);if(!isNaN(parseFloat(hn))&&isFinite(hn)){var vn=this.getNumberAt(Dt,Lt);if(vn){var _n=vn.value.indexOf(".")>=0?vn.start+vn.value.indexOf(".")+1:vn.end,wn=vn.start+vn.value.length-_n,bn=parseFloat(vn.value);bn*=Math.pow(10,wn),_n!==vn.end&&Lt<_n?At*=Math.pow(10,vn.end-Lt-1):At*=Math.pow(10,vn.end-Lt),bn+=At,bn/=Math.pow(10,wn);var Cn=bn.toFixed(wn),Sn=new _e(Dt,vn.start,Dt,vn.end);this.session.replace(Sn,Cn),this.moveCursorTo(Dt,Math.max(vn.start+1,Lt+Cn.length-vn.value.length))}}else this.toggleWord()},kt.prototype.toggleWord=function(){var At=this.selection.getCursor().row,Dt=this.selection.getCursor().column;this.selection.selectWord();var Lt=this.getSelectedText(),jt=this.selection.getWordRange().start.column,hn=Lt.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/)
|
|
|
|
|
|
`&&he.getNewLineMode()!="windows",_e=pe?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=_e)return this.EOL_CHAR=_e,!0},de.prototype.setPadding=function(he){this.$padding=he,this.element.style.margin="0 "+he+"px"},de.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},de.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},de.prototype.$setFontMetrics=function(he){this.$fontMetrics=he,this.$fontMetrics.on("changeCharacterSize",(function(pe){this._signal("changeCharacterSize",pe)}).bind(this)),this.$pollSizeChanges()},de.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},de.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},de.prototype.setSession=function(he){this.session=he,he&&this.$computeTabString()},de.prototype.setShowInvisibles=function(he){return this.showInvisibles==he?!1:(this.showInvisibles=he,typeof he=="string"?(this.showSpaces=/tab/i.test(he),this.showTabs=/space/i.test(he),this.showEOL=/eol/i.test(he)):this.showSpaces=this.showTabs=this.showEOL=he,this.$computeTabString(),!0)},de.prototype.setDisplayIndentGuides=function(he){return this.displayIndentGuides==he?!1:(this.displayIndentGuides=he,this.$computeTabString(),!0)},de.prototype.setHighlightIndentGuides=function(he){return this.$highlightIndentGuides===he?!1:(this.$highlightIndentGuides=he,he)},de.prototype.$computeTabString=function(){var he=this.session.getTabSize();this.tabSize=he;for(var pe=this.$tabStrings=[0],_e=1;_e<he+1;_e++)if(this.showTabs){var Ce=this.dom.createElement("span");Ce.className="ace_invisible ace_invisible_tab",Ce.textContent=re.stringRepeat(this.TAB_CHAR,_e),pe.push(Ce)}else pe.push(this.dom.createTextNode(re.stringRepeat(" ",_e),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var xe="ace_indent-guide",Ie=this.showSpaces?" ace_invisible ace_invisible_space":"",Ne=this.showSpaces?re.stringRepeat(this.SPACE_CHAR,this.tabSize):re.stringRepeat(" ",this.tabSize),Oe=this.showTabs?" ace_invisible ace_invisible_tab":"",$e=this.showTabs?re.stringRepeat(this.TAB_CHAR,this.tabSize):Ne,Ce=this.dom.createElement("span");Ce.className=xe+Ie,Ce.textContent=Ne,this.$tabStrings[" "]=Ce;var Ce=this.dom.createElement("span");Ce.className=xe+Oe,Ce.textContent=$e,this.$tabStrings[" "]=Ce}},de.prototype.updateLines=function(he,pe,_e){if(this.config.lastRow!=he.lastRow||this.config.firstRow!=he.firstRow)return this.update(he);this.config=he;for(var Ce=Math.max(pe,he.firstRow),xe=Math.min(_e,he.lastRow),Ie=this.element.childNodes,Ne=0,$e=he.firstRow;$e<Ce;$e++){var Ve=this.session.getFoldLine($e);if(Ve)if(Ve.containsRow(Ce)){Ce=Ve.start.row;break}else $e=Ve.end.row;Ne++}for(var Oe=!1,$e=Ce,Ve=this.session.getNextFoldLine($e),Ue=Ve?Ve.start.row:1/0;$e>Ue&&($e=Ve.end.row+1,Ve=this.session.getNextFoldLine($e,Ve),Ue=Ve?Ve.start.row:1/0),!($e>xe);){var Fe=Ie[Ne++];if(Fe){this.dom.removeChildren(Fe),this.$renderLine(Fe,$e,$e==Ue?Ve:!1),Oe&&(Fe.style.top=this.$lines.computeLineTop($e,he,this.session)+"px");var ze=he.lineHeight*this.session.getRowLength($e)+"px";Fe.style.height!=ze&&(Oe=!0,Fe.style.height=ze)}$e++}if(Oe)for(;Ne<this.$lines.cells.length;){var Pt=this.$lines.cells[Ne++];Pt.element.style.top=this.$lines.computeLineTop(Pt.row,he,this.session)+"px"}},de.prototype.scrollLines=function(he){var pe=this.config;if(this.config=he,this.$lines.pageChanged(pe,he))return this.update(he);this.$lines.moveContainer(he);var _e=he.lastRow,Ce=pe?pe.lastRow:-1;if(!pe||Ce<he.firstRow)return this.update(he);if(_e<pe.firstRow)return this.update(he);if(!pe||pe.lastRow<he.firstRow)return this.update(he);if(he.lastRow<pe.firstRow)return this.update(he);if(pe.firstRow<he.firstRow)for(var xe=this.session.getFoldedRowCount(pe.firstRow,he.firstRow-1);xe>0;xe--)this.$lines.shift();if(pe.lastRow>he.lastRow)for(var xe=this.session.getFoldedRowCount(he.lastRow+1,pe.lastRow);xe>0;xe--)this.$lines.pop();he.firstRow<pe.firstRow&&this.$lines.unshift(this.$renderLinesFragment(he,he.firs
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
background: rgba(128, 128, 128, 0.6);
|
|
|
|
|
|
-moz-box-sizing: border-box;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
border: 1px solid #bbb;
|
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
|
z-index: 8;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
z-index: 6;
|
|
|
|
|
|
background: none;
|
|
|
|
|
|
overflow: hidden!important;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_editor>.ace_sb-v {
|
|
|
|
|
|
z-index: 6;
|
|
|
|
|
|
right: 0;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
width: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_editor>.ace_sb-v div {
|
|
|
|
|
|
z-index: 8;
|
|
|
|
|
|
right: 0;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_editor>.ace_sb-h {
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
height: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_editor>.ace_sb-h div {
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_editor>.ace_sb_grabbed {
|
|
|
|
|
|
z-index: 8;
|
|
|
|
|
|
background: #000;
|
|
|
|
|
|
}`,"ace_scrollbar.css",!1);var oe=function(){function de(he,pe){this.element=re.createElement("div"),this.element.className="ace_sb"+pe,this.inner=re.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,he.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,ie.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return de.prototype.setVisible=function(he){this.element.style.display=he?"":"none",this.isVisible=he,this.coeff=1},de}();V.implement(oe.prototype,ae);var le=function(de){$(he,de);function he(pe,_e){var Ce=de.call(this,pe,"-v")||this;return Ce.scrollTop=0,Ce.scrollHeight=0,Ce.parent=pe,Ce.width=Ce.VScrollWidth,Ce.renderer=_e,Ce.inner.style.width=Ce.element.style.width=(Ce.width||15)+"px",Ce.$minWidth=0,Ce}return he.prototype.onMouseDown=function(pe,_e){if(pe==="mousedown"&&!(ie.getButton(_e)!==0||_e.detail===2)){if(_e.target===this.inner){var Ce=this,xe=_e.clientY,Ie=function(ze){xe=ze.clientY},Ne=function(){clearInterval(Ue)},Oe=_e.clientY,$e=this.thumbTop,Ve=function(){if(xe!==void 0){var ze=Ce.scrollTopFromThumbTop($e+xe-Oe);ze!==Ce.scrollTop&&Ce._emit("scroll",{data:ze})}};ie.capture(this.inner,Ie,Ne);var Ue=setInterval(Ve,20);return ie.preventDefault(_e)}var Fe=_e.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(Fe)}),ie.preventDefault(_e)}},he.prototype.getHeight=function(){return this.height},he.prototype.scrollTopFromThumbTop=function(pe){var _e=pe*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return _e=_e>>0,_e<0?_e=0:_e>this.pageHeight-this.viewHeight&&(_e=this.pageHeight-this.viewHeight),_e},he.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},he.prototype.setHeight=function(pe){this.height=Math.max(0,pe),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},he.prototype.setScrollHeight=function(pe,_e){this.pageHeight===pe&&!_e||(this.pageHeight=pe,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},he.prototype.setScrollTop=function(pe){this.scrollTop=pe,pe<0&&(pe=0),this.thumbTop=pe*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},he}(oe);le.prototype.setInnerHeight=le.prototype.setScrollHeight;var ue=function(de){$(he,de);function he(pe,_e){var Ce=de.call(this,pe,"-h")||this;return Ce.scrollLeft=0,Ce.scrollWidth=0,Ce.height=Ce.HScrollHeight,Ce.inner.style.height=Ce.element.style.height=(Ce.height||12)+"px",Ce.renderer=_e,Ce}return he.prototype.onMouseDown=function(pe,_e){if(pe==="mousedown"&&!(ie.getButton(_e)!==0||_e.detail===2)){if(_e.target===this.inner){var Ce=this,xe=_e.clientX,Ie=function(ze){xe=ze.clientX},Ne=function(){clearInterval(Ue)},Oe=_e.clientX,$e=this.thumbLeft,Ve=function(){if(xe!==void 0){var ze=Ce.scrollLeftFromThumbLeft($e+xe-Oe);ze!==Ce.scrollLeft&&Ce._emit("scroll",{data:ze})}};ie.capture(this.inner,Ie,Ne);var Ue=setInterval(Ve,20);return ie.preventDefault(_e)}var Fe=_e.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(Fe)}),ie.preventDefault(_e)}},he.prototype.getHeight=function(){return this.isVisible?this.height:0},he.prototype.scrollLeftFromThumbLeft=function(pe){var _e=pe*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return _e=_e>>0,_e<0?_e=0:_e>this.pageWidth-this.viewWidth&&(_e=this.pageWidth-this.viewWidth),_e},he.prototype.setWidth=function(pe){this.width=Math.max(0,pe),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setSc
|
|
|
|
|
|
.ace_br1 {border-top-left-radius : 3px;}
|
|
|
|
|
|
.ace_br2 {border-top-right-radius : 3px;}
|
|
|
|
|
|
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
|
|
|
|
|
|
.ace_br4 {border-bottom-right-radius: 3px;}
|
|
|
|
|
|
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
|
|
|
|
|
|
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
|
|
|
|
|
|
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
|
|
|
|
|
|
.ace_br8 {border-bottom-left-radius : 3px;}
|
|
|
|
|
|
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
|
|
|
|
|
|
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
|
|
|
|
|
|
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
|
|
|
|
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
|
|
|
|
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
|
|
|
|
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
|
|
|
|
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.ace_editor {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
|
|
|
|
|
|
direction: ltr;
|
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
|
|
|
|
forced-color-adjust: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_scroller {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
|
background-color: inherit;
|
|
|
|
|
|
-ms-user-select: none;
|
|
|
|
|
|
-moz-user-select: none;
|
|
|
|
|
|
-webkit-user-select: none;
|
|
|
|
|
|
user-select: none;
|
|
|
|
|
|
cursor: text;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_content {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
min-width: 100%;
|
|
|
|
|
|
contain: style size layout;
|
|
|
|
|
|
font-variant-ligatures: no-common-ligatures;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_invisible {
|
|
|
|
|
|
font-variant-ligatures: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_keyboard-focus:focus {
|
|
|
|
|
|
box-shadow: inset 0 0 0 2px #5E9ED6;
|
|
|
|
|
|
outline: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_dragging .ace_scroller:before{
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
right: 0;
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
|
content: '';
|
|
|
|
|
|
background: rgba(250, 250, 250, 0.01);
|
|
|
|
|
|
z-index: 1000;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_dragging.ace_dark .ace_scroller:before{
|
|
|
|
|
|
background: rgba(0, 0, 0, 0.01);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_gutter {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
overflow : hidden;
|
|
|
|
|
|
width: auto;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
cursor: default;
|
|
|
|
|
|
z-index: 4;
|
|
|
|
|
|
-ms-user-select: none;
|
|
|
|
|
|
-moz-user-select: none;
|
|
|
|
|
|
-webkit-user-select: none;
|
|
|
|
|
|
user-select: none;
|
|
|
|
|
|
contain: style size layout;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_gutter-active-line {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
right: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_scroller.ace_scroll-left:after {
|
|
|
|
|
|
content: "";
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
right: 0;
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
|
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_gutter-cell, .ace_gutter-cell_svg-icons {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
right: 0;
|
|
|
|
|
|
padding-left: 19px;
|
|
|
|
|
|
padding-right: 6px;
|
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_gutter-cell_svg-icons .ace_gutter_annotation {
|
|
|
|
|
|
margin-left: -14px;
|
|
|
|
|
|
float: left;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_gutter-cell .ace_gutter_annotation {
|
|
|
|
|
|
margin-left: -19px;
|
|
|
|
|
|
float: left;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {
|
|
|
|
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
|
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
|
background-position: 2px center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
|
|
|
|
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
|
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
|
background-position: 2px center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
|
|
|
|
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
|
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
|
background-position: 2px center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {
|
|
|
|
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_icon_svg.ace_error {
|
|
|
|
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
|
|
|
|
|
|
background-color: crimson;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_icon_svg.ace_security {
|
|
|
|
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
|
|
|
|
|
|
background-color: crimson;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_icon_svg.ace_warning {
|
|
|
|
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
|
|
|
|
|
|
background-color: darkorange;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_icon_svg.ace_info {
|
|
|
|
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
|
|
|
|
|
|
background-color: royalblue;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_icon_svg.ace_hint {
|
|
|
|
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
|
|
|
|
|
|
background-color: silver;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_icon_svg.ace_error_fold {
|
|
|
|
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
|
|
|
|
|
background-color: crimson;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_icon_svg.ace_security_fold {
|
|
|
|
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
|
|
|
|
|
background-color: crimson;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_icon_svg.ace_warning_fold {
|
|
|
|
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
|
|
|
|
|
|
background-color: darkorange;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_scrollbar {
|
|
|
|
|
|
contain: strict;
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
right: 0;
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
|
z-index: 6;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_scrollbar-inner {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
cursor: text;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_scrollbar-v{
|
|
|
|
|
|
overflow-x: hidden;
|
|
|
|
|
|
overflow-y: scroll;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_scrollbar-h {
|
|
|
|
|
|
overflow-x: scroll;
|
|
|
|
|
|
overflow-y: hidden;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_print-margin {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_text-input {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
z-index: 0;
|
|
|
|
|
|
width: 0.5em;
|
|
|
|
|
|
height: 1em;
|
|
|
|
|
|
opacity: 0;
|
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
-moz-appearance: none;
|
|
|
|
|
|
appearance: none;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
resize: none;
|
|
|
|
|
|
outline: none;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
font: inherit;
|
|
|
|
|
|
padding: 0 1px;
|
|
|
|
|
|
margin: 0 -1px;
|
|
|
|
|
|
contain: strict;
|
|
|
|
|
|
-ms-user-select: text;
|
|
|
|
|
|
-moz-user-select: text;
|
|
|
|
|
|
-webkit-user-select: text;
|
|
|
|
|
|
user-select: text;
|
|
|
|
|
|
/*with \`pre-line\` chrome inserts instead of space*/
|
|
|
|
|
|
white-space: pre!important;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_text-input.ace_composition {
|
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
color: inherit;
|
|
|
|
|
|
z-index: 1000;
|
|
|
|
|
|
opacity: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_composition_placeholder { color: transparent }
|
|
|
|
|
|
.ace_composition_marker {
|
|
|
|
|
|
border-bottom: 1px solid;
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
|
margin-top: 1px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[ace_nocontext=true] {
|
|
|
|
|
|
transform: none!important;
|
|
|
|
|
|
filter: none!important;
|
|
|
|
|
|
clip-path: none!important;
|
|
|
|
|
|
mask : none!important;
|
|
|
|
|
|
contain: none!important;
|
|
|
|
|
|
perspective: none!important;
|
|
|
|
|
|
mix-blend-mode: initial!important;
|
|
|
|
|
|
z-index: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_layer {
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
|
|
|
|
|
|
word-wrap: normal;
|
|
|
|
|
|
white-space: pre;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
/* setting pointer-events: auto; on node under the mouse, which changes
|
|
|
|
|
|
during scroll, will break mouse wheel scrolling in Safari */
|
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_gutter-layer {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
width: auto;
|
|
|
|
|
|
text-align: right;
|
|
|
|
|
|
pointer-events: auto;
|
|
|
|
|
|
height: 1000000px;
|
|
|
|
|
|
contain: style size layout;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_text-layer {
|
|
|
|
|
|
font: inherit !important;
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
height: 1000000px;
|
|
|
|
|
|
width: 1000000px;
|
|
|
|
|
|
contain: style size layout;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
|
|
|
|
|
|
contain: style size layout;
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
right: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_hidpi .ace_text-layer,
|
|
|
|
|
|
.ace_hidpi .ace_gutter-layer,
|
|
|
|
|
|
.ace_hidpi .ace_content,
|
|
|
|
|
|
.ace_hidpi .ace_gutter {
|
|
|
|
|
|
contain: strict;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_hidpi .ace_text-layer > .ace_line,
|
|
|
|
|
|
.ace_hidpi .ace_text-layer > .ace_line_group {
|
|
|
|
|
|
contain: strict;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_cjk {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_cursor-layer {
|
|
|
|
|
|
z-index: 4;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_cursor {
|
|
|
|
|
|
z-index: 4;
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
border-left: 2px solid;
|
|
|
|
|
|
/* workaround for smooth cursor repaintng whole screen in chrome */
|
|
|
|
|
|
transform: translatez(0);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_multiselect .ace_cursor {
|
|
|
|
|
|
border-left-width: 1px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_slim-cursors .ace_cursor {
|
|
|
|
|
|
border-left-width: 1px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_overwrite-cursors .ace_cursor {
|
|
|
|
|
|
border-left-width: 0;
|
|
|
|
|
|
border-bottom: 1px solid;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_hidden-cursors .ace_cursor {
|
|
|
|
|
|
opacity: 0.2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
|
|
|
|
|
|
opacity: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_smooth-blinking .ace_cursor {
|
|
|
|
|
|
transition: opacity 0.18s;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_animate-blinking .ace_cursor {
|
|
|
|
|
|
animation-duration: 1000ms;
|
|
|
|
|
|
animation-timing-function: step-end;
|
|
|
|
|
|
animation-name: blink-ace-animate;
|
|
|
|
|
|
animation-iteration-count: infinite;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
|
|
|
|
|
|
animation-duration: 1000ms;
|
|
|
|
|
|
animation-timing-function: ease-in-out;
|
|
|
|
|
|
animation-name: blink-ace-animate-smooth;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@keyframes blink-ace-animate {
|
|
|
|
|
|
from, to { opacity: 1; }
|
|
|
|
|
|
60% { opacity: 0; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@keyframes blink-ace-animate-smooth {
|
|
|
|
|
|
from, to { opacity: 1; }
|
|
|
|
|
|
45% { opacity: 1; }
|
|
|
|
|
|
60% { opacity: 0; }
|
|
|
|
|
|
85% { opacity: 0; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
z-index: 3;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_marker-layer .ace_selection {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
z-index: 5;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_marker-layer .ace_bracket {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
z-index: 6;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_marker-layer .ace_error_bracket {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
border-bottom: 1px solid #DE5555;
|
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_marker-layer .ace_active-line {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
z-index: 2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_marker-layer .ace_selected-word {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
z-index: 4;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_line .ace_fold {
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
height: 11px;
|
|
|
|
|
|
margin-top: -2px;
|
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
|
|
|
|
|
|
|
background-image:
|
|
|
|
|
|
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
|
|
|
|
|
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
|
|
|
|
|
|
background-repeat: no-repeat, repeat-x;
|
|
|
|
|
|
background-position: center center, top left;
|
|
|
|
|
|
color: transparent;
|
|
|
|
|
|
|
|
|
|
|
|
border: 1px solid black;
|
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
pointer-events: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_dark .ace_fold {
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_fold:hover{
|
|
|
|
|
|
background-image:
|
|
|
|
|
|
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
|
|
|
|
|
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_tooltip {
|
|
|
|
|
|
background-color: #f5f5f5;
|
|
|
|
|
|
border: 1px solid gray;
|
|
|
|
|
|
border-radius: 1px;
|
|
|
|
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
|
|
|
|
color: black;
|
|
|
|
|
|
padding: 3px 4px;
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
z-index: 999999;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
cursor: default;
|
|
|
|
|
|
white-space: pre-wrap;
|
|
|
|
|
|
word-wrap: break-word;
|
|
|
|
|
|
line-height: normal;
|
|
|
|
|
|
font-style: normal;
|
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
|
letter-spacing: normal;
|
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
overflow: auto;
|
|
|
|
|
|
max-width: min(33em, 66vw);
|
|
|
|
|
|
overscroll-behavior: contain;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_tooltip pre {
|
|
|
|
|
|
white-space: pre-wrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_tooltip.ace_dark {
|
|
|
|
|
|
background-color: #636363;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_tooltip:focus {
|
|
|
|
|
|
outline: 1px solid #5E9ED6;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_icon {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
width: 18px;
|
|
|
|
|
|
vertical-align: top;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_icon_svg {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
width: 12px;
|
|
|
|
|
|
vertical-align: top;
|
|
|
|
|
|
-webkit-mask-repeat: no-repeat;
|
|
|
|
|
|
-webkit-mask-size: 12px;
|
|
|
|
|
|
-webkit-mask-position: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
|
|
|
|
|
|
padding-right: 13px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_fold-widget, .ace_custom-widget {
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
|
|
|
|
|
|
margin: 0 -12px 0 1px;
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
width: 11px;
|
|
|
|
|
|
vertical-align: top;
|
|
|
|
|
|
|
|
|
|
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
|
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
|
background-position: center;
|
|
|
|
|
|
|
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
|
|
|
|
|
|
|
border: 1px solid transparent;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
pointer-events: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_custom-widget {
|
|
|
|
|
|
background: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_folding-enabled .ace_fold-widget {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_fold-widget.ace_end {
|
|
|
|
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_fold-widget.ace_closed {
|
|
|
|
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_fold-widget:hover {
|
|
|
|
|
|
border: 1px solid rgba(0, 0, 0, 0.3);
|
|
|
|
|
|
background-color: rgba(255, 255, 255, 0.2);
|
|
|
|
|
|
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_fold-widget:active {
|
|
|
|
|
|
border: 1px solid rgba(0, 0, 0, 0.4);
|
|
|
|
|
|
background-color: rgba(0, 0, 0, 0.05);
|
|
|
|
|
|
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Dark version for fold widgets
|
|
|
|
|
|
*/
|
|
|
|
|
|
.ace_dark .ace_fold-widget {
|
|
|
|
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_dark .ace_fold-widget.ace_end {
|
|
|
|
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_dark .ace_fold-widget.ace_closed {
|
|
|
|
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_dark .ace_fold-widget:hover {
|
|
|
|
|
|
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
|
|
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_dark .ace_fold-widget:active {
|
|
|
|
|
|
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_inline_button {
|
|
|
|
|
|
border: 1px solid lightgray;
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
margin: -1px 8px;
|
|
|
|
|
|
padding: 0 5px;
|
|
|
|
|
|
pointer-events: auto;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_inline_button:hover {
|
|
|
|
|
|
border-color: gray;
|
|
|
|
|
|
background: rgba(200,200,200,0.2);
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
pointer-events: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_fold-widget.ace_invalid {
|
|
|
|
|
|
background-color: #FFB4B4;
|
|
|
|
|
|
border-color: #DE5555;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_fade-fold-widgets .ace_fold-widget {
|
|
|
|
|
|
transition: opacity 0.4s ease 0.05s;
|
|
|
|
|
|
opacity: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
|
|
|
|
|
transition: opacity 0.05s ease 0.05s;
|
|
|
|
|
|
opacity:1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_underline {
|
|
|
|
|
|
text-decoration: underline;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_bold {
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_nobold .ace_bold {
|
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_italic {
|
|
|
|
|
|
font-style: italic;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.ace_error-marker {
|
|
|
|
|
|
background-color: rgba(255, 0, 0,0.2);
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
z-index: 9;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_highlight-marker {
|
|
|
|
|
|
background-color: rgba(255, 255, 0,0.2);
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
z-index: 8;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_mobile-menu {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
line-height: 1.5;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
-ms-user-select: none;
|
|
|
|
|
|
-moz-user-select: none;
|
|
|
|
|
|
-webkit-user-select: none;
|
|
|
|
|
|
user-select: none;
|
|
|
|
|
|
background: white;
|
|
|
|
|
|
box-shadow: 1px 3px 2px grey;
|
|
|
|
|
|
border: 1px solid #dcdcdc;
|
|
|
|
|
|
color: black;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_dark > .ace_mobile-menu {
|
|
|
|
|
|
background: #333;
|
|
|
|
|
|
color: #ccc;
|
|
|
|
|
|
box-shadow: 1px 3px 2px grey;
|
|
|
|
|
|
border: 1px solid #444;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_mobile-button {
|
|
|
|
|
|
padding: 2px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_mobile-button:hover {
|
|
|
|
|
|
background-color: #eee;
|
|
|
|
|
|
opacity:1;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_mobile-button:active {
|
|
|
|
|
|
background-color: #ddd;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_placeholder {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
font-family: arial;
|
|
|
|
|
|
transform: scale(0.9);
|
|
|
|
|
|
transform-origin: left;
|
|
|
|
|
|
white-space: pre;
|
|
|
|
|
|
opacity: 0.7;
|
|
|
|
|
|
margin: 0 10px;
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_ghost_text {
|
|
|
|
|
|
opacity: 0.5;
|
|
|
|
|
|
font-style: italic;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_ghost_text_container > div {
|
|
|
|
|
|
white-space: pre;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ghost_text_line_wrapped::after {
|
|
|
|
|
|
content: "↩";
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_lineWidgetContainer.ace_ghost_text {
|
|
|
|
|
|
margin: 0px 4px
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_screenreader-only {
|
|
|
|
|
|
position:absolute;
|
|
|
|
|
|
left:-10000px;
|
|
|
|
|
|
top:auto;
|
|
|
|
|
|
width:1px;
|
|
|
|
|
|
height:1px;
|
|
|
|
|
|
overflow:hidden;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ace_hidden_token {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(r,i,g){var $=r("../lib/dom"),V=r("../lib/oop"),re=r("../lib/event_emitter").EventEmitter,ie=function(){function ae(oe,le){this.renderer=le,this.pixelRatio=1,this.maxHeight=le.layerConfig.maxHeight,this.lineHeight=le.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(oe)}return ae.prototype.$createCanvas=function(){this.canvas=$.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},ae.prototype.setScrollBarV=function(oe){this.$createCanvas(),this.scrollbarV=oe,oe.element.appendChild(this.canvas),this.setDimensions()},ae.prototype.$updateDecorators=function(oe){if(typeof this.canvas.getContext!="function")return;var le=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(oe);var ue=this.canvas.getContext("2d");function de(Et,kt){return Et.priority<kt.priority?-1:Et.priority>kt.priority?1:0}var he=this.renderer.session.$annotations;if(ue.clearRect(0,0,this.canvas.width,this.canvas.height),he){var pe={info:1,warning:2,error:3};he.forEach(function(Et){Et.priority=pe[Et.type]||null}),he=he.sort(de);for(var _e=0;_e<he.length;_e++){var Ce=he[_e].row,xe=this.getVerticalOffsetForRow(Ce),Ie=xe+this.lineHeight,Ne=Math.round(this.heightRatio*xe),Oe=Math.round(this.heightRatio*Ie),$e=Math.round((Ne+Oe)/2),Ve=Oe-$e;Ve<this.halfMinDecorationHeight&&(Ve=this.halfMinDecorationHeight),$e-Ve<0&&($e=Ve),$e+Ve>this.canvasHeight&&($e=this.canvasHeight-Ve);var Ue=$e-Ve,Fe=$e+Ve,ze=Fe-Ue;ue.fillStyle=le[he[_e].type]||null,ue.fillRect(0,Ue,Math.round(this.oneZoneWidth-1),ze)}}var Pt=this.renderer.session.selection.getCursor();if(Pt){var qe=Math.round(this.getVerticalOffsetForRow(Pt.row)*this.heightRatio);ue.fillStyle="rgba(0, 0, 0, 0.5)",ue.fillRect(0,qe,this.canvasWidth,2)}},ae.prototype.getVerticalOffsetForRow=function(oe){oe=oe|0;var le=this.renderer.session.documentToScreenRow(oe,0)*this.lineHeight;return le},ae.prototype.setDimensions=function(oe){oe=oe||this.renderer.layerConfig,this.maxHeight=oe.maxHeight,this.lineHeight=oe.lineHeight,this.canvasHeight=oe.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},ae.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},ae.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},ae}();V.implement(ie.prototype,re),i.Decorator=ie}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(r,i,g){var $=r("./lib/oop"),V=r("./lib/dom"),re=r("./lib/lang"),ie=r("./config"),ae=r("./layer/gutter").Gutter,oe=r("./layer/marker").Marker,le=r("./layer/text").Text,ue=r("./layer/cursor").Cursor,de=r("./scrollbar").HScrollBar,he=r("./scrollbar").VScrollBar,pe=r("./scrollbar_custom").HScrollBar,_e=r("./scrollbar_custom").VScrollBar,Ce=r("./renderloop").RenderLoop,xe=r("./layer/font_metrics").FontMetrics,Ie=r("./lib/event_emitter").EventEmitter,Ne=r("./css/editor-css"),Oe=r("./layer/decorators").Decorator,$e=r("./lib/useragent"),Ve=r("./layer/text_util").isTextToken;V.importCssString(Ne,"ace_editor.css",!1);var Ue=function(){function Fe(ze,Pt){var qe=
|
|
|
|
|
|
`)+`
|
|
|
|
|
|
`),qe||(Fe.start.column=0,Fe.end.column=At[At.length-1].length),this.selection.setRange(Fe)}else{Ue.forEach(function(hn){Oe.substractPoint(hn.cursor)});var Dt=0,Lt=1/0,jt=$e.map(function(hn){var vn=hn.cursor,_n=Ne.getLine(vn.row),wn=_n.substr(vn.column).search(/\S/g);return wn==-1&&(wn=0),vn.column>Dt&&(Dt=vn.column),wn<Lt&&(Lt=wn),wn});$e.forEach(function(hn,vn){var _n=hn.cursor,wn=Dt-_n.column,bn=jt[vn]-Lt;wn>bn?Ne.insert(_n,oe.stringRepeat(" ",wn-bn)):Ne.remove(new V(_n.row,_n.column,_n.row,_n.column-wn+bn)),hn.start.column=hn.end.column=Dt,hn.start.row=hn.end.row=_n.row,hn.cursor=hn.end}),Oe.fromOrientedRange($e[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(Ne,Oe){var $e=!0,Ve=!0,Ue,Fe,ze;return Ne.map(function(At){var Dt=At.match(/(\s*)(.*?)(\s*)([=:].*)/);return Dt?Ue==null?(Ue=Dt[1].length,Fe=Dt[2].length,ze=Dt[3].length,Dt):(Ue+Fe+ze!=Dt[1].length+Dt[2].length+Dt[3].length&&(Ve=!1),Ue!=Dt[1].length&&($e=!1),Ue>Dt[1].length&&(Ue=Dt[1].length),Fe<Dt[2].length&&(Fe=Dt[2].length),ze>Dt[3].length&&(ze=Dt[3].length),Dt):[At]}).map(Oe?qe:$e?Ve?Et:qe:kt);function Pt(At){return oe.stringRepeat(" ",At)}function qe(At){return At[2]?Pt(Ue)+At[2]+Pt(Fe-At[2].length+ze)+At[4].replace(/^([=:])\s+/,"$1 "):At[0]}function Et(At){return At[2]?Pt(Ue+Fe-At[2].length)+At[2]+Pt(ze)+At[4].replace(/^([=:])\s+/,"$1 "):At[0]}function kt(At){return At[2]?Pt(Ue)+At[2]+Pt(ze)+At[4].replace(/^([=:])\s+/,"$1 "):At[0]}}}).call(_e.prototype);function Ce(Ne,Oe){return Ne.row==Oe.row&&Ne.column==Oe.column}i.onSessionChange=function(Ne){var Oe=Ne.session;Oe&&!Oe.multiSelect&&(Oe.$selectionMarkers=[],Oe.selection.$initRangeList(),Oe.multiSelect=Oe.selection),this.multiSelect=Oe&&Oe.multiSelect;var $e=Ne.oldSession;$e&&($e.multiSelect.off("addRange",this.$onAddRange),$e.multiSelect.off("removeRange",this.$onRemoveRange),$e.multiSelect.off("multiSelect",this.$onMultiSelect),$e.multiSelect.off("singleSelect",this.$onSingleSelect),$e.multiSelect.lead.off("change",this.$checkMultiselectChange),$e.multiSelect.anchor.off("change",this.$checkMultiselectChange)),Oe&&(Oe.multiSelect.on("addRange",this.$onAddRange),Oe.multiSelect.on("removeRange",this.$onRemoveRange),Oe.multiSelect.on("multiSelect",this.$onMultiSelect),Oe.multiSelect.on("singleSelect",this.$onSingleSelect),Oe.multiSelect.lead.on("change",this.$checkMultiselectChange),Oe.multiSelect.anchor.on("change",this.$checkMultiselectChange)),Oe&&this.inMultiSelectMode!=Oe.selection.inMultiSelectMode&&(Oe.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function xe(Ne){Ne.$multiselectOnSessionChange||(Ne.$onAddRange=Ne.$onAddRange.bind(Ne),Ne.$onRemoveRange=Ne.$onRemoveRange.bind(Ne),Ne.$onMultiSelect=Ne.$onMultiSelect.bind(Ne),Ne.$onSingleSelect=Ne.$onSingleSelect.bind(Ne),Ne.$multiselectOnSessionChange=i.onSessionChange.bind(Ne),Ne.$checkMultiselectChange=Ne.$checkMultiselectChange.bind(Ne),Ne.$multiselectOnSessionChange(Ne),Ne.on("changeSession",Ne.$multiselectOnSessionChange),Ne.on("mousedown",ie),Ne.commands.addCommands(le.defaultCommands),Ie(Ne))}function Ie(Ne){if(!Ne.textInput)return;var Oe=Ne.textInput.getElement(),$e=!1;ae.addListener(Oe,"keydown",function(Ue){var Fe=Ue.keyCode==18&&!(Ue.ctrlKey||Ue.shiftKey||Ue.metaKey);Ne.$blockSelectEnabled&&Fe?$e||(Ne.renderer.setMouseCursor("crosshair"),$e=!0):$e&&Ve()},Ne),ae.addListener(Oe,"keyup",Ve,Ne),ae.addListener(Oe,"blur",Ve,Ne);function Ve(Ue){$e&&(Ne.renderer.setMouseCursor(""),$e=!1)}}i.MultiSelect=xe,r("./config").defineOptions(_e.prototype,"editor",{enableMultiselect:{set:function(Ne){xe(this),Ne?this.on("mousedown",ie):this.off("mousedown",ie)},value:!0},enableBlockSelect:{set:function(Ne){this.$blockSelectEnabled=Ne},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(r,i,g){var $=r("../../range").Range,V=i.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(re,ie,ae){var oe=re.getLine(ae);return this.foldingStartMarker.test(oe)?"start":ie=="markbe
|
|
|
|
|
|
.error_widget_wrapper {
|
|
|
|
|
|
background: inherit;
|
|
|
|
|
|
color: inherit;
|
|
|
|
|
|
border:none
|
|
|
|
|
|
}
|
|
|
|
|
|
.error_widget {
|
|
|
|
|
|
border-top: solid 2px;
|
|
|
|
|
|
border-bottom: solid 2px;
|
|
|
|
|
|
margin: 5px 0;
|
|
|
|
|
|
padding: 10px 40px;
|
|
|
|
|
|
white-space: pre-wrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
|
|
|
|
|
border-color: #ff5a5a
|
|
|
|
|
|
}
|
|
|
|
|
|
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
|
|
|
|
|
border-color: #F1D817
|
|
|
|
|
|
}
|
|
|
|
|
|
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
|
|
|
|
|
border-color: #5a5a5a
|
|
|
|
|
|
}
|
|
|
|
|
|
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
|
|
|
|
|
border-color: #5aaa5a
|
|
|
|
|
|
}
|
|
|
|
|
|
.error_widget_arrow {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
border: solid 5px;
|
|
|
|
|
|
border-top-color: transparent!important;
|
|
|
|
|
|
border-right-color: transparent!important;
|
|
|
|
|
|
border-left-color: transparent!important;
|
|
|
|
|
|
top: -5px;
|
|
|
|
|
|
}
|
|
|
|
|
|
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(r,i,g){r("./loader_build")(i);var $=r("./lib/dom"),V=r("./range").Range,re=r("./editor").Editor,ie=r("./edit_session").EditSession,ae=r("./undomanager").UndoManager,oe=r("./virtual_renderer").VirtualRenderer;r("./worker/worker_client"),r("./keyboard/hash_handler"),r("./placeholder"),r("./multi_select"),r("./mode/folding/fold_mode"),r("./theme/textmate"),r("./ext/error_marker"),i.config=r("./config"),i.edit=function(ue,de){if(typeof ue=="string"){var he=ue;if(ue=document.getElementById(he),!ue)throw new Error("ace.edit can't find div #"+he)}if(ue&&ue.env&&ue.env.editor instanceof re)return ue.env.editor;var pe="";if(ue&&/input|textarea/i.test(ue.tagName)){var _e=ue;pe=_e.value,ue=$.createElement("pre"),_e.parentNode.replaceChild(ue,_e)}else ue&&(pe=ue.textContent,ue.innerHTML="");var Ce=i.createEditSession(pe),xe=new re(new oe(ue),Ce,de),Ie={document:Ce,editor:xe,onResize:xe.resize.bind(xe,null)};return _e&&(Ie.textarea=_e),xe.on("destroy",function(){Ie.editor.container.env=null}),xe.container.env=xe.env=Ie,xe},i.createEditSession=function(ue,de){var he=new ie(ue,de);return he.setUndoManager(new ae),he},i.Range=V,i.Editor=re,i.EditSession=ie,i.UndoManager=ae,i.VirtualRenderer=oe;var le=i.config.version;i.version=le}),function(){ace.require(["ace/ace"],function(r){r&&(r.config.init(!0),r.define=ace.define);var i=function(){return this}();!i&&typeof window<"u"&&(i=window),!i&&typeof self<"u"&&(i=self),i.ace||(i.ace=r);for(var g in r)r.hasOwnProperty(g)&&(i.ace[g]=r[g]);i.ace.default=i.ace,n&&(n.exports=i.ace)})}()})(ace$2);var aceExports=ace$2.exports;const ace$1=getDefaultExportFromCjs(aceExports);var MapShim=function(){if(typeof Map<"u")return Map;function n(t,r){var i=-1;return t.some(function(g,$){return g[0]===r?(i=$,!0):!1}),i}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var i=n(this.__entries__,r),g=this.__entries__[i];return g&&g[1]},t.prototype.set=function(r,i){var g=n(this.__entries__,r);~g?this.__entries__[g][1]=i:this.__entries__.push([r,i])},t.prototype.delete=function(r){var i=this.__entries__,g=n(i,r);~g&&i.splice(g,1)},t.prototype.has=function(r){return!!~n(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,i){i===void 0&&(i=null);for(var g=0,$=this.__entries__;g<$.length;g++){var V=$[g];r.call(i,V[1],V[0])}},t}()}(),isBrowser$1=typeof window<"u"&&typeof document<"u"&&window.document===document,global$1=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),requestAnimationFrame$1$1=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(global$1):function(n){return setTimeout(function(){return n(Date.now())},1e3/60)}}(),trailingTimeout=2;function throttle$2(n,t){var r=!1,i=!1,g=0;function $(){r&&(r=!1,n()),i&&re()}function V(){requestAnimationFrame$1$1($)}function re(){var ie=Date.now();if(r){if(ie-g<trailingTimeout)return;i=!0}else r=!0,i=!1,setTimeout(V,t);g=ie}return re}var REFRESH_DELAY=20,transitionKeys=["top","right","bottom","left","width","height","size","weight"],mutationObserverSupported=typeof MutationObserver<"u",ResizeObserverController=function(){function n(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=throttle$2(this.refresh.bind(this),REFRESH_DELAY)}return n.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observ
|
|
|
|
|
|
`+Ue+"$1"):Fe},CURRENT_LINE:function($e){return $e.session.getLine($e.getCursorPosition().row)},PREV_LINE:function($e){return $e.session.getLine($e.getCursorPosition().row-1)},LINE_INDEX:function($e){return $e.getCursorPosition().row},LINE_NUMBER:function($e){return $e.getCursorPosition().row+1},SOFT_TABS:function($e){return $e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function($e){return $e.session.getTabSize()},CLIPBOARD:function($e){return de.getText&&de.getText()},FILENAME:function($e){return/[^/\\]*$/.exec(this.FILEPATH($e))[0]},FILENAME_BASE:function($e){return/[^/\\]*$/.exec(this.FILEPATH($e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function($e){return this.FILEPATH($e).replace(/[^/\\]*$/,"")},FILEPATH:function($e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function($e){var Ve=$e.session.$mode||{};return Ve.blockComment&&Ve.blockComment.start||""},BLOCK_COMMENT_END:function($e){var Ve=$e.session.$mode||{};return Ve.blockComment&&Ve.blockComment.end||""},LINE_COMMENT:function($e){var Ve=$e.session.$mode||{};return Ve.lineCommentStart||""},CURRENT_YEAR:pe.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:pe.bind(null,{year:"2-digit"}),CURRENT_MONTH:pe.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:pe.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:pe.bind(null,{month:"short"}),CURRENT_DATE:pe.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:pe.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:pe.bind(null,{weekday:"short"}),CURRENT_HOUR:pe.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:pe.bind(null,{minute:"2-digit"}),CURRENT_SECOND:pe.bind(null,{second:"2-digit"})};he.SELECTED_TEXT=he.SELECTION;function pe($e){var Ve=new Date().toLocaleString("en-us",$e);return Ve.length==1?"0"+Ve:Ve}var _e=function(){function $e(){this.snippetMap={},this.snippetNameMap={},this.variables=he}return $e.prototype.getTokenizer=function(){return $e.$tokenizer||this.createTokenizer()},$e.prototype.createTokenizer=function(){function Ve(ze){return ze=ze.substr(1),/^\d+$/.test(ze)?[{tabstopId:parseInt(ze,10)}]:[{text:ze}]}function Ue(ze){return"(?:[^\\\\"+ze+"]|\\\\.)"}var Fe={regex:"/("+Ue("/")+"+)/",onMatch:function(ze,Pt,qe){var Et=qe[0];return Et.fmtString=!0,Et.guard=ze.slice(1,-1),Et.flag="",""},next:"formatString"};return $e.$tokenizer=new ue({start:[{regex:/\\./,onMatch:function(ze,Pt,qe){var Et=ze[1];return(Et=="}"&&qe.length||"`$\\".indexOf(Et)!=-1)&&(ze=Et),[ze]}},{regex:/}/,onMatch:function(ze,Pt,qe){return[qe.length?qe.shift():ze]}},{regex:/\$(?:\d+|\w+)/,onMatch:Ve},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(ze,Pt,qe){var Et=Ve(ze.substr(1));return qe.unshift(Et[0]),Et},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+Ue("\\|")+"*\\|",onMatch:function(ze,Pt,qe){var Et=ze.slice(1,-1).replace(/\\[,|\\]|,/g,function(kt){return kt.length==2?kt[1]:"\0"}).split("\0").map(function(kt){return{value:kt}});return qe[0].choices=Et,[Et[0]]},next:"start"},Fe,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(ze,Pt,qe){return qe.length&&qe[0].expectElse?(qe[0].expectElse=!1,qe[0].ifEnd={elseEnd:qe[0]},[qe[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(ze,Pt,qe){var Et=ze[1];return Et=="}"&&qe.length||"`$\\".indexOf(Et)!=-1?ze=Et:Et=="n"?ze=`
|
|
|
|
|
|
`:Et=="t"?ze=" ":"ulULE".indexOf(Et)!=-1&&(ze={changeCase:Et,local:Et>"a"}),[ze]}},{regex:"/\\w*}",onMatch:function(ze,Pt,qe){var Et=qe.shift();return Et&&(Et.flag=ze.slice(1,-1)),this.next=Et&&Et.tabstopId?"start":"",[Et||ze]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(ze,Pt,qe){return[{text:ze.slice(1)}]}},{regex:/\${\w+/,onMatch:function(ze,Pt,qe){var Et={text:ze.slice(2)};return qe.unshift(Et),[Et]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(ze,Pt,qe){var Et=qe.shift();return this.next=Et&&Et.tabstopId?"start":"",[Et||ze]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(ze,Pt,qe){var Et=qe[0];return Et.formatFunction=ze.slice(2,-1),[qe.shift()]},next:"formatString"},Fe,{regex:/:[\?\-+]?/,onMatch:function(ze,Pt,qe){ze[1]=="+"&&(qe[0].ifEnd=qe[0]),ze[1]=="?"&&(qe[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),$e.$tokenizer},$e.prototype.tokenizeTmSnippet=function(Ve,Ue){return this.getTokenizer().getLineTokens(Ve,Ue).tokens.map(function(Fe){return Fe.value||Fe})},$e.prototype.getVariableValue=function(Ve,Ue,Fe){if(/^\d+$/.test(Ue))return(this.variables.__||{})[Ue]||"";if(/^[A-Z]\d+$/.test(Ue))return(this.variables[Ue[0]+"__"]||{})[Ue.substr(1)]||"";if(Ue=Ue.replace(/^TM_/,""),!this.variables.hasOwnProperty(Ue))return"";var ze=this.variables[Ue];return typeof ze=="function"&&(ze=this.variables[Ue](Ve,Ue,Fe)),ze??""},$e.prototype.tmStrFormat=function(Ve,Ue,Fe){if(!Ue.fmt)return Ve;var ze=Ue.flag||"",Pt=Ue.guard;Pt=new RegExp(Pt,ze.replace(/[^gim]/g,""));var qe=typeof Ue.fmt=="string"?this.tokenizeTmSnippet(Ue.fmt,"formatString"):Ue.fmt,Et=this,kt=Ve.replace(Pt,function(){var At=Et.variables.__;Et.variables.__=[].slice.call(arguments);for(var Dt=Et.resolveVariables(qe,Fe),Lt="E",jt=0;jt<Dt.length;jt++){var hn=Dt[jt];if(typeof hn=="object")if(Dt[jt]="",hn.changeCase&&hn.local){var vn=Dt[jt+1];vn&&typeof vn=="string"&&(hn.changeCase=="u"?Dt[jt]=vn[0].toUpperCase():Dt[jt]=vn[0].toLowerCase(),Dt[jt+1]=vn.substr(1))}else hn.changeCase&&(Lt=hn.changeCase);else Lt=="U"?Dt[jt]=hn.toUpperCase():Lt=="L"&&(Dt[jt]=hn.toLowerCase())}return Et.variables.__=At,Dt.join("")});return kt},$e.prototype.tmFormatFunction=function(Ve,Ue,Fe){return Ue.formatFunction=="upcase"?Ve.toUpperCase():Ue.formatFunction=="downcase"?Ve.toLowerCase():Ve},$e.prototype.resolveVariables=function(Ve,Ue){for(var Fe=[],ze="",Pt=!0,qe=0;qe<Ve.length;qe++){var Et=Ve[qe];if(typeof Et=="string"){Fe.push(Et),Et==`
|
|
|
|
|
|
`?(Pt=!0,ze=""):Pt&&(ze=/^\t*/.exec(Et)[0],Pt=/\S/.test(Et));continue}if(Et){if(Pt=!1,Et.fmtString){var kt=Ve.indexOf(Et,qe+1);kt==-1&&(kt=Ve.length),Et.fmt=Ve.slice(qe+1,kt),qe=kt}if(Et.text){var At=this.getVariableValue(Ue,Et.text,ze)+"";Et.fmtString&&(At=this.tmStrFormat(At,Et,Ue)),Et.formatFunction&&(At=this.tmFormatFunction(At,Et,Ue)),At&&!Et.ifEnd?(Fe.push(At),Dt(Et)):!At&&Et.ifEnd&&Dt(Et.ifEnd)}else Et.elseEnd?Dt(Et.elseEnd):(Et.tabstopId!=null||Et.changeCase!=null)&&Fe.push(Et)}}function Dt(Lt){var jt=Ve.indexOf(Lt,qe+1);jt!=-1&&(qe=jt)}return Fe},$e.prototype.getDisplayTextForSnippet=function(Ve,Ue){var Fe=Ce.call(this,Ve,Ue);return Fe.text},$e.prototype.insertSnippetForSelection=function(Ve,Ue,Fe){Fe===void 0&&(Fe={});var ze=Ce.call(this,Ve,Ue,Fe),Pt=Ve.getSelectionRange(),qe=Ve.session.replace(Pt,ze.text),Et=new xe(Ve),kt=Ve.inVirtualSelectionMode&&Ve.selection.index;Et.addTabstops(ze.tabstops,Pt.start,qe,kt)},$e.prototype.insertSnippet=function(Ve,Ue,Fe){Fe===void 0&&(Fe={});var ze=this;if(Ve.inVirtualSelectionMode)return ze.insertSnippetForSelection(Ve,Ue,Fe);Ve.forEachSelection(function(){ze.insertSnippetForSelection(Ve,Ue,Fe)},null,{keepOrder:!0}),Ve.tabstopManager&&Ve.tabstopManager.tabNext()},$e.prototype.$getScope=function(Ve){var Ue=Ve.session.$mode.$id||"";if(Ue=Ue.split("/").pop(),Ue==="html"||Ue==="php"){Ue==="php"&&!Ve.session.$mode.inlinePhp&&(Ue="html");var Fe=Ve.getCursorPosition(),ze=Ve.session.getState(Fe.row);typeof ze=="object"&&(ze=ze[0]),ze.substring&&(ze.substring(0,3)=="js-"?Ue="javascript":ze.substring(0,4)=="css-"?Ue="css":ze.substring(0,4)=="php-"&&(Ue="php"))}return Ue},$e.prototype.getActiveScopes=function(Ve){var Ue=this.$getScope(Ve),Fe=[Ue],ze=this.snippetMap;return ze[Ue]&&ze[Ue].includeScopes&&Fe.push.apply(Fe,ze[Ue].includeScopes),Fe.push("_"),Fe},$e.prototype.expandWithTab=function(Ve,Ue){var Fe=this,ze=Ve.forEachSelection(function(){return Fe.expandSnippetForSelection(Ve,Ue)},null,{keepOrder:!0});return ze&&Ve.tabstopManager&&Ve.tabstopManager.tabNext(),ze},$e.prototype.expandSnippetForSelection=function(Ve,Ue){var Fe=Ve.getCursorPosition(),ze=Ve.session.getLine(Fe.row),Pt=ze.substring(0,Fe.column),qe=ze.substr(Fe.column),Et=this.snippetMap,kt;return this.getActiveScopes(Ve).some(function(At){var Dt=Et[At];return Dt&&(kt=this.findMatchingSnippet(Dt,Pt,qe)),!!kt},this),kt?(Ue&&Ue.dryRun||(Ve.session.doc.removeInLine(Fe.row,Fe.column-kt.replaceBefore.length,Fe.column+kt.replaceAfter.length),this.variables.M__=kt.matchBefore,this.variables.T__=kt.matchAfter,this.insertSnippetForSelection(Ve,kt.content),this.variables.M__=this.variables.T__=null),!0):!1},$e.prototype.findMatchingSnippet=function(Ve,Ue,Fe){for(var ze=Ve.length;ze--;){var Pt=Ve[ze];if(!(Pt.startRe&&!Pt.startRe.test(Ue))&&!(Pt.endRe&&!Pt.endRe.test(Fe))&&!(!Pt.startRe&&!Pt.endRe))return Pt.matchBefore=Pt.startRe?Pt.startRe.exec(Ue):[""],Pt.matchAfter=Pt.endRe?Pt.endRe.exec(Fe):[""],Pt.replaceBefore=Pt.triggerRe?Pt.triggerRe.exec(Ue)[0]:"",Pt.replaceAfter=Pt.endTriggerRe?Pt.endTriggerRe.exec(Fe)[0]:"",Pt}},$e.prototype.register=function(Ve,Ue){var Fe=this.snippetMap,ze=this.snippetNameMap,Pt=this;Ve||(Ve=[]);function qe(At){return At&&!/^\^?\(.*\)\$?$|^\\b$/.test(At)&&(At="(?:"+At+")"),At||""}function Et(At,Dt,Lt){return At=qe(At),Dt=qe(Dt),Lt?(At=Dt+At,At&&At[At.length-1]!="$"&&(At=At+"$")):(At=At+Dt,At&&At[0]!="^"&&(At="^"+At)),new RegExp(At)}function kt(At){At.scope||(At.scope=Ue||"_"),Ue=At.scope,Fe[Ue]||(Fe[Ue]=[],ze[Ue]={});var Dt=ze[Ue];if(At.name){var Lt=Dt[At.name];Lt&&Pt.unregister(Lt),Dt[At.name]=At}Fe[Ue].push(At),At.prefix&&(At.tabTrigger=At.prefix),!At.content&&At.body&&(At.content=Array.isArray(At.body)?At.body.join(`
|
|
|
|
|
|
`):At.body),At.tabTrigger&&!At.trigger&&(!At.guard&&/^\w/.test(At.tabTrigger)&&(At.guard="\\b"),At.trigger=ie.escapeRegExp(At.tabTrigger)),!(!At.trigger&&!At.guard&&!At.endTrigger&&!At.endGuard)&&(At.startRe=Et(At.trigger,At.guard,!0),At.triggerRe=new RegExp(At.trigger),At.endRe=Et(At.endTrigger,At.endGuard,!0),At.endTriggerRe=new RegExp(At.endTrigger))}Array.isArray(Ve)?Ve.forEach(kt):Object.keys(Ve).forEach(function(At){kt(Ve[At])}),this._signal("registerSnippets",{scope:Ue})},$e.prototype.unregister=function(Ve,Ue){var Fe=this.snippetMap,ze=this.snippetNameMap;function Pt(qe){var Et=ze[qe.scope||Ue];if(Et&&Et[qe.name]){delete Et[qe.name];var kt=Fe[qe.scope||Ue],At=kt&&kt.indexOf(qe);At>=0&&kt.splice(At,1)}}Ve.content?Pt(Ve):Array.isArray(Ve)&&Ve.forEach(Pt)},$e.prototype.parseSnippetFile=function(Ve){Ve=Ve.replace(/\r/g,"");for(var Ue=[],Fe={},ze=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,Pt;Pt=ze.exec(Ve);){if(Pt[1])try{Fe=JSON.parse(Pt[1]),Ue.push(Fe)}catch{}if(Pt[4])Fe.content=Pt[4].replace(/^\t/gm,""),Ue.push(Fe),Fe={};else{var qe=Pt[2],Et=Pt[3];if(qe=="regex"){var kt=/\/((?:[^\/\\]|\\.)*)|$/g;Fe.guard=kt.exec(Et)[1],Fe.trigger=kt.exec(Et)[1],Fe.endTrigger=kt.exec(Et)[1],Fe.endGuard=kt.exec(Et)[1]}else qe=="snippet"?(Fe.tabTrigger=Et.match(/^\S*/)[0],Fe.name||(Fe.name=Et)):qe&&(Fe[qe]=Et)}}return Ue},$e.prototype.getSnippetByName=function(Ve,Ue){var Fe=this.snippetNameMap,ze;return this.getActiveScopes(Ue).some(function(Pt){var qe=Fe[Pt];return qe&&(ze=qe[Ve]),!!ze},this),ze},$e}();V.implement(_e.prototype,re);var Ce=function($e,Ve,Ue){Ue===void 0&&(Ue={});var Fe=$e.getCursorPosition(),ze=$e.session.getLine(Fe.row),Pt=$e.session.getTabString(),qe=ze.match(/^\s*/)[0];Fe.column<qe.length&&(qe=qe.slice(0,Fe.column)),Ve=Ve.replace(/\r/g,"");var Et=this.tokenizeTmSnippet(Ve);Et=this.resolveVariables(Et,$e),Et=Et.map(function(Tn){return Tn==`
|
|
|
|
|
|
`&&!Ue.excludeExtraIndent?Tn+qe:typeof Tn=="string"?Tn.replace(/\t/g,Pt):Tn});var kt=[];Et.forEach(function(Tn,En){if(typeof Tn=="object"){var kn=Tn.tabstopId,$n=kt[kn];if($n||($n=kt[kn]=[],$n.index=kn,$n.value="",$n.parents={}),$n.indexOf(Tn)===-1){Tn.choices&&!$n.choices&&($n.choices=Tn.choices),$n.push(Tn);var An=Et.indexOf(Tn,En+1);if(An!==-1){var xn=Et.slice(En+1,An),Ln=xn.some(function(Nn){return typeof Nn=="object"});Ln&&!$n.value?$n.value=xn:xn.length&&(!$n.value||typeof $n.value!="string")&&($n.value=xn.join(""))}}}}),kt.forEach(function(Tn){Tn.length=0});var At={};function Dt(Tn){for(var En=[],kn=0;kn<Tn.length;kn++){var $n=Tn[kn];if(typeof $n=="object"){if(At[$n.tabstopId])continue;var An=Tn.lastIndexOf($n,kn-1);$n=En[An]||{tabstopId:$n.tabstopId}}En[kn]=$n}return En}for(var Lt=0;Lt<Et.length;Lt++){var jt=Et[Lt];if(typeof jt=="object"){var hn=jt.tabstopId,vn=kt[hn],_n=Et.indexOf(jt,Lt+1);if(At[hn]){At[hn]===jt&&(delete At[hn],Object.keys(At).forEach(function(Tn){vn.parents[Tn]=!0}));continue}At[hn]=jt;var wn=vn.value;typeof wn!="string"?wn=Dt(wn):jt.fmt&&(wn=this.tmStrFormat(wn,jt,$e)),Et.splice.apply(Et,[Lt+1,Math.max(0,_n-Lt)].concat(wn,jt)),vn.indexOf(jt)===-1&&vn.push(jt)}}var bn=0,Cn=0,Sn="";return Et.forEach(function(Tn){if(typeof Tn=="string"){var En=Tn.split(`
|
|
|
|
|
|
`);En.length>1?(Cn=En[En.length-1].length,bn+=En.length-1):Cn+=Tn.length,Sn+=Tn}else Tn&&(Tn.start?Tn.end={row:bn,column:Cn}:Tn.start={row:bn,column:Cn})}),{text:Sn,tabstops:kt,tokens:Et}},xe=function(){function $e(Ve){if(this.index=0,this.ranges=[],this.tabstops=[],Ve.tabstopManager)return Ve.tabstopManager;Ve.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=ie.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(Ve)}return $e.prototype.attach=function(Ve){this.$openTabstops=null,this.selectedTabstop=null,this.editor=Ve,this.session=Ve.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},$e.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},$e.prototype.onChange=function(Ve){for(var Ue=Ve.action[0]=="r",Fe=this.selectedTabstop||{},ze=Fe.parents||{},Pt=this.tabstops.slice(),qe=0;qe<Pt.length;qe++){var Et=Pt[qe],kt=Et==Fe||ze[Et.index];if(Et.rangeList.$bias=kt?0:1,Ve.action=="remove"&&Et!==Fe){var At=Et.parents&&Et.parents[Fe.index],Dt=Et.rangeList.pointIndex(Ve.start,At);Dt=Dt<0?-Dt-1:Dt+1;var Lt=Et.rangeList.pointIndex(Ve.end,At);Lt=Lt<0?-Lt-1:Lt-1;for(var jt=Et.rangeList.ranges.slice(Dt,Lt),hn=0;hn<jt.length;hn++)this.removeRange(jt[hn])}Et.rangeList.$onChange(Ve)}var vn=this.session;!this.$inChange&&Ue&&vn.getLength()==1&&!vn.getValue()&&this.detach()},$e.prototype.updateLinkedFields=function(){var Ve=this.selectedTabstop;if(!(!Ve||!Ve.hasLinkedRanges||!Ve.firstNonLinked)){this.$inChange=!0;for(var Ue=this.session,Fe=Ue.getTextRange(Ve.firstNonLinked),ze=0;ze<Ve.length;ze++){var Pt=Ve[ze];if(Pt.linked){var qe=Pt.original,Et=i.snippetManager.tmStrFormat(Fe,qe,this.editor);Ue.replace(Pt,Et)}}this.$inChange=!1}},$e.prototype.onAfterExec=function(Ve){Ve.command&&!Ve.command.readOnly&&this.updateLinkedFields()},$e.prototype.onChangeSelection=function(){if(this.editor){for(var Ve=this.editor.selection.lead,Ue=this.editor.selection.anchor,Fe=this.editor.selection.isEmpty(),ze=0;ze<this.ranges.length;ze++)if(!this.ranges[ze].linked){var Pt=this.ranges[ze].contains(Ve.row,Ve.column),qe=Fe||this.ranges[ze].contains(Ue.row,Ue.column);if(Pt&&qe)return}this.detach()}},$e.prototype.onChangeSession=function(){this.detach()},$e.prototype.tabNext=function(Ve){var Ue=this.tabstops.length,Fe=this.index+(Ve||1);Fe=Math.min(Math.max(Fe,1),Ue),Fe==Ue&&(Fe=0),this.selectTabstop(Fe),this.updateTabstopMarkers(),Fe===0&&this.detach()},$e.prototype.selectTabstop=function(Ve){this.$openTabstops=null;var Ue=this.tabstops[this.index];if(Ue&&this.addTabstopMarkers(Ue),this.index=Ve,Ue=this.tabstops[this.index],!(!Ue||!Ue.length)){this.selectedTabstop=Ue;var Fe=Ue.firstNonLinked||Ue;if(Ue.choices&&(Fe.cursor=Fe.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(Fe);else{var ze=this.editor.multiSelect;ze.toSingleRange(Fe);for(var Pt=0;Pt<Ue.length;Pt++)Ue.hasLinkedRanges&&Ue[Pt].linked||ze.addRange(Ue[Pt].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},$e.prototype.addTabstops=function(Ve,Ue,Fe){var ze=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!Ve[0]){var Pt=ae.fromPoints(Fe,Fe);Ne(Pt.s
|
|
|
|
|
|
.ace_snippet-marker {
|
|
|
|
|
|
-moz-box-sizing: border-box;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
background: rgba(194, 193, 208, 0.09);
|
|
|
|
|
|
border: 1px dotted rgba(211, 208, 235, 0.62);
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
}`,"snippets.css",!1),i.snippetManager=new _e;var Oe=r("./editor").Editor;(function(){this.insertSnippet=function($e,Ve){return i.snippetManager.insertSnippet(this,$e,Ve)},this.expandSnippet=function($e){return i.snippetManager.expandWithTab(this,$e)}}).call(Oe.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(r,i,g){var $=r("../virtual_renderer").VirtualRenderer,V=r("../editor").Editor,re=r("../range").Range,ie=r("../lib/event"),ae=r("../lib/lang"),oe=r("../lib/dom"),le=r("../config").nls,ue=r("./../lib/useragent"),de=function(Ie){return"suggest-aria-id:".concat(Ie)},he=ue.isSafari?"menu":"listbox",pe=ue.isSafari?"menuitem":"option",_e=ue.isSafari?"aria-current":"aria-selected",Ce=function(Ie){var Ne=new $(Ie);Ne.$maxLines=4;var Oe=new V(Ne);return Oe.setHighlightActiveLine(!1),Oe.setShowPrintMargin(!1),Oe.renderer.setShowGutter(!1),Oe.renderer.setHighlightGutterLine(!1),Oe.$mouseHandler.$focusTimeout=0,Oe.$highlightTagPending=!0,Oe},xe=function(){function Ie(Ne){var Oe=oe.createElement("div"),$e=Ce(Oe);Ne&&Ne.appendChild(Oe),Oe.style.display="none",$e.renderer.content.style.cursor="default",$e.renderer.setStyle("ace_autocomplete"),$e.renderer.$textLayer.element.setAttribute("role",he),$e.renderer.$textLayer.element.setAttribute("aria-roledescription",le("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),$e.renderer.$textLayer.element.setAttribute("aria-label",le("autocomplete.popup.aria-label","Autocomplete suggestions")),$e.renderer.textarea.setAttribute("aria-hidden","true"),$e.setOption("displayIndentGuides",!1),$e.setOption("dragDelay",150);var Ve=function(){};$e.focus=Ve,$e.$isFocused=!0,$e.renderer.$cursorLayer.restartTimer=Ve,$e.renderer.$cursorLayer.element.style.opacity="0",$e.renderer.$maxLines=8,$e.renderer.$keepTextAreaAtCursor=!1,$e.setHighlightActiveLine(!1),$e.session.highlight(""),$e.session.$searchHighlight.clazz="ace_highlight-marker",$e.on("mousedown",function(kt){var At=kt.getDocumentPosition();$e.selection.moveToPosition(At),ze.start.row=ze.end.row=At.row,kt.stop()});var Ue,Fe=new re(-1,0,-1,1/0),ze=new re(-1,0,-1,1/0);ze.id=$e.session.addMarker(ze,"ace_active-line","fullLine"),$e.setSelectOnHover=function(kt){kt?Fe.id&&($e.session.removeMarker(Fe.id),Fe.id=null):Fe.id=$e.session.addMarker(Fe,"ace_line-hover","fullLine")},$e.setSelectOnHover(!1),$e.on("mousemove",function(kt){if(!Ue){Ue=kt;return}if(!(Ue.x==kt.x&&Ue.y==kt.y)){Ue=kt,Ue.scrollTop=$e.renderer.scrollTop,$e.isMouseOver=!0;var At=Ue.getDocumentPosition().row;Fe.start.row!=At&&(Fe.id||$e.setRow(At),qe(At))}}),$e.renderer.on("beforeRender",function(){if(Ue&&Fe.start.row!=-1){Ue.$pos=null;var kt=Ue.getDocumentPosition().row;Fe.id||$e.setRow(kt),qe(kt,!0)}}),$e.renderer.on("afterRender",function(){for(var kt=$e.renderer.$textLayer,At=kt.config.firstRow,Dt=kt.config.lastRow;At<=Dt;At++){var Lt=kt.element.childNodes[At-kt.config.firstRow];Lt.setAttribute("role",pe),Lt.setAttribute("aria-roledescription",le("autocomplete.popup.item.aria-roledescription","item")),Lt.setAttribute("aria-setsize",$e.data.length),Lt.setAttribute("aria-describedby","doc-tooltip"),Lt.setAttribute("aria-posinset",At+1);var jt=$e.getData(At);if(jt){var hn="".concat(jt.caption||jt.value).concat(jt.meta?", ".concat(jt.meta):"");Lt.setAttribute("aria-label",hn)}var vn=Lt.querySelectorAll(".ace_completion-highlight");vn.forEach(function(_n){_n.setAttribute("role","mark")})}}),$e.renderer.on("afterRender",function(){var kt=$e.getRow(),At=$e.renderer.$textLayer,Dt=At.element.childNodes[kt-At.config.firstRow],Lt=document.activeElement;if(Dt!==$e.selectedNode&&$e.selectedNode&&(oe.removeCssClass($e.selectedNode,"ace_selected"),$e.selectedNode.removeAttribute(_e),$e.selectedNode.removeAttribute("id")),Lt.removeAttribute("aria-activedescendant"),$e.selectedNode=Dt,Dt){var jt=de(kt);oe.addCssClass(Dt,"ace_selected"),Dt.id=jt,At.element.setAttribute("aria-activedescendant",jt),Lt.setAttribute("aria-
|
|
|
|
|
|
`,kt.length),-1),$e.data=kt||[],$e.setRow(0)},$e.getData=function(kt){return $e.data[kt]},$e.getRow=function(){return ze.start.row},$e.setRow=function(kt){kt=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,kt)),ze.start.row!=kt&&($e.selection.clearSelection(),ze.start.row=ze.end.row=kt||0,$e.session._emit("changeBackMarker"),$e.moveCursorTo(kt||0,0),$e.isOpen&&$e._signal("select"))},$e.on("changeSelection",function(){$e.isOpen&&$e.setRow($e.selection.lead.row),$e.renderer.scrollCursorIntoView()}),$e.hide=function(){this.container.style.display="none",$e.anchorPos=null,$e.anchor=null,$e.isOpen&&($e.isOpen=!1,this._signal("hide"))},$e.tryShow=function(kt,At,Dt,Lt){if(!Lt&&$e.isOpen&&$e.anchorPos&&$e.anchor&&$e.anchorPos.top===kt.top&&$e.anchorPos.left===kt.left&&$e.anchor===Dt)return!0;var jt=this.container,hn=this.renderer.scrollBar.width||10,vn=window.innerHeight-hn,_n=window.innerWidth-hn,wn=this.renderer,bn=wn.$maxLines*At*1.4,Cn={top:0,bottom:0,left:0},Sn=vn-kt.top-3*this.$borderSize-At,Tn=kt.top-3*this.$borderSize;Dt||(Tn<=Sn||Sn>=bn?Dt="bottom":Dt="top"),Dt==="top"?(Cn.bottom=kt.top-this.$borderSize,Cn.top=Cn.bottom-bn):Dt==="bottom"&&(Cn.top=kt.top+At+this.$borderSize,Cn.bottom=Cn.top+bn);var En=Cn.top>=0&&Cn.bottom<=vn;if(!Lt&&!En)return!1;En?wn.$maxPixelHeight=null:Dt==="top"?wn.$maxPixelHeight=Tn:wn.$maxPixelHeight=Sn,Dt==="top"?(jt.style.top="",jt.style.bottom=vn+hn-Cn.bottom+"px",$e.isTopdown=!1):(jt.style.top=Cn.top+"px",jt.style.bottom="",$e.isTopdown=!0),jt.style.display="";var kn=kt.left;return kn+jt.offsetWidth>_n&&(kn=_n-jt.offsetWidth),jt.style.left=kn+"px",jt.style.right="",oe.$fixPositionBug(jt),$e.isOpen||($e.isOpen=!0,this._signal("show"),Ue=null),$e.anchorPos=kt,$e.anchor=Dt,!0},$e.show=function(kt,At,Dt){this.tryShow(kt,At,Dt?"bottom":void 0,!0)},$e.goTo=function(kt){var At=this.getRow(),Dt=this.session.getLength()-1;switch(kt){case"up":At=At<=0?Dt:At-1;break;case"down":At=At>=Dt?-1:At+1;break;case"start":At=0;break;case"end":At=Dt;break}this.setRow(At)},$e.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},$e.$imageSize=0,$e.$borderSize=1,$e}return Ie}();oe.importCssString(`
|
|
|
|
|
|
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
|
|
|
|
|
background-color: #CAD6FA;
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
|
|
|
|
|
background-color: #3a674e;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_editor.ace_autocomplete .ace_line-hover {
|
|
|
|
|
|
border: 1px solid #abbffe;
|
|
|
|
|
|
margin-top: -1px;
|
|
|
|
|
|
background: rgba(233,233,253,0.4);
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
z-index: 2;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
|
|
|
|
|
|
border: 1px solid rgba(109, 150, 13, 0.8);
|
|
|
|
|
|
background: rgba(58, 103, 78, 0.62);
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_completion-meta {
|
|
|
|
|
|
opacity: 0.5;
|
|
|
|
|
|
margin-left: 0.9em;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_completion-message {
|
|
|
|
|
|
margin-left: 0.9em;
|
|
|
|
|
|
color: blue;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_editor.ace_autocomplete .ace_completion-highlight{
|
|
|
|
|
|
color: #2d69c7;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
|
|
|
|
|
|
color: #93ca12;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_editor.ace_autocomplete {
|
|
|
|
|
|
width: 300px;
|
|
|
|
|
|
z-index: 200000;
|
|
|
|
|
|
border: 1px lightgray solid;
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
|
|
|
|
|
line-height: 1.4;
|
|
|
|
|
|
background: #fefefe;
|
|
|
|
|
|
color: #111;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_dark.ace_editor.ace_autocomplete {
|
|
|
|
|
|
border: 1px #484747 solid;
|
|
|
|
|
|
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
|
|
|
|
|
|
line-height: 1.4;
|
|
|
|
|
|
background: #25282c;
|
|
|
|
|
|
color: #c1c1c1;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_autocomplete .ace_text-layer {
|
|
|
|
|
|
width: calc(100% - 8px);
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_autocomplete .ace_line {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_autocomplete .ace_line > * {
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
flex: 0 0 auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_autocomplete .ace_line .ace_ {
|
|
|
|
|
|
flex: 0 1 auto;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_autocomplete .ace_completion-spacer {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ace_autocomplete.ace_loading:after {
|
|
|
|
|
|
content: "";
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 0px;
|
|
|
|
|
|
height: 2px;
|
|
|
|
|
|
width: 8%;
|
|
|
|
|
|
background: blue;
|
|
|
|
|
|
z-index: 100;
|
|
|
|
|
|
animation: ace_progress 3s infinite linear;
|
|
|
|
|
|
animation-delay: 300ms;
|
|
|
|
|
|
transform: translateX(-100%) scaleX(1);
|
|
|
|
|
|
}
|
|
|
|
|
|
@keyframes ace_progress {
|
|
|
|
|
|
0% { transform: translateX(-100%) scaleX(1) }
|
|
|
|
|
|
50% { transform: translateX(625%) scaleX(2) }
|
|
|
|
|
|
100% { transform: translateX(1500%) scaleX(3) }
|
|
|
|
|
|
}
|
|
|
|
|
|
@media (prefers-reduced-motion) {
|
|
|
|
|
|
.ace_autocomplete.ace_loading:after {
|
|
|
|
|
|
transform: translateX(625%) scaleX(2);
|
|
|
|
|
|
animation: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
`,"autocompletion.css",!1),i.AcePopup=xe,i.$singleLineEditor=Ce,i.getAriaId=de}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(r,i,g){var $=function(){function V(re){this.editor=re,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return V.prototype.setScreenReaderContent=function(re){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var ae=this.popup.getRow(),oe=this.popup.renderer.$textLayer,le=oe.element.childNodes[ae-oe.config.firstRow];if(le){for(var ue="doc-tooltip ",de=0;de<this._lines.length;de++)ue+="ace-inline-screenreader-line-".concat(de," ");le.setAttribute("aria-describedby",ue)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=re.split(/\r\n|\r|\n/);var ie=this.createCodeBlock();this.screenReaderDiv.appendChild(ie)},V.prototype.destroy=function(){this.screenReaderDiv.remove()},V.prototype.createCodeBlock=function(){var re=document.createElement("pre");re.setAttribute("id","ace-inline-screenreader");for(var ie=0;ie<this._lines.length;ie++){var ae=document.createElement("code");ae.setAttribute("id","ace-inline-screenreader-line-".concat(ie));var oe=document.createTextNode(this._lines[ie]);ae.appendChild(oe),re.appendChild(ae)}return re},V}();i.AceInlineScreenReader=$}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(r,i,g){var $=r("../snippets").snippetManager,V=r("./inline_screenreader").AceInlineScreenReader,re=function(){function ie(){this.editor=null}return ie.prototype.show=function(ae,oe,le){if(le=le||"",ae&&this.editor&&this.editor!==ae&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!ae||!oe)return!1;this.inlineScreenReader||(this.inlineScreenReader=new V(ae));var ue=oe.snippet?$.getDisplayTextForSnippet(ae,oe.snippet):oe.value;return oe.hideInlinePreview||!ue||!ue.startsWith(le)?!1:(this.editor=ae,this.inlineScreenReader.setScreenReaderContent(ue),ue=ue.slice(le.length),ue===""?ae.removeGhostText():ae.setGhostText(ue),!0)},ie.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},ie.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},ie.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},ie}();i.AceInline=re}),ace.define("ace/autocomplete/util",["require","exports","module"],function(r,i,g){i.parForEach=function(V,re,ie){var ae=0,oe=V.length;oe===0&&ie();for(var le=0;le<oe;le++)re(V[le],function(ue,de){ae++,ae===oe&&ie(ue,de)})};var $=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;i.retrievePrecedingIdentifier=function(V,re,ie){ie=ie||$;for(var ae=[],oe=re-1;oe>=0&&ie.test(V[oe]);oe--)ae.push(V[oe]);return ae.reverse().join("")},i.retrieveFollowingIdentifier=function(V,re,ie){ie=ie||$;for(var ae=[],oe=re;oe<V.length&&ie.test(V[oe]);oe++)ae.push(V[oe]);return ae},i.getCompletionPrefix=function(V){var re=V.getCursorPosition(),ie=V.session.getLine(re.row),ae;return V.completers.forEach((function(oe){oe.identifierRegexps&&oe.identifierRegexps.forEach((function(le){!ae&&le&&(ae=this.retrievePrecedingIdentifier(ie,re.column,le))}).bind(this))}).bind(this)),ae||this.retrievePrecedingIdentifier(ie,re.column)},i.triggerAutocomplete=function(V,ie){var ie=ie??V.session.getPrecedingCharacter();return V.completers.some(function(ae){if(ae.triggerCharacters&&Array.isArray(ae.triggerCharacters))return ae.triggerCharacters.includes(ie)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(r,i,
|
|
|
|
|
|
confirmButtonText: 'OK',
|
|
|
|
|
|
callback: (action) => {
|
|
|
|
|
|
console.log(action)
|
|
|
|
|
|
},
|
|
|
|
|
|
})`,score:1e3,meta:"消息弹出框"},{name:"$item_info",value:"$item_info",score:1e3,meta:"回调函数中获取当前触发事件图形的信息"}])}});/*!
|
|
|
|
|
|
* pinia v3.0.4
|
|
|
|
|
|
* (c) 2025 Eduardo San Martin Morote
|
|
|
|
|
|
* @license MIT
|
|
|
|
|
|
*/let activePinia;const setActivePinia=n=>activePinia=n,piniaSymbol=Symbol();function isPlainObject$1(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}var MutationType;(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(MutationType||(MutationType={}));function createPinia(){const n=effectScope(!0),t=n.run(()=>ref({}));let r=[],i=[];const g=markRaw({install($){setActivePinia(g),g._a=$,$.provide(piniaSymbol,g),$.config.globalProperties.$pinia=g,i.forEach(V=>r.push(V)),i=[]},use($){return this._a?r.push($):i.push($),this},_p:r,_a:null,_e:n,_s:new Map,state:t});return g}const noop$3=()=>{};function addSubscription(n,t,r,i=noop$3){n.add(t);const g=()=>{n.delete(t)&&i()};return!r&&getCurrentScope()&&onScopeDispose(g),g}function triggerSubscriptions(n,...t){n.forEach(r=>{r(...t)})}const fallbackRunWithContext=n=>n(),ACTION_MARKER=Symbol(),ACTION_NAME=Symbol();function mergeReactiveObjects(n,t){n instanceof Map&&t instanceof Map?t.forEach((r,i)=>n.set(i,r)):n instanceof Set&&t instanceof Set&&t.forEach(n.add,n);for(const r in t){if(!t.hasOwnProperty(r))continue;const i=t[r],g=n[r];isPlainObject$1(g)&&isPlainObject$1(i)&&n.hasOwnProperty(r)&&!isRef(i)&&!isReactive(i)?n[r]=mergeReactiveObjects(g,i):n[r]=i}return n}const skipHydrateSymbol=Symbol();function shouldHydrate(n){return!isPlainObject$1(n)||!Object.prototype.hasOwnProperty.call(n,skipHydrateSymbol)}const{assign:assign$1}=Object;function isComputed(n){return!!(isRef(n)&&n.effect)}function createOptionsStore(n,t,r,i){const{state:g,actions:$,getters:V}=t,re=r.state.value[n];let ie;function ae(){re||(r.state.value[n]=g?g():{});const oe=toRefs(r.state.value[n]);return assign$1(oe,$,Object.keys(V||{}).reduce((le,ue)=>(le[ue]=markRaw(computed(()=>{setActivePinia(r);const de=r._s.get(n);return V[ue].call(de,de)})),le),{}))}return ie=createSetupStore(n,ae,t,r,i,!0),ie}function createSetupStore(n,t,r={},i,g,$){let V;const re=assign$1({actions:{}},r),ie={deep:!0};let ae,oe,le=new Set,ue=new Set,de;const he=i.state.value[n];!$&&!he&&(i.state.value[n]={}),ref({});let pe;function _e(Ue){let Fe;ae=oe=!1,typeof Ue=="function"?(Ue(i.state.value[n]),Fe={type:MutationType.patchFunction,storeId:n,events:de}):(mergeReactiveObjects(i.state.value[n],Ue),Fe={type:MutationType.patchObject,payload:Ue,storeId:n,events:de});const ze=pe=Symbol();nextTick().then(()=>{pe===ze&&(ae=!0)}),oe=!0,triggerSubscriptions(le,Fe,i.state.value[n])}const Ce=$?function(){const{state:Fe}=r,ze=Fe?Fe():{};this.$patch(Pt=>{assign$1(Pt,ze)})}:noop$3;function xe(){V.stop(),le.clear(),ue.clear(),i._s.delete(n)}const Ie=(Ue,Fe="")=>{if(ACTION_MARKER in Ue)return Ue[ACTION_NAME]=Fe,Ue;const ze=function(){setActivePinia(i);const Pt=Array.from(arguments),qe=new Set,Et=new Set;function kt(Lt){qe.add(Lt)}function At(Lt){Et.add(Lt)}triggerSubscriptions(ue,{args:Pt,name:ze[ACTION_NAME],store:Oe,after:kt,onError:At});let Dt;try{Dt=Ue.apply(this&&this.$id===n?this:Oe,Pt)}catch(Lt){throw triggerSubscriptions(Et,Lt),Lt}return Dt instanceof Promise?Dt.then(Lt=>(triggerSubscriptions(qe,Lt),Lt)).catch(Lt=>(triggerSubscriptions(Et,Lt),Promise.reject(Lt))):(triggerSubscriptions(qe,Dt),Dt)};return ze[ACTION_MARKER]=!0,ze[ACTION_NAME]=Fe,ze},Ne={_p:i,$id:n,$onAction:addSubscription.bind(null,ue),$patch:_e,$reset:Ce,$subscribe(Ue,Fe={}){const ze=addSubscription(le,Ue,Fe.detached,()=>Pt()),Pt=V.run(()=>watch(()=>i.state.value[n],qe=>{(Fe.flush==="sync"?oe:ae)&&Ue({storeId:n,type:MutationType.direct,events:de},qe)},assign$1({},ie,Fe)));return ze},$dispose:xe},Oe=reactive(Ne);i._s.set(n,Oe);const Ve=(i._a&&i._a.runWithContext||fallbackRunWithContext)(()=>i._e.run(()=>(V=effectScope()).run(()=>t({action:Ie}))));for(const Ue in Ve){const Fe=Ve[Ue];if(isRef(Fe)&&!isComputed(Fe)||isReactive(Fe))$||(he&&shouldHydrate(Fe)&&(isRef(Fe)?Fe.value=he[Ue]:mergeReactiveObjects(Fe,he[Ue])),i.state.value[n][Ue]=Fe);else if(typeof Fe=="function"){const ze=Ie(Fe,Ue);Ve[Ue]=ze,re.actions[Ue]=Fe}}return assign$1(Oe,Ve),assign$1(toRaw(Oe),Ve),Object.defi
|
|
|
|
|
|
* vue-router v4.6.4
|
|
|
|
|
|
* (c) 2025 Eduardo San Martin Morote
|
|
|
|
|
|
* @license MIT
|
|
|
|
|
|
*/const isBrowser=typeof document<"u";function isRouteComponent(n){return typeof n=="object"||"displayName"in n||"props"in n||"__vccOpts"in n}function isESModule(n){return n.__esModule||n[Symbol.toStringTag]==="Module"||n.default&&isRouteComponent(n.default)}const assign=Object.assign;function applyToParams(n,t){const r={};for(const i in t){const g=t[i];r[i]=isArray$2(g)?g.map(n):n(g)}return r}const noop$2=()=>{},isArray$2=Array.isArray;function mergeOptions(n,t){const r={};for(const i in n)r[i]=i in t?t[i]:n[i];return r}const HASH_RE=/#/g,AMPERSAND_RE=/&/g,SLASH_RE=/\//g,EQUAL_RE=/=/g,IM_RE=/\?/g,PLUS_RE=/\+/g,ENC_BRACKET_OPEN_RE=/%5B/g,ENC_BRACKET_CLOSE_RE=/%5D/g,ENC_CARET_RE=/%5E/g,ENC_BACKTICK_RE=/%60/g,ENC_CURLY_OPEN_RE=/%7B/g,ENC_PIPE_RE=/%7C/g,ENC_CURLY_CLOSE_RE=/%7D/g,ENC_SPACE_RE=/%20/g;function commonEncode(n){return n==null?"":encodeURI(""+n).replace(ENC_PIPE_RE,"|").replace(ENC_BRACKET_OPEN_RE,"[").replace(ENC_BRACKET_CLOSE_RE,"]")}function encodeHash(n){return commonEncode(n).replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryValue(n){return commonEncode(n).replace(PLUS_RE,"%2B").replace(ENC_SPACE_RE,"+").replace(HASH_RE,"%23").replace(AMPERSAND_RE,"%26").replace(ENC_BACKTICK_RE,"`").replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryKey(n){return encodeQueryValue(n).replace(EQUAL_RE,"%3D")}function encodePath(n){return commonEncode(n).replace(HASH_RE,"%23").replace(IM_RE,"%3F")}function encodeParam(n){return encodePath(n).replace(SLASH_RE,"%2F")}function decode(n){if(n==null)return null;try{return decodeURIComponent(""+n)}catch{}return""+n}const TRAILING_SLASH_RE=/\/$/,removeTrailingSlash=n=>n.replace(TRAILING_SLASH_RE,"");function parseURL(n,t,r="/"){let i,g={},$="",V="";const re=t.indexOf("#");let ie=t.indexOf("?");return ie=re>=0&&ie>re?-1:ie,ie>=0&&(i=t.slice(0,ie),$=t.slice(ie,re>0?re:t.length),g=n($.slice(1))),re>=0&&(i=i||t.slice(0,re),V=t.slice(re,t.length)),i=resolveRelativePath(i??t,r),{fullPath:i+$+V,path:i,query:g,hash:decode(V)}}function stringifyURL(n,t){const r=t.query?n(t.query):"";return t.path+(r&&"?")+r+(t.hash||"")}function stripBase(n,t){return!t||!n.toLowerCase().startsWith(t.toLowerCase())?n:n.slice(t.length)||"/"}function isSameRouteLocation(n,t,r){const i=t.matched.length-1,g=r.matched.length-1;return i>-1&&i===g&&isSameRouteRecord(t.matched[i],r.matched[g])&&isSameRouteLocationParams(t.params,r.params)&&n(t.query)===n(r.query)&&t.hash===r.hash}function isSameRouteRecord(n,t){return(n.aliasOf||n)===(t.aliasOf||t)}function isSameRouteLocationParams(n,t){if(Object.keys(n).length!==Object.keys(t).length)return!1;for(var r in n)if(!isSameRouteLocationParamsValue(n[r],t[r]))return!1;return!0}function isSameRouteLocationParamsValue(n,t){return isArray$2(n)?isEquivalentArray(n,t):isArray$2(t)?isEquivalentArray(t,n):(n==null?void 0:n.valueOf())===(t==null?void 0:t.valueOf())}function isEquivalentArray(n,t){return isArray$2(t)?n.length===t.length&&n.every((r,i)=>r===t[i]):n.length===1&&n[0]===t}function resolveRelativePath(n,t){if(n.startsWith("/"))return n;if(!n)return t;const r=t.split("/"),i=n.split("/"),g=i[i.length-1];(g===".."||g===".")&&i.push("");let $=r.length-1,V,re;for(V=0;V<i.length;V++)if(re=i[V],re!==".")if(re==="..")$>1&&$--;else break;return r.slice(0,$).join("/")+"/"+i.slice(V).join("/")}const START_LOCATION_NORMALIZED={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let NavigationType=function(n){return n.pop="pop",n.push="push",n}({}),NavigationDirection=function(n){return n.back="back",n.forward="forward",n.unknown="",n}({});function normalizeBase(n){if(!n)if(isBrowser){const t=document.querySelector("base");n=t&&t.getAttribute("href")||"/",n=n.replace(/^\w+:\/\/[^\/]+/,"")}else n="/";return n[0]!=="/"&&n[0]!=="#"&&(n="/"+n),removeTrailingSlash(n)}const BEFORE_HASH_RE=/^[^#]+#/;function createHref(n,t){return n.replace(BEFORE_HASH_RE,"#")+t}function getElementPosition(n,t){const r=document.documentElem
|
|
|
|
|
|
* vue-router v4.6.4
|
|
|
|
|
|
* (c) 2025 Eduardo San Martin Morote
|
|
|
|
|
|
* @license MIT
|
|
|
|
|
|
*/let createBaseLocation=()=>location.protocol+"//"+location.host;function createCurrentLocation(n,t){const{pathname:r,search:i,hash:g}=t,$=n.indexOf("#");if($>-1){let V=g.includes(n.slice($))?n.slice($).length:1,re=g.slice(V);return re[0]!=="/"&&(re="/"+re),stripBase(re,"")}return stripBase(r,n)+i+g}function useHistoryListeners(n,t,r,i){let g=[],$=[],V=null;const re=({state:ue})=>{const de=createCurrentLocation(n,location),he=r.value,pe=t.value;let _e=0;if(ue){if(r.value=de,t.value=ue,V&&V===he){V=null;return}_e=pe?ue.position-pe.position:0}else i(de);g.forEach(Ce=>{Ce(r.value,he,{delta:_e,type:NavigationType.pop,direction:_e?_e>0?NavigationDirection.forward:NavigationDirection.back:NavigationDirection.unknown})})};function ie(){V=r.value}function ae(ue){g.push(ue);const de=()=>{const he=g.indexOf(ue);he>-1&&g.splice(he,1)};return $.push(de),de}function oe(){if(document.visibilityState==="hidden"){const{history:ue}=window;if(!ue.state)return;ue.replaceState(assign({},ue.state,{scroll:computeScrollPosition()}),"")}}function le(){for(const ue of $)ue();$=[],window.removeEventListener("popstate",re),window.removeEventListener("pagehide",oe),document.removeEventListener("visibilitychange",oe)}return window.addEventListener("popstate",re),window.addEventListener("pagehide",oe),document.addEventListener("visibilitychange",oe),{pauseListeners:ie,listen:ae,destroy:le}}function buildState(n,t,r,i=!1,g=!1){return{back:n,current:t,forward:r,replaced:i,position:window.history.length,scroll:g?computeScrollPosition():null}}function useHistoryStateNavigation(n){const{history:t,location:r}=window,i={value:createCurrentLocation(n,r)},g={value:t.state};g.value||$(i.value,{back:null,current:i.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function $(ie,ae,oe){const le=n.indexOf("#"),ue=le>-1?(r.host&&document.querySelector("base")?n:n.slice(le))+ie:createBaseLocation()+n+ie;try{t[oe?"replaceState":"pushState"](ae,"",ue),g.value=ae}catch(de){console.error(de),r[oe?"replace":"assign"](ue)}}function V(ie,ae){$(ie,assign({},t.state,buildState(g.value.back,ie,g.value.forward,!0),ae,{position:g.value.position}),!0),i.value=ie}function re(ie,ae){const oe=assign({},g.value,t.state,{forward:ie,scroll:computeScrollPosition()});$(oe.current,oe,!0),$(ie,assign({},buildState(i.value,ie,null),{position:oe.position+1},ae),!1),i.value=ie}return{location:i,state:g,push:re,replace:V}}function createWebHistory(n){n=normalizeBase(n);const t=useHistoryStateNavigation(n),r=useHistoryListeners(n,t.state,t.location,t.replace);function i($,V=!0){V||r.pauseListeners(),history.go($)}const g=assign({location:"",base:n,go:i,createHref:createHref.bind(null,n)},t,r);return Object.defineProperty(g,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(g,"state",{enumerable:!0,get:()=>t.state.value}),g}let TokenType=function(n){return n[n.Static=0]="Static",n[n.Param=1]="Param",n[n.Group=2]="Group",n}({});var TokenizerState=function(n){return n[n.Static=0]="Static",n[n.Param=1]="Param",n[n.ParamRegExp=2]="ParamRegExp",n[n.ParamRegExpEnd=3]="ParamRegExpEnd",n[n.EscapeNext=4]="EscapeNext",n}(TokenizerState||{});const ROOT_TOKEN={type:TokenType.Static,value:""},VALID_PARAM_RE=/[a-zA-Z0-9_]/;function tokenizePath(n){if(!n)return[[]];if(n==="/")return[[ROOT_TOKEN]];if(!n.startsWith("/"))throw new Error(`Invalid path "${n}"`);function t(de){throw new Error(`ERR (${r})/"${ae}": ${de}`)}let r=TokenizerState.Static,i=r;const g=[];let $;function V(){$&&g.push($),$=[]}let re=0,ie,ae="",oe="";function le(){ae&&(r===TokenizerState.Static?$.push({type:TokenType.Static,value:ae}):r===TokenizerState.Param||r===TokenizerState.ParamRegExp||r===TokenizerState.ParamRegExpEnd?($.length>1&&(ie==="*"||ie==="+")&&t(`A repeatable param (${ae}) must be alone in its segment. eg: '/:ids+.`),$.push({type:TokenType.Param,value:ae,regexp:oe,repeatable:ie==="*"||ie==="+",optional:ie==="*"||ie==="?"})):t("Invalid state to consume buffer"),ae="")}function ue(){ae+=ie}for(;re<n.length;){if(ie=n[re++],ie==="\\"&&r!==TokenizerState.ParamRegExp){i=r,r=TokenizerState
|
|
|
|
|
|
`).forEach(function(V){g=V.indexOf(":"),r=V.substring(0,g).trim().toLowerCase(),i=V.substring(g+1).trim(),!(!r||t[r]&&ignoreDuplicateOf[r])&&(r==="set-cookie"?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)}),t},$internals=Symbol("internals");function normalizeHeader(n){return n&&String(n).trim().toLowerCase()}function normalizeValue(n){return n===!1||n==null?n:utils$1.isArray(n)?n.map(normalizeValue):String(n)}function parseTokens(n){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=r.exec(n);)t[i[1]]=i[2];return t}const isValidHeaderName=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function matchHeaderValue(n,t,r,i,g){if(utils$1.isFunction(i))return i.call(this,t,r);if(g&&(t=r),!!utils$1.isString(t)){if(utils$1.isString(i))return t.indexOf(i)!==-1;if(utils$1.isRegExp(i))return i.test(t)}}function formatHeader(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,i)=>r.toUpperCase()+i)}function buildAccessors(n,t){const r=utils$1.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+r,{value:function(g,$,V){return this[i].call(this,t,g,$,V)},configurable:!0})})}class AxiosHeaders{constructor(t){t&&this.set(t)}set(t,r,i){const g=this;function $(re,ie,ae){const oe=normalizeHeader(ie);if(!oe)throw new Error("header name must be a non-empty string");const le=utils$1.findKey(g,oe);(!le||g[le]===void 0||ae===!0||ae===void 0&&g[le]!==!1)&&(g[le||ie]=normalizeValue(re))}const V=(re,ie)=>utils$1.forEach(re,(ae,oe)=>$(ae,oe,ie));if(utils$1.isPlainObject(t)||t instanceof this.constructor)V(t,r);else if(utils$1.isString(t)&&(t=t.trim())&&!isValidHeaderName(t))V(parseHeaders(t),r);else if(utils$1.isObject(t)&&utils$1.isIterable(t)){let re={},ie,ae;for(const oe of t){if(!utils$1.isArray(oe))throw TypeError("Object iterator must return a key-value pair");re[ae=oe[0]]=(ie=re[ae])?utils$1.isArray(ie)?[...ie,oe[1]]:[ie,oe[1]]:oe[1]}V(re,r)}else t!=null&&$(r,t,i);return this}get(t,r){if(t=normalizeHeader(t),t){const i=utils$1.findKey(this,t);if(i){const g=this[i];if(!r)return g;if(r===!0)return parseTokens(g);if(utils$1.isFunction(r))return r.call(this,g,i);if(utils$1.isRegExp(r))return r.exec(g);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=normalizeHeader(t),t){const i=utils$1.findKey(this,t);return!!(i&&this[i]!==void 0&&(!r||matchHeaderValue(this,this[i],i,r)))}return!1}delete(t,r){const i=this;let g=!1;function $(V){if(V=normalizeHeader(V),V){const re=utils$1.findKey(i,V);re&&(!r||matchHeaderValue(i,i[re],re,r))&&(delete i[re],g=!0)}}return utils$1.isArray(t)?t.forEach($):$(t),g}clear(t){const r=Object.keys(this);let i=r.length,g=!1;for(;i--;){const $=r[i];(!t||matchHeaderValue(this,this[$],$,t,!0))&&(delete this[$],g=!0)}return g}normalize(t){const r=this,i={};return utils$1.forEach(this,(g,$)=>{const V=utils$1.findKey(i,$);if(V){r[V]=normalizeValue(g),delete r[$];return}const re=t?formatHeader($):String($).trim();re!==$&&delete r[$],r[re]=normalizeValue(g),i[re]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return utils$1.forEach(this,(i,g)=>{i!=null&&i!==!1&&(r[g]=t&&utils$1.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
|
|
|
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const i=new this(t);return r.forEach(g=>i.set(g)),i}static accessor(t){const i=(this[$internals]=this[$internals]={accessors:{}}).accessors,g=this.prototype;function $(V){const re=normalizeHeader(V);i[re]||(buildAccessors(g,V),i[re]=!0)}return utils$1.isArray(t)?t.forEach($):$(t),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$1.reduceDescriptors(AxiosHeaders.prototype,({value:n},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(i){this[r]=i}}});utils$1.freezeMethods(AxiosHeaders);const AxiosHeaders$1=AxiosHeaders;function transformData(n,t){const r=this||defaults$2,i=t||r,g=AxiosHeaders$1.from(i.headers);let $=i.data;return utils$1.forEach(n,function(re){$=re.call(r,$,g.normalize(),t?t.status:void 0)}),g.normalize(),$}function isCancel(n){return!!(n&&n.__CANCEL__)}function CanceledError(n,t,r){AxiosError.call(this,n??"canceled",AxiosError.ERR_CANCELED,t,r),this.name="CanceledError"}utils$1.inherits(CanceledError,AxiosError,{__CANCEL__:!0});function settle(n,t,r){const i=r.config.validateStatus;!r.status||!i||i(r.status)?n(r):t(new AxiosError("Request failed with status code "+r.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function parseProtocol(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function speedometer(n,t){n=n||10;const r=new Array(n),i=new Array(n);let g=0,$=0,V;return t=t!==void 0?t:1e3,function(ie){const ae=Date.now(),oe=i[$];V||(V=ae),r[g]=ie,i[g]=ae;let le=$,ue=0;for(;le!==g;)ue+=r[le++],le=le%n;if(g=(g+1)%n,g===$&&($=($+1)%n),ae-V<t)return;const de=oe&&ae-oe;return de?Math.round(ue*1e3/de):void 0}}function throttle$1(n,t){let r=0,i=1e3/t,g,$;const V=(ae,oe=Date.now())=>{r=oe,g=null,$&&(clearTimeout($),$=null),n(...ae)};return[(...ae)=>{const oe=Date.now(),le=oe-r;le>=i?V(ae,oe):(g=ae,$||($=setTimeout(()=>{$=null,V(g)},i-le)))},()=>g&&V(g)]}const progressEventReducer=(n,t,r=3)=>{let i=0;const g=speedometer(50,250);return throttle$1($=>{const V=$.loaded,re=$.lengthComputable?$.total:void 0,ie=V-i,ae=g(ie),oe=V<=re;i=V;const le={loaded:V,total:re,progress:re?V/re:void 0,bytes:ie,rate:ae||void 0,estimated:ae&&re&&oe?(re-V)/ae:void 0,event:$,lengthComputable:re!=null,[t?"download":"upload"]:!0};n(le)},r)},progressEventDecorator=(n,t)=>{const r=n!=null;return[i=>t[0]({lengthComputable:r,total:n,loaded:i}),t[1]]},asyncDecorator=n=>(...t)=>utils$1.asap(()=>n(...t)),isURLSameOrigin=platform$1.hasStandardBrowserEnv?((n,t)=>r=>(r=new URL(r,platform$1.origin),n.protocol===r.protocol&&n.host===r.host&&(t||n.port===r.port)))(new URL(platform$1.origin),platform$1.navigator&&/(msie|trident)/i.test(platform$1.navigator.userAgent)):()=>!0,cookies=platform$1.hasStandardBrowserEnv?{write(n,t,r,i,g,$,V){if(typeof document>"u")return;const re=[`${n}=${encodeURIComponent(t)}`];utils$1.isNumber(r)&&re.push(`expires=${new Date(r).toUTCString()}`),utils$1.isString(i)&&re.push(`path=${i}`),utils$1.isString(g)&&re.push(`domain=${g}`),$===!0&&re.push("secure"),utils$1.isString(V)&&re.push(`SameSite=${V}`),document.cookie=re.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function combineURLs(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function buildFullPath(n,t,r){let i=!isAbsoluteURL(t);return n&&(i||r==!1)?combineURLs(n,t):t}const headersToObject=n=>n instanceof AxiosHeaders$1?{...n}:n;function mergeConfig(n,t){t=t||{};const r={};function i(ae,oe,le,ue){return utils$1.isPlainObject(ae)&&utils$1.isPlainObject(oe)?utils$1.merge.call({caseless:ue},ae,oe):utils$1.isPlainObject(oe)?utils$1.merge({
|
|
|
|
|
|
`+V.map(renderReason).join(`
|
|
|
|
|
|
`):" "+renderReason(V[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+re,"ERR_NOT_SUPPORT")}return g}const adapters={getAdapter,adapters:knownAdapters};function throwIfCancellationRequested(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new CanceledError(null,n)}function dispatchRequest(n){return throwIfCancellationRequested(n),n.headers=AxiosHeaders$1.from(n.headers),n.data=transformData.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(n.adapter||defaults$2.adapter,n)(n).then(function(i){return throwIfCancellationRequested(n),i.data=transformData.call(n,n.transformResponse,i),i.headers=AxiosHeaders$1.from(i.headers),i},function(i){return isCancel(i)||(throwIfCancellationRequested(n),i&&i.response&&(i.response.data=transformData.call(n,n.transformResponse,i.response),i.response.headers=AxiosHeaders$1.from(i.response.headers))),Promise.reject(i)})}const VERSION$1="1.13.2",validators$1={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{validators$1[n]=function(i){return typeof i===n||"a"+(t<1?"n ":" ")+n}});const deprecatedWarnings={};validators$1.transitional=function n(t,r,i){function g($,V){return"[Axios v"+VERSION$1+"] Transitional option '"+$+"'"+V+(i?". "+i:"")}return($,V,re)=>{if(t===!1)throw new AxiosError(g(V," has been removed"+(r?" in "+r:"")),AxiosError.ERR_DEPRECATED);return r&&!deprecatedWarnings[V]&&(deprecatedWarnings[V]=!0,console.warn(g(V," has been deprecated since v"+r+" and will be removed in the near future"))),t?t($,V,re):!0}};validators$1.spelling=function n(t){return(r,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function assertOptions(n,t,r){if(typeof n!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const i=Object.keys(n);let g=i.length;for(;g-- >0;){const $=i[g],V=t[$];if(V){const re=n[$],ie=re===void 0||V(re,$,n);if(ie!==!0)throw new AxiosError("option "+$+" must be "+ie,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new AxiosError("Unknown option "+$,AxiosError.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;class Axios{constructor(t){this.defaults=t||{},this.interceptors={request:new InterceptorManager$1,response:new InterceptorManager$1}}async request(t,r){try{return await this._request(t,r)}catch(i){if(i instanceof Error){let g={};Error.captureStackTrace?Error.captureStackTrace(g):g=new Error;const $=g.stack?g.stack.replace(/^.+\n/,""):"";try{i.stack?$&&!String(i.stack).endsWith($.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
|
|
|
|
|
`+$):i.stack=$}catch{}}throw i}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=mergeConfig(this.defaults,r);const{transitional:i,paramsSerializer:g,headers:$}=r;i!==void 0&&validator.assertOptions(i,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),g!=null&&(utils$1.isFunction(g)?r.paramsSerializer={serialize:g}:validator.assertOptions(g,{encode:validators.function,serialize:validators.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),validator.assertOptions(r,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let V=$&&utils$1.merge($.common,$[r.method]);$&&utils$1.forEach(["delete","get","head","post","put","patch","common"],he=>{delete $[he]}),r.headers=AxiosHeaders$1.concat(V,$);const re=[];let ie=!0;this.interceptors.request.forEach(function(pe){typeof pe.runWhen=="function"&&pe.runWhen(r)===!1||(ie=ie&&pe.synchronous,re.unshift(pe.fulfilled,pe.rejected))});const ae=[];this.interceptors.response.forEach(function(pe){ae.push(pe.fulfilled,pe.rejected)});let oe,le=0,ue;if(!ie){const he=[dispatchRequest.bind(this),void 0];for(he.unshift(...re),he.push(...ae),ue=he.length,oe=Promise.resolve(r);le<ue;)oe=oe.then(he[le++],he[le++]);return oe}ue=re.length;let de=r;for(;le<ue;){const he=re[le++],pe=re[le++];try{de=he(de)}catch(_e){pe.call(this,_e);break}}try{oe=dispatchRequest.call(this,de)}catch(he){return Promise.reject(he)}for(le=0,ue=ae.length;le<ue;)oe=oe.then(ae[le++],ae[le++]);return oe}getUri(t){t=mergeConfig(this.defaults,t);const r=buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls);return buildURL(r,t.params,t.paramsSerializer)}}utils$1.forEach(["delete","get","head","options"],function n(t){Axios.prototype[t]=function(r,i){return this.request(mergeConfig(i||{},{method:t,url:r,data:(i||{}).data}))}});utils$1.forEach(["post","put","patch"],function n(t){function r(i){return function($,V,re){return this.request(mergeConfig(re||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:$,data:V}))}}Axios.prototype[t]=r(),Axios.prototype[t+"Form"]=r(!0)});const Axios$1=Axios;class CancelToken{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function($){r=$});const i=this;this.promise.then(g=>{if(!i._listeners)return;let $=i._listeners.length;for(;$-- >0;)i._listeners[$](g);i._listeners=null}),this.promise.then=g=>{let $;const V=new Promise(re=>{i.subscribe(re),$=re}).then(g);return V.cancel=function(){i.unsubscribe($)},V},t(function($,V,re){i.reason||(i.reason=new CanceledError($,V,re),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=i=>{t.abort(i)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new CancelToken(function(g){t=g}),cancel:t}}}const CancelToken$1=CancelToken;function spread(n){return function(r){return n.apply(null,r)}}function isAxiosError(n){return utils$1.isObject(n)&&n.isAxiosError===!0}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuth
|
|
|
|
|
|
* @license
|
|
|
|
|
|
* Copyright 2010-2025 Three.js Authors
|
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
|
*/const REVISION="182",MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},CullFaceNone=0,CullFaceBack=1,CullFaceFront=2,PCFShadowMap=1,PCFSoftShadowMap=2,VSMShadowMap=3,FrontSide=0,BackSide=1,DoubleSide=2,NoBlending=0,NormalBlending=1,AdditiveBlending=2,SubtractiveBlending=3,MultiplyBlending=4,CustomBlending=5,AddEquation=100,SubtractEquation=101,ReverseSubtractEquation=102,MinEquation=103,MaxEquation=104,ZeroFactor=200,OneFactor=201,SrcColorFactor=202,OneMinusSrcColorFactor=203,SrcAlphaFactor=204,OneMinusSrcAlphaFactor=205,DstAlphaFactor=206,OneMinusDstAlphaFactor=207,DstColorFactor=208,OneMinusDstColorFactor=209,SrcAlphaSaturateFactor=210,ConstantColorFactor=211,OneMinusConstantColorFactor=212,ConstantAlphaFactor=213,OneMinusConstantAlphaFactor=214,NeverDepth=0,AlwaysDepth=1,LessDepth=2,LessEqualDepth=3,EqualDepth=4,GreaterEqualDepth=5,GreaterDepth=6,NotEqualDepth=7,MultiplyOperation=0,MixOperation=1,AddOperation=2,NoToneMapping=0,LinearToneMapping=1,ReinhardToneMapping=2,CineonToneMapping=3,ACESFilmicToneMapping=4,CustomToneMapping=5,AgXToneMapping=6,NeutralToneMapping=7,AttachedBindMode="attached",DetachedBindMode="detached",UVMapping=300,CubeReflectionMapping=301,CubeRefractionMapping=302,EquirectangularReflectionMapping=303,EquirectangularRefractionMapping=304,CubeUVReflectionMapping=306,RepeatWrapping=1e3,ClampToEdgeWrapping=1001,MirroredRepeatWrapping=1002,NearestFilter=1003,NearestMipmapNearestFilter=1004,NearestMipmapLinearFilter=1005,LinearFilter=1006,LinearMipmapNearestFilter=1007,LinearMipmapLinearFilter=1008,UnsignedByteType=1009,ByteType=1010,ShortType=1011,UnsignedShortType=1012,IntType=1013,UnsignedIntType=1014,FloatType=1015,HalfFloatType=1016,UnsignedShort4444Type=1017,UnsignedShort5551Type=1018,UnsignedInt248Type=1020,UnsignedInt5999Type=35902,UnsignedInt101111Type=35899,AlphaFormat=1021,RGBFormat=1022,RGBAFormat=1023,DepthFormat=1026,DepthStencilFormat=1027,RedFormat=1028,RedIntegerFormat=1029,RGFormat=1030,RGIntegerFormat=1031,RGBAIntegerFormat=1033,RGB_S3TC_DXT1_Format=33776,RGBA_S3TC_DXT1_Format=33777,RGBA_S3TC_DXT3_Format=33778,RGBA_S3TC_DXT5_Format=33779,RGB_PVRTC_4BPPV1_Format=35840,RGB_PVRTC_2BPPV1_Format=35841,RGBA_PVRTC_4BPPV1_Format=35842,RGBA_PVRTC_2BPPV1_Format=35843,RGB_ETC1_Format=36196,RGB_ETC2_Format=37492,RGBA_ETC2_EAC_Format=37496,R11_EAC_Format=37488,SIGNED_R11_EAC_Format=37489,RG11_EAC_Format=37490,SIGNED_RG11_EAC_Format=37491,RGBA_ASTC_4x4_Format=37808,RGBA_ASTC_5x4_Format=37809,RGBA_ASTC_5x5_Format=37810,RGBA_ASTC_6x5_Format=37811,RGBA_ASTC_6x6_Format=37812,RGBA_ASTC_8x5_Format=37813,RGBA_ASTC_8x6_Format=37814,RGBA_ASTC_8x8_Format=37815,RGBA_ASTC_10x5_Format=37816,RGBA_ASTC_10x6_Format=37817,RGBA_ASTC_10x8_Format=37818,RGBA_ASTC_10x10_Format=37819,RGBA_ASTC_12x10_Format=37820,RGBA_ASTC_12x12_Format=37821,RGBA_BPTC_Format=36492,RGB_BPTC_SIGNED_Format=36494,RGB_BPTC_UNSIGNED_Format=36495,RED_RGTC1_Format=36283,SIGNED_RED_RGTC1_Format=36284,RED_GREEN_RGTC2_Format=36285,SIGNED_RED_GREEN_RGTC2_Format=36286,InterpolateDiscrete=2300,InterpolateLinear=2301,InterpolateSmooth=2302,ZeroCurvatureEnding=2400,ZeroSlopeEnding=2401,WrapAroundEnding=2402,NormalAnimationBlendMode=2500,TrianglesDrawMode=0,TriangleStripDrawMode=1,TriangleFanDrawMode=2,BasicDepthPacking=3200,TangentSpaceNormalMap=0,ObjectSpaceNormalMap=1,NoColorSpace="",SRGBColorSpace="srgb",LinearSRGBColorSpace="srgb-linear",LinearTransfer="linear",SRGBTransfer="srgb",KeepStencilOp=7680,AlwaysStencilFunc=519,NeverCompare=512,LessCompare=513,EqualCompare=514,LessEqualCompare=515,GreaterCompare=516,NotEqualCompare=517,GreaterEqualCompare=518,AlwaysCompare=519,StaticDrawUsage=35044,GLSL3="300 es",WebGLCoordinateSystem=2e3,WebGPUCoordinateSystem=2001;function arrayNeedsUint32(n){for(let t=n.length-1;t>=0;--t)if(n[t]>=65535)return!0;return!1}function isTypedArray$1(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function createElementNS(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function createCanvasElement(){const n=createElementNS("canvas");ret
|
|
|
|
|
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
|
|
|
|
}`,default_fragment=`void main() {
|
|
|
|
|
|
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
|
|
|
|
|
|
}`;class ShaderMaterial extends Material{constructor(t){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=default_vertex,this.fragmentShader=default_fragment,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,t!==void 0&&this.setValues(t)}copy(t){return super.copy(t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=cloneUniforms(t.uniforms),this.uniformsGroups=cloneUniformsGroups(t.uniformsGroups),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.fog=t.fog,this.lights=t.lights,this.clipping=t.clipping,this.extensions=Object.assign({},t.extensions),this.glslVersion=t.glslVersion,this.defaultAttributeValues=Object.assign({},t.defaultAttributeValues),this.index0AttributeName=t.index0AttributeName,this.uniformsNeedUpdate=t.uniformsNeedUpdate,this}toJSON(t){const r=super.toJSON(t);r.glslVersion=this.glslVersion,r.uniforms={};for(const g in this.uniforms){const V=this.uniforms[g].value;V&&V.isTexture?r.uniforms[g]={type:"t",value:V.toJSON(t).uuid}:V&&V.isColor?r.uniforms[g]={type:"c",value:V.getHex()}:V&&V.isVector2?r.uniforms[g]={type:"v2",value:V.toArray()}:V&&V.isVector3?r.uniforms[g]={type:"v3",value:V.toArray()}:V&&V.isVector4?r.uniforms[g]={type:"v4",value:V.toArray()}:V&&V.isMatrix3?r.uniforms[g]={type:"m3",value:V.toArray()}:V&&V.isMatrix4?r.uniforms[g]={type:"m4",value:V.toArray()}:r.uniforms[g]={value:V}}Object.keys(this.defines).length>0&&(r.defines=this.defines),r.vertexShader=this.vertexShader,r.fragmentShader=this.fragmentShader,r.lights=this.lights,r.clipping=this.clipping;const i={};for(const g in this.extensions)this.extensions[g]===!0&&(i[g]=!0);return Object.keys(i).length>0&&(r.extensions=i),r}}class Camera extends Object3D{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Matrix4,this.projectionMatrix=new Matrix4,this.projectionMatrixInverse=new Matrix4,this.coordinateSystem=WebGLCoordinateSystem,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(t,r){return super.copy(t,r),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,r){super.updateWorldMatrix(t,r),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const _v3$1=new Vector3,_minTarget=new Vector2,_maxTarget=new Vector2;class PerspectiveCamera extends Camera{constructor(t=50,r=1,i=.1,g=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=i,this.far=g,this.focus=10,this.aspect=r,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,r){return super.copy(t,r),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const r=.5*this.getFilmHeight()/t;this.fov=RAD2DEG*2*Math.atan(r),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(DEG2RAD*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return RAD2DEG*2*Math.atan(Math.tan(DEG2RAD*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(t,r,i){_v3$1.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),r.set(_v3$1.
|
|
|
|
|
|
|
|
|
|
|
|
varying vec3 vWorldDirection;
|
|
|
|
|
|
|
|
|
|
|
|
vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
|
|
|
|
|
|
|
|
|
|
|
|
return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
|
|
|
|
|
|
vWorldDirection = transformDirection( position, modelMatrix );
|
|
|
|
|
|
|
|
|
|
|
|
#include <begin_vertex>
|
|
|
|
|
|
#include <project_vertex>
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
`,fragmentShader:`
|
|
|
|
|
|
|
|
|
|
|
|
uniform sampler2D tEquirect;
|
|
|
|
|
|
|
|
|
|
|
|
varying vec3 vWorldDirection;
|
|
|
|
|
|
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
|
|
|
|
|
|
vec3 direction = normalize( vWorldDirection );
|
|
|
|
|
|
|
|
|
|
|
|
vec2 sampleUV = equirectUv( direction );
|
|
|
|
|
|
|
|
|
|
|
|
gl_FragColor = texture2D( tEquirect, sampleUV );
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
`},g=new BoxGeometry(5,5,5),$=new ShaderMaterial({name:"CubemapFromEquirect",uniforms:cloneUniforms(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:BackSide,blending:NoBlending});$.uniforms.tEquirect.value=r;const V=new Mesh(g,$),re=r.minFilter;return r.minFilter===LinearMipmapLinearFilter&&(r.minFilter=LinearFilter),new CubeCamera(1,10,this).update(t,V),r.minFilter=re,V.geometry.dispose(),V.material.dispose(),this}clear(t,r=!0,i=!0,g=!0){const $=t.getRenderTarget();for(let V=0;V<6;V++)t.setRenderTarget(this,V),t.clear(r,i,g);t.setRenderTarget($)}}let Group$5=class extends Object3D{constructor(){super(),this.isGroup=!0,this.type="Group"}};const _moveEvent={type:"move"};class WebXRController{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Group$5,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Group$5,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Vector3,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Vector3),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Group$5,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Vector3,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Vector3),this._grip}dispatchEvent(t){return this._targetRay!==null&&this._targetRay.dispatchEvent(t),this._grip!==null&&this._grip.dispatchEvent(t),this._hand!==null&&this._hand.dispatchEvent(t),this}connect(t){if(t&&t.hand){const r=this._hand;if(r)for(const i of t.hand.values())this._getHandJoint(r,i)}return this.dispatchEvent({type:"connected",data:t}),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(t,r,i){let g=null,$=null,V=null;const re=this._targetRay,ie=this._grip,ae=this._hand;if(t&&r.session.visibilityState!=="visible-blurred"){if(ae&&t.hand){V=!0;for(const pe of t.hand.values()){const _e=r.getJointPose(pe,i),Ce=this._getHandJoint(ae,pe);_e!==null&&(Ce.matrix.fromArray(_e.transform.matrix),Ce.matrix.decompose(Ce.position,Ce.rotation,Ce.scale),Ce.matrixWorldNeedsUpdate=!0,Ce.jointRadius=_e.radius),Ce.visible=_e!==null}const oe=ae.joints["index-finger-tip"],le=ae.joints["thumb-tip"],ue=oe.position.distanceTo(le.position),de=.02,he=.005;ae.inputState.pinching&&ue>de+he?(ae.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!ae.inputState.pinching&&ue<=de-he&&(ae.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else ie!==null&&t.gripSpace&&($=r.getPose(t.gripSpace,i),$!==null&&(ie.matrix.fromArray($.transform.matrix),ie.matrix.decompose(ie.position,ie.rotation,ie.scale),ie.matrixWorldNeedsUpdate=!0,$.linearVelocity?(ie.hasLinearVelocity=!0,ie.linearVelocity.copy($.linearVelocity)):ie.hasLinearVelocity=!1,$.angularVelocity?(ie.hasAngularVelocity=!0,ie.angularVelocity.copy($.angularVelocity)):ie.hasAngularVelocity=!1));re!==null&&(g=r.getPose(t.targetRaySpace,i),g===null&&$!==null&&(g=$),g!==null&&(re.matrix.fromArray(g.transform.matrix),re.matrix.decompose(re.position,re.rotation,re.scale),re.matrixWorldNeedsUpdate=!0,g.linearVelocity?(re.hasLinearVelocity=!0,re.linearVelocity.copy(g.linearVelocity)):re.hasLinearVelocity=!1,g.angularVelocity?(re.hasAngularVelocity=!0,re.angularVelocity.copy(g.angularVelocity)):re.hasAngularVelocity=!1,this.dispatchEvent(_moveEvent)))}return re!==null&&(re.visible=g!==null),ie!==null&&(ie.visible=$!==null),ae!==null&&(ae.visible=V!==null),this}_getHandJoint(t,r){if(t.joints[r.jointName]===void 0){const i=new Group$5;i.matrixAutoUpdate=!1,i.visible=!1,t.joints[r.jointName]=i,t.add(i)}
|
|
|
|
|
|
* @license
|
|
|
|
|
|
* Copyright 2010-2025 Three.js Authors
|
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
|
*/function WebGLAnimation(){let n=null,t=!1,r=null,i=null;function g($,V){r($,V),i=n.requestAnimationFrame(g)}return{start:function(){t!==!0&&r!==null&&(i=n.requestAnimationFrame(g),t=!0)},stop:function(){n.cancelAnimationFrame(i),t=!1},setAnimationLoop:function($){r=$},setContext:function($){n=$}}}function WebGLAttributes(n){const t=new WeakMap;function r(re,ie){const ae=re.array,oe=re.usage,le=ae.byteLength,ue=n.createBuffer();n.bindBuffer(ie,ue),n.bufferData(ie,ae,oe),re.onUploadCallback();let de;if(ae instanceof Float32Array)de=n.FLOAT;else if(typeof Float16Array<"u"&&ae instanceof Float16Array)de=n.HALF_FLOAT;else if(ae instanceof Uint16Array)re.isFloat16BufferAttribute?de=n.HALF_FLOAT:de=n.UNSIGNED_SHORT;else if(ae instanceof Int16Array)de=n.SHORT;else if(ae instanceof Uint32Array)de=n.UNSIGNED_INT;else if(ae instanceof Int32Array)de=n.INT;else if(ae instanceof Int8Array)de=n.BYTE;else if(ae instanceof Uint8Array)de=n.UNSIGNED_BYTE;else if(ae instanceof Uint8ClampedArray)de=n.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+ae);return{buffer:ue,type:de,bytesPerElement:ae.BYTES_PER_ELEMENT,version:re.version,size:le}}function i(re,ie,ae){const oe=ie.array,le=ie.updateRanges;if(n.bindBuffer(ae,re),le.length===0)n.bufferSubData(ae,0,oe);else{le.sort((de,he)=>de.start-he.start);let ue=0;for(let de=1;de<le.length;de++){const he=le[ue],pe=le[de];pe.start<=he.start+he.count+1?he.count=Math.max(he.count,pe.start+pe.count-he.start):(++ue,le[ue]=pe)}le.length=ue+1;for(let de=0,he=le.length;de<he;de++){const pe=le[de];n.bufferSubData(ae,pe.start*oe.BYTES_PER_ELEMENT,oe,pe.start,pe.count)}ie.clearUpdateRanges()}ie.onUploadCallback()}function g(re){return re.isInterleavedBufferAttribute&&(re=re.data),t.get(re)}function $(re){re.isInterleavedBufferAttribute&&(re=re.data);const ie=t.get(re);ie&&(n.deleteBuffer(ie.buffer),t.delete(re))}function V(re,ie){if(re.isInterleavedBufferAttribute&&(re=re.data),re.isGLBufferAttribute){const oe=t.get(re);(!oe||oe.version<re.version)&&t.set(re,{buffer:re.buffer,type:re.type,bytesPerElement:re.elementSize,version:re.version});return}const ae=t.get(re);if(ae===void 0)t.set(re,r(re,ie));else if(ae.version<re.version){if(ae.size!==re.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");i(ae.buffer,re,ie),ae.version=re.version}}return{get:g,remove:$,update:V}}var alphahash_fragment=`#ifdef USE_ALPHAHASH
|
|
|
|
|
|
if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;
|
|
|
|
|
|
#endif`,alphahash_pars_fragment=`#ifdef USE_ALPHAHASH
|
|
|
|
|
|
const float ALPHA_HASH_SCALE = 0.05;
|
|
|
|
|
|
float hash2D( vec2 value ) {
|
|
|
|
|
|
return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );
|
|
|
|
|
|
}
|
|
|
|
|
|
float hash3D( vec3 value ) {
|
|
|
|
|
|
return hash2D( vec2( hash2D( value.xy ), value.z ) );
|
|
|
|
|
|
}
|
|
|
|
|
|
float getAlphaHashThreshold( vec3 position ) {
|
|
|
|
|
|
float maxDeriv = max(
|
|
|
|
|
|
length( dFdx( position.xyz ) ),
|
|
|
|
|
|
length( dFdy( position.xyz ) )
|
|
|
|
|
|
);
|
|
|
|
|
|
float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );
|
|
|
|
|
|
vec2 pixScales = vec2(
|
|
|
|
|
|
exp2( floor( log2( pixScale ) ) ),
|
|
|
|
|
|
exp2( ceil( log2( pixScale ) ) )
|
|
|
|
|
|
);
|
|
|
|
|
|
vec2 alpha = vec2(
|
|
|
|
|
|
hash3D( floor( pixScales.x * position.xyz ) ),
|
|
|
|
|
|
hash3D( floor( pixScales.y * position.xyz ) )
|
|
|
|
|
|
);
|
|
|
|
|
|
float lerpFactor = fract( log2( pixScale ) );
|
|
|
|
|
|
float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;
|
|
|
|
|
|
float a = min( lerpFactor, 1.0 - lerpFactor );
|
|
|
|
|
|
vec3 cases = vec3(
|
|
|
|
|
|
x * x / ( 2.0 * a * ( 1.0 - a ) ),
|
|
|
|
|
|
( x - 0.5 * a ) / ( 1.0 - a ),
|
|
|
|
|
|
1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )
|
|
|
|
|
|
);
|
|
|
|
|
|
float threshold = ( x < ( 1.0 - a ) )
|
|
|
|
|
|
? ( ( x < a ) ? cases.x : cases.y )
|
|
|
|
|
|
: cases.z;
|
|
|
|
|
|
return clamp( threshold , 1.0e-6, 1.0 );
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif`,alphamap_fragment=`#ifdef USE_ALPHAMAP
|
|
|
|
|
|
diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;
|
|
|
|
|
|
#endif`,alphamap_pars_fragment=`#ifdef USE_ALPHAMAP
|
|
|
|
|
|
uniform sampler2D alphaMap;
|
|
|
|
|
|
#endif`,alphatest_fragment=`#ifdef USE_ALPHATEST
|
|
|
|
|
|
#ifdef ALPHA_TO_COVERAGE
|
|
|
|
|
|
diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );
|
|
|
|
|
|
if ( diffuseColor.a == 0.0 ) discard;
|
|
|
|
|
|
#else
|
|
|
|
|
|
if ( diffuseColor.a < alphaTest ) discard;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif`,alphatest_pars_fragment=`#ifdef USE_ALPHATEST
|
|
|
|
|
|
uniform float alphaTest;
|
|
|
|
|
|
#endif`,aomap_fragment=`#ifdef USE_AOMAP
|
|
|
|
|
|
float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;
|
|
|
|
|
|
reflectedLight.indirectDiffuse *= ambientOcclusion;
|
|
|
|
|
|
#if defined( USE_CLEARCOAT )
|
|
|
|
|
|
clearcoatSpecularIndirect *= ambientOcclusion;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if defined( USE_SHEEN )
|
|
|
|
|
|
sheenSpecularIndirect *= ambientOcclusion;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if defined( USE_ENVMAP ) && defined( STANDARD )
|
|
|
|
|
|
float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );
|
|
|
|
|
|
reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif`,aomap_pars_fragment=`#ifdef USE_AOMAP
|
|
|
|
|
|
uniform sampler2D aoMap;
|
|
|
|
|
|
uniform float aoMapIntensity;
|
|
|
|
|
|
#endif`,batching_pars_vertex=`#ifdef USE_BATCHING
|
|
|
|
|
|
#if ! defined( GL_ANGLE_multi_draw )
|
|
|
|
|
|
#define gl_DrawID _gl_DrawID
|
|
|
|
|
|
uniform int _gl_DrawID;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
uniform highp sampler2D batchingTexture;
|
|
|
|
|
|
uniform highp usampler2D batchingIdTexture;
|
|
|
|
|
|
mat4 getBatchingMatrix( const in float i ) {
|
|
|
|
|
|
int size = textureSize( batchingTexture, 0 ).x;
|
|
|
|
|
|
int j = int( i ) * 4;
|
|
|
|
|
|
int x = j % size;
|
|
|
|
|
|
int y = j / size;
|
|
|
|
|
|
vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );
|
|
|
|
|
|
vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );
|
|
|
|
|
|
vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );
|
|
|
|
|
|
vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );
|
|
|
|
|
|
return mat4( v1, v2, v3, v4 );
|
|
|
|
|
|
}
|
|
|
|
|
|
float getIndirectIndex( const in int i ) {
|
|
|
|
|
|
int size = textureSize( batchingIdTexture, 0 ).x;
|
|
|
|
|
|
int x = i % size;
|
|
|
|
|
|
int y = i / size;
|
|
|
|
|
|
return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_BATCHING_COLOR
|
|
|
|
|
|
uniform sampler2D batchingColorTexture;
|
|
|
|
|
|
vec3 getBatchingColor( const in float i ) {
|
|
|
|
|
|
int size = textureSize( batchingColorTexture, 0 ).x;
|
|
|
|
|
|
int j = int( i );
|
|
|
|
|
|
int x = j % size;
|
|
|
|
|
|
int y = j / size;
|
|
|
|
|
|
return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif`,batching_vertex=`#ifdef USE_BATCHING
|
|
|
|
|
|
mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );
|
|
|
|
|
|
#endif`,begin_vertex=`vec3 transformed = vec3( position );
|
|
|
|
|
|
#ifdef USE_ALPHAHASH
|
|
|
|
|
|
vPosition = vec3( position );
|
|
|
|
|
|
#endif`,beginnormal_vertex=`vec3 objectNormal = vec3( normal );
|
|
|
|
|
|
#ifdef USE_TANGENT
|
|
|
|
|
|
vec3 objectTangent = vec3( tangent.xyz );
|
|
|
|
|
|
#endif`,bsdfs=`float G_BlinnPhong_Implicit( ) {
|
|
|
|
|
|
return 0.25;
|
|
|
|
|
|
}
|
|
|
|
|
|
float D_BlinnPhong( const in float shininess, const in float dotNH ) {
|
|
|
|
|
|
return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {
|
|
|
|
|
|
vec3 halfDir = normalize( lightDir + viewDir );
|
|
|
|
|
|
float dotNH = saturate( dot( normal, halfDir ) );
|
|
|
|
|
|
float dotVH = saturate( dot( viewDir, halfDir ) );
|
|
|
|
|
|
vec3 F = F_Schlick( specularColor, 1.0, dotVH );
|
|
|
|
|
|
float G = G_BlinnPhong_Implicit( );
|
|
|
|
|
|
float D = D_BlinnPhong( shininess, dotNH );
|
|
|
|
|
|
return F * ( G * D );
|
|
|
|
|
|
} // validated`,iridescence_fragment=`#ifdef USE_IRIDESCENCE
|
|
|
|
|
|
const mat3 XYZ_TO_REC709 = mat3(
|
|
|
|
|
|
3.2404542, -0.9692660, 0.0556434,
|
|
|
|
|
|
-1.5371385, 1.8760108, -0.2040259,
|
|
|
|
|
|
-0.4985314, 0.0415560, 1.0572252
|
|
|
|
|
|
);
|
|
|
|
|
|
vec3 Fresnel0ToIor( vec3 fresnel0 ) {
|
|
|
|
|
|
vec3 sqrtF0 = sqrt( fresnel0 );
|
|
|
|
|
|
return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {
|
|
|
|
|
|
return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );
|
|
|
|
|
|
}
|
|
|
|
|
|
float IorToFresnel0( float transmittedIor, float incidentIor ) {
|
|
|
|
|
|
return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 evalSensitivity( float OPD, vec3 shift ) {
|
|
|
|
|
|
float phase = 2.0 * PI * OPD * 1.0e-9;
|
|
|
|
|
|
vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );
|
|
|
|
|
|
vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );
|
|
|
|
|
|
vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );
|
|
|
|
|
|
vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );
|
|
|
|
|
|
xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );
|
|
|
|
|
|
xyz /= 1.0685e-7;
|
|
|
|
|
|
vec3 rgb = XYZ_TO_REC709 * xyz;
|
|
|
|
|
|
return rgb;
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {
|
|
|
|
|
|
vec3 I;
|
|
|
|
|
|
float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );
|
|
|
|
|
|
float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );
|
|
|
|
|
|
float cosTheta2Sq = 1.0 - sinTheta2Sq;
|
|
|
|
|
|
if ( cosTheta2Sq < 0.0 ) {
|
|
|
|
|
|
return vec3( 1.0 );
|
|
|
|
|
|
}
|
|
|
|
|
|
float cosTheta2 = sqrt( cosTheta2Sq );
|
|
|
|
|
|
float R0 = IorToFresnel0( iridescenceIOR, outsideIOR );
|
|
|
|
|
|
float R12 = F_Schlick( R0, 1.0, cosTheta1 );
|
|
|
|
|
|
float T121 = 1.0 - R12;
|
|
|
|
|
|
float phi12 = 0.0;
|
|
|
|
|
|
if ( iridescenceIOR < outsideIOR ) phi12 = PI;
|
|
|
|
|
|
float phi21 = PI - phi12;
|
|
|
|
|
|
vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );
|
|
|
|
|
|
vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );
|
|
|
|
|
|
vec3 phi23 = vec3( 0.0 );
|
|
|
|
|
|
if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;
|
|
|
|
|
|
if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;
|
|
|
|
|
|
if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;
|
|
|
|
|
|
float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;
|
|
|
|
|
|
vec3 phi = vec3( phi21 ) + phi23;
|
|
|
|
|
|
vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );
|
|
|
|
|
|
vec3 r123 = sqrt( R123 );
|
|
|
|
|
|
vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );
|
|
|
|
|
|
vec3 C0 = R12 + Rs;
|
|
|
|
|
|
I = C0;
|
|
|
|
|
|
vec3 Cm = Rs - T121;
|
|
|
|
|
|
for ( int m = 1; m <= 2; ++ m ) {
|
|
|
|
|
|
Cm *= r123;
|
|
|
|
|
|
vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );
|
|
|
|
|
|
I += Cm * Sm;
|
|
|
|
|
|
}
|
|
|
|
|
|
return max( I, vec3( 0.0 ) );
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif`,bumpmap_pars_fragment=`#ifdef USE_BUMPMAP
|
|
|
|
|
|
uniform sampler2D bumpMap;
|
|
|
|
|
|
uniform float bumpScale;
|
|
|
|
|
|
vec2 dHdxy_fwd() {
|
|
|
|
|
|
vec2 dSTdx = dFdx( vBumpMapUv );
|
|
|
|
|
|
vec2 dSTdy = dFdy( vBumpMapUv );
|
|
|
|
|
|
float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;
|
|
|
|
|
|
float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;
|
|
|
|
|
|
float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;
|
|
|
|
|
|
return vec2( dBx, dBy );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {
|
|
|
|
|
|
vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );
|
|
|
|
|
|
vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );
|
|
|
|
|
|
vec3 vN = surf_norm;
|
|
|
|
|
|
vec3 R1 = cross( vSigmaY, vN );
|
|
|
|
|
|
vec3 R2 = cross( vN, vSigmaX );
|
|
|
|
|
|
float fDet = dot( vSigmaX, R1 ) * faceDirection;
|
|
|
|
|
|
vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );
|
|
|
|
|
|
return normalize( abs( fDet ) * surf_norm - vGrad );
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif`,clipping_planes_fragment=`#if NUM_CLIPPING_PLANES > 0
|
|
|
|
|
|
vec4 plane;
|
|
|
|
|
|
#ifdef ALPHA_TO_COVERAGE
|
|
|
|
|
|
float distanceToPlane, distanceGradient;
|
|
|
|
|
|
float clipOpacity = 1.0;
|
|
|
|
|
|
#pragma unroll_loop_start
|
|
|
|
|
|
for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
|
|
|
|
|
|
plane = clippingPlanes[ i ];
|
|
|
|
|
|
distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
|
|
|
|
|
|
distanceGradient = fwidth( distanceToPlane ) / 2.0;
|
|
|
|
|
|
clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
|
|
|
|
|
|
if ( clipOpacity == 0.0 ) discard;
|
|
|
|
|
|
}
|
|
|
|
|
|
#pragma unroll_loop_end
|
|
|
|
|
|
#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
|
|
|
|
|
|
float unionClipOpacity = 1.0;
|
|
|
|
|
|
#pragma unroll_loop_start
|
|
|
|
|
|
for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
|
|
|
|
|
|
plane = clippingPlanes[ i ];
|
|
|
|
|
|
distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
|
|
|
|
|
|
distanceGradient = fwidth( distanceToPlane ) / 2.0;
|
|
|
|
|
|
unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
|
|
|
|
|
|
}
|
|
|
|
|
|
#pragma unroll_loop_end
|
|
|
|
|
|
clipOpacity *= 1.0 - unionClipOpacity;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
diffuseColor.a *= clipOpacity;
|
|
|
|
|
|
if ( diffuseColor.a == 0.0 ) discard;
|
|
|
|
|
|
#else
|
|
|
|
|
|
#pragma unroll_loop_start
|
|
|
|
|
|
for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
|
|
|
|
|
|
plane = clippingPlanes[ i ];
|
|
|
|
|
|
if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;
|
|
|
|
|
|
}
|
|
|
|
|
|
#pragma unroll_loop_end
|
|
|
|
|
|
#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
|
|
|
|
|
|
bool clipped = true;
|
|
|
|
|
|
#pragma unroll_loop_start
|
|
|
|
|
|
for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
|
|
|
|
|
|
plane = clippingPlanes[ i ];
|
|
|
|
|
|
clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;
|
|
|
|
|
|
}
|
|
|
|
|
|
#pragma unroll_loop_end
|
|
|
|
|
|
if ( clipped ) discard;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif`,clipping_planes_pars_fragment=`#if NUM_CLIPPING_PLANES > 0
|
|
|
|
|
|
varying vec3 vClipPosition;
|
|
|
|
|
|
uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
|
|
|
|
|
|
#endif`,clipping_planes_pars_vertex=`#if NUM_CLIPPING_PLANES > 0
|
|
|
|
|
|
varying vec3 vClipPosition;
|
|
|
|
|
|
#endif`,clipping_planes_vertex=`#if NUM_CLIPPING_PLANES > 0
|
|
|
|
|
|
vClipPosition = - mvPosition.xyz;
|
|
|
|
|
|
#endif`,color_fragment=`#if defined( USE_COLOR_ALPHA )
|
|
|
|
|
|
diffuseColor *= vColor;
|
|
|
|
|
|
#elif defined( USE_COLOR )
|
|
|
|
|
|
diffuseColor.rgb *= vColor;
|
|
|
|
|
|
#endif`,color_pars_fragment=`#if defined( USE_COLOR_ALPHA )
|
|
|
|
|
|
varying vec4 vColor;
|
|
|
|
|
|
#elif defined( USE_COLOR )
|
|
|
|
|
|
varying vec3 vColor;
|
|
|
|
|
|
#endif`,color_pars_vertex=`#if defined( USE_COLOR_ALPHA )
|
|
|
|
|
|
varying vec4 vColor;
|
|
|
|
|
|
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
|
|
|
|
|
|
varying vec3 vColor;
|
|
|
|
|
|
#endif`,color_vertex=`#if defined( USE_COLOR_ALPHA )
|
|
|
|
|
|
vColor = vec4( 1.0 );
|
|
|
|
|
|
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
|
|
|
|
|
|
vColor = vec3( 1.0 );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_COLOR
|
|
|
|
|
|
vColor *= color;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_INSTANCING_COLOR
|
|
|
|
|
|
vColor.xyz *= instanceColor.xyz;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_BATCHING_COLOR
|
|
|
|
|
|
vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );
|
|
|
|
|
|
vColor.xyz *= batchingColor.xyz;
|
|
|
|
|
|
#endif`,common=`#define PI 3.141592653589793
|
|
|
|
|
|
#define PI2 6.283185307179586
|
|
|
|
|
|
#define PI_HALF 1.5707963267948966
|
|
|
|
|
|
#define RECIPROCAL_PI 0.3183098861837907
|
|
|
|
|
|
#define RECIPROCAL_PI2 0.15915494309189535
|
|
|
|
|
|
#define EPSILON 1e-6
|
|
|
|
|
|
#ifndef saturate
|
|
|
|
|
|
#define saturate( a ) clamp( a, 0.0, 1.0 )
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#define whiteComplement( a ) ( 1.0 - saturate( a ) )
|
|
|
|
|
|
float pow2( const in float x ) { return x*x; }
|
|
|
|
|
|
vec3 pow2( const in vec3 x ) { return x*x; }
|
|
|
|
|
|
float pow3( const in float x ) { return x*x*x; }
|
|
|
|
|
|
float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
|
|
|
|
|
|
float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }
|
|
|
|
|
|
float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }
|
|
|
|
|
|
highp float rand( const in vec2 uv ) {
|
|
|
|
|
|
const highp float a = 12.9898, b = 78.233, c = 43758.5453;
|
|
|
|
|
|
highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
|
|
|
|
|
|
return fract( sin( sn ) * c );
|
|
|
|
|
|
}
|
|
|
|
|
|
#ifdef HIGH_PRECISION
|
|
|
|
|
|
float precisionSafeLength( vec3 v ) { return length( v ); }
|
|
|
|
|
|
#else
|
|
|
|
|
|
float precisionSafeLength( vec3 v ) {
|
|
|
|
|
|
float maxComponent = max3( abs( v ) );
|
|
|
|
|
|
return length( v / maxComponent ) * maxComponent;
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
struct IncidentLight {
|
|
|
|
|
|
vec3 color;
|
|
|
|
|
|
vec3 direction;
|
|
|
|
|
|
bool visible;
|
|
|
|
|
|
};
|
|
|
|
|
|
struct ReflectedLight {
|
|
|
|
|
|
vec3 directDiffuse;
|
|
|
|
|
|
vec3 directSpecular;
|
|
|
|
|
|
vec3 indirectDiffuse;
|
|
|
|
|
|
vec3 indirectSpecular;
|
|
|
|
|
|
};
|
|
|
|
|
|
#ifdef USE_ALPHAHASH
|
|
|
|
|
|
varying vec3 vPosition;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
|
|
|
|
|
|
return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
|
|
|
|
|
|
return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
|
|
|
|
|
|
}
|
|
|
|
|
|
bool isPerspectiveMatrix( mat4 m ) {
|
|
|
|
|
|
return m[ 2 ][ 3 ] == - 1.0;
|
|
|
|
|
|
}
|
|
|
|
|
|
vec2 equirectUv( in vec3 dir ) {
|
|
|
|
|
|
float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;
|
|
|
|
|
|
float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
|
|
|
|
|
|
return vec2( u, v );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 BRDF_Lambert( const in vec3 diffuseColor ) {
|
|
|
|
|
|
return RECIPROCAL_PI * diffuseColor;
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {
|
|
|
|
|
|
float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
|
|
|
|
|
|
return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
|
|
|
|
|
|
}
|
|
|
|
|
|
float F_Schlick( const in float f0, const in float f90, const in float dotVH ) {
|
|
|
|
|
|
float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
|
|
|
|
|
|
return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
|
|
|
|
|
|
} // validated`,cube_uv_reflection_fragment=`#ifdef ENVMAP_TYPE_CUBE_UV
|
|
|
|
|
|
#define cubeUV_minMipLevel 4.0
|
|
|
|
|
|
#define cubeUV_minTileSize 16.0
|
|
|
|
|
|
float getFace( vec3 direction ) {
|
|
|
|
|
|
vec3 absDirection = abs( direction );
|
|
|
|
|
|
float face = - 1.0;
|
|
|
|
|
|
if ( absDirection.x > absDirection.z ) {
|
|
|
|
|
|
if ( absDirection.x > absDirection.y )
|
|
|
|
|
|
face = direction.x > 0.0 ? 0.0 : 3.0;
|
|
|
|
|
|
else
|
|
|
|
|
|
face = direction.y > 0.0 ? 1.0 : 4.0;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
if ( absDirection.z > absDirection.y )
|
|
|
|
|
|
face = direction.z > 0.0 ? 2.0 : 5.0;
|
|
|
|
|
|
else
|
|
|
|
|
|
face = direction.y > 0.0 ? 1.0 : 4.0;
|
|
|
|
|
|
}
|
|
|
|
|
|
return face;
|
|
|
|
|
|
}
|
|
|
|
|
|
vec2 getUV( vec3 direction, float face ) {
|
|
|
|
|
|
vec2 uv;
|
|
|
|
|
|
if ( face == 0.0 ) {
|
|
|
|
|
|
uv = vec2( direction.z, direction.y ) / abs( direction.x );
|
|
|
|
|
|
} else if ( face == 1.0 ) {
|
|
|
|
|
|
uv = vec2( - direction.x, - direction.z ) / abs( direction.y );
|
|
|
|
|
|
} else if ( face == 2.0 ) {
|
|
|
|
|
|
uv = vec2( - direction.x, direction.y ) / abs( direction.z );
|
|
|
|
|
|
} else if ( face == 3.0 ) {
|
|
|
|
|
|
uv = vec2( - direction.z, direction.y ) / abs( direction.x );
|
|
|
|
|
|
} else if ( face == 4.0 ) {
|
|
|
|
|
|
uv = vec2( - direction.x, direction.z ) / abs( direction.y );
|
|
|
|
|
|
} else {
|
|
|
|
|
|
uv = vec2( direction.x, direction.y ) / abs( direction.z );
|
|
|
|
|
|
}
|
|
|
|
|
|
return 0.5 * ( uv + 1.0 );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {
|
|
|
|
|
|
float face = getFace( direction );
|
|
|
|
|
|
float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );
|
|
|
|
|
|
mipInt = max( mipInt, cubeUV_minMipLevel );
|
|
|
|
|
|
float faceSize = exp2( mipInt );
|
|
|
|
|
|
highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;
|
|
|
|
|
|
if ( face > 2.0 ) {
|
|
|
|
|
|
uv.y += faceSize;
|
|
|
|
|
|
face -= 3.0;
|
|
|
|
|
|
}
|
|
|
|
|
|
uv.x += face * faceSize;
|
|
|
|
|
|
uv.x += filterInt * 3.0 * cubeUV_minTileSize;
|
|
|
|
|
|
uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );
|
|
|
|
|
|
uv.x *= CUBEUV_TEXEL_WIDTH;
|
|
|
|
|
|
uv.y *= CUBEUV_TEXEL_HEIGHT;
|
|
|
|
|
|
#ifdef texture2DGradEXT
|
|
|
|
|
|
return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;
|
|
|
|
|
|
#else
|
|
|
|
|
|
return texture2D( envMap, uv ).rgb;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
}
|
|
|
|
|
|
#define cubeUV_r0 1.0
|
|
|
|
|
|
#define cubeUV_m0 - 2.0
|
|
|
|
|
|
#define cubeUV_r1 0.8
|
|
|
|
|
|
#define cubeUV_m1 - 1.0
|
|
|
|
|
|
#define cubeUV_r4 0.4
|
|
|
|
|
|
#define cubeUV_m4 2.0
|
|
|
|
|
|
#define cubeUV_r5 0.305
|
|
|
|
|
|
#define cubeUV_m5 3.0
|
|
|
|
|
|
#define cubeUV_r6 0.21
|
|
|
|
|
|
#define cubeUV_m6 4.0
|
|
|
|
|
|
float roughnessToMip( float roughness ) {
|
|
|
|
|
|
float mip = 0.0;
|
|
|
|
|
|
if ( roughness >= cubeUV_r1 ) {
|
|
|
|
|
|
mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;
|
|
|
|
|
|
} else if ( roughness >= cubeUV_r4 ) {
|
|
|
|
|
|
mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;
|
|
|
|
|
|
} else if ( roughness >= cubeUV_r5 ) {
|
|
|
|
|
|
mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;
|
|
|
|
|
|
} else if ( roughness >= cubeUV_r6 ) {
|
|
|
|
|
|
mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
mip = - 2.0 * log2( 1.16 * roughness ); }
|
|
|
|
|
|
return mip;
|
|
|
|
|
|
}
|
|
|
|
|
|
vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {
|
|
|
|
|
|
float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );
|
|
|
|
|
|
float mipF = fract( mip );
|
|
|
|
|
|
float mipInt = floor( mip );
|
|
|
|
|
|
vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );
|
|
|
|
|
|
if ( mipF == 0.0 ) {
|
|
|
|
|
|
return vec4( color0, 1.0 );
|
|
|
|
|
|
} else {
|
|
|
|
|
|
vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );
|
|
|
|
|
|
return vec4( mix( color0, color1, mipF ), 1.0 );
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif`,defaultnormal_vertex=`vec3 transformedNormal = objectNormal;
|
|
|
|
|
|
#ifdef USE_TANGENT
|
|
|
|
|
|
vec3 transformedTangent = objectTangent;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_BATCHING
|
|
|
|
|
|
mat3 bm = mat3( batchingMatrix );
|
|
|
|
|
|
transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );
|
|
|
|
|
|
transformedNormal = bm * transformedNormal;
|
|
|
|
|
|
#ifdef USE_TANGENT
|
|
|
|
|
|
transformedTangent = bm * transformedTangent;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_INSTANCING
|
|
|
|
|
|
mat3 im = mat3( instanceMatrix );
|
|
|
|
|
|
transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );
|
|
|
|
|
|
transformedNormal = im * transformedNormal;
|
|
|
|
|
|
#ifdef USE_TANGENT
|
|
|
|
|
|
transformedTangent = im * transformedTangent;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
transformedNormal = normalMatrix * transformedNormal;
|
|
|
|
|
|
#ifdef FLIP_SIDED
|
|
|
|
|
|
transformedNormal = - transformedNormal;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_TANGENT
|
|
|
|
|
|
transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;
|
|
|
|
|
|
#ifdef FLIP_SIDED
|
|
|
|
|
|
transformedTangent = - transformedTangent;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif`,displacementmap_pars_vertex=`#ifdef USE_DISPLACEMENTMAP
|
|
|
|
|
|
uniform sampler2D displacementMap;
|
|
|
|
|
|
uniform float displacementScale;
|
|
|
|
|
|
uniform float displacementBias;
|
|
|
|
|
|
#endif`,displacementmap_vertex=`#ifdef USE_DISPLACEMENTMAP
|
|
|
|
|
|
transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );
|
|
|
|
|
|
#endif`,emissivemap_fragment=`#ifdef USE_EMISSIVEMAP
|
|
|
|
|
|
vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );
|
|
|
|
|
|
#ifdef DECODE_VIDEO_TEXTURE_EMISSIVE
|
|
|
|
|
|
emissiveColor = sRGBTransferEOTF( emissiveColor );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
totalEmissiveRadiance *= emissiveColor.rgb;
|
|
|
|
|
|
#endif`,emissivemap_pars_fragment=`#ifdef USE_EMISSIVEMAP
|
|
|
|
|
|
uniform sampler2D emissiveMap;
|
|
|
|
|
|
#endif`,colorspace_fragment="gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment=`vec4 LinearTransferOETF( in vec4 value ) {
|
|
|
|
|
|
return value;
|
|
|
|
|
|
}
|
|
|
|
|
|
vec4 sRGBTransferEOTF( in vec4 value ) {
|
|
|
|
|
|
return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec4 sRGBTransferOETF( in vec4 value ) {
|
|
|
|
|
|
return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );
|
|
|
|
|
|
}`,envmap_fragment=`#ifdef USE_ENVMAP
|
|
|
|
|
|
#ifdef ENV_WORLDPOS
|
|
|
|
|
|
vec3 cameraToFrag;
|
|
|
|
|
|
if ( isOrthographic ) {
|
|
|
|
|
|
cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
|
|
|
|
|
|
} else {
|
|
|
|
|
|
cameraToFrag = normalize( vWorldPosition - cameraPosition );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
|
|
|
|
|
|
#ifdef ENVMAP_MODE_REFLECTION
|
|
|
|
|
|
vec3 reflectVec = reflect( cameraToFrag, worldNormal );
|
|
|
|
|
|
#else
|
|
|
|
|
|
vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#else
|
|
|
|
|
|
vec3 reflectVec = vReflect;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef ENVMAP_TYPE_CUBE
|
|
|
|
|
|
vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );
|
|
|
|
|
|
#else
|
|
|
|
|
|
vec4 envColor = vec4( 0.0 );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef ENVMAP_BLENDING_MULTIPLY
|
|
|
|
|
|
outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );
|
|
|
|
|
|
#elif defined( ENVMAP_BLENDING_MIX )
|
|
|
|
|
|
outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );
|
|
|
|
|
|
#elif defined( ENVMAP_BLENDING_ADD )
|
|
|
|
|
|
outgoingLight += envColor.xyz * specularStrength * reflectivity;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif`,envmap_common_pars_fragment=`#ifdef USE_ENVMAP
|
|
|
|
|
|
uniform float envMapIntensity;
|
|
|
|
|
|
uniform float flipEnvMap;
|
|
|
|
|
|
uniform mat3 envMapRotation;
|
|
|
|
|
|
#ifdef ENVMAP_TYPE_CUBE
|
|
|
|
|
|
uniform samplerCube envMap;
|
|
|
|
|
|
#else
|
|
|
|
|
|
uniform sampler2D envMap;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif`,envmap_pars_fragment=`#ifdef USE_ENVMAP
|
|
|
|
|
|
uniform float reflectivity;
|
|
|
|
|
|
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
|
|
|
|
|
|
#define ENV_WORLDPOS
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef ENV_WORLDPOS
|
|
|
|
|
|
varying vec3 vWorldPosition;
|
|
|
|
|
|
uniform float refractionRatio;
|
|
|
|
|
|
#else
|
|
|
|
|
|
varying vec3 vReflect;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif`,envmap_pars_vertex=`#ifdef USE_ENVMAP
|
|
|
|
|
|
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
|
|
|
|
|
|
#define ENV_WORLDPOS
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef ENV_WORLDPOS
|
|
|
|
|
|
|
|
|
|
|
|
varying vec3 vWorldPosition;
|
|
|
|
|
|
#else
|
|
|
|
|
|
varying vec3 vReflect;
|
|
|
|
|
|
uniform float refractionRatio;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif`,envmap_vertex=`#ifdef USE_ENVMAP
|
|
|
|
|
|
#ifdef ENV_WORLDPOS
|
|
|
|
|
|
vWorldPosition = worldPosition.xyz;
|
|
|
|
|
|
#else
|
|
|
|
|
|
vec3 cameraToVertex;
|
|
|
|
|
|
if ( isOrthographic ) {
|
|
|
|
|
|
cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
|
|
|
|
|
|
} else {
|
|
|
|
|
|
cameraToVertex = normalize( worldPosition.xyz - cameraPosition );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
|
|
|
|
|
|
#ifdef ENVMAP_MODE_REFLECTION
|
|
|
|
|
|
vReflect = reflect( cameraToVertex, worldNormal );
|
|
|
|
|
|
#else
|
|
|
|
|
|
vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif`,fog_vertex=`#ifdef USE_FOG
|
|
|
|
|
|
vFogDepth = - mvPosition.z;
|
|
|
|
|
|
#endif`,fog_pars_vertex=`#ifdef USE_FOG
|
|
|
|
|
|
varying float vFogDepth;
|
|
|
|
|
|
#endif`,fog_fragment=`#ifdef USE_FOG
|
|
|
|
|
|
#ifdef FOG_EXP2
|
|
|
|
|
|
float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );
|
|
|
|
|
|
#else
|
|
|
|
|
|
float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
|
|
|
|
|
|
#endif`,fog_pars_fragment=`#ifdef USE_FOG
|
|
|
|
|
|
uniform vec3 fogColor;
|
|
|
|
|
|
varying float vFogDepth;
|
|
|
|
|
|
#ifdef FOG_EXP2
|
|
|
|
|
|
uniform float fogDensity;
|
|
|
|
|
|
#else
|
|
|
|
|
|
uniform float fogNear;
|
|
|
|
|
|
uniform float fogFar;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif`,gradientmap_pars_fragment=`#ifdef USE_GRADIENTMAP
|
|
|
|
|
|
uniform sampler2D gradientMap;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
|
|
|
|
|
|
float dotNL = dot( normal, lightDirection );
|
|
|
|
|
|
vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );
|
|
|
|
|
|
#ifdef USE_GRADIENTMAP
|
|
|
|
|
|
return vec3( texture2D( gradientMap, coord ).r );
|
|
|
|
|
|
#else
|
|
|
|
|
|
vec2 fw = fwidth( coord ) * 0.5;
|
|
|
|
|
|
return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
}`,lightmap_pars_fragment=`#ifdef USE_LIGHTMAP
|
|
|
|
|
|
uniform sampler2D lightMap;
|
|
|
|
|
|
uniform float lightMapIntensity;
|
|
|
|
|
|
#endif`,lights_lambert_fragment=`LambertMaterial material;
|
|
|
|
|
|
material.diffuseColor = diffuseColor.rgb;
|
|
|
|
|
|
material.specularStrength = specularStrength;`,lights_lambert_pars_fragment=`varying vec3 vViewPosition;
|
|
|
|
|
|
struct LambertMaterial {
|
|
|
|
|
|
vec3 diffuseColor;
|
|
|
|
|
|
float specularStrength;
|
|
|
|
|
|
};
|
|
|
|
|
|
void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {
|
|
|
|
|
|
float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
|
|
|
|
|
|
vec3 irradiance = dotNL * directLight.color;
|
|
|
|
|
|
reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
|
|
|
|
|
|
}
|
|
|
|
|
|
void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {
|
|
|
|
|
|
reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
|
|
|
|
|
|
}
|
|
|
|
|
|
#define RE_Direct RE_Direct_Lambert
|
|
|
|
|
|
#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,lights_pars_begin=`uniform bool receiveShadow;
|
|
|
|
|
|
uniform vec3 ambientLightColor;
|
|
|
|
|
|
#if defined( USE_LIGHT_PROBES )
|
|
|
|
|
|
uniform vec3 lightProbe[ 9 ];
|
|
|
|
|
|
#endif
|
|
|
|
|
|
vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {
|
|
|
|
|
|
float x = normal.x, y = normal.y, z = normal.z;
|
|
|
|
|
|
vec3 result = shCoefficients[ 0 ] * 0.886227;
|
|
|
|
|
|
result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;
|
|
|
|
|
|
result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;
|
|
|
|
|
|
result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;
|
|
|
|
|
|
result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;
|
|
|
|
|
|
result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;
|
|
|
|
|
|
result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );
|
|
|
|
|
|
result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;
|
|
|
|
|
|
result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );
|
|
|
|
|
|
return result;
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {
|
|
|
|
|
|
vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
|
|
|
|
|
|
vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );
|
|
|
|
|
|
return irradiance;
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
|
|
|
|
|
|
vec3 irradiance = ambientLightColor;
|
|
|
|
|
|
return irradiance;
|
|
|
|
|
|
}
|
|
|
|
|
|
float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {
|
|
|
|
|
|
float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );
|
|
|
|
|
|
if ( cutoffDistance > 0.0 ) {
|
|
|
|
|
|
distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );
|
|
|
|
|
|
}
|
|
|
|
|
|
return distanceFalloff;
|
|
|
|
|
|
}
|
|
|
|
|
|
float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {
|
|
|
|
|
|
return smoothstep( coneCosine, penumbraCosine, angleCosine );
|
|
|
|
|
|
}
|
|
|
|
|
|
#if NUM_DIR_LIGHTS > 0
|
|
|
|
|
|
struct DirectionalLight {
|
|
|
|
|
|
vec3 direction;
|
|
|
|
|
|
vec3 color;
|
|
|
|
|
|
};
|
|
|
|
|
|
uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];
|
|
|
|
|
|
void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {
|
|
|
|
|
|
light.color = directionalLight.color;
|
|
|
|
|
|
light.direction = directionalLight.direction;
|
|
|
|
|
|
light.visible = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if NUM_POINT_LIGHTS > 0
|
|
|
|
|
|
struct PointLight {
|
|
|
|
|
|
vec3 position;
|
|
|
|
|
|
vec3 color;
|
|
|
|
|
|
float distance;
|
|
|
|
|
|
float decay;
|
|
|
|
|
|
};
|
|
|
|
|
|
uniform PointLight pointLights[ NUM_POINT_LIGHTS ];
|
|
|
|
|
|
void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {
|
|
|
|
|
|
vec3 lVector = pointLight.position - geometryPosition;
|
|
|
|
|
|
light.direction = normalize( lVector );
|
|
|
|
|
|
float lightDistance = length( lVector );
|
|
|
|
|
|
light.color = pointLight.color;
|
|
|
|
|
|
light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );
|
|
|
|
|
|
light.visible = ( light.color != vec3( 0.0 ) );
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if NUM_SPOT_LIGHTS > 0
|
|
|
|
|
|
struct SpotLight {
|
|
|
|
|
|
vec3 position;
|
|
|
|
|
|
vec3 direction;
|
|
|
|
|
|
vec3 color;
|
|
|
|
|
|
float distance;
|
|
|
|
|
|
float decay;
|
|
|
|
|
|
float coneCos;
|
|
|
|
|
|
float penumbraCos;
|
|
|
|
|
|
};
|
|
|
|
|
|
uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];
|
|
|
|
|
|
void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {
|
|
|
|
|
|
vec3 lVector = spotLight.position - geometryPosition;
|
|
|
|
|
|
light.direction = normalize( lVector );
|
|
|
|
|
|
float angleCos = dot( light.direction, spotLight.direction );
|
|
|
|
|
|
float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );
|
|
|
|
|
|
if ( spotAttenuation > 0.0 ) {
|
|
|
|
|
|
float lightDistance = length( lVector );
|
|
|
|
|
|
light.color = spotLight.color * spotAttenuation;
|
|
|
|
|
|
light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );
|
|
|
|
|
|
light.visible = ( light.color != vec3( 0.0 ) );
|
|
|
|
|
|
} else {
|
|
|
|
|
|
light.color = vec3( 0.0 );
|
|
|
|
|
|
light.visible = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if NUM_RECT_AREA_LIGHTS > 0
|
|
|
|
|
|
struct RectAreaLight {
|
|
|
|
|
|
vec3 color;
|
|
|
|
|
|
vec3 position;
|
|
|
|
|
|
vec3 halfWidth;
|
|
|
|
|
|
vec3 halfHeight;
|
|
|
|
|
|
};
|
|
|
|
|
|
uniform sampler2D ltc_1; uniform sampler2D ltc_2;
|
|
|
|
|
|
uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if NUM_HEMI_LIGHTS > 0
|
|
|
|
|
|
struct HemisphereLight {
|
|
|
|
|
|
vec3 direction;
|
|
|
|
|
|
vec3 skyColor;
|
|
|
|
|
|
vec3 groundColor;
|
|
|
|
|
|
};
|
|
|
|
|
|
uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];
|
|
|
|
|
|
vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {
|
|
|
|
|
|
float dotNL = dot( normal, hemiLight.direction );
|
|
|
|
|
|
float hemiDiffuseWeight = 0.5 * dotNL + 0.5;
|
|
|
|
|
|
vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );
|
|
|
|
|
|
return irradiance;
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif`,envmap_physical_pars_fragment=`#ifdef USE_ENVMAP
|
|
|
|
|
|
vec3 getIBLIrradiance( const in vec3 normal ) {
|
|
|
|
|
|
#ifdef ENVMAP_TYPE_CUBE_UV
|
|
|
|
|
|
vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
|
|
|
|
|
|
vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );
|
|
|
|
|
|
return PI * envMapColor.rgb * envMapIntensity;
|
|
|
|
|
|
#else
|
|
|
|
|
|
return vec3( 0.0 );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {
|
|
|
|
|
|
#ifdef ENVMAP_TYPE_CUBE_UV
|
|
|
|
|
|
vec3 reflectVec = reflect( - viewDir, normal );
|
|
|
|
|
|
reflectVec = normalize( mix( reflectVec, normal, pow4( roughness ) ) );
|
|
|
|
|
|
reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
|
|
|
|
|
|
vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );
|
|
|
|
|
|
return envMapColor.rgb * envMapIntensity;
|
|
|
|
|
|
#else
|
|
|
|
|
|
return vec3( 0.0 );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
}
|
|
|
|
|
|
#ifdef USE_ANISOTROPY
|
|
|
|
|
|
vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {
|
|
|
|
|
|
#ifdef ENVMAP_TYPE_CUBE_UV
|
|
|
|
|
|
vec3 bentNormal = cross( bitangent, viewDir );
|
|
|
|
|
|
bentNormal = normalize( cross( bentNormal, bitangent ) );
|
|
|
|
|
|
bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );
|
|
|
|
|
|
return getIBLRadiance( viewDir, bentNormal, roughness );
|
|
|
|
|
|
#else
|
|
|
|
|
|
return vec3( 0.0 );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif`,lights_toon_fragment=`ToonMaterial material;
|
|
|
|
|
|
material.diffuseColor = diffuseColor.rgb;`,lights_toon_pars_fragment=`varying vec3 vViewPosition;
|
|
|
|
|
|
struct ToonMaterial {
|
|
|
|
|
|
vec3 diffuseColor;
|
|
|
|
|
|
};
|
|
|
|
|
|
void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
|
|
|
|
|
|
vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;
|
|
|
|
|
|
reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
|
|
|
|
|
|
}
|
|
|
|
|
|
void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
|
|
|
|
|
|
reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
|
|
|
|
|
|
}
|
|
|
|
|
|
#define RE_Direct RE_Direct_Toon
|
|
|
|
|
|
#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,lights_phong_fragment=`BlinnPhongMaterial material;
|
|
|
|
|
|
material.diffuseColor = diffuseColor.rgb;
|
|
|
|
|
|
material.specularColor = specular;
|
|
|
|
|
|
material.specularShininess = shininess;
|
|
|
|
|
|
material.specularStrength = specularStrength;`,lights_phong_pars_fragment=`varying vec3 vViewPosition;
|
|
|
|
|
|
struct BlinnPhongMaterial {
|
|
|
|
|
|
vec3 diffuseColor;
|
|
|
|
|
|
vec3 specularColor;
|
|
|
|
|
|
float specularShininess;
|
|
|
|
|
|
float specularStrength;
|
|
|
|
|
|
};
|
|
|
|
|
|
void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
|
|
|
|
|
|
float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
|
|
|
|
|
|
vec3 irradiance = dotNL * directLight.color;
|
|
|
|
|
|
reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
|
|
|
|
|
|
reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;
|
|
|
|
|
|
}
|
|
|
|
|
|
void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
|
|
|
|
|
|
reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
|
|
|
|
|
|
}
|
|
|
|
|
|
#define RE_Direct RE_Direct_BlinnPhong
|
|
|
|
|
|
#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,lights_physical_fragment=`PhysicalMaterial material;
|
|
|
|
|
|
material.diffuseColor = diffuseColor.rgb;
|
|
|
|
|
|
material.diffuseContribution = diffuseColor.rgb * ( 1.0 - metalnessFactor );
|
|
|
|
|
|
material.metalness = metalnessFactor;
|
|
|
|
|
|
vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );
|
|
|
|
|
|
float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );
|
|
|
|
|
|
material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;
|
|
|
|
|
|
material.roughness = min( material.roughness, 1.0 );
|
|
|
|
|
|
#ifdef IOR
|
|
|
|
|
|
material.ior = ior;
|
|
|
|
|
|
#ifdef USE_SPECULAR
|
|
|
|
|
|
float specularIntensityFactor = specularIntensity;
|
|
|
|
|
|
vec3 specularColorFactor = specularColor;
|
|
|
|
|
|
#ifdef USE_SPECULAR_COLORMAP
|
|
|
|
|
|
specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SPECULAR_INTENSITYMAP
|
|
|
|
|
|
specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );
|
|
|
|
|
|
#else
|
|
|
|
|
|
float specularIntensityFactor = 1.0;
|
|
|
|
|
|
vec3 specularColorFactor = vec3( 1.0 );
|
|
|
|
|
|
material.specularF90 = 1.0;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
material.specularColor = min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor;
|
|
|
|
|
|
material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );
|
|
|
|
|
|
#else
|
|
|
|
|
|
material.specularColor = vec3( 0.04 );
|
|
|
|
|
|
material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );
|
|
|
|
|
|
material.specularF90 = 1.0;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_CLEARCOAT
|
|
|
|
|
|
material.clearcoat = clearcoat;
|
|
|
|
|
|
material.clearcoatRoughness = clearcoatRoughness;
|
|
|
|
|
|
material.clearcoatF0 = vec3( 0.04 );
|
|
|
|
|
|
material.clearcoatF90 = 1.0;
|
|
|
|
|
|
#ifdef USE_CLEARCOATMAP
|
|
|
|
|
|
material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
|
|
|
|
|
|
material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );
|
|
|
|
|
|
material.clearcoatRoughness += geometryRoughness;
|
|
|
|
|
|
material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_DISPERSION
|
|
|
|
|
|
material.dispersion = dispersion;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_IRIDESCENCE
|
|
|
|
|
|
material.iridescence = iridescence;
|
|
|
|
|
|
material.iridescenceIOR = iridescenceIOR;
|
|
|
|
|
|
#ifdef USE_IRIDESCENCEMAP
|
|
|
|
|
|
material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_IRIDESCENCE_THICKNESSMAP
|
|
|
|
|
|
material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;
|
|
|
|
|
|
#else
|
|
|
|
|
|
material.iridescenceThickness = iridescenceThicknessMaximum;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SHEEN
|
|
|
|
|
|
material.sheenColor = sheenColor;
|
|
|
|
|
|
#ifdef USE_SHEEN_COLORMAP
|
|
|
|
|
|
material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
material.sheenRoughness = clamp( sheenRoughness, 0.0001, 1.0 );
|
|
|
|
|
|
#ifdef USE_SHEEN_ROUGHNESSMAP
|
|
|
|
|
|
material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_ANISOTROPY
|
|
|
|
|
|
#ifdef USE_ANISOTROPYMAP
|
|
|
|
|
|
mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );
|
|
|
|
|
|
vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;
|
|
|
|
|
|
vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;
|
|
|
|
|
|
#else
|
|
|
|
|
|
vec2 anisotropyV = anisotropyVector;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
material.anisotropy = length( anisotropyV );
|
|
|
|
|
|
if( material.anisotropy == 0.0 ) {
|
|
|
|
|
|
anisotropyV = vec2( 1.0, 0.0 );
|
|
|
|
|
|
} else {
|
|
|
|
|
|
anisotropyV /= material.anisotropy;
|
|
|
|
|
|
material.anisotropy = saturate( material.anisotropy );
|
|
|
|
|
|
}
|
|
|
|
|
|
material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
|
|
|
|
|
|
material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;
|
|
|
|
|
|
material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;
|
|
|
|
|
|
#endif`,lights_physical_pars_fragment=`uniform sampler2D dfgLUT;
|
|
|
|
|
|
struct PhysicalMaterial {
|
|
|
|
|
|
vec3 diffuseColor;
|
|
|
|
|
|
vec3 diffuseContribution;
|
|
|
|
|
|
vec3 specularColor;
|
|
|
|
|
|
vec3 specularColorBlended;
|
|
|
|
|
|
float roughness;
|
|
|
|
|
|
float metalness;
|
|
|
|
|
|
float specularF90;
|
|
|
|
|
|
float dispersion;
|
|
|
|
|
|
#ifdef USE_CLEARCOAT
|
|
|
|
|
|
float clearcoat;
|
|
|
|
|
|
float clearcoatRoughness;
|
|
|
|
|
|
vec3 clearcoatF0;
|
|
|
|
|
|
float clearcoatF90;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_IRIDESCENCE
|
|
|
|
|
|
float iridescence;
|
|
|
|
|
|
float iridescenceIOR;
|
|
|
|
|
|
float iridescenceThickness;
|
|
|
|
|
|
vec3 iridescenceFresnel;
|
|
|
|
|
|
vec3 iridescenceF0;
|
|
|
|
|
|
vec3 iridescenceFresnelDielectric;
|
|
|
|
|
|
vec3 iridescenceFresnelMetallic;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SHEEN
|
|
|
|
|
|
vec3 sheenColor;
|
|
|
|
|
|
float sheenRoughness;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef IOR
|
|
|
|
|
|
float ior;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_TRANSMISSION
|
|
|
|
|
|
float transmission;
|
|
|
|
|
|
float transmissionAlpha;
|
|
|
|
|
|
float thickness;
|
|
|
|
|
|
float attenuationDistance;
|
|
|
|
|
|
vec3 attenuationColor;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_ANISOTROPY
|
|
|
|
|
|
float anisotropy;
|
|
|
|
|
|
float alphaT;
|
|
|
|
|
|
vec3 anisotropyT;
|
|
|
|
|
|
vec3 anisotropyB;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
};
|
|
|
|
|
|
vec3 clearcoatSpecularDirect = vec3( 0.0 );
|
|
|
|
|
|
vec3 clearcoatSpecularIndirect = vec3( 0.0 );
|
|
|
|
|
|
vec3 sheenSpecularDirect = vec3( 0.0 );
|
|
|
|
|
|
vec3 sheenSpecularIndirect = vec3(0.0 );
|
|
|
|
|
|
vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {
|
|
|
|
|
|
float x = clamp( 1.0 - dotVH, 0.0, 1.0 );
|
|
|
|
|
|
float x2 = x * x;
|
|
|
|
|
|
float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );
|
|
|
|
|
|
return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );
|
|
|
|
|
|
}
|
|
|
|
|
|
float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {
|
|
|
|
|
|
float a2 = pow2( alpha );
|
|
|
|
|
|
float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
|
|
|
|
|
|
float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
|
|
|
|
|
|
return 0.5 / max( gv + gl, EPSILON );
|
|
|
|
|
|
}
|
|
|
|
|
|
float D_GGX( const in float alpha, const in float dotNH ) {
|
|
|
|
|
|
float a2 = pow2( alpha );
|
|
|
|
|
|
float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;
|
|
|
|
|
|
return RECIPROCAL_PI * a2 / pow2( denom );
|
|
|
|
|
|
}
|
|
|
|
|
|
#ifdef USE_ANISOTROPY
|
|
|
|
|
|
float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {
|
|
|
|
|
|
float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );
|
|
|
|
|
|
float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );
|
|
|
|
|
|
float v = 0.5 / ( gv + gl );
|
|
|
|
|
|
return v;
|
|
|
|
|
|
}
|
|
|
|
|
|
float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {
|
|
|
|
|
|
float a2 = alphaT * alphaB;
|
|
|
|
|
|
highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );
|
|
|
|
|
|
highp float v2 = dot( v, v );
|
|
|
|
|
|
float w2 = a2 / v2;
|
|
|
|
|
|
return RECIPROCAL_PI * a2 * pow2 ( w2 );
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_CLEARCOAT
|
|
|
|
|
|
vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {
|
|
|
|
|
|
vec3 f0 = material.clearcoatF0;
|
|
|
|
|
|
float f90 = material.clearcoatF90;
|
|
|
|
|
|
float roughness = material.clearcoatRoughness;
|
|
|
|
|
|
float alpha = pow2( roughness );
|
|
|
|
|
|
vec3 halfDir = normalize( lightDir + viewDir );
|
|
|
|
|
|
float dotNL = saturate( dot( normal, lightDir ) );
|
|
|
|
|
|
float dotNV = saturate( dot( normal, viewDir ) );
|
|
|
|
|
|
float dotNH = saturate( dot( normal, halfDir ) );
|
|
|
|
|
|
float dotVH = saturate( dot( viewDir, halfDir ) );
|
|
|
|
|
|
vec3 F = F_Schlick( f0, f90, dotVH );
|
|
|
|
|
|
float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
|
|
|
|
|
|
float D = D_GGX( alpha, dotNH );
|
|
|
|
|
|
return F * ( V * D );
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {
|
|
|
|
|
|
vec3 f0 = material.specularColorBlended;
|
|
|
|
|
|
float f90 = material.specularF90;
|
|
|
|
|
|
float roughness = material.roughness;
|
|
|
|
|
|
float alpha = pow2( roughness );
|
|
|
|
|
|
vec3 halfDir = normalize( lightDir + viewDir );
|
|
|
|
|
|
float dotNL = saturate( dot( normal, lightDir ) );
|
|
|
|
|
|
float dotNV = saturate( dot( normal, viewDir ) );
|
|
|
|
|
|
float dotNH = saturate( dot( normal, halfDir ) );
|
|
|
|
|
|
float dotVH = saturate( dot( viewDir, halfDir ) );
|
|
|
|
|
|
vec3 F = F_Schlick( f0, f90, dotVH );
|
|
|
|
|
|
#ifdef USE_IRIDESCENCE
|
|
|
|
|
|
F = mix( F, material.iridescenceFresnel, material.iridescence );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_ANISOTROPY
|
|
|
|
|
|
float dotTL = dot( material.anisotropyT, lightDir );
|
|
|
|
|
|
float dotTV = dot( material.anisotropyT, viewDir );
|
|
|
|
|
|
float dotTH = dot( material.anisotropyT, halfDir );
|
|
|
|
|
|
float dotBL = dot( material.anisotropyB, lightDir );
|
|
|
|
|
|
float dotBV = dot( material.anisotropyB, viewDir );
|
|
|
|
|
|
float dotBH = dot( material.anisotropyB, halfDir );
|
|
|
|
|
|
float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );
|
|
|
|
|
|
float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );
|
|
|
|
|
|
#else
|
|
|
|
|
|
float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
|
|
|
|
|
|
float D = D_GGX( alpha, dotNH );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
return F * ( V * D );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {
|
|
|
|
|
|
const float LUT_SIZE = 64.0;
|
|
|
|
|
|
const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;
|
|
|
|
|
|
const float LUT_BIAS = 0.5 / LUT_SIZE;
|
|
|
|
|
|
float dotNV = saturate( dot( N, V ) );
|
|
|
|
|
|
vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );
|
|
|
|
|
|
uv = uv * LUT_SCALE + LUT_BIAS;
|
|
|
|
|
|
return uv;
|
|
|
|
|
|
}
|
|
|
|
|
|
float LTC_ClippedSphereFormFactor( const in vec3 f ) {
|
|
|
|
|
|
float l = length( f );
|
|
|
|
|
|
return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {
|
|
|
|
|
|
float x = dot( v1, v2 );
|
|
|
|
|
|
float y = abs( x );
|
|
|
|
|
|
float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;
|
|
|
|
|
|
float b = 3.4175940 + ( 4.1616724 + y ) * y;
|
|
|
|
|
|
float v = a / b;
|
|
|
|
|
|
float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;
|
|
|
|
|
|
return cross( v1, v2 ) * theta_sintheta;
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {
|
|
|
|
|
|
vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];
|
|
|
|
|
|
vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];
|
|
|
|
|
|
vec3 lightNormal = cross( v1, v2 );
|
|
|
|
|
|
if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );
|
|
|
|
|
|
vec3 T1, T2;
|
|
|
|
|
|
T1 = normalize( V - N * dot( V, N ) );
|
|
|
|
|
|
T2 = - cross( N, T1 );
|
|
|
|
|
|
mat3 mat = mInv * transpose( mat3( T1, T2, N ) );
|
|
|
|
|
|
vec3 coords[ 4 ];
|
|
|
|
|
|
coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );
|
|
|
|
|
|
coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );
|
|
|
|
|
|
coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );
|
|
|
|
|
|
coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );
|
|
|
|
|
|
coords[ 0 ] = normalize( coords[ 0 ] );
|
|
|
|
|
|
coords[ 1 ] = normalize( coords[ 1 ] );
|
|
|
|
|
|
coords[ 2 ] = normalize( coords[ 2 ] );
|
|
|
|
|
|
coords[ 3 ] = normalize( coords[ 3 ] );
|
|
|
|
|
|
vec3 vectorFormFactor = vec3( 0.0 );
|
|
|
|
|
|
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );
|
|
|
|
|
|
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );
|
|
|
|
|
|
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );
|
|
|
|
|
|
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );
|
|
|
|
|
|
float result = LTC_ClippedSphereFormFactor( vectorFormFactor );
|
|
|
|
|
|
return vec3( result );
|
|
|
|
|
|
}
|
|
|
|
|
|
#if defined( USE_SHEEN )
|
|
|
|
|
|
float D_Charlie( float roughness, float dotNH ) {
|
|
|
|
|
|
float alpha = pow2( roughness );
|
|
|
|
|
|
float invAlpha = 1.0 / alpha;
|
|
|
|
|
|
float cos2h = dotNH * dotNH;
|
|
|
|
|
|
float sin2h = max( 1.0 - cos2h, 0.0078125 );
|
|
|
|
|
|
return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );
|
|
|
|
|
|
}
|
|
|
|
|
|
float V_Neubelt( float dotNV, float dotNL ) {
|
|
|
|
|
|
return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {
|
|
|
|
|
|
vec3 halfDir = normalize( lightDir + viewDir );
|
|
|
|
|
|
float dotNL = saturate( dot( normal, lightDir ) );
|
|
|
|
|
|
float dotNV = saturate( dot( normal, viewDir ) );
|
|
|
|
|
|
float dotNH = saturate( dot( normal, halfDir ) );
|
|
|
|
|
|
float D = D_Charlie( sheenRoughness, dotNH );
|
|
|
|
|
|
float V = V_Neubelt( dotNV, dotNL );
|
|
|
|
|
|
return sheenColor * ( D * V );
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
|
|
|
|
|
|
float dotNV = saturate( dot( normal, viewDir ) );
|
|
|
|
|
|
float r2 = roughness * roughness;
|
|
|
|
|
|
float rInv = 1.0 / ( roughness + 0.1 );
|
|
|
|
|
|
float a = -1.9362 + 1.0678 * roughness + 0.4573 * r2 - 0.8469 * rInv;
|
|
|
|
|
|
float b = -0.6014 + 0.5538 * roughness - 0.4670 * r2 - 0.1255 * rInv;
|
|
|
|
|
|
float DG = exp( a * dotNV + b );
|
|
|
|
|
|
return saturate( DG );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {
|
|
|
|
|
|
float dotNV = saturate( dot( normal, viewDir ) );
|
|
|
|
|
|
vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;
|
|
|
|
|
|
return specularColor * fab.x + specularF90 * fab.y;
|
|
|
|
|
|
}
|
|
|
|
|
|
#ifdef USE_IRIDESCENCE
|
|
|
|
|
|
void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {
|
|
|
|
|
|
#else
|
|
|
|
|
|
void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {
|
|
|
|
|
|
#endif
|
|
|
|
|
|
float dotNV = saturate( dot( normal, viewDir ) );
|
|
|
|
|
|
vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;
|
|
|
|
|
|
#ifdef USE_IRIDESCENCE
|
|
|
|
|
|
vec3 Fr = mix( specularColor, iridescenceF0, iridescence );
|
|
|
|
|
|
#else
|
|
|
|
|
|
vec3 Fr = specularColor;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
vec3 FssEss = Fr * fab.x + specularF90 * fab.y;
|
|
|
|
|
|
float Ess = fab.x + fab.y;
|
|
|
|
|
|
float Ems = 1.0 - Ess;
|
|
|
|
|
|
vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );
|
|
|
|
|
|
singleScatter += FssEss;
|
|
|
|
|
|
multiScatter += Fms * Ems;
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 BRDF_GGX_Multiscatter( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {
|
|
|
|
|
|
vec3 singleScatter = BRDF_GGX( lightDir, viewDir, normal, material );
|
|
|
|
|
|
float dotNL = saturate( dot( normal, lightDir ) );
|
|
|
|
|
|
float dotNV = saturate( dot( normal, viewDir ) );
|
|
|
|
|
|
vec2 dfgV = texture2D( dfgLUT, vec2( material.roughness, dotNV ) ).rg;
|
|
|
|
|
|
vec2 dfgL = texture2D( dfgLUT, vec2( material.roughness, dotNL ) ).rg;
|
|
|
|
|
|
vec3 FssEss_V = material.specularColorBlended * dfgV.x + material.specularF90 * dfgV.y;
|
|
|
|
|
|
vec3 FssEss_L = material.specularColorBlended * dfgL.x + material.specularF90 * dfgL.y;
|
|
|
|
|
|
float Ess_V = dfgV.x + dfgV.y;
|
|
|
|
|
|
float Ess_L = dfgL.x + dfgL.y;
|
|
|
|
|
|
float Ems_V = 1.0 - Ess_V;
|
|
|
|
|
|
float Ems_L = 1.0 - Ess_L;
|
|
|
|
|
|
vec3 Favg = material.specularColorBlended + ( 1.0 - material.specularColorBlended ) * 0.047619;
|
|
|
|
|
|
vec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg + EPSILON );
|
|
|
|
|
|
float compensationFactor = Ems_V * Ems_L;
|
|
|
|
|
|
vec3 multiScatter = Fms * compensationFactor;
|
|
|
|
|
|
return singleScatter + multiScatter;
|
|
|
|
|
|
}
|
|
|
|
|
|
#if NUM_RECT_AREA_LIGHTS > 0
|
|
|
|
|
|
void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
|
|
|
|
|
|
vec3 normal = geometryNormal;
|
|
|
|
|
|
vec3 viewDir = geometryViewDir;
|
|
|
|
|
|
vec3 position = geometryPosition;
|
|
|
|
|
|
vec3 lightPos = rectAreaLight.position;
|
|
|
|
|
|
vec3 halfWidth = rectAreaLight.halfWidth;
|
|
|
|
|
|
vec3 halfHeight = rectAreaLight.halfHeight;
|
|
|
|
|
|
vec3 lightColor = rectAreaLight.color;
|
|
|
|
|
|
float roughness = material.roughness;
|
|
|
|
|
|
vec3 rectCoords[ 4 ];
|
|
|
|
|
|
rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;
|
|
|
|
|
|
rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;
|
|
|
|
|
|
rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;
|
|
|
|
|
|
vec2 uv = LTC_Uv( normal, viewDir, roughness );
|
|
|
|
|
|
vec4 t1 = texture2D( ltc_1, uv );
|
|
|
|
|
|
vec4 t2 = texture2D( ltc_2, uv );
|
|
|
|
|
|
mat3 mInv = mat3(
|
|
|
|
|
|
vec3( t1.x, 0, t1.y ),
|
|
|
|
|
|
vec3( 0, 1, 0 ),
|
|
|
|
|
|
vec3( t1.z, 0, t1.w )
|
|
|
|
|
|
);
|
|
|
|
|
|
vec3 fresnel = ( material.specularColorBlended * t2.x + ( vec3( 1.0 ) - material.specularColorBlended ) * t2.y );
|
|
|
|
|
|
reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );
|
|
|
|
|
|
reflectedLight.directDiffuse += lightColor * material.diffuseContribution * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
|
|
|
|
|
|
float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
|
|
|
|
|
|
vec3 irradiance = dotNL * directLight.color;
|
|
|
|
|
|
#ifdef USE_CLEARCOAT
|
|
|
|
|
|
float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );
|
|
|
|
|
|
vec3 ccIrradiance = dotNLcc * directLight.color;
|
|
|
|
|
|
clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SHEEN
|
|
|
|
|
|
|
|
|
|
|
|
sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );
|
|
|
|
|
|
|
|
|
|
|
|
float sheenAlbedoV = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );
|
|
|
|
|
|
float sheenAlbedoL = IBLSheenBRDF( geometryNormal, directLight.direction, material.sheenRoughness );
|
|
|
|
|
|
|
|
|
|
|
|
float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * max( sheenAlbedoV, sheenAlbedoL );
|
|
|
|
|
|
|
|
|
|
|
|
irradiance *= sheenEnergyComp;
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
reflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material );
|
|
|
|
|
|
reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseContribution );
|
|
|
|
|
|
}
|
|
|
|
|
|
void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
|
|
|
|
|
|
vec3 diffuse = irradiance * BRDF_Lambert( material.diffuseContribution );
|
|
|
|
|
|
#ifdef USE_SHEEN
|
|
|
|
|
|
float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );
|
|
|
|
|
|
float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;
|
|
|
|
|
|
diffuse *= sheenEnergyComp;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
reflectedLight.indirectDiffuse += diffuse;
|
|
|
|
|
|
}
|
|
|
|
|
|
void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {
|
|
|
|
|
|
#ifdef USE_CLEARCOAT
|
|
|
|
|
|
clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SHEEN
|
|
|
|
|
|
sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ) * RECIPROCAL_PI;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
vec3 singleScatteringDielectric = vec3( 0.0 );
|
|
|
|
|
|
vec3 multiScatteringDielectric = vec3( 0.0 );
|
|
|
|
|
|
vec3 singleScatteringMetallic = vec3( 0.0 );
|
|
|
|
|
|
vec3 multiScatteringMetallic = vec3( 0.0 );
|
|
|
|
|
|
#ifdef USE_IRIDESCENCE
|
|
|
|
|
|
computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnelDielectric, material.roughness, singleScatteringDielectric, multiScatteringDielectric );
|
|
|
|
|
|
computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.iridescence, material.iridescenceFresnelMetallic, material.roughness, singleScatteringMetallic, multiScatteringMetallic );
|
|
|
|
|
|
#else
|
|
|
|
|
|
computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScatteringDielectric, multiScatteringDielectric );
|
|
|
|
|
|
computeMultiscattering( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.roughness, singleScatteringMetallic, multiScatteringMetallic );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
vec3 singleScattering = mix( singleScatteringDielectric, singleScatteringMetallic, material.metalness );
|
|
|
|
|
|
vec3 multiScattering = mix( multiScatteringDielectric, multiScatteringMetallic, material.metalness );
|
|
|
|
|
|
vec3 totalScatteringDielectric = singleScatteringDielectric + multiScatteringDielectric;
|
|
|
|
|
|
vec3 diffuse = material.diffuseContribution * ( 1.0 - totalScatteringDielectric );
|
|
|
|
|
|
vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;
|
|
|
|
|
|
vec3 indirectSpecular = radiance * singleScattering;
|
|
|
|
|
|
indirectSpecular += multiScattering * cosineWeightedIrradiance;
|
|
|
|
|
|
vec3 indirectDiffuse = diffuse * cosineWeightedIrradiance;
|
|
|
|
|
|
#ifdef USE_SHEEN
|
|
|
|
|
|
float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );
|
|
|
|
|
|
float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;
|
|
|
|
|
|
indirectSpecular *= sheenEnergyComp;
|
|
|
|
|
|
indirectDiffuse *= sheenEnergyComp;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
reflectedLight.indirectSpecular += indirectSpecular;
|
|
|
|
|
|
reflectedLight.indirectDiffuse += indirectDiffuse;
|
|
|
|
|
|
}
|
|
|
|
|
|
#define RE_Direct RE_Direct_Physical
|
|
|
|
|
|
#define RE_Direct_RectArea RE_Direct_RectArea_Physical
|
|
|
|
|
|
#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical
|
|
|
|
|
|
#define RE_IndirectSpecular RE_IndirectSpecular_Physical
|
|
|
|
|
|
float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
|
|
|
|
|
|
return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );
|
|
|
|
|
|
}`,lights_fragment_begin=`
|
|
|
|
|
|
vec3 geometryPosition = - vViewPosition;
|
|
|
|
|
|
vec3 geometryNormal = normal;
|
|
|
|
|
|
vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );
|
|
|
|
|
|
vec3 geometryClearcoatNormal = vec3( 0.0 );
|
|
|
|
|
|
#ifdef USE_CLEARCOAT
|
|
|
|
|
|
geometryClearcoatNormal = clearcoatNormal;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_IRIDESCENCE
|
|
|
|
|
|
float dotNVi = saturate( dot( normal, geometryViewDir ) );
|
|
|
|
|
|
if ( material.iridescenceThickness == 0.0 ) {
|
|
|
|
|
|
material.iridescence = 0.0;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
material.iridescence = saturate( material.iridescence );
|
|
|
|
|
|
}
|
|
|
|
|
|
if ( material.iridescence > 0.0 ) {
|
|
|
|
|
|
material.iridescenceFresnelDielectric = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );
|
|
|
|
|
|
material.iridescenceFresnelMetallic = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.diffuseColor );
|
|
|
|
|
|
material.iridescenceFresnel = mix( material.iridescenceFresnelDielectric, material.iridescenceFresnelMetallic, material.metalness );
|
|
|
|
|
|
material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
IncidentLight directLight;
|
|
|
|
|
|
#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )
|
|
|
|
|
|
PointLight pointLight;
|
|
|
|
|
|
#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0
|
|
|
|
|
|
PointLightShadow pointLightShadow;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#pragma unroll_loop_start
|
|
|
|
|
|
for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
|
|
|
|
|
|
pointLight = pointLights[ i ];
|
|
|
|
|
|
getPointLightInfo( pointLight, geometryPosition, directLight );
|
|
|
|
|
|
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )
|
|
|
|
|
|
pointLightShadow = pointLightShadows[ i ];
|
|
|
|
|
|
directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
|
|
|
|
|
|
}
|
|
|
|
|
|
#pragma unroll_loop_end
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )
|
|
|
|
|
|
SpotLight spotLight;
|
|
|
|
|
|
vec4 spotColor;
|
|
|
|
|
|
vec3 spotLightCoord;
|
|
|
|
|
|
bool inSpotLightMap;
|
|
|
|
|
|
#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0
|
|
|
|
|
|
SpotLightShadow spotLightShadow;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#pragma unroll_loop_start
|
|
|
|
|
|
for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
|
|
|
|
|
|
spotLight = spotLights[ i ];
|
|
|
|
|
|
getSpotLightInfo( spotLight, geometryPosition, directLight );
|
|
|
|
|
|
#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
|
|
|
|
|
|
#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX
|
|
|
|
|
|
#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
|
|
|
|
|
|
#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS
|
|
|
|
|
|
#else
|
|
|
|
|
|
#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )
|
|
|
|
|
|
spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;
|
|
|
|
|
|
inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );
|
|
|
|
|
|
spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );
|
|
|
|
|
|
directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#undef SPOT_LIGHT_MAP_INDEX
|
|
|
|
|
|
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
|
|
|
|
|
|
spotLightShadow = spotLightShadows[ i ];
|
|
|
|
|
|
directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
|
|
|
|
|
|
}
|
|
|
|
|
|
#pragma unroll_loop_end
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )
|
|
|
|
|
|
DirectionalLight directionalLight;
|
|
|
|
|
|
#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0
|
|
|
|
|
|
DirectionalLightShadow directionalLightShadow;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#pragma unroll_loop_start
|
|
|
|
|
|
for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
|
|
|
|
|
|
directionalLight = directionalLights[ i ];
|
|
|
|
|
|
getDirectionalLightInfo( directionalLight, directLight );
|
|
|
|
|
|
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
|
|
|
|
|
|
directionalLightShadow = directionalLightShadows[ i ];
|
|
|
|
|
|
directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
|
|
|
|
|
|
}
|
|
|
|
|
|
#pragma unroll_loop_end
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )
|
|
|
|
|
|
RectAreaLight rectAreaLight;
|
|
|
|
|
|
#pragma unroll_loop_start
|
|
|
|
|
|
for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {
|
|
|
|
|
|
rectAreaLight = rectAreaLights[ i ];
|
|
|
|
|
|
RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
|
|
|
|
|
|
}
|
|
|
|
|
|
#pragma unroll_loop_end
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if defined( RE_IndirectDiffuse )
|
|
|
|
|
|
vec3 iblIrradiance = vec3( 0.0 );
|
|
|
|
|
|
vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );
|
|
|
|
|
|
#if defined( USE_LIGHT_PROBES )
|
|
|
|
|
|
irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if ( NUM_HEMI_LIGHTS > 0 )
|
|
|
|
|
|
#pragma unroll_loop_start
|
|
|
|
|
|
for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
|
|
|
|
|
|
irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );
|
|
|
|
|
|
}
|
|
|
|
|
|
#pragma unroll_loop_end
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if defined( RE_IndirectSpecular )
|
|
|
|
|
|
vec3 radiance = vec3( 0.0 );
|
|
|
|
|
|
vec3 clearcoatRadiance = vec3( 0.0 );
|
|
|
|
|
|
#endif`,lights_fragment_maps=`#if defined( RE_IndirectDiffuse )
|
|
|
|
|
|
#ifdef USE_LIGHTMAP
|
|
|
|
|
|
vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
|
|
|
|
|
|
vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
|
|
|
|
|
|
irradiance += lightMapIrradiance;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )
|
|
|
|
|
|
iblIrradiance += getIBLIrradiance( geometryNormal );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )
|
|
|
|
|
|
#ifdef USE_ANISOTROPY
|
|
|
|
|
|
radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );
|
|
|
|
|
|
#else
|
|
|
|
|
|
radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_CLEARCOAT
|
|
|
|
|
|
clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif`,lights_fragment_end=`#if defined( RE_IndirectDiffuse )
|
|
|
|
|
|
RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if defined( RE_IndirectSpecular )
|
|
|
|
|
|
RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
|
|
|
|
|
|
#endif`,logdepthbuf_fragment=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
|
|
|
|
|
|
gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
|
|
|
|
|
|
#endif`,logdepthbuf_pars_fragment=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
|
|
|
|
|
|
uniform float logDepthBufFC;
|
|
|
|
|
|
varying float vFragDepth;
|
|
|
|
|
|
varying float vIsPerspective;
|
|
|
|
|
|
#endif`,logdepthbuf_pars_vertex=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER
|
|
|
|
|
|
varying float vFragDepth;
|
|
|
|
|
|
varying float vIsPerspective;
|
|
|
|
|
|
#endif`,logdepthbuf_vertex=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER
|
|
|
|
|
|
vFragDepth = 1.0 + gl_Position.w;
|
|
|
|
|
|
vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
|
|
|
|
|
|
#endif`,map_fragment=`#ifdef USE_MAP
|
|
|
|
|
|
vec4 sampledDiffuseColor = texture2D( map, vMapUv );
|
|
|
|
|
|
#ifdef DECODE_VIDEO_TEXTURE
|
|
|
|
|
|
sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
diffuseColor *= sampledDiffuseColor;
|
|
|
|
|
|
#endif`,map_pars_fragment=`#ifdef USE_MAP
|
|
|
|
|
|
uniform sampler2D map;
|
|
|
|
|
|
#endif`,map_particle_fragment=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
|
|
|
|
|
|
#if defined( USE_POINTS_UV )
|
|
|
|
|
|
vec2 uv = vUv;
|
|
|
|
|
|
#else
|
|
|
|
|
|
vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_MAP
|
|
|
|
|
|
diffuseColor *= texture2D( map, uv );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_ALPHAMAP
|
|
|
|
|
|
diffuseColor.a *= texture2D( alphaMap, uv ).g;
|
|
|
|
|
|
#endif`,map_particle_pars_fragment=`#if defined( USE_POINTS_UV )
|
|
|
|
|
|
varying vec2 vUv;
|
|
|
|
|
|
#else
|
|
|
|
|
|
#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
|
|
|
|
|
|
uniform mat3 uvTransform;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_MAP
|
|
|
|
|
|
uniform sampler2D map;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_ALPHAMAP
|
|
|
|
|
|
uniform sampler2D alphaMap;
|
|
|
|
|
|
#endif`,metalnessmap_fragment=`float metalnessFactor = metalness;
|
|
|
|
|
|
#ifdef USE_METALNESSMAP
|
|
|
|
|
|
vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );
|
|
|
|
|
|
metalnessFactor *= texelMetalness.b;
|
|
|
|
|
|
#endif`,metalnessmap_pars_fragment=`#ifdef USE_METALNESSMAP
|
|
|
|
|
|
uniform sampler2D metalnessMap;
|
|
|
|
|
|
#endif`,morphinstance_vertex=`#ifdef USE_INSTANCING_MORPH
|
|
|
|
|
|
float morphTargetInfluences[ MORPHTARGETS_COUNT ];
|
|
|
|
|
|
float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;
|
|
|
|
|
|
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
|
|
|
|
|
|
morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif`,morphcolor_vertex=`#if defined( USE_MORPHCOLORS )
|
|
|
|
|
|
vColor *= morphTargetBaseInfluence;
|
|
|
|
|
|
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
|
|
|
|
|
|
#if defined( USE_COLOR_ALPHA )
|
|
|
|
|
|
if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];
|
|
|
|
|
|
#elif defined( USE_COLOR )
|
|
|
|
|
|
if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];
|
|
|
|
|
|
#endif
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif`,morphnormal_vertex=`#ifdef USE_MORPHNORMALS
|
|
|
|
|
|
objectNormal *= morphTargetBaseInfluence;
|
|
|
|
|
|
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
|
|
|
|
|
|
if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif`,morphtarget_pars_vertex=`#ifdef USE_MORPHTARGETS
|
|
|
|
|
|
#ifndef USE_INSTANCING_MORPH
|
|
|
|
|
|
uniform float morphTargetBaseInfluence;
|
|
|
|
|
|
uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];
|
|
|
|
|
|
#endif
|
|
|
|
|
|
uniform sampler2DArray morphTargetsTexture;
|
|
|
|
|
|
uniform ivec2 morphTargetsTextureSize;
|
|
|
|
|
|
vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {
|
|
|
|
|
|
int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;
|
|
|
|
|
|
int y = texelIndex / morphTargetsTextureSize.x;
|
|
|
|
|
|
int x = texelIndex - y * morphTargetsTextureSize.x;
|
|
|
|
|
|
ivec3 morphUV = ivec3( x, y, morphTargetIndex );
|
|
|
|
|
|
return texelFetch( morphTargetsTexture, morphUV, 0 );
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif`,morphtarget_vertex=`#ifdef USE_MORPHTARGETS
|
|
|
|
|
|
transformed *= morphTargetBaseInfluence;
|
|
|
|
|
|
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
|
|
|
|
|
|
if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif`,normal_fragment_begin=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
|
|
|
|
|
|
#ifdef FLAT_SHADED
|
|
|
|
|
|
vec3 fdx = dFdx( vViewPosition );
|
|
|
|
|
|
vec3 fdy = dFdy( vViewPosition );
|
|
|
|
|
|
vec3 normal = normalize( cross( fdx, fdy ) );
|
|
|
|
|
|
#else
|
|
|
|
|
|
vec3 normal = normalize( vNormal );
|
|
|
|
|
|
#ifdef DOUBLE_SIDED
|
|
|
|
|
|
normal *= faceDirection;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )
|
|
|
|
|
|
#ifdef USE_TANGENT
|
|
|
|
|
|
mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
|
|
|
|
|
|
#else
|
|
|
|
|
|
mat3 tbn = getTangentFrame( - vViewPosition, normal,
|
|
|
|
|
|
#if defined( USE_NORMALMAP )
|
|
|
|
|
|
vNormalMapUv
|
|
|
|
|
|
#elif defined( USE_CLEARCOAT_NORMALMAP )
|
|
|
|
|
|
vClearcoatNormalMapUv
|
|
|
|
|
|
#else
|
|
|
|
|
|
vUv
|
|
|
|
|
|
#endif
|
|
|
|
|
|
);
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
|
|
|
|
|
|
tbn[0] *= faceDirection;
|
|
|
|
|
|
tbn[1] *= faceDirection;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_CLEARCOAT_NORMALMAP
|
|
|
|
|
|
#ifdef USE_TANGENT
|
|
|
|
|
|
mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
|
|
|
|
|
|
#else
|
|
|
|
|
|
mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
|
|
|
|
|
|
tbn2[0] *= faceDirection;
|
|
|
|
|
|
tbn2[1] *= faceDirection;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
vec3 nonPerturbedNormal = normal;`,normal_fragment_maps=`#ifdef USE_NORMALMAP_OBJECTSPACE
|
|
|
|
|
|
normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
|
|
|
|
|
|
#ifdef FLIP_SIDED
|
|
|
|
|
|
normal = - normal;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef DOUBLE_SIDED
|
|
|
|
|
|
normal = normal * faceDirection;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
normal = normalize( normalMatrix * normal );
|
|
|
|
|
|
#elif defined( USE_NORMALMAP_TANGENTSPACE )
|
|
|
|
|
|
vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
|
|
|
|
|
|
mapN.xy *= normalScale;
|
|
|
|
|
|
normal = normalize( tbn * mapN );
|
|
|
|
|
|
#elif defined( USE_BUMPMAP )
|
|
|
|
|
|
normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );
|
|
|
|
|
|
#endif`,normal_pars_fragment=`#ifndef FLAT_SHADED
|
|
|
|
|
|
varying vec3 vNormal;
|
|
|
|
|
|
#ifdef USE_TANGENT
|
|
|
|
|
|
varying vec3 vTangent;
|
|
|
|
|
|
varying vec3 vBitangent;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif`,normal_pars_vertex=`#ifndef FLAT_SHADED
|
|
|
|
|
|
varying vec3 vNormal;
|
|
|
|
|
|
#ifdef USE_TANGENT
|
|
|
|
|
|
varying vec3 vTangent;
|
|
|
|
|
|
varying vec3 vBitangent;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif`,normal_vertex=`#ifndef FLAT_SHADED
|
|
|
|
|
|
vNormal = normalize( transformedNormal );
|
|
|
|
|
|
#ifdef USE_TANGENT
|
|
|
|
|
|
vTangent = normalize( transformedTangent );
|
|
|
|
|
|
vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif`,normalmap_pars_fragment=`#ifdef USE_NORMALMAP
|
|
|
|
|
|
uniform sampler2D normalMap;
|
|
|
|
|
|
uniform vec2 normalScale;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_NORMALMAP_OBJECTSPACE
|
|
|
|
|
|
uniform mat3 normalMatrix;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )
|
|
|
|
|
|
mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {
|
|
|
|
|
|
vec3 q0 = dFdx( eye_pos.xyz );
|
|
|
|
|
|
vec3 q1 = dFdy( eye_pos.xyz );
|
|
|
|
|
|
vec2 st0 = dFdx( uv.st );
|
|
|
|
|
|
vec2 st1 = dFdy( uv.st );
|
|
|
|
|
|
vec3 N = surf_norm;
|
|
|
|
|
|
vec3 q1perp = cross( q1, N );
|
|
|
|
|
|
vec3 q0perp = cross( N, q0 );
|
|
|
|
|
|
vec3 T = q1perp * st0.x + q0perp * st1.x;
|
|
|
|
|
|
vec3 B = q1perp * st0.y + q0perp * st1.y;
|
|
|
|
|
|
float det = max( dot( T, T ), dot( B, B ) );
|
|
|
|
|
|
float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );
|
|
|
|
|
|
return mat3( T * scale, B * scale, N );
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif`,clearcoat_normal_fragment_begin=`#ifdef USE_CLEARCOAT
|
|
|
|
|
|
vec3 clearcoatNormal = nonPerturbedNormal;
|
|
|
|
|
|
#endif`,clearcoat_normal_fragment_maps=`#ifdef USE_CLEARCOAT_NORMALMAP
|
|
|
|
|
|
vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;
|
|
|
|
|
|
clearcoatMapN.xy *= clearcoatNormalScale;
|
|
|
|
|
|
clearcoatNormal = normalize( tbn2 * clearcoatMapN );
|
|
|
|
|
|
#endif`,clearcoat_pars_fragment=`#ifdef USE_CLEARCOATMAP
|
|
|
|
|
|
uniform sampler2D clearcoatMap;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_CLEARCOAT_NORMALMAP
|
|
|
|
|
|
uniform sampler2D clearcoatNormalMap;
|
|
|
|
|
|
uniform vec2 clearcoatNormalScale;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
|
|
|
|
|
|
uniform sampler2D clearcoatRoughnessMap;
|
|
|
|
|
|
#endif`,iridescence_pars_fragment=`#ifdef USE_IRIDESCENCEMAP
|
|
|
|
|
|
uniform sampler2D iridescenceMap;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_IRIDESCENCE_THICKNESSMAP
|
|
|
|
|
|
uniform sampler2D iridescenceThicknessMap;
|
|
|
|
|
|
#endif`,opaque_fragment=`#ifdef OPAQUE
|
|
|
|
|
|
diffuseColor.a = 1.0;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_TRANSMISSION
|
|
|
|
|
|
diffuseColor.a *= material.transmissionAlpha;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,packing=`vec3 packNormalToRGB( const in vec3 normal ) {
|
|
|
|
|
|
return normalize( normal ) * 0.5 + 0.5;
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 unpackRGBToNormal( const in vec3 rgb ) {
|
|
|
|
|
|
return 2.0 * rgb.xyz - 1.0;
|
|
|
|
|
|
}
|
|
|
|
|
|
const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;
|
|
|
|
|
|
const float Inv255 = 1. / 255.;
|
|
|
|
|
|
const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );
|
|
|
|
|
|
const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );
|
|
|
|
|
|
const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );
|
|
|
|
|
|
const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );
|
|
|
|
|
|
vec4 packDepthToRGBA( const in float v ) {
|
|
|
|
|
|
if( v <= 0.0 )
|
|
|
|
|
|
return vec4( 0., 0., 0., 0. );
|
|
|
|
|
|
if( v >= 1.0 )
|
|
|
|
|
|
return vec4( 1., 1., 1., 1. );
|
|
|
|
|
|
float vuf;
|
|
|
|
|
|
float af = modf( v * PackFactors.a, vuf );
|
|
|
|
|
|
float bf = modf( vuf * ShiftRight8, vuf );
|
|
|
|
|
|
float gf = modf( vuf * ShiftRight8, vuf );
|
|
|
|
|
|
return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 packDepthToRGB( const in float v ) {
|
|
|
|
|
|
if( v <= 0.0 )
|
|
|
|
|
|
return vec3( 0., 0., 0. );
|
|
|
|
|
|
if( v >= 1.0 )
|
|
|
|
|
|
return vec3( 1., 1., 1. );
|
|
|
|
|
|
float vuf;
|
|
|
|
|
|
float bf = modf( v * PackFactors.b, vuf );
|
|
|
|
|
|
float gf = modf( vuf * ShiftRight8, vuf );
|
|
|
|
|
|
return vec3( vuf * Inv255, gf * PackUpscale, bf );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec2 packDepthToRG( const in float v ) {
|
|
|
|
|
|
if( v <= 0.0 )
|
|
|
|
|
|
return vec2( 0., 0. );
|
|
|
|
|
|
if( v >= 1.0 )
|
|
|
|
|
|
return vec2( 1., 1. );
|
|
|
|
|
|
float vuf;
|
|
|
|
|
|
float gf = modf( v * 256., vuf );
|
|
|
|
|
|
return vec2( vuf * Inv255, gf );
|
|
|
|
|
|
}
|
|
|
|
|
|
float unpackRGBAToDepth( const in vec4 v ) {
|
|
|
|
|
|
return dot( v, UnpackFactors4 );
|
|
|
|
|
|
}
|
|
|
|
|
|
float unpackRGBToDepth( const in vec3 v ) {
|
|
|
|
|
|
return dot( v, UnpackFactors3 );
|
|
|
|
|
|
}
|
|
|
|
|
|
float unpackRGToDepth( const in vec2 v ) {
|
|
|
|
|
|
return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;
|
|
|
|
|
|
}
|
|
|
|
|
|
vec4 pack2HalfToRGBA( const in vec2 v ) {
|
|
|
|
|
|
vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );
|
|
|
|
|
|
return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec2 unpackRGBATo2Half( const in vec4 v ) {
|
|
|
|
|
|
return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );
|
|
|
|
|
|
}
|
|
|
|
|
|
float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {
|
|
|
|
|
|
return ( viewZ + near ) / ( near - far );
|
|
|
|
|
|
}
|
|
|
|
|
|
float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {
|
|
|
|
|
|
return depth * ( near - far ) - near;
|
|
|
|
|
|
}
|
|
|
|
|
|
float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {
|
|
|
|
|
|
return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );
|
|
|
|
|
|
}
|
|
|
|
|
|
float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {
|
|
|
|
|
|
return ( near * far ) / ( ( far - near ) * depth - far );
|
|
|
|
|
|
}`,premultiplied_alpha_fragment=`#ifdef PREMULTIPLIED_ALPHA
|
|
|
|
|
|
gl_FragColor.rgb *= gl_FragColor.a;
|
|
|
|
|
|
#endif`,project_vertex=`vec4 mvPosition = vec4( transformed, 1.0 );
|
|
|
|
|
|
#ifdef USE_BATCHING
|
|
|
|
|
|
mvPosition = batchingMatrix * mvPosition;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_INSTANCING
|
|
|
|
|
|
mvPosition = instanceMatrix * mvPosition;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
mvPosition = modelViewMatrix * mvPosition;
|
|
|
|
|
|
gl_Position = projectionMatrix * mvPosition;`,dithering_fragment=`#ifdef DITHERING
|
|
|
|
|
|
gl_FragColor.rgb = dithering( gl_FragColor.rgb );
|
|
|
|
|
|
#endif`,dithering_pars_fragment=`#ifdef DITHERING
|
|
|
|
|
|
vec3 dithering( vec3 color ) {
|
|
|
|
|
|
float grid_position = rand( gl_FragCoord.xy );
|
|
|
|
|
|
vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
|
|
|
|
|
|
dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
|
|
|
|
|
|
return color + dither_shift_RGB;
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif`,roughnessmap_fragment=`float roughnessFactor = roughness;
|
|
|
|
|
|
#ifdef USE_ROUGHNESSMAP
|
|
|
|
|
|
vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
|
|
|
|
|
|
roughnessFactor *= texelRoughness.g;
|
|
|
|
|
|
#endif`,roughnessmap_pars_fragment=`#ifdef USE_ROUGHNESSMAP
|
|
|
|
|
|
uniform sampler2D roughnessMap;
|
|
|
|
|
|
#endif`,shadowmap_pars_fragment=`#if NUM_SPOT_LIGHT_COORDS > 0
|
|
|
|
|
|
varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if NUM_SPOT_LIGHT_MAPS > 0
|
|
|
|
|
|
uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SHADOWMAP
|
|
|
|
|
|
#if NUM_DIR_LIGHT_SHADOWS > 0
|
|
|
|
|
|
#if defined( SHADOWMAP_TYPE_PCF )
|
|
|
|
|
|
uniform sampler2DShadow directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];
|
|
|
|
|
|
#else
|
|
|
|
|
|
uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];
|
|
|
|
|
|
#endif
|
|
|
|
|
|
varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
|
|
|
|
|
|
struct DirectionalLightShadow {
|
|
|
|
|
|
float shadowIntensity;
|
|
|
|
|
|
float shadowBias;
|
|
|
|
|
|
float shadowNormalBias;
|
|
|
|
|
|
float shadowRadius;
|
|
|
|
|
|
vec2 shadowMapSize;
|
|
|
|
|
|
};
|
|
|
|
|
|
uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if NUM_SPOT_LIGHT_SHADOWS > 0
|
|
|
|
|
|
#if defined( SHADOWMAP_TYPE_PCF )
|
|
|
|
|
|
uniform sampler2DShadow spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];
|
|
|
|
|
|
#else
|
|
|
|
|
|
uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];
|
|
|
|
|
|
#endif
|
|
|
|
|
|
struct SpotLightShadow {
|
|
|
|
|
|
float shadowIntensity;
|
|
|
|
|
|
float shadowBias;
|
|
|
|
|
|
float shadowNormalBias;
|
|
|
|
|
|
float shadowRadius;
|
|
|
|
|
|
vec2 shadowMapSize;
|
|
|
|
|
|
};
|
|
|
|
|
|
uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if NUM_POINT_LIGHT_SHADOWS > 0
|
|
|
|
|
|
#if defined( SHADOWMAP_TYPE_PCF )
|
|
|
|
|
|
uniform samplerCubeShadow pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];
|
|
|
|
|
|
#elif defined( SHADOWMAP_TYPE_BASIC )
|
|
|
|
|
|
uniform samplerCube pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];
|
|
|
|
|
|
#endif
|
|
|
|
|
|
varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
|
|
|
|
|
|
struct PointLightShadow {
|
|
|
|
|
|
float shadowIntensity;
|
|
|
|
|
|
float shadowBias;
|
|
|
|
|
|
float shadowNormalBias;
|
|
|
|
|
|
float shadowRadius;
|
|
|
|
|
|
vec2 shadowMapSize;
|
|
|
|
|
|
float shadowCameraNear;
|
|
|
|
|
|
float shadowCameraFar;
|
|
|
|
|
|
};
|
|
|
|
|
|
uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if defined( SHADOWMAP_TYPE_PCF )
|
|
|
|
|
|
float interleavedGradientNoise( vec2 position ) {
|
|
|
|
|
|
return fract( 52.9829189 * fract( dot( position, vec2( 0.06711056, 0.00583715 ) ) ) );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec2 vogelDiskSample( int sampleIndex, int samplesCount, float phi ) {
|
|
|
|
|
|
const float goldenAngle = 2.399963229728653;
|
|
|
|
|
|
float r = sqrt( ( float( sampleIndex ) + 0.5 ) / float( samplesCount ) );
|
|
|
|
|
|
float theta = float( sampleIndex ) * goldenAngle + phi;
|
|
|
|
|
|
return vec2( cos( theta ), sin( theta ) ) * r;
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if defined( SHADOWMAP_TYPE_PCF )
|
|
|
|
|
|
float getShadow( sampler2DShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
|
|
|
|
|
|
float shadow = 1.0;
|
|
|
|
|
|
shadowCoord.xyz /= shadowCoord.w;
|
|
|
|
|
|
shadowCoord.z += shadowBias;
|
|
|
|
|
|
bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
|
|
|
|
|
|
bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
|
|
|
|
|
|
if ( frustumTest ) {
|
|
|
|
|
|
vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
|
|
|
|
|
|
float radius = shadowRadius * texelSize.x;
|
|
|
|
|
|
float phi = interleavedGradientNoise( gl_FragCoord.xy ) * 6.28318530718;
|
|
|
|
|
|
shadow = (
|
|
|
|
|
|
texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 0, 5, phi ) * radius, shadowCoord.z ) ) +
|
|
|
|
|
|
texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 1, 5, phi ) * radius, shadowCoord.z ) ) +
|
|
|
|
|
|
texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 2, 5, phi ) * radius, shadowCoord.z ) ) +
|
|
|
|
|
|
texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 3, 5, phi ) * radius, shadowCoord.z ) ) +
|
|
|
|
|
|
texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 4, 5, phi ) * radius, shadowCoord.z ) )
|
|
|
|
|
|
) * 0.2;
|
|
|
|
|
|
}
|
|
|
|
|
|
return mix( 1.0, shadow, shadowIntensity );
|
|
|
|
|
|
}
|
|
|
|
|
|
#elif defined( SHADOWMAP_TYPE_VSM )
|
|
|
|
|
|
float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
|
|
|
|
|
|
float shadow = 1.0;
|
|
|
|
|
|
shadowCoord.xyz /= shadowCoord.w;
|
|
|
|
|
|
shadowCoord.z += shadowBias;
|
|
|
|
|
|
bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
|
|
|
|
|
|
bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
|
|
|
|
|
|
if ( frustumTest ) {
|
|
|
|
|
|
vec2 distribution = texture2D( shadowMap, shadowCoord.xy ).rg;
|
|
|
|
|
|
float mean = distribution.x;
|
|
|
|
|
|
float variance = distribution.y * distribution.y;
|
|
|
|
|
|
#ifdef USE_REVERSED_DEPTH_BUFFER
|
|
|
|
|
|
float hard_shadow = step( mean, shadowCoord.z );
|
|
|
|
|
|
#else
|
|
|
|
|
|
float hard_shadow = step( shadowCoord.z, mean );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
if ( hard_shadow == 1.0 ) {
|
|
|
|
|
|
shadow = 1.0;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
variance = max( variance, 0.0000001 );
|
|
|
|
|
|
float d = shadowCoord.z - mean;
|
|
|
|
|
|
float p_max = variance / ( variance + d * d );
|
|
|
|
|
|
p_max = clamp( ( p_max - 0.3 ) / 0.65, 0.0, 1.0 );
|
|
|
|
|
|
shadow = max( hard_shadow, p_max );
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
return mix( 1.0, shadow, shadowIntensity );
|
|
|
|
|
|
}
|
|
|
|
|
|
#else
|
|
|
|
|
|
float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
|
|
|
|
|
|
float shadow = 1.0;
|
|
|
|
|
|
shadowCoord.xyz /= shadowCoord.w;
|
|
|
|
|
|
shadowCoord.z += shadowBias;
|
|
|
|
|
|
bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
|
|
|
|
|
|
bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
|
|
|
|
|
|
if ( frustumTest ) {
|
|
|
|
|
|
float depth = texture2D( shadowMap, shadowCoord.xy ).r;
|
|
|
|
|
|
#ifdef USE_REVERSED_DEPTH_BUFFER
|
|
|
|
|
|
shadow = step( depth, shadowCoord.z );
|
|
|
|
|
|
#else
|
|
|
|
|
|
shadow = step( shadowCoord.z, depth );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
}
|
|
|
|
|
|
return mix( 1.0, shadow, shadowIntensity );
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if NUM_POINT_LIGHT_SHADOWS > 0
|
|
|
|
|
|
#if defined( SHADOWMAP_TYPE_PCF )
|
|
|
|
|
|
float getPointShadow( samplerCubeShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
|
|
|
|
|
|
float shadow = 1.0;
|
|
|
|
|
|
vec3 lightToPosition = shadowCoord.xyz;
|
|
|
|
|
|
vec3 bd3D = normalize( lightToPosition );
|
|
|
|
|
|
vec3 absVec = abs( lightToPosition );
|
|
|
|
|
|
float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );
|
|
|
|
|
|
if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {
|
|
|
|
|
|
float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );
|
|
|
|
|
|
dp += shadowBias;
|
|
|
|
|
|
float texelSize = shadowRadius / shadowMapSize.x;
|
|
|
|
|
|
vec3 absDir = abs( bd3D );
|
|
|
|
|
|
vec3 tangent = absDir.x > absDir.z ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 );
|
|
|
|
|
|
tangent = normalize( cross( bd3D, tangent ) );
|
|
|
|
|
|
vec3 bitangent = cross( bd3D, tangent );
|
|
|
|
|
|
float phi = interleavedGradientNoise( gl_FragCoord.xy ) * 6.28318530718;
|
|
|
|
|
|
shadow = (
|
|
|
|
|
|
texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 0, 5, phi ).x + bitangent * vogelDiskSample( 0, 5, phi ).y ) * texelSize, dp ) ) +
|
|
|
|
|
|
texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 1, 5, phi ).x + bitangent * vogelDiskSample( 1, 5, phi ).y ) * texelSize, dp ) ) +
|
|
|
|
|
|
texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 2, 5, phi ).x + bitangent * vogelDiskSample( 2, 5, phi ).y ) * texelSize, dp ) ) +
|
|
|
|
|
|
texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 3, 5, phi ).x + bitangent * vogelDiskSample( 3, 5, phi ).y ) * texelSize, dp ) ) +
|
|
|
|
|
|
texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 4, 5, phi ).x + bitangent * vogelDiskSample( 4, 5, phi ).y ) * texelSize, dp ) )
|
|
|
|
|
|
) * 0.2;
|
|
|
|
|
|
}
|
|
|
|
|
|
return mix( 1.0, shadow, shadowIntensity );
|
|
|
|
|
|
}
|
|
|
|
|
|
#elif defined( SHADOWMAP_TYPE_BASIC )
|
|
|
|
|
|
float getPointShadow( samplerCube shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
|
|
|
|
|
|
float shadow = 1.0;
|
|
|
|
|
|
vec3 lightToPosition = shadowCoord.xyz;
|
|
|
|
|
|
vec3 bd3D = normalize( lightToPosition );
|
|
|
|
|
|
vec3 absVec = abs( lightToPosition );
|
|
|
|
|
|
float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );
|
|
|
|
|
|
if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {
|
|
|
|
|
|
float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );
|
|
|
|
|
|
dp += shadowBias;
|
|
|
|
|
|
float depth = textureCube( shadowMap, bd3D ).r;
|
|
|
|
|
|
#ifdef USE_REVERSED_DEPTH_BUFFER
|
|
|
|
|
|
shadow = step( depth, dp );
|
|
|
|
|
|
#else
|
|
|
|
|
|
shadow = step( dp, depth );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
}
|
|
|
|
|
|
return mix( 1.0, shadow, shadowIntensity );
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif`,shadowmap_pars_vertex=`#if NUM_SPOT_LIGHT_COORDS > 0
|
|
|
|
|
|
uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];
|
|
|
|
|
|
varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SHADOWMAP
|
|
|
|
|
|
#if NUM_DIR_LIGHT_SHADOWS > 0
|
|
|
|
|
|
uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];
|
|
|
|
|
|
varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
|
|
|
|
|
|
struct DirectionalLightShadow {
|
|
|
|
|
|
float shadowIntensity;
|
|
|
|
|
|
float shadowBias;
|
|
|
|
|
|
float shadowNormalBias;
|
|
|
|
|
|
float shadowRadius;
|
|
|
|
|
|
vec2 shadowMapSize;
|
|
|
|
|
|
};
|
|
|
|
|
|
uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if NUM_SPOT_LIGHT_SHADOWS > 0
|
|
|
|
|
|
struct SpotLightShadow {
|
|
|
|
|
|
float shadowIntensity;
|
|
|
|
|
|
float shadowBias;
|
|
|
|
|
|
float shadowNormalBias;
|
|
|
|
|
|
float shadowRadius;
|
|
|
|
|
|
vec2 shadowMapSize;
|
|
|
|
|
|
};
|
|
|
|
|
|
uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if NUM_POINT_LIGHT_SHADOWS > 0
|
|
|
|
|
|
uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];
|
|
|
|
|
|
varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
|
|
|
|
|
|
struct PointLightShadow {
|
|
|
|
|
|
float shadowIntensity;
|
|
|
|
|
|
float shadowBias;
|
|
|
|
|
|
float shadowNormalBias;
|
|
|
|
|
|
float shadowRadius;
|
|
|
|
|
|
vec2 shadowMapSize;
|
|
|
|
|
|
float shadowCameraNear;
|
|
|
|
|
|
float shadowCameraFar;
|
|
|
|
|
|
};
|
|
|
|
|
|
uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif`,shadowmap_vertex=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )
|
|
|
|
|
|
vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
|
|
|
|
|
|
vec4 shadowWorldPosition;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if defined( USE_SHADOWMAP )
|
|
|
|
|
|
#if NUM_DIR_LIGHT_SHADOWS > 0
|
|
|
|
|
|
#pragma unroll_loop_start
|
|
|
|
|
|
for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
|
|
|
|
|
|
shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );
|
|
|
|
|
|
vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;
|
|
|
|
|
|
}
|
|
|
|
|
|
#pragma unroll_loop_end
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if NUM_POINT_LIGHT_SHADOWS > 0
|
|
|
|
|
|
#pragma unroll_loop_start
|
|
|
|
|
|
for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
|
|
|
|
|
|
shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );
|
|
|
|
|
|
vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;
|
|
|
|
|
|
}
|
|
|
|
|
|
#pragma unroll_loop_end
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if NUM_SPOT_LIGHT_COORDS > 0
|
|
|
|
|
|
#pragma unroll_loop_start
|
|
|
|
|
|
for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {
|
|
|
|
|
|
shadowWorldPosition = worldPosition;
|
|
|
|
|
|
#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
|
|
|
|
|
|
shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;
|
|
|
|
|
|
}
|
|
|
|
|
|
#pragma unroll_loop_end
|
|
|
|
|
|
#endif`,shadowmask_pars_fragment=`float getShadowMask() {
|
|
|
|
|
|
float shadow = 1.0;
|
|
|
|
|
|
#ifdef USE_SHADOWMAP
|
|
|
|
|
|
#if NUM_DIR_LIGHT_SHADOWS > 0
|
|
|
|
|
|
DirectionalLightShadow directionalLight;
|
|
|
|
|
|
#pragma unroll_loop_start
|
|
|
|
|
|
for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
|
|
|
|
|
|
directionalLight = directionalLightShadows[ i ];
|
|
|
|
|
|
shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
|
|
|
|
|
|
}
|
|
|
|
|
|
#pragma unroll_loop_end
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if NUM_SPOT_LIGHT_SHADOWS > 0
|
|
|
|
|
|
SpotLightShadow spotLight;
|
|
|
|
|
|
#pragma unroll_loop_start
|
|
|
|
|
|
for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
|
|
|
|
|
|
spotLight = spotLightShadows[ i ];
|
|
|
|
|
|
shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
|
|
|
|
|
|
}
|
|
|
|
|
|
#pragma unroll_loop_end
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if NUM_POINT_LIGHT_SHADOWS > 0 && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )
|
|
|
|
|
|
PointLightShadow pointLight;
|
|
|
|
|
|
#pragma unroll_loop_start
|
|
|
|
|
|
for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
|
|
|
|
|
|
pointLight = pointLightShadows[ i ];
|
|
|
|
|
|
shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
|
|
|
|
|
|
}
|
|
|
|
|
|
#pragma unroll_loop_end
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
return shadow;
|
|
|
|
|
|
}`,skinbase_vertex=`#ifdef USE_SKINNING
|
|
|
|
|
|
mat4 boneMatX = getBoneMatrix( skinIndex.x );
|
|
|
|
|
|
mat4 boneMatY = getBoneMatrix( skinIndex.y );
|
|
|
|
|
|
mat4 boneMatZ = getBoneMatrix( skinIndex.z );
|
|
|
|
|
|
mat4 boneMatW = getBoneMatrix( skinIndex.w );
|
|
|
|
|
|
#endif`,skinning_pars_vertex=`#ifdef USE_SKINNING
|
|
|
|
|
|
uniform mat4 bindMatrix;
|
|
|
|
|
|
uniform mat4 bindMatrixInverse;
|
|
|
|
|
|
uniform highp sampler2D boneTexture;
|
|
|
|
|
|
mat4 getBoneMatrix( const in float i ) {
|
|
|
|
|
|
int size = textureSize( boneTexture, 0 ).x;
|
|
|
|
|
|
int j = int( i ) * 4;
|
|
|
|
|
|
int x = j % size;
|
|
|
|
|
|
int y = j / size;
|
|
|
|
|
|
vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );
|
|
|
|
|
|
vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );
|
|
|
|
|
|
vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );
|
|
|
|
|
|
vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );
|
|
|
|
|
|
return mat4( v1, v2, v3, v4 );
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif`,skinning_vertex=`#ifdef USE_SKINNING
|
|
|
|
|
|
vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
|
|
|
|
|
|
vec4 skinned = vec4( 0.0 );
|
|
|
|
|
|
skinned += boneMatX * skinVertex * skinWeight.x;
|
|
|
|
|
|
skinned += boneMatY * skinVertex * skinWeight.y;
|
|
|
|
|
|
skinned += boneMatZ * skinVertex * skinWeight.z;
|
|
|
|
|
|
skinned += boneMatW * skinVertex * skinWeight.w;
|
|
|
|
|
|
transformed = ( bindMatrixInverse * skinned ).xyz;
|
|
|
|
|
|
#endif`,skinnormal_vertex=`#ifdef USE_SKINNING
|
|
|
|
|
|
mat4 skinMatrix = mat4( 0.0 );
|
|
|
|
|
|
skinMatrix += skinWeight.x * boneMatX;
|
|
|
|
|
|
skinMatrix += skinWeight.y * boneMatY;
|
|
|
|
|
|
skinMatrix += skinWeight.z * boneMatZ;
|
|
|
|
|
|
skinMatrix += skinWeight.w * boneMatW;
|
|
|
|
|
|
skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;
|
|
|
|
|
|
objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;
|
|
|
|
|
|
#ifdef USE_TANGENT
|
|
|
|
|
|
objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif`,specularmap_fragment=`float specularStrength;
|
|
|
|
|
|
#ifdef USE_SPECULARMAP
|
|
|
|
|
|
vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );
|
|
|
|
|
|
specularStrength = texelSpecular.r;
|
|
|
|
|
|
#else
|
|
|
|
|
|
specularStrength = 1.0;
|
|
|
|
|
|
#endif`,specularmap_pars_fragment=`#ifdef USE_SPECULARMAP
|
|
|
|
|
|
uniform sampler2D specularMap;
|
|
|
|
|
|
#endif`,tonemapping_fragment=`#if defined( TONE_MAPPING )
|
|
|
|
|
|
gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
|
|
|
|
|
|
#endif`,tonemapping_pars_fragment=`#ifndef saturate
|
|
|
|
|
|
#define saturate( a ) clamp( a, 0.0, 1.0 )
|
|
|
|
|
|
#endif
|
|
|
|
|
|
uniform float toneMappingExposure;
|
|
|
|
|
|
vec3 LinearToneMapping( vec3 color ) {
|
|
|
|
|
|
return saturate( toneMappingExposure * color );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 ReinhardToneMapping( vec3 color ) {
|
|
|
|
|
|
color *= toneMappingExposure;
|
|
|
|
|
|
return saturate( color / ( vec3( 1.0 ) + color ) );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 CineonToneMapping( vec3 color ) {
|
|
|
|
|
|
color *= toneMappingExposure;
|
|
|
|
|
|
color = max( vec3( 0.0 ), color - 0.004 );
|
|
|
|
|
|
return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 RRTAndODTFit( vec3 v ) {
|
|
|
|
|
|
vec3 a = v * ( v + 0.0245786 ) - 0.000090537;
|
|
|
|
|
|
vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;
|
|
|
|
|
|
return a / b;
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 ACESFilmicToneMapping( vec3 color ) {
|
|
|
|
|
|
const mat3 ACESInputMat = mat3(
|
|
|
|
|
|
vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ),
|
|
|
|
|
|
vec3( 0.04823, 0.01566, 0.83777 )
|
|
|
|
|
|
);
|
|
|
|
|
|
const mat3 ACESOutputMat = mat3(
|
|
|
|
|
|
vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ),
|
|
|
|
|
|
vec3( -0.07367, -0.00605, 1.07602 )
|
|
|
|
|
|
);
|
|
|
|
|
|
color *= toneMappingExposure / 0.6;
|
|
|
|
|
|
color = ACESInputMat * color;
|
|
|
|
|
|
color = RRTAndODTFit( color );
|
|
|
|
|
|
color = ACESOutputMat * color;
|
|
|
|
|
|
return saturate( color );
|
|
|
|
|
|
}
|
|
|
|
|
|
const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(
|
|
|
|
|
|
vec3( 1.6605, - 0.1246, - 0.0182 ),
|
|
|
|
|
|
vec3( - 0.5876, 1.1329, - 0.1006 ),
|
|
|
|
|
|
vec3( - 0.0728, - 0.0083, 1.1187 )
|
|
|
|
|
|
);
|
|
|
|
|
|
const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(
|
|
|
|
|
|
vec3( 0.6274, 0.0691, 0.0164 ),
|
|
|
|
|
|
vec3( 0.3293, 0.9195, 0.0880 ),
|
|
|
|
|
|
vec3( 0.0433, 0.0113, 0.8956 )
|
|
|
|
|
|
);
|
|
|
|
|
|
vec3 agxDefaultContrastApprox( vec3 x ) {
|
|
|
|
|
|
vec3 x2 = x * x;
|
|
|
|
|
|
vec3 x4 = x2 * x2;
|
|
|
|
|
|
return + 15.5 * x4 * x2
|
|
|
|
|
|
- 40.14 * x4 * x
|
|
|
|
|
|
+ 31.96 * x4
|
|
|
|
|
|
- 6.868 * x2 * x
|
|
|
|
|
|
+ 0.4298 * x2
|
|
|
|
|
|
+ 0.1191 * x
|
|
|
|
|
|
- 0.00232;
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 AgXToneMapping( vec3 color ) {
|
|
|
|
|
|
const mat3 AgXInsetMatrix = mat3(
|
|
|
|
|
|
vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),
|
|
|
|
|
|
vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),
|
|
|
|
|
|
vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )
|
|
|
|
|
|
);
|
|
|
|
|
|
const mat3 AgXOutsetMatrix = mat3(
|
|
|
|
|
|
vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),
|
|
|
|
|
|
vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),
|
|
|
|
|
|
vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )
|
|
|
|
|
|
);
|
|
|
|
|
|
const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069;
|
|
|
|
|
|
color *= toneMappingExposure;
|
|
|
|
|
|
color = LINEAR_SRGB_TO_LINEAR_REC2020 * color;
|
|
|
|
|
|
color = AgXInsetMatrix * color;
|
|
|
|
|
|
color = max( color, 1e-10 ); color = log2( color );
|
|
|
|
|
|
color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );
|
|
|
|
|
|
color = clamp( color, 0.0, 1.0 );
|
|
|
|
|
|
color = agxDefaultContrastApprox( color );
|
|
|
|
|
|
color = AgXOutsetMatrix * color;
|
|
|
|
|
|
color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );
|
|
|
|
|
|
color = LINEAR_REC2020_TO_LINEAR_SRGB * color;
|
|
|
|
|
|
color = clamp( color, 0.0, 1.0 );
|
|
|
|
|
|
return color;
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 NeutralToneMapping( vec3 color ) {
|
|
|
|
|
|
const float StartCompression = 0.8 - 0.04;
|
|
|
|
|
|
const float Desaturation = 0.15;
|
|
|
|
|
|
color *= toneMappingExposure;
|
|
|
|
|
|
float x = min( color.r, min( color.g, color.b ) );
|
|
|
|
|
|
float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;
|
|
|
|
|
|
color -= offset;
|
|
|
|
|
|
float peak = max( color.r, max( color.g, color.b ) );
|
|
|
|
|
|
if ( peak < StartCompression ) return color;
|
|
|
|
|
|
float d = 1. - StartCompression;
|
|
|
|
|
|
float newPeak = 1. - d * d / ( peak + d - StartCompression );
|
|
|
|
|
|
color *= newPeak / peak;
|
|
|
|
|
|
float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );
|
|
|
|
|
|
return mix( color, vec3( newPeak ), g );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 CustomToneMapping( vec3 color ) { return color; }`,transmission_fragment=`#ifdef USE_TRANSMISSION
|
|
|
|
|
|
material.transmission = transmission;
|
|
|
|
|
|
material.transmissionAlpha = 1.0;
|
|
|
|
|
|
material.thickness = thickness;
|
|
|
|
|
|
material.attenuationDistance = attenuationDistance;
|
|
|
|
|
|
material.attenuationColor = attenuationColor;
|
|
|
|
|
|
#ifdef USE_TRANSMISSIONMAP
|
|
|
|
|
|
material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_THICKNESSMAP
|
|
|
|
|
|
material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
vec3 pos = vWorldPosition;
|
|
|
|
|
|
vec3 v = normalize( cameraPosition - pos );
|
|
|
|
|
|
vec3 n = inverseTransformDirection( normal, viewMatrix );
|
|
|
|
|
|
vec4 transmitted = getIBLVolumeRefraction(
|
|
|
|
|
|
n, v, material.roughness, material.diffuseContribution, material.specularColorBlended, material.specularF90,
|
|
|
|
|
|
pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,
|
|
|
|
|
|
material.attenuationColor, material.attenuationDistance );
|
|
|
|
|
|
material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );
|
|
|
|
|
|
totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );
|
|
|
|
|
|
#endif`,transmission_pars_fragment=`#ifdef USE_TRANSMISSION
|
|
|
|
|
|
uniform float transmission;
|
|
|
|
|
|
uniform float thickness;
|
|
|
|
|
|
uniform float attenuationDistance;
|
|
|
|
|
|
uniform vec3 attenuationColor;
|
|
|
|
|
|
#ifdef USE_TRANSMISSIONMAP
|
|
|
|
|
|
uniform sampler2D transmissionMap;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_THICKNESSMAP
|
|
|
|
|
|
uniform sampler2D thicknessMap;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
uniform vec2 transmissionSamplerSize;
|
|
|
|
|
|
uniform sampler2D transmissionSamplerMap;
|
|
|
|
|
|
uniform mat4 modelMatrix;
|
|
|
|
|
|
uniform mat4 projectionMatrix;
|
|
|
|
|
|
varying vec3 vWorldPosition;
|
|
|
|
|
|
float w0( float a ) {
|
|
|
|
|
|
return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );
|
|
|
|
|
|
}
|
|
|
|
|
|
float w1( float a ) {
|
|
|
|
|
|
return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );
|
|
|
|
|
|
}
|
|
|
|
|
|
float w2( float a ){
|
|
|
|
|
|
return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );
|
|
|
|
|
|
}
|
|
|
|
|
|
float w3( float a ) {
|
|
|
|
|
|
return ( 1.0 / 6.0 ) * ( a * a * a );
|
|
|
|
|
|
}
|
|
|
|
|
|
float g0( float a ) {
|
|
|
|
|
|
return w0( a ) + w1( a );
|
|
|
|
|
|
}
|
|
|
|
|
|
float g1( float a ) {
|
|
|
|
|
|
return w2( a ) + w3( a );
|
|
|
|
|
|
}
|
|
|
|
|
|
float h0( float a ) {
|
|
|
|
|
|
return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );
|
|
|
|
|
|
}
|
|
|
|
|
|
float h1( float a ) {
|
|
|
|
|
|
return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {
|
|
|
|
|
|
uv = uv * texelSize.zw + 0.5;
|
|
|
|
|
|
vec2 iuv = floor( uv );
|
|
|
|
|
|
vec2 fuv = fract( uv );
|
|
|
|
|
|
float g0x = g0( fuv.x );
|
|
|
|
|
|
float g1x = g1( fuv.x );
|
|
|
|
|
|
float h0x = h0( fuv.x );
|
|
|
|
|
|
float h1x = h1( fuv.x );
|
|
|
|
|
|
float h0y = h0( fuv.y );
|
|
|
|
|
|
float h1y = h1( fuv.y );
|
|
|
|
|
|
vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
|
|
|
|
|
|
vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
|
|
|
|
|
|
vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
|
|
|
|
|
|
vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
|
|
|
|
|
|
return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +
|
|
|
|
|
|
g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {
|
|
|
|
|
|
vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );
|
|
|
|
|
|
vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );
|
|
|
|
|
|
vec2 fLodSizeInv = 1.0 / fLodSize;
|
|
|
|
|
|
vec2 cLodSizeInv = 1.0 / cLodSize;
|
|
|
|
|
|
vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );
|
|
|
|
|
|
vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );
|
|
|
|
|
|
return mix( fSample, cSample, fract( lod ) );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {
|
|
|
|
|
|
vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );
|
|
|
|
|
|
vec3 modelScale;
|
|
|
|
|
|
modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );
|
|
|
|
|
|
modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );
|
|
|
|
|
|
modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );
|
|
|
|
|
|
return normalize( refractionVector ) * thickness * modelScale;
|
|
|
|
|
|
}
|
|
|
|
|
|
float applyIorToRoughness( const in float roughness, const in float ior ) {
|
|
|
|
|
|
return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {
|
|
|
|
|
|
float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );
|
|
|
|
|
|
return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {
|
|
|
|
|
|
if ( isinf( attenuationDistance ) ) {
|
|
|
|
|
|
return vec3( 1.0 );
|
|
|
|
|
|
} else {
|
|
|
|
|
|
vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;
|
|
|
|
|
|
vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,
|
|
|
|
|
|
const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,
|
|
|
|
|
|
const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,
|
|
|
|
|
|
const in vec3 attenuationColor, const in float attenuationDistance ) {
|
|
|
|
|
|
vec4 transmittedLight;
|
|
|
|
|
|
vec3 transmittance;
|
|
|
|
|
|
#ifdef USE_DISPERSION
|
|
|
|
|
|
float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;
|
|
|
|
|
|
vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );
|
|
|
|
|
|
for ( int i = 0; i < 3; i ++ ) {
|
|
|
|
|
|
vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );
|
|
|
|
|
|
vec3 refractedRayExit = position + transmissionRay;
|
|
|
|
|
|
vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
|
|
|
|
|
|
vec2 refractionCoords = ndcPos.xy / ndcPos.w;
|
|
|
|
|
|
refractionCoords += 1.0;
|
|
|
|
|
|
refractionCoords /= 2.0;
|
|
|
|
|
|
vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );
|
|
|
|
|
|
transmittedLight[ i ] = transmissionSample[ i ];
|
|
|
|
|
|
transmittedLight.a += transmissionSample.a;
|
|
|
|
|
|
transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];
|
|
|
|
|
|
}
|
|
|
|
|
|
transmittedLight.a /= 3.0;
|
|
|
|
|
|
#else
|
|
|
|
|
|
vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );
|
|
|
|
|
|
vec3 refractedRayExit = position + transmissionRay;
|
|
|
|
|
|
vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
|
|
|
|
|
|
vec2 refractionCoords = ndcPos.xy / ndcPos.w;
|
|
|
|
|
|
refractionCoords += 1.0;
|
|
|
|
|
|
refractionCoords /= 2.0;
|
|
|
|
|
|
transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );
|
|
|
|
|
|
transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
vec3 attenuatedColor = transmittance * transmittedLight.rgb;
|
|
|
|
|
|
vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );
|
|
|
|
|
|
float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;
|
|
|
|
|
|
return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif`,uv_pars_fragment=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
|
|
|
|
|
|
varying vec2 vUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_MAP
|
|
|
|
|
|
varying vec2 vMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_ALPHAMAP
|
|
|
|
|
|
varying vec2 vAlphaMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_LIGHTMAP
|
|
|
|
|
|
varying vec2 vLightMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_AOMAP
|
|
|
|
|
|
varying vec2 vAoMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_BUMPMAP
|
|
|
|
|
|
varying vec2 vBumpMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_NORMALMAP
|
|
|
|
|
|
varying vec2 vNormalMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_EMISSIVEMAP
|
|
|
|
|
|
varying vec2 vEmissiveMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_METALNESSMAP
|
|
|
|
|
|
varying vec2 vMetalnessMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_ROUGHNESSMAP
|
|
|
|
|
|
varying vec2 vRoughnessMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_ANISOTROPYMAP
|
|
|
|
|
|
varying vec2 vAnisotropyMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_CLEARCOATMAP
|
|
|
|
|
|
varying vec2 vClearcoatMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_CLEARCOAT_NORMALMAP
|
|
|
|
|
|
varying vec2 vClearcoatNormalMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
|
|
|
|
|
|
varying vec2 vClearcoatRoughnessMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_IRIDESCENCEMAP
|
|
|
|
|
|
varying vec2 vIridescenceMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_IRIDESCENCE_THICKNESSMAP
|
|
|
|
|
|
varying vec2 vIridescenceThicknessMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SHEEN_COLORMAP
|
|
|
|
|
|
varying vec2 vSheenColorMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SHEEN_ROUGHNESSMAP
|
|
|
|
|
|
varying vec2 vSheenRoughnessMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SPECULARMAP
|
|
|
|
|
|
varying vec2 vSpecularMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SPECULAR_COLORMAP
|
|
|
|
|
|
varying vec2 vSpecularColorMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SPECULAR_INTENSITYMAP
|
|
|
|
|
|
varying vec2 vSpecularIntensityMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_TRANSMISSIONMAP
|
|
|
|
|
|
uniform mat3 transmissionMapTransform;
|
|
|
|
|
|
varying vec2 vTransmissionMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_THICKNESSMAP
|
|
|
|
|
|
uniform mat3 thicknessMapTransform;
|
|
|
|
|
|
varying vec2 vThicknessMapUv;
|
|
|
|
|
|
#endif`,uv_pars_vertex=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
|
|
|
|
|
|
varying vec2 vUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_MAP
|
|
|
|
|
|
uniform mat3 mapTransform;
|
|
|
|
|
|
varying vec2 vMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_ALPHAMAP
|
|
|
|
|
|
uniform mat3 alphaMapTransform;
|
|
|
|
|
|
varying vec2 vAlphaMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_LIGHTMAP
|
|
|
|
|
|
uniform mat3 lightMapTransform;
|
|
|
|
|
|
varying vec2 vLightMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_AOMAP
|
|
|
|
|
|
uniform mat3 aoMapTransform;
|
|
|
|
|
|
varying vec2 vAoMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_BUMPMAP
|
|
|
|
|
|
uniform mat3 bumpMapTransform;
|
|
|
|
|
|
varying vec2 vBumpMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_NORMALMAP
|
|
|
|
|
|
uniform mat3 normalMapTransform;
|
|
|
|
|
|
varying vec2 vNormalMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_DISPLACEMENTMAP
|
|
|
|
|
|
uniform mat3 displacementMapTransform;
|
|
|
|
|
|
varying vec2 vDisplacementMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_EMISSIVEMAP
|
|
|
|
|
|
uniform mat3 emissiveMapTransform;
|
|
|
|
|
|
varying vec2 vEmissiveMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_METALNESSMAP
|
|
|
|
|
|
uniform mat3 metalnessMapTransform;
|
|
|
|
|
|
varying vec2 vMetalnessMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_ROUGHNESSMAP
|
|
|
|
|
|
uniform mat3 roughnessMapTransform;
|
|
|
|
|
|
varying vec2 vRoughnessMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_ANISOTROPYMAP
|
|
|
|
|
|
uniform mat3 anisotropyMapTransform;
|
|
|
|
|
|
varying vec2 vAnisotropyMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_CLEARCOATMAP
|
|
|
|
|
|
uniform mat3 clearcoatMapTransform;
|
|
|
|
|
|
varying vec2 vClearcoatMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_CLEARCOAT_NORMALMAP
|
|
|
|
|
|
uniform mat3 clearcoatNormalMapTransform;
|
|
|
|
|
|
varying vec2 vClearcoatNormalMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
|
|
|
|
|
|
uniform mat3 clearcoatRoughnessMapTransform;
|
|
|
|
|
|
varying vec2 vClearcoatRoughnessMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SHEEN_COLORMAP
|
|
|
|
|
|
uniform mat3 sheenColorMapTransform;
|
|
|
|
|
|
varying vec2 vSheenColorMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SHEEN_ROUGHNESSMAP
|
|
|
|
|
|
uniform mat3 sheenRoughnessMapTransform;
|
|
|
|
|
|
varying vec2 vSheenRoughnessMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_IRIDESCENCEMAP
|
|
|
|
|
|
uniform mat3 iridescenceMapTransform;
|
|
|
|
|
|
varying vec2 vIridescenceMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_IRIDESCENCE_THICKNESSMAP
|
|
|
|
|
|
uniform mat3 iridescenceThicknessMapTransform;
|
|
|
|
|
|
varying vec2 vIridescenceThicknessMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SPECULARMAP
|
|
|
|
|
|
uniform mat3 specularMapTransform;
|
|
|
|
|
|
varying vec2 vSpecularMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SPECULAR_COLORMAP
|
|
|
|
|
|
uniform mat3 specularColorMapTransform;
|
|
|
|
|
|
varying vec2 vSpecularColorMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SPECULAR_INTENSITYMAP
|
|
|
|
|
|
uniform mat3 specularIntensityMapTransform;
|
|
|
|
|
|
varying vec2 vSpecularIntensityMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_TRANSMISSIONMAP
|
|
|
|
|
|
uniform mat3 transmissionMapTransform;
|
|
|
|
|
|
varying vec2 vTransmissionMapUv;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_THICKNESSMAP
|
|
|
|
|
|
uniform mat3 thicknessMapTransform;
|
|
|
|
|
|
varying vec2 vThicknessMapUv;
|
|
|
|
|
|
#endif`,uv_vertex=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
|
|
|
|
|
|
vUv = vec3( uv, 1 ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_MAP
|
|
|
|
|
|
vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_ALPHAMAP
|
|
|
|
|
|
vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_LIGHTMAP
|
|
|
|
|
|
vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_AOMAP
|
|
|
|
|
|
vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_BUMPMAP
|
|
|
|
|
|
vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_NORMALMAP
|
|
|
|
|
|
vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_DISPLACEMENTMAP
|
|
|
|
|
|
vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_EMISSIVEMAP
|
|
|
|
|
|
vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_METALNESSMAP
|
|
|
|
|
|
vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_ROUGHNESSMAP
|
|
|
|
|
|
vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_ANISOTROPYMAP
|
|
|
|
|
|
vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_CLEARCOATMAP
|
|
|
|
|
|
vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_CLEARCOAT_NORMALMAP
|
|
|
|
|
|
vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
|
|
|
|
|
|
vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_IRIDESCENCEMAP
|
|
|
|
|
|
vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_IRIDESCENCE_THICKNESSMAP
|
|
|
|
|
|
vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SHEEN_COLORMAP
|
|
|
|
|
|
vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SHEEN_ROUGHNESSMAP
|
|
|
|
|
|
vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SPECULARMAP
|
|
|
|
|
|
vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SPECULAR_COLORMAP
|
|
|
|
|
|
vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SPECULAR_INTENSITYMAP
|
|
|
|
|
|
vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_TRANSMISSIONMAP
|
|
|
|
|
|
vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_THICKNESSMAP
|
|
|
|
|
|
vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;
|
|
|
|
|
|
#endif`,worldpos_vertex=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0
|
|
|
|
|
|
vec4 worldPosition = vec4( transformed, 1.0 );
|
|
|
|
|
|
#ifdef USE_BATCHING
|
|
|
|
|
|
worldPosition = batchingMatrix * worldPosition;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_INSTANCING
|
|
|
|
|
|
worldPosition = instanceMatrix * worldPosition;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
worldPosition = modelMatrix * worldPosition;
|
|
|
|
|
|
#endif`;const vertex$h=`varying vec2 vUv;
|
|
|
|
|
|
uniform mat3 uvTransform;
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
|
|
|
|
|
|
gl_Position = vec4( position.xy, 1.0, 1.0 );
|
|
|
|
|
|
}`,fragment$h=`uniform sampler2D t2D;
|
|
|
|
|
|
uniform float backgroundIntensity;
|
|
|
|
|
|
varying vec2 vUv;
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vec4 texColor = texture2D( t2D, vUv );
|
|
|
|
|
|
#ifdef DECODE_VIDEO_TEXTURE
|
|
|
|
|
|
texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
texColor.rgb *= backgroundIntensity;
|
|
|
|
|
|
gl_FragColor = texColor;
|
|
|
|
|
|
#include <tonemapping_fragment>
|
|
|
|
|
|
#include <colorspace_fragment>
|
|
|
|
|
|
}`,vertex$g=`varying vec3 vWorldDirection;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vWorldDirection = transformDirection( position, modelMatrix );
|
|
|
|
|
|
#include <begin_vertex>
|
|
|
|
|
|
#include <project_vertex>
|
|
|
|
|
|
gl_Position.z = gl_Position.w;
|
|
|
|
|
|
}`,fragment$g=`#ifdef ENVMAP_TYPE_CUBE
|
|
|
|
|
|
uniform samplerCube envMap;
|
|
|
|
|
|
#elif defined( ENVMAP_TYPE_CUBE_UV )
|
|
|
|
|
|
uniform sampler2D envMap;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
uniform float flipEnvMap;
|
|
|
|
|
|
uniform float backgroundBlurriness;
|
|
|
|
|
|
uniform float backgroundIntensity;
|
|
|
|
|
|
uniform mat3 backgroundRotation;
|
|
|
|
|
|
varying vec3 vWorldDirection;
|
|
|
|
|
|
#include <cube_uv_reflection_fragment>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
#ifdef ENVMAP_TYPE_CUBE
|
|
|
|
|
|
vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );
|
|
|
|
|
|
#elif defined( ENVMAP_TYPE_CUBE_UV )
|
|
|
|
|
|
vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );
|
|
|
|
|
|
#else
|
|
|
|
|
|
vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
texColor.rgb *= backgroundIntensity;
|
|
|
|
|
|
gl_FragColor = texColor;
|
|
|
|
|
|
#include <tonemapping_fragment>
|
|
|
|
|
|
#include <colorspace_fragment>
|
|
|
|
|
|
}`,vertex$f=`varying vec3 vWorldDirection;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vWorldDirection = transformDirection( position, modelMatrix );
|
|
|
|
|
|
#include <begin_vertex>
|
|
|
|
|
|
#include <project_vertex>
|
|
|
|
|
|
gl_Position.z = gl_Position.w;
|
|
|
|
|
|
}`,fragment$f=`uniform samplerCube tCube;
|
|
|
|
|
|
uniform float tFlip;
|
|
|
|
|
|
uniform float opacity;
|
|
|
|
|
|
varying vec3 vWorldDirection;
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );
|
|
|
|
|
|
gl_FragColor = texColor;
|
|
|
|
|
|
gl_FragColor.a *= opacity;
|
|
|
|
|
|
#include <tonemapping_fragment>
|
|
|
|
|
|
#include <colorspace_fragment>
|
|
|
|
|
|
}`,vertex$e=`#include <common>
|
|
|
|
|
|
#include <batching_pars_vertex>
|
|
|
|
|
|
#include <uv_pars_vertex>
|
|
|
|
|
|
#include <displacementmap_pars_vertex>
|
|
|
|
|
|
#include <morphtarget_pars_vertex>
|
|
|
|
|
|
#include <skinning_pars_vertex>
|
|
|
|
|
|
#include <logdepthbuf_pars_vertex>
|
|
|
|
|
|
#include <clipping_planes_pars_vertex>
|
|
|
|
|
|
varying vec2 vHighPrecisionZW;
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
#include <uv_vertex>
|
|
|
|
|
|
#include <batching_vertex>
|
|
|
|
|
|
#include <skinbase_vertex>
|
|
|
|
|
|
#include <morphinstance_vertex>
|
|
|
|
|
|
#ifdef USE_DISPLACEMENTMAP
|
|
|
|
|
|
#include <beginnormal_vertex>
|
|
|
|
|
|
#include <morphnormal_vertex>
|
|
|
|
|
|
#include <skinnormal_vertex>
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#include <begin_vertex>
|
|
|
|
|
|
#include <morphtarget_vertex>
|
|
|
|
|
|
#include <skinning_vertex>
|
|
|
|
|
|
#include <displacementmap_vertex>
|
|
|
|
|
|
#include <project_vertex>
|
|
|
|
|
|
#include <logdepthbuf_vertex>
|
|
|
|
|
|
#include <clipping_planes_vertex>
|
|
|
|
|
|
vHighPrecisionZW = gl_Position.zw;
|
|
|
|
|
|
}`,fragment$e=`#if DEPTH_PACKING == 3200
|
|
|
|
|
|
uniform float opacity;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <packing>
|
|
|
|
|
|
#include <uv_pars_fragment>
|
|
|
|
|
|
#include <map_pars_fragment>
|
|
|
|
|
|
#include <alphamap_pars_fragment>
|
|
|
|
|
|
#include <alphatest_pars_fragment>
|
|
|
|
|
|
#include <alphahash_pars_fragment>
|
|
|
|
|
|
#include <logdepthbuf_pars_fragment>
|
|
|
|
|
|
#include <clipping_planes_pars_fragment>
|
|
|
|
|
|
varying vec2 vHighPrecisionZW;
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vec4 diffuseColor = vec4( 1.0 );
|
|
|
|
|
|
#include <clipping_planes_fragment>
|
|
|
|
|
|
#if DEPTH_PACKING == 3200
|
|
|
|
|
|
diffuseColor.a = opacity;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#include <map_fragment>
|
|
|
|
|
|
#include <alphamap_fragment>
|
|
|
|
|
|
#include <alphatest_fragment>
|
|
|
|
|
|
#include <alphahash_fragment>
|
|
|
|
|
|
#include <logdepthbuf_fragment>
|
|
|
|
|
|
#ifdef USE_REVERSED_DEPTH_BUFFER
|
|
|
|
|
|
float fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ];
|
|
|
|
|
|
#else
|
|
|
|
|
|
float fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if DEPTH_PACKING == 3200
|
|
|
|
|
|
gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );
|
|
|
|
|
|
#elif DEPTH_PACKING == 3201
|
|
|
|
|
|
gl_FragColor = packDepthToRGBA( fragCoordZ );
|
|
|
|
|
|
#elif DEPTH_PACKING == 3202
|
|
|
|
|
|
gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );
|
|
|
|
|
|
#elif DEPTH_PACKING == 3203
|
|
|
|
|
|
gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
}`,vertex$d=`#define DISTANCE
|
|
|
|
|
|
varying vec3 vWorldPosition;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <batching_pars_vertex>
|
|
|
|
|
|
#include <uv_pars_vertex>
|
|
|
|
|
|
#include <displacementmap_pars_vertex>
|
|
|
|
|
|
#include <morphtarget_pars_vertex>
|
|
|
|
|
|
#include <skinning_pars_vertex>
|
|
|
|
|
|
#include <clipping_planes_pars_vertex>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
#include <uv_vertex>
|
|
|
|
|
|
#include <batching_vertex>
|
|
|
|
|
|
#include <skinbase_vertex>
|
|
|
|
|
|
#include <morphinstance_vertex>
|
|
|
|
|
|
#ifdef USE_DISPLACEMENTMAP
|
|
|
|
|
|
#include <beginnormal_vertex>
|
|
|
|
|
|
#include <morphnormal_vertex>
|
|
|
|
|
|
#include <skinnormal_vertex>
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#include <begin_vertex>
|
|
|
|
|
|
#include <morphtarget_vertex>
|
|
|
|
|
|
#include <skinning_vertex>
|
|
|
|
|
|
#include <displacementmap_vertex>
|
|
|
|
|
|
#include <project_vertex>
|
|
|
|
|
|
#include <worldpos_vertex>
|
|
|
|
|
|
#include <clipping_planes_vertex>
|
|
|
|
|
|
vWorldPosition = worldPosition.xyz;
|
|
|
|
|
|
}`,fragment$d=`#define DISTANCE
|
|
|
|
|
|
uniform vec3 referencePosition;
|
|
|
|
|
|
uniform float nearDistance;
|
|
|
|
|
|
uniform float farDistance;
|
|
|
|
|
|
varying vec3 vWorldPosition;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <uv_pars_fragment>
|
|
|
|
|
|
#include <map_pars_fragment>
|
|
|
|
|
|
#include <alphamap_pars_fragment>
|
|
|
|
|
|
#include <alphatest_pars_fragment>
|
|
|
|
|
|
#include <alphahash_pars_fragment>
|
|
|
|
|
|
#include <clipping_planes_pars_fragment>
|
|
|
|
|
|
void main () {
|
|
|
|
|
|
vec4 diffuseColor = vec4( 1.0 );
|
|
|
|
|
|
#include <clipping_planes_fragment>
|
|
|
|
|
|
#include <map_fragment>
|
|
|
|
|
|
#include <alphamap_fragment>
|
|
|
|
|
|
#include <alphatest_fragment>
|
|
|
|
|
|
#include <alphahash_fragment>
|
|
|
|
|
|
float dist = length( vWorldPosition - referencePosition );
|
|
|
|
|
|
dist = ( dist - nearDistance ) / ( farDistance - nearDistance );
|
|
|
|
|
|
dist = saturate( dist );
|
|
|
|
|
|
gl_FragColor = vec4( dist, 0.0, 0.0, 1.0 );
|
|
|
|
|
|
}`,vertex$c=`varying vec3 vWorldDirection;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vWorldDirection = transformDirection( position, modelMatrix );
|
|
|
|
|
|
#include <begin_vertex>
|
|
|
|
|
|
#include <project_vertex>
|
|
|
|
|
|
}`,fragment$c=`uniform sampler2D tEquirect;
|
|
|
|
|
|
varying vec3 vWorldDirection;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vec3 direction = normalize( vWorldDirection );
|
|
|
|
|
|
vec2 sampleUV = equirectUv( direction );
|
|
|
|
|
|
gl_FragColor = texture2D( tEquirect, sampleUV );
|
|
|
|
|
|
#include <tonemapping_fragment>
|
|
|
|
|
|
#include <colorspace_fragment>
|
|
|
|
|
|
}`,vertex$b=`uniform float scale;
|
|
|
|
|
|
attribute float lineDistance;
|
|
|
|
|
|
varying float vLineDistance;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <uv_pars_vertex>
|
|
|
|
|
|
#include <color_pars_vertex>
|
|
|
|
|
|
#include <fog_pars_vertex>
|
|
|
|
|
|
#include <morphtarget_pars_vertex>
|
|
|
|
|
|
#include <logdepthbuf_pars_vertex>
|
|
|
|
|
|
#include <clipping_planes_pars_vertex>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vLineDistance = scale * lineDistance;
|
|
|
|
|
|
#include <uv_vertex>
|
|
|
|
|
|
#include <color_vertex>
|
|
|
|
|
|
#include <morphinstance_vertex>
|
|
|
|
|
|
#include <morphcolor_vertex>
|
|
|
|
|
|
#include <begin_vertex>
|
|
|
|
|
|
#include <morphtarget_vertex>
|
|
|
|
|
|
#include <project_vertex>
|
|
|
|
|
|
#include <logdepthbuf_vertex>
|
|
|
|
|
|
#include <clipping_planes_vertex>
|
|
|
|
|
|
#include <fog_vertex>
|
|
|
|
|
|
}`,fragment$b=`uniform vec3 diffuse;
|
|
|
|
|
|
uniform float opacity;
|
|
|
|
|
|
uniform float dashSize;
|
|
|
|
|
|
uniform float totalSize;
|
|
|
|
|
|
varying float vLineDistance;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <color_pars_fragment>
|
|
|
|
|
|
#include <uv_pars_fragment>
|
|
|
|
|
|
#include <map_pars_fragment>
|
|
|
|
|
|
#include <fog_pars_fragment>
|
|
|
|
|
|
#include <logdepthbuf_pars_fragment>
|
|
|
|
|
|
#include <clipping_planes_pars_fragment>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vec4 diffuseColor = vec4( diffuse, opacity );
|
|
|
|
|
|
#include <clipping_planes_fragment>
|
|
|
|
|
|
if ( mod( vLineDistance, totalSize ) > dashSize ) {
|
|
|
|
|
|
discard;
|
|
|
|
|
|
}
|
|
|
|
|
|
vec3 outgoingLight = vec3( 0.0 );
|
|
|
|
|
|
#include <logdepthbuf_fragment>
|
|
|
|
|
|
#include <map_fragment>
|
|
|
|
|
|
#include <color_fragment>
|
|
|
|
|
|
outgoingLight = diffuseColor.rgb;
|
|
|
|
|
|
#include <opaque_fragment>
|
|
|
|
|
|
#include <tonemapping_fragment>
|
|
|
|
|
|
#include <colorspace_fragment>
|
|
|
|
|
|
#include <fog_fragment>
|
|
|
|
|
|
#include <premultiplied_alpha_fragment>
|
|
|
|
|
|
}`,vertex$a=`#include <common>
|
|
|
|
|
|
#include <batching_pars_vertex>
|
|
|
|
|
|
#include <uv_pars_vertex>
|
|
|
|
|
|
#include <envmap_pars_vertex>
|
|
|
|
|
|
#include <color_pars_vertex>
|
|
|
|
|
|
#include <fog_pars_vertex>
|
|
|
|
|
|
#include <morphtarget_pars_vertex>
|
|
|
|
|
|
#include <skinning_pars_vertex>
|
|
|
|
|
|
#include <logdepthbuf_pars_vertex>
|
|
|
|
|
|
#include <clipping_planes_pars_vertex>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
#include <uv_vertex>
|
|
|
|
|
|
#include <color_vertex>
|
|
|
|
|
|
#include <morphinstance_vertex>
|
|
|
|
|
|
#include <morphcolor_vertex>
|
|
|
|
|
|
#include <batching_vertex>
|
|
|
|
|
|
#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )
|
|
|
|
|
|
#include <beginnormal_vertex>
|
|
|
|
|
|
#include <morphnormal_vertex>
|
|
|
|
|
|
#include <skinbase_vertex>
|
|
|
|
|
|
#include <skinnormal_vertex>
|
|
|
|
|
|
#include <defaultnormal_vertex>
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#include <begin_vertex>
|
|
|
|
|
|
#include <morphtarget_vertex>
|
|
|
|
|
|
#include <skinning_vertex>
|
|
|
|
|
|
#include <project_vertex>
|
|
|
|
|
|
#include <logdepthbuf_vertex>
|
|
|
|
|
|
#include <clipping_planes_vertex>
|
|
|
|
|
|
#include <worldpos_vertex>
|
|
|
|
|
|
#include <envmap_vertex>
|
|
|
|
|
|
#include <fog_vertex>
|
|
|
|
|
|
}`,fragment$a=`uniform vec3 diffuse;
|
|
|
|
|
|
uniform float opacity;
|
|
|
|
|
|
#ifndef FLAT_SHADED
|
|
|
|
|
|
varying vec3 vNormal;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <dithering_pars_fragment>
|
|
|
|
|
|
#include <color_pars_fragment>
|
|
|
|
|
|
#include <uv_pars_fragment>
|
|
|
|
|
|
#include <map_pars_fragment>
|
|
|
|
|
|
#include <alphamap_pars_fragment>
|
|
|
|
|
|
#include <alphatest_pars_fragment>
|
|
|
|
|
|
#include <alphahash_pars_fragment>
|
|
|
|
|
|
#include <aomap_pars_fragment>
|
|
|
|
|
|
#include <lightmap_pars_fragment>
|
|
|
|
|
|
#include <envmap_common_pars_fragment>
|
|
|
|
|
|
#include <envmap_pars_fragment>
|
|
|
|
|
|
#include <fog_pars_fragment>
|
|
|
|
|
|
#include <specularmap_pars_fragment>
|
|
|
|
|
|
#include <logdepthbuf_pars_fragment>
|
|
|
|
|
|
#include <clipping_planes_pars_fragment>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vec4 diffuseColor = vec4( diffuse, opacity );
|
|
|
|
|
|
#include <clipping_planes_fragment>
|
|
|
|
|
|
#include <logdepthbuf_fragment>
|
|
|
|
|
|
#include <map_fragment>
|
|
|
|
|
|
#include <color_fragment>
|
|
|
|
|
|
#include <alphamap_fragment>
|
|
|
|
|
|
#include <alphatest_fragment>
|
|
|
|
|
|
#include <alphahash_fragment>
|
|
|
|
|
|
#include <specularmap_fragment>
|
|
|
|
|
|
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
|
|
|
|
|
|
#ifdef USE_LIGHTMAP
|
|
|
|
|
|
vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
|
|
|
|
|
|
reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;
|
|
|
|
|
|
#else
|
|
|
|
|
|
reflectedLight.indirectDiffuse += vec3( 1.0 );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#include <aomap_fragment>
|
|
|
|
|
|
reflectedLight.indirectDiffuse *= diffuseColor.rgb;
|
|
|
|
|
|
vec3 outgoingLight = reflectedLight.indirectDiffuse;
|
|
|
|
|
|
#include <envmap_fragment>
|
|
|
|
|
|
#include <opaque_fragment>
|
|
|
|
|
|
#include <tonemapping_fragment>
|
|
|
|
|
|
#include <colorspace_fragment>
|
|
|
|
|
|
#include <fog_fragment>
|
|
|
|
|
|
#include <premultiplied_alpha_fragment>
|
|
|
|
|
|
#include <dithering_fragment>
|
|
|
|
|
|
}`,vertex$9=`#define LAMBERT
|
|
|
|
|
|
varying vec3 vViewPosition;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <batching_pars_vertex>
|
|
|
|
|
|
#include <uv_pars_vertex>
|
|
|
|
|
|
#include <displacementmap_pars_vertex>
|
|
|
|
|
|
#include <envmap_pars_vertex>
|
|
|
|
|
|
#include <color_pars_vertex>
|
|
|
|
|
|
#include <fog_pars_vertex>
|
|
|
|
|
|
#include <normal_pars_vertex>
|
|
|
|
|
|
#include <morphtarget_pars_vertex>
|
|
|
|
|
|
#include <skinning_pars_vertex>
|
|
|
|
|
|
#include <shadowmap_pars_vertex>
|
|
|
|
|
|
#include <logdepthbuf_pars_vertex>
|
|
|
|
|
|
#include <clipping_planes_pars_vertex>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
#include <uv_vertex>
|
|
|
|
|
|
#include <color_vertex>
|
|
|
|
|
|
#include <morphinstance_vertex>
|
|
|
|
|
|
#include <morphcolor_vertex>
|
|
|
|
|
|
#include <batching_vertex>
|
|
|
|
|
|
#include <beginnormal_vertex>
|
|
|
|
|
|
#include <morphnormal_vertex>
|
|
|
|
|
|
#include <skinbase_vertex>
|
|
|
|
|
|
#include <skinnormal_vertex>
|
|
|
|
|
|
#include <defaultnormal_vertex>
|
|
|
|
|
|
#include <normal_vertex>
|
|
|
|
|
|
#include <begin_vertex>
|
|
|
|
|
|
#include <morphtarget_vertex>
|
|
|
|
|
|
#include <skinning_vertex>
|
|
|
|
|
|
#include <displacementmap_vertex>
|
|
|
|
|
|
#include <project_vertex>
|
|
|
|
|
|
#include <logdepthbuf_vertex>
|
|
|
|
|
|
#include <clipping_planes_vertex>
|
|
|
|
|
|
vViewPosition = - mvPosition.xyz;
|
|
|
|
|
|
#include <worldpos_vertex>
|
|
|
|
|
|
#include <envmap_vertex>
|
|
|
|
|
|
#include <shadowmap_vertex>
|
|
|
|
|
|
#include <fog_vertex>
|
|
|
|
|
|
}`,fragment$9=`#define LAMBERT
|
|
|
|
|
|
uniform vec3 diffuse;
|
|
|
|
|
|
uniform vec3 emissive;
|
|
|
|
|
|
uniform float opacity;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <dithering_pars_fragment>
|
|
|
|
|
|
#include <color_pars_fragment>
|
|
|
|
|
|
#include <uv_pars_fragment>
|
|
|
|
|
|
#include <map_pars_fragment>
|
|
|
|
|
|
#include <alphamap_pars_fragment>
|
|
|
|
|
|
#include <alphatest_pars_fragment>
|
|
|
|
|
|
#include <alphahash_pars_fragment>
|
|
|
|
|
|
#include <aomap_pars_fragment>
|
|
|
|
|
|
#include <lightmap_pars_fragment>
|
|
|
|
|
|
#include <emissivemap_pars_fragment>
|
|
|
|
|
|
#include <envmap_common_pars_fragment>
|
|
|
|
|
|
#include <envmap_pars_fragment>
|
|
|
|
|
|
#include <fog_pars_fragment>
|
|
|
|
|
|
#include <bsdfs>
|
|
|
|
|
|
#include <lights_pars_begin>
|
|
|
|
|
|
#include <normal_pars_fragment>
|
|
|
|
|
|
#include <lights_lambert_pars_fragment>
|
|
|
|
|
|
#include <shadowmap_pars_fragment>
|
|
|
|
|
|
#include <bumpmap_pars_fragment>
|
|
|
|
|
|
#include <normalmap_pars_fragment>
|
|
|
|
|
|
#include <specularmap_pars_fragment>
|
|
|
|
|
|
#include <logdepthbuf_pars_fragment>
|
|
|
|
|
|
#include <clipping_planes_pars_fragment>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vec4 diffuseColor = vec4( diffuse, opacity );
|
|
|
|
|
|
#include <clipping_planes_fragment>
|
|
|
|
|
|
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
|
|
|
|
|
|
vec3 totalEmissiveRadiance = emissive;
|
|
|
|
|
|
#include <logdepthbuf_fragment>
|
|
|
|
|
|
#include <map_fragment>
|
|
|
|
|
|
#include <color_fragment>
|
|
|
|
|
|
#include <alphamap_fragment>
|
|
|
|
|
|
#include <alphatest_fragment>
|
|
|
|
|
|
#include <alphahash_fragment>
|
|
|
|
|
|
#include <specularmap_fragment>
|
|
|
|
|
|
#include <normal_fragment_begin>
|
|
|
|
|
|
#include <normal_fragment_maps>
|
|
|
|
|
|
#include <emissivemap_fragment>
|
|
|
|
|
|
#include <lights_lambert_fragment>
|
|
|
|
|
|
#include <lights_fragment_begin>
|
|
|
|
|
|
#include <lights_fragment_maps>
|
|
|
|
|
|
#include <lights_fragment_end>
|
|
|
|
|
|
#include <aomap_fragment>
|
|
|
|
|
|
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
|
|
|
|
|
|
#include <envmap_fragment>
|
|
|
|
|
|
#include <opaque_fragment>
|
|
|
|
|
|
#include <tonemapping_fragment>
|
|
|
|
|
|
#include <colorspace_fragment>
|
|
|
|
|
|
#include <fog_fragment>
|
|
|
|
|
|
#include <premultiplied_alpha_fragment>
|
|
|
|
|
|
#include <dithering_fragment>
|
|
|
|
|
|
}`,vertex$8=`#define MATCAP
|
|
|
|
|
|
varying vec3 vViewPosition;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <batching_pars_vertex>
|
|
|
|
|
|
#include <uv_pars_vertex>
|
|
|
|
|
|
#include <color_pars_vertex>
|
|
|
|
|
|
#include <displacementmap_pars_vertex>
|
|
|
|
|
|
#include <fog_pars_vertex>
|
|
|
|
|
|
#include <normal_pars_vertex>
|
|
|
|
|
|
#include <morphtarget_pars_vertex>
|
|
|
|
|
|
#include <skinning_pars_vertex>
|
|
|
|
|
|
#include <logdepthbuf_pars_vertex>
|
|
|
|
|
|
#include <clipping_planes_pars_vertex>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
#include <uv_vertex>
|
|
|
|
|
|
#include <color_vertex>
|
|
|
|
|
|
#include <morphinstance_vertex>
|
|
|
|
|
|
#include <morphcolor_vertex>
|
|
|
|
|
|
#include <batching_vertex>
|
|
|
|
|
|
#include <beginnormal_vertex>
|
|
|
|
|
|
#include <morphnormal_vertex>
|
|
|
|
|
|
#include <skinbase_vertex>
|
|
|
|
|
|
#include <skinnormal_vertex>
|
|
|
|
|
|
#include <defaultnormal_vertex>
|
|
|
|
|
|
#include <normal_vertex>
|
|
|
|
|
|
#include <begin_vertex>
|
|
|
|
|
|
#include <morphtarget_vertex>
|
|
|
|
|
|
#include <skinning_vertex>
|
|
|
|
|
|
#include <displacementmap_vertex>
|
|
|
|
|
|
#include <project_vertex>
|
|
|
|
|
|
#include <logdepthbuf_vertex>
|
|
|
|
|
|
#include <clipping_planes_vertex>
|
|
|
|
|
|
#include <fog_vertex>
|
|
|
|
|
|
vViewPosition = - mvPosition.xyz;
|
|
|
|
|
|
}`,fragment$8=`#define MATCAP
|
|
|
|
|
|
uniform vec3 diffuse;
|
|
|
|
|
|
uniform float opacity;
|
|
|
|
|
|
uniform sampler2D matcap;
|
|
|
|
|
|
varying vec3 vViewPosition;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <dithering_pars_fragment>
|
|
|
|
|
|
#include <color_pars_fragment>
|
|
|
|
|
|
#include <uv_pars_fragment>
|
|
|
|
|
|
#include <map_pars_fragment>
|
|
|
|
|
|
#include <alphamap_pars_fragment>
|
|
|
|
|
|
#include <alphatest_pars_fragment>
|
|
|
|
|
|
#include <alphahash_pars_fragment>
|
|
|
|
|
|
#include <fog_pars_fragment>
|
|
|
|
|
|
#include <normal_pars_fragment>
|
|
|
|
|
|
#include <bumpmap_pars_fragment>
|
|
|
|
|
|
#include <normalmap_pars_fragment>
|
|
|
|
|
|
#include <logdepthbuf_pars_fragment>
|
|
|
|
|
|
#include <clipping_planes_pars_fragment>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vec4 diffuseColor = vec4( diffuse, opacity );
|
|
|
|
|
|
#include <clipping_planes_fragment>
|
|
|
|
|
|
#include <logdepthbuf_fragment>
|
|
|
|
|
|
#include <map_fragment>
|
|
|
|
|
|
#include <color_fragment>
|
|
|
|
|
|
#include <alphamap_fragment>
|
|
|
|
|
|
#include <alphatest_fragment>
|
|
|
|
|
|
#include <alphahash_fragment>
|
|
|
|
|
|
#include <normal_fragment_begin>
|
|
|
|
|
|
#include <normal_fragment_maps>
|
|
|
|
|
|
vec3 viewDir = normalize( vViewPosition );
|
|
|
|
|
|
vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );
|
|
|
|
|
|
vec3 y = cross( viewDir, x );
|
|
|
|
|
|
vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;
|
|
|
|
|
|
#ifdef USE_MATCAP
|
|
|
|
|
|
vec4 matcapColor = texture2D( matcap, uv );
|
|
|
|
|
|
#else
|
|
|
|
|
|
vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;
|
|
|
|
|
|
#include <opaque_fragment>
|
|
|
|
|
|
#include <tonemapping_fragment>
|
|
|
|
|
|
#include <colorspace_fragment>
|
|
|
|
|
|
#include <fog_fragment>
|
|
|
|
|
|
#include <premultiplied_alpha_fragment>
|
|
|
|
|
|
#include <dithering_fragment>
|
|
|
|
|
|
}`,vertex$7=`#define NORMAL
|
|
|
|
|
|
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
|
|
|
|
|
|
varying vec3 vViewPosition;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <batching_pars_vertex>
|
|
|
|
|
|
#include <uv_pars_vertex>
|
|
|
|
|
|
#include <displacementmap_pars_vertex>
|
|
|
|
|
|
#include <normal_pars_vertex>
|
|
|
|
|
|
#include <morphtarget_pars_vertex>
|
|
|
|
|
|
#include <skinning_pars_vertex>
|
|
|
|
|
|
#include <logdepthbuf_pars_vertex>
|
|
|
|
|
|
#include <clipping_planes_pars_vertex>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
#include <uv_vertex>
|
|
|
|
|
|
#include <batching_vertex>
|
|
|
|
|
|
#include <beginnormal_vertex>
|
|
|
|
|
|
#include <morphinstance_vertex>
|
|
|
|
|
|
#include <morphnormal_vertex>
|
|
|
|
|
|
#include <skinbase_vertex>
|
|
|
|
|
|
#include <skinnormal_vertex>
|
|
|
|
|
|
#include <defaultnormal_vertex>
|
|
|
|
|
|
#include <normal_vertex>
|
|
|
|
|
|
#include <begin_vertex>
|
|
|
|
|
|
#include <morphtarget_vertex>
|
|
|
|
|
|
#include <skinning_vertex>
|
|
|
|
|
|
#include <displacementmap_vertex>
|
|
|
|
|
|
#include <project_vertex>
|
|
|
|
|
|
#include <logdepthbuf_vertex>
|
|
|
|
|
|
#include <clipping_planes_vertex>
|
|
|
|
|
|
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
|
|
|
|
|
|
vViewPosition = - mvPosition.xyz;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
}`,fragment$7=`#define NORMAL
|
|
|
|
|
|
uniform float opacity;
|
|
|
|
|
|
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
|
|
|
|
|
|
varying vec3 vViewPosition;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#include <uv_pars_fragment>
|
|
|
|
|
|
#include <normal_pars_fragment>
|
|
|
|
|
|
#include <bumpmap_pars_fragment>
|
|
|
|
|
|
#include <normalmap_pars_fragment>
|
|
|
|
|
|
#include <logdepthbuf_pars_fragment>
|
|
|
|
|
|
#include <clipping_planes_pars_fragment>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );
|
|
|
|
|
|
#include <clipping_planes_fragment>
|
|
|
|
|
|
#include <logdepthbuf_fragment>
|
|
|
|
|
|
#include <normal_fragment_begin>
|
|
|
|
|
|
#include <normal_fragment_maps>
|
|
|
|
|
|
gl_FragColor = vec4( normalize( normal ) * 0.5 + 0.5, diffuseColor.a );
|
|
|
|
|
|
#ifdef OPAQUE
|
|
|
|
|
|
gl_FragColor.a = 1.0;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
}`,vertex$6=`#define PHONG
|
|
|
|
|
|
varying vec3 vViewPosition;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <batching_pars_vertex>
|
|
|
|
|
|
#include <uv_pars_vertex>
|
|
|
|
|
|
#include <displacementmap_pars_vertex>
|
|
|
|
|
|
#include <envmap_pars_vertex>
|
|
|
|
|
|
#include <color_pars_vertex>
|
|
|
|
|
|
#include <fog_pars_vertex>
|
|
|
|
|
|
#include <normal_pars_vertex>
|
|
|
|
|
|
#include <morphtarget_pars_vertex>
|
|
|
|
|
|
#include <skinning_pars_vertex>
|
|
|
|
|
|
#include <shadowmap_pars_vertex>
|
|
|
|
|
|
#include <logdepthbuf_pars_vertex>
|
|
|
|
|
|
#include <clipping_planes_pars_vertex>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
#include <uv_vertex>
|
|
|
|
|
|
#include <color_vertex>
|
|
|
|
|
|
#include <morphcolor_vertex>
|
|
|
|
|
|
#include <batching_vertex>
|
|
|
|
|
|
#include <beginnormal_vertex>
|
|
|
|
|
|
#include <morphinstance_vertex>
|
|
|
|
|
|
#include <morphnormal_vertex>
|
|
|
|
|
|
#include <skinbase_vertex>
|
|
|
|
|
|
#include <skinnormal_vertex>
|
|
|
|
|
|
#include <defaultnormal_vertex>
|
|
|
|
|
|
#include <normal_vertex>
|
|
|
|
|
|
#include <begin_vertex>
|
|
|
|
|
|
#include <morphtarget_vertex>
|
|
|
|
|
|
#include <skinning_vertex>
|
|
|
|
|
|
#include <displacementmap_vertex>
|
|
|
|
|
|
#include <project_vertex>
|
|
|
|
|
|
#include <logdepthbuf_vertex>
|
|
|
|
|
|
#include <clipping_planes_vertex>
|
|
|
|
|
|
vViewPosition = - mvPosition.xyz;
|
|
|
|
|
|
#include <worldpos_vertex>
|
|
|
|
|
|
#include <envmap_vertex>
|
|
|
|
|
|
#include <shadowmap_vertex>
|
|
|
|
|
|
#include <fog_vertex>
|
|
|
|
|
|
}`,fragment$6=`#define PHONG
|
|
|
|
|
|
uniform vec3 diffuse;
|
|
|
|
|
|
uniform vec3 emissive;
|
|
|
|
|
|
uniform vec3 specular;
|
|
|
|
|
|
uniform float shininess;
|
|
|
|
|
|
uniform float opacity;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <dithering_pars_fragment>
|
|
|
|
|
|
#include <color_pars_fragment>
|
|
|
|
|
|
#include <uv_pars_fragment>
|
|
|
|
|
|
#include <map_pars_fragment>
|
|
|
|
|
|
#include <alphamap_pars_fragment>
|
|
|
|
|
|
#include <alphatest_pars_fragment>
|
|
|
|
|
|
#include <alphahash_pars_fragment>
|
|
|
|
|
|
#include <aomap_pars_fragment>
|
|
|
|
|
|
#include <lightmap_pars_fragment>
|
|
|
|
|
|
#include <emissivemap_pars_fragment>
|
|
|
|
|
|
#include <envmap_common_pars_fragment>
|
|
|
|
|
|
#include <envmap_pars_fragment>
|
|
|
|
|
|
#include <fog_pars_fragment>
|
|
|
|
|
|
#include <bsdfs>
|
|
|
|
|
|
#include <lights_pars_begin>
|
|
|
|
|
|
#include <normal_pars_fragment>
|
|
|
|
|
|
#include <lights_phong_pars_fragment>
|
|
|
|
|
|
#include <shadowmap_pars_fragment>
|
|
|
|
|
|
#include <bumpmap_pars_fragment>
|
|
|
|
|
|
#include <normalmap_pars_fragment>
|
|
|
|
|
|
#include <specularmap_pars_fragment>
|
|
|
|
|
|
#include <logdepthbuf_pars_fragment>
|
|
|
|
|
|
#include <clipping_planes_pars_fragment>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vec4 diffuseColor = vec4( diffuse, opacity );
|
|
|
|
|
|
#include <clipping_planes_fragment>
|
|
|
|
|
|
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
|
|
|
|
|
|
vec3 totalEmissiveRadiance = emissive;
|
|
|
|
|
|
#include <logdepthbuf_fragment>
|
|
|
|
|
|
#include <map_fragment>
|
|
|
|
|
|
#include <color_fragment>
|
|
|
|
|
|
#include <alphamap_fragment>
|
|
|
|
|
|
#include <alphatest_fragment>
|
|
|
|
|
|
#include <alphahash_fragment>
|
|
|
|
|
|
#include <specularmap_fragment>
|
|
|
|
|
|
#include <normal_fragment_begin>
|
|
|
|
|
|
#include <normal_fragment_maps>
|
|
|
|
|
|
#include <emissivemap_fragment>
|
|
|
|
|
|
#include <lights_phong_fragment>
|
|
|
|
|
|
#include <lights_fragment_begin>
|
|
|
|
|
|
#include <lights_fragment_maps>
|
|
|
|
|
|
#include <lights_fragment_end>
|
|
|
|
|
|
#include <aomap_fragment>
|
|
|
|
|
|
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;
|
|
|
|
|
|
#include <envmap_fragment>
|
|
|
|
|
|
#include <opaque_fragment>
|
|
|
|
|
|
#include <tonemapping_fragment>
|
|
|
|
|
|
#include <colorspace_fragment>
|
|
|
|
|
|
#include <fog_fragment>
|
|
|
|
|
|
#include <premultiplied_alpha_fragment>
|
|
|
|
|
|
#include <dithering_fragment>
|
|
|
|
|
|
}`,vertex$5=`#define STANDARD
|
|
|
|
|
|
varying vec3 vViewPosition;
|
|
|
|
|
|
#ifdef USE_TRANSMISSION
|
|
|
|
|
|
varying vec3 vWorldPosition;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <batching_pars_vertex>
|
|
|
|
|
|
#include <uv_pars_vertex>
|
|
|
|
|
|
#include <displacementmap_pars_vertex>
|
|
|
|
|
|
#include <color_pars_vertex>
|
|
|
|
|
|
#include <fog_pars_vertex>
|
|
|
|
|
|
#include <normal_pars_vertex>
|
|
|
|
|
|
#include <morphtarget_pars_vertex>
|
|
|
|
|
|
#include <skinning_pars_vertex>
|
|
|
|
|
|
#include <shadowmap_pars_vertex>
|
|
|
|
|
|
#include <logdepthbuf_pars_vertex>
|
|
|
|
|
|
#include <clipping_planes_pars_vertex>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
#include <uv_vertex>
|
|
|
|
|
|
#include <color_vertex>
|
|
|
|
|
|
#include <morphinstance_vertex>
|
|
|
|
|
|
#include <morphcolor_vertex>
|
|
|
|
|
|
#include <batching_vertex>
|
|
|
|
|
|
#include <beginnormal_vertex>
|
|
|
|
|
|
#include <morphnormal_vertex>
|
|
|
|
|
|
#include <skinbase_vertex>
|
|
|
|
|
|
#include <skinnormal_vertex>
|
|
|
|
|
|
#include <defaultnormal_vertex>
|
|
|
|
|
|
#include <normal_vertex>
|
|
|
|
|
|
#include <begin_vertex>
|
|
|
|
|
|
#include <morphtarget_vertex>
|
|
|
|
|
|
#include <skinning_vertex>
|
|
|
|
|
|
#include <displacementmap_vertex>
|
|
|
|
|
|
#include <project_vertex>
|
|
|
|
|
|
#include <logdepthbuf_vertex>
|
|
|
|
|
|
#include <clipping_planes_vertex>
|
|
|
|
|
|
vViewPosition = - mvPosition.xyz;
|
|
|
|
|
|
#include <worldpos_vertex>
|
|
|
|
|
|
#include <shadowmap_vertex>
|
|
|
|
|
|
#include <fog_vertex>
|
|
|
|
|
|
#ifdef USE_TRANSMISSION
|
|
|
|
|
|
vWorldPosition = worldPosition.xyz;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
}`,fragment$5=`#define STANDARD
|
|
|
|
|
|
#ifdef PHYSICAL
|
|
|
|
|
|
#define IOR
|
|
|
|
|
|
#define USE_SPECULAR
|
|
|
|
|
|
#endif
|
|
|
|
|
|
uniform vec3 diffuse;
|
|
|
|
|
|
uniform vec3 emissive;
|
|
|
|
|
|
uniform float roughness;
|
|
|
|
|
|
uniform float metalness;
|
|
|
|
|
|
uniform float opacity;
|
|
|
|
|
|
#ifdef IOR
|
|
|
|
|
|
uniform float ior;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SPECULAR
|
|
|
|
|
|
uniform float specularIntensity;
|
|
|
|
|
|
uniform vec3 specularColor;
|
|
|
|
|
|
#ifdef USE_SPECULAR_COLORMAP
|
|
|
|
|
|
uniform sampler2D specularColorMap;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SPECULAR_INTENSITYMAP
|
|
|
|
|
|
uniform sampler2D specularIntensityMap;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_CLEARCOAT
|
|
|
|
|
|
uniform float clearcoat;
|
|
|
|
|
|
uniform float clearcoatRoughness;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_DISPERSION
|
|
|
|
|
|
uniform float dispersion;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_IRIDESCENCE
|
|
|
|
|
|
uniform float iridescence;
|
|
|
|
|
|
uniform float iridescenceIOR;
|
|
|
|
|
|
uniform float iridescenceThicknessMinimum;
|
|
|
|
|
|
uniform float iridescenceThicknessMaximum;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SHEEN
|
|
|
|
|
|
uniform vec3 sheenColor;
|
|
|
|
|
|
uniform float sheenRoughness;
|
|
|
|
|
|
#ifdef USE_SHEEN_COLORMAP
|
|
|
|
|
|
uniform sampler2D sheenColorMap;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_SHEEN_ROUGHNESSMAP
|
|
|
|
|
|
uniform sampler2D sheenRoughnessMap;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_ANISOTROPY
|
|
|
|
|
|
uniform vec2 anisotropyVector;
|
|
|
|
|
|
#ifdef USE_ANISOTROPYMAP
|
|
|
|
|
|
uniform sampler2D anisotropyMap;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
varying vec3 vViewPosition;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <dithering_pars_fragment>
|
|
|
|
|
|
#include <color_pars_fragment>
|
|
|
|
|
|
#include <uv_pars_fragment>
|
|
|
|
|
|
#include <map_pars_fragment>
|
|
|
|
|
|
#include <alphamap_pars_fragment>
|
|
|
|
|
|
#include <alphatest_pars_fragment>
|
|
|
|
|
|
#include <alphahash_pars_fragment>
|
|
|
|
|
|
#include <aomap_pars_fragment>
|
|
|
|
|
|
#include <lightmap_pars_fragment>
|
|
|
|
|
|
#include <emissivemap_pars_fragment>
|
|
|
|
|
|
#include <iridescence_fragment>
|
|
|
|
|
|
#include <cube_uv_reflection_fragment>
|
|
|
|
|
|
#include <envmap_common_pars_fragment>
|
|
|
|
|
|
#include <envmap_physical_pars_fragment>
|
|
|
|
|
|
#include <fog_pars_fragment>
|
|
|
|
|
|
#include <lights_pars_begin>
|
|
|
|
|
|
#include <normal_pars_fragment>
|
|
|
|
|
|
#include <lights_physical_pars_fragment>
|
|
|
|
|
|
#include <transmission_pars_fragment>
|
|
|
|
|
|
#include <shadowmap_pars_fragment>
|
|
|
|
|
|
#include <bumpmap_pars_fragment>
|
|
|
|
|
|
#include <normalmap_pars_fragment>
|
|
|
|
|
|
#include <clearcoat_pars_fragment>
|
|
|
|
|
|
#include <iridescence_pars_fragment>
|
|
|
|
|
|
#include <roughnessmap_pars_fragment>
|
|
|
|
|
|
#include <metalnessmap_pars_fragment>
|
|
|
|
|
|
#include <logdepthbuf_pars_fragment>
|
|
|
|
|
|
#include <clipping_planes_pars_fragment>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vec4 diffuseColor = vec4( diffuse, opacity );
|
|
|
|
|
|
#include <clipping_planes_fragment>
|
|
|
|
|
|
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
|
|
|
|
|
|
vec3 totalEmissiveRadiance = emissive;
|
|
|
|
|
|
#include <logdepthbuf_fragment>
|
|
|
|
|
|
#include <map_fragment>
|
|
|
|
|
|
#include <color_fragment>
|
|
|
|
|
|
#include <alphamap_fragment>
|
|
|
|
|
|
#include <alphatest_fragment>
|
|
|
|
|
|
#include <alphahash_fragment>
|
|
|
|
|
|
#include <roughnessmap_fragment>
|
|
|
|
|
|
#include <metalnessmap_fragment>
|
|
|
|
|
|
#include <normal_fragment_begin>
|
|
|
|
|
|
#include <normal_fragment_maps>
|
|
|
|
|
|
#include <clearcoat_normal_fragment_begin>
|
|
|
|
|
|
#include <clearcoat_normal_fragment_maps>
|
|
|
|
|
|
#include <emissivemap_fragment>
|
|
|
|
|
|
#include <lights_physical_fragment>
|
|
|
|
|
|
#include <lights_fragment_begin>
|
|
|
|
|
|
#include <lights_fragment_maps>
|
|
|
|
|
|
#include <lights_fragment_end>
|
|
|
|
|
|
#include <aomap_fragment>
|
|
|
|
|
|
vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;
|
|
|
|
|
|
vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;
|
|
|
|
|
|
#include <transmission_fragment>
|
|
|
|
|
|
vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;
|
|
|
|
|
|
#ifdef USE_SHEEN
|
|
|
|
|
|
|
|
|
|
|
|
outgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect;
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef USE_CLEARCOAT
|
|
|
|
|
|
float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );
|
|
|
|
|
|
vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );
|
|
|
|
|
|
outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#include <opaque_fragment>
|
|
|
|
|
|
#include <tonemapping_fragment>
|
|
|
|
|
|
#include <colorspace_fragment>
|
|
|
|
|
|
#include <fog_fragment>
|
|
|
|
|
|
#include <premultiplied_alpha_fragment>
|
|
|
|
|
|
#include <dithering_fragment>
|
|
|
|
|
|
}`,vertex$4=`#define TOON
|
|
|
|
|
|
varying vec3 vViewPosition;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <batching_pars_vertex>
|
|
|
|
|
|
#include <uv_pars_vertex>
|
|
|
|
|
|
#include <displacementmap_pars_vertex>
|
|
|
|
|
|
#include <color_pars_vertex>
|
|
|
|
|
|
#include <fog_pars_vertex>
|
|
|
|
|
|
#include <normal_pars_vertex>
|
|
|
|
|
|
#include <morphtarget_pars_vertex>
|
|
|
|
|
|
#include <skinning_pars_vertex>
|
|
|
|
|
|
#include <shadowmap_pars_vertex>
|
|
|
|
|
|
#include <logdepthbuf_pars_vertex>
|
|
|
|
|
|
#include <clipping_planes_pars_vertex>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
#include <uv_vertex>
|
|
|
|
|
|
#include <color_vertex>
|
|
|
|
|
|
#include <morphinstance_vertex>
|
|
|
|
|
|
#include <morphcolor_vertex>
|
|
|
|
|
|
#include <batching_vertex>
|
|
|
|
|
|
#include <beginnormal_vertex>
|
|
|
|
|
|
#include <morphnormal_vertex>
|
|
|
|
|
|
#include <skinbase_vertex>
|
|
|
|
|
|
#include <skinnormal_vertex>
|
|
|
|
|
|
#include <defaultnormal_vertex>
|
|
|
|
|
|
#include <normal_vertex>
|
|
|
|
|
|
#include <begin_vertex>
|
|
|
|
|
|
#include <morphtarget_vertex>
|
|
|
|
|
|
#include <skinning_vertex>
|
|
|
|
|
|
#include <displacementmap_vertex>
|
|
|
|
|
|
#include <project_vertex>
|
|
|
|
|
|
#include <logdepthbuf_vertex>
|
|
|
|
|
|
#include <clipping_planes_vertex>
|
|
|
|
|
|
vViewPosition = - mvPosition.xyz;
|
|
|
|
|
|
#include <worldpos_vertex>
|
|
|
|
|
|
#include <shadowmap_vertex>
|
|
|
|
|
|
#include <fog_vertex>
|
|
|
|
|
|
}`,fragment$4=`#define TOON
|
|
|
|
|
|
uniform vec3 diffuse;
|
|
|
|
|
|
uniform vec3 emissive;
|
|
|
|
|
|
uniform float opacity;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <dithering_pars_fragment>
|
|
|
|
|
|
#include <color_pars_fragment>
|
|
|
|
|
|
#include <uv_pars_fragment>
|
|
|
|
|
|
#include <map_pars_fragment>
|
|
|
|
|
|
#include <alphamap_pars_fragment>
|
|
|
|
|
|
#include <alphatest_pars_fragment>
|
|
|
|
|
|
#include <alphahash_pars_fragment>
|
|
|
|
|
|
#include <aomap_pars_fragment>
|
|
|
|
|
|
#include <lightmap_pars_fragment>
|
|
|
|
|
|
#include <emissivemap_pars_fragment>
|
|
|
|
|
|
#include <gradientmap_pars_fragment>
|
|
|
|
|
|
#include <fog_pars_fragment>
|
|
|
|
|
|
#include <bsdfs>
|
|
|
|
|
|
#include <lights_pars_begin>
|
|
|
|
|
|
#include <normal_pars_fragment>
|
|
|
|
|
|
#include <lights_toon_pars_fragment>
|
|
|
|
|
|
#include <shadowmap_pars_fragment>
|
|
|
|
|
|
#include <bumpmap_pars_fragment>
|
|
|
|
|
|
#include <normalmap_pars_fragment>
|
|
|
|
|
|
#include <logdepthbuf_pars_fragment>
|
|
|
|
|
|
#include <clipping_planes_pars_fragment>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vec4 diffuseColor = vec4( diffuse, opacity );
|
|
|
|
|
|
#include <clipping_planes_fragment>
|
|
|
|
|
|
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
|
|
|
|
|
|
vec3 totalEmissiveRadiance = emissive;
|
|
|
|
|
|
#include <logdepthbuf_fragment>
|
|
|
|
|
|
#include <map_fragment>
|
|
|
|
|
|
#include <color_fragment>
|
|
|
|
|
|
#include <alphamap_fragment>
|
|
|
|
|
|
#include <alphatest_fragment>
|
|
|
|
|
|
#include <alphahash_fragment>
|
|
|
|
|
|
#include <normal_fragment_begin>
|
|
|
|
|
|
#include <normal_fragment_maps>
|
|
|
|
|
|
#include <emissivemap_fragment>
|
|
|
|
|
|
#include <lights_toon_fragment>
|
|
|
|
|
|
#include <lights_fragment_begin>
|
|
|
|
|
|
#include <lights_fragment_maps>
|
|
|
|
|
|
#include <lights_fragment_end>
|
|
|
|
|
|
#include <aomap_fragment>
|
|
|
|
|
|
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
|
|
|
|
|
|
#include <opaque_fragment>
|
|
|
|
|
|
#include <tonemapping_fragment>
|
|
|
|
|
|
#include <colorspace_fragment>
|
|
|
|
|
|
#include <fog_fragment>
|
|
|
|
|
|
#include <premultiplied_alpha_fragment>
|
|
|
|
|
|
#include <dithering_fragment>
|
|
|
|
|
|
}`,vertex$3=`uniform float size;
|
|
|
|
|
|
uniform float scale;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <color_pars_vertex>
|
|
|
|
|
|
#include <fog_pars_vertex>
|
|
|
|
|
|
#include <morphtarget_pars_vertex>
|
|
|
|
|
|
#include <logdepthbuf_pars_vertex>
|
|
|
|
|
|
#include <clipping_planes_pars_vertex>
|
|
|
|
|
|
#ifdef USE_POINTS_UV
|
|
|
|
|
|
varying vec2 vUv;
|
|
|
|
|
|
uniform mat3 uvTransform;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
#ifdef USE_POINTS_UV
|
|
|
|
|
|
vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#include <color_vertex>
|
|
|
|
|
|
#include <morphinstance_vertex>
|
|
|
|
|
|
#include <morphcolor_vertex>
|
|
|
|
|
|
#include <begin_vertex>
|
|
|
|
|
|
#include <morphtarget_vertex>
|
|
|
|
|
|
#include <project_vertex>
|
|
|
|
|
|
gl_PointSize = size;
|
|
|
|
|
|
#ifdef USE_SIZEATTENUATION
|
|
|
|
|
|
bool isPerspective = isPerspectiveMatrix( projectionMatrix );
|
|
|
|
|
|
if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#include <logdepthbuf_vertex>
|
|
|
|
|
|
#include <clipping_planes_vertex>
|
|
|
|
|
|
#include <worldpos_vertex>
|
|
|
|
|
|
#include <fog_vertex>
|
|
|
|
|
|
}`,fragment$3=`uniform vec3 diffuse;
|
|
|
|
|
|
uniform float opacity;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <color_pars_fragment>
|
|
|
|
|
|
#include <map_particle_pars_fragment>
|
|
|
|
|
|
#include <alphatest_pars_fragment>
|
|
|
|
|
|
#include <alphahash_pars_fragment>
|
|
|
|
|
|
#include <fog_pars_fragment>
|
|
|
|
|
|
#include <logdepthbuf_pars_fragment>
|
|
|
|
|
|
#include <clipping_planes_pars_fragment>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vec4 diffuseColor = vec4( diffuse, opacity );
|
|
|
|
|
|
#include <clipping_planes_fragment>
|
|
|
|
|
|
vec3 outgoingLight = vec3( 0.0 );
|
|
|
|
|
|
#include <logdepthbuf_fragment>
|
|
|
|
|
|
#include <map_particle_fragment>
|
|
|
|
|
|
#include <color_fragment>
|
|
|
|
|
|
#include <alphatest_fragment>
|
|
|
|
|
|
#include <alphahash_fragment>
|
|
|
|
|
|
outgoingLight = diffuseColor.rgb;
|
|
|
|
|
|
#include <opaque_fragment>
|
|
|
|
|
|
#include <tonemapping_fragment>
|
|
|
|
|
|
#include <colorspace_fragment>
|
|
|
|
|
|
#include <fog_fragment>
|
|
|
|
|
|
#include <premultiplied_alpha_fragment>
|
|
|
|
|
|
}`,vertex$2=`#include <common>
|
|
|
|
|
|
#include <batching_pars_vertex>
|
|
|
|
|
|
#include <fog_pars_vertex>
|
|
|
|
|
|
#include <morphtarget_pars_vertex>
|
|
|
|
|
|
#include <skinning_pars_vertex>
|
|
|
|
|
|
#include <logdepthbuf_pars_vertex>
|
|
|
|
|
|
#include <shadowmap_pars_vertex>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
#include <batching_vertex>
|
|
|
|
|
|
#include <beginnormal_vertex>
|
|
|
|
|
|
#include <morphinstance_vertex>
|
|
|
|
|
|
#include <morphnormal_vertex>
|
|
|
|
|
|
#include <skinbase_vertex>
|
|
|
|
|
|
#include <skinnormal_vertex>
|
|
|
|
|
|
#include <defaultnormal_vertex>
|
|
|
|
|
|
#include <begin_vertex>
|
|
|
|
|
|
#include <morphtarget_vertex>
|
|
|
|
|
|
#include <skinning_vertex>
|
|
|
|
|
|
#include <project_vertex>
|
|
|
|
|
|
#include <logdepthbuf_vertex>
|
|
|
|
|
|
#include <worldpos_vertex>
|
|
|
|
|
|
#include <shadowmap_vertex>
|
|
|
|
|
|
#include <fog_vertex>
|
|
|
|
|
|
}`,fragment$2=`uniform vec3 color;
|
|
|
|
|
|
uniform float opacity;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <fog_pars_fragment>
|
|
|
|
|
|
#include <bsdfs>
|
|
|
|
|
|
#include <lights_pars_begin>
|
|
|
|
|
|
#include <logdepthbuf_pars_fragment>
|
|
|
|
|
|
#include <shadowmap_pars_fragment>
|
|
|
|
|
|
#include <shadowmask_pars_fragment>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
#include <logdepthbuf_fragment>
|
|
|
|
|
|
gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );
|
|
|
|
|
|
#include <tonemapping_fragment>
|
|
|
|
|
|
#include <colorspace_fragment>
|
|
|
|
|
|
#include <fog_fragment>
|
|
|
|
|
|
}`,vertex$1=`uniform float rotation;
|
|
|
|
|
|
uniform vec2 center;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <uv_pars_vertex>
|
|
|
|
|
|
#include <fog_pars_vertex>
|
|
|
|
|
|
#include <logdepthbuf_pars_vertex>
|
|
|
|
|
|
#include <clipping_planes_pars_vertex>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
#include <uv_vertex>
|
|
|
|
|
|
vec4 mvPosition = modelViewMatrix[ 3 ];
|
|
|
|
|
|
vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );
|
|
|
|
|
|
#ifndef USE_SIZEATTENUATION
|
|
|
|
|
|
bool isPerspective = isPerspectiveMatrix( projectionMatrix );
|
|
|
|
|
|
if ( isPerspective ) scale *= - mvPosition.z;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;
|
|
|
|
|
|
vec2 rotatedPosition;
|
|
|
|
|
|
rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
|
|
|
|
|
|
rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
|
|
|
|
|
|
mvPosition.xy += rotatedPosition;
|
|
|
|
|
|
gl_Position = projectionMatrix * mvPosition;
|
|
|
|
|
|
#include <logdepthbuf_vertex>
|
|
|
|
|
|
#include <clipping_planes_vertex>
|
|
|
|
|
|
#include <fog_vertex>
|
|
|
|
|
|
}`,fragment$1=`uniform vec3 diffuse;
|
|
|
|
|
|
uniform float opacity;
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
#include <uv_pars_fragment>
|
|
|
|
|
|
#include <map_pars_fragment>
|
|
|
|
|
|
#include <alphamap_pars_fragment>
|
|
|
|
|
|
#include <alphatest_pars_fragment>
|
|
|
|
|
|
#include <alphahash_pars_fragment>
|
|
|
|
|
|
#include <fog_pars_fragment>
|
|
|
|
|
|
#include <logdepthbuf_pars_fragment>
|
|
|
|
|
|
#include <clipping_planes_pars_fragment>
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vec4 diffuseColor = vec4( diffuse, opacity );
|
|
|
|
|
|
#include <clipping_planes_fragment>
|
|
|
|
|
|
vec3 outgoingLight = vec3( 0.0 );
|
|
|
|
|
|
#include <logdepthbuf_fragment>
|
|
|
|
|
|
#include <map_fragment>
|
|
|
|
|
|
#include <alphamap_fragment>
|
|
|
|
|
|
#include <alphatest_fragment>
|
|
|
|
|
|
#include <alphahash_fragment>
|
|
|
|
|
|
outgoingLight = diffuseColor.rgb;
|
|
|
|
|
|
#include <opaque_fragment>
|
|
|
|
|
|
#include <tonemapping_fragment>
|
|
|
|
|
|
#include <colorspace_fragment>
|
|
|
|
|
|
#include <fog_fragment>
|
|
|
|
|
|
}`,ShaderChunk={alphahash_fragment,alphahash_pars_fragment,alphamap_fragment,alphamap_pars_fragment,alphatest_fragment,alphatest_pars_fragment,aomap_fragment,aomap_pars_fragment,batching_pars_vertex,batching_vertex,begin_vertex,beginnormal_vertex,bsdfs,iridescence_fragment,bumpmap_pars_fragment,clipping_planes_fragment,clipping_planes_pars_fragment,clipping_planes_pars_vertex,clipping_planes_vertex,color_fragment,color_pars_fragment,color_pars_vertex,color_vertex,common,cube_uv_reflection_fragment,defaultnormal_vertex,displacementmap_pars_vertex,displacementmap_vertex,emissivemap_fragment,emissivemap_pars_fragment,colorspace_fragment,colorspace_pars_fragment,envmap_fragment,envmap_common_pars_fragment,envmap_pars_fragment,envmap_pars_vertex,envmap_physical_pars_fragment,envmap_vertex,fog_vertex,fog_pars_vertex,fog_fragment,fog_pars_fragment,gradientmap_pars_fragment,lightmap_pars_fragment,lights_lambert_fragment,lights_lambert_pars_fragment,lights_pars_begin,lights_toon_fragment,lights_toon_pars_fragment,lights_phong_fragment,lights_phong_pars_fragment,lights_physical_fragment,lights_physical_pars_fragment,lights_fragment_begin,lights_fragment_maps,lights_fragment_end,logdepthbuf_fragment,logdepthbuf_pars_fragment,logdepthbuf_pars_vertex,logdepthbuf_vertex,map_fragment,map_pars_fragment,map_particle_fragment,map_particle_pars_fragment,metalnessmap_fragment,metalnessmap_pars_fragment,morphinstance_vertex,morphcolor_vertex,morphnormal_vertex,morphtarget_pars_vertex,morphtarget_vertex,normal_fragment_begin,normal_fragment_maps,normal_pars_fragment,normal_pars_vertex,normal_vertex,normalmap_pars_fragment,clearcoat_normal_fragment_begin,clearcoat_normal_fragment_maps,clearcoat_pars_fragment,iridescence_pars_fragment,opaque_fragment,packing,premultiplied_alpha_fragment,project_vertex,dithering_fragment,dithering_pars_fragment,roughnessmap_fragment,roughnessmap_pars_fragment,shadowmap_pars_fragment,shadowmap_pars_vertex,shadowmap_vertex,shadowmask_pars_fragment,skinbase_vertex,skinning_pars_vertex,skinning_vertex,skinnormal_vertex,specularmap_fragment,specularmap_pars_fragment,tonemapping_fragment,tonemapping_pars_fragment,transmission_fragment,transmission_pars_fragment,uv_pars_fragment,uv_pars_vertex,uv_vertex,worldpos_vertex,background_vert:vertex$h,background_frag:fragment$h,backgroundCube_vert:vertex$g,backgroundCube_frag:fragment$g,cube_vert:vertex$f,cube_frag:fragment$f,depth_vert:vertex$e,depth_frag:fragment$e,distance_vert:vertex$d,distance_frag:fragment$d,equirect_vert:vertex$c,equirect_frag:fragment$c,linedashed_vert:vertex$b,linedashed_frag:fragment$b,meshbasic_vert:vertex$a,meshbasic_frag:fragment$a,meshlambert_vert:vertex$9,meshlambert_frag:fragment$9,meshmatcap_vert:vertex$8,meshmatcap_frag:fragment$8,meshnormal_vert:vertex$7,meshnormal_frag:fragment$7,meshphong_vert:vertex$6,meshphong_frag:fragment$6,meshphysical_vert:vertex$5,meshphysical_frag:fragment$5,meshtoon_vert:vertex$4,meshtoon_frag:fragment$4,points_vert:vertex$3,points_frag:fragment$3,shadow_vert:vertex$2,shadow_frag:fragment$2,sprite_vert:vertex$1,sprite_frag:fragment$1},UniformsLib={common:{diffuse:{value:new Color(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Matrix3},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Matrix3}},envmap:{envMap:{value:null},envMapRotation:{value:new Matrix3},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Matrix3}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Matrix3}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Matrix3},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Matrix3},normalScale:{value:new Vector2(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Matrix3},displacementScale:{value:1},displacementBias:{value:0}},emissi
|
|
|
|
|
|
|
|
|
|
|
|
precision highp float;
|
|
|
|
|
|
precision highp int;
|
|
|
|
|
|
|
|
|
|
|
|
varying vec3 vOutputDirection;
|
|
|
|
|
|
|
|
|
|
|
|
uniform sampler2D envMap;
|
|
|
|
|
|
uniform float roughness;
|
|
|
|
|
|
uniform float mipInt;
|
|
|
|
|
|
|
|
|
|
|
|
#define ENVMAP_TYPE_CUBE_UV
|
|
|
|
|
|
#include <cube_uv_reflection_fragment>
|
|
|
|
|
|
|
|
|
|
|
|
#define PI 3.14159265359
|
|
|
|
|
|
|
|
|
|
|
|
// Van der Corput radical inverse
|
|
|
|
|
|
float radicalInverse_VdC(uint bits) {
|
|
|
|
|
|
bits = (bits << 16u) | (bits >> 16u);
|
|
|
|
|
|
bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u);
|
|
|
|
|
|
bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u);
|
|
|
|
|
|
bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u);
|
|
|
|
|
|
bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u);
|
|
|
|
|
|
return float(bits) * 2.3283064365386963e-10; // / 0x100000000
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Hammersley sequence
|
|
|
|
|
|
vec2 hammersley(uint i, uint N) {
|
|
|
|
|
|
return vec2(float(i) / float(N), radicalInverse_VdC(i));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// GGX VNDF importance sampling (Eric Heitz 2018)
|
|
|
|
|
|
// "Sampling the GGX Distribution of Visible Normals"
|
|
|
|
|
|
// https://jcgt.org/published/0007/04/01/
|
|
|
|
|
|
vec3 importanceSampleGGX_VNDF(vec2 Xi, vec3 V, float roughness) {
|
|
|
|
|
|
float alpha = roughness * roughness;
|
|
|
|
|
|
|
|
|
|
|
|
// Section 3.2: Transform view direction to hemisphere configuration
|
|
|
|
|
|
vec3 Vh = normalize(vec3(alpha * V.x, alpha * V.y, V.z));
|
|
|
|
|
|
|
|
|
|
|
|
// Section 4.1: Orthonormal basis
|
|
|
|
|
|
float lensq = Vh.x * Vh.x + Vh.y * Vh.y;
|
|
|
|
|
|
vec3 T1 = lensq > 0.0 ? vec3(-Vh.y, Vh.x, 0.0) / sqrt(lensq) : vec3(1.0, 0.0, 0.0);
|
|
|
|
|
|
vec3 T2 = cross(Vh, T1);
|
|
|
|
|
|
|
|
|
|
|
|
// Section 4.2: Parameterization of projected area
|
|
|
|
|
|
float r = sqrt(Xi.x);
|
|
|
|
|
|
float phi = 2.0 * PI * Xi.y;
|
|
|
|
|
|
float t1 = r * cos(phi);
|
|
|
|
|
|
float t2 = r * sin(phi);
|
|
|
|
|
|
float s = 0.5 * (1.0 + Vh.z);
|
|
|
|
|
|
t2 = (1.0 - s) * sqrt(1.0 - t1 * t1) + s * t2;
|
|
|
|
|
|
|
|
|
|
|
|
// Section 4.3: Reprojection onto hemisphere
|
|
|
|
|
|
vec3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * Vh;
|
|
|
|
|
|
|
|
|
|
|
|
// Section 3.4: Transform back to ellipsoid configuration
|
|
|
|
|
|
return normalize(vec3(alpha * Nh.x, alpha * Nh.y, max(0.0, Nh.z)));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vec3 N = normalize(vOutputDirection);
|
|
|
|
|
|
vec3 V = N; // Assume view direction equals normal for pre-filtering
|
|
|
|
|
|
|
|
|
|
|
|
vec3 prefilteredColor = vec3(0.0);
|
|
|
|
|
|
float totalWeight = 0.0;
|
|
|
|
|
|
|
|
|
|
|
|
// For very low roughness, just sample the environment directly
|
|
|
|
|
|
if (roughness < 0.001) {
|
|
|
|
|
|
gl_FragColor = vec4(bilinearCubeUV(envMap, N, mipInt), 1.0);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Tangent space basis for VNDF sampling
|
|
|
|
|
|
vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
|
|
|
|
|
|
vec3 tangent = normalize(cross(up, N));
|
|
|
|
|
|
vec3 bitangent = cross(N, tangent);
|
|
|
|
|
|
|
|
|
|
|
|
for(uint i = 0u; i < uint(GGX_SAMPLES); i++) {
|
|
|
|
|
|
vec2 Xi = hammersley(i, uint(GGX_SAMPLES));
|
|
|
|
|
|
|
|
|
|
|
|
// For PMREM, V = N, so in tangent space V is always (0, 0, 1)
|
|
|
|
|
|
vec3 H_tangent = importanceSampleGGX_VNDF(Xi, vec3(0.0, 0.0, 1.0), roughness);
|
|
|
|
|
|
|
|
|
|
|
|
// Transform H back to world space
|
|
|
|
|
|
vec3 H = normalize(tangent * H_tangent.x + bitangent * H_tangent.y + N * H_tangent.z);
|
|
|
|
|
|
vec3 L = normalize(2.0 * dot(V, H) * H - V);
|
|
|
|
|
|
|
|
|
|
|
|
float NdotL = max(dot(N, L), 0.0);
|
|
|
|
|
|
|
|
|
|
|
|
if(NdotL > 0.0) {
|
|
|
|
|
|
// Sample environment at fixed mip level
|
|
|
|
|
|
// VNDF importance sampling handles the distribution filtering
|
|
|
|
|
|
vec3 sampleColor = bilinearCubeUV(envMap, L, mipInt);
|
|
|
|
|
|
|
|
|
|
|
|
// Weight by NdotL for the split-sum approximation
|
|
|
|
|
|
// VNDF PDF naturally accounts for the visible microfacet distribution
|
|
|
|
|
|
prefilteredColor += sampleColor * NdotL;
|
|
|
|
|
|
totalWeight += NdotL;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (totalWeight > 0.0) {
|
|
|
|
|
|
prefilteredColor = prefilteredColor / totalWeight;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
gl_FragColor = vec4(prefilteredColor, 1.0);
|
|
|
|
|
|
}
|
|
|
|
|
|
`,blending:NoBlending,depthTest:!1,depthWrite:!1})}function _getBlurShader(n,t,r){const i=new Float32Array(MAX_SAMPLES),g=new Vector3(0,1,0);return new ShaderMaterial({name:"SphericalGaussianBlur",defines:{n:MAX_SAMPLES,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/r,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:g}},vertexShader:_getCommonVertexShader(),fragmentShader:`
|
|
|
|
|
|
|
|
|
|
|
|
precision mediump float;
|
|
|
|
|
|
precision mediump int;
|
|
|
|
|
|
|
|
|
|
|
|
varying vec3 vOutputDirection;
|
|
|
|
|
|
|
|
|
|
|
|
uniform sampler2D envMap;
|
|
|
|
|
|
uniform int samples;
|
|
|
|
|
|
uniform float weights[ n ];
|
|
|
|
|
|
uniform bool latitudinal;
|
|
|
|
|
|
uniform float dTheta;
|
|
|
|
|
|
uniform float mipInt;
|
|
|
|
|
|
uniform vec3 poleAxis;
|
|
|
|
|
|
|
|
|
|
|
|
#define ENVMAP_TYPE_CUBE_UV
|
|
|
|
|
|
#include <cube_uv_reflection_fragment>
|
|
|
|
|
|
|
|
|
|
|
|
vec3 getSample( float theta, vec3 axis ) {
|
|
|
|
|
|
|
|
|
|
|
|
float cosTheta = cos( theta );
|
|
|
|
|
|
// Rodrigues' axis-angle rotation
|
|
|
|
|
|
vec3 sampleDirection = vOutputDirection * cosTheta
|
|
|
|
|
|
+ cross( axis, vOutputDirection ) * sin( theta )
|
|
|
|
|
|
+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );
|
|
|
|
|
|
|
|
|
|
|
|
return bilinearCubeUV( envMap, sampleDirection, mipInt );
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
|
|
|
|
|
|
vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );
|
|
|
|
|
|
|
|
|
|
|
|
if ( all( equal( axis, vec3( 0.0 ) ) ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
axis = normalize( axis );
|
|
|
|
|
|
|
|
|
|
|
|
gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
|
|
|
|
|
|
gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );
|
|
|
|
|
|
|
|
|
|
|
|
for ( int i = 1; i < n; i++ ) {
|
|
|
|
|
|
|
|
|
|
|
|
if ( i >= samples ) {
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
float theta = dTheta * float( i );
|
|
|
|
|
|
gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
|
|
|
|
|
|
gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
`,blending:NoBlending,depthTest:!1,depthWrite:!1})}function _getEquirectMaterial(){return new ShaderMaterial({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:_getCommonVertexShader(),fragmentShader:`
|
|
|
|
|
|
|
|
|
|
|
|
precision mediump float;
|
|
|
|
|
|
precision mediump int;
|
|
|
|
|
|
|
|
|
|
|
|
varying vec3 vOutputDirection;
|
|
|
|
|
|
|
|
|
|
|
|
uniform sampler2D envMap;
|
|
|
|
|
|
|
|
|
|
|
|
#include <common>
|
|
|
|
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
|
|
|
|
|
|
vec3 outputDirection = normalize( vOutputDirection );
|
|
|
|
|
|
vec2 uv = equirectUv( outputDirection );
|
|
|
|
|
|
|
|
|
|
|
|
gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
`,blending:NoBlending,depthTest:!1,depthWrite:!1})}function _getCubemapMaterial(){return new ShaderMaterial({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:_getCommonVertexShader(),fragmentShader:`
|
|
|
|
|
|
|
|
|
|
|
|
precision mediump float;
|
|
|
|
|
|
precision mediump int;
|
|
|
|
|
|
|
|
|
|
|
|
uniform float flipEnvMap;
|
|
|
|
|
|
|
|
|
|
|
|
varying vec3 vOutputDirection;
|
|
|
|
|
|
|
|
|
|
|
|
uniform samplerCube envMap;
|
|
|
|
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
|
|
|
|
|
|
gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
`,blending:NoBlending,depthTest:!1,depthWrite:!1})}function _getCommonVertexShader(){return`
|
|
|
|
|
|
|
|
|
|
|
|
precision mediump float;
|
|
|
|
|
|
precision mediump int;
|
|
|
|
|
|
|
|
|
|
|
|
attribute float faceIndex;
|
|
|
|
|
|
|
|
|
|
|
|
varying vec3 vOutputDirection;
|
|
|
|
|
|
|
|
|
|
|
|
// RH coordinate system; PMREM face-indexing convention
|
|
|
|
|
|
vec3 getDirection( vec2 uv, float face ) {
|
|
|
|
|
|
|
|
|
|
|
|
uv = 2.0 * uv - 1.0;
|
|
|
|
|
|
|
|
|
|
|
|
vec3 direction = vec3( uv, 1.0 );
|
|
|
|
|
|
|
|
|
|
|
|
if ( face == 0.0 ) {
|
|
|
|
|
|
|
|
|
|
|
|
direction = direction.zyx; // ( 1, v, u ) pos x
|
|
|
|
|
|
|
|
|
|
|
|
} else if ( face == 1.0 ) {
|
|
|
|
|
|
|
|
|
|
|
|
direction = direction.xzy;
|
|
|
|
|
|
direction.xz *= -1.0; // ( -u, 1, -v ) pos y
|
|
|
|
|
|
|
|
|
|
|
|
} else if ( face == 2.0 ) {
|
|
|
|
|
|
|
|
|
|
|
|
direction.x *= -1.0; // ( -u, v, 1 ) pos z
|
|
|
|
|
|
|
|
|
|
|
|
} else if ( face == 3.0 ) {
|
|
|
|
|
|
|
|
|
|
|
|
direction = direction.zyx;
|
|
|
|
|
|
direction.xz *= -1.0; // ( -1, v, -u ) neg x
|
|
|
|
|
|
|
|
|
|
|
|
} else if ( face == 4.0 ) {
|
|
|
|
|
|
|
|
|
|
|
|
direction = direction.xzy;
|
|
|
|
|
|
direction.xy *= -1.0; // ( -u, -1, v ) neg y
|
|
|
|
|
|
|
|
|
|
|
|
} else if ( face == 5.0 ) {
|
|
|
|
|
|
|
|
|
|
|
|
direction.z *= -1.0; // ( u, v, -1 ) neg z
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return direction;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
|
|
|
|
|
|
vOutputDirection = getDirection( uv, faceIndex );
|
|
|
|
|
|
gl_Position = vec4( position, 1.0 );
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
`}function WebGLCubeUVMaps(n){let t=new WeakMap,r=null;function i(re){if(re&&re.isTexture){const ie=re.mapping,ae=ie===EquirectangularReflectionMapping||ie===EquirectangularRefractionMapping,oe=ie===CubeReflectionMapping||ie===CubeRefractionMapping;if(ae||oe){let le=t.get(re);const ue=le!==void 0?le.texture.pmremVersion:0;if(re.isRenderTargetTexture&&re.pmremVersion!==ue)return r===null&&(r=new PMREMGenerator(n)),le=ae?r.fromEquirectangular(re,le):r.fromCubemap(re,le),le.texture.pmremVersion=re.pmremVersion,t.set(re,le),le.texture;if(le!==void 0)return le.texture;{const de=re.image;return ae&&de&&de.height>0||oe&&de&&g(de)?(r===null&&(r=new PMREMGenerator(n)),le=ae?r.fromEquirectangular(re):r.fromCubemap(re),le.texture.pmremVersion=re.pmremVersion,t.set(re,le),re.addEventListener("dispose",$),le.texture):null}}}return re}function g(re){let ie=0;const ae=6;for(let oe=0;oe<ae;oe++)re[oe]!==void 0&&ie++;return ie===ae}function $(re){const ie=re.target;ie.removeEventListener("dispose",$);const ae=t.get(ie);ae!==void 0&&(t.delete(ie),ae.dispose())}function V(){t=new WeakMap,r!==null&&(r.dispose(),r=null)}return{get:i,dispose:V}}function WebGLExtensions(n){const t={};function r(i){if(t[i]!==void 0)return t[i];const g=n.getExtension(i);return t[i]=g,g}return{has:function(i){return r(i)!==null},init:function(){r("EXT_color_buffer_float"),r("WEBGL_clip_cull_distance"),r("OES_texture_float_linear"),r("EXT_color_buffer_half_float"),r("WEBGL_multisampled_render_to_texture"),r("WEBGL_render_shared_exponent")},get:function(i){const g=r(i);return g===null&&warnOnce("WebGLRenderer: "+i+" extension not supported."),g}}}function WebGLGeometries(n,t,r,i){const g={},$=new WeakMap;function V(le){const ue=le.target;ue.index!==null&&t.remove(ue.index);for(const he in ue.attributes)t.remove(ue.attributes[he]);ue.removeEventListener("dispose",V),delete g[ue.id];const de=$.get(ue);de&&(t.remove(de),$.delete(ue)),i.releaseStatesOfGeometry(ue),ue.isInstancedBufferGeometry===!0&&delete ue._maxInstanceCount,r.memory.geometries--}function re(le,ue){return g[ue.id]===!0||(ue.addEventListener("dispose",V),g[ue.id]=!0,r.memory.geometries++),ue}function ie(le){const ue=le.attributes;for(const de in ue)t.update(ue[de],n.ARRAY_BUFFER)}function ae(le){const ue=[],de=le.index,he=le.attributes.position;let pe=0;if(de!==null){const xe=de.array;pe=de.version;for(let Ie=0,Ne=xe.length;Ie<Ne;Ie+=3){const Oe=xe[Ie+0],$e=xe[Ie+1],Ve=xe[Ie+2];ue.push(Oe,$e,$e,Ve,Ve,Oe)}}else if(he!==void 0){const xe=he.array;pe=he.version;for(let Ie=0,Ne=xe.length/3-1;Ie<Ne;Ie+=3){const Oe=Ie+0,$e=Ie+1,Ve=Ie+2;ue.push(Oe,$e,$e,Ve,Ve,Oe)}}else return;const _e=new(arrayNeedsUint32(ue)?Uint32BufferAttribute:Uint16BufferAttribute)(ue,1);_e.version=pe;const Ce=$.get(le);Ce&&t.remove(Ce),$.set(le,_e)}function oe(le){const ue=$.get(le);if(ue){const de=le.index;de!==null&&ue.version<de.version&&ae(le)}else ae(le);return $.get(le)}return{get:re,update:ie,getWireframeAttribute:oe}}function WebGLIndexedBufferRenderer(n,t,r){let i;function g(ue){i=ue}let $,V;function re(ue){$=ue.type,V=ue.bytesPerElement}function ie(ue,de){n.drawElements(i,de,$,ue*V),r.update(de,i,1)}function ae(ue,de,he){he!==0&&(n.drawElementsInstanced(i,de,$,ue*V,he),r.update(de,i,he))}function oe(ue,de,he){if(he===0)return;t.get("WEBGL_multi_draw").multiDrawElementsWEBGL(i,de,0,$,ue,0,he);let _e=0;for(let Ce=0;Ce<he;Ce++)_e+=de[Ce];r.update(_e,i,1)}function le(ue,de,he,pe){if(he===0)return;const _e=t.get("WEBGL_multi_draw");if(_e===null)for(let Ce=0;Ce<ue.length;Ce++)ae(ue[Ce]/V,de[Ce],pe[Ce]);else{_e.multiDrawElementsInstancedWEBGL(i,de,0,$,ue,0,pe,0,he);let Ce=0;for(let xe=0;xe<he;xe++)Ce+=de[xe]*pe[xe];r.update(Ce,i,1)}}this.setMode=g,this.setIndex=re,this.render=ie,this.renderInstances=ae,this.renderMultiDraw=oe,this.renderMultiDrawInstances=le}function WebGLInfo(n){const t={geometries:0,textures:0},r={frame:0,calls:0,triangles:0,points:0,lines:0};function i($,V,re){switch(r.calls++,V){case n.TRIANGLES:r.triangles+=re*($/3);break;case n.LINES:r.lines+=re*($/2);break;case n.LINE_STRIP:r.lines+=re*($-1);break;case n.LINE
|
|
|
|
|
|
precision highp float;
|
|
|
|
|
|
|
|
|
|
|
|
uniform mat4 modelViewMatrix;
|
|
|
|
|
|
uniform mat4 projectionMatrix;
|
|
|
|
|
|
|
|
|
|
|
|
attribute vec3 position;
|
|
|
|
|
|
attribute vec2 uv;
|
|
|
|
|
|
|
|
|
|
|
|
varying vec2 vUv;
|
|
|
|
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vUv = uv;
|
|
|
|
|
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
|
|
|
|
}`,fragmentShader:`
|
|
|
|
|
|
precision highp float;
|
|
|
|
|
|
|
|
|
|
|
|
uniform sampler2D tDiffuse;
|
|
|
|
|
|
|
|
|
|
|
|
varying vec2 vUv;
|
|
|
|
|
|
|
|
|
|
|
|
#include <tonemapping_pars_fragment>
|
|
|
|
|
|
#include <colorspace_pars_fragment>
|
|
|
|
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
gl_FragColor = texture2D( tDiffuse, vUv );
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef LINEAR_TONE_MAPPING
|
|
|
|
|
|
gl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb );
|
|
|
|
|
|
#elif defined( REINHARD_TONE_MAPPING )
|
|
|
|
|
|
gl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb );
|
|
|
|
|
|
#elif defined( CINEON_TONE_MAPPING )
|
|
|
|
|
|
gl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb );
|
|
|
|
|
|
#elif defined( ACES_FILMIC_TONE_MAPPING )
|
|
|
|
|
|
gl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb );
|
|
|
|
|
|
#elif defined( AGX_TONE_MAPPING )
|
|
|
|
|
|
gl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb );
|
|
|
|
|
|
#elif defined( NEUTRAL_TONE_MAPPING )
|
|
|
|
|
|
gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb );
|
|
|
|
|
|
#elif defined( CUSTOM_TONE_MAPPING )
|
|
|
|
|
|
gl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef SRGB_TRANSFER
|
|
|
|
|
|
gl_FragColor = sRGBTransferOETF( gl_FragColor );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
}`,depthTest:!1,depthWrite:!1}),ae=new Mesh(re,ie),oe=new OrthographicCamera(-1,1,1,-1,0,1);let le=null,ue=null,de=!1,he,pe=null,_e=[],Ce=!1;this.setSize=function(xe,Ie){$.setSize(xe,Ie),V.setSize(xe,Ie);for(let Ne=0;Ne<_e.length;Ne++){const Oe=_e[Ne];Oe.setSize&&Oe.setSize(xe,Ie)}},this.setEffects=function(xe){_e=xe,Ce=_e.length>0&&_e[0].isRenderPass===!0;const Ie=$.width,Ne=$.height;for(let Oe=0;Oe<_e.length;Oe++){const $e=_e[Oe];$e.setSize&&$e.setSize(Ie,Ne)}},this.begin=function(xe,Ie){if(de||xe.toneMapping===NoToneMapping&&_e.length===0)return!1;if(pe=Ie,Ie!==null){const Ne=Ie.width,Oe=Ie.height;($.width!==Ne||$.height!==Oe)&&this.setSize(Ne,Oe)}return Ce===!1&&xe.setRenderTarget($),he=xe.toneMapping,xe.toneMapping=NoToneMapping,!0},this.hasRenderPass=function(){return Ce},this.end=function(xe,Ie){xe.toneMapping=he,de=!0;let Ne=$,Oe=V;for(let $e=0;$e<_e.length;$e++){const Ve=_e[$e];if(Ve.enabled!==!1&&(Ve.render(xe,Oe,Ne,Ie),Ve.needsSwap!==!1)){const Ue=Ne;Ne=Oe,Oe=Ue}}if(le!==xe.outputColorSpace||ue!==xe.toneMapping){le=xe.outputColorSpace,ue=xe.toneMapping,ie.defines={},ColorManagement.getTransfer(le)===SRGBTransfer&&(ie.defines.SRGB_TRANSFER="");const $e=toneMappingMap[ue];$e&&(ie.defines[$e]=""),ie.needsUpdate=!0}ie.uniforms.tDiffuse.value=Ne.texture,xe.setRenderTarget(pe),xe.render(ae,oe),pe=null,de=!1},this.isCompositing=function(){return de},this.dispose=function(){$.dispose(),V.dispose(),re.dispose(),ie.dispose()}}const emptyTexture=new Texture,emptyShadowTexture=new DepthTexture(1,1),emptyArrayTexture=new DataArrayTexture,empty3dTexture=new Data3DTexture,emptyCubeTexture=new CubeTexture,arrayCacheF32=[],arrayCacheI32=[],mat4array=new Float32Array(16),mat3array=new Float32Array(9),mat2array=new Float32Array(4);function flatten(n,t,r){const i=n[0];if(i<=0||i>0)return n;const g=t*r;let $=arrayCacheF32[g];if($===void 0&&($=new Float32Array(g),arrayCacheF32[g]=$),t!==0){i.toArray($,0);for(let V=1,re=0;V!==t;++V)re+=r,n[V].toArray($,re)}return $}function arraysEqual(n,t){if(n.length!==t.length)return!1;for(let r=0,i=n.length;r<i;r++)if(n[r]!==t[r])return!1;return!0}function copyArray(n,t){for(let r=0,i=t.length;r<i;r++)n[r]=t[r]}function allocTexUnits(n,t){let r=arrayCacheI32[t];r===void 0&&(r=new Int32Array(t),arrayCacheI32[t]=r);for(let i=0;i!==t;++i)r[i]=n.allocateTextureUnit();return r}function setValueV1f(n,t){const r=this.cache;r[0]!==t&&(n.uniform1f(this.addr,t),r[0]=t)}function setValueV2f(n,t){const r=this.cache;if(t.x!==void 0)(r[0]!==t.x||r[1]!==t.y)&&(n.uniform2f(this.addr,t.x,t.y),r[0]=t.x,r[1]=t.y);else{if(arraysEqual(r,t))return;n.uniform2fv(this.addr,t),copyArray(r,t)}}function setValueV3f(n,t){const r=this.cache;if(t.x!==void 0)(r[0]!==t.x||r[1]!==t.y||r[2]!==t.z)&&(n.uniform3f(this.addr,t.x,t.y,t.z),r[0]=t.x,r[1]=t.y,r[2]=t.z);else if(t.r!==void 0)(r[0]!==t.r||r[1]!==t.g||r[2]!==t.b)&&(n.uniform3f(this.addr,t.r,t.g,t.b),r[0]=t.r,r[1]=t.g,r[2]=t.b);else{if(arraysEqual(r,t))return;n.uniform3fv(this.addr,t),copyArray(r,t)}}function setValueV4f(n,t){const r=this.cache;if(t.x!==void 0)(r[0]!==t.x||r[1]!==t.y||r[2]!==t.z||r[3]!==t.w)&&(n.uniform4f(this.addr,t.x,t.y,t.z,t.w),r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=t.w);else{if(arraysEqual(r,t))return;n.uniform4fv(this.addr,t),copyArray(r,t)}}function setValueM2(n,t){const r=this.cache,i=t.elements;if(i===void 0){if(arraysEqual(r,t))return;n.uniformMatrix2fv(this.addr,!1,t),copyArray(r,t)}else{if(arraysEqual(r,i))return;mat2array.set(i),n.uniformMatrix2fv(this.addr,!1,mat2array),copyArray(r,i)}}function setValueM3(n,t){const r=this.cache,i=t.elements;if(i===void 0){if(arraysEqual(r,t))return;n.uniformMatrix3fv(this.addr,!1,t),copyArray(r,t)}else{if(arraysEqual(r,i))return;mat3array.set(i),n.uniformMatrix3fv(this.addr,!1,mat3array),copyArray(r,i)}}function setValueM4(n,t){const r=this.cache,i=t.elements;if(i===void 0){if(arraysEqual(r,t))return;n.uniformMatrix4fv(this.addr,!1,t),copyArray(r,t)}else{if(arraysEqual(r,i))return;mat4array.set(i),n.uniformMatrix4fv(this.addr,!1,mat4array),copyArray(r,i)}}function setValueV1i(n,t){const r=this.cache;r[0]!==t&&(n.u
|
|
|
|
|
|
`),i=[],g=Math.max(t-6,0),$=Math.min(t+6,r.length);for(let V=g;V<$;V++){const re=V+1;i.push(`${re===t?">":" "} ${re}: ${r[V]}`)}return i.join(`
|
|
|
|
|
|
`)}const _m0=new Matrix3;function getEncodingComponents(n){ColorManagement._getMatrix(_m0,ColorManagement.workingColorSpace,n);const t=`mat3( ${_m0.elements.map(r=>r.toFixed(4))} )`;switch(ColorManagement.getTransfer(n)){case LinearTransfer:return[t,"LinearTransferOETF"];case SRGBTransfer:return[t,"sRGBTransferOETF"];default:return warn("WebGLProgram: Unsupported color space: ",n),[t,"LinearTransferOETF"]}}function getShaderErrors(n,t,r){const i=n.getShaderParameter(t,n.COMPILE_STATUS),$=(n.getShaderInfoLog(t)||"").trim();if(i&&$==="")return"";const V=/ERROR: 0:(\d+)/.exec($);if(V){const re=parseInt(V[1]);return r.toUpperCase()+`
|
|
|
|
|
|
|
|
|
|
|
|
`+$+`
|
|
|
|
|
|
|
|
|
|
|
|
`+handleSource(n.getShaderSource(t),re)}else return $}function getTexelEncodingFunction(n,t){const r=getEncodingComponents(t);return[`vec4 ${n}( vec4 value ) {`,` return ${r[1]}( vec4( value.rgb * ${r[0]}, value.a ) );`,"}"].join(`
|
|
|
|
|
|
`)}const toneMappingFunctions={[LinearToneMapping]:"Linear",[ReinhardToneMapping]:"Reinhard",[CineonToneMapping]:"Cineon",[ACESFilmicToneMapping]:"ACESFilmic",[AgXToneMapping]:"AgX",[NeutralToneMapping]:"Neutral",[CustomToneMapping]:"Custom"};function getToneMappingFunction(n,t){const r=toneMappingFunctions[t];return r===void 0?(warn("WebGLProgram: Unsupported toneMapping:",t),"vec3 "+n+"( vec3 color ) { return LinearToneMapping( color ); }"):"vec3 "+n+"( vec3 color ) { return "+r+"ToneMapping( color ); }"}const _v0$1=new Vector3;function getLuminanceFunction(){ColorManagement.getLuminanceCoefficients(_v0$1);const n=_v0$1.x.toFixed(4),t=_v0$1.y.toFixed(4),r=_v0$1.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${n}, ${t}, ${r} );`," return dot( weights, rgb );","}"].join(`
|
|
|
|
|
|
`)}function generateVertexExtensions(n){return[n.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",n.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(filterEmptyLine).join(`
|
|
|
|
|
|
`)}function generateDefines(n){const t=[];for(const r in n){const i=n[r];i!==!1&&t.push("#define "+r+" "+i)}return t.join(`
|
|
|
|
|
|
`)}function fetchAttributeLocations(n,t){const r={},i=n.getProgramParameter(t,n.ACTIVE_ATTRIBUTES);for(let g=0;g<i;g++){const $=n.getActiveAttrib(t,g),V=$.name;let re=1;$.type===n.FLOAT_MAT2&&(re=2),$.type===n.FLOAT_MAT3&&(re=3),$.type===n.FLOAT_MAT4&&(re=4),r[V]={type:$.type,location:n.getAttribLocation(t,V),locationSize:re}}return r}function filterEmptyLine(n){return n!==""}function replaceLightNums(n,t){const r=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return n.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,r).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 replaceClippingPlaneNums(n,t){return n.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const includePattern=/^[ \t]*#include +<([\w\d./]+)>/gm;function resolveIncludes(n){return n.replace(includePattern,includeReplacer)}const shaderChunkMap=new Map;function includeReplacer(n,t){let r=ShaderChunk[t];if(r===void 0){const i=shaderChunkMap.get(t);if(i!==void 0)r=ShaderChunk[i],warn('WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,i);else throw new Error("Can not resolve #include <"+t+">")}return resolveIncludes(r)}const unrollLoopPattern=/#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 unrollLoops(n){return n.replace(unrollLoopPattern,loopReplacer)}function loopReplacer(n,t,r,i){let g="";for(let $=parseInt(t);$<parseInt(r);$++)g+=i.replace(/\[\s*i\s*\]/g,"[ "+$+" ]").replace(/UNROLLED_LOOP_INDEX/g,$);return g}function generatePrecision(n){let t=`precision ${n.precision} float;
|
|
|
|
|
|
precision ${n.precision} int;
|
|
|
|
|
|
precision ${n.precision} sampler2D;
|
|
|
|
|
|
precision ${n.precision} samplerCube;
|
|
|
|
|
|
precision ${n.precision} sampler3D;
|
|
|
|
|
|
precision ${n.precision} sampler2DArray;
|
|
|
|
|
|
precision ${n.precision} sampler2DShadow;
|
|
|
|
|
|
precision ${n.precision} samplerCubeShadow;
|
|
|
|
|
|
precision ${n.precision} sampler2DArrayShadow;
|
|
|
|
|
|
precision ${n.precision} isampler2D;
|
|
|
|
|
|
precision ${n.precision} isampler3D;
|
|
|
|
|
|
precision ${n.precision} isamplerCube;
|
|
|
|
|
|
precision ${n.precision} isampler2DArray;
|
|
|
|
|
|
precision ${n.precision} usampler2D;
|
|
|
|
|
|
precision ${n.precision} usampler3D;
|
|
|
|
|
|
precision ${n.precision} usamplerCube;
|
|
|
|
|
|
precision ${n.precision} usampler2DArray;
|
|
|
|
|
|
`;return n.precision==="highp"?t+=`
|
|
|
|
|
|
#define HIGH_PRECISION`:n.precision==="mediump"?t+=`
|
|
|
|
|
|
#define MEDIUM_PRECISION`:n.precision==="lowp"&&(t+=`
|
|
|
|
|
|
#define LOW_PRECISION`),t}const shadowMapTypeDefines={[PCFShadowMap]:"SHADOWMAP_TYPE_PCF",[VSMShadowMap]:"SHADOWMAP_TYPE_VSM"};function generateShadowMapTypeDefine(n){return shadowMapTypeDefines[n.shadowMapType]||"SHADOWMAP_TYPE_BASIC"}const envMapTypeDefines={[CubeReflectionMapping]:"ENVMAP_TYPE_CUBE",[CubeRefractionMapping]:"ENVMAP_TYPE_CUBE",[CubeUVReflectionMapping]:"ENVMAP_TYPE_CUBE_UV"};function generateEnvMapTypeDefine(n){return n.envMap===!1?"ENVMAP_TYPE_CUBE":envMapTypeDefines[n.envMapMode]||"ENVMAP_TYPE_CUBE"}const envMapModeDefines={[CubeRefractionMapping]:"ENVMAP_MODE_REFRACTION"};function generateEnvMapModeDefine(n){return n.envMap===!1?"ENVMAP_MODE_REFLECTION":envMapModeDefines[n.envMapMode]||"ENVMAP_MODE_REFLECTION"}const envMapBlendingDefines={[MultiplyOperation]:"ENVMAP_BLENDING_MULTIPLY",[MixOperation]:"ENVMAP_BLENDING_MIX",[AddOperation]:"ENVMAP_BLENDING_ADD"};function generateEnvMapBlendingDefine(n){return n.envMap===!1?"ENVMAP_BLENDING_NONE":envMapBlendingDefines[n.combine]||"ENVMAP_BLENDING_NONE"}function generateCubeUVSize(n){const t=n.envMapCubeUVHeight;if(t===null)return null;const r=Math.log2(t)-2,i=1/t;return{texelWidth:1/(3*Math.max(Math.pow(2,r),7*16)),texelHeight:i,maxMip:r}}function WebGLProgram(n,t,r,i){const g=n.getContext(),$=r.defines;let V=r.vertexShader,re=r.fragmentShader;const ie=generateShadowMapTypeDefine(r),ae=generateEnvMapTypeDefine(r),oe=generateEnvMapModeDefine(r),le=generateEnvMapBlendingDefine(r),ue=generateCubeUVSize(r),de=generateVertexExtensions(r),he=generateDefines($),pe=g.createProgram();let _e,Ce,xe=r.glslVersion?"#version "+r.glslVersion+`
|
|
|
|
|
|
`:"";r.isRawShaderMaterial?(_e=["#define SHADER_TYPE "+r.shaderType,"#define SHADER_NAME "+r.shaderName,he].filter(filterEmptyLine).join(`
|
|
|
|
|
|
`),_e.length>0&&(_e+=`
|
|
|
|
|
|
`),Ce=["#define SHADER_TYPE "+r.shaderType,"#define SHADER_NAME "+r.shaderName,he].filter(filterEmptyLine).join(`
|
|
|
|
|
|
`),Ce.length>0&&(Ce+=`
|
|
|
|
|
|
`)):(_e=[generatePrecision(r),"#define SHADER_TYPE "+r.shaderType,"#define SHADER_NAME "+r.shaderName,he,r.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",r.batching?"#define USE_BATCHING":"",r.batchingColor?"#define USE_BATCHING_COLOR":"",r.instancing?"#define USE_INSTANCING":"",r.instancingColor?"#define USE_INSTANCING_COLOR":"",r.instancingMorph?"#define USE_INSTANCING_MORPH":"",r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp2?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+oe:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",r.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",r.displacementMap?"#define USE_DISPLACEMENTMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.anisotropy?"#define USE_ANISOTROPY":"",r.anisotropyMap?"#define USE_ANISOTROPYMAP":"",r.clearcoatMap?"#define USE_CLEARCOATMAP":"",r.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",r.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",r.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",r.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",r.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.alphaHash?"#define USE_ALPHAHASH":"",r.transmission?"#define USE_TRANSMISSION":"",r.transmissionMap?"#define USE_TRANSMISSIONMAP":"",r.thicknessMap?"#define USE_THICKNESSMAP":"",r.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",r.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",r.mapUv?"#define MAP_UV "+r.mapUv:"",r.alphaMapUv?"#define ALPHAMAP_UV "+r.alphaMapUv:"",r.lightMapUv?"#define LIGHTMAP_UV "+r.lightMapUv:"",r.aoMapUv?"#define AOMAP_UV "+r.aoMapUv:"",r.emissiveMapUv?"#define EMISSIVEMAP_UV "+r.emissiveMapUv:"",r.bumpMapUv?"#define BUMPMAP_UV "+r.bumpMapUv:"",r.normalMapUv?"#define NORMALMAP_UV "+r.normalMapUv:"",r.displacementMapUv?"#define DISPLACEMENTMAP_UV "+r.displacementMapUv:"",r.metalnessMapUv?"#define METALNESSMAP_UV "+r.metalnessMapUv:"",r.roughnessMapUv?"#define ROUGHNESSMAP_UV "+r.roughnessMapUv:"",r.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+r.anisotropyMapUv:"",r.clearcoatMapUv?"#define CLEARCOATMAP_UV "+r.clearcoatMapUv:"",r.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+r.clearcoatNormalMapUv:"",r.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+r.clearcoatRoughnessMapUv:"",r.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+r.iridescenceMapUv:"",r.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+r.iridescenceThicknessMapUv:"",r.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+r.sheenColorMapUv:"",r.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+r.sheenRoughnessMapUv:"",r.specularMapUv?"#define SPECULARMAP_UV "+r.specularMapUv:"",r.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+r.specularColorMapUv:"",r.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+r.specularIntensityMapUv:"",r.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+r.transmissionMapUv:"",r.thicknessMapUv?"#define THICKNESSMAP_UV "+r.thicknessMapUv:"",r.vertexTangents&&r.flatShading===!1?"#define USE_TANGENT":"",r.vertexColors?"#define USE_COLOR":"",r.vertexAlphas?"#define USE_COLOR_ALPHA":"",r.vertexUv1s?"#define USE_UV1":"",r.vertexUv2s?"#define USE_UV2":"",r.vertexUv3s?"#define USE_UV3":"",r.pointsUvs?"#define USE_POINTS_UV":"",r.flatShading?"#define FLAT_SHADED":"",r.skinning?"#define USE_SKINNING":"",r.morphTargets?"#define USE_MORPHTARGETS":"",r.morphNormals&&r.flatShading===!1?"#define USE_MORPHNORMALS":"",r.morphColors?"#define USE_MORPHCOLORS":"",r.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+r.morphTextureStride:"",r.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+r.morphTargetsCount:"",r.doubleSided?"#define
|
|
|
|
|
|
`].filter(filterEmptyLine).join(`
|
|
|
|
|
|
`),Ce=[generatePrecision(r),"#define SHADER_TYPE "+r.shaderType,"#define SHADER_NAME "+r.shaderName,he,r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp2?"#define FOG_EXP2":"",r.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",r.map?"#define USE_MAP":"",r.matcap?"#define USE_MATCAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+ae:"",r.envMap?"#define "+oe:"",r.envMap?"#define "+le:"",ue?"#define CUBEUV_TEXEL_WIDTH "+ue.texelWidth:"",ue?"#define CUBEUV_TEXEL_HEIGHT "+ue.texelHeight:"",ue?"#define CUBEUV_MAX_MIP "+ue.maxMip+".0":"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",r.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.anisotropy?"#define USE_ANISOTROPY":"",r.anisotropyMap?"#define USE_ANISOTROPYMAP":"",r.clearcoat?"#define USE_CLEARCOAT":"",r.clearcoatMap?"#define USE_CLEARCOATMAP":"",r.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",r.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",r.dispersion?"#define USE_DISPERSION":"",r.iridescence?"#define USE_IRIDESCENCE":"",r.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",r.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",r.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.alphaTest?"#define USE_ALPHATEST":"",r.alphaHash?"#define USE_ALPHAHASH":"",r.sheen?"#define USE_SHEEN":"",r.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",r.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",r.transmission?"#define USE_TRANSMISSION":"",r.transmissionMap?"#define USE_TRANSMISSIONMAP":"",r.thicknessMap?"#define USE_THICKNESSMAP":"",r.vertexTangents&&r.flatShading===!1?"#define USE_TANGENT":"",r.vertexColors||r.instancingColor||r.batchingColor?"#define USE_COLOR":"",r.vertexAlphas?"#define USE_COLOR_ALPHA":"",r.vertexUv1s?"#define USE_UV1":"",r.vertexUv2s?"#define USE_UV2":"",r.vertexUv3s?"#define USE_UV3":"",r.pointsUvs?"#define USE_POINTS_UV":"",r.gradientMap?"#define USE_GRADIENTMAP":"",r.flatShading?"#define FLAT_SHADED":"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+ie:"",r.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",r.numLightProbes>0?"#define USE_LIGHT_PROBES":"",r.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",r.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",r.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",r.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",r.toneMapping!==NoToneMapping?"#define TONE_MAPPING":"",r.toneMapping!==NoToneMapping?ShaderChunk.tonemapping_pars_fragment:"",r.toneMapping!==NoToneMapping?getToneMappingFunction("toneMapping",r.toneMapping):"",r.dithering?"#define DITHERING":"",r.opaque?"#define OPAQUE":"",ShaderChunk.colorspace_pars_fragment,getTexelEncodingFunction("linearToOutputTexel",r.outputColorSpace),getLuminanceFunction(),r.useDepthPacking?"#define DEPTH_PACKING "+r.depthPacking:"",`
|
|
|
|
|
|
`].filter(filterEmptyLine).join(`
|
|
|
|
|
|
`)),V=resolveIncludes(V),V=replaceLightNums(V,r),V=replaceClippingPlaneNums(V,r),re=resolveIncludes(re),re=replaceLightNums(re,r),re=replaceClippingPlaneNums(re,r),V=unrollLoops(V),re=unrollLoops(re),r.isRawShaderMaterial!==!0&&(xe=`#version 300 es
|
|
|
|
|
|
`,_e=[de,"#define attribute in","#define varying out","#define texture2D texture"].join(`
|
|
|
|
|
|
`)+`
|
|
|
|
|
|
`+_e,Ce=["#define varying in",r.glslVersion===GLSL3?"":"layout(location = 0) out highp vec4 pc_fragColor;",r.glslVersion===GLSL3?"":"#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(`
|
|
|
|
|
|
`)+`
|
|
|
|
|
|
`+Ce);const Ie=xe+_e+V,Ne=xe+Ce+re,Oe=WebGLShader(g,g.VERTEX_SHADER,Ie),$e=WebGLShader(g,g.FRAGMENT_SHADER,Ne);g.attachShader(pe,Oe),g.attachShader(pe,$e),r.index0AttributeName!==void 0?g.bindAttribLocation(pe,0,r.index0AttributeName):r.morphTargets===!0&&g.bindAttribLocation(pe,0,"position"),g.linkProgram(pe);function Ve(Pt){if(n.debug.checkShaderErrors){const qe=g.getProgramInfoLog(pe)||"",Et=g.getShaderInfoLog(Oe)||"",kt=g.getShaderInfoLog($e)||"",At=qe.trim(),Dt=Et.trim(),Lt=kt.trim();let jt=!0,hn=!0;if(g.getProgramParameter(pe,g.LINK_STATUS)===!1)if(jt=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(g,pe,Oe,$e);else{const vn=getShaderErrors(g,Oe,"vertex"),_n=getShaderErrors(g,$e,"fragment");error("THREE.WebGLProgram: Shader Error "+g.getError()+" - VALIDATE_STATUS "+g.getProgramParameter(pe,g.VALIDATE_STATUS)+`
|
|
|
|
|
|
|
|
|
|
|
|
Material Name: `+Pt.name+`
|
|
|
|
|
|
Material Type: `+Pt.type+`
|
|
|
|
|
|
|
|
|
|
|
|
Program Info Log: `+At+`
|
|
|
|
|
|
`+vn+`
|
|
|
|
|
|
`+_n)}else At!==""?warn("WebGLProgram: Program Info Log:",At):(Dt===""||Lt==="")&&(hn=!1);hn&&(Pt.diagnostics={runnable:jt,programLog:At,vertexShader:{log:Dt,prefix:_e},fragmentShader:{log:Lt,prefix:Ce}})}g.deleteShader(Oe),g.deleteShader($e),Ue=new WebGLUniforms(g,pe),Fe=fetchAttributeLocations(g,pe)}let Ue;this.getUniforms=function(){return Ue===void 0&&Ve(this),Ue};let Fe;this.getAttributes=function(){return Fe===void 0&&Ve(this),Fe};let ze=r.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return ze===!1&&(ze=g.getProgramParameter(pe,COMPLETION_STATUS_KHR)),ze},this.destroy=function(){i.releaseStatesOfProgram(this),g.deleteProgram(pe),this.program=void 0},this.type=r.shaderType,this.name=r.shaderName,this.id=programIdCount++,this.cacheKey=t,this.usedTimes=1,this.program=pe,this.vertexShader=Oe,this.fragmentShader=$e,this}let _id=0;class WebGLShaderCache{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){const r=t.vertexShader,i=t.fragmentShader,g=this._getShaderStage(r),$=this._getShaderStage(i),V=this._getShaderCacheForMaterial(t);return V.has(g)===!1&&(V.add(g),g.usedTimes++),V.has($)===!1&&(V.add($),$.usedTimes++),this}remove(t){const r=this.materialCache.get(t);for(const i of r)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){const r=this.materialCache;let i=r.get(t);return i===void 0&&(i=new Set,r.set(t,i)),i}_getShaderStage(t){const r=this.shaderCache;let i=r.get(t);return i===void 0&&(i=new WebGLShaderStage(t),r.set(t,i)),i}}class WebGLShaderStage{constructor(t){this.id=_id++,this.code=t,this.usedTimes=0}}function WebGLPrograms(n,t,r,i,g,$,V){const re=new Layers,ie=new WebGLShaderCache,ae=new Set,oe=[],le=new Map,ue=g.logarithmicDepthBuffer;let de=g.precision;const he={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distance",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 pe(Fe){return ae.add(Fe),Fe===0?"uv":`uv${Fe}`}function _e(Fe,ze,Pt,qe,Et){const kt=qe.fog,At=Et.geometry,Dt=Fe.isMeshStandardMaterial?qe.environment:null,Lt=(Fe.isMeshStandardMaterial?r:t).get(Fe.envMap||Dt),jt=Lt&&Lt.mapping===CubeUVReflectionMapping?Lt.image.height:null,hn=he[Fe.type];Fe.precision!==null&&(de=g.getMaxPrecision(Fe.precision),de!==Fe.precision&&warn("WebGLProgram.getParameters:",Fe.precision,"not supported, using",de,"instead."));const vn=At.morphAttributes.position||At.morphAttributes.normal||At.morphAttributes.color,_n=vn!==void 0?vn.length:0;let wn=0;At.morphAttributes.position!==void 0&&(wn=1),At.morphAttributes.normal!==void 0&&(wn=2),At.morphAttributes.color!==void 0&&(wn=3);let bn,Cn,Sn,Tn;if(hn){const fr=ShaderLib[hn];bn=fr.vertexShader,Cn=fr.fragmentShader}else bn=Fe.vertexShader,Cn=Fe.fragmentShader,ie.update(Fe),Sn=ie.getVertexShaderID(Fe),Tn=ie.getFragmentShaderID(Fe);const En=n.getRenderTarget(),kn=n.state.buffers.depth.getReversed(),$n=Et.isInstancedMesh===!0,An=Et.isBatchedMesh===!0,xn=!!Fe.map,Ln=!!Fe.matcap,Nn=!!Lt,Pn=!!Fe.aoMap,On=!!Fe.lightMap,Hn=!!Fe.bumpMap,Xn=!!Fe.normalMap,In=!!Fe.displacementMap,or=!!Fe.emissiveMap,Qn=!!Fe.metalnessMap,Zn=!!Fe.roughnessMap,Gn=Fe.anisotropy>0,Rn=Fe.clearcoat>0,Mn=Fe.dispersion>0,Bn=Fe.iridescence>0,qn=Fe.sheen>0,zn=Fe.transmission>0,jn=Gn&&!!Fe.anisotropyMap,tr=Rn&&!!Fe.clearcoatMap,hr=Rn&&!!Fe.clearcoatNormalMap,ir=Rn&&!!Fe.clearcoatRoughnessMap,pr=Bn&&!!Fe.iridescenceMap,rr=Bn&&!!Fe.iridescenceThicknessMap,lr=qn&&!!Fe.sheenColorMap,Yn=qn&&!!Fe.sheenRoughnessMap,er=!!Fe.specularMap,Fn=!!Fe.specularColorMap,cr=!!Fe.specularInte
|
|
|
|
|
|
gl_Position = vec4( position, 1.0 );
|
|
|
|
|
|
}`,fragment=`uniform sampler2D shadow_pass;
|
|
|
|
|
|
uniform vec2 resolution;
|
|
|
|
|
|
uniform float radius;
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
const float samples = float( VSM_SAMPLES );
|
|
|
|
|
|
float mean = 0.0;
|
|
|
|
|
|
float squared_mean = 0.0;
|
|
|
|
|
|
float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );
|
|
|
|
|
|
float uvStart = samples <= 1.0 ? 0.0 : - 1.0;
|
|
|
|
|
|
for ( float i = 0.0; i < samples; i ++ ) {
|
|
|
|
|
|
float uvOffset = uvStart + i * uvStride;
|
|
|
|
|
|
#ifdef HORIZONTAL_PASS
|
|
|
|
|
|
vec2 distribution = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ).rg;
|
|
|
|
|
|
mean += distribution.x;
|
|
|
|
|
|
squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;
|
|
|
|
|
|
#else
|
|
|
|
|
|
float depth = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ).r;
|
|
|
|
|
|
mean += depth;
|
|
|
|
|
|
squared_mean += depth * depth;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
}
|
|
|
|
|
|
mean = mean / samples;
|
|
|
|
|
|
squared_mean = squared_mean / samples;
|
|
|
|
|
|
float std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) );
|
|
|
|
|
|
gl_FragColor = vec4( mean, std_dev, 0.0, 1.0 );
|
|
|
|
|
|
}`,_cubeDirections=[new Vector3(1,0,0),new Vector3(-1,0,0),new Vector3(0,1,0),new Vector3(0,-1,0),new Vector3(0,0,1),new Vector3(0,0,-1)],_cubeUps=[new Vector3(0,-1,0),new Vector3(0,-1,0),new Vector3(0,0,1),new Vector3(0,0,-1),new Vector3(0,-1,0),new Vector3(0,-1,0)],_projScreenMatrix=new Matrix4,_lightPositionWorld=new Vector3,_lookTarget=new Vector3;function WebGLShadowMap(n,t,r){let i=new Frustum;const g=new Vector2,$=new Vector2,V=new Vector4,re=new MeshDepthMaterial,ie=new MeshDistanceMaterial,ae={},oe=r.maxTextureSize,le={[FrontSide]:BackSide,[BackSide]:FrontSide,[DoubleSide]:DoubleSide},ue=new ShaderMaterial({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Vector2},radius:{value:4}},vertexShader:vertex,fragmentShader:fragment}),de=ue.clone();de.defines.HORIZONTAL_PASS=1;const he=new BufferGeometry;he.setAttribute("position",new BufferAttribute(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const pe=new Mesh(he,ue),_e=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=PCFShadowMap;let Ce=this.type;this.render=function($e,Ve,Ue){if(_e.enabled===!1||_e.autoUpdate===!1&&_e.needsUpdate===!1||$e.length===0)return;$e.type===PCFSoftShadowMap&&(warn("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."),$e.type=PCFShadowMap);const Fe=n.getRenderTarget(),ze=n.getActiveCubeFace(),Pt=n.getActiveMipmapLevel(),qe=n.state;qe.setBlending(NoBlending),qe.buffers.depth.getReversed()===!0?qe.buffers.color.setClear(0,0,0,0):qe.buffers.color.setClear(1,1,1,1),qe.buffers.depth.setTest(!0),qe.setScissorTest(!1);const Et=Ce!==this.type;Et&&Ve.traverse(function(kt){kt.material&&(Array.isArray(kt.material)?kt.material.forEach(At=>At.needsUpdate=!0):kt.material.needsUpdate=!0)});for(let kt=0,At=$e.length;kt<At;kt++){const Dt=$e[kt],Lt=Dt.shadow;if(Lt===void 0){warn("WebGLShadowMap:",Dt,"has no shadow.");continue}if(Lt.autoUpdate===!1&&Lt.needsUpdate===!1)continue;g.copy(Lt.mapSize);const jt=Lt.getFrameExtents();if(g.multiply(jt),$.copy(Lt.mapSize),(g.x>oe||g.y>oe)&&(g.x>oe&&($.x=Math.floor(oe/jt.x),g.x=$.x*jt.x,Lt.mapSize.x=$.x),g.y>oe&&($.y=Math.floor(oe/jt.y),g.y=$.y*jt.y,Lt.mapSize.y=$.y)),Lt.map===null||Et===!0){if(Lt.map!==null&&(Lt.map.depthTexture!==null&&(Lt.map.depthTexture.dispose(),Lt.map.depthTexture=null),Lt.map.dispose()),this.type===VSMShadowMap){if(Dt.isPointLight){warn("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");continue}Lt.map=new WebGLRenderTarget(g.x,g.y,{format:RGFormat,type:HalfFloatType,minFilter:LinearFilter,magFilter:LinearFilter,generateMipmaps:!1}),Lt.map.texture.name=Dt.name+".shadowMap",Lt.map.depthTexture=new DepthTexture(g.x,g.y,FloatType),Lt.map.depthTexture.name=Dt.name+".shadowMapDepth",Lt.map.depthTexture.format=DepthFormat,Lt.map.depthTexture.compareFunction=null,Lt.map.depthTexture.minFilter=NearestFilter,Lt.map.depthTexture.magFilter=NearestFilter}else{Dt.isPointLight?(Lt.map=new WebGLCubeRenderTarget(g.x),Lt.map.depthTexture=new CubeDepthTexture(g.x,UnsignedIntType)):(Lt.map=new WebGLRenderTarget(g.x,g.y),Lt.map.depthTexture=new DepthTexture(g.x,g.y,UnsignedIntType)),Lt.map.depthTexture.name=Dt.name+".shadowMap",Lt.map.depthTexture.format=DepthFormat;const vn=n.state.buffers.depth.getReversed();this.type===PCFShadowMap?(Lt.map.depthTexture.compareFunction=vn?GreaterEqualCompare:LessEqualCompare,Lt.map.depthTexture.minFilter=LinearFilter,Lt.map.depthTexture.magFilter=LinearFilter):(Lt.map.depthTexture.compareFunction=null,Lt.map.depthTexture.minFilter=NearestFilter,Lt.map.depthTexture.magFilter=NearestFilter)}Lt.camera.updateProjectionMatrix()}const hn=Lt.map.isWebGLCubeRenderTarget?6:1;for(let vn=0;vn<hn;vn++){if(Lt.map.isWebGLCubeRenderTarget)n.setRenderTarget(Lt.map,vn),n.clear();else{vn===0&&(n.setRenderTarget(Lt.map),n.clear());const _n=Lt.getViewport(vn);V.set($.x*_n.x,$.y*_n.y,$.x*_n.z,$.y*_n.w),qe.viewport(V)}if(Dt.isPointLight){const _n=Lt.camera,wn=Lt.matrix,bn=Dt.distance||_n.far;bn!==_n.far&&(_n.far=bn,_n.updateProjectionMatrix()),_lightPositionWorl
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
|
|
|
|
|
|
gl_Position = vec4( position, 1.0 );
|
|
|
|
|
|
|
|
|
|
|
|
}`,_occlusion_fragment=`
|
|
|
|
|
|
uniform sampler2DArray depthColor;
|
|
|
|
|
|
uniform float depthWidth;
|
|
|
|
|
|
uniform float depthHeight;
|
|
|
|
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
|
|
|
|
|
|
vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );
|
|
|
|
|
|
|
|
|
|
|
|
if ( coord.x >= 1.0 ) {
|
|
|
|
|
|
|
|
|
|
|
|
gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}`;class WebXRDepthSensing{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,r){if(this.texture===null){const i=new ExternalTexture(t.texture);(t.depthNear!==r.depthNear||t.depthFar!==r.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=i}}getMesh(t){if(this.texture!==null&&this.mesh===null){const r=t.cameras[0].viewport,i=new ShaderMaterial({vertexShader:_occlusion_vertex,fragmentShader:_occlusion_fragment,uniforms:{depthColor:{value:this.texture},depthWidth:{value:r.z},depthHeight:{value:r.w}}});this.mesh=new Mesh(new PlaneGeometry(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class WebXRManager extends EventDispatcher{constructor(t,r){super();const i=this;let g=null,$=1,V=null,re="local-floor",ie=1,ae=null,oe=null,le=null,ue=null,de=null,he=null;const pe=typeof XRWebGLBinding<"u",_e=new WebXRDepthSensing,Ce={},xe=r.getContextAttributes();let Ie=null,Ne=null;const Oe=[],$e=[],Ve=new Vector2;let Ue=null;const Fe=new PerspectiveCamera;Fe.viewport=new Vector4;const ze=new PerspectiveCamera;ze.viewport=new Vector4;const Pt=[Fe,ze],qe=new ArrayCamera;let Et=null,kt=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(Tn){let En=Oe[Tn];return En===void 0&&(En=new WebXRController,Oe[Tn]=En),En.getTargetRaySpace()},this.getControllerGrip=function(Tn){let En=Oe[Tn];return En===void 0&&(En=new WebXRController,Oe[Tn]=En),En.getGripSpace()},this.getHand=function(Tn){let En=Oe[Tn];return En===void 0&&(En=new WebXRController,Oe[Tn]=En),En.getHandSpace()};function At(Tn){const En=$e.indexOf(Tn.inputSource);if(En===-1)return;const kn=Oe[En];kn!==void 0&&(kn.update(Tn.inputSource,Tn.frame,ae||V),kn.dispatchEvent({type:Tn.type,data:Tn.inputSource}))}function Dt(){g.removeEventListener("select",At),g.removeEventListener("selectstart",At),g.removeEventListener("selectend",At),g.removeEventListener("squeeze",At),g.removeEventListener("squeezestart",At),g.removeEventListener("squeezeend",At),g.removeEventListener("end",Dt),g.removeEventListener("inputsourceschange",Lt);for(let Tn=0;Tn<Oe.length;Tn++){const En=$e[Tn];En!==null&&($e[Tn]=null,Oe[Tn].disconnect(En))}Et=null,kt=null,_e.reset();for(const Tn in Ce)delete Ce[Tn];t.setRenderTarget(Ie),de=null,ue=null,le=null,g=null,Ne=null,Sn.stop(),i.isPresenting=!1,t.setPixelRatio(Ue),t.setSize(Ve.width,Ve.height,!1),i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(Tn){$=Tn,i.isPresenting===!0&&warn("WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(Tn){re=Tn,i.isPresenting===!0&&warn("WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return ae||V},this.setReferenceSpace=function(Tn){ae=Tn},this.getBaseLayer=function(){return ue!==null?ue:de},this.getBinding=function(){return le===null&&pe&&(le=new XRWebGLBinding(g,r)),le},this.getFrame=function(){return he},this.getSession=function(){return g},this.setSession=async function(Tn){if(g=Tn,g!==null){if(Ie=t.getRenderTarget(),g.addEventListener("select",At),g.addEventListener("selectstart",At),g.addEventListener("selectend",At),g.addEventListener("squeeze",At),g.addEventListener("squeezestart",At),g.addEventListener("squeezeend",At),g.addEventListener("end",Dt),g.addEventListener("inputsourceschange",Lt),xe.xrCompatible!==!0&&await r.makeXRCompatible(),Ue=t.getPixelRatio(),t.getSize(Ve),pe&&"createProjectionLayer"in XRWebGLBinding.prototype){let kn=null,$n=null,An=null;xe.depth&&(An=xe.stencil?r.DEPTH24_STENCIL8:r.DEPTH_COMPONENT24,kn=xe.stencil?DepthStencilFormat:DepthFormat,$n=xe.stencil?UnsignedInt248Type:UnsignedIntType);const xn={colorFormat:r.RGBA8,depthFormat:An,scaleFactor:$};le=this.getBinding(),ue=le.createProjectionLayer(xn),g.updateRenderState({layers:[ue]}),t.setPixelRatio(1),t.setSize(ue.textureWidth,ue.textureHeight,!1),Ne=new WebGLRenderTarget(ue.textureWidth,ue.textureHeight,{format:RGBAFormat,type:UnsignedByteType,depthTexture:new Depth
|
|
|
|
|
|
`);this.workerSourceURL=URL.createObjectURL(new Blob([V]))}),this.decoderPending}_getWorker(t,r){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const g=new Worker(this.workerSourceURL);g._callbacks={},g._taskCosts={},g._taskLoad=0,g.postMessage({type:"init",decoderConfig:this.decoderConfig}),g.onmessage=function($){const V=$.data;switch(V.type){case"decode":g._callbacks[V.id].resolve(V);break;case"error":g._callbacks[V.id].reject(V);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+V.type+'"')}},this.workerPool.push(g)}else this.workerPool.sort(function(g,$){return g._taskLoad>$._taskLoad?-1:1});const i=this.workerPool[this.workerPool.length-1];return i._taskCosts[t]=r,i._taskLoad+=r,i})}_releaseTask(t,r){t._taskLoad-=t._taskCosts[r],delete t._callbacks[r],delete t._taskCosts[r]}debug(){console.log("Task load: ",this.workerPool.map(t=>t._taskLoad))}dispose(){for(let t=0;t<this.workerPool.length;++t)this.workerPool[t].terminate();return this.workerPool.length=0,this.workerSourceURL!==""&&URL.revokeObjectURL(this.workerSourceURL),this}}function DRACOWorker(){let n,t;onmessage=function(V){const re=V.data;switch(re.type){case"init":n=re.decoderConfig,t=new Promise(function(oe){n.onModuleLoaded=function(le){oe({draco:le})},DracoDecoderModule(n)});break;case"decode":const ie=re.buffer,ae=re.taskConfig;t.then(oe=>{const le=oe.draco,ue=new le.Decoder;try{const de=r(le,ue,new Int8Array(ie),ae),he=de.attributes.map(pe=>pe.array.buffer);de.index&&he.push(de.index.array.buffer),self.postMessage({type:"decode",id:re.id,geometry:de},he)}catch(de){console.error(de),self.postMessage({type:"error",id:re.id,error:de.message})}finally{le.destroy(ue)}});break}};function r(V,re,ie,ae){const oe=ae.attributeIDs,le=ae.attributeTypes;let ue,de;const he=re.GetEncodedGeometryType(ie);if(he===V.TRIANGULAR_MESH)ue=new V.Mesh,de=re.DecodeArrayToMesh(ie,ie.byteLength,ue);else if(he===V.POINT_CLOUD)ue=new V.PointCloud,de=re.DecodeArrayToPointCloud(ie,ie.byteLength,ue);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!de.ok()||ue.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+de.error_msg());const pe={index:null,attributes:[]};for(const _e in oe){const Ce=self[le[_e]];let xe,Ie;if(ae.useUniqueIDs)Ie=oe[_e],xe=re.GetAttributeByUniqueId(ue,Ie);else{if(Ie=re.GetAttributeId(ue,V[oe[_e]]),Ie===-1)continue;xe=re.GetAttribute(ue,Ie)}const Ne=g(V,re,ue,_e,Ce,xe);_e==="color"&&(Ne.vertexColorSpace=ae.vertexColorSpace),pe.attributes.push(Ne)}return he===V.TRIANGULAR_MESH&&(pe.index=i(V,re,ue)),V.destroy(ue),pe}function i(V,re,ie){const oe=ie.num_faces()*3,le=oe*4,ue=V._malloc(le);re.GetTrianglesUInt32Array(ie,le,ue);const de=new Uint32Array(V.HEAPF32.buffer,ue,oe).slice();return V._free(ue),{array:de,itemSize:1}}function g(V,re,ie,ae,oe,le){const ue=ie.num_points(),de=le.num_components(),he=$(V,oe),pe=de*oe.BYTES_PER_ELEMENT,_e=Math.ceil(pe/4)*4,Ce=_e/oe.BYTES_PER_ELEMENT,xe=ue*pe,Ie=ue*_e,Ne=V._malloc(xe);re.GetAttributeDataArrayForAllPoints(ie,le,he,xe,Ne);const Oe=new oe(V.HEAPF32.buffer,Ne,xe/oe.BYTES_PER_ELEMENT);let $e;if(pe===_e)$e=Oe.slice();else{$e=new oe(Ie/oe.BYTES_PER_ELEMENT);let Ve=0;for(let Ue=0,Fe=Oe.length;Ue<Fe;Ue++){for(let ze=0;ze<de;ze++)$e[Ve+ze]=Oe[Ue*de+ze];Ve+=Ce}}return V._free(Ne),{name:ae,count:ue,itemSize:de,array:$e,stride:Ce}}function $(V,re){switch(re){case Float32Array:return V.DT_FLOAT32;case Int8Array:return V.DT_INT8;case Int16Array:return V.DT_INT16;case Int32Array:return V.DT_INT32;case Uint8Array:return V.DT_UINT8;case Uint16Array:return V.DT_UINT16;case Uint32Array:return V.DT_UINT32}}}const scaleFactor$1=5,_sfc_main$f=defineComponent({__name:"vue-three-pipeline",setup(n){var Ie,Ne,Oe,$e;const t=ref(),r=new Scene,i=new PerspectiveCamera(45,((Ie=t.value)==null?void 0:Ie.clientWidth)/((Ne=t.value)==null?void 0:Ne.clientHeight),.1,1e3);i.position.set(-10,10,20),i.lookAt(r.position);const g=new WebGLRenderer({antialias:!0,alpha:!0,preserveDrawingBuffer:!0});g.setClearColor(new Color("#131519")),g.setSize((Oe=t.value)==null?void 0:Oe.c
|
|
|
|
|
|
* GSAP 3.14.2
|
|
|
|
|
|
* https://gsap.com
|
|
|
|
|
|
*
|
|
|
|
|
|
* @license Copyright 2008-2025, GreenSock. All rights reserved.
|
|
|
|
|
|
* Subject to the terms at https://gsap.com/standard-license
|
|
|
|
|
|
* @author: Jack Doyle, jack@greensock.com
|
|
|
|
|
|
*/var _config={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},_defaults={duration:.5,overwrite:!1,delay:0},_suppressOverwrites,_reverting$1,_context,_bigNum$1=1e8,_tinyNum=1/_bigNum$1,_2PI=Math.PI*2,_HALF_PI=_2PI/4,_gsID=0,_sqrt=Math.sqrt,_cos=Math.cos,_sin=Math.sin,_isString=function n(t){return typeof t=="string"},_isFunction=function n(t){return typeof t=="function"},_isNumber=function n(t){return typeof t=="number"},_isUndefined=function n(t){return typeof t>"u"},_isObject=function n(t){return typeof t=="object"},_isNotFalse=function n(t){return t!==!1},_windowExists$1=function n(){return typeof window<"u"},_isFuncOrString=function n(t){return _isFunction(t)||_isString(t)},_isTypedArray=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},_isArray=Array.isArray,_randomExp=/random\([^)]+\)/g,_commaDelimExp=/,\s*/g,_strictNumExp=/(?:-?\.?\d|\.)+/gi,_numExp=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,_numWithUnitExp=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,_complexStringNumExp=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,_relExp=/[+-]=-?[.\d]+/,_delimitedValueExp=/[^,'"\[\]\s]+/gi,_unitExp=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,_globalTimeline,_win$1,_coreInitted,_doc$1,_globals={},_installScope={},_coreReady,_install=function n(t){return(_installScope=_merge(t,_globals))&&gsap},_missingPlugin=function n(t,r){return console.warn("Invalid property",t,"set to",r,"Missing plugin? gsap.registerPlugin()")},_warn=function n(t,r){return!r&&console.warn(t)},_addGlobal=function n(t,r){return t&&(_globals[t]=r)&&_installScope&&(_installScope[t]=r)||_globals},_emptyFunc=function n(){return 0},_startAtRevertConfig={suppressEvents:!0,isStart:!0,kill:!1},_revertConfigNoKill={suppressEvents:!0,kill:!1},_revertConfig={suppressEvents:!0},_reservedProps={},_lazyTweens=[],_lazyLookup={},_lastRenderedFrame,_plugins={},_effects={},_nextGCFrame=30,_harnessPlugins=[],_callbackNames="",_harness=function n(t){var r=t[0],i,g;if(_isObject(r)||_isFunction(r)||(t=[t]),!(i=(r._gsap||{}).harness)){for(g=_harnessPlugins.length;g--&&!_harnessPlugins[g].targetTest(r););i=_harnessPlugins[g]}for(g=t.length;g--;)t[g]&&(t[g]._gsap||(t[g]._gsap=new GSCache(t[g],i)))||t.splice(g,1);return t},_getCache=function n(t){return t._gsap||_harness(toArray(t))[0]._gsap},_getProperty=function n(t,r,i){return(i=t[r])&&_isFunction(i)?t[r]():_isUndefined(i)&&t.getAttribute&&t.getAttribute(r)||i},_forEachName=function n(t,r){return(t=t.split(",")).forEach(r)||t},_round=function n(t){return Math.round(t*1e5)/1e5||0},_roundPrecise=function n(t){return Math.round(t*1e7)/1e7||0},_parseRelative=function n(t,r){var i=r.charAt(0),g=parseFloat(r.substr(2));return t=parseFloat(t),i==="+"?t+g:i==="-"?t-g:i==="*"?t*g:t/g},_arrayContainsAny=function n(t,r){for(var i=r.length,g=0;t.indexOf(r[g])<0&&++g<i;);return g<i},_lazyRender=function n(){var t=_lazyTweens.length,r=_lazyTweens.slice(0),i,g;for(_lazyLookup={},_lazyTweens.length=0,i=0;i<t;i++)g=r[i],g&&g._lazy&&(g.render(g._lazy[0],g._lazy[1],!0)._lazy=0)},_isRevertWorthy=function n(t){return!!(t._initted||t._startAt||t.add)},_lazySafeRender=function n(t,r,i,g){_lazyTweens.length&&!_reverting$1&&_lazyRender(),t.render(r,i,g||!!(_reverting$1&&r<0&&_isRevertWorthy(t))),_lazyTweens.length&&!_reverting$1&&_lazyRender()},_numericIfPossible=function n(t){var r=parseFloat(t);return(r||r===0)&&(t+"").match(_delimitedValueExp).length<2?r:_isString(t)?t.trim():t},_passThrough=function n(t){return t},_setDefaults=function n(t,r){for(var i in r)i in t||(t[i]=r[i]);return t},_setKeyframeDefaults=function n(t){return function(r,i){for(var g in i)g in r||g==="duration"&&t||g==="ease"||(r[g]=i[g])}},_merge=function n(t,r){for(var i in r)t[i]=r[i];return t},_mergeDeep=function n(t,r){for(var i in r)i!=="__proto__"&&i!=="constructor"&&i!=="prototype"&&(t[i]=_isObject(r[i])?n(t[i]||(t[i]={}),r[i]):r[i]);return t},_copyExcluding=function n(t,r){var i={},g;for(g in t)g in r||(i[g]=t[g]);return i},_inheritDefaults=function n(t){var r=t.parent||_globalTimeline,i=t.keyframes?_setKeyframeDefaults(_isArray(t.keyframes)):_setDefaults;if(_isNotFalse(t.inh
|
|
|
|
|
|
* CSSPlugin 3.14.2
|
|
|
|
|
|
* https://gsap.com
|
|
|
|
|
|
*
|
|
|
|
|
|
* Copyright 2008-2025, GreenSock. All rights reserved.
|
|
|
|
|
|
* Subject to the terms at https://gsap.com/standard-license
|
|
|
|
|
|
* @author: Jack Doyle, jack@greensock.com
|
|
|
|
|
|
*/var _win,_doc,_docElement,_pluginInitted,_tempDiv,_recentSetterPlugin,_reverting,_windowExists=function n(){return typeof window<"u"},_transformProps={},_RAD2DEG=180/Math.PI,_DEG2RAD=Math.PI/180,_atan2=Math.atan2,_bigNum=1e8,_capsExp=/([A-Z])/g,_horizontalExp=/(left|right|width|margin|padding|x)/i,_complexExp=/[\s,\(]\S/,_propertyAliases={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},_renderCSSProp=function n(t,r){return r.set(r.t,r.p,Math.round((r.s+r.c*t)*1e4)/1e4+r.u,r)},_renderPropWithEnd=function n(t,r){return r.set(r.t,r.p,t===1?r.e:Math.round((r.s+r.c*t)*1e4)/1e4+r.u,r)},_renderCSSPropWithBeginning=function n(t,r){return r.set(r.t,r.p,t?Math.round((r.s+r.c*t)*1e4)/1e4+r.u:r.b,r)},_renderCSSPropWithBeginningAndEnd=function n(t,r){return r.set(r.t,r.p,t===1?r.e:t?Math.round((r.s+r.c*t)*1e4)/1e4+r.u:r.b,r)},_renderRoundedCSSProp=function n(t,r){var i=r.s+r.c*t;r.set(r.t,r.p,~~(i+(i<0?-.5:.5))+r.u,r)},_renderNonTweeningValue=function n(t,r){return r.set(r.t,r.p,t?r.e:r.b,r)},_renderNonTweeningValueOnlyAtEnd=function n(t,r){return r.set(r.t,r.p,t!==1?r.b:r.e,r)},_setterCSSStyle=function n(t,r,i){return t.style[r]=i},_setterCSSProp=function n(t,r,i){return t.style.setProperty(r,i)},_setterTransform=function n(t,r,i){return t._gsap[r]=i},_setterScale=function n(t,r,i){return t._gsap.scaleX=t._gsap.scaleY=i},_setterScaleWithRender=function n(t,r,i,g,$){var V=t._gsap;V.scaleX=V.scaleY=i,V.renderTransform($,V)},_setterTransformWithRender=function n(t,r,i,g,$){var V=t._gsap;V[r]=i,V.renderTransform($,V)},_transformProp="transform",_transformOriginProp=_transformProp+"Origin",_saveStyle=function n(t,r){var i=this,g=this.target,$=g.style,V=g._gsap;if(t in _transformProps&&$){if(this.tfm=this.tfm||{},t!=="transform")t=_propertyAliases[t]||t,~t.indexOf(",")?t.split(",").forEach(function(re){return i.tfm[re]=_get(g,re)}):this.tfm[t]=V.x?V[t]:_get(g,t),t===_transformOriginProp&&(this.tfm.zOrigin=V.zOrigin);else return _propertyAliases.transform.split(",").forEach(function(re){return n.call(i,re,r)});if(this.props.indexOf(_transformProp)>=0)return;V.svg&&(this.svgo=g.getAttribute("data-svg-origin"),this.props.push(_transformOriginProp,r,"")),t=_transformProp}($||r)&&this.props.push(t,r,$[t])},_removeIndependentTransforms=function n(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},_revertStyle=function n(){var t=this.props,r=this.target,i=r.style,g=r._gsap,$,V;for($=0;$<t.length;$+=3)t[$+1]?t[$+1]===2?r[t[$]](t[$+2]):r[t[$]]=t[$+2]:t[$+2]?i[t[$]]=t[$+2]:i.removeProperty(t[$].substr(0,2)==="--"?t[$]:t[$].replace(_capsExp,"-$1").toLowerCase());if(this.tfm){for(V in this.tfm)g[V]=this.tfm[V];g.svg&&(g.renderTransform(),r.setAttribute("data-svg-origin",this.svgo||"")),$=_reverting(),(!$||!$.isStart)&&!i[_transformProp]&&(_removeIndependentTransforms(i),g.zOrigin&&i[_transformOriginProp]&&(i[_transformOriginProp]+=" "+g.zOrigin+"px",g.zOrigin=0,g.renderTransform()),g.uncache=1)}},_getStyleSaver=function n(t,r){var i={target:t,props:[],revert:_revertStyle,save:_saveStyle};return t._gsap||gsap.core.getCache(t),r&&t.style&&t.nodeType&&r.split(",").forEach(function(g){return i.save(g)}),i},_supports3D,_createElement=function n(t,r){var i=_doc.createElementNS?_doc.createElementNS((r||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):_doc.createElement(t);return i&&i.style?i:_doc.createElement(t)},_getComputedProperty=function n(t,r,i){var g=getComputedStyle(t);return g[r]||g.getPropertyValue(r.replace(_capsExp,"-$1").toLowerCase())||g.getPropertyValue(r)||!i&&n(t,_checkPropPrefix(r)||r,1)||""},_prefixes="O,Moz,ms,Ms,Webkit".split(","),_checkPropPrefix=function n(t,r,i){var g=r||_tempDiv,$=g.style,V=5;if(t in $&&!i)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);V--&&!(_prefixes[V]+t in $););return V<0?null:(V===3?"ms":V>=0?_prefixes[V]:"")+t},_initCore=function n(){_windowExists()&&window.document&&(_win=window,_doc=_win.document,_docElement=_doc.documentElement,_tempDiv=_createElement("div")||{style:{}},_createElement("div"),_transformProp=_checkPr
|
|
|
|
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
|
|
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
|
|
purpose with or without fee is hereby granted.
|
|
|
|
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
|
|
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
|
|
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
|
|
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
|
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
|
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
|
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
|
***************************************************************************** */var extendStatics=function(n,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var g in i)Object.prototype.hasOwnProperty.call(i,g)&&(r[g]=i[g])},extendStatics(n,t)};function __extends(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");extendStatics(n,t);function r(){this.constructor=n}n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Browser=function(){function n(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return n}(),Env=function(){function n(){this.browser=new Browser,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return n}(),env=new Env;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(env.wxa=!0,env.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?env.worker=!0:!env.hasGlobalWindow||"Deno"in window?(env.node=!0,env.svgSupported=!0):detect(navigator.userAgent,env);function detect(n,t){var r=t.browser,i=n.match(/Firefox\/([\d.]+)/),g=n.match(/MSIE\s([\d.]+)/)||n.match(/Trident\/.+?rv:(([\d.]+))/),$=n.match(/Edge?\/([\d.]+)/),V=/micromessenger/i.test(n);i&&(r.firefox=!0,r.version=i[1]),g&&(r.ie=!0,r.version=g[1]),$&&(r.edge=!0,r.version=$[1],r.newEdge=+$[1].split(".")[0]>18),V&&(r.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,t.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11),t.domSupported=typeof document<"u";var re=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in re||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in re)&&!("OTransition"in re),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}const env$1=env;var DEFAULT_FONT_SIZE=12,DEFAULT_FONT_FAMILY="sans-serif",DEFAULT_FONT=DEFAULT_FONT_SIZE+"px "+DEFAULT_FONT_FAMILY,OFFSET=20,SCALE=100,defaultWidthMapStr="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function getTextWidthMap(n){var t={};if(typeof JSON>"u")return t;for(var r=0;r<n.length;r++){var i=String.fromCharCode(r+32),g=(n.charCodeAt(r)-OFFSET)/SCALE;t[i]=g}return t}var DEFAULT_TEXT_WIDTH_MAP=getTextWidthMap(defaultWidthMapStr),platformApi={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var n,t;return function(r,i){if(!n){var g=platformApi.createCanvas();n=g&&g.getContext("2d")}if(n)return t!==i&&(t=n.font=i||DEFAULT_FONT),n.measureText(r);r=r||"",i=i||DEFAULT_FONT;var $=/((?:\d+)?\.?\d*)px/.exec(i),V=$&&+$[1]||DEFAULT_FONT_SIZE,re=0;if(i.indexOf("mono")>=0)re=V*r.length;else for(var ie=0;ie<r.length;ie++){var ae=DEFAULT_TEXT_WIDTH_MAP[r[ie]];re+=ae==null?V:ae*V}return{width:re}}}(),loadImage:function(n,t,r){var i=new Image;return i.onload=t,i.onerror=r,i.src=n,i}},BUILTIN_OBJECT=reduce(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(n,t){return n["[object "+t+"]"]=!0,n},{}),TYPED_ARRAY=reduce(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(n,t){return n["[object "+t+"Array]"]=!0,n},{}),objToString=Object.prototype.toString,arrayProto=Array.prototype,nativeForEach=arrayProto.forEach,nativeFilter=arrayProto.filter,nativeSlice=arrayProto.slice,nativeMap=arrayProto.map,ctorFunction=(function(){}).constructor,protoFunction=ctorFunction?ctorFunction.prototype:null,protoKey="__proto__",idStart=2311;function guid(){return idStart++}function logError(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];typeof console<"u"&&console.error.apply(console,n)}function clone$2(n){if(n==null||typeof n!="object")return n;var t=n,r=objToString.call(n);i
|
|
|
|
|
|
`),$=g.length;if($===1)return innerGetBoundingRect(g[0],t,r,i);for(var V=new BoundingRect$1(0,0,0,0),re=0;re<g.length;re++){var ie=innerGetBoundingRect(g[re],t,r,i);re===0?V.copy(ie):V.union(ie)}return V}function adjustTextX(n,t,r){return r==="right"?n-=t:r==="center"&&(n-=t/2),n}function adjustTextY(n,t,r){return r==="middle"?n-=t/2:r==="bottom"&&(n-=t),n}function getLineHeight(n){return getWidth("国",n)}function parsePercent$1(n,t){return typeof n=="string"?n.lastIndexOf("%")>=0?parseFloat(n)/100*t:parseFloat(n):n}function calculateTextPosition(n,t,r){var i=t.position||"inside",g=t.distance!=null?t.distance:5,$=r.height,V=r.width,re=$/2,ie=r.x,ae=r.y,oe="left",le="top";if(i instanceof Array)ie+=parsePercent$1(i[0],r.width),ae+=parsePercent$1(i[1],r.height),oe=null,le=null;else switch(i){case"left":ie-=g,ae+=re,oe="right",le="middle";break;case"right":ie+=g+V,ae+=re,le="middle";break;case"top":ie+=V/2,ae-=g,oe="center",le="bottom";break;case"bottom":ie+=V/2,ae+=$+g,oe="center";break;case"inside":ie+=V/2,ae+=re,oe="center",le="middle";break;case"insideLeft":ie+=g,ae+=re,le="middle";break;case"insideRight":ie+=V-g,ae+=re,oe="right",le="middle";break;case"insideTop":ie+=V/2,ae+=g,oe="center";break;case"insideBottom":ie+=V/2,ae+=$-g,oe="center",le="bottom";break;case"insideTopLeft":ie+=g,ae+=g;break;case"insideTopRight":ie+=V-g,ae+=g,oe="right";break;case"insideBottomLeft":ie+=g,ae+=$-g,le="bottom";break;case"insideBottomRight":ie+=V-g,ae+=$-g,oe="right",le="bottom";break}return n=n||{},n.x=ie,n.y=ae,n.align=oe,n.verticalAlign=le,n}var PRESERVED_NORMAL_STATE="__zr_normal__",PRIMARY_STATES_KEYS$1=TRANSFORMABLE_PROPS.concat(["ignore"]),DEFAULT_ANIMATABLE_MAP=reduce(TRANSFORMABLE_PROPS,function(n,t){return n[t]=!0,n},{ignore:!1}),tmpTextPosCalcRes={},tmpBoundingRect=new BoundingRect$1(0,0,0,0),Element$1=function(){function n(t){this.id=guid(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return n.prototype._init=function(t){this.attr(t)},n.prototype.drift=function(t,r,i){switch(this.draggable){case"horizontal":r=0;break;case"vertical":t=0;break}var g=this.transform;g||(g=this.transform=[1,0,0,1,0,0]),g[4]+=t,g[5]+=r,this.decomposeTransform(),this.markRedraw()},n.prototype.beforeUpdate=function(){},n.prototype.afterUpdate=function(){},n.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},n.prototype.updateInnerText=function(t){var r=this._textContent;if(r&&(!r.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,g=i.local,$=r.innerTransformable,V=void 0,re=void 0,ie=!1;$.parent=g?this:null;var ae=!1;if($.copyTransform(r),i.position!=null){var oe=tmpBoundingRect;i.layoutRect?oe.copy(i.layoutRect):oe.copy(this.getBoundingRect()),g||oe.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(tmpTextPosCalcRes,i,oe):calculateTextPosition(tmpTextPosCalcRes,i,oe),$.x=tmpTextPosCalcRes.x,$.y=tmpTextPosCalcRes.y,V=tmpTextPosCalcRes.align,re=tmpTextPosCalcRes.verticalAlign;var le=i.origin;if(le&&i.rotation!=null){var ue=void 0,de=void 0;le==="center"?(ue=oe.width*.5,de=oe.height*.5):(ue=parsePercent$1(le[0],oe.width),de=parsePercent$1(le[1],oe.height)),ae=!0,$.originX=-$.x+ue+(g?0:oe.x),$.originY=-$.y+de+(g?0:oe.y)}}i.rotation!=null&&($.rotation=i.rotation);var he=i.offset;he&&($.x+=he[0],$.y+=he[1],ae||($.originX=-he[0],$.originY=-he[1]));var pe=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,_e=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),Ce=void 0,xe=void 0,Ie=void 0;pe&&this.canBeInsideText()?(Ce=i.insideFill,xe=i.insideStroke,(Ce==null||Ce==="auto")&&(Ce=this.getInsideTextFill()),(xe==null||xe==="auto")&&(xe=this.getInsideTextStroke(Ce),Ie=!0)):(Ce=i.outsideFill,xe=i.outsideStroke,(Ce==null||Ce==="auto")&&(Ce=this.getOutsideFill()),(xe==null||xe==="auto")&&(xe=this.getOutsideStroke(Ce),Ie=!0)),Ce=Ce||"#000",(Ce!==_e.fill||xe!==_e.stroke||Ie!==_e.autoStroke||V!==_e.align||re!==_e.verticalAlign)&&(ie=!0,_e.fill=Ce,_e.stroke=xe,_e.autoStroke=Ie,_e.align=V,_e.verticalAlign=re
|
|
|
|
|
|
* ZRender, a high performance 2d drawing library.
|
|
|
|
|
|
*
|
|
|
|
|
|
* Copyright (c) 2013, Baidu Inc.
|
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
|
*
|
|
|
|
|
|
* LICENSE
|
|
|
|
|
|
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
|
|
|
|
|
*/var painterCtors={},instances$1={};function delInstance(n){delete instances$1[n]}function isDarkMode(n){if(!n)return!1;if(typeof n=="string")return lum(n,1)<DARK_MODE_THRESHOLD;if(n.colorStops){for(var t=n.colorStops,r=0,i=t.length,g=0;g<i;g++)r+=lum(t[g].color,1);return r/=i,r<DARK_MODE_THRESHOLD}return!1}var ZRender=function(){function n(t,r,i){var g=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,i=i||{},this.dom=r,this.id=t;var $=new Storage$1,V=i.renderer||"canvas";painterCtors[V]||(V=keys(painterCtors)[0]),i.useDirtyRect=i.useDirtyRect==null?!1:i.useDirtyRect;var re=new painterCtors[V](r,$,i,t),ie=i.ssr||re.ssrOnly;this.storage=$,this.painter=re;var ae=!env$1.node&&!env$1.worker&&!ie?new HandlerProxy(re.getViewportRoot(),re.root):null,oe=i.useCoarsePointer,le=oe==null||oe==="auto"?env$1.touchEventsSupported:!!oe,ue=44,de;le&&(de=retrieve2(i.pointerSize,ue)),this.handler=new Handler$1($,re,ae,re.root,de),this.animation=new Animation$1({stage:{update:ie?null:function(){return g._flush(!0)}}}),ie||this.animation.start()}return n.prototype.add=function(t){this._disposed||!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},n.prototype.remove=function(t){this._disposed||!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},n.prototype.configLayer=function(t,r){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,r),this.refresh())},n.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=isDarkMode(t))},n.prototype.getBackgroundColor=function(){return this._backgroundColor},n.prototype.setDarkMode=function(t){this._darkMode=t},n.prototype.isDarkMode=function(){return this._darkMode},n.prototype.refreshImmediately=function(t){this._disposed||(t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},n.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},n.prototype.flush=function(){this._disposed||this._flush(!1)},n.prototype._flush=function(t){var r,i=getTime();this._needsRefresh&&(r=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(r=!0,this.refreshHoverImmediately());var g=getTime();r?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:g-i})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},n.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},n.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},n.prototype.refreshHover=function(){this._needsRefreshHover=!0},n.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},n.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},n.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},n.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},n.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},n.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},n.prototype.findHover=function(t,r){if(!this._disposed)return this.handler.findHover(t,r)},n.prototype.on=function(t,r,i){return this._disposed||this.handler.on(t,r,i),this},n.prototype.off=function(t,r){this._disposed||this.handler.off(t,r)},n.prototype.trigger=function(t,r){this._disposed||this.handler.trigger(t,r)},n.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),r=0;r<t.length;r++)t[r]instanceof Group$3&&t[r].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},n.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animati
|
|
|
|
|
|
`);$=prepareTruncateOptions(r,i,g,$);for(var re=!1,ie={},ae=0,oe=V.length;ae<oe;ae++)truncateSingleLine(ie,V[ae],$),V[ae]=ie.textLine,re=re||ie.isTruncated;n.text=V.join(`
|
|
|
|
|
|
`),n.isTruncated=re}function prepareTruncateOptions(n,t,r,i){i=i||{};var g=extend({},i);g.font=t,r=retrieve2(r,"..."),g.maxIterations=retrieve2(i.maxIterations,2);var $=g.minChar=retrieve2(i.minChar,0);g.cnCharWidth=getWidth("国",t);var V=g.ascCharWidth=getWidth("a",t);g.placeholder=retrieve2(i.placeholder,"");for(var re=n=Math.max(0,n-1),ie=0;ie<$&&re>=V;ie++)re-=V;var ae=getWidth(r,t);return ae>re&&(r="",ae=0),re=n-ae,g.ellipsis=r,g.ellipsisWidth=ae,g.contentWidth=re,g.containerWidth=n,g}function truncateSingleLine(n,t,r){var i=r.containerWidth,g=r.font,$=r.contentWidth;if(!i){n.textLine="",n.isTruncated=!1;return}var V=getWidth(t,g);if(V<=i){n.textLine=t,n.isTruncated=!1;return}for(var re=0;;re++){if(V<=$||re>=r.maxIterations){t+=r.ellipsis;break}var ie=re===0?estimateLength(t,$,r.ascCharWidth,r.cnCharWidth):V>0?Math.floor(t.length*$/V):0;t=t.substr(0,ie),V=getWidth(t,g)}t===""&&(t=r.placeholder),n.textLine=t,n.isTruncated=!0}function estimateLength(n,t,r,i){for(var g=0,$=0,V=n.length;$<V&&g<t;$++){var re=n.charCodeAt($);g+=0<=re&&re<=127?r:i}return $}function parsePlainText(n,t){n!=null&&(n+="");var r=t.overflow,i=t.padding,g=t.font,$=r==="truncate",V=getLineHeight(g),re=retrieve2(t.lineHeight,V),ie=!!t.backgroundColor,ae=t.lineOverflow==="truncate",oe=!1,le=t.width,ue;le!=null&&(r==="break"||r==="breakAll")?ue=n?wrapText(n,t.font,le,r==="breakAll",0).lines:[]:ue=n?n.split(`
|
|
|
|
|
|
`):[];var de=ue.length*re,he=retrieve2(t.height,de);if(de>he&&ae){var pe=Math.floor(he/re);oe=oe||ue.length>pe,ue=ue.slice(0,pe)}if(n&&$&&le!=null)for(var _e=prepareTruncateOptions(le,g,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),Ce={},xe=0;xe<ue.length;xe++)truncateSingleLine(Ce,ue[xe],_e),ue[xe]=Ce.textLine,oe=oe||Ce.isTruncated;for(var Ie=he,Ne=0,xe=0;xe<ue.length;xe++)Ne=Math.max(getWidth(ue[xe],g),Ne);le==null&&(le=Ne);var Oe=Ne;return i&&(Ie+=i[0]+i[2],Oe+=i[1]+i[3],le+=i[1]+i[3]),ie&&(Oe=le),{lines:ue,height:he,outerWidth:Oe,outerHeight:Ie,lineHeight:re,calculatedLineHeight:V,contentWidth:Ne,contentHeight:de,width:le,isTruncated:oe}}var RichTextToken=function(){function n(){}return n}(),RichTextLine=function(){function n(t){this.tokens=[],t&&(this.tokens=t)}return n}(),RichTextContentBlock=function(){function n(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return n}();function parseRichText(n,t){var r=new RichTextContentBlock;if(n!=null&&(n+=""),!n)return r;for(var i=t.width,g=t.height,$=t.overflow,V=($==="break"||$==="breakAll")&&i!=null?{width:i,accumWidth:0,breakAll:$==="breakAll"}:null,re=STYLE_REG.lastIndex=0,ie;(ie=STYLE_REG.exec(n))!=null;){var ae=ie.index;ae>re&&pushTokens(r,n.substring(re,ae),t,V),pushTokens(r,ie[2],t,V,ie[1]),re=STYLE_REG.lastIndex}re<n.length&&pushTokens(r,n.substring(re,n.length),t,V);var oe=[],le=0,ue=0,de=t.padding,he=$==="truncate",pe=t.lineOverflow==="truncate",_e={};function Ce(vn,_n,wn){vn.width=_n,vn.lineHeight=wn,le+=wn,ue=Math.max(ue,_n)}e:for(var xe=0;xe<r.lines.length;xe++){for(var Ie=r.lines[xe],Ne=0,Oe=0,$e=0;$e<Ie.tokens.length;$e++){var Ve=Ie.tokens[$e],Ue=Ve.styleName&&t.rich[Ve.styleName]||{},Fe=Ve.textPadding=Ue.padding,ze=Fe?Fe[1]+Fe[3]:0,Pt=Ve.font=Ue.font||t.font;Ve.contentHeight=getLineHeight(Pt);var qe=retrieve2(Ue.height,Ve.contentHeight);if(Ve.innerHeight=qe,Fe&&(qe+=Fe[0]+Fe[2]),Ve.height=qe,Ve.lineHeight=retrieve3(Ue.lineHeight,t.lineHeight,qe),Ve.align=Ue&&Ue.align||t.align,Ve.verticalAlign=Ue&&Ue.verticalAlign||"middle",pe&&g!=null&&le+Ve.lineHeight>g){var Et=r.lines.length;$e>0?(Ie.tokens=Ie.tokens.slice(0,$e),Ce(Ie,Oe,Ne),r.lines=r.lines.slice(0,xe+1)):r.lines=r.lines.slice(0,xe),r.isTruncated=r.isTruncated||r.lines.length<Et;break e}var kt=Ue.width,At=kt==null||kt==="auto";if(typeof kt=="string"&&kt.charAt(kt.length-1)==="%")Ve.percentWidth=kt,oe.push(Ve),Ve.contentWidth=getWidth(Ve.text,Pt);else{if(At){var Dt=Ue.backgroundColor,Lt=Dt&&Dt.image;Lt&&(Lt=findExistImage(Lt),isImageReady(Lt)&&(Ve.width=Math.max(Ve.width,Lt.width*qe/Lt.height)))}var jt=he&&i!=null?i-Oe:null;jt!=null&&jt<Ve.width?!At||jt<ze?(Ve.text="",Ve.width=Ve.contentWidth=0):(truncateText2(_e,Ve.text,jt-ze,Pt,t.ellipsis,{minChar:t.truncateMinChar}),Ve.text=_e.text,r.isTruncated=r.isTruncated||_e.isTruncated,Ve.width=Ve.contentWidth=getWidth(Ve.text,Pt)):Ve.contentWidth=getWidth(Ve.text,Pt)}Ve.width+=ze,Oe+=Ve.width,Ue&&(Ne=Math.max(Ne,Ve.lineHeight))}Ce(Ie,Oe,Ne)}r.outerWidth=r.width=retrieve2(i,ue),r.outerHeight=r.height=retrieve2(g,le),r.contentHeight=le,r.contentWidth=ue,de&&(r.outerWidth+=de[1]+de[3],r.outerHeight+=de[0]+de[2]);for(var xe=0;xe<oe.length;xe++){var Ve=oe[xe],hn=Ve.percentWidth;Ve.width=parseInt(hn,10)/100*r.width}return r}function pushTokens(n,t,r,i,g){var $=t==="",V=g&&r.rich[g]||{},re=n.lines,ie=V.font||r.font,ae=!1,oe,le;if(i){var ue=V.padding,de=ue?ue[1]+ue[3]:0;if(V.width!=null&&V.width!=="auto"){var he=parsePercent$1(V.width,i.width)+de;re.length>0&&he+i.accumWidth>i.width&&(oe=t.split(`
|
|
|
|
|
|
`),ae=!0),i.accumWidth=he}else{var pe=wrapText(t,ie,i.width,i.breakAll,i.accumWidth);i.accumWidth=pe.accumWidth+de,le=pe.linesWidths,oe=pe.lines}}else oe=t.split(`
|
|
|
|
|
|
`);for(var _e=0;_e<oe.length;_e++){var Ce=oe[_e],xe=new RichTextToken;if(xe.styleName=g,xe.text=Ce,xe.isLineHolder=!Ce&&!$,typeof V.width=="number"?xe.width=V.width:xe.width=le?le[_e]:getWidth(Ce,ie),!_e&&!ae){var Ie=(re[re.length-1]||(re[0]=new RichTextLine)).tokens,Ne=Ie.length;Ne===1&&Ie[0].isLineHolder?Ie[0]=xe:(Ce||!Ne||$)&&Ie.push(xe)}else re.push(new RichTextLine([xe]))}}function isAlphabeticLetter(n){var t=n.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var breakCharMap=reduce(",&?/;] ".split(""),function(n,t){return n[t]=!0,n},{});function isWordBreakChar(n){return isAlphabeticLetter(n)?!!breakCharMap[n]:!0}function wrapText(n,t,r,i,g){for(var $=[],V=[],re="",ie="",ae=0,oe=0,le=0;le<n.length;le++){var ue=n.charAt(le);if(ue===`
|
|
|
|
|
|
`){ie&&(re+=ie,oe+=ae),$.push(re),V.push(oe),re="",ie="",ae=0,oe=0;continue}var de=getWidth(ue,t),he=i?!1:!isWordBreakChar(ue);if($.length?oe+de>r:g+oe+de>r){oe?(re||ie)&&(he?(re||(re=ie,ie="",ae=0,oe=ae),$.push(re),V.push(oe-ae),ie+=ue,ae+=de,re="",oe=ae):(ie&&(re+=ie,ie="",ae=0),$.push(re),V.push(oe),re=ue,oe=de)):he?($.push(ie),V.push(ae),ie=ue,ae=de):($.push(ue),V.push(de));continue}oe+=de,he?(ie+=ue,ae+=de):(ie&&(re+=ie,ie="",ae=0),re+=ue)}return!$.length&&!re&&(re=n,ie="",ae=0),ie&&(re+=ie),re&&($.push(re),V.push(oe)),$.length===1&&(oe+=g),{accumWidth:oe,lines:$,linesWidths:V}}var STYLE_MAGIC_KEY="__zr_style_"+Math.round(Math.random()*10),DEFAULT_COMMON_STYLE={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},DEFAULT_COMMON_ANIMATION_PROPS={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};DEFAULT_COMMON_STYLE[STYLE_MAGIC_KEY]=!0;var PRIMARY_STATES_KEYS=["z","z2","invisible"],PRIMARY_STATES_KEYS_IN_HOVER_LAYER=["invisible"],Displayable=function(n){__extends(t,n);function t(r){return n.call(this,r)||this}return t.prototype._init=function(r){for(var i=keys(r),g=0;g<i.length;g++){var $=i[g];$==="style"?this.useStyle(r[$]):n.prototype.attrKV.call(this,$,r[$])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(r,i,g,$){var V=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&isDisplayableCulled(this,r,i)||V&&!V[0]&&!V[3])return!1;if(g&&this.__clipPaths){for(var re=0;re<this.__clipPaths.length;++re)if(this.__clipPaths[re].isZeroArea())return!1}if($&&this.parent)for(var ie=this.parent;ie;){if(ie.ignore)return!1;ie=ie.parent}return!0},t.prototype.contain=function(r,i){return this.rectContain(r,i)},t.prototype.traverse=function(r,i){r.call(i,this)},t.prototype.rectContain=function(r,i){var g=this.transformCoordToLocal(r,i),$=this.getBoundingRect();return $.contain(g[0],g[1])},t.prototype.getPaintRect=function(){var r=this._paintRect;if(!this._paintRect||this.__dirty){var i=this.transform,g=this.getBoundingRect(),$=this.style,V=$.shadowBlur||0,re=$.shadowOffsetX||0,ie=$.shadowOffsetY||0;r=this._paintRect||(this._paintRect=new BoundingRect$1(0,0,0,0)),i?BoundingRect$1.applyTransform(r,g,i):r.copy(g),(V||re||ie)&&(r.width+=V*2+Math.abs(re),r.height+=V*2+Math.abs(ie),r.x=Math.min(r.x,r.x+re-V),r.y=Math.min(r.y,r.y+ie-V));var ae=this.dirtyRectTolerance;r.isZero()||(r.x=Math.floor(r.x-ae),r.y=Math.floor(r.y-ae),r.width=Math.ceil(r.width+1+ae*2),r.height=Math.ceil(r.height+1+ae*2))}return r},t.prototype.setPrevPaintRect=function(r){r?(this._prevPaintRect=this._prevPaintRect||new BoundingRect$1(0,0,0,0),this._prevPaintRect.copy(r)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(r){return this.animate("style",r)},t.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(r,i){r!=="style"?n.prototype.attrKV.call(this,r,i):this.style?this.setStyle(i):this.useStyle(i)},t.prototype.setStyle=function(r,i){return typeof r=="string"?this.style[r]=i:extend(this.style,r),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(r){r||this.markRedraw(),this.__dirty|=STYLE_CHANGED_BIT,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&STYLE_CHANGED_BIT)},t.prototype.styleUpdated=function(){this.__dirty&=~STYLE_CHANGED_BIT},t.prototype.createStyle=function(r){return createObject(DEFAULT_COMMON_STYLE,r)},t.prototype.useStyle=function(r){r[STYLE_MAGIC_KEY]||(r=this.createStyle(r)),this.__inHover?this.__hoverStyle=r:this.style=r,this.dirtyStyle()},t.prototype.isStyleObject=function(r){return r[STYLE_MAGIC_KEY]},t.prototype._innerSaveToNormal=function(r){n.prototype._innerSaveToNormal.call(this,r);var i=this._normalState;r.style&&!i.style&&(i.
|
|
|
|
|
|
`,`
|
|
|
|
|
|
|
|
|
|
|
|
`,`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
`];function createTooltipMarkup(n,t){return t.type=n,t}function isSectionFragment(n){return n.type==="section"}function getBuilder(n){return isSectionFragment(n)?buildSection:buildNameValue}function getBlockGapLevel(n){if(isSectionFragment(n)){var t=0,r=n.blocks.length,i=r>1||r>0&&!n.noHeader;return each$4(n.blocks,function(g){var $=getBlockGapLevel(g);$>=t&&(t=$+ +(i&&(!$||isSectionFragment(g)&&!g.noHeader)))}),t}return 0}function buildSection(n,t,r,i){var g=t.noHeader,$=getGap(getBlockGapLevel(t)),V=[],re=t.blocks||[];assert(!re||isArray(re)),re=re||[];var ie=n.orderMode;if(t.sortBlocks&&ie){re=re.slice();var ae={valueAsc:"asc",valueDesc:"desc"};if(hasOwn(ae,ie)){var oe=new SortOrderComparator(ae[ie],null);re.sort(function(pe,_e){return oe.evaluate(pe.sortParam,_e.sortParam)})}else ie==="seriesDesc"&&re.reverse()}each$4(re,function(pe,_e){var Ce=t.valueFormatter,xe=getBuilder(pe)(Ce?extend(extend({},n),{valueFormatter:Ce}):n,pe,_e>0?$.html:0,i);xe!=null&&V.push(xe)});var le=n.renderMode==="richText"?V.join($.richText):wrapBlockHTML(i,V.join(""),g?r:$.html);if(g)return le;var ue=makeValueReadable(t.header,"ordinal",n.useUTC),de=getTooltipTextStyle(i,n.renderMode).nameStyle,he=getTooltipLineHeight(i);return n.renderMode==="richText"?wrapInlineNameRichText(n,ue,de)+$.richText+le:wrapBlockHTML(i,'<div style="'+de+";"+he+';">'+encodeHTML(ue)+"</div>"+le,r)}function buildNameValue(n,t,r,i){var g=n.renderMode,$=t.noName,V=t.noValue,re=!t.markerType,ie=t.name,ae=n.useUTC,oe=t.valueFormatter||n.valueFormatter||function(Ne){return Ne=isArray(Ne)?Ne:[Ne],map$1(Ne,function(Oe,$e){return makeValueReadable(Oe,isArray(de)?de[$e]:de,ae)})};if(!($&&V)){var le=re?"":n.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",g),ue=$?"":makeValueReadable(ie,"ordinal",ae),de=t.valueType,he=V?[]:oe(t.value,t.dataIndex),pe=!re||!$,_e=!re&&$,Ce=getTooltipTextStyle(i,g),xe=Ce.nameStyle,Ie=Ce.valueStyle;return g==="richText"?(re?"":le)+($?"":wrapInlineNameRichText(n,ue,xe))+(V?"":wrapInlineValueRichText(n,he,pe,_e,Ie)):wrapBlockHTML(i,(re?"":le)+($?"":wrapInlineNameHTML(ue,!re,xe))+(V?"":wrapInlineValueHTML(he,pe,_e,Ie)),r)}}function buildTooltipMarkup(n,t,r,i,g,$){if(n){var V=getBuilder(n),re={useUTC:g,renderMode:r,orderMode:i,markupStyleCreator:t,valueFormatter:n.valueFormatter};return V(re,n,0,$)}}function getGap(n){return{html:HTML_GAPS[n],richText:RICH_TEXT_GAPS[n]}}function wrapBlockHTML(n,t,r){var i='<div style="clear:both"></div>',g="margin: "+r+"px 0 0",$=getTooltipLineHeight(n);return'<div style="'+g+";"+$+';">'+t+i+"</div>"}function wrapInlineNameHTML(n,t,r){var i=t?"margin-left:2px":"";return'<span style="'+r+";"+i+'">'+encodeHTML(n)+"</span>"}function wrapInlineValueHTML(n,t,r,i){var g=r?"10px":"20px",$=t?"float:right;margin-left:"+g:"";return n=isArray(n)?n:[n],'<span style="'+$+";"+i+'">'+map$1(n,function(V){return encodeHTML(V)}).join(" ")+"</span>"}function wrapInlineNameRichText(n,t,r){return n.markupStyleCreator.wrapRichTextStyle(t,r)}function wrapInlineValueRichText(n,t,r,i,g){var $=[g],V=i?10:20;return r&&$.push({padding:[0,0,0,V],align:"right"}),n.markupStyleCreator.wrapRichTextStyle(isArray(t)?t.join(" "):t,$)}function retrieveVisualColorForTooltipMarker(n,t){var r=n.getData().getItemVisual(t,"style"),i=r[n.visualDrawType];return convertToColorString(i)}function getPaddingFromTooltipModel(n,t){var r=n.get("padding");return r??(t==="richText"?[8,10]:10)}var TooltipMarkupStyleCreator=function(){function n(){this.richTextStyles={},this._nextStyleNameId=getRandomIdBase()}return n.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},n.prototype.makeTooltipMarker=function(t,r,i){var g=i==="richText"?this._generateStyleName():null,$=getTooltipMarker({color:r,type:t,renderMode:i,markerId:g});return isString($)?$:(this.richTextStyles[g]=$.style,$.content)},n.prototype.wrapRichTextStyle=function(t,r){var i={};isArray(r)?each$4(r,function($){return extend(i,$)}):extend(i,r);var g=this._generateStyleName();return this.richTextStyles[g]=i,"{"+g+"|"+t+"}"},n}();function default
|
|
|
|
|
|
`:"";function i(g){var $=g.children,V=g.tag,re=g.attrs,ie=g.text;return createElementOpen(V,re)+(V!=="style"?encodeHTML(ie):ie||"")+($?""+r+map$1($,function(ae){return i(ae)}).join(r)+r:"")+createElementClose(V)}return i(n)}function getCssString(n,t,r){r=r||{};var i=r.newline?`
|
|
|
|
|
|
`:"",g=" {"+i,$=i+"}",V=map$1(keys(n),function(ie){return ie+g+map$1(keys(n[ie]),function(ae){return ae+":"+n[ie][ae]+";"}).join(i)+$}).join(i),re=map$1(keys(t),function(ie){return"@keyframes "+ie+g+map$1(keys(t[ie]),function(ae){return ae+g+map$1(keys(t[ie][ae]),function(oe){var le=t[ie][ae][oe];return oe==="d"&&(le='path("'+le+'")'),oe+":"+le+";"}).join(i)+$}).join(i)+$}).join(i);return!V&&!re?"":["<![CDATA[",V,re,"]]>"].join(i)}function createBrushScope(n){return{zrId:n,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function createSVGVNode(n,t,r,i){return createVNode("svg","root",{width:n,height:t,xmlns:SVGNS,"xmlns:xlink":XLINKNS,version:"1.1",baseProfile:"full",viewBox:i?"0 0 "+n+" "+t:!1},r)}var cssClassIdx=0;function getClassId(){return cssClassIdx++}var EASING_MAP={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},transformOriginKey="transform-origin";function buildPathString(n,t,r){var i=extend({},n.shape);extend(i,t),n.buildPath(r,i);var g=new SVGPathRebuilder$1;return g.reset(getPathPrecision(n)),r.rebuildPath(g,1),g.generateStr(),g.getStr()}function setTransformOrigin(n,t){var r=t.originX,i=t.originY;(r||i)&&(n[transformOriginKey]=r+"px "+i+"px")}var ANIMATE_STYLE_MAP={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function addAnimation(n,t){var r=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[r]=n,r}function createCompoundPathCSSAnimation(n,t,r){var i=n.shape.paths,g={},$,V;if(each$4(i,function(ie){var ae=createBrushScope(r.zrId);ae.animation=!0,createCSSAnimation(ie,{},ae,!0);var oe=ae.cssAnims,le=ae.cssNodes,ue=keys(oe),de=ue.length;if(de){V=ue[de-1];var he=oe[V];for(var pe in he){var _e=he[pe];g[pe]=g[pe]||{d:""},g[pe].d+=_e.d||""}for(var Ce in le){var xe=le[Ce].animation;xe.indexOf(V)>=0&&($=xe)}}}),!!$){t.d=!1;var re=addAnimation(g,r);return $.replace(V,re)}}function getEasingFunc(n){return isString(n)?EASING_MAP[n]?"cubic-bezier("+EASING_MAP[n]+")":createCubicEasingFunc(n)?n:"":""}function createCSSAnimation(n,t,r,i){var g=n.animators,$=g.length,V=[];if(n instanceof CompoundPath$1){var re=createCompoundPathCSSAnimation(n,t,r);if(re)V.push(re);else if(!$)return}else if(!$)return;for(var ie={},ae=0;ae<$;ae++){var oe=g[ae],le=[oe.getMaxTime()/1e3+"s"],ue=getEasingFunc(oe.getClip().easing),de=oe.getDelay();ue?le.push(ue):le.push("linear"),de&&le.push(de/1e3+"s"),oe.getLoop()&&le.push("infinite");var he=le.join(" ");ie[he]=ie[he]||[he,[]],ie[he][1].push(oe)}function pe(xe){var Ie=xe[1],Ne=Ie.length,Oe={},$e={},Ve={},Ue="animation-timing-function";function Fe(kn,$n,An){for(var xn=kn.getTracks(),Ln=kn.getMaxTime(),Nn=0;Nn<xn.length;Nn++){var Pn=xn[Nn];if(Pn.needsAnimate()){var On=Pn.keyframes,Hn=Pn.propName;if(An&&(Hn=An(Hn)),Hn)for(var Xn=0;Xn<On.length;Xn++){var In=On[Xn],or=Math.round(In.time/Ln*100)+"%",Qn=getEasingFunc(In.easing),Zn=In.rawValue;(isString(Zn)||isNumber(Zn))&&($n[or]=$n[or]||{},$n[or][Hn]=In.rawValue,Qn&&($n[or][Ue]=Qn))}}}}for(var ze=0;ze<Ne;ze++){var Pt=Ie[ze],qe=Pt.targetName;qe?qe==="shape"&&Fe(Pt,$e):!i&&Fe(Pt,Oe)}for(var Et in Oe){var kt={};copyTransform(kt,n),extend(kt,Oe[Et]);var At=getSRTTransformString(kt),Dt=Oe[Et][Ue];Ve[Et]=At?{transform:At}:{},setTransformOrigin(Ve[Et],kt),Dt&&(Ve[Et][Ue]=Dt)}var Lt,jt=!0;for(var Et in $e){Ve[Et]=Ve[Et]||{};var hn=!Lt,Dt=$e[Et][Ue];hn&&(Lt=new PathProxy$1);var vn=Lt.len();Lt.reset(),Ve[Et].d=buildPathString(n,$e[Et],Lt);var _n=Lt.len
|
|
|
|
|
|
|
|
|
|
|
|
`:"<br/>",Ce=le.join(_e);this._showOrMove(re,function(){this._updateContentNotChangedOnAxis(r,ae)?this._updatePosition(re,de,V[0],V[1],this._tooltipContent,ae):this._showTooltipContent(re,Ce,ae,Math.random()+"",V[0],V[1],de,null,ue)})},t.prototype._showSeriesItemTooltip=function(r,i,g){var $=this._ecModel,V=getECData(i),re=V.seriesIndex,ie=$.getSeriesByIndex(re),ae=V.dataModel||ie,oe=V.dataIndex,le=V.dataType,ue=ae.getData(le),de=this._renderMode,he=r.positionDefault,pe=buildTooltipModel([ue.getItemModel(oe),ae,ie&&(ie.coordinateSystem||{}).model],this._tooltipModel,he?{position:he}:null),_e=pe.get("trigger");if(!(_e!=null&&_e!=="item")){var Ce=ae.getDataParams(oe,le),xe=new TooltipMarkupStyleCreator;Ce.marker=xe.makeTooltipMarker("item",convertToColorString(Ce.color),de);var Ie=normalizeTooltipFormatResult(ae.formatTooltip(oe,!1,le)),Ne=pe.get("order"),Oe=pe.get("valueFormatter"),$e=Ie.frag,Ve=$e?buildTooltipMarkup(Oe?extend({valueFormatter:Oe},$e):$e,xe,de,Ne,$.get("useUTC"),pe.get("textStyle")):Ie.text,Ue="item_"+ae.name+"_"+oe;this._showOrMove(pe,function(){this._showTooltipContent(pe,Ve,Ce,Ue,r.offsetX,r.offsetY,r.position,r.target,xe)}),g({type:"showTip",dataIndexInside:oe,dataIndex:ue.getRawIndex(oe),seriesIndex:re,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,i,g){var $=this._renderMode==="html",V=getECData(i),re=V.tooltipConfig,ie=re.option||{},ae=ie.encodeHTMLContent;if(isString(ie)){var oe=ie;ie={content:oe,formatter:oe},ae=!0}ae&&$&&ie.content&&(ie=clone$2(ie),ie.content=encodeHTML(ie.content));var le=[ie],ue=this._ecModel.getComponent(V.componentMainType,V.componentIndex);ue&&le.push(ue),le.push({formatter:ie.content});var de=r.positionDefault,he=buildTooltipModel(le,this._tooltipModel,de?{position:de}:null),pe=he.get("content"),_e=Math.random()+"",Ce=new TooltipMarkupStyleCreator;this._showOrMove(he,function(){var xe=clone$2(he.get("formatterParams")||{});this._showTooltipContent(he,pe,xe,_e,r.offsetX,r.offsetY,r.position,i,Ce)}),g({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,i,g,$,V,re,ie,ae,oe){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var le=this._tooltipContent;le.setEnterable(r.get("enterable"));var ue=r.get("formatter");ie=ie||r.get("position");var de=i,he=this._getNearestPoint([V,re],g,r.get("trigger"),r.get("borderColor")),pe=he.color;if(ue)if(isString(ue)){var _e=r.ecModel.get("useUTC"),Ce=isArray(g)?g[0]:g,xe=Ce&&Ce.axisType&&Ce.axisType.indexOf("time")>=0;de=ue,xe&&(de=format(Ce.axisValue,de,_e)),de=formatTpl(de,g,!0)}else if(isFunction(ue)){var Ie=bind$1(function(Ne,Oe){Ne===this._ticket&&(le.setContent(Oe,oe,r,pe,ie),this._updatePosition(r,ie,V,re,le,g,ae))},this);this._ticket=$,de=ue(g,$,Ie)}else de=ue;le.setContent(de,oe,r,pe,ie),le.show(r,pe),this._updatePosition(r,ie,V,re,le,g,ae)}},t.prototype._getNearestPoint=function(r,i,g,$){if(g==="axis"||isArray(i))return{color:$||(this._renderMode==="html"?"#fff":"none")};if(!isArray(i))return{color:$||i.color||i.borderColor}},t.prototype._updatePosition=function(r,i,g,$,V,re,ie){var ae=this._api.getWidth(),oe=this._api.getHeight();i=i||r.get("position");var le=V.getSize(),ue=r.get("align"),de=r.get("verticalAlign"),he=ie&&ie.getBoundingRect().clone();if(ie&&he.applyTransform(ie.transform),isFunction(i)&&(i=i([g,$],re,V.el,he,{viewSize:[ae,oe],contentSize:le.slice()})),isArray(i))g=parsePercent(i[0],ae),$=parsePercent(i[1],oe);else if(isObject$2(i)){var pe=i;pe.width=le[0],pe.height=le[1];var _e=getLayoutRect(pe,{width:ae,height:oe});g=_e.x,$=_e.y,ue=null,de=null}else if(isString(i)&&ie){var Ce=calcTooltipPosition(i,he,le,r.get("borderWidth"));g=Ce[0],$=Ce[1]}else{var Ce=refixTooltipPosition(g,$,V,ae,oe,ue?null:20,de?null:20);g=Ce[0],$=Ce[1]}if(ue&&(g-=isCenterAlign(ue)?le[0]/2:ue==="right"?le[0]:0),de&&($-=isCenterAlign(de)?le[1]/2:de==="bottom"?le[1]:0),shouldTooltipConfine(r)){var Ce=confineTooltipPosition(g,$,V,ae,oe);g=Ce[0],$=Ce[1]}V.moveTo(g,$)},t.prototype._updateContentNotChangedOnAxis=function(r,i){var g=this._lastDataByCoordSys,$=this._cbParamsList,V=!!g&&g.length===r.
|
|
|
|
|
|
`)){var _e=new Group$1;_e.newline=!0,ae.add(_e);return}var Ce=g.getSeriesByName(pe)[0];if(!oe.get(pe))if(Ce){var xe=Ce.getData(),Ie=xe.getVisual("legendLineStyle")||{},Ne=xe.getVisual("legendIcon"),Oe=xe.getVisual("style"),$e=this._createItem(Ce,pe,he,de,i,r,Ie,Oe,Ne,le,$);$e.on("click",curry(dispatchSelectAction,pe,null,$,ue)).on("mouseover",curry(dispatchHighlightAction,Ce.name,null,$,ue)).on("mouseout",curry(dispatchDownplayAction,Ce.name,null,$,ue)),g.ssr&&$e.eachChild(function(Ve){var Ue=getECData(Ve);Ue.seriesIndex=Ce.seriesIndex,Ue.dataIndex=he,Ue.ssrType="legend"}),oe.set(pe,!0)}else g.eachRawSeries(function(Ve){if(!oe.get(pe)&&Ve.legendVisualProvider){var Ue=Ve.legendVisualProvider;if(!Ue.containName(pe))return;var Fe=Ue.indexOfName(pe),ze=Ue.getItemVisual(Fe,"style"),Pt=Ue.getItemVisual(Fe,"legendIcon"),qe=parse(ze.fill);qe&&qe[3]===0&&(qe[3]=.2,ze=extend(extend({},ze),{fill:stringify(qe,"rgba")}));var Et=this._createItem(Ve,pe,he,de,i,r,{},ze,Pt,le,$);Et.on("click",curry(dispatchSelectAction,null,pe,$,ue)).on("mouseover",curry(dispatchHighlightAction,null,pe,$,ue)).on("mouseout",curry(dispatchDownplayAction,null,pe,$,ue)),g.ssr&&Et.eachChild(function(kt){var At=getECData(kt);At.seriesIndex=Ve.seriesIndex,At.dataIndex=he,At.ssrType="legend"}),oe.set(pe,!0)}},this)},this),V&&this._createSelector(V,i,$,re,ie)},t.prototype._createSelector=function(r,i,g,$,V){var re=this.getSelectorGroup();each(r,function(ae){var oe=ae.type,le=new ZRText$1({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){g.dispatchAction({type:oe==="all"?"legendAllSelect":"legendInverseSelect",legendId:i.id})}});re.add(le);var ue=i.getModel("selectorLabel"),de=i.getModel(["emphasis","selectorLabel"]);setLabelStyle(le,{normal:ue,emphasis:de},{defaultText:ae.title}),enableHoverEmphasis(le)})},t.prototype._createItem=function(r,i,g,$,V,re,ie,ae,oe,le,ue){var de=r.visualDrawType,he=V.get("itemWidth"),pe=V.get("itemHeight"),_e=V.isSelected(i),Ce=$.get("symbolRotate"),xe=$.get("symbolKeepAspect"),Ie=$.get("icon");oe=Ie||oe||"roundRect";var Ne=getLegendStyle(oe,$,ie,ae,de,_e,ue),Oe=new Group$1,$e=$.getModel("textStyle");if(isFunction(r.getLegendIcon)&&(!Ie||Ie==="inherit"))Oe.add(r.getLegendIcon({itemWidth:he,itemHeight:pe,icon:oe,iconRotate:Ce,itemStyle:Ne.itemStyle,lineStyle:Ne.lineStyle,symbolKeepAspect:xe}));else{var Ve=Ie==="inherit"&&r.getData().getVisual("symbol")?Ce==="inherit"?r.getData().getVisual("symbolRotate"):Ce:0;Oe.add(getDefaultLegendIcon({itemWidth:he,itemHeight:pe,icon:oe,iconRotate:Ve,itemStyle:Ne.itemStyle,lineStyle:Ne.lineStyle,symbolKeepAspect:xe}))}var Ue=re==="left"?he+5:-5,Fe=re,ze=V.get("formatter"),Pt=i;isString(ze)&&ze?Pt=ze.replace("{name}",i??""):isFunction(ze)&&(Pt=ze(i));var qe=_e?$e.getTextColor():$.get("inactiveColor");Oe.add(new ZRText$1({style:createTextStyle($e,{text:Pt,x:Ue,y:pe/2,fill:qe,align:Fe,verticalAlign:"middle"},{inheritColor:qe})}));var Et=new Rect$1({shape:Oe.getBoundingRect(),style:{fill:"transparent"}}),kt=$.getModel("tooltip");return kt.get("show")&&setTooltipConfig({el:Et,componentModel:V,itemName:i,itemTooltipOption:kt.option}),Oe.add(Et),Oe.eachChild(function(At){At.silent=!0}),Et.silent=!le,this.getContentGroup().add(Oe),enableHoverEmphasis(Oe),Oe.__legendDataIndex=g,Oe},t.prototype.layoutInner=function(r,i,g,$,V,re){var ie=this.getContentGroup(),ae=this.getSelectorGroup();box(r.get("orient"),ie,r.get("itemGap"),g.width,g.height);var oe=ie.getBoundingRect(),le=[-oe.x,-oe.y];if(ae.markRedraw(),ie.markRedraw(),V){box("horizontal",ae,r.get("selectorItemGap",!0));var ue=ae.getBoundingRect(),de=[-ue.x,-ue.y],he=r.get("selectorButtonGap",!0),pe=r.getOrient().index,_e=pe===0?"width":"height",Ce=pe===0?"height":"width",xe=pe===0?"y":"x";re==="end"?de[pe]+=oe[_e]+he:le[pe]+=ue[_e]+he,de[1-pe]+=oe[Ce]/2-ue[Ce]/2,ae.x=de[0],ae.y=de[1],ie.x=le[0],ie.y=le[1];var Ie={x:0,y:0};return Ie[_e]=oe[_e]+he+ue[_e],Ie[Ce]=Math.max(oe[Ce],ue[Ce]),Ie[xe]=Math.min(0,ue[xe]+de[1-pe]),Ie}else return ie.x=le[0],ie.y=le[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup(
|
|
|
|
|
|
`||g==="")){var $=n.isSelected(g);hasOwn(r,g)?r[g]=r[g]&&$:r[g]=$}}),r}function installLegendAction(n){n.registerAction("legendToggleSelect","legendselectchanged",curry$1(legendSelectActionHandler,"toggleSelected")),n.registerAction("legendAllSelect","legendselectall",curry$1(legendSelectActionHandler,"allSelect")),n.registerAction("legendInverseSelect","legendinverseselect",curry$1(legendSelectActionHandler,"inverseSelect")),n.registerAction("legendSelect","legendselected",curry$1(legendSelectActionHandler,"select")),n.registerAction("legendUnSelect","legendunselected",curry$1(legendSelectActionHandler,"unSelect"))}function install$2(n){n.registerComponentModel(LegendModel$1),n.registerComponentView(LegendView$1),n.registerProcessor(n.PRIORITY.PROCESSOR.SERIES_FILTER,legendFilter),n.registerSubTypeDefaulter("legend",function(){return"plain"}),installLegendAction(n)}var ScrollableLegendModel=function(n){__extends(t,n);function t(){var r=n!==null&&n.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},t.prototype.init=function(r,i,g){var $=getLayoutParams(r);n.prototype.init.call(this,r,i,g),mergeAndNormalizeLayoutParams(this,r,$)},t.prototype.mergeOption=function(r,i){n.prototype.mergeOption.call(this,r,i),mergeAndNormalizeLayoutParams(this,this.option,r)},t.type="legend.scroll",t.defaultOption=inheritDefaultOption(LegendModel$1.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(LegendModel$1);function mergeAndNormalizeLayoutParams(n,t,r){var i=n.getOrient(),g=[1,1];g[i.index]=0,mergeLayoutParam(t,r,{type:"box",ignoreSize:!!g})}const ScrollableLegendModel$1=ScrollableLegendModel;var Group=Group$3,WH=["width","height"],XY=["x","y"],ScrollableLegendView=function(n){__extends(t,n);function t(){var r=n!==null&&n.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!0,r._currentIndex=0,r}return t.prototype.init=function(){n.prototype.init.call(this),this.group.add(this._containerGroup=new Group),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Group)},t.prototype.resetInner=function(){n.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(r,i,g,$,V,re,ie){var ae=this;n.prototype.renderInner.call(this,r,i,g,$,V,re,ie);var oe=this._controllerGroup,le=i.get("pageIconSize",!0),ue=isArray(le)?le:[le,le];he("pagePrev",0);var de=i.getModel("pageTextStyle");oe.add(new ZRText$1({name:"pageText",style:{text:"xx/xx",fill:de.getTextColor(),font:de.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),he("pageNext",1);function he(pe,_e){var Ce=pe+"DataIndex",xe=createIcon(i.get("pageIcons",!0)[i.getOrient().name][_e],{onclick:bind$1(ae._pageGo,ae,Ce,i,$)},{x:-ue[0]/2,y:-ue[1]/2,width:ue[0],height:ue[1]});xe.name=pe,oe.add(xe)}},t.prototype.layoutInner=function(r,i,g,$,V,re){var ie=this.getSelectorGroup(),ae=r.getOrient().index,oe=WH[ae],le=XY[ae],ue=WH[1-ae],de=XY[1-ae];V&&box("horizontal",ie,r.get("selectorItemGap",!0));var he=r.get("selectorButtonGap",!0),pe=ie.getBoundingRect(),_e=[-pe.x,-pe.y],Ce=clone$2(g);V&&(Ce[oe]=g[oe]-pe[oe]-he);var xe=this._layoutContentAndController(r,$,Ce,ae,oe,ue,de,le);if(V){if(re==="end")_e[ae]+=xe[oe]+he;else{var Ie=pe[oe]+he;_e[ae]-=Ie,xe[le]-=Ie}xe[oe]+=pe[oe]+he,_e[1-ae]+=xe[de]+xe[ue]/2-pe[ue]/2,xe[ue]=Math.max(xe[ue],pe[ue]),xe[de]=Math.min(xe[de],pe[de]+_e[1-ae]),ie.x=_e[0],ie.y=_e[1],ie.markRedraw()}return xe},t.prototype._layoutContentAndController=function(r,i,g,$,V,re,ie,ae){var oe=this.getContentGroup(),le=this._containerGroup,ue=this._controllerGroup;box(r.get("orient"),oe,r.get("itemGap"),$?g.width:null,$?nul
|
|
|
|
|
|
.vue-echarts-inner{flex-grow:1;min-width:0;width:auto!important;height:auto!important}
|
|
|
|
|
|
`,{});var U=function(){if(z!=null)return z;if(typeof HTMLElement>"u"||typeof customElements>"u")return z=!1;try{new Function("tag",`class EChartsElement extends HTMLElement {
|
|
|
|
|
|
__dispose = null;
|
|
|
|
|
|
|
|
|
|
|
|
disconnectedCallback() {
|
|
|
|
|
|
if (this.__dispose) {
|
|
|
|
|
|
this.__dispose();
|
|
|
|
|
|
this.__dispose = null;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (customElements.get(tag) == null) {
|
|
|
|
|
|
customElements.define(tag, EChartsElement);
|
|
|
|
|
|
}
|
|
|
|
|
|
`)(C)}catch{return z=!1}return z=!0}(),D="ecTheme",k="ecInitOptions",B="ecUpdateOptions",P=/(^&?~?!?)native:/,H=defineComponent({name:"echarts",props:b(b({option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean},_),L),emits:{},inheritAttrs:!1,setup:function(n,t){var r=t.attrs,i=shallowRef(),g=shallowRef(),$=shallowRef(),V=shallowRef(),re=inject(D,null),ie=inject(k,null),ae=inject(B,null),oe=toRefs(n),le=oe.autoresize,ue=oe.manualUpdate,de=oe.loading,he=oe.loadingOptions,pe=computed(function(){return V.value||n.option||null}),_e=computed(function(){return n.theme||w(re,{})}),Ce=computed(function(){return n.initOptions||w(ie,{})}),xe=computed(function(){return n.updateOptions||w(ae,{})}),Ie=computed(function(){return function(Pt){var qe={};for(var Et in Pt)j(Et)||(qe[Et]=Pt[Et]);return qe}(r)}),Ne={},Oe=getCurrentInstance().proxy.$listeners,$e={};function Ve(Pt){if(g.value){var qe=$.value=init(g.value,_e.value,Ce.value);n.group&&(qe.group=n.group),Object.keys($e).forEach(function(kt){var At=$e[kt];if(At){var Dt=kt.toLowerCase();Dt.charAt(0)==="~"&&(Dt=Dt.substring(1),At.__once__=!0);var Lt=qe;if(Dt.indexOf("zr:")===0&&(Lt=qe.getZr(),Dt=Dt.substring(3)),At.__once__){delete At.__once__;var jt=At;At=function(){for(var hn=[],vn=0;vn<arguments.length;vn++)hn[vn]=arguments[vn];jt.apply(void 0,hn),Lt.off(Dt,At)}}Lt.on(Dt,At)}}),le.value?nextTick(function(){qe&&!qe.isDisposed()&&qe.resize(),Et()}):Et()}function Et(){var kt=Pt||pe.value;kt&&qe.setOption(kt,xe.value)}}function Ue(){$.value&&($.value.dispose(),$.value=void 0)}Oe?Object.keys(Oe).forEach(function(Pt){P.test(Pt)?Ne[Pt.replace(P,"$1")]=Oe[Pt]:$e[Pt]=Oe[Pt]}):Object.keys(r).filter(function(Pt){return j(Pt)}).forEach(function(Pt){var qe=Pt.charAt(2).toLowerCase()+Pt.slice(3);if(qe.indexOf("native:")!==0)qe.substring(qe.length-4)==="Once"&&(qe="~".concat(qe.substring(0,qe.length-4))),$e[qe]=r[Pt];else{var Et="on".concat(qe.charAt(7).toUpperCase()).concat(qe.slice(8));Ne[Et]=r[Pt]}});var Fe=null;watch(ue,function(Pt){typeof Fe=="function"&&(Fe(),Fe=null),Pt||(Fe=watch(function(){return n.option},function(qe,Et){qe&&($.value?$.value.setOption(qe,b({notMerge:qe!==Et},xe.value)):Ve())},{deep:!0}))},{immediate:!0}),watch([_e,Ce],function(){Ue(),Ve()},{deep:!0}),watchEffect(function(){n.group&&$.value&&($.value.group=n.group)});var ze=E($);return function(Pt,qe,Et){var kt=inject(A,{}),At=computed(function(){return b(b({},w(kt,{})),Et==null?void 0:Et.value)});watchEffect(function(){var Dt=Pt.value;Dt&&(qe.value?Dt.showLoading(At.value):Dt.hideLoading())})}($,de,he),function(Pt,qe,Et){var kt=null;watch([Et,Pt,qe],function(At,Dt,Lt){var jt=At[0],hn=At[1],vn=At[2];if(jt&&hn&&vn){var _n=vn===!0?{}:vn,wn=_n.throttle,bn=wn===void 0?100:wn,Cn=_n.onResize,Sn=function(){hn.resize(),Cn==null||Cn()};kt=bn?throttle(Sn,bn):Sn,addListener(jt,kt)}Lt(function(){jt&&kt&&removeListener(jt,kt)})})}($,le,g),onMounted(function(){Ve()}),onBeforeUnmount(function(){U&&i.value?i.value.__dispose=Ue:Ue()}),b({chart:$,root:i,inner:g,setOption:function(Pt,qe){n.manualUpdate&&(V.value=Pt),$.value?$.value.setOption(Pt,qe||{}):Ve(Pt)},nonEventAttrs:Ie,nativeListeners:Ne},ze)},render:function(){var n=b(b({},this.nonEventAttrs),this.nativeListeners);return n.ref="root",n.class=n.class?["echarts"].concat(n.class):"echarts",h$1(C,n,[h$1("div",{ref:"inner",class:"vue-echarts-inner"})])}});const _sfc_main=defineComponent({__name:"index",props:{title:{type:String,default:"标题"},seriesName:{type:String,default:"详情"},seriesData:{type:Array,default:()=>[]}},setup(n){use([install$7,install$6,install$3,install$4,install]);const t=n,r=reactive({title:{text:t.title,left:"center"},tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c} ({d}%)"},legend:{orient:"vertical",left:"left"},series:[{name:t.seriesName,type:"pie",radius:"55%",center:["50%","60%"],data:t.seriesData,emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]});return watch(t,i=>{r.title.text=i.title,r.series[0].name=i.seriesName,r.series[0].data=i.seriesData}),(
|